# Optimal quantitative weak approximation for projective quadrics

Zhizhong Huang and Damaris Schindler and Alec Shute  Institute of Mathematics,
Academy of Mathematics and Systems Science, Chinese Academy of Sciences,
Beijing, 100190, China<EMAIL_ADDRESS>Mathematisches Institut,
Georg-August-Universität Göttingen, Bunsenstrasse 3–5, 37073, Göttingen,
Germany<EMAIL_ADDRESS>School of Mathematics,
University of Bristol, Woodland Road, Bristol, UK<EMAIL_ADDRESS>
###### Abstract.

We derive asymptotic formulas for the number of rational points on a smooth
projective quadratic hypersurface of dimension at least three inside of a
shrinking adelic open neighbourhood. This is a quantitative version of weak
approximation for quadrics and allows us to deduce the best growth rate of the
size of such an adelic neighbourhood for which equidistribution is preserved.

###### Contents

  1. 1 Introduction
  2. 2 Set-up for the $\delta$-method
  3. 3 The oscillatory integrals
  4. 4 Quadratic exponential sums
  5. 5 The contribution from $\boldsymbol{c}\neq\boldsymbol{0}$
  6. 6 The contribution from $\boldsymbol{c}=\boldsymbol{0}$
  7. 7 Proof of main theorems
  8. A Rational approximations on quadrics

##  1\. Introduction

The main goal of this article is to study the quantitative distribution of
rational points on quadrics over the rational numbers. More precisely, for
$n\geqslant 2$ we consider a quadratic form
$F(x_{0},\ldots,x_{n})\in\mathbb{Z}[x_{0},\ldots,x_{n}]$ in $n+1$ variables
over the integers and ask for arithmetic properties of the variety
$V\subseteq\mathbb{P}_{\mathbb{Q}}^{n}$ given by $F=0$. From now on we assume
that the quadratic form $F$ has full rank, i.e. the variety $V$ is non-
singular. It is well known by the celebrated Hasse-Minkowski theorem that $V$
satisfies the Hasse principle and weak approximation.

Weak approximation for $V\subseteq\mathbb{P}_{\mathbb{Q}}^{n}$ implies in
particular that the set of rational points is infinite, if there are adelic
points. In order to study the density of rational points on $V$, we may
introduce a height function and count rational points on $V(\mathbb{Q})$ of
height bounded by $B$ where $B$ tends to infinity. The behavior of this
counting function is well studied and the asymptotic behavior is compatible
with Manin’s conjecture for rational points on Fano varieties. The goal of
this article is to study a quantitative form of weak approximation for
quadrics. More precisely we are interested in counting rational points on $V$
in a shrinking open neighborhood of the adelic points
$V(\mathbf{A}_{\mathbb{Q}})$, and investigate how quickly the neighborhood can
shrink when considering points of height bounded by $B$ with $B$ tending to
infinity. With this our result fits into the general framework of Manin’s
conjecture on counting rational points of bounded height on Fano varieties,
equidistribution questions for rational points on varieties and in particular
questions on quantitative weak approximation.

More generally, let $X$ be a smooth projective variety over ${\mathbb{Q}}$.
The density of the set of rational points $X({\mathbb{Q}})$ is one of the
central themes of Diophantine geometry. To exclude the trivial case we shall
assume $X$ is everywhere locally soluble, i.e., the _adelic space_
$X(\mathbf{A}_{\mathbb{Q}}):=X({\mathbb{R}})\times\prod_{p<\infty}X({\mathbb{Q}}_{p})$
is non-empty. We say that $X$ satisfies _weak approximation_ if
$X({\mathbb{Q}})$ is dense in $X(\mathbf{A}_{\mathbb{Q}})$. See [8] for a
general conjecture of Colliot-Thélène concerning rationally connected
varieties. Weak approximation for $X$ implies in particular that
$X({\mathbb{Q}})$ is dense in the Zariski topology. An effective way of
measuring this property is to attach $H:X({\mathbb{Q}})\to{\mathbb{R}}_{>0}$ a
height function and to study asymptotic growth of points of bounded height. In
the setting of Fano varieties, Manin’s conjecture [1, 12] provides a broad
framework for the asymptotic behavior of points of bounded height outside of
an exceptional subset. Refining Manin’s conjecture, a general equidistribution
principle proposed by Peyre [24] predicts that, if $X$ is Fano and $X$
satisfies weak approximation, upon removing some exceptional set
${\mathscr{M}}\subseteq X({\mathbb{Q}})$, the set $\\{P\in
X({\mathbb{Q}})\setminus{\mathscr{M}}:H(P)\leqslant B\\}$, as $B\to\infty$,
becomes equidistributed in $X(\mathbf{A}_{\mathbb{Q}})$. The question which
exceptional set of rational points one has to remove in Manin’s conjecture has
received much attention during the last years [25, 18].

The Hardy-Littlewood circle method has proved to be a particularly flexible
and useful tool to study both Manin’s conjecture as well as Peyre’s
predicition on equidistribution for rational points. This has for example been
executed for smooth hypersurfaces and more generally smooth complete
intersections in projective space of sufficiently large dimension compared to
the degree in work of Birch [2] and Browning and Heath-Brown [4], as well as
for certain hypersurfaces in toric varieties [30, 20, 21, 26]. It is an
ongoing challenge to establish results of this type assuming only a smaller
number of variables, for some improvements in this direction see for example
work of Browning and Prendiville [6] and work of Myerson [22, 23].

One can ask similar questions to the above for affine varieties and integral
points on affine varieties. For work concerning integral points on affine
varieties, see for example [3] for symmetric varieties and [11] for Linnik-
type problems. In another direction Sardari [28] studied quantitative strong
approximation questions for affine quadrics. Sardari’s result [28, Theorem
1.2] concerns Linnik-type problems about the family of affine quadrics
$(F=N)\subseteq{\mathbb{A}}^{n+1}$ indexed by a growing integer parameter $N$,
where the condition at the real place is imposed via projecting onto the unit
affine quadric defined by $F=1$. Our goal in this article is to study
quantitative approximation questions for projective quadrics, where the
condition at the real place is placed in the spirit of weak approximation at
the real place of the single fixed projective quadric
$(F=0)\subseteq{\mathbb{P}}^{n}$. Similarly, Sardari and us handle these
questions for quantitative strong and weak approximation conditions at non-
archimedean places, but for simplicity of exposition we restrict for a moment
to the real place.

Our general strategy for our main result is to first pass to the affine cone
and apply the circle method to count integral points of height bounded by say
$B$ on the affine cone, which are at the same time restricted to a
neighborhood of radius $R^{-1}$ around a given real point. We consider $B$ and
$R$ as two real parameters which both tend to infinity and for which
$R<B^{\frac{1}{2}-\varepsilon}$. In passing back from the affine cone to the
projective setting, we use the standard procedure of Moebius inversion.
However, this poses major new challenges in our situation. In order to apply
Moebius inversion, we also need to understand the number of integral points on
the affine cone of height bounded by $B^{\prime}$ where $B^{\prime}$ is any
real number less than $B$ and where the points are still restricted to
neighborhoods of size $R^{-1}$ for the same parameter $R$ which we started
with, i.e. we cannot assume that $R<B^{\prime\frac{1}{2}-\varepsilon}$ for
these choices of heights $B^{\prime}$. To solve this problem, we consider
three ranges of parameters of heights $B^{\prime}$. In the first range where
$B^{\prime}$ is relatively large, we apply the circle method to find actual
asymptotics for our counting function. In the range where $B^{\prime}$ is
still somewhat large but significantly smaller than $B$ we obtain upper bounds
for the corresponding counting function again using the delta method. In the
last range for $B^{\prime}$ relatively small, we complement our earlier
results with lattice point counting techniques for upper bounds.

Our results on quantitative weak approximation have applications in the
setting of Diophantine approximation on algebraic varieties. In particular our
results imply upper bounds for the _approximation constants_ as introduced by
work of McKinnon–M. Roth [19] for projective quadrics. We discuss these
applications and connections in the appendix of this article.

###  1.1. Main counting result for the projective quadric

We now come to set up the terminology to state our results precisely. For this
let $n\geqslant 3$ and $F\in{\mathbb{Z}}[X_{0},\ldots,X_{n}]$ be a non-
degenerate quadratic form in $n+1$ variables which defines a smooth projective
hypersurface $V=(F=0)\subseteq{\mathbb{P}}_{\mathbb{Q}}^{n}$ over
${\mathbb{Q}}$, with the integral model
${\mathscr{V}}\subseteq{\mathbb{P}}^{n}_{{\mathbb{Z}}}$ also defined by $F$.

Let us first prescribe several local conditions in more detail which allow the
size of adelic sets to shrink. We start by the one for the real place. Let us
fix a point $\boldsymbol{\xi}\in V({\mathbb{R}})$, and fix
$g_{\boldsymbol{\xi}}:V({\mathbb{R}})\dashrightarrow{\mathbb{R}}^{n-1}$ a
local diffeomorphism which sends $\boldsymbol{\xi}$ to $\boldsymbol{0}$. We
also fix an $(n-1)$-dimensional bounded real neighbourhood of $\boldsymbol{0}$
in ${\mathbb{R}}^{n-1}$, denoted by $U_{0}$. For a real parameter $R\geqslant
1$, the family

$\left({\mathscr{U}}(R,\boldsymbol{\xi}):=g_{\boldsymbol{\xi}}^{-1}(R^{-1}U_{0})\right)_{R\geqslant
1}$ (1.1)

consisting of real neighbourhoods “of diameter $R^{-1}$” forms a topological
basis for the real point $\boldsymbol{\xi}$ inside of $V({\mathbb{R}})$.
Consequently, as $R\to\infty$ the real zoom condition
${\mathscr{U}}(R,\boldsymbol{\xi})\cap V({\mathbb{Q}})$ captures points of
$V({\mathbb{Q}})$ approximating $\boldsymbol{\xi}$ in the real locus.

We next describe zoom conditions for the non-archimedean places. Let $L>0$ be
an integer. For every prime $p\mid L$, we let
$\boldsymbol{\Lambda}_{p}\in{\mathscr{V}}({\mathbb{Z}}_{p})$ and
$\boldsymbol{\Lambda}:=(\boldsymbol{\Lambda}_{p})_{p\mid L}$. Write
$m_{p}:=\operatorname{ord}_{p}(L)$ and define

${\mathscr{D}}_{p}(L,\boldsymbol{\Lambda}_{p}):=\\{x_{p}\in{\mathscr{V}}({\mathbb{Z}}_{p}):x_{p}\equiv\boldsymbol{\Lambda}_{p}\bmod
p^{m_{p}}\\}.$

If $m_{p}\to\infty$ then points in
$V({\mathbb{Q}})\cap{\mathscr{D}}_{p}(L,\boldsymbol{\Lambda}_{p})$
$p$-adically approximate $\boldsymbol{\Lambda}_{p}$, and so are said to
satisfy a _$p$ -adic zoom condition_. The set

${\mathscr{D}}(L,\boldsymbol{\Lambda}):=\prod_{p\mid
L}{\mathscr{D}}_{p}(L,\boldsymbol{\Lambda}_{p})\times\prod_{p\nmid
L}V({\mathbb{Q}}_{p})\subseteq\prod_{p<\infty}V({\mathbb{Q}}_{p})$

is a non-empty finite adelic open neighbourhood of $V$.

The set
${\mathscr{U}}(R,\boldsymbol{\xi})\times{\mathscr{D}}(L,\boldsymbol{\Lambda})\subseteq
V(\mathbf{A}_{\mathbb{Q}})$ is a non-empty open adelic set. We fix a height
function
$H_{\boldsymbol{\xi}}:{\mathbb{P}}^{n}({\mathbb{Q}})\to{\mathbb{R}}_{>0}$
relative to the line bundle ${\mathscr{O}}(1)$ which depends on the real point
$\boldsymbol{\xi}$. We want to estimate the number of rational points of $V$
of bounded height that “lie in $U_{0}$ after scaling by $R$” and
simultaneously “specialise to $\boldsymbol{\Lambda}$ modulo $L$”. So we
consider the counting function

${\mathscr{N}}_{V}((R,\boldsymbol{\xi}),(L,\boldsymbol{\Lambda});B):=\\#\\{P\in
V({\mathbb{Q}})\cap({\mathscr{U}}(R,\boldsymbol{\xi})\times{\mathscr{D}}(L,\boldsymbol{\Lambda})):H_{\boldsymbol{\xi}}(P)\leqslant
B\\}.$ (1.2)

######  Theorem 1.1.

Assume $n\geqslant 4$ and $V(\mathbf{A}_{\mathbb{Q}})\neq\varnothing$. Let
$H_{\boldsymbol{\xi}},g_{\boldsymbol{\xi}},U_{0}$ be defined by (2.2) (2.3)
(2.4) respectively in Section 2.1. Assume there exists $0<\tau<1$ such that as
$B\to\infty$,

$(LR)^{2}=O(B^{1-\tau}),$ (1.3)

and assume that $R\geqslant R_{0}$, where $R_{0}$ is defined in (7.1). Then

${\mathscr{N}}_{V}((R,\boldsymbol{\xi}),(L,\boldsymbol{\Lambda});B)=\frac{B^{n-1}}{n-1}\omega^{V}_{\boldsymbol{\xi}}\left({\mathscr{U}}(R,\boldsymbol{\xi})\times{\mathscr{D}}(L,\boldsymbol{\Lambda})\right)\left(1+O_{\varepsilon,\tau}(B^{\varepsilon}E_{\tau}(B))\right).$

Here $\omega^{V}_{\boldsymbol{\xi}}$ is the Tamagawa measure (à la Peyre [24,
Définition 2.2]) on $V(\mathbf{A}_{\mathbb{Q}})$ corresponding the height
function $H_{\boldsymbol{\xi}}$, and

$E_{\tau}(B)=\begin{cases}B^{\frac{-(n-3)\tau}{5n-7}},&\textrm{ if }n\geqslant
5;\\\ B^{-2\tau/17},&\textrm{ if }n=4.\end{cases}$ (1.4)

The implied constant depends at most on $\boldsymbol{\xi}$ (apart from
$\varepsilon,\tau$) and is otherwise uniform with respect to $R,L$ and
$\boldsymbol{\Lambda}$.

Theorem 1.1 implies a quantitative version of the classical Hasse–Minkowski
theorem on weak approximation for projective quadrics, allowing the size of
the adelic open set (i.e. the parameters $R,L$) to “shrink” in terms of $B$.
Indeed (cf. Proposition 6.5),

$L^{-\dim V-\varepsilon}R^{-\dim
V}\ll_{\varepsilon}\omega^{V}_{\boldsymbol{\xi}}\left({\mathscr{U}}(R,\boldsymbol{\xi})\times{\mathscr{D}}(L,\boldsymbol{\Lambda})\right)\ll(LR)^{-\dim
V},$

and Theorem 1.1 furnishes an error term with a power-saving, subject to the
condition (1.3) on the growth of $R,L$.

The main term in Theorem 1.1 can be equally be expressed as a product of local
densities, whose form is well-known and can be achieved in different ways (see
e.g. [24, §5]). However, the key characteristic of Theorem 1.1 is that the
condition (1.3) is _optimal_ , in the sense that such an equidistribution can
fail if the growth rate of $R$ (resp. $L$) exceeds a power of $B$ strictly
greater than $\frac{1}{2}$, without further assumption on the Diophantine
properties of $\boldsymbol{\xi}$ (resp. $\boldsymbol{\Lambda}$). We refer to
the Appendix for a short discussion in view of Diophantine approximation,
notably Remarks A.5 (1).

###  1.2. Main counting result for the affine cone

Let $W\subseteq{\mathbb{A}}^{n+1}$ be the affine cone of $V$ with the integral
model ${\mathscr{W}}\subseteq{\mathbb{A}}^{n+1}_{{\mathbb{Z}}}$ defined by
$F$. Let $W^{o}\subseteq{\mathbb{A}}^{n+1}\setminus\boldsymbol{0}$ be the
punctured affine cone over $V$. We take the integral model
${\mathscr{W}}^{o}:={\mathscr{W}}\setminus\overline{\boldsymbol{0}}$ (where
$\overline{\boldsymbol{0}}$ stands for the Zariski closure of $\boldsymbol{0}$
in ${\mathbb{A}}^{n+1}_{{\mathbb{Z}}}$). Let
$\pi:{\mathbb{A}}^{n+1}\setminus\boldsymbol{0}\to{\mathbb{P}}^{n}$ be the
canonical projection map.

Let $\boldsymbol{\Gamma}\in({\mathbb{Z}}/L{\mathbb{Z}})^{n+1}$ be such that
$F(\boldsymbol{\Gamma})\equiv 0\bmod L$. We can view $\boldsymbol{\Gamma}$ as
an element of ${\mathscr{W}}({\mathbb{Z}}/L{\mathbb{Z}})$. Let
$\|\cdot\|_{\boldsymbol{\xi}}:{\mathbb{R}}^{n+1}\to{\mathbb{R}}_{\geqslant 0}$
be the norm in accordance with $H_{\boldsymbol{\xi}}$. The counting function
(1.2) is closely related to

${\mathscr{N}}_{{\mathscr{W}}}((R,\boldsymbol{\xi}),(L,\boldsymbol{\Gamma});B)\\\
:=\\#\left\\{\boldsymbol{x}\in{\mathbb{Z}}^{n+1}\setminus\boldsymbol{0}:F(\boldsymbol{x})=0,\boldsymbol{x}\equiv\boldsymbol{\Gamma}\bmod{L},\pi(\boldsymbol{x})\in{\mathscr{U}}(R,\boldsymbol{\xi}),\|\boldsymbol{x}\|_{\boldsymbol{\xi}}\leqslant
B\right\\}.$ (1.5)

We now state our main counting result about (1.5). It features a singular
series

$\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\Gamma}):=\prod_{p}\sigma_{p}({\mathscr{W}};L,\boldsymbol{\Gamma})$
(1.6)

and a singular integral ${\mathscr{I}}_{R}$, which are given by the equations
(recall that $m_{p}:=\operatorname{ord}_{p}(L)$)

$\displaystyle\sigma_{p}({\mathscr{W}};L,\boldsymbol{\Gamma})$
$\displaystyle:=\lim_{k\to\infty}\frac{\\#\\{\boldsymbol{v}\in{\mathscr{W}}({\mathbb{Z}}/p^{k}{\mathbb{Z}}):\boldsymbol{v}\equiv\boldsymbol{\Gamma}\bmod
p^{m_{p}}\\}}{p^{nk}},$ (1.7) $\displaystyle{\mathscr{I}}_{R}$
$\displaystyle:=\int_{\theta\in{\mathbb{R}}}\int_{\begin{subarray}{c}\boldsymbol{x}\in{\mathbb{R}}^{n+1}:\|\boldsymbol{x}\|_{\boldsymbol{\xi}}\leqslant
1\\\
\pi(\boldsymbol{x})\in{\mathscr{U}}(R,\boldsymbol{\xi})\end{subarray}}\textup{e}(\theta
F(\boldsymbol{x}))\operatorname{d}\boldsymbol{x}\operatorname{d}\theta.$ (1.8)

######  Theorem 1.2.

Let $\|\cdot\|_{\boldsymbol{\xi}}$ be defined by (2.1). Assume that
$\boldsymbol{\Gamma}\in{\mathscr{W}}^{o}({\mathbb{Z}}/L{\mathbb{Z}})$ and that
the same assumptions as in Theorem 1.1 hold. Then we have

${\mathscr{N}}_{{\mathscr{W}}}((R,\boldsymbol{\xi}),(L,\boldsymbol{\Gamma});B)=B^{n-1}{\mathscr{I}}_{R}\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\Gamma})\left(1+O_{\varepsilon,\tau}(B^{\varepsilon}E_{\tau}(B))\right),$

where $E_{\tau}(B)$ is given in (1.4). Here again the implied constant may
depend on $\boldsymbol{\xi}$ (apart from $\varepsilon,\tau$), but is otherwise
uniform with respect to $R,L$ and $\boldsymbol{\Gamma}$.

The case of quaternary quadratic forms (i.e. $n=3$) is more subtle and is
addressed in a separate article [15].

###  1.3. Comparisons with results in the literature and further comments

Similar forms of Theorems 1.1 & 1.2 have previously been obtained by the work
of Browning–Loughran in [5, §4] and by Kelmer–Yu in [17, §1.3].

In [5] the slightly different problem of counting smoothly weighted solutions
of $F$ whose reduction modulo $L$ lies in a given subset of local solutions is
concerned (without prescribing any real zoom condition). In this setting, the
expected order of growth is $B^{n-1}$ and $L^{-n}$ is roughly the “volume” of
the affine adelic open set defined by the congruence condition
$\boldsymbol{x}\equiv\boldsymbol{\Gamma}\bmod{L}$. Therefore, it can be
checked that [5, Theorem 4.1] produces an asymptotic formula provided that

$L^{\frac{n+1}{2}}B^{\frac{n+1}{2}+\varepsilon}=o(B^{n-1}L^{-n}),$

or in other words, $L=O(B^{\delta})$ for some
$\delta<\frac{n-3}{3n+1}=\frac{1}{3}-\frac{10}{3(3n+1)}$. (It is also
suggested therein that when $L$ is squarefree, their error term could be
improved, with the result that $L$ could grow like $B^{\delta}$ for
$\delta<\frac{1}{2}-\frac{3}{2n}$. This becomes optimal in the limit as
$n\to\infty$.) Theorem 1.2 thus improves upon [5, Theorem 4.1] in the $L$
aspect, since it allows $L$ to grow arbitrarily close to $B^{\frac{1}{2}}$ for
any $n\geqslant 4$. As explained before, $B^{\frac{1}{2}}$ is the “barrier”
for which such an equidistribution is preserved. Also here we do not require
the assumption made in [5, Theorem 4.1] that $L$ is coprime to $2\Delta_{F}$.

In [17] however, via a quite different approach and as an application of its
main result, [17, Theorem 1.7] deals with the same counting problem for the
quadric $V$ as ours, but restricted to quadratic forms of signature $(n,1)$,
for which only real zoom condition is imposed (i.e. $L=1$). The optimal growth
range for $R$ is achieved only for a sub-family of quadrics (see [17, Remark
1.3]). So Theorem 1.1 generalises and improves upon [17, Theorem 1.7] not only
covering quadrics with any signture but also in the $R$-aspect.

We would like to comment on the optimality of Theorem 1.1. In the light of the
Schmidt subspace theorem and its ultrametric generalisations, it is probable
that, upon specifying finer Diophantine approximation properties of
$\boldsymbol{\xi}$ or $\boldsymbol{\Lambda}$, the asymptotic in Theorem 1.1
would still remain true under weaker constraints on the growth of $R$ or $L$.
See also Remarks A.5 (2). However, achieving this seems to go beyond the
technical limit developed in this paper (and also the circle method of Birch’s
type [2]) – we are unable to keep track of any intrinsic approximation
properties of either $\boldsymbol{\xi}$ or $\boldsymbol{\Lambda}$.

Our approach is based upon a $\delta$-variant of the Hardy–Littlewood circle
method which goes back to Duke–Friendlander–Iwaniec [9] and is later
extensively developed by Heath-Brown [13]. adapting particularly well to
quadratic forms. The execution of the $\delta$-method leads to a certain type
of twisted quadratic exponential sums, similar to the globally defined
$S_{q}(\boldsymbol{c})$ in [13]. However, these exponential sums depend on the
newly introduced non-archimedean local condition $(L,\boldsymbol{\Lambda})$.
To obtain satisfactory control for them we work out certain refinements of
[13, §9–§11], and we need to take special care of uniformity, especially over
the “bad moduli”.

An important feature in Sardari’s work [28] is a careful construction of
smooth weight functions to capture the Linnik-type real condition in the
affine setting. In the case of projective varieties, the quantitative weak
approximation conditions lead to differently shaped regions on the affine cone
and with this we need to build a different weight function encapsulating as
many “level-lowering” effects as possible that these conditions result in,
which takes an equally crucial role for us as it did in [28]. Furthermore, the
application of the $\delta$-method requires smoothed counting functions and in
order to deduce an asymptotic for our original counting function, we need to
apply a removing of smooth weights procedure which introduces some additional
technicalities which we also discuss in detail in this article.

###  1.4. Organisation of the article

In §2, we explicitly construct smooth weight functions, with respect to which
we state a “weighted” counting result (Theorem 2.3). The remaining part of §2
discusses how the $\delta$-method is executed. In §3 and §4 we prove estimates
for the oscillatory integrals and the singular series respectively. Sections
§5 and §6 are devoted to the proof of Theorem 2.3. In §7.2 we prove Theorem
1.2 using Theorem 2.3 with the help of a removing of smooth weights procedure,
and in §7.3 we deduce Theorem 1.1 from Theorem 1.2. Section 7 also contains
upper bounds for the counting function
${\mathscr{N}}_{{\mathscr{W}}}((R,\boldsymbol{\xi}),(L,\boldsymbol{\Gamma});B)$
in the range $-1<\tau<1$ using the delta method, as well as upper bounds for
all ranges of $B,L,R$ using lattice point counting techniques. In the Appendix
we discuss several aspects from Diophantine approximation. On combining with
our main counting result, we study various approximation constants for
projective quadrics.

###  1.5. Notation and conventions

Unless otherwise specified, all implied constants are allowed to depend on the
quadratic form $F$ (and hence the quadric $V$), the real point
$\boldsymbol{\xi}\in V({\mathbb{R}})$ and the real neighbourhood $U_{0}$,
which are considered fixed throughout.

We write $\tau(n)$ for the divisor function. We write $\Delta_{F}$ for the
discriminant of the quadratic form $F$. For non-zero integers $k,A$, we use
the notation $k\mid A^{\infty}$ to mean that every prime factor of $k$ is also
a prime factor of $A$. The symbol $T\nearrow X$ within a sum means a dyadic
decomposition, i.e. $T$ runs over all powers of $2^{j}$ with $2^{j}\leqslant
X$.

##  2\. Set-up for the $\delta$-method

###  2.1. Considerations for the real place

Without loss of generality, we may assume the point
$\boldsymbol{\xi}=[\xi_{0}:\cdots:\xi_{n}]$ satisfies $\xi_{0}\neq 0$. We
begin by applying a (classical) change of variables in order to get a “nice”
coordinate system.

######  Lemma 2.1.

There exists a matrix $M\in\operatorname{GL}_{n+1}({\mathbb{R}})$, sending the
variables $\boldsymbol{x}$ to $\boldsymbol{t}:=M\boldsymbol{x}$, such that

  * •

$M\boldsymbol{\xi}=[1:0\cdots:0]$;

  * •

$F(\boldsymbol{x})=F(M^{-1}\boldsymbol{t})=t_{0}t_{1}+F_{2}(t_{2},\ldots,t_{n})$,
where $F_{2}$ is a non-degenerate quadratic form in $(n-1)$ variables.

###### Proof.

Via a slight abuse of notation we write
$\boldsymbol{\xi}=(\xi_{0},\ldots,\xi_{n})$ and recall that we have
$F(\boldsymbol{\xi})=0$. Let $B(\boldsymbol{u},\boldsymbol{v})$ be the
bilinear form associated to the quadratic form $F$. Choose a vector
$\boldsymbol{v}_{1}\in{\mathbb{R}}^{n+1}$ which is linearly independent of
$\boldsymbol{\xi}$ and satisfies $B(\boldsymbol{v}_{1},\boldsymbol{\xi})\neq
0$. For $\lambda\in{\mathbb{R}}$ we have

$F(\boldsymbol{v}_{1}+\lambda\boldsymbol{\xi})=F(\boldsymbol{v}_{1})+2\lambda
B(\boldsymbol{v}_{1},\boldsymbol{\xi}).$

Hence we can find $\lambda$ such that
$F(\boldsymbol{v}_{1}+\lambda\boldsymbol{\xi})=0$ and
$B(\boldsymbol{v}_{1}+\lambda\boldsymbol{\xi},\boldsymbol{\xi})\neq 0$. We
replace $\boldsymbol{v}_{1}$ by $\boldsymbol{v}_{1}+\lambda\boldsymbol{\xi}$.
Moreover, after multiplying $\boldsymbol{v}_{1}$ by a scalar we may assume
that $2B(\boldsymbol{v}_{1},\boldsymbol{\xi})=1$. Next consider the orthogonal
complement of $\boldsymbol{v}_{1}$ and $\boldsymbol{\xi}$ under the bilinear
form $B$ and choose a basis $\boldsymbol{v}_{2},\ldots,\boldsymbol{v}_{n}$. In
particular we have

$B(\boldsymbol{v}_{j},\boldsymbol{v}_{1})=B(\boldsymbol{v}_{j},\boldsymbol{\xi})=0,\quad
2\leqslant j\leqslant n,$

and the vectors
$\boldsymbol{\xi},\boldsymbol{v}_{1},\ldots,\boldsymbol{v}_{n}$ are a basis of
${\mathbb{R}}^{n+1}$. Now we take $M$ to be the matrix such that the columns
of $M^{-1}$ are given by
$\boldsymbol{\xi},\boldsymbol{v}_{1},\ldots,\boldsymbol{v}_{n}$. ∎

With respect to this new coordinate system $\boldsymbol{t}$, we now define the
norm $\|\cdot\|_{\boldsymbol{\xi}}$ and the height function
$H_{\boldsymbol{\xi}}$ as follows:

$\|\boldsymbol{x}\|_{\boldsymbol{\xi}}:=\max_{0\leqslant i\leqslant
n}|t_{i}(\boldsymbol{x})|,\quad\text{for
}\boldsymbol{x}\in{\mathbb{R}}^{n+1},$ (2.1)
$H_{\boldsymbol{\xi}}([x_{0}:\cdots:x_{n}]):=\|\boldsymbol{x}\|_{\boldsymbol{\xi}},\quad\text{if
}\boldsymbol{x}=(x_{0},\ldots,x_{n})\in{\mathbb{Z}}^{n+1}\text{ and
}\gcd_{0\leqslant i\leqslant n}(x_{i})=1.$ (2.2)

Hence $H_{\boldsymbol{\xi}}$ is the naive height function after a linear
change of coordinate systems.

Applying the change of variables from Lemma 2.1, we see that in the chart
$t_{0}\neq 0$, the affine tangent plane at the point $\boldsymbol{0}$ is
$T_{\boldsymbol{0}}V({\mathbb{R}})=(\frac{t_{1}}{t_{0}}=0)$. Moreover,
$\frac{t_{2}}{t_{0}},\ldots,\frac{t_{n}}{t_{0}}$ form a local coordinate
system of the hypersurface $V$ around $\boldsymbol{\xi}$. We now take the
local diffeomorphism as

$g_{\boldsymbol{\xi}}(\pi(\boldsymbol{x})):=\left(\frac{t_{2}}{t_{0}}(\boldsymbol{x}),\ldots,\frac{t_{n}}{t_{0}}(\boldsymbol{x})\right).$
(2.3)

By covering any open neighborhood of $\mathbf{0}$ by cubes, it is sufficient
to consider the case

$U_{0}=\prod_{j=2}^{n}[a_{j},b_{j}],$ (2.4)

a standard $(n-1)$-dimensional cube, where $-\infty<a_{j}<b_{j}<\infty$ for
all $2\leqslant j\leqslant n$. The real zoom condition (1.1) becomes

$R\frac{t_{j}}{t_{0}}(\boldsymbol{x})\in[a_{j},b_{j}]\textrm{ for all
}2\leqslant j\leqslant n.$ (2.5)

###  2.2. Choice of weight functions

In order to apply the $\delta$-method of Heath-Brown, we need to work with a
smoothly weighted analogue of
${\mathscr{N}}_{{\mathscr{W}}}((R,\boldsymbol{\xi}),(L,\boldsymbol{\Gamma});B)$.
For an infinitely differentiable function
$w:{\mathbb{R}}^{n+1}\rightarrow{\mathbb{R}}_{\geqslant 0}$, we define

${\mathscr{N}}_{{\mathscr{W}}}(w;(L,\boldsymbol{\Gamma})):=\sum_{\begin{subarray}{c}\boldsymbol{x}\in{\mathbb{Z}}^{n+1}\\\
F(\boldsymbol{x})=0,\boldsymbol{x}\equiv\boldsymbol{\Gamma}\bmod
L\end{subarray}}w(\boldsymbol{x}).$ (2.6)

We would like $w$ to capture the real zoom condition (2.5) and the bounded
height condition. Therefore, we let

$w_{B,R}(\boldsymbol{x})=w_{1}\left(R\frac{t_{j}}{t_{0}}(\boldsymbol{x}),j\geqslant
2\right)w_{2}\left(\frac{R^{2}}{B^{2}}F(\boldsymbol{x})\right)w_{3}\left(\frac{t_{0}(\boldsymbol{x})}{B}\right),$
(2.7)

where $w_{1}:{\mathbb{R}}^{n-1}\to[0,1],w_{2},w_{3}:{\mathbb{R}}\to[0,1]$ are
infinitely differentiable weight functions and $w_{2}(0)=1$.

Several comments on the role of $w_{1},w_{2},w_{3}$ are in order. Clearly
$w_{1}$ “mollifies” the neighbourhood $U_{0}$. Due to (2.5) and the assumption
$R\geqslant 1$, the condition $\|\boldsymbol{x}\|_{\boldsymbol{\xi}}\ll B$ is
equivalent to $|t_{0}|\ll B$. Therefore, $w_{3}$ imposes a “mollified bounded
height condition”. The inclusion of the weight function $w_{2}$ is crucial for
the “level-lowering”. Indeed, let
$\boldsymbol{x}\in{\mathbb{Z}}^{n+1}\setminus\boldsymbol{0}$ be such that
$t_{0}(\boldsymbol{x})\neq 0$. If (2.5) is satisfied, as prescribed by
$w_{1}$, then (as in Lemma 2.1) $F_{2}(t_{2},\ldots,t_{n})\ll
R^{-2}|t_{0}|^{2}$, and so the equation

$F(\boldsymbol{x})=t_{0}^{2}\left(\frac{t_{1}}{t_{0}}+F_{2}\left(\frac{t_{2}}{t_{0}},\ldots,\frac{t_{n}}{t_{0}}\right)\right)=0$

implies that

$|t_{1}/t_{0}|\ll R^{-2}.$ (2.8)

If moreover $\|\boldsymbol{x}\|_{\boldsymbol{\xi}}\ll B$, as prescribed by
$w_{3}$, then together with (2.5) and (2.8) we obtain

$F(\boldsymbol{x})\ll\frac{B^{2}}{R^{2}}.$

Since this bound relies on the condition $F(\boldsymbol{x})=0$ (which will be
captured later using the $\delta$-symbol), the effect of $w_{2}$ cannot be
encapsulated by $w_{1}$ and $w_{3}$ alone. We could have instead inserted a
weight function of the form $w_{4}\left(R^{2}\frac{t_{1}}{t_{0}}\right)$, but
this turns out to have an equivalent role to $w_{2}$, and working with $w_{2}$
is technically simpler.

Moreover, to deduce information about the “unweighted” counting function
${\mathscr{N}}_{{\mathscr{W}}}((R,\boldsymbol{\xi}),(L,\boldsymbol{\Gamma});B)$
from the weighted one
${\mathscr{N}}_{{\mathscr{W}}}(w_{B,R};(L,\boldsymbol{\Gamma}))$, we would
like $w_{1}$ and $w_{3}$ to approximate the characteristic functions
$\prod_{j\geqslant 2}1_{[a_{j},b_{j}]}$ and $1_{[-1,1]}$ respectively. To make
this more precise, we define a small parameter $0<\eta<1$ (which will
eventually be taken to be a small negative power of $B$), and consider smooth
weights
$w_{1}^{\pm}:{\mathbb{R}}^{n-1}\rightarrow[0,1],w_{3}^{\pm}:{\mathbb{R}}\rightarrow[0,1]$
satisfying

  1. (1)

$\operatorname{supp}(w_{1}^{+})=\prod_{j\geqslant 2}[a_{j}-\eta,b_{j}+\eta];$

  2. (2)

$w_{1}^{+}=1$ on $\prod_{j\geqslant 2}[a_{j},b_{j}]$;

  3. (3)

$\operatorname{supp}(w_{1}^{-})=\prod_{j\geqslant 2}[a_{j},b_{j}];$

  4. (4)

$w_{1}^{-}=1$ on $\prod_{j\geqslant 2}[a_{j}+\eta,b_{j}-\eta]$;

  5. (5)

$\operatorname{supp}(w_{3}^{+})=[-1-\eta,1+\eta]\setminus[-\frac{\eta}{2},\frac{\eta}{2}]$;

  6. (6)

$w_{3}^{+}=1$ on $[-1,1]\setminus[-\eta,\eta]$;

  7. (7)

$\operatorname{supp}(w_{3}^{-})=[-1,1]\setminus[-\frac{\eta}{2},\frac{\eta}{2}]$;

  8. (8)

$w_{3}^{-}=1$ on $[-1+\eta,1-\eta]\setminus[-\eta,\eta]$.

For an infinitely differentiable function
$f:{\mathbb{R}}^{m}\rightarrow{\mathbb{R}}$ and an integer $N\geqslant 0$, we
define

$\|f\|_{N}=\sup_{\begin{subarray}{c}\boldsymbol{x}\in{\mathbb{R}}^{m}\\\
\boldsymbol{k}\in({\mathbb{Z}}_{\geqslant 0})^{m}\\\
k_{1}+\cdots+k_{m}\leqslant
N\end{subarray}}|\partial^{\boldsymbol{k}}f(\boldsymbol{x})|$ (2.9)

to be the largest partial derivative of $f$ of order at most $N$. In
particular, we recover the supremum of $|f|$ via $\|f\|_{0}$, a fact which is
used in the analysis of the oscillatory integrals.

######  Lemma 2.2.

There exist smooth weight functions $w_{1}^{\pm},w_{3}^{\pm}$ satisfying the
above properties, and such that for any $N\geqslant 0$, we have
$\|w_{1}^{\pm}\|_{N},\|w_{3}^{\pm}\|_{N}\ll_{N}\eta^{-N}$.

###### Proof.

Weight functions with the desired properties can all be built from linear
transformations and convolutions of the standard bump function
$\psi:{\mathbb{R}}\rightarrow{\mathbb{R}}_{\geqslant 0}$ defined by

$\psi(x)=\begin{cases}\exp\left(1+\frac{1}{|x|^{2}-1}\right),&\textrm{ if
}|x|<1,\\\ 0,&\textrm{ otherwise}\end{cases}$

and its higher dimensional analogue, in which $|\cdot|$ is replaced with the
Euclidean norm (see [32, Section 4]). ∎

Let $w_{2}:{\mathbb{R}}\rightarrow{\mathbb{R}}_{\geqslant 0}$ be the standard
bump function, and let $w_{1}^{\pm},w_{3}^{\pm}$ be as in Lemma 2.2. We define
weight functions
$w_{B,R}^{\pm}:\mathbb{R}^{n+1}\rightarrow\mathbb{R}_{\geqslant 0}$ by

$w_{B,R}^{\pm}(\boldsymbol{x}):=w_{1}^{\pm}\left(R\frac{t_{j}}{t_{0}}(\boldsymbol{x}),j\geqslant
2\right)w_{2}\left(\frac{R^{2}}{B^{2}}F(\boldsymbol{x})\right)w_{3}^{\pm}\left(\frac{t_{0}(\boldsymbol{x})}{B}\right).$
(2.10)

It is clear that $w_{B,R}^{\pm}$ is supported away from zero, and satisfies
$\|w_{B,R}^{\pm}\|_{N}\ll_{N}\eta^{-N}$ for any $N\geqslant 0$. We shall also
make use of the functions $w_{R}^{\pm}$, defined as in (2.10) but without the
$w_{2}$ and $w_{3}^{\pm}$ factors.

###  2.3. Weighted counting results

We are ready to state our main counting results in terms of the aforementioned
weight functions.

######  Theorem 2.3.

Assume that $R,L$ satisfy (1.3) for $-1<\tau<1$. Let $w_{B,R}^{\pm}$ be one of
the smooth weights defined by (2.10) and $\varepsilon>0$. Let $A>0$ be a real
parameter such that $\eta^{-1}\ll B^{A}$. Then uniformly in
$L,\boldsymbol{\Gamma}\in{\mathscr{W}}^{o}({\mathbb{Z}}/L{\mathbb{Z}})$, we
have

${\mathscr{N}}_{{\mathscr{W}}}(w_{B,R}^{\pm};(L,\boldsymbol{\Gamma}))=B^{n-1}{\mathscr{I}}(w_{R}^{\pm})\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\Gamma})+O_{\tau,A,\varepsilon}\left(\frac{B^{n-1+\varepsilon}}{L^{n}R^{n-1}}E_{\tau}(\eta;B)\right),$

where

$E_{\tau}(\eta;B):=\begin{cases}\eta^{\frac{9-5n}{2}}B^{-\frac{n-3}{2}\tau}&\text{
if }n\geqslant 5;\\\ \eta^{-15/2}B^{-\tau}+B^{-\frac{1+\tau}{4}}&\text{ if
}n=4.\end{cases}$ (2.11)

Here $\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\Gamma})$ is the singular
series defined in (1.6) and ${\mathscr{I}}(w_{R}^{\pm})$ is a singular
integral defined later in (6.6).

######  Remarks 2.4.

  * •

If $0<\tau<1$, then the main term
$B^{n-1}{\mathscr{I}}(w_{R}^{\pm})\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\Gamma})$
is dominant and (up to the weight function $w$) eventually gives the main
contribution in Theorem 1.2. However, the “error term” becomes dominant when
$-1<\tau\leqslant 0$. Even though in this case Theorem 2.3 provides only an
upper bound, this is crucial for the removal of smooth weights back to the
“constant weight”.

  * •

In Theorem 2.3, once $w_{1},w_{2},w_{3}$ are fixed, the implied constant
depends only on the small parameter $\eta$. We may replace $w^{\pm}_{B,R}$
with any weight function $w$ of the form (2.7) which is supported away from
zero, at the cost of having implied constants that depend implicitly on the
$w_{1},w_{2},w_{3}$-components of $w$.

###  2.4. Poisson summation

For $n\in{\mathbb{Z}}$, we define the $\delta$-symbol to be

$\delta(n)=\begin{cases}1&\text{ if }n=0;\\\ 0&\text{ otherwise}.\end{cases}$

According to Heath-Brown’s work [13, Theorem 1], for every $Q>1$, we can write

$\delta(n)=\frac{C_{Q}}{Q^{2}}\sum_{q=1}^{\infty}\sum_{\begin{subarray}{c}a\bmod
q\\\
(a,q)=1\end{subarray}}\textup{e}_{q}\left(an\right)h\left(\frac{q}{Q},\frac{n}{Q^{2}}\right),$
(2.12)

where

$C_{Q}=1+O_{N}(Q^{-N}),$

and $h:(0,\infty)\times{\mathbb{R}}\to{\mathbb{R}}$ is a certain infinitely
differentiable function, whose properties are described in [13, §4].

Given $\boldsymbol{\Gamma}\in{\mathscr{W}}({\mathbb{Z}}/L{\mathbb{Z}})$, we
shall work with a fixed representative
$\boldsymbol{\lambda}=(\lambda_{0},\cdots,\lambda_{n})\in{\mathbb{Z}}^{n+1}$
of $\boldsymbol{\Gamma}$ whose coordinates are bounded by $L$. Note that the
assumption
$\boldsymbol{\Gamma}\in{\mathscr{W}}^{o}({\mathbb{Z}}/L{\mathbb{Z}})$ implies
that the gcd of the coordinates of $\boldsymbol{\lambda}$ is coprime to $L$.
Let us consider the polynomial

$H_{\boldsymbol{\lambda},L}(\boldsymbol{y}):=\frac{F(\boldsymbol{\lambda})}{L}+\nabla
F(\boldsymbol{\lambda})\cdot\boldsymbol{y}.$ (2.13)

From now on, let $w_{B,R}$ be a weight function of the form (2.7). The goal
now is to show

######  Proposition 2.5.

We have

$\begin{split}{\mathscr{N}}_{{\mathscr{W}}}(w_{B,R};(L,\boldsymbol{\Gamma}))=\frac{C_{Q}}{Q^{2}}\sum_{q=1}^{\infty}\sum_{\boldsymbol{c}\in{\mathbb{Z}}^{n+1}}\frac{S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})I_{q,L,\boldsymbol{\lambda}}(w_{B,R};\boldsymbol{c})}{(qL)^{n+1}},\end{split}$
(2.14)

where $C_{Q}=1+O_{N}(Q^{-N})$ and for every $q\ll
Q,\boldsymbol{c}\in{\mathbb{Z}}^{n+1}$,

$I_{q,L,\boldsymbol{\lambda}}(w_{B,R};\boldsymbol{c}):=\int_{{\mathbb{R}}^{n+1}}w_{B,R}(L\boldsymbol{y}+\boldsymbol{\lambda})h\left(\frac{q}{Q},\frac{F(L\boldsymbol{y}+\boldsymbol{\lambda})}{L^{2}Q^{2}}\right)\textup{e}_{qL}\left(-\boldsymbol{c}\cdot\boldsymbol{y}\right)\operatorname{d}\boldsymbol{y},$
(2.15)

and

$S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c}):=\sum_{\begin{subarray}{c}a\bmod
q\\\
(a,q)=1\end{subarray}}\sum_{\begin{subarray}{c}\boldsymbol{\sigma}\in({\mathbb{Z}}/qL{\mathbb{Z}})^{n+1}\\\
H_{\boldsymbol{\lambda},L}(\boldsymbol{\sigma})\equiv 0\bmod
L\end{subarray}}\textup{e}_{qL}\left(a\left(H_{\boldsymbol{\lambda},L}(\boldsymbol{\sigma})+LF(\boldsymbol{\sigma})\right)+\boldsymbol{c}\cdot\boldsymbol{\sigma}\right).$
(2.16)

Similarly to [5], the proof of Theorem 2.3 relies on Heath-Brown’s
$\delta$-method (2.12). However, to obtain the optimal error term, our way of
activating (2.12) is different from [5, §4], in which we need to understand
properly the precise range of $F$ when zoom conditions are imposed and then to
integrate it into the formula of [13, Theorem 2]. This is part of our “level-
lowering” procedure regarding the congruence condition
$(L,\boldsymbol{\lambda})$, and our treatment is closer to Sardari’s [28].

######  Lemma 2.6.

We have

${\mathscr{N}}_{{\mathscr{W}}}(w_{B,R};(L,\boldsymbol{\Gamma}))=\sum_{\begin{subarray}{c}\boldsymbol{y}\in{\mathbb{Z}}^{n+1}\\\
L\mid
H_{\boldsymbol{\lambda},L}(\boldsymbol{y})\end{subarray}}w_{B,R}(L\boldsymbol{y}+\boldsymbol{\lambda})\delta\left(\frac{F(L\boldsymbol{y}+\boldsymbol{\lambda})}{L^{2}}\right).$
(2.17)

###### Proof.

We first observe that, if $\boldsymbol{x}\equiv\boldsymbol{\lambda}\bmod L$,
on writing $\boldsymbol{x}=L\boldsymbol{y}+\boldsymbol{\lambda}$, we have

$F(\boldsymbol{x})=F(\boldsymbol{\lambda})+L\nabla
F(\boldsymbol{\lambda})\cdot\boldsymbol{y}+L^{2}F(\boldsymbol{y})=LH_{\boldsymbol{\lambda},L}(\boldsymbol{y})+L^{2}F(\boldsymbol{y}).$

We thus have

$L^{2}\mid F(L\boldsymbol{y}+\boldsymbol{\lambda})\Leftrightarrow L\mid
H_{\boldsymbol{\lambda},L}(\boldsymbol{y}).$

So the expression above is well defined, and only captures $\boldsymbol{y}$
satisfying $F(L\boldsymbol{y}+\boldsymbol{\lambda})=0$. ∎

###### Proof of Proposition 2.5.

By Lemma 2.6 and (2.12), the counting function
${\mathscr{N}}_{{\mathscr{W}}}(w_{B,R};(L,\boldsymbol{\Gamma}))$ is equal to

$\frac{C_{Q}}{Q^{2}}\sum_{q=1}^{\infty}\sum_{\begin{subarray}{c}a\bmod q\\\
(a,q)=1\end{subarray}}\sum_{\begin{subarray}{c}\boldsymbol{y}\in{\mathbb{Z}}^{n+1}\\\
L\mid
H_{\boldsymbol{\lambda},L}(\boldsymbol{y})\end{subarray}}w_{B,R}(L\boldsymbol{y}+\boldsymbol{\lambda})\textup{e}_{qL}\left(a\left(H_{\boldsymbol{\lambda},L}(\boldsymbol{y})+LF(\boldsymbol{y})\right)\right)h\left(\frac{q}{Q},\frac{F(L\boldsymbol{y}+\boldsymbol{\lambda})}{L^{2}Q^{2}}\right).$
(2.18)

In order to apply Poisson summation and separate the real condition from the
$p$-adic ones, we break the $\boldsymbol{y}$-sum into residue classes modulo
$qL$, so that for every fixed $q,a$ and for every fixed class
$\boldsymbol{\sigma}\bmod qL$ with
$H_{\boldsymbol{\lambda},L}(\boldsymbol{\sigma})\equiv 0\mod L$, the inner
$\boldsymbol{y}$-sum is equal to

$\displaystyle\textup{e}_{qL}\left(a\left(H_{\boldsymbol{\lambda},L}(\boldsymbol{\sigma})+LF(\boldsymbol{\sigma})\right)\right)\sum_{\begin{subarray}{c}\boldsymbol{y}\in{\mathbb{Z}}^{n+1}\\\
\boldsymbol{y}\equiv\boldsymbol{\sigma}\bmod
qL\end{subarray}}w_{B,R}(L\boldsymbol{y}+\boldsymbol{\lambda})h\left(\frac{q}{Q},\frac{F(L\boldsymbol{y}+\boldsymbol{\lambda})}{L^{2}Q^{2}}\right)$
$\displaystyle=$
$\displaystyle\textup{e}_{qL}\left(a\left(H_{\boldsymbol{\lambda},L}(\boldsymbol{\sigma})+LF(\boldsymbol{\sigma})\right)\right)\sum_{\boldsymbol{z}\in{\mathbb{Z}}^{n+1}}w_{B,R}(L(\boldsymbol{\sigma}+qL\boldsymbol{z})+\boldsymbol{\lambda})h\left(\frac{q}{Q},\frac{F(L(\boldsymbol{\sigma}+qL\boldsymbol{z})+\boldsymbol{\lambda})}{L^{2}Q^{2}}\right).$

Applying the Poisson summation formula to the inner $\boldsymbol{z}$-sum
yields

$\sum_{\boldsymbol{c}\in{\mathbb{Z}}^{n+1}}\int_{{\mathbb{R}}^{n+1}}w_{B,R}(L(\boldsymbol{\sigma}+qL\boldsymbol{z})+\boldsymbol{\lambda})h\left(\frac{q}{Q},\frac{F(L(\boldsymbol{\sigma}+qL\boldsymbol{z})+\boldsymbol{\lambda})}{L^{2}Q^{2}}\right)\textup{e}\left(-\boldsymbol{c}\cdot\boldsymbol{z}\right)\operatorname{d}\boldsymbol{z}.$

The inner integral, with the change of variables
$\boldsymbol{y}=\boldsymbol{\sigma}+qL\boldsymbol{z}$, is equal to

$\frac{\textup{e}_{qL}\left(\boldsymbol{c}\cdot\boldsymbol{\sigma}\right)}{(qL)^{n+1}}I_{q,L,\boldsymbol{\lambda}}(w_{B,R};\boldsymbol{c}),$

where $I_{q,L,\boldsymbol{\lambda}}(w_{B,R};\boldsymbol{c})$ is defined by
(2.15). Hence the inner $\boldsymbol{y}$-sum in (2.18) is equal to

$\sum_{\begin{subarray}{c}\boldsymbol{\sigma}\in({\mathbb{Z}}/qL{\mathbb{Z}})^{n+1}\\\
H_{\boldsymbol{\lambda},L}(\boldsymbol{\sigma})\equiv 0\bmod
L\end{subarray}}\sum_{\boldsymbol{c}\in{\mathbb{Z}}^{n+1}}\textup{e}_{qL}\left(a\left(H_{\boldsymbol{\lambda},L}(\boldsymbol{\sigma})+LF(\boldsymbol{\sigma})\right)+\boldsymbol{c}\cdot\boldsymbol{\sigma}\right)\frac{I_{q,L,\boldsymbol{\lambda}}(w_{B,R};\boldsymbol{c})}{(qL)^{n+1}}.$

Substituting into (2.18) yields the terms
$S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})$ and we get the expression
(2.14). ∎

###  2.5. Choice of $Q$

In terms of the zoom condition (2.5), we explain our choice of $Q$, keeping in
mind its role in (2.17), (2.18) and (2.15).

Recall from [13, Theorem 1] that $h(x,y)\neq 0$ only if
$x\leqslant\max(1,2|y|)$. We would like to have

$\left|\frac{F(\boldsymbol{x})}{L^{2}}\right|\leqslant\frac{1}{2}Q^{2},$
(2.19)

in order to deduce that $q\leqslant Q$. We recall that
$\boldsymbol{t}=M\boldsymbol{x}$, and by our choice of $M$ we have

$\widetilde{F}(\boldsymbol{t}):=F(M^{-1}\boldsymbol{t})=t_{0}t_{1}+F_{2}(t_{2},\ldots,t_{n}).$
(2.20)

Since $\widetilde{F}(\boldsymbol{t})=O(B^{2}/R^{2})$ as prescribed by $w_{2}$,
a reasonable choice for $Q$ is therefore

$Q=\frac{B}{LR},$ (2.21)

with which

$\frac{F(\boldsymbol{x})}{L^{2}Q^{2}}=\frac{R^{2}}{B^{2}}F(\boldsymbol{x})=O(1).$

##  3\. The oscillatory integrals

The goal of this section is to manipulate the terms
$I_{q,L,\boldsymbol{\lambda}}(w_{B,R};\boldsymbol{c})$ (2.15) and to deduce
various estimates for them. We assume $n\geqslant 2$ throughout this section.

###  3.1. Preliminary manipulation

We recall the choice of the matrix $M$ from Lemma 2.1 and $\widetilde{F}$ from
(2.20). The change of variables

$\boldsymbol{t}=M\boldsymbol{x}=M(L\boldsymbol{y}+\boldsymbol{\lambda})$

yields

$I_{q,L,\boldsymbol{\lambda}}(w_{B,R};\boldsymbol{c})=\frac{1}{|\det
M|L^{n+1}}\textup{e}_{qL^{2}}\left(\boldsymbol{c}\cdot\boldsymbol{\lambda}\right){\mathscr{I}}_{q,L}(w_{B,R};\boldsymbol{c}),$
(3.1)

where

${\mathscr{I}}_{q,L}(w_{B,R};\boldsymbol{c}):=\int_{{\mathbb{R}}^{n+1}}w_{B,R}(M^{-1}\boldsymbol{t})h\left(\frac{q}{Q},\frac{\widetilde{F}(\boldsymbol{t})}{L^{2}Q^{2}}\right)\textup{e}_{qL^{2}}\left(-\widetilde{\boldsymbol{c}}\cdot\boldsymbol{t}\right)\operatorname{d}\boldsymbol{t},$
(3.2)

$\widetilde{F}$ is defined by (2.20), and, noting that
$\boldsymbol{c}\cdot\boldsymbol{x}=\boldsymbol{c}\cdot
M^{-1}\boldsymbol{t}=(M^{-1})^{t}\boldsymbol{c}\cdot\boldsymbol{t}$,

$\widetilde{\boldsymbol{c}}:=(M^{-1})^{t}\boldsymbol{c}=(\widetilde{c_{0}},\ldots,\widetilde{c_{n}}).$
(3.3)

is a real vector.

Let the new variables $\boldsymbol{s}\in{\mathbb{R}}^{n+1}$ be defined by

$s_{0}:=\frac{t_{0}}{B},\quad s_{1}:=\frac{R^{2}}{B}t_{1},\quad
s_{j}:=\frac{R}{B}t_{j},\quad j\geqslant 2.$

Then we have

$\operatorname{d}\boldsymbol{t}=\frac{B^{n+1}}{R^{n+1}}\operatorname{d}\boldsymbol{s}.$

Moreover, by our choice of the matrix $M$,

$\frac{\widetilde{F}(\boldsymbol{t})}{L^{2}Q^{2}}=\frac{R^{2}}{B^{2}}\left(t_{0}t_{1}+F_{2}(t_{2},\ldots,t_{n})\right)=\widetilde{x_{0}}\widetilde{x_{1}}+F_{2}(\widetilde{x_{2}},\ldots,\widetilde{x_{n}})=\widetilde{F}(\boldsymbol{s}).$

We also define the real vector
$\boldsymbol{d}=\boldsymbol{d}(B,R,L;{\mathbf{c}})$ by

$d_{0}=\frac{B}{L^{2}}\widetilde{c_{0}},\quad
d_{1}=\frac{B}{L^{2}R^{2}}\widetilde{c_{1}},\quad
d_{j}=\frac{B}{L^{2}R}\widetilde{c_{j}},\quad 2\leqslant j\leqslant n.$ (3.4)

Hence we can now rewrite

${\mathscr{I}}_{q,L}(w_{B,R};\boldsymbol{c})=\frac{B^{n+1}}{R^{n+1}}\widehat{{\mathscr{I}}}_{q}(\widehat{w};\boldsymbol{d})$
(3.5)

where

$\widehat{{\mathscr{I}}}_{q}(\widehat{w};\boldsymbol{d})=\int_{{\mathbb{R}}^{n+1}}\widehat{w}(\boldsymbol{s})h\left(\frac{q}{Q},\widetilde{F}(\boldsymbol{s})\right)\textup{e}_{q}\left(-\boldsymbol{d}\cdot\boldsymbol{s}\right)\operatorname{d}\boldsymbol{s},$
(3.6)

with

$\widehat{w}(\boldsymbol{s}):=w_{1}\left(\frac{s_{j}}{s_{0}},2\leqslant
j\leqslant
n\right)w_{2}\left(\widetilde{F}(\boldsymbol{s})\right)w_{3}\left(s_{0}\right)$

depending on $w_{1},w_{2},w_{3}$. We recall that

$\boldsymbol{c}\neq\boldsymbol{0}\Leftrightarrow\widetilde{\boldsymbol{c}}\neq\boldsymbol{0}\Leftrightarrow\boldsymbol{d}\neq\boldsymbol{0}.$

###  3.2. Simpler and harder estimates

Let ${\mathscr{H}}$ be the class of functions defined on
${\mathbb{R}}_{>0}\times{\mathbb{R}}\to{\mathbb{C}}$ as in [13, (7.1)]. For
$s\ll 1$, we define

$f_{s}(y)=sh(s,y),$

and we note that $f_{s}(y)\in{\mathscr{H}}$. Let
${\mathscr{F}}(x_{0},\ldots,x_{n})$ be a non-degenerate indefinite real
quadratic form. For any real vector $\mathbf{u}\in{\mathbb{R}}^{n+1}$, and for
an appropriate fixed weight function
$w\in\mathscr{C}_{0}^{\infty}({\mathbb{R}}^{n+1})$, let

$J_{s}({\mathscr{F}};\mathbf{u})=\int_{{\mathbb{R}}^{n+1}}w(\boldsymbol{t})f_{s}({\mathscr{F}}(\boldsymbol{t}))e\left(-\mathbf{u}\cdot\boldsymbol{t}\right)\operatorname{d}\boldsymbol{t}.$
(3.7)

The following bound follows from [13, Lemma 15]. For any
$\mathbf{u}\in\mathbb{R}^{n+1}$, we have

$J_{s}({\mathscr{F}};\mathbf{u})\ll s.$ (3.8)

Here, the implied constant may depend on the diameter of the support of $w$,
on

$\|w\|_{0}=\sup_{\boldsymbol{x}\in{\mathbb{R}}^{m}}|w(\boldsymbol{x})|,$

and on a lower bound for $\frac{\partial{\mathscr{F}}}{\partial x_{0}}$ on the
support of $w$. These conditions on the implicit constant in (3.8) are related
to the introduction of the class of functions $\mathscr{C}_{0}(S)$ in [13,
$\S$6].

The following two theorems are based on Heath-Brown’s “simpler” and “harder”
estimates [13, Lemma 18, Lemma 22]. However, in order to remove the smooth
weights and ultimately prove Theorem 1.2, we need to slightly refine Heath-
Brown’s results so that our estimates have an explicit dependence on $w$. This
dependence is realised through the quantity $\|w\|_{N}$, as defined in (2.9).
We do not reproduce a full proof of these results here, instead only
highlighting the refinements to Heath-Brown’s arguments. The two results below
may also be compared with [10, Proposition 5.1, Proposition 6.1].

The first estimate refines [13, Lemma 18], which is a consequence of the
“first derivative test” [13, Lemma 10] and a Fourier analysis of the function
$h(\cdot,\cdot)$ [13, Lemma 17]:

######  Lemma 3.1.

(“simpler estimates”) For $N\geqslant 0$ and $\mathbf{u}\neq 0$ we have

$J_{s}({\mathscr{F}};\mathbf{u})\ll_{N}(s|\mathbf{u}|)^{-N}\|w\|_{N}.$

###### Proof.

Let $w_{0}:\mathbb{R}\rightarrow\mathbb{R}_{\geqslant 0}$ be the smooth bump
function defined in [13, Equation (2.1)]. [13, Lemma 18] is proved by applying
integration by parts $N$ times to the integral

$\int_{\mathbb{R}^{n+1}}W(\boldsymbol{t})e(k\mathscr{F}(\boldsymbol{t})-\mathbf{u}\cdot\boldsymbol{t})\operatorname{d}\boldsymbol{t},$

where

$W(\boldsymbol{t}):=\frac{w(\boldsymbol{t})}{w_{0}(\mathscr{F}(\boldsymbol{t})/2K)}$

and $K$ is such that $|\mathscr{F}(\boldsymbol{t})|\leqslant K$ on
$\operatorname{supp}(w)$. Since $K=O(1)$, we have $\|W\|_{N}\ll\|w\|_{N}$, and
hence integrating by parts $N$ times introduces a factor $O(\|w\|_{N})$. ∎

The second result is obtained from a more delicate analysis of the locus where
the “first derivative test” fails, which involves the Hessian.

######  Lemma 3.2.

(“harder estimates”) Suppose that $1\leqslant A\leqslant|\mathbf{u}|^{1/3}$.
Then

$J_{s}({\mathscr{F}};\mathbf{u})\ll_{N}A^{-N}\|w\|_{N}+sA^{n+1}|\mathbf{u}|^{1-\frac{n+1}{2}}.$

###### Proof.

Similarly to the lemma above, Heath-Brown’s “good pairs” are dealt with using
integration by parts $N$ times, to give a contribution of
$O(A^{-N}\|w\|_{N})$. For the “bad pairs”, the integral is estimated
trivially, and no derivatives of $w$ are taken. Therefore, this part of the
argument goes through unchanged, giving a contribution of
$A^{n+1}|\mathbf{u}|^{1-\frac{n+1}{2}}.$ ∎

Lemmas 3.1 and 3.2 furnish alternative ways to estimate the quantity
$\widehat{{\mathscr{I}}}_{q}(\widehat{w};\boldsymbol{d})$ in (3.6).

######  Corollary 3.3.

Uniformly for all $q\in{\mathbb{N}},\boldsymbol{d}\in{\mathbb{R}}^{n+1}$, we
have

$\widehat{{\mathscr{I}}}_{q}(\widehat{w};\boldsymbol{d})\begin{cases}\ll
1&\quad\text{``Trivial estimate''};\\\
\ll_{N}\frac{Q}{q}\left(\frac{|{\mathbf{d}}|}{Q}\right)^{-N}\|w\|_{N}&\quad\text{``Simpler
estimate''}.\end{cases}$

Moreover, for any $1\leqslant A\leqslant|\boldsymbol{d}/q|^{1/3}$, we have

$\widehat{{\mathscr{I}}}_{q}(\widehat{w};\boldsymbol{d})\ll_{\varepsilon,N}\frac{Q}{q}A^{-N}\|w\|_{N}+A^{n+1}\left|\frac{\boldsymbol{d}}{q}\right|^{1-\frac{n+1}{2}}\quad\text{``Harder
estimate''}.$

###### Proof.

On recalling (3.6), we clearly have

$\begin{split}\widehat{{\mathscr{I}}}_{q}(\widehat{w};\boldsymbol{d})&=\int_{{\mathbb{R}}^{n+1}}\widehat{w}(\boldsymbol{s})h\left(\frac{q}{Q},\widetilde{F}(\boldsymbol{s})\right)\textup{e}\left(-\frac{\boldsymbol{d}}{q}\cdot\boldsymbol{s}\right)\operatorname{d}\boldsymbol{s}\\\
&\ll\frac{Q}{q}\left|J_{\frac{q}{Q}}\left(\widetilde{F};\frac{\boldsymbol{d}}{q}\right)\right|.\end{split}$
(3.9)

The first estimate is just (3.8). Since $F$ (and hence $\widetilde{F}$) is
non-degenerate, the Hessian hypothesis is satisfied. Corollary 3.3 follows
from (3.9) and Lemmas 3.1 and 3.2 with

$s=\frac{q}{Q},\quad\boldsymbol{u}=\frac{\boldsymbol{d}}{q}.\qed$

##  4\. Quadratic exponential sums

Analogously to [13, Lemma 28], the aim of this section is to the prove the
following “Kloosterman refinement” result.

######  Theorem 4.1.

Assume that $n\geqslant 2$. We have

$S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\ll_{\varepsilon}L^{n}q^{\frac{n+3}{2}+\varepsilon}\gcd(q,L)^{\frac{1}{2}},$
$\sum_{q\leqslant
X}\left|S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\right|\ll_{\varepsilon}\begin{cases}|\boldsymbol{c}|^{\varepsilon}L^{n+\varepsilon}X^{\frac{n+4}{2}+\varepsilon}&\text{
if }F^{*}(\boldsymbol{c})\neq 0;\\\
L^{n+\varepsilon}X^{\frac{n+5}{2}+\varepsilon}&\text{ if
}F^{*}(\boldsymbol{c})=0.\end{cases}$

If moreover $n$ is even and $F^{*}(\boldsymbol{c})=0$, we also have

$\sum_{q\leqslant
X}\left|S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\right|\ll_{\varepsilon}L^{n+\varepsilon}X^{\frac{n+4}{2}+\varepsilon}.$

All the implied constants above are independent of $q,\boldsymbol{c},L$ and
$\boldsymbol{\lambda}$.

Theorem 4.1 is concerned with estimating the average over $q$ of the absolute
value of the finite exponential sums
$S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})$ from (2.16). As already pointed
out in [13], no “double Kloosterman refinement” is needed when $n\geqslant 4$
(while it becomes essential for $n=3$ in [15]).

To prove Theorem 4.1, we decompose
$S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})$ into an exponential sum over
“good moduli” and another over “bad moduli”, based on the Chinese remainder
theorem. For the former we give precise formula, while for the latter we
obtain a uniform upper bound.

###  4.1. Decomposing $S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})$

For every fixed $q\geqslant 1$, we have a decomposition

$q=q_{1}q_{2},$ (4.1)

where

$\gcd(q_{1},2L\Delta_{F})=1,\quad q_{2}\mid(2L\Delta_{F})^{\infty}.$

Since $\gcd(q_{1},q_{2})=1$, by the Chinese remainder theorem, every $a\bmod
q$ can be written as

$a=a_{1}q_{2}+a_{2}q_{1},$

for a unique choice of $a_{1}\bmod q_{1},a_{2}\bmod q_{2}$. Similarly, for
every $\boldsymbol{\sigma}\in({\mathbb{Z}}/qL{\mathbb{Z}})^{n+1}$ we can write

$\boldsymbol{\sigma}=q_{1}\boldsymbol{\sigma}_{2}+q_{2}L\boldsymbol{\sigma}_{1}$

for unique $\boldsymbol{\sigma}_{1}\bmod q_{1}$ and
$\boldsymbol{\sigma}_{2}\bmod q_{2}L$. If we let

$k:=\frac{F(\boldsymbol{\lambda})}{L},$

then we also write

$k=k_{2}q_{1}+k_{1}q_{2}L,$

with $k_{1}\bmod q_{1}$ and $k_{2}\bmod q_{2}L$. With these decompositions we
obtain the following lemma.

######  Lemma 4.2.

We have

$S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})=S^{(1)}_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})S^{(2)}_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c}),$

where

$S^{(1)}_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c}):=\sum_{\boldsymbol{\sigma}_{1}\in({\mathbb{Z}}/q_{1}{\mathbb{Z}})^{n+1}}\sum_{\begin{subarray}{c}a_{1}\bmod
q_{1}\\\
(a_{1},q_{1})=1\end{subarray}}\textup{e}_{q_{1}}\left(a_{1}\left((q_{2}L)^{2}F(\boldsymbol{\sigma}_{1})+q_{2}(\nabla
F(\boldsymbol{\lambda})\cdot\boldsymbol{\sigma}_{1}+k_{1})\right)+\boldsymbol{c}\cdot\boldsymbol{\sigma}_{1}\right),$
(4.2)
$S^{(2)}_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c}):=\sum_{\begin{subarray}{c}\boldsymbol{\sigma}_{2}\in({\mathbb{Z}}/q_{2}L{\mathbb{Z}})^{n+1}\\\
H_{\boldsymbol{\lambda},L}(q_{1}\boldsymbol{\sigma}_{2})\equiv 0\bmod
L\end{subarray}}\sum_{\begin{subarray}{c}a_{2}\bmod q_{2}\\\
(a_{2},q_{2})=1\end{subarray}}\textup{e}_{q_{2}L}\left(a_{2}\left(q_{1}^{2}LF(\boldsymbol{\sigma}_{2})+q_{1}(\nabla
F(\boldsymbol{\lambda})\cdot\boldsymbol{\sigma}_{2}+k_{2})\right)+\boldsymbol{c}\cdot\boldsymbol{\sigma}_{2}\right).$
(4.3)

###### Proof.

We observe that the condition $L\mid
H_{\boldsymbol{\lambda},L}(q_{1}\boldsymbol{\sigma}_{2})$, namely

$k_{2}q_{1}+q_{1}\nabla
F(\boldsymbol{\lambda})\cdot\boldsymbol{\sigma}_{2}\equiv 0\bmod L,$

is equivalent to

$k_{2}q_{1}+q_{1}\nabla
F(\boldsymbol{\lambda})\cdot\boldsymbol{\sigma}_{2}\equiv 0\bmod q_{1}L,$

because $\gcd(q_{1},L)=1$. The decomposition can then be obtained by direct
computation. ∎

###  4.2. Evaluating $S^{(1)}_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})$

We start by proving a general version of Kloosterman–Salié-type sums, which is
a direct analogue of [13, Lemma 26].

Let $G$ be an integral quadratic form in $(n+1)$-variables with matrix
${\mathscr{M}}_{G}$, and let $\Delta_{G}:=\det{\mathscr{M}}_{G}$. That is,
${\mathscr{M}}_{G}$ is a symmetric $(n+1)\times(n+1)$-matrix such that
$2{\mathscr{M}}_{G}$ has integer entries and
$G(\boldsymbol{x})=\boldsymbol{x}^{t}{\mathscr{M}}_{G}\cdot\boldsymbol{x}$.

Let $G^{*}$ be the dual quadratic form associated to $G$, which is defined by
the adjugate
${\mathscr{M}}_{G}^{\operatorname{adj}}:=(\Delta_{G}){\mathscr{M}}_{G}^{-1}$
of ${\mathscr{M}}_{G}$. Note that $2^{n+1}\Delta_{G}\in{\mathbb{Z}}$, and
$2^{n}{\mathscr{M}}_{G}^{\operatorname{adj}}$ has integer entries.

######  Lemma 4.3.

Let $G$ be as above and let
$m\in{\mathbb{Z}},\boldsymbol{c}\in{\mathbb{Z}}^{n+1}$ and $q\in{\mathbb{N}}$.
Let us define

$T_{q}(G,m;\boldsymbol{c}):=\sum_{\begin{subarray}{c}a\bmod q\\\
(a,q)=1\end{subarray}}\sum_{{\mathbf{b}}\in({\mathbb{Z}}/q{\mathbb{Z}})^{n+1}}\textup{e}_{q}\left(a(G({\mathbf{b}})-m)+\boldsymbol{c}\cdot{\mathbf{b}}\right).$

Assume that $G$ is non-degenerate and $\gcd(q,2\Delta_{G})=1$. Then we have

$T_{q}(G,m;\boldsymbol{c})=\left(\iota_{q}\left(\frac{2}{q}\right)\right)^{n+1}\left(\frac{2^{n+1}\Delta_{G}}{q}\right)\sum_{\begin{subarray}{c}a\bmod
q\\\
(a,q)=1\end{subarray}}\left(\frac{a}{q}\right)^{n+1}\textup{e}_{q}\left(-am-\overline{a2^{n+2}\Delta_{G}}2^{n}G^{*}(\boldsymbol{c})\right),$

where for any $d\bmod q$ with $(d,q)=1$, we write $\overline{d}\bmod q$ for
the multiplicative inverse, and

$\iota_{q}:=\sum_{x\bmod q}\textup{e}_{q}(x^{2})$

is the quadratic Gauss sum of modulus $q$.

Let us deduce

######  Proposition 4.4.

We have

$S^{(1)}_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})=\iota_{q_{1}}^{n+1}\left(\frac{2^{n+1}\Delta_{F}^{n}}{q_{1}}\right)\textup{e}_{q_{1}}\left(-\overline{q_{2}L^{2}}\boldsymbol{\lambda}\cdot\boldsymbol{c}\right)\sum_{\begin{subarray}{c}a\bmod
q_{1}\\\
(a,q_{1})=1\end{subarray}}\left(\frac{a}{q_{1}}\right)^{n+1}\textup{e}_{q_{1}}\left(-a2^{n}F^{*}(\boldsymbol{c})\right).$

###### Proof of Proposition 4.4.

The change of variables for the $a_{1}$-sum $a_{1}\mapsto
a_{1}^{\prime}:=a_{1}\overline{L^{2}}$ gives

$S^{(1)}_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})=\sum_{\boldsymbol{\sigma}_{1}\in({\mathbb{Z}}/q_{1}{\mathbb{Z}})^{n+1}}\sum_{\begin{subarray}{c}a_{1}^{\prime}\bmod
q_{1}\\\
(a_{1}^{\prime},q_{1})=1\end{subarray}}\textup{e}_{q_{1}}\left(a_{1}^{\prime}F(q_{2}L^{2}\boldsymbol{\sigma}_{1}+\boldsymbol{\lambda})+\boldsymbol{c}\cdot\boldsymbol{\sigma}_{1}\right).$

The second non-singular change of variables for the
$\boldsymbol{\sigma}_{1}$-sum
$\boldsymbol{\sigma}_{1}\mapsto{\mathbf{b}}:=q_{2}L^{2}\boldsymbol{\sigma}_{1}+\boldsymbol{\lambda}$
gives, with the notation of Lemma 4.3,

$S^{(1)}_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})=\textup{e}_{q_{1}}\left(-\overline{q_{2}L^{2}}\boldsymbol{c}\cdot\boldsymbol{\lambda}\right)T_{q_{1}}(F,0;\overline{q_{2}L^{2}}\boldsymbol{c}).$

Applying Lemma 4.3 and the final change of variables
$a\mapsto\overline{a2^{n+2}\Delta_{F}(q_{2}L^{2})^{2}}$ directly yields the
desired formula. ∎

######  Corollary 4.5.

Uniformly for all $q,\boldsymbol{c},L,\boldsymbol{\lambda}$, we have

$S^{(1)}_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\ll
q_{1}^{\frac{n+2}{2}}\tau(q_{1})\gcd(q_{1},2^{n}F^{*}(\boldsymbol{c}))^{\frac{1}{2}}.$

When $n$ is even and $F^{*}(\boldsymbol{c})=0$, we have

$\left|S^{(1)}_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\right|=\begin{cases}q_{1}^{\frac{n+1}{2}}\varphi(q_{1})&\text{
if }q_{1}=\square;\\\ 0&\text{ otherwise}.\end{cases}$

###### Proof of Corollary 4.5.

Since $2\nmid q_{1}$, using [16, (3.38)], we have
$|\iota_{q_{1}}|=q_{1}^{\frac{1}{2}}$. Then clearly

$|S^{(1)}_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})|=q_{1}^{\frac{n+1}{2}}\left|\sum_{\begin{subarray}{c}a\bmod
q_{1}\\\
(a,q_{1})=1\end{subarray}}\left(\frac{a}{q_{1}}\right)^{n+1}\textup{e}_{q_{1}}\left(-a2^{n}F^{*}(\boldsymbol{c})\right)\right|.$

When $n$ is odd (resp. even), the inner exponential sum is a Ramanujan sum
(resp. Gauss sum), which can both be bounded by

$\ll\tau(q_{1})q_{1}^{\frac{1}{2}}\gcd(q_{1},2^{n}F^{*}(\boldsymbol{c}))^{\frac{1}{2}}$

by multiplicativity and by Weil’s bound (see [16, Corollary 11.12]).

Now assume that $n$ is even and $F^{*}(\boldsymbol{c})=0$. Then the inner sum
is a character sum (recall that $2\nmid q_{1}$):

$\sum_{a\bmod q_{1}}\left(\frac{a}{q_{1}}\right)=\begin{cases}0&\text{ if
}q_{1}\neq\square;\\\ \varphi(q_{1})&\text{ otherwise}.\end{cases}$

(See also [13, Proof of Lemma 26].) ∎

###### Proof of Lemma 4.3.

We write ${\mathscr{M}}:=2{\mathscr{M}}_{G}$ and we fix a matrix
$R\in\operatorname{GL}_{n+1}({\mathbb{Z}}/q{\mathbb{Z}})$ such that

$R^{t}{\mathscr{M}}R=\operatorname{diag}(\beta_{1},\ldots,\beta_{n+1}),$

with $\gcd(\beta_{i},q)=1$. Then the change of variables
${\mathbf{b}}\mapsto\boldsymbol{x}:=R^{-1}{\mathbf{b}}$ yields

$\displaystyle T_{q}(G,m;\boldsymbol{c})$
$\displaystyle=\sum_{\begin{subarray}{c}a\bmod q\\\
(a,q)=1\end{subarray}}\textup{e}_{q}(-am)\sum_{\boldsymbol{x}\in({\mathbb{Z}}/q{\mathbb{Z}})^{n+1}}\textup{e}_{q}\left(\overline{2}a\sum_{i=1}^{n+1}\beta_{i}x_{i}^{2}+\boldsymbol{c}\cdot
R\boldsymbol{x}\right)$ $\displaystyle=\sum_{\begin{subarray}{c}a\bmod q\\\
(a,q)=1\end{subarray}}\textup{e}_{q}(-am)\prod_{i=1}^{n+1}\sum_{x\bmod
q}\textup{e}_{q}\left(\overline{2}a\beta_{i}x^{2}+d_{i}x\right),$

where we have written

$\boldsymbol{d}=(d_{1},\ldots,d_{n+1}):=R^{t}\boldsymbol{c}.$

For every fixed $i$ and $a\bmod q$ with $(a,q)=1$,

$\displaystyle\sum_{x\bmod
q}\textup{e}_{q}\left(\overline{2}a\beta_{i}x^{2}+d_{i}x\right)$
$\displaystyle=$
$\displaystyle\textup{e}_{q}\left(-\overline{2a\beta_{i}}d_{i}^{2}\right)\sum_{x\bmod
q}\textup{e}_{q}\left(\overline{2}a\beta_{i}\left(x+\overline{a\beta_{i}}d_{i}\right)^{2}\right)$
$\displaystyle=$
$\displaystyle\textup{e}_{q}\left(-\overline{2a\beta_{i}}d_{i}^{2}\right)\left(\frac{\overline{2}a\beta_{i}}{q}\right)\iota_{q},$

where for the last equality we have executed the change of variables $x\mapsto
x+\overline{a\beta_{i}}d_{i}$ and made use of [16, (3.38)]. Notice that modulo
$q$ we have

$\displaystyle\sum_{i=1}^{n+1}\overline{\beta_{i}}d_{i}^{2}$
$\displaystyle\equiv\boldsymbol{c}^{t}R\operatorname{diag}(\overline{\beta_{1}},\ldots,\overline{\beta_{n+1}})\cdot
R^{t}\boldsymbol{c}$
$\displaystyle\equiv\overline{\det{\mathscr{M}}}\boldsymbol{c}^{t}RR^{-1}{\mathscr{M}}^{\operatorname{adj}}(R^{-1})^{t}\cdot
R^{t}\boldsymbol{c}$
$\displaystyle\equiv\overline{\det{\mathscr{M}}}\boldsymbol{c}^{t}{\mathscr{M}}^{\operatorname{adj}}\cdot\boldsymbol{c}$
$\displaystyle=\overline{2^{n+1}\Delta_{G}}2^{n}G^{*}(\boldsymbol{c}).$

Hence

$\displaystyle\prod_{i=1}^{n+1}\textup{e}_{q}\left(-\overline{2a\beta_{i}}d_{i}^{2}\right)\left(\frac{\overline{2}a\beta_{i}}{q}\right)$
$\displaystyle=\textup{e}_{q}\left(-\overline{2a}\sum_{i=1}^{n+1}\overline{\beta_{i}}d_{i}^{2}\right)\left(\frac{\overline{2}a}{q}\right)^{n+1}\left(\frac{\prod_{i=1}^{n+1}\beta_{i}}{q}\right)$
$\displaystyle=\textup{e}_{q}\left(-\overline{a2^{n+2}\Delta_{G}}2^{n}G^{*}(\boldsymbol{c})\right)\left(\frac{2a}{q}\right)^{n+1}\left(\frac{2^{n+1}\Delta_{G}}{q}\right).$

We therefore conclude the desired formula. ∎

###  4.3. Estimating $S^{(2)}_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})$

######  Proposition 4.6.

Assume that
$\boldsymbol{\lambda}=(\lambda_{0},\cdots,\lambda_{n})\in\mathbb{Z}^{n+1}$
such that $\gcd(\lambda_{0},\ldots,\lambda_{n},L)=1$. Then, uniformly for all
$q,\boldsymbol{c},L,\boldsymbol{\lambda}$, we have

$S^{(2)}_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\ll
q_{2}^{\frac{n+3}{2}}L^{n}\gcd(q_{2},L)^{\frac{1}{2}}.$

Proposition 4.6 is a direct analogue of [13, Lemma 25], from which our proof
is also inspired. The main challenge here is that we need to not only get a
best “square-root cancellation” at the level $q_{2}$, but also to optimize the
dependency on $L$.

###### Proof.

By the Cauchy–Schwarz inequality, we have that

$\left|S^{(2)}_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\right|^{2}\leqslant\varphi(q_{2})\sum_{\begin{subarray}{c}a_{2}\bmod
q_{2}\\\
(a_{2},q_{2})=1\end{subarray}}{\mathscr{S}}_{q,L}(a_{2},\boldsymbol{c}),$

where for each fixed $a_{2}$, we let

$\displaystyle{\mathscr{S}}_{q,L}(a_{2},\boldsymbol{c}):=\left|\sum_{\begin{subarray}{c}\boldsymbol{\sigma}_{2}\in({\mathbb{Z}}/q_{2}L{\mathbb{Z}})^{n+1}\\\
H_{\boldsymbol{\lambda},L}(q_{1}\boldsymbol{\sigma}_{2})\equiv 0\bmod
L\end{subarray}}\textup{e}_{q_{2}L}\left(a_{2}\left(q_{1}^{2}LF(\boldsymbol{\sigma}_{2})+q_{1}(\nabla
F(\boldsymbol{\lambda})\cdot\boldsymbol{\sigma}_{2}+k_{2})\right)+\boldsymbol{c}\cdot\boldsymbol{\sigma}_{2}\right)\right|^{2}$
$\displaystyle=$
$\displaystyle\sum_{\begin{subarray}{c}\boldsymbol{\nu}_{1},\boldsymbol{\nu}_{2}\bmod
q_{2}L\\\ H_{\boldsymbol{\lambda},L}(q_{1}\boldsymbol{\nu}_{i})\equiv 0\bmod
L\end{subarray}}\textup{e}_{q_{2}L}\left(a_{2}\left(q_{1}^{2}L(F(\boldsymbol{\nu}_{1})-F(\boldsymbol{\nu}_{2}))+q_{1}\nabla
F(\boldsymbol{\lambda})\cdot(\boldsymbol{\nu}_{1}-\boldsymbol{\nu}_{2})\right)+\boldsymbol{c}\cdot(\boldsymbol{\nu}_{1}-\boldsymbol{\nu}_{2})\right)$
$\displaystyle=$
$\displaystyle\sum_{\begin{subarray}{c}\boldsymbol{\nu}_{0}:\nabla
F(\boldsymbol{\lambda})\cdot\boldsymbol{\nu}_{0}\equiv 0\bmod L\\\
\boldsymbol{\nu}_{1}:H_{\boldsymbol{\lambda},L}(q_{1}\boldsymbol{\nu}_{1})\equiv
0\bmod L\end{subarray}}\textup{e}_{q_{2}L}\left(a_{2}\left(q_{1}^{2}L(\nabla
F(\boldsymbol{\nu}_{0})\cdot\boldsymbol{\nu}_{1}-F(\boldsymbol{\nu}_{0}))+q_{1}\nabla
F(\boldsymbol{\lambda})\cdot\boldsymbol{\nu}_{0}\right)+\boldsymbol{c}\cdot\boldsymbol{\nu}_{0}\right),$

where for the last equality we have set
$\boldsymbol{\nu}_{0}=\boldsymbol{\nu}_{1}-\boldsymbol{\nu}_{2}$.

We proceed by fixing $a_{2},\boldsymbol{\nu}_{0}$ and first sum over
$\boldsymbol{\nu}_{1}$. For this purpose we rewrite

${\mathscr{S}}_{q,L}(a_{2},\boldsymbol{c})=\sum_{\begin{subarray}{c}\boldsymbol{\nu}_{0}\bmod
q_{2}L\\\ \nabla F(\boldsymbol{\lambda})\cdot\boldsymbol{\nu}_{0}\equiv 0\bmod
L\end{subarray}}\textup{e}_{q_{2}L}\left(a_{2}q_{1}\left(-q_{1}LF(\boldsymbol{\nu}_{0})+\nabla
F(\boldsymbol{\lambda})\cdot\boldsymbol{\nu}_{0}\right)+\boldsymbol{c}\cdot\boldsymbol{\nu}_{0}\right)T_{q,L}(a_{2},\boldsymbol{\nu}_{0}),$

where for each fixed $\boldsymbol{\nu}_{0}$, we write

$T_{q,L}(a_{2},\boldsymbol{\nu}_{0}):=\sum_{\boldsymbol{\nu}_{1}:H_{\boldsymbol{\lambda},L}(q_{1}\boldsymbol{\nu}_{1})\equiv
0\bmod L}\textup{e}_{q_{2}}\left(a_{2}q_{1}^{2}\nabla
F(\boldsymbol{\nu}_{0})\cdot\boldsymbol{\nu}_{1}\right).$

The condition $H_{\boldsymbol{\lambda},L}(q_{1}\boldsymbol{\nu}_{1})\equiv
0\mod L$ can be resolved by adding an additive character sum of modulus $L$,
so that the $\boldsymbol{\nu}_{1}$-variable ranges over all vectors modulo
$q_{2}L$:

$\displaystyle T_{q,L}(a_{2},\boldsymbol{\nu}_{0})$
$\displaystyle=\sum_{\boldsymbol{\nu}_{1}\bmod q_{2}L}\frac{1}{L}\sum_{l\bmod
L}\textup{e}_{L}\left(lH_{\boldsymbol{\lambda},L}(q_{1}\boldsymbol{\nu}_{1})\right)\textup{e}_{q_{2}}\left(a_{2}q_{1}^{2}\nabla
F(\boldsymbol{\nu}_{0})\cdot\boldsymbol{\nu}_{1}\right)$
$\displaystyle=\frac{1}{L}\sum_{l\bmod
L}\textup{e}_{L}(lk){\mathscr{T}}_{q,L}(a_{2},l,\boldsymbol{\nu}_{0}),$

where for every fixed $l$, we let

$\begin{split}{\mathscr{T}}_{q,L}(a_{2},l,\boldsymbol{\nu}_{0})&:=\sum_{\boldsymbol{\nu}_{1}\bmod
q_{2}L}\textup{e}_{q_{2}L}\left(\left(a_{2}q_{1}^{2}L\nabla
F(\boldsymbol{\nu}_{0})+q_{1}q_{2}l\nabla
F(\boldsymbol{\lambda})\right)\cdot\boldsymbol{\nu}_{1}\right)\\\
&=\begin{cases}(q_{2}L)^{n+1}&\text{ if }q_{2}L\mid a_{2}q_{1}^{2}L\nabla
F(\boldsymbol{\nu}_{0})+q_{1}q_{2}l\nabla F(\boldsymbol{\lambda});\\\ 0&\text{
otherwise}.\end{cases}\end{split}$

We are now reduced to counting the number of $\boldsymbol{\nu}_{0}$ and $l$
such that ${\mathscr{T}}_{q,L}(a_{2},l,\boldsymbol{\nu}_{0})\neq 0$. Write

$\boldsymbol{\nu}_{0}=\operatorname{lcm}(q_{2},L)\boldsymbol{\alpha}_{1}+\boldsymbol{\alpha}_{2},$
(4.4)

with $\boldsymbol{\alpha}_{1}\bmod\gcd(q_{2},L)$ and
$\boldsymbol{\alpha}_{2}\bmod\operatorname{lcm}(q_{2},L)$. Then the number of
$\boldsymbol{\nu}_{0}$ is entirely determined by the number of
$\boldsymbol{\alpha}_{1}$ and that of $\boldsymbol{\alpha}_{2}$. Note that the
divisibility condition above is equivalent to

$\frac{q_{2}L}{\gcd(q_{2},L)}\mid a_{2}q_{1}^{2}\frac{L}{\gcd(q_{2},L)}\nabla
F(\boldsymbol{\alpha}_{2})+\frac{q_{2}}{\gcd(q_{2},L)}q_{1}l\nabla
F(\boldsymbol{\lambda}).$ (4.5)

So ${\mathscr{T}}_{q,L}(a_{2},l,\boldsymbol{\nu}_{0})$ only depends on
$\boldsymbol{\alpha}_{2}$ and we may write

${\mathscr{T}}_{q,L}(a_{2},l,\boldsymbol{\nu}_{0})={\mathscr{T}}_{q,L}(a_{2},l,\boldsymbol{\alpha}_{2}).$

On the other hand, the condition $\nabla
F(\boldsymbol{\lambda})\cdot\boldsymbol{\nu}_{0}\equiv 0\bmod L$ is equivalent
to

$\nabla F(\boldsymbol{\lambda})\cdot\boldsymbol{\alpha}_{2}\equiv 0\bmod L.$
(4.6)

The conditions (4.5) and (4.6) are only concerned with $l$ and
$\boldsymbol{\alpha}_{2}$.

With the decomposition (4.4), we have, modulo $q_{2}L$,

$a_{2}q_{1}\left(-q_{1}LF(\boldsymbol{\nu}_{0})+\nabla
F(\boldsymbol{\lambda})\cdot\boldsymbol{\nu}_{0}\right)+\boldsymbol{c}\cdot\boldsymbol{\nu}_{0}\\\
\equiv-a_{2}q_{1}^{2}LF(\boldsymbol{\alpha}_{2})+(a_{2}q_{1}\nabla
F(\boldsymbol{\lambda})+\boldsymbol{c})\cdot\boldsymbol{\alpha}_{2}+(a_{2}q_{1}\nabla
F(\boldsymbol{\lambda})+\boldsymbol{c})\cdot\operatorname{lcm}(q_{2},L)\boldsymbol{\alpha}_{1}.$

Concerning $\boldsymbol{\alpha}_{1}$, if $a_{2}$ satisfies the condition

$\gcd(q_{2},L)\mid a_{2}q_{1}\nabla F(\boldsymbol{\lambda})+\boldsymbol{c},$
(4.7)

then

$\displaystyle\sum_{\boldsymbol{\alpha}_{1}\bmod\gcd(q_{2},L)}\textup{e}_{q_{2}L}\left((a_{2}q_{1}\nabla
F(\boldsymbol{\lambda})+\boldsymbol{c})\cdot\operatorname{lcm}(q_{2},L)\boldsymbol{\alpha}_{1}\right)$
$\displaystyle=$
$\displaystyle\sum_{\boldsymbol{\alpha}_{1}\bmod\gcd(q_{2},L)}\textup{e}_{\gcd(q_{2},L)}\left((a_{2}q_{1}\nabla
F(\boldsymbol{\lambda})+\boldsymbol{c})\cdot\boldsymbol{\alpha}_{1}\right)=\gcd(q_{2},L)^{n+1},$

and we can write

${\mathscr{S}}_{q,L}(a_{2},\boldsymbol{c})=\frac{1}{L}(q_{2}L)^{n+1}\gcd(q_{2},L)^{n+1}\sum_{l\bmod
L}\textup{e}_{L}(lk)U_{q,L}(a_{2},l)$

where for every fixed $a_{2}$ and $l$,

$\displaystyle U_{q,L}(a_{2},l)$
$\displaystyle:=\sum_{\begin{subarray}{c}\boldsymbol{\alpha}_{2}\bmod\operatorname{lcm}(q_{2},L)\\\
\eqref{eq:conddivl}\text{ and }\eqref{eq:cond2prime}\text{
hold}\end{subarray}}\textup{e}_{q_{2}L}\left(-a_{2}q_{1}^{2}LF(\boldsymbol{\alpha}_{2})+(a_{2}q_{1}\nabla
F(\boldsymbol{\lambda})+\boldsymbol{c})\cdot\boldsymbol{\alpha}_{2}\right).$

Otherwise ${\mathscr{S}}_{q,L}(a_{2},\boldsymbol{c})=0$ if (4.7) is not
satisfied.

We recall that ${\mathscr{M}}_{F}$ denotes the matrix representation of $F$,
${\mathscr{M}}_{F}^{\operatorname{adj}}$ denotes its adjugate. Then if
$a\in{\mathbb{N}}$ is such that $a\mid L^{\infty}$ and $a\mid\nabla
F(\boldsymbol{\lambda})=2{\mathscr{M}}_{F}\boldsymbol{\lambda}$, on
multiplying with $2^{n}{\mathscr{M}}_{F}^{\operatorname{adj}}$, this implies
that $a\mid 2^{n+1}\Delta_{F}\boldsymbol{\lambda}$, whence $a=O(1)$, where the
implicit constant only depends on the discriminant of $F$.

The condition (4.5) implies that $l$ satisfies
$\frac{L}{\gcd(q_{2},L)}\mid\frac{q_{1}q_{2}}{\gcd(q_{2},L)}l\nabla
F(\boldsymbol{\lambda})$, itself equivalent to

$\frac{L}{\gcd(q_{2},L)}\mid l\nabla F(\boldsymbol{\lambda}),$ (4.8)

since $\gcd(\frac{L}{\gcd(q_{2},L)},\frac{q_{1}q_{2}}{\gcd(q_{2},L)})=1$. So,
on writing

$l=\frac{L}{\gcd(q_{2},L)}l^{\prime}+l^{\prime\prime},$

with $l^{\prime}\bmod\gcd(q_{2},L)$ and
$l^{\prime\prime}\bmod\frac{L}{\gcd(q_{2},L)}$, then (4.8) is equivalent to
$\frac{L}{\gcd(q_{2},L)}\mid l^{\prime\prime}\nabla F(\boldsymbol{\lambda})$
and hence determines $l^{\prime\prime}$ up to $O(1)$. Hence

$\\#\\{l\bmod L:\eqref{eq:condl}\text{ holds}\\}=O(\gcd(q_{2},L)).$

We next estimate trivially $U_{q,L}(a_{2},l)$ by counting the number of
$\boldsymbol{\alpha}_{2}$ satisfying (4.5) and (4.6). Note that (4.5) is
equivalent to

$\nabla
F(\boldsymbol{\alpha}_{2})\equiv-\overline{a_{2}q_{1}}\frac{q_{2}}{\gcd(q_{2},L)}\left(\frac{L}{\gcd(q_{2},L)}\right)^{-1}l\nabla
F(\boldsymbol{\lambda})\bmod q_{2}.$

On multiplying with $2^{n}{\mathscr{M}}_{F}^{\operatorname{adj}}$, this
implies that, once $a_{2}$ and $l$ are chosen, there are $O(1)$ choices for
the residues of the vector $\boldsymbol{\alpha}_{2}$ modulo $q_{2}$ satisfying
(4.5). Again since the coordinates of $\boldsymbol{\lambda}$ have a greatest
common divisor which is coprime to $L$, we can do an invertible linear change
of variables
$\boldsymbol{\alpha}_{2}\mapsto\boldsymbol{\alpha}_{2}^{\prime}\mod L$ so that
the first coordinate say $\alpha_{2,1}^{\prime}$ of
$\boldsymbol{\alpha}_{2}^{\prime}\bmod L$ is
$\boldsymbol{\alpha}_{2}\cdot\boldsymbol{\lambda}^{\prime}$ where
$\boldsymbol{\lambda}^{\prime}\in{\mathbb{Z}}^{n+1}$ also has coprime
coordinates away from $L$ and is defined by $\nabla
F(\boldsymbol{\lambda})=b\boldsymbol{\lambda}^{\prime}$ with certain $b=O(1)$.
Then the condition (4.6) determines $\alpha_{2,1}^{\prime}\bmod L$ up to
$O(1)$, and if moreover $l$ is also fixed, besides the $O(1)$ choices for
$\boldsymbol{\alpha}_{2}^{\prime}\bmod q_{2}$, in addition there are only
$O(1)$ choices for one of coordinates of
$\boldsymbol{\alpha}_{2}^{\prime}\bmod\operatorname{lcm}(q_{2},L)$ by the
Chinese remainder theorem. To summarise, when $a_{2}$ and $l$ are fixed and
satisfy (4.7) and (4.8) respectively,

$\\#\\{\boldsymbol{\alpha}_{2}\bmod\operatorname{lcm}(q_{2},L):\eqref{eq:conddivl}\text{
and }\eqref{eq:cond2prime}\text{
hold}\\}\ll\left(\frac{\operatorname{lcm}(q_{2},L)}{q_{2}}\right)^{n}=\left(\frac{L}{\gcd(q_{2},L)}\right)^{n}.$

Therefore

$\displaystyle{\mathscr{S}}_{q,L}(a_{2},\boldsymbol{c})$
$\displaystyle\leqslant\frac{1}{L}(q_{2}L)^{n+1}\gcd(q_{2},L)^{n+1}\sum_{\begin{subarray}{c}l\bmod
L\\\ \eqref{eq:condl}\text{
holds}\end{subarray}}\sum_{\begin{subarray}{c}\boldsymbol{\alpha}_{2}\bmod\operatorname{lcm}(q_{2},L)\\\
\eqref{eq:conddivl}\text{ and }\eqref{eq:cond2prime}\text{
hold}\end{subarray}}1$ $\displaystyle\ll q_{2}^{n+1}L^{2n}\gcd(q_{2},L)^{2}.$

We decompose

$a_{2}=\gcd(q_{2},L)a_{2}^{\prime}+a_{2}^{\prime\prime}$

with $a_{2}^{\prime}\bmod\frac{q_{2}}{\gcd(q_{2},L)}$ and
$a_{2}^{\prime\prime}\bmod\gcd(q_{2},L)$. Then the condition (4.7) determines
$a_{2}^{\prime\prime}$ up to $O(1)$ by the same argument applied to $l$
before. Hence

$\\#\\{a_{2}\bmod q_{2}:\eqref{eq:conda2}\text{
holds}\\}=O\left(\frac{q_{2}}{\gcd(q_{2},L)}\right).$

We finally get

$\left|S^{(2)}_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\right|^{2}\ll\varphi(q_{2})\sum_{\begin{subarray}{c}a_{2}\bmod
q_{2},(a_{2},q_{2})=1\\\ \eqref{eq:conda2}\text{
holds}\end{subarray}}{\mathscr{S}}_{q,L}(a_{2},\boldsymbol{c})\ll
q_{2}^{n+3}L^{2n}\gcd(q_{2},L),$

whence the desired bound for
$S^{(2)}_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})$. ∎

###  4.4. Proof of Theorem 4.1

The uniform estimate follows from Corollary 4.5 and Proposition 4.6, on
recalling (4.1) and Lemma (4.2).

Now assume that $F^{*}(\boldsymbol{c})\neq 0$. Then by Corollary 4.5 and
Proposition 4.6, we have

$\displaystyle
S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\ll_{\varepsilon}L^{n}q^{\frac{n+2}{2}+\varepsilon}\gcd(q_{1},2^{n}F^{*}(\boldsymbol{c}))^{\frac{1}{2}}q_{2}^{\frac{1}{2}}\gcd(q_{2},L)^{\frac{1}{2}},$

where we recall the decomposition (4.1). We therefore have

$\displaystyle\sum_{q\leqslant
X}\left|S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\right|$
$\displaystyle\ll_{\varepsilon}L^{n}\sum_{T\nearrow
X}T^{\frac{n+2}{2}+\varepsilon}\sum_{\begin{subarray}{c}q_{2}\leqslant T\\\
q_{2}\mid(2L\Delta_{F})^{\infty}\end{subarray}}q_{2}^{\frac{1}{2}}\gcd(q_{2},L)^{\frac{1}{2}}\sum_{\begin{subarray}{c}q_{1}\sim\frac{T}{q_{2}}\\\
(q_{1},2L\Delta_{F})=1\end{subarray}}\gcd(q_{1},2^{n}F^{*}(\boldsymbol{c}))^{\frac{1}{2}}$
$\displaystyle\ll_{\varepsilon}L^{n}\sum_{T\nearrow
X}T^{\frac{n+2}{2}+\varepsilon}\sum_{\begin{subarray}{c}q_{2}\leqslant T\\\
q_{2}\mid(2L\Delta_{F})^{\infty}\end{subarray}}q_{2}^{\frac{1}{2}}\gcd(q_{2},L)^{\frac{1}{2}}\times\tau(2^{n}F^{*}(\boldsymbol{c}))\frac{T^{1+\varepsilon}}{q_{2}}$
$\displaystyle\ll_{\varepsilon}L^{n}\sum_{T\nearrow
X}T^{\frac{n+4}{2}+\varepsilon}|2^{n}F^{*}(\boldsymbol{c})|^{\varepsilon}\\#\\{q_{2}\leqslant
T:q_{2}\mid(2L\Delta_{F})^{\infty}\\}$
$\displaystyle\ll_{\varepsilon}|\boldsymbol{c}|^{\varepsilon}L^{n+\varepsilon}\sum_{T\nearrow
X}T^{\frac{n+4}{2}+\varepsilon}\ll_{\varepsilon}|\boldsymbol{c}|^{\varepsilon}L^{n+\varepsilon}X^{\frac{n+4}{2}+\varepsilon}.$

Now if $F^{*}(\boldsymbol{c})=0$, then

$S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\ll_{\varepsilon}L^{n}q^{\frac{n+3}{2}+\varepsilon}\gcd(q_{2},L)^{\frac{1}{2}},$

and hence

$\displaystyle\sum_{q\leqslant
X}\left|S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\right|$
$\displaystyle\ll_{\varepsilon}L^{n}\sum_{T\nearrow
X}T^{\frac{n+3}{2}+\varepsilon}\sum_{\begin{subarray}{c}q_{2}\leqslant T\\\
q_{2}\mid(2L\Delta_{F})^{\infty}\end{subarray}}\gcd(q_{2},L)^{\frac{1}{2}}\sum_{\begin{subarray}{c}q_{1}\sim\frac{T}{q_{2}}\\\
(q_{1},2L\Delta_{F})=1\end{subarray}}1$
$\displaystyle\ll_{\varepsilon}L^{n}\sum_{T\nearrow
X}T^{\frac{n+5}{2}+\varepsilon}\sum_{\begin{subarray}{c}q_{2}\leqslant T\\\
q_{2}\mid(2L\Delta_{F})^{\infty}\end{subarray}}1\ll_{\varepsilon}L^{n+\varepsilon}X^{\frac{n+5}{2}+\varepsilon}$

Now assume that $n$ is even and $F^{*}(\boldsymbol{c})=0$. Using the second
half of Corollary 4.5 we have

$\displaystyle\sum_{q\leqslant
X}\left|S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\right|$
$\displaystyle\ll_{\varepsilon}L^{n}\sum_{T\nearrow
X}\sum_{\begin{subarray}{c}q_{2}\leqslant T\\\
q_{2}\mid(2L\Delta_{F})^{\infty}\end{subarray}}q_{2}^{\frac{n+3}{2}}\gcd(q_{2},L)^{\frac{1}{2}}\sum_{\begin{subarray}{c}q_{1}\sim\frac{T}{q_{2}},q_{1}=\square\\\
(q_{1},2L\Delta_{F})=1\end{subarray}}q_{1}^{\frac{n+3}{2}}$
$\displaystyle\ll_{\varepsilon}L^{n}\sum_{T\nearrow
X}T^{\frac{n+4}{2}}\\#\\{q_{2}\leqslant T:q_{2}\mid(2L\Delta_{F})^{\infty}\\}$
$\displaystyle\ll_{\varepsilon}L^{n+\varepsilon}X^{\frac{n+4}{2}+\varepsilon}.$

The proof is thus finished. ∎

##  5\. The contribution from $\boldsymbol{c}\neq\boldsymbol{0}$

######  Theorem 5.1.

Let $A>0$ be a real parameter. Assume $n\geqslant 4$, $\eta^{-1}\ll B^{A}$ and
assume that $\gcd(\lambda_{0},\ldots,\lambda_{n},L)=1$. Suppose that (1.3)
holds with $-1<\tau<1$. We have

$\sum_{q=1}^{\infty}\sum_{\boldsymbol{c}\in{\mathbb{Z}}^{n+1}\setminus\\{\boldsymbol{0}\\}}\frac{S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})I_{q,L,\boldsymbol{\lambda}}(w_{B,R}^{\pm};\boldsymbol{c})}{(qL)^{n+1}}\ll_{\varepsilon,A}\left(\frac{B}{LR}\right)^{n+1}\times\begin{cases}L^{-1}\eta^{\frac{9-5n}{2}}B^{-\frac{n-3}{2}\tau+\varepsilon}&\text{
if }n\geqslant 5;\\\ L^{-1}\eta^{-15/2}B^{-\tau+\varepsilon}&\text{ if
}n=4.\end{cases}$

The implied constant is independent of $R,L,\boldsymbol{\lambda},\eta$.

###  5.1. A lattice condition on $\boldsymbol{c}$.

The goal is to prove the following constraint on the summand $\boldsymbol{c}$
(see also [28, Lemma 4.2]).

######  Proposition 5.2.

We have $S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\neq 0$ only if
$\boldsymbol{c}$ belongs to the lattice

$\Gamma_{\boldsymbol{\lambda},L}:=\\{\boldsymbol{d}\in{\mathbb{Z}}^{n+1}:\text{there
exists }b\in{\mathbb{Z}}\text{ such that }\boldsymbol{d}\equiv b\nabla
F(\boldsymbol{\lambda})\bmod L\\}.$ (5.1)

###### Proof.

We recall the expression (2.16). On resolving the condition
$H_{\boldsymbol{\lambda},L}(\boldsymbol{\sigma})\equiv 0\bmod L$, we can
rewrite

$S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})=\sum_{\boldsymbol{\sigma}\bmod
qL}\frac{1}{L}\sum_{l\bmod L}\sum_{\begin{subarray}{c}a\bmod q\\\
(a,q)=1\end{subarray}}{\mathscr{S}}_{q,L,\boldsymbol{\lambda}}(a,l;\boldsymbol{c},\boldsymbol{\sigma}),$

where

$\displaystyle{\mathscr{S}}_{q,L,\boldsymbol{\lambda}}(a,l;\boldsymbol{c},\boldsymbol{\sigma})$
$\displaystyle:=\textup{e}_{qL}\left(a\left(H_{\boldsymbol{\lambda},L}(\boldsymbol{\sigma})+LF(\boldsymbol{\sigma})\right)+\boldsymbol{c}\cdot\boldsymbol{\sigma}\right)\textup{e}_{L}\left(lH_{\boldsymbol{\lambda},L}(\boldsymbol{\sigma})\right)$
$\displaystyle=\textup{e}_{q}(aF(\boldsymbol{\sigma}))\textup{e}_{qL}\left(\left((a+ql)\nabla
F(\boldsymbol{\lambda})+\boldsymbol{c}\right)\cdot\boldsymbol{\sigma}+(a+ql)k\right).$

On substituting $b=a+ql$, we can rewrite

$S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})=\frac{1}{L}\sum_{\begin{subarray}{c}b\bmod
qL\\\
(b,q)=1\end{subarray}}\textup{e}_{qL}(bk){\mathscr{S}}^{(0)}_{q,L,\boldsymbol{\lambda}}(b;\boldsymbol{c}),$

where

${\mathscr{S}}^{(0)}_{q,L,\boldsymbol{\lambda}}(b;\boldsymbol{c}):=\sum_{\boldsymbol{\sigma}\bmod
qL}\textup{e}_{q}(bF(\boldsymbol{\sigma}))\textup{e}_{qL}\left((b\nabla
F(\boldsymbol{\lambda})+\boldsymbol{c})\cdot\boldsymbol{\sigma}\right).$

So $S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\neq 0$ only if there exists
$b\bmod qL$ such that
${\mathscr{S}}^{(0)}_{q,L,\boldsymbol{\lambda}}(b;\boldsymbol{c})\neq 0$.
Observe that

${\mathscr{S}}^{(0)}_{q,L,\boldsymbol{\lambda}}(b;\boldsymbol{c})=\sum_{\boldsymbol{w}\bmod
q}\textup{e}_{q}\left(bF(\boldsymbol{w})\right){\mathscr{S}}^{(1)}_{q,L,\boldsymbol{\lambda}}(b;\boldsymbol{c},\boldsymbol{w}),$

where

${\mathscr{S}}^{(1)}_{q,L,\boldsymbol{\lambda}}(b;\boldsymbol{c},\boldsymbol{w}):=\sum_{\begin{subarray}{c}\boldsymbol{\sigma}\bmod
qL\\\ \boldsymbol{\sigma}\equiv\boldsymbol{w}\bmod
q\end{subarray}}\textup{e}_{qL}\left(\left(b\nabla
F(\boldsymbol{\lambda})+\boldsymbol{c}\right)\cdot\boldsymbol{\sigma}\right).$

So ${\mathscr{S}}^{(0)}_{q,L,\boldsymbol{\lambda}}(b;\boldsymbol{c})\neq 0$
only if there exists $\boldsymbol{w}\bmod q$ such that
${\mathscr{S}}^{(1)}_{q,L,\boldsymbol{\lambda}}(b;\boldsymbol{c},\boldsymbol{w})\neq
0$. On resolving the condition $\boldsymbol{\sigma}\equiv\boldsymbol{w}\bmod
q$, we have

$\displaystyle{\mathscr{S}}^{(1)}_{q,L,\boldsymbol{\lambda}}(b;\boldsymbol{c},\boldsymbol{w})$
$\displaystyle=\sum_{\begin{subarray}{c}\boldsymbol{\sigma}\bmod
qL\end{subarray}}\frac{1}{q^{n+1}}\sum_{\boldsymbol{e}\bmod
q}\textup{e}_{q}\left((\boldsymbol{\sigma}-\boldsymbol{w})\cdot\boldsymbol{e}\right)\textup{e}_{qL}\left(\left(b\nabla
F(\boldsymbol{\lambda})+\boldsymbol{c}\right)\cdot\boldsymbol{\sigma}\right)$
$\displaystyle=\frac{1}{q^{n+1}}\sum_{\boldsymbol{e}\bmod
q}\textup{e}_{q}\left(-\boldsymbol{w}\cdot\boldsymbol{e}\right){\mathscr{S}}^{(2)}_{q,L,\boldsymbol{\lambda}}(b;\boldsymbol{c},\boldsymbol{w},\boldsymbol{e}),$

where

${\mathscr{S}}^{(2)}_{q,L,\boldsymbol{\lambda}}(b;\boldsymbol{c},\boldsymbol{w},\boldsymbol{e}):=\sum_{\begin{subarray}{c}\boldsymbol{\sigma}\bmod
qL\end{subarray}}\textup{e}_{qL}\left(\left(b\nabla
F(\boldsymbol{\lambda})+\boldsymbol{c}+L\boldsymbol{e}\right)\cdot\boldsymbol{\sigma}\right).$

Now it is clear that
${\mathscr{S}}^{(1)}_{q,L,\boldsymbol{\lambda}}(b;\boldsymbol{c},\boldsymbol{w})\neq
0$ only if there exists $\boldsymbol{e}\bmod q$ such that
${\mathscr{S}}^{(2)}_{q,L,\boldsymbol{\lambda}}(b;\boldsymbol{c},\boldsymbol{w},\boldsymbol{e})\neq
0$, which is the case if and only if

$qL\mid b\nabla F(\boldsymbol{\lambda})+\boldsymbol{c}+L\boldsymbol{e}.$

In particular, a necessary condition for this is

$\boldsymbol{c}\equiv-b\nabla F(\boldsymbol{\lambda})\bmod L.$

The proof is thus completed. ∎

###  5.2. Proof of Theorem 5.1

Recalling the choice of $Q$ from (2.21), we have

$Q\gg B^{\frac{1}{2}(1+\tau)}\gg 1.$

Moreover, recalling the definition of $\widetilde{\boldsymbol{c}}$ (3.3) and
$\boldsymbol{d}$ (3.4), we have

$|{\mathbf{d}}|\geqslant\frac{Q}{LR}\max_{0\leqslant i\leqslant
n}|\widetilde{c_{i}}|\gg B^{\tau}|\boldsymbol{c}|.$ (5.2)

We shall use this inequality repeatedly. We recall also the assumption that
$\|w\|_{N}\ll_{N}\eta^{-N}$.

In view of Proposition 5.2, we consider

${\mathscr{G}}(L,R;B):=\underset{\begin{subarray}{c}\boldsymbol{c}\in{\mathbb{Z}}^{n+1}\setminus\\{\boldsymbol{0}\\}:\boldsymbol{c}\in\Gamma_{\boldsymbol{\lambda},L}\\\
q\ll
Q\end{subarray}}{\sum\sum}\frac{\left|S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\widehat{{\mathscr{I}}}_{q}(\widehat{w}^{\pm};\boldsymbol{d})\right|}{q^{n+1}}.$

Step I. We shall prove that the range
$|\boldsymbol{c}|>\eta^{-1}QB^{-\tau+\varepsilon}$ has negligible
contribution. The “simpler” estimate of Corollary 3.3 yields

$\widehat{{\mathscr{I}}}_{q}(\widehat{w}^{\pm};\boldsymbol{d})\ll_{N}\frac{Q}{q}\left(\frac{B^{\tau}|\boldsymbol{c}|\eta}{Q}\right)^{-N}.$

We record from Theorem 4.1 that uniformly for any $\boldsymbol{c}$, whenever
$n\geqslant 4$,

$\sum_{q=1}^{\infty}\frac{\left|S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\right|}{q^{n+2}}\ll
L^{n}\sum_{q=1}^{\infty}\frac{1}{q^{\frac{n}{2}}}=O(L^{n}).$

For any constant $c>0$ and $N>n+1$ we then have the estimate

$\displaystyle\sum_{q=1}^{cQ}\sum_{\boldsymbol{c}:|\boldsymbol{c}|>\eta^{-1}QB^{-\tau+\varepsilon}}\frac{\left|S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\widehat{{\mathscr{I}}}_{q}(\widehat{w}^{\pm};\boldsymbol{d})\right|}{q^{n+1}}$
$\displaystyle\ll_{N}$
$\displaystyle\sum_{\boldsymbol{c}:|\boldsymbol{c}|>\eta^{-1}QB^{-\tau+\varepsilon}}Q\left(\frac{B^{\tau}|\boldsymbol{c}|\eta}{Q}\right)^{-N}\sum_{q=1}^{\infty}\frac{\left|S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\right|}{q^{n+2}}$
$\displaystyle\ll_{N}$ $\displaystyle L^{n}\eta^{-N}Q^{1+N}B^{-\tau
N}\sum_{\boldsymbol{c}:|\boldsymbol{c}|>\eta^{-1}QB^{-\tau+\varepsilon}}\frac{1}{|\boldsymbol{c}|^{N}}$
$\displaystyle\ll_{N}$ $\displaystyle L^{n}\eta^{-N}Q^{1+N}B^{-\tau
N}\sum_{t>\eta^{-1}QB^{-\tau+\varepsilon}}\frac{1}{t^{N-n}}$
$\displaystyle\ll_{N}$ $\displaystyle L^{n}\eta^{-N}Q^{1+N}B^{-\tau
N}\left(\eta^{-1}QB^{-\tau+\varepsilon}\right)^{-N+n+1}$
$\displaystyle\ll_{N}$ $\displaystyle
L^{n}\eta^{-n-1}Q^{2+n}B^{-\tau(n+1)+\varepsilon(-N+n+1)}.$

We then obtain a power-saving by taking $N$ sufficiently large.

Nonzero vectors $|\boldsymbol{c}|\leqslant\eta^{-1}QB^{-\tau+\varepsilon}$
with either $|\widetilde{c_{0}}|>\frac{\eta^{-1}QL^{2}}{B^{1-\varepsilon}}$ or
$|\widetilde{c_{j}}|>\frac{\eta^{-1}QL^{2}R}{B^{1-\varepsilon}}$ for some
$j\geqslant 2$ can similarly be shown to provide a negligible contribution.
Indeed, in the first case

$|d_{0}|>\frac{\eta^{-1}QL^{2}}{B^{1-\varepsilon}}\times\frac{B}{L^{2}}=\eta^{-1}QB^{\varepsilon}$

and in the second case

$|d_{j}|>\frac{\eta^{-1}QL^{2}R}{B^{1-\varepsilon}}\times\frac{B}{L^{2}R}=\eta^{-1}QB^{\varepsilon}.$

Therefore, in either case we have

$|{\mathbf{d}}|>\eta^{-1}QB^{\varepsilon},$

and hence the simple estimate in Corollary 3.3 again gives

$\widehat{{\mathscr{I}}}_{q}(\widehat{w}^{\pm};\boldsymbol{d})\ll_{N}\frac{Q}{q}B^{-\varepsilon
N}.$

Taking $N$ large enough and summing over $q$ and over such $\boldsymbol{c}$ as
before gives a power-saving.

Step II. In what follows we shall be concerned with

$0\neq|\boldsymbol{c}|\leqslant\eta^{-1}QB^{-\tau+\varepsilon},\quad|\widetilde{c_{0}}|\leqslant\frac{\eta^{-1}QL^{2}}{B^{1-\varepsilon}}\quad\text{and}\quad|\widetilde{c_{j}}|\leqslant\frac{\eta^{-1}QL^{2}R}{B^{1-\varepsilon}}\quad\text{for
all }j\geqslant 2.$ (5.3)

The “harder estimate” of Corollary 3.3 is only useful when the term
$A^{-N}\|\widehat{w}^{\pm}\|_{N}$ can be made small, since otherwise it is
better to use the trivial bound
$\widehat{{\mathscr{I}}}_{q}(\widehat{w}^{\pm};\boldsymbol{d})\ll 1$. In our
setup where $\|\widehat{w}^{\pm}\|_{N}\asymp\eta^{-N}$, it is natural to
choose $A=\eta^{-1}B^{\varepsilon}$. We may apply the “harder estimate” for
all $q<\eta^{3}B^{\tau-\varepsilon}|\boldsymbol{c}|$, because

$\displaystyle q<\eta^{3}B^{\tau-\varepsilon}|\boldsymbol{c}|\implies
q<\eta^{3}B^{-\varepsilon}|\boldsymbol{d}|\implies\left|\frac{\boldsymbol{d}}{q}\right|>\eta^{-3}B^{\varepsilon}$

where in the last line we have redefined $\varepsilon$. Motivated by this, we
define

$\displaystyle{\mathscr{G}}^{(1)}(L,R;B)$
$\displaystyle:=\underset{\begin{subarray}{c}\boldsymbol{c}\in\Gamma_{\boldsymbol{\lambda},L},\eqref{eq:cond00}\text{
holds}\\\
q\leqslant\eta^{3}B^{\tau-\varepsilon}|\boldsymbol{c}|^{1-\varepsilon}\end{subarray}}{\sum\sum}\frac{\left|S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\widehat{{\mathscr{I}}}_{q}(\widehat{w}^{\pm};\boldsymbol{d})\right|}{q^{n+1}},$
$\displaystyle{\mathscr{G}}^{(2)}(L,R;B)$
$\displaystyle:=\underset{\begin{subarray}{c}\boldsymbol{c}\in\Gamma_{\boldsymbol{\lambda},L},\eqref{eq:cond00}\text{
holds}\\\
q>\eta^{3}B^{\tau-\varepsilon}|\boldsymbol{c}|^{1-\varepsilon}\end{subarray}}{\sum\sum}\frac{\left|S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\widehat{{\mathscr{I}}}_{q}(\widehat{w}^{\pm};\boldsymbol{d})\right|}{q^{n+1}}.$

We assume momentarily that $n\geqslant 5$. By Theorem 4.1 with partial
summation, we have for any real $X>0$,

$\sum_{q\leqslant
X}\frac{\left|S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\right|}{q^{l_{1}}}\ll_{\varepsilon}|\boldsymbol{c}|^{\varepsilon}L^{n+\varepsilon}X^{\frac{n+5}{2}-l_{1}+\varepsilon}$
(5.4)

for every $l_{1}\leqslant\frac{n+5}{2}$, and

$\sum_{q>X}\frac{\left|S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\right|}{q^{l_{2}}}\ll_{\varepsilon}B^{\varepsilon}|\boldsymbol{c}|^{\varepsilon}L^{n+\varepsilon}X^{\frac{n+5}{2}-l_{2}+\varepsilon}$
(5.5)

for every $l_{2}>\frac{n+5}{2}$.

We use (5.4) and the “harder estimate” for
$\widehat{{\mathscr{I}}}_{q}(\widehat{w}^{\pm};\boldsymbol{d})$ to get:

$\displaystyle{\mathscr{G}}^{(1)}(L,R;B)$
$\displaystyle\ll\eta^{-n-1}B^{-\frac{n-1}{2}\tau+\varepsilon}\sum_{\boldsymbol{c}\in\Gamma_{\boldsymbol{\lambda},L},\eqref{eq:cond00}\text{
holds}}|\boldsymbol{c}|^{-\frac{n-1}{2}}\sum_{q\leqslant\eta^{3}B^{\tau-\varepsilon}|\boldsymbol{c}|^{1-\varepsilon}}\frac{|S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})|}{q^{\frac{n+3}{2}}}$
$\displaystyle\ll_{\varepsilon}L^{n+\varepsilon}B^{-\frac{n-3}{2}\tau+\varepsilon}\eta^{2-n}\sum_{\boldsymbol{c}\in\Gamma_{\boldsymbol{\lambda},L},\eqref{eq:cond00}\text{
holds}}|\boldsymbol{c}|^{-\frac{n-3}{2}}.$

Now by (5.5) and the trivial estimate for
$\widehat{{\mathscr{I}}}_{q}(\widehat{w}^{\pm};\boldsymbol{d})$, we get:

$\displaystyle{\mathscr{G}}^{(2)}(L,R;B)$
$\displaystyle\ll\sum_{\boldsymbol{c}\in\Gamma_{\boldsymbol{\lambda},L},\eqref{eq:cond00}\text{
holds}}\sum_{q>\eta^{3}B^{\tau-\varepsilon}|\boldsymbol{c}|^{1-\varepsilon}}\frac{\left|S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\right|}{q^{n+1}}$
$\displaystyle\ll_{\varepsilon}L^{n+\varepsilon}B^{\varepsilon}\sum_{\boldsymbol{c}\in\Gamma_{\boldsymbol{\lambda},L},\eqref{eq:cond00}\text{
holds}}\left(\eta^{3}B^{\tau-\varepsilon}|\boldsymbol{c}|^{1-\varepsilon}\right)^{2-\frac{n+1}{2}}$
$\displaystyle\ll
L^{n+\varepsilon}\eta^{\frac{3(3-n)}{2}}B^{-\frac{n-3}{2}\tau+\varepsilon}\sum_{\boldsymbol{c}\in\Gamma_{\boldsymbol{\lambda},L},\eqref{eq:cond00}\text{
holds}}|\boldsymbol{c}|^{-\frac{n-3}{2}}.$

To estimate the above sums over $\boldsymbol{c}$, we use

######  Lemma 5.3.

Assume that $\gcd(\lambda_{0},\ldots,\lambda_{n},L)=1$. For $T\geqslant 1$,
consider the set

$\Theta_{\boldsymbol{\lambda},L}(T,B):=\left\\{\boldsymbol{c}\in{\mathbb{Z}}^{n+1}:\boldsymbol{c}\in\Gamma_{\boldsymbol{\lambda},L},|\boldsymbol{c}|\leqslant
T,\max\left(|\widetilde{c_{0}}|,|\widetilde{c_{j}}|,2\leqslant j\leqslant
n\right)\leqslant\eta^{-1}LB^{\varepsilon}\right\\}.$

Then for $\varepsilon>0$ small enough, we have

$\\#\Theta_{\boldsymbol{\lambda},L}(T,B)\ll_{\varepsilon}T\eta^{-n}B^{\varepsilon},$

uniformly in $L,\boldsymbol{\lambda}$.

Taking Lemma 5.3 for granted, we now apply a dyadic sum over
$|\boldsymbol{c}|$ up to $\eta^{-1}QB^{-\tau+\varepsilon}$. After
appropriately redefining $\varepsilon$, we have

$\displaystyle\sum_{\boldsymbol{c}\in\Gamma_{\boldsymbol{\lambda},L},\eqref{eq:cond00}\text{
holds}}|\boldsymbol{c}|^{-\frac{n-3}{2}}$
$\displaystyle\ll_{\varepsilon}\sum_{T\nearrow\eta^{-1}QB^{-\tau+\varepsilon}}T^{-\frac{n-3}{2}}\\#\Theta_{\boldsymbol{\lambda},L}(T,B)$
$\displaystyle\ll_{\varepsilon}\eta^{-n}B^{\varepsilon}\sum_{T\nearrow\eta^{-1}QB^{-\tau+\varepsilon}}T^{-\frac{n-5}{2}}\ll_{\varepsilon}\eta^{-n}B^{\varepsilon},$

whenever $n\geqslant 5$.

To summarise, we conclude that

${\mathscr{G}}(L,R;B)\ll_{\varepsilon}L^{n+\varepsilon}\eta^{\frac{9-5n}{2}}B^{-\frac{n-3}{2}\tau+\varepsilon}.$

Finally, using (3.1) and (3.5), we have

$\displaystyle\left|I_{q,L,\boldsymbol{\lambda}}(w_{B,R}^{\pm};\boldsymbol{c})\right|$
$\displaystyle=\frac{1}{|\det
M|L^{n+1}}\left|{\mathscr{I}}_{q,L}(w_{B,R}^{\pm};\boldsymbol{c})\right|$
$\displaystyle=\frac{1}{|\det
M|}\left(\frac{B}{LR}\right)^{n+1}\left|\widehat{{\mathscr{I}}}_{q}(\widehat{w}^{\pm};\boldsymbol{d})\right|,$

and hence

$\sum_{q=1}^{\infty}\sum_{\boldsymbol{c}\in{\mathbb{Z}}^{n+1}\setminus\\{\boldsymbol{0}\\}}\frac{\left|S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})I_{q,L,\boldsymbol{\lambda}}(w_{B,R}^{\pm};\boldsymbol{c})\right|}{(qL)^{n+1}}\ll\frac{1}{L^{n+1}}\left(\frac{B}{LR}\right)^{n+1}{\mathscr{G}}(L,R;B).$

The proof is thus completed for the case $n\geqslant 5$.

As for the case $n=4$, we use instead the following estimate from Theorem 4.1:

$\sum_{q\leqslant
X}\left|S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{c})\right|\ll_{\varepsilon}|\boldsymbol{c}|^{\varepsilon}L^{4+\varepsilon}X^{4+\varepsilon},$
(5.6)

valid for all
$\boldsymbol{c}\in{\mathbb{Z}}^{5}\setminus\\{\boldsymbol{0}\\}$.

The only alteration required for the case $n=4$ is to replace the partial
summation bounds in (5.4) of Step II with (5.6). We obtain

${\mathscr{G}}(L,R;B)\ll_{\varepsilon}L^{4+\varepsilon}\eta^{-7/2}B^{-\tau+\varepsilon}\sum_{\boldsymbol{c}\in\Gamma_{\boldsymbol{\lambda},L},\eqref{eq:cond00}\text{
holds}}|\boldsymbol{c}|^{-1}\ll_{\varepsilon}L^{4+\varepsilon}\eta^{-15/2}B^{-\tau+\varepsilon}.$

Proceding in the same way as before yields the desired bound. ∎

###  5.3. Proof of Lemma 5.3

Given that $\gcd(\lambda_{0},\ldots,\lambda_{n},L)=1$, the lattice
$\Gamma_{\boldsymbol{\lambda},L}$ (5.1) is of rank $(n+1)$ and of determinant
$\det(\Gamma_{\boldsymbol{\lambda},L})$ with
$L^{n}\ll\det(\Gamma_{\boldsymbol{\lambda},L})\ll L^{n}$, where the implied
constants only depend on $F$. Since it contains
$L\boldsymbol{e}_{1},\ldots,L\boldsymbol{e}_{n+1}$, where $\boldsymbol{e}_{i}$
stands for the $i$-th unit vector in ${\mathbb{Z}}^{n+1}$, its successive
minima satisfy

$\lambda_{j}\leqslant L\text{ for all }1\leqslant j\leqslant n+1,$

and consequently, by Minkowski’s second theorem, we have

$\prod_{i=1}^{k}\lambda_{i}\gg\frac{\det(\Gamma_{\boldsymbol{\lambda},L})}{L^{n+1-k}}\gg
L^{k-1}$

for any $1\leqslant k\leqslant n+1$.

First assume that
$T>\eta^{-1}QL^{2}RB^{-1+\varepsilon}=\eta^{-1}LB^{\varepsilon}$. Note that
the norm $\max_{0\leqslant i\leqslant n}|\widetilde{c_{i}}|$ is equivalent to
$|\boldsymbol{c}|$. Then by standard results on counting lattice points (see
e.g. [31, Lemma 2]), we obtain

$\displaystyle\\#\Theta_{\boldsymbol{\lambda},L}(T,B)$ $\displaystyle\ll
1+\frac{T(L\eta^{-1}B^{\varepsilon})^{n}}{\det(\Gamma_{\boldsymbol{\lambda},L})}+\sum_{k=1}^{n}\frac{T(L\eta^{-1}B^{\varepsilon})^{k-1}}{\prod_{i=1}^{k}\lambda_{i}}$
$\displaystyle\ll T\eta^{-n}B^{\varepsilon}.$

Now assume $T\leqslant\eta^{-1}LB^{\varepsilon}$. We have similarly

$\displaystyle\\#\Theta_{\boldsymbol{\lambda},L}(T,B)$ $\displaystyle\ll
1+\sum_{k=1}^{n+1}\frac{T^{k}}{\prod_{i=1}^{k}\lambda_{i}}\ll
1+T\sum_{k=1}^{n+1}\frac{(\eta^{-1}LB^{\varepsilon})^{k-1}}{L^{k-1}}\ll
T\eta^{-n}B^{\varepsilon}.$

Here we have redefined $\varepsilon$.∎

##  6\. The contribution from $\boldsymbol{c}=\boldsymbol{0}$

In this section we shall derive the main term. In the following, when we write
$w_{B,R}$ we mean one of $w_{B,R}^{\pm}$.

######  Theorem 6.1.

Assume that $n\geqslant 4$, and that (1.3) holds with $-1<\tau<1$. Then

$\sum_{q=1}^{\infty}\frac{S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{0})I_{q,L,\boldsymbol{\lambda}}(w_{B,R};\boldsymbol{0})}{(qL)^{n+1}}=\frac{B^{n+1}}{(LR)^{2}}\left({\mathscr{I}}(w_{R})\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\lambda})+O_{\tau,\varepsilon}\left(\frac{B^{\frac{3-n}{4}(1+\tau)+\varepsilon}}{L^{n}R^{n-1}}\right)\right).$

The implied constant is independent of $R,L,\boldsymbol{\lambda}$. We refer to
(6.6) and (1.6) for the definitions of ${\mathscr{I}}(w_{R})$ and
$\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\lambda})$.

In subsections §6.1 §6.2 we assume $n\geqslant 3$.

###  6.1. The singular integrals
$I_{q,L,\boldsymbol{\lambda}}(w;\boldsymbol{0})$

We recall from (3.1) that

$\displaystyle I_{q,L,\boldsymbol{\lambda}}(w_{B,R};\boldsymbol{0})$
$\displaystyle=\frac{1}{L^{n+1}|\det
M|}\int_{{\mathbb{R}}^{n+1}}w_{B,R}(M^{-1}\boldsymbol{t})h\left(\frac{q}{Q},\frac{R^{2}}{B^{2}}\widetilde{F}(\boldsymbol{t})\right)\operatorname{d}\boldsymbol{t}$
$\displaystyle=\frac{B^{n+1}}{L^{n+1}|\det M|}{\mathscr{J}}_{q}(R;w),$

where

${\mathscr{J}}_{q}(R;w):=\int_{{\mathbb{R}}^{n+1}}w_{1}\left(R\frac{u_{j}}{u_{0}},j\geqslant
2\right)w_{2}(R^{2}\widetilde{F}(\boldsymbol{u}))w_{3}(u_{0})h\left(\frac{q}{Q},R^{2}\widetilde{F}(\boldsymbol{u})\right)\operatorname{d}\boldsymbol{u}.$

The remaining part is to analyse ${\mathscr{J}}_{q}(R;w)$ and relate it to the
(weighted) singular integral and real density.

####  6.1.1. Relation with the volume integral

We write $\widetilde{F}(\boldsymbol{u})=u_{0}^{2}G(y_{1},\boldsymbol{y})$
where $y_{i}=\frac{u_{i}}{u_{0}},1\leqslant i\leqslant
n,\boldsymbol{y}=(y_{2},\ldots,y_{n})$ and $G$ satisfies
$G(y_{1},\boldsymbol{y})=y_{1}+F_{2}\left(y_{2},\ldots,y_{n}\right)$ by Lemma
2.1.

######  Theorem 6.2.

We have

$I_{q,L,\boldsymbol{\lambda}}(w_{B,R}^{\pm};\boldsymbol{0})=\frac{B^{n+1}}{L^{n+1}R^{2}}\left({\mathscr{I}}(w_{R})+O_{N}\left(\left(\frac{q}{Q}\right)^{N}\right)\right),$

where we define $w_{R}:{\mathbb{R}}^{n-1}\to{\mathbb{R}}$ by

$w_{R}(\boldsymbol{y})=w_{1}(Ry_{j},2\leqslant j\leqslant n)$ (6.1)

and

${\mathscr{I}}(w_{R}):=|\det
M|^{-1}\int_{{\mathbb{R}}\times{\mathbb{R}}^{n-1}}w_{R}(\boldsymbol{y})u_{0}^{n-2}w_{3}(u_{0})\left(\frac{\partial
G}{\partial
y_{1}}\right)^{-1}(0,\boldsymbol{y})\operatorname{d}u_{0}\operatorname{d}\boldsymbol{y}.$
(6.2)

###### Proof.

Observe that

$\frac{\partial G}{\partial y_{1}}(y_{1},\boldsymbol{y})=1.$ (6.3)

Hence, for any such fixed $u_{0}$ in the domain of integration, $y_{1}$ can be
uniquely solved by e.g. the implicit coordinate
$\sigma:=R^{2}u_{0}^{2}G(y_{1},\boldsymbol{y})$. So, on defining

$J(R;\sigma)=J(R;0)=\int_{{\mathbb{R}}^{n-1}}w_{R}(\boldsymbol{y})\operatorname{d}\boldsymbol{y}=\int_{{\mathbb{R}}^{n-1}}w_{R}(\boldsymbol{y})\left(\frac{\partial
G}{\partial
y_{1}}\right)^{-1}(\sigma,\boldsymbol{y})\operatorname{d}\boldsymbol{y},$
(6.4)

we obtain

$\displaystyle{\mathscr{J}}_{q}(R;w)$
$\displaystyle=\int_{{\mathbb{R}}^{n+1}}w_{R}(\boldsymbol{y})w_{2}(R^{2}u_{0}^{2}G(y_{1},\boldsymbol{y}))u_{0}^{n}w_{3}(u_{0})h\left(\frac{q}{Q},R^{2}u_{0}^{2}G(y_{1},\boldsymbol{y})\right)\operatorname{d}u_{0}\operatorname{d}y_{1}\operatorname{d}\boldsymbol{y}$
$\displaystyle=\frac{1}{R^{2}}\int_{{\mathbb{R}}}u_{0}^{n-2}w_{3}(u_{0})\operatorname{d}u_{0}\int_{{\mathbb{R}}^{n-1}\times{\mathbb{R}}}w_{R}(\boldsymbol{y})w_{2}(\sigma)h\left(\frac{q}{Q},\sigma\right)\left(\frac{\partial
G}{\partial
y_{1}}\right)^{-1}(\sigma,\boldsymbol{y})\operatorname{d}\boldsymbol{y}\operatorname{d}\sigma$
$\displaystyle=\frac{1}{R^{2}}\int_{{\mathbb{R}}}u_{0}^{n-2}w_{3}(u_{0})\operatorname{d}u_{0}\int_{{\mathbb{R}}}J(R;\sigma)w_{2}(\sigma)h\left(\frac{q}{Q},\sigma\right)\operatorname{d}\sigma.$

By [13, Lemma 9], we have

$\displaystyle\int_{{\mathbb{R}}}J(R;\sigma)w_{2}(\sigma)h\left(\frac{q}{Q},\sigma\right)\operatorname{d}\sigma$
$\displaystyle=J(R;0)+O_{N}\left(\left(\frac{q}{Q}\right)^{N}\right)$

where we recall that $w_{2}(0)=1$. So the leading term of
${\mathscr{J}}_{q}(R;w)$ equals

$\begin{split}&|\det
M|^{-1}J(R;0)\int_{{\mathbb{R}}}u_{0}^{n-2}w_{3}(u_{0})\operatorname{d}u_{0}\\\
=&|\det
M|^{-1}\int_{{\mathbb{R}}\times{\mathbb{R}}^{n-1}}w_{R}(\boldsymbol{y})u_{0}^{n-2}w_{3}(u_{0})\left(\frac{\partial
G}{\partial
y_{1}}\right)^{-1}(0,\boldsymbol{y})\operatorname{d}u_{0}\operatorname{d}\boldsymbol{y}={\mathscr{I}}(w_{R}).\qed\end{split}$

######  Remark 6.3.

In the “unweighted” setting, the weight function $w_{3}$ in the integral
$\int_{{\mathbb{R}}}u_{0}^{n-2}w_{3}(u_{0})\operatorname{d}u_{0}$ is replaced
by the condition $\max_{0\leqslant i\leqslant n}|u_{i}|\leqslant 1$, and

$\int_{\max_{0\leqslant i\leqslant n}|u_{i}|\leqslant
1}u_{0}^{n-2}\operatorname{d}u_{0}=\frac{2}{n-1}\max(1,|y_{j}|,2\leqslant
j\leqslant n)^{-(n-2)}.$ (6.5)

The factor $(n-1)^{-1}$ equals _Peyre’s constant_ of the quadric, see [24,
Définition 2.4, Lemme 5.4.8]. The term $\max(1,|y_{j}|)^{-(n-2)}$, together
with $|\det M|^{-1}\left(\frac{\partial G}{\partial
y_{1}}\right)^{-1}(0,\boldsymbol{y})$, form the density function of the real
Tamagawa measure (within the real neighbourhood $V({\mathbb{R}})\cap(t_{0}\neq
0)$ with local coordinates
$\boldsymbol{y}=(\frac{t_{2}}{t_{0}},\ldots,\frac{t_{n}}{t_{0}})$) with
respect to our choice of the norm $\|\cdot\|_{\boldsymbol{\xi}}$ (see [24, §5
Définition 5.1, Lemme 5.4.4] where it is termed _Leray measure_). As for
${\mathscr{I}}(w_{R})$, due to the zoom condition reflected in the weight
function $w_{R}$ (6.1) which prescribes a real region of diameter $O(R^{-1})$,
$|y_{j}|<1,2\leqslant j\leqslant n$ as long as $R$ is large enough.
Consequently, up to constant, ${\mathscr{I}}(w_{R})$ is the volume integral
weighted by $w_{3}$ applied on $w_{R}$.

####  6.1.2. Relation with the singular integrals

In this part we relate the term ${\mathscr{I}}(w_{R})$ (6.2) to the singular
integrals appearing in the classical circle method, an “unweighted” one being
${\mathscr{I}}_{R}$ (1.8). Via a Fourier inversion procedure (cf. [2, p.
259]), we can write

$\displaystyle
J(R;0)=\int_{{\mathbb{R}}^{2}}w_{2}(\varphi)\textup{e}\left(\varphi
z\right)\operatorname{d}\varphi\operatorname{d}z\int_{{\mathbb{R}}^{n-1}}w_{R}(\boldsymbol{y})\left(\frac{\partial
G}{\partial
y_{1}}\right)^{-1}(0,\boldsymbol{y})\operatorname{d}\boldsymbol{y},$

where for the inner integral $y_{1}$ is solved by the implicit coordinate
$z=G(y_{1},\boldsymbol{y})$. Going back to the coordinate system
$\boldsymbol{u}$, then back to $\boldsymbol{x}:=M^{-1}\boldsymbol{u}$, we
obtain

$\begin{split}{\mathscr{I}}(w_{R})=&|\det
M|^{-1}\int_{{\mathbb{R}}^{n+1}\times{\mathbb{R}}}w_{R}\left(\frac{u_{j}}{u_{0}},j\geqslant
2\right)w_{2}(\widetilde{F}(\boldsymbol{u}))w_{3}(u_{0})\textup{e}\left(\theta\widetilde{F}(\boldsymbol{u})\right)\operatorname{d}\boldsymbol{u}\operatorname{d}\theta\\\
=&\int_{{\mathbb{R}}^{n+1}\times{\mathbb{R}}}w_{R}\left(\frac{t_{j}}{t_{0}}(\boldsymbol{x}),j\geqslant
2\right)w_{2}(F(\boldsymbol{x}))w_{3}(t_{0}(\boldsymbol{x}))\textup{e}\left(\theta
F(\boldsymbol{x})\right)\operatorname{d}\boldsymbol{x}\operatorname{d}\theta,\end{split}$
(6.6)

where we recall $w_{R}$ (6.1). We thus re-encounter the classical (weighted)
singular integrals whose integration domain is restricted to the one
prescribed by our real zoom condition (i.e. by the function $w_{R}$).

Conversely, we have

$\begin{split}{\mathscr{I}}_{R}&=|\det
M|^{-1}\int_{\begin{subarray}{c}\boldsymbol{y}\in{\mathbb{R}}^{n-1}\\\
R\boldsymbol{y}\in U_{0}\end{subarray}}\left(\frac{\partial G}{\partial
y_{1}}\right)^{-1}(0,\boldsymbol{y})\operatorname{d}\boldsymbol{y}\int_{\max_{0\leqslant
i\leqslant n}|u_{i}|\leqslant 1}u_{0}^{n-2}\operatorname{d}u_{0}\\\
&=\frac{2}{n-1}|\det
M|^{-1}\int_{\begin{subarray}{c}\boldsymbol{y}\in{\mathbb{R}}^{n-1}\\\
R\boldsymbol{y}\in U_{0}\end{subarray}}\frac{1}{\max(1,|y_{j}|,2\leqslant
j\leqslant n)^{(n-2)}}\left(\frac{\partial G}{\partial
y_{1}}\right)^{-1}(0,\boldsymbol{y})\operatorname{d}\boldsymbol{y}.\end{split}$
(6.7)

By Remark 6.3, the term $|\det M|^{-1}\int_{\cdots}$ equals the real Tamagawa
measure (with respect to the real metric $\|\cdot\|_{\boldsymbol{\xi}}$) of
the real neighbourhood ${\mathscr{U}}(R,\boldsymbol{\xi})$.

###  6.2. The singular series
$\sum\frac{S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{0})}{q^{n+1}}$

We recall $\sigma_{p}({\mathscr{W}};L,\boldsymbol{\lambda})$ (1.7) and
$\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\lambda})$ (1.6). The goal of this
part is to prove:

######  Theorem 6.4.

We have

$\sum_{q=1}^{\infty}\frac{S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{0})}{q^{n+1}}=L^{2n}\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\lambda}).$

###### Proof.

We recall that

$\displaystyle S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{0})$
$\displaystyle=\sum_{\begin{subarray}{c}a\bmod q\\\
(a,q)=1\end{subarray}}\sum_{\begin{subarray}{c}\boldsymbol{\sigma}\in({\mathbb{Z}}/qL{\mathbb{Z}})^{n+1}\\\
H_{\boldsymbol{\lambda},L}(\boldsymbol{\sigma})\equiv 0\bmod
L\end{subarray}}\textup{e}_{qL}\left(a\left(H_{\boldsymbol{\lambda},L}(\boldsymbol{\sigma})+LF(\boldsymbol{\sigma})\right)\right)$
$\displaystyle=\sum_{\begin{subarray}{c}a\bmod q\\\
(a,q)=1\end{subarray}}\sum_{\begin{subarray}{c}\boldsymbol{\sigma}\in({\mathbb{Z}}/qL{\mathbb{Z}})^{n+1}\\\
F(L\boldsymbol{\sigma}+\boldsymbol{\lambda})\equiv 0\bmod
L^{2}\end{subarray}}\textup{e}_{qL^{2}}\left(aF(L\boldsymbol{\sigma}+\boldsymbol{\lambda})\right)$
$\displaystyle=\sum_{\begin{subarray}{c}a\bmod q\\\
(a,q)=1\end{subarray}}\sum_{\begin{subarray}{c}\boldsymbol{\xi}\bmod qL^{2}\\\
\boldsymbol{\xi}\equiv\boldsymbol{\lambda}\bmod L,F(\boldsymbol{\xi})\equiv
0\bmod
L^{2}\end{subarray}}\textup{e}_{q}\left(a\frac{F(\boldsymbol{\xi})}{L^{2}}\right).$

We now prove that $S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{0})$ is
multiplicative, viewed as an exponential sum of modulus $qL^{2}$. For every
fixed $q$, suppose

$qL^{2}=u_{1}u_{2},$

with $(u_{1},u_{2})=1$. Then $L,q$ also admit the decompositions into products
of coprime integers

$L=l_{1}l_{2},\quad q=q_{1}q_{2}$

with $l_{i}=\gcd(u_{i},L),q_{i}=\gcd(u_{i},q)$. Note that

$l_{i}^{2}=\gcd(u_{i},L^{2}),\quad u_{i}=q_{i}l_{i}^{2},\quad i=1,2.$

In the following we write $\overline{u_{1}}$ for the multiplicative inverse of
$u_{1}$ modulo $u_{2}$ and $\overline{u_{2}}$ for the multiplicative inverse
of $u_{2}$ modulo $u_{1}$. With this we can write

$\boldsymbol{\xi}=u_{1}\overline{u_{1}}\boldsymbol{\xi}_{2}+u_{2}\overline{u_{2}}\boldsymbol{\xi}_{1}$

with $\boldsymbol{\xi}_{i}\bmod u_{i},i=1,2$. Then

$\boldsymbol{\xi}\equiv\boldsymbol{\lambda}\mod
L\Longleftrightarrow\boldsymbol{\xi}_{i}\equiv\boldsymbol{\lambda}\mod
l_{i},i=1,2,$

where we use the equality

$u_{1}\overline{u_{1}}+u_{2}\overline{u_{2}}\equiv 1\mod u_{1}u_{2}.$

Moreover,

$F(\boldsymbol{\xi})\equiv 0\mod L^{2}\Longleftrightarrow
F(\boldsymbol{\xi}_{i})\equiv 0\mod l_{i}^{2},i=1,2.$

On writing

$a=q_{1}a_{2}+q_{2}a_{1}$

with $a_{i}\mod q_{i}$, $i=1,2$ and

$\gcd(a,q)=1\Longleftrightarrow\gcd(a_{i},q_{i})=1,i=1,2,$

we have

$S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{0})=S_{1}S_{2},$

where for $i=1,2$,

$S_{i}=\sum_{\begin{subarray}{c}a_{i}\bmod q_{i}\\\
(a_{i},q_{i})=1\end{subarray}}\sum_{\begin{subarray}{c}\boldsymbol{\xi}_{i}\bmod
u_{i}\\\ \boldsymbol{\xi}_{i}\equiv\boldsymbol{\lambda}\bmod
l_{i},F(\boldsymbol{\xi}_{i})\equiv 0\bmod
l_{i}^{2}\end{subarray}}\textup{e}_{q_{i}}\left(a_{i}\frac{u_{3-i}^{2}\overline{u_{3-i}}^{2}}{l_{3-i}^{2}}\frac{F(\boldsymbol{\xi}_{i})}{l_{i}^{2}}\right).$

Note that $u_{3-i}\overline{u_{3-i}}\equiv 1\bmod u_{i}$, so it is coprime to
$q_{i}$, and hence a further change of variables $a_{i}\mapsto
a_{i}\frac{u_{3-i}^{2}\overline{u_{3-i}}^{2}}{l_{3-i}^{2}}$ yields

$S_{i}=\sum_{\begin{subarray}{c}a_{i}\bmod q_{i}\\\
(a_{i},q_{i})=1\end{subarray}}\sum_{\begin{subarray}{c}\boldsymbol{\xi}_{i}\bmod
u_{i}\\\ \boldsymbol{\xi}_{i}\equiv\boldsymbol{\lambda}\bmod
l_{i},F(\boldsymbol{\xi}_{i})\equiv 0\bmod
l_{i}^{2}\end{subarray}}\textup{e}_{q_{i}}\left(a_{i}\frac{F(\boldsymbol{\xi}_{i})}{l_{i}^{2}}\right).$

Consequently, we can write,

$\sum_{q=1}^{\infty}\frac{S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{0})}{q^{n+1}}=\prod_{p}\sum_{t=0}^{\infty}\frac{{\mathscr{S}}_{p^{t}}}{p^{(n+1)t}},$

where

${\mathscr{S}}_{p^{t}}:=\sum_{\begin{subarray}{c}a\bmod p^{t}\\\
(a,p)=1\end{subarray}}\sum_{\begin{subarray}{c}\boldsymbol{\xi}\bmod
p^{t+2m_{p}}\\\ \boldsymbol{\xi}\equiv\boldsymbol{\lambda}\bmod
p^{m_{p}},F(\boldsymbol{\xi})\equiv 0\bmod
p^{2m_{p}}\end{subarray}}\textup{e}_{p^{t}}\left(a\frac{F(\boldsymbol{\xi})}{p^{2m_{p}}}\right),$
(6.8)

with $m_{p}:=\operatorname{ord}_{p}(L)$. By a standard analysis of Ramanujan
sums, we have

$\displaystyle\sum_{t=0}^{k}\frac{{\mathscr{S}}_{p^{t}}}{p^{(n+1)t}}$
$\displaystyle=$ $\displaystyle\frac{\\#\\{\boldsymbol{\xi}\bmod
p^{k+2m_{p}}:\boldsymbol{\xi}\equiv\boldsymbol{\lambda}\bmod
p^{m_{p}},F(\boldsymbol{\xi})\equiv 0\bmod p^{k+2m_{p}}\\}}{p^{nk}}$
$\displaystyle=$ $\displaystyle\frac{p^{2nm_{p}}\\#\\{\boldsymbol{\xi}\bmod
p^{k+2m_{p}}:\boldsymbol{\xi}\equiv\boldsymbol{\lambda}\bmod
p^{m_{p}},F(\boldsymbol{\xi})\equiv 0\bmod p^{k+2m_{p}}\\}}{p^{n(k+2m_{p})}}.$

We obtain by taking $k\to\infty$

$\sum_{t=0}^{\infty}\frac{{\mathscr{S}}_{p^{t}}}{p^{(n+1)t}}=p^{2nm_{p}}\sigma_{p}({\mathscr{W}};L,\boldsymbol{\lambda}),$

where we recall (1.7). This finishes the proof of Theorem 6.4. ∎

###  6.3. Proof of Theorem 6.1

We divide the summation into ranges $q\leqslant X$ and $q>X$, where we take
$X:=B^{\frac{1}{2}(1+\tau)-\varepsilon}$.

To deal with the range $q>X$, we note that

${\mathscr{I}}(w_{R})\ll R^{-(n-1)}.$

Combining this with Theorem 6.2, we have

$I_{q,L,\boldsymbol{\lambda}}(w_{B,R}^{\pm};\boldsymbol{0})\ll\left(\frac{B}{LR}\right)^{n+1}.$

Hence, using Theorem 4.1,

$\displaystyle\sum_{T<q\leqslant
2T}\frac{S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{0})I_{q,L,\boldsymbol{\lambda}}(w_{B,R}^{\pm};\boldsymbol{0})}{(qL)^{n+1}}$
$\displaystyle\ll\left(\frac{B}{L^{2}R}\right)^{n+1}\sum_{T<q\leqslant
2T}\frac{|S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{0})|}{T^{n+1}}$
$\displaystyle\ll_{\varepsilon}\left(\frac{B}{L^{2}R}\right)^{n+1}L^{n+\varepsilon}T^{\frac{3-n}{2}+\varepsilon},$

and so

$\sum_{q>X}\frac{S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{0})I_{q,L,\boldsymbol{\lambda}}(w_{B,R}^{\pm};\boldsymbol{0})}{(qL)^{n+1}}\ll_{\varepsilon}\frac{B^{n+1}}{R^{n+1}L^{n+2}}X^{\frac{3-n}{2}+\varepsilon}$
(6.9)

for any $n\geqslant 4$. By the same argument, we also have that

$\frac{B^{n+1}}{(LR)^{2}}{\mathscr{I}}(w_{R})\left|\sum_{q\leqslant
X}\frac{L^{-2n}S_{q,L,\boldsymbol{}\lambda}(\boldsymbol{0})}{q^{n+1}}-\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\lambda})\right|\ll\frac{B^{n+1}}{R^{n+1}L^{n+2}}X^{\frac{3-n}{2}+\varepsilon}.$
(6.10)

When $q\leqslant X$, we observe that the error term in Theorem 6.2 decays
exponentially. We recall that $(LR)^{2}\ll B^{1-\tau}$ and hence
$Q=\frac{B}{LR}\gg B^{\frac{1}{2}(1+\tau)}$. I.e. if $q\leqslant
B^{\frac{1}{2}(1+\tau)-\varepsilon}$, then we have also $q\ll
Q^{1-\varepsilon^{\prime}}$, for some $\varepsilon^{\prime}>0$. Applying
Theorems 6.2 and 6.4, we obtain

$\sum_{q\leqslant
X}\frac{S_{q,L,\boldsymbol{\lambda}}(\boldsymbol{0})I_{q,L,\boldsymbol{\lambda}}(w_{B,R}^{\pm};\boldsymbol{0})}{(qL)^{n+1}}=\frac{B^{n+1}}{(LR)^{2}}{\mathscr{I}}(w_{R})\sum_{q\leqslant
X}\frac{L^{-2n}S_{q,L,\boldsymbol{}\lambda}(\boldsymbol{0})}{q^{n+1}}+O_{N}(B^{-\varepsilon
N}).$ (6.11)

Combining with (6.10) and (6.9) and redefining $\varepsilon$, we obtain the
desired estimate. ∎

###  6.4. Estimates of local densities

We end this section by establishing the following

######  Proposition 6.5.

Let $\omega^{V}_{\boldsymbol{\xi},{\mathbb{R}}}$ (resp. $\omega^{V}_{f}$) be
the real (resp. finite) Tamagawa measure on $V({\mathbb{R}})$ (resp.
${\mathscr{V}}(\widehat{{\mathbb{Z}}})$) induced by the adelic norm (2.1)
(2.2), so that
$\omega^{V}_{\boldsymbol{\xi}}=\omega^{V}_{\boldsymbol{\xi},{\mathbb{R}}}\times\omega^{V}_{f}$.
Assume that $n\geqslant 4$. Then we have

$\omega^{V}_{\boldsymbol{\xi},{\mathbb{R}}}\left({\mathscr{U}}(R,\boldsymbol{\xi})\right)\asymp
R^{-(n-1)},$ (6.12)

and

$L^{-(n-1)-\varepsilon}\ll_{\varepsilon}\omega^{V}_{f}\left({\mathscr{D}}(L,\boldsymbol{\Lambda})\right)\ll
L^{-(n-1)},\quad\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\Gamma})\asymp
L^{-n}.$

###### Proof.

The arguments in (6.7) and Remark 6.3 (see also [24, §5.4]) show that

$\omega^{V}_{\boldsymbol{\xi},{\mathbb{R}}}\left({\mathscr{U}}(R,\boldsymbol{\xi})\right)=\frac{n-1}{2}{\mathscr{I}}_{R},$
(6.13)

which is clearly $\asymp R^{-(n-1)}$.

We now estimate the non-archimedean local densities. Let us fix an even
integer $L_{0}\in{\mathbb{N}}$ (depending only on $V$) such that
${\mathscr{V}}$ (and hence ${\mathscr{W}}^{o}$) is regular over
${\mathbb{Z}}/L_{0}{\mathbb{Z}}$. Upon decomposing
${\mathscr{D}}(L,\boldsymbol{\Lambda})$ into a disjoint union of finite adelic
neighbourhoods modulo $L_{0}L$ if necessary, the number of which is $\leqslant
L_{0}^{n+1}=O(1)$, we may proceed under the assumption that $L_{0}\mid L$. For
any $p\nmid L$, as ${\mathscr{V}}\bmod p$ is smooth, by the
Grothendieck–Lefschetz trace formula, we have, for any prime $l\neq p$

$\\#{\mathscr{V}}({\mathbb{F}}_{p})=\sum_{i=0}^{2(n-1)}(-1)^{i}\operatorname{Tr}(\operatorname{Fr}_{p}|H^{i}({\mathscr{V}}_{\overline{{\mathbb{F}}_{p}}},{\mathbb{Q}}_{l}).$

By the Lefschetz hyperplane theorem,
$H^{j}({\mathscr{V}}_{\overline{{\mathbb{F}}_{p}}},{\mathbb{Q}}_{l})=0$ when
$j$ is odd, and
$H^{2i}({\mathscr{V}}_{\overline{{\mathbb{F}}_{p}}},{\mathbb{Q}}_{l})={\mathbb{Q}}_{l}(-i)$
when $1\leqslant i\leqslant n-1$, unless the dimension $n-1=2k$ is even, in
which case
$H^{2k}({\mathscr{V}}_{\overline{{\mathbb{F}}_{p}}},{\mathbb{Q}}_{l})={\mathbb{Q}}_{l}(-k)^{\oplus
2}$. It follows that

$\\#{\mathscr{V}}({\mathbb{F}}_{p})=\begin{cases}\frac{p^{n}-1}{p-1}&n\text{
even};\\\ \frac{p^{n}-1}{p-1}\pm p^{\frac{n-1}{2}}&n\text{ odd}.\end{cases}$

Let us define the usual $p$-adic density of $V({\mathbb{Q}}_{p})$ by

$\sigma_{p}(V):=\lim_{k\to\infty}\frac{\\#{\mathscr{V}}({\mathbb{Z}}/p^{k}{\mathbb{Z}})}{p^{(n-1)k}}.$

In particular, when $n\geqslant 4$, by Hensel’s lemma,

$\sigma_{p}(V)=\frac{\\#{\mathscr{V}}({\mathbb{F}}_{p})}{p^{\dim
V}}=1+p^{-1}+O\left(p^{-\frac{3}{2}}\right).$

According to Peyre [24],

$\omega^{V}_{f}\left({\mathscr{D}}(L,\boldsymbol{\Lambda})\right)=\prod_{p\mid
L}\left(1-\frac{1}{p}\right)\sigma_{p}({\mathscr{V}};L,\boldsymbol{\Lambda})\times\prod_{p\nmid
L}\left(1-\frac{1}{p}\right)\sigma_{p}(V),$ (6.14)

where for $p\mid L$,

$\sigma_{p}({\mathscr{V}};L,\boldsymbol{\Lambda}):=\lim_{k\to\infty}\frac{\\#\left({\mathscr{V}}({\mathbb{Z}}/p^{k}{\mathbb{Z}})\cap{\mathscr{D}}_{p}(L,\boldsymbol{\Lambda})\right)}{p^{(n-1)k}},$

is the “model measure” of ${\mathscr{D}}_{p}(L,\boldsymbol{\Lambda})\subseteq
V({\mathbb{Q}}_{p})$. By [27, Theorem 2.13] (since ${\mathscr{V}}$ is regular
modulo $L$),

$\sigma_{p}({\mathscr{V}};L,\boldsymbol{\Lambda})=\frac{1}{p^{(n-1)m_{p}}}.$
(6.15)

Hence

$L^{-(n-1)-\varepsilon}\ll_{\varepsilon}\omega^{V}_{f}\left({\mathscr{D}}(L,\boldsymbol{\Lambda})\right)=L^{-(n-1)}\prod_{p\mid
L}\left(1-\frac{1}{p}\right)\times\prod_{p\nmid
L}\left(1+O(p^{-\frac{3}{2}})\right)\ll L^{-(n-1)}.$

Recall (1.7) and (1.6). We have

$\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\Gamma})=\prod_{p\mid
L}\sigma_{p}({\mathscr{W}};L,\boldsymbol{\Gamma})\prod_{p\nmid
L}\sigma_{p}({\mathscr{W}}),$

where for every $p\nmid L$,

$\sigma_{p}({\mathscr{W}}):=\lim_{k\to\infty}\frac{\\#{\mathscr{W}}({\mathbb{Z}}/p^{k}{\mathbb{Z}})}{p^{nk}}$

is the usual $p$-adic density of ${\mathscr{W}}({\mathbb{Z}}_{p})$. The scheme
${\mathscr{W}}^{o}$ is regular modulo $L$. So again by [27, Theorem 2.13], for
every $p\mid L$,

$\displaystyle\sigma_{p}({\mathscr{W}};L,\boldsymbol{\Gamma})$
$\displaystyle=\lim_{k\to\infty}\frac{\\#\left\\{\boldsymbol{v}\in{\mathscr{W}}^{o}({\mathbb{Z}}/p^{k}{\mathbb{Z}}):\boldsymbol{v}\equiv\boldsymbol{\Gamma}\bmod
p^{m_{p}}\right\\}}{p^{nk}}=\frac{1}{p^{nm_{p}}}.$

By [24, Lemme 5.4.6],

$\sigma_{p}(V)=\frac{1-p^{-(n-1)}}{1-p^{-1}}\sigma_{p}({\mathscr{W}}).$ (6.16)

So, whenever $n\geqslant 4$,

$\sigma_{p}({\mathscr{W}})=1+O(p^{-\frac{3}{2}}).$

Hence

$\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\Gamma})=L^{-n}\prod_{p\nmid
L}\left(1+O(p^{-\frac{3}{2}})\right)\asymp L^{-n}.$

The proof is completed. ∎

##  7\. Proof of main theorems

###  7.1. Proof of Theorem 2.3

This is now evident in view of Theorems 5.1, 6.1 and (2.14). ∎

###  7.2. Proof of Theorem 1.2 – Removing the smooth weights

We now compare ${\mathscr{I}}(w^{\pm}_{R})$ with ${\mathscr{I}}_{R}$, which is
defined in (1.8).

######  Lemma 7.1.

Let $w$ be one of the smooth weights $w_{R}^{\pm}$. Assume that

$\sup_{u_{j}\in R^{-1}[a_{j},b_{j}],j\geqslant
2}|F_{2}(u_{2},\ldots,u_{n})|\leqslant 1.$

Then

$|{\mathscr{I}}(w)-{\mathscr{I}}_{R}|\ll\eta{\mathscr{I}}_{R}.$

###### Proof.

We define $1_{R}$ to be the characteristic function of the conditions

$y_{j}\in R^{-1}[a_{j},b_{j}]\textrm{ for all }2\leqslant j\leqslant n,$

and we define $1_{R}^{\pm}$ analogously to $w_{R}^{\pm}$. Similarly to (6.2),
we have

$\displaystyle{\mathscr{I}}_{R}$ $\displaystyle=|\det
M|^{-1}\int_{{\mathbb{R}}^{n-1}}1_{R}(\boldsymbol{y})\left(\frac{\partial
G}{\partial
y_{1}}\right)^{-1}(0,\boldsymbol{y})\operatorname{d}\boldsymbol{y}\int_{|u_{0}|\leqslant
1}u_{0}^{n-2}\operatorname{d}u_{0}$ $\displaystyle=|\det
M|^{-1}\int_{\begin{subarray}{c}{\mathbb{R}}\times{\mathbb{R}}^{n-1}\\\
|u_{0}|\leqslant
1\end{subarray}}u_{0}^{n-2}1_{R}(\boldsymbol{y})\operatorname{d}u_{0}\operatorname{d}\boldsymbol{y}.$

The measure of the set of $\boldsymbol{y}\in{\mathbb{R}}^{n-1}$ for which
$w_{R}^{\pm}(\boldsymbol{y})\neq 1_{R}^{\pm}(\boldsymbol{y})$ is $O(\eta
R^{1-n})$, and the measure of the set of $u_{0}\in{\mathbb{R}}$ for which
$w_{3}^{\pm}(u_{0})\neq 1_{[-1,1]}(u_{0})$ is $O(\eta)$. We deduce from (6.2)
that

$\displaystyle{\mathscr{I}}(w)$ $\displaystyle=|\det
M|^{-1}\int_{{\mathbb{R}}^{n-1}}w_{R}^{\pm}(\boldsymbol{y})\operatorname{d}\boldsymbol{y}\int_{{\mathbb{R}}}u_{0}^{n-2}w_{3}^{\pm}(u_{0})\operatorname{d}u_{0}$
$\displaystyle=|\det
M|^{-1}\left(\int_{{\mathbb{R}}^{n-1}}1_{R}(\boldsymbol{y})\operatorname{d}\boldsymbol{y}+O(\eta
R^{1-n})\right)\left(\int_{|u_{0}|\leqslant
1}u_{0}^{n-2}\operatorname{d}u_{0}+O(\eta)\right)$
$\displaystyle={\mathscr{I}}_{R}+O(\eta R^{1-n})$
$\displaystyle={\mathscr{I}}_{R}(1+O(\eta))\qed.$

We now come to the proof of Theorem 1.2, which gives an asymptotic formula for
${\mathscr{N}}_{{\mathscr{W}}}((R,\boldsymbol{\xi}),(L,\boldsymbol{\Gamma});B)$
under the assumption that $0<\tau<1$, where

$(LR)^{2}=O(B^{1-\tau}).$

For the proof of Theorem 1.1 we also need an upper bound for
${\mathscr{N}}_{{\mathscr{W}}}((R,\boldsymbol{\xi}),(L,\boldsymbol{\Gamma});B)$,
where $\tau$ is allowed to be negative. We will deduce the following
proposition at the same time as we prove Theorem 1.2.

######  Proposition 7.2.

Let $n\geqslant 4$, $L,R,B\geqslant 1$, $L\in\mathbb{N}$, $R,B\in\mathbb{R}$
and assume that $(LR)^{2}=O(B^{1-\tau})$ for some $-1<\tau<1$. Let
$\boldsymbol{\Gamma}\in{\mathscr{W}}^{o}({\mathbb{Z}}/L{\mathbb{Z}})$. Then we
have

${\mathscr{N}}_{{\mathscr{W}}}((R,\boldsymbol{\xi}),(L,\boldsymbol{\Gamma});B)\ll_{\tau}\frac{B^{n-1+\varepsilon}}{L^{n}R^{n-1}}(E_{\tau}(1;B)+1)+\frac{B^{\frac{(n+1)(1-\tau)}{2}+\varepsilon}}{L^{n+1}R^{n}},$

where $E_{\tau}(1;B)$ is defined as in Theorem 2.3.

For the following assume that we are given a value $-1<\tau<1$. Let $1_{B,R}$
be the indicator function for the conditions

$\frac{t_{j}}{t_{0}}\in R^{-1}[a_{j},b_{j}]\textrm{ for all }2\leqslant
j\leqslant n,\quad|t_{0}|\leqslant B.$

Assume that we are given a point $\boldsymbol{x}\in{\mathbb{R}}^{n+1}$ with
$F(\boldsymbol{x})=0$, and $1_{B,R}(\boldsymbol{x})=1$. Then we find that

$|t_{j}|\leqslant R^{-1}|t_{0}|\max\\{|a_{j}|,|b_{j}|\\}\leqslant
BR^{-1}\max\\{|a_{j}|,|b_{j}|\\}\leqslant B,\quad j\geqslant 2$

under the assumption that $R^{-1}\max_{2\leqslant j\leqslant
n}\\{|a_{j}|,|b_{j}|\\}\leqslant 1$. Moreover, we have

$F(\boldsymbol{x})=t_{0}t_{1}+F_{2}(t_{2},\ldots,t_{n})$

where $\operatorname{\mathbf{t}}=M\boldsymbol{x}$. In particular, if
$t_{0}\neq 0$, we obtain that

$|t_{1}|\leqslant|t_{0}|^{-1}|F_{2}(t_{2},\ldots,t_{n})|\leqslant|t_{0}|\sup_{u_{j}\in
R^{-1}[a_{j},b_{j}],j\geqslant
2}|F_{2}(u_{2},\ldots,u_{n})|\leqslant|t_{0}|\leqslant B$

under the assumption that $\sup_{u_{j}\in R^{-1}[a_{j},b_{j}],j\geqslant
2}|F_{2}(u_{2},\ldots,u_{n})|\leqslant 1$. Note that for all
$\boldsymbol{x}\in{\mathbb{R}}^{n+1}$ with $F(\boldsymbol{x})=0$ and
$t_{0}\neq 0$, we have

$w^{-}_{B,R}(\boldsymbol{x})\leqslant
1_{B,R}(\boldsymbol{x})\leqslant\sum_{k=0}^{\infty}w^{+}_{B\eta^{k},R}(\boldsymbol{x}),$

and so

$\displaystyle{\mathscr{N}}_{{\mathscr{W}}}(w_{B,R}^{-};(L,\boldsymbol{\Gamma}))$
$\displaystyle\leqslant{\mathscr{N}}_{{\mathscr{W}}}(1_{B,R};(L,\boldsymbol{\Gamma}))$
$\displaystyle={\mathscr{N}}_{{\mathscr{W}}}((R,\boldsymbol{\xi}),(L,\boldsymbol{\Gamma});B)\leqslant\sum_{k=0}^{\infty}{\mathscr{N}}_{{\mathscr{W}}}(w_{B\eta^{k},R}^{+};(L,\boldsymbol{\Gamma})).$

We let $R_{0}$ be sufficiently large such that

$\sup_{u_{j}\in R_{0}^{-1}[a_{j},b_{j}],j\geqslant
2}|F_{2}(u_{2},\ldots,u_{n})|\leqslant 1,\quad\mbox{ and }\quad
R_{0}^{-1}\max_{2\leqslant j\leqslant n}\\{|a_{j}|,|b_{j}|\\}\leqslant 1,$
(7.1)

and we assume $R\geqslant R_{0}$ in the following.

######  Lemma 7.3.

Suppose that $\eta\gg B^{-1/2}$ and $\eta(1+\eta)<\frac{1}{2}$. Then, for
$0<\tau<1$, we have

$\sum_{k=0}^{\infty}{\mathscr{N}}_{{\mathscr{W}}}(w_{B\eta^{k},R}^{+};(L,\boldsymbol{\Gamma}))\\\
={\mathscr{N}}_{{\mathscr{W}}}(w_{B,R}^{+};(L,\boldsymbol{\Gamma}))+O_{\tau}\left(\eta\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\Gamma})\frac{B^{n-1}}{R^{n-1}}+\eta\frac{B^{n-1}}{L^{n}R^{n-1}}B^{\varepsilon}E_{\tau}(\eta;B)\right).$

For $-1<\tau\leqslant 0$ we have

$\sum_{k=0}^{\infty}{\mathscr{N}}_{{\mathscr{W}}}(w_{B\eta^{k},R}^{+};(L,\boldsymbol{\Gamma}))\\\
={\mathscr{N}}_{{\mathscr{W}}}(w_{B,R}^{+};(L,\boldsymbol{\Gamma}))+O_{\tau}\left(\frac{B^{n-1}}{L^{n}R^{n-1}}B^{\varepsilon}E_{\tau}(\eta;B)+\frac{B^{\frac{(n+1)(1-\tau)}{2}+\varepsilon}}{L^{n+1}R^{n}}\right).$

###### Proof.

We observe that the supports of the weight functions $w^{+}_{B\eta^{k},R}$
overlap, but each $\boldsymbol{x}\in\mathbb{R}^{n+1}$ is contained in at most
two of them because of the condition $\eta(1+\eta)<\frac{1}{2}$. Therefore,

$\sum_{k:B\eta^{k}\leqslant
1}{\mathscr{N}}_{{\mathscr{W}}}(w_{B\eta^{k},R}^{+};(L,\boldsymbol{\Gamma}))\leqslant
2\\#\\{\boldsymbol{x}\in{\mathbb{Z}}^{n+1}:\|\boldsymbol{x}\|_{\boldsymbol{\xi}}\leqslant
C_{0}\\}=O(1),$

for a constant $C_{0}>0$ which only depends on $F_{2}$ and the intervals
$[a_{j},b_{j}]$, $j\geqslant 2$.

From now on we focus on $k\geqslant 1$ such that $B\eta^{k}>1$. Let

$\tau_{0}:=\tau,$

and define $\tau_{k}$ by the equation

$B^{1-\tau_{0}}=(B\eta^{k})^{1-\tau_{k}}.$ (7.2)

Note that by assumption we have $-1<\tau_{0}<1$ and hence
$\tau_{k}\leqslant\tau_{0}$ for all such $k$ in consideration. Let $\theta$ be
a small parameter to be chosen later. If we assume moreover that
$-1+\theta<\tau_{k}<1$, then we observe that

$B\eta^{k}=B^{\frac{1-\tau_{0}}{1-\tau_{k}}}\geqslant
B^{\frac{1-\tau_{0}}{2}}.$

The dependence of the implicit constants in Theorem 2.3 is continuous and so
in the compact interval $[-1+\theta,\tau_{0}]$ they depend only on $\theta$
and $\tau_{0}$. Now Theorem 2.3 implies that

${\mathscr{N}}_{{\mathscr{W}}}(w_{B\eta^{k},R}^{+};(L,\boldsymbol{\Gamma}))\ll_{\varepsilon,\tau_{0},\theta}\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\Gamma})\frac{(B\eta^{k})^{n-1}}{R^{n-1}}+\frac{(B\eta^{k})^{n-1}}{L^{n}R^{n-1}}B^{\varepsilon}E_{k}(\eta;B),$
(7.3)

for any $k$ such that $-1+\theta\leqslant\tau_{k}\leqslant\tau_{0}$, where

$E_{k}(\eta;B):=\begin{cases}\eta^{\frac{9-5n}{2}}(B\eta^{k})^{\frac{-(n-3)}{2}\tau_{k}},&\textrm{
if }n\geqslant 5;\\\
\eta^{-15/2}(B\eta^{k})^{-\tau_{k}}+(B\eta^{k})^{-\frac{1+\tau_{k}}{4}},&\textrm{
if }n=4.\end{cases}$

It follows from (7.2) that $(B\eta^{k})^{-\tau_{k}}=B^{-\tau_{0}}\eta^{-k}$,
whence

$E_{k}(\eta;B)\ll(\eta^{-\frac{k(n-3)}{2}}+\eta^{-k})E_{0}(\eta;B).$

Therefore,

$\displaystyle\sum_{\begin{subarray}{c}k:B\eta^{k}>1\\\
-1+\theta<\tau_{k}<1\\\ k\geqslant
1\end{subarray}}{\mathscr{N}}_{{\mathscr{W}}}(w_{B\eta^{k},R}^{+};(L,\boldsymbol{\Gamma}))$
$\displaystyle\ll_{\tau_{0},\varepsilon,\theta}$
$\displaystyle\sum_{\begin{subarray}{c}k:B\eta^{k}>1\\\
-1+\theta<\tau_{k}<1\\\ k\geqslant
1\end{subarray}}\left(\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\Gamma})\frac{(B\eta^{k})^{n-1}}{R^{n-1}}+\frac{(B\eta^{k})^{n-1}}{L^{n}R^{n-1}}B^{\varepsilon}E_{k}(\eta;B)\right)$
$\displaystyle\ll_{\tau_{0},\varepsilon,\theta}$
$\displaystyle\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\Gamma})\frac{\eta
B^{n-1}}{R^{n-1}}+\frac{B^{n-1}}{L^{n}R^{n-1}}B^{\varepsilon}E_{0}(\eta;B)\sum_{\begin{subarray}{c}k\geqslant
1\end{subarray}}(\eta^{k(n-2)}+\eta^{k(n/2+1/2)})$ (7.4)
$\displaystyle\ll_{\tau_{0},\varepsilon,\theta}$
$\displaystyle\eta\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\Gamma})\frac{B^{n-1}}{R^{n-1}}+\eta\frac{B^{n-1}}{L^{n}R^{n-1}}B^{\varepsilon}E_{\tau}(\eta;B).$
(7.5)

Suppose that $k$ is chosen such that $\tau_{k}\leqslant-1+\theta$. If
$\eta^{k}\geqslant B^{-1}$, then we have

$B^{1-\tau_{0}}=(B\eta^{k})^{1-\tau_{k}}\geqslant(B\eta^{k})^{2-\theta}=B^{2-\theta}\eta^{(2-\theta)k},$

and hence $\eta^{k}\ll B^{-\frac{\tau_{0}+1-\theta}{2-\theta}}$.

Therefore, there is a constant $C>0$ such that

$\sum_{\begin{subarray}{c}k:B\eta^{k}>1\\\
\tau_{k}\leqslant-1+\theta\end{subarray}}{\mathscr{N}}_{{\mathscr{W}}}(w_{B\eta^{k},R}^{+};(L,\boldsymbol{\Gamma}))\ll{\mathscr{N}}_{{\mathscr{W}}}(1_{CB^{\varphi},C^{-1}R};(L,\boldsymbol{\Gamma})).$

Here,
${\mathscr{N}}_{{\mathscr{W}}}(1_{CB^{\varphi},C^{-1}R};(L,\boldsymbol{\Gamma}))$
is almost the same as our original counting function, but with the height only
going up to $CB^{\varphi}$ instead of $B$, where

$\varphi=\varphi(\tau,\theta):=\frac{1-\tau_{0}}{2-\theta}.$

In order to bound it, we ignore the condition $F(\boldsymbol{x})=0$, and keep
only the congruence condition
$\boldsymbol{x}\equiv\boldsymbol{\Gamma}\bmod{L}$, and the real zoom condition
(together with its consequence for the first Witt coordinate):

$\left|\frac{t_{j}}{t_{0}}\right|\ll R^{-1}\textrm{ for all }2\leqslant
j\leqslant n,\quad\left|\frac{t_{1}}{t_{0}}\right|\ll R^{-2}.$ (7.6)

We obtain

${\mathscr{N}}_{{\mathscr{W}}}(1_{CB^{\varphi},C^{-1}R};(L,\boldsymbol{\Gamma}))\ll\\#\\{\boldsymbol{x}\in{\mathbb{Z}}^{n+1}:\boldsymbol{x}\equiv\boldsymbol{\Gamma}\bmod{L},(\ref{eq:recap
of zoom conds})\textrm{ holds},\|\boldsymbol{x}\|_{\boldsymbol{\xi}}\leqslant
CB^{\varphi}\\}.$ (7.7)

We proceed similarly to the proof of Lemma 5.3. Let $\Lambda$ be the lattice
$\boldsymbol{x}\equiv\boldsymbol{0}\mod{L}$, and observe that the lattice
$\Lambda$ has determinant $L^{n+1}$ and successive minima satisfying
$\lambda_{i}\gg L$ for all $i$. Therefore, by standard lattice point counting
results (see e.g. [31, Lemma 2]), we have, on recalling the assumption
$(LR)^{2}=O(B^{1-\tau})$,

${\mathscr{N}}_{{\mathscr{W}}}(1_{CB^{\varphi},C^{-1}R};(L,\boldsymbol{\Gamma}))\ll
1+\frac{B^{(n+1)\varphi}}{L^{n+1}R^{n}}+\sum_{k=1}^{n}\frac{B^{k\varphi}}{L^{k}R^{k-1}}\ll\frac{B^{{(n+1)\varphi}}}{L^{n+1}R^{n}},$
(7.8)

where the last inequality follows from noting that $\varphi>\frac{1-\tau}{2}$
and hence

$\frac{B^{\varphi}}{LR}\gg 1.$

We now make a case distinction. For $0<\tau<1$ and $n\geqslant 4$ and
$\theta\leqslant\tau$, we have $\varphi\geqslant\frac{1}{2}$ and

$\frac{B^{{(n+1)\varphi}}}{L^{n+1}R^{n}}\ll\frac{B^{\frac{n+1}{2}}}{L^{n+1}R^{n}}\ll
B^{-1/2}\left(\frac{B^{n-1}}{L^{n}R^{n-1}}\right)\ll\eta\mathfrak{S}({\mathscr{W}};L,\boldsymbol{\Gamma})\frac{B^{n-1}}{R^{n-1}},$

provided that $\eta\gg B^{-1/2}$. Note that here we used that $F$ is a non-
singular quadratic form and that $\gcd(L,\mathbf{\Gamma})=1$. Once combined
with (7.5), this completes the proof of the lemma for the case $0<\tau<1$.

In the case $-1<\tau\leqslant 0$ the lemma follows directly from the estimate
in equation (7.8) after taking $\theta$ sufficiently small in terms of $\tau$
and $\varepsilon$. ∎

Next we use the final lattice point estimates from the proof of Lemma 7.3 to
deduce an upper bound for
${\mathscr{N}}_{{\mathscr{W}}}((R,\boldsymbol{\xi}),(L,\boldsymbol{\Gamma});B)$,
which holds for all values of $B,R,L$ under consideration.

######  Lemma 7.4.

Let $B,R,L\geqslant 1$ and
$\boldsymbol{\Gamma}\in{\mathscr{W}}^{o}({\mathbb{Z}}/L{\mathbb{Z}})$. Then we
have the upper bound

${\mathscr{N}}_{{\mathscr{W}}}((R,\boldsymbol{\xi}),(L,\boldsymbol{\Gamma});B)\ll
1+\frac{B^{n+1}}{L^{n+1}R^{n}}+\sum_{k=1}^{n}\frac{B^{k}}{L^{k}R^{k-1}}$

###### Proof.

We start with the observation that

${\mathscr{N}}_{{\mathscr{W}}}((R,\boldsymbol{\xi}),(L,\boldsymbol{\Gamma});B)\ll\\#\\{\boldsymbol{x}\in{\mathbb{Z}}^{n+1}:\boldsymbol{x}\equiv\boldsymbol{\Gamma}\bmod{L},(\ref{eq:recap
of zoom conds})\textrm{ holds},\|\boldsymbol{x}\|_{\boldsymbol{\xi}}\leqslant
B\\}.$

Hence it is sufficient to count the number of lattice points in the shifted
lattice $\Lambda$ as in the proof of Lemma 7.3 in the box given by

$|t_{0}|\ll B,\quad|t_{i}|\ll R^{-1}B,\quad 1\leqslant i\leqslant n.$

Now, we again use a standard lattice point counting result such as in [31,
Lemma 2]. Note that if $\operatorname{\mathbf{x}}$ and
$\operatorname{\mathbf{x}}^{\prime}$ are both counted above, then the