# Efficient Equidistribution of Nilsequences

James Leng  Department of Mathematics
UCLA
Los Angeles, CA 90095, USA<EMAIL_ADDRESS>
###### Abstract.

We give improved bounds for the equidistribution of (multiparameter)
nilsequences subject to any degree filtration. The bounds we obtain are single
exponential in dimension, improving on double exponential bounds of Green and
Tao. To obtain these bounds, we avoid “induction of dimension” which is
ubiquitous throughout higher order Fourier analysis.

These improved equidistribution results are a crucial ingredient in joint work
with Sah and Sawhney proving quasi-polynomial bounds for $U^{s+1}[N]$ inverse
theorem and proving bounds for linear equations in the primes which save an
arbitrary power of logarithm.

##  1\. Introduction

In 2001, Gowers [4, 5] introduced _Gowers norms_ in groundbreaking work giving
effective bounds for Szemerédi’s theorem as a way to measure
“pseudorandomness” in Szemerédi’s theorem. An important technical result
proved in work of Gowers was that a function with large Gowers norm correlates
with a function that is roughly constant along short arithmetic progressions.
Motivated by ergodic theoretic work of Host and Kra [16] and Ziegler [35],
Green and Tao, and Green, Tao, and Ziegler in a series of works [10, 9, 12,
15, 11] formulated and proved the Gowers inverse conjecture, which stated that
nilsequences are precisely the obstructions to Gowers uniformity. Using these
tools, they were able to generalize Vinogradov’s approach to a “nilpotent”
circle method and count linear configurations in the primes.

A key result needed in their analysis is a quantitative equidistribution
theorem of nilsequences [10, Theorem 1.16], which we list below (relevant
definitions such as $\|\cdot\|_{C^{\infty}[N]}$ can be found in Section 2).

######  Theorem 1.

Let $F(g(n)\Gamma)$ be a nilsequence on a nilmanifold $G/\Gamma$ with a
$\delta^{-1}$-rational Mal’cev basis such that $F$ has Lipschitz norm (which
is the sum of the Lipschitz constant and the $L^{\infty}$ norm) at most $1$.
If

$\left|\mathbb{E}_{n\in[N]}F(g(n)\Gamma)-\int_{G/\Gamma}Fd\mu\right|\geq\delta$

then either $N\ll_{G/\Gamma,\delta}1$ or there exists a nonzero homomorphism
$\eta:G\to\mathbb{R}$ of modulus at most $\delta^{-O_{G/\Gamma}(1)}$ such that
$\eta(\Gamma)\subseteq\mathbb{Z}$ such that $\|\eta\circ
g\|_{C^{\infty}[N]}\leq\delta^{-O_{G/\Gamma}(1)}.$

A corollary of Theorem 1 is the “Ratner-type factorization theorem” of Green
and Tao [10, Corollary 1.20], which is often used in applications. See [10,
Definition 1.2] for definition of “$\delta$-equidistributed” and “totally
$\delta$-equidistributed”; these notions are not quantitatively efficient for
our purposes.

######  Theorem 2.

Let $G/\Gamma$ be a nilmanifold with complexity $M\geq 2$ and $g(n)$ be a
polynomial sequence on $G$. For each $A\geq 2$, there exists some $\delta$
with $M\leq\delta^{-1}\leq M^{O_{G,\Gamma,A}(1)}$ and a factorization
$g=\varepsilon g_{1}\gamma$ where

  * •

$\varepsilon$ is $(\delta^{-1},N)$-smooth, meaning that for all $n\in[N]$,
$d(\varepsilon(0),\mathrm{id})\leq\delta^{-1}$ and
$d(\varepsilon(n-1),\varepsilon(n))\leq\frac{\delta^{-1}}{N}$;

  * •

$\gamma$ is $\delta^{-1}$-periodic;

  * •

$g_{1}$ is $\delta^{A}$-equidistributed inside a subnilmanifold
$\tilde{G}/\tilde{\Gamma}$ with complexity at most $\delta^{-1}$ where
$\tilde{G}$ is a subgroup of $G$ with rationality at most $\delta^{-1}$.

The abelian degree one case is the following.

######  Proposition 1.1.

Let $\alpha\in\mathbb{R}^{d}/\mathbb{Z}^{d}$. Then given $M\geq 2$ and $A\geq
2$, there exists some $\delta$ with $M\leq\delta^{-1}\leq M^{O_{d,A}(1)}$ and
a factorization $\alpha=\varepsilon+\alpha^{\prime}+\gamma$ where

  * •

$\|\varepsilon\|_{\mathbb{R}/\mathbb{Z}}\leq\frac{\delta^{-1}}{N}$;

  * •

there exists some integer $k\leq\delta^{-1}$ such that
$k\gamma\in\mathbb{Z}^{d}$; and

  * •

$n\mapsto\alpha^{\prime}n$ is totally $\delta^{A}$-equidistributed inside a
subgroup $\tilde{G}$ of $\mathbb{R}^{d}/\mathbb{Z}^{d}$ of rationality at most
$\delta^{-1}$.

Tao and Teräväinen [31], quantified the above results and prove that
quantities $M^{O_{A,G,\Gamma}(1)}$ are in fact $M^{A^{O_{k}(d^{O_{k}(1)})}}$
(here, $k$ is the degree of the polynomial sequence); e.g. the exponent is
exponential in dimension. The authors of [31] raise the question of whether
the exponent may be taken to be polynomial in dimension. The starting point of
this work is that even in the abelian degree one case, the Ratner-type
factorization theorem cannot have bounds which are single exponential in
dimension.

######  Example 1.

Let $L$ be a large integer and consider the example

$g(n)=(\alpha n,L\alpha n,L^{2}\alpha n,L^{4}\alpha n,\dots,L^{2^{d}}\alpha
n)$

(a linear orbit on $\mathbb{T}^{d+2}$) with $\alpha$ not $O(L^{2^{2^{d}}}/N)$
close to any rational point with denominator at most $L^{2^{2^{d}}}$. The
factorization theorem with $A=2$ and $M=L$, yields that this
$L^{2^{d+1}}$-equidistributes in the subtorus $(x,Lx,\dots,L^{2^{d}}x)$, whose
rationality is double exponential in $d$. Note that an application of the
Ratner-type factorization theorem does not yield equidistribution in the
larger group

$(x,Lx,\dots,L^{2^{k}}x,y_{k+1},\dots,y_{d}).$

This is because this group is $\varepsilon^{-1}=L^{2^{k}}$-rational, whereas
such an orbit is not $\varepsilon^{A}$-equidistributed since it lies in the
subgroup $y_{k+1}=\varepsilon^{-2}x$. Note that if we worked with

$g_{1}(n)=(\alpha n,L^{2}\alpha n,L^{2^{2}}\alpha n,\dots,L^{2^{2^{d}}}\alpha
n),$

then the factorization theorem would yield equidistribution in
$(x,L^{2}x,\dots,L^{2^{2^{O(1)}}}x,\dots,x_{d+2})$, which give polynomial
losses. In this case, $L^{A2^{2^{k}}}$ is far less than $L^{2^{2^{k+1}}}$,
causing us to not need to pass to a subgroup after $O(1)$ many iterations.

This may seem like a rather silly example, for the reader can question why one
cannot simply reformulate the Ratner-type factorization theorem with a choice
of $A$ (say $A=1+o_{d\to\infty}(1)$) that does not yield losses double
exponential in dimension. We will now explain why (for the sake of
applications) the theorem specifies equidistribution of scale at most
$\delta^{A}$, where $\delta^{-1}$ upper bounds the rationality of the sub-
torus. Given a Lipschitz function
$F\colon\mathbb{R}^{d}/\mathbb{Z}^{d}\to\mathbb{C}$ of norm $\leq 1$,
$\delta\in(0,1/10)$, and $\alpha\in\mathbb{R}^{d}/\mathbb{Z}^{d}$, an
application of Proposition 1.1 gives us a decomposition of
$\alpha=\varepsilon+\alpha^{\prime}+\gamma$. Let $G^{\prime}$ be the subgroup
$\alpha^{\prime}$ lives in, $H$ be any coset of $G^{\prime}$,
$Q\leq\delta^{-1}$ be the period of $\gamma$, and $P$ be a subprogression of
$[N]$ with common difference $Q$ and size at least $\delta^{4}N$. The key
point is that $F$ has Lipschitz norm on $G^{\prime}/\mathbb{Z}^{d}$ bounded by
$d\delta^{-1}$ (say) and thus

$\left|\mathbb{E}_{n\in P}F(\alpha
n)-\int_{G^{\prime}}\tilde{F}d\mu\right|\leq\left|\mathbb{E}_{n\in
P}\tilde{F}(\alpha^{\prime}n)-\int_{G^{\prime}}\tilde{F}d\mu\right|+O(\delta^{2})\ll\delta^{A}\|\tilde{F}\|_{\mathrm{Lip}(\tilde{G})}+\delta^{2}\ll\delta^{2}$

Here $\tilde{F}=F(\varepsilon_{P}+Q\cdot)$ for an element
$\varepsilon_{P}\in\mathbb{R}^{d}$; this essentially encodes the coset that
$\alpha n$ nearly lives in for $n\in P$. We see that if $A$ is too small (say
$A=1+o_{d\to\infty}(1)$), then
$\delta^{A}\|\tilde{F}\|_{\mathrm{Lip}(\tilde{G})}$ would be large and the
above inequality would be essentially useless for applications of the
nilsequence form of the Ratner-type factorization theorem. This explains why
we must have the threshold for equidistribution, which is the quantity
$\delta^{A}$, to be significantly smaller than the rationality of the
subgroup, which is $\delta^{-1}$.

Such a result has proven to be crucial throughout higher order Fourier
analysis as it provides a “structure vs. randomness” theory for nilsequences.
In particular, “structure” comes in the form of subgroup $G^{\prime}$ on which
the polynomial sequence lives and “randomness’ in that the polynomial sequence
equidistributes on $G^{\prime}/(G^{\prime}\cap\Gamma)$. This theory has led to
the Green-Tao-Ziegler deduction of the $U^{s+1}$ inverse theorem [15, 11], was
an integral part of their result on linear equations in primes [9, 12], and
has continued to be used in various more recent contexts in higher order
Fourier analysis [31, 26, 27].

For establishing efficient bounds in higher order Fourier analysis, a double
exponential loss is inefficient. In particular, a double exponential loss in
equidistribution immediately results in $O(s^{2})$ many iterated logarithms
for the strategy in forthcoming work on the $U^{s+1}[N]$ inverse theorem with
Sah and Sawhney [25].

###  1.1. Induction on dimension and Previous Work

We recall the proof of Proposition 1.1 and see where the double exponential
bounds in dimension arise. The proof proceeds algorithmically as follows.

  * (i)

If $\alpha n$ is totally $\delta$-equidistributed, we are done.

  * (ii)

Otherwise, there exists some nonzero frequency $k\in\mathbb{Z}^{d}$ with
height $|k|\leq\delta^{-1-o_{d\to\infty}(1)}$ such that
$\|k\cdot\alpha\|_{\mathbb{R}/\mathbb{Z}}\leq\frac{\delta^{-O(d)}}{N}$.

  * (iii)

We may thus write $\alpha=\varepsilon+\alpha^{\prime}+\gamma$ where $\gamma$
is $\delta^{-O(d)}$-rational, $\varepsilon$ is $(d\delta^{-1-o(1)},N)$-smooth,
and $\alpha^{\prime}$ lies in a lower dimensional subgroup.

  * (iv)

Iterate this procedure along progressions $Q$ for which $\varepsilon n$ is
roughly constant, and $\gamma n$ lies in a fixed coset of $\mathbb{Z}^{d}$
whenever $n\in Q$.

Notice that in item (iv), we have that the function $F^{\prime}$ we consider
is $\delta^{-1-o(1)}$-Lipschitz instead of the original $1$-Lipschitz. Upon
iterating with $F^{\prime}$, we need to check frequencies of height
$\delta^{-2-o(1)}$; at the $t$-th step of iteration we have that the height of
frequencies we are considering are $\delta^{-2^{t}}$ (say) and this is
ultimately the cost of the double exponential loss. This however comes from
the fact that we terminate if an only if $\alpha n$ equidistributes and thus
force ourselves to consider all possible characters at each stage of the
iteration. The issue present is that we are using an _induction on dimensions_
argument; in such a context, even an iteration $\delta\mapsto\delta^{2}$ is
unacceptable since this compounds to losses of $\delta^{2^{d}}$ under
induction.

One possible way to overcome this issue is to observe the situation in higher
order Fourier analysis over the group $\mathbb{F}_{p}^{n}$. There, although
there is no such Ratner-type factorization theorem, the work of Gowers and
Wolf [6] still obtains a somewhat satisfactory structure vs. randomness theory
from proving a decomposition theorem of the _exponential of a polynomial_ into
well-equidistributed parts.

This motivates that over $\mathbb{Z}/N\mathbb{Z}$, one should still be able to
obtain a satisfactory theory from merely considering the _nilsequence_
$F(g(n)\Gamma)$ rather than the _polynomial sequence_ $g(n)$. At least in the
abelian case such a change in perspective is at least plausibly useful; one
can replace $F$ by its Fourier approximation and understanding the exponential
sum of a character is simple. Furthermore given a $1$-Lipschitz function on
the torus on $d$-dimensions one only requires at most $\delta^{-O(d^{O(1)})}$
such characters which is an acceptable loss in our context.

Prior to this work, there was at least one model case where an
equidistribution with losses which were single exponential in dimension is
achieved. This was the work of Gowers and Wolf [7], Green and Tao [14], and
the author [23]. As Bohr sets are morally equivalent to generalized arithmetic
progressions, one can write the quadratic phase as a multivariate quadratic
polynomial (with variables representing directions in the GAP) and then work
with the equidistribution of multidimensional polynomial phase (see [32]).
This, combined with the observation in that the indicator function of a Bohr
set or a generalized arithmetic progression has bounded Fourier complexity
(see [23, Section 3] for relevant definitions) shows that a non-
equidistributed quadratic phase has (approximate) Fourier complexity which is
single exponential in dimension.

The conclusion from above is qualitatively weaker than what Theorem 1 gives.
Theorem 1 tells us not only that we have bounded Fourier complexity, but also
that we should expect the polynomial sequence $g(n)$ to be equidistributed in
a rational subgroup. Notably, the methods of [7, 14, 23] make no reference to
a polynomial sequence. The methods of [7, 14, 23] merely state that a non-
equidistributed two-step nilsequence has bounded Fourier complexity. After
all, there are many, many functions of bounded approximate Fourier complexity,
but only a few rational subspaces of a vector space. We highlight that
applications of the equidistribution theory such as the complexity one
polynomial Szemerédi theorem [21, 28], as well as results involving counting
solutions to linear equations [2, 1, 3, 8, 18, 19] all rely on the
qualitatively stronger Theorem 1 and are thus more robust and general than
results obtained using the weaker equidistribution theory as in [7, 14, 23].
Therefore, it is desirable to obtain a result of the quality of Theorem 1 with
bounds of the shape that [7, 14, 23] obtain.

###  1.2. Statement of the main theorem

We first require the definition of the lower central series.

######  Definition 1.1.

The _lower central series_ of a nilpotent Lie group $G$, is the sequence of
nested subgroups $G\supseteq G_{(2)}\supseteq G_{(3)}\cdots$ where
$G_{(i)}:=[G,G_{(i-1)}]$. If $s$ is the least integer such that
$G_{(s+1)}=\mathrm{Id}_{G}$, then $G$ is an $s$-step nilpotent Lie group.

In order to state our main result we will also require the notion of a
vertical character.

######  Definition 1.2.

Consider a nilmanifold $G/\Gamma$ and a function $F\colon
G/\Gamma\to\mathbb{C}$. Given a connected, simply connected subgroup $T$ of
the center $Z(G)$ which is rational (i.e., $\Gamma\cap T$ is cocompact in $T$)
and a continuous homomorphism $\eta\colon T\to\mathbb{R}$ such that
$\eta(T\cap\Gamma)\subseteq\mathbb{Z}$, if

$F(gx)=e(\eta(g))F(x)\emph{ for all }g\in T$

we say that $F$ is a $T$-vertical character with frequency $\eta$. If
$T=G_{(s)}$, we refer to _$T$ -vertical character_ as _vertical character_.

Note that decomposing a function $F$ into functions with a vertical frequency
follows from standard Fourier analysis (e.g., Lemma A.6). We now state our
main result; various quantitative undefined notions can be found in Section 2.
theoremmainresulta Let $\delta\in(0,1/10)$, $N_{1},\ldots,N_{\ell}>1$ be
integers, $M\geq 1$, and $G/\Gamma$ be a nilmanifold given a degree $k$
filtration and such that $G$ is $s$-step nilpotent. Furthermore, let $F\colon
G/\Gamma\to\mathbb{C}$ be an $M$-Lipschitz function with vertical character of
nonzero $G_{(s)}$-frequency $\xi$ on an $s$-step nilmanifold of complexity $M$
and dimension $d$ with $|\xi|\leq M/\delta$.

Suppose $g(\vec{n})$ is a polynomial sequence in $G$ with respect to the
degree $k$ filtration, and such that

$|\mathbb{E}_{\vec{n}\in[\vec{N}]}F(g(\vec{n})\Gamma)|\geq\delta.$

Then one of the following occurs.

  * •

$\min_{1\leq i\leq\ell}N_{i}\leq(M/\delta)^{O_{k,\ell}(d^{O_{k,\ell}(1)})}$

  * •

There exist $0<r\leq\mathrm{dim}(G/[G,G])$ and a set of horizontal characters
$\eta_{1},\dots,\eta_{r}$ of size at most
$(M/\delta)^{O_{k,\ell}(d^{O_{k,\ell}(1)})}$ such that

$\|\eta_{i}\circ
g\|_{C^{\infty}[\vec{N}]}\leq(M/\delta)^{O_{k,\ell}(d^{O_{k,\ell}(1)})}$

and such that for $w_{1},\ldots,w_{s}\in G^{\prime}:=\cap_{1\leq i\leq
r}\mathrm{ker}(\eta_{i})$ that

$\xi([[[w_{1},w_{2}],w_{3}],\ldots,w_{s}])=0.$

The crucial feature to note from this theorem is that
$G^{\prime}/\mathrm{ker}(\xi)$ is nilpotent of step at most $s-1$; this is a
“one-shot” reduction in step and hence avoids the issue of induction on
dimensions. In order to do so, the proof requires a shift in perspective of
locating a _subspace_ on the horizontal torus rather than locating a _single
horizontal character_. This is possible since we’re proving a theorem for a
$G_{(s)}$-vertical character rather than an arbitrary nilsequence which
previous works [10, 20] prove. This shift in perspective is related to a
crucial insight of [25] that improves on [15].

We further remark that the assumption of the $G_{(s)}$-vertical character can
be replaced with a vertical character with respect to any rational subgroup of
the center of rationality bounded by
$(M/\delta)^{O_{k,\ell}(d^{O_{k,\ell}(1)})}$ (see [25, Theorem 5.5]) using
Theorem 1.2 as a black box. Such a statement can be morally proven by
iterating Theorem 1.2; however, due to the step decreasing at each stage such
iterative arguments take $O_{s}(1)$ steps instead of $O(d)$ many iterations.

We now briefly discuss applications of this statement. Slight modifications of
Theorem 1.2 can be inserted in existing arguments of the complexity one
polynomial Szemerédi theorem over $\mathbb{Z}/N\mathbb{Z}$ due to the author
[21] to improve the bounds from an iterated logarithm bound to a quasi-
polynomial bound; see [22]. In principle, it can also be used in [28] to prove
effective bounds on sets lacking shifted squares in place of [10] to obtain a
quasi-logarithmic bound over the iterated logarithmic bound obtained.

In addition, as mentioned, Theorem 1.2 is used a crucial ingredient in work
with Sah and Sawhney [25] on the $U^{s+1}[N]$-inverse theorem, which in turn
has been used to improve bounds on Szemerédi’s theorem [24]. The improved
$U^{s+1}[N]$ inverse theorem, combined with Theorem 1.2, and the approach to
effective linear equations in the primes due to Tao and Teräväinen [31] gives
the following result. As is standard, $\Lambda$ denotes the von Mangoldt
function.

######  Theorem 3.

Let $N,d,t,L,A$ be positive integers, and let $\Psi=(\psi_{1},\dots,\psi_{t})$
be a system of affine-linear forms $\psi_{i}\colon\mathbb{Z}^{d}\to\mathbb{Z}$
of the form

$\psi_{i}(\vec{n})=v_{i}\cdot\vec{n}+\psi_{i}(\vec{0})$

with $v_{i}\in\mathbb{Z}^{d}$ such that $|\psi_{i}(\vec{0})|\leq LN$ and
$\|v_{i}\|_{\infty}\leq L$. Suppose that $v_{i}$ are pairwise linearly
independent. Let $\Omega\subset[-N,N]^{d}$ be a convex body. Then

(1.1)
$\displaystyle\sum_{\vec{n}\in\Omega\cap\mathbb{Z}^{d}}\prod_{i=1}^{t}\Lambda(\psi_{i}(\vec{n}))=\beta_{\infty}\prod_{p}\beta_{p}+O_{t,d,L,A}(N^{d}(\log
N)^{-A}).$

Here $\beta_{\infty}:=\mathrm{vol}(\Omega\cap\Psi^{-1}(\mathbb{R}_{>0}^{t}))$
and for each prime $p$ we have

$\beta_{p}:=\mathbb{E}_{\vec{n}\in(\mathbb{Z}/p\mathbb{Z})^{d}}\prod_{i=1}^{t}\frac{p}{p-1}\mathbf{1}_{\psi_{i}(\vec{n})\neq
0}.$

######  Remark.

The constant $O_{t,d,L,A}(\cdot)$ is ineffective (as is standard) due to the
use of Siegel’s theorem.

The bounds here which save an arbitrary power of logarithm match that of the
best known even for systems of complexity one such as three–term arithmetic
progressions or the odd Goldbach conjecture due to Vinogradov [34].

The proof we give follows the proofs in [31, 23] rather closely. The key
technical input in proving Theorem 3 is therefore proving that $\Lambda$ is
well approximated in the Gowers norm by a certain model
$\Lambda_{\mathrm{Siegel}}$ which accounts for Siegel zeros; here we obtain
quasipolynomial bounds. We defer a formal statement to Section 5. One novel
feature of the proof is that we completely avoid the transference principle in
proving Theorem 3. This is due to the fact that the inverse theorem is
sufficiently strong to able to appropriately handle sets of logarithmic
density such as the primes.

###  1.3. Discussion of the proof

Our proof follows the strategy of [10] of using the van der Corput inequality
and performing an analysis on the resulting nilsequence. As nilmanifold
notation can become quite complex, we shall describe our proof in bracket
polynomial formalism. In order to estimate exponential sums of the bracket
polynomial, we require the following tools.

  * •

The van der Corput inequality; this is used to reduce to a bracket polynomial
of lower degree.

  * •

A Fourier approximation result (e.g., Lemma A.6); this is used to isolate the
term with the highest number of nested brackets of the bracket polynomial as
an exponential sum.

  * •

A Vinogradov-type lemma; as exponential sums of pure polynomial phases require
this ingredient, we will need this ingredient too.

  * •

The new ingredient in this work, the _refined bracket polynomial lemma_ ,
which can be thought of as a Vinogradov-type lemma for linear bracket
polynomials. Roughly speaking, this lemma “unwinds” or “unnests” a bracket and
converts the information of a linear bracket polynomial to a diophantine
condition on its phases.

To very roughly describe the proof, we consider the term in the bracket
polynomial with the most brackets, say $s$ many brackets. In the language of
nilsequences, the highest number of brackets corresponds to (one less than)
the “step” of the nilpotent Lie group. Our goal is to prove diophantine
information in the phases of that term. To do so, we argue via induction on
the degree of the bracket polynomial via a van der Corput-type argument,
obtaining information on $P_{h}=P(\cdot+h)-P(\cdot)$ for many $h$ if $P$ were
our bracket polynomial. Our argument naturally falls into two cases.

  * •

The first case is when each polynomial “in between the brackets” is degree one
(e.g., a term of the form $\alpha n\\{\beta n\\{\gamma n\\}\\}$). In this
case, a van der Corput type argument would make the term with $s$ brackets
into a term with $s-1$ brackets, where one of the phases is a bracket
polynomial of degree one in $h$. We can then use the refined bracket
polynomial lemma to that degree one bracket polynomial in $h$ to obtain
information on the phases of that bracket polynomial.

  * •

The second case is when this does not occur (e.g., $\alpha n^{2}\\{\beta
n\\}$; here note that $\alpha n^{2}$ is not degree one). A van der Corput type
argument would not make the term with $s$ brackets into a term with $s-1$
brackets; it will stay with $s$ brackets. Consequently, each phase in between
the brackets is a genuine polynomial in $h$ (and not a bracket polynomial in
$h$). We can thus use Vinogradov’s lemma and induction to obtain information
on the phases of this bracket polynomial.

Instead of bracket polynomial formalism, we have chosen to work with
nilsequence formalism, the advantage being that the proof is much cleaner and
illuminating in the language of nilsequences. However, we still feel it is
useful for the reader to keep these bracket polynomial heuristics in mind
while examining the proof of Theorem 1.2.

###  1.4. Organization of the paper

In Section 2, we define the notation used in the paper. In Section 3, we prove
the refined bracket polynomial lemma. In Section 4, we prove Theorem 1.2. In
Section 5, we prove Theorem 3.

In Appendix A, we give further auxiliary lemmas used in the proof in Section
4. In Appendix B, we prove various quantitative results on Mal’cev bases.

###  1.5. Acknowledgements

We would like to thank Terry Tao for advisement and for suggesting a simpler
proof (private communication) of the refined bracket polynomial lemma than the
proof the author initially came up with, which can be found in [22, Appendix
C]. We would also like to thank Ashwin Sah and Mehtaab Sawhney for being
extremely supportive and helpful to the author; their feedback has helped
improve this manuscript immensely. We in addition thank Dan Altman, Jaume de
Dios, Ben Green, Zach Hunter, Ben Johnsrude, Borys Kuca, Freddie Manners,
Rushil Raghavan, and David Soukup for helpful discussions and suggestions
related to this project. In particular, when the author was on the verge of
giving up on this project, the preparation of giving an explanation of this
project to Borys led the author to the key inspiration needed to prove Theorem
1.2. We are grateful to Joni Teräväinen as well for helpful comments and
raising the question of formulating an equidistribution theory with better
bounds (jointly with Terry Tao) as a remark in [31]. The author is supported
by an NSF Graduate Research Fellowship Grant No. DGE-2034835.

##  2\. Notation and conventions

In this section, we will mostly go over notation regarding nilpotent Lie
groups. Most of our notation follows [10]. First, we set some general
notation. Given a function $f\colon A\to\mathbb{C}$ defined on a finite set
$A$, we set

$\mathbb{E}_{a\in A}f(a):=\frac{1}{|A|}\sum_{a\in A}f(a).$

We also denote for $x\in\mathbb{C}$, $e(x)=\exp(2\pi ix)$. Given a real number
$r\in\mathbb{R}$, we denote $\\{r\\}\in(-1/2,1/2]$ as the difference between
$r$ and a nearest integer to $r$. Given a general vector
$a=(a_{1},\dots,a_{d})\in\mathbb{R}^{d}$, we denote
$\\{a\\}=(\\{a_{1}\\},\dots,\\{a_{d}\\})$. The variable $\delta$ will denote a
positive small parameter less than $\frac{1}{100}$. If
$v=(v_{1},\dots,v_{d})\in\mathbb{R}^{d}$ is a vector, we denote
$|v|:=\|v\|_{\infty}:=\sup_{1\leq i\leq d}|v_{i}|$. We shall also write
$\mathbb{T}^{d}:=\mathbb{R}^{d}/\mathbb{Z}^{d}$.

Nilmanifolds arise naturally as a means to “clean up” bracket polynomials that
show up in the inverse theory of Gowers norms. For further reference along
these objects and how they relate to higher order Fourier analysis, we refer
the reader to [30] or [17].

We shall work with the following (slightly nonstandard111[10] works with the
vertical component as $G_{k}$ component where $k$ is the smallest nontrivial
element of an arbitrary filtration.) conventions:

######  Definition 2.1 (Horizontal and vertical component).

We denote $G_{(s)}$ as the _vertical component_ of $G$ and $G/G_{(2)}=G/[G,G]$
as the _horizontal_ component of $G$. We denote the quotient map as
$\psi_{\mathrm{horiz}}\colon G\to G/G_{(2)}$. We denote the dimension of
$G/G_{(2)}$ as $d_{\mathrm{horiz}}$ and the dimension of $G_{(s)}$ as
$d_{(s)}$.

For $\vec{N}$ a vector in $\mathbb{N}^{\ell}$ and enumerated as
$\vec{N}=(N_{1},\dots,N_{\ell})$, we define
$[\vec{N}]:=[N_{1}]\times[N_{2}]\times\cdots\times[N_{\ell}]$. We will now
define smoothness norms of polynomials on $\vec{N}$.

######  Definition 2.2 (Smoothness norms).

Given $p:\mathbb{Z}^{\ell}\to\mathbb{C}$ a multivariate polynomial, we expand

$p(\vec{n})=\sum_{\vec{j}}\alpha_{\vec{j}}\binom{\vec{n}}{\vec{j}}$

where denoting $\vec{n}=(n_{1},\dots,n_{\ell})$ and
$\vec{j}=(j_{1},\dots,j_{\ell})$, we define

$\binom{\vec{n}}{\vec{j}}:=\binom{n_{1}}{j_{1}}\binom{n_{2}}{j_{2}}\cdots\binom{n_{\ell}}{j_{\ell}}.$

We define

$\|p\|_{C^{\infty}[\vec{N}]}\leq\sup_{\vec{i}\neq\vec{0}}\vec{N}^{\vec{i}}\|\alpha_{i}\|_{\mathbb{R}/\mathbb{Z}}$

where we denote $\vec{N}^{\vec{i}}=N_{1}^{i_{1}}N_{2}^{i_{2}}\cdots
N_{\ell}^{i_{\ell}}$.

We require the following definition regarding the height of a rational number.

######  Definition 2.3 (Height of a rational).

We say an element $r\in\mathbb{Q}$ has _height_ at $Q$ if written in reduced
form $r=\frac{a}{b}$, we have $|a|,|b|\leq Q$.

We will now define a nilmanifold.

######  Definition 2.4 (Nilmanifold).

A nilmanifold of degree $k$, step $s$, complexity at most $M$, dimension $d$
consists of the following data:

  1. (1)

An $s$-step connected and simply connect nilpotent Lie group $G$ and a
discrete cocompact subgroup $\Gamma$;

  2. (2)

A filtration $G_{\bullet}=(G_{i})_{i=0}^{\infty}$ consisting of subgroups
$G_{i}$ of $G_{0}$ with $G_{i+1}\subseteq G_{i}$ and $G_{0}=G_{1}$ such that
$G_{\ell}=\mathrm{Id}_{G}$ for $\ell>k$, and $[G_{i},G_{j}]\subseteq G_{i+j}$;
and

  3. (3)

A basis $\\{X_{1},\dots,X_{d}\\}$ of $\mathfrak{g}:=\log(G)$ known as a
_Mal’cev basis_.

We furthermore require the data to satisfy the following.

  1. (1)

For $1\leq i,j\leq d$, we have

$[X_{i},X_{j}]=\sum_{k>\max(i,j)}a_{ijk}X_{k}$

where $a_{ijk}$ has height at most $M$;

  2. (2)

Letting $d_{i}:=\text{dim}(G_{i})$, we have
$\log(G_{i})=\text{span}(X_{j}:d-d_{i}<j\leq d)$;

  3. (3)

Each element $g$ can be expressed uniquely as
$\exp(t_{1}X_{1})\exp(t_{2}X_{2})\cdots\exp(t_{d}X_{d})$ with
$t_{1},\dots,t_{d}\in\mathbb{R}$ and we denote the map $\psi\colon
G\to\mathbb{R}^{d}$ via $\psi(g):=(t_{1},\dots,t_{d})$;

  4. (4)

$\Gamma$ is precisely all the elements $g$ for which
$\psi(g)\in\mathbb{Z}^{d}$.

Note that each nilpotent Lie group has the _standard filtration_ which is
defined above as $G_{i}=[G,G_{i-1}]$, but not all filtrations have to be the
standard filtration. It is true that the standard filtration is minimal in the
sense that given a filtration $(G_{i})$, $G_{i}\supseteq G_{(i)}$ [30,
Exercise 1.6.2]. We will now need the definition of a multiparameter
polynomial sequence.

######  Definition 2.5 (Multivariable polynomial sequences).

Given a nilmanifold $G/\Gamma$ with filtration $(G_{i})_{i=0}^{k}$, the
multiparameter polynomial sequences $\mathrm{poly}(\mathbb{Z}^{\ell},G)$ are
the set of maps $g\colon\mathbb{Z}^{\ell}\to G$ such that

$g(\vec{n})=\prod_{\vec{i}}g_{\vec{i}}^{\binom{\vec{n}}{\vec{i}}}$

where $g_{\vec{i}}\in G_{|\vec{i}|}$ where we take the product with respect to
some ordering such that $\vec{i}$ appears before $\vec{j}$ if
$|\vec{i}|<|\vec{j}|$ and if $|\vec{i}|=|\vec{j}|$ we order arbitrarily. Note
from [17, Chapter 14] that $\mathrm{poly}(\mathbb{Z}^{\ell},G)$ forms a group
under pointwise multiplication. Furthermore, any ordering gives results in the
same group.

We will now need definitions of rational and smooth polynomial sequences.

######  Definition 2.6 (Rational and smooth sequences).

Given a positive integer $D$, we say an element $g$ of $G$ is _rational with
height $D$_, or _$D$ -rational_, if $g^{D}\in\Gamma$. We say a polynomial
sequence is $D$-rational if $\gamma(\vec{n})$ is $D$-rational for each
$\vec{n}\in\mathbb{Z}^{\ell}$.

Given a polynomial sequence $\varepsilon(\vec{n})$, we say that $\varepsilon$
is $(K,\vec{N})$-_smooth_ if for each $i$,

$d_{G}(\varepsilon(n+e_{i}),\varepsilon(n))\leq\frac{K}{N_{i}}\text{ and
}d_{G}(\varepsilon(0),\mathrm{id}_{G})\leq K.$

We will need the definition of a metric on a nilmanifold.

######  Definition 2.7 (Metric of a nilmanifold).

Given a nilmanifold $G/\Gamma$ with coordinate map $\psi$, we may define a
distance map $d$ to be right invariant and satisfying

$d_{\psi}(x,y):=\inf\left\\{\sum_{i=1}^{n}\min(|\psi(x_{i}x_{i-1}^{-1})|,|\psi(x_{i-1}x_{i}^{-1})|):x_{0}=x,x_{n}=y\right\\}.$

This defines a metric on $G/\Gamma$ via
$d(x\Gamma,y\Gamma):=\inf\\{d(x^{\prime},y^{\prime}):x^{\prime}\Gamma=x\Gamma,y^{\prime}\Gamma=y\Gamma\\}$.

We are finally in a position to define a nilsequence.

######  Definition 2.8 (Nilsequence).

A _nilsequence_ is a sequence of the form $n\mapsto F(g(n)\Gamma)$ where
$F\colon G/\Gamma\to\mathbb{C}$ is Lipschitz. We shall denote the _Lipschitz
norm_ or _Lipschitz parameter_ of $H\colon X\to\mathbb{C}$ on a metric space
$(X,d_{X})$ as

$\|H\|_{\mathrm{Lip}(X)}:=\|H\|_{L^{\infty}(X)}+\sup_{x\neq y\in
X}\frac{|H(x)-H(y)|}{d_{X}(x,y)}.$

If $\|H\|_{\mathrm{Lip}(X)}\leq M$, we say that $H$ is an _$M$ -Lipschitz
function on $X$_, or simply an _$M$ -Lipschitz function_.

The point of considering Lipschitz functions is that in the case that $G$ is
abelian, they can be quantitatively Fourier approximated. See Lemma A.6 for
the corresponding generalization for nilsequences.

We require the following definitions of horizontal characters.

######  Definition 2.9 (Horizontal characters).

_Horizontal characters_ on $G/\Gamma$ are homomorphisms $\eta\colon
G\to\mathbb{R}$ such that $\eta(\Gamma)\subseteq\mathbb{Z}$; note that since
$\mathbb{R}$ is abelian, $\eta$ annihilates $[G,G]$. They are referred to as
such since $G/[G,G]\Gamma$ is known as the _horizontal torus_. Since we were
given a Mal’cev basis, each horizontal character $\eta$ corresponds to a
vector $k\in\mathbb{Z}^{d}$ and thus embeds in $\Gamma$.

######  Definition 2.10 (Orthogonality).

Given a horizontal character $\eta$ and an element $w\in G$, we define an
inner product $\langle\eta,w\rangle:=\eta(w)$ and we say that $w$ and $\eta$
are _orthogonal_ (or correspondingly $w$ is orthogonal to $\eta$ or $\eta$ is
orthogonal to $w$) if $\langle\eta,w\rangle=0$.

If $H$ is a rational subgroup that contains $[G,G]$, $G/H$ can be identified
with the orthogonal complement $\mathfrak{h}=\log(H)$ with respect to the
Mal’cev basis; it thus makes sense to talk about linear independence of
elements in $G/H$.

Note that given elements $w_{1},\dots,w_{s-1}$ in $\Gamma/(\Gamma\cap[G,G])$,
that $g\mapsto\xi([[[[g,w_{1}],w_{2}],\dots],w_{s-1}])$ defines a horizontal
character. Since the notation $[[[[g,w_{1}],w_{2}],\dots],w_{s-1}]$ will
appear very often, we introduce the following notation as shorthand.

######  Definition 2.11 ($t-1$-fold commutator).

Given $g_{1},\dots,g_{t}$ in a group $G$, we define

$[g_{1},g_{2},\dots,g_{t}]:=[[[g_{1},g_{2}],g_{3}],\dots,g_{t}].$

We will denote any such commutator as a _$t-1$ -fold commutator_ of elements
$g_{1},\dots,g_{t}$.

We will now need the notion of a size of a horizontal and vertical character.

######  Definition 2.12 (Size of a character).

Consider a horizontal character $\eta\colon G\to\mathbb{R}$. To define the
_size_ or _modulus_ of a horizontal character, we recall that writing in
Mal’cev coordinates $\eta(g)=k\cdot\psi(g)$ for a vector $k\in\mathbb{Z}^{d}$.
The size or modulus of $\eta$, denoted $|k|$ or $\|k\|_{\infty}$, is the
$L^{\infty}$ norm of the vector $k$.

Given a rational subgroup $H$ of the center of $G$ and a homomorphism
$\xi\colon H/(\Gamma\cap H)\to\mathbb{R}/\mathbb{Z}$, we denote the _size_ or
_modulus_ of $\xi$, denoted as $|\xi|$ to be the Lipschitz constant of
$x\mapsto e(\xi(x))$ on $H/(\Gamma\cap H)$. That is,

$|\xi|:=\sup_{x\neq y\in H/(\Gamma\cap
H)}\frac{|e(\xi(x))-e(\xi(y))|}{d_{G/\Gamma}(x,y)}.$

We will also need the size of an element of $G$.

######  Definition 2.13 (Size of an element).

The _size_ of an element $g\in G$, is the $\ell^{\infty}$ norm of $\psi(g)$;
if $H$ is a rational subgroup of $G$ that contains $[G,G]$, the size of an
element $\overline{g}\in G/H$ is defined to be the $\inf_{g^{\prime}\in
G\colon\overline{g}=g~{}(\mathrm{mod}~{}H)}\|\psi(g^{\prime})\|_{\infty}$.

Finally, we will need notions of rationality of subspaces and subgroups.

######  Definition 2.14 (Rationality of a subspace).

Let $V$ be a vector space with a basis $\mathcal{B}$ and let $W$ be a
subspace. We say that $W$ is at most $Q$-rational if $W$ has a basis of
elements $\mathcal{B}^{\prime}$ with $w_{j}\in\mathcal{B}^{\prime}$ satisfying

$w_{j}=\sum_{v_{k}\in\mathcal{B}}a_{jk}v_{k}$

such that $a_{jk}$ are rationals with height at most $Q$.

######  Definition 2.15 (Rationality of a subgroup).

A connected and simply connected subgroup $G^{\prime}$ of a nilmanifold
$G/\Gamma$ given Mal’cev basis $\mathcal{X}$ is $Q$-rational if
$\mathfrak{g}^{\prime}:=\log(G^{\prime})$ is $Q$-rational with respect to
$\mathfrak{g}$ given basis $\mathcal{X}$.

###  2.1. Reduction techniques

One technique we use is one used to reduce to the case that $g(0)=1$ and
$|\psi(g(e_{i}))|\leq 1/2$. We encapsulte this in the following lemma.

######  Lemma 2.1.

Consider $G/\Gamma$, a nilmanifold of complexity $M$, dimension $d$, and
equipped with a degree $k$ filtration. Given a nilsequence
$F(g(\vec{n})\Gamma)$, there exists a nilsequence
$(\tilde{F}(\tilde{g}(\vec{n})\Gamma))_{\vec{n}\in\mathbb{Z}^{\ell}}$ such
that

  * •

$F(g(\vec{n})\Gamma)=\tilde{F}(\tilde{g}(\vec{n})\Gamma)$ for all
$\vec{n}\in\mathbb{Z}^{\ell}$

  * •

$\|\tilde{F}\|_{\mathrm{Lip}(G)}\leq
M^{O_{k}(d^{O(1)})}\|F\|_{\mathrm{Lip}(G)}$

  * •

$\tilde{g}(0)=1$ and $|\psi(\tilde{g}(e_{i}))|\leq\frac{1}{2}$ for each
$i\in\\{1,\dots,\ell\\}$

  * •

For any horizontal character $\eta$, $\|\eta\circ
g\|_{C^{\infty}[\vec{N}]}=\|\eta\circ\tilde{g}\|_{C^{\infty}[\vec{N}]}$.

  * •

If $F$ is a vertical character of frequency $\xi$, then $\tilde{F}$ is also a
vertical character of frequency $\xi$.

###### Proof.

To prove this, we factorize $g(0)=\\{g(0)\\}[g(0)]$ where
$\psi(\\{g(0)\\})\in[-1/2,1/2)^{d}$ and $[g(0)]\in\Gamma$. Letting
$g_{1}(n)=\\{g(0)\\}^{-1}g(n)[g(0)]^{-1}$ and $\tilde{F}(x)=F(\\{g(0)\\}x)$,
it follows by Lemma B.2 that $\tilde{F}$ has Lipschitz constant
$M^{O_{k}(d^{O(1)})}\|F\|_{\mathrm{Lip}}$ and $\tilde{F}$ is a vertical
character of frequency $\xi$. This allows us to reduce to the case that
$g(0)=\mathrm{id}_{G}$. To reduce to the case that $|\psi(g(e_{i}))|\leq 1/2$,
we write

$\tilde{g}(n):=g(n)\prod_{i=1}^{\ell}[g(e_{i})]^{-n_{i}}$

where $g(e_{i})=\\{g(e_{i})\\}[g(e_{i})]$ with
$\psi(\\{g(e_{i})\\})\in[-1/2,1/2)^{d}$ and $[g(e_{i})]\in\Gamma$. Note that

  * •

$|\psi(\tilde{g}(e_{i}))|=|\psi(\\{g(e_{i})\\})|\leq\frac{1}{2}$;

  * •

for any horizontal character $\eta$,
$\|\eta\circ\tilde{g}\|_{C^{\infty}[\vec{N}]}=\|\eta\circ
g\|_{C^{\infty}[\vec{N}]}$;

  * •

and $F(g(\vec{n})\Gamma)=\tilde{F}(\tilde{g}(\vec{n})\Gamma)$ for each
$\vec{n}\in\mathbb{Z}^{\ell}$.

This gives the result. ∎

Another technique we will mention here is a technique we can use to reduce to
the one dimensional vertical torus case.

######  Lemma 2.2.

Suppose $F$ is a vertical character with frequency a nonzero $\xi$ of size at
most $L$ and $F(g(n)\Gamma)$ is a nilsequence on a nilmanifold $G/\Gamma$ of
step $s$. Then there exists a nilsequence
$\tilde{F}(\tilde{g}(n)\tilde{\Gamma})$ on a nilmanifold
$\tilde{G}/\tilde{\Gamma}$ with a Mal’cev basis $(Y_{i})_{i=1}^{d-d_{(s)}+1}$
such that

  * •

$\tilde{G}=G/\mathrm{ker}(\xi)$ and
$\tilde{\Gamma}=\Gamma/(\Gamma\cap\mathrm{ker}(\xi))$, and
$\tilde{F}(\tilde{g}(n)\tilde{\Gamma})=F(g(n)\Gamma)$.

  * •

The vertical component of $\tilde{G}$ is one-dimensional and for $s\geq 2$,
the horizontal component of $G$ and the horizontal component of $\tilde{G}$
are naturally isomorphic.

  * •

If $\eta$ is a horizontal character of size at most $M$ in $\tilde{G}$, then
$\eta$ also has size at most $(LM)^{O_{k}(d)^{O_{k}(1)}}$ in $G$.

  * •

$\|\tilde{F}\|_{\mathrm{Lip}(\tilde{G}/\tilde{\Gamma})}\leq(ML)^{O_{k}(d)^{O_{k}(1)}}\|F\|_{\mathrm{Lip}(G/\Gamma)}$
and $\tilde{G}/\tilde{\Gamma}$ has complexity at most
$(ML)^{O_{k}(d)^{O(1)}}$.

###### Proof.

We first define a Mal’cev basis on $\tilde{G}/\tilde{\Gamma}$.
$\\{X_{1},\dots,X_{d}\\}$ be a Mal’cev basis for $G/\Gamma$ with complexity at
most $M$. Let $\pi:G\to G/\mathrm{ker}(\xi)$ be the quotient map. Let
$\overline{X_{i}}$ be the quotient of $X_{i}$ in $\log(G/\mathrm{ker}(\xi))$.
Then since $X_{i}$ forms a $M$-rational basis for $G/\Gamma$, it follows from
Lemma B.10 that $X_{i}$ is a $M^{O_{k}(d^{O(1)})}$-weak basis. Pick a maximal
linearly independent subset $\mathcal{Y}=\\{Y_{j}:j=1,\dots,d-d_{(s)}+1\\}$ of
the $\overline{X_{i}}$. It follows that since $\mathrm{ker}(\xi)$ is
$(ML)^{O_{k}(d^{O(1)})}$-rational, each $\overline{X_{k}}$ is a
$(ML)^{O_{k}(d^{O(1)})}$-rational combination of elements in $\mathcal{Y}$.
Hence, $\mathcal{Y}$ is an $(ML)^{O_{k}(d^{O(1)})}$-weak basis. Invoking Lemma
B.11, we obtain the desired Mal’cev basis for $\mathcal{Y}$.

To show that the vertical component is one-dimensional, note that if $G$ is
$s$-step, let $\overline{g_{1}},\dots,\overline{g_{s}}\in\tilde{G}$ and
suppose that they lift to $g_{1},\dots,g_{s}$, respectively. Then since the
projection to $\mathrm{ker}(\xi)$ is a homomorphism,
$[\overline{g_{1}},\dots,\overline{g_{s}}]=\pi([g_{1},\dots,g_{s}])$ which is
nonzero if and only if $\xi([g_{1},\dots,g_{s}])$ is nonzero. Hence, the
vertical component is one-dimensional. The horizontal tori are seen to be
isomorphic as $\mathrm{ker}(\xi)\subseteq[G,G]$.

In addition, if $\eta$ is a horizontal torus on $\tilde{G}/\tilde{\Gamma}$ of
size at most $Q$, then $\eta(\exp(Y_{j}))\leq Q$ for each $j$. On the other
hand, $\eta$ descends to $G/[G,G]$, so $\eta(\exp(\pi_{horiz}(Y_{j})))\leq Q$.
Each $\pi_{horiz}(X_{j})$ can be written as a $(LM)^{O_{k}(d)^{O_{k}(1)}}$
rational combination of $\pi_{horiz}(Y_{j})$, so defining
$\eta(\exp(X_{i}))=\eta(\exp(\pi_{horiz}(X_{i})))$, it follows that
$\eta(\exp(X_{i}))\leq Q(LM)^{O_{k}(d)^{O_{k}(1)}}$ as desired.

Since $F$ is invariant under the kernel of $\xi$, $F$ descends to a map
$\tilde{F}$ on $\tilde{G}$ via $\pi$. Thus, defining $\tilde{g}=\pi\circ g$,
it follows that $\tilde{F}(\tilde{g}(n)\tilde{\Gamma})=F(g(n)\Gamma)$. To show
the Lipschitz bound on $\tilde{F}$, we see that (writing $x\sim z$ if
$xz^{-1}\in\mathrm{ker}(\xi)$)

$|F(x)-F(y)|=\inf_{x\sim x^{\prime},y\sim
y^{\prime}}|F(x^{\prime})-F(y^{\prime})|$ $\leq\inf_{x\sim x^{\prime},y\sim
y^{\prime}}\|F\|_{\mathrm{Lip}(G)}d_{G}(x^{\prime},y^{\prime})\leq\|F\|_{\mathrm{Lip}(G)}\inf_{x\sim
x^{\prime},y\sim
y^{\prime}}\inf_{(x_{j})}\sum_{j}\min(|\psi(x_{j}x_{j+1}^{-1})|,|\psi(x_{j+1}x_{j}^{-1})|)$

But since $G_{(s)}$ commutes with all of $G$, it follows that

$\inf_{x\sim x^{\prime},y\sim
y^{\prime}}\inf_{(x_{j})}\sum_{j}\min(|\psi(x_{j}x_{j+1}^{-1})|,|\psi(x_{j+1}x_{j}^{-1})|)$
$\leq(ML)^{O_{k}(d)^{O_{k}}(1)}\inf_{(\pi(x_{i}))}\sum_{j}\min(|\psi(x_{j}x_{j+1}^{-1})|,|\psi(x_{j+1}x_{j}^{-1})|)\leq(ML)^{O_{k}(d)^{O_{k}(1)}}d_{\tilde{G}}(x,y).$

In addition, we have

$\|F\|_{\mathrm{Lip}(\tilde{G})}=\sup_{x,y}\frac{|F(x)-F(y)|}{d_{\tilde{G}}(xG^{\prime},yG^{\prime})}\leq(ML)^{O_{k}(d)^{O_{k}(1)}}\|F\|_{\mathrm{Lip}(G)}.$

Since $\|F\|_{\mathrm{Lip}(G)}=\|F\|_{\mathrm{Lip}(G/\Gamma)}$ and similarly
$\|F\|_{\mathrm{Lip}(\tilde{G})}=\|F\|_{\mathrm{Lip}(\tilde{G}/\tilde{\Gamma})}$,
we have the desired inequality. ∎

######  Remark.

We note that it is not necessarily true that if $H$ lies in the center of $G$,
the horizontal component of $G/H$ agrees with the horizontal component of $G$.
This is due to $[G/H,G/H]=[G,G]H/H$, so $(G/H)/([G/H,G/H])\cong G/(H[G,G])$.

###  2.2. Asymptotic notation

We will specify asymptotic notation here. We say that $f=O(g)$ if there exists
some absolute constant $C$ such that $|f|\leq C|g|$. If $h$ is a variable, we
say that $f=O_{h}(g)$ if there exists a constant $C_{h}$ depending on $h$ such
that $|f|\leq C_{h}|g|$. We shall also adopt Vinogradov’s notation and to
$f=O(g)$ as $f\ll g$ and $f=O_{h}(g)$ as $f\ll_{h}g$. In this paper, $s$ will
often denote “step” of a nilmanifold, and $k$ the “degree” of the nilmanifold.
Since we are in the setting where they are bounded, $O(g)$ will actually often
be $O_{k}(g)$. Since in applications to arithmetic combinatorics, $s$ and $k$
are often constant, we make no effort to specify the explicit losses in terms
of $s$ and $k$, though we anticipate since there is an iteration in $s$ and
$k$ that losses are double exponential in those parameters. In addition, the
case of $d=1$ is somewhat degenerate, so quantities like $d^{O(1)}$ or
$d^{O(d)}$ will actually denote $(d+1)^{O(1)}$, and $(d+1)^{O(d)}$,
respectively. In an effort to shorthand a lot of the exponentials and
quantities in [31, Appendix A], the authors adopted the use of
“$\mathrm{poly}_{m}(\delta)$” (or denoted in our notation as
$\mathrm{poly}_{d}(\delta)$) as any quantity lower bounded by
$\gg\exp(\exp(-d^{O_{k}(1)}))\delta^{\exp(-d^{O_{k}(1)})}.$ Since many of our
quantities are bounded above by a similarly cumbersome quantity
$(\delta/M)^{-O_{k}(d)^{O_{k}(1)}}$, we shall adopt a similar practice and
instead denote $c(\delta)$ as any quantity lower bounded by
$\gg(\delta/M)^{O_{k,\ell}(d)^{O_{k,\ell}(1)}}$.

###  2.3. Parameters used

Given a nilpotent Lie group $G$ with a discrete cocompact subgroup $\Gamma$,
we will specify some accompanying parameters that will be often used. The
dimension of $G$ will be denoted $d$, and the dimension of $G_{i}$ will be
denoted $d_{i}$. We will also specify that $d_{(j)}$ is the dimension of
$G_{(j)}$ where as we defined above $G_{(j)}$ is the $j$th element of the
standard filtration. As stated above, the step of the nilpotent Lie group will
often be denoted $s$ and the degree of the filtration will often be denoted
$k$. The complexity of the nilpotent Lie group will be bounded by $M$. We will
work with the convention of $M\geq 2$.

##  3\. Refined bracket polynomial lemmas

In this section, we deduce the refined bracket polynomial lemmas. This is, in
the author’s opinion, the crux of the argument of Theorem 1.2 and the main
source of quantitative gain over [10].

We begin with the single variable refined bracket polynomial lemma.

######  Lemma 3.1.

Let $\delta\in(0,1/10)$, $K\geq 2$ and $N\geq 2$ an integer. Suppose
$\alpha,a\in\mathbb{R}^{d}$, $|a|\leq M$, and

$\|\beta+a\cdot\\{\alpha h\\}\|_{\mathbb{R}/\mathbb{Z}}<K/N$

for $\delta N$ many $h\in[N]$. Then at least one of the following holds.

  * •

We have $N\ll(\delta/d^{d}M)^{-O(1)}$ or $K/N>1/100$;

  * •

or there exists linearly independent $w_{1},\dots,w_{r}$, with
$|w_{1}||w_{2}|\cdots|w_{r}|\leq(\delta/d^{d}M)^{-O(1)}$ and linearly
independent $\eta_{1},\dots,\eta_{d-r}$ in $\mathbb{Z}^{d}$ with size at most
$(\delta/d^{d}M)^{-O(1)}$ such that $\langle w_{i},\eta_{j}\rangle=0$ and

$\|\eta_{j}\cdot\alpha\|_{\mathbb{R}/\mathbb{Z}},|w_{i}\cdot
a|\leq\frac{(\delta/M)^{-O(1)}d^{O(d)}K}{N}.$

This can be generalized to the multiparameter refined bracket polynomial
lemma.

######  Lemma 3.2.

Let $\delta,M,K,d,r>0$ fixed with $\delta\in(0,1/10)$, $M>1$,
$d\in\mathbb{Z}$, $a_{1},\dots,a_{r},\alpha_{1},\dots,\alpha_{r}$ be such
that,
$(a_{1},\dots,a_{r}),(\alpha_{1},\dots,\alpha_{r})\in(\mathbb{R}^{d})^{r}$,
with $|a|\leq M$, and $\beta\in\mathbb{R}^{r}$. Let
$\vec{N}=(N_{1},\dots,N_{r})$ be an element in $\mathbb{Z}^{r}_{>0}$. Suppose
that

$\left\|\beta\cdot\vec{n}+\sum_{j=1}^{r}n_{j}a_{j}\cdot\left\\{\sum_{i=1}^{r}\alpha_{i}h_{i}\right\\}\right\|_{C^{\infty}[\vec{N}]}\leq
K$

for $\delta|\vec{N}|$ many $h\in[\vec{N}]$. Then at least one of the following
holds.

  * •

We have $N_{i}\ll(\delta/(dr)^{d+r}M)^{-O(1)}$ for some $i$ or
$K/N_{i}>\frac{1}{100r}$ for some $i$;

  * •

or there exists linearly independent $w_{1},\dots,w_{r}$ and linearly
independent $\eta_{1},\dots,\eta_{d-r}$ in $\mathbb{Z}^{d}$ with size at most
$(\delta/drM)^{-O(d+r)}$ in $\mathbb{Z}^{d}$ such that for each $(i,k)$,
$\langle w_{i},\eta_{k}\rangle=0$ and for each $i$ and $j$

$\|\eta_{i}\cdot\alpha_{j}\|_{\mathbb{R}/\mathbb{Z}},|w_{i}\cdot
a_{j}|\leq\frac{(\delta/drM)^{-O(d+r)}K}{N_{j}}.$

Although the multiparameter refined bracket polynomial lemma is ultimately the
one we’ll need for Theorem 1.2, we have included the single variable one as
the notation is less cumbersome and the argument is easier to absorb. We give
a brief review of results from the geometry of numbers.

###  3.1. The geometry of numbers

We begin with the following Minkowski’s second theorem below. Before we state
it, we shall need some terminology. Given a lattice $\Gamma$ of
$\mathbb{R}^{d}$ and a convex body $X$, the _successive minima_ of $X$ with
respect to $\Gamma$, denoted $\lambda_{i}$, are defined as

$\lambda_{k}:=\inf\\{\lambda>0:\lambda\cdot X\text{ contains }k\text{
independent vectors of }\Gamma\\}.$

We have
$\lambda_{1}\leq\lambda_{2}\leq\lambda_{3}\leq\lambda_{4}\leq\cdots\leq\lambda_{d}<\infty.$
Minkowski’s second theorem [33, Theorem 3.30] states that the successive
minima satisfy the following property.

######  Theorem 4 (Minkowski’s second theorem).

Let $\Gamma$ be a lattice of full rank in $\mathbb{R}^{d}$, $B$ a symmetric
convex body with successive minima $\lambda_{1},\dots,\lambda_{d}$. Then there
exists vectors $v_{1},\dots,v_{d}$ such that

  * •

For each $1\leq j\leq d$, $v_{j}$ lies on the boundary of $\lambda_{j}\cdot
B$, but $\lambda_{j}\cdot B$ does not contain any vectors in $\Gamma$ outside
the span of $v_{1},\dots,v_{j-1}$.

  * •

The cross-polytope with vertices $\pm v_{i}$ contain no elements of $\Gamma$
other than $0$.

  * •

We have

$\frac{2^{d}|\Gamma/(\mathrm{Span}_{\mathbb{Z}}(v_{1},\dots,v_{d}))|}{d!}\leq\frac{\lambda_{1}\cdots\lambda_{d}\mathrm{vol}(B)}{\mathrm{vol}(\mathbb{R}^{d}/\Gamma)}\leq
2^{d}.$

The next two statements below show, as a corollary of Minkowski’s second
theorem that such an intersection must contain a _generalized arithmetic
progression_ (see below for definition) which has size roughly $d^{-O(d)}$
times the intersection of the convex body and the lattice. The next lemma
we’ll need, a statement and proof of which can be found in [33, Lemma 3.14],
is Ruzsa’s covering lemma.

######  Lemma 3.3 (Ruzsa’s covering lemma).

For any bounded subsets $A$ and $B$ of $\mathbb{R}^{d}$ with positive measure,
we may cover $B$ by at most
$\min\left(\frac{\mathrm{vol}(A+B)}{\mathrm{vol}(A)},\frac{\mathrm{vol}(A-B)}{\mathrm{vol}(A)}\right)$
many translates of $A-A$.

We use Ruzsa’s covering lemma in the various proofs of the refined bracket
polynomial lemma to convex subsets of $\mathbb{R}^{d}$. In the case of convex
and symmetric $A$ and $B$, Ruzsa’s covering lemma is extra powerful, since
$A+A$ and $A-A$ are both just dilates of $A$.

A _generalized arithmetic progression_ (GAP) in $\mathbb{R}^{n}$ is a subset
of the form $\\{\ell_{1}v_{1}+\cdots+\ell_{d}v_{d}:\ell_{i}\in[N_{i}]\\}$
where $v_{1},\dots,v_{d}\in\mathbb{R}^{n}$. The generalized arithmetic
progression is _proper_ if each of the elements
$\ell_{1}v_{1}+\cdots+\ell_{d}v_{d}$ are distinct. The _rank_ of a proper
generalized arithmetic progression is the quantity $d$. As a consequence of
Minkowski’s second theorem and Ruzsa’s covering lemma, we have the following,
which is [33, Lemma 3.33].

######  Proposition 3.1.

Let $B$ be a symmetric convex body and let $\Gamma$ be a lattice in
$\mathbb{R}^{d}$. Then there exists a GAP
$P=\\{\ell_{1}v_{1}+\cdots+\ell_{d^{\prime}}v_{d^{\prime}}:\ell_{i}\in[N_{i}]\\}$
in $B\cap\Gamma$ with $v_{1},\dots,v_{d^{\prime}}$ linearly independent such
that $|P|\geq O(d)^{-7d/2}|B\cap\Gamma|$.

######  Remark.

[33, Lemma 3.33] do not require $v_{1},\dots,v_{d^{\prime}}$ to be linearly
independent; however, their proof does give linearly independent
$v_{1},\dots,v_{d^{\prime}}$.

We are now ready to prove Lemma 3.1 and Lemma 3.2.

###  3.2. Deduction of Lemma 3.1

We deduce Lemma 3.1 from the following.

######  Lemma 3.4.

Let $\delta\in(0,1/10)$, and $N$ be an odd prime. Suppose
$\alpha,a\in\mathbb{R}^{d}$ and $\alpha$ is of denominator $N$, $|a|\leq M$,
and

$\|\beta+a\cdot\\{\alpha h\\}\|_{\mathbb{R}/\mathbb{Z}}<K/N$

for $\delta N$ many $h\in[N]$. Then one of the following holds.

  * •

We have $N\ll(\delta/d^{d}M)^{-O(1)}$ or $K/N>1/10$;

  * •

or there exists linearly independent $w_{1},\dots,w_{r}$, with
$|w_{1}||w_{2}|\cdots|w_{r}|\leq(\delta/d^{d}M)^{-O(1)}$ and linearly
independent $\eta_{1},\dots,\eta_{d-r}$ in $\mathbb{Z}^{d}$ with size at most
$(\delta/d^{d}M)^{-O(1)}$ such that $\langle w_{i},\eta_{j}\rangle=0$ and

$\|\eta_{j}\cdot\alpha\|_{\mathbb{R}/\mathbb{Z}}=0,\hskip 7.22743pt|w_{i}\cdot
a|\leq\frac{(\delta/M)^{-O(1)}d^{O(d)}K}{N}.$

###### Proof of Lemma 3.1 assuming Lemma 3.4.

We begin with

$\|a\cdot\\{\alpha h\\}+\gamma\|_{\mathbb{R}/\mathbb{Z}}<\frac{K}{N}$

for $\delta N$ many $h\in[N]$. By replacing $N$ with prime $N^{\prime}$ with
$10N\leq N^{\prime}\leq 20N$ and $\delta$ with $\delta/20$, we may assume that
all such $h\in[N/10]$. Now take $\alpha^{\prime}$ with
$N\alpha^{\prime}\in\mathbb{Z}^{d}$ such that
$|\alpha-\alpha^{\prime}|\leq\frac{1}{2N}$ and denoting
$v=\alpha-\alpha^{\prime}$. Then

$a\cdot\\{\alpha h\\}\equiv
a\cdot\\{\alpha^{\prime}h\\}+a\cdot\\{vh\\}+a\cdot(\\{\alpha
h\\}-\\{\alpha^{\prime}h\\}-\\{vh\\}).$

However, we observe that since $h\in[N/10]$, it follows that $\\{vh\\}=vh$,
and since $\alpha-\alpha^{\prime}-v=0$, it follows that $\\{\alpha
h\\}-\\{\alpha^{\prime}h\\}-\\{vh\\}\in\mathbb{Z}^{d}$, and since $|\\{\alpha
h\\}-\\{\alpha^{\prime}h\\}-\\{vh\\}|\leq\frac{3}{2}$, it follows that each
coordinate of that vector is either $0,1$, or $-1$. By the Pigeonhole
principle, there exists some vector $w\in\mathbb{Z}^{d}$ such that for
$\delta/3^{d}$ many elements $h\in[N]$ that

$\|a\cdot\\{\alpha^{\prime}h\\}+a\cdot w+\gamma+a\cdot
vh\|_{\mathbb{R}/\mathbb{Z}}<\frac{K}{N}.$

Finally, rewriting $a\cdot vh=a\cdot vN\\{h/N\\}$ (here we are using the fact
that $h\in[N/10]$ so $h/N=\\{h/N\\}$), and replacing $\gamma$ with
$\gamma+a\cdot w$, and letting $b=Na\cdot v$, it follows that

$\|a\cdot\\{\alpha^{\prime}h\\}+b\\{1/N\\}+\gamma\|_{\mathbb{R}/\mathbb{Z}}<\frac{K}{N}.$

Applying Lemma 3.4 gives $w_{1},\dots,w_{r}$ and $\eta_{1},\dots,\eta_{d+1-r}$
such that if $\eta_{i}=(\eta_{i}^{\prime},\eta_{i}^{d+1})$ and
$w_{i}=(w_{1}^{\prime},w_{1}^{d+1})$, then

$\eta_{i}^{\prime}\cdot\alpha^{\prime}+\eta_{i}^{d+1}/N\equiv 0\pmod{1}$
$|w_{i}^{\prime}\cdot
a+w_{i}^{d+1}|\leq\frac{(\delta/M)^{-O(1)}d^{O(d)}K}{N}.$

Suppose $w_{1}^{d+1}\neq 0$ and denote
$\tilde{w}_{i}:=w_{i}^{d+1}w_{1}^{\prime}-w_{i}^{\prime}w_{1}^{d+1}$ for
$2\leq i\leq d+1-r$. We see that

$|\tilde{w_{i}}\cdot a|\leq\frac{(\delta/M)^{-O(1)}d^{O(d)}K}{N}.$

We claim that $\tilde{w}_{i}$’s are linearly independent of each other.
Suppose there exists $c_{i}$ such that

$\sum_{i\neq 1}c_{i}(w_{i}^{d+1}w_{1}^{\prime}-w_{i}^{\prime}w_{1}^{d+1})=0.$

Rearranging, we have

$w_{1}^{\prime}\left(\sum_{i\neq 1}c_{i}w_{i}^{d+1}\right)+\sum_{i\neq
1}(-c_{i}w_{1}^{d+1})w_{i}^{\prime}=0.$

In addition,

$\sum_{i\neq 1}w_{1}^{d+1}\left(\sum_{i\neq
1}c_{i}w_{i}^{d+1}\right)+\sum_{i\neq 1}(-c_{i}w_{1}^{d+1})w_{i}^{d+1}=0$

and therefore

$w_{1}\left(\sum_{i\neq 1}c_{i}w_{i}^{d+1}\right)+\sum_{i\neq
1}(-c_{i}w_{1}^{d+1})w_{i}=0.$

By linear independence of the $w_{i}$’s and since $w_{1}^{d+1}$ is nonzero, it
follows that $c_{i}=0$. Thus, the $\tilde{w}_{i}$ are independent of each
other. To see that $\tilde{w}_{i}$’s are orthogonal to the
$\eta_{j}^{\prime}$’s, note that

$\displaystyle\tilde{w}_{i}\cdot\eta_{j}^{\prime}$
$\displaystyle=w_{i}^{d+1}w_{1}^{\prime}\cdot\eta_{j}^{\prime}-w_{i}^{\prime}\cdot\eta_{j}^{\prime}w_{1}^{d+1}$
$\displaystyle\eta_{j}\cdot w_{i}$
$\displaystyle=\eta_{j}^{d+1}w_{i}^{d+1}+\eta_{j}^{\prime}\cdot
w_{i}^{\prime}=0$ $\displaystyle\eta_{j}\cdot w_{1}$
$\displaystyle=\eta_{j}^{d+1}w_{1}^{d+1}+\eta_{j}^{\prime}\cdot
w_{1}^{\prime}=0.$

Subtracting the second and third equations gives that the first expression is
zero. Finally, we claim that the $\eta_{j}^{\prime}$’s are linearly
independent of each other. To see this, we note that
$(\eta_{j}^{\prime},\eta_{j}^{d+1})$ are orthogonal to $(\tilde{w}_{i},0)$ and
$(w_{1}^{\prime},w_{1}^{d+1})$. Since $(0,1)$ is not orthogonal to
$(w_{1}^{\prime},w_{1}^{d+1})$, it follows that
$(\eta_{j}^{\prime},\eta_{j}^{d+1})$ cannot span $(0,1)$. Thus,
$(\eta_{j}^{\prime},\eta_{j}^{d+1})$ and $(0,1)$ are linearly independent,
which implies that $\eta_{j}^{\prime}$ are linearly independent.

If $w_{1}^{d+1}=0$ and $w_{i}^{d+1}\neq 0$ for some $i$, we let $w_{i}^{d+1}$
play the role of $w_{1}^{d+1}$ in the above argument. If $w_{i}^{d+1}=0$ for
all $i$, we find that

$|w_{i}^{\prime}\cdot a|\leq\frac{(\delta/M)^{-O(1)}d^{O(d)}K}{N}$

and that

$\|\eta_{j}^{\prime}\cdot\alpha\|_{\mathbb{R}/\mathbb{Z}}\leq\frac{(\delta/M)^{-O(1)}d^{O(d)}K}{N}.$

Picking a linearly independent subset of the $\eta_{j}^{\prime}$ completes the
proof. ∎

We now prove Lemma 3.4.

###### Proof of Lemma 3.4.

Step 1: Reducing to the case of when $\beta=0$. Using the Pigeonhole
principle, there exists at least $\delta N/M$ many $h$’s such that

$|\beta+a\cdot\\{\alpha h\\}-k|<K/N$

for some $k\in\mathbb{Z}$. By using the Pigeonhole principle again, there
exists a sign pattern in $\\{-1,0,1\\}^{d}$ such that for $\delta N/(3^{d}Md)$
many $h\in[N]$ all satisfying the sign pattern (i.e., $\\{\alpha h\\}$ are all
the same sign for all such $h$) and such that

$|\beta+a\cdot\\{\alpha h\\}-k|<K/N.$

Note that if $\\{x\\}$ and $\\{y\\}$ have the same sign then
$\\{x-y\\}=\\{x\\}-\\{y\\}$. Thus, taking the difference of any two such $h$
and $h$’,

$|a\cdot\\{\alpha(h-h^{\prime})\\}|<2K/N.$

Step 2: Invoking Minkowski’s second theorem. Let

$B=\left\\{|a\cdot x|<\frac{2K}{N},|x_{i}|<\frac{1}{2}\text{ for all
}i\in[d]\right\\}$

and $\Gamma=\alpha\mathbb{Z}+\mathbb{Z}^{d}$. It follows from Step 1 that at
least $\delta\frac{N}{3^{d}dM}$ many elements of the lattice lie in $B$. Since
$B$ is a convex body and $\Gamma$ is a lattice of $\mathbb{R}^{d}$, we have by
Proposition 3.1, there exists linearly independent vectors
$v_{1},\dots,v_{d^{\prime}}$ of the lattice and $N_{1},\dots,N_{d^{\prime}}$
with $N_{1}\cdots N_{d}=\frac{\delta N}{d^{O(d)}M}$ and

$P:=\\{\ell_{1}v_{1}+\cdots\ell_{d^{\prime}}v_{d^{\prime}}:|\ell_{i}|\leq
N_{i}\\}\subseteq B.$

Since $N$ is an odd prime, each $v_{i}$ is of the form $\\{\alpha h_{i}\\}$
since that is unique in the coset $\alpha h_{i}+\mathbb{Z}^{d}$ where each
coordinate lies in $(-1/2,1/2)$.

Let

$\Gamma^{\prime}=v_{1}\mathbb{Z}+v_{2}\mathbb{Z}+\cdots
v_{d^{\prime}}\mathbb{Z}\subseteq\Gamma,\text{ and
}V=\mathrm{span}(v_{1},\dots,v_{d^{\prime}}).$

For $x\in\mathbb{R}^{d}$ and $r>0$, let $B_{r,\infty}(x)$ denote the
$\ell^{\infty}$ ball of radius $r$ around $x$ and $B_{r}(x)$ the $\ell^{2}$
ball of radius $r$ around $x$. Since $N$ is prime, $B_{1/2,\infty}(0)$
contains at most $N$ points of $\Gamma$ and therefore at most $N$ points of
$\Gamma^{\prime}$. Thus, by placing a fundamental parallelepiped dilated by
two of $\Gamma^{\prime}$ around each lattice point in the ball of radius
$1/2$, we see that the volume of the ball of radius $1/2$ in $V$ is at most
$N/2^{d}$ times the the volume of the fundamental parallelepiped of
$\Gamma^{\prime}$ in $V$. We have the upper bound

$\mathrm{vol}(B_{1/2,\infty}(0)\cap V)\leq
2^{d}N\mathrm{vol}(V/\Gamma^{\prime}).$

Let $O$ denote the interior of the generalized arithmetic progression $P$
inside $V$. Note that we have the lower bound of

$\mathrm{vol}(O)\geq N(\delta/(d^{O(d)}Mr))\mathrm{vol}(V/\Gamma^{\prime}).$

By Ruzsa’s covering lemma (using the fact that $O-O=2O$ since $O$ is the
interior of a generalized arithmetic progression), we may cover the ball of
radius $1/2$ inside $V$ with at most $T:=\delta^{-1}Md^{O(d)}$ many
translations of $O$. Since the ball of radius $1/2$ inside $V$ is convex and
connected, it must be contained in a dilation of $T$ of $O$. This implies that
$B_{T^{-1},\infty}(0)\cap V\subseteq O\subseteq B\cap V$.

Let

$P_{L}=\\{n_{1}v_{1}+\cdots+n_{d^{\prime}}v_{d^{\prime}}:|n_{i}|\leq
LN_{i}\\}$

This is contained in $B_{dL/2}(0)\cap V$. Letting $v_{j}=\\{h_{j}\alpha\\}$,
we see that if $n_{1}h_{1}+n_{2}h_{2}+\cdots
n_{d^{\prime}}h_{d^{\prime}}\equiv 0\pmod{N}$, then
$n_{1}v_{1}+\cdots+n_{d^{\prime}}v_{d^{\prime}}$ is a point in
$\mathbb{Z}^{d}$. By the Pigeonhole principle, there exists a residue class
$q$ such that $n_{1}h_{1}+n_{2}h_{2}+\cdots n_{d^{\prime}}h_{d^{\prime}}\equiv
q\pmod{N}$ for at least $L^{d^{\prime}}\delta/Md^{-O(d)}$ many elements in
$P_{L}$. Thus, taking the difference of any two such elements, it follows that
$P_{L}$ contains at least $L^{d^{\prime}}\frac{\delta}{M}d^{-O(d)}$ many
points in $\mathbb{Z}^{d}$. Consequently, letting $L$ go to infinity,
$\mathbb{Z}^{d}\cap\Gamma^{\prime}$ is a lattice in $V$ with covolume at most
$\delta^{-1}Md^{O(d)}$.

This implies, via Minkowski’s second theorem that the product of the
successive minima of $\mathbb{Z}^{d}\cap V$ with respect to $B_{1}(0)\cap V$
is at most $\delta^{-1}Md^{O(d)}$. Let $w_{1},\dots,w_{d^{\prime}}$ be those
linearly independent vectors that correspond to the $d^{\prime}$ successive
minima. Then $|w_{1}|\cdots|w_{d^{\prime}}|\leq\delta^{-1}Md^{O(d)}$. Since
the ball of radius $\delta/(Md^{O(d)})$ inside $V$ is contained in $B$, it
follows that

$|w_{i}\cdot a|\leq\frac{(\delta/M)^{-O(1)}d^{O(d)}K}{N}.$

Step 3: Finishing the proof. Now, letting $e_{i}$ be the coordinate vector in
$\mathbb{R}^{d}$ with a $1$ in the $i$th coordinate and $0$ everywhere else,
there exists $e_{i_{1}},\dots,e_{i_{d-d^{\prime}}}$ such that
$w_{1},\dots,w_{d^{\prime}},e_{i_{1}},\dots,e_{i_{d-d^{\prime}}}$ are linearly
independent. Consider the $d\times d$ matrix
$A=(w_{1},\dots,w_{d^{\prime}},e_{i_{1}},\dots,e_{i_{d-d^{\prime}}})^{T}$. By
Cramer’s rule, $A^{-1}=\text{adj}(A)\det(A)^{-1}$ (where $\text{adj}(A)$ is
the adjugate matrix). It follows by taking
$\eta_{1},\dots,\eta_{d-d^{\prime}}$ be the last $d-d^{\prime}$ columns of
$\text{adj}(A)$, it follows (using Hadamard’s inequality of $|v_{1}\wedge
v_{2}\wedge\cdots\wedge v_{d}|\leq d^{O(d)}|v_{1}|\cdots|v_{d}|$) that for all
$i$,

  * •

$\eta_{i}\in\mathbb{Z}^{d}$,

  * •

$|\eta_{i}|\leq(\delta/M)^{-O(1)}d^{O(d)}$,

  * •

$\langle\eta_{i},w_{j}\rangle=0$ for all $j$,

  * •

and for $\delta N/(d^{O(d)}M)$ many $h\in[N]$, $\|\eta_{i}\cdot\\{\alpha
h\\}\|_{\mathbb{R}/\mathbb{Z}}=0.$ Namely,
$h\in\\{\ell_{1}h_{1}+\cdots\ell_{d^{\prime}}h_{d}:|\ell_{i}|\leq N_{i}\\}$
work since $\eta_{i}\in\mathbb{Z}^{d}$ and $\eta_{i}$ annihilates $P$.

Since $N$ is prime and sufficiently larger than each $|\eta_{i}|$, and
$\alpha$ has denominator $N$, it follows that

$\|\eta_{i}\cdot\alpha\|_{\mathbb{R}/\mathbb{Z}}=0.$

∎

###  3.3. Deduction of Lemma 3.2

As in the one-dimensional refined bracket polynomial lemma, we invoke the
following lemma to deduce Lemma 3.2.

######  Lemma 3.5.

Let $\delta,M,K,d,r>0$ fixed with $\delta\in(0,1/10)$, $M\geq 2$,
$d\in\mathbb{Z}$, $a_{1},\dots,a_{r},\alpha_{1},\dots,\alpha_{r}$ be such
that,
$(a_{1},\dots,a_{r}),(\alpha_{1},\dots,\alpha_{r})\in(\mathbb{R}^{d})^{r}$,
and $\beta\in\mathbb{R}^{r}$, with $|a|\leq M$. Let
$\vec{N}=(N_{1},\dots,N_{r})$ be an element in $\mathbb{Z}^{r}$ with $N_{i}$
being distinct odd primes. Suppose that $\alpha_{j}$ has denominator $N_{j}$
and that there are at least $\delta|\vec{N}|$ many $\vec{h}\in[\vec{N}]$ such
that

$\left\|\beta\cdot\vec{n}+\sum_{j=1}^{r}n_{j}a_{j}\cdot\left\\{\sum_{i=1}^{r}\alpha_{i}h_{i}\right\\}\right\|_{C^{\infty}[\vec{N}]}\leq
K.$

Then at least one of the following holds.

  * •

We have $N_{i}\ll(\delta/(dr)^{d+r}M)^{-O(1)}$ for some $i$ or
$K/N_{i}>\frac{1}{10r}$ for some $i$;

  * •

or there exists linearly independent $w_{1},\dots,w_{r}$ and linearly
independent $\eta_{1},\dots,\eta_{d-r}$ in $\mathbb{Z}^{d}$ with size at most
$(\delta/drM)^{-O(d+r)}$ in $\mathbb{Z}^{d}$ such that for each $(i,k)$,
$\langle w_{i},\eta_{k}\rangle=0$ and for each $i$ and $j$

$\|\eta_{i}\cdot\alpha_{j}\|_{\mathbb{R}/\mathbb{Z}}=0\text{ and
}|\eta_{i}\cdot w_{j}|\leq\frac{(\delta/drM)^{-O(d+r)}K}{N_{j}}.$

###### Proof of Lemma 3.2 assuming Lemma 3.5.

We have that for at least $\delta|\vec{N}|$ many $\vec{h}\in[\vec{N}]$,

$\left\|\beta\cdot\vec{n}+\sum_{j=1}^{r}n_{j}a_{j}\cdot\left\\{\sum_{i=1}^{r}\alpha_{i}h_{i}\right\\}\right\|_{C^{\infty}[\vec{N}]}\leq
K.$

We pick distinct odd primes $N_{1}^{\prime},\dots,N_{r}^{\prime}$ such that
$10rN_{i}\leq N_{i}^{\prime}\leq 20rN_{i}$.

Replacing $N_{i}$ with $N_{i}^{\prime}$ we may assume that each
$h_{i}\in[N_{i}/(10r)]$. We now approximate $\alpha_{i}$ with
$\alpha_{i}^{\prime}$ with $N_{i}\alpha_{i}^{\prime}\in\mathbb{Z}^{d}$ such
that $\|\alpha_{i}-\alpha_{i}^{\prime}\|_{\infty}\leq 1/(2N_{i})$. We see that

$\left\|\beta\cdot\vec{n}+\sum_{j=1}^{r}n_{j}a_{j}\cdot\left\\{\sum_{i=1}^{r}\alpha_{i}^{\prime}h_{i}\right\\}+\sum_{j=1}^{r}n_{j}a_{j}\cdot\left\\{\sum_{i=1}^{r}(\alpha_{i}-\alpha_{i}^{\prime})h_{i}\right\\}+P(\vec{n},\vec{h})\right\|_{C^{\infty}[\vec{N}]}\leq
K$

where

$P(\vec{n},\vec{h})=\sum_{j=1}^{r}n_{j}a_{j}\cdot\left\\{\sum_{i=1}^{r}\alpha_{i}h_{i}\right\\}-\sum_{j=1}^{r}n_{j}a_{j}\cdot\left\\{\sum_{i=1}^{r}\alpha_{i}^{\prime}h_{i}\right\\}-\sum_{j=1}^{r}n_{j}a_{j}\cdot\left\\{\sum_{i=1}^{r}(\alpha_{i}-\alpha_{i}^{\prime})h_{i}\right\\}.$

The point is that
$\left\\{\sum_{i=1}^{r}\alpha_{i}h_{i}\right\\}-\left\\{\sum_{i=1}^{r}\alpha_{i}^{\prime}h_{i}\right\\}-\left\\{\sum_{i=1}^{r}(\alpha_{i}-\alpha_{i}^{\prime})h_{i}\right\\}\in\mathbb{Z}^{d}$
and this can take at most $(2r+1)^{d}$ many values. Pigeonholing in one of
those values, and observing that
$\left\\{\sum_{i=1}^{r}(\alpha_{i}-\alpha_{i}^{\prime})h_{i}\right\\}=\sum_{i=1}^{r}(\alpha_{i}-\alpha_{i}^{\prime})h_{i}$,
there exists some $\beta^{\prime}\in\mathbb{R}^{d}$ such that for at least
$\delta|\vec{N}|/(2r+1)^{d}$ many values $h\in[\vec{N}]$ satisfying

$\left\|\beta^{\prime}\cdot\vec{n}+\sum_{j=1}^{r}n_{j}a_{j}\cdot\left\\{\sum_{i=1}^{r}\alpha_{i}^{\prime}h_{i}\right\\}+\sum_{i}\left(\sum_{j}\tilde{a}_{ij}n_{j}\right)\\{h_{i}/N_{i}\\}\right\|_{C^{\infty}[\vec{N}]}\leq
11Kr$

where $\tilde{a}_{ij}=N_{i}(\alpha_{i}-\alpha_{i}^{\prime})a_{j}$. Here, we
note that since $h_{i}\in[N_{i}/(10r)]$, we have
$h_{i}=N_{i}\\{h_{i}/N_{i}\\}$.

Applying Lemma 3.5 gives $w_{1},\dots,w_{d^{\prime}}$ and
$\eta_{1},\dots,\eta_{d+r-d^{\prime}}$ such that denoting
$\eta_{i}=(\eta_{i}^{\prime},\eta_{i}^{d+1},\dots,\eta_{i}^{d+r})$ and
$w_{i}=(w_{i}^{\prime},w_{i}^{d+1},\dots,w_{i}^{d+r})$, we have

$\eta_{i}^{\prime}\cdot\alpha^{\prime}_{j}+\eta_{i}^{d+j}/N_{j}\equiv
0\pmod{1}$ $|w_{i}^{\prime}\cdot
a_{j}+\sum_{k}w_{i}^{d+k}\cdot\tilde{a}_{jk}|\leq 11Kr/N_{j}.$

Now taking $u_{1},\dots,u_{m}$ to be linearly independent and orthogonal to
the subspace generated by the
$\eta_{1}^{\prime},\dots,\eta_{d+r-d^{\prime}}^{\prime}$, we see that
$(u_{1},0),\dots,(u_{m},0)$ is orthogonal to
$\eta_{1},\dots,\eta_{d+r-r^{\prime}}$, so is in the subspace spanned by
$w_{1},\dots,w_{d^{\prime}}$. Furthermore, by Cramer’s rule, we may choose
$u_{1},\dots,u_{m}$ to be integer vectors with size bounded by
$(\delta/drM)^{-O(d+r)}$, so that $u_{1},\dots,u_{m}$ are each spanned by
$(\delta/drM)^{-O(d+r)}$-integer combination of $w_{1},\dots,w_{d^{\prime}}$.
Thus,

$\|\eta_{i}^{\prime}\cdot\alpha_{j}\|_{\mathbb{R}/\mathbb{Z}}\leq(\delta/drM)^{-O(d+r)}/N_{j}$
$|u_{i}\cdot a_{j}|\leq\frac{K(\delta/drM)^{-O(d+r)}}{N_{j}}$

as desired. ∎

We now prove Lemma 3.5.

###### Proof of Lemma 3.5.

Step 1: Reducing to the case of when $\beta=0$. We have for $\delta|\vec{N}|$
many $h\in[\vec{N}]$ that

$\left\|\beta_{j}+a_{j}\cdot\left\\{\sum_{i=1}^{r}\alpha_{i}h_{i}\right\\}\right\|_{\mathbb{R}/\mathbb{Z}}<\frac{K}{N_{i}}$

for each $j=1,\dots,r$. By the Pigeonhole principle, there exists
$k_{j}\in\mathbb{Z}$ such that for a proportion of $\delta/(2Mdr)$ many
$h_{1},\dots h_{r}$, we have

$\left|\beta_{j}+a_{j}\cdot\left\\{\sum_{i=1}^{r}\alpha_{i}h_{i}\right\\}-k_{j}\right|<K/N_{j}.$

Pigeonholing again in the sign pattern of
$\\{\sum_{i=1}^{r}\alpha_{i}h_{i}\\}\in\\{0,1,-1\\}^{d}$ to obtain a
proportion of $\delta/(2Mdr3^{d})$ many $h_{1},\dots,h_{r}$ such that

$\left|\beta_{j}+a_{j}\cdot\left\\{\sum_{i=1}^{r}\alpha_{i}h_{i}\right\\}-n_{j}\right|<K/N_{j}$

and all of $\\{\sum_{i=1}^{r}\alpha_{i}h_{i}\\}$ have the same sign as
$\vec{h}$ ranges over the set we Pigeonholed in. Taking the difference of any
two such $\vec{h}$’s, we obtain

$\left|a_{j}\cdot\left\\{\sum_{i=1}^{r}\alpha_{i}h_{i}\right\\}\right|<2K/N_{j}$

for $\delta|\vec{N}|/(2Mdr3^{d})$ many $\vec{h}$ in $[\vec{N}]$.

Let

$B_{j}=\\{|a_{j}\cdot x|<2K/N_{j},|x_{i}|<1/2\text{ for all }i\in[d]\\},\text{
}B=\bigcap_{i=1}^{r}B_{i},\text{ and
}\Gamma=\alpha_{1}\mathbb{Z}+\alpha_{2}\mathbb{Z}+\cdots\alpha_{r}\mathbb{Z}+\mathbb{Z}^{d}.$

Without a loss of generality, let
$\alpha_{1},\dots,\alpha_{r^{\prime}}\not\in\mathbb{Z}^{d}$ and let
$\alpha_{r^{\prime}+1},\dots,\alpha_{r}\in\mathbb{Z}^{d}$. Let
$[\vec{N^{\prime}}]=\prod_{i=1}^{r^{\prime}}[N_{i}]$. We now claim that
$|B\cap\Gamma|\geq\delta/(2Mdr3^{d})|\vec{N^{\prime}}|$. To see this, suppose

$\sum_{i}\alpha_{i}h_{i}\equiv\sum_{i}\alpha_{i}h_{i}^{\prime}\pmod{1}$

for $h_{i},h_{i}^{\prime}$ integers. Then

$\sum_{i}\alpha_{i}(h_{i}-h_{i}^{\prime})\equiv 0\pmod{1}.$

Clearing denominators,

$\sum_{i}N_{1}\cdots N_{r^{\prime}}\alpha_{i}(h_{i}-h_{i}^{\prime})\equiv
0\pmod{|\vec{N^{\prime}}|}$

which implies

$N_{1}\cdots N_{r^{\prime}}\alpha_{i}(h_{i}-h_{i}^{\prime})\equiv
0\pmod{N_{i}}.$

As $\alpha_{i}$ is not integral for $1\leq i\leq r^{\prime}$ we have
$h_{i}\equiv h_{i}^{\prime}\pmod{N_{i}}$.

Step 2: Invoking Minkowski’s second theorem. By Proposition 3.1, there exists
a generalized arithmetic progression

$P:=\\{m_{1}v_{1}+m_{2}v_{2}+\cdots+m_{d^{\prime}}v_{d^{\prime}}:|a_{i}|\leq
M_{i}\\}\subseteq B\cap\Gamma$

with $v_{1},\dots,v_{d^{\prime}}$ linearly independent and $M_{1}M_{2}\cdots
M_{d^{\prime}}=\frac{\delta}{rMd^{O(d)}}|\vec{N^{\prime}}|$. Let

$\Gamma^{\prime}=v_{1}\mathbb{Z}+v_{2}\mathbb{Z}+\cdots
v_{d^{\prime}}\mathbb{Z}\text{ and
}V=\text{span}(v_{1},\dots,v_{d^{\prime}}).$

By placing a fundamental parallelepiped dilated by two of $\Gamma^{\prime}$
around each lattice point in the ball of radius $1/2$, we see that the volume
of the ball of radius $1/2$ in $V$ is at most $N/2^{d}$ times the the volume
of the fundamental parallelepiped of $\Gamma^{\prime}$ in $V$. We have the
upper bound:

$\mathrm{vol}(B_{1/2,\infty}(0))\leq 2^{d}N\mathrm{vol}(V/\Gamma^{\prime}).$

Let $O$ denote the interior of the generalized arithmetic progression $P$
inside $V$. Note that we have the lower bound of

$\mathrm{vol}(O)\geq N(\delta/(d^{O(d)}Mr))\mathrm{vol}(V/\Gamma^{\prime}).$

By Ruzsa’s covering lemma (using the fact that $O-O=2O$ since $O$ is the
interior of a generalized arithmetic progression), we may cover the ball of
radius $1/2$ inside $V$ with at most $T:=\delta^{-1}Mrd^{O(d)}$ many
translations of $O$. Since the ball of radius $1/2$ inside $V$ is convex and
connected, it must be contained in a dilation of $T$ of $O$. This implies that
$B_{T^{-1},\infty}(0)\cap V\subseteq O\subseteq B\cap V$.

Let
$P_{L}=\\{m_{1}v_{1}+m_{2}v_{2}+\cdots+m_{d^{\prime}}v_{d^{\prime}}:|a_{i}|\leq
LM_{i}\\}$. This lies inside $B_{dL/2}(0)\cap V$. Since
$N_{1},\dots,N_{r^{\prime}}$ are odd, there exists some
$\vec{h_{i}}=(h_{i}^{1},\dots,h_{i}^{r^{\prime}})\in[\vec{N^{\prime}}]$ such
that $v_{i}=\\{\vec{h_{i}}\cdot(\alpha_{1},\dots,\alpha_{r^{\prime}})\\}$. By
the Pigeonhole principle, there exists a residue classes
$(q_{1},\dots,q_{r^{\prime}})$ such that for at least
$L^{d^{\prime}}\frac{\delta}{rMd^{O(d)}}$ many $m_{1},\dots,m_{d^{\prime}}$,

$m_{1}h_{1}^{j}+m_{2}h_{2}^{j}+\cdots+m_{d^{\prime}}h_{d^{\prime}}^{j}\equiv
q_{j}\pmod{N_{j}}.$

Taking the difference of any two such $m_{1},\dots,m_{d^{\prime}}$, we obtain
that for at least $L^{d^{\prime}}\frac{\delta}{rMd^{O(d)}}$ many
$m_{1},\dots,m_{d^{\prime}}$, that

$m_{1}h_{1}^{j}+m_{2}h_{2}^{j}+\cdots+m_{d^{\prime}}h_{d^{\prime}}^{j}\equiv
0\pmod{N_{j}}$

and so there are at least $L^{d^{\prime}}\frac{\delta}{rMd^{O(d)}}$ many
elements in $P_{2L}$ that lie in $\mathbb{Z}^{d}$. Consequently,
$B_{dL}(0)\cap V$ contains at least $L^{d^{\prime}}\frac{\delta}{rMd^{O(d)}}$
many elements in $\mathbb{Z}^{d}$.

By Minkowski’s second theorem, $V\cap\mathbb{Z}^{d}$ has $d^{\prime}$ linearly
independent vectors $w_{1},\dots,w_{d^{\prime}}$ such that
$|w_{1}|\cdots|w_{d^{\prime}}|\leq(\delta/(Mrd^{O(d)}))^{-1}$. Since the ball
of radius $\frac{\delta}{Mrd^{O(d)}}$ lies inside $B$, it follows that

$|w_{i}\cdot a_{j}|\leq\frac{K(\delta/(Mrd^{O(d)}))^{-1}}{N_{j}}.$

Step 3: Finishing the argument. Now, letting $e_{i}$ be the coordinate vector
in $\mathbb{R}^{d}$ with a $1$ in the $i$th coordinate and $0$ everywhere
else, there exists $e_{i_{1}},\dots,e_{i_{d-d^{\prime}}}$ such that
$w_{1},\dots,w_{d^{\prime}},e_{i_{1}},\dots,e_{i_{d-d^{\prime}}}$ are linearly
independent. Consider the $d\times d$ matrix
$A=(w_{1},\dots,w_{d^{\prime}},e_{i_{1}},\dots,e_{i_{d-d^{\prime}}})^{T}$. By
Cramer’s rule, $A^{-1}=\text{adj}(A)\det(A)^{-1}$ (where $\text{adj}(A)$ is
the adjugate matrix). By taking $\eta_{1},\dots,\eta_{d-d^{\prime}}$ be the
last $d-d^{\prime}$ columns of $\text{adj}(A)$, it follows (using Hadamard’s
inequality of $|v_{1}\wedge v_{2}\wedge\cdots\wedge v_{d}|\leq
d^{O(d)}|v_{1}|\cdots|v_{d}|$) that for each $i$,

  * •

$\eta_{i}\in\mathbb{Z}^{d}$

  * •

$|\eta_{i}|\leq(\delta/(Mrd^{O(d)}))^{-1}$

  * •

$\langle\eta_{j},w_{j}\rangle=0$ for each $i,j$

  * •

and for $\delta N/(d^{O(d)}Mr)$ many $\vec{h}\in[\vec{N}^{\prime}]$,
$\|\eta_{i}\cdot\\{(\alpha_{1},\dots,\alpha_{r^{\prime}})\cdot\vec{h}\\}\|_{\mathbb{R}/\mathbb{Z}}=0$
for the same reason as the one-dimensional case.

Since each $N_{i}$ is prime and sufficiently larger than each $|\eta_{i}|$,
and $\alpha$ has denominator $N$, and since
$\alpha_{r^{\prime}+1},\dots,\alpha_{r}\in\mathbb{Z}^{d}$ it follows that

$\|\eta_{i}\cdot\alpha_{j}\|_{\mathbb{R}/\mathbb{Z}}=0.$

∎

###  3.4. Corollary of Lemma 3.2

We now deduce the following corollary of Lemma 3.2 which will be used in our
main result.

######  Corollary 3.1.

Let $N,\delta,M,K,d,r>0$ fixed with $\delta\in(0,1/10)$, $d\in\mathbb{Z}$,
$a_{1},\dots,a_{r},\alpha_{1},\dots,\alpha_{r}$ be such that,
$(a_{1},\dots,a_{r}),(\alpha_{1},\dots,\alpha_{r})\in(\mathbb{R}^{d})^{r}$,
and $\beta\in\mathbb{R}^{r}$, $\gamma\in\mathbb{R}^{r^{2}}$ with $|a|\leq M$.
Suppose that for $\delta|\vec{N}|$ many elements $\vec{h}\in[\vec{N}]$,

$\left\|\beta\cdot\vec{n}+\sum_{j=1}^{r}n_{j}a_{j}\cdot\left\\{\sum_{i=1}^{r}\alpha_{i}h_{i}\right\\}+\sum_{i,j\in[r]}\gamma_{ij}n_{i}h_{j}\right\|_{C^{\infty}[\vec{N}]}\leq
K.$

Then one of the following holds.

  * •

We have $N_{i}\ll(\delta/(dr)^{d+r}M)^{-O(1)}$ for some $i$ or
$K/N_{i}>1/(100r)$ for some $i$;

  * •

or there exists linearly independent $w_{1},\dots,w_{d^{\prime}}$ and
$\eta_{1},\dots,\eta_{d-d^{\prime}}$ in $\mathbb{Z}^{d}$ with size at most
$(\delta/drM)^{-O(dr)^{O(1)}}$ such that for each $(i,k)$, $\langle
w_{i},\eta_{k}\rangle=0$ and for each $i$ and $j$

$\|\eta_{i}\cdot\alpha_{j}\|_{\mathbb{R}/\mathbb{Z}},\|w_{i}\cdot
a_{j}\|_{\mathbb{R}/\mathbb{Z}}\leq\frac{(\delta/drM)^{-O(dr)^{O(1)}}K}{N_{j}}.$

###### Proof.

We write
$\sum_{i,j}\gamma_{ij}n_{i}h_{j}=\sum_{i}n_{i}\left\\{\sum_{j}\gamma_{ij}h_{j}\right\\}\pmod{1}.$
Define $\tilde{a}_{j}=(a_{j},e_{d+1},e_{d+2},\dots,e_{d+r})$ where $e_{j}$ is
the $j$-th elementary basis vector and
$\tilde{\alpha}_{i}=\left(\alpha_{i},\gamma_{i}\right)$ where
$\gamma_{i}=\sum_{\ell\in[r]}\gamma_{i\ell}e_{i+d}$. We have for
$\delta|\vec{N}|$ many $\vec{h}\in[\vec{N}]$ that

$\|\beta\cdot\vec{n}+\sum_{j=1}^{r}\tilde{a}_{j}n_{j}\cdot\\{\sum_{i=1}^{r}\tilde{\alpha}_{i}h_{i}\\}\|_{C^{\infty}[\vec{N}]}\leq
K.$

By Lemma 3.2, we find $w_{1},\dots,w_{d^{\prime}}$ and
$\eta_{1},\dots,\eta_{d+r-d^{\prime}}$ of size at most
$(\delta/drM)^{-O(d+r)}$ such that

$\|\eta_{i}\cdot\tilde{\alpha}_{j}\|_{\mathbb{R}/\mathbb{Z}},|w_{i}\cdot\tilde{a}_{j}|\leq\frac{(\delta/drM)^{-O(d+r)}K}{N_{j}}$

for each $j\in[d+r]$.

We denote $\eta_{i}=(\eta_{i}^{\prime},\eta_{i}^{d+1},\dots,\eta_{i}^{d+r})$
and $w_{i}=(w_{i}^{\prime},w_{i}^{d+1},\dots,w_{i}^{d+r})$. Fixing $j$ (and
noting that $w_{i}^{d+k}e_{d+k}\cdot e_{d+k}\in\mathbb{Z}$), we see that

$\|\eta_{i}^{\prime}\cdot\alpha_{j}+\sum_{k}\eta_{i}^{d+k}\gamma_{ik}\|_{\mathbb{R}/\mathbb{Z}}\leq\frac{(\delta/M)^{-O(r)}(dr)^{O(dr+r^{2})}K}{N_{j}}$

and

$\|w_{i}^{\prime}\cdot
a_{j}\|_{\mathbb{R}/\mathbb{Z}}\leq\frac{(\delta/M)^{-O(r)}(dr)^{O(dr+r^{2})}K}{N_{j}}.$

Consider $u_{1},\dots,u_{m}$ linearly independent which span the orthogonal
complement of the $w_{i}^{\prime}$’s. It follows that $(u_{i},0)$ lies in the
orthogonal complement of the span of the $w_{i}$’s, so it lies in the span of
$\eta_{i}$’s. By Cramer’s rule we may choose $u_{1},\dots,u_{m}$ to be integer
vectors with size at most $(\delta/drM)^{-O(dr^{O(1)})}$, so
$(u_{1},0),\dots,(u_{i},0)$ is in an $(\delta/drM)^{-O(dr^{O(1)})}$-integer
span of the $\eta_{i}^{\prime}$. It follows that

$\|u_{i}\cdot\alpha_{j}\|_{\mathbb{R}/\mathbb{Z}}\leq\frac{(\delta/drM)^{-O(dr^{O(1)})}K}{N_{j}}.$

∎

##  4\. Equidistribution for multiparameter nilsequences

We shall recall the main theorem here.

*

We begin with the following lemma.

######  Lemma 4.1.

Let $G$ be a group and $G_{2}$ a subgroup of $G$ containing $[G,G]$. Then any
$t-1$-fold commutator containing $t-1$ copies of $G$ and one copy of $G_{2}$
lies inside the $t-1$-fold commutator $[G_{2},G,\dots,G]$.

###### Proof.

We claim by induction that for $0\leq r\leq m-1$ that if $g_{m}\in G_{2}$ and
$g_{j}\in G$ for all other $j$ that

$[[g_{1},\dots,g_{m-r-1}],[g_{m},g_{m-1},\dots,g_{m-r}]]\in[G_{2},G,\dots,G]$

where there are $m-1$ copies of $G$ in above relation. Here, we would like to
remind the reader that as indicated in Definition 1.1, $G_{(u)}$ is the
$u-1$-fold commutator $[G,G,\dots,G]$. Our main tool for proving this claim is
the Hall-Witt identity, which states that if $x^{y}=y^{-1}xy=x[x,y]$, then

$[[x,y],z^{x}][[z,x],y^{z}][[y,z],x^{y}]=\mathrm{id}_{G}.$

We proceed by induction on $m$. The cases $m=1,2$ are trivial. For fixed $m$,
we proceed by backwards induction on $r$. The case of $r=m$ follows straight
from the fact that $[g_{m},\dots,g_{1}]$ lies inside $[G_{2},\dots,G]$. Now,
assuming the case for $\geq r$, we wish to show

$[[g_{1},\dots,g_{m-r}],[g_{k},g_{m-1},\dots,g_{m-r+1}]]\in[G_{2},G,\dots,G].$

By the Hall-Witt identity applied with

$x=[g_{1},\dots,g_{m-r-1}],y=g_{m-r},\text{ and
}z=[g_{m},g_{m-1},\dots,g_{m-r+1}],$

and noticing that $G_{(m+1)}$ lies in the $m-1$-fold commutator
$[G_{2},G,\dots,G]$ so the conjugation is irrelevant, it suffices to show that

$[[[g_{1},\dots,g_{m-r-1}],[g_{m},g_{m-1},\dots,g_{m-r+1}]],g_{m-r}]\in[G_{2},G,\dots,G]\pmod{G_{(m+1)}}$

and

$[[g_{1},\dots,g_{m-r-1}],[g_{m},\dots,g_{m-r}]]\in[G_{2},G,\dots,G]\pmod{G_{(m+1)}}.$

Both of these are true by the induction hypothesis and result follows. ∎

We next define the following two notions.

######  Definition 4.1 (Linear and nonlinear component).

Given a polynomial sequence $g\in\mathrm{poly}(\mathbb{Z}^{\ell},G)$ with
$g(0)=\mathrm{id}_{G}$, we define

$g_{\mathrm{lin}}(\vec{n})=g(e_{1})^{n_{1}}g(e_{2})^{n_{2}}\cdots
g(e_{\ell})^{n_{\ell}}\text{ and
}g_{2}(\vec{n})=g(\vec{n})g_{\mathrm{lin}}(\vec{n})^{-1}.$

######  Definition 4.2.

For a group $G$ and a normal subgroup $H$ of $G$, we define

$G\times_{H}G:=\\{(g,g^{\prime})\in G^{2}:g^{\prime}g^{-1}\in H\\}.$

We finally require a lemma which given that allows one to compile information
regarding various $C^{\infty}[\vec{N}]$ norms of various shifts into
information regarding the polynomials themselves; this is the analog of [10,
Lemma 7.6].

######  Lemma 4.2.

Fix $\rho\in(0,1/2)$, an integer $\ell$, and integers $N_{1},\ldots,N_{\ell}$.
Let $P$ and $Q$ be polynomials in $n_{1},\ldots,n_{\ell}$ of degree at most
$k$ and $\sigma(h):[\vec{N}]\to\mathbb{R}^{\ell}$ an arbitrary map.

Suppose that $P(\vec{0})=0$, $Q(\vec{e}_{i})=0$ for $i\in[\ell]$,
$Q(\vec{0})=0$, and for at least $\rho N_{1}\ldots N_{\ell}$ many
$\vec{h}\in[\vec{N}]$ we have

$\|P(\vec{n})+Q(\vec{n}+\vec{h})-Q(\vec{n})+\sigma(\vec{h})\cdot\vec{n}\|_{C^{\infty}[\vec{N}]}\leq\rho^{-1}.$

Then there there exists a nonzero integer $q$ with
$|q|\leq\rho^{-O_{k,\ell}(1)}$ such that for $\rho N_{1}\ldots N_{\ell}$
shifts $\vec{h}\in[\vec{N}]$ we have

$\displaystyle\left\|q\left(\sigma(h)\cdot\vec{n}+\sum_{i\in[\ell]}P(\vec{e}_{i})n_{i}+\sum_{i,j\in[\ell]}(\partial_{e_{i}}\partial_{e_{j}}Q(0))n_{i}h_{j}\right)\right\|_{C^{\infty}[\vec{N}]}\leq\rho^{-O_{k,\ell}(1)}.$

If furthermore, $\sigma$ is identically zero we have that there exists a
nonzero integer $q$ with $|q|\leq\rho^{-O_{k,\ell}(1)}$ such that

$\|qP(\vec{n})\|_{C^{\infty}[\vec{N}]}\leq\rho^{-O_{k,\ell}(1)}\text{ and
}\|qQ(\vec{n})\|_{C^{\infty}[\vec{N}]}\leq\rho^{-O_{k,\ell}(1)}.$

###### Proof.

We prove this via a trick. Given a vector $\vec{h}$ and a polynomial $R$, we
define

$\partial_{\vec{h}}R(\vec{n})=R(\vec{n}+\vec{h})-R(\vec{n}).$

Take $\tau=\rho^{O_{k,\ell}(1)}$ sufficiently small. We have for each
$\vec{h}\in[\vec{N}]$ such that

$\|P(\vec{n})+Q(\vec{n}+\vec{h})-Q(\vec{n})+\sigma(h)\cdot\vec{n}\|_{C^{\infty}[\vec{N}]}\leq\rho^{-1}$

that for all $\vec{h}^{\prime}\in[\vec{N}]$,

$\|\partial_{\vec{h}^{\prime}}(P(\vec{n})+Q(\vec{n}+\vec{h})-Q(\vec{n}))\|_{C^{\infty}[\vec{N}]}=\|\partial_{\vec{h}^{\prime}}(P(\vec{n})+Q(\vec{n}+\vec{h})-Q(\vec{n})+\sigma(h)\cdot\vec{n})\|_{C^{\infty}[\vec{N}]}\leq\tau^{-1/4}$

by (say) Lemma A.12 and the triangle inequality. This implies that for at
least $\rho|\vec{N}|^{2}$ elements in
$(\vec{h}^{\prime},\vec{h})\in[\vec{N}]\times[\vec{N}]$, we have

$\displaystyle\|(\partial_{\vec{n}}\partial_{\vec{h}^{\prime}}\partial_{\vec{h}}Q)(0)+(\partial_{\vec{n}}\partial_{\vec{h}^{\prime}}P)(0)\|_{C^{\infty}[\vec{N}]}\leq\tau^{-1/4}.$

Thus for at least $\rho$ fraction of
$(\vec{h},\vec{h}^{\prime},\vec{n})\in[\vec{N}]\times[\vec{N}]\times\tau\cdot[\vec{N}]$,
we have that

$\displaystyle\|(\partial_{\vec{n}}\partial_{\vec{h}^{\prime}}\partial_{\vec{h}}Q)(0)+(\partial_{\vec{n}}\partial_{\vec{h}^{\prime}}P)(0)\|_{\mathbb{R}/\mathbb{Z}}\leq\tau^{1/2}.$

This implies via Lemma A.11 that there exists a nonzero integer $q$ such that
$|q|\leq\rho^{-O_{k,\ell}(1)}$ and

$\displaystyle\|q((\partial_{\vec{n}}\partial_{\vec{h}^{\prime}}\partial_{\vec{h}}Q)(0)+(\partial_{\vec{n}}\partial_{\vec{h}^{\prime}}P)(0))\|_{C^{\infty}[\vec{N},\vec{N},\vec{N}]}\leq\rho^{-O_{k,\ell}(1)}.$

Taking $\vec{h}=\vec{0}$ and $\vec{n}=\vec{h}^{\prime}$, we have

$\displaystyle\|q(P(2\vec{n})-2P(\vec{n})+P(\vec{0}))\|_{C^{\infty}[\vec{N}]}\leq\rho^{-O_{k,\ell}(1)}.$

Let $P(\vec{n})=\sum_{|\vec{i}|\leq
k}\alpha_{\vec{i}}\vec{n}^{\vec{i}}=\sum_{|\vec{i}|\leq
k}\alpha_{\vec{i}}^{\prime}\binom{\vec{n}}{\vec{i}}$. This implies that there
exists $q_{1}=C_{k}\cdot q$ and $q_{2}=C_{k}^{2}\cdot q$ such that

$\|q_{1}\cdot\alpha_{\vec{i}}\|_{\mathbb{R}/\mathbb{Z}}\leq\rho^{-O_{k,\ell}(1)}\vec{N}^{-\vec{i}}$

for $|\vec{i}|\geq 2$ and via Lemma A.10 that

$\|q_{2}\cdot\alpha_{\vec{i}}^{\prime}\|_{\mathbb{R}/\mathbb{Z}}\leq\rho^{-O_{k,\ell}(1)}\vec{N}^{-\vec{i}}$

for $|\vec{i}|\geq 2$. Thus

$\displaystyle\|q_{2}((\partial_{\vec{n}}\partial_{\vec{h}^{\prime}}\partial_{\vec{h}}Q)(0))\|_{C^{\infty}[\vec{N},\vec{N},\vec{N}]}\leq\rho^{-O_{k,\ell}(1)}.$

Taking $\vec{n}=\vec{h}=\vec{h}^{\prime}$, and an analogous argument to above,
there exists a nonzero integer $|q_{3}|\leq\rho^{-O_{k,\ell}(1)}$ such that if
$Q(\vec{n})=\sum_{|\vec{i}|\leq k}\beta_{\vec{i}}\binom{\vec{n}}{\vec{i}}$
then

$\|q_{3}\cdot\beta_{\vec{i}}\|_{\mathbb{R}/\mathbb{Z}}\leq\rho^{-O_{k,\ell}(1)}\vec{N}^{-\vec{i}}$

for $|\vec{i}|\geq 3$ and $|\vec{i}|=1$ (using the vanishing conditions on
$Q$). We thus have that for at least $\rho|\vec{N}|$ values of
$\vec{h}\in[\vec{N}]$ that

$\left\|q_{3}\left(P(\vec{n})+Q(\vec{n}+\vec{h})-Q(\vec{n})+\sigma(\vec{h})\cdot\vec{n}\right)\right\|_{C^{\infty}[\vec{N}]}\leq\rho^{-O_{k,\ell}(1)}.$

For such $\vec{h}$ and plugging in the conditions obtained, we have that

$\displaystyle\bigg{\|}q_{3}\bigg{(}\sum_{i\in[\ell]}P(\vec{e}_{i})n_{i}+\sum_{1\leq
i<j\leq\ell}(\partial_{e_{i}}\partial_{e_{j}}Q)(0)((n_{i}+h_{i})(n_{j}+h_{j})-n_{i}n_{j})$
$\displaystyle\qquad+\sum_{i\in\ell}(\partial_{e_{i}}\partial_{e_{i}}Q)(0)\bigg{(}\binom{n_{i}+h_{i}}{2}-\binom{n_{i}}{2}\bigg{)}+\sigma(\vec{h})\cdot\vec{n}\bigg{)}\bigg{\|}_{C^{\infty}[\vec{N}]}\leq\rho^{-O_{k,\ell}(1)}$

and simplifying gives the first part of the conclusion.

When $\sigma(\vec{h})=\vec{0}$, we have that for $\rho|\vec{N}|$ many
$\vec{h}\in[\vec{N}]$ has

$\displaystyle\left\|q_{3}\left(\sum_{i\in[\ell]}P(\vec{e}_{i})n_{i}+\sum_{i,j\in[\ell]}(\partial_{e_{i}}\partial_{e_{j}}Q)(0)n_{i}h_{j}\right)\right\|_{C^{\infty}[\vec{N}]}\leq\rho^{-O_{k,\ell}(1)}.$

This implies taking $\tau_{2}=\rho^{-O_{k,\ell}(1)}$ that at least a
$\rho$-fraction of $(\vec{n},\vec{h})\in[\vec{N}]\times\tau_{2}\cdot[\vec{N}]$
that

$\displaystyle\left\|q_{3}\left(\sum_{i\in[\ell]}P(\vec{e}_{i})n_{i}+\sum_{i,j\in[\ell]}(\partial_{e_{i}}\partial_{e_{j}}Q)(0)n_{i}h_{j}\right)\right\|_{\mathbb{R}/\mathbb{Z}}\leq\tau_{2}^{1/2}.$

Via Lemma A.11, we then have that there exists a nonzero integer $q_{4}$ with
$|q_{4}|\leq\rho^{-O_{k,\ell}(1)}$ such that

$\left\|q_{4}P(\vec{e}_{i})\right\|_{\mathbb{R}/\mathbb{Z}}\leq\rho^{-O_{k,\ell}(1)}N_{i}^{-1}\text{
and
}\left\|q_{4}(\partial_{e_{i}}\partial_{e_{j}}Q)(0)\right\|_{\mathbb{R}/\mathbb{Z}}\leq\rho^{-O_{k,\ell}(1)}(N_{i}N_{j})^{-1}.$

This gives the remaining coefficients to imply the final part of the lemma. ∎

The proof of Theorem 1.2 will eventually split into whether or not the
$s-1$-fold commutator

$\xi([G_{2},G,\dots,G])=0$

holds. For more motivation and simpler cases of this argument, we encourage
the reader to consult [22]. We now turn to the proof of Theorem 1.2.

###  4.1. Proof of Theorem 1.2

If $s=1$, then we may write $F(g(\vec{n})\Gamma)$ as $e(\xi(g(\vec{n})))$. A
Weyl-type exponential sum estimate (e.g., [30, Proposition 7]) immediately
gives us that there exists some integer $q\leq c(\delta)^{-1}$ such that

$\|q\xi\circ g\|_{C^{\infty}[\vec{N}]}\leq c(\delta)^{-1}.$

Let $\eta=q\xi$ be the horizontal character. We see that $|\eta|\leq
c(\delta)^{-1}$ and defining $G^{\prime}=\mathrm{ker}(\eta)$, we see that if
$g\in G^{\prime}$, then $\xi(g)=0$. This proves the result for $s=1$.

We now assume that $s>1$. We make a set of preliminary reductions. We first
reduce via Lemma 2.1 to the case of when $g(0)=\mathrm{id}_{G}$ and
$|\psi(g(e_{i}))|\leq\frac{1}{2}$ for all $i$ and apply Lemma 2.2 to quotient
out by the kernel of $\xi$ to have a one-dimensional vertical torus. We next
make a slight modification to the filtration: we replace $G_{\ell}$ for
$\ell\geq s$ by $G_{\ell}G_{(s)}$. This preserves normality and the filtration
property since $G_{(s)}$ lies in the center of $G$. By Lemma B.11, there
exists a complexity $M^{O_{k}(d^{O(1)})}$ Mal’cev basis adapted to this
filtration.

We now apply Lemma A.6 to Fourier expand

$F=\sum_{|\zeta|\leq c(\delta)^{-1}}F_{\zeta}+O(c(\delta))$

with $F_{\zeta}$ being a $G_{k}$-character of frequency $\zeta$. Integrating
the expression

$\int_{G_{(s)}/G_{(s)}\cap\Gamma}F(g_{(s)}x\Gamma)e(-\xi(g_{(s)}))dg_{(s)}=\sum_{|\zeta|\leq
c(\delta)^{-1}}\int_{G_{(s)}/G_{(s)}\cap\Gamma}F_{\zeta}(g_{(s)}x\Gamma)e(-\xi(g_{(s)}))dg_{(s)}+O(c(\delta))$

it follows that we may assume that $(\zeta-\xi)(G_{(s)})=0$. By the Pigeonhole
principle, we may assume that $F=F_{\zeta}$ for such a $\zeta$ and then apply
van der Corput’s inequality to obtain

$|\mathbb{E}_{\vec{n}\in[\vec{N}]}F(g(\vec{n})\Gamma)\overline{F(g(\vec{n}+\vec{h})\Gamma)}|\geq
c(\delta)$

for $c(\delta)|\vec{N}|$ many $\vec{h}\in[\vec{N}]$.

Note that the Taylor coefficients of $g_{2}(\vec{n})$ are of the form
$g_{\vec{j}}^{\binom{\vec{n}}{\vec{j}}}$ with $|j|\geq 2$ and $g_{\vec{j}}\in
G_{|\vec{j}|}$. We may rewrite the above as

$|\mathbb{E}_{\vec{n}\in[\vec{N}]}F_{\vec{h}}(g_{\vec{h}}(\vec{n})\Gamma^{2})|\geq
c(\delta)$

where

$F_{\vec{h}}(x,y)=F(\\{g_{\mathrm{lin}}(\vec{h})\\}x)\overline{F(y)}$
$g_{\vec{h}}(\vec{n}):=(\\{g_{\mathrm{lin}}(\vec{h})\\}^{-1}g_{2}(\vec{n}+\vec{h})g_{\mathrm{lin}}(\vec{n}+\vec{h})[g_{\mathrm{lin}}(\vec{h})]^{-1},g(\vec{n})).$

Define $G^{\square}:=G\times_{G_{2}}G$. By Lemma A.3, this is an $\leq s$-step
nilpotent Lie group and has a natural filtration of
$(G^{\square})_{i}=G_{i}\times_{G_{i+1}}G_{i}$ and by Lemma A.4, $g_{\vec{h}}$
is a polynomial sequence on $G^{\square}$ with respect to this filtration.
Since $F$ has $G_{k}$-frequency $\zeta$, and since $G_{k}$ lies in the center
of $G$ and $F_{\vec{h}}$ is invariant under
$G_{k}^{\triangle}:=\\{(g_{k},g_{k}):g_{k}\in G_{k}\\}$, it follows that
$F_{\vec{h}}$ descends to a function on
$\overline{G^{\square}}:=G^{\square}/G_{k}^{\triangle}$. By Lemma A.3, it
follows that $G^{\square}$ and $\overline{G^{\square}}$ have complexity at
most $M^{O_{k}(d^{O(1)})}$.

Now by Lemma A.3, given a horizontal character $\eta\colon
G^{\square}\to\mathbb{R}$, we may decompose it as
$\eta(g_{2}g,g)=\eta_{1}(g)+\eta_{2}(g_{2})$ where $g\in G$ and $g_{2}\in
G_{2}$ where $\eta_{1}$ is a horizontal character on $G$ and $\eta_{2}$ is a
horizontal character on $G_{2}$ which annihilates $[G,G_{2}]$. The same lemma
tells us that if $\eta$ has size at most $c(\delta)^{-1}$, then $\eta_{1}$ and
$\eta_{2}$ have size at most $c(\delta)^{-1}$. We now compute $\eta\circ
g_{\vec{h}}$, following [13, p. 13-14]. Given a horizontal character $\eta$ on
$G^{\square}$, we have

$\eta(g_{\vec{h}}(\vec{n}))=\eta_{1}(g(\vec{n}))+\eta_{2}(\\{g_{\mathrm{lin}}(\vec{h})\\}^{-1}g_{2}(\vec{n}+\vec{h})g_{\mathrm{lin}}(\vec{n}+\vec{h})[g_{\mathrm{lin}}(\vec{h})]^{-1}g(\vec{n})^{-1}).$

As $\eta_{2}$ vanishes on $[G,G_{2}]$, the above is equal to

$\eta_{1}(g(\vec{n}))+\eta_{2}(g_{2}(\vec{n}+\vec{h}))-\eta_{2}(g_{2}(\vec{n}))+\eta_{2}(\\{g_{\mathrm{lin}}(\vec{h})\\}^{-1}g_{\mathrm{lin}}(\vec{n}+\vec{h})[g_{\mathrm{lin}}(\vec{h})]^{-1}g_{\mathrm{lin}}(\vec{n})^{-1}).$

We may write
$[g_{\mathrm{lin}}(\vec{h})]^{-1}=g_{\mathrm{lin}}(\vec{h})^{-1}\\{g_{\mathrm{lin}}(\vec{h})\\}$,
so

$\displaystyle\eta_{2}$
$\displaystyle(\\{g_{\mathrm{lin}}(\vec{h})\\}^{-1}g_{\mathrm{lin}}(\vec{n}+\vec{h})[g_{\mathrm{lin}}(\vec{h})]^{-1}g_{\mathrm{lin}}(\vec{n})^{-1})$
$\displaystyle=\eta_{2}(\\{g_{\mathrm{lin}}(\vec{h})\\}^{-1}g_{\mathrm{lin}}(\vec{n}+\vec{h})g_{\mathrm{lin}}(\vec{h})^{-1}\\{g_{\mathrm{lin}}(\vec{h})\\}g_{\mathrm{lin}}(\vec{n})^{-1})$
$\displaystyle=\eta_{2}([\\{g_{\mathrm{lin}}(\vec{h})\\},g_{\mathrm{lin}}(\vec{h})g_{\mathrm{lin}}(\vec{n}+\vec{h})^{-1}]g_{\mathrm{lin}}(\vec{n}+\vec{h})g_{\mathrm{lin}}(\vec{h})^{-1}g_{\mathrm{lin}}(\vec{n})^{-1})$
$\displaystyle=\eta_{2}([\\{g_{\mathrm{lin}}(\vec{h})\\},g_{\mathrm{lin}}(\vec{h})g_{\mathrm{lin}}(\vec{n}+\vec{h})^{-1}])+\eta_{2}(g_{\mathrm{lin}}(\vec{n}+\vec{h})g_{\mathrm{lin}}(\vec{h})^{-1}g_{\mathrm{lin}}(\vec{n})^{-1})$

By Baker-Campbell-Hausdorff, we see that

$g_{\mathrm{lin}}(\vec{n}+\vec{h})g_{\mathrm{lin}}(\vec{h})^{-1}g_{\mathrm{lin}}(\vec{n})^{-1}=\prod_{i<j}[g(e_{i})^{h_{i}},g(e_{j})^{n_{j}}]\pmod{[G,G,G]}$
$[\\{g_{\mathrm{lin}}(\vec{h})\\},g_{\mathrm{lin}}(\vec{h})g_{\mathrm{lin}}(\vec{n}+\vec{h})^{-1}]=\prod_{i=1}^{\ell}[\\{g_{\mathrm{lin}}(\vec{h})\\},g(e_{i})^{-n_{i}}]\pmod{[G,G,G]}.$

Hence,

$\displaystyle\eta(g_{\vec{h}}(\vec{n}))$
$\displaystyle=\eta_{1}(g(\vec{n}))+\eta_{2}(g_{2}(\vec{n}+\vec{h}))-\eta_{2}(g_{2}(\vec{n}))$
$\displaystyle+\sum_{i=1}^{\ell}n_{i}\eta_{2}([g(e_{i}),\\{g_{\mathrm{lin}}(\vec{h})\\}])+\sum_{1\leq
i<j\leq\ell}h_{i}n_{j}\eta_{2}([g(e_{i}),g(e_{j})]).$

We will now proceed to Case 1 of the argument.

###  4.2. Case 1

Suppose first that the $s-1$-fold commutator satisfies

$\xi([G_{2},G,G,\cdots,G])=0.$

As we reduced to the case where $G_{(s)}$ is one-dimensional,
$[G_{2},G,G,\cdots,G]=0$. Applying induction for our argument requires an
understanding of vertical frequencies on $\overline{G^{\square}}$, which
requires understanding the various $t-1$-fold commutators
$[\overline{G^{\square}},\dots,\overline{G^{\square}}]$. First note that since
$\xi([G_{2},G,G,\cdots,G])=0$, it follows from Lemma 4.1 and
$G_{(s-1)}^{\triangle}$ not being central in $G^{\square}$ that
$G_{(s-1)}^{\triangle}/G_{k}^{\triangle}\neq\mathrm{Id}_{\overline{G^{\square}}}$
so $\overline{G^{\square}}$ is in fact $s-1$-step. Thus, $F_{\vec{h}}$
descends to an $s-1$-step nilsequence $\overline{F_{h}}$ on
$\overline{G^{\square}}$. By Lemma 4.1, the vertical component of
$\overline{G^{\square}}$ is $G_{(s-1)}\times_{K}G_{(s-1)}/G_{k}^{\triangle}$
where $K$ is the $s-2$-fold commutator $K=[G_{2},G,G,\cdots,G]$. This group
contains $G_{(s)}^{2}/G_{k}^{\triangle}$. We define the homomorphism
$\xi\otimes\overline{\xi}\colon G_{(s)}^{2}\to\mathbb{R}$ via
$\xi\otimes\overline{\xi}(g,g^{\prime}):=\xi(g)-\xi(g^{\prime})$; since
$\xi\otimes\overline{\xi}$ annihilates $G_{k}^{\triangle}\cap
G_{(s)}^{2}=G_{(s)}^{\triangle}$, (and abusing notation) this descends to a
homomorphism $\xi\otimes\overline{\xi}\colon
G_{(s)}^{2}/G_{k}^{\triangle}\to\mathbb{R}$. In addition, note that
$\xi\otimes\overline{\xi}((\Gamma\cap
G_{(s)})^{2}/G_{k}^{\triangle})\subseteq\mathbb{Z}$.

Observe that $\overline{F_{\vec{h}}}$ is a
$G_{(s)}^{2}/G_{k}^{\triangle}$-vertical character with frequency
$\xi\otimes\overline{\xi}$. Since $\xi$ plays a crucial role in the conclusion
of Theorem 1.2, we shall wish to preserve this property even after we Fourier
expand $\overline{F_{\vec{h}}}$ into vertical characters. We do so as follows:
Fourier expanding $F_{\vec{h}}$ via Lemma A.6, we obtain

$\overline{F_{\vec{h}}}=\sum_{|\alpha|\leq
c(\delta)^{-1}}F_{\vec{h},\alpha}+O(c(\delta))$

where $F_{\vec{h},\alpha}$ are vertical characters of frequency $\alpha$. Now
integrating both sides against $\xi\otimes\overline{\xi}$, we obtain

$\int_{G_{(s)}^{2}/G_{k}^{\triangle}\Gamma}F_{\vec{h}}(g_{(s)}x)e(-\xi\otimes\overline{\xi}(g_{(s)}))dg_{(s)}=\sum_{|\alpha|\leq
c(\delta)^{-1}}\int_{G_{(s)}^{2}/G_{k}^{\triangle}\Gamma}F_{\vec{h},\alpha}(g_{(s)}x)e(-\xi\otimes\overline{\xi}(g_{(s)}))dg_{(s)}+O(c(\delta))$

We rewrite this as

$\overline{F_{\vec{h}}}=\sum_{|\beta|\leq
c(\delta)^{-1}}F_{\vec{h},\beta}+O(c(\delta))$

where $F_{\vec{h},\beta}$ has frequency $\beta$. The upshot is that
$F_{\vec{h},\beta}$ has frequency $\xi\otimes\overline{\xi}$ on
$G_{(s)}^{2}/G_{k}^{\triangle}$, so (abusively) lifting $\beta$ to
$G_{(s-1)}\times_{K}G_{(s-1)}$,
$(\beta-\xi\otimes\overline{\xi})(G_{(s)}^{2})=0$. Thus, by the Pigeonhole
principle, we may assume that $\overline{F_{\vec{h}}}=F_{\vec{h},\beta}$ and
by Pigeonholing in $h$, we may assume that $\beta$ is $h$-independent.

Let $\overline{g_{\vec{h}}}$ denote the projection of $g_{\vec{h}}$ to
$\overline{G^{\square}}$. By our induction hypothesis and Pigeonholing in
$\vec{h}$, there exists horizontal characters (independent of $\vec{h}$)
$\eta_{1},\dots,\eta_{t}$ such that

$\|\eta_{i}\circ\overline{g_{\vec{h}}}\|_{C^{\infty}[\vec{N}]}\leq
c(\delta)^{-1}$

and that the subgroup
$H:=\bigcap_{i=1}^{t}\mathrm{ker}(\eta_{i})\subseteq\overline{G^{\square}}$
satisfies $\beta([H,H,\dots,H])=0$ where there are $s-1$ copies of $H$.
Abusing notation, we may lift $\eta_{i}$ to a horizontal character on
$G^{\square}$ which annihilates $G_{k}^{\triangle}$ so that

$\|\eta_{i}\circ g_{\vec{h}}\|_{C^{\infty}[\vec{N}]}\leq c(\delta)^{-1}$

Replacing $H$ with $HG_{k}^{\triangle}$, we see since $\eta_{i}$ annihilates
$G_{k}^{\triangle}$ that (abusing notation)
$H=\bigcap_{i=1}^{t}\mathrm{ker}(\eta_{i})\subseteq G^{\square}$ and that
$\beta([H,H,\dots,H])=0$. Here, we would like to emphasize for the sake of
clarity that as written, $\beta$ is a character on
$G_{(s-1)}\times_{K}G_{(s-1)}$ that annihilates $G_{k}^{\triangle}$. Thus, if
$\overline{a}\in\overline{G^{\square}}$, $\beta(\overline{a})$ is defined by
lifting $\overline{a}$ to $a$ in $G_{(s-1)}\times_{K}G_{(s-1)}$ and then
evaluating $\beta$ on $a$. In addition, if
$\overline{a}_{1},\dots,\overline{a}_{s-1}\in H$ lifts to
$a_{1},\dots,a_{s-1}$ in $G_{(s-1)}\times_{K}G_{(s-1)}$, then
$[\overline{a}_{1},\dots,\overline{a}_{s-1}]\equiv[a_{1},\dots,a_{s-1}]\pmod{G_{k}^{\triangle}}$.

By Lemma A.3, we may write
$\eta_{i}(g^{\prime},g)=\eta_{i}^{1}(g)+\eta_{i}^{2}(g^{\prime}g^{-1})$ where
$\eta_{i}^{1}$ is a horizontal character on $G$ which annihilates $G_{k}$ and
$\eta_{i}^{2}$ is a horizontal character on $G_{2}$ which annihilates
$[G_{2},G]$; by Lemma A.3, both horizontal characters are size at most
$c(\delta)^{-1}$. We have from the above procedure that

$\displaystyle\eta_{i}(g(\vec{n}))$
$\displaystyle=\eta_{i}^{1}(g(\vec{n}))+\eta_{i}^{2}(g_{2}(\vec{n}+\vec{h}))-\eta_{i}^{2}(g_{2}(\vec{n}))$
$\displaystyle+\sum_{j}n_{j}\eta_{i}^{2}([g(e_{j}),\\{g_{\mathrm{lin}}(\vec{h})\\}])+\sum_{1\leq
i<j\leq\ell}h_{i}n_{j}\eta_{i}^{2}([g(e_{i}),g(e_{j})]).$

Let

$P(\vec{n})=\eta_{i}^{1}(g(\vec{n})),\text{
}Q(\vec{n})=\eta_{i}^{2}(g_{2}(\vec{n}))$

and $\sigma\colon[\vec{N}]^{\ell}\to\mathbb{R}^{\ell}$ be defined via

$\sigma(\vec{h})\cdot\vec{n}=\sum_{j}n_{j}\eta_{i}^{2}([g(e_{j}),\\{g_{\mathrm{lin}}(\vec{h})\\}])+\sum_{1\leq
i<j\leq\ell}h_{i}n_{j}\eta_{i}^{2}([g(e_{i}),g(e_{j})]).$

Applying Lemma 4.2 (and possibly scaling $\eta_{i}$ by a nonzero integer
bounded by $c(\delta)^{-1}$) with this choice of $P,Q,\sigma$ gives for some
$\gamma=(\gamma_{ij})_{i,j=1}^{\ell}\in\mathbb{R}^{\ell^{2}}$ and
$\beta\in\mathbb{R}^{\ell}$ that

$\left\|\beta\cdot\vec{n}+\sum_{j}n_{j}\eta_{i}^{2}([g(e_{j}),\\{g_{\mathrm{lin}}(\vec{h})\\}])+\sum_{i,j\in[\ell]}\gamma_{ij}n_{i}h_{j}\right\|_{C^{\infty}[\vec{N}]}\leq
c(\delta)^{-1}.$

Let $\alpha$ be the first $d-d_{2}$ coordinates
$\psi(g_{\mathrm{lin}}(\vec{h}))$ and $a$ the unique vector in
$(\mathbb{R}^{d-d_{2}})^{\ell}$ that represents
$(\eta_{i}^{2}([g(e_{j}),\cdot]))_{j=1}^{\ell}$. By Lemma B.2 and Lemma B.1,
we see that $|a|\leq c(\delta)^{-1}$. In addition, note that
$\eta([\cdot,\cdot])$ descends to a map which only depends on the first
$d-d_{2}$ Mal’cev coordinates of its arguments. Thus, we may apply Corollary
3.1 to this choice of $a$, $\alpha$, $\beta$, and $\gamma$, obtaining linearly
independent horizontal characters $x_{1,i},\dots,x_{r_{i},i}$ which annihilate
$G_{2}$ and orthogonal elements to each of the independent horizontal
characters $y_{1,i},\dots,y_{d-d_{2}-r_{i},i}\in\Gamma/(G_{2}\cap\Gamma)$ all
of size at most $c(\delta)^{-1}$ such that for each $i,j$,

$\|x_{j,i}\circ g\|_{C^{\infty}[\vec{N}]}\leq c(\delta)^{-1}$
$\|\eta_{i}^{2}([y_{j,i},g])\|_{C^{\infty}[\vec{N}]}\leq c(\delta)^{-1}.$

Let $\pi\colon\overline{G^{\square}}\to G/G_{2}$ be the projection map
$(g^{\prime},g)\mapsto g\pmod{G_{2}}$ and $V=\pi(H)$. Then since $H$ is
$c(\delta)^{-1}$-rational, $V$ can be spanned by $c(\delta)^{-1}$-rational
vectors with respect to the basis $(\bar{X}_{1},\dots,\bar{X}_{d-d_{2}})$
(with $X\mapsto\bar{X}$ being the map from
$\mathfrak{g}\to\mathfrak{g}/\mathfrak{g}_{2}$). By Cramer’s rule (Lemma A.7
and Lemma A.8), there exists linearly independent horizontal characters
$z_{1},\dots,z_{u}$ of size at most $c(\delta)^{-1}$ that annihilate $G_{2}$
such that $V=\\{x\in G_{1}/G_{2}:z_{i}(x)=0\text{ for all }i\in[u]\\}$. Each
$z_{i}$ lifts to a horizontal character $\tilde{z_{i}}$ of size at most
$c(\delta)^{-1}$ on $G^{\square}$ that annihilates $G_{2}^{2}$ via
$\tilde{z_{i}}(g^{\prime},g)=z_{i}(g)$. Note that for these lifted characters
that $\tilde{z_{i}}(H)=z_{i}(\pi(H))=0$. Thus $\tilde{z_{i}}$ is a
$c(\delta)^{-1}$-rational combination of the $\eta_{j}$’s (as $H$ is defined
as the joint kernel of $\eta_{j}$’s) and hence possibly scaling $z_{i}$ by an
appropriate integer $q\leq c(\delta)^{-1}$,

$\|z_{i}\circ g\|_{C^{\infty}[\vec{N}]}\leq c(\delta)^{-1}.$

We now let

$H^{\prime}=\\{g\in G:x_{j,i}\circ g=0,\eta_{i}^{2}([y_{j,i},g])=0,z_{m}\circ
g=0\text{ for all }i,j,m\\}.$

Then $H^{\prime}$ is a $c(\delta)^{-1}$-rational subgroup of $G$, and invoking
Lemma A.1 on $g$, we may write $g=\varepsilon g_{1}\gamma$ with $\varepsilon$
$(c(\delta)^{-1},\vec{N})$-smooth, $\gamma$ $c(\delta)^{-1}$-rational, and
$g_{1}$ a polynomial sequence on $H^{\prime}$ with the filtration
$H_{i}^{\prime}=G_{i}\cap H^{\prime}$. It remains to check that the $s-1$-fold
commutator

$\xi([H^{\prime},\dots,H^{\prime}])=0.$

Let $W=H^{\prime}/G_{2}$. By Lemma 4.1, we have that $\xi([W,W,\dots,W])$ is
well-defined and

$\xi([H^{\prime},\dots,H^{\prime}])=\xi([W,W,\dots,W]).$

So it suffices to show that $\xi([W,W,\dots,W])=0$. Let $a_{1},\dots,a_{s}\in
H^{\prime}$ and denote $\overline{a}_{i}=a_{i}\pmod{G_{2}}$. First note that
$(\mathrm{id}_{G},[a_{1},a_{2}])$ lies inside $H$. This is because

$\eta_{i}((\mathrm{id}_{G},[a_{1},a_{2}]))=\eta_{i}^{1}([a_{1},a_{2}])-\eta_{i}^{2}([a_{1},a_{2}])=-\eta_{i}^{2}([a_{1},a_{2}])=0$

for each $i$. To see this, note that $\overline{a_{1}}$ can be spanned by the
elements $y_{j,i}\pmod{G_{2}}$, since it is orthogonal to all $x_{j,i}$, and
then we use $\eta_{i}^{2}([y_{j,i},a_{2}])=0$.

Next note, denoting
$\overline{a_{i}}^{\triangle}=(\overline{a_{i}},\overline{a_{i}})$, that
$\overline{a_{3}}^{\triangle},\dots,\overline{a_{s}}^{\triangle}$ lie inside
$H/G_{2}^{2}$. This is because $a_{i}$ lies inside $V$. Thus, there exists
elements $\tilde{a_{i}}\in H$ such that
$\tilde{a_{i}}=a_{i}^{\triangle}\pmod{G_{2}^{2}}$, and

$\beta([(\mathrm{id}_{G},[a_{1},a_{2}]),\tilde{a}_{3},\dots,\tilde{a}_{s-2}])=0.$

By Lemma 4.1, we see that the commutator
$[(\mathrm{id}_{G},[a_{1},a_{2}]),a_{3}^{\triangle},a_{4}^{\triangle},\dots,a_{s}^{\triangle}]$
is invariant under multiplying $a_{i}^{\triangle}$ by an element of
$G_{2}^{2}$. Since $\tilde{a}_{i}\equiv a_{i}^{\triangle}\pmod{G_{2}^{2}}$, we
have that

$\beta([(\mathrm{id}_{G},[a_{1},a_{2}]),[\tilde{a}_{3},\dots,\tilde{a}_{s}]])=\beta((\mathrm{id}_{G},[a_{1},\dots,a_{s}]))=-\xi([a_{1},\dots,a_{s}])$

where in the last equality we used that
$(\beta-\xi\otimes\overline{\xi})(G_{(s)}^{2})=0$. Hence,
$\xi([a_{1},\dots,a_{s}])=0$, completing the proof that $\xi([W,W,\dots,W])=0$
and Case 1 of the argument.

###  4.3. Case 2

Now suppose that we have

$\xi([G_{2},G,G,\dots,G])\neq 0.$

Our goal is to reduce to Case 1. To be precise, the induction on $s$ proceeds
by handling first Case 1 and only then Case 2. In this case, while
$\overline{G^{\square}}$ is no longer $s-1$-step, $F_{\vec{h}}$ is invariant
under the action of $(G\times_{G_{2}}G)_{k}=G_{k}^{\triangle}$ and
$F_{\vec{h}}(g_{\vec{h}}(n)\Gamma)$ descends to a degree $k-1$ nilsequence on
$\overline{G^{\square}}/\overline{\Gamma^{\square}}$. Here, we define
$\Gamma^{\square}=\Gamma\times_{G_{2}}\Gamma$ and
$\overline{\Gamma^{\square}}=\Gamma\times_{G_{2}}\Gamma/G_{k}^{\triangle}$. By
Lemma 4.1, the vertical component of $\overline{G^{\square}}$ is
$(G_{(s)}\times_{K}G_{(s)})/G_{k}^{\triangle}$ where $K$ is the $s-1$-fold
commutator $[G_{2},G,\dots,G]$, so $F_{\vec{h}}$ is a vertical character on
$G^{\square}$ of frequency $\xi\otimes\overline{\xi}$ where we define
$\xi\otimes\overline{\xi}(g,g^{\prime})=\xi(g)-\xi(g^{\prime})$; this
horizontal character on $G_{(s)}\times_{K}G_{(s)}$ descends to a character on
$(G_{(s)}\times_{K}G_{(s)})/G_{k}^{\triangle}$ since
$\xi\otimes\overline{\xi}(G^{\triangle}_{(s)})=0$.

Now let

$\overline{g_{\vec{h}}}=g_{\vec{h}}\pmod{G_{k}^{\triangle}}.$

By induction on $k$ and pigeonholing in $\vec{h}$, and applying Lemma A.1, we
have

$\overline{g_{\vec{h}}}=\varepsilon_{\vec{h}}g_{\vec{h}}^{\prime}\gamma_{\vec{h}}$

where $\varepsilon_{\vec{h}}$ is $(c(\delta)^{-1},\vec{N})$-smooth,
$\gamma_{\vec{h}}$ is $c(\delta)^{-1}$-rational, and $g_{\vec{h}}^{\prime}$
lies in a subgroup $H$ of $\overline{G^{\square}}$ with the $s-1$-fold
commutator $\xi\otimes\overline{\xi}([H,H,\dots,H])=0$.222We would like to
emphasize once again that as written, for $\overline{a}\in
G_{(s)}\times_{K}G_{(s)}/G_{k}^{\triangle}$,
$\xi\otimes\overline{\xi}(\overline{a})$ is evaluated by first lifting
$\overline{a}$ to some $a\in G_{(s)}\times_{K}G_{(s)}$. In addition, if
$\overline{a_{1}},\dots,\overline{a_{s}}\in\overline{G^{\square}}$ lifts to
$a_{1},\dots,a_{s}\in G^{\square}$, then
$[\overline{a}_{1},\dots,\overline{a}_{s}]=[a_{1},\dots,a_{s}]\pmod{G_{k}^{\triangle}}$.
Note here that we may Pigeonhole in $\vec{h}$ to make $H$ independent of
$\vec{h}$. Pigeonholing $\vec{h}$ in the rationality of $\gamma_{\vec{h}}$, we
may also assume that each $\gamma_{\vec{h}}$ is a fixed rationality of height
at most $c(\delta)^{-1}$.

Let
$\pi\colon\overline{G^{\square}}\to\overline{G^{\square}}/[G,G]^{2}=G^{\square}/[G,G]^{2}G_{k}^{\triangle}$
denote the projection map and let $V=\pi(H)$. Since $H$ is
$c(\delta)^{-1}$-rational, it follows that $V$ is $c(\delta)^{-1}$-rational
with respect to a spanning subset of the projection of the Mal’cev basis of
$G^{\square}/[G,G]^{2}G_{k}^{\triangle}$. Hence, by Cramer’s rule (Lemma A.7
and Lemma A.8), there exists linearly independent horizontal characters
$\eta_{1},\dots,\eta_{t}$ on $G^{\square}$ which annihilate
$[G,G]^{2}G_{k}^{\triangle}$ and are size at most $c(\delta)^{-1}$ such that

$V=\\{g\in G^{\square}\pmod{[G,G]^{2}G_{k}^{\triangle}}:\eta_{i}(g)=0\text{
for all }i\in[t]\\}.$

Here, we are abusively descending $\eta_{i}$ to
$G^{\square}/[G,G]^{2}G_{k}^{\triangle}$. We now define

$W=\\{g\in G^{\square}\pmod{[G,G]^{2}}:\eta_{i}(g)=0\text{ for all
}i\in[t]\\}.$

A key claim is that the $s-1$-fold commutator

$\xi\otimes\overline{\xi}([W,W,\dots,W])$

vanishes. To prove this, note that each coordinate of the commutator
$[\cdot,\cdot,\dots,\cdot]$ is invariant under multiplying by an element of
$G_{k}^{\triangle}$. Thus, this repeated commutator map descends to a map on
$W/G_{k}^{\triangle}$. However, each element $g\in W/G_{k}^{\triangle}$
satisfies $\eta_{i}(g)=0$, so $\pi(g)$ belongs to $V$. As
$\xi\otimes\overline{\xi}([V,V,\dots,V])=0$, it follows that
$\xi\otimes\overline{\xi}([W,W,W,\dots,W])=0$.

Now, by scaling each $\eta_{i}$ by some integer $q\leq c(\delta)^{-1}$, we
have

$\|\eta_{i}\circ g_{\vec{h}}\|_{C^{\infty}[\vec{N}]}\leq c(\delta)^{-1}.$

Decomposing
$\eta_{i}(g^{\prime},g)=\eta_{i}^{1}(g)+\eta_{i}^{2}(g^{\prime}g^{-1})$, and
using the fact that $\eta_{i}$ annihilates $[G,G]^{2}$ we see using the
earlier expansion of $\eta_{i}(g_{\vec{h}})$ that

$\eta_{i}(g_{\vec{h}}(\vec{n}))=\eta_{i}^{1}(g(\vec{n}))+\eta_{i}^{2}(g_{2}(\vec{n}+\vec{h}))-\eta_{i}^{2}(g_{2}(\vec{n})).$

Thus, applying Lemma 4.2 to $\eta_{i}^{1}\circ g=P$, $\eta_{i}^{2}\circ
g_{2}=Q$, and $\sigma$ identically zero for each $i$ and scaling up $\eta_{i}$
appropriately, we have (possibly scaling $\eta_{i}$ by a nonzero integer
bounded by $c(\delta)^{-1}$) that

$\|\eta_{i}^{1}\circ g\|_{C^{\infty}[\vec{N}]},\|\eta_{i}^{2}\circ
g_{2}\|_{C^{\infty}[\vec{N}]}\leq c(\delta)^{-1}.$

We now define

$\displaystyle\tilde{G}$ $\displaystyle=\\{g\in G:\eta_{i}^{1}(g)=0\text{ for
all }1\leq i\leq t\\}$ $\displaystyle\tilde{G}_{2}$
$\displaystyle=\\{g\in\tilde{G}\cap G_{2}:\eta_{i}^{2}(g)=0\text{ for all
}1\leq i\leq t\\}$

First note that $[\tilde{G},\tilde{G}]\subseteq\tilde{G}_{2}$. This is because
$\eta_{i}^{2}$ vanishes on $[G,G]$ so it vanishes on $[\tilde{G},\tilde{G}]$.
We claim that the following $s-1$-fold commutator identity holds:

$\xi([\tilde{G_{2}},\tilde{G},\dots,\tilde{G}])=0.$

It suffices to show that for any $y\in\tilde{G}_{2}$ and $x_{1},\dots,x_{s-1}$
be inside $\tilde{G}$,

$\xi([y,x_{1},\dots,x_{s-1}])=0.$

Let $\pi^{\prime}\colon G\to G/[G,G]$. Note that both
$(\pi^{\prime}(y),\mathrm{id}_{G})$ and
$(\pi^{\prime}(x_{j}),\pi^{\prime}(x_{j}))$ lie inside $W$. This is because
for each $i$,
$\eta_{i}((\pi^{\prime}(y),\mathrm{id}_{G}))=\eta_{i}((\pi^{\prime}(x_{j}),\pi^{\prime}(x_{j})))=0$
since
$\eta_{i}((\pi^{\prime}(y),\mathrm{id}_{G}))=\eta_{i}^{2}(\pi^{\prime}(y))=0$
and
$\eta_{i}(\pi^{\prime}(x_{j}),\pi^{\prime}(x_{j}))=\eta_{i}^{1}(\pi^{\prime}(x_{j}))=0$.
Thus as $\xi\otimes\overline{\xi}([W,W,\dots,W])=0$, we have

$\displaystyle 0$
$\displaystyle=\xi\otimes\overline{\xi}([(\pi^{\prime}(y),\mathrm{id}_{G}),(\pi^{\prime}(x_{1}),\pi^{\prime}(x_{1})),\dots,(\pi^{\prime}(x_{s-1}),\pi^{\prime}(x_{s-1}))])$
$\displaystyle=\xi\otimes\overline{\xi}([(y,\mathrm{id}_{G}),(x_{1},x_{1}),\dots,(x_{s-1},x_{s-1})])$
$\displaystyle=\xi([y,x_{1},\dots,x_{s-1}]).$

Now using Lemma A.1, we may write
$g(\vec{n})=\varepsilon^{\prime}(\vec{n})g^{\prime}(\vec{n})\gamma^{\prime}(\vec{n})$
where $\varepsilon^{\prime}$ is $(c(\delta)^{-1},\vec{N})$-smooth,
$\gamma^{\prime}$ is $c(\delta)^{-1}$-rational, and
$g^{\prime}\in\mathrm{poly}(\mathbb{Z}^{\ell},G^{\prime})$ with the filtration
$(G^{\prime})_{i}=\tilde{G}\cap G_{i}$. We thus have
$g^{\prime}(\vec{n})=\varepsilon^{\prime}(\vec{n)}^{-1}g(\vec{n})\gamma^{\prime}(\vec{n})^{-1}$.
Since $\psi_{\mathrm{horiz}}$ is a homomorphism and $G/G_{(2)}$ is abelian, we
have

$g_{\mathrm{lin}}^{\prime}(\vec{n})\equiv\varepsilon_{\mathrm{lin}}^{\prime}(\vec{n})^{-1}g_{\mathrm{lin}}(\vec{n})\gamma_{\mathrm{lin}}^{\prime}(\vec{n})^{-1}\pmod{[G,G]}.$

Hence

$g_{2}^{\prime}(\vec{n})\equiv\varepsilon_{2}^{\prime}(\vec{n})^{-1}g_{2}(\vec{n})\gamma_{2}^{\prime}(\vec{n})^{-1}\pmod{[G,G]}.$

Since $\eta_{i}^{2}$ annihilates $[G,G]$, by scaling $\eta_{i}^{2}$ up by an
appropriate integer $q\leq c(\delta)^{-1}$, we have that

$\|\eta_{i}^{2}\circ g_{2}^{\prime}\|_{C^{\infty}[\vec{N}]}\leq
c(\delta)^{-1}.$

Hence, by Lemma A.2, we may write

$g^{\prime}(\vec{n})=\varepsilon^{*}(\vec{n})g_{1}(\vec{n})\gamma^{*}(\vec{n})$

$\varepsilon^{*}$ is $(c(\delta)^{-1},\vec{N})$-smooth, $\gamma^{*}$ is
$c(\delta)^{-1}$-rational, and
$g_{1}\in\mathrm{poly}(\mathbb{Z}^{\ell},\tilde{G})$ with the filtration
$\tilde{G}_{i}=\tilde{G}_{2}\cap G_{i}$ for $i\geq 2$. Letting
$\varepsilon=\varepsilon^{\prime}\varepsilon^{*}$ and
$\gamma=\gamma^{\prime}\gamma^{*}$, we have

$g(\vec{n})=\varepsilon(\vec{n})g_{1}(\vec{n})\gamma(\vec{n})$

where by Lemma B.13, $\gamma$ is $c(\delta)^{-1}$-rational. To show that
$\varepsilon$ is smooth, we have from Lemma B.2 that
$d(\varepsilon(0),\mathrm{id}_{G})\leq c(\delta)^{-1}$. In addition, by right
invariance , we have

$d(\varepsilon(\vec{n}),\varepsilon(\vec{n}+e_{i}))=d(\varepsilon^{\prime}(\vec{n}),\varepsilon^{\prime}(\vec{n}+e_{i})\varepsilon^{*}(\vec{n}+e_{i})\varepsilon^{*}(\vec{n})^{-1})$

so by Lemma B.4 and Lemma B.3 and since
$d(\varepsilon^{\prime}(\vec{n}+e_{i}),\mathrm{id}_{G})\leq c(\delta)^{-1}$ by
smoothness, we have

$\displaystyle
d(\varepsilon^{\prime}(\vec{n}),\varepsilon^{\prime}(\vec{n}+e_{i})\varepsilon^{*}(\vec{n}+e_{i})\varepsilon^{*}(\vec{n})^{-1})$
$\displaystyle\leq
d(\varepsilon^{\prime}(\vec{n}+e_{i})^{-1}\varepsilon^{\prime}(\vec{n}),\varepsilon^{*}(\vec{n}+e_{i})\varepsilon^{*}(\vec{n})^{-1})$
$\displaystyle\leq
c(\delta)^{-1}(|\psi(\varepsilon^{\prime}(\vec{n}+e_{i})^{-1}\varepsilon^{\prime}(\vec{n}))|+|\psi(\varepsilon^{*}(\vec{n}+e_{i})\varepsilon^{*}(\vec{n})^{-1})|)$
$\displaystyle\leq\frac{c(\delta)^{-1}}{N_{i}}.$

Hence, $\varepsilon$ is $(c(\delta)^{-1},\vec{N})$-smooth.

Let $P$ be the period of $\gamma$. By Lemma B.14, we have $P\leq
c(\delta)^{-1}$. Since $\varepsilon$ is $(c(\delta)^{-1},\vec{N})$-smooth, on
subprogressions $P\cdot[\vec{N^{\prime}}]+r$ of $[\vec{N}]$ with common
difference $P\leq c(\delta)^{-1}$ and size $c(\delta)|[\vec{N}]|$, we may
approximate
$F(\varepsilon(P\cdot\vec{n}+r)g_{1}(P\cdot\vec{n}+r)\gamma(P\cdot\vec{n}+r)\Gamma)$
with $F(\varepsilon_{0}g_{1}(P\cdot\vec{n}+r)\gamma_{0}\Gamma)$ for some
elements $\varepsilon_{0},\gamma_{0}$ of $G$. Define
$\tilde{F}(\cdot):=F(\epsilon_{0}\\{\gamma_{0}\\}\cdot)$. We see that
$\tilde{F}$ is a vertical character with frequency $\xi$ and

$F(\varepsilon_{0}g_{1}(P\cdot\vec{n}+r)\gamma_{0}\Gamma)=\tilde{F}(\\{\gamma_{0}\\}^{-1}g_{1}(P\cdot\vec{n}+r)\\{\gamma_{0}\\}\Gamma).$

Since $g_{1}$ is a polynomial sequence with respect to the filtration on
$\tilde{G}$, the same holds for $g_{1}(P\cdot\vec{n}+r)$. In addition, since
$[G,G]\subseteq\tilde{G}_{2}$, we see that $\tilde{G}_{i}$ is normal in $G$
and thus $\\{\gamma_{0}\\}^{-1}g_{1}(P\cdot\vec{n}+r)\\{\gamma_{0}\\}$ also
defines a polynomial sequence in $\mathrm{poly}(\mathbb{Z}^{\ell},\tilde{G})$.

Pigeonholing in a subprogression of common difference $P$ and length
$c(\delta)|\vec{N}|$ and pplying Case 1 and Lemma A.1 to
$\\{\gamma_{0}\\}^{-1}g_{1}(P\cdot\vec{n}+r)\\{\gamma_{0}\\}$, we obtain a
factorization
$\\{\gamma_{0}\\}^{-1}g_{1}(P\cdot\vec{n}+r)\\{\gamma_{0}\\}=\varepsilon^{\prime}(\vec{n})g_{1}^{\prime}(\vec{n})\gamma^{\prime}(\vec{n})$
with $\varepsilon^{\prime}$ $(c(\delta)^{-1},\vec{N})$-smooth,
$\gamma^{\prime}$ $c(\delta)^{-1}$-rational, and
$g_{1}^{\prime}\in\mathrm{poly}(\mathbb{Z}^{\ell},H)$ where $H$ is at most
$s-1$-step. Since $H$ is $c(\delta)^{-1}$-rational in $\tilde{G}$, it is
$c(\delta)^{-1}$-rational in $G$. Applying Lemma A.9 to $H$, we obtain
horizontal characters $\alpha_{1},\dots,\alpha_{r}$ on $G$ such that for each
$j\in\\{1,\dots,r\\}$,

$\|\alpha_{j}\circ g_{1}^{\prime}\|_{C^{\infty}[\vec{N}^{\prime}]}=0$

and thus

$\|\alpha_{j}\circ g_{1}^{\prime}\|_{C^{\infty}[\vec{N}]}=0$

where $P\cdot[\vec{N}^{\prime}]+r$ was the subprogression that we Pigeonholed
to and for any $\beta_{1},\dots,\beta_{s}$ orthogonal to
$\alpha_{1},\dots,\alpha_{r}$, we have

$\xi([\beta_{1},\dots,\beta_{s}])=0.$

From Lemma A.12, there exists some nonzero integer $|q|\leq c(\delta)^{-1}$
such that

$\|q\alpha_{i}\circ g_{1}\|_{C^{\infty}[\vec{N}]}\leq c(\delta)^{-1}$

and thus for some nonzero integer $|q^{\prime}|\leq c(\delta)^{-1}$

$\|q^{\prime}\alpha_{i}\circ g\|_{C^{\infty}[\vec{N}]}\leq c(\delta)^{-1}$

which proves the desired result. This completes the proof of Theorem 1.2.

##  5\. Application to linear equations in primes

In this section, we deduce Theorem 3. Our proof follows [23, 31] closely and
we will be brief with details. Define $\mu_{\mathrm{Siegel}}$ and
$\Lambda_{\mathrm{Siegel}}$ as follows: let $\beta$ be a possible Siegel zero
of level $Q=\exp(\log^{1/10}(N))$ with conductor $q_{\mathrm{Siegel}}\leq Q$.
We let

$P(Q):=\prod_{\begin{subarray}{c}p<Q\\\ p\text{ prime}\end{subarray}}p,$

$\chi_{\mathrm{Siegel}}$ is the character for the Siegel zero $\beta$, and

$\displaystyle\alpha$
$\displaystyle:=\frac{1}{L^{\prime}(\beta,\chi_{\mathrm{Siegel}})}\prod_{p<Q}\left(1-\frac{1}{p}\right)^{-1}\left(1-\frac{\chi_{\mathrm{Siegel}}(n)}{p^{\beta}}\right)^{-1}$
$\displaystyle\mu_{\mathrm{Siegel}}$
$\displaystyle:=(1_{n|P(Q)}\mu(n))*(\alpha
n^{\beta-1}\chi_{\mathrm{Siegel}}(n)1_{(n,P(Q))=1})$
$\displaystyle\Lambda_{Q}$
$\displaystyle:=\frac{P(Q)}{\phi(P(Q))}1_{(n,P(Q))=1}$
$\displaystyle\Lambda_{\mathrm{Siegel}}$
$\displaystyle:=\Lambda_{Q}(1-n^{\beta-1}\chi_{\mathrm{Siegel}}(n)).$

Our main estimate is the following; the reader can find the definition and
basic properties of the $U^{s+1}[N]$ norm in [30, Chapter 1.3].

######  Theorem 5.

There exists some real $c_{s}>0$ such that

$\|\mu-\mu_{\mathrm{Siegel}}\|_{U^{s+1}([N])}\ll\exp(-\log(N)^{c_{s}})$
$\|\Lambda-\Lambda_{\mathrm{Siegel}}\|_{U^{s+1}([N])}\ll\exp(-\log(N)^{c_{s}}).$

We remark that as in [31], the bounds in Theorem 5 are effective. We will
defer the proof of Theorem 5 and Theorem 3 in Section 5.3. In order to prove
Theorem 5, we record [31, Proposition 7.2] below, which states we may
decompose $\mu$, $\Lambda$, $\mu_{\mathrm{Siegel}}$,
$\Lambda_{\mathrm{Siegel}}$, and $\Lambda_{Q}$ into type I, twisted type I,
and type II sums.

######  Definition 5.1.

We say a sequence $a_{d}$ is divisor-bounded if there exists some $k$ such
that $a_{d}\ll\tau(d)^{k}\log(N)^{k}$ where $\tau(d)$ is the sum of the
divisors of $d$.

######  Lemma 5.1.

Any of the five functions
$\mu,\mu_{\mathrm{Siegel}},\Lambda,\Lambda_{\mathrm{Siegel}},\Lambda_{Q}$ on
$[N]$ can be expressed as a convex linear combination of functions of one of
the following four classes (with uniform constants in the bounds).

  * (i)

(Type I sum) A function of the form

$n\mapsto\sum_{d\leq N^{2/3}}a_{d}1_{d|n}1_{[N^{\prime}]}(n)$

where the coefficients $a_{d}$ are divisor-bounded and $1\leq N^{\prime}\leq
N$.

  * (ii)

(Twisted type I sum) A function of the form

$n\mapsto\sum_{d\leq
N^{2/3}}a_{d}1_{d|n}\chi_{\mathrm{Siegel}}(n/d)1_{[N^{\prime}]}(n)$

where the coefficients $a_{d}$ are divisor-bounded and $1\leq N^{\prime}\leq
N$.

  * (iii)

(Type II sum) A function of the form

$n\mapsto\sum_{d,w>N^{1/3}}a_{d}b_{w}1_{dw=n}$

for some divisor-bounded coefficients $a_{d},b_{w}$.

  * (iv)

(Negligible sum) A divisor-bounded function $n\mapsto f(n)$ with

$\sum_{n\in[N]}|f(n)|\ll N\exp(-\log^{1/2}(N)).$

Thus, to study the correlation between a nilsequence with
$\mu,\mu_{\mathrm{Siegel}},\Lambda,$ or $\Lambda_{\mathrm{Siegel}}$, it
suffices to study the correlation of the nilsequence with a type I, twisted
type I, and a type II sum. The advantage of working with these sums is evident
in the following.

######  Proposition 5.1.

Let $g(n)$ be a type I sum, $g_{1}(n)$ be a twisted type I sum and $g_{2}(n)$
be a type II sum. Suppose $f\colon[N]\to\mathbb{C}$ is a one-bounded function
and $\delta\in(0,1/10)$.

  * •

Suppose $\left|\sum_{n\in[N]}f(n)g(n)\right|\geq\delta N$. Then there exists
$c>0$ such that if $\delta\gg\exp(-c\log^{1/3}(N))$, then exists
$N^{\prime}\leq N$, $L\leq N^{2/3}$ such that for $\delta\log^{-O(1)}(N)L$
many $\ell\in[L/2,L]$,

$\left|\sum_{n\in[N^{\prime}/\ell]}f(\ell n)\right|\geq\frac{\delta
N}{L\log^{O(1)}(N)}.$

  * •

Suppose $\left|\sum_{n\in[N]}f(n)g_{1}(n)\right|\geq\delta N$. Then there
exists some $c>0$ such that if $\delta\gg\exp(-c\log^{1/3}(N))$
$N^{\prime}\leq N$, $L\leq N^{2/3}$ then for $\delta\log^{-O(1)}(N)L$ many
$\ell\in[L/2,L]$,

$\left|\sum_{n\in[N^{\prime}/\ell]}f(\ell
n)\chi_{\mathrm{Siegel}}(n)\right|\geq\frac{\delta N}{L\log^{O(1)}(N)}.$

  * •

Suppose $\left|\sum_{n\in[\delta N,N]}f(n)g_{2}(n)\right|\geq\delta N$. Then
there exists some $c>0$ such that if $\delta\gg\exp(-c\log^{1/3}(N))$ and
$N^{1/3}\leq L\leq N^{2/3}$ and $M\in[\delta N/L,N/L]$ then

$\sum_{\ell,\ell^{\prime}\in[L/2,L]}\sum_{m,m^{\prime}\in[M/2,M]}f(dw)\overline{f(\ell^{\prime}m)f(\ell
m^{\prime})}f(\ell^{\prime}m^{\prime})\geq\frac{\delta^{O(1)}N^{2}}{\log^{O(1)}(N)}.$

This motivates us to prove estimates for type I, twisted type I, and type II
estimates, which occupy the next two subsections.

###  5.1. The type I and twisted type I case

We first record the type I and twisted type I estimates we must prove.

######  Proposition 5.2 (Type I estimate).

Let $G/\Gamma$ be a nilmanifold with dimension $d$, step $s$, degree $k$,
complexity $M$, and one-dimensional vertical component. Let $F\colon
G/\Gamma\to\mathbb{C}$ be a $1$-Lipschitz function and a vertical character
with frequency $\xi$ such that $|\xi|\leq M/\delta$. Let $P$ be an arithmetic
progression in $[N]$ and $F_{P}(g(n)\Gamma)=F(g(n)\Gamma)1_{P}(n)$. Suppose
for more than $\delta^{O(1)}L$ many $\ell\in[L/2,L]$ with $L\leq N^{1/3}$,

(5.1) $\left|\sum_{\begin{subarray}{c}n\in[\delta N,N]\\\ n\equiv
0~{}(\mathrm{mod}~{}\ell)\end{subarray}}F_{P}(g(n)\Gamma)\right|\geq\delta
N/L.$

Then there exists some $c_{k}>0$ such that if
$\delta\gg\exp(-\log^{c_{k}}(N))$, then there exists a factorization
$g(n)=\varepsilon(n)g_{1}(n)\gamma(n)$ such that $g_{1}$ lies in a
$(\delta/M)^{-O_{k}(d^{O_{k}(1)})}$-rational subgroup of $G$ whose step is
strictly smaller than the step of $G$, $\varepsilon$ is
$((\delta/M)^{-O_{k}(d^{O_{k}(1)})},N)$-smooth, and $\gamma$ is
$(\delta/M)^{-O_{k}(d^{O_{k}(1)})}$-rational.

######  Proposition 5.3 (Twisted type I estimate).

Let $G/\Gamma$ be a nilmanifold with dimension $d$, step $s$, degree $k$,
complexity $M$, and one-dimensional vertical component. Let $F\colon
G/\Gamma\to\mathbb{C}$ be a $1$-Lipschitz function and a vertical character
with frequency $\xi$ such that $|\xi|\leq M/\delta$. Let $P$ be an arithmetic
progression in $[N]$ and $F_{P}(g(n)\Gamma)=F(g(n)\Gamma)1_{P}(n)$. Suppose
for more than $\delta^{O(1)}L$ many $\ell\in[L/2,L]$ with $L\leq N^{1/3}$,

(5.2) $\left|\sum_{\begin{subarray}{c}n\in[\delta N,N]\\\ n\equiv
0~{}(\mathrm{mod}~{}\ell)\end{subarray}}\chi_{\mathrm{Siegel}}(n/d)F_{P}(g(n)\Gamma)\right|\geq\delta
N/L.$

Then there exists some $c_{k}>0$ such that if
$\delta\gg\exp(-\log^{c_{k}}(N))$ and
$q_{\mathrm{Siegel}}\leq(\delta/M)^{-O_{k}(d^{O_{k}(1)})}$, then there exists
a factorization $g(n)=\varepsilon(n)g_{1}(n)\gamma(n)$ such that $g_{1}$ lies
in a $(\delta/M)^{-O_{k}(d^{O_{k}(1)})}$-rational subgroup of $G$ whose step
is strictly smaller than the step of $G$, $\varepsilon$ is
$((\delta/M)^{-O_{k}(d^{O_{k}(1)})},N)$-smooth, and $\gamma$ is
$(\delta/M)^{-O_{k}(d^{O_{k}(1)})}$-rational.

###### Proof of Proposition 5.2 and Proposition 5.3..

First, observe we can take $|P|\geq c(\delta)N$, for otherwise, we may upper-
bound (5.1) or (5.2) by $c(\delta)N/L$, which is a contradiction to the lower
bound of $\delta N/L$.

We now prove Proposition 5.2. Write $P=q\cdot[N^{\prime}]+r$. Splitting
$[\delta N/L,N/L]$ into subprogressions of common difference $q$, we see by
the Pigeonhole principle that there exists a residue class $b$ modulo $q$ such
that for $c(\delta)L$ many $\ell\in[L/2,L]$,

$\left|\sum_{\begin{subarray}{c}m\in[\delta N/L,N/L]\\\ m\equiv
b~{}(\mathrm{mod}~{}q)\end{subarray}}1_{P}(m\ell)F(g(m\ell)\Gamma)\right|\geq\delta\frac{N}{Lq}.$

Note that since $m\ell\equiv b\ell\pmod{q}$, the indicator function of $P$ can
be dropped after restricting to a sufficiently short interval. Letting
$m=qm^{\prime}+b$, we have intervals $I_{\ell}$ of size at least
$c(\delta)N/L$ such that for at least $c(\delta)L$ many $\ell\in[L,2L]$,

$\left|\mathbb{E}_{m^{\prime}\in
I_{\ell}}F(g((qm^{\prime}+b)\ell)\Gamma)\right|\geq c(\delta).$

Let $\tilde{g}_{\ell}=g((q\cdot+b)\ell)$ define a polynomial sequence in
$\mathrm{poly}(\mathbb{Z},G)$. Applying Theorem 1.2 (and shifting $I_{\ell}$
by its least element), there exists linearly independent horizontal characters
$\eta_{1},\dots,\eta_{r}$ of size at most $c(\delta)^{-1}$ such that for
$c(\delta)L$ many elements $\ell\in[L/2,L]$, we have

$\|\eta_{i}\circ\tilde{g}_{\ell}\|_{C^{\infty}[|I_{\ell}|]}\leq
c(\delta)^{-1}$

which implies since $|I_{\ell}|\geq c(\delta)N/L$,

$\|\eta_{i}\circ\tilde{g}_{\ell}\|_{C^{\infty}[N/L]}\leq c(\delta)^{-1}.$

Furthermore, the subgroup

$G^{*}:=\\{g\in G:\eta_{i}(g)=0\text{ for all }i\\}$

has step strictly less than $s$. Now let $g_{\ell}=g(\ell\cdot)$; by Lemma
A.12, we have by scaling $\eta_{i}$ appropriately that

(5.3) $\|\eta_{i}\circ g_{\ell}\|_{C^{\infty}[N/L]}\leq c(\delta)^{-1}.$

Inequality (5.3) implies via Lemma A.10, Lemma A.11, and the fact that $L\leq
N^{1/3}$ that for some integer $q=O_{k}(1)$,

$\|q\eta_{i}\circ g\|_{C^{\infty}[N]}\leq c(\delta)^{-1}.$

By Lemma A.1, it follows that we may decompose $g=\varepsilon g_{1}\gamma$
with $g_{1}\in\mathrm{poly}(\mathbb{Z},G^{*})$ with $G^{*}$ equipped with the
filtration $G^{*}_{i}=G_{i}\cap G^{*}$.

We now turn to Proposition 5.3. We use the hypothesis of
$q_{\mathrm{Siegel}}\leq c(\delta)^{-1}$ to Pigeonhole
$\chi_{\mathrm{Siegel}}$ in a progression modulo $q_{\mathrm{Siegel}}$,
obtaining for at least $c(\delta)L$ many $\ell\in[L/2,L]$

$|\sum_{m\in[\delta N/\ell,N/\ell]}1_{m\ell\equiv
a~{}(\mathrm{mod}~{}q_{\mathrm{Siegel}})}1_{P}(m\ell)F(g(m\ell)\Gamma)|\geq
c(\delta)N/\ell$

Note that $1_{\cdot\equiv a~{}(\mathrm{mod}~{}q_{\mathrm{Siegel}})}1_{P}$ is
the indicator function of yet another progression $1_{P^{\prime}}$ with
$|P^{\prime}|\geq c(\delta)N$. Thus, we may now proceed exactly as in the
previous part. ∎

###  5.2. The type II case

We now need the following type II estimate.

######  Proposition 5.4 (Type II estimate).

Let $G/\Gamma$ be a nilmanifold with dimension $d$, step $s$, degree $k$,
complexity $M$, and one-dimensional vertical component. Let $F\colon
G/\Gamma\to\mathbb{C}$ be a $1$-Lipschitz function and vertical character with
frequency $\xi$ such that $|\xi|\leq M/\delta$. Let $P$ be an arithmetic
progression in $[N]$ and $F_{P}(g(n)\Gamma)=F(g(n)\Gamma)1_{P}(n)$. Suppose
there exists $L$ and $M$ with $N^{1/3}\leq L\leq N^{2/3}$, $\delta N\leq
LM\leq N/4$, and

(5.4) $\left|\sum_{\begin{subarray}{c}\ell,\ell^{\prime}\in[L/2,L]\\\
m,m^{\prime}\in[M/2,M]\end{subarray}}F_{P}(g(m\ell)\Gamma)F_{P}(g(m^{\prime}\ell^{\prime})\Gamma)\overline{F_{P}(g(m^{\prime}\ell)\Gamma)F_{P}(g(m\ell^{\prime})\Gamma)}\right|\geq\delta
L^{2}M^{2}.$

Then there exists some $c_{k}>0$ such that if
$\delta\gg\exp(-\log^{c_{k}}(N))$, then there exists a factorization
$g(n)=\varepsilon(n)g_{1}(n)\gamma(n)$ such that $g_{1}$ lies in a
$(\delta/M)^{-O_{k}(d^{O_{k}(1)})}$-rational subgroup of $G$ whose step is
strictly smaller than the step of $G$, $\varepsilon$ is
$((\delta/M)^{-O_{k}(d^{O_{k}(1)})},N)$-smooth, and $\gamma$ is
$(\delta/M)^{-O_{k}(d^{O_{k}(1)})}$-rational.

###### Proof.

We first prove that we can take $|P|\geq c(\delta)N$. If not, then (5.4) can
be upper bounded by $c(\delta)N^{2}$, which contradicts the lower bound of
$\delta L^{2}M^{2}$.

By hypothesis, we have

$\mathbb{E}_{\ell,\ell^{\prime}\in[L/2,L]}|\mathbb{E}_{m\in[M/2,M]}F_{P}(g(m\ell)\Gamma)\overline{F_{P}(g(m\ell^{\prime})\Gamma)}|^{2}\geq\delta.$

This implies that there exists $\delta^{O(1)}L^{2}$ many
$\ell,\ell^{\prime}\in[L,2L]$ such that

$|\mathbb{E}_{m\in[M/2,M]}F_{P}(g(m\ell)\Gamma)\overline{F_{P}(g(m\ell^{\prime})\Gamma)}|\geq\delta^{O(1)}.$

Write $P=q\cdot[N^{\prime}]+r$. By the pigeonhole principle, there exists some
residue class $b\pmod{q}$ such that for $c(\delta)L^{2}$ many
$\ell,\ell^{\prime}\in[L/2,L]$,

$|\mathbb{E}_{\begin{subarray}{c}m\in[M/2,M]\\\ m\equiv
b~{}(\mathrm{mod}~{}q)\end{subarray}}1_{P}(m\ell)1_{P}(m\ell^{\prime})F(g(m\ell)\Gamma)\overline{F(g(m\ell^{\prime})\Gamma)}|\geq\delta^{O(1)}.$

Note that since $m\ell\equiv b\ell\pmod{q}$ and $m\ell^{\prime}\equiv
b\ell^{\prime}\pmod{q}$, the indicator function of $P$ can be dropped after
restricting to a sufficiently short interval. Letting $m=qm^{\prime}+b$, we
have intervals $I_{\ell,\ell^{\prime}}$ of size at least $c(\delta)N/L$ such
that for at least $c(\delta)L^{2}$ many $\ell,\ell^{\prime}\in[L/2,L]$, we
have

$|\mathbb{E}_{m^{\prime}\in
I_{\ell,\ell^{\prime}}}F(g((pm^{\prime}+b)\ell)\Gamma)\overline{F(g((qm^{\prime}+b)\ell^{\prime})\Gamma)}|\geq
c(\delta).$

Let
$\tilde{g}_{\ell,\ell^{\prime}}(m^{\prime})=(g((qm^{\prime}+b)\ell),g((qm^{\prime}+b)\ell^{\prime}))$
be a polynomial sequence in $\mathrm{poly}(\mathbb{Z},G^{2})$.

Applying Theorem 1.2 and Lemma A.12, it follows that there exists horizontal
characters $\eta_{1},\dots,\eta_{r}$ on $G\times G$ of size at most
$c(\delta)^{-1}$ such that the subgroup $\tilde{G}_{1}:=\\{g\in
G_{1}:\eta_{j}(g)=0\text{ for all }j\\}$ has step at most $s-1$ and for those
values of $\ell,\ell^{\prime}$, we have

$\|\eta_{j}\circ\tilde{g}_{\ell,\ell^{\prime}}\|_{C^{\infty}[|I_{\ell,\ell^{\prime}}|]}\leq
c(\delta)^{-1}$

and since $|I_{\ell,\ell^{\prime}}|\geq c(\delta)N/L$,

$\|\eta_{j}\circ\tilde{g}_{\ell,\ell^{\prime}}\|_{C^{\infty}[N/L]}\leq
c(\delta)^{-1}.$

Let $g_{\ell,\ell^{\prime}}=g(\cdot\ell,\cdot\ell^{\prime})$. Applying Lemma
A.12 and scaling up $\eta_{j}$ appropriately, we thus have

$\|\eta_{j}\circ g_{\ell,\ell^{\prime}}\|_{C^{\infty}[N/L]}\leq
c(\delta)^{-1}.$

Writing $\eta_{j}(g,g^{\prime})=\eta_{j}^{0}(g)+\eta_{j}^{1}(g^{\prime})$, an
application of Lemma A.10 and Lemma A.11 gives that (upon scaling
$\eta_{j}^{i}$ appropriately)

$\|\eta_{j}^{i}\circ g\|_{C^{\infty}[N]}\leq c(\delta)^{-1}.$

We now show that the subgroup $\tilde{G}:=\\{g\in G:\eta_{j}^{i}(g)=0\text{
for all }i,j\\}$ is $\leq s-1$-step, from which the type II case would follow
from an application of Lemma A.1. We see that if $\eta_{j}^{0}$ annihilates
$w$, then $\eta_{j}$ annihilates $(w,\mathrm{id}_{G})$. Thus, since
$\tilde{G}$ is the subgroup generated by the annihilators of $\eta_{j}^{0}$,
we see that $\tilde{G}\times\mathrm{id}_{G}$ is a subgroup of the group
generated by the annihilators of $\eta_{j}$, which is $\tilde{G}_{1}$. Hence,
$\tilde{G}$ has step strictly less than $s$. ∎

###  5.3. Deducing Theorem 5 and Theorem 3

We are now ready to prove Theorem 5.

###### Proof of Theorem 5.

We will now prove Theorem 5. We work with either hypothesis

$\|\mu-\mu_{\mathrm{Siegel}}\|_{U^{s+1}([N])}\geq\delta$
$\|\Lambda-\Lambda_{\mathrm{Siegel}}\|_{U^{s+1}([N])}\geq\delta$

and optimize in $\delta$. We will assume throughout that
$\delta\leq\log(N)^{-1}$. We show that if $\delta$ is sufficiently large, then