# Sums of Four Squareful numbers

###### Abstract.

We find an asymptotic formula for the number of primitive vectors
$(z_{1},\ldots,z_{4})\in(\mathbb{Z}_{\neq 0})^{4}$ such that
$z_{1},\ldots,z_{4}$ are all squareful and bounded by $B$, and
$z_{1}+\cdots+z_{4}=0$. Our result agrees in the power of $B$ and $\log B$
with the Campana–Manin conjecture of Pieropan, Smeets, Tanimoto and Várilly-
Alvarado.

Alec Shute

###### Contents

  1. 1 Introduction
  2. 2 The Campana–Manin conjecture
  3. 3 Dealing with the large coefficients
  4. 4 The circle method
  5. 5 Proof of Theorem 1.1

##  1\. Introduction

The notion of Campana points, first discussed by Campana in
[campana2004orbifolds] and [campana2011orbifoldes], and Abramovich in
[abramovich2009birational], is receiving increasing attention in the field of
arithmetic geometry. Campana points associated to an orbifold $(X,D)$ can be
viewed as rational points on $X$ that are integral with respect to a weighted
boundary divisor $D$, and thus provide a way to interpolate between integral
and rational points.

The quantitative study of the arithmetic of Campana orbifolds was kick-started
by the discussions in [abramovich2009birational] and [poonen2006projective]. A
motivating example for the development of the theory was given in
[poonen2006projective], where Poonen poses the problem of finding the number
of coprime integers $z_{0},z_{1}$ such that $z_{0},z_{1}$ and $z_{0}+z_{1}$
are all squareful and bounded by $B$ (We recall that a nonzero integer $z$ is
$m$-full if for any prime $p|z$, we have $p^{m}|z$, and squareful if it is
$2$-full). This corresponds to counting Campana points on the orbifold
$(\mathbb{P}^{1},D)$, where $D$ is the divisor
$\frac{1}{2}[0]+\frac{1}{2}[1]+\frac{1}{2}[\infty]$. Since this problem seems
too difficult at the moment, in [van2012squareful], Van Valckenborgh considers
the higher-dimensional analogue $(\mathbb{P}^{k-2},D)$, where
$D=\sum_{i=1}^{k}\frac{1}{2}D_{i}$ for hyperplanes $D_{1},\ldots,D_{k}$. This
leads to the study of the asymptotic size $N_{k}(B)$ of the set

$\mathscr{N}_{k}(B)=\left\\{\mathbf{z}\in(\mathbb{Z}_{\neq
0})^{k}_{\textrm{prim}}:|z_{i}|\leqslant B,z_{i}\textrm{ squareful for all
}i,\sum_{i=1}^{k}z_{i}=0\right\\},$ (1.1)

as $B\rightarrow\infty$. The main result in [van2012squareful, Theorem 1.1] is
that for any $k\geqslant 5$, we have $N_{k}(B)=cB^{k/2-1}+O(B^{k/2-1-\delta})$
for some constants $c,\delta>0$. The remaining cases of interest are $k=3$,
corresponding to Poonen’s original question, and $k=4$. In this paper, we
treat the case $k=4$. We define

$\mathscr{T}=\\{(z_{1},\ldots,z_{4})\in\mathbb{Z}^{4}_{\textrm{prim}}:z_{1}\cdots
z_{4}=\square\\},$ (1.2)

and consider the counting problem

$N(B)=\\#(\mathscr{N}_{4}(B)\backslash\mathscr{T}).$ (1.3)

Our main result is the following theorem.

######  Theorem 1.1.

For any $\epsilon>0$ we have

$N(B)=cB+O(B^{734/735+\epsilon}),$ (1.4)

for an absolute constant $c>0$ given explicitly in
(LABEL:the_leading_constant) and Lemma LABEL:local_densities_lemma.

Interest in the quantitative arithmetic of Campana orbifolds has been further
sparked by the recent work [pieropan2019campana], in which Pieropan, Smeets,
Tanimoto and Várilly-Alvarado formulate a Manin-type conjecture for Fano
Campana orbifolds. The authors establish their conjecture in the special case
of vector group compactifications, using the height zeta function method
developed by Chambert-Loir and Tschinkel in [chambert2002distribution] and
[chambert2012integral].

In Section 2, we discuss the compatibility of Theorem 1.1 with the prediction
from [pieropan2019campana, Conjecture 1.1], which is henceforth referred to as
the Campana–Manin conjecture. We find that our result agrees with the
Campana–Manin conjecture in the power of $B$ and $\log B$, and the set
$\mathscr{T}$ that we remove corresponds to a thin set of Campana points. The
leading constant $c$ from Theorem 1.1 is discussed in Section 5. However, in
the light of our recent work[leadingconstant2021], we do not expect the
leading constant to agree with the prediction from the Campana–Manin
conjecture without the removal of further thin sets.

A number of other instances of the Campana–Manin conjecture have been studied
in addition to the results mentioned above. In [browning2019arithmetic],
Browning and Yamagishi consider the orbifold $(\mathbb{P}^{n},D)$ for
$D=\sum_{i=0}^{n+1}(1-\frac{1}{m_{i}})D_{i}$, where $D_{0},\ldots,D_{n}$ are
coordinate hyperplanes, and $D_{n+1}$ is a general hyperplane. Their main
result is an asymptotic formula for the number of points on this orbifold
under the assumptions that $m_{i}\geqslant 2$ for all $i$, and that there
exists some $j\in\\{0,\ldots,n+1\\}$ such that

$\sum_{\begin{subarray}{c}0\leqslant i\leqslant n+1\\\ i\neq
j\end{subarray}}\frac{1}{m_{i}(m_{i}+1)}\geqslant 1.$

In [pieropan2020hyperbola], Pieropan and Schindler establish the Campana–Manin
conjecture for complete smooth split toric varieties satisfying an additional
technical assumption, by developing a very general version of the hyperbola
method. In [xiao2020campana], Xiao treats the case of biequivariant
compactifications of the Heisenberg group over $\mathbb{Q}$, using the height
zeta function method. Finally, in [streeter2020campana], Streeter studies
$m$-full values of norm forms by considering the orbifold
$(\mathbb{P}_{K}^{d-1},(1-\frac{1}{m})\mathbb{V}(N_{E/K}))$, where $K$ is a
number field, $\mathbb{V}(N_{E/K})$ the divisor cut out by a norm form
associated to a degree-$d$ Galois extension $E/K$, and $m\geqslant 2$ is an
integer which is coprime to $d$ if $d$ is not prime.

We now summarise the proof of Theorem 1.1. The approach is broadly similar to
previous results by Browning and Yamagishi in [browning2019arithmetic] and Van
Valckenborgh in [van2012squareful]. Every nonzero squareful integer $z$ can be
written uniquely in the form $z=y^{3}x^{2}$, where $y$ is a nonzero square-
free integer and $x$ is a positive integer. For a fixed choice of
$\mathbf{y}=(y_{1},\ldots,y_{4})$, the equation $z_{1}+\cdots+z_{4}=0$ defines
a quadric $Q_{\mathbf{y}}$ cut out by the polynomial
$F_{\mathbf{y}^{3}}(\mathbf{x})=\sum_{i=1}^{4}y_{i}^{3}x_{i}^{2}$. The
condition $z_{1}\cdots z_{4}=\square$ from (1.2) is equivalent to the
condition $y_{1}\cdots y_{4}=\square$. Therefore

$N(B)=\frac{1}{16}\sum_{\begin{subarray}{c}\mathbf{y}\in(\mathbb{Z}_{\neq
0})^{4}\\\ y_{1},\ldots,y_{4}\textrm{ square-free}\\\ y_{1}\cdots
y_{4}\neq\square\end{subarray}}N_{\mathbf{y}}(B),$ (1.5)

where

$N_{\mathbf{y}}(B)=\\#\left\\{\mathbf{x}\in(\mathbb{Z}_{\neq
0})^{4}:F_{\mathbf{y}^{3}}(\mathbf{x})=0,\begin{tabular}[]{l}$\gcd(x_{1}y_{1},\ldots,x_{4}y_{4})=1$\\\
$\max_{1\leqslant i\leqslant 4}|y_{i}^{3}x_{i}^{2}|\leqslant
B$\end{tabular}\right\\}.$

The factor $1/16$ comes from the fact that for all $i\in\\{1,\ldots,4\\}$,
there are two choices for the sign of $x_{i}$ corresponding to the same choice
of $z_{i}$.

In Section 4, we study the closely related counting problem

$N_{\mathbf{a}}(B)=\\#\left\\{\mathbf{x}\in(\mathbb{Z}_{\neq
0})^{4}:F_{\mathbf{a}}(\mathbf{x})=0,\max_{1\leqslant i\leqslant
4}|a_{i}x_{i}^{2}|\leqslant B\right\\},$ (1.6)

where we have removed the coprimality condition and replaced $\mathbf{y}$ with
an arbitrary vector $\mathbf{a}=(a_{1},\ldots,a_{4})\in(\mathbb{Z}_{\neq
0})^{4}$.

######  Remark 1.2.

Rational points on non-singular quadric surfaces are known to conform to the
classical Manin’s conjecture [franke1989rational]. Let $A=a_{1}\cdots a_{4}$.
It can be shown that the Picard group of the quadric
$F_{\mathbf{a}}(\mathbf{x})=0$ has rank 1 when $A\neq\square$ and rank 2 when
$A=\square$. Thus Manin’s conjecture predicts that

$N_{\mathbf{a}}(B)\sim\begin{cases}c_{\mathbf{a}}B,&\textrm{ if
}A\neq\square\\\ c^{\prime}_{\mathbf{a}}B\log B,&\textrm{ if
}A=\square,\end{cases}$ (1.7)

for constants $c_{\mathbf{a}},c^{\prime}_{\mathbf{a}}$ (depending on
$\mathbf{a}$) which can be expressed as a product of local densities. The
extra factor of $\log B$ in the case $A=\square$ explains why it is necessary
to remove the set $\mathscr{T}$ in the formulation of Theorem 1.1.

In order to estimate $N_{\mathbf{a}}(B)$, we apply a version of the circle
method introduced by Duke, Friedlander and Iwaniec in [duke1993bounds], and
refined by Heath-Brown in [MR1421949]. The more classical forms of the circle
method used in [browning2019arithmetic] and [van2012squareful] are not
sufficient for our purposes, but the version in [MR1421949] is particularly
well-suited to dealing with quadratic forms. In fact, in [MR1421949], Heath-
Brown proves a vast generalisation of (1.7) by finding an asymptotic formula
for the quantity

$N_{w}(Q,B)=\sum_{\begin{subarray}{c}\mathbf{x}\in\mathbb{Z}^{n}\\\
Q(\mathbf{x})=0\end{subarray}}w(B^{-1}\mathbf{x}),$

for any $n\geqslant 3$, any non-singular indefinite quadratic form
$Q\in\mathbb{Z}[x_{1},\ldots,x_{n}]$, and any
$w:\mathbb{R}^{n}\rightarrow\mathbb{R}_{\geqslant 0}$ belonging to a suitably
defined class of smooth weight functions. The following theorem is the main
result from Section 4. It features the quantities

$\Delta=\prod_{i=1}^{4}\gcd\left(a_{i},\prod_{j\neq i}a_{j}\right),\quad
A=a_{1}\cdots a_{4},$

as well as the singular series $\mathfrak{G}_{\mathbf{a}}$ and the singular
integral $\sigma_{\infty}(\boldsymbol{\epsilon})$, defined respectively in
(4.1) and (4.2). Note that $\sigma_{\infty}(\boldsymbol{\epsilon})$ only
depends on $\epsilon_{i}=\operatorname{sgn}(a_{i})$.

######  Theorem 1.3.

Let $\mathbf{a}\in(\mathbb{Z}_{\neq 0})^{4}$ be such that $A\neq\square$ and
$|A|\leqslant B^{4/7}$. Then

$N_{\mathbf{a}}(B)=\frac{\mathfrak{G}_{\mathbf{a}}\sigma_{\infty}(\boldsymbol{\epsilon})B}{|A|^{1/2}}+O\left(\frac{B^{41/42+\epsilon}\Delta^{1/3}}{|A|^{11/24}}\right),$
(1.8)

where the implied constant depends only on $\epsilon$.

To complete the proof of Theorem 1.1, in Section 5, we apply Theorem 1.3
together with an inclusion-exclusion argument in order to reinsert the
coprimality condition and obtain an estimate for $N_{\mathbf{y}}(B)$.
Returning to (1.5), we can take a sum over these estimates for
$N_{\mathbf{y}}(B)$ in the range $\max_{i}|y_{i}|\leqslant D$, where $D$ is a
small power of $B$. The contribution from the remaining range
$\max_{i}|y_{i}|>D$ is studied in Section 3 using an elementary argument, and
forms part of the error term in Theorem 1.1.

It is important in the proof of Theorem 1.1 that the dependence of the
estimate in Theorem 1.3 on the coefficients $a_{1},\ldots,a_{4}$ is made
completely explicit. Several authors have obtained estimates of this type for
quadratic forms. In [browning2007density, Theorem 2], Browning applies the
machinery from [MR1421949] to find such an estimate for the counting problem
corresponding to $N_{\mathbf{a}}(B)$, but in $n\geqslant 5$ variables.
Subsequently in [browningbundle, Theorem 4.1], Browning and Heath-Brown
carried this out in four variables. This latter result is nearly sufficient
for our purposes, but Theorem 1.3 represents a refinement in which we drop the
assumptions made in [browningbundle, Theorem 4.1] that $A$ is nearly square-
free and all the coefficients $a_{1},\ldots,a_{4}$ are roughly the same size.
Finally, we mention that using other techniques from the geometry of numbers,
Comtat provides in [comtat2019uniform, Theorem 1.2] a completely uniform
estimate for the number of zeros
$(x_{1},\ldots,x_{n})\in\mathbb{Z}^{n}_{\textrm{prim}}$ of a non-singular
quadratic form $Q$ in $n\geqslant 3$ variables which lie in an arbitrary box
$|x_{i}|\leqslant B_{i}$ for $i\in\\{1,\ldots,n\\}$. However, the resulting
bound $N_{\mathbf{a}}(B)\leqslant B/|A|^{1/4}$ does not have a good enough
dependence on $A$ to be useful for our purposes.

### Notation

We take $\mathbb{N}=\mathbb{Z}_{\geqslant 1}$. We denote by $(\mathbb{Z}_{\neq
0})^{n}_{\textrm{prim}}$ the set of vectors $(a_{1},\ldots,a_{n})$ such that
$a_{1},\ldots,a_{n}$ are nonzero integers and $\gcd(a_{1},\ldots,a_{n})=1$.
For a prime $p$, we let $\nu_{p}$ denote the $p$-adic valuation. We write
$e(\cdot)$ for the function $e^{2\pi i(\cdot)}$ and $e_{q}(\cdot)$ for the
function $e^{2\pi i(\cdot)/q}$. We use boldface letters to denote vectors with
four components, for example $\mathbf{z}=(z_{1},\ldots,z_{4})$. For a vector
$\mathbf{v}$, we define $|\mathbf{v}|=\max_{1\leqslant i\leqslant 4}|v_{i}|$.
All implied constants will be allowed to depend on $\epsilon$, but nothing
else unless otherwise stated. Moreover, $\epsilon$ will denote a small
positive number which for convenience we allow to take different values at
different points in the argument.
Acknowledgements. The author is grateful to Tim Browning for suggesting this
project and for helpful feedback and guidance during the development of this
work.

##  2\. The Campana–Manin conjecture

In this section we recall from [pieropan2019campana, Section 3] the definition
of Campana points and the statement of the Campana–Manin conjecture. We
demonstrate that the set $\mathscr{T}$ removed in the definition of $N(B)$ is
a thin set of Campana points, and that the power of $B$ and $\log B$ in
Theorem 1.1 is consistent with the prediction from the Campana–Manin
conjecture.

######  Definition 2.1.

Let $F$ be a field. A Campana orbifold is a pair $(X,D)$, where $X$ is a
smooth variety over $F$ and

$D=\sum_{\alpha\in\mathscr{A}}\epsilon_{\alpha}D_{\alpha}$

is an effective Weil $\mathbb{Q}$-divisor of $X$ over $F$ (where the
$D_{\alpha}$ are prime divisors) such that

  1. (1)

For all $\alpha\in\mathscr{A}$, either $\epsilon_{\alpha}=1$ or
$\epsilon_{\alpha}$ takes the form $1-1/m_{\alpha}$ for some
$m_{\alpha}\in\mathbb{Z}_{\geqslant 2}$.

  2. (2)

The support $D_{\textrm{red}}=\sum_{\alpha\in\mathscr{A}}D_{\alpha}$ of $D$
has strict normal crossings on $X$.

We say that a Campana orbifold is klt if $\epsilon_{\alpha}\neq 1$ for all
$\alpha\in\mathscr{A}$.

Let $(X,D)$ be a Campana orbifold. Campana points will be defined as points
$P\in X(F)$ satisfying certain conditions. These conditions are dependent on a
finite set $S$ of places of $F$ containing all archimedean places, and a
choice of good integral model of $(X,D)$ over $\mathscr{O}_{F,S}$. This model
is defined to be a pair $(\mathscr{X},\mathscr{D})$, where $\mathscr{X}$ is a
flat, proper model of $X$ over $\mathscr{O}_{F,S}$, with $\mathscr{X}$
regular, and

$\mathscr{D}=\sum_{\alpha\in\mathscr{A}}\epsilon_{\alpha}\mathscr{D}_{\alpha},$

where $\mathscr{D}_{\alpha}$ denotes the Zariski closure of $D_{\alpha}$ in
$\mathscr{X}$.

######  Definition 2.2.

Let $P\in(X\backslash D_{\textrm{red}})(F)$. For a place $v\notin S$, let
$\mathscr{P}_{v}$ denote the induced point in $\mathscr{X}(\mathscr{O}_{v})$
obtained via the valuative criterion for properness as stated in
[hartshorne1977algebraic, Theorem II.4.7]. For $\alpha\in\mathscr{A}$, we
define the intersection multiplicity $n_{v}(\mathscr{D}_{\alpha},P)$ of
$\mathscr{D}_{\alpha}$ and $P$ at $v$ to be the colength of the ideal
$\mathscr{P}_{v}^{*}\mathscr{D}_{\alpha}$ in $\mathscr{O}_{v}$. Then the
intersection number of $P$ and $\mathscr{D}$ at $v$ is defined to be

$n_{v}(\mathscr{D},P)=\sum_{\alpha\in\mathscr{A}}\epsilon_{\alpha}n_{v}(\mathscr{D}_{\alpha},P).$

######  Definition 2.3.

Let $(X,D)$ be a Campana orbifold with a good integral model
$(\mathscr{X},\mathscr{D})$ over $\mathscr{O}_{F,S}$. A point
$P\in(X\backslash D_{\textrm{red}})(F)$ is a Campana $\mathscr{O}_{F,S}$-point
of $(\mathscr{X},\mathscr{D})$ if for all $v\notin S$ and all
$\alpha\in\mathscr{A}$, we have

  1. (1)

If $\epsilon_{\alpha}=1$, then $n_{v}(\mathscr{D}_{\alpha},P)=0$.

  2. (2)

If $\epsilon_{\alpha}\neq 1$, so that $\epsilon_{\alpha}=1-1/m_{\alpha}$ for
some $m_{\alpha}\in\mathbb{Z}_{\geqslant 2}$, then either
$n_{v}(\mathscr{D}_{\alpha},P)=0$ or $n_{v}(\mathscr{D}_{\alpha},P)\geqslant
m_{\alpha}$.

We denote the set of Campana $\mathscr{O}_{F,S}$-points of
$(\mathscr{X},\mathscr{D})$ by $(\mathscr{X},\mathscr{D})(\mathscr{O}_{F,S})$.

######  Example 2.4.

Campana points are related to $m$-full values of polynomials. We consider a
smooth projective variety $X\subseteq\mathbb{P}^{n}$ over $\mathbb{Q}$, and a
divisor

$D=\sum_{i=1}^{k}\left(1-\frac{1}{m_{i}}\right)D_{i},$ (2.1)

where $m_{i}\geqslant 2$ are integers, and $D_{i}$ are prime divisors on $X$
cut out by polynomial equations $f_{i}=0$. Choosing the obvious good integral
model $(\mathscr{X},\mathscr{D})$, a rational point
$z\in(X\backslash\bigcup_{i=1}^{k}D_{i})(\mathbb{Q})$, represented by
$(z_{0},\ldots,z_{n})\in\mathbb{Z}^{n+1}_{\textrm{prim}}$ is a Campana
$\mathbb{Z}$-point of $(\mathscr{X},\mathscr{D})$ if and only if
$f_{i}(z_{0},\ldots,z_{n})$ is $m_{i}$-full for all $i\in\\{0,\ldots,k\\}$.

######  Definition 2.5.

For an irreducible variety $X$ over $F$, a subset $A\subseteq X(F)$ is type I
if $A$ is a proper closed subvariety of $X$, and type II if it can be written
in the form $A=\varphi(V(F))$, where $V$ is an integral projective variety
with $\dim(V)=\dim(X)$ and $\varphi\colon V\rightarrow X$ is a generically
surjective morphism of degree at least 2. A thin set of $X(F)$ is a subset of
a finite union of type I and type II sets. In [pieropan2019campana, Definition
3.7], a thin set of Campana $\mathscr{O}_{F,S}$-points is defined to be the
intersection of a thin set of $X(F)$ with the set of Campana points
$(\mathscr{X},\mathscr{D})(\mathscr{O}_{F,S})$.

We now come to the statement of the Campana–Manin conjecture given in
[pieropan2019campana, Conjecture 1.1]. Let $K$ be a number field, and let
$(X,D)$ be a Campana orbifold over $K$ with a good integral model
$(\mathscr{X},\mathscr{D})$ over $\mathscr{O}_{K,S}$. Let
$(\mathscr{L},\|\cdot\|)$ be an adelically metrized big and nef line bundle on
$X$ and $[L]$ the associated divisor class. We let $H_{\mathscr{L}}\colon
X(K)\rightarrow\mathbb{R}_{\geqslant 0}$ denote the corresponding height
function, as defined in [peyre1995hauteurs, Section 1]. We recall that the
effective cone $\Lambda_{\operatorname{eff}}$ of a variety $X$ is defined as

$\Lambda_{\operatorname{eff}}=\\{[D]\in\operatorname{Pic}(X):[D]\geqslant
0\\}\otimes_{\mathbb{Z}}\mathbb{R}.$

######  Definition 2.6.

Let $[K_{X}]$ denote the canonical divisor class. Given the above data, we
define

$a=\inf\\{t\in\mathbb{R}:t[L]+[K_{X}]+[D]\in\Lambda_{\operatorname{eff}}\\},$

and we define $b$ to be the codimension of the minimal supported face of
$\Lambda_{\operatorname{eff}}$ which contains $a[L]+[K_{X}]+[D]$.

######  Conjecture 2.7 (Pieropan, Smeets, Tanimoto, Várilly-Alvarado).

Suppose that $(X,D)$ is a klt Campana orbifold, such that $-(K_{X}+D)$ is
ample (in this case we say that the orbifold is Fano). Assume that the set of
Campana points $(\mathscr{X},\mathscr{D})(\mathscr{O}_{K,S})$ is not itself
thin. Then there is a thin set $\mathscr{T}$ of Campana
$\mathscr{O}_{K,S}$-points such that

$\\#\\{P\in(\mathscr{X},\mathscr{D})(\mathscr{O}_{K,S})\backslash\mathscr{T}:H_{\mathscr{L}}(P)\leqslant
B\\}\sim cB^{a}(\log B)^{b-1},$

as $B\rightarrow\infty$, where $a,b$ are as in Definition 2.6, and $c>0$ is an
explicit constant described in [pieropan2019campana, Section 3.3].

######  Remark 2.8.

The hypothesis that the Campana points themselves are not thin is discussed by
Nakahara and Streeter in [samthincampana]. The authors establish in
[samthincampana, Theorem 1.1] a connection between thin sets of Campana points
and weak approximation, in the spirit of Serre’s arguments in
[serretopicsgalois, Theorem 3.5.7]. Combining this with [samthincampana,
Corollary 1.4], it can be shown that this hypothesis holds for the orbifold we
consider below.

We now put the counting problem $N(B)$ from (1.3) into the context of
Conjecture 2.7. The Campana orbifold under consideration is a special case of
Example (2.4). We consider the variety $X=\mathbb{P}^{2}$ over $\mathbb{Q}$.
Below we will use $z_{1},z_{2},z_{3}$ to denote a representative of the point
$[z_{1}:z_{2}:z_{3}]\in\mathbb{P}^{2}(\mathbb{Q})$ such that
$(z_{1},z_{2},z_{3})\in\mathbb{Z}^{3}_{\textrm{prim}}$. Let $D$ be the divisor
on $X$ given by

$D=\sum_{i=1}^{4}\frac{1}{2}D_{i},$

where

$D_{i}=\begin{cases}\\{z_{i}=0\\},&\textrm{if }1\leqslant i\leqslant 3,\\\
\\{z_{1}+z_{2}+z_{3}=0\\},&\textrm{if }i=4.\end{cases}$

The support of $D$ has strict normal crossings on $\mathbb{P}^{2}$, and so
$(\mathbb{P}^{2},D)$ is a Campana orbifold. Let $(\mathscr{X},\mathscr{D})$
denote the obvious smooth proper model of $(\mathbb{P}^{2},D)$ over
$\mathbb{Z}$. Here we have chosen the set of bad places $S$ to consist only of
the archimedean place $|\cdot|_{\infty}$.

Let $z\in(\mathbb{P}^{2}\backslash D_{\textrm{red}})(\mathbb{Q})$. The
intersection multiplicity of $z$ and $D_{i}$ at a prime $p$ is then the
$p$-adic valuation $\nu_{p}(z_{i})$, when $i\in\\{1,2,3\\}$, and
$\nu_{p}(z_{1}+z_{2}+z_{3})$ when $i=4$. The condition for a point
$z\in(X\backslash D_{\textrm{red}})(\mathbb{Q})$ to be Campana
$\mathbb{Z}$-point of $(\mathscr{X},\mathscr{D})$ is therefore that
$z_{1},z_{2},z_{3}$ and $z_{1}+z_{2}+z_{3}$ are all squareful.

For convenience we introduce a new variable $z_{4}$ which is defined by the
equation $z_{4}=z_{1}+z_{2}+z_{3}$. We choose the ample line bundle
$\mathscr{L}=\mathscr{O}_{\mathbb{P}^{2}}(1)$, and the generating set
$\\{z_{1},z_{2},z_{3},z_{4}\\}$ for the global sections of $\mathscr{L}$. This
choice of generating set gives rise to the height function

$\displaystyle H:\mathbb{P}^{2}$
$\displaystyle\rightarrow\mathbb{R}_{\geqslant 0}$ $\displaystyle
z=[z_{1}:z_{2}:z_{3}]$
$\displaystyle\mapsto\max(|z_{1}|,|z_{2}|,|z_{3}|,|z_{4}|).$

We note that $(z_{1},z_{2},z_{3})\in\mathbb{Z}^{3}_{\textrm{prim}}$ if and
only if $(z_{1},\ldots,z_{4})\in\mathbb{Z}^{4}_{\textrm{prim}}$. Therefore,
recalling the definition of $\mathscr{N}_{4}(B)$ from (1.1), there is a 2-1
map

$\begin{split}\varphi:\mathscr{N}_{4}(B)&\rightarrow\\{z\in(\mathbb{P}^{2},\mathscr{D})(\mathbb{Z}):H(z)\leqslant
B\\}\\\ (z_{1},\ldots,z_{4})&\mapsto[z_{1}:z_{2}:z_{3}].\end{split}$ (2.2)

We now compute the constants $a$ and $b$ from Conjecture 2.7 in this example.
We let $[L]$ denote the hyperplane class corresponding to the line bundle
$\mathscr{L}$, and $[K_{\mathbb{P}^{2}}]$ the canonical divisor class. We
recall that $\operatorname{Pic}\mathbb{P}^{2}\cong\mathbb{Z}$, with the
isomorphism given by the degree. We have $\deg([L])=1$,
$\deg([K_{\mathbb{P}^{2}}])=-3$ and $\deg([D])=4\cdot 1/2=2$. Therefore

$\displaystyle a$
$\displaystyle=\inf\\{t\in\mathbb{R}:t[L]+[K_{\mathbb{P}^{2}}]+[D]\in\Lambda_{\operatorname{eff}}\\}$
$\displaystyle=\inf\\{t\in\mathbb{R}:t-3+2\geqslant 0\\}$ $\displaystyle=1.$

The minimal supported face of $\Lambda_{\operatorname{eff}}$ which contains
$a[L]+[K_{\mathbb{P}^{2}}]+[D]=[0]$ is $\\{0\\}$, which has codimension one in
$\Lambda_{\operatorname{eff}}$, so $b=1$. Conjecture 2.7 therefore states that
there is a thin set of Campana points
$\mathscr{Z}\subseteq(\mathbb{P}^{2},\mathscr{D})(\mathbb{Z})$, such that

$\\#\\{P\in(\mathbb{P}^{2},\mathscr{D})(\mathbb{Z})\backslash\mathscr{Z}:H(P)\leqslant
B\\}=cB(1+o(1))$

for some constant $c>0$. Theorem 1.1 states that this result holds true when
$\mathscr{Z}=\varphi(\mathscr{T})$, where $\mathscr{T}$ is defined in (1.2),
except possibly for a different value for the leading constant. To conclude
this section, we show that $\varphi(\mathscr{T})$ is indeed thin.

######  Lemma 2.9.

Let $\mathscr{T}$ and $\varphi$ be defined as in (1.2) and (2.2) respectively.
Then $\varphi(\mathscr{T})\cap(\mathbb{P}^{2},\mathscr{D})(\mathbb{Z})$ is a
thin set of Campana points in $(\mathbb{P}^{2},\mathscr{D})(\mathbb{Z})$.

###### Proof.

It suffices to show that $\varphi(\mathscr{T})$ is a thin set in
$\mathbb{P}^{2}(\mathbb{Q})$. By abuse of notation we view $\mathscr{T}$ as a
subset of $\mathbb{P}^{3}(\mathbb{Q})$ via the map
$(z_{1},\ldots,z_{4})\mapsto[z_{1}:\cdots:z_{4}]$. We begin by showing that
$\mathscr{T}$ is a thin subset $\mathbb{P}^{3}(\mathbb{Q})$. Consider the
weighted projective space $\mathbb{P}_{\mathbb{Q}}(2,1,1,1,1)$ with variables
$t,z_{1},\ldots,z_{4}$ (we refer the reader to [hosgood2016introduction] for
the basic definitions pertaining to weighted projective spaces). We have an
embedding

$\displaystyle\nu:\mathbb{P}(2,1,1,1,1)$
$\displaystyle\hookrightarrow\mathbb{P}^{10}$
$\displaystyle[t:z_{1}:\cdots:z_{4}]$
$\displaystyle\mapsto[t:z_{1}^{2}:z_{1}z_{2}:\cdots:z_{4}^{2}],$

which on the $z_{i}$-variables is the Veronese embedding of degree 2. The
polynomial $f(t,z_{1},\ldots,z_{4})=t^{2}-z_{1}z_{2}z_{3}z_{4}$ is weighted
homogeneous of degree $4$, and so defines a subvariety $V$ of
$\mathbb{P}(2,1,1,1,1)$. Let $Y$ denote the image of $\nu$ and write
$t,y_{11},\ldots,y_{44}$ for variables on $\mathbb{P}^{10}$. Then $\nu(V)$ is
a hypersurface of $Y$ defined by the equation $t^{2}=y_{12}y_{34}$. From this
we see that $V$ is integral, projective and of dimension 3.

Consider the morphism $\pi:V\rightarrow\mathbb{P}^{3}$ defined by
$[t:z_{1}:\cdots z_{4}]\rightarrow[z_{1}:\cdots:z_{4}]$. This is étale of
degree 2 on the open subset $V^{\prime}$ of $V$ defined by $z_{1}\cdots
z_{4}\neq 0$. The set $W\subseteq\mathbb{P}^{3}({\mathbb{Q}})$ defined by the
equation $z_{1}\cdots z_{4}=0$ is a type I thin set, and
$\mathscr{T}=\pi(V^{\prime}(\mathbb{Q}))\cup W$, so we deduce that
$\mathscr{T}$ is thin in $\mathbb{P}^{3}_{\mathbb{Q}}$.

We can now show that $\varphi(\mathscr{T})$ is thin in
$\mathbb{P}^{2}_{\mathbb{Q}}$. To do this, we intersect
$\mathbb{P}^{3},V^{\prime}$ and $W$ with the hyperplane $H$ defined by the
equation $z_{1}+z_{2}+z_{3}=z_{4}$. The map $\pi$ is ramified along the set
$W$, which is a union of hyperplanes $H_{i}$ given by $\\{z_{i}=0\\}$. Since
the intersection of $H$ with the $H_{i}$ is smooth and transversal, it follows
from [serre1989lectures, Section 9.4] that $\pi((V^{\prime}(\mathbb{Q})\cap
H(\mathbb{Q}))\cup(W\cap H(\mathbb{Q}))$ is thin in $H(\mathbb{Q})$. The image
of this set under the obvious isomorphism $H\cong\mathbb{P}^{2}$ sending
$[z_{1}:\cdots:z_{4}]$ to $[z_{1}:z_{2}:z_{3}]$ is precisely
$\varphi(\mathscr{T})$, so we conclude that $\varphi(\mathscr{T})$ is a thin
set in $\mathbb{P}^{2}_{\mathbb{Q}}$. ∎

##  3\. Dealing with the large coefficients

Given a nonzero squareful number $z_{i}$, we let $x_{i},y_{i}$ denote the
unique integers such that $x_{i}\in\mathbb{N}$, $y_{i}$ is square-free, and
$z_{i}=y_{i}^{3}x_{i}^{2}$. We will also use the notation $Y=y_{1}\cdots
y_{4}$. For $B,D\geqslant 1$, we define

$\displaystyle M(B,D)$
$\displaystyle=\\#\left\\{\mathbf{z}\in(\mathbb{Z}_{\neq
0})^{4}_{\textrm{prim}}:\begin{tabular}[]{l}$\sum_{i=1}^{4}z_{i}=0,z_{i}\textrm{
squareful for all }i,$\\\ $|\mathbf{z}|\leqslant B,|Y|\geqslant D$\\\
\end{tabular}\right\\}.$

The aim of this section is to prove the following upper bound.

######  Proposition 3.1.

We have $M(B,D)=O(B^{1+\epsilon}D^{-1/12})$.

The key result in the proof of Proposition 3.1 is the following upper bound
for the quantity

$\displaystyle N(\mathbf{X},\mathbf{Y})$
$\displaystyle=\\#\left\\{\mathbf{x},\mathbf{y}\in(\mathbb{Z}_{\neq
0})^{4}:\begin{tabular}[]{l}$y_{1},\ldots,y_{4}\textrm{ square-
free,}\sum_{i=1}^{4}x_{i}^{2}y_{i}^{3}=0,$\\\ $|x_{i}|\leqslant
X_{i},|y_{i}|\leqslant Y_{i}\textrm{ for all }i$\\\ \end{tabular}\right\\}.$

######  Proposition 3.2.

We have

$N(\mathbf{X},\mathbf{Y})=O((X_{1}\cdots X_{4})^{1/2+\epsilon}(Y_{1}\cdots
Y_{4})^{2/3+\epsilon}).$

We explain how to deduce Proposition 3.1 from Proposition 3.2. We define

$\displaystyle M_{1}(B;\mathbf{R})$
$\displaystyle=\\#\left\\{\mathbf{z}\in(\mathbb{Z}_{\neq
0})^{4}:\begin{tabular}[]{l}$\sum_{i=1}^{4}z_{i}=0,z_{i}\textrm{ squareful for
all }i,$\\\ $|z_{i}|\leqslant B,R_{i}\leqslant|y_{i}|<2R_{i}\textrm{ for all
}i$\\\ \end{tabular}\right\\}.$

Then

$M(B,D)\ll\sum_{\begin{subarray}{c}\mathbf{R}\textrm{ dyadic }\\\ R_{1}\cdots
R_{4}\geqslant D\end{subarray}}M_{1}(B;\mathbf{R}),$ (3.1)

We observe that the conditions $|\mathbf{z}|\leqslant B$ and
$R_{i}\leqslant|y_{i}|$ imply that $|x_{i}|^{2}\leqslant B/R_{i}^{3}$.
Consequently,

$M_{1}(B;\mathbf{R})\leqslant
N\left(\left(\sqrt{\frac{B}{R_{1}^{3}}},\ldots,\sqrt{\frac{B}{R_{4}^{3}}}\right),\left(2R_{1},\ldots,2R_{4}\right)\right).$

Applying Proposition 3.2, we obtain

$M_{1}(B;\mathbf{R})\ll B^{1+\epsilon}(R_{1}\cdots R_{4})^{-1/12}.$

We conclude from (3.1) that

$\displaystyle M(B,D)$ $\displaystyle\ll
B^{1+\epsilon}\sum_{\begin{subarray}{c}\mathbf{R}\textrm{ dyadic }\\\
R_{1}\cdots R_{4}\geqslant D\end{subarray}}(R_{1}\cdots R_{4})^{-1/12}\ll
B^{1+\epsilon}D^{-1/12},$

as claimed in Proposition 3.1.

###### Proof of Proposition 3.2.

For $k\ \in\\{1,\ldots,4\\}$, we define

$S_{k}(\alpha)=\sum_{\begin{subarray}{c}x_{k}\in\mathbb{Z}_{\neq 0}\\\
|x_{k}|\leqslant
X_{k}\end{subarray}}\sum_{\begin{subarray}{c}y_{k}\in\mathbb{Z}_{\neq 0}\\\
|y_{k}|\leqslant Y_{k}\\\ y_{k}\textrm{ square-
free}\end{subarray}}e(x_{k}^{2}y_{k}^{3}).$

Then

$N(\mathbf{X},\mathbf{Y})=\int_{0}^{1}\prod_{k=1}^{4}S_{k}(\alpha)\mathrm{d}\alpha.$

By Hölder’s inequality, we have

$N(\mathbf{X},\mathbf{Y})\leqslant\left(\prod_{k=1}^{4}\int_{0}^{1}|S_{k}(\alpha)|^{4}\mathrm{d}\alpha\right)^{1/4}.$
(3.2)

We fix $k\in\\{1,\ldots,4\\}$, and to ease notation we write
$X_{k}=X,Y_{k}=Y$. Then

$\int_{0}^{1}|S_{k}(\alpha)|^{4}\mathrm{d}\alpha=N(X,Y),$ (3.3)

where

$N(X,Y)=\\#\left\\{\mathbf{x},\mathbf{y}\in(\mathbb{Z}_{\neq
0})^{4}:\begin{tabular}[]{l}$y_{1},\ldots,y_{4}\textrm{ square-free, }$\\\
$x_{1}^{2}y_{1}^{3}+x_{2}^{2}y_{2}^{3}=x_{3}^{2}y_{3}^{3}+x_{4}^{2}y_{4}^{3}$\\\
$|\mathbf{x}|\leqslant X,|\mathbf{y}|\leqslant Y$\end{tabular}\right\\}.\\\ $

In view of (3.2), the task now is to show that

$N(X,Y)=O(X^{2+\epsilon}Y^{8/3+\epsilon}).$ (3.4)

Throughout the remainder of the argument, we make repeated use of the trivial
estimate for the divisor function, namely that the number of divisors of a
positive integer $d$ is $O(d^{\epsilon})$.

We begin by considering the trivial cases $x_{i}=\pm x_{j}$ for some $i\neq
j$. Without loss of generality, suppose $i=1,j=2$. We obtain

$x_{1}^{2}(y_{1}^{3}+y_{2}^{3})=-(x_{3}^{2}y_{3}^{3}+x_{4}^{2}y_{4}^{3}).$
(3.5)

If both sides of (3.5) are zero, then $y_{1}=-y_{2}$, since we are assuming
$x_{1}\neq 0$. Hence there are $O(XY)$ choices for $x_{1},y_{1},y_{2}$. On the
right hand side, since $y_{3},y_{4}$ are square-free, it follows that
$x_{3}=x_{4}$ and $y_{3}=-y_{4}$, hence there are $O(XY)$ choices for
$x_{3},x_{4},y_{3},y_{4}$. This gives a total of $O(X^{2}Y^{2})$ solutions. If
both sides of the equation are nonzero, then there are $O(X^{2}Y^{2})$ choices
for $x_{3},x_{4},y_{3},y_{4}$, and for any such choice, there are
$O(X^{\epsilon}Y^{\epsilon})$ choices for $x_{1},y_{1},y_{2}$ by the trivial
estimate for the divisor function. Overall, in the case $x_{i}=\pm x_{j}$, we
conclude that there are $O(X^{2+\epsilon}Y^{2+\epsilon})$ solutions, which is
satisfactory for establishing (3.4). From now on we assume $x_{i}\neq\pm
x_{j}$ for all $i\neq j$.

Returning to the integral representation of $N(X,Y)$ from (3.3), we can apply
the Cauchy–Schwarz inequality in two different ways to $|S_{k}(\alpha)|^{2}$.
This gives the inequalities

$\displaystyle|S_{k}(\alpha)|^{2}\leqslant X\sum_{|x|\leqslant
X}\sum_{\begin{subarray}{c}|y_{1}|,|y_{2}|\leqslant Y\\\ y_{1},y_{2}\textrm{
square-free }\end{subarray}}e(\alpha x^{2}(y_{1}^{3}-y_{2}^{3})),$
$\displaystyle|S_{k}(\alpha)|^{2}\leqslant
Y\sum_{\begin{subarray}{c}|y|\leqslant Y\\\ y\textrm{ square-free
}\end{subarray}}\sum_{|x_{1}|,|x_{2}|\leqslant X}e(\alpha
y^{3}(x_{1}^{2}-x_{2}^{2})).$

Applying these inequalities once each to $|S_{k}(\alpha)|^{4}$, we obtain

$N(X,Y)\leqslant XYL^{\prime}(X,Y),$ (3.6)

where

$\displaystyle L^{\prime}(X,Y)$
$\displaystyle=\\#\left\\{\begin{tabular}[]{l}$(x,x_{1},x_{2},y,y_{1},y_{2})\in(\mathbb{Z}_{\neq
0})^{6}:$\\\ $|x|,|x_{1}|,|x_{2}|\leqslant X,$\\\
$|y|,|y_{1}|,|y_{2}|\leqslant Y\textrm{ and }y,y_{1},y_{2}\textrm{ square-
free, }$\\\
$x^{2}(y_{1}^{3}-y_{2}^{3})=y^{3}(x_{1}^{2}-x_{2}^{2}).$\end{tabular}\right\\}.$

It will be convenient to work with the quantity $L(X,Y)$ defined to be
$L^{\prime}(X,Y)$ but with the additional assumption $U/2<|x|\leqslant U$,
which we denote by $|x|\sim U$. We will then perform a sum over dyadic
intervals for $U\leqslant 2X$ at the end of the argument. We also need to
extract from $L(X,Y)$ the greatest common divisor $k=\gcd(x,y)$. Note that
since $y$ is square-free, so is $k$. Hence

$L(X,Y)=\sum_{k\leqslant\min(U,Y)}\mu^{2}(k)L_{k}(X,Y),$

where

$\displaystyle L_{k}(X,Y)$
$\displaystyle=\\#\left\\{\begin{tabular}[]{l}$(x,x_{1},x_{2},y,y_{1},y_{2})\in(\mathbb{Z}_{\neq
0})^{6}:$\\\ $|x|\sim U/k,|x_{1}|,|x_{2}|\leqslant X,$\\\ $|y|\leqslant
Y/k,|y_{1}|,|y_{2}|\leqslant Y,\textrm{ and }y,y_{1},y_{2}\textrm{ square-
free, }$\\\ $(x,y)=1,$\\\
$x^{2}(y_{1}^{3}-y_{2}^{3})=ky^{3}(x_{1}^{2}-x_{2}^{2}).$\end{tabular}\right\\}.$

We now obtain two different estimates for $L_{k}(X,Y)$, depending on the size
of $k$. Our first estimate is suitable for large values of $k$.

We have $ky^{3}(x_{1}^{2}-x_{2}^{2})\neq 0$, since $y\neq 0$, and the cases
$x_{1}=\pm x_{2}$ have already been dealt with above. Consequently, for any
fixed $x,y_{1},y_{2},k$, there are $O((XY)^{\epsilon})$ choices for
$y,x_{1},x_{2}$ such that
$x^{2}(y_{1}^{3}-y_{2}^{3})=ky^{3}(x_{1}^{2}-x_{2}^{2})$, by the trivial
estimate for the divisor function. Therefore

$L_{k}(X,Y)\ll(XY)^{\epsilon}A(k),$ (3.7)

where

$A(k)=\\#\\{|x|\sim U/k,|y_{1}|,|y_{2}|\leqslant
Y:k|x^{2}(y_{1}^{3}-y_{2}^{3})\\}.$

Now $k|x^{2}(y_{1}^{3}-y_{2}^{3})$ implies that there exists integers $d,r$
with $dr=k$, such that $d|x^{2}$ and $r|(y_{1}^{3}-y_{2}^{3})$. Observe that
since $k$ is square-free, $d|x^{2}$ if and only if $d|x$. Defining

$\displaystyle N(r)$ $\displaystyle=\\#\\{y_{1},y_{2}\leqslant
Y:r|(y_{1}^{3}-y_{2}^{3})\\},$

we therefore have

$\displaystyle A(k)$ $\displaystyle\leqslant\sum_{\begin{subarray}{c}d,r\\\
dr=k\end{subarray}}\sum_{\begin{subarray}{c}|x|\sim U/k\\\
d|x\end{subarray}}N(r)\ll U\sum_{\begin{subarray}{c}d,r\\\
dr=k\end{subarray}}\frac{N(r)}{dk}.$ (3.8)

Note that $r\leqslant k\leqslant Y$, so $N(r)\ll Y^{2}\varrho(r)/r^{2}$, where
we have defined

$\varrho(r)=\\#\\{\eta_{1},\eta_{2}\ (\mathrm{mod}\
r):\eta_{1}^{3}\equiv\eta_{2}^{3}\\}.$

It is easy to see that $\varrho(r)\ll r^{1+\epsilon}$. Indeed, for a prime $p$
and a fixed $\eta_{1}\ (\mathrm{mod}\ p)$, there are at most $3$ choices for
$\eta_{2}\ (\mathrm{mod}\ p)$ such that $\eta_{1}^{3}\equiv\eta_{2}^{3}\
(\mathrm{mod}\ p)$, and so $\varrho(p)\leqslant 3p$. Since $r$ is square-free
and $\varrho$ is multiplicative, it follows from the Chinese Remainder theorem
that

$\varrho(r)=\prod_{p|r}\varrho(p)\leqslant\prod_{p|r}3p\ll r^{1+\epsilon}.$

Applying this bound on $\varrho(r)$, we conclude that $N(r)\ll
Y^{2}/r^{1-\epsilon}\ll Y^{2+\epsilon}/r$, and hence from (3.7) and (3.8) we
obtain

$\displaystyle L_{k}(X,Y)$
$\displaystyle\ll\frac{(XY)^{\epsilon}U}{k}\sum_{\begin{subarray}{c}d,r\\\
dr=k\end{subarray}}\frac{Y^{2+\epsilon}}{dr}\ll\frac{X^{\epsilon}Y^{2+\epsilon}U}{k^{2}}.$
(3.9)

We now find a different estimate for when $k$ is small. If $(x,y)=1$ and
$x^{2}(y_{1}^{3}-y_{2}^{3})=ky^{3}(x_{1}^{2}-x_{2}^{2})$, then
$x^{2}|k(x_{1}^{2}-x_{2}^{2})$, so we may define the integer
$u=k(x_{1}^{2}-x_{2}^{2})/x^{2}$. Note $u\neq 0$ by the assumption
$x_{1}\neq\pm x_{2}$. We have $u\ll kX^{2}/(U/k)^{2}=k^{3}X^{2}/U^{2}$.
Therefore

$L_{k}(X,Y)\ll\sum_{u\ll\frac{k^{3}X^{2}}{U^{2}}}\sum_{\begin{subarray}{c}|x|\sim
U/k\\\ |x_{1}|,|x_{2}|\leqslant X\\\
k(x_{1}^{2}-x_{2}^{2})=ux^{2}\end{subarray}}\sum_{\begin{subarray}{c}|y|\leqslant
Y/k\\\ |y_{1}|,|y_{2}|\leqslant Y\\\
uy^{3}=y_{1}^{3}-y_{2}^{3}\end{subarray}}1.$ (3.10)

For a fixed $n=uy^{3}$, there are $O(Y^{\epsilon})$ solutions $y_{1},y_{2}$ to
$y_{1}^{3}-y_{2}^{3}=n$, using the trivial estimate for the divisor function,
and so the inner sum of (3.10) is $O(Y^{1+\epsilon}/k)$. Similarly, for a
given $|x|\sim U/k$, there are $O(X^{\epsilon})$ choices for $x_{1},x_{2}$ in
the middle sum. Hence

$L_{k}(X,Y)\ll(XY)^{\epsilon}\sum_{u\ll\frac{k^{3}X^{2}}{U^{2}}}\frac{UY}{k^{2}}\ll\frac{kX^{2+\epsilon}Y^{1+\epsilon}}{U}.$

Combining this with the estimate in (3.9), we obtain

$\displaystyle L_{k}(X,Y)$ $\displaystyle\ll
X^{\epsilon}Y^{1+\epsilon}\min\left(\frac{UY}{k^{2}},\frac{kX^{2}}{U}\right)$
$\displaystyle\leqslant
X^{\epsilon}Y^{1+\epsilon}\left(\frac{UY}{k^{2}}\right)^{2/3}\left(\frac{kX^{2}}{U}\right)^{1/3}$
$\displaystyle=\frac{X^{2/3+\epsilon}Y^{5/3+\epsilon}U^{1/3}}{k}.$

Finally, we take a sum over $k\leqslant Y$ and dyadic intervals $U\leqslant
2X$ to obtain

$\displaystyle L(X,Y)$ $\displaystyle\ll
X^{2/3+\epsilon}Y^{5/3+\epsilon}\sum_{\begin{subarray}{c}U\,\rm{dyadic}\\\
U\leqslant 2X\end{subarray}}\sum_{k\leqslant Y}\frac{U^{1/3}}{k}$
$\displaystyle\ll X^{1+\epsilon}Y^{5/3+\epsilon}.$

Recalling (3.6), we have established (3.4), which from (3.2) gives the
required bound for $N(\mathbf{X},\mathbf{Y})$. ∎

##  4\. The circle method

In this section, we will use the circle method from [MR1421949] to count zeros
of diagonal quadratic forms in four variables, the main goal being the proof
of Theorem 1.3. Before proceeding with the proof, we collect together some of
the notation which we will use throughout this section. Much of the notation
depends on a vector $\mathbf{a}=(a_{1},\ldots,a_{4})\in(\mathbb{Z}_{\neq
0})^{4}$, which remains fixed throughout this section.

  * •

$F_{\mathbf{a}}(\mathbf{x})$ denotes the quadratic form
$\sum_{i=1}^{4}a_{i}x_{i}^{2}.$

  * •

$\mathbf{P}=(P_{1},\ldots,P_{4})$, where $P_{i}=\sqrt{\frac{B}{|a_{i}|}}$ for
$i\in\\{1,\ldots,4\\}$.

  * •

$N_{\mathbf{a}}(B)=\\#\left\\{\mathbf{x}\in(\mathbb{Z}_{\neq
0})^{4}:F_{\mathbf{a}}(\mathbf{x})=0,|x_{i}|\leqslant P_{i}\right\\}$, as
defined in (1.6).

  * •

$A=a_{1}\cdots a_{4}$.

  * •

$\Delta=\Delta(\mathbf{a})=\prod_{i=1}^{4}\gcd\left(a_{i},\prod_{j\neq
i}a_{j}\right)$.

  * •

$\boldsymbol{\epsilon}=(\epsilon_{1},\ldots,\epsilon_{4})\in\\{\pm 1\\}^{4}$,
where $\epsilon_{i}=\operatorname{sgn}(a_{i})=a_{i}/|a_{i}|$ is the sign of
$a_{i}$.

  * •

$G(\mathbf{x})$ is the quadratic form
$\sum_{i=1}^{4}\epsilon_{i}x_{i}^{2}=F_{\boldsymbol{\epsilon}}(\mathbf{x})$.

  * •

$\eta\in(0,1/4)$ is a small real parameter depending only on $\mathbf{a}$ and
$B$.

  * •

$w:\mathbb{R}^{4}\rightarrow\mathbb{R}_{\geqslant 0}$ is an infinitely
differentiable smooth weight function, which has compact support and satisfies
$w(\mathbf{x})=0$ for all $|\mathbf{x}|\leqslant\eta$.

  * •

$w_{1},w_{2}$ are particular choices of such a smooth weight function, defined
explicitly in (4.7).

  * •

$Q=B^{1/2}$, and for a positive integer $q$, we write $r=q/Q$.

  * •

$\mathbf{c}$ denotes a vector in $\mathbb{Z}^{4}$, and we define
$\mathbf{v}=(v_{1},\ldots,v_{4})$ by $v_{i}=q^{-1}P_{i}c_{i}$.

  * •

$C_{i}=\eta^{-1}B^{\epsilon}|a_{i}|^{1/2}$ for $i\in\\{1,\ldots,4\\}.$

######  Definition 4.1.

The singular integral $\sigma_{\infty}(\boldsymbol{\epsilon})$ and the
singular series $\mathfrak{G}_{\mathbf{a}}$ associated to $F_{\mathbf{a}}$ are
given respectively by the equations

$\displaystyle\sigma_{\infty}(\boldsymbol{\epsilon})$
$\displaystyle=\int_{-\infty}^{\infty}\int_{[-1,1]^{4}}e(-\theta
G(\mathbf{x}))\,\mathrm{d}\mathbf{x}\,\mathrm{d}\theta,$ (4.1)
$\displaystyle\mathfrak{G}_{\mathbf{a}}$
$\displaystyle=\sum_{q=1}^{\infty}q^{-4}\sum_{\begin{subarray}{c}k\bmod{q}\\\
\gcd(k,q)=1\end{subarray}}\sum_{\mathbf{b}\bmod{q}}e_{q}(kF_{\mathbf{a}}(\mathbf{b})).$
(4.2)

For convenience we record again here the statement of Theorem 1.3.

######  Theorem 4.2.

Let $\mathbf{a}\in(\mathbb{Z}_{\neq 0})^{4}$ be such that $A\neq\square$ and
$|A|\leqslant B^{4/7}$. Then

$N_{\mathbf{a}}(B)=\frac{\mathfrak{G}_{\mathbf{a}}\sigma_{\infty}(\boldsymbol{\epsilon})B}{|A|^{1/2}}+O\left(\frac{B^{41/42+\epsilon}\Delta^{1/3}}{|A|^{11/24}}\right).$
(4.3)

The circle method from [MR1421949] uses of smooth weight functions
$w:\mathbb{R}^{4}\rightarrow\mathbb{R}_{\geqslant 0}$, which we will take to
approximate the characteristic function on $[-1,1]^{4}$. We introduce a
smoothly weighted version of $N_{\mathbf{a}}(B)$ given by

$N_{w,\mathbf{a}}(B)=\sum_{\begin{subarray}{c}\mathbf{x}\in(\mathbb{Z}_{\neq
0})^{4}\\\
F_{\mathbf{a}}(\mathbf{x})=0\end{subarray}}w(P_{1}^{-1}x_{1},\ldots,P_{4}^{-1}x_{4}).$
(4.4)

We also introduce a weighted singular integral

$\sigma_{\infty}(w)=\int_{-\infty}^{\infty}\int_{\mathbb{R}^{4}}w(\mathbf{x})e(-\theta
G(\mathbf{x}))\,\mathrm{d}\mathbf{x}\,\mathrm{d}\theta.\\\ $ (4.5)

We will need to assume that $w$ is infinitely differentiable, has compact
support, and vanishes in a neighborhood of the origin
($w(\mathbf{x})=0\textrm{ for }|\mathbf{x}|\leqslant\eta$). Whilst the
arguments in this section can be applied for any such choice of $w$, with
implied constants depending on $w$, in order to get the power saving stated in
Theorem 1.1, we will need to keep track of the dependence on $w$ in our
estimates. Therefore, for a given $\eta>0$, we fix a particular choice of
smooth weight functions
$w_{1},w_{2}:\mathbb{R}^{4}\rightarrow\mathbb{R}_{\geqslant 0}$. We recall the
standard bump function $\psi:\mathbb{R}^{4}\rightarrow\mathbb{R}_{\geqslant
0}$ is defined by

$\psi(\mathbf{x})=\begin{cases}\exp(-(1-|\mathbf{x}|^{2})^{-1}),&\textrm{ if
}|\mathbf{x}|<1,\\\ 0,&\textrm{ otherwise.}\end{cases}$ (4.6)

We then define $w_{1},w_{2}$ to be

$\begin{split}w_{1}(\mathbf{x})&=\begin{cases}0,&\mbox{if
}|\mathbf{x}|\leqslant\eta,\\\
e\psi\left(\frac{|\mathbf{x}|}{\eta}-2\right),&\mbox{if
}\eta<|\mathbf{x}|\leqslant 2\eta,\\\ 1,&\mbox{if }2\eta<|\mathbf{x}|\leqslant
1-\eta,\\\
e\psi\left(\frac{|\mathbf{x}|}{\eta}-\frac{1-\eta}{\eta}\right),&\mbox{if
}1-\eta<|\mathbf{x}|\leqslant 1,\\\ 0,&\mbox{if }|\mathbf{x}|>1,\end{cases}\\\
\\\ w_{2}(\mathbf{x})&=\begin{cases}0,&\mbox{if }|\mathbf{x}|\leqslant\eta,\\\
e\psi\left(\frac{|\mathbf{x}|}{\eta}-2\right),&\mbox{if
}\eta<|\mathbf{x}|\leqslant 2\eta,\\\ 1,&\mbox{if }2\eta<|\mathbf{x}|\leqslant
1,\\\ e\psi\left(\frac{|\mathbf{x}|}{\eta}-\frac{1}{\eta}\right),&\mbox{if
}1<|\mathbf{x}|\leqslant 1+\eta,\\\ 0,&\mbox{if
}|\mathbf{x}|>1+\eta.\end{cases}\end{split}$ (4.7)

For any integers $j_{1},\ldots,j_{4}\geqslant 0$ with
$j_{1}+\cdots+j_{4}\leqslant N$, and for any $i\in\\{1,2\\}$, we have

$\frac{\partial^{j_{1}+\cdots+j_{4}}}{\partial x_{1}^{j_{1}}\cdots\partial
x_{4}^{j_{4}}}w_{i}(\mathbf{x})\ll_{N}\eta^{-N}.$ (4.8)

We now state a smoothly weighted version of Theorem 4.2.

######  Theorem 4.3.

Suppose $\eta\in(0,1/4)$ and $\mathbf{a}\in(\mathbb{Z}_{\neq 0})^{4}$. Let $w$
be one of the weights $w_{1}$ or $w_{2}$ from (4.7). Suppose that
$A\neq\square$. Then

$\begin{split}N_{w,\mathbf{a}}(B)&=\frac{\mathfrak{G}_{\mathbf{a}}\sigma_{\infty}(w)B}{|A|^{1/2}}+O\left(\frac{\eta^{-6}B^{5/6+\epsilon}\Delta^{1/3}}{|A|^{5/24}}\right)+O(\eta^{-7}B^{1/2+\epsilon}).\end{split}$
(4.9)

We explain how Theorem 4.2 can be deduced from Theorem 4.3 by applying the
methods from [BHBquadricsurfaces, Section 5.3] and [MR3944106, Section 2.4],
together with the upper bound
$\mathfrak{G}_{\mathbf{a}}\ll|A|^{\epsilon}\Delta^{1/4}$ for the singular
series, which we prove in Lemma 4.15 at the end of this section.

Let $1_{[-1,1]^{4}}$ denote the characteristic function on $[-1,1]^{4}$, and
for an integer $j\geqslant 0$, define
$w_{2}^{(j)}(\mathbf{x})=w_{2}((2\eta)^{-j}\mathbf{x})$. Then for any
$\mathbf{x}\in\mathbb{R}^{4}$, we have

$w_{1}(\mathbf{x})\leqslant
1_{[-1,1]^{4}}(\mathbf{x})\leqslant\sum_{j=0}^{\infty}w_{2}^{(j)}(\mathbf{x}),$

and consequently,

$N_{w_{1},\mathbf{a}}(B)\leqslant
N_{\mathbf{a}}(B)\leqslant\sum_{j=0}^{\infty}N_{w_{2}^{(j)},\mathbf{a}}(B)=\sum_{j=0}^{\infty}N_{w_{2},\mathbf{a}}((2\eta)^{j}B).$

The assumption $|A|\leqslant B^{4/7}$ in the statement of Theorem 4.2 implies
that the error term $\eta^{-7}B^{1/2+\epsilon}$ is dominated by the other
error term in (4.9), provided that $\eta\gg B^{-5/14+\epsilon}$. For any
$\eta\in(0,1/4)$ satisfying this condition, it follows from Theorem 4.3 that

$\sum_{j=0}^{\infty}N_{w_{2},\mathbf{a}}((2\eta)^{j}B)=\frac{(1+O(\eta))\mathfrak{G}_{\mathbf{a}}\sigma_{\infty}(w_{2})B}{|A|^{1/2}}+O\left(\frac{\eta^{-6}B^{5/6+\epsilon}\Delta^{1/3}}{|A|^{5/24}}\right).$

As explained in [MR3944106, Lemma 2.9], for $i\in\\{1,2\\}$, we have

$|\sigma_{\infty}(w_{i})-\sigma_{\infty}(\boldsymbol{\epsilon})|\ll\eta\sigma_{\infty}(\boldsymbol{\epsilon})\ll\eta,$

from which we deduce that

$N_{\mathbf{a}}(B)=\frac{(1+O(\eta))\mathfrak{G}_{\mathbf{a}}\sigma_{\infty}(\boldsymbol{\epsilon})B}{|A|^{1/2}}+O\left(\frac{\eta^{-6}B^{5/6+\epsilon}\Delta^{1/3}}{|A|^{5/24}}\right).$

We choose

$\eta=\frac{1}{5}B^{-1/42}|A|^{1/24}.$

Clearly $\eta\gg B^{-5/14+\epsilon}$. Moreover, using the assumption
$|A|\leqslant B^{4/7}$, we have that $\eta\in(0,1/4)$, as was required in
order to apply Theorem 4.3. Theorem 4.2 now follows from the estimate
$\mathfrak{G}_{\mathbf{a}}\ll|A|^{\epsilon}\Delta^{1/4}$ found in Lemma 4.15.

We commence with the proof of Theorem 4.3. It will be convenient to make the
assumptions

$\eta^{-1},|\mathbf{a}|\ll B^{R}$ (4.10)

for some fixed $R\geqslant 0$, so that quantities bounded by an arbitrarily
small power of $\eta^{-1}$ or $|A|$ are also $\ll B^{\epsilon}$ for any
$\epsilon>0$. If these assumptions do not hold, then the statement of Theorem
4.3 is trivial. Employing the machinery from [MR1421949, Theorem 2], we have

$N_{w,\mathbf{a}}(B)=\frac{C_{Q}}{Q^{2}}\sum_{\mathbf{c}\in\mathbb{Z}^{4}}\sum_{q=1}^{\infty}q^{-4}S_{q,\mathbf{a}}(\mathbf{c})I_{q,\mathbf{a}}(\mathbf{c}),$
(4.11)

where $C_{Q}=1+O_{N}(Q^{-N})$, and $Q=B^{1/2}$. Here
$I_{q,\mathbf{a}}(\mathbf{c})$ and $S_{q,\mathbf{a}}(\mathbf{c})$ are
exponential sums and integrals defined analogously to [MR1421949], via

$\begin{split}S_{q,\mathbf{a}}(\mathbf{c})&=\sum_{\begin{subarray}{c}k\bmod
q\\\ \gcd(k,q)=1\end{subarray}}\sum_{\mathbf{b}\bmod
q}e_{q}(kF_{\mathbf{a}}(\mathbf{b})+\mathbf{b}\cdot\mathbf{c}),\\\
I_{q,\mathbf{a}}(\mathbf{c})&=\int_{\mathbb{R}^{4}}w(P_{1}^{-1}x_{1},\ldots,P_{4}^{-1}x_{4})h\left(\frac{q}{Q},\frac{F_{\mathbf{a}}(\mathbf{x})}{Q^{2}}\right)e_{q}(-\mathbf{c}\cdot\mathbf{x})\,\mathrm{d}\mathbf{x}.\end{split}$
(4.12)

The smooth function $h:(0,\infty)\times\mathbb{R}\rightarrow\mathbb{R}$ is as
defined in [MR1421949, Section 3] and is given by

$h(x,y)=\sum_{j=1}^{\infty}(xj)^{-1}\left(u(xj)-u(|y|/xj)\right),$ (4.13)

where $u=c\psi(4x-3)$ is a linear transformation of the standard bump function
(the one-dimensional analogue of (4.6)), scaled by a constant $c$ so that its
integral over $\mathbb{R}$ is equal to 1. As observed in [MR1421949, Section
3], it is straightforward to check from (4.13) that $h(x,y)\ll x^{-1}$ and
$h(x,y)=0$ whenever $x>\max(1,2|y|)$.

We note that by changing variables $P_{i}^{-1}x_{i}$ into $x_{i}$, we can
rewrite $I_{q,\mathbf{a}}(\mathbf{c})$ as

$\displaystyle I_{q,\mathbf{a}}(\mathbf{c})$ $\displaystyle=P_{1}\cdots
P_{4}\int_{\mathbb{R}^{4}}w(\mathbf{x})h\left(\frac{q}{Q},\frac{F_{\mathbf{a}}(P_{1}x_{1},\ldots,P_{4}x_{4})}{Q^{2}}\right)e(-\mathbf{v}\cdot\mathbf{x})\mathrm{d}\mathbf{x}$
$\displaystyle=P_{1}\cdots
P_{4}\int_{\mathbb{R}^{4}}w(\mathbf{x})h(r,G(\mathbf{x}))e(-\mathbf{v}\cdot\mathbf{x})\mathrm{d}\mathbf{x}.$
(4.14)

###  4.1. The main term

The main term for $N_{w,\mathbf{a}}(B)$ comes from the case
$\mathbf{c}=\mathbf{0}$ in (4.11). We define

$M(B)=\frac{1}{Q^{2}}\sum_{q=1}^{\infty}q^{-4}S_{q,\mathbf{a}}(\mathbf{0})I_{q,\mathbf{a}}(\mathbf{0}).$
(4.15)

We have

$\mathfrak{G}_{\mathbf{a}}=\sum_{q=1}^{\infty}q^{-4}S_{q,\mathbf{a}}(\mathbf{0}),$
(4.16)

and from (4.14),

$I_{q,\mathbf{a}}(\mathbf{0})=P_{1}\cdots
P_{4}\int_{\mathbb{R}^{4}}w(\mathbf{x})h\left(r,G(\mathbf{x})\right)\mathrm{d}\mathbf{x}.$

We let $w_{0}$ denote a smooth weight function supported on $[-17,17]$ and
taking the value 1 in $[-16,16]$. Since
$\operatorname{supp}(w)\subseteq[-1-\eta,1+\eta]\subset[-2,2]$, we have
$w_{0}(G(\mathbf{x}))=1$ whenever $\mathbf{x}\in\operatorname{supp}(w)$. We
obtain

$I_{q,\mathbf{a}}(\mathbf{0})=P_{1}\cdots
P_{4}\int_{\mathbb{R}^{4}}w(\mathbf{x})w_{0}(G(\mathbf{x}))h(r,G(\mathbf{x}))\mathrm{d}\mathbf{x}.$

The arguments at the beginning of [browningbundle, Section 4.3] can be applied
to obtain

$I_{q,\mathbf{a}}(\mathbf{0})=P_{1}\cdots P_{4}\left(\lim_{\delta\rightarrow
0}\int_{-\infty}^{\infty}\left(\frac{\sin(\pi\delta\theta)}{\pi\delta\theta}\right)^{2}J(w;\theta)L(\theta)\,\mathrm{d}\theta\right),$
(4.17)

where

$\displaystyle J(w;\theta)$
$\displaystyle=\int_{\mathbb{R}^{4}}w(\mathbf{x})e(-\theta
G(\mathbf{x}))\,\mathrm{d}\mathbf{x},$ (4.18) $\displaystyle L(\theta)$
$\displaystyle=\int_{-\infty}^{\infty}w_{0}(t)h(r,t)e(\theta t)\,\mathrm{d}t.$
(4.19)

We would like to compare the bracketed expression in (4.17) with the weighted
singular integral $\sigma_{\infty}(w)$ from (4.5), which by definition equals
$\int_{-\infty}^{\infty}J(w;\theta)\mathrm{d}\theta$. We apply
[browningbundle, Lemma 4.11] to estimate $L(\theta)$. In addition to $N$, the
implied constants in [browningbundle, Lemma 4.11] depend only on
$\mathrm{supp}(w_{0})$. However, we note that we have chosen $w_{0}$
independently of $w$, and hence independently of $\eta$. Therefore for any
$q\leqslant Q$ and $N\geqslant 1$, we have

$L(\theta)=1+O_{N}(\\{1+|\theta|^{N}\\}r^{N}).$ (4.20)

Our next task is to bound $J(w;\theta)$. In order to achieve this, we need to
work with more general smooth weight functions
$\widetilde{w}:\mathbb{R}^{4}\rightarrow\mathbb{R}_{\geqslant 0}$ which belong
to a class $S$ defined by the following properties.

######  Definition 4.4.

We say $\widetilde{w}\in S$ if

  1. (1)

$\widetilde{w}$ is smooth,

  2. (2)

$\widetilde{w}$ is supported on $[-2,2]^{4}$,

  3. (3)

$\widetilde{w}(\mathbf{x})=0$ for $|\mathbf{x}|\leqslant\eta,$

  4. (4)

$|\widetilde{w}(\mathbf{x})|\ll 1$ for all $\mathbf{x}\in\mathbb{R}^{4}$,

  5. (5)

The derivatives of $\widetilde{w}(\mathbf{x})$ are bounded as in (4.8).

Since $w$ is equal to $w_{1}$ or $w_{2}$, we note in particular that $w\in S$.

######  Lemma 4.5.

For any $\widetilde{w}\in S$ and any $M\in\mathbb{Z}_{\geqslant 0}$, we have
$J(\widetilde{w};\theta)\ll_{M}|\eta^{2}\theta|^{-M}.$

###### Proof.

The case $M=0$ is trivial since the integrand in the definition of
$J(\widetilde{w};\theta)$ is bounded and has compact support. For $M\geqslant
1$, we follow a similar argument to [MR1421949, Lemma 10], by applying
integration by parts and induction on $M$. We have

$J(\widetilde{w};\theta)=\int_{\mathbb{R}^{4}}\widetilde{w}(\mathbf{x})e(-\theta
G(\mathbf{x}))\mathrm{d}\mathbf{x}\ll\max_{1\leqslant j\leqslant
4}\left|\int_{\begin{subarray}{c}\mathbf{x}\in\mathbb{R}^{4},\\\
|x_{j}|=\max_{i}|x_{i}|\end{subarray}}\widetilde{w}(\mathbf{x})e(-\theta
G(\mathbf{x}))\mathrm{d}\mathbf{x}\right|.$

Without loss of generality, we may assume that $j=1$. We note that

$e(-\theta G(\mathbf{x}))=\frac{1}{-4\pi i\epsilon_{1}\theta
x_{1}}\frac{\partial}{\partial x_{1}}e(-\theta G(\mathbf{x})).$

We perform integration by parts with respect to $x_{1}$ to obtain

$\displaystyle
J(\widetilde{w};\theta)\ll\left|\int_{\begin{subarray}{c}\mathbf{x}\in\operatorname{supp}{w}\\\
|x_{1}|=\max_{i}|x_{i}|\end{subarray}}\frac{\partial}{\partial
x_{1}}\left(\frac{\widetilde{w}(\mathbf{x})}{4\pi i\theta
x_{1}}\right)e(-\theta G(\mathbf{x}))\mathrm{d}\mathbf{x}\right|.$

Since $|x_{1}|=\max_{i}|x_{i}|$, we have
$|x_{1}|^{-1}=|\mathbf{x}|^{-1}\leqslant\eta^{-1}$ for any
$\mathbf{x}\in\operatorname{supp}{w}$. Therefore by the assumptions on the
size of $\widetilde{w}$ and its derivatives, we see that

$\frac{\partial}{\partial x_{1}}\left(\frac{\widetilde{w}(\mathbf{x})}{4\pi
i\theta x_{1}}\right)=\widetilde{w}^{(1)}(4\pi i\theta\eta^{2})^{-1}$

for some $\widetilde{w}^{(1)}\in S$. Hence

$J(\widetilde{w};\theta)\ll|\eta^{2}\theta|^{-1}|J(\widetilde{w}^{(1)};\theta)|.$

Proceeding by induction, we obtain
$J(\widetilde{w}(\mathbf{x});\theta)\ll_{M}|\eta^{2}\theta|^{-M}|J(\widetilde{w}^{(M)};\theta)|$
for some $\widetilde{w}^{(M)}\in S$, from which we deduce the required result
by applying the trivial bound $J(\widetilde{w}^{(M)};\theta)\ll 1$. ∎

From Lemma 4.5, for any integer $M\geqslant 1$, we have

$J(w;\theta)\ll_{M}(1+|\eta^{2}\theta|)^{-M}\leqslant\eta^{-2M}(1+|\theta|)^{-M}.$

Combining this with (4.17), (4.20) and the fact that

$\lim_{\delta\rightarrow
0}\int_{-\infty}^{\infty}\left(\frac{\sin(\pi\delta\theta)}{\pi\delta\theta}\right)^{2}J(\theta;w)\operatorname{d}\theta=\int_{-\infty}^{\infty}J(\theta;w)\operatorname{d}\theta=\sigma_{\infty}(w),$

we obtain

$|(P_{1}\cdots
P_{4})^{-1}I_{q,\mathbf{a}}(\mathbf{0})-\sigma_{\infty}(w)|\ll_{M,N}\int_{-\infty}^{\infty}\frac{r^{N}\\{1+|\theta|\\}^{N}}{\eta^{2M}\\{1+|\theta|\\}^{M}}\,\mathrm{d}\theta.$

In order to ensure that the integral converges, we make the choice $M=N+2$,
and we conclude that

$I_{q,\mathbf{a}}(\mathbf{0})=P_{1}\cdots
P_{4}\\{\sigma_{\infty}(w)+O_{N}(\eta^{-2N-4}r^{N})\\},$ (4.21)

for any integer $N\geqslant 1$.

Let $R=B^{1/2-\epsilon}\eta^{2}$. We note that if $q\leqslant R$, then the
error term in (4.21) can be made smaller than any negative power of $B$ by
appropriate choice of $N$ (depending on $\epsilon$), due to the assumption in
(4.10).

We now split the main term up. We have

$\begin{split}M(B)=\frac{P_{1}\cdots
P_{4}\sigma_{\infty}(w)}{B}\sum_{q\leqslant
R}q^{-4}S_{q,\mathbf{a}}(\mathbf{0})+O(T(R)+1),\end{split}$ (4.22)

where

$T(R)=\frac{1}{Q^{2}}\sum_{q>R}q^{-4}S_{q,\mathbf{a}}(\mathbf{0})I_{q,\mathbf{a}}(\mathbf{0}).$
(4.23)

We will estimate $T(R)$ using partial summation. The following lemma is
similar to [browningbundle, Lemma 4.3], and gives bounds for
$I_{q,\mathbf{a}}(\mathbf{c})$ and its derivative. Only the case
$\mathbf{c}=\mathbf{0}$ is needed in the study of the main term, but the case
$\mathbf{c}\neq\mathbf{0}$ will be useful later.

######  Lemma 4.6.

Let $\mathbf{c}\in\mathbb{Z}^{4}$ and $k\in\\{0,1\\}$. Then

  1. (1)

If $k=0$ or $\mathbf{c}=\mathbf{0}$ then
$q^{k}\frac{\partial^{k}I_{q,\mathbf{a}}(\mathbf{c})}{\partial q^{k}}\ll
P_{1}\cdots P_{4}$,

  2. (2)

If $k=1$ and $\mathbf{c}\neq\mathbf{0}$ then
$q^{k}\frac{\partial^{k}I_{q,\mathbf{a}}(\mathbf{c})}{\partial
q^{k}}\ll\eta^{-1}P_{1}\cdots P_{4}$.

###### Proof.

Suppose that $\mathbf{c}=\mathbf{0}$. Recalling (4.14) and the notation
$r=q/Q$, it is clear that

$q^{k}\frac{\partial^{k}I_{q,\mathbf{a}}(\mathbf{0})}{\partial
q^{k}}=r^{k}P_{1}\cdots
P_{4}\int_{\mathbb{R}^{4}}w(\mathbf{x})\frac{\partial^{k}h(r,G(\mathbf{x}))}{\partial
r^{k}}\mathrm{d}\mathbf{x}.$ (4.24)

From [MR1421949, Lemma 5] with $m=k,n=0$ and $N=2$, we have

$\frac{\partial^{k}h(r,G(\mathbf{x}))}{\partial r^{k}}\ll
r^{-1-k}\left(r^{2}+\min\left\\{1,\frac{r^{2}}{|G(\mathbf{x})|^{2}}\right\\}\right),$

and so

$(P_{1}\cdots
P_{4})^{-1}\frac{\partial^{k}I_{q,\mathbf{a}}(\mathbf{c})}{\partial q^{k}}\ll
r+r^{-1}\int_{\begin{subarray}{c}\mathbf{x}\in\operatorname{supp}w\\\
|G(\mathbf{x})|\leqslant
r\end{subarray}}1\mathrm{d}\mathbf{x}+r\int_{\begin{subarray}{c}\mathbf{x}\in\operatorname{supp}w\\\
|G(\mathbf{x})|>r\end{subarray}}\frac{1}{|G(\mathbf{x})|^{2}}\mathrm{d}\mathbf{x}.$
(4.25)

We need to show that the right hand side of (4.25) is $O(1)$. We can assume
that the first term $r$ is $O(1)$, since $h(r,G(\mathbf{x}))=0$ when
$r>\max(1,|G(\mathbf{x})|)$, and $G(\mathbf{x})\ll 1$ for
$x\in\operatorname{supp}w$, and so $I_{q,\mathbf{a}}(\mathbf{0})=0$ unless
$r\ll 1$. In order to estimate the integrals in (4.25), we consider for $z>0$
the Lebesgue measure $m(z)$ of the set

$S(z)=\\{\mathbf{x}\in\operatorname{supp}w:|G(\mathbf{x})|\leqslant z\\}.$

We can find distinct indices $i,j$ such that $\epsilon_{i}=\epsilon_{j}$.
Without loss of generality we may assume $i=1,j=2$, and in addition that
$\epsilon_{1}=\epsilon_{2}=1$. For a fixed choice of $x_{3},x_{4}$, we define
$c=\epsilon_{3}x_{3}^{2}+\epsilon_{4}x_{4}^{2}$, so that if $\mathbf{x}\in
S(z)$ then $x_{1}^{2}+x_{2}^{2}\in[-c-z,-c+z]$. The measure of the set of
pairs $x_{1},x_{2}$ satisfying this condition is $O(z)$. For
$\mathbf{x}\in\operatorname{supp}w$, we require $|x_{3}|,|x_{4}|\ll 1$, and
hence $m(z)=O(z)$. From this we see that the first integral in (4.25) is
$O(r)$, and by breaking into dyadic intervals, the second integral is
$O(r^{-1})$. Therefore the right hand side of (4.25) is $O(1)$, as required.

When $\mathbf{c}\neq\mathbf{0}$, we first note that for $k=0$, we can reduce
to the case above by applying the trivial estimate to the extra exponential
factor $e(-\mathbf{v}\cdot\mathbf{x})$ appearing in the integral defining
$I_{q,\mathbf{a}}(\mathbf{c})$. It remains only to deal with the case
$\mathbf{c}\neq\mathbf{0},k=1$. Define the vector
$\mathbf{v}\in\mathbb{R}^{4}$ by $v_{i}=q^{-1}P_{i}c_{i}$. Similarly to
(4.24), we obtain

$\displaystyle(P_{1}\cdots P_{4})^{-1}q\frac{\partial
I_{q,\mathbf{a}}(\mathbf{c})}{\partial q}\ll
r\int_{\mathbb{R}^{4}}w(\mathbf{x})\frac{\partial\\{h(r,G(\mathbf{x}))e(-\mathbf{v}\cdot\mathbf{x})\\}}{\partial
r}\mathrm{d}\mathbf{x}$
$\displaystyle=r\int_{\mathbb{R}^{4}}w(\mathbf{x})\left(\frac{\partial
h(r,G(\mathbf{x}))}{\partial
r}e(-\mathbf{v}\cdot\mathbf{x})+h(r,G(\mathbf{x}))\frac{-2\pi
i\mathbf{v}\cdot\mathbf{x}}{r}e(-\mathbf{v}\cdot\mathbf{x})\right)\mathrm{d}\mathbf{x}.$

The first term can again be dealt with using the trivial estimate for
$e(-\mathbf{v}\cdot\mathbf{x})$ and the argument for the case
$\mathbf{c}=\mathbf{0}$ given above. In order to estimate the second term, as
in [MR1421949, Lemma 14], we apply the divergence theorem

$\int_{\mathbb{R}^{4}}\nabla\cdot(w(\mathbf{x})h(r,G(\mathbf{x})e(-\mathbf{v}\cdot\mathbf{x})\mathbf{x})\mathrm{d}\mathbf{x}=0$

in order to remove the additional factor of $2\pi i\mathbf{v}\cdot\mathbf{x}$.
This yields

$\begin{split}&\int_{\mathbb{R}^{4}}w(\mathbf{x})h(r,G(\mathbf{x}))e(-\mathbf{v}\cdot\mathbf{x})(2\pi
i\mathbf{v}\cdot\mathbf{x})\mathrm{d}\mathbf{x}=\int_{\mathbb{R}^{4}}\widetilde{w}(\mathbf{x})h(r,G(\mathbf{x}))e(-\mathbf{v}\cdot\mathbf{x})\mathrm{d}\mathbf{x}\\\
+&\int_{\mathbb{R}^{4}}4w(\mathbf{x})h(r,G(\mathbf{x}))e(-\mathbf{v}\cdot\mathbf{x})\mathrm{d}\mathbf{x}+\int_{\mathbb{R}^{4}}2w(\mathbf{x})G(\mathbf{x})e(-\mathbf{v}\cdot\mathbf{x})\frac{\partial
h(r,G(\mathbf{x}))}{\partial G(\mathbf{x})}\mathrm{d}\mathbf{x},\end{split}$
(4.26)

where $\widetilde{w}(\mathbf{x})=(\mathbf{x}\cdot\nabla)w(\mathbf{x})$. The
second integral on the right hand side of (4.26) can now be treated in the
same way as the easier cases $k=0$ or $\mathbf{c}=\mathbf{0}$ using the
trivial estimate for $e(-\mathbf{v}\cdot\mathbf{x})$. The third integral can
similarly be estimated by noting that $G(\mathbf{x})\ll 1$ for
$\mathbf{x}\in\operatorname{supp}(w)$, and applying [MR1421949, Lemma 5] with
$n=1,m=0,N=0$. For the first integral, we note that
$\widetilde{w}(\mathbf{x})$ is uniformly bounded by $\eta^{-1}$. Hence the
above arguments can be applied to the first integral as well, but with an
extra factor of $\eta^{-1}$. ∎

We define

$\Sigma(x;\mathbf{c})=\sum_{q\leqslant x}q^{-3}S_{q,\mathbf{a}}(\mathbf{c}).$
(4.27)

Moreover, we let $F^{*}_{\mathbf{a}}$ denote the dual form of
$F_{\mathbf{a}}$, i.e., the quadratic form given by the equation

$F^{*}_{\mathbf{a}}(\mathbf{c})=a_{2}a_{3}a_{4}c_{1}^{2}+a_{1}a_{3}a_{4}c_{2}^{2}+a_{1}a_{2}a_{4}c_{3}^{2}+a_{1}a_{2}a_{3}c_{4}^{2}.$

We also define

$\Delta_{\mathbf{c}}(\mathbf{a})=\prod_{i=1}^{4}\gcd\left(\gcd(a_{i},c_{i}),\prod_{j\neq
i}\gcd(a_{j},c_{j})\right).$ (4.28)

In particular we have $\Delta_{\mathbf{c}}(\mathbf{a})=\Delta$ when
$\mathbf{c}=\mathbf{0}$.

The following lemma is a slight modification of [browningbundle, Lemma 4.9].

######  Lemma 4.7.

Suppose $A\neq\square$. Let $\mathbf{c}\in\mathbb{Z}^{4}$ be such that
$F^{*}_{\mathbf{a}}(\mathbf{c})=0$. Then

$\Sigma(x;\mathbf{c})\ll
A^{3/16+\epsilon}\Delta_{\mathbf{c}}(\mathbf{a})^{3/8}x^{1/2+\epsilon}.$

###### Proof.

We use the fact that $S_{q,\mathbf{a}}(\mathbf{c})$ is multiplicative in $q$,
as proved by Heath-Brown in the discussion following [MR1421949, Lemma 28].
This allows us to write

$\Sigma(x;\mathbf{c})=\sum_{\begin{subarray}{c}q_{2}\leqslant x\\\
q_{2}|(2A)^{\infty}\end{subarray}}q_{2}^{-3}S_{q_{2},\mathbf{a}}(\mathbf{c})\sum_{\begin{subarray}{c}q_{1}\leqslant
x/q_{2}\\\
\gcd(q_{1},2A)=1\end{subarray}}q_{1}^{-3}S_{q_{1},\mathbf{a}}(\mathbf{c}),$
(4.29)

where the notation $q_{2}|(2A)^{\infty}$ means that every prime dividing
$q_{2}$ also divides $2A$. By [browningbundle, Lemma 4.6], we have

$\sum_{\begin{subarray}{c}q_{1}\leqslant x/q_{2}\\\
\gcd(q_{1},2A)=1\end{subarray}}q_{1}^{-3}S_{q_{1}}(\mathbf{c})=\sum_{\begin{subarray}{c}q_{1}\leqslant
x/q_{2}\\\
\gcd(q_{1},2A)=1\end{subarray}}\left(\frac{A}{q_{1}}\right)\frac{\varphi(q_{1})}{q_{1}},$

where $\varphi$ denotes the Euler totient function. Applying the Burgess bound
as in the proof of [browningbundle, Lemma 4.9], we obtain

$\sum_{\begin{subarray}{c}q_{1}\leqslant x/q_{2}\\\
\gcd(q_{1},2A)=1\end{subarray}}q_{1}^{-3}S_{q_{1},\mathbf{a}}(\mathbf{c})\ll\frac{|A|^{3/16+\epsilon}x^{1/2}}{q_{2}^{1/2}}.$

Returning to (4.29), we have

$\Sigma(x;\mathbf{c})\ll|A|^{3/16+\epsilon}x^{1/2}\sum_{\begin{subarray}{c}q_{2}\leqslant
x\\\
q_{2}|(2A)^{\infty}\end{subarray}}\frac{|S_{q_{2},\mathbf{a}}(\mathbf{c})|}{q_{2}^{7/2}}.$
(4.30)

Now [browningbundle, Lemma 4.5] states that $S_{q,\mathbf{a}}(\mathbf{c})\ll
q^{3}\prod_{i=1}^{4}\gcd(q,a_{i},c_{i})$. Moreover, there are
$O(x^{\epsilon}A^{\epsilon})$ choices for $q_{2}\leqslant x$ with
$q_{2}|(2A)^{\infty}$. Therefore

$\sum_{\begin{subarray}{c}q_{2}\leqslant x\\\
q_{2}|(2A)^{\infty}\end{subarray}}\frac{|S_{q_{2},\mathbf{a}}(\mathbf{c})|}{q_{2}^{7/2}}\ll
x^{\epsilon}A^{\epsilon}\sup_{\begin{subarray}{c}q|(2A)^{\infty}\end{subarray}}\left(\frac{\prod_{i=1}^{4}\gcd(q,a_{i},c_{i})^{1/2}}{q^{1/2}}\right).$
(4.31)

Let $p$ be a prime. We define

$L_{p}=\nu_{p}\left(\frac{\prod_{i=1}^{4}\gcd(q,a_{i},c_{i})}{q}\right),\quad
k_{p}=\nu_{p}(q).$

For an index $i=1,\ldots,4$, we let $m_{i,p}$ denote the $i$th smallest
element of $\nu_{p}(\gcd(a_{1},c_{1})),\ldots,\nu_{p}(\gcd(a_{4},c_{4}))$.
Then

$L_{p}=\sum_{i=1}^{4}\left(\min(k_{p},m_{i,p})-k_{p}\right).$

It can be checked that the maximum possible value of $L_{p}$ is attained by
choosing $k_{p}=m_{3,p}$, and so $L_{p}\leqslant m_{1,p}+m_{2,p}+m_{3,p}$. We
have $L_{p}\leqslant 0$ unless $p|\Delta_{\mathbf{c}}(\mathbf{a})$. Hence the
supremum in (4.31) is bounded by

$\prod_{p|\Delta_{\mathbf{c}}(\mathbf{a})}p^{(m_{1,p}+m_{2,p}+m_{3,p})/2}.$

For any prime $p$, we have

$\nu_{p}(\Delta_{\mathbf{c}}(\mathbf{a}))=m_{1,p}+m_{2,p}+m_{3,p}+\min(m_{1,p}+m_{2,p}+m_{3,p},m_{4,p})\geqslant\frac{4}{3}(m_{2,p}+m_{3,p}),$

and hence the supremum in (4.31) is bounded by
$\Delta_{\mathbf{c}}(\mathbf{a})^{1/3}$. Recalling (4.30) we obtain the
desired estimate for $\Sigma(x;\mathbf{c})$. ∎

######  Proposition 4.8.

Suppose $A\neq\square$, and let $M(B)$ be as defined in (4.15). Then

$M(B)=\frac{\mathfrak{G}_{\mathbf{a}}\sigma_{\infty}(w)B}{|A|^{1/2}}+O\left(\frac{\eta^{-2}B^{3/4+\epsilon}\Delta^{3/8}}{|A|^{5/16}}\right).$

###### Proof.

We recall the estimate for $M(B)$ from (4.22) and the definition of $T(R)$
from (4.23). We may restrict the sum to the range $R<q\ll Q$, since
$h(r,G(\mathbf{x}))=0$ unless $q\ll Q$. Using Lemma 4.7 with $x\ll Q$ and
$\mathbf{c}=\mathbf{0}$, together with Lemma 4.6, and partial summation, we
obtain

$\displaystyle T(R)$
$\displaystyle=\frac{-I_{R}(\mathbf{0})}{Q^{2}R}\Sigma(R;\mathbf{0})-\frac{1}{Q^{2}}\int_{R}^{Q}\Sigma(x;\mathbf{0})\frac{\partial}{\partial
x}\left(\frac{I_{x,\mathbf{a}}(\mathbf{0})}{x}\right)\mathrm{d}x$
$\displaystyle\ll\frac{P_{1}\cdots P_{4}}{BR}\sup_{R\leqslant t\ll
Q}|\Sigma(t;\mathbf{0})|$ $\displaystyle\ll\frac{P_{1}\cdots
P_{4}}{BR}|A|^{3/16+\epsilon}\Delta^{3/8}B^{1/4+\epsilon}$
$\displaystyle\ll\frac{\eta^{-2}B^{3/4+\epsilon}\Delta^{3/8}}{|A|^{5/16}},$

which is the error term claimed in the proposition. Finally, the same error
term is also obtained when we extend the sum $\sum_{q\leqslant
R}q^{-4}S_{q,\mathbf{a}}(\mathbf{0})$ in (4.22) to the singular series
$\mathfrak{G}_{\mathbf{a}}=\sum_{q=1}^{\infty}q^{-4}S_{q,\mathbf{a}}(\mathbf{0})$,
as can be seen by applying Lemma 4.7 and partial summation in a very similar
manner to above. ∎

###  4.2. The error term

We now study the error term coming from the case $\mathbf{c}\neq\mathbf{0}$.
We begin with a lemma which is similar to [browningbundle, Lemma 4.2 (i)].

######  Lemma 4.9.

For any nonzero $\mathbf{c}\in\mathbb{Z}^{4}$ and any integer $N\geqslant 0$,
we have

$I_{q,\mathbf{a}}(\mathbf{c})\ll_{N}\frac{P_{1}\cdots
P_{4}}{r}\left(1+\frac{r}{\eta}\right)^{N}\min_{1\leqslant i\leqslant
4}\left(\frac{|a_{i}|^{1/2}}{|c_{i}|}\right)^{N}.$

###### Proof.

We apply integration by parts $N$ times to the integral in (4.14), where we
differentiate $f(\mathbf{x}):=w(\mathbf{x})h(r,G(\mathbf{x}))$ and integrate
$g(\mathbf{x}):=e(\mathbf{v}\cdot\mathbf{x})$. Each integral of
$g(\mathbf{x})$ with respect to $x_{i}$ introduces a factor of $(2\pi
iq^{-1}P_{i}c_{i})^{-1}$ .

We recall from (4.8) that for any $i\in\\{1,\ldots,4\\}$ and any $N\geqslant
1$,

$\left|\frac{\partial^{N}}{\partial
x_{i}^{N}}w(\mathbf{x})\right|\ll_{N}\eta^{-N}.$

Using the product rule, we have

$\left|\frac{\partial^{N}}{\partial
x_{i}^{N}}f(\mathbf{x})\right|\ll_{N}\max_{0\leqslant j\leqslant
N}\left|\eta^{j-N}\frac{\partial^{j}}{\partial
x_{i}^{j}}h(r,G(\mathbf{x}))\right|.$

Clearly

$\left|\frac{\partial^{j}}{\partial x_{i}^{j}}G(\mathbf{x})\right|\ll 1$

for all $\mathbf{x}\in\operatorname{supp}w$. By [browningbundle, Equation
(4.10)], we have

$\frac{\partial^{j}h(r,y)}{\partial y^{j}}\ll_{j}r^{-1-j}.$ (4.32)

Hence by the chain rule, we have

$\left|\frac{\partial^{N}}{\partial
x_{i}^{N}}f(\mathbf{x})\right|\ll_{N}\max_{0\leqslant j\leqslant
N}r^{-1-j}\eta^{j-N}=r^{-1}\min(r,\eta)^{-N}\leqslant
r^{-1}\left(\frac{1}{r}+\frac{1}{\eta}\right)^{N}.$ (4.33)

After performing integration by parts $N$ times, we apply (4.33) to all
derivatives of $f(\mathbf{x})$ that appear, and the trivial estimate
$|e(-\mathbf{v}\cdot\mathbf{x})|\leqslant 1$, to obtain for any
$i\in\\{1,\ldots,4\\}$,

$\displaystyle I_{q,\mathbf{a}}(\mathbf{c})$
$\displaystyle\ll_{N}\frac{P_{1}\cdots
P_{4}}{r(q^{-1}|P_{i}c_{i}|)^{N}}\left(\frac{1}{r}+\frac{1}{\eta}\right)^{N}.$

Recalling that $P_{i}=(B/|a_{i}|)^{1/2},Q=B^{1/2},r=q/Q$, and choosing the
index $i$ such that $|P_{i}c_{i}|$, is maximised, the last expression
rearranges to give the desired estimate. ∎

######  Remark 4.10.

Lemma 4.9 allows us to assume
$|c_{i}|\ll\eta^{-1}|a_{i}|^{1/2}B^{\epsilon}=C_{i}$ for all
$i\in\\{1,\ldots,4\\}$, since outside this range the estimate in Lemma 4.9 can
be made smaller than any power of $B$ by an appropriate choice of $N$.

The following lemma is a variant of the first derivative test and is based on
[MR1421949, Lemma 10].

######  Lemma 4.11.

Let $f(\mathbf{x})=\theta G(\mathbf{x})-\mathbf{v}\cdot\mathbf{x}$, where
$\mathbf{v}\in\mathbb{R}^{4}$ and $\theta\in\mathbb{R}$ are such that
$|\mathbf{v}|\geqslant 5|\theta|$. Then for any integer $N\geqslant 0$ and any
$w$ in the class of smooth weight functions $S$ from Definition 4.4, we have

$\int_{\mathbb{R}^{4}}w(\mathbf{x})e(f(\mathbf{x}))\mathrm{d}\mathbf{x}\ll_{N}(\eta|\mathbf{v}|)^{-N}.$

###### Proof.

The case $N=0$ is trivial. We define $f_{j}(\mathbf{x})=\partial
f(\mathbf{x})/\partial x_{j}=\pm 2\theta x_{j}-v_{i}$. By the assumption
$|\mathbf{v}|\geqslant 5|\theta|$, there is some index $j\in\\{1,\ldots,4\\}$
such that $|f_{j}(\mathbf{x})|\gg|\mathbf{v}|$ for any
$\mathbf{x}\in[-2,2]^{4}$. Without loss of generality, we may assume $j=1$.

We write

$w(\mathbf{x})e(f(\mathbf{x}))=\frac{w(\mathbf{x})}{2\pi
if_{1}(\mathbf{x})}\frac{\partial}{\partial x_{1}}e(f(\mathbf{x}))$

and integrate by parts with respect to $x_{1}$ to obtain

$\int_{\mathbb{R}^{4}}w(\mathbf{x})e(f(\mathbf{x}))\mathrm{d}\mathbf{x}=-(2\pi
i\eta|\mathbf{v}|)^{-1}\int_{\mathbb{R}^{4}}e(f(\mathbf{x}))\widetilde{w}(\mathbf{x})\mathrm{d}\mathbf{x},$

where

$\widetilde{w}(\mathbf{x})=\frac{\partial}{\partial
x_{1}}\left(\frac{\eta|\mathbf{v}|w(\mathbf{x})}{f_{1}(\mathbf{x})}\right)=\frac{\partial}{\partial
x_{1}}(\eta w(\mathbf{x}))\frac{|\mathbf{v}|}{f_{1}(\mathbf{x})}+\eta
w(\mathbf{x})\frac{\partial}{\partial
x_{1}}\left(\frac{|\mathbf{v}|}{f_{1}(\mathbf{x})}\right).$

It remains to show that $\widetilde{w}$ belongs to the class of smooth weight
functions $S$ from Definition 4.4, since the result then follows by induction
on $N$. But this is immediate from the observations that for any
$\mathbf{x}\in[-2,2]^{4},$

$\frac{|\mathbf{v}|}{f_{1}(\mathbf{x})}\ll 1,\quad\frac{\partial}{\partial
x_{1}}\left(\frac{|\mathbf{v}|}{f_{1}(\mathbf{x})}\right)\ll 1,\quad\textrm{
and }\quad\frac{\partial}{\partial x_{1}}(\eta w)\in S.\qed$

We require one further estimate for $I_{q,\mathbf{a}}(\mathbf{c})$, which
involves the second derivative test.

######  Lemma 4.12.

Let $\mathbf{c}\neq\mathbf{0}$. Then

$I_{q,\mathbf{a}}(\mathbf{c})\ll\frac{\eta^{-4}B^{3/2+\epsilon}q}{|A|^{1/2}}\min_{1\leqslant
i\leqslant 4}\left(\frac{|a_{i}|^{1/2}}{|c_{i}|}\right).$

###### Proof.

We would like to apply Fourier inversion to
$w(\mathbf{x})h(r,G(\mathbf{x}))e(-\mathbf{v}\cdot\mathbf{x})$, the integrand
appearing in the definition of $I_{q,\mathbf{a}}(\mathbf{c})$. The function
$\mathbf{x}\mapsto h(r,G(\mathbf{x}))$ does not have compact support. We
define the smooth weight $w_{0}:\mathbb{R}\rightarrow\mathbb{R}_{\geqslant 0}$
by $w_{0}(x)=\psi(x/17)$, where $\psi(x)$ is the standard bump function in one
variable. Then we define the smooth weight
$w_{3}:R^{4}\rightarrow\mathbb{R}_{\geqslant 0}$ by

$w_{3}(\mathbf{x})=\begin{cases}\frac{w(\mathbf{x})}{w_{0}(G(\mathbf{x}))},&\mbox{if
}w_{0}(G(\mathbf{x}))\neq 0,\\\ 0,&\mbox{otherwise.}\end{cases}$

Note that $w$ is supported on $[-2,2]^{4}$, and in this region $G(\mathbf{x})$
takes values in $[-16,16]$. Therefore $w_{0}(G(\mathbf{x}))\gg 1$ for all
$\mathbf{x}\in\mathrm{supp}(w)$. We deduce that
$\mathrm{supp}(w_{3})=\mathrm{supp}(w)$ and
$w(\mathbf{x})=w_{3}(\mathbf{x})w_{0}(G(\mathbf{x}))$ for all
$\mathbf{x}\in\mathbb{R}^{4}$. Moreover, since all the derivatives of
$w_{0}(G(\mathbf{x}))$ are $O(1)$ for any
$\mathbf{x}\in\operatorname{supp}(w)$, we have $w_{3}\in S$. Applying Fourier
inversion, we obtain

$I_{q,\mathbf{a}}(\mathbf{c})=P_{1}\cdots
P_{4}\int_{-\infty}^{\infty}p(\theta)\int_{\mathbb{R}^{4}}w_{3}(\mathbf{x})e(\theta
G(\mathbf{x})-\mathbf{v}\cdot\mathbf{x})\,\mathrm{d}\mathbf{x}\,\mathrm{d}\theta,$
(4.34)

where

$p(\theta)=\int_{-\infty}^{\infty}w_{0}(k)h(r,k)e(-\theta k)\,\mathrm{d}k.$

We have the estimate $p(\theta)\ll 1$. Indeed, taking $m=n=0$ and $N=2$ in
[MR1421949, lemma 5] we see that

$h(r,k)\ll r^{-1}(r^{2}+\min(1,(r/|k|)^{2}),$

and so

$\displaystyle p(\theta)\ll
r^{-1}\left(\int_{|k|<r}1\mathrm{d}k+\int_{r\leqslant|k|\leqslant
17}\left(\frac{r}{|k|}\right)^{2}\mathrm{d}k\right)\ll r^{-1}(r+r^{2}\cdot
r^{-1})\ll 1.$

To deal with the inner integral in (4.34), which we denote by
$I(\theta;\mathbf{v})$, we divide into the cases
$5|\theta|\leqslant|\mathbf{v}|$ and $5|\theta|\geqslant|\mathbf{v}|$. In the
former case, we apply Lemma 4.11 with $N=2$ to obtain
$I(\theta;\mathbf{v})\ll(\eta|\mathbf{v}|)^{-2}$. The contribution to
$I_{q,\mathbf{a}}(\mathbf{c})$ is

$(\eta|\mathbf{v}|)^{-2}P_{1}\cdots
P_{4}\int_{5|\theta|\leqslant|\mathbf{v}|}1\mathrm{d}\theta\ll\eta^{-2}|\mathbf{v}|^{-1}P_{1}\cdots
P_{4}.$

In the case $5|\theta|\geqslant|\mathbf{v}|$, we use the arguments from
[MR3652248, Lemma 3.2] to obtain

$I(\theta;\mathbf{v})\ll\left\\{\int_{\mathbb{R}^{4}}|\widehat{w_{3}}(\mathbf{y})|\mathrm{d}\mathbf{y}\right\\}\sup_{\mathbf{y}\in\mathbb{R}^{4}}\left|\prod_{i=1}^{4}\int_{[-2,2]}e(\theta\epsilon_{i}x_{i}^{2}+x_{i}(y_{i}\pm
v_{i}))\mathrm{d}x_{i}\right|,$ (4.35)

where $\widehat{w_{3}}$ denotes the Fourier transform of $w_{3}$. The first
factor on the right hand side of (4.35) is the $L^{1}$-norm of
$\widehat{w_{3}}$, which we denote by $\|\widehat{w_{3}}\|_{L^{1}}$. The
$v_{i}$’s can be absorbed into the supremum over $\mathbf{y}$, and so it
remains to study

$\int_{[-2,2]}e(\pm\theta x_{i}^{2}-y_{i}x_{i})\mathrm{d}x_{i}.$

We can write the integrand as $e(\pm\theta\Phi(x_{i}))$, where
$\Phi(x_{i})=x_{i}^{2}+x_{i}y_{i}\theta^{-1}$. Then
$|\Phi^{\prime\prime}(x_{i})|\geqslant 1$ throughout the interval $[-2,2]$,
and so we can apply the second derivative test as found in [MR2827930, Ch. 8,
Proposition 2.3] to bound this integral by $|\theta|^{-1/2}$. Therefore

$I(\mathbf{v};\theta)\ll\|\widehat{w_{3}}\|_{L_{1}}|\theta|^{-2},$

Returning to (4.34), the contribution to $I_{q,\mathbf{a}}(\mathbf{c})$ from
the range $5|\theta|\geqslant|\mathbf{v}|$ is bounded by

$\|\widehat{w_{3}}\|_{L_{1}}P_{1}\cdots
P_{4}\int_{|\theta|\gg|\mathbf{v}|}|\theta|^{-2}\mathrm{d}\theta\ll\|\widehat{w_{3}}\|_{L_{1}}P_{1}\cdots
P_{4}|\mathbf{v}|^{-1}.$

Since

$\frac{P_{1}\cdots
P_{4}}{|\mathbf{v}|}=\frac{B^{3/2}q}{|A|^{1/2}}\min_{1\leqslant i\leqslant
4}\left(\frac{|a_{i}|^{1/2}}{|c_{i}|}\right),$

it remains only to show that $\|\widehat{w}_{3}\|_{L^{1}}\ll\eta^{-4}$. We
have

$\|\widehat{w}_{3}\|_{L^{1}}=\int_{|\mathbf{x}|\leqslant\eta^{-1}}|\widehat{w_{3}}(\mathbf{y})|\,\mathrm{d}\mathbf{y}+\int_{|\mathbf{x}|\geqslant\eta^{-1}}|\widehat{w_{3}}(\mathbf{y})|\,\mathrm{d}\mathbf{y}.$

The first integral is trivially $O(\eta^{-4})$. For the second integral, we
have

$\int_{|\mathbf{x}|\geqslant\eta^{-1}}|\widehat{w_{3}}(\mathbf{y})|\,\mathrm{d}\mathbf{y}\ll\int_{\begin{subarray}{c}|\mathbf{x}|\geqslant\eta^{-1}\\\
|y_{1}|=\max_{i}|y_{i}|\end{subarray}}|\widehat{w_{3}}(\mathbf{y})|\,\mathrm{d}\mathbf{y}.$

We can now apply integration by parts five times with respect to $x_{1}$ to
obtain

$\displaystyle\int_{|\mathbf{y}|\geqslant\eta^{-1}}|\widehat{w_{3}}(\mathbf{y})|\,\mathrm{d}\mathbf{y}$
$\displaystyle\ll\int_{\begin{subarray}{c}|\mathbf{y}|\geqslant\eta^{-1}\\\
|y_{1}|=\max_{i}|y_{i}|\end{subarray}}\left|\int_{\mathbb{R}^{4}}\frac{\partial^{5}w_{3}(\mathbf{x})}{\partial
x_{1}^{5}}\frac{e(-\mathbf{x}\cdot\mathbf{y})}{(-2\pi
iy_{1})^{5}}\mathrm{d}\mathbf{x}\right|\mathrm{d}\mathbf{y}$
$\displaystyle\ll\eta^{-5}\int_{\begin{subarray}{c}|y_{1}|\geqslant\eta^{-1}\\\
|y_{2}|,|y_{3}|,|y_{4}|\leqslant|y_{1}|\end{subarray}}y_{1}^{-5}\mathrm{d}\mathbf{y}$
$\displaystyle\ll\eta^{-5}\int_{y_{1}\geqslant\eta^{-1}}y_{1}^{-2}\,\mathrm{d}y_{1}$
$\displaystyle\ll\eta^{-4}.\qed$

We recall the notation $C_{i}=\eta^{-1}B^{\epsilon}|a_{i}|^{1/2}$ from Remark
4.10. We are now ready to estimate the quantity

$E_{\mathbf{a}}(B)=\frac{1}{Q^{2}}\sum_{\begin{subarray}{c}\mathbf{c}\in\mathbb{Z}^{4}\backslash\\{\mathbf{0}\\}\\\
|c_{i}|\ll
C_{i}\end{subarray}}\sum_{q=1}^{\infty}q^{-4}S_{q,\mathbf{a}}(\mathbf{c})I_{q,\mathbf{a}}(\mathbf{c}).$
(4.36)

Note that $I_{q,\mathbf{a}}(\mathbf{c})$ vanishes for $q\gg Q$ by the
properties of the function $h$, and so we may restrict the $q$-sum to a sum
over $q\ll Q$. We recall the notation $\Sigma(x;\mathbf{c})=\sum_{q\leqslant
x}S_{q,\mathbf{a}}(\mathbf{c})$. We would like to use Lemma 4.12 together with
the bound for $\Sigma(x;\mathbf{c})$ from [browningbundle, Lemma 4.7] to
estimate the inner sum of (4.36). Unfortunately, [browningbundle, Lemma 4.7]
requires the dual form $F_{\mathbf{a}}^{*}(\mathbf{c})$ not to vanish. This
was always true in [browningbundle, Section 4] due to the assumptions made in
the setup, but we must treat this case separately. To this end, we let
$E_{\mathbf{a}}(B)=E_{\mathbf{a},1}(B)+E_{\mathbf{a},2}(B)$, where in
$E_{\mathbf{a},1}(B)$ we add the restriction
$F_{\mathbf{a}}^{*}(\mathbf{c})\neq 0$ to the $\mathbf{c}$-sum and in
$E_{\mathbf{a},2}(B)$ we sum over the remaining values of $\mathbf{c}$ where
$F_{\mathbf{a}}^{*}(\mathbf{c})=0$.

####  4.2.1. Analysis of $E_{\mathbf{a},1}(B)$

Using Lemma 4.12, we have

$E_{\mathbf{a},1}(B)\ll\frac{\eta^{-4}B^{1/2+\epsilon}}{|A|^{1/2}}\sum_{\begin{subarray}{c}\mathbf{c}\in\mathbb{Z}^{4}\backslash\\{\mathbf{0}\\}\\\
|c_{i}|\ll C_{i}\end{subarray}}\min_{1\leqslant i\leqslant
4}\left(\frac{|a_{i}|^{1/2}}{|c_{i}|}\right)\sum_{q\ll
Q}q^{-3}S_{q,\mathbf{a}}(\mathbf{c}).$

For a fixed choice of $\mathbf{c}$, let $j(\mathbf{c})\in\\{1,\ldots,4\\}$
denote the index where $|a_{i}|^{1/2}|c_{i}|^{-1}$ is minimized. Note in
particular that $c_{j(\mathbf{c})}\neq 0$. We have

$E_{\mathbf{a},1}(B)\ll\frac{\eta^{-4}B^{1/2+\epsilon}}{|A|^{1/2}}\sum_{j=1}^{4}|a_{j}|^{1/2}\sum_{\begin{subarray}{c}\mathbf{c}\in\mathbb{Z}^{4}\backslash\\{\mathbf{0}\\}\\\
|c_{i}|\ll C_{i}\\\ j(\mathbf{c})=j\end{subarray}}\frac{1}{|c_{j}|}\sum_{q\ll
Q}q^{-3}S_{q,\mathbf{a}}(\mathbf{c}).$

An application of [browningbundle, Lemma 4.7] with $x=Q$ yields

$\sum_{\begin{subarray}{c}\mathbf{c}\in\mathbb{Z}^{4}\backslash\\{\mathbf{0}\\}\\\
|c_{i}|\ll C_{i}\\\ j(\mathbf{c})=j\end{subarray}}\frac{1}{|c_{j}|}\sum_{q\ll
Q}q^{-3}S_{q,\mathbf{a}}(\mathbf{c})\ll
B^{\epsilon}\sum_{\begin{subarray}{c}\mathbf{c}\in\mathbb{Z}^{4}\backslash\\{\mathbf{0}\\}\\\
|c_{i}|\ll
C_{i}\end{subarray}}\frac{1}{|c_{j}|}\prod_{i=1}^{4}\gcd(a_{i},c_{i})^{1/2}.$

For $i\neq j$, we have

$\sum_{0\leqslant|c_{i}|\ll C_{i}}\gcd(a_{i},c_{i})^{1/2}\ll
C_{i}B^{\epsilon},$

and for $i=j$, we have

$\sum_{0<|c_{j}|\ll C_{j}}\frac{\gcd(a_{j},c_{j})^{1/2}}{|c_{j}|}\ll
B^{\epsilon}.$

Hence

$E_{\mathbf{a},1}(B)\ll\frac{\eta^{-4}B^{1/2+\epsilon}}{|A|^{1/2}}\sum_{j=1}^{4}|a_{j}|^{1/2}\prod_{i\neq
j}C_{i}\ll\eta^{-7}B^{1/2+\epsilon}.$

####  4.2.2. Analysis of $E_{\mathbf{a},2}(B)$

We write
$E_{\mathbf{a},2}(B)=E_{\mathbf{a},2}^{(1)}(B)+E_{\mathbf{a},2}^{(2)}(B)$,
where

$\displaystyle E_{\mathbf{a},2}^{(1)}(B)$
$\displaystyle=\frac{1}{B}\sum_{\begin{subarray}{c}\mathbf{c}\in\mathbb{Z}^{4}\backslash\\{\mathbf{0}\\}\\\
|c_{i}|\ll C_{i}\\\
F_{\mathbf{a}}^{*}(\mathbf{c})=0\end{subarray}}\sum_{q\leqslant
M}q^{-4}S_{q,\mathbf{a}}(\mathbf{c})I_{q,\mathbf{a}}(\mathbf{c}),$
$\displaystyle E_{\mathbf{a},2}^{(2)}(B)$
$\displaystyle=\frac{1}{B}\sum_{\begin{subarray}{c}\mathbf{c}\in\mathbb{Z}^{4}\backslash\\{\mathbf{0}\\}\\\
|c_{i}|\ll C_{i}\\\
F_{\mathbf{a}}^{*}(\mathbf{c})=0\end{subarray}}\sum_{M\leqslant q\ll
Q}q^{-4}S_{q,\mathbf{a}}(\mathbf{c})I_{q,\mathbf{a}}(\mathbf{c}),$

For a real parameter $M$ to be determined later. To bound
$E_{\mathbf{a},2}^{(1)}(B)$, we apply Lemma 4.12 to obtain

$E_{2,a}(P)\ll\frac{\eta^{-4}B^{1/2+\epsilon}}{|A|^{1/2}}\sum_{j=1}^{4}\sum_{\begin{subarray}{c}\mathbf{c}\in\mathbb{Z}^{4}\backslash\\{\mathbf{0}\\}\\\
|c_{i}|\ll C_{i}\\\
j(\mathbf{c})=j\end{subarray}}\frac{|a_{j}|^{1/2}}{|c_{j}|}\sum_{q\leqslant
M}q^{-3}|S_{q,\mathbf{a}}(\mathbf{c})|.$

By [browningbundle, Lemma 4.5], we have $|S_{q,\mathbf{a}}(\mathbf{c})|\ll
q^{3}\prod_{i=1}^{4}\gcd(a_{i},c_{i})^{1/2}$, and hence summing trivially over
$q$ and proceeding as before, we obtain

$E_{\mathbf{a},2}^{(1)}(B)\ll\eta^{-7}B^{1/2+\epsilon}M.$

To bound $E_{\mathbf{a},2}^{(2)}(B)$ we require some cancellation from the sum
over $q$. To achieve this, we use summation by parts, as in the treatment of
the main term in Proposition 4.8, and then apply Lemma 4.7 to obtain a better
estimate for the exponential sums. We also perform the $q$-sum over
$R\leqslant q\leqslant 2R$ and later take a dyadic sum over $M\leqslant R\ll
Q$. Summation by parts yields

$\sum_{R\leqslant q\leqslant
2R}q^{-4}S_{q,\mathbf{a}}(\mathbf{c})I_{q,\mathbf{a}}(\mathbf{c})\ll-\Sigma(R;\mathbf{c})\frac{I_{R,\mathbf{a}}(\mathbf{c})}{R}-\int_{R}^{2R}\Sigma(x;\mathbf{c})\frac{\partial}{\partial
x}\left(\frac{I_{x,\mathbf{a}}(\mathbf{c})}{x}\right)\,\mathrm{d}x.$ (4.37)

Therefore, from Lemma 4.6, we obtain

$\frac{1}{B}\sum_{R\leqslant q\leqslant
2R}q^{-4}S_{q,\mathbf{a}}(\mathbf{c})I_{q,\mathbf{a}}(\mathbf{c})\ll\frac{\eta^{-1}P_{1}\cdots
P_{4}}{BR}\sup_{R\leqslant x\leqslant 2R}|\Sigma(x;\mathbf{c})|.$ (4.38)

We recall the definition of $\Delta_{\mathbf{c}}(\mathbf{a})$ from (4.28).
Using the estimate for $|\Sigma(x;\mathbf{c})|$ from Lemma 4.7, we have

$\displaystyle E_{\mathbf{a},2}^{(2)}(B)$
$\displaystyle\ll\frac{\eta^{-1}P_{1}\cdots
P_{4}|A|^{3/16}}{B}\sum_{\begin{subarray}{c}R\textrm{ dyadic}\\\ M\leqslant
R\ll
Q\end{subarray}}R^{-1/2+\epsilon}\sum_{\begin{subarray}{c}\mathbf{c}\in\mathbb{Z}^{4}\backslash\\{\mathbf{0}\\}\\\
|c_{i}|\ll C_{i}\\\
F_{\mathbf{a}}^{*}(\mathbf{c})=0\end{subarray}}\Delta_{\mathbf{c}}(\mathbf{a})^{3/8}$
$\displaystyle\ll\frac{\eta^{-1}B^{1+\epsilon}}{M^{1/2}|A|^{5/16}}\sum_{\begin{subarray}{c}\mathbf{c}\in\mathbb{Z}^{4}\backslash\\{\mathbf{0}\\}\\\
|c_{i}|\ll C_{i}\\\
F_{\mathbf{a}}^{*}(\mathbf{c})=0\end{subarray}}\Delta_{\mathbf{c}}(\mathbf{a})^{3/8}.$
(4.39)

It is possible to obtain the asymptotic formula from Theorem 1.1 (albeit with
a smaller power saving) by bounding the sum in (4.39) trivially by
$C_{1}\cdots C_{4}\Delta^{3/8}$. However, in order to obtain the error terms
claimed in Theorem 4.2, we now make use of the constraint
$F^{*}_{\mathbf{a}}(\mathbf{c})=0$ in the $\mathbf{c}$-sum to obtain a more
refined estimate. In the following two lemmas, we adopt the notation that
$\mathbf{v}\mathbf{w}=(v_{1}w_{1},\ldots,v_{4}w_{4})$ for vectors
$\mathbf{v},\mathbf{w}\in\mathbb{Z}^{4}$.

######  Lemma 4.13.

For any $\mathbf{d},\mathbf{e}\in(\mathbb{Z}_{\neq 0})^{4}$, we have

$\Delta(\mathbf{d}\mathbf{e})\leqslant(d_{1}\cdots
d_{4})^{2}\Delta(\mathbf{e}).$

###### Proof.

Fix a prime $p$, and define
$\delta_{i}=\nu_{p}(d_{i}),\varepsilon_{i}=\nu_{p}(e_{i})$ for
$i\in\\{1,\ldots,4\\}$. Without loss of generality, we may assume that
$\varepsilon_{1}\leqslant\cdots\leqslant\varepsilon_{4}$. Then

$\displaystyle\nu_{p}(\Delta(\mathbf{d}\mathbf{e}))$
$\displaystyle=\sum_{i=1}^{4}\min\left(\delta_{i}+\varepsilon_{i},\sum_{j\neq
i}(\delta_{j}+\varepsilon_{j})\right)$
$\displaystyle\leqslant\sum_{i=1}^{3}(\delta_{i}+\varepsilon_{i})+\min\left(\delta_{4}+\varepsilon_{4},\sum_{i=1}^{3}(\delta_{i}+\varepsilon_{i})\right),$

and

$\nu_{p}(\Delta(\mathbf{e}))=\sum_{i=1}^{3}\varepsilon_{i}+\min\left(\varepsilon_{4},\sum_{i=1}^{3}\varepsilon_{i}\right).$

Therefore

$\displaystyle\nu_{p}(\Delta(\mathbf{d}\mathbf{e}))-\nu_{p}(\Delta(\mathbf{e}))$
$\displaystyle\leqslant\begin{cases}\sum_{i=1}^{3}2\delta_{i},&\textrm{ if
}\varepsilon_{1}+\varepsilon_{2}+\varepsilon_{3}\leqslant\varepsilon_{4},\\\
\sum_{i=1}^{4}\delta_{i},&\textrm{ otherwise.}\end{cases}$
$\displaystyle\leqslant\nu_{p}((d_{1}\cdots d_{4})^{2}).$

Taking a product over all primes $p$ completes the proof of the lemma. ∎

######  Lemma 4.14.

We have

$\sum_{\begin{subarray}{c}\mathbf{c}\in\mathbb{Z}^{4}\backslash\\{\mathbf{0}\\}\\\
|c_{i}|\ll C_{i}\\\
F_{\mathbf{a}}^{*}(\mathbf{c})=0\end{subarray}}\Delta_{\mathbf{c}}(\mathbf{a})^{3/8}\ll\eta^{-3}B^{\epsilon}\Delta^{1/2}.$

###### Proof.

For a nonzero integer $m$, we define $\operatorname{sqf}(m)$ to be the
smallest positive integer $r$ such that $|m|/r$ is a square. For
$i\in\\{1,\ldots,4\\}$, we decompose $a_{i}$ into a product
$a_{i}=e_{i}n_{i}k_{i}^{2}$, where

$e_{i}=\gcd\left(a_{i},\prod_{j\neq i}a_{j}\right),\quad
n_{i}=\operatorname{sqf}(a_{i}/e_{i}),\quad k_{i}^{2}=a_{i}/(e_{i}n_{i}).$

By definition, we have $\prod_{i=1}^{4}e_{i}=\Delta$. For any
$i\in\\{1,\ldots,4\\}$, it is clear that

$F^{*}_{\mathbf{a}}(\mathbf{c})=0\implies a_{i}|c_{i}^{2}\prod_{j\neq
i}a_{j}\implies n_{i}k_{i}^{2}|c_{i}^{2}\implies n_{i}k_{i}|c_{i}.$ (4.40)

We divide up the sum over $\mathbf{c}$ according to how many of the
coordinates $c_{1},\ldots,c_{4}$ are equal to zero. At most two of the
coordinates can be zero, due to the assumptions $\mathbf{c}\neq 0$ and
$F^{*}_{\mathbf{a}}(\mathbf{c})=0$. Up to reordering the indices, we obtain

$\sum_{\begin{subarray}{c}\mathbf{c}\in\mathbb{Z}^{4}\backslash\\{\mathbf{0}\\}\\\
|c_{i}|\ll C_{i}\\\
F_{\mathbf{a}}^{*}(\mathbf{c})=0\end{subarray}}\Delta_{\mathbf{c}}(\mathbf{a})^{3/8}\ll
T_{0}+T_{1}+T_{2},$ (4.41)

where

$\displaystyle T_{0}=\sum_{\begin{subarray}{c}\mathbf{c}\in(\mathbb{Z}_{\neq
0})^{4}\\\ |c_{i}|\ll C_{i}\\\
F_{\mathbf{a}}^{*}(\mathbf{c})=0\end{subarray}}\Delta_{\mathbf{c}}(\mathbf{a})^{3/8},T_{1}=\sum_{\begin{subarray}{c}\mathbf{c}\in(\mathbb{Z}_{\neq
0})^{3}\\\ |c_{i}|\ll C_{i}\\\
F_{\mathbf{a}}^{*}((\mathbf{c},0))=0\end{subarray}}\Delta_{(\mathbf{c},0)}(\mathbf{a})^{3/8},T_{2}=\sum_{\begin{subarray}{c}\mathbf{c}\in(\mathbb{Z}_{\neq
0})^{2}\\\ |c_{i}|\ll C_{i}\\\
F_{\mathbf{a}}^{*}((\mathbf{c},0,0))=0\end{subarray}}\Delta_{(\mathbf{c},0,0)}(\mathbf{a})^{3/8}$

We begin by studying $T_{0}$. Given that $F^{*}_{\mathbf{a}}(\mathbf{c})=0$,
we only need to take the sum over $c_{1},c_{2}$ and $c_{3}$, because this
implicitly determines (up to sign) the value of $c_{4}$. Together with (4.40),
this implies that

$\displaystyle T_{0}$
$\displaystyle\leqslant\sum_{\begin{subarray}{c}c_{1},c_{2},c_{3}\in\mathbb{Z}_{\neq
0}\\\ |c_{i}|\ll C_{i}\\\
n_{i}k_{i}|c_{i}\end{subarray}}\Delta_{\mathbf{c}}(\mathbf{a})^{3/8}$ (4.42)
$\displaystyle\leqslant\sum_{\begin{subarray}{c}c_{1},c_{2},c_{3}\in\mathbb{Z}_{\neq
0}\\\ |c_{i}|\ll
C_{i}/(n_{i}k_{i})\end{subarray}}\prod_{i=1}^{4}\gcd\left(n_{i}k_{i}\gcd(a_{i},c_{i}),\prod_{j\neq
i}n_{j}k_{j}\gcd(a_{j},c_{j})\right)^{3/8}$
$\displaystyle\leqslant\sum_{\begin{subarray}{c}\mathbf{d}\in(\mathbb{Z}_{\neq
0})^{4}\\\ d_{i}\ll C_{i}/(n_{i}k_{i}),\\\
d_{i}|a_{i}\end{subarray}}\sum_{\begin{subarray}{c}c_{1},c_{2},c_{3}\in\mathbb{Z}_{\neq
0}\\\ |c_{i}|\ll C_{i}/(n_{i}k_{i})\\\
d_{i}|c_{i}\end{subarray}}\Delta(\mathbf{d}\mathbf{n}\mathbf{k})^{3/8}$
$\displaystyle\ll\left(\prod_{i=1}^{3}\frac{C_{i}}{n_{i}k_{i}}\right)\sum_{\begin{subarray}{c}\mathbf{d}\in(\mathbb{Z}_{\neq
0})^{4}\\\ d_{i}\ll C_{i}/(n_{i}k_{i})\\\
d_{i}|a_{i}\end{subarray}}\Delta(\mathbf{n}\mathbf{k})^{3/8}\prod_{i=1}^{4}d_{i}^{-1/4},$
(4.43)

where in the last line we have applied Lemma 4.13. However,
$\Delta(\mathbf{n}\mathbf{k})=1$ by the definition of $e_{1},\ldots,e_{4}$.
There are $O(A^{\epsilon})$ choices for $\mathbf{d}$ in the sum in (4.43), and
each summand is bounded by $1$. Therefore

$T_{0}\ll\left(\prod_{i=1}^{3}\frac{C_{i}}{n_{i}k_{i}}\right)A^{\epsilon}.$
(4.44)

Returning to (4.44) and recalling that
$C_{i}=\eta^{-1}B^{\epsilon}|a_{i}|^{1/2}=\eta^{-1}B^{\epsilon}(e_{i}n_{i})^{1/2}k_{i}$,
we conclude that

$\displaystyle T_{0}$
$\displaystyle\ll\eta^{-3}B^{\epsilon}\left(\prod_{i=1}^{3}\frac{|a_{i}|^{1/2}}{n_{i}k_{i}}\right)$
$\displaystyle\leqslant\eta^{-3}B^{\epsilon}\Delta^{1/2}.$

The approach for estimating $T_{1}$ and $T_{2}$ is very similar, so we will
focus on the main differences. It is sufficient to only use the divisibility
conditions from (4.40) in these cases. For $T_{1}$, all the sums in the above
argument will be over vectors indexed by $\\{1,2,3\\}$, because we have fixed
$c_{4}=0$. We have

$\displaystyle T_{1}$
$\displaystyle\ll\left(\prod_{i=1}^{3}\frac{C_{i}}{n_{i}k_{i}}\right)A^{\epsilon}\Delta(n_{1}k_{1},n_{2}k_{2},n_{3}k_{3},a_{4})^{3/8}$
$\displaystyle=\left(\prod_{i=1}^{3}\frac{C_{i}}{n_{i}k_{i}}\right)A^{\epsilon}$
$\displaystyle\ll\eta^{-3}B^{\epsilon}\Delta^{1/2}.$

For $T_{2}$, we only take sums over vectors indexed by $\\{1,2\\}$, since we
have fixed $c_{3}=c_{4}=0$. We have

$\displaystyle T_{2}$
$\displaystyle\ll\left(\prod_{i=1}^{2}\frac{C_{i}}{n_{i}k_{i}}\right)A^{\epsilon}\Delta(n_{1}k_{1},n_{2}k_{2},a_{3},a_{4})^{3/8}$
$\displaystyle=\left(\prod_{i=1}^{2}\frac{C_{i}}{n_{i}k_{i}}\right)A^{\epsilon}(a_{3},a_{4})^{3/4}$
$\displaystyle\leqslant\eta^{-2}B^{\epsilon}(e_{1}e_{2})^{1/2}(e_{3}e_{4})^{3/8}$
$\displaystyle\ll\eta^{-2}B^{\epsilon}\Delta^{1/2}.$

Thus each of $T_{0},T_{1},T_{2}$ is bounded by
$\eta^{-3}B^{\epsilon}\Delta^{1/2}$, as required. ∎

Recalling (4.39), we therefore have

$E_{2,\mathbf{a}}^{(2)}(B)\ll\frac{\eta^{-4}B^{1+\epsilon}\Delta^{1/2}}{M^{1/2}|A|^{5/16}}.$

To combine with the error term $E_{2,\mathbf{a}}^{(1)}(B)$, we make the choice

$M=\eta B^{1/3}\Delta^{1/3}|A|^{-5/24}.$

This yields the estimate

$E_{\mathbf{a}}(B)\ll\frac{\eta^{-6}B^{5/6+\epsilon}\Delta^{1/3}}{|A|^{5/24}}+\eta^{-7}B^{1/2+\epsilon}.$
(4.45)

This estimate is larger than the error term from Proposition 4.8. Combining
with Proposition 4.8 this completes the proof of Theorem 4.3.

The final ingredient in the proof of Theorem 4.2 is an estimate for the
singular series $\mathfrak{G}_{\mathbf{a}}$.

######  Lemma 4.15.

Let $\mathbf{a}\in(\mathbb{Z}_{\neq 0})^{4}$ and assume that $A\neq\square$.
Then

$|\mathfrak{G}_{\mathbf{a}}|\ll|A|^{\epsilon}\Delta^{1/4}.$

###### Proof.

Beginning with the definition of the singular series, we have

$\mathfrak{G}_{\mathbf{a}}=\sum_{q=1}^{\infty}q^{-4}S_{q,\mathbf{a}}(\mathbf{0})=\sum_{q\leqslant
T}q^{-4}S_{q,\mathbf{a}}(\mathbf{0})+\sum_{q>T}q^{-4}S_{q,\mathbf{a}}(\mathbf{0})$

for any $T\geqslant 1$. For the sum over $q>T$, we apply partial summation and
Lemma 4.7. We have

$\displaystyle\sum_{q>T}q^{-4}S_{q,\mathbf{a}}(\mathbf{0})$
$\displaystyle=\frac{\Sigma(T;\mathbf{0})}{T}-\int_{T}^{\infty}\Sigma(x;\mathbf{0})\frac{\partial}{\partial
x}(x^{-1})\,\mathrm{d}x$ $\displaystyle\ll
T^{-1/2+\epsilon}|A|^{3/16+\epsilon}\Delta^{3/8}.$

By choosing $T=|A|^{2}$, we can ensure that the contribution from this region
is negligible.

For the remaining sum over $q\leqslant T$, we follow a similar argument to the
proof of Lemma 4.7. Using the multiplicativity of
$S_{q,\mathbf{a}}(\mathbf{0})$ in $q$, we have

$\displaystyle\sum_{q\leqslant T}q^{-4}S_{q,\mathbf{a}}(\mathbf{0})$
$\displaystyle\ll\left(\sum_{\begin{subarray}{c}q_{1}\leqslant T\\\
\gcd(q_{1},2A)=1\end{subarray}}\left(\frac{A}{q_{1}}\right)\frac{\varphi(q_{1})}{q_{1}^{2}}\right)\left(\sum_{\begin{subarray}{c}q_{2}\leqslant
T/q_{1}\\\
q_{2}|(2A)^{\infty}\end{subarray}}q_{2}^{-4}S_{q_{2},\mathbf{a}}(\mathbf{0})\right)$
$\displaystyle\ll
T^{\epsilon}|A|^{\epsilon}\max_{q|(2A)^{\infty}}\left(\frac{\prod_{i=1}^{4}\gcd(q,a_{i})^{1/2}}{q}\right),$

where in the second line we have estimated the sum over $q_{1}$ trivially, and
the sum over $q_{2}$ by applying [browningbundle, Lemma 4.5]. We let $m_{i,p}$
denote the $i$th smallest element of $\nu_{p}(a_{1}),\ldots,\nu_{p}(a_{4})$.
We define

$L_{p}=\nu_{p}\left(\frac{\prod_{i=1}^{4}\gcd(q,a_{i})}{q^{2}}\right),\quad
k_{p}=\nu_{p}(q).$

Then

$L_{p}=\sum_{j=1}^{4}\min(k_{p},m_{i,p})-2k_{p}.$

The maximum possible value of $L_{p}$ is attained by choosing $k_{p}=m_{2,p}$,
and so $L_{p}\leqslant m_{1,p}+m_{2,p}$. We have

$\nu_{p}(\Delta)=m_{1,p}+m_{2,p}+m_{3,p}+\min(m_{1,p}+m_{2,p}+m_{3,p},m_{4,p})\geqslant
2(m_{1,p}+m_{2,p}),$

and so $L_{p}\leqslant\nu_{p}(\Delta)/2$. Taking a product over $p|2A$
completes the proof of the lemma. ∎

##  5\. Proof of Theorem 1.1

We recall that the quantity $N_{\mathbf{a}}(B)$ studied in Section 4 did not
involve any primitivity conditions. In order to insert the condition
$\gcd(z_{1},\ldots,z_{4})=1$, we apply an inclusion-exclusion argument which
is a special case of [browning2019arithmetic, Section 3].

We begin by fixing some notation which we will use throughout this section.
Let $z_{1},\ldots,z_{4}$ denote nonzero squareful numbers, and
$x_{1},\ldots,x_{4}\in\mathbb{N}$, $y_{1},\ldots,y_{4}\in\mathbb{Z}_{\neq 0}$
the unique integers such that $z_{i}=x_{i}^{2}y_{i}^{3}$ and $y_{i}$ is
square-free for all $i$. Let $A=a_{1}\cdots a_{4},R=r_{1}\cdots
r_{4},S=s_{1}\cdots s_{4}$ and $Y=y_{1}\cdots y_{4}$. For vectors
$\mathbf{v},\mathbf{w}\in\mathbb{N}^{4}$, we write $\mathbf{v}|\mathbf{w}$ to
mean $v_{i}|w_{i}$ for all $i=1,\ldots,4$. For an integer $m$, we write
$\mathbf{v}|m$ for $v_{i}|m$ for all $i=1,\ldots,4$, and $\gcd(m,\mathbf{v})$
for $(\gcd(m,v_{1}),\ldots,\gcd(m,v_{4}))$. We also define $\mathbf{v}^{[m]}$
to be the vector in $\mathbb{N}^{4}$ with $i$th coordinate
$v_{i}^{[m]}=\prod_{p|m}p^{\nu_{p}(v_{i})}$, where $\nu_{p}$ denotes the
$p$-adic valuation.

We recall from Proposition 3.1 that

$N(B)=N(D,B)+O(B^{1+\epsilon}D^{-1/12}),$ (5.1)

where $N(B)$ is defined in (1.3) and $N(D,B)$ is defined in the same way but
with the additional constraint $|Y|\leqslant D$. For
$\mathbf{r},\mathbf{s}\in\mathbb{N}^{4}$ and $s_{0}\in\mathbb{N}$, we define

$\displaystyle\mathscr{N}(B;\mathbf{r},\mathbf{s},s_{0})=\left\\{\mathbf{z}\in(\mathbb{Z}_{\neq
0})^{4}:\begin{tabular}[]{l}$|\mathbf{z}|\leqslant B,|Y|\leqslant
D,Y\neq\square$,\\\
$z_{1}+\cdots+z_{4}=0,\mathbf{r}|\mathbf{y},\mathbf{s}|\mathbf{x},s_{0}|\mathbf{x}$\end{tabular}\right\\}.$