6ea2181 Δ 6e48257 Δ 6fbd3ac Δ f6bf760 Δ d0ef47e Δ 763cb89 Δ f1a62ec Δ 3a99d6c Δ 89fffe8 Δ 5d13864 Δ a55b81a Δ aff8c4e Δ c08de14 Δ c7c3a64 Δ 612cb1f
editors: nobody
Which polynomials take squarefree values, and how often?  Take $f(n)=n^2+1$.  Its values begin $2, 5, 10, 17, 26, 37, 50$, and $50$ is not squarefree because $25$ divides it.  For $f(n)=n^4+2$ the values begin $3, 18, 83, 258, 627$, and $9$ divides $18$.  A prime power $p^k$ divides $f(n)$ only for $n$ in certain classes modulo $p^k$.  When those classes never exhaust the residues, the product over $p$ of the fractions outside them is the predicted density; for every irreducible polynomial of degree four through eight and $k=d-2$, provided no prime power divides every value, it is the true density.

For an integer $k\ge2$, an integer $a$ is $k$-power-free if no prime power $p^k$ divides $a$. The convention includes negative integers and excludes zero. For $f\in\mathbb Z[x]$ write
$$\rho_f(q)=\#\{a\in\mathbb Z/q\mathbb Z: f(a)\equiv0\pmod q\},\qquad S_{f,k}(X)=\#\{1\le n\le X: f(n)\text{ is } k\text{-power-free}\}.$$
The necessary local condition is $\rho_f(p^k)<p^k$ for every prime $p$: no prime $k$th power divides every value of $f$. The candidate density is the product of the proportions surviving these separate congruences.

Theorem. Let $f\in\mathbb Z[x]$ be irreducible over $\mathbb Q$ of degree $d$ with $4\le d\le8$, and put $k=d-2$. If $\rho_f(p^k)<p^k$ for every prime $p$, then
$$S_{f,k}(X)=c_{f,k}X+o_f(X),\qquad c_{f,k}=\prod_p\Bigl(1-\frac{\rho_f(p^k)}{p^k}\Bigr)>0.$$
No primitivity or sign condition on the leading coefficient is required.

For quartics this is a squarefree-value density theorem. In degrees $5,6,7,8$ the prime powers excluded are $p^3,p^4,p^5,p^6$. The statement concerns positive integer inputs and imposes no bound on the coefficient height of $f$; the error term is not asserted uniform in $f$. In particular $x^4+2$ and $x^4+1$ have positive squarefree-value density. The first is Eisenstein at $2$; the second is the eighth cyclotomic polynomial. For $x^4+2$ the value at zero excludes an odd prime square and the value at one excludes a square of $2$; the value at zero of $x^4+1$ is one, so its local condition is immediate.

The problem has a long history. Ricci obtained the asymptotic in the range $k\ge d$. Hooley obtained the asymptotic at the exponent $d-1$ first treated for infinitude by Erdos. Erdos singled out the unresolved squarefreeness of $n^4+2$ in 1953 and returned to the obstacle at exponent $d-2$ in his 1965 survey.
./sfrefs/erdos-1953.pdf
./sfrefs/erdos-1965.pdf

Nair obtained the asymptotic for $k\ge(\sqrt2-\tfrac12)d$, with further developments by Nair and by Huxley and Nair. The 1976 bound reaches $k=d-2$ for $d\ge24$. Heath-Brown's affine determinant method gave the range $k\ge(3d+2)/4$, reaching $k=d-2$ for $d\ge10$. Combining that method with Salberger's global determinant estimates, Browning improved the range to $k\ge(3d+1)/4$, which reaches $k=d-2$ for $d\ge9$.
./sfrefs/browning-2011.pdf
./sfrefs/salberger-2007.pdf

The formulation and published reproof in Xiao are used: the input interval is $1\le n\le X$ and the constant is the Euler product over all residue classes modulo $p^k$. The shape of the polynomial can permit stronger estimates: Heath-Brown proved a power-saving asymptotic for irreducible binomials $x^d+c$ when $k\ge(5d+3)/9$, which at $k=d-2$ covers degrees $d\ge6$ under the binomial restriction; Reuss obtained a power-saving error for the general polynomial at exponent $d-1$.
./sfrefs/xiao-2017.pdf
./sfrefs/heathbrown-2013.pdf
./sfrefs/reuss-2015.pdf

Granville showed that the $abc$ conjecture yields the predicted squarefree-value density for separable integer polynomials with no fixed prime-square divisor. Greaves and Helfgott treated squarefree values of binary forms; a density in two integer variables does not by itself give the density on the fixed line with second coordinate one. Recent results of Browning and Shparlinski and of Sofos study the averaged discrepancy over polynomial coefficient families, and those averaged statements do not imply a theorem for each fixed polynomial. Carella's preprint claims the asymptotics for $n^4+1$ and $n^4+2$; Zapata Ceballos and Jalalvand claim positive density for certain monic degree-$2q$ polynomials including $n^4+1$. Neither claim enters as a theorem input: the large-prime estimate and sieve transfer below are proved independently.
./browning-shparlinski-jnt-2024.pdf
./sfrefs/carella-2023.pdf

For higher degrees Browning's theorem gives a direct consequence. Let $f\in\mathbb Z[x]$ be irreducible over $\mathbb Q$ of degree $d\ge4$ and $k=d-2$. If $f$ has no fixed prime $k$th-power divisor, then
$$S_{f,k}(X)=c_{f,k}X+o_f(X),\qquad c_{f,k}=\prod_p\Bigl(1-\frac{\rho_f(p^k)}{p^k}\Bigr)>0.$$
Indeed for $4\le d\le8$ this is the theorem above, and for $d\ge9$ one has $d-2\ge(3d+1)/4$, so Browning's theorem in Xiao's form applies to the primitive positive-leading part of $f$; removing sign and content preserves the density.

A fixed-product consequence follows from factorwise estimates. A nonzero polynomial is separable over $\mathbb Q$ if each nonconstant irreducible factor occurs with multiplicity one. Fix $k\ge2$ and let $F\in\mathbb Z[x]\setminus\{0\}$ be separable over $\mathbb Q$ with every nonconstant irreducible factor of degree at most $k+2$. If $\rho_F(p^k)<p^k$ for every prime $p$, then
$$S_{F,k}(N)=c_{F,k}N+o_{F,k}(N),\qquad c_{F,k}=\prod_p\Bigl(1-\frac{\rho_F(p^k)}{p^k}\Bigr)>0.$$
More generally, let $\mathbf F=(F_1,\ldots,F_r)$, $r\ge1$, be a fixed family of nonzero integer polynomials, each separable with all nonconstant irreducible factors of degree at most $k+2$, sharing factors allowed, and put $\Omega_p=\{a\in\mathbb Z/p^k\mathbb Z: p^k\mid F_i(a)\text{ for some } i\}$. If $\#\Omega_p<p^k$ for every prime $p$ then
$$S_{\mathbf F,k}(N)=c_{\mathbf F,k}N+o_{\mathbf F,k}(N),\qquad c_{\mathbf F,k}=\prod_p\Bigl(1-\frac{\#\Omega_p}{p^k}\Bigr)>0,$$
where $S_{\mathbf F,k}(N)$ counts $1\le n\le N$ with every $F_i(n)$ $k$-power-free. The first form constrains the value of the whole product $F$; the second constrains the $F_i(n)$ separately and uses the joint condition $\Omega_p$. All data are fixed; no uniform or power-saving error is claimed.

The finite-prime part reduces to the Chinese remainder theorem. Outside a fixed finite set, separability and Hensel lifting give $\rho_f(p^k)\le d$, so for fixed large $Y$ the primes $Y<p\le X$ remove at most $O_f(XY^{1-k}+\pi(X))$ integers in $(X,2X]$. The hard part is the control of primes larger than the input interval. The central estimate is the following. With $k=d-2$ and $4\le d\le8$ there is $\delta=\delta_f>0$ with
$$\#\{n\in\mathbb Z: X<n\le2X,\ p^k\mid f(n)\text{ for some prime } p>X\}\ll_f X^{1-\delta}.$$
It does not require local admissibility. The sieve argument shows explicitly that it implies the density theorem, including the stated sign and content generality, holding the finite cutoff fixed as $X\to\infty$ and then letting the cutoff tend to infinity; this produces the exact Euler product without a power-saving error in the density asymptotic.

Proof strategy. Fix a dyadic prime interval $P\le p\le2P$ and choose one qualifying prime for each counted input. Write $P=X^\eta$ and $b=d-k\eta$. The relation $f(n)=yp^k$ places the triples $(n,y,p)$ on the surface $f(x)=yz^k$ with coordinate sizes $X,X^b,X^\eta$; a weighted determinant argument on this surface suffices when $\eta$ is large. The remaining range uses the factorization of $f$. Let $\theta$ be a root of $f$ and $K=\mathbb Q(\theta)$. Ideal factorization and the unit theorem produce integral $\alpha,\beta\in K$ with
$$\alpha^k\beta=\mu(n-\theta)$$
for a fixed nonzero integer $\mu$, with conjugate sizes comparable to $P^{1/d}$ and $X^{b/d}$. Integer coordinates in a fixed integral basis give two boxes; the projective directions satisfy explicit polynomial equations, and near a balanced point, after choosing one of finitely many local branches, either direction determines the other analytically once $1/n$ is specified. The directions are partitioned into small paired boxes; an archimedean determinant yields a polynomial equation on each pair, and components defined by an equation in a single coordinate block receive a second cut. The distinction between a mixed equation and a pure equation matters, since the latter also reduces the independent Taylor monomials in the local determinant. Two further steps convert the cuts into counts: a reduced basis of the integer lattice of a direction box shrinks its points in new integral coordinates, while an exceptionally short lattice vector bounds the number of boxes in which it occurs; then the uniform affine counting theorem applies through lower bounds for weighted spaces of polynomial functions, its auxiliary varieties depending on earlier prime choices with a random deletion argument controlling bad reduction. In degree four the surfaces and curves need sharper geometry: on a surface the difficult projections have degree one or two; a quadric supplies an additional field degree; on a plane a deficient bound forces either a polynomial of degree at most four on a general line or a degree-two map on the line of directions with four distinct critical values; on a curve the limiting case is a degree-five polynomial with four prescribed critical values, and after normalizing two critical points only finitely many such polynomials occur, the integer values forming one set of size $O_f(X^{1/5})$ removed once before summing over boxes.

Consider now the reduction from a large-prime tail to the exact density. The geometric argument estimates large prime-power divisors only for a primitive polynomial with positive leading coefficient, and the finite-prime conditions must still be imposed on the original polynomial because removing content changes the corresponding Euler factors. Let $f\in\mathbb Z[x]$ be irreducible over $\mathbb Q$ of degree $d\ge2$ and $k\ge2$, with $\rho_f(p^k)<p^k$ for every prime $p$. Write $f=scg$ with $s\in\{-1,1\}$, $c\in\mathbb N$ the positive content, and $g\in\mathbb Z[x]$ primitive with positive leading coefficient, and assume
$$T_g(X):=\#\{n\in\mathbb Z: X<n\le2X,\ p^k\mid g(n)\text{ for some prime } p>X\}=o_{g,k}(X).$$
Then $S_{f,k}(N)=c_{f,k}N+o_{f,k}(N)$ with $c_{f,k}=\prod_p(1-\rho_f(p^k)/p^k)>0$.

The proof normalizes and treats the local factors. Multiplication by $s$ does not affect divisibility; $g$ is irreducible and inherits local admissibility; neither polynomial has an integer root since $d\ge2$, so no counted value is zero. For a prime $p\mid c$ put $e=v_p(c)$. Local admissibility forces $e<k$ and
$$\rho_f(p^k)=p^e\rho_g(p^{k-e}),\qquad 1-\frac{\rho_f(p^k)}{p^k}=1-\frac{\rho_g(p^{k-e})}{p^{k-e}},$$
because $p^k\mid f(a)$ is equivalent to $p^{k-e}\mid g(a)$ and each class modulo $p^{k-e}$ has exactly $p^e$ lifts modulo $p^k$; for $p\nmid c$ the root counts agree. Let $\mathcal B$ contain the prime divisors of $c$, the leading coefficient of $g$ and the discriminant of $g$. For $p\notin\mathcal B$ the reduction of $g$ has degree $d$ and simple roots, and each root modulo $p^j$ lifts uniquely to $p^{j+1}$ because
$$g(a+p^j u)\equiv g(a)+p^j u g'(a)\pmod{p^{j+1}}$$
determines $u$ modulo $p$ when $g'(a)$ is invertible. Hence $\rho_f(p^k)=\rho_g(p^k)=\rho_g(p)\le d$ for $p\notin\mathcal B$. With $q_p=\rho_f(p^k)/p^k<1$ one has $\sum_p q_p<\infty$ since $k\ge2$, and for large $p$, $q_p\le1/2$ and $-2q_p\le\log(1-q_p)\le-q_p$, so the product converges to a strictly positive number with the finitely many bad-prime factors retained exactly.

The finite sieve and the intermediate primes proceed as follows. Fix $Y\ge2$ beyond $\mathcal B$ and set $Q_Y=\prod_{p\le Y}p^k$ and $c_Y=\prod_{p\le Y}(1-\rho_f(p^k)/p^k)$. Let $A_Y(X)$ count $n\in(X,2X]$ with $p^k\nmid f(n)$ for all $p\le Y$. The Chinese remainder theorem gives exactly $Q_Yc_Y$ permitted classes modulo $Q_Y$, so
$$A_Y(X)=c_YX+O(Q_Y),$$
with $Y$ fixed as $X\to\infty$. Let $A(X)$ count all $k$-power-free values in $(X,2X]$. For $X>Y$ the integers removed by primes $Y<p\le X$ number at most
$$I_Y(X)\le\sum_{Y<p\le X}\rho_f(p^k)\Bigl(\frac X{p^k}+1\Bigr)\le dX\sum_{m>Y}m^{-k}+d\pi(X)\le\frac d{k-1}XY^{1-k}+d\pi(X),$$
using $\pi(X)\ll X/\log X$. For large $X$ the remaining exceptional set is counted by $T_g(X)$, so
$$0\le A_Y(X)-A(X)\le I_Y(X)+T_g(X).$$
Dividing by $X$ and first letting $X\to\infty$ with $Y$ fixed, the tail hypothesis gives
$$c_Y-\frac d{k-1}Y^{1-k}\le\liminf_{X\to\infty}\frac{A(X)}X\le\limsup_{X\to\infty}\frac{A(X)}X\le c_Y.$$
Letting $Y\to\infty$ and using $c_Y\to c_{f,k}$ yields $A(X)=c_{f,k}X+o_{f,k}(X)$.

To pass from dyadic intervals to positive inputs, fix $J\ge1$ and apply this to the disjoint intervals $(N/2^{j+1},N/2^j]$ for $0\le j<J$. For fixed $J$ the total count is $c_{f,k}N(1-2^{-J})+o_{f,k,J}(N)$ and $[1,N/2^J]$ contains at most $N/2^J$ integers, so
$$c_{f,k}(1-2^{-J})\le\liminf_{N\to\infty}\frac{S_{f,k}(N)}N\le\limsup_{N\to\infty}\frac{S_{f,k}(N)}N\le c_{f,k}(1-2^{-J})+2^{-J},$$
and letting $J\to\infty$ finishes.

A large-prime bound survives any fixed finite congruence restriction on $n$, since the restricted exceptional set is a subset of the unrestricted one; in the finite sieve those restrictions combine with the conditions modulo $p^k$ using the least common multiple, with no independence needed, and the exact content-prime conditions can be retained while using the large-prime bound for the primitive polynomial.

The same normalization works when a density theorem for the primitive polynomial is already available, without a separate estimate in arithmetic progressions. Let $f$ be irreducible of degree at least two and $k\ge2$ with $\rho_f(p^k)<p^k$, write $f=scg$ as above, and suppose $S_{g,k}(N)=c_{g,k}N+o_{g,k}(N)$ with $c_{g,k}=\prod_p(1-\rho_g(p^k)/p^k)$. Then $S_{f,k}(N)=c_{f,k}N+o_{f,k}(N)$ with the positive Euler product of the transfer proposition. The normalization and product-convergence arguments do not use the tail hypothesis, so both products converge and the factors are related as above. Fix $Y$ beyond every prime divisor of $c$; for $h=f,g$ let $B_{h,Y}(N)$ count $1\le n\le N$ avoiding $p^k\mid h(n)$ for all $p\le Y$, and put $c_{h,Y}=\prod_{p\le Y}(1-\rho_h(p^k)/p^k)$. The finite count gives $B_{h,Y}(N)=c_{h,Y}N+O(Q_Y)$ with $Q_Y=\prod_{p\le Y}p^k$. An input in $B_{f,Y}(N)-S_{f,k}(N)$ avoids the small-prime conditions for $f$ but has a divisor $p^k$ with $p>Y$; it also avoids such primes for $g$, and $p\nmid c$ gives $p^k\mid g(n)$, so
$$0\le B_{f,Y}(N)-S_{f,k}(N)\le B_{g,Y}(N)-S_{g,k}(N).$$
Dividing by $N$ and letting $N\to\infty$ at fixed $Y$, the assumed density of $g$ gives
$$c_{f,Y}-(c_{g,Y}-c_{g,k})\le\liminf_{N\to\infty}\frac{S_{f,k}(N)}N\le\limsup_{N\to\infty}\frac{S_{f,k}(N)}N\le c_{f,Y},$$
and letting $Y\to\infty$ proves the claim.

The separable-product corollary follows by the same bookkeeping. Write $F_i=c_i\prod_{g\in\mathcal G_i}g$ with $c_i\in\mathbb Z\setminus\{0\}$ and $\mathcal G_i$ a set of distinct primitive irreducible polynomials with positive leading coefficients, and let $\mathcal G=\bigcup_i\mathcal G_i$ so shared factors appear once. The joint local condition implies local admissibility of each $F_i$ and of every $g\in\mathcal G$. For a factor of degree $d\le k+2$ let $T_{g,k}(X)$ count $X<n\le2X$ with $p^k\mid g(n)$ for some prime $p>X$, and record $T_{g,k}(X)=o_{g,k}(X)$. For $d\le k$, omitting finitely many integer roots and using $|g(n)|\ll_g X^d$: if $d<k$ the tail is empty, and if $d=k$ only primes $X<p\le C_gX$ occur, each with at most $d$ roots modulo $p^k$, an interval of length $X<p^k$ holding at most one representative per root, so $T_{g,k}(X)\ll_g\pi(C_gX)=o_g(X)$. If $d=k+1$, the unweighted triple estimates of Reuss give $o_g(X)$ triples with $X<n\le2X$, $a>X^{1-\delta}$, $\mu^2(a)=1$, $a^{d-1}b=g(n)$, for some fixed $\delta>0$; the values $g(n)$ are positive for large $X$, so $a=p$ and $b=g(n)/p^k$ include every input counted by $T_{g,k}(X)$. If $d=k+2\le8$ the large-prime proposition applies. Finally, if $d=k+2\ge9$, then $k=d-2\ge(3d+1)/4$ and $k/d>3/4$; Xiao's estimate is $E_B(B^{1-\delta})=o_g(B)$ for some fixed $\delta>0$, where
$$E_B(\xi)=\#\{1\le n\le B: b^k\mid g(n)\text{ for some squarefree integer } b>\xi\},$$
and taking $B=2X$ the event $p>X>(2X)^{1-\delta}$ places the tail inside this exceptional set.

Let $\mathcal B$ contain the prime divisors of the $c_i$, the leading coefficients and discriminants of the $g\in\mathcal G$, and the resultants of distinct pairs in $\mathcal G$; this set is finite. For $p\notin\mathcal B$, no two distinct factors vanish at the same residue modulo $p$ and the roots are simple, so
$$p^k\mid F_i(n)\iff p^k\mid g(n)\text{ for some } g\in\mathcal G_i,\qquad \#\Omega_p\le\sum_{g\in\mathcal G}\rho_g(p^k)=\sum_{g\in\mathcal G}\rho_g(p)\le D,$$
with $D=\sum_{g\in\mathcal G}\deg g$. Once $X$ exceeds all primes in $\mathcal B$ the family's large-prime exceptional set lies in the union of the sets counted by the $T_{g,k}(X)$ and so has size $o_{\mathbf F,k}(X)$. For fixed $Y$ beyond $\mathcal B$ the Chinese remainder theorem leaves exactly
$$Q_Y\prod_{p\le Y}\Bigl(1-\frac{\#\Omega_p}{p^k}\Bigr)\quad\text{classes modulo } Q_Y=\prod_{p\le Y}p^k,$$
the intermediate-prime estimate holds with $D$ in place of $d$, and taking the two limits gives the density on positive inputs. The product is positive since its local factors are and $\sum_p\#\Omega_p/p^k<\infty$. At primes in $\mathcal B$ the whole set $\Omega_p$ is retained, so valuations from different factors of one $F_i$ are not separated there. Taking $r=1$ gives the first assertion with $\#\Omega_p=\rho_F(p^k)$; empty products cover nonzero constants and the finitely many integer zeros of nonconstant polynomials do not affect the asymptotic.

The geometric arguments place the counted points on varieties whose equations vary with the box, so a counting theorem uniform for moving varieties is needed. Its input is a lower bound for independent monomials on each subvariety; its proof successively cuts residue classes by polynomial equations, with a deletion argument controlling the primes at which the newly built equations have singular reduction. The local prime-adic determinant principle is Heath-Brown's, the ordered local Hilbert and divisibility estimates are Salberger's, and simultaneous prime conditions appear in Salberger's later work; the patch construction and deletion estimate needed for dependencies on earlier prime choices are added below.
./sfrefs/heathbrown-2002-density.pdf
./sfrefs/salberger-2007.pdf

Throughout, degree means the ordinary degree of the projective closure, summed over irreducible components for a reducible set; irreducibility is over $\mathbb C$; Bezout bounds are used for intersections and linear projections in fixed ambient dimension. Fix positive weights $\omega_1,\ldots,\omega_N$ and let the weight of a monomial $z^\alpha$ be $\omega\cdot\alpha$. For an affine algebraic set $A\subseteq\mathbb C^N$ put
$$H_A(T)=\dim_{\mathbb C}\operatorname{span}\{z^\alpha|_A: \omega\cdot\alpha\le T\},$$
the supply of independent polynomial functions whose weighted size is at most a constant times $X^T$.

Theorem. Fix integers $1\le r\le N$, a degree bound $e_0$, a constant $C$, positive weights $\omega_l$, and positive reals $\delta_1,\ldots,\delta_r$. For $X\ge2$ let $S\subseteq\mathbb Z^N$ satisfy $|z_l|\le CX^{\omega_l}$ and lie on an algebraic set $Z$ of degree at most $e_0$ and dimension at most $r$. Suppose that for every fixed degree bound $e$, every irreducible $\mathbb Q$-defined subvariety $A\subseteq Z$ of degree at most $e$ and dimension $h>0$ meeting $S$ satisfies either
$$|S\cap A|\ll_{e,\alpha}X^\alpha\quad\text{for every fixed }\alpha>0,$$
or
$$H_A(T)\ge\frac{T^h}{h!\delta_h^h}-C_eT^{h-1}\quad(T\ge1),$$
with constants uniform in $X,Z,S,A$. Put $E_h=\max_{h\le s\le r}\delta_s$. Then for every $\eps>0$,
$$|S|\ll_\eps X^{E_1+\cdots+E_r+\eps},$$
the constant depending only on the fixed data and the uniform constants in the hypotheses, with no bound required on the coefficients initially defining $Z$.

The weights are fixed in the statement; uniformity over a family follows when the positive lower and upper bounds and the Hilbert constants are uniform. Empty sets are trivial and zero-dimensional sets have at most as many points as the degree bound, so $1\le r\le N$ and $S\ne\varnothing$ may be assumed.

A patch is a triple $(A,G,\Delta)$ where $A$ is an irreducible $\mathbb Q$-defined variety of dimension $h$, the list $G$ consists of $N-h$ integer polynomials vanishing on $A$, and $\Delta$ is a square Jacobian minor in $N-h$ chosen coordinate columns; it covers the points of $A$ at which $\Delta\ne0$. For $h=N$ the list is empty and $\Delta=1$. A patch need not give $A$ globally as a complete intersection; its equations are local coordinates where the minor is nonzero. For every algebraic set $Z'\subseteq\mathbb C^N$ of degree at most $e$ there is a list of boundedly many patches $(A,G,\Delta)$ with $A\subseteq Z'$ covering $S\cap Z'$, with bounded degrees, all coefficients of $G$ and $\Delta$ bounded by $C'X^{C'}$, and, at a covered point $z$, $\Delta(z)$ a nonzero integer of absolute value at most $C''X^{C''}$, the bounds depending only on $e,N,C$ and the weights. The construction can be fixed as a function of $Z'$ and $S$ alone.

The patch lemma follows by splitting $Z'$ into components and descending to rational equations. If a component $A$ is not defined over $\mathbb Q$, some automorphism $\sigma$ of $\mathbb C$ over $\mathbb Q$ has $\sigma(A)\ne A$, and every rational point of $A$ lies in $A\cap\sigma(A)$, a proper bounded-degree intersection, so one replaces $A$ by the components there and recurses in smaller dimension. For the descent: if every such $\sigma$ fixed $A$, each finite-dimensional space of equations of degree at most $e'$ would be preserved; the reduced row-echelon basis in ordered monomials is unique, so the coefficients are fixed by all $\sigma$ and hence rational; the fixed field is $\mathbb Q$, since a nonrational algebraic number has a conjugate and a transcendental number can be moved by translation in a transcendence basis. For $A$ defined over $\mathbb Q$ of dimension $h$ and degree $e'$, the equations of ordinary degree at most $e'$ in its ideal have generic Jacobian rank $N-h$: choose $h$ coordinate functions algebraically independent in $\mathbb C(A)$, project onto these and in turn each remaining coordinate, each image closure being an irreducible hypersurface of degree at most $e'$ whose equation has nonzero derivative in the extra coordinate by separability in characteristic zero, and lift these equations to a diagonal generically nonzero minor. Evaluating all monomials of degree at most $e'$ on $S\cap A$ gives an integer matrix of bounded column count and entries bounded by a fixed power of $X$; its nullspace $W$ has an integer spanning set of polynomial height by choosing independent rows and pivot columns, solving by cofactors, and clearing the pivot determinant. Comparing its complexification with the degree-$e'$ part of the ideal: if the containment is strict, one bounded-height spanning polynomial does not vanish on $A$ but vanishes on $S\cap A$, so one intersects and recurses; if equality holds, the spanning equations give the generic Jacobian rank, and choosing $N-h$ of these polynomials with a nonzero minor gives a patch, recursing on $\Delta=0$ for the rest. A rational zero-dimensional component through $z\in S$ is the point $z$, with equations $z_l'-z_l$ and minor $1$. Every recursive intersection is proper with Bezout-bounded degree, dimension decreases, and the list and heights are controlled; fixing the choices once as functions of $Z'$, its degree allowance and $S$ makes equal inputs give identical data.

For $h\ge1$ let $s_h(L)$ be the sum of the first $L$ total degrees of monomials in $h$ variables, ordered by degree and counted with multiplicity; counting lattice points in a simplex gives $s_h(L)=\frac{h}{h+1}(h!)^{1/h}L^{1+1/h}+O_h(L)$. Fix $\nu>0$ and a degree bound for a patch with $h=\dim A>0$ satisfying the Hilbert alternative. Let $z\in S\cap A$ be covered by the patch and $\mathcal Q$ a set of distinct primes with $q\nmid\Delta(z)$ and $\prod_{q\in\mathcal Q}q\ge X^{\delta_h+\nu}$. For large $X$ the points of $S\cap A$ congruent to $z$ modulo these primes lie on a bounded-degree polynomial not vanishing identically on $A$, uniformly in the patch and primes with dependence on $\nu$ and the data; extra congruence conditions may be imposed. The proof fixes $q\nmid\Delta(z)$, translates to $z$ with the $h$ free columns as coordinates, and solves $G=0$ as power series in the free differences over $\mathbb Z_q$ by the invertible Jacobian, Hensel giving every nearby solution uniquely; hence each coordinate monomial has an integral expansion. An $L$-by-$L$ determinant of monomial values there has $q$-adic valuation at least $s_h(L)$: expanding in free-difference monomials, a repeated expansion monomial gives zero and the differences lie in $q\mathbb Z_q$, the least total degree of $L$ distinct expansion monomials being $s_h(L)$. On the other hand the Hilbert bound permits independent monomials with the $j$-th of weight at most $\delta_h(h!j)^{1/h}+O(1)$ (substitute $T=\delta_h(h!j)^{1/h}+C_1$), whose first $L$ have total weight at most $\delta_h s_h(L)+O(L)$ by $s_h$, so the evaluation determinant has absolute value at most $C_LX^{\delta_h s_h(L)+C_2L}$ and is an integer divisible by $(\prod_{q\in\mathcal Q}q)^{s_h(L)}$. Choosing $L$ with $\nu s_h(L)>C_2L$ and then $X$ large forces every such determinant to vanish, giving deficient rank on the class, and a nonzero rational linear combination vanishing on the class but not on $A$ has bounded degree.

The patch itself may depend on earlier primes, so the entire finite sequence of evaluation ranks is recorded. Fix small $\gamma>0$ and set $h_i=r+1-i$. Choose degree limits $D_i$ so that step $i$ is enough for the residue-cut lemma in parent dimension $h_i$ with $\nu=\gamma/2$, inductively; intersecting with the common zero set of a degree-$D_i$ polynomial space and applying the patch lemma gives degree bounds determined by the parent and $D_i$ even when dimension does not drop, covering every path of length $r$. Let $\mathcal B_1,\ldots,\mathcal B_r$ be disjoint finite prime blocks and $Q_i=\prod_{j\le i}\prod_{q\in\mathcal B_j}q$. For $z\in S$ define a path: take the first patch $(A_0,G_0,\Delta_0)$ of $Z$ covering $z$; given the parent patch at step $i$, let
$$\mathcal K_i=\{F\in\mathbb Q[z_1,\ldots,z_N]_{\le D_i}: F(z')=0\text{ for all } z'\in S\cap A_{i-1},\ z'\equiv z\pmod{Q_i}\},$$
record its codimension $\rho_i$, and take the first patch $(A_i,G_i,\Delta_i)$ covering $z$ in $A_{i-1}\cap V(\mathcal K_i)$; all $\Delta_i(z)$ are nonzero integers of uniformly polynomial size. Adding a prime to one block makes $(\rho_1,\ldots,\rho_r)$ lexicographically nonincreasing, and until the first change the parent patches agree because the new residue class is a subset and equal codimensions make the nested kernels equal, the first change only decreasing; equality of the full vectors forces equality of all kernels and patches. Encoding $\mathcal R=\sum_{i=1}^r\rho_i\prod_{j>i}(M_j+1)$ with $M_i=\binom{N+D_i}{N}$ and $0\le\mathcal R<B_0=\prod_i(M_i+1)$ gives a nonincreasing integer, unchanged only when the evaluated minors agree along the whole path.

Deletion estimate. Fix $z\in S$, all blocks but the $i$-th, and a prime pool $\mathcal P_i$ disjoint from those blocks with primes in $[X^\zeta,C_rX^\zeta]$, $\zeta>0$ fixed and $|\mathcal P_i|\to\infty$. Choose $t$ uniformly among $T_0$ consecutive integers $\ell,\ldots,\ell+T_0-1$ fixed independently of $X$, then $\mathcal B_i$ uniformly among the $t$-subsets of the pool. The expected fraction of primes in $\mathcal B_i$ dividing at least one of $\Delta_0(z),\ldots,\Delta_r(z)$ is at most $B_0/T_0+o(1)$, uniformly in $z$ and the other blocks. Deleting a uniformly chosen prime $q$ and writing $F(t)$ for the expected record of a uniform $t$-subset, the expected increase $F(t-1)-F(t)$ is a nonnegative integer at least one whenever the record changes, so averaging over consecutive sizes gives
$$\mathbb P(\text{record changes})\le\frac{F(\ell-1)-F(\ell+T_0-1)}{T_0}\le\frac{B_0}{T_0}.$$
Conditioning on the deleted subset and other blocks, the deleted-path minors are fixed nonzero integers of polynomial size whose product has only $O(1/\zeta)$ prime divisors at least $X^\zeta$, and the removed prime is uniform in the complement of the deleted subset, so its conditional probability of dividing that product is $o(1)$. If the record is unchanged the full and deleted paths have identical minors, so
$$\{q\text{ divides a full-path minor}\}\subseteq\{\text{record changes}\}\cup\{q\text{ divides a deleted-path minor}\},$$
whose probability is at most the stated bound plus $o(1)$, and sampling $q$ from the full block gives the assertion.

To choose blocks for which at least half of $S$ has enough good primes at every stage, allocate the nondecreasing cumulative exponents $E_r,\ldots,E_1$ (with $E_h=\max_{h\le s\le r}\delta_s$ and $E_{r+1}=0$) and put $a_i=E_{h_i}-E_{h_i+1}\ge0$. Choose small $\xi>0$ with $\xi(E_1+r\gamma)<\gamma/2$, take $T_0$ large in terms of $r,B_0,\xi$, then $\zeta>0$ with $\zeta(T_0+1)\le\gamma$, and use disjoint prime pools of cardinality tending to infinity all in $[X^\zeta,C_rX^\zeta]$ (possible by Chebyshev after partitioning into $r$ comparable pools). Choose the blocks independently with block $i$ sampled as in the deletion estimate, starting its size interval at $\ell_i=\lceil(a_i+\gamma)/\zeta\rceil$, so every allowed size satisfies $a_i+\gamma\le\zeta t_i\le a_i+2\gamma$. Call $z$ regular if in each block at most a fraction $\xi$ of its primes divide any full-path minor at $z$. Markov and a union bound give $\mathbb P(z\text{ not regular})\le\frac r\xi(B_0/T_0+o(1))<1/2$ for large $T_0$ and then $X$, so some fixed choice makes at least $|S|/2$ points regular, and for a regular point all but a fraction $\xi$ of primes in the first $i$ blocks avoid the current parent minor, the product of the remaining primes being at least
$$X^{(1-\xi)\zeta\sum_{j\le i}t_j}\ge X^{(1-\xi)(E_{h_i}+i\gamma)}\ge X^{\delta_{h_i}+\gamma/2}.$$

Arrange the full paths of regular points in a tree using the same kernels and fixed patches, stopping at a parent satisfying the small-count alternative or at a zero-dimensional parent. Inductively a parent at step $i$ has dimension at most $h_i$. At an auxiliary prime $q$ the reductions of a parent patch with $\Delta\ne0$ number $O(q^h)$: fixing the $h$ free coordinates, the other $N-h$ equations have invertible Jacobian there so the solutions are isolated zeros of a square system, Bezout-bounded even if other fiber components have positive dimension, summed over free coordinates; no good-reduction assumption is needed. For a regular point the primes of the new block at which the parent minor vanishes number at most $\xi t_i$, and allowing all such subsets ($\le2^{t_i}$, a constant) gives, since $q\le C_rX^\zeta$,
$$O\!\left(X^{\zeta t_i(h_i+N\xi)}\right)\le O\!\left(X^{(a_i+2\gamma)(h_i+N\xi)}\right)$$
new simultaneous classes, imposing earlier congruences only decreasing the count. If the parent has dimension exactly $h_i$, the cumulative product and the residue-cut lemma give a polynomial in $\mathcal K_i$ not vanishing on the parent but vanishing on the entire class in $S\cap A$ (every class member shares the good residues and satisfies $G=0$), so $A\cap V(\mathcal K_i)$ has dimension at most $h_i-1$ with boundedly many patches; smaller-dimension parents are covered automatically. After $r$ stages every nonexceptional leaf is zero-dimensional with boundedly many points, and the total branching exponent is at most
$$\sum_{i=1}^r h_i a_i+2\gamma\sum_{i=1}^r h_i+N\xi(E_1+2r\gamma),$$
the first term telescoping to $\sum_{h=1}^r E_h$. To finish, take $\gamma$ so small that the second term is below $\eps/4$, choose the degree limits and $B_0$, take $\xi$ small enough for $\xi(E_1+r\gamma)<\gamma/2$ and the last term below $\eps/4$, take $\alpha<\eps/4$, then choose $T_0,\zeta$ and finally $X$ so that every degree, height and probability constant is fixed before $X\to\infty$. This bounds at least half of $S$ by the right side, and doubling proves the counting theorem.

The large prime-power divisor is next converted into an integral equation in a fixed number field; balancing the factors at every embedding puts the projective coordinates in compact sets, and the resulting equations pair small boxes with boundedly many partners. The factorization-and-balancing follows Reuss, with Heath-Brown's Gaussian treatment of $n^2+1$ as an earlier model; standard ideal factorization, class-group finiteness and the full logarithmic unit lattice are used.
./sfrefs/reuss-2015.pdf
./sfrefs/heathbrown-2012.pdf
./sfrefs/milne-ant.pdf

Throughout, $f\in\mathbb Z[T]$ is primitive and irreducible of degree $d$ with positive leading coefficient $c$ and $k=d-2\ge2$. Fix a root $\theta$, put $K=\mathbb Q(\theta)$, and let $L$ be a splitting field with embeddings $\sigma_i:K\hookrightarrow L$ and $\theta_i=\sigma_i(\theta)$. Consider $X<n\le2X$, $P\le p\le2P$, $p>X$, $p^k\mid f(n)$, with $P=X^\eta$ and $b=d-k\eta$; all constants may depend on $f$ but not on $n,p$ or $X$.

Lemma (balanced factorization). There are a positive integer $\mu$ and a fixed finite list of integral ideals $\mathfrak c$ of $K$ such that every such pair $(n,p)$ admits integral $\alpha,\beta\in\mathcal O_K$ and one ideal $\mathfrak c$ from the list with
$$\alpha^k\beta=\mu(n-\theta),\qquad |N_{K/\mathbb Q}(\alpha)|=pN(\mathfrak c),$$
and, for every embedding, $|\sigma_i(\alpha)|\asymp_f P^{1/d}$ and $|\sigma_i(\beta)/\mu|\asymp_f X/P^{k/d}$. One representation may be selected per $n$, and for a fixed ideal case and fixed $\alpha$ there are at most $d$ selected values of $n$.

In the proof, $c\theta$ is integral with monic minimal polynomial $F(T)=c^{d-1}f(T/c)$, and $N_{K/\mathbb Q}(cn-c\theta)=F(cn)=c^{d-1}f(n)$. Excluding the primes dividing $c$, the discriminant of $F$, or the index $[\mathcal O_K:\mathbb Z[c\theta]]$, for each remaining prime $p\mid f(n)$ exactly one prime ideal $\mathfrak p$ above $p$ contains $cn-c\theta$, since its residue factor is the simple linear factor $T-cn$ of $F$ modulo $p$; then $N(\mathfrak p)=p$ and the valuation of $\mathfrak p$ in $(cn-c\theta)$ equals $v_p(f(n))$, so $\mathfrak p^k\mid(cn-c\theta)$, and every excluded prime is below $X$ for large $X$. Choosing fixed integral representatives of the ideal classes, one such representative $\mathfrak c$ makes $\mathfrak p\mathfrak c=(\alpha)$ principal and integral of absolute norm $pN(\mathfrak c)$. Multiplying by a unit to balance: use one logarithmic coordinate per real embedding and per complex pair with weights $1$ and $2$, subtract $d^{-1}\log(pN(\mathfrak c))$ so the vector lies in the weighted sum-zero hyperplane, and move it into a bounded fundamental parallelepiped of the unit lattice by Dirichlet's theorem; exponentiating gives the conjugate-size bound for $\alpha$. Choose a positive integer $q$ with $q\mathfrak c^{-k}\subseteq\mathcal O_K$ for every ideal in the list (a common multiple of $N(\mathfrak c)^k$ suffices) and put $\mu=cq$; the ideal $(cn-c\theta)\mathfrak p^{-k}$ is integral, so $\beta=\mu(n-\theta)/\alpha^k$ is integral, and $|n-\theta_i|\asymp_f X$ gives its size. For each $n$ one admissible prime, ideal case and balanced generator are chosen; for fixed ideal case $\alpha$ determines $p=|N_{K/\mathbb Q}(\alpha)|/N(\mathfrak c)$, and outside the excluded primes $f$ has at most $d$ roots modulo $p^k$, each residue class meeting $(X,2X]$ in at most one integer since $p^k>X$.

Fix an integral basis $\omega_0,\ldots,\omega_{d-1}$ of $K$ and write $\alpha=\sum_j x_j\omega_j$, $\beta=\sum_j y_j\omega_j$ with $x,y\in\mathbb Z^d$, and define the conjugate linear forms $a_i(x)=\sum_j\sigma_i(\omega_j)x_j$ and $b_i(y)=\mu^{-1}\sum_j\sigma_i(\omega_j)y_j$. Then
$$a_i(x)^kb_i(y)=n-\theta_i,\qquad |a_i(x)|\asymp_f X^{\eta/d},\qquad |b_i(y)|\asymp_f X^{b/d},$$
both embedding matrices invertible; there is at most one selected point per $n$ and $O_f(1)$ selected points per fixed $x$, and these properties survive invertible integral changes in $x$ and $y$. Split into finitely many choices of a largest absolute coordinate of $x$ and of $y$, reindexing it as $x_0,y_0$, so $|x_0|\asymp_f P^{1/d}$ and $|y_0|\asymp_f X/P^{k/d}$; put $s_j=x_j/x_0$, $t_j=y_j/y_0$ for $1\le j<d$, and $z=1/n$, so $s,t\in[-1,1]^{d-1}$ and the normalized forms $a_i(1,s),b_i(1,t)$ are bounded above and below.

Lemma (paired boxes). Fix $0<w<1$ and an integer $M\asymp X^w$ and partition each cube into grid boxes of side $M^{-1}$. For the selected points in any fixed chart: (i) $t$ is locally analytic in $(s,z)$ and $s$ is locally given by boundedly many analytic branches in $(t,z)$; (ii) the branches needed at a counted point extend to a fixed neighborhood containing the grid base with $z=0$, with every fixed-order derivative uniformly bounded; (iii) every box of either type has $O_f(1)$ partner boxes of the other type, so there are $O_f(M^{d-1})$ relevant pairs, and with $m=(d-1)w$ this is $O_f(X^m)$. No primality of $M$ is needed.

In the proof, with $\mathcal A,\mathcal B$ the invertible complex linear maps to the $a$- and $b$-embedding vectors and $\kappa=x_0^ky_0/n$ (so $|\kappa|\asymp_f1$),
$$\Bigl(\frac{1-\theta_i z}{a_i(1,s)^k}\Bigr)_{i=1}^d=\kappa\,\mathcal B(1,t),$$
and applying $\mathcal B^{-1}$ and dividing by its first coordinate (equal to $\kappa$ at the point, hence bounded below) gives the forward formula for $t$. In reverse, take local $k$-th roots of $(1-\theta_i z)/b_i(1,t)$, inputs in a fixed bounded annulus; compatible roots have the form $\gamma a_i(1,s)$ with $\gamma^k=\kappa$, and applying $\mathcal A^{-1}$ and dividing by its first coordinate (of modulus $\asymp_f1$) gives $s$, with at most $k^d$ branch choices. The normalized forms, root inputs and denominators have fixed bounds, so on a small polydisc the formulas, or Cauchy's estimates, bound every fixed-order derivative; the constructions are local and need no single root over a whole annulus. The distance from a point to its grid base with $z=0$ is $O(M^{-1}+X^{-1})$ and the $z$-interval has length $O(X^{-1})=O(M^{-1})$ since $w<1$, so one $s$-box maps into $O_f(1)$ $t$-boxes, and by branch continuation at the base the reverse also holds; there are $O(M^{d-1})$ boxes each side.

The dimension of the sets in each paired box is reduced next. A first determinant gives a hypersurface section; when a component of that section uses only one coordinate block a second determinant reduces the dimension again, and the estimates for this step must be uniform in the moving component. The Taylor-determinant construction belongs to the real determinant method of Bombieri and Pila in Heath-Brown's approximating form; the number-field application follows Reuss.
./sfrefs/bombieri-pila-1989.pdf
./sfrefs/heathbrown-2009-sums.pdf
./sfrefs/reuss-2015.pdf

Fix distinct roots $\theta_1,\ldots,\theta_d$ and $k=d-2$. In $\mathbb C^{2d}$ with blocks $a=(a_i)$, $b=(b_i)$, let $\mathcal B$ be the scheme where $(a_i^kb_i)_i$ lies in $\operatorname{span}_{\mathbb C}\{(1)_i,(\theta_i)_i\}$, equivalently $d-2$ independent linear relations of bidegree $(k,1)$ on the products; write the products as $a_i^kb_i=N_0-\theta_iL_0$, so on $\mathcal B$ the functions $N_0,L_0$ are fixed linear combinations, and let $\mathcal V$ be the corresponding subvariety of $\mathbb P^{d-1}\times\mathbb P^{d-1}$. The defining ideal of $\mathcal B$ is prime and is a complete intersection of $d-2$ equations of bidegree $(k,1)$; $\dim\mathcal V=d$; and for $A,B\to\infty$ with fixed positive ratio $B/A$ the bihomogeneous coordinate space in degree $(A,B)$ has dimension $R(A,B)+O(A^{d-1})$ where
$$R(A,B)=\frac1{d!}\sum_{j=1}^{d-1}\binom dj\binom{d-2}{j-1}k^{j-1}A^{d-j}B^j.$$

For the proof: where all $a_i\ne0$ the coordinates $a_i,N_0,L_0$ are free and determine $b_i$, an integral smooth open of dimension $d+2$; if some $a_i=0$ with nonzero product then $N_0=\theta_iL_0$, $L_0\ne0$ and every other $a_j\ne0$ since the roots are distinct, a stratum of dimension $d+1$; if the product vector is zero the equations are $a_i^kb_i=0$, a union of coordinate $d$-planes. These counts give codimension $d-2$ and a unique top component meeting the first open. A complete-intersection criterion is used: homogeneous equations of the expected codimension form a regular sequence; the quotient is equidimensional and Cohen-Macaulay with no embedded components, and if there is one top component reduced at its generic point the quotient is reduced and a domain; localizing at the homogeneous maximal ideal, the expected codimension gives a regular sequence in the regular local ring, the positive grading detects regularity globally, and the quotient is Cohen-Macaulay and equidimensional by the dimension formula, with no embedded primes, so generic reducedness on the unique minimal component gives reducedness. The smooth open gives generic reducedness, proving primeness; passing to the projective factors subtracts two dimensions. The Hilbert series of the regular sequence is $(1-z_1^kz_2)^{d-2}/((1-z_1)^d(1-z_2)^d)$, so the bidegree-$(A,B)$ dimension is the $(d-2)$-fold finite difference with step $(k,1)$ of $\binom{A+d-1}{d-1}\binom{B+d-1}{d-1}$, whose leading term is $(k\partial_A+\partial_B)^{d-2}A^{d-1}B^{d-1}/((d-1)!)^2$, expanding to the displayed $R(A,B)$ with remaining terms of total degree at most $d-1$.
./sfrefs/stacks-project.pdf

Define $H(t)=d!R(1,t)$, $H_a(t)=(d-1)!(\partial_AR)(1,t)$ and $H_b(t)=(d-1)!(\partial_BR)(1,t)$, measuring determinant columns on $\mathcal V$ and on a pure hypersurface section.

Proposition (archimedean cuts). Fix positive upper exponents $\eta_+,b_+$. Consider a paired box with integer coordinates $|x_i|\ll X^{\eta_+/d}$, $|y_i|\ll X^{b_+/d}$, normalized chart variables of width $O(X^{-w})$, $z=1/n=O(X^{-1})$, and the uniform derivative bounds. Let $t_*,w>0$ be fixed rationals with
$$w^{d-1}H(t_*)>\Bigl(\frac{(d+1)(\eta_++b_+t_*)}{d^2}\Bigr)^d,\qquad w^{d-2}\min\{H_a(t_*),H_b(t_*)\}>\Bigl(\frac{\eta_++b_+t_*}{d-1}\Bigr)^{d-1}.$$
Then for large $X$ the points of the box lie on a bounded number of bounded-degree algebraic sets of one of two types: (i) a mixed hypersurface section of $\mathcal V$, whose bicone is a prime complete intersection with one extra equation of bidegree $(\lambda,s_0)$, $\lambda,s_0\ge1$; (ii) a set of biprojective dimension at most $d-2$. On the affine equations $a_i^kb_i=n-\theta_i$ the dimensions are $d$ and at most $d-1$, and all bounds are uniform over boxes and $X$.

The analytic estimate used in both cuts is first described. Let $\ell$ column functions have uniformly bounded derivatives on the chart neighborhoods, with small variables $u_1,\ldots,u_{d-1},z$ of weights $w,\ldots,w,1$. For a fixed finite evaluation set suppose the rank of the monomial columns of weight at most $T$ is at most $aT^r+O(T^{r-1}+1)$, $a>0$. If $\ell$ such monomial columns are independent with increasing weights $\lambda_j$, then $j\le a\lambda_j^r+O(\lambda_j^{r-1}+1)$, and inverting and summing gives
$$\sum_{j=1}^\ell\lambda_j\ge\frac r{r+1}a^{-1/r}\ell^{1+1/r}-O(\ell),$$
with uniform constants. Expand each analytic column at the box base in the original monomials in $u,z$ to a fixed order $K$: a polynomial summand in the determinant expansion vanishes if its monomial columns are dependent, and otherwise the weights bound its size by a constant times $X$ to the negative weight, with a remainder $O(X^{-\min(w,1)(K+1)})$, so choosing $K$ large depending on the fixed column degrees and $\ell$ leaves only boundedly many terms and
$$\ll X^{-S},\qquad S=\frac r{r+1}a^{-1/r}\ell^{1+1/r}-O(\ell).$$
This uses only exact dependence of evaluation columns.

For the first cut choose large integer bidegrees with $B/A=t_*$ and a basis of the degree-$(A,B)$ coordinate space of $\mathcal V$ from raw monomials in $x,y$, of size $\ell=\frac{H(t_*)}{d!}A^d+O(A^{d-1})$. For any $\ell$ counted points the raw evaluation determinant is an integer, and dividing each row by $x_0^Ay_0^B$ gives, if nonzero,
$$\ge c_{A,B}X^{-\ell A(\eta_++b_+t_*)/d},\qquad c_{A,B}>0.$$
Normalized monomials are analytic in the chart variables and $z$, with $T^d/(d!w^{d-1})+O(T^{d-1}+1)$ monomials when no extra relation holds, so the analytic estimate gives $S/\ell=\frac d{d+1}(w^{d-1}H(t_*))^{1/d}A+O(1)$, larger than the integer-determinant exponent by the first cut inequality; all such determinants vanish, the evaluation has rank less than $\ell$, and its kernel gives a bihomogeneous equation vanishing on all counted points but not on $\mathcal V$.

The components of this cut are described. On the open where all $a_i\ne0$, substitute $b_i=(N_0-\theta_iL_0)/a_i^k$, clear denominators and factor; each relevant irreducible factor $F(a,N_0,L_0)=\sum_Ia^If_I(N_0,L_0)$ is bihomogeneous of degrees $(l,s_0)$, and factors $a_i$ or $L_0$ miss the open and are omitted. Returning to $(a,b)$ replaces $N_0-\theta_iL_0$ by $a_i^kb_i$, so the terms may acquire common powers of $a_i$; with $\nu_{i,I}=\operatorname{ord}_{N_0-\theta_iL_0}f_I$ and $e_i=\min_I(I_i+k\nu_{i,I})$, writing $f_I=\prod_i(N_0-\theta_iL_0)^{\nu_{i,I}}g_I$, the expression
$$C(a,b)=\sum_Ia^{I+k\nu_I-e}b^{\nu_I}g_I(N_0,L_0)$$
is a polynomial representing $F/\prod_ia_i^{e_i}$ on the bicone, with bidegree $(\lambda,s_0)$, $\lambda=l+ks_0-\sum_ie_i$. It has no unwanted boundary component: on $a_i=0$ with nonzero product and $L_0=1$, the surviving terms are precisely those with $I_i+k\nu_{i,I}=e_i$, giving distinct nonzero scalar multiples of $a_{-i}^{I_{-i}-e_{-i}}b_i^{\nu_{i,I}}$ whose exponents determine $I$, so $C$ restricts nonzero and reduces the boundary stratum to dimension at most $d$, the zero-product boundary already having dimension $d$. The open defined by $F$ is integral and generically reduced of dimension $d+1$, so adding the nonzero $C$ to the prime bicone ring preserves the complete intersection, and the boundary computation with the same criterion makes the new ideal prime. The Hilbert series gains the factor $1-z_1^\lambda z_2^{s_0}$, with leading term in bidegree $(A,B)$
$$(\lambda\partial_A+s_0\partial_B)R(A,B),$$
error $O(A^{d-2})$ at fixed $B/A$. If $\lambda,s_0$ are both positive the mixed component is retained; all degrees stay bounded.

For a pure component using only one block of degree $c_0>0$, use the $s$-chart for a pure $a$ equation and the $t$-chart for a pure $b$ equation (splitting the counted points by the boundedly many reverse branches at the common $t$-base), so all rows of each determinant use one analytic chart map, only a bounded factor more sets. Dehomogenization and translation to the base give an exact relation $Q_0(u_1,\ldots,u_{d-1})=0$ with $1\le\deg Q_0\le c_0$ and no bound on its coefficients; a nonzero constant relation gives no points. With $r=d-1$ and $e=\deg Q_0$, multiplication by $Q_0$ injects degree-$\le q-e$ into degree-$\le q$ polynomials, whose image evaluates to zero, so the evaluation rank of the latter is at most $D_e(q)=\binom{q+r}{r}-\binom{q-e+r}{r}$; applying this with $q=\lfloor(T-j)/w\rfloor$ at each power $z^j$ and using $D_e(q)=eq^{r-1}/(r-1)!+O((q+1)^{r-2})$ gives $N(T)\le\frac{c_0}{r!w^{r-1}}T^r+O(T^{r-1}+1)$, free of the coefficients. The Taylor argument then gives
$$S\ge\frac r{r+1}\Bigl(\frac{r!w^{r-1}}{c_0}\Bigr)^{1/r}\ell^{1+1/r}-O(\ell),$$
and the moving equation is never solved for a variable. Keep the first-cut degrees fixed, so $c_0$ ranges over a bounded set of positive integers, and choose new large bidegrees $A,B$ with $B/A=t_*$; a raw-monomial basis on a pure $a$ component has size $\ell=\frac{c_0H_a(t_*)}{r!}A^r+O(A^{r-1})$, giving $S/\ell\ge\frac rd(w^{r-1}H_a(t_*))^{1/r}A-O(1)$, the factor $c_0$ cancelling, with $H_b$ for a pure $b$ component; the second cut inequality contradicts the integer lower bound, and the new equation is nonzero on the component, cutting its biprojective dimension from $d-1$ to at most $d-2$.

Finally, on the counted affine locus $L_0=1$ the map to $\mathcal V$ has one-dimensional scaling fibers ($a\mapsto ca$ needs $b\mapsto c^{-k}b$), so mixed components have affine dimension $d$ and second-cut components at most $d-1$; in the mixed case the equation on the nonzero-$a$ open is $F(a,n,1)=0$, irreducible because a factorization would rehomogenize, of degree exactly $s_0$ in $n$ since $L_0\nmid F$, and since $s_0\ge1$ its coefficient polynomials in $a$ have no common nonconstant factor, so the common zero set has codimension at least two in $a$-space.

Membership in an approximation box bounds linear forms such as $Mx_i-c_ix_0$ with grid coordinate $c_i/M$. These bounds are encoded by lattices, and an adapted integral basis is chosen in each coordinate block; a box needing a larger coordinate bound has a shorter lattice vector, and such boxes are correspondingly fewer, letting the affine counting theorem be summed over all boxes. The short-vector count of direction boxes follows Reuss; the common excess for the two paired lattices is tailored to the weighted Hilbert bounds.
./sfrefs/reuss-2015.pdf

Lemma (lattice basis). Let $\Lambda\subset\mathbb R^d$ be a full lattice of covolume $\Delta$ with shortest nonzero Euclidean length $\lambda_1$. There is a basis $b_1,\ldots,b_d$ with $\prod_i\|b_i\|\le C_d\Delta$, and in this basis every $v\in\Lambda$ with $\|v\|\le C$ has integral coordinates of absolute value at most $CC_d/\lambda_1$. The product bound is proved by induction: choose a shortest vector $b_1$, primitive, project orthogonally to $b_1^\perp$ to a lattice $\Lambda'$ of covolume $\Delta/\|b_1\|$; every nonzero vector of $\Lambda'$ has length at least $\sqrt3\|b_1\|/2$, since lifting it and subtracting the right multiple of $b_1$ to make the parallel component at most $\|b_1\|/2$ leaves a nonzero lattice vector of length at least $\|b_1\|$. Lifting the inductive basis of $\Lambda'$ with these reduced parallel components, each lift is at most $2/\sqrt3$ times its projection, and, together with $b_1$, the lifts form a basis of $\Lambda$. Cramer's rule then gives, for the coordinate $z_i$ of $v$, $|z_i|\le C\prod_{h\ne i}\|b_h\|/\Delta\le CC_d/\|b_i\|\le CC_d/\lambda_1$.

Fix a maximal-coordinate chart and reindex as $x=(x_0,\ldots,x_{d-1})$, $y=(y_0,\ldots,y_{d-1})$, with $s_i=x_i/x_0$, $t_i=y_i/y_0$ for $1\le i<d$, and $|x_i|\ll X^{\eta_+/d}$, $|y_i|\ll X^{b_+/d}$. Choose fixed $w,\tau>0$ with $m=(d-1)w<\min(\eta_+,b_+)$ and $u=(\eta_+-m)/d$, $v=(b_+-m)/d$, and use a prime $M\asymp X^w$ for the grid (existence by Bertrand). All constants are uniform in the boxes and $X$.

Proposition (lattice boxes). Under these bounds the paired boxes group into finitely many ranges indexed by $j=\ell\tau$, $\ell\in\mathbb Z_{\ge0}$, $j\le m/d$, with $O(X^{m-dj})$ boxes in range $j$. For each paired box there are integral unimodular changes $x\leftrightarrow x'$, $y\leftrightarrow y'$ such that all selected points satisfy $|x'_i|\ll X^U$, $|y'_i|\ll X^V$ with $U=u+j+\tau$, $V=v+j+\tau$, and the change matrices and the inverse matrices have entries bounded by a fixed power of $X$.

In the proof, with the $s$-box base $(c_1/M,\ldots,c_{d-1}/M)$, $|c_i|\ll M$, consider the lattice
$$\Lambda_c=X^{-\eta_+/d}\{(q_0,Mq_1-c_1q_0,\ldots,Mq_{d-1}-c_{d-1}q_0): q\in\mathbb Z^d\};$$
the image of each counted $x$ has bounded norm since $Mx_i-c_ix_0=Mx_0(s_i-c_i/M)$ with $|s_i-c_i/M|\le M^{-1}$. With $U_*$ the inverse shortest nonzero length, the basis lemma gives integral coordinates $|x'_i|\ll U_*$, and preimages of a lattice basis form a basis of $\mathbb Z^d$, so the change is unimodular; the same construction with $X^{-b_+/d}$ gives $V_*$ and $|y'_i|\ll V_*$. Put $J=\max\{1,U_*/X^u,V_*/X^v\}$; before scaling every nonzero lattice vector is a nonzero integer vector of norm at least one, so $U_*\le X^{\eta_+/d}$, $V_*\le X^{b_+/d}$, $1\le J\le X^{m/d}$, and assigning a pair to range $j$ when $X^j\le J<X^{j+\tau}$ gives $0\le j\le m/d$ and the coordinate bounds. For $j>0$ at least one of $U_*\ge X^{u+j}$, $V_*\ge X^{v+j}$ holds; in the first case a shortest vector gives a nonzero integer $q=(q_0,Mq'_1-c_1q_0,\ldots)$ of norm at most $T=X^{m/d-j}$, and since $T/M\ll X^{-w/d}$, for large $X$, $T<M$; if $q_0=0$ every other coordinate would be divisible by $M$, so $0<|q_0|<M$ and primality of $M$ gives $c_i\equiv-q_iq_0^{-1}\pmod M$, each $q$ fixing the base up to boundedly many choices, with $O(T^d)=O(X^{m-dj})$ vectors and hence boxes, and identically for $t$-boxes; the paired-box lemma supplies bounded partners, and for $j=0$ the total $O(X^m)$ is used. The covolume of $\Lambda_c$ is $X^{-\eta_+}M^{d-1}\asymp X^{m-\eta_+}$ and its shortest length at least $X^{-\eta_+/d}$, so the basis product gives $\max_i\|b_i\|\ll X^{m-\eta_+/d}$, and the inverse triangular map (bounded since $|c_i|\ll M$) pulls the basis back to integral vectors of size $O(X^m)$, with cofactors bounding the inverse by a fixed power of $X$; the $y$ case is identical.

Linear changes preserve dimensions, degrees, and the weighted polynomial spaces within each block (every $a_i$ is a linear combination of the $x'_i$ of weight $U$, every $b_i$ of the $y'_i$ of weight $V$), irrespective of coefficients; the numerical size bounds used for counting are those on $x',y'$.

For $d=4$ a later Hilbert estimate needs $n$ algebraic over the functions $a_1,\ldots,a_4$, which is arranged by removing a small set of $x'$. Let $Z$ be an initial bounded-degree set from the cut proposition restricted to $a_1a_2a_3a_4\ne0$ in coordinates $(a,n)$, $b_i=(n-\theta_i)/a_i^2$, and suppose either $\dim Z\le3$ or $Z$ has irreducible equation $F(a,n)=0$ of positive degree in $n$. Then the $a$ for which the $n$-fiber has dimension one have closure of dimension at most two and bounded degree; deleting the selected points above it costs $O_f(X^{2U})$ in a box, and on every irreducible subvariety of $Z$ meeting the remaining points, $n$ is algebraic over $\mathbb Q(a_1,\ldots,a_4)$. Substituting $b_i=(n-\theta_i)/a_i^2$ into bounded-degree equations and clearing denominators, a fiber has dimension one exactly when each resulting polynomial in $n$ vanishes identically, so its base is the common zero set of the coefficient polynomials on the $a$-torus, of bounded degree, excluding components in $a_1a_2a_3a_4=0$. If $\dim Z\le3$ the fiber-dimension inequality gives dimension at most two; otherwise the coefficients of $F$ in $n$ have no common nonconstant factor, so the common zero set has codimension at least two in four-dimensional $a$-space. The invertible linear change to $x'$ preserves this, and a bounded-degree set of dimension at most two has $O(B^2)$ integer points in a box of radius $B$ (slice by a nonconstant coordinate and apply Bezout inductively), giving $O(X^{2U})$ exceptional $x'$, with $O_f(1)$ selected points per $x'$ by the factorization lemma's fixed-$x$ bound. If $Y\subseteq Z$ is irreducible with $n$ transcendental over the $a_i$-field, every polynomial relation in $n$ has zero coefficients on $Y$, so $Y$'s $a$-image lies in the removed base and meets no remaining point.

The determinant cuts and lattice coordinates leave the selected points on an arithmetic variety and on bounded-degree sets inside each box. A weighted Hilbert function now supplies the last input of the counting theorem: a lower bound on independent polynomial functions on each subvariety, uniform in coefficients and in the integral changes.

Give every $a_i$ weight $U>0$ and every $b_i$ weight $V>0$, fixed rationals. In the transformed coordinates these are the weights of the whole $x'$ and $y'$ blocks; invertible linear changes preserve the weighted filtration even with varying coefficients. Let $Y$ be an irreducible subvariety of the affine equations $a_i^kb_i=n-\theta_i$, $1\le i\le d$, of dimension $2\le h\le d$, with a nonempty open where all $a_i\ne0$; assume $n$ nonconstant. On this open its function field is generated by the $a_i$ and $n$. Choose $h-1$ of the $a_i$ algebraically independent over $\mathbb C(n)$ and one more distinct index; the image in these $h$ coordinates and $n$ has dimension $h$, so its ideal is generated by one irreducible $F_1(a_1,\ldots,a_h,n)=\sum_Ia^If_I(n)$. Let $Y_{\mathrm{pair}}$ be the closure of the projection onto the selected pairs $(a_i,b_i)_{i=1}^h$; it has the same function field as the image.

Proposition (weighted Hilbert). For each nonzero $f_I$ define
$$\nu_{i,I}=\operatorname{ord}_{n-\theta_i}f_I,\qquad e_i=\min_I(I_i+k\nu_{i,I}),$$
$$D=\max_I\{U|I|+(kU+V)\deg f_I\}-U\sum_ie_i.$$
Then $D>0$ and
$$H_{Y_{\mathrm{pair}}}(T)=\frac{(kU+V)^{h-1}D}{U^hV^h}\frac{T^h}{h!}+O(T^{h-1}+1),$$
a lower bound for $H_Y(T)$; if the function-field degree of $Y$ over $Y_{\mathrm{pair}}$ is at least two the leading coefficient doubles. For fixed weights and bounded degree of $Y$ the error constants are uniform, independently of the coefficients of its equations. The basic version for an $h$-dimensional irreducible $Y$ gives $H_Y(T)\ge\frac{(kU+V)^{h-1}\min(U,V)}{U^hV^h}\frac{T^h}{h!}-O(T^{h-1}+1)$.

In the proof, factor $f_I=\prod_i(n-\theta_i)^{\nu_{i,I}}g_I$ and define
$$C_1(a,b)=\sum_Ia^{I+k\nu_I-e}b^{\nu_I}g_I(a_1^kb_1+\theta_1),$$
all exponents of $a$ nonnegative. Impose also the $h-1$ equations $a_i^kb_i+\theta_i=a_1^kb_1+\theta_1$ for $2\le i\le h$. On the open where all $a_i\ne0$ these equations and $C_1=0$ have coordinate ring $\mathbb C[a_1^{\pm1},\ldots,a_h^{\pm1},n]/(F_1)$, integral of dimension $h$. The boundary has smaller dimension: if $a_i=0$ then $n=\theta_i$, every other $a_j\ne0$, and $b_j=(\theta_i-\theta_j)/a_j^k$; before imposing $C_1$ the free coordinates are $b_i$ and the $h-1$ nonzero $a_j$, of dimension $h$. The terms of $C_1$ surviving there have $I_i+k\nu_{i,I}=e_i$ and are nonzero scalar multiples of $a_{-i}^{I_{-i}-e_{-i}}b_i^{\nu_{i,I}}$, whose exponents determine $I$; these Laurent monomials are distinct, $C_1$ restricts nonzero, and the dimension drops to at most $h-1$. This checks every affine boundary stratum, since two different $a_i$ cannot vanish when the $\theta_i$ are distinct.

Choose a positive integer $L_{\mathrm{wt}}$ with $A=L_{\mathrm{wt}}U$, $B=L_{\mathrm{wt}}V$ integers, and put $Q=kA+B$, $E=L_{\mathrm{wt}}D$. Homogenize the relations and $C_1$ with a variable $t$ of weight one, giving $h$ homogeneous equations in $2h+1$ variables. On $t\ne0$ scaling to $t=1$ gives the affine one times $\mathbb C^\times$, whose nonzero-$a$ open is integral and generically reduced of dimension $h+1$, the remaining affine strata having dimension at most $h$. At $t=0$ the products $a_i^kb_i$ must coincide: if all $a_i\ne0$ then $a_1,\ldots,a_h,q$ are free before the last equation and the nonzero weighted top is nonzero, giving dimension at most $h$; if some $a_i=0$ the common product is zero, a union of coordinate $h$-planes of dimension $h$. So the homogeneous system has dimension $h+1$ with no top component in either boundary, the complete-intersection criterion makes its ideal prime (hence saturated in $t$), and dehomogenization gives precisely the prime ideal of $Y_{\mathrm{pair}}$.

The degree-$N$ part of the graded quotient is the space of affine functions represented by monomials of weight at most $N$ in the scaled weights; homogenizing each such monomial with a power of $t$ gives surjectivity, and injectivity holds because a homogeneous element vanishing after dehomogenization and localization at $t$ is zero by saturation. The Hilbert series is
$$\frac{(1-z^Q)^{h-1}(1-z^E)}{(1-z)(1-z^A)^h(1-z^B)^h}.$$
At $z=1$ the pole order is $h+1$ with leading factor $Q^{h-1}E/(A^hB^h)$; at a nontrivial root of unity, if only one of $1-z^A,1-z^B$ vanishes the denominator order is $h$, and if both vanish the order divides $\gcd(A,B)$ hence $Q$ and $E$ (a monomial weight of the nonzero $C_1$), all $h$ numerator factors vanish and the order is at most $h$. Partial fractions give $\frac{Q^{h-1}E}{A^hB^h}\frac{N^h}{h!}+O(N^{h-1}+1)$, and taking $N=\lfloor L_{\mathrm{wt}}T\rfloor$ and rescaling proves the pair estimate; lower-dimensional coordinate planes at infinity change neither the leading coefficient nor introduce a period of order $T^h$.

Pullback from the pair image is injective and preserves weights, so its Hilbert function is a lower bound for that of $Y$. If $[\mathbb C(Y):K_{\mathrm{pair}}]\ge2$, one original $a$- or $b$-coordinate $\xi$ lies outside $K_{\mathrm{pair}}$; the spaces of pair-image functions of weight at most $T$ and of $\xi$ times those of weight at most $T-\omega$ are linearly independent (a relation $A+\xi B=0$ with $A,B\in K_{\mathrm{pair}}$ forces $A=B=0$), so $H_Y(T)\ge H_{Y_{\mathrm{pair}}}(T)+H_{Y_{\mathrm{pair}}}(T-\omega)$ for $T\ge\omega$, the bounded shift leaving the leading coefficient and only changing the uniform error, and the coefficient doubles. For the basic estimate, write the local parametrization at a general point with $h$ independent $a$-coordinates and replace each remaining $a_j$ by $a_1^kb_1+\theta_1-\theta_j$; clearing denominators and extracting powers of the $b$-coordinates, as in the saturated determinant cut, gives a curve parameterized by monomials $b^\beta$ of weight $|B|V$, and $H_Y(T)$ is at least the number of such monomials of total weight at most $T$, giving the stated coefficient.

The degree of $F_1$ is bounded in terms of $d,k$ and $\deg Y$: $n=a_1^kb_1+\theta_1$ is polynomial of fixed degree, and forming the graph of the map to the selected $a_i$ and $n$ then projecting linearly gives the bound without coefficient heights; for fixed $U,V$ and a degree bound, only finitely many numerator degrees $E$ occur, so the errors are uniform even for moving equations and blockwise linear changes.

For an irreducible subvariety of an initial cut set: if $\dim Y=d$ it is a mixed affine component, with equation $F(a,n,1)$ of bidegree $(l,s_0)$ and saturated bidegree $(\lambda,s_0)$, $\lambda,s_0\ge1$; homogeneity in $a$ and degree exactly $s_0$ in $n$ give $D=lU+(kU+V)s_0-U\sum_ie_i=\lambda U+s_0V\ge U+V$, so the pair estimate gives leading coefficient $(kU+V)^{d-1}(U+V)/(U^dV^d)$, and every $2\le h\le d-1$ has coefficient $(kU+V)^{h-1}\min(U,V)/(U^hV^h)$. If instead $h$ algebraically independent $a$-coordinates can be selected, $C_1$ must involve a $b$-coordinate (otherwise a nonzero relation among the independent $a$'s), so $D\ge V$ and the coefficient is $(kU+V)^{h-1}V/(U^hV^h)$; after the quartic infinite-fiber removal $n$ is algebraic over the $a$-field on every remaining subvariety, so the independent selection exists, and this supplies the quartic $h=3$ bound. The quartic surface case is sharpened next.

In degree four, $d=4$ and $k=2$. The number field $K=\mathbb Q(\theta)$, its splitting field $L$, and the distinct roots $\theta_1,\ldots,\theta_4$ are retained. The surface bound is improved after the infinite-fiber removal, and one fixed exceptional set of integers removes the equality case in the curve argument.

Put $D_0=2U+V$ and let $Y$ be an irreducible surface component of an initial cut set after the infinite-fiber removal, with $n,b_i,b_j$ algebraic over $\mathbb C(a_i,a_j)$ for every algebraically independent pair $a_i,a_j$. Then one of
$$H_Y(T)\ge\frac{(2U+V)^2(3U+V)}{U^4V^4}\frac{T^3}{3!}-O(T^2),$$
or
$$H_Y(T)\ge\frac{(2U+V)^2V}{U^4V^4}\frac{T^3}{3!}-O(T^2),$$
or
$$H_Y(T)\ge\frac{3T^3}{2U^3}-O(T^2),$$
holds uniformly, where in the first two the explicit leading coefficient is the pair estimate for the corresponding extracted degree. The third bound comes from three algebraically independent functions supplied by a degree-two projection to a plane.

In the proof, where $a_i,a_j$ are independent on $Y$, either $D\ge D_0$ and the weighted Hilbert proposition gives the first two bounds, or $D<D_0$. In the latter case a monomial in $C_1$ has weight below $2U+V$, so it contains at most one $b$ factor, an $a$ factor and a $b$ factor, or three $a$ factors; the relation among $b_i,b_j$ has the form
$$c_ib_i+c_jb_j=S_{ij}(a_i,a_j),\qquad\deg S_{ij}\le2,\qquad(c_i,c_j)\ne(0,0),$$
so $D\ge V$, and substitution gives
$$B_{ij}n=c_i\theta_ia_j^2+c_j\theta_ja_i^2+a_i^2a_j^2S_{ij}(a_i,a_j),\qquad B_{ij}=c_ia_j^2+c_ja_i^2,$$
with $B_{ij}\ne0$ by independence, so $n,b_i,b_j\in\mathbb C(a_i,a_j)$ for the small-degree pair.

For an $a$-image of degree at least three, a general linear projection to an affine plane with coordinates $s,t$ linear in the $a_i$ has function-field degree $e=\deg S$; choosing the centre at infinity disjoint from the projective closure, a general fibre is a complementary linear section of degree $e$ with distinct general points in characteristic zero, and a further general linear form $r$ separates the finite extension, so $1,r,r^2$ are independent over $\mathbb C(s,t)$ and
$$H_Y(T)\ge\sum_{j=0}^2\#\{(p,q)\in\mathbb Z_{\ge0}^2:U(p+q+j)\le T\}=\frac{3T^2}{2U^2}-O(T),$$
with a further power of a nonconstant function giving $T^3$.

For a quadric $a$-image, $\deg S=2$; the degree of an irreducible projective variety is at least its codimension in its linear span plus one, so $S$ spans an affine three-space and is a quadratic hypersurface there (a surface spanning only a plane would equal it and have degree one). The fibres of the projection to the $(a_i,a_j)$-plane are lines parallel to the ruled direction $v$, the equation of $S$ has nonzero quadratic leading coefficient $Q_2(v)$ on each fibre, so $S$ has degree two over that plane and $a_i,a_j$ are independent. If $D\ge D_0$ the weighted Hilbert proposition gives the bound; if $D<D_0$ the projected-pair field is $\mathbb C(a_i,a_j)$ and the full field has degree at least two over it, so the doubling clause applies; since $D\ge V$ and $2D\ge2V\ge D_0$ the doubled coefficient suffices.

For a plane $a$-image, $\deg S=1$, so $S=A$ is an affine plane rational in the first block; every $a_i$ is nonconstant on $A$, since a nonzero rational direction is a nonzero element of $K$ with all embeddings nonzero, and the linear parts span the dual of the two-dimensional direction space. Join $i,j$ when the linear parts are independent: the graph is complete multipartite on the parallelism classes (at least two, connected, no isolated vertex), and an edge is exactly an independent pair. Suppose every such pair has $D<D_0$; then the small relation holds on every edge and makes $n$ a rational function on $A$.

If $n$ is polynomial, $B_{ij}$ has degree exactly two for an independent pair while the right side has degree at most six, so $\deg n\le4$. Every index has nonzero coefficient in at least one relation: starting from one nonzero coefficient and applying Galois automorphisms (which preserve $Y$, permute conjugate coordinates and roots transitively, and preserve independence and the degree bound) gives the full orbit. Fix a relation with $c_i\ne0$; at the generic point of $a_i=0$ the independent coordinate $a_j$ is a unit, so polynomiality of $n$ makes $b_j=(n-\theta_j)/a_j^2$ regular there and the relation makes $b_i$ regular, whence $a_i^2\mid n-\theta_i$ in $\mathbb C[A]$ for each $i$. The four zero lines are distinct since the $\theta_i$ are; restricting to a general affine line gives a polynomial of degree at most four with four distinct critical points and four distinct critical values, whose derivative would have four roots despite degree at most three (or be zero with equal values), impossible.

If $n$ is nonpolynomial, both coefficients in every relation are nonzero (else $n$ would be polynomial); writing $n=P/Q$ in reduced form, an irreducible factor of the nonconstant denominator $Q$ divides every $B_{ij}$ by the displayed identity. Over $\mathbb C$, $B_{ij}$ is a product of two distinct affine linear forms $a_j\pm\zeta a_i$ with $\zeta\ne0$; the fixed factor defines a line $\ell$ through the common zero of $a_i,a_j$ transverse to both zero lines, and for each edge the two intersections with $\ell$ coincide. Connectivity forces all four zero lines through one point $O$. Centering at $O$ makes each $a_i$ homogeneous linear; scaling by $t$ and taking the rational-function limit at $t=0$ gives, for every independent pair, the same function of the projective direction,
$$\mathcal R=\frac{c_i\theta_ia_j^2+c_j\theta_ja_i^2}{c_ia_j^2+c_ja_i^2},$$
the $S_{ij}$ term acquiring an extra $t^2$. This is a fractional linear transform of $(a_i/a_j)^2$ with nonzero determinant $c_ic_j(\theta_j-\theta_i)$, of degree two, ramified exactly at the two directions $a_i=0,a_j=0$ with values $\theta_i,\theta_j$. Since every index occurs in an edge the same function would be ramified in four directions with four distinct values, contradicting either coincident directions (distinct values) or the displayed degree-two form (four distinct directions). Hence some independent pair has $D\ge D_0$, proving the bound; the extra independent functions have bounded weighted degree, so shifts by such functions preserve the uniform error.

For the quintic equality case, the polynomial line curves below can have first coordinates linear in a rational parameter and second coordinates polynomial; then $(t-\tau_i)^2\mid n(t)-\theta_i$, the least degree of $n(t)$ is five, and the following places those quintics in one fixed finite family.

Proposition (quintic discard). There are finitely many $\Phi\in L[t]$ of degree five with distinct critical points $z_1=0,z_2=1,z_3,z_4$ and $\Phi(z_i)=\theta_i$. Let $\mathcal F_f$ be this family and $\mathcal E_f=\{n\in\mathbb Z: n=\Phi(z)\text{ for some }\Phi\in\mathcal F_f,\ z\in L\}$; then $\#(\mathcal E_f\cap[-2X,2X])\ll_fX^{1/5}$. If $N(s)\in L[s]$ has degree five with distinct critical points $\tau_1,\ldots,\tau_4\in L$ and $N(\tau_i)=\theta_i$, every integer value $N(s)$ at $s\in L$ lies in $\mathcal E_f$.

In the proof, over $\mathbb C$ introduce the six coefficients of $\Phi$ and $z_3,z_4$, impose $\Phi(z_i)=\theta_i$, $\Phi'(z_i)=0$, and require nonzero leading coefficient and distinct $z_i$, a finite-type locus whose four critical points are simple (distinct and exhausting $\Phi'$ of degree four). If a reduced irreducible component had positive dimension, its function field admits a nonzero derivation $\partial$ over $\mathbb C$; with $Q=\partial\Phi$, differentiating the value equations gives $Q(z_i)=0$, so $Q=A\Phi'$ with $\deg A\le1$, and differentiating the critical-point equations gives $0=Q'(z_i)+\Phi''(z_i)\partial z_i=\Phi''(z_i)(A(z_i)+\partial z_i)$, so $A(z_i)=-\partial z_i$. The normalizations give $A(0)=A(1)=0$, hence $A=0$ and $\partial$ kills all coefficients and all $z_i$, generating the function field, a contradiction; the locus is zero-dimensional and has finitely many points, and its $L$-points are finite.

For finiteness over $L$, fix one $\Phi$ and an integer $c>0$ with $c\Phi(t)=A_5t^5+\cdots+A_0$, $A_i\in\mathcal O_L$, $A_5\ne0$. If $\Phi(z)=n\in\mathbb Z$ and $w=A_5z$, then $w$ satisfies a monic equation over $\mathcal O_L$, so $w\in\mathcal O_L$ and $z\in A_5^{-1}\mathcal O_L$. For each embedding $\sigma$, $\sigma(\Phi)(\sigma(z))=n$, the leading term dominating outside a fixed radius, so $\max_\sigma|\sigma(z)|\ll X^{1/5}$ for $|n|\le2X$; in a fixed $\mathbb Z$-basis $e_1,\ldots,e_{r_L}$ of the fractional lattice, $z=\sum u_je_j$ with $|u_j|\ll X^{1/5}$. The locus of rational $\Phi(z)$ is cut out over $\mathbb Q$ by expanding $\Phi(\sum u_je_j)$ in a rational basis beginning with $1$ and setting other coordinates to zero; after base change to $\mathbb C$ it is the inverse image of the diagonal under $(w_\sigma)\mapsto(\sigma(\Phi)(w_\sigma))$, with coordinate ring $\mathbb C[v,(w_\sigma)]/(\sigma(\Phi)(w_\sigma)-v)$, finite free of rank $5^{r_L}$ over $\mathbb C[v]$ (basis the products $w_\sigma^{e_\sigma}$, $0\le e_\sigma<5$), hence dimension one and bounded degree. Counting lattice points in a convex body of dimension one and radius $X^{1/5}$ with height at least one gives $O_f(X^{1/5})$.
The two-dimensional alternatives are paired with a one-dimensional statement: a rational function of bounded degree takes integer values at few integral inputs of bounded size, uniformly even when the function varies with the curve and with the integral coordinate changes.

Lemma (integral values of a rational function). Fix a positive integer $D$ and positive constants $A,B,C_0$. For every $\eps>0$ and $X\ge2$, let $R\in\mathbb Q(s)$ be a nonpolynomial rational function whose reduced numerator and denominator have degrees at most $D$. Then
$$\#\{s\in\mathbb Z: |s|\le C_0X^A,\ R(s)\in\mathbb Z,\ |R(s)|\le C_0X^B\}\ll_{D,A,B,C_0,\eps}X^\eps,$$
the constant independent of the coefficients of $R$; inputs at which $R$ has a pole are excluded.

In the proof, clear denominators and write $R=p/q$ with $p,q\in\mathbb Z[s]$ primitive, $\deg p,\deg q\le D$ and $\gcd(p,q)=1$. The resultant identity $ap+bq=M$ with $a,b\in\mathbb Z[s]$ and $M$ a nonzero integer shows that for every integer $s$ with $R(s)=m\in\mathbb Z$ one has $q(s)\mid p(s)$ and hence $q(s)\mid M$; also $|q(s)|\ll X^{AD}$ on the range. The integer-valued $s$ are multiplicatively separated. For two such integers $s<s'$,
$$(s-s')W(s,s')=q(s)q(s')(R(s)-R(s')),$$
where $W\in\mathbb Z[s,s']$ is the divided-difference numerator, bounded by $X^{2D-1}$; since $R(s)-R(s')$ is a nonzero integer and $q(s)q(s')\mid M^2$, the left side is divisible by $q(s)q(s')$ and the gap $s'-s$ is at least $c\,|q(s)q(s')|/X^{2D-1}$ with $c>0$ absolute. Partitioning the divisor-bounded integers into $O(X^\eps)$ dyadic classes for $|q(s)|$ and using the gap inside each class, the count is $O_{D,A,B,C_0}(X^\eps)$; the dependence on $M$ cancels because $q(s)$ is bounded by $M$ but also by $X^{AD}$, and only the divisor count of the fixed integer $M$ up to that size enters.

Proposition (curve alternatives). Put $g=(d-1)(k-1)+\mathbf 1_{d=4}$ and $\delta_1(U,V)=\max\{U/2,\min(U,V/g)\}$. Fix a degree bound $E$, and let $C$ be a geometrically irreducible curve of degree at most $E$, defined over $\mathbb Q$, in the arithmetic variety $a_i^kb_i=n-\theta_i$ in the coordinates above. For every $\eps>0$ either $|S\cap C|\ll_{f,E,\eps}X^\eps$, or its filtered Hilbert dimension with weight $U$ on $x'$ and $V$ on $y'$ satisfies
$$H_C(T)\ge\frac{T}{\delta_1(U,V)}-O_{f,E}(1).$$
The implied constants may depend on a fixed compact set containing $U,V$; otherwise the implied constants are uniform in the weights and the integral coordinate changes, in particular for the weights arising from the lattice-box proposition.

If $n$ is constant on $C$ the fixed-$n$ bound applies, and if the $a$-image is constant then invertibility makes $x'$ constant and the fixed-$x'$ bound applies; assume both nonconstant. If the $a$-image is nonlinear, a generic linear projection to an affine line has degree equal to its degree, at least two, by intersecting the projective closure with general hyperplanes of a pencil whose centre avoids the points at infinity; the same conclusion holds for a line image with a nonconstant $x'$-coordinate $t$. In either case some $x'$- or $y'$-coordinate $q$ lies outside $\mathbb C(t)$, and the families $1,t,t^2,\ldots$ and $q,qt,qt^2,\ldots$ are linearly independent, the weight of $q$ at most $\max(U,V)$, so $H_C(T)\ge2T/U-O(1)$; since $\delta_1\ge U/2$ this gives the bound in these cases.

If the $a$-image is a line and the function-field degree over its linear coordinate $t$ is one, write $a_i=r_it+q_i$ with rational $r_i,q_i$ and let $x'$ be a coordinate linear in the $a_i$ that is nonconstant on $C$. If some $y'_i$ is a nonpolynomial rational function, the rational-function lemma applied to the integral inputs $s$ and integral outputs $y'_i$ (with bounds coming from the transformed box) leaves $O_f(1)$ selected points per input, giving the exceptional alternative without any height bound on the moving line or coordinate change. Otherwise every $y'_i$ is polynomial in $s$, hence $b_i$ and $n$ are as well; with $\tau_i=-q_i/r_i$ the identities give $(s-\tau_i)^k\mid n(s)-\theta_i$, the $\tau_i$ distinct because a common value would force two distinct conjugates $\theta_i$ to equal $n$ there, and differentiation then gives
$$\deg n\ge1+d(k-1),\qquad\deg b_i=\deg n-k\ge(d-1)(k-1)=g.$$
For $d=4$ equality would give $\deg n=5$, whose derivative would have the four simple zeros $\tau_i$ with the prescribed critical values; with $\Phi(z)=n(\tau_1+(\tau_2-\tau_1)z)$ and $z=(s-\tau_1)/(\tau_2-\tau_1)$ the integer value $n=\Phi(z)$ lies in the global exceptional set of the quintic-discard proposition, so such a curve has no surviving selected points. Choosing one $b_i$ of degree $\ell\ge g$ in $s$, the functions $s^jb_i^a$ with $0\le j<g$, $a\ge0$, $jU+aV\le T$ are linearly independent (the degrees $j+\ell a$ are distinct), giving $H_C(T)\ge gT/V-O_g(1+U/V)$, while powers of $s$ alone give $H_C(T)\ge T/U-O(1)$; boundedness of $U/V$ and these two estimates give $H_C(T)\ge T/\min(U,V/g)-O(1)$, which with the case above is $T/\delta_1(U,V)-O(1)$.

The proof applies to every bounded-degree curve defined over $\mathbb Q$ occurring after a later cut: the exceptional alternative uses only the bounded integral input and output sizes, and the Hilbert alternative only degrees and weights, so moving equations and moving integral bases introduce no new coefficient-height requirement in dimension one.

The numerical choices that remain are finite and are fixed once.  Set
$K_0 = 3000$, $G_0 = 100000$ and $\tau = 1/50000$.  For an integer
$z \geq K_0$ put
$$\eta_- = z/K_0, \quad \eta_+ = (z+1)/K_0, \quad b_- = d - k\eta_+, \quad b_+ = d - k\eta_-.$$
The intervals indexed by $z$ are used until the first index $z_d$ at
which
$$\eta_-(1 - k\eta_-/d) < 2495/10000.$$
An interval is in mode Q when $d = 4$ and $z < 4000$; the mode records
that the quartic surface bound is stronger than the general surface
bound, so a slightly weaker elementary argument still fits the budget
there.  For every admissible $z$ choose $t_*$ among the rationals
$i/50$ with $1 \leq i < 500$ minimizing $(\eta_+ + b_+ t)^d / H(t)$,
breaking ties by taking the first value; set
$$w = \operatorname{up}_{d-1}\!\left(\frac{1}{H(t_*)}\Bigl(\frac{(d+1)(\eta_+ + b_+ t_*)}{d^2}\Bigr)^d\right)$$
where $\operatorname{up}_e(x)$ denotes the least grid point $r/G_0$
with $1 \leq r \leq G_0$ and $(r/G_0)^e > x$.  Put
$m = (d-1)w$, $u = (\eta_+ - m)/d$, $v = (b_+ - m)/d$.

Claim (parameter choice).  For $d \in \{4, 5, 6, 7, 8\}$ and every
integer $z$ with $K_0 \leq z < z_d$ the following hold:
(a) $0 < m < 1$ and $\min(\eta_-, b_-) > m$;
(b) the strict cut inequalities
$$w^{d-1}H(t_*) > \Bigl(\frac{(d+1)(\eta_+ + b_+ t_*)}{d^2}\Bigr)^d,\qquad
w^{d-2}\min\{H_a(t_*), H_b(t_*)\} > \Bigl(\frac{\eta_+ + b_+ t_*}{d-1}\Bigr)^{d-1};$$
(c) $3/20 \leq v/u \leq 5$ and
$m + \sum_{h=1}^d E_h(u,v) < 999/1000$, where
$E_h(U,V) = \max_{h \leq s \leq d} \delta_s(U,V)$ and
$$\delta_d(U,V) = \frac{UV}{\bigl((kU+V)^{d-1}(U+V)\bigr)^{1/d}},$$
$$\delta_h(U,V) = \frac{UV}{\bigl((kU+V)^{h-1}\min(U,V)\bigr)^{1/h}}\qquad(2 \leq h \leq d-1,\ \text{outside Q}),$$
$$\delta_3(U,V) = \frac{UV}{\bigl((kU+V)^2 V\bigr)^{1/3}}\qquad(\text{mode Q}),$$
$$\delta_2(U,V) = \max\Bigl\{\frac{UV}{\bigl((kU+V)\min(3U,2V,U+V)\bigr)^{1/2}}, \frac{U}{\sqrt 3}\Bigr\}\qquad(\text{mode Q}),$$
$$\delta_1(U,V) = \max\{U/2,\ \min(U, V/g)\},\qquad g = (d-1)(k-1) + \mathbf 1_{d=4}.$$
In mode Q the additional margin $m + 2u < 999/1000$ holds.  The
stopping indices are
$$(z_4, z_5, z_6, z_7, z_8) = (5124, 4084, 3552, 3226, 3003),$$
the interval counts $z_d - K_0$ are $(2124, 1084, 552, 226, 3)$, and
the gap margins $1 - m - \sum_h \bar E_h$ are at least
$(191/100000, 293/50000, 321/2500, 23177/100000, 31683/100000)$,
where each $\bar E_h$ is a downward bound obtained by rounding every
contained radical strictly upward to the grid $1/G_0$.

The verifier works in exact integer and rational arithmetic.  Each
radical needed in $\delta_h$ is replaced by the least grid point whose
$h$-th power exceeds the exact argument, so the resulting comparison
is conservative.  For every admissible $z$ the verifier checks the
two strict cut inequalities, the sign condition, the min and max
bounds, the ratio range $3/20 \leq v/u \leq 5$, and all the margin
inequalities.  For $z = z_d - 1$ the interval endpoint $\eta_+ = z_d/K_0$
is still on the small-$\eta$ side, so the closed interval
$[z/K_0, (z+1)/K_0]$ is certified by the single check at $z$.  The
verifier enumerates $z$, so the stopping indices and margins are
finite lists that can be read off from the output.  The enlarged
quartic cell needed for the cyclotomic example uses
$\epsilon_0 = 10^{-6}$, $\eta_\pm = 1-\epsilon_0$ and $3001/3000$,
$b_\pm = 2 + 2\epsilon_0$ and $2999/1500$, $t_* = 1/2$,
$w = 24809/100000$; it produces $m = 74427/100000$,
$u = 76819/1200000$, $v = 313933/1000000$ and the downward bounds
$(\bar\delta_4, \bar\delta_3, \bar\delta_2, \bar\delta_1) =
(4729/100000, 5097/100000, 6899/100000, 76819/1200000)$, with margins
$1 - m - \sum_h \bar E_h - 4\tau = 1941/100000$ and
$1 - m - 2u - 2\tau = 15319/120000$.

The weight-shift inequality needed in the box summation states that
for either fixed mode and every $U, V > 0$ with $3/20 \leq V/U \leq 5$,
$$\delta_h(U+s, V+s) \leq \delta_h(U,V) + s
\qquad(s \geq 0,\ 1 \leq h \leq d).$$
The auxiliary function
$q_{a,b}(U,V) = UV/(aU+bV)$, with $a \geq 0$ and $b \geq 0$, is
concave and increasing in each variable outside the origin, positively
homogeneous of degree one.  The branch
$F_{h,a,b} = q_{k,1}^{(h-1)/h} q_{a,b}^{1/h}$ is a geometric mean of
such functions, so it is again concave, increasing, homogeneous of
degree one.  Its differential in the direction $(1,1)$ has absolute
value less than one on the ratio interval because the one-variable
inequality
$$t\Bigl(1 + \frac{1}{t} - \frac{h-1}{h}\frac{k+1}{k+t}
 - \frac{1}{h}\frac{a+b}{a+bt}\Bigr)
 \leq \bigl((k+t)^{h-1}(a+bt)\bigr)^{1/h}$$
holds for $t = 3/20$ and $t = 5$ (an integer check for
$2 \leq k \leq 6$, $2 \leq h \leq k+2$, and $(a,b) \in \{(1,0),(0,1),(1,1)\}$).
Concavity gives the same for every intermediate $t$.  Integrating
along the segment from $(U,V)$ to $(U+s, V+s)$ yields the inequality
for each branch, and finite min/max operations inherit it.  The
simple functions $U/\sqrt 3$, $U/2$, $U$, $V/g$ also have
directional slope at most one.

Coverage of the interval $[K_0 z / K_0, d/k)$ is then transparent.
The function $\phi_d(\eta) = \eta(1 - k\eta/d)$ has derivative
$\phi_d'(\eta) = 1 - 2k\eta/d \leq (4-d)/d \leq 0$, so it is
nonincreasing.  The stopping criterion therefore cuts the small-$\eta$
range off exactly where the direct surface estimate becomes weaker
than the number-field argument.  In the quartic case the last mode Q
interval ends at $4/3$ and meets the first ordinary interval.

The determinant method of Bombieri and Pila in Salberger's global form is the affine counting input to the number-field and elementary-surface ranges.  Its statement and proof occupy the next paragraphs.
./bombieri-pila-duke-1989-ovals.pdf
./salberger-crelle-2007-density.pdf
./heath-brown-annals-2002-curves-surfaces.pdf

Theorem (affine counting theorem).  Fix positive integers $N$ and $D_{\mathrm{cap}}$, a rational weight vector $w = (w_1, \ldots, w_N)$ with $1/10 \leq w_i/w_j \leq 10$.  Suppose $Z \subseteq \mathbb C^N$ is an affine algebraic set of dimension $r \leq N$ and projective degree at most $D_{\mathrm{cap}}$, and $S \subseteq Z \cap \mathbb Z^N$ is finite.  For every $h = 1, \ldots, r$ and every irreducible subvariety $W \subseteq Z$ of dimension $h$ meeting $S$, suppose the weighted filtered Hilbert function of polynomial functions on $W$ satisfies
$$H_W(T) \geq \frac{T^h}{h!\,\delta_h^h} - O(T^{h-1}+1), \qquad 0 < \delta_h \leq 1,$$
with thresholds $\delta_h$ that may depend on $W$ only through its degree bound and $h$.  Put $E_h = \max_{h \leq s \leq r} \delta_s$.  Then for every $\epsilon > 0$ and every $X \geq 2$,
$$\#\{p \in S : |p_i| \leq X^{w_i} \text{ for } 1 \leq i \leq N\} \ll_{\epsilon, N, D_{\mathrm{cap}}, w} X^{E_1 + E_2 + \cdots + E_r + \epsilon}.$$

The proof splits into a patch decomposition, a Taylor rank lemma, a residue-class determinant, a deletion estimate, and a counting tree that assembles these pieces.  Each piece is recorded below.

Lemma (bounded patch list).  For every output $(Z, S)$ there are a finite list of bounded-degree integer polynomials, a square Jacobian minor $\Delta$ supported on $N - h$ coordinate columns, and a family of irreducible subschemes $A \subseteq Z$ of dimension $h$, all with degrees and heights bounded in terms of $D_{\mathrm{cap}}$, $N$, and the coefficient vectors of $Z$, such that each point of $S$ lies on at least one patch $(A, \Delta)$ on which the vanishing polynomials on $S \cap A$ form a complete intersection.

Sketch.  Let $e$ be a fixed degree bound.  The evaluation map of degree-$\leq e$ monomials at $S \cap A$, or rather its integer nullspace, has a spanning set of polynomial height: select independent rows and pivot columns, solve for the non-pivot coordinates by cofactors, and clear the pivot determinant.  If the complexified nullspace strictly contains the degree-$e$ part of the ideal of $A$, then some bounded-height spanning polynomial does not vanish identically on $A$; add it, intersect with its zero set (a proper subvariety of smaller dimension), and recurse.  If not, the spanning polynomials form the truncation of the ideal of $A$ at degree $e$, the generic Jacobian rank is maximal, and $N - h$ of the spanning polynomials with a nonvanishing minor $\Delta$ form the patch.  Recursion on the residual locus $A \cap \{\Delta = 0\}$ leaves only the covered stratum.  Every recursive intersection is proper, so Bezout's bounds control the length of the chain, the degrees, and the heights.  The choices are fixed once, depending only on the input data and $S$, so equal inputs give identical patch lists.

Lemma (Taylor rank).  Let $\ell$ analytic columns have uniformly bounded derivatives on bounded complex neighborhoods with small variables $u_1, \ldots, u_r, z$ of weights $w, \ldots, w, 1$.  Suppose the rank of monomial evaluation columns of weight at most $T$ is at most $a T^r + O(T^{r-1}+1)$ with $a > 0$.  If $\ell$ such columns are independent with weights $\lambda_1 \leq \cdots \leq \lambda_\ell$, then
$$\sum_{j=1}^{\ell} \lambda_j \geq \frac{r}{r+1} a^{-1/r} \ell^{1+1/r} - O(\ell).$$

Proof.  The rank inequality reads $j \leq a \lambda_j^r + O(\lambda_j^{r-1}+1)$, so $\lambda_j \geq (j/a)^{1/r} - O(1)$.  Summing over $j$ and using the integral comparison $\sum_{j=1}^{\ell} j^{1/r} = \frac{r}{r+1}\ell^{1+1/r} + O(\ell)$ gives the displayed inequality.

Lemma (residue cut).  Fix a patch $(A, G, \Delta)$ of dimension $h \geq 1$ and a prime $q$.  If the reduction of $A$ modulo $q$ has at most $c_A q^h$ points with $\Delta \neq 0$, and $\#(S \cap A \cap \text{box mod } q) > h!\delta^{-h} c_A q^h$ for a fixed $\delta > 0$, then there is a nonzero integer polynomial of bounded degree whose complex evaluation vanishes on $S \cap A$ and whose reduction modulo $q$ vanishes to order at least one on every residue class containing a counted point.

Proof.  Form the row matrix $M = (m(x))$ of degree-$\leq e$ monomials at the counted points $x \in S \cap A$, where $e$ is chosen so that the number of monomials is at least the number of points (from the Hilbert threshold $h!\delta^{-h} c_A q^h$ at the size of the box).  If $M$ has maximal rank modulo $q$, then injectivity mod $q$ of the evaluation-at-$S \cap A$ forces the number of distinct residue classes of $S \cap A$ mod $q$ to be at least the rank; contradiction when the rank exceeds $c_A q^h$.  Hence $M$ has deficient rank modulo $q$, and a nonzero vector in the kernel corresponds to a polynomial $P$ of degree $\leq e$ vanishing on every counted point mod $q$.  Lifting $P$ to a rational integer polynomial and applying it to the complex points gives the cut.

Lemma (deletion estimate).  Fix a patch $(A, G, \Delta)$ and a pool $\mathcal P$ of primes in $[X^\zeta, C_r X^\zeta]$ disjoint from the prime divisors of the defining coefficients of $A$.  Choose $t$ uniformly from a fixed set of $T_0$ consecutive integers and then choose a $t$-subset $\mathcal B \subseteq \mathcal P$ uniformly.  The expected fraction of primes in $\mathcal B$ that divide some bounded-degree path integer associated with a fixed $z \in S$ is at most $B_0/T_0 + o(1)$, where $B_0$ depends only on the patch list and on $N$.

Proof.  The path integer of the counting tree at stage $h$ depends only on the previous choices of blocks and on the patch list, so it is a polynomial in the coordinates with height uniformly bounded.  Each prime dividing it contributes one of $B_0$ possible "records", and these are decided by at most $B_0$ subsets of the chosen $t$; only $B_0$ values of $t$ trigger a record.  Uniform sampling over $t$-subsets then gives probability at most $B_0/T_0 + o(1)$.

The good branch of the counting tree.  Given the patches and the deletion estimate, choose for each dimension $h = r, r-1, \ldots, 1$ a block $\mathcal B_h$ of consecutive primes from a fixed pool with size between $2 a_h/\zeta$ and $2 a_h/\zeta + 2$, where $a_h = E_h - E_{h+1}$ and $E_{r+1} = 0$.  At stage $h$, if the current subvariety (an intersection of the original $A$ with the previous cut polynomials) has dimension exactly $h$, then the residue-cut lemma appends one extra polynomial of weight at most $\delta_h + \epsilon$, and the phase space of the whole tree has total branching parameter $\sum_{h=1}^{r} E_h$.  The deletion estimate, summed over the $O_r(1)$ branches of the tree, shows at least $1 - \sum_{h=1}^{r} 2^{-h} \geq 1/2$ of the selected input is not lost at any stage, at the cost of the bounded residue.  Every leaf of the tree is a zero-dimensional subvariety of bounded degree and contributes at most that degree to the count.  Together the branches give
$$\#(S \cap \text{box}) \ll_{\epsilon, N, D_{\mathrm{cap}}, w} X^{E_1 + E_2 + \cdots + E_r + \epsilon}.$$

This closes the affine counting theorem.

Two applications occur.  The elementary-surface step uses ambient space $\mathbb C^3$ with coordinates $(x, y, z)$ of weights $(1, b', \eta')$ and the surface $f(x) = y z^k$; its Hilbert function is $\frac{D}{b' \eta'} T^2/2 + O(T)$ with $D = \max\{d, b'+k\eta'\}$, so the surface threshold is $\delta_2 = \sqrt{b'\eta'/D} < 0.4999$, and its curves have threshold $\delta_1 = 1/2$, giving the bound $O(X^{\delta_2 + 1/2 + \epsilon})$.  The number-field step uses ambient space $\mathbb C^{2d}$ with the mixed weight $U$ on $x$ and $V$ on $y$ and the pair-image thresholds $E_h(U, V)$, giving the bound $O(X^{\sum_h E_h(U,V) + \epsilon})$ per box; after the box summation and range aggregation the exponent becomes $O(X^{1 - \delta})$ uniformly, as in the main text.


The range
$$\phi_d(\eta) \leq 2495/10000$$
is handled by the elementary surface $f(x) = y z^k$.  Fix a dyadic
$P$ with $P = X^\eta$ and $b = d - k\eta$, and for each qualified
triple $(n, f(n)/p^k, p)$ set $(x, y, z) = (n, f(n)/p^k, p)$; this
is an integer point of the surface with coordinate sizes $O(X)$,
$O(X^b)$, $O(X^\eta)$.  The surface is irreducible over $C$: it
is primitive in $Z[x, z, y]$ and linear in $y$, and the two
coefficients $z^k$ and $f(x)$ are coprime in $C[x,z]$, so Gauss's
lemma makes the defining polynomial irreducible.  Fix upper weights
$b', \eta'$ with $\sqrt{b'\eta'/d} < 0.4999$.  An explicit choice
is $b' = e(\lfloor b/e\rfloor + 1)$, $\eta' = e(\lfloor\eta/e\rfloor + 1)$
with $e = 1/10000$, together with the terminal choice $(e, d/k + e)$,
and these cover all $(b,\eta)$ with $b + \eta \leq 3$ and
$b\eta/d \leq 2495/10000$, because such a pair satisfies
$$\frac{b'\eta'}{d} \leq \frac{2495}{10000} + \frac{3e+e^2}{4}
 < \Bigl(\frac{4999}{10000}\Bigr)^2.$$
For each fixed triple of weights $(1, b', \eta')$ the filtered Hilbert
function of the surface is
$$H(T) = \frac{D}{b'\eta'}\frac{T^2}{2} + O(T),\qquad
D = \max\{d,\ b' + k\eta'\},$$
obtained by extracting the pole of the weighted Hilbert series
$(1-t^E)/((1-t)(1-t^A)(1-t^B)(1-t^C))$ at $t=1$; the assignments
$A = L$, $B = Lb'$, $C = L\eta'$, $E = LD$ clear denominators.
Every other root of unity has pole order at most two, because an
order dividing $A, B, C$ also divides $E$ and cancels against the
numerator.  The threshold supplied by the counting theorem is
$$\delta_2 = \sqrt{b'\eta'/D} < 0.4999.$$
An irreducible curve on this surface over $Q$ has either nonconstant
$x$, in which case the function field is of degree at least two
over $C(x)$ unless $y$ and $z$ are rational functions, and the
rational-function lemma handles the latter by a bounded-count
alternative or a constant $z$; or $x$ constant, giving $O_f(1)$
triples.  In every case the curve threshold $\delta_1 = 1/2$ applies.
The affine counting theorem (ambient dimension three, dimension bound
two) therefore gives
$$O_{f,\epsilon}(X^{\delta_2 + 1/2 + \epsilon}),$$
a strict power saving since $\delta_2 + 1/2 < 1 - \delta$ for a fixed
$\delta > 0$ depending only on $d$.

The remaining range $\phi_d(\eta) > 2495/10000$ is the number-field
range.  Fix $P = X^\eta$ inside one of the parameter intervals
$[\eta_-, \eta_+]$ and $b = d - k\eta$.  Factor each qualified
$n - \theta$ by the balanced factorization into $a^k b' = \mu(n-\theta)$
inside the number field; the map $(n, p) \mapsto (x, y)$ has bounded
order, so no multiplicity loss occurs.  Place the pairs into paired
boxes using the pairing lemma; the normalized chart coordinates
$s, t$ and the $z = 1/n$ coordinate all lie in cubes of side
$O(X^{-w})$.  Apply the archimedean cut to each box; the counted
points of a box lie on a bounded number of bounded-degree algebraic
sets of dimension at most $d-1$, plus the mixed $d$-dimensional
component.  Group the boxes into ranges $j$ using the lattice
proposition and apply the affine counting theorem (ambient dimension
$2d$, dimension bound $d$) with the pair-image Hilbert inputs.  For
a fixed range $j$ the box count is $O(X^{m-dj})$, the coordinate
bounds are $|x'_i| \ll X^U$, $|y'_i| \ll X^V$ with $U = u+j+\tau$,
$V = v+j+\tau$, and the pair-image Hilbert thresholds supply
$H_A(T) \geq T^h/(h!\,\delta_h(U,V)^h) - O(T^{h-1})$ on every
dimension-$h$ piece.  The affine counting theorem produces
$$|S_j| \ll_{f,\epsilon} X^{m - dj + \sum_{h=1}^d E_h(U,V) + \epsilon}.$$
By the shift inequality applied $j$ times with increment
$\tau$ at each step, $E_h(U,V) \leq E_h(u, v) + j + \tau$, so
$$\sum_{h=1}^d E_h(U,V) \leq \sum_{h=1}^d E_h(u,v) + d(j+\tau),$$
and therefore
$$m - dj + \sum_h E_h(U,V) + \epsilon
 \leq m + \sum_h E_h(u,v) + d\tau + \epsilon
 < 24979/25000 + \epsilon < 1 - \delta$$
for a fixed $\delta > 0$ independent of the input $X$.  The mixed
$d$-dimensional component is treated by the mixed pair-image bound
with $D = \lambda U + s_0 V \geq U+V$, and gives the same saving;
the factor of boundedly many charts, ideals of the class group,
and irreducible components contributes only a constant.

In the quartic case the infinite-fiber removal costs an additional
$O(X^{m - dj + 2(u+j+\tau)})$ points per box, that is
$O(X^{m + 2u - 2j + 2\tau}) \leq O(X^{m + 2u + 2\tau})$ uniformly
in $j$, which by the parameter certificate is at most $X^{3122/3125}$,
still a strict power saving.  The one-time removal of the quintic
set costs $O(X^{1/5})$, negligible in the same accounting.  The
bounded integral input and output sizes at the curves and the degree
and weight data in the Hilbert alternatives are uniform, so the
discarded sets never reappear.

Summing over $O_f(\log X)$ dyadic prime intervals and over the
finitely many parameter intervals preserves a fixed minimum of the
two savings.  The bounded multiplicity from the charts, ideals,
coordinate bases and components absorbs by adjusting that minimum.
The result is the large-prime estimate: for $f$ primitive,
irreducible, positive-leading of degree $4 \leq d \leq 8$ there is
a fixed $\delta_f > 0$ with
$$\#\{X < n \leq 2X : p^k \mid f(n)\ \text{for some prime } p > X\}
 \ll_f X^{1-\delta_f}.$$
The content and sign normalization proceeds first; the sieve transfer
then converts the large-prime bound into the density theorem.

The whole scheme becomes completely explicit for $f(T) = T^4 + 1$.
Write $\zeta = e^{2\pi i/8}$ and $K = Q(\zeta)$, and let
$$c_8 = \prod_{p \equiv 1 \pmod 8} \Bigl(1 - \frac{4}{p^2}\Bigr).$$
Then
$$S_{f,2}(X) = c_8 X + o(X).$$
In particular for every sufficiently large $N$ the interval
$(N, 2N]$ contains at least $N/2$ positive integers $n$ with
$n^4 + 1$ squarefree.

Irreducibility follows from the Eisenstein substitution
$T \mapsto T + 1$: $(T+1)^4 + 1 = T^4 + 4T^3 + 6T^2 + 4T + 2$ is
Eisenstein at $2$.  The congruence conditions are elementary.
Modulo $4$ the values of $T^4 + 1$ are $1$ for even inputs and $2$
for odd, so $\rho_f(4) = 0$.  For an odd prime $p$, the congruence
$T^4 + 1 \equiv 0 \pmod p$ has a solution precisely when the group
$(\mathbb F_p)^\times$ has an element of order $8$, i.e. when
$8 \mid p - 1$; then it has exactly four solutions, each with
nonzero derivative $4T^3$, and Hensel's lemma lifts each to exactly
one square root modulo $p^2$.  Hence $\rho_f(p^2) = 4$ for
$p \equiv 1 \pmod 8$ and $0$ otherwise.  The content product is
empty because $f$ is primitive and $f(0) = 1$.

The bound $c_8 > 3/4$ follows from $\prod(1-a_p) \geq 1 - \sum a_p$
for $0 \leq a_p \leq 1$; each $p$ in the product is at least $17$, so
$$c_8 \geq 1 - 4\sum_{p \equiv 1(8)} \frac{1}{p^2}
 \geq 1 - 4\sum_{m \geq 17} \frac{1}{m^2} > 1 - \frac{4}{16} = \frac{3}{4}.$$
Substituting in the main term gives $c_8 N + o(N)$ squarefree
values on $(N, 2N]$ and hence at least $N/2$ for large $N$.

Beyond the plain main term, an enlarged central-prime estimate uses
the single enlarged quartic cell quoted with the parameter
certificate.  Because $\epsilon_0 < 1/2$, every considered prime
satisfies $p^2 \geq N^{2-2\epsilon_0} > N$; the finitely many bad
primes (dividing discriminant or content) are absent for large $N$;
and the balanced-factorization lemma applies verbatim.  The paired
charts, determinant cuts and lattice groups require only the displayed
coordinate upper bounds and the strict parameter inequalities, and
the Hilbert and curve alternatives impose no further condition
$p > N$.  One power saving therefore holds on every dyadic prime
interval in $[N^{1-\epsilon_0}, N^{3/2+\epsilon_0}]$.  The one-time
removal of the quintic set and the $O(\log N)$ factor absorb into a
smaller fixed saving, and combining with the $p > N$ bound yields
a fixed positive delta_0 for the range
$N^{1-\epsilon_0} \leq p \leq N^{3/2+\epsilon_0}$.

The two complex embeddings of $\zeta$ are conjugate, every root of
unity in $K$ has modulus one at both, and the integer ring is
$O_K = Z[\zeta]$.  The norm form is Euclidean on $Z[\zeta]$; every
ideal is principal, so the balanced factorization takes the concrete
form
$$A^2 B = n - \zeta,\qquad A, B \in Z[\zeta],\qquad N(A) = p.$$
The unit $1 + \sqrt 2$, with $\sqrt 2 = \zeta - \zeta^3$, has
absolute values $1 + \sqrt 2$ and $(1+\sqrt 2)^{-1}$ at the two
complex places; multiplying $A$ by a suitable power of it balances
the two absolute values.  Consequently
$$|\sigma(A)| \asymp P^{1/4}, \qquad |\sigma(B)| \asymp N P^{-1/2}$$
at every embedding.  The balanced factorization and paired charts
of the main argument supply the same box structure, and the same
archimedean cuts and lattice grouping then apply.  Moreover, when
$P \geq N^{1-\epsilon_0}$ the arguments of every embedding are fixed
and the two branches $s, t$ depend analytically on $z$ alone with
derivatives uniformly bounded, so the quartic surface bound and the
quartic curve bound apply without further inspection of the
divisor-class group.  The result is the enlarged central-prime
estimate.

Finally, for completeness, the elementary estimate controlling the
Pell-type equation
$$n^4 + 1 = D q^2$$
for fixed positive integer $D$ states that the number of $(n,q)$
with $N \leq n \leq 2N$ is $O(1 + \log N)$.  Writing
$q^2 = (n^2 + 1)^2 - 2n^2$ and setting $x = n^2 + 1$, the
factorization in $Z[\sqrt 2]$ gives a fixed number of exponential
families, so the pair $(n,q)$ is determined up to $O(\log N)$
choices.  Combined with the divisor-class finiteness in $K$ this
closes the Pell aspect, and no further analysis of the group of
solutions is needed.

The corollary for all $d \geq 4$ follows from the classical and
recent cases.  When $4 \leq d \leq 8$ the main theorem gives the
density $c_{f,d-2}$.  When $d \geq 9$ the exponent $k = d-2$
satisfies $k \geq (3d+1)/4$, so the Browning-Xiao theorem for
power-free values of $f$ applies after removing the content and sign
from $f$.
./xiao-imrn-2017-powerfree.pdf

The sieve transfer used above restores the same Euler product from
the primitive case.  The large-prime estimate goes through with $f$
in place of its primitive part at every stage; the density only
references $c_{f,k}$.  Thus
$$S_{f,k}(X) = c_{f,k} X + o_f(X),\qquad
c_{f,k} = \prod_p \Bigl(1 - \frac{\rho_f(p^k)}{p^k}\Bigr) > 0,$$
for every irreducible $f \in \mathbb Z[x]$ with $d \geq 4$ satisfying local
admissibility.  The special cases $f(T) = T^4 + 2$ (Eisenstein at
$2$) and $f(T) = T^4 + 1$ (cyclotomic) therefore satisfy
$c_{f,2} > 0$ for full squarefree density.
The value at zero of $T^4+2$ is $2$, so no odd prime square divides
it, and the value at one is $3$, so $4$ does not divide every
value; local admissibility holds at every prime.