# Spherical higher order Fourier analysis over finite fields III: a spherical
Gowers inverse theorem

Wenbo Sun  Department of Mathematics, Virginia Tech, 225 Stanger Street,
Blacksburg, VA, 24061, USA<EMAIL_ADDRESS>
###### Abstract.

This paper is the third part of the series _Spherical higher order Fourier
analysis over finite fields_ , aiming to develop the higher order Fourier
analysis method along spheres over finite fields, and to solve the geometric
Ramsey conjecture in the finite field setting.

In this paper, we prove an inverse theorem over finite field for spherical
Gowers norms, i.e. a local Gowers norm supported on a sphere. We show that if
the $(s+1)$-th spherical Gowers norm of a 1-bounded function
$f\colon\mathbb{F}_{p}^{d}\to\mathbb{C}$ is at least $\epsilon$ and if $d$ is
sufficiently large depending only on $s$, then $f$ correlates on the sphere
with a $p$-periodic $s$-step nilsequence, where the bounds for the complexity
and correlation depend only on $d$ and $\epsilon$. This result will be used in
later parts of the series to prove the geometric Ramsey conjecture in the
finite field setting.

The author was partially supported by the NSF Grant DMS-2247331

###### Contents

  1. 1 Introduction
    1. 1.1 The spherical Gowers inverse theorem
    2. 1.2 Outline of the proof
    3. 1.3 Definitions and notations
  2. 2 Background material for nilsequence
    1. 2.1 Nilmanifolds, filtrations and polynomial sequences
    2. 2.2 Partially periodic polynomial sequences
    3. 2.3 The Baker-Campbell-Hausdorff formula
    4. 2.4 Type-I horizontal torus and character
    5. 2.5 Type-II horizontal torus and character
    6. 2.6 Ratner-type theorem
    7. 2.7 Nilsequences and nilcharacters
  3. 3 Some preliminary results
    1. 3.1 The proof of $\text{SGI}(1)$
    2. 3.2 A preliminary reduction for $\text{SGI}(s)$
  4. 4 A Furstenberg-Weiss type argument
  5. 5 The sunflower lemma
  6. 6 Information on the frequencies of $\chi_{h}$
  7. 7 The construction of a degree-$(1,s)$ nilcharacter
  8. 8 The symmetric argument for $s=1$
    1. 8.1 A symmetric property for the case $s=1$
    2. 8.2 Completion of the proof of $\text{SGI}(2)$
  9. 9 The symmetric argument for $s\geq 2$
    1. 9.1 A symmetric property for the case $s\geq 2$
    2. 9.2 Calculation of the equivalence classes
    3. 9.3 Completion of the proof of $\text{SGI}(s+1)$ for $s\geq 2$
  10. A Results from previous papers
    1. A.1 Liftings of polynomials
    2. A.2 The rank of quadratic forms
    3. A.3 Some basic counting properties
    4. A.4 $M$-families and $M$-sets
    5. A.5 Fubini’s theorem for $M$-sets
    6. A.6 Intrinsic definitions for polynomials
    7. A.7 Strong factorization property for nice $M$-sets
    8. A.8 Additive combinatorial properties for $M$-ideals
  11. B Approximation properties for nilsequences
  12. C Equivalence of nilcharacters
  13. D The converse of the spherical Gowers inverse theorem

##  1\. Introduction

###  1.1. The spherical Gowers inverse theorem

This paper is the third part of the series _Spherical higher order Fourier
analysis over finite fields_ [19, 20, 21]. The purpose of this paper is to use
the tools developed in [19, 20] to prove a Gowers inverse theorem for
spherical sets. We start by recalling the definition of local Gowers norms.
For any finite set $A$ and function $f\colon A\to\mathbb{C}$, denote
$\mathbb{E}_{n\in A}f(n):=\frac{1}{|A|}\sum_{n\in A}f(n)$.

######  Definition 1.1 (Local Gowers norms).

Let $\Omega$ be a subset of $\mathbb{F}_{p}^{d}$, $s\in\mathbb{N}_{+}$, and
$f\colon\mathbb{F}_{p}^{d}\to\mathbb{C}$ be a function. The _$s$ -th
$\Omega$-Gowers norm_ of $f$ is defined by the quantity

$\|f\|_{U^{s}(\Omega)}:=\Bigl{|}\mathbb{E}_{(n,h_{1},\dots,h_{s})\in\Box_{s}(\Omega)}\prod_{\epsilon=(\epsilon_{1},\dots,\epsilon_{s})\in\\{0,1\\}^{s}}\mathcal{C}^{|\epsilon|}f(n+\epsilon_{1}h_{1}+\dots+\epsilon_{s}h_{s})\Bigr{|}^{\frac{1}{2^{s}}},$

where

$\Box_{s}(\Omega):=\\{(n,h_{1},\dots,h_{s})\in(\mathbb{F}_{p}^{d})^{s+1}\colon
n+\epsilon_{1}h_{1}+\dots+\epsilon_{s}h_{s}\in\Omega\text{ for all
}(\epsilon_{1},\dots,\epsilon_{s})\in\\{0,1\\}^{s}\\},$

$|\epsilon|:=\epsilon_{1}+\dots,\epsilon_{s}$ and
$\mathcal{C}^{2n+1}f=\overline{f}$, $\mathcal{C}^{2n}f=f$ for all
$n\in\mathbb{Z}$.111One can show that $\|\cdot\|_{U^{s}(\Omega)}$ is indeed a
norm when $s\geq 2$.

The inverse theorems for Gowers norms is the central part of higher order
Fourier analysis, which has been studied extensively in the last two decades,
and it has many applications in Semerédi-type problems. See [1, 2, 3, 5, 6, 7,
8, 9, 11, 12, 13, 14, 22, 23, 24] for a (far from being complete) list of
related works. For example, it was shown by Green, Tao and Ziegler [12] (see
also [17]) that for $\Omega=\mathbb{F}_{p}$, for any function
$f\colon\Omega\to\mathbb{C}$ bounded by 1 with $\|f\|_{U^{s+1}(\Omega)}\gg 1$,
there exists an $s$-step nilsequence $\phi\colon\Omega\to\mathbb{C}$ of low
complexity such that $|\mathbb{E}_{n\in\Omega}f(n)\phi(n)|\gg 1$. This result
can be generalized to the case $\Omega=\mathbb{F}_{p}^{d}$ without much
difficulty.

In this paper, we are particularly interested in the case when

$\Omega=V(M):=\\{n\in\mathbb{F}_{p}^{d}\colon M(n)=0\\}$

is the set of zeros of some quadratic form
$M\colon\mathbb{F}_{p}^{d}\to\mathbb{F}_{p}$ (see Section 1.3 for
definitions), since such a norm is strongly connected to our study of the
geometric Ramsey conjecture in [21]. A typical example of $M$ is $M(n)=n\cdot
n-r$ for some $r\in\mathbb{F}_{p}$, in which case $V(M)$ is the sphere of
square radius $r$ centered at $\mathbb{0}$. For convenience we call
$\|\cdot\|_{U^{s}(V(M))}$ the _$s$ -th spherical Gowers norm_. Let
$\text{Nil}^{s;C,1}_{p}(\mathbb{F}_{p}^{d})$ denote the set of all scalar
valued $p$-periodic nilsequences of degree at most $s$ and complexity at most
$C$ (see Section 2.7 for the precise definition). Throughout this paper, for
$s\in\mathbb{Z}$, denote

(1.1) $N(s):=(2s+16)(15s+453).$

We proof the following spherical Gowers inverse theorem of step $s$
(abbreviated as $\text{SGI}(s)$):

######  Theorem 1.2.

[$\text{SGI}(s)$] For every $d\in\mathbb{N}_{+},s\in\mathbb{N}$ with $d\geq
N(s-1)=(2s+14)(15s+438)$ and $\epsilon>0$, there exist
$\delta:=\delta(d,\epsilon),C:=C(d,\epsilon)>0$, and
$p_{0}:=p_{0}(d,\epsilon)\in\mathbb{N}$ such that for every prime $p\geq
p_{0}$, every non-degenerate quadratic form
$M\colon\mathbb{F}_{p}^{d}\to\mathbb{F}_{p}$, and every function
$f\colon\mathbb{F}_{p}^{d}\to\mathbb{C}$ bounded in magnitude by 1, if
$\|f\|_{U^{s+1}(V(M))}>\epsilon$, then there exists
$\phi\in\text{Nil}^{s;C,1}_{p}(\mathbb{F}_{p}^{d})$ such that

$\Bigl{|}\mathbb{E}_{n\in V(M)}f(n)\cdot\phi(n)\Bigr{|}>\delta.$

######  Remark 1.3.

By considering the cases $p\geq p_{0}$ and $p<p_{0}$ separately, one can show
that the restriction $p\geq p_{0}$ in Theorem 1.2 is not necessary. We leave
the details to the interested readers.

It is also natural to ask whether one can remove the dependence of $\delta$
and $C$ on the dimension $d$ in Theorem 1.2. We do not pursuit this
imporvement in this paper since Theorem 1.2 is good enough for us for the
study in [21].

We remark that the converse of $\text{SGI}(s)$ also holds. See Proposition
D.1.

###  1.2. Outline of the proof

The outline of our proof of $\text{SGI}(s)$ is similar to the proof Theorem
1.3 of the work of Green, Tao and Ziegler [12]. However, there are also many
significant differences between the two results. For convenience we informally
say that two sequences $f,g\colon\Omega\to\mathbb{C}$ _correlate_ (on
$\Omega$) if the average of $fg$ over $\Omega$ is bounded away from zero. We
say that $f$ and $g$ _$s$ -correlate_ (on $\Omega$) if $fg$ correlates (on
$\Omega$) with a nilsequence of step $s$ with low complexity.

Step 1: some preliminary reductions. We first show that $\text{SGI}(2)$ holds.
The case $s=2$ can be proved using pure Fourier analysis method. Our proof is
similar to the method used by Lyall, Magyar and Parshall [16]. Now suppose
that $\text{SGI}(s)$ holds and we prove that $\text{SGI}(s+1)$ holds. If
$\|f\|_{U^{s+2}(V(M))}\gg 1$, then for many $h\in\mathbb{F}_{p}^{d}$, we have
that $\|\Delta_{h}f\|_{U^{s+1}(V(M)^{h})}\gg 1$, where $V(M)^{h}$ is the set
of $n\in\mathbb{F}_{p}^{d}$ with $M(n)=M(n+h)=0$. So it follows from
$\text{SGI}(s)+$ (and variation of $\text{SGI}(s)$ which follows immediately
from $\text{SGI}(s)$, see Proposition 3.2) that $\Delta_{h}f$ correlates with
an $s$-step nilsequence $\chi_{h}$. Using the approximation properties
developed in Appendix B, we may assume without loss of generality that
$\chi_{h}$ are nilcharacters. Step 1 is conducted in Section 3.

Step 2: a Furstenburg-Weiss type argument. By using the cocycle identity
$\Delta_{h+k}f(n)=\Delta_{n}f(n+k)\Delta_{k}f(n),$ we can subtract more
information for $\chi_{h}$. Roughly speaking, we can show that for many
$(h_{1},h_{2},h_{3},h_{4})\in(\mathbb{F}_{p}^{d})^{4}$ with
$h_{1}+h_{2}=h_{3}+h_{4}$, the function

(1.2)
$n\mapsto\chi_{h_{1}}(n)\cdot\chi_{h_{2}}(n+h_{1}-h_{4})\cdot\overline{\chi}_{h_{3}}(n)\cdot\overline{\chi}_{h_{4}}(n+h_{1}-h_{4})$

is correlated with an $(s-1)$-step nilsequence on
$V(M)^{h_{1},h_{3},h_{3}-h_{2}}$, the set of $n\in\mathbb{F}_{p}^{d}$ with
$M(n)=M(n+h_{1})=M(n+h_{3})=M(n+h_{3}-h_{2})=0$. This is done in Section 4.
Our method is similar to the one used in Section 8 of [12]. However, a new
Fubini-type theorem is needed (Theorem A.12) in order to complete this step.

To better understand the idea behind the proof, it is helpful to temporarily
think of $\chi_{h}(n)$ as a polynomial function
$\exp(P_{h}(n)+P^{\prime}_{h}(n))$ for some homogeneous polynomial
$P_{h}\colon\mathbb{F}_{p}^{d}\to\mathbb{F}_{p}$ of degree $s-1$ and some
polynomial $P^{\prime}_{h}\colon\mathbb{F}_{p}^{d}\to\mathbb{F}_{p}$ of degree
at most $s-2$. In the setting of [12], roughly speaking, the Furstenburg-Weiss
type argument implies that for many $h_{1},\dots,h_{4}$ with
$h_{1}+h_{2}=h_{3}+h_{4}$, we have that
$P_{h_{1}}+P_{h_{2}}=P_{h_{3}}+P_{h_{4}}$. One can then use the tools from
additive combinatorics to find an explicit expression for $P_{h}$.

However, in our setting, there is a lost of information when applying the
Furstenburg-Weiss type argument. As a result, we only obtain the weaker
conclusion that $P_{h_{1}}+P_{h_{2}}\equiv P_{h_{3}}+P_{h_{4}}\mod
J^{M}_{h_{1},h_{2},h_{3}}$ (see Appendix A.8 for the definition) for many
$h_{1},\dots,h_{4}$ with $h_{1}+h_{2}=h_{3}+h_{4}$. To overcome this
difficulty, we need to make essential use of the additive combinatorial tools
for $M$-ideals developed in the second part of the series [20]. Using the
linearization result for $M$-ideals (Theorem A.16), we are able to express
$P_{h}\mod J^{M}_{h}$ as an almost linear Freiman homomorphism.

Step 3: building a nilobject. Using the information obtained in Step 2 on
$\chi_{h}(n)$, we construct a nilobject and express $\chi_{h}(n)$ as
$\chi(h,n)$ for some nilcharacter $\chi$ of multi-degree $(1,s)$. This is done
in Sections 5, 6 and 7. The outline is similar to the one used in Sections
9-12 of [12]. But our method also have many differences from [12]. For
example, in Section 5, we need to use a more sophisticated sun-flower lemma
(Lemma 5.12, based on the work in the second part of the series [20]) compared
with Lemma 10.10 of [12]. In Section 6, we need to use a new Ratner-type
thoerem (Theorem 2.28) based on the factorization theorem developed in the
first part of the series [19]. In Section 7, in the construction of $\chi$,
compared with the approach used in Section 12 of [12], we need to pay extra
attention to ensure that $\chi$ is $p$-periodic.

Step 4: a symmetric argument. Using the symmetric identity
$\Delta_{h}\Delta_{h^{\prime}}f(n)=\Delta_{h^{\prime}}\Delta_{h}f(n)$, we
extract further information from $\chi_{h}(n)=\chi(n,h)$ and show that
$\chi_{h}(n)=\Theta(n+h)\Theta^{\prime}(n)$ for some $(s+1)$-step nilsequences
$\Theta$ and $\Theta^{\prime}$. By some standard arguments, this implies that
$f$ correlates to $\Theta$ and thus completes the proof of $\text{SGI}(s+1)$.
This step is done in Sections 8 (for the case $s=2$) and 9 (for the case
$s\geq 3$), which is in analogous to Section 13 of [12].

However, unlike in [12], the symmetric argument in our setting causes a loss
of information. Therefore, in Sections 8 and 9, we need to have an estimate
finer than [12] in order to keep track of the information for nilcharacters
and to minimize the loss of information (see Remark 8.1). Also as a result of
the loss of information, we need to use new methods to improve the results of
a significant part of Section 13 of [12] in order to carry out the symmetric
argument. See the discussion at the beginning of Section 8.2 for more details.

Organization of the paper. We provide the background material for nilsequences
in Section 2. Sections 3–9 are devoted to the proof the spherical Gowers
inverse theorem, whose roles are explained in the above mentioned outline of
the proof.

In order to prevent the readers from being distracted by technical details, we
put the proofs of some results in the appendices. In Appendix A, we collect
results from the previous two parts of the series [19, 20] which are used in
this paper. In Appendix B, we prove some approximation properties for
nilsequences. In Appendix C, we prove some properties on an equivalence
property for nilsequences defined Definition 2.35. In Appendix D, we prove the
converse of the spherical Gowers inverse theorem.

###  1.3. Definitions and notations

######  Convention 1.4.

Throughout this paper, we use $\tau\colon\mathbb{F}_{p}\to\\{0,\dots,p-1\\}$
to denote the natural bijective embedding, and use
$\iota\colon\mathbb{Z}\to\mathbb{F}_{p}$ to denote the map given by
$\iota(n):=\tau^{-1}(n\mod p\mathbb{Z})$. We also use $\tau$ to denote the map
from $\mathbb{F}_{p}^{k}$ to $\mathbb{Z}^{k}$ given by
$\tau(x_{1},\dots,x_{k}):=(\tau(x_{1}),\dots,\tau(x_{k}))$, and $\iota$ to
denote the map from $\mathbb{Z}^{k}$ to $\mathbb{F}_{p}^{k}$ given by
$\iota(x_{1},\dots,x_{k}):=(\iota(x_{1}),\dots,$ $\iota(x_{k}))$.

We may also extend the domain of $\iota$ to all the rational numbers of the
form $x/y$ with $(x,y)=1,x\in\mathbb{Z},y\in\mathbb{Z}\backslash p\mathbb{Z}$
by setting $\iota(x/y):=\iota(xy^{\ast})$, where $y^{\ast}$ is any integer
with $yy^{\ast}\equiv 1\mod p\mathbb{Z}$.

Below are the notations we use in this paper:

  * •

Let
$\mathbb{N},\mathbb{N}_{+},\mathbb{Z},\mathbb{Q},\mathbb{R},\mathbb{R}+,\mathbb{C}$
denote the set of non-negative integers, positive integers, integers, rational
numbers, real numbers, positive real numbers, and complex numbers,
respectively. Denote $\mathbb{T}:=\mathbb{R}/\mathbb{Z}$. Let $\mathbb{F}_{p}$
denote the finite field with $p$ elements.

  * •

Throughout this paper, $d$ is a fixed positive integer and $p$ is a prime
number.

  * •

Throughout this paper, unless otherwise stated, all vectors are assumed to be
horizontal vectors.

  * •

Let $\mathcal{C}$ be a collection of parameters and $A,B,c\in\mathbb{R}$. We
write $A\gg_{\mathcal{C}}B$ if $|A|\geq K|B|$ and $A=O_{\mathcal{C}}(B)$ if
$|A|\leq K|B|$ for some $K>0$ depending only on the parameters in
$\mathcal{C}$. In the above definitions, we allow the set $\mathcal{C}$ to be
empty. In this case $K$ will be a universal constant.

  * •

For $i=(i_{1},\dots,i_{k})\in\mathbb{Z}^{k}$, denote
$|i|:=|i_{1}|+\dots+|i_{k}|$. For $n=(n_{1},\dots,n_{k})\in\mathbb{Z}^{k}$ and
$i=(i_{1},\dots,i_{k})\in\mathbb{N}^{k}$, denote $n^{i}:=n_{1}^{i_{1}}\dots
n_{k}^{i_{k}}$ and $i!:=i_{1}!\dots i_{k}!$. For
$n=(n_{1},\dots,n_{k})\in\mathbb{N}^{k}$ and
$i=(i_{1},\dots,i_{k})\in\mathbb{N}^{k}$, denote
$\binom{n}{i}:=\binom{n_{1}}{i_{1}}\dots\binom{n_{k}}{i_{k}}$.

  * •

We say that $\mathcal{F}\colon\mathbb{R}_{+}\to\mathbb{R}_{+}$ is a _growth
function_ if $\mathcal{F}$ is strictly increasing and $\mathcal{F}(n)\geq n$
for all $n\in\mathbb{R}_{+}$.

  * •

Let $\text{HP}_{d}(s)$ denote the set of all the homogeneous polynomial in
$\mathbb{F}_{p}[x_{1},\dots,x_{d}]$ of degree $s$.

  * •

For $D\in\mathbb{N}_{+}$, let $\mathbb{S}^{D}$ denote the set of
$(z_{1},\dots,z_{D})\in\mathbb{C}^{D}$ with $|z_{1}|^{2}+\dots+|z_{D}|^{2}=1$.

  * •

For $D,D^{\prime}\in\mathbb{N}_{+}$, $v=(v_{1},\dots,v_{D})\in\mathbb{C}^{D}$
and $w=(w_{1},\dots,w_{D^{\prime}})\in\mathbb{C}^{D^{\prime}}$. Let $v\otimes
w:=(v_{1}w_{1},\dots,v_{D}w_{D^{\prime}})\in\mathbb{C}^{DD^{\prime}}$. We
remark that if $v\in\mathbb{S}^{D}$ and $w\in\mathbb{S}^{D^{\prime}}$, then
$v\otimes w\in\mathbb{S}^{DD^{\prime}}$. Similarly, if $X$ is a set and
$f\colon X\to\mathbb{C}^{D}$, $g\colon X\to\mathbb{C}^{D^{\prime}}$ are
functions, then we use $f\otimes g\colon X\to\mathbb{C}^{DD^{\prime}}$ to
denote the function $(f\otimes g)(x):=f(x)\otimes g(x)$.

  * •

For $x\in\mathbb{R}$, let $\lfloor x\rfloor$ denote the largest integer which
is not larger than $x$, and $\lceil x\rceil$ denote the smallest integer which
is not smaller than $x$. Let $\\{x\\}:=x-\lfloor x\rfloor$.

  * •

For $D\in\mathbb{N}_{+}$, a set $X$ and a function $f\colon
X\to\mathbb{C}^{D}$, let $\overline{f}\colon X\to\mathbb{C}^{D}$ denote the
function obtained by taking the conjugate of each coordinates of $f$.

  * •

Let $D\in\mathbb{N}_{+}$, $X$ be a finite set and $f\colon X\to\mathbb{C}^{D}$
be a function. Denote $\mathbb{E}_{x\in X}f(x):=\frac{1}{|X|}\sum_{x\in
X}f(x)$, the average of $f$ on $X$.

  * •

For $F=\mathbb{Z}^{k}$ or $\mathbb{F}_{p}^{k}$, and
$x=(x_{1},\dots,x_{k}),y=(y_{1},\dots,y_{k})\in F$, let $x\cdot
y\in\mathbb{Z}$ or $\mathbb{F}_{p}$ denote the dot product given by $x\cdot
y:=x_{1}y_{1}+\dots+x_{k}y_{k}.$

  * •

Let $\exp\colon\mathbb{R}\to\mathbb{C}$ denote the function $\exp(x):=e^{2\pi
ix}$.

  * •

If $G$ is a connected, simply connected Lie group, then we use $\log G$ to
denote its Lie algebra. Let $\exp\colon\log G\to G$ be the exponential map,
and $\log\colon G\to\log G$ be the logarithm map. For $t\in\mathbb{R}$ and
$g\in G$, denote $g^{t}:=\exp(t\log g)$.

  * •

If $f\colon H\to G$ is a function from an abelian group $H=(H,+)$ to some
group $(G,\cdot)$, denote $\Delta_{h}f(n):=f(n+h)\cdot f(n)^{-1}$ for all
$n,h\in H$.

  * •

If $f\colon H\to\mathbb{C}^{D}$ is a function on an abelian group $H=(H,+)$,
denote $\Delta_{h}f(n):=f(n+h)\otimes\overline{f}(n)$ for all $n,h\in H$.

  * •

We write affine subspaces of $\mathbb{F}_{p}^{d}$ as $V+c$, where $V$ is a
subspace of $\mathbb{F}_{p}^{d}$ passing through $\mathbb{0}$, and
$c\in\mathbb{F}_{p}^{d}$.

  * •

There is a natural correspondence between polynomials taking values in
$\mathbb{F}_{p}$ and polynomials taking values in $\mathbb{Z}/p$. Let
$F\in\text{poly}(\mathbb{F}_{p}^{d}\to\mathbb{F}_{p}^{d^{\prime}})$ and
$f\in\text{poly}(\mathbb{Z}^{d}\to(\mathbb{Z}/p)^{d^{\prime}})$ be polynomials
of degree at most $s$ for some $s<p$. If $F=\iota\circ pf\circ\tau$, then we
say that $F$ is _induced_ by $f$ and $f$ is a _lifting_ of $F$.222As is
explained in [19], $\iota\circ pf\circ\tau$ is well defined. We say that $f$
is a _regular lifting_ of $F$ if in addition $f$ has the same degree as $F$
and $f$ has $\\{0,\frac{1}{p},\dots,\frac{p-1}{p}\\}$-coefficients.

  * •

Let $(X,d_{X})$ be a metric space. The _Lipschitz norm_ of a function $F\colon
X\to\mathbb{C}^{D}$ is defined as

$\|F\|_{\text{Lip}(X)}:=\sup_{x\in X}|F(x)|+\sup_{x,y\in X,x\neq
y}\frac{|F(x)-F(y)|}{d_{X}(x,y)}.$

For a vector valued function $F=(F_{1},\dots,F_{D})\colon X\to\mathbb{C}^{D}$,
we denote $\|F\|_{\text{Lip}(X)}:=\max_{1\leq i\leq
D}\|F_{i}\|_{\text{Lip}(X)}$. When there is no confusion, we write
$\|F\|_{\text{Lip}}=\|F\|_{\text{Lip}(X)}$ for short. For a subset $A$ of
$\mathbb{C}^{D}$, we say that $F\colon X\to A$ is a _Lipschitz function_ if
$\|F\|_{\text{Lip}(X)}<\infty$. Let $\text{Lip}(X\to A)$ denote the set of all
Lipschitz functions $F\colon X\to A$.

Let $D,D^{\prime}\in\mathbb{N}_{+}$ and $C>0$. Here are some basic notions of
complexities:

  * •

Real and complex numbers: a number $r\in\mathbb{R}$ is of _complexity_ at most
$C$ if $r=a/b$ for some $a,b\in\mathbb{Z}$ with $-C\leq a,b\leq C$. If
$r\notin\mathbb{Q}$, then we say that the complexity of $r$ is infinity. A
complex number is of _complexity_ at most $C$ if both its real and imaginary
parts are of complexity at most $C$.

  * •

Vectors and matrices: a vector or matrix is of _complexity_ at most $C$ if all
of its entries are of complexity at most $C$.

  * •

Subspaces: a subspace of $\mathbb{R}^{D}$ is of _complexity_ at most $C$ if it
is the null space of a matrix of complexity at most $C$.

  * •

Linear transformations: let $L\colon\mathbb{C}^{D}\to\mathbb{C}^{D^{\prime}}$
be a linear transformation. Then $L$ is associated with an $D\times
D^{\prime}$ matrix $A$ in $\mathbb{C}$. We say that $L$ is of _complexity_ at
most $C$ if $A$ is of complexity at most $C$.

  * •

Lipschitz function: the _complexity_ of a Lipschitz function is defined to be
its Lipschitz norm.

We also need to recall the notations regarding quadratic forms defined in
[19].

######  Definition 1.5.

We say that a function $M\colon\mathbb{F}_{p}^{d}\to\mathbb{F}_{p}$ is a
_quadratic form_ if

$M(n)=(nA)\cdot n+n\cdot u+v$

for some $d\times d$ symmetric matrix $A$ in $\mathbb{F}_{p}$, some
$u\in\mathbb{F}_{p}^{d}$ and $v\in\mathbb{F}_{p}$. We say that $A$ is the
matrix _associated to_ $M$. We say that $M$ is _pure_ if $u=\mathbb{0}$. We
say that $M$ is _homogeneous_ if $u=\mathbb{0}$ and $v=0$. We say that $M$ is
_non-degenerate_ if $M$ is of rank $d$, or equivalently, $\det(A)\neq 0$.

We use $\text{rank}(M):=\text{rank}(A)$ to denote the _rank_ of $M$. Let $V+c$
be an affine subspace of $\mathbb{F}_{p}^{d}$ of dimension $r$. There exists a
(not necessarily unique) bijective linear transformation
$\phi\colon\mathbb{F}_{p}^{r}\to V$. We define the _rank_
$\text{rank}(M|_{V+c})$ of $M$ restricted to $V+c$ as the rank of the
quadratic form $M(\phi(\cdot)+c)$. It was proved in [19] that
$\text{rank}(M|_{V+c})$ is independent of the choice of $\phi$.

We also need to use the following notions.

  * •

For a polynomial $P\in\text{poly}(\mathbb{F}_{p}^{k}\to\mathbb{F}_{p})$, let
$V(P)$ denote the set of $n\in\mathbb{F}_{p}^{k}$ such that $P(n)=0$.

  * •

Let $r\in\mathbb{N}_{+}$, $h_{1},\dots,h_{r}\in\mathbb{F}_{p}^{d}$ and
$M\colon\mathbb{F}_{p}^{d}\to\mathbb{F}_{p}$ be a quadratic form. Denote

$V(M)^{h_{1},\dots,h_{r}}:=\cap_{i=1}^{r}(V(M(\cdot+h_{i}))\cap V(M).$

  * •

Let $\Omega$ be a subset of $\mathbb{F}_{p}^{d}$ and $s\in\mathbb{N}$. Let
$\Box_{s}(\Omega)$ denote the set of
$(n,h_{1},\dots,h_{s})\in(\mathbb{F}_{p}^{d})^{s+1}$ such that
$n+\epsilon_{1}h_{1}+\dots+\epsilon_{s}h_{s}\in\Omega$ for all
$(\epsilon_{1},\dots,\epsilon_{s})\in\\{0,1\\}^{s}$. Here we allow $s$ to be
0, in which case $\Box_{0}(\Omega)=\Omega$. We say that $\Box_{s}(\Omega)$ is
the _$s$ -th Gowers set_ of $\Omega$.

Quadratic forms can also be defined in the $\mathbb{Z}/p$-setting.

######  Definition 1.6.

We say that a function $M\colon\mathbb{Z}^{d}\to\mathbb{Z}/p$ is a _quadratic
form_ if

$M(n)=\frac{1}{p}((nA)\cdot n+n\cdot u+v)$

for some $d\times d$ symmetric matrix $A$ in $\mathbb{Z}$, some
$u\in\mathbb{Z}^{d}$ and $v\in\mathbb{Z}$. We say that $A$ is the matrix
_associated to_ $M$.

By Lemma A.1 of [19], any quadratic form
$\tilde{M}\colon\mathbb{Z}^{d}\to\mathbb{Z}/p$ associated with the matrix
$\tilde{A}$ induces a quadratic form $M:=\iota\circ
p\tilde{M}\circ\tau\colon\mathbb{F}_{p}^{d}\to\mathbb{F}_{p}$ associated with
the matrix $\iota(\tilde{A})$. Conversely, any quadratic form
$M\colon\mathbb{F}_{p}^{d}\to\mathbb{F}_{p}$ associated with the matrix $A$
admits a regular lifting $\tilde{M}\colon\mathbb{Z}^{d}\to\mathbb{Z}/p$, which
is a quadratic form associated with the matrix $\tau(A)$.

For a quadratic form $\tilde{M}\colon\mathbb{Z}^{d}\to\mathbb{Z}/p$, we say
that $\tilde{M}$ is _pure/homogeneous/ $p$-non-degenerate_ if the quadratic
form $M:=\iota\circ p\tilde{M}\circ\tau$ induced by $\tilde{M}$ is
pure/homogeneous/non-degenerate. The _$p$ -rank_ of $\tilde{M}$, denoted by
$\text{rank}_{p}(\tilde{M})$, is defined to be the rank of $M$.

We say that $h_{1},\dots,h_{k}\in\mathbb{Z}^{d}$ are _$p$ -linearly
independent_ if for all $c_{1},\dots,c_{k}\in\mathbb{Z}/p$,
$c_{1}h_{1}+\dots+c_{k}h_{k}\in\mathbb{Z}$ implies that
$c_{1},\dots,c_{k}\in\mathbb{Z}$, or equivalently, if
$\iota(h_{1}),\dots,\iota(h_{k})$ are linearly independent.

We also need to use the following notions.

  * •

For a polynomial $P\in\text{poly}(\mathbb{Z}^{k}\to\mathbb{R})$, let
$V_{p}(P)$ denote the set of $n\in\mathbb{Z}^{k}$ such that
$P(n+pm)\in\mathbb{Z}$ for all $m\in\mathbb{Z}^{k}$.

  * •

For $\Omega\subseteq\mathbb{Z}^{d}$ and $s\in\mathbb{N}$, let
$\Box_{p,s}(\Omega)$ denote the set of
$(n,h_{1},\dots,h_{s})\in(\mathbb{Z}^{d})^{s+1}$ such that
$n+\epsilon_{1}h_{1}+\dots+\epsilon_{s}h_{s}\in\Omega+p\mathbb{Z}^{d}$ for all
$\epsilon_{1},\dots,\epsilon_{s}\in\\{0,1\\}$. We say that
$\Box_{p,s}(\Omega)$ is the _$s$ -th $p$-Gowers set_ of $\Omega$.

For all other definitions and notations which are used but not mentioned in
this paper, we refer the readers to Appendix A for details.

##  2\. Background material for nilsequence

We start with some basic definitions on nilmanifolds. Many notations we use
are similar to the ones used in Section 6 of [12]. Unlike in the first part of
the series [19], in this paper, instead of just working with
$\mathbb{N}$-filtered nilmanifold, we also need to work with multi-degree and
degree-rank filtrations. As a result, there are overlappings between Sections
2.1-2.4 of this paper and Section 3 of [19] since we need to extend
definitions and results in [19] to more general filtrations. On the other
hand, the materials in Sections 2.5-2.7 are new and did not appear in [19].

###  2.1. Nilmanifolds, filtrations and polynomial sequences

######  Definition 2.1 (Ordering).

An _ordering_ $I=(I,\prec,+,0)$ is a set $I$ equipped with a partial ordering
$\prec$, a binary operation $+\colon I\times I\to I$, and a distinguished
element $0\in I$ with the following properties:

  1. (i)

the operation $+$ is commutative and associative, and has 0 as the identity
element;

  2. (ii)

the partial ordering $\prec$ has 0 as the minimal element;

  3. (iii)

if $i,j\prec I$ are such that $i\prec j$, then $i+k\prec j+k$ for all $k\in
I$;

  4. (iv)

for every $j\in I$, the initial segment $\\{i\in I\colon i\prec d\\}$ is
finite.

A _finite downset_ in $I$ is a finite subset $J$ of $I$ with the property that
$j\in J$ whenever $j\in I$ and $j\prec i$ for some $i\in J$.

In this paper, we will use the following special orderings:

  1. (i)

the _degree ordering_ , where $I=\mathbb{N}$ with the usual ordering, addition
and zero element;

  2. (ii)

the _multi-degree ordering_ , where $I=\mathbb{N}^{k}$ with the usual addition
and zero element, and with the product ordering, i.e.
$(i^{\prime}_{1},\dots,i^{\prime}_{k})\preceq(i_{1},\dots,i_{k})$ if
$i_{j}^{\prime}\leq i_{j}$ for all $1\leq j\leq k$;

  3. (iii)

the _degree-rank ordering_ , where $I$ is the sector
$\text{DR}:=\\{[s,r]\in\mathbb{N}^{2}\colon 0\leq r\leq s\\}$ with the usual
addition and zero element, and the lexicographical ordering, i.e.
$[s^{\prime},r^{\prime}]\prec[s,r]$ if $s^{\prime}<s$ or if $s^{\prime}=s$ and
$r^{\prime}<r$.333We write vectors in DR as $[s,r]$ instead of $(s,r)$ in
order to distinguish them from the $\mathbb{N}^{2}$ multi-degree ordering.

It is not hard to verify that all these three concepts are indeed orderings.
We remark that the degree and the degree-rank orderings are _total orderings_
, meaning that for $i,j\in I$, either $i\preceq j$ or $j\preceq i$. However,
the multi-degree ordering is not a total ordering.

Let $I$ be the degree, multi-degree or degree-rank ordering. We say that the
_dimension_ of $I$ (denoted as $\dim(I)$) is $1$ if $I=\text{DR}$, and is $k$
if $I=\mathbb{N}^{k}$.

Let $G$ be a group and $g,h\in G$. Denote $[g,h]:=g^{-1}h^{-1}gh$. For
subgroups $H,H^{\prime}$ of $G$, let $[H,H^{\prime}]$ denote the group
generated by $[h,h^{\prime}]$ for all $h\in H$ and $h^{\prime}\in H^{\prime}$.

######  Definition 2.2 (Filtered group).

Let $I$ be an ordering and $G$ be a group. An _$I$ -filtration_ on $G$ is a
collection $G_{I}=(G_{i})_{i\in I}$ of subgroups of $G$ indexed by $I$ such
that the following holds:

  1. (i)

for all $i,j\in I$ with $i\prec j$, we have that $G_{i}\supseteq G_{j}$;

  2. (ii)

for all $i,j\in I$, we have $[G_{i},G_{j}]\subseteq G_{i+j}$.

For $s\in I$, we say that $G$ is an _( $I$-filtered) nilpotent group_ of
_degree_ at most $s$ (or of _degree_ $\preceq s$) with respect to some
$I$-filtration $(G_{i})_{i\in I}$ if $G_{i}$ is trivial whenever $i\not\preceq
s$. For a downset $J$ of $I$, we say that $G$ is an _( $I$-filtered) nilpotent
group_ of _degree_ $\subseteq J$ with respect to some $I$-filtration
$(G_{i})_{i\in I}$ if $G_{i}$ is trivial whenever $i\notin J$.

In this paper, we will use the following filtrations.

  1. (i)

Let $(d_{1},\dots,d_{k})\in\mathbb{N}^{k}$. A _nilpotent Lie group of multi-
degree $\leq(d_{1},\dots,d_{k})$_ (or a _nilpotent Lie group of degree $\leq
d_{1}$_, if $k=1$) is a nilpotent $I$-filtered Lie group of degree
$\leq(d_{1},\dots,d_{k})$, where $I=\mathbb{N}^{k}$ is the multi-degree
ordering. If $J$ is a downset, we define nilpotent Lie group of multi-degree
$\subseteq J$ in a similar way. For convenience we further require that
$G_{0}=G$.

  2. (ii)

Let $[s,r]\in\text{DR}$, A _nilpotent Lie group of degree-rank $\leq[s,r]$_ is
a nilpotent DR-filtered Lie group of degree $\leq[s,r]$, with the additional
assumption that $G_{[0,0]}=G$ and $G_{[i,0]}=G_{[i,1]}$ for all $i\geq 1$.

######  Definition 2.3 (Nilmanifold).

Let $I$ be an ordering. Let $\Gamma$ be a discrete and cocompact subgroup of a
connected, simply-connected nilpotent Lie group $G$ with filtration
$G_{I}=(G_{i})_{i\in I}$ such that $\Gamma_{i}:=\Gamma\cap G_{i}$ is a
cocompact subgroup of $G_{i}$444In some papers, such $\Gamma_{i}$ is called a
_rational_ subgroup of $G$. for all $i\in I$. Then we say that $G/\Gamma$ is
an _( $I$-filtered) nilmanifold_, and we use $(G/\Gamma)_{I}$ to denote the
collection $(G_{i}/\Gamma_{i})_{i\in I}$ (which is called the _$I$
-filtration_ of $G/\Gamma$). We say that $G/\Gamma$ has degree $\preceq s$ or
$\subseteq J$ with respect to $(G/\Gamma)_{I}$ if $G$ has degree $\preceq s$
or $\subseteq J$ with respect to $G_{I}$.

######  Definition 2.4 (Sub-nilmanifold).

Let $G/\Gamma$ be an $I$-filtered nilmanifold of degree $\subseteq J$ with
filtration $G_{I}$ and $H$ be a rational subgroup of $G$. Then
$H/(H\cap\Gamma)$ is also an $I$-filtered nilmanifold of degree $\subseteq J$
with the filtration $H_{I}$ given by $H_{i}:=G_{i}\cap H$ for all $i\in I$
(see Example 6.14 of [12]). We say that $H/(H\cap\Gamma)$ is a _sub-
nilmanifold_ of $G/\Gamma$, $H_{I}$ (or $(H/(H\cap\Gamma))_{I}$) is the
filtration _induced by_ $G_{I}$ (or $(G/\Gamma)_{I}$).

######  Definition 2.5 (Quotient nilmanifold).

Let $G/\Gamma$ be an $I$-filtered nilmanifold of degree $\subseteq J$ with
filtration $G_{I}$ and $H$ be a normal subgroup of $G$. Then
$(G/H)/(\Gamma/(\Gamma\cap H))$ is also an $I$-filtered nilmanifold of most
$\subseteq J$ with the filtration $(G/H)_{I}$ given by
$(G/H)_{i}:=G_{i}/(H\cap G_{i})$ for all $i\in I$. We say that
$(G/H)/(\Gamma/(\Gamma\cap H))$ is the _quotient nilmanifold_ of $G/\Gamma$ by
$H$ and that $(G/H)_{I}$ is the filtration _induced by_ $G_{I}$.

######  Definition 2.6 (Product nilmanifold).

Let $G/\Gamma$ and $G^{\prime}/\Gamma^{\prime}$ be $I$-filtered nilmanifolds
of degree $\subseteq J$ with filtration $G_{I}$ and $G^{\prime}_{I}$. Then
$G\times G^{\prime}/\Gamma\times\Gamma^{\prime}$ is also an $I$-filtered
nilmanifold of most $\subseteq J$ with the filtration $(G\times
G^{\prime}/\Gamma\times\Gamma^{\prime})_{I}$ given by $(G\times
G^{\prime}/\Gamma\times\Gamma^{\prime})_{i}:=G_{i}\times
G^{\prime}_{i}/\Gamma_{i}\times\Gamma^{\prime}_{i}$ for all $i\in I$. We say
that $G\times G^{\prime}/\Gamma\times\Gamma^{\prime}$ is the _product
nilmanifold_ of $G/\Gamma$ and $G^{\prime}/\Gamma^{\prime}$ and that $(G\times
G^{\prime}/\Gamma\times\Gamma^{\prime})_{I}$ is the filtration _induced by_
$G_{I}$ and $G^{\prime}_{I}$.

The following definition is based on from Example 6.11 of [12], which explains
the connections between different filtrations.

######  Definition 2.7 (Inductions of filtrations).

Let $s\in\mathbb{N}_{+}$ and $G$ be an $\mathbb{N}$-filtered nilmanifold of
degree $\leq s$ with filtration $G_{\mathbb{N}}$. Then for any
$k\in\mathbb{N}_{+}$, $G_{\mathbb{N}}$ _induces_ a multi-degree filtration
$G^{\prime}_{\mathbb{N}^{k}}$ of degree
$\subseteq\\{m\in\mathbb{N}^{k}\colon|m|\leq s\\}$ given by
$G^{\prime}_{m}:=G_{|m|}$ for all $m\in\mathbb{N}^{k}$. Conversely, let
$k\in\mathbb{N}_{+},J\subseteq\mathbb{N}^{k}$, and $G$ be an
$\mathbb{N}^{k}$-filtered nilmanifold of degree $\leq J$ with filtration
$G_{\mathbb{N}^{k}}$. Then $G_{\mathbb{N}^{k}}$ _induces_ a degree filtration
$G^{\prime}_{\mathbb{N}}$ of degree $\max\\{|m|\colon m\in\mathbb{N}^{k}\\}$
given by $G^{\prime}_{i}:=\bigvee_{m\in\mathbb{N}^{k},|m|=i}G_{m}$ for all
$i\in\mathbb{N}$, where $\vee_{a\in A}G_{a}$ is the group generated by
$\cup_{a\in A}G_{a}$.

Let $s\in\mathbb{N}_{+}$ and $G$ be an $\mathbb{N}$-filtered nilmanifold of
degree $\leq s$ with filtration $G_{\mathbb{N}}$. Since $G=G_{0}$,
$G_{\mathbb{N}}$ _induces_ a degree-rank filtration $G^{\prime}_{\text{DR}}$
of degree $\leq[s,s]$ given by setting $G^{\prime}_{[t,r]}$ to be the group
generated by all the iterated commutators of $g_{i_{1}},\dots,g_{i_{m}}$ with
$g_{i_{j}}\in G_{i_{j}}$ for $1\leq j\leq m$ such that either
$i_{1}+\dots+i_{m}>t$ or $i_{1}+\dots+i_{m}=t$ and $m\geq\max\\{r,1\\}$.
Conversely, let $s,r\in\mathbb{N}_{+},r\leq s$ and $G$ be an DR-filtered
nilmanifold of degree $\leq[s,r]$ with filtration $G_{\text{DR}}$. Then
$G_{\text{DR}}$ _induces_ a degree filtration $G^{\prime}_{\mathbb{N}}$ of
degree $\leq s$ given by setting $G^{\prime}_{i}:=G_{[i,0]}$ for all
$i\in\mathbb{N}$.

A multi-degree filtration $G_{\mathbb{N}^{k}}$ _induces_ a degree-rank
filtration $G^{\prime}_{\text{DR}}$ by first induces a degree filtration
$G^{\prime\prime}_{\mathbb{N}}$ and then induces from
$G^{\prime\prime}_{\mathbb{N}}$ a degree-rank filtration
$G^{\prime}_{\text{DR}}$ in the above mentioned senses. Similarly, a degree-
rank filtration $G_{\text{DR}}$ _induces_ a multi-degree filtration
$G^{\prime}_{\mathbb{N}^{k}}$ by first induces a degree filtration
$G^{\prime\prime}_{\mathbb{N}}$ and then induces from
$G^{\prime\prime}_{\mathbb{N}}$ a multi-degree filtration
$G^{\prime}_{\mathbb{N}^{k}}$ in the above mentioned senses.

Let $I,I^{\prime}$ be the degree, multi-degree or degree-rank filtrations. We
say that the $I$-filtration of a nilmanifold $(G/\Gamma)_{I}$ _induces_ the
$I^{\prime}$-filtration of a nilmanifold
$(G^{\prime}/\Gamma^{\prime})_{I^{\prime}}$ if $G_{I}$ induces
$G^{\prime}_{I^{\prime}}$.

We remark that although we used the same terminology “induce” in Definitions
2.4, 2.5, 2.6 and 2.7, this will not cause any confusion in the paper as the
meaning of “induce” will be clear from the context.

######  Definition 2.8 (Filtered homomorphism).

An _( $I$-filtered) homomorphism_ $\phi\colon G/\Gamma\to
G^{\prime}/\Gamma^{\prime}$ between two $I$-filtered nilmanifolds is a group
homomorphism $\phi\colon G\to G^{\prime}$ which maps $\Gamma$ to
$\Gamma^{\prime}$ and maps $G_{i}$ to $G^{\prime}_{i}$ for all $i\in I$.

Every nilmanifold has an explicit algebraic description by using the Mal’cev
basis:

######  Definition 2.9 (Mal’cev basis).

Let $s\in\mathbb{N}_{+}$, $G/\Gamma$ be a nilmanifold of step at most $s$ with
the $\mathbb{N}$-filtration $(G_{i})_{i\in\mathbb{N}}$. Let $\dim(G)=m$ and
$\dim(G_{i})=m_{i}$ for all $0\leq i\leq s$. A basis
$\mathcal{X}:=\\{X_{1},\dots,X_{m}\\}$ for the Lie algebra $\log G$ of $G$
(over $\mathbb{R}$) is a _Mal’cev basis_ for $G/\Gamma$ adapted to the
filtration $G_{\mathbb{N}}$ if

  * •

for all $0\leq j\leq m-1$, $\log
H_{j}:=\text{Span}_{\mathbb{R}}\\{\xi_{j+1},\dots,\xi_{m}\\}$ is a Lie algebra
ideal of $\log G$ and so $H_{j}:=\exp(\log H_{j})$ is a normal Lie subgroup of
$G;$

  * •

$G_{i}=H_{m-m_{i}}$ for all $0\leq i\leq s$;

  * •

the map $\psi^{-1}\colon\mathbb{R}^{m}\to G$ given by

$\psi^{-1}(t_{1},\dots,t_{m})=\exp(t_{1}X_{1})\dots\exp(t_{m}X_{m})$

is a bijection;

  * •

$\Gamma=\psi^{-1}(\mathbb{Z}^{m})$.

We call $\psi$ the _Mal’cev coordinate map_ with respect to the Mal’cev basis
$\mathcal{X}$. If $g=\psi^{-1}(t_{1},\dots,t_{m})$, we say that
$(t_{1},\dots,t_{m})$ are the _Mal’cev coordinates_ of $g$ with respect to
$\mathcal{X}$.

We say that the Mal’cev basis $\mathcal{X}$ is _$C$ -rational_ (or of
_complexity_ at most $C$) if all the structure constants $c_{i,j,k}$ in the
relations

$[X_{i},X_{j}]=\sum_{k}c_{i,j,k}X_{k}$

are rational with complexity at most $C$.

It is known that for every $\mathbb{N}$-filtration $G_{\mathbb{N}}$ which is
rational for $\Gamma$, there exists a Mal’cev basis adapted to it. See for
example the discussion on pages 11–12 of [10].

If $G/\Gamma$ is a nilmanifold with a multi-degree filtration
$(G_{i})_{i\in\mathbb{N}^{k}}$. Then there is a Mal’cev basis $\mathcal{X}$ of
$G/\Gamma$ adapted to the degree filtration
$(G^{\prime}_{i})_{i\in\mathbb{N}}$, where $G^{\prime}_{i}$ is the group
generated by $G_{(i_{1},\dots,i_{k})},i_{1}+\dots+i_{k}=i$ for all
$i\in\mathbb{N}$. We say that $\mathcal{X}$ is the _Mal’cev basis_ of
$G/\Gamma$ adapted to $(G_{i})_{i\in\mathbb{N}^{k}}$.

If $G/\Gamma$ is a nilmanifold with a degree-rank filtration
$(G_{[s,r]})_{[s,r]\in\text{DR}}$. Then there is a Mal’cev basis $\mathcal{X}$
of $G/\Gamma$ adapted to the degree filtration
$(G^{\prime}_{i})_{i\in\mathbb{N}}$, where $G^{\prime}_{i}=G_{[i,0]}$ for all
$i\in\mathbb{N}$. We say that $\mathcal{X}$ is the _Mal’cev basis_ of
$G/\Gamma$ adapted to $(G_{[s,r]})_{[s,r]\in\text{DR}}$.

We use the following quantities to describe the complexities of the objected
defined above.

######  Definition 2.10 (Notions of complexities for nilmanifolds).

Let $G/\Gamma$ be a nilmanifold with filtration $G_{I}$ and a Mal’cev basis
$\mathcal{X}=\\{X_{1},\dots,X_{D}\\}$ adapted to it. We say that $G/\Gamma$ is
of _complexity_ at most $C$ if the Mal’cev basis $\mathcal{X}$ is $C$-rational
and $\dim(G)\leq C$.

An element $g\in G$ is of _complexity_ at most $C$ (with respect to the
Mal’cev coordinate map $\psi\colon G/\Gamma\to\mathbb{R}^{m}$) if
$\psi(g)\in[-C,C]^{m}$.

Let $G^{\prime}/\Gamma^{\prime}$ be a nilmanifold endowed with the Mal’cev
basis
$\mathcal{X}^{\prime}=\\{X^{\prime}_{1},\dots,X^{\prime}_{D^{\prime}}\\}$
respectively. Let $\phi\colon G/\Gamma\to G^{\prime}/\Gamma^{\prime}$ be a
filtered homomorphism, we say that $\phi$ is of _complexity_ at most $C$ if
the map $X_{i}\to\sum_{j}a_{i,j}X^{\prime}_{j}$ induced by $\phi$ is such that
all $a_{i,j}$ are of complexity at most $C$.

Let $G^{\prime}\subseteq G$ be a closed connected subgroup. We say that
$G^{\prime}$ is _$C$ -rational_ (or of _complexity_ at most $C$) relative to
$\mathcal{X}$ if the Lie algebra $\log G$ has a basis consisting of linear
combinations $\sum_{i}a_{i}X_{i}$ such that $a_{i}$ are rational numbers of
complexity at most $C$.

######  Convention 2.11.

In the rest of the paper, all nilmanifolds are assumed to have a fixed
filtration, Mal’cev basis and a smooth Riemannian metric induced by the
Mal’cev basis. Therefore, we will simply say that a nilmanifold, Lipschitz
function, sub-nilmanifold etc. is of complexity $C$ without mentioning the
reference filtration and Mal’cev basis.

######  Definition 2.12 (Polynomial sequences).

Let $d,k\in\mathbb{N}_{+}$ and $G$ be a connected simply-connected nilpotent
Lie group.

  1. (i)

Let $H=\mathbb{Z}^{d}$ or $\mathbb{R}^{d}$555In this paper, we mainly consider
polynomials sequences from $\mathbb{Z}^{d}$ to $G$. The only place we use
polynomials sequences from $\mathbb{R}^{d}$ to $G$ is Theorem B.2. and
$(G_{i})_{i\in\mathbb{N}}$ be a degree filtration of $G$. A map $g\colon H\to
G$ is a _( $\mathbb{N}$-filtered) $d$-integral polynomial sequence_ if

$\Delta_{h_{m}}\dots\Delta_{h_{1}}g(n)\in G_{m}$

for all $m\in\mathbb{N}$ and $n,h_{1},\dots,h_{m}\in H$.666Recall that
$\Delta_{h}g(n):=g(n+h)g(n)^{-1}$ for all $n,h\in H$.

  2. (ii)

Let $H=(\mathbb{Z}^{d})^{k}$ or $(\mathbb{R}^{d})^{k}$ and
$(G_{i})_{i\in\mathbb{N}^{k}}$ be a multi-degree filtration of $G$. Let
$e_{i,j},1\leq i\leq k,1\leq j\leq d$ be the standard unit vectors in
$(\mathbb{Z}^{d})^{k}$. A map $g\colon H\to G$ is a _(
$\mathbb{N}^{k}$-filtered) $d$-integral polynomial sequence_ if

$\Delta_{e_{i_{m},j_{m}}}\dots\Delta_{e_{i_{1},j_{1}}}g(n)\in G_{t}$

for all $m\in\mathbb{N}$, $1\leq i_{1},\dots,i_{m}\leq k,1\leq
j_{1},\dots,j_{m}\leq d$, and $n\in H$, where
$t=(t_{1},\dots,t_{k})\in\mathbb{N}^{k}$ is such that $t_{\ell}$ equals to the
number of $i_{1},\dots,i_{m}$ which equals to $\ell$ for all $1\leq\ell\leq
k$.

  3. (iii)

Let $H=\mathbb{Z}^{d}$ or $\mathbb{R}^{d}$ and
$(G_{[s,r]})_{[s,r]\in\text{DR}}$ be a degree-rank filtration of $G$. A map
$g\colon H\to G$ is a _( DR-filtered) $d$-integral polynomial sequence_ if

$\Delta_{h_{m}}\dots\Delta_{h_{1}}g(n)\in G_{[m,0]}$

for all $m\in\mathbb{N}$ and $n,h_{1},\dots,h_{m}\in H$.

The sets of all $\mathbb{N}$-, $\mathbb{N}^{k}$-, and DR-filtered $d$-integral
polynomial sequences are denoted by $\text{poly}(H\to G_{\mathbb{N}})$,
$\text{poly}(H^{k}\to G_{\mathbb{N}^{k}})$ and $\text{poly}(H\to
G_{\text{DR}})$, respectively.777Polynomial sequences can be defined for more
general groups $H$ and for more general filtrations (see for example [12]).
But we do not need them in this paper.

######  Remark 2.13.

Our definition of polynomial sequences coincides with the one in [12] when
$d=1$. When $d>1$, the set $\text{poly}(\mathbb{Z}^{d}\to G_{\mathbb{N}})$
defined in this paper is the set $\text{poly}(\mathbb{Z}^{d}\to
G^{\prime}_{\mathbb{N}^{d}})$ defined in [12], where
$G^{\prime}_{(i_{1},\dots,i_{d})}=G_{i_{1}+\dots+i_{d}}$ for all
$i_{1},\dots,i_{d}\in\mathbb{N}$, and the set
$\text{poly}((\mathbb{Z}^{d})^{k}\to G_{\mathbb{N}})$ defined in this paper is
the set $\text{poly}((\mathbb{Z}^{d})^{k}\to G^{\prime}_{\mathbb{N}^{dk}})$
defined in [12], where
$G^{\prime}_{(i_{1,1},\dots,i_{k,d})}=G_{(i_{1,1}+\dots+i_{1,d},\dots,i_{k,1}+\dots+i_{k,d})}$
for all $i_{1,1},\dots,i_{k,d}\in\mathbb{N}$. The reason we adopt a different
notation from [12] is that the new notation is more convenient to use since we
frequently view vectors in $\mathbb{Z}^{dk}$ as $k$-tuples of elements in
$\mathbb{Z}^{d}$ in this paper.

######  Convention 2.14.

In the rest of the paper, we will omit the phrase “$d$-integral” when
mentioning a polynomial sequence, since the quantity $d$ will always be clear
from the context. For example, let $I$ be the degree, multi-degree or degree-
rank ordering, $k\in\mathbb{N}_{+}$ with $\dim(I)|k$, and $G/\Gamma$ be an
$I$-filtered nilmanifold. Denote $d=k/\dim(I)$. When writing
$\text{poly}(\Omega\to G_{I})$, we regard $\mathbb{Z}^{k}$ as
$(\mathbb{Z}^{d})^{\dim(I)}$, and $\text{poly}(\mathbb{Z}^{k}\to G_{I})$ is
understood as $\text{poly}((\mathbb{Z}^{d})^{\dim(I)}\to G_{I})$, the set of
$d$-integral polynomial sequences (where $d$ is uniquely determined by $I$ and
$k$).

By Corollary B.4 of [12], all of $\text{poly}(\mathbb{Z}^{k}\to
G_{\mathbb{N}})$, $\text{poly}((\mathbb{Z}^{k})^{k^{\prime}}\to
G_{\mathbb{N}^{k^{\prime}}})$, $\text{poly}(\mathbb{Z}^{k}\to G_{\text{DR}})$,
and $\text{poly}((\mathbb{Z}^{k})^{k^{\prime}}\to G_{\mathbb{N}})$ are groups
with respect to the pointwise multiplicative operation. We refer the readers
to Appendix B of [12] for more properties for polynomial sequences.

We conclude this section with a lemma regarding the expression of a polynomial
sequence using Mal’cev basis.

######  Lemma 2.15.

Let $s\in\mathbb{N}_{+}$ and $G$ be an $s$-step connected, simply-connected
nilpotent Lie group with the degree filtration $G_{\mathbb{N}}$ and Mal’cev
basis $\mathcal{X}=\\{X_{1},\dots,X_{m}\\}$, where $m=\dim(G)$. Denote
$m_{i}:=\dim(G_{i})$. Suppose that $G_{i}$ is generated by
$X_{m-m_{i}+1},\dots,X_{m}$. Let $g\colon\mathbb{Z}^{d}\to G$ be a map given
by

$g(n)=\prod_{j=1}^{m}\exp(P_{j}(n)X_{j})$

for some polynomials $P_{j}\colon\mathbb{Z}^{d}\to\mathbb{R}$. Then
$g\in\text{poly}(\mathbb{Z}^{d}\to G_{\mathbb{N}})$ if and only if
$\deg(P_{j})\leq i$ for all $m-m_{i}+1\leq j\leq m-m_{i+1}$.

###### Proof.

If $\deg(P_{j})\leq i$ for all $m-m_{i}+1\leq j\leq m-m_{i+1}$, then since
$\exp((a+b)X_{j})=\exp(aX_{j})\exp(bX_{j})$ for all $a,b\in\mathbb{R}$, it is
not hard to see that $n\mapsto\exp(P_{j}(n)X_{j})$ is a map in
$\text{poly}(\mathbb{Z}^{d}\to G_{\mathbb{N}})$ for all $1\leq j\leq m$. By
Corollary B.4 of [12], we have that $g\in\text{poly}(\mathbb{Z}^{d}\to
G_{\mathbb{N}})$.

Conversely, suppose that $g\in\text{poly}(\mathbb{Z}^{d}\to G_{\mathbb{N}})$.
We say that _Property- $i$_ holds if $\deg(P_{j})\leq i^{\prime}$ for all
$m-m_{i^{\prime}}+1\leq j\leq m-m_{i^{\prime}+1}$ with $i^{\prime}\leq i$.
Clearly Property-0 holds. Suppose that Property-$(i-1)$ holds for some $1\leq
i\leq s$. Then by the converse direction and Corollary B.4 of [12],

$\Bigl{(}\prod_{j=1}^{m-m_{i}}\exp(P_{j}(n)X_{j})\Bigr{)}^{-1}g(n)=\prod_{j=m-m_{i}+1}^{m}\exp(P_{j}(n)X_{j})$

belongs to $g\in\text{poly}(\mathbb{Z}^{d}\to G_{\mathbb{N}})$. So
$\prod_{j=m-m_{i}+1}^{m-m_{i+1}}\exp(P_{j}(n)X_{j})\mod G_{i+1}$ belongs to
$\text{poly}(\mathbb{Z}^{d}\to(G/G_{i+1})_{\mathbb{N}})$. Since
$G_{i}/G_{i+1}$ is abelian, by the definition of
$\text{poly}(\mathbb{Z}^{d}\to(G/G_{i+1})_{\mathbb{N}})$,

$\Delta_{h_{i+1}}\dots\Delta_{h_{1}}\prod_{j=m-m_{i}+1}^{m-m_{i+1}}\exp(P_{j}(n)X_{j})\equiv\prod_{j=m-m_{i}+1}^{m-m_{i+1}}\exp(\Delta_{h_{i+1}}\dots\Delta_{h_{1}}P_{j}(n)X_{j})\equiv
0\mod G_{i+1}$

for all $n,h_{1},\dots,h_{i+1}\in\mathbb{Z}^{d}$. This means that
$\deg(P_{j})\leq i$ for all $m-m_{i}+1\leq j\leq m-m_{i+1}$. So Property-$i$
holds.

Inductively we have that Property-$s$ holds and we are done. ∎

###  2.2. Partially periodic polynomial sequences

We may extend the concept of partially periodic polynomial sequences defined
in [19] naturally for more general filtrations.

######  Definition 2.16 (Partially periodic polynomial sequences).

Let $I$ be the degree, multi-degree or degree-rank ordering,
$k\in\mathbb{N}_{+}$ with $\dim(I)|k$, $G/\Gamma$ be an $I$-filtered
nilmanifold, $p$ be a prime, and $\Omega$ be a subset of $\mathbb{Z}^{k}$. Let
$\text{poly}(\Omega\to G_{I}|\Gamma)$ denote the set of all
$g\in\text{poly}(\mathbb{Z}^{k}\to G_{I})$ such that $g(n)\in\Gamma$ for all
$n\in\Omega+p\mathbb{Z}^{k}$, and $\text{poly}_{p}(\Omega\to G_{I}|\Gamma)$
denote the set of all $g\in\text{poly}(\mathbb{Z}^{k}\to G_{I})$ such that
$g(n+pm)^{-1}g(n)\in\Gamma$ for all $n\in\Omega+p\mathbb{Z}^{k}$ and
$m\in\mathbb{Z}^{k}$.

Let $\text{poly}(\mathbb{F}_{p}^{k}\to G_{I})$ denote the set of all functions
of the form $f\circ\tau$ for some $f\in\text{poly}(\mathbb{Z}^{k}\to G_{I})$.
For a subset $\Omega$ of $\mathbb{F}_{p}^{k}$, let $\text{poly}_{p}(\Omega\to
G_{I}|\Gamma)$ denote the set of all functions of the form $f\circ\tau$ for
some $f\in\text{poly}_{p}(\iota^{-1}(\Omega)\to
G_{I}|\Gamma)=\text{poly}_{p}(\tau(\Omega)\to G_{I}|\Gamma)$ (note that
$\iota^{-1}(\Omega)=\tau(\Omega)+p\mathbb{Z}^{k}$). We define
$\text{poly}(\Omega\to G_{I}|\Gamma)$ similarly.

For $\Omega\subseteq\mathbb{Z}^{k}$ or $\mathbb{F}_{p}^{k}$, we call functions
in $\text{poly}_{p}(\Omega\to G_{I}|\Gamma)$ _partially $p$-periodic
polynomial sequences on $\Omega$._

As is explain in Example 3.16 of [19], $\text{poly}_{p}(\Omega\to
G_{I}|\Gamma)$ is not closed under multiplication. However, we have the
following:

######  Lemma 2.17.

Let $I$ be the degree, multi-degree or degree-rank ordering,
$k\in\mathbb{N}_{+}$ with $\dim(I)|k$, $G/\Gamma$ be an $I$-filtered
nilmanifold, $p$ be a prime, and $\Omega$ be a subset of $\mathbb{Z}^{k}$. For
all $f\in\text{poly}_{p}(\Omega\to G_{I}|\Gamma)$ and
$g\in\text{poly}(\Omega\to G_{I}|\Gamma)$, we have that
$fg\in\text{poly}_{p}(\Omega\to G_{I}|\Gamma)$.

The proof of Lemma 2.17 is almost identical to that of Lemma 3.17 in [19]. So
we omit the details.

As is explained in Example 3.18 of [19], partially $p$-periodic polynomial
sequences are not closed under translations and transformations. However, the
following proposition asserts that partially $p$-periodic are closed under
translations and transformations modulo $\Gamma$.

######  Proposition 2.18.

Let $I$ be the degree, multi-degree or degree-rank ordering,
$k\in\mathbb{N}_{+}$ with $\dim(I)|k$, $G/\Gamma$ be an $I$-filtered
nilmanifold, $p$ be a prime, $\Omega$ be a subset of $\mathbb{F}_{p}^{k}$, and
$g\in\text{poly}_{p}(\Omega\to G_{I}|\Gamma)$.

  1. (i)

For any $h\in\mathbb{F}_{p}^{k}$, there exists
$g^{\prime}\in\text{poly}_{p}((\Omega-h)\to G_{I}|\Gamma)$ such that
$g(n+h)\Gamma=g^{\prime}(n)\Gamma$ for all $n\in\Omega-h$.

  2. (ii)

If $I$ is the degree filtration, then for any $k^{\prime}\in\mathbb{N}_{+}$
and linear transformation
$L\colon\mathbb{F}_{p}^{k^{\prime}}\to\mathbb{F}_{p}^{k}$, there exists
$g^{\prime\prime}\in\text{poly}_{p}(L^{-1}(\Omega)\to G_{I}|\Gamma)$ such that
$g(L(n))\Gamma=g^{\prime\prime}(n)\Gamma$ for all $n\in L^{-1}(\Omega)$.

The proof of Proposition 2.18 is almost identical to that of Lemma 3.19 in
[19]. So we omit the details.

###  2.3. The Baker-Campbell-Hausdorff formula

The material of this section comes from Appendix C of [8]. We write it down
for completeness.

Let $G$ be a group, $t\in\mathbb{N}_{+}$ and $g_{1},\dots,g_{t}\in G$. The
_iterated commutator_ of $g_{1}$ is defined to be $g_{1}$ itself. Iteratively,
we define an _iterated commutator_ of $g_{1},\dots,g_{t}$ to be an element of
the form $[w,w^{\prime}]$, where $w$ is an iterated commutator of
$g_{i_{1}},\dots,g_{i_{r}}$, $w^{\prime}$ is an iterated commutator of
$g_{i^{\prime}_{1}},\dots,g_{i^{\prime}_{r^{\prime}}}$ for some $1\leq
r,r^{\prime}\leq t-1$ with $r+r^{\prime}=t$ and
$\\{i_{1},\dots,i_{r}\\}\cup\\{i^{\prime}_{1},\dots,i^{\prime}_{r^{\prime}}\\}=\\{1,\dots,t\\}$.

Similarly, let $X_{1},\dots,X_{t}$ be elements of a Lie algebra. The _iterated
Lie bracket_ of $X_{1}$ is defined to be $X_{1}$ itself. Iteratively, we
define an _iterated Lie bracket_ of $X_{1},\dots,X_{t}$ to be an element of
the form $[w,w^{\prime}]$, where $w$ is an iterated Lie bracket of
$X_{i_{1}},\dots,X_{i_{r}}$, $w^{\prime}$ is an iterated Lie bracket of
$X_{i^{\prime}_{1}},\dots,X_{i^{\prime}_{r^{\prime}}}$ for some $1\leq
r,r^{\prime}\leq t-1$ with $r+r^{\prime}=t$ and
$\\{i_{1},\dots,i_{r}\\}\cup\\{i^{\prime}_{1},\dots,i^{\prime}_{r^{\prime}}\\}=\\{1,\dots,t\\}$.

Let $G$ be a connected and simply connected nilpotent Lie group. The _Baker-
Campbell-Hausdorff formula_ asserts that for all $X_{1},X_{2}\in\log G$, we
have

$\exp(X_{1})\exp(X_{2})=\exp\Bigl{(}X_{1}+X_{2}+\frac{1}{2}[X_{1},X_{2}]+\prod_{\alpha}c_{\alpha}X_{\alpha}\Bigr{)},$

where $\alpha$ is a finite set of labels, $c_{\alpha}$ are real constants, and
$X_{\alpha}$ are iterated Lie brackets with $k_{1,\alpha}$ copies of $X_{1}$
and $k_{2,\alpha}$ copies of $X_{2}$ for some $k_{1,\alpha},k_{2,\alpha}\geq
1$ and $k_{1,\alpha}+k_{2,\alpha}\geq 3$. One may use this formula to show
that for all $g_{1},g_{2}\in G$ and $x\in\mathbb{R}$, we have that

$(g_{1}g_{2})^{x}=g_{1}^{x}g_{2}^{x}\prod_{\alpha}g_{\alpha}^{Q_{\alpha}(x)},$

where $\alpha$ is a finite set of labels, $g_{\alpha}$ are iterated
commutators with $k_{1,\alpha}$ copies of $g_{1}$ and $k_{2,\alpha}$ copies of
$X_{2}$ for some $k_{1,\alpha},k_{2,\alpha}\geq 1$, and
$Q_{\alpha}\colon\mathbb{R}\to\mathbb{R}$ are polynomials of degrees at most
$k_{1,\alpha}+k_{2,\alpha}$ without constant terms.

Similarly, one can show that for any $g_{1},g_{2}\in G$ and
$x_{1},x_{2}\in\mathbb{R}$, we have that

$[g_{1}^{x_{1}},g_{2}^{x_{2}}]=[g_{1},g_{2}]^{x_{1}x_{2}}\prod_{\alpha}g_{\alpha}^{P_{\alpha}(x_{1},x_{2})},$

where $\alpha$ is a finite set of labels, $g_{\alpha}$ are iterated
commutators with $k_{1,\alpha}$ copies of $g_{1}$ and $g_{2,\alpha}$ copies of
$X_{2}$ for some $k_{1,\alpha},k_{2,\alpha}\geq 1$,
$k_{1,\alpha}+k_{2,\alpha}\geq 3$, and
$P_{\alpha}\colon\mathbb{R}^{2}\to\mathbb{R}$ are polynomials of degrees at
most $k_{1,\alpha}$ in $x_{1}$ and at most $k_{2,\alpha}$ in $x_{2}$ which
vanishes when $x_{1}x_{2}=0$.

###  2.4. Type-I horizontal torus and character

In this section, we recall the definitions of type-I horizontal torus and
character defined in [19].

######  Definition 2.19 (Type-I horizontal torus and character).

Let $G/\Gamma$ be a nilmanifold endowed with a Mal’cev basis $\mathcal{X}$.
The _type-I horizontal torus_ of $G/\Gamma$ is $G/[G,G]\Gamma$. A _type-I
horizontal character_ is a continuous homomorphism $\eta\colon G\to\mathbb{R}$
such that $\eta(\Gamma)\subseteq\mathbb{Z}$. When written in the coordinates
relative to $\mathcal{X}$, we may write $\eta(g)=k\cdot\psi(g)$ for some
unique $k=(k_{1},\dots,k_{m})\in\mathbb{Z}^{m}$, where $\psi\colon
G\to\mathbb{R}^{m}$ is the coordinate map with respect to the Mal’cev basis
$\mathcal{X}$. We call the quantity $\|\eta\|:=|k|=|k_{1}|+\dots+|k_{m}|$ the
_complexity_ of $\eta$ (with respect to $\mathcal{X}$).

It is not hard to see that any type-I horizontal character mod $\mathbb{Z}$
vanishes on $[G,G]\Gamma$ and thus descent to a continuous homomorphism
between the type-I horizontal torus $G/[G,G]\Gamma$ and
$\mathbb{R}/\mathbb{Z}$. Moreover, $\eta\mod\mathbb{Z}$ is a well defined map
from $G/\Gamma$ to $\mathbb{R}/\mathbb{Z}$.

Type-I horizontal torus and character are used to characterize whether a
nisequence is equidistributed on a nilmanifold [10, 15]. The following lemma
is a generalization of Lemma 3.21 of [19] to multi-degree filtrations. Its
proof is similar to that of Lemma B.9 of [12] and Lemma 2.8 of [2]. We omit
the details.

######  Lemma 2.20.

Let $d,k\in\mathbb{N}_{+}$, $H=(\mathbb{Z}^{d})^{k}$ or
$(\mathbb{R}^{d})^{k}$, and $G$ be an $\mathbb{N}^{k}$-filtered group of
degree $\leq J$ for some finite downset $J$. We complete the partial order on
$J$ to a total ordering in an arbitrary fashion. A function $g\colon H\to G$
belongs to $\text{poly}(H\to G_{\mathbb{N}^{k}})$ if and only if for all
$m=(m_{1},\dots,m_{k})\in(\mathbb{N}^{d})^{k}$ with
$(|m_{1}|,\dots,|m_{k}|)\in J$, there exists
$X_{m}\in\log(G_{(|m_{1}|,\dots,|m_{k}|)})$ such that

$g(n)=\prod_{m=(m_{1},\dots,m_{k})\in(\mathbb{N}^{d})^{k},(|m_{1}|,\dots,|m_{k}|)\in
J}\exp\Bigl{(}\binom{n}{m}X_{m}\Bigr{)}.$

Moreover, if $g\in\text{poly}(H\to G_{\mathbb{N}^{k}})$, then the choice of
$X_{m}$ are unique.

Furthermore, if $G^{\prime}$ is a subgroup of $G$ and $g$ takes values in
$G^{\prime}$, then $X_{m}\in\log(G^{\prime})$ for all $m$.

An equivalent way of saying that a function $g\colon H\to G$ belongs to
$\text{poly}(\mathbb{Z}^{k}\to G_{\mathbb{N}^{k}})$ is that

(2.1)
$g(n)=\prod_{m=(m_{1},\dots,m_{k})\in(\mathbb{N}^{d})^{k},(|m_{1}|,\dots,|m_{k}|)\in
J}g_{m}^{\binom{n}{m}}$

for some $g_{m}\in G_{(|m_{1}|,\dots,|m_{k}|)}$ (with any fixed order in
$\mathbb{N}^{k}$). We call $g_{m}$ the _( $m$-th) type-I Taylor coefficient_
of $g$, and (2.1) the _type-I Taylor expansion_ of $g$.

###  2.5. Type-II horizontal torus and character

In this paper, in addition the type-I horizontal torus and character, we also
need to use the type-II horizontal torus and character, which are defined in
Definition 9.6 of [12] and can be used to characterize Ratner-type theorem for
nilmanifolds with degree-rank filtrations.

######  Definition 2.21 (Type-II Taylor coefficients).

Let $G$ be a degree-rank-filtered connected, simply-connected nilpotent Lie
group with filtration $(G_{[s,r]})_{[s,r]\in\text{DR}}$. For every
$i\in\mathbb{N}_{+}$, define the _$i$ -th type-II horizontal space_
$\text{Horiz}_{i}(G)$ to be the abelian group

$\text{Horiz}_{i}(G):=G_{[i,1]}/G_{[i,2]},$

with the convention that $G_{[s,r]}:=G_{[s+1,0]}$ if $r>s$ (in particular,
$G_{[1,2]}=G_{[2,0]}$). If $\Gamma$ is a subgroup of $G$, then define

$\text{Horiz}_{i}(G/\Gamma):=\text{Horiz}_{i}(G)/\text{Horiz}_{i}(\Gamma).$

It is easy to see that the type-II horizontal spaces $\text{Horiz}_{i}(G)$ are
abelian Lip groups and that $\text{Horiz}_{i}(\Gamma)$ is a sublattice of
$\text{Horiz}_{i}(G)$. So $\text{Horiz}_{i}(G/\Gamma)$ is a torus, which we
call the _$i$ -th type-II horizontal torus_ of $G/\Gamma$.

For any $d\in\mathbb{N}_{+}$, $g\in\text{poly}(\mathbb{Z}^{d}\to
G_{\text{DR}})$ and $m=(m_{1},\dots,m_{d})\in\mathbb{N}^{d}$ with $|m|=i$, we
define the _$m$ -th type-II Taylor coefficient_ $\text{Taylor}_{m}(g)$ to be
the quantity

$\text{Taylor}_{m}(g):=\Delta_{e_{1}}\dots\Delta_{e_{1}}\dots\Delta_{e_{d}}\dots\Delta_{e_{d}}g(n)\mod
G_{[i,2]}$

for any $n\in\mathbb{Z}^{d}$, where $\Delta_{e_{j}}$ occurs $m_{j}$ times for
all $1\leq j\leq d$ and $e_{j}\in\mathbb{Z}^{d}$ is the $j$-th standard unit
vector. Note that this map is well defined since $\text{Taylor}_{m}(g)$ takes
values in $G_{[i,1]}$ and has first derivatives in $G_{[i+1,1]}\subseteq
G_{[i,2]}$ (and thus is independent of the choice of $n$). Denote

$\text{Taylor}_{i}(g)(h_{1},\dots,h_{i}):=\Delta_{h_{i}}\dots\Delta_{h_{1}}g(n)\mod
G_{[i,2]}$

for $h_{1},\dots,h_{i}\in\mathbb{Z}^{d}$ (again this quantity is independent
of the choice of $n$). By Corollary B.7 of [12], it is not hard to see that
$\text{Taylor}_{i}(g)(h_{1},\dots,h_{i})$ is a homogeneous polynomial of
multi-degree $(1,\dots,1)$ in the variables $h_{1},\dots,h_{i}$, and is
symmetric in the variables $h_{1},\dots,h_{i}$.

If $G$ is a connected, simply-connected nilpotent Lie group with a degree
filtration $G_{\mathbb{N}}$, then we may define the type-II Taylor coefficient
and type-II horizontal toruses similarly with
$(G_{[s,r]})_{[s,r]\in\text{DR}}$ being the natural degree-rank filtration
induced by $G_{\mathbb{N}}$.

By Corollary B.7 of [12] (see also the discussion on page 1282 of [12]), we
have:

######  Lemma 2.22.

Let $d\in\mathbb{N}_{+}$ and $G/\Gamma$ be a nilmanifold of degree at most $s$
with a filtration $G_{\mathbb{N}}$. For all
$g,g^{\prime}\in\text{poly}(\mathbb{Z}^{d}\to G_{\mathbb{N}})$ and
$m\in\mathbb{N}^{d}$, we have that

$\text{Taylor}_{m}(gg^{\prime})(h_{1},\dots,h_{i})=\text{Taylor}_{m}(g)(h_{1},\dots,h_{i})\cdot\text{Taylor}_{m}(g^{\prime})(h_{1},\dots,h_{i})\mod
G_{[i,2]}.$

In other words, the map $g\mapsto\text{Taylor}_{m}(g)$ is a homomorphism.

######  Definition 2.23 ($i$-th type-II horizontal character).

For $i\in\mathbb{N}_{+}$ and an $\mathbb{N}$-filtered or DR-filtered
nilmanifold $G/\Gamma$. An _$i$ -th type-II horizontal character_ is a
continuous homomorphisms $\xi_{i}\colon\text{Horiz}_{i}(G)\to\mathbb{R}$ with
$\xi_{i}(\text{Horiz}_{i}(\Gamma))\subseteq\mathbb{Z}$. We use
$\mathfrak{N}_{i}(G/\Gamma)$ to denote the group of all $i$-th type-II
horizontal characters.

The Mal’cev basis $\mathcal{X}$ induces a natural isomorphism $\psi\colon
G_{[i,1]}/G_{[i,2]}\to\mathbb{R}^{k}$, and thus we may write
$\eta_{i}(g_{i}):=(m_{1},\dots,m_{k})\cdot\psi(g_{i})$ for some
$m_{1},\dots,m_{k}\in\mathbb{Z}$, where $k=\dim(G_{[i,1]})-\dim(G_{[i,2]})$.
We call the quantity $\|\eta_{i}\|:=|m_{1}|+\dots+|m_{k}|$ the _complexity_ of
$\eta_{i}$ (with respect to $\mathcal{X}$).

We provide a formula for further uses.

######  Lemma 2.24.

Let $d,i\in\mathbb{N}_{+}$, $G/\Gamma$ be an $\mathbb{N}$-filtered
nilmanifold, $g(n)\in\text{poly}(\mathbb{Z}^{d}\to G_{\mathbb{N}})$, and
$\xi_{i}\in\mathfrak{N}_{i}(G/\Gamma)$. Then

(2.2)
$\begin{split}\xi_{i}(\text{Taylor}_{i}(g)(h_{1},\dots,h_{i}))=\Delta_{h_{i}}\dots\Delta_{h_{1}}\Bigl{(}\sum_{m\in\mathbb{N}^{d},|m|=i}\xi_{i}(\text{Taylor}_{m}(g))\binom{n}{m}\Bigr{)}.\end{split}$

###### Proof.

By Corollary B.7 of [12], it is not hard to see that both sides of (2.2) are
symmetric and multi-linear in $h_{1},\dots,h_{i}$, and are independent of $n$
(see also the remark on page 1281 of [12]). On the other hand, for any
$m=(m_{1},\dots,m_{d})\in\mathbb{N}^{d}$ with $|m|=i$, if we take $m_{t}$ many
$h_{1},\dots,h_{i}$ to be equal to $e_{t}$ for all $1\leq t\leq d$, then both
sides of (2.2) equals to $\xi_{i}(\text{Taylor}_{m}(g))$. So by multi-
linearity, we have that (2.2) holds. ∎

For $p$-periodic polynomial sequences, we have some $p$-periodicity properties
for their type-II Taylor coefficients.

######  Lemma 2.25.

Let $d,i\in\mathbb{N}_{+}$, $p$ be a prime, $G/\Gamma$ be an
$\mathbb{N}$-filtered nilmanifold, $g\in\text{poly}_{p}(\mathbb{Z}^{d}\to
G_{\mathbb{N}}|\Gamma)$, and $\xi_{i}$ be an $i$-th type-II horizontal
character of $G/\Gamma$. Then the map
$(h_{1},\dots,h_{i})\mapsto\xi_{i}(\text{Taylor}_{i}(g)(h_{1},\dots,h_{i}))$
is a homogeneous $p$-periodic symmetric polynomial of multi-degree
$(1,\dots,1)$. Moreover, $\text{Taylor}_{m}(g)^{p}\in G_{[i,2]}\Gamma$ and
$\xi_{i}(\text{Taylor}_{m}(g))\in\mathbb{Z}/p$ for all $m\in\mathbb{N}^{d}$
with $|m|=i$.

###### Proof.

It follows from Corollary B.7 of [12] that
$\xi_{i}(\text{Taylor}_{i}(g)(h_{1},\dots,h_{i}))$ a homogeneous symmetric
polynomial of multi-degree $(1,\dots,1)$ (see also the remark on page 1281 of
[12]). We now show that it is $p$-periodic. Note that if $h_{1}\in
p\mathbb{Z}^{d}$, then by the Baker-Campbell-Hausdorff formula,

$\Delta_{h_{i}}\dots\Delta_{h_{1}}g(n)\equiv\Delta_{h_{i}}\dots\Delta_{h_{2}}(g_{h_{1}}(n))\mod
G_{[2,2]},$

where $g_{h_{1}}(n):=g(n)^{-1}g(n+h_{1})$ takes values in $\Gamma$. So
$\Delta_{h_{i}}\dots\Delta_{h_{1}}g(n)\in G_{[2,2]}\Gamma$ and thus

(2.3)
$\begin{split}\xi_{i}(\text{Taylor}_{i}(g)(h_{1},\dots,h_{i}))\equiv\xi_{i}(\Delta_{h_{i}}\dots\Delta_{h_{1}}g(n)\mod
G_{[i,2]})\in\mathbb{Z}\text{ if }h_{1}\in p\mathbb{Z}^{d}.\end{split}$

Since $\xi_{i}(\text{Taylor}_{i}(g)(h_{1},\dots,h_{i}))$ is multi-linear and
symmetric, it is not hard to deduce from (2.3) that
$\xi_{i}(\text{Taylor}_{i}(g)(h_{1},\dots,h_{i}))$ is $p$-periodic.

So by Lemma 2.24, $\xi_{i}(\text{Taylor}_{m}(g))\in\mathbb{Z}/p$ for all
$m\in\mathbb{N}^{d}$ with $|m|=i$. Since $\xi_{i}$ is an arbitrary $i$-th
type-II horizontal character of $G/\Gamma$, we have that
$\text{Taylor}_{m}(g)^{p}$ vanishes at every $i$-th type-II horizontal
character of $G/\Gamma$. So $\text{Taylor}_{m}(g)^{p}\in G_{[i,2]}\Gamma$. ∎

###  2.6. Ratner-type theorem

Following the idea of [12], we use the factorization theorem to obtain a
Ratner-type theorem. For an $\mathbb{N}$-filtered nilmanifold $G/\Gamma$ and
$i\in\mathbb{N}_{+}$, recall that $\mathfrak{N}_{i}(G/\Gamma)$ is the group of
all $i$-th type-II horizontal characters.

######  Definition 2.26.

Let $g(n)\in\text{poly}_{p}(\mathbb{Z}^{d}\to G_{\mathbb{N}}|\Gamma)$ and
$\Omega$ be a subset of $\mathbb{Z}^{d}$. Let $\Xi_{\Omega,i}(g)$ denote the
group of all $\xi_{i}\in\mathfrak{N}_{i}(G/\Gamma)$ such that

$\xi_{i}(\text{Taylor}_{i}(g)(h_{1},\dots,h_{i}))=\xi_{i}(\Delta_{h_{i}}\dots\Delta_{h_{1}}g(n)\mod
G_{[i,2]})\in\mathbb{Z}$

for all $(n,h_{1},\dots,h_{i})\in\Box_{p,i}(\Omega)$.888Note that
$\xi_{i}(\Delta_{h_{i}}\dots\Delta_{h_{1}}g(n)\mod G_{[i,2]})$ is well defined
since $\Delta_{h_{i}}\dots\Delta_{h_{1}}g(n)\in G_{i}$. Let

$\Xi_{\Omega,i}^{\perp}(g):=\\{x\in\text{Horiz}_{i}(G)\colon\xi_{i}(x)\in\mathbb{Z}\text{
for all }\xi_{i}\in\Xi_{\Omega,i}(g)\\}.$

If $\Omega$ is a subset of $\mathbb{F}_{p}^{d}$ and
$g=g^{\prime}\circ\tau\in\text{poly}_{p}(\mathbb{F}_{p}^{d}\to
G_{\mathbb{N}}|\Gamma)$ for some
$g^{\prime}\in\text{poly}_{p}(\mathbb{Z}^{d}\to G_{\mathbb{N}}|\Gamma)$, then
denote $\Xi_{\Omega,i}(g):=\Xi_{\tau(\Omega),i}(g^{\prime})$ and
$\Xi_{\Omega,i}^{\perp}(g):=\Xi_{\tau(\Omega),i}^{\perp}(g^{\prime})$.

######  Lemma 2.27.

Suppose that $g=g^{\prime}\circ\tau=g^{\prime\prime}\circ\tau$ for some
$g^{\prime},g^{\prime\prime}\in\text{poly}_{p}(\tau(\Omega)\to
G_{\mathbb{N}}|\Gamma)$. Then
$\Xi_{\tau(\Omega),i}(g^{\prime})=\Xi_{\tau(\Omega),i}(g^{\prime\prime})$ and
$\Xi^{\perp}_{\tau(\Omega),i}(g^{\prime})=\Xi_{\tau(\Omega),i}^{\perp}(g^{\prime\prime})$.
In particular, $\Xi_{\Omega,i}(g)$ and $\Xi_{\Omega,i}^{\perp}(g)$ are well
defined and are independent of the choice of $g^{\prime}$.

###### Proof.

It suffices to show that for all $\xi_{i}\in\mathfrak{N}_{i}(G/\Gamma)$ and
$(n,h_{1},\dots,h_{i})\in\Box_{p,i}(\tau(\Omega))$, we have that

(2.4)
$\xi_{i}(\text{Taylor}_{i}(g^{\prime})(h_{1},\dots,h_{i}))=\xi_{i}(\text{Taylor}_{i}(g^{\prime\prime})(h_{1},\dots,h_{i})).$

Note that $g^{\prime}(n)=g^{\prime\prime}(n)$ for all $n\in\tau(\Omega)$. So
for all $n\in\tau(\Omega)$ and $m,m^{\prime}\in(\mathbb{Z}^{d})^{k}$,

(2.5)
$g^{\prime}(n+pm)^{-1}g^{\prime\prime}(n+pm^{\prime})=(g^{\prime}(n+pm)^{-1}g^{\prime}(n))(g^{\prime\prime}(n)^{-1}g^{\prime\prime}(n+pm^{\prime}))\in\Gamma.$

For all $(n,h_{1},\dots,h_{i})\in\Box_{p,i}(\tau(\Omega))$, since
$n+\epsilon_{1}h_{1}+\dots+\epsilon_{i}h_{i}\in\tau(\Omega)+p(\mathbb{Z}^{d})^{k}$
for all $\epsilon_{1},\dots,\epsilon_{i}\in\\{0,1\\}$, it follows from (2.5)
that
$\Delta_{h_{i}}\dots\Delta_{h_{1}}({g^{\prime}}^{-1}g^{\prime\prime})(n)\in
G_{[i,2]}\Gamma$. Therefore, we have that

$\xi_{i}(\text{Taylor}_{i}({g^{\prime}}^{-1}g^{\prime\prime})(h_{1},\dots,h_{i}))=\xi_{i}(\Delta_{h_{i}}\dots\Delta_{h_{1}}({g^{\prime}}^{-1}g^{\prime\prime})(n)\mod
G_{[i,2]})\in\mathbb{Z}$

for all $(n,h_{1},\dots,h_{i})\in\Box_{p,i}(\tau(\Omega))$. By Lemma 2.22, we
get (2.4). ∎

We are now ready to state the Ratner-type theorem, in the proof of which we
make essential use of the factorization theorem proved in the first part of
the series [19]. For $i\in\mathbb{N}$, let $\pi_{\text{Horiz}_{i}(G)}\colon
G_{i}\to\text{Horiz}_{i}(G)$ be the projection map.

######  Theorem 2.28 (Ratner-type theorem).

Let $0<\delta<1/2,C>0$, $d,D\in\mathbb{N}_{+}$, $r,s\in\mathbb{N}$ and
$p\gg_{C,\delta,d,D}1$ be a prime. Let
$M\colon\mathbb{F}_{p}^{d}\to\mathbb{F}_{p}$ be a non-degenerate quadratic
form and $V+c$ be an affine subspace of $\mathbb{F}_{p}^{d}$ of co-dimension
$r$ with $\text{rank}(M|_{V+c})=d-r$. Let $G/\Gamma$ be an $s$-step
$\mathbb{N}$-filtered nilmanifold of complexity at most $C$, equipped with an
$C$-rational Mal’cev basis $\mathcal{X}$, and that
$g\in\text{poly}_{p}(V(M)\cap(V+c)\to G_{\mathbb{N}}|\Gamma)$. Let
$F\in\text{Lip}(G/\Gamma\to\mathbb{C}^{D})$ be a function with
$\|F\|_{\text{Lip}(G/\Gamma\to\mathbb{C}^{D})}\leq C$ such that

$|\mathbb{E}_{n\in V(M)\cap(V+c)}F(g(n)\Gamma)|\geq\delta.$

If $d\geq s+r+13$ and $p\gg_{C,\delta,d,D}1$, then there exist $\epsilon\in G$
of complexity $O_{C,\delta,D,d}(1)$ and a rational subgroup $G_{P}$ of $G$
which is $O_{C,\delta,d,D}(1)$-rational relative to $\mathcal{X}$ such that
for all $i\in\mathbb{N}_{+}$, $\pi_{\text{Horiz}_{i}(G)}(G_{P}\cap
G_{i})\geq\Xi^{\perp}_{V(M)\cap(V+c),i}(g)$ and

$\Bigl{|}\int_{G_{P}/\Gamma_{P}}F(\epsilon
x)\,dm_{G_{P}/\Gamma_{P}}(x)\Bigr{|}\geq\delta/2,$

where $m_{G_{P}/\Gamma_{P}}$ is the Haar measure of $G_{P}/\Gamma_{P}$.

###### Proof.

By taking components we may assume that $F$ is scalar-valued. Let
$\mathcal{F}\colon\mathbb{R}_{+}\to\mathbb{R}_{+}$ be a growth function to be
chosen later depending only on $C,\delta,d,D$. By Theorem A.14, if
$p\gg_{C,\delta,d-r,\mathcal{F}}1$, then we may write

$g=\epsilon g^{\prime}\gamma,$

where $\epsilon\in G$ is of complexity $O_{C^{\prime}}(1)$,
$g^{\prime}\in\text{poly}_{p}(V(M)\cap(V+c)\to(G_{P})_{\mathbb{N}}|\Gamma)$
with $(g^{\prime}(n)\Gamma)_{n\in V(M)\cap(V+c)}$ being
$\mathcal{F}(C^{\prime})^{-1}$-equidistributed (see Appendix A.7 for
definition) on some sub-nilmanifold $G_{P}/(G_{P}\cap\Gamma)$ of $G/\Gamma$
for some subgroup $G_{P}$ of $G$ which is $C^{\prime}$-rational relative to
$\mathcal{X}$ for some $C\leq C^{\prime}\leq O_{C,d-r,\mathcal{F}}(1)$, and
$\gamma\in\text{poly}(V(M)\cap(V+c)\to G_{\mathbb{N}}|G_{P}\cap\Gamma)$. So

(2.6) $|\mathbb{E}_{n\in V(M)\cap(V+c)}F(\epsilon
g^{\prime}(n)\Gamma)|=|\mathbb{E}_{n\in
V(M)\cap(V+c)}F(g(n)\Gamma)|\geq\delta.$

Since $(g^{\prime}(n)\Gamma)_{n\in V(M)\cap(V+c)}$ is
$\mathcal{F}(C^{\prime})^{-1}$-equidistributed on $G_{P}/(G_{P}\cap\Gamma)$,
we have

$\Bigl{|}\mathbb{E}_{n\in V(M)\cap(V+c)}F(\epsilon
g^{\prime}(n)\Gamma)-\int_{G_{P}/\Gamma_{P}}F(\epsilon
x)\,dm_{G_{P}/\Gamma_{P}}(x)\Bigr{|}\leq\mathcal{F}(C^{\prime})^{-1}\|F(\epsilon\cdot)\|_{\text{Lip}(G_{P}/\Gamma_{P})}.$

Since $\|F\|_{\text{Lip}(G/\Gamma)}\leq C$, we have that
$\|F\|_{\text{Lip}(G_{P}/\Gamma_{P})}\leq O_{C,C^{\prime},\delta,s}(1)$ and so
$\|F(\epsilon\cdot)\|_{\text{Lip}(G_{P}/\Gamma_{P})}\leq
O_{C,C^{\prime},\delta,s}(1)$ by Lemma A.5 of [10]. Therefore, if
$\mathcal{F}$ grows sufficiently fast depending on $C,\delta,d,D$, then we
have that

$\Bigl{|}\mathbb{E}_{n\in V(M)\cap(V+c)}F(\epsilon
g^{\prime}(n)\Gamma)-\int_{G_{P}/\Gamma_{P}}F(\epsilon
x)\,dm_{G_{P}/\Gamma_{P}}(x)\Bigr{|}<\delta/2$

and so it follows from (2.6) that

$\Bigl{|}\int_{G_{P}/\Gamma_{P}}F(\epsilon
x)\,dm_{G_{P}/\Gamma_{P}}(x)\Bigr{|}\geq\delta/2.$

It remains to show that

$\pi_{\text{Horiz}_{i}(G)}(G_{P}\cap
G_{i})\geq\Xi^{\perp}_{V(M)\cap(V+c),i}(g)$

for all $i\in\mathbb{N}_{+}$. If not, then by duality and the rational nature
of $G_{P}$, there exists $\xi_{i}\in\mathfrak{N}_{i}(G/\Gamma)$ not belonging
to $\Xi_{V(M)\cap(V+c),i}(g)$ which annihilates
$\pi_{\text{Horiz}_{i}(G)}(G_{P}\cap G_{i})$.

Write $g^{\prime}=\tilde{g}\circ\tau$ and $\gamma=\tilde{\gamma}\circ\tau$ for
some
$\tilde{g}\in\text{poly}_{p}(\tau(V(M)\cap(V+c))+p\mathbb{Z}^{d}\to(G_{P})_{\mathbb{N}}|G_{P}\cap\Gamma)$
and $\tilde{\gamma}\in\text{poly}(\tau(V(M)\cap(V+c))+p\mathbb{Z}^{d}\to
G_{\mathbb{N}}|\Gamma)$. Then $g=(\epsilon\tilde{g}\tilde{\gamma})\circ\tau$
and it follows from Lemma 2.17 that
$\epsilon\tilde{g}\tilde{\gamma}\in\text{poly}_{p}(\tau(V(M)\cap(V+c))+p\mathbb{Z}^{d}\to
G_{\mathbb{N}}|\Gamma)$. By Lemma 2.22,

(2.7)
$\begin{split}&\quad\xi_{i}(\Delta_{h_{i}}\dots\Delta_{h_{1}}\epsilon\tilde{g}\tilde{\gamma}(n)\mod
G_{[i,2]})\\\ &=\xi_{i}(\Delta_{h_{i}}\dots\Delta_{h_{1}}\epsilon\mod
G_{[i,2]})\xi_{i}(\Delta_{h_{i}}\dots\Delta_{h_{1}}\tilde{g}(n)\mod
G_{[i,2]})\xi_{i}(\Delta_{h_{i}}\dots\Delta_{h_{1}}\tilde{\gamma}(n)\mod
G_{[i,2]})\\\
&\equiv\xi_{i}(\Delta_{h_{i}}\dots\Delta_{h_{1}}\tilde{\gamma}(n)\mod
G_{[i,2]})\mod\mathbb{Z}.\end{split}$

Since $\tilde{\gamma}(n)$ takes values in $\Gamma$ when
$n\in\tau(V(M)\cap(V+c))+p\mathbb{Z}^{d}$, we have that

$\xi_{i}(\Delta_{h_{i}}\dots\Delta_{h_{1}}\tilde{\gamma}(n)\mod
G_{[i,2]})\in\mathbb{Z}$

for all $(n,h_{1},\dots,h_{i})\in\Box_{p,i}(\tau(V(M)\cap(V+c)))$. By (2.7),
we have that

$\xi_{i}(\Delta_{h_{i}}\dots\Delta_{h_{1}}\epsilon\tilde{g}\tilde{\gamma}(n)\mod
G_{[i,2]})\in\mathbb{Z}$

for all $(n,h_{1},\dots,h_{i})\in\Box_{p,i}(\tau(V(M)\cap(V+c)))$. So
$\xi_{i}\in\Xi_{\tau(V(M)\cap(V+c)),i}(\epsilon\tilde{g}\tilde{\gamma})$. By
definition, $\xi_{i}\in\Xi_{V(M)\cap(V+c),i}(g)$, a contradiction. This
finishes the proof. ∎

###  2.7. Nilsequences and nilcharacters

We start with the definition of vertical torus and character, which plays an
important role in the equiditribution properties on nilmanifolds.

######  Definition 2.29 (Vertical torus and character).

Let $I$ be the degree, multi-degree, or degree-rank ordering, and $J$ be a
finite down set of $I$ having a maximum element $s$. Let $G/\Gamma$ be a
nilmanifold with an $I$-filtration $(G_{i})_{i\in I}$ with a Mal’cev basis
$\mathcal{X}$ adapted to it. Then $G_{s}$ lies in the center of $G$. The
_vertical torus_ of $G/\Gamma$ is the set $G_{s}/(\Gamma\cap G_{s})$. A
_vertical character_ of $G/\Gamma$ (with respect to the filtration
$(G_{i})_{i\in I}$) is a continuous homomorphism $\xi\colon
G_{s}\to\mathbb{R}$ such that $\xi(\Gamma\cap G_{s})\subseteq\mathbb{Z}$ (in
particular, $\xi$ descents to a continuous homomorphism from the vertical
torus $G_{s}/(\Gamma\cap G_{s})$ to $\mathbb{T}$). Let $\psi\colon
G\to\mathbb{R}^{m}$ be the Mal’cev coordinate map and denote
$m_{s}=\dim(G_{s})$. Then there exists $k\in\mathbb{Z}^{m_{s}}$ such that
$\xi(g_{s})=(\mathbb{0},k)\cdot\psi(g_{s})$ for all $g_{s}\in G_{s}$ (note
that the first $\dim(G)-m_{s}$ coordinates of $\psi(g_{s})$ are all zero). We
call the quantity $\|\xi\|:=|k|$ the _complexity_ of $\xi$ (with respect to
$\mathcal{X}$).

We now define nilsequences and nilcharacters. In addition to the conventional
definitions, we also define periodic and partially periodic nilsequences and
nilcharacters. Recall that for $D\in\mathbb{N}_{+}$, $\mathbb{S}^{D}$ denotes
the set of $(z_{1},\dots,z_{D})\in\mathbb{C}^{D}$ with
$|z_{1}|^{2}+\dots+|z_{D}|^{2}=1$.

######  Definition 2.30 (Nilsequences and nilcharacters).

Let $D,k\in\mathbb{N}_{+}$, $I$ be the degree, multi-degree, or degree-rank
ordering such that $\dim(I)|k$, and $J$ be a finite down set of $I$. Let
$\Omega$ be a subset $\mathbb{Z}^{k}$. We say that a function
$\phi\colon\Omega\to\mathbb{C}^{D}$ is an _( $I$-filtered) nilsequence_ on
$\Omega$ of degree $\subseteq J$ if

(2.8) $\phi(n)=F(g(n)\Gamma)\text{ for all }n\in\Omega$

for some nilmanifold $G/\Gamma$ with an $I$-filtration $(G_{i})_{i\in I}$ of
degree $\subseteq J$ equipped with some smooth Riemannian metric
$d_{G/\Gamma}$, some $g\in\text{poly}(\mathbb{Z}^{k}\to G_{I})$, and some
Lipschitz function $F\colon G/\Gamma\to\mathbb{C}^{D}$. We say that $D$ is the
_dimension_ of $\phi.$ If in addition,

  * •

$J$ has a maximal element $s$;

  * •

$F(g_{s}x)=\exp(\eta(g_{s}))F(x)$ for all $x\in G/\Gamma$ and $g_{s}\in G_{s}$
for some vertical character $\eta\colon G_{s}\to\mathbb{R}$ (we say that
$\eta$ is the _vertical frequency_ of $F$);

  * •

$F$ takes values in $\mathbb{S}^{D}$,

then we say that $\phi$ is a _$k^{\prime}$ -integral ($I$-filtered)
nilcharacter_ on $\Omega$ of degree $\subseteq J$, where
$k^{\prime}=\frac{k}{\dim(I)}$. Following Convention 2.14, we omit the phrase
$k^{\prime}$-integral throughout as the value of $k^{\prime}$ is clear given
$I$ and $\Omega$. A similar remark applies to the degree and the degree-rank
filtrations.

For any $s\in I$, we say that a function $\phi\colon\Omega\to\mathbb{C}^{D}$
is a ($I$-filtered) nilsequence/nilcharacter on $\Omega$ of degree $\leq s$ if
it is a ($I$-filtered) nilsequence/nilcharacter on $\Omega$ of degree
$\subseteq\\{i\in I\colon i\leq s\\}$.

If in addition, the polynomial sequence $g$ in (2.8) belongs to
$\text{poly}_{p}(\Omega\to G_{I}|\Gamma)$, then we say that $\phi$ is a
_partially $p$-periodic_ ($I$-filtered) nilsequence/nilcharacter on $\Omega$.

If in addition, the polynomial sequence $g$ in (2.8) belongs to
$\text{poly}_{p}(\mathbb{Z}^{k}\to G_{I}|\Gamma)$, then we say that $\phi$ is
a _$p$ -periodic_ ($I$-filtered) nilsequence/nilcharacter on $\Omega$.999Note
that we only define $p$-periodic nilsequence/nilcharacter on the designated
set $\Omega$. However, one can easily extend the definition of such a sequence
to the whole space $\mathbb{Z}^{k}$ by requiring (2.8) to hold for all
$n\in\mathbb{Z}^{k}$.

Let $\Omega$ be a subset of $\mathbb{F}_{p}^{k}$. Denote
$\Omega^{\prime}=\iota^{-1}(\Omega)=\tau(\Omega)+p\mathbb{Z}^{k}$. A function
$\phi\colon\Omega\to\mathbb{C}^{D}$ is an _( $I$-filtered)
nilsequence/nilcharacter_ on $\Omega$ of degree $\leq s$ (or $\subseteq J$) if
$\phi(n)=\phi^{\prime}\circ\tau(n)$ for all $n\in\Omega$ for some
($I$-filtered) nilsequence/nilcharacter
$\phi^{\prime}\colon\Omega^{\prime}\to\mathbb{C}^{D}$ on $\Omega$ of degree
$\leq s$ (or $\subseteq J$). We say that $\phi$ is _partially
$p$-periodic/$p$-periodic _ (or simply _partially perodic/periodic_) on
$\Omega$ if we may require $\phi^{\prime}$ to be partially
$p$-perodic/$p$-periodic on $\Omega^{\prime}$.

Note that we allow nilsequences and nilcharacters to be vector valued (i.e.
$D\geq 2$) in order to avoid certain topological obstructions in the
constructions of nilsequences. See [12] pages 1252–1255 for further
discussions.

We next define the spaces of nilsequences and nilcharacters that we will work
with in this paper.

######  Definition 2.31 (Spaces of nilsequences and nilcharacters).

Let $I$ be the degree, multi-degree, or degree-rank ordering,
$k\in\mathbb{N}_{+}$ with $\dim(I)|k$, $J$ be a finite down set of $I$, $p$ be
a prime, and $\Omega$ be a subset of $\mathbb{Z}^{k}$ or $\mathbb{F}_{p}^{k}$.

  * •

Let $\text{Nil}^{J}(\Omega)$ denote the set of all nilsequences on $\Omega$ of
degree $\subseteq J$.

  * •

Let $\text{Nil}^{J}_{p}(\Omega)$ denote the set of all $p$-periodic
nilsequences on $\Omega$ of degree $\subseteq J$.

  * •

Let $\Xi^{J}_{p}(\Omega)$ denote the set of $p$-periodic nilcharacters on
$\Omega$, if $J$ has a maximum element.

  * •

We define $\text{Nil}^{\prec J}(\Omega):=\text{Nil}^{J^{\prime}}(\Omega)$ and
$\text{Nil}^{\prec J}_{p}(\Omega):=\text{Nil}^{J^{\prime}}_{p}(\Omega)$, where
$J^{\prime}$ is the largest down set of $I$ which is contained in but not
equals to $J$. Since $I$ is the degree, multi-degree or the degree-rank
ordering, it is not hard to see that such $J^{\prime}$ exists and is unique.

  * •

For $s\in I$, we write $\text{Nil}^{s}(\Omega):=\text{Nil}^{J}(\Omega)$ and
$\text{Nil}^{\prec s}(\Omega):=\text{Nil}^{J^{\prime}}(\Omega)$, where $J$ is
the down set consisting of all $i\in I$ which does not exceed $s$ and
$J^{\prime}$ is the down set consisting of all $i\in I$ which does not exceed
$s^{\prime}$, where $s^{\prime}$ is the largest element which is smaller than
$s$ (if such $s^{\prime}$ exists). We use the similar notations for
$\text{Nil}^{s}_{p}(\Omega)$, $\text{Nil}^{\prec s}_{p}(\Omega)$,
$\Xi^{s}_{p}(\Omega)$ and $\Xi^{\prec s}_{p}(\Omega)$.

For convenience, we introduce the following definition.

######  Definition 2.32 (Representations of nilsequences and nilcharacters).

Let $I$ be the degree, multi-degree, or degree-rank ordering,
$k\in\mathbb{N}_{+}$ with $\dim(I)|k$, $J$ be a finite down set of $I$, $p$ be
a prime, and $\Omega$ be a subset of $\mathbb{Z}^{k}$.

  * •

For any $\phi\in\text{Nil}^{J}(\Omega)$, we may write
$\phi(n)=F(g(n)\Gamma),n\in\Omega$ for some degree-$J$ nilmanifold
$(G/\Gamma)_{I}$, $g\in\text{poly}(\mathbb{Z}^{k}\to G_{I})$, and Lipschitz
function $F\colon G/\Gamma\to\mathbb{C}^{D}$. We say that
$((G/\Gamma)_{I},g,F)$ is a _$\text{Nil}^{J}(\Omega)$ -representation_ of
$\phi$.

  * •

For any $\phi\in\text{Nil}^{J}_{p}(\Omega)$, we may write
$\phi(n)=F(g(n)\Gamma),n\in\Omega$ for some degree-$J$ nilmanifold
$(G/\Gamma)_{I}$, $g\in\text{poly}_{p}(\mathbb{Z}^{k}\to G_{I}|\Gamma)$, and
Lipschitz function $F\colon G/\Gamma\to\mathbb{C}^{D}$. We say that
$((G/\Gamma)_{I},g,F)$ is a _$\text{Nil}^{J}_{p}(\Omega)$ -representation_ of
$\phi$.

  * •

For any $\xi\in\Xi^{J}_{p}(\Omega)$, we may write
$\chi(n)=F(g(n)\Gamma),n\in\Omega$ for some degree-$J$ nilmanifold
$(G/\Gamma)_{I}$, $g\in\text{poly}(\mathbb{Z}^{k}\to G_{I}|\Gamma)$, and
Lipschitz function $F\colon G/\Gamma\to\mathbb{C}^{D}$ having a vertical
frequency $\eta$. We say that $((G/\Gamma)_{I},g,F,\eta)$ is a
_$\Xi^{J}_{p}(\Omega)$ -representation_ of $\chi$.

  * •

The complexity of a
$\text{Nil}^{J}(\Omega)/\text{Nil}^{J}_{p}(\Omega)/\Xi^{J}_{p}(\Omega)$-representation
is the the maximum of the complexities of $G/\Gamma$, $F$ and $\eta$ (if
$\eta$ appears in the corresponding definitions). We say that $\phi$ is of
_complexity_ at most $C$ as an element of
$\text{Nil}^{J}(\Omega)/\text{Nil}^{J}_{p}(\Omega)/\Xi^{J}_{p}(\Omega)$ if
$\phi$ admits a
$\text{Nil}^{J}(\Omega)/\text{Nil}^{J}_{p}(\Omega)/\Xi^{J}_{p}(\Omega)$-representation
of complexity at most $C$.

  * •

Let $\Omega^{\prime}\subseteq\mathbb{F}_{p}^{k}$ and
$\phi\in\text{Nil}^{J}(\Omega^{\prime})$. We say that $((G/\Gamma)_{I},g,F)$
is a _$\text{Nil}^{J}(\Omega^{\prime})$ -representation_ of $\phi$ if it is a
$\text{Nil}^{J}(\tau(\Omega^{\prime})+p\mathbb{Z}^{k})$-representation of some
$\phi^{\prime}\in\text{Nil}^{J}(\tau(\Omega^{\prime})+p\mathbb{Z}^{k})$ such
that $\phi(n)=\phi^{\prime}\circ\tau(n)$ for all $n\in\Omega^{\prime}$. We say
that $\phi$ is of _complexity_ at most $C$ as an element of
$\text{Nil}^{J}(\Omega^{\prime})$ if $\phi$ admits a
$\text{Nil}^{J}(\Omega^{\prime})$-representation of complexity at most $C$. We
adopt similar notations for $\text{Nil}^{J}_{p}(\Omega^{\prime})$\- and
$\Xi^{J}_{p}(\Omega^{\prime})$-representations and complexities.

  * •

We define similar notations for $\text{Nil}^{\prec J}(\Omega)$,
$\text{Nil}^{\prec s}(\Omega)$, ect.

######  Remark 2.33.

In certain situations, a sequence can belong to multiple sets defined above,
and have different complexities in different sets. For example, a sequence
$\phi$ can simultaneously belong to $\Xi^{s+1}_{p}(\Omega)$ and
$\text{Nil}^{s}(\Omega)$. In this case, the complexity of $\phi$ as an element
in $\Xi^{s+1}_{p}(\Omega)$ and the complexity of $\phi$ as an element in
$\text{Nil}^{s}(\Omega)$ are different. We will specify which complexity we
are referring to when such ambiguity happens.

######  Definition 2.34 (Complexity of nilsequences and nilcharacters).

Let $\text{Nil}^{J;C}(\Omega)$ denote the set of all nilsequences in
$\text{Nil}^{J}(\Omega)$ of complexity at most $C$ (as an element in
$\text{Nil}^{J;C}(\Omega)$), and $\text{Nil}^{J;C,D}(\Omega)$ denote the set
of all nilsequences in $\text{Nil}^{J;C}(\Omega)$ of complexity at most $C$
and dimension at most $D$. We adopt similar notations for
$\text{Nil}^{J}_{p}(\Omega)$, $\Xi^{J}_{p}(\Omega)$, $\text{Nil}^{\prec
J}(\Omega)$, $\text{Nil}^{s}(\Omega)$, ect.

We refer the readers to Appendix B for some approximation properties for
nilsequeneces which will be used in this paper.

Sometimes it is convenient to identify two nilcharacters when their difference
is a nilsequence of lower degree. Therefore, we introduce the following
notion:

######  Definition 2.35 (An equivalence relation for nilcharacters).

Let $k\in\mathbb{N}_{+}$, $C>0$, $p$ be a prime, $\Omega$ be a subset of
$\mathbb{F}_{p}^{k}$, $I$ be the degree, multi-degree, or degree-rank ordering
with $\dim(I)|k$ and let $s\in I$. For
$\chi,\chi^{\prime}\in\Xi^{s}_{p}(\Omega)$, we write
$\chi\sim_{C}\chi^{\prime}\mod\Xi^{s}_{p}(\Omega)$ if
$\chi\otimes\overline{\chi}\in\text{Nil}^{\prec s;C}(\Omega)$.101010Note that
if $\chi$ and $\chi^{\prime}$ to are $p$-periodic $s$-step nilcharacters, then
so is $\chi\otimes\overline{\chi}$. However, if $\chi\otimes\overline{\chi}$
coincides with a $\prec s$-step nilsequence, it is unclear whether
$\chi\otimes\overline{\chi}$ is $p$-periodic as a $\prec s$-step nilsequence.
In our definition, if $\chi\sim_{C}\chi^{\prime}\mod\Xi^{s}_{p}(\Omega)$, then
we do not require $\chi\otimes\overline{\chi}$ to be $p$-periodic as a $\prec
s$-step nilsequence. We write $\chi\sim\chi^{\prime}\mod\Xi^{s}_{p}(\Omega)$
if $\chi\sim_{C}\chi^{\prime}\mod\Xi^{s}_{p}(\Omega)$ for some $C>0$.

We summarized some properties for the equivalence relation $\sim$ in Appendix
C for later uses.

##  3\. Some preliminary results

In this section, we provide some preliminary results and setup the initial
steps for the proof of $\text{SGI}(s)$.

###  3.1. The proof of $\text{SGI}(1)$

Note that $\text{SGI}(0)$ holds trivially by taking $\delta=\epsilon$ and
$\phi\equiv 1$. We now prove $\text{SGI}(1)$. It turns out that the second
local Gowers norm is connected to the Fourier coefficients. For a function
$f\colon\mathbb{F}_{p}^{d}\to\mathbb{C}$, let
$\widehat{f}\colon\mathbb{F}_{p}^{d}\to\mathbb{C}$ denote the Fourier
transform of $f$ given by
$\widehat{f}(\xi):=\mathbb{E}_{x\in\mathbb{F}_{p}^{d}}f(x)\exp(-\frac{1}{p}\tau(\xi\cdot
x)).$ We have

######  Lemma 3.1.

Let $d\in\mathbb{N}$ with $d\geq 9$, $p$ be a prime,
$M\colon\mathbb{F}_{p}^{d}\to\mathbb{F}_{p}$ be a non-degenerate quadratic
form, and $f\colon\mathbb{F}_{p}^{d}\to\mathbb{C}$ with $|f|\leq 1$. Then

$\|f\|^{4}_{U^{2}(V(M))}\leq\sup_{\xi\in\mathbb{F}_{p}^{d}}p^{1-d}|\widehat{\mathbb{1}_{V(M)}f}(\xi)|(1+O(p^{-\frac{1}{8}})).$

###### Proof.

The approach we use is similar to the proof of Theorem 10 of [16]. By Example
9.5 of [19], $\Box_{2}(V(M))$ is an $M$-set of total co-dimension 4. By Lemma
A.7, since $d\geq 9$, we have that

$|\Box_{2}(V(M))|=p^{3d-4}(1+O(p^{-1/2})).$

For convenience denote $\delta:=\mathbb{1}_{V(M)}$. Then

$\begin{split}&\quad\|f\|^{4}_{U^{2}(V(M))}=\mathbb{E}_{(n,h_{1},h_{2})\in\Box_{2}(V(M))}\prod_{\epsilon=(\epsilon_{1},\epsilon_{2})\in\\{0,1\\}^{2}}\mathcal{C}^{|\epsilon|}f(n+\epsilon_{1}h_{1}+\epsilon_{2}h_{2})\\\
&=\frac{p^{3d}}{|\Box_{2}(V(M))|}\cdot\mathbb{E}_{(n,h_{1},h_{2})\in(\mathbb{F}_{p}^{d})^{3}}\prod_{\epsilon=(\epsilon_{1},\epsilon_{2})\in\\{0,1\\}^{2}}\mathcal{C}^{|\epsilon|}(\delta
f)(n+\epsilon_{1}h_{1}+\epsilon_{2}h_{2})\\\ &\leq
p^{4}\mathbb{E}_{n\in\mathbb{F}_{p}^{d}}\delta(n)\Bigl{|}\mathbb{E}_{y,z,w\in\mathbb{F}_{p}^{d}}\delta\overline{f}(y)\delta\overline{f}(z)\delta
f(w)\mathbb{1}_{n=y+z-w}\Bigr{|}\Bigl{(}1+O(p^{-\frac{1}{2}})).\end{split}$

By the Cauchy-Schwartz inequality,

$\begin{split}\|f\|^{8}_{U^{2}(V(M))}\leq
p^{8}\Bigl{(}\mathbb{E}_{n\in\mathbb{F}_{p}^{d}}\delta(n)\Bigr{)}\Bigl{(}\mathbb{E}_{n\in\mathbb{F}_{p}^{d}}\delta(n)\Bigl{|}\mathbb{E}_{y,z,w\in\mathbb{F}_{p}^{d}}\delta\overline{f}(y)\delta\overline{f}(z)\delta
f(w)\mathbb{1}_{n=y+z-w}\Bigr{|}^{2}\Bigr{)}\Bigl{(}1+O(p^{-1})\Bigr{)}.\end{split}$

By Lemma A.7,

$\begin{split}&\quad\|f\|^{8}_{U^{2}(V(M))}\\\ &\leq
p^{7}\mathbb{E}_{n\in\mathbb{F}_{p}^{d}}\delta(n)\mathbb{E}_{y_{1},z_{1},w_{1},y_{2},z_{2},w_{2}\in\mathbb{F}_{p}^{d}}\prod_{j=1,2}\mathcal{C}^{j}\Bigl{(}\delta\overline{f}(y_{j})\delta\overline{f}(z_{j})\delta
f(w_{j})\mathbb{1}_{n=y_{j}+z_{j}-w_{j}}\Bigr{)}\Bigl{(}1+O(p^{-\frac{1}{2}})\Bigr{)}\\\
&=p^{7-d}\mathbb{E}_{y_{1},z_{1},w_{1},y_{2},z_{2},w_{2}\in\mathbb{F}_{p}^{d}}\\\
&\qquad\quad\prod_{j=1,2}\mathcal{C}^{j}\Bigl{(}\delta\overline{f}(y_{j})\delta\overline{f}(z_{j})\delta
f(w_{j})\Bigr{)}\delta(y_{1}+z_{1}-w_{1})\mathbb{1}_{y_{1}+z_{1}-w_{1}=y_{2}+z_{2}-w_{2}}\Bigl{(}1+O(p^{-\frac{1}{2}})\Bigr{)}\\\
&\leq
p^{7-d}\mathbb{E}_{w_{1},w_{2}\in\mathbb{F}_{p}^{d}}\delta(w_{1})\delta(w_{2})\\\
&\qquad\quad\cdot\Bigl{|}\mathbb{E}_{y_{1},z_{1},y_{2},z_{2}\in\mathbb{F}_{p}^{d}}\delta(y_{1}+z_{1}-w_{1})\mathbb{1}_{y_{1}+z_{1}-w_{1}=y_{2}+z_{2}-w_{2}}\prod_{j=1,2}\mathcal{C}^{j}(\delta
f(y_{j})\delta\overline{f}(z_{j}))\Bigr{|}\Bigl{(}1+O(p^{-\frac{1}{2}})\Bigr{)}.\end{split}$

Again by a similar argument using the Cauchy-Schwartz inequality and Lemma
A.7, we may bound $\|f\|^{16}_{U^{2}(V(M))}$ by

$\begin{split}p^{12-3d}\mathbb{E}_{y_{j},z_{j}\in\mathbb{F}_{p}^{d},1\leq
j\leq 4}\prod_{j=1}^{4}\mathcal{C}^{j}(\delta
f(y_{j})\delta\overline{f}(z_{j}))\mathbb{1}_{y_{2}-y_{1}+z_{2}-z_{1}=y_{4}-y_{3}+z_{4}-z_{3}}W_{y_{1},\dots,z_{4}}\Bigl{(}1+O(p^{-\frac{1}{2}})\Bigr{)},\end{split}$

where $W_{y_{1},\dots,z_{4}}$ is the qunatitiy

$\begin{split}\mathbb{E}_{w\in\mathbb{F}_{p}^{d}}\delta(w)\delta(y_{2}-y_{1}+z_{2}-z_{1}+w)\delta(y_{1}+z_{1}-w)\delta(y_{3}+z_{3}-w)=\frac{|V(M)\cap
V_{y_{1},\dots,z_{4}}|}{p^{d}},\end{split}$

with $V_{y_{1},\dots,z_{4}}$ being the set of $w\in\mathbb{F}_{p}^{d}$ such
that $M(w)=M(y_{2}-y_{1}+z_{2}-z_{1}+w)=M(y_{1}+z_{1}-w)=M(y_{3}+z_{3}-w)$.

If $y_{2}-y_{1}+z_{2}-z_{1},y_{1}+z_{1},y_{3}+z_{3}$ are linearly independent,
then $V_{y_{1},\dots,z_{4}}$ is an affine subspace of $\mathbb{F}_{p}^{d}$ of
co-dimension 3. Since $d\geq 9$, by Lemma A.7, we have that
$W_{y_{1},\dots,z_{4}}=p^{-4}(1+O(p^{-\frac{1}{2}})).$ On the other hand, by
Lemma A.5, it is not hard to compute that the number of tuples
$(y_{1},y_{2},y_{3},z_{1},z_{2},z_{3})\in(\mathbb{F}_{p}^{d})^{6}$ such that
$y_{2}-y_{1}+z_{2}-z_{1},y_{1}+z_{1},y_{3}+z_{3},V$ are not linearly
independent is at most $3p^{5d+2}$. So $\|f\|^{16}_{U^{2}(V(M))}$ is bounded
by

(3.1) $\begin{split}p^{8-3d}\mathbb{E}_{y_{j},z_{j}\in\mathbb{F}_{p}^{d},1\leq
j\leq 4}\prod_{j=1}^{4}\mathcal{C}^{j}(\delta
f(y_{j})\delta\overline{f}(z_{j}))\mathbb{1}_{y_{2}-y_{1}+z_{2}-z_{1}=y_{4}-y_{3}+z_{4}-z_{3}}\Bigl{(}1+O(p^{-\frac{1}{2}})\Bigr{)}.\end{split}$

Since

$\mathbb{1}_{y_{2}-y_{1}+z_{2}-z_{1}=y_{4}-y_{3}+z_{4}-z_{3}}=p^{-d}\sum_{\xi\in\mathbb{F}_{p}^{d}}\exp\Bigl{(}-\frac{1}{p}\tau(\xi\cdot(y_{4}-y_{3}-y_{2}+y_{1}+z_{4}-z_{3}-z_{2}+z_{1}))\Bigr{)},$

we may rewrite (3.1) as
$p^{8-4d}\sum_{\xi\in\mathbb{F}_{p}^{d}}|\widehat{\delta
f}(\xi)|^{8}(1+O(p^{-\frac{1}{2}})).$ So

$\begin{split}&\quad\|f\|^{16}_{U^{2}(V(M))}\leq
p^{8-4d}\sum_{\xi\in\mathbb{F}_{p}^{d}}|\widehat{\delta
f}(\xi)|^{8}(1+O(p^{-\frac{1}{2}}))\\\ &\leq
p^{8-4d}\sup_{\xi\in\mathbb{F}_{p}^{d}}|\widehat{\delta
f}(\xi)|^{4}\sum_{\xi\in\mathbb{F}_{p}^{d}}|\widehat{\delta
f}(\xi)|^{4}(1+O(p^{-\frac{1}{2}}))\\\
&=p^{8-4d}\sup_{\xi\in\mathbb{F}_{p}^{d}}|\widehat{\delta f}(\xi)|^{4}\|\delta
f\|^{4}_{U^{2}(\mathbb{F}_{p}^{d})}(1+O(p^{-\frac{1}{2}}))\text{ (see page 14
of \cite[cite]{[\@@bibref{}{LMP19}{}{}]})}\\\
&=p^{4-4d}\sup_{\xi\in\mathbb{F}_{p}^{d}}|\widehat{\delta
f}(\xi)|^{4}\|f\|^{4}_{U^{2}(V(M))}(1+O(p^{-\frac{1}{2}}))\\\ &\leq
p^{4-4d}\sup_{\xi\in\mathbb{F}_{p}^{d}}|\widehat{\delta
f}(\xi)|^{4}(1+O(p^{-\frac{1}{2}})).\end{split}$

This finishes the proof. ∎

We are now ready to prove $\text{SGI}(1)$. Suppose that
$\|f\|_{U^{2}(V(M))}>\epsilon$. By Lemma 3.1, if $d\geq 9$ and
$p\gg_{\epsilon}1$, then there exists $\xi\in\mathbb{F}_{p}^{d}$ such that
$p^{1-d}\Bigl{|}\widehat{\mathbb{1}_{V(M)}f}(\xi)\Bigr{|}\geq(\epsilon/2)^{4}.$
By Lemma A.7,

$\begin{split}&\quad(\epsilon/2)^{4}\leq
p^{1-d}\Bigl{|}\widehat{\mathbb{1}_{V(M)}f}(\xi)\Bigr{|}=p^{1-d}\Bigl{|}\mathbb{E}_{n\in\mathbb{F}_{p}^{d}}\mathbb{1}_{V(M)}f(n)\cdot\exp(-\frac{\tau(\xi\cdot
n)}{p})\Bigr{|}\\\ &=\Bigl{|}\mathbb{E}_{n\in
V(M)}f(n)\cdot\exp(-\frac{\tau(\xi\cdot
n)}{p})\Bigr{|}+O(p^{-\frac{1}{2}}).\end{split}$

It is clear that the map $n\mapsto\exp(-\frac{\tau(\xi\cdot n)}{p})$ is a
1-step $p$-periodic nilsequence of complexity $O(1)$. This completes the proof
of $\text{SGI}(1)$.

###  3.2. A preliminary reduction for $\text{SGI}(s)$

For our applications, we also need to use the following improved version of
the inverse theorem, which we denote as $\text{SGI}(s)+$:

######  Proposition 3.2.

[$\text{SGI}(s)+$] Let $d\in\mathbb{N}_{+},r,s\in\mathbb{N}$, with $d-r\geq
N(s-1)$ and $\epsilon>0$. There exist
$\delta:=\delta(d-r,\epsilon),C:=C(d-r,\epsilon)>0$, and
$p_{0}:=p_{0}(d-r,\epsilon)\in\mathbb{N}$ such that for every prime $p\geq
p_{0}$, every non-degenerate quadratic form
$M\colon\mathbb{F}_{p}^{d}\to\mathbb{F}_{p}$, every affine subspace $V+c$ of
$\mathbb{F}_{p}^{d}$ of co-dimension $r$, and every function
$f\colon\mathbb{F}_{p}^{d}\to\mathbb{C}$ bounded in magnitude by 1, if
$\text{rank}(M|_{V+c})=d-r$, and $\|f\|_{U^{s+1}(V(M)\cap(V+c))}>\epsilon$,
then there exists $\phi\in\text{Nil}^{s;C,1}_{p}(\mathbb{F}_{p}^{d})$ such
that

$\Bigl{|}\mathbb{E}_{n\in V(M)\cap(V+c)}f(n)\cdot\phi(n)\Bigr{|}>\delta.$

######  Lemma 3.3.

We have that $\text{SGI}(s)\Rightarrow\text{SGI}(s)+$.

###### Proof.

Let $L\colon\mathbb{F}_{p}^{d-r}\to V$ be a bijective linear transformation
and $\tilde{M}\colon\mathbb{F}_{p}^{d-r}\to\mathbb{F}_{p}$ be the quadratic
form given by $\tilde{M}(m):=M(L(m)+c)$. It is not hard to see that

$\|f\|_{U^{s+1}(V(M)\cap(V+c))}=\|f(L(\cdot)+c)\|_{U^{s+1}(V(\tilde{M}))}.$

Since $\text{rank}(M|_{V+c})=d-r$, $\tilde{M}$ is non-degenerate. By
$\text{SGI}(s)$, there exist
$\delta:=\delta(d-r,\epsilon),C:=C(d-r,\epsilon)>0$,
$p_{0}:=p_{0}(d-r,\epsilon)\in\mathbb{N}$, and
$\phi\in\text{Nil}^{s;C,1}_{p}(\mathbb{F}_{p}^{d-r})$ such that if $p\geq
p_{0}$, then

$\Bigl{|}\mathbb{E}_{m\in
V(\tilde{M})}f(L(m)+c)\cdot\phi(m)\Bigr{|}=\Bigl{|}\mathbb{E}_{n\in
V(M)\cap(V+c)}f(n)\cdot\phi(L^{-1}(n-c))\Bigr{|}>\delta.$

Assume that $\phi(m)=F(g(m)\Gamma)$ for some $s$-step nilmanifold $G/\Gamma$
of complexity at most $C$, Lipschitz function $F\colon G/\Gamma\to\mathbb{C}$
of complexity at most $C$, and some $g\in\text{poly}_{p}(\mathbb{F}_{p}^{d}\to
G_{\mathbb{N}}|\Gamma)$. By Proposition 2.18, there exists
$g^{\prime}\in\text{poly}_{p}(\mathbb{F}_{p}^{d}\to G_{\mathbb{N}}|\Gamma)$
such that $g^{\prime}(n)\Gamma=g(L^{-1}(n-c))\Gamma$ for all
$n\in\mathbb{F}_{p}^{d}$. So

$\Bigl{|}\mathbb{E}_{n\in V(M)\cap(V+c)}f(n)\cdot
F(g^{\prime}(n)\Gamma)\Bigr{|}=\Bigl{|}\mathbb{E}_{n\in
V(M)\cap(V+c)}f(n)\cdot\phi(L^{-1}(n-c))\Bigr{|}>\delta.$

∎

Now suppose that $\text{SGI}(s)$ holds for some $s\geq 1$ and our goal is to
show $\text{SGI}(s+1)$. By Lemma 3.3, $\text{SGI}(s)+$ holds. Suppose that
$\|f\|_{U^{s+2}(V(M))}>\epsilon$. By Example 9.5 of [19], $\Box_{s+2}(V(M))$
is an $M$-set of total co-dimension $(s^{2}+5s+8)/2$. Note that for all
$h_{s+2}\in\mathbb{F}_{p}^{d}$, $(n,h_{1},\dots,h_{s+2})\in\Box_{s+2}(V(M))$
if and only if $(n,h_{1},\dots,h_{s+1})\in\Box_{s+1}(V(M)^{h_{s+2}})$ (recall
Section 1.3 for definitions). Since $d\geq s^{2}+5s+9$, by Theorem A.12, we
have that

$\begin{split}&\quad\|f\|^{2^{s+2}}_{U^{s+2}(V(M))}=\mathbb{E}_{(n,h_{1},\dots,h_{s+2})\in\Box_{s+2}(V(M))}\prod_{\epsilon=(\epsilon_{1},\dots,\epsilon_{s+2})\in\\{0,1\\}^{s+2}}\mathcal{C}^{|\epsilon|}f(n+\epsilon_{1}h_{1}+\dots+\epsilon_{s+2}h_{s+2})\\\
&=\mathbb{E}_{h_{s+2}\in\mathbb{F}_{p}^{d}}\mathbb{E}_{(n,h_{1},\dots,h_{s+1})\in\Box_{s+1}(V(M)^{h_{s+2}})}\prod_{\epsilon=(\epsilon_{1},\dots,\epsilon_{s+1})\in\\{0,1\\}^{s+1}}\mathcal{C}^{|\epsilon|}\overline{\Delta_{h}f}(n+\epsilon_{1}h_{1}+\dots+\epsilon_{s+1}h_{s+1})+O_{s}(p^{-\frac{1}{2}})\\\
&=\mathbb{E}_{h_{s+2}\in\mathbb{F}_{p}^{d}}\|\Delta_{h_{s+2}}f\|^{2^{s+1}}_{U^{s+1}(V(M)^{h_{s+2}})}+O_{s}(p^{-\frac{1}{2}}).\end{split}$

By the Pigeonhole Principle, if $p\gg_{\epsilon,s}1$, then there exists a
subset $H$ of $\mathbb{F}_{p}^{d}$ of cardinality $\gg_{d,\epsilon}p^{d}$ such
that for all $h\in H$, we have that

$\|\Delta_{h}f\|^{2^{s+1}}_{U^{s+1}(V(M)^{h})}\gg_{d,\epsilon}1.$

Since $d\geq 3$, by Lemma A.7 and passing to a subset if necessary, we may
further assume that $(hA)\cdot h\neq 0$ for all $h\in H$, where $A$ is the
matrix associated with $M$.

Fix $h\in H$. Note that $V(M)^{h}$ is the intersection of $V(M)$ with an
affine subspace $W_{h}$ of $\mathbb{F}_{p}^{d}$ of co-dimension 1. Since
$(hA)\cdot h\neq 0$,
$\text{span}_{\mathbb{F}_{p}}\\{h\\}\cap\text{span}_{\mathbb{F}_{p}}\\{h\\}^{\perp_{M}}=\\{\mathbb{0}\\}$.
By Proposition A.4, $\text{rank}(M|_{W_{h}})=d-1$. By $\text{SGI}(s)+$,
Corollary B.6 and the Pigeonhole Principle, for all $h\in H$, there exists an
$s$-step nilcharacter
$\chi_{h}\in\Xi^{s;O_{d,\epsilon}(1),O_{d,\epsilon}(1)}_{p}(\mathbb{F}_{p}^{d})$
such that

(3.2) $\Bigl{|}\mathbb{E}_{n\in
V(M)^{h}}f(n+h)\overline{f}(n)\otimes\chi_{h}(n)\Bigr{|}\gg_{d,\epsilon}1.$

This completes Step 1 described in Section 1.2.

##  4\. A Furstenberg-Weiss type argument

In this section, we conduct Step 2 described in Section 1.2 by showing the
following intermediate result:

######  Proposition 4.1.

Let $d,D,s\in\mathbb{N}_{+},d\geq 9,C,\epsilon>0$, $p\gg_{C,d,D,\epsilon,s}1$
be a prime, $M\colon\mathbb{F}_{p}^{d}\to\mathbb{F}_{p}$ be a non-degenerate
quadratic form, and $f\colon\mathbb{F}_{p}^{d}\to\mathbb{C}$ be bounded by 1.
Suppose that for some $1\leq r_{\ast}\leq s$, there exist a subset
$H\subseteq\mathbb{F}_{p}^{d}$ with $|H|\geq\epsilon p^{d}$, some
$\chi_{0}\in\Xi_{p}^{(1,s);C,D}((\mathbb{F}_{p}^{d})^{2})$, some
$\chi_{h}\in\Xi_{p}^{[s,r_{\ast}];C,D}(\mathbb{F}_{p}^{d})$, and some
$\psi_{h}\in\text{Nil}_{p}^{s-1;C,1}(\mathbb{F}_{p}^{d})$ for all $h\in H$
such that

(4.1) $\Bigl{|}\mathbb{E}_{n\in
V(M)^{h}}f(n+h)\overline{f}(n)\chi_{0}(h,n)\otimes\chi_{h}(n)\psi_{h}(n)\Bigr{|}>\epsilon$

for all $h\in H$. Then there exist a subset $U\subseteq H^{3}$ with
$|U|\gg_{C,d,D,\epsilon,s}p^{3d}$ such that writing

$\chi_{h_{1},h_{2},h_{3}}(n):=\chi_{h_{1}}(n)\otimes\chi_{h_{2}}(n+h_{3}-h_{2})\otimes\overline{\chi}_{h_{3}}(n)\otimes\overline{\chi}_{h_{1}+h_{2}-h_{3}}(n+h_{3}-h_{2}),$

we have that

(4.2) $\Bigl{|}\mathbb{E}_{n\in
V(M)^{h_{1},h_{3},h_{3}-h_{2}}}\chi_{h_{1},h_{2},h_{3}}(n)\psi_{h_{1},h_{2},h_{3}}(n)\Bigr{|}\gg_{C,d,D,\epsilon,s}1$

for some
$\psi_{h_{1},h_{2},h_{3}}\in\text{Nil}_{p}^{s-1;O_{C,d,D,\epsilon,s}(1),1}(\mathbb{F}_{p}^{d})$
for all $(h_{1},h_{2},h_{3})\in U$. Moreover, for all $(h_{1},h_{2},h_{3})$ in
$U$, $h_{1},h_{2},h_{3}$ are linearly independent and $M$-non-isotropic (see
Appendix A.2 for the definition).

###### Proof.

Our strategy is similar to the one used in [4, 12]. An additional difficulty
is that the Fubini’s theorem in our setting (Theorem A.12) is more delicate,
which makes the computations more complicated.

By (4.1), Proposition B.7 and the Pigeonhole Principle, we have that

$\Bigl{|}\mathbb{E}_{n\in
V(M)^{h}}\Delta_{h}f(n)c(n)^{\tau(h)}\psi(n)\otimes\chi_{h}(n)\psi_{h}(n)\Bigr{|}\gg_{C,d,D,\epsilon,s}1$

for some function $\psi\colon\mathbb{F}_{p}^{d}\to\mathbb{C}$ bounded by 1 and
some function $c=(c_{1},\dots,c_{d})$ with
$c_{1},\dots,c_{d}\colon\mathbb{F}_{p}^{d}\to\mathbb{S}$ such that
$c_{i}(n)^{pm}=1$ for all $n\in\mathbb{F}_{p}^{d}$ and $m\in\mathbb{Z}^{d}$,
and that the map $n\mapsto c(n-\ell)c(n)^{\tau(h)}$ belongs to
$\text{Nil}^{s-1;O_{C,d,D,\epsilon,s}(1)}_{p}(\mathbb{F}_{p}^{d})$, where
$c(n)^{\tau(h)}:=c_{1}(n)^{\tau(h_{1})}\dots c_{d}(n)^{\tau(h_{d})}$. Taking
an average over $H$, we have that

$\mathbb{E}_{h\in\mathbb{F}_{p}^{d}}\Bigl{|}\mathbb{E}_{n\in
V(M)^{h}}\Delta_{h}f(n)c(n)^{\tau(h)}\psi(n)\otimes\chi_{h}(n)\psi_{h}(n)\Bigr{|}\gg_{C,d,D,\epsilon,s}1$

(for those $h$ such that $\chi_{h}$ and $\psi_{h}$ are not yet defined, set
$\chi_{h}=\psi_{h}\equiv 0$111111Note that the function $\chi_{h}$ defined
this way is not a nilcharacter as its modulo is not 1. However, this does not
affect our proof.). By switching $\psi_{h}(n)$ to $a_{h}\psi_{h}(n)$ for some
$a_{h}\in\mathbb{S}$ if necessary, we may assume without loss of generality
that

(4.3) $|\mathbb{E}_{h\in\mathbb{F}_{p}^{d}}\mathbb{E}_{n\in
V(M)^{h}}\Delta_{h}f(n)c(n)^{\tau(h)}\psi(n)\otimes\chi_{h}(n)\psi_{h}(n)|\gg_{C,d,D,\epsilon,s}1.$

Since $\Box_{1}(V(M))$ is an $M$-set of total co-dimension 2, $d\geq 5$, and
since $c_{i}(n)^{pm}=1$ for all $n\in\mathbb{F}_{p}^{d}$ and
$m\in\mathbb{Z}^{d}$, it follows from Theorem A.12 that

(4.4)
$\begin{split}&\quad\Bigl{|}\mathbb{E}_{h\in\mathbb{F}_{p}^{d}}\mathbb{E}_{n\in
V(M)^{h}}\Delta_{h}f(n)c(n)^{\tau(h)}\psi(n)\otimes\chi_{h}(n)\psi_{n}(n)\Bigr{|}^{2}\\\
&=\Bigl{|}\mathbb{E}_{(n,h)\in\Box_{1}(V(M))}\Delta_{h}f(n)c(n)^{\tau(h)}\psi(n)\otimes\chi_{h}(n)\psi_{h}(n)\Bigr{|}^{2}+O(p^{-1/2})\\\
&=\Bigl{|}\mathbb{E}_{y\in V(M)}f(y)\mathbb{E}_{n\in V(M)}f^{\prime}(n)\cdot
c(n)^{\tau(y-n)}\otimes\chi_{y-n}(n)\psi_{y-n}(n)\Bigr{|}^{2}+O(p^{-1/2})\\\
&=\Bigl{|}\mathbb{E}_{y\in V(M)}f(y)\mathbb{E}_{h\in
y-V(M)}f^{\prime}(y-h)\cdot
c(y-h)^{\tau(h)}\otimes\chi_{h}(y-h)\psi_{h}(y-h)\Bigr{|}^{2}+O(p^{-1/2})\\\
&\leq\mathbb{E}_{y\in V(M)}\Bigl{|}\mathbb{E}_{h\in
y-V(M)}f^{\prime}(y-h)\cdot
c(y-h)^{\tau(h)}\otimes\chi_{h}(y-h)\psi_{h}(y-h)\Bigr{|}^{2}+O(p^{-1/2})\\\
&\ll_{D}\Bigl{|}\mathbb{E}_{y\in V(M)}\mathbb{E}_{h,h^{\prime}\in
y-V(M)}c(y-h)^{\tau(h)}c(y-h^{\prime})^{-\tau(h^{\prime})}f^{\prime}(y-h)\otimes\overline{f^{\prime}}(y-h^{\prime})\\\
&\qquad\otimes\chi_{h}(y-h)\otimes\overline{\chi}_{h^{\prime}}(y-h^{\prime})\psi_{h}(y-h)\overline{\psi}_{h^{\prime}}(y-h^{\prime})\Bigr{|}+O(p^{-1/2}),\end{split}$

where $f^{\prime}:=\overline{f}\cdot\psi$ and we used the vector-valued
Cauchy-Schwartz inequality in the last step. Define

$c_{2}(\ell,n):=c(n-\ell)^{-\tau(\ell)}f^{\prime}(n)\otimes\overline{f^{\prime}}(n-\ell),\psi_{h,\ell}(n):=c(n)^{\tau(h)}c(n-\ell)^{-\tau(h)}\psi_{h}(n)\overline{\psi}_{h+\ell}(n-\ell).$

Then $c_{2}$ is bounded by $O_{C,d,D,\epsilon,s}(1)$. Since
$\psi_{h}\in\text{Nil}_{p}^{s-1;C,1}(\mathbb{F}_{p}^{d})$ and $n\mapsto
c(n)^{\tau(h)}c(n-\ell)^{-\tau(h)}$ belongs to
$\text{Nil}^{s-1;O_{C,d,D,\epsilon,s}(1)}_{p}(\mathbb{F}_{p}^{d})$, we have
that $\psi_{h,\ell}$ belongs to
$\text{Nil}^{s-1;O_{C,d,D,\epsilon,s}(1),1}_{p}(\mathbb{F}_{p}^{d})$ (note
that the product of two $p$-periodic nilsequence is also a $p$-periodic
nilsequence).

Setting $\ell=h^{\prime}-h$ and $y=n+h$, we have that the square of right hand
side of (4.4) is at most

$\begin{split}&\quad\Bigl{|}\mathbb{E}_{(n,\ell,h)\colon n,n+h,n-\ell\in
V(M)}c_{2}(\ell,n)\otimes\chi_{h}(n)\otimes\overline{\chi}_{h+\ell}(n-\ell)\psi_{h,\ell}(n)\Bigr{|}^{2}+O(p^{-1/2})\\\
&=\Bigl{|}\mathbb{E}_{(n,\ell)\in\Box_{1}(V(M))}c_{2}(-\ell,n)\otimes\mathbb{E}_{h\in
V(M)-n}\chi_{h}(n)\otimes\overline{\chi}_{h-\ell}(n+\ell)\psi_{h,-\ell}(n)\Bigr{|}^{2}+O(p^{-1/2})\\\
&\ll_{C,d,D,\epsilon,s}\mathbb{E}_{(n,\ell)\in\Box_{1}(V(M))}\Bigl{|}\mathbb{E}_{h\in
V(M)-n}\chi_{h}(n)\otimes\overline{\chi}_{h-\ell}(n+\ell)\psi_{h,-\ell}(n)\Bigr{|}^{2}+O(p^{-1/2})\\\
&\ll_{C,d,D,\epsilon,s}\Bigl{|}\mathbb{E}_{(n,\ell)\in\Box_{1}(V(M))}\mathbb{E}_{h,h^{\prime}\in
V(M)-n}\\\
&\qquad\qquad\chi_{h}(n)\otimes\overline{\chi}_{h-\ell}(n+\ell)\otimes\overline{\chi}_{h^{\prime}}(n)\otimes\chi_{h^{\prime}-\ell}(n+\ell)\psi_{h,-\ell}(n)\overline{\psi}_{h^{\prime},-\ell}(n)\Bigr{|}+O(p^{-1/2})\\\
&\ll_{C,d,D,\epsilon,s}\Bigl{|}\mathbb{E}_{(n,\ell,h,h^{\prime})\colon
n,n+\ell,n+h,n+h^{\prime}\in V(M)}\\\
&\qquad\qquad\chi_{h}(n)\otimes\overline{\chi}_{h-\ell}(n+\ell)\otimes\overline{\chi}_{h^{\prime}}(n)\otimes\chi_{h^{\prime}-\ell}(n+\ell)\psi_{h,-\ell}(n)\overline{\psi}_{h^{\prime},-\ell}(n)\Bigr{|}+O(p^{-1/2}),\end{split}$

where we used the fact that the cardinality of the set $V(M)+c$ is independent
of $c$. Since $d\geq 9$, Setting $h_{1}=h$, $h_{2}=h^{\prime}-\ell$,
$h_{3}=h^{\prime}$ and $h_{4}=h-\ell$, we have that $h_{1}+h_{2}=h_{3}+h_{4}$
and that

$\begin{split}&\quad\Bigl{|}\mathbb{E}_{(n,\ell,h,h^{\prime})\colon
n,n+\ell,n+h,n+h^{\prime}\in
V(M)}\chi_{h}(n)\otimes\overline{\chi}_{h-\ell}(n+\ell)\otimes\overline{\chi}_{h^{\prime}}(n)\otimes\chi_{h^{\prime}-\ell}(n+\ell)\psi_{h,-\ell}(n)\overline{\psi}_{h^{\prime},-\ell}(n)\Bigr{|}\\\
&=\Bigl{|}\mathbb{E}_{(n,h_{1},h_{2},h_{3})\in(\mathbb{F}_{p}^{d})^{4}\colon
n\in V(M)^{h_{1},h_{3},h_{3}-h_{2}}}\\\
&\qquad\qquad\chi_{h_{1}}(n)\otimes\chi_{h_{2}}(n+h_{3}-h_{2})\otimes\overline{\chi}_{h_{3}}(n)\otimes\overline{\chi}_{h_{1}+h_{2}-h_{3}}(n+h_{3}-h_{2})\psi_{h_{1},h_{2},h_{3}}(n)\Bigr{|}+O(p^{-1/2})\\\
&=\Bigl{|}\mathbb{E}_{h_{1},h_{2},h_{3}\in\mathbb{F}_{p}^{d}}\mathbb{E}_{n\in
V(M)^{h_{1},h_{3},h_{3}-h_{2}}}\\\
&\qquad\qquad\chi_{h_{1}}(n)\otimes\chi_{h_{2}}(n+h_{3}-h_{2})\otimes\overline{\chi}_{h_{3}}(n)\otimes\overline{\chi}_{h_{1}+h_{2}-h_{3}}(n+h_{3}-h_{2})\psi_{h_{1},h_{2},h_{3}}(n)\Bigr{|}+O(p^{-1/2}),\end{split}$

where
$\psi_{h_{1},h_{2},h_{3}}:=\psi_{h_{1},h_{2}-h_{3}}\overline{\psi}_{h_{3},h_{2}-h_{3}}$
belongs to
$\text{Nil}^{s-1;O_{C,d,D,\epsilon,s}(1),1}_{p}(\mathbb{F}_{p}^{d})$, and we
used Theorem A.12 for the set

$\\{(n,h_{1},h_{2},h_{3})\in(\mathbb{F}_{p}^{d})^{4}\colon n\in
V(M)^{h_{1},h_{3},h_{3}-h_{2}}\\},$

which one can check easily is an $M$-set of total co-dimension 4. From (4.3)
we conclude that there exists a subset $U\subseteq H^{3}$ with
$|U|\gg_{C,d,D,\epsilon,s}p^{3d}$ such that (4.2) holds for all
$(h_{1},h_{2},h_{3})\in U$ (note that (4.2) fails if
$(h_{1},h_{2},h_{3})\notin H^{3}$ by our construction). Finally, since the
number of $(h_{1},h_{2},h_{3})\in U$ with $h_{1},h_{2},h_{3}$ being linearly
dependent or $M$-isotropic is at most $3p^{2d+2}+O_{d,k}(p^{3d-1})$ by Lemma
A.5. Since $d\geq 3$, we are done by removing from $U$ the tuples
$(h_{1},h_{2},h_{3})$ with $h_{1},h_{2},h_{3}$ being linearly dependent or
$M$-isotropic. ∎

We also have the following simpler version of Proposition 4.1.

######  Proposition 4.2.

Let $d,D,s\in\mathbb{N}_{+}$ with $d\geq 9$, $C,\epsilon>0$,
$p\gg_{C,d,D,\epsilon,s}1$ be a prime,
$M\colon\mathbb{F}_{p}^{d}\to\mathbb{F}_{p}$ be a non-degenerate quadratic
form, and $f\colon\mathbb{F}_{p}^{d}\to\mathbb{C}$ be bounded by 1. Suppose
that there exist a subset $H\subseteq\mathbb{F}_{p}^{d}$ with $|H|\geq\epsilon
p^{d}$, and some functions $g_{h}\colon\mathbb{F}_{p}^{d}\to\mathbb{C}^{D}$
bounded by $C$ for all $h\in H$ such that

$\Bigl{|}\mathbb{E}_{n\in
V(M)^{h}}f(n+h)\overline{f}(n)g_{h}(n)\Bigr{|}>\epsilon$

for all $h\in H$. Denote $g_{h}\equiv 0$ if $h\notin H$. Then for all
$h_{1},h_{2},h_{3}\in H$, writing

$g_{h_{1},h_{2},h_{3}}(n):=g_{h_{1}}(n)\otimes
g_{h_{2}}(n+h_{3}-h_{2})\otimes\overline{g}_{h_{3}}(n)\otimes\overline{g}_{h_{1}+h_{2}-h_{3}}(n+h_{3}-h_{2}),$

we have that

$\Bigl{|}\mathbb{E}_{h_{1},h_{2},h_{3}\in\mathbb{F}_{p}^{d}}\mathbb{E}_{n\in
V(M)^{h_{1},h_{3},h_{3}-h_{2}}}g_{h_{1},h_{2},h_{3}}(n)\Bigr{|}\gg_{C,d,D,\epsilon,s}1.$

In particular, there exist a subset $U\subseteq H^{3}$ with
$|U|\gg_{C,d,D,\epsilon,s}p^{3d}$ such that for all $(h_{1},h_{2},h_{3})\in
U$, $h_{1},h_{2},h_{3}$ are linearly independent and $M$-non-isotropic, and
that

$\Bigl{|}\mathbb{E}_{n\in
V(M)^{h_{1},h_{3},h_{3}-h_{2}}}g_{h_{1},h_{2},h_{3}}(n)\Bigr{|}\gg_{C,d,D,\epsilon,s}1.$

The proof of Proposition 4.2 is almost the same as that of Proposition 4.1. We
leave its proof to the interested readers.

##  5\. The sunflower lemma

We will use Proposition 4.1 to analysis the “frequency” of nilcharacters. It
is helpful for the readers to imagine each nilcharacter $\chi_{h}$ as a
function of the form $\exp(P_{h}(n))$ for some polynomial
$P_{h}\colon\mathbb{F}_{p}^{d}\to\mathbb{F}_{p}$, and to imagine its
“frequency” as the leading terms of $P_{h}$. In Section 10 of [12], Green, Tao
and Ziegler proved a sunflower lemma (Lemma 10.10 of [12]) explaining how to
decompose a sequence of real number as linear combinations of generators with
some “sunflower-type” independence properties. In our setting, the “frequency”
of a nilcharacter is a homogeneous polynomial over $d$-variables (which can be
viewed as a “string” of real numbers) instead of a real number. Therefore, we
need to extend many concepts in [12] from real numbers to strings of real
numbers. For convenience, throughout this section, we use $m$ to denote
elements in $\mathbb{N}^{d}$.

######  Definition 5.1 (Strings).

Let $d,p,s\in\mathbb{N}_{+}$, $\vec{D}=(D_{j})_{1\leq j\leq
s}\in\mathbb{N}^{s}$ and $\mathcal{T}=(\xi_{m,k})_{1\leq|m|\leq s,1\leq k\leq
D_{|m|}}$ be a tuple of elements of the form $\xi_{m,k}\in\mathbb{Z}/p$ (here
$m\in\mathbb{N}^{d}$). We say that $(\vec{D},\mathcal{T})$ (or $\mathcal{T}$)
is a _$(d,p)$ -tower_ (or simply a _tower_ when there is no confusion). We can
also write $\mathcal{T}=(\mathcal{F}_{j})_{1\leq j\leq s}$, where
$\mathcal{F}_{j}:=(\xi_{m,k})_{|m|=j,1\leq k\leq D_{j}}$ is the _$j$ -th
floor_ of $\mathcal{T}$. We can further write
$\mathcal{F}_{j}=(\vec{\xi}_{j,k})_{1\leq k\leq D_{j}}$, where
$\vec{\xi}_{j,k}:=(\xi_{m,k})_{|m|=j}$ is a _$(j,d,p)$ -string_ (when there is
no confusion, we call it to be a _$(j,d)$ -string_, _$j$ -string_ or simply a
_string_). We may define the addition and scalar multiplication operators for
strings, floors and towers by treating them as vectors.

It is helpful to think of a string as a homogeneous polynomial. Indeed, for
any $a\in\mathbb{Z}\backslash\\{0\\}$ with $|a|<p$, let $a^{\ast}$ denote the
unique integer in $\\{1,\dots,p-1\\}$ such that $aa^{\ast}\equiv 1\mod
p\mathbb{Z}$. We may _associate_ every $j$-string
$\vec{\xi}=(\xi_{m})_{|m|=j}$ with a $\mathbb{Z}/p$-coefficient polynomial
$f\in\text{poly}_{p}(\mathbb{Z}^{d}\to\mathbb{Z}/p|\mathbb{Z})$ given by
$f(n)=\sum_{|m|=j}(m!)^{\ast}\xi_{m}n^{m}$, and conversely _associate_ every
polynomial $f\in\text{poly}_{p}(\mathbb{Z}^{d}\to\mathbb{Z}/p|\mathbb{Z})$
given by $f(n)=\sum_{|m|=j}a_{m}n^{m},a_{m}\in\frac{1}{m!p}\mathbb{Z}$ with a
$j$-string $\vec{\xi}=(m!a_{m})_{|m|=j}$.

In our setting, it is convenient to identify two polynomials if their
difference vanishes on a subset of $\mathbb{Z}^{d}$ of our interest. This
leads to the following definition:

######  Definition 5.2 (Reducible strings).

Let $\Omega$ be a subset of $\mathbb{Z}^{d}$. We say that a polynomial
$f\colon\mathbb{Z}^{d}\to\mathbb{R}$ of degree $j$ is _$(\Omega,p)$
-reducible_ if $\Delta_{h_{j}}\dots\Delta_{h_{1}}f(n)\in\mathbb{Z}$ for all
$(n,h_{1},\dots,h_{j})\in\Box_{p,j}(\Omega)$ (recall the definition in Section
1.3). A $j$-string $\vec{\xi}=(\xi_{m})_{|m|=j}$ is _$(\Omega,p)$ -reducible_
if the polynomial associated to it is $(\Omega,p)$-reducible. We say that a
tower is _$(\Omega,p)$ -reducible_ if every string of the tower is
$(\Omega,p)$-reducible.

We have the following characterization for
$(\tau(V(M)^{h_{1},\dots,h_{s}}),p)$-reducible strings, using the language
developed in [20] (see Appendix A.8 for definitions).

######  Lemma 5.3.

Let $d,j,s\in\mathbb{N}_{+},d\geq s+j+3$ $p\gg_{d}1$ be a prime,
$M\colon\mathbb{F}_{p}^{d}\to\mathbb{F}_{p}$ be a non-degenerate quadratic
form, and $h_{1},\dots,h_{s}\in\mathbb{F}_{p}^{d}$ be linearly independent and
$M$-non-isotropic vectors. Let $\vec{\xi}=(\xi_{m})_{|m|=j}$ be a
$(j,d,p)$-string. Let $f\colon\mathbb{Z}^{d}\to\mathbb{Z}/p$ be the polynomial
associated to $\vec{\xi}$ and $F\colon\mathbb{F}_{p}^{d}\to\mathbb{F}_{p}$ be
the map induced by $f$. Then $\vec{\xi}$ (or $f$) is
$(\tau(V(M)^{h_{1},\dots,h_{s}}),p)$-reducible if and only if $F\in
J^{M}_{h_{1},\dots,h_{s}}$.

###### Proof.

Since $f$ is homogeneous, so is $F$. By definition, $\vec{\xi}$ is
$(\tau(V(M)^{h_{1},\dots,h_{s}}),p)$-reducible if and only if
$\Delta_{n_{j}}\dots\Delta_{n_{1}}f(n)\in\mathbb{Z}$ for all
$(n,n_{1},\dots,n_{j})\in\Box_{p,j}(\tau(V(M)^{h_{1},\dots,h_{s}}))$. By
Proposition A.13 (the part that (i) $\Leftrightarrow$ (iii)) and the fact that
$f$ is homogeneous, this is equivalent of saying that $F\in
J^{M}_{h_{1},\dots,h_{s}}$. ∎

We may define linear independent/combination for strings in the natural way
(modulo reducible strings):

######  Definition 5.4 (Linear independent/combination for strings).

Let $\Omega$ be a subset of $\mathbb{Z}^{d}$ and $c\in\mathbb{N}$. We say that
$j$-strings $\vec{\xi_{(1)}},\dots,\vec{\xi_{(\ell)}}$ are _$(\Omega,c,p)$
-independent_ if for every $1\leq j\leq s$ and
$a_{1},\dots,a_{\ell}\in\mathbb{Z}$ with $-c\leq a_{k}\leq c$, if
$\sum_{k=1}^{\ell}a_{k}\vec{\xi_{(k)}}$ is $(\Omega,p)$-reducible, then
$a_{1}=\dots=a_{k}=0$. A string which can be written in the form
$\vec{\xi}+\sum_{k=1}^{\ell}a_{k}\vec{\xi_{(k)}}$ for some $-c\leq a_{k}\leq
c$ and some $(\Omega,p)$-reducible string $\vec{\xi}$ is called an
_$(\Omega,c,p)$ -linear combination_ of
$\vec{\xi_{(1)}},\dots,\vec{\xi_{(\ell)}}$.

Let $\mathcal{T}=(\vec{\xi}_{j,k})_{1\leq j\leq s,1\leq k\leq D_{j}}$ be a
$(d,p)$-tower. We say that $\mathcal{T}$ is _$(\Omega,c,p)$ -independent_ if
for every $1\leq j\leq s$ and the $j$-strings
$\vec{\xi}_{j,1},\dots,\vec{\xi}_{j,D_{j}}$ are $(\Omega,c,p)$-independent.

We may also extend the definition of $p$-almost linear function/Freiman
homomorphism defined in [20] to strings (see Appendix A.8 for definitions):

######  Definition 5.5 ($p$-almost linear function/Freiman homomorphism for
strings).

Let $d,j,K\in\mathbb{N}_{+}$, $p$ be a prime, and $H$ be a subset of
$\mathbb{F}_{p}^{d}$. We say that a map
$h\mapsto\vec{\xi}_{h}=(\xi_{h,m})_{m\in\mathbb{N}^{d},|m|=j}$ from $H$ to the
set of $(j,d,p)$-strings is a _$p$ -almost linear function/Freiman
homomorphism_ (of complexity at most $K$) if the map $h\mapsto\xi_{h,m}$ is a
$p$-almost linear function/Freiman homomorphism for all
$m\in\mathbb{N}^{d},|m|=j$.

We are now ready to prove the main result for this section, which says that
any sequences of strings can be written as linear combinations of generators
with some sunflower-type independence properties. This is where we make
essential use of the additive combinatorics result obtained in the previous
part of the series [20] (i.e. Theorem A.16 of this paper).

######  Lemma 5.6 (Sunflower lemma for frequencies).

Let $d,j,\ell,L\in\mathbb{N}_{+}$, $\delta,\epsilon>0$,
$p\gg_{\delta,d,\epsilon,\ell,L}1$ be a prime,
$M\colon\mathbb{F}_{p}^{d}\to\mathbb{F}_{p}$ be a non-degenerate quadratic
form, and $H$ be a subset of $\mathbb{F}_{p}^{d}$ with $|H|>\epsilon p^{d}$.
For all $h\in H$, let $\vec{\xi}_{h,1},\dots,\vec{\xi}_{h,\ell}$ be
$(j,d)$-strings. If $d\geq N(j)$, then there exist $a\in\mathbb{N}_{+}$,
$a=O_{\ell}(1)$, a subset $H^{\prime}$ of $H$ with
$|H^{\prime}|\gg_{\delta,d,\epsilon,\ell,L}p^{d}$, integers
$\ell_{\text{cor}},\ell_{\text{ind}},\ell_{\text{lin}}=O_{\ell}(1)$, a
collection of “core” $(j,d)$-strings

$\mathcal{S}^{\text{cor}}=\\{\vec{\xi}^{\text{cor}}_{1},\dots,\vec{\xi}^{\text{cor}}_{\ell_{\text{cor}}}\\}$

collections of “petal” $(j,d)$-strings

$\mathcal{S}^{\text{ind}}_{h}=\\{\vec{\xi}^{\text{ind}}_{h,1},\dots,\vec{\xi}^{\text{ind}}_{h,\ell_{\text{ind}}}\\},\mathcal{S}^{\text{lin}}_{h}=\\{\vec{\xi}^{\text{lin}}_{h,1},\dots,\vec{\xi}^{\text{lin}}_{h,\ell_{\text{lin}}}\\}$

for all $h\in H^{\prime}$ such that the following holds:

  1. (i)

For all $h\in H^{\prime}$ and $1\leq k\leq\ell$, $\vec{\xi}_{h,k}$ is a
$(\tau(V(M)^{h}),L^{a},p)$-linear combination of

$\mathcal{S}^{\text{cor}}\cup\mathcal{S}^{\text{ind}}_{h}\cup\mathcal{S}^{\text{lin}}_{h}.$

  2. (ii)

There exists a subset $\Gamma^{\prime}$ of
$\Gamma:=\\{(h_{1},\dots,h_{4})\in{H^{\prime}}^{4}\colon
h_{1}+h_{2}=h_{3}+h_{4}\\}$ with $|\Gamma^{\prime}|>(1-\delta)|\Gamma|$ such
that for all $(h_{1},\dots,h_{4})\in\Gamma^{\prime}$, the $(j,d)$-strings in

$\mathcal{S}^{\text{cor}}\cup\cup_{i=1}^{4}\mathcal{S}^{\text{ind}}_{h_{i}}\cup\cup_{i=1}^{3}\mathcal{S}^{\text{lin}}_{h_{i}}$

are $(\tau(V(M)^{h_{1},h_{2},h_{3}}),L,p)$-independent.

  3. (iii)

For all $1\leq k\leq\ell_{\text{lin}}$, the map
$h\mapsto\vec{\xi}^{\text{lin}}_{h,k},h\in H^{\prime}$ is a $p$-almost linear
Freiman homomorphism of complexity $O_{\delta,d,\epsilon,\ell,L}(1)$.

###### Proof.

The outline of the proof of Lemma 5.6 is similar to that of Lemma 10.5 of
[12]. We say that a choice of
$H^{\prime},\ell_{\text{ind}},\ell_{\text{lin}},\ell_{\text{cor}},a$,
$\mathcal{S}^{\text{ind}}_{h},\mathcal{S}^{\text{lin}}_{h},\mathcal{S}^{\text{cor}},h\in
H^{\prime}$ is a _partial solution with weight_
$(\ell_{\text{ind}},\ell_{\text{lin}},\ell_{\text{cor}})$ if all the stated
conditions are satisfied expect Condition (ii). Define the lexicographical
ordering on the weights by setting
$(\ell_{\text{ind}},\ell_{\text{lin}},\ell_{\text{cor}})>(\ell^{\prime}_{\text{ind}},\ell^{\prime}_{\text{lin}},\ell^{\prime}_{\text{cor}})$
if $\ell_{\text{ind}}>\ell^{\prime}_{\text{ind}}$; or
$\ell_{\text{ind}}=\ell^{\prime}_{\text{ind}}$,
$\ell_{\text{lin}}>\ell^{\prime}_{\text{lin}}$; or
$\ell_{\text{ind}}=\ell^{\prime}_{\text{ind}},\ell_{\text{lin}}=\ell^{\prime}_{\text{lin}},\ell_{\text{cor}}>\ell^{\prime}_{\text{cor}}$.

By setting $H^{\prime}=H$,
$\ell_{\text{ind}}=\ell,\ell_{\text{lin}}=\ell_{\text{cor}}=0,a=1$ and
$\vec{\xi}^{\text{ind}}_{h,k}:=\vec{\xi}_{h,k}$ for all $h\in H,1\leq
k\leq\ell$, we get a partial solution with weight $(\ell,0,0)$.

Claim: If

$H^{\prime},\ell_{\text{ind}},\ell_{\text{lin}},\ell_{\text{cor}},a,\mathcal{S}^{\text{ind}}_{h},\mathcal{S}^{\text{lin}}_{h},\mathcal{S}^{\text{cor}},h\in
H^{\prime}$

is a partial solution with $|H^{\prime}|\gg_{\delta,d,\epsilon,\ell,L}p^{d}$
such that Condition (ii) is not satisfied and that
$2\ell_{\text{ind}}+\ell_{\text{lin}}+\ell_{\text{cor}}\leq 2\ell$, then there
exists a partial solution

$H^{\prime\prime},\ell^{\prime}_{\text{ind}},\ell^{\prime}_{\text{lin}},\ell^{\prime}_{\text{cor}},a+1,{\mathcal{S}^{\prime}}^{\text{ind}}_{h},{\mathcal{S}^{\prime}}^{\text{lin}}_{h},{\mathcal{S}^{\prime}}^{\text{cor}},h\in
H^{\prime\prime}$

with

(5.1)
$(\ell^{\prime}_{\text{ind}},\ell^{\prime}_{\text{lin}},\ell^{\prime}_{\text{cor}})<(\ell_{\text{ind}},\ell_{\text{lin}},\ell_{\text{cor}}),\text{
and
}2\ell^{\prime}_{\text{ind}}+\ell^{\prime}_{\text{lin}}+\ell^{\prime}_{\text{cor}}\leq
2\ell_{\text{ind}}+\ell_{\text{lin}}+\ell_{\text{cor}},$

and that $|H^{\prime\prime}|\gg_{\delta,d,\epsilon,\ell,L}p^{d}$.

By Lemma A.5, we may assume without loss of generality that all the vectors in
$H^{\prime}$ are $M$-non-isotropic. We may write

$\mathcal{S}^{\text{ind}}_{h}=\\{\vec{\xi}^{\text{ind}}_{h,k}\colon 1\leq
k\leq\ell_{\text{ind}}\\},\mathcal{S}^{\text{lin}}_{h}=\\{\vec{\xi}^{\text{lin}}_{h,k}\colon
1\leq
k\leq\ell_{\text{lin}}\\},\mathcal{S}^{\text{cor}}=\\{\vec{\xi}^{\text{cor}}_{k}\colon
1\leq k\leq\ell_{\text{cor}}\\}$

for all $h\in H^{\prime}$. For $h\in\mathbb{F}_{p}^{d}$, let $H^{\prime}_{h}$
denote the set of $(h_{1},h_{2})\in{H^{\prime}}^{2}$ such that
$h_{1}+h_{2}=h$. Then

(5.2) $|\\{(h_{1},h_{2},h_{3},h_{4})\in H^{\prime 4}\colon
h_{1}+h_{2}=h_{3}+h_{4}\\}|=\sum_{h\in\mathbb{F}_{p}^{d}}|H^{\prime}_{h}|^{2}\geq\frac{1}{p^{d}}\Bigl{(}\sum_{h\in\mathbb{F}_{p}^{d}}|H^{\prime}_{h}|\Bigr{)}^{2}=\frac{|H^{\prime}|^{4}}{p^{d}}.$

Since $|H^{\prime}|\gg_{\delta,d,\epsilon,\ell,L}p^{d}$, by assumption, (5.2)
and the Pigeonhole Principle, there exist $-L\leq
a^{\text{cor}}_{k},a^{\text{ind}}_{i,k},a^{\text{lin}}_{i,k}\leq L$ not all
equal to zero and a subset $W$ of $\\{(h_{1},h_{2},h_{3},h_{4})\in H^{\prime
4}\colon h_{1}+h_{2}=h_{3}+h_{4}\\}$ with
$|W|\gg_{\delta,d,\epsilon,\ell,L}p^{3d}$ such that for all
$(h_{1},h_{2},h_{3},h_{4})\in W$, we have that

(5.3)
$\sum_{k=1}^{\ell_{\text{cor}}}a^{\text{cor}}_{k}\vec{\xi}^{\text{cor}}_{k}+\sum_{i=1}^{4}\sum_{k=1}^{\ell_{\text{ind}}}a^{\text{ind}}_{i,k}\vec{\xi}^{\text{ind}}_{h_{i},k}+\sum_{i=1}^{3}\sum_{k=1}^{\ell_{\text{lin}}}a^{\text{lin}}_{i,k}\vec{\xi}^{\text{lin}}_{h_{i},k}\text{
is $(\tau(V(M)^{h_{1},h_{2},h_{3}}),p)$-reducible.}$

Let $Z$ be the set of $h_{1},h_{2},h_{3},h_{4}\in\mathbb{F}_{p}^{d}$ such that
$h_{1}+h_{2}=h_{3}+h_{4}$ and that $h_{1},h_{2},h_{3}$ are either linearly
dependent or $M$-non-isotropic. Let $W^{\prime}:=W\backslash Z$. Since $d\geq
3$, by Lemma A.5, we have that
$|W^{\prime}|\gg_{\delta,d,\epsilon,\ell,L}p^{3d}$. We consider three
different cases.

Case 1: all of $a^{\text{ind}}_{i,k},a^{\text{lin}}_{i,k}$ are zero. We may
assume without loss of generality that $a^{\text{cor}}_{1}\neq 0$. Let
$\vec{\xi^{\prime}}^{\text{cor}}_{k}:=(a^{\text{cor}}_{1})^{\ast}\vec{\xi}^{\text{cor}}_{k}$,
$\vec{\xi^{\prime}}^{\text{ind}}_{h,k}:=(a^{\text{cor}}_{1})^{\ast}\vec{\xi}^{\text{ind}}_{h,k}$
and
$\vec{\xi^{\prime}}^{\text{lin}}_{h,k}:=(a^{\text{cor}}_{1})^{\ast}\vec{\xi}^{\text{ind}}_{h,k}$.
Note that (5.3) implies that
$\vec{\xi}^{\text{cor}}_{1}+\sum_{k=2}^{\ell_{\text{cor}}}a^{\text{cor}}_{k}\vec{\xi^{\prime}}^{\text{cor}}_{k}$
is $(\tau(V(M)^{h_{1},h_{2},h_{3}}),p)$-reducible for all
$(h_{1},h_{2},h_{3},h_{4})\in W^{\prime}$. We show that
$\vec{\xi}^{\text{cor}}_{1}+\sum_{k=2}^{\ell_{\text{cor}}}a^{\text{cor}}_{k}\vec{\xi^{\prime}}^{\text{cor}}_{k}$
is $(\tau(V(M)),p)$-reducible by the intersection method introduced in [20].

Let $F$ be the polynomial induced by the polynomial associated to the
$j$-string

$\vec{\xi}^{\text{cor}}_{1}+\sum_{k=2}^{\ell_{\text{cor}}}a^{\text{cor}}_{k}\vec{\xi^{\prime}}^{\text{cor}}_{k}.$

Since $|W^{\prime}|\gg_{\delta,d,\epsilon,\ell,L}p^{3d}$ and $d\geq N(j)$,
there exist $(h_{i,1},h_{i,2},h_{i,3},h_{i,4})\in W^{\prime\prime},1\leq i\leq
j+1$ such that $h_{i,1},h_{i,2},h_{i,3},1\leq i\leq j+1$ are linearly
independent. So for all $1\leq i\leq j+1$, the $j$-string in
$\vec{\xi}^{\text{cor}}_{1}+\sum_{k=2}^{\ell_{\text{cor}}}a^{\text{cor}}_{k}\vec{\xi^{\prime}}^{\text{cor}}_{k}$
is $(\tau(V(M)^{h_{i,1},h_{i,2},h_{i,3}}),p)$-reducible. Since
$h_{i,1},h_{i,2},h_{i,3}$ are not $M$-isotropic, by Lemma 5.3, $F$ belongs to
$J^{M}_{h_{i,1},h_{i,2},h_{i,3}}$. By Proposition A.17 (setting $m=0,r=3$ and
$L=j$), we have that $F$ belongs to $J^{M}$. So by Lemma 5.3,
$\vec{\xi}^{\text{cor}}_{1}+\sum_{k=2}^{\ell_{\text{cor}}}a^{\text{cor}}_{k}\vec{\xi^{\prime}}^{\text{cor}}_{k}$
is $(\tau(V(M)),p)$-reducible.

This means that $\vec{\xi}^{\text{cor}}_{1}$ is a $(\tau(V(M)),L,p)$-linear
combination of
$\vec{\xi^{\prime}}^{\text{cor}}_{2},\dots,\vec{\xi^{\prime}}^{\text{cor}}_{\ell_{\text{cor}}}$.
Since $\vec{\xi}_{h,k}$ is a $(\tau(V(M)),L^{a},p)$-linear combination of the
strings in
$\mathcal{S}^{\text{cor}}\cup\mathcal{S}^{\text{ind}}_{h}\cup\mathcal{S}^{\text{lin}}_{h}$,
it is also a $(\tau(V(M)),L^{a+1},p)$-linear combination of the strings in
${\mathcal{S}^{\prime}}^{\text{ind}}_{h},{\mathcal{S}^{\prime}}^{\text{lin}}_{h},{\mathcal{S}^{\prime}}^{\text{cor}}$,
where

${\mathcal{S}^{\prime}}^{\text{ind}}_{h}=\\{\vec{\xi^{\prime}}^{\text{ind}}_{h,k}\colon
1\leq
k\leq\ell_{\text{ind}}\\},{\mathcal{S}^{\prime}}^{\text{lin}}_{h}=\\{\vec{\xi^{\prime}}^{\text{lin}}_{h,k}\colon
1\leq
k\leq\ell_{\text{lin}}\\},{\mathcal{S}^{\prime}}^{\text{cor}}=\\{\vec{\xi^{\prime}}^{\text{cor}}_{k}\colon
2\leq k\leq\ell_{\text{cor}}\\}.$

This means that

$H^{\prime},\ell_{\text{ind}},\ell_{\text{lin}},\ell_{\text{cor}}-1,a+1,{\mathcal{S}^{\prime}}^{\text{ind}}_{h},{\mathcal{S}^{\prime}}^{\text{lin}}_{h},{\mathcal{S}^{\prime}}^{\text{cor}},h\in
H^{\prime}$

is a partial solution satisfying (5.1).

Case 2: all of $a^{\text{ind}}_{i,k}$ are zero, but not all of
$a^{\text{lin}}_{i,k}$ are zero. We may assume without loss of generality that
$a^{\text{lin}}_{1,1}\neq 0$. For $h\in H^{\prime}$, let $U_{h}$ denote the
set of $(h_{2},h_{3})\in{H^{\prime}}^{2}$ such that
$(h,h_{2},h_{3},h+h_{2}-h_{3})\in W^{\prime}$ for all $1\leq i\leq j+3$. and
$U^{\prime}_{h}$ denote the set of
$(h_{1,2},h_{1,3},\dots,h_{j+3,2},h_{j+3,3})\in{H^{\prime}}^{2(j+3)}$ such
that $(h,h_{i,2},h_{i,3},h+h_{i,2}-h_{i,3})\in W^{\prime}$ for all $1\leq
i\leq j+3$. For
$\mathbb{h}=(h_{1,2},h_{1,3},\dots,h_{j+3,2},h_{j+3,3})\in{H^{\prime}}^{2(j+3)}$,
let $U^{\prime\prime}_{\mathbb{h}}$ denote the set of $h\in H^{\prime}$ such
that $\mathbb{h}\in U^{\prime}_{h}$. Then

$\sum_{\mathbb{h}\in{H^{\prime}}^{2(j+3)}}|U^{\prime\prime}_{\mathbb{h}}|=\sum_{h\in
H^{\prime}}|U^{\prime}_{h}|=\sum_{h\in
H^{\prime}}|U_{h}|^{j+3}\geq\frac{1}{|H^{\prime}|^{j+2}}\Bigl{(}\sum_{h\in
H^{\prime}}|U_{h}|\Bigr{)}^{j+3}=\frac{|W^{\prime}|^{j+3}}{|H^{\prime}|^{j+2}}\gg_{\delta,d,\epsilon,\ell,L}p^{(2j+7)d}.$

By the Pigeonhole Principle, there exists
$\tilde{H}\subseteq{H^{\prime}}^{2(j+3)}$ with
$|\tilde{H}|\gg_{\delta,d,\epsilon,\ell,L}p^{2(j+3)d}$ such that
$|U^{\prime\prime}_{\mathbb{h}}|\gg_{\delta,d,\epsilon,\ell,L}p^{d}$ for all
$\mathbb{h}\in\tilde{H}$. By Lemma A.5, we may pick some

$\mathbb{h}=(h_{1,2},h_{1,3},\dots,h_{j+3,2},h_{j+3,3})\in\tilde{H}$

with $h_{1,2},h_{1,3},\dots,h_{j+3,2},h_{j+3,3}$ being linearly independent.

Fix any such $\mathbb{h}$ and set
$H^{\prime\prime}=U^{\prime\prime}_{\mathbb{h}}$. For all $h\in
H^{\prime\prime}$, let
$\vec{\xi^{\prime}}^{\text{cor}}_{k}:=(a^{\text{lin}}_{1,1})^{\ast}\vec{\xi}^{\text{cor}}_{k}$,
$\vec{\xi^{\prime}}^{\text{ind}}_{h,k}:=(a^{\text{lin}}_{1,1})^{\ast}\vec{\xi}^{\text{ind}}_{h,k}$
and
$\vec{\xi^{\prime}}^{\text{lin}}_{h,k}:=(a^{\text{lin}}_{1,1})^{\ast}\vec{\xi}^{\text{ind}}_{h,k}$.
By (5.3) and the construction of $H^{\prime\prime}$, for all $h\in
H^{\prime\prime}$, we have that

(5.4)
$\sum_{k=1}^{\ell_{\text{cor}}}a^{\text{cor}}_{k}\vec{\xi^{\prime}}^{\text{cor}}_{k}+\sum_{j=2}^{3}\sum_{k=1}^{\ell_{\text{lin}}}a^{\text{lin}}_{j,k}\vec{\xi^{\prime}}^{\text{lin}}_{h_{i,j},k}+\sum_{k=2}^{\ell_{\text{lin}}}a^{\text{lin}}_{1,k}\vec{\xi^{\prime}}^{\text{lin}}_{h,k}+\vec{\xi}^{\text{lin}}_{h,1}\text{
is $(\tau(V(M)^{h,h_{i,2},h_{i,3}}),p)$-reducible.}$

Let $F_{i}$ be the polynomial induced by the polynomial associated to the
$j$-string

$\sum_{k=1}^{\ell_{\text{cor}}}a^{\text{cor}}_{k}\vec{\xi^{\prime}}^{\text{cor}}_{k}+\sum_{j=2}^{3}\sum_{k=1}^{\ell_{\text{lin}}}a^{\text{lin}}_{j,k}\vec{\xi^{\prime}}^{\text{lin}}_{h_{i,j},k},$

and $G_{h}$ be the polynomial induced by the polynomial associated to the
$j$-string

$\sum_{k=2}^{\ell_{\text{lin}}}a^{\text{lin}}_{1,k}\vec{\xi^{\prime}}^{\text{lin}}_{h,k}+\vec{\xi}^{\text{lin}}_{h,1}.$

Since $h,h_{i,2},h_{i,3}$ are linearly independent and $M$-non-isotropic, by
Lemma 5.3 and (5.4), $F_{i}-G_{h}$ belongs to $J^{M}_{h,h_{i,2},h_{i,3}}$ for
all $1\leq i\leq j+3$ and $h\in H^{\prime\prime}$. So for all $h,h^{\prime}\in
H^{\prime\prime}$ and $1\leq i\leq j+3$, we have that

$G_{h}-G_{h^{\prime}}\equiv(G_{h}-F_{i})-(G_{h^{\prime}}-F_{i})\equiv 0\mod
J^{M}_{h,h^{\prime},h_{i,2},h_{i,3}}.$

Since $h_{1,2},h_{1,3},\dots,h_{j+3,2},h_{j+3,3}$ are linearly independent, by
Proposition A.17 (setting $m\leq 2,s=j,r=2$), we have that

$G_{h}\equiv G_{h^{\prime}}\mod J^{M}_{h,h^{\prime}}$

for all $h,h^{\prime}\in H^{\prime\prime}$. By Proposition A.18, there exists
$G\in\text{HP}_{d}(j)$ (recall the definition in Section 1.3) such that

$G_{h}\equiv G\mod J^{M}_{h}$

for all $h\in H^{\prime\prime}$. In other words, letting $\vec{\xi}_{0}$
denote the $j$-string associated to any regular lifting of $G$, by Lemma 5.3,
we have that

$-\vec{\xi}_{0}+\sum_{k=2}^{\ell_{\text{lin}}}a^{\text{lin}}_{1,k}\vec{\xi^{\prime}}^{\text{lin}}_{h,k}+\vec{\xi}^{\text{lin}}_{h,1}$

is $(\tau(V(M)^{h}),p)$-reducible for all $h\in H^{\prime\prime}$.

This mean that $\vec{\xi}^{\text{lin}}_{h,1}$ is a
$(\tau(V(M)^{h}),L,p)$-linear combination of
$\vec{\xi}_{0},\vec{\xi^{\prime}}^{\text{lin}}_{h,k},2\leq
k\leq\ell_{\text{lin}}$. Since $\vec{\xi}_{h,k}$ is a
$(\tau(V(M)^{h}),L^{a},p)$-linear combination of the strings in
$\mathcal{S}^{\text{cor}}\cup\mathcal{S}^{\text{ind}}_{h}\cup\mathcal{S}^{\text{lin}}_{h}$,
it is also a $(\tau(V(M)^{h}),L^{a+1},p)$-linear combination of the strings in
${\mathcal{S}^{\prime}}^{\text{ind}}_{h},{\mathcal{S}^{\prime}}^{\text{lin}}_{h},{\mathcal{S}^{\prime}}^{\text{cor}}$,
where

${\mathcal{S}^{\prime}}^{\text{ind}}_{h}=\\{\vec{\xi^{\prime}}^{\text{ind}}_{h,k}\colon
1\leq
k\leq\ell_{\text{ind}}\\},{\mathcal{S}^{\prime}}^{\text{lin}}_{h}=\\{\vec{\xi^{\prime}}^{\text{lin}}_{h,k}\colon
2\leq
k\leq\ell_{\text{lin}}\\},{\mathcal{S}^{\prime}}^{\text{cor}}=\\{\vec{\xi}_{0},\vec{\xi^{\prime}}^{\text{cor}}_{k}\colon
1\leq k\leq\ell_{\text{cor}}\\}.$

This means that

$H^{\prime\prime},\ell_{\text{ind}},\ell_{\text{lin}}-1,\ell_{\text{cor}}+1,a+1,{\mathcal{S}^{\prime}}^{\text{ind}}_{h},{\mathcal{S}^{\prime}}^{\text{lin}}_{h},{\mathcal{S}^{\prime}}^{\text{cor}},h\in
H^{\prime\prime}$

is a partial solution satisfying (5.1).

Case 3: not all of $a^{\text{ind}}_{i,k}$ are zero. We may assume without loss
of generality that $a^{\text{lin}}_{4,1}\neq 0$. Let
$\Xi_{1},\dots,\Xi_{4}\colon\mathbb{F}_{p}^{d}\to(\mathbb{Z}/p)^{\binom{j+d-1}{d-1}}$
be functions given by

$\Xi_{i}(h):=\sum_{k=1}^{\ell_{\text{ind}}}a^{\text{ind}}_{i,k}\vec{\xi}^{\text{ind}}_{h,k}+\sum_{k=1}^{\ell_{\text{lin}}}a^{\text{lin}}_{i,k}\vec{\xi}^{\text{lin}}_{h,k}$

for $i=1,2,3$, and

$\Xi_{4}(h):=\sum_{k=1}^{\ell_{\text{cor}}}a^{\text{cor}}_{k}\vec{\xi}^{\text{cor}}_{k}+\sum_{k=1}^{\ell_{\text{ind}}}a^{\text{ind}}_{4,k}\vec{\xi}^{\text{ind}}_{h,k}.$

Then (5.3) implies that

(5.5) $\Xi_{1}(h_{1})+\Xi_{2}(h_{2})+\Xi_{3}(h_{3})+\Xi_{4}(h_{4})$ is
$(\tau(V(M)^{h_{1},h_{2},h_{3}}),p)$-reducible

for all $(h_{1},h_{2},h_{3},h_{1}+h_{2}-h_{3})\in W^{\prime}$. For any
$(j,d)$-string $\vec{\xi}:=(\xi_{m})_{|m|=j}$, let $\omega(\vec{\xi})$ the
polynomial in $\text{HP}_{d}(j)$ given by

$\omega(\vec{\xi})(n):=\sum_{m\in\mathbb{N}^{d},|m|=j}\iota(p\xi_{m})(m!)^{\ast}n^{m},n\in\mathbb{F}_{p}^{d},$

i.e. $\omega(\vec{\xi})$ is the polynomial induced by the polynomial
associated to $\vec{\xi}$. For $1\leq i\leq 4$, let $\omega_{i}\colon