0.0pt\mathbb{E}}}\displaylimits_{v^{\prime}_{9}}\mathbbm{1}_{V}(v^{\prime}_{9})\mathbbm{1}_{V}(v^{\prime}_{9}+b_{1}+b^{\prime}_{2}-z^{\prime}_{1})\mathbbm{1}_{V}(v^{\prime}_{9}+w)\mathbbm{1}_{V}(v^{\prime}_{9}+b_{1}+b^{\prime}_{2}-z^{\prime}_{1}+w),$

so we get 72 terms in total. Let us omit the following 7 terms

$\displaystyle\mathbbm{1}_{V}(v_{5}+x_{2}-b_{2}+b_{3}+w),\,\mathbbm{1}_{V}(v_{7}+y_{3}+b_{1}-b_{3}+w),\,\mathbbm{1}_{V}(v_{9}+b_{1}+b_{2}-z_{1}+w),\,\mathbbm{1}_{V}(v^{\prime}_{1}+b_{1}+b^{\prime}_{2}-b^{\prime}_{3}+w),$
$\displaystyle\hskip
56.9055pt\mathbbm{1}_{V}(v^{\prime}_{5}+x^{\prime}_{2}-b^{\prime}_{2}+b^{\prime}_{3}+w),\,\mathbbm{1}_{V}(v^{\prime}_{7}+y^{\prime}_{3}+b_{1}-b^{\prime}_{3}+w),\,\mathbbm{1}_{V}(v^{\prime}_{9}+b_{1}+b^{\prime}_{2}-z^{\prime}_{1}+w).$

We may use Lemma 3.2 65 times to get the bound $\delta^{65}+65\varepsilon$, as
follows. First, use $w$ with each of 11 variables
$b_{1},b_{2},b^{\prime}_{2},\dots,z_{1},z^{\prime}_{1}$ to remove the
remaining 11 terms that involve $w$ and one of the mentioned variables. Then
use $w$ and a variable among $v_{1},\dots,v^{\prime}_{9}$ to remove further 18
terms. The remaining 36 terms have obvious choices of variables.

Hence, the second long sum in (18) is at most $2\delta^{65}$, since
$\varepsilon\leq\frac{1}{65}\delta^{65}$.

Let us define $t\colon G^{6}\to G^{10}$

$t(b_{1},b_{2},b_{3},x_{2},y_{3},z_{1})=\Big{(}b_{1},b_{2},b_{3},b_{1}+b_{2}-b_{3},x_{2},x_{2}-b_{2}+b_{3},y_{3},y_{3}+b_{1}-b_{3},z_{1},b_{1}+b_{2}-z_{1}\Big{)}$

which is the 10-tuple of points appearing in the expressions above.
Furthermore, let $F(b_{1},b_{2},b_{3},x_{2},y_{3},z_{1};w)$ for the product
$\prod_{i\in[10]}\mathbbm{1}_{V\cap
V-t_{i}(b_{1},b_{2},b_{3},x_{2},y_{3},z_{1})}\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}\mathbbm{1}_{V\cap
V-t_{i}(b_{1},b_{2},b_{3},x_{2},y_{3},z_{1})}(w)$. The upper bound on (17)
then becomes

$\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{b_{1},b_{2},b_{3},x_{2},y_{3},z_{1},w}\Big{(}1-\mathbbm{1}_{A}(b_{1})\mathbbm{1}_{\tilde{U}_{b_{1}}}(w)\Big{)}F(b_{1},b_{2},b_{3},x_{2},y_{3},z_{1};w)\leq
2\sqrt{\xi}\delta^{36}+10\sqrt[8]{\varepsilon}.$

Note that the actual signs in the linear combinations such as
$b_{1}+b_{2}-b_{3}$ do not play a role in the argument above, so we could have
had any $\pm b_{1}\pm b_{2}\pm b_{3}$ instead. The argument can be used to
prove the same inequality but with
$\Big{(}1-\mathbbm{1}_{A}(s)\mathbbm{1}_{\tilde{U}_{s}}(w)\Big{)}$ instead of
$\Big{(}1-\mathbbm{1}_{A}(b_{1})\mathbbm{1}_{\tilde{U}_{b_{1}}}(w)\Big{)}$,
where $s$ is any of the remaining 9 possibilities. Namely, for $s$ among
$b_{2},b_{3},x_{2},y_{3},z_{1}$ we apply almost the same arguments with $s$ in
place of $b_{1}$, with the slight difference in the terms that are neglected.
On the other hand, for other possibilities, we need to change variables. When
$s=b_{1}+b_{2}-b_{3}$ we replace $b_{3}$ by $b_{1}+b_{2}-b_{3}$ and $x_{2}$ by
$y_{3}$, thus reducing that case to $s=b_{3}$ (with a slight difference in
signs in linear combinations, which is not an issue). When
$s=x_{2}-b_{2}+b_{3}$ we replace $x_{2}$ by $x_{2}+b_{2}-b_{3}$ to reduce to
the case when $s=x_{2}$, with similar arguments for
$s\in\\{y_{3}+b_{1}-b_{3},b_{1}+b_{2}-z_{1}\\}$.
Let $I(s;w)=\Big{(}1-\mathbbm{1}_{A}(s)\mathbbm{1}_{\tilde{U}_{s}}(w)\Big{)}$,
which takes values 0 and 1. In particular

$\displaystyle\bigg{|}\bigg{(}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{b_{1},b_{2},b_{3},x_{2},y_{3},z_{1},w}\Big{(}\prod_{i\in[10]}\Big{(}1-I(t_{i}(b_{1},b_{2},b_{3},x_{2},y_{3},z_{1});w)\Big{)}\Big{)}F(b_{1},b_{2},b_{3},x_{2},y_{3},z_{1};w)\bigg{)}$
$\displaystyle\hskip
256.0748pt-\bigg{(}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{b_{1},b_{2},b_{3},x_{2},y_{3},z_{1},w}F(b_{1},b_{2},b_{3},x_{2},y_{3},z_{1};w)\bigg{)}\bigg{|}$
$\displaystyle\hskip
28.45274pt=\bigg{|}\sum_{j\in[10]}\bigg{(}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{b_{1},b_{2},b_{3},x_{2},y_{3},z_{1},w}\Big{(}\prod_{i\in[j,10]}\Big{(}1-I(t_{i}(b_{1},b_{2},b_{3},x_{2},y_{3},z_{1});w)\Big{)}\Big{)}F(b_{1},b_{2},b_{3},x_{2},y_{3},z_{1};w)$
$\displaystyle\hskip
170.71652pt-\Big{(}\prod_{i\in[j+1,10]}\Big{(}1-I(t_{i}(b_{1},b_{2},b_{3},x_{2},y_{3},z_{1});w)\Big{)}\Big{)}F(b_{1},b_{2},b_{3},x_{2},y_{3},z_{1};w)\bigg{)}\bigg{|}$
$\displaystyle\hskip
28.45274pt\leq\sum_{j\in[10]}\bigg{|}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{b_{1},b_{2},b_{3},x_{2},y_{3},z_{1},w}I(t_{j}(b_{1},b_{2},b_{3},x_{2},y_{3},z_{1});w)\Big{(}\prod_{i\in[j+1,10]}\Big{(}1-I(t_{i}(b_{1},b_{2},b_{3},x_{2},y_{3},z_{1});w)\Big{)}\Big{)}$
$\displaystyle\hskip
341.43306ptF(b_{1},b_{2},b_{3},x_{2},y_{3},z_{1};w)\bigg{|}$
$\displaystyle\hskip
28.45274pt\leq\sum_{j\in[10]}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{b_{1},b_{2},b_{3},x_{2},y_{3},z_{1},w}I(t_{j}(b_{1},b_{2},b_{3},x_{2},y_{3},z_{1});w)F(b_{1},b_{2},b_{3},x_{2},y_{3},z_{1};w),$

where we used the fact that all terms take values in $[0,1]$ to neglect some
of them in the last line. Returing to our original notation, we conclude that

$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{b_{1},b_{2},b_{3},x_{2},y_{3},z_{1}}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{w}\mathbbm{1}_{A}(b_{1})\mathbbm{1}_{\tilde{U}_{b_{1}}}(w)\mathbbm{1}_{V\cap
V-b_{1}}\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}\mathbbm{1}_{V\cap
V-b_{1}}(w)\,\,\mathbbm{1}_{A}(b_{2})\mathbbm{1}_{\tilde{U}_{b_{2}}}(w)\mathbbm{1}_{V\cap
V-b_{2}}\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}\mathbbm{1}_{V\cap
V-b_{2}}(w)$ $\displaystyle\hskip
14.22636pt\mathbbm{1}_{A}(b_{3})\mathbbm{1}_{\tilde{U}_{b_{3}}}(w)\mathbbm{1}_{V\cap
V-b_{3}}\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}\mathbbm{1}_{V\cap
V-b_{3}}(w)\,\,\mathbbm{1}_{A}(b_{1}+b_{2}-b_{3})\mathbbm{1}_{\tilde{U}_{b_{1}+b_{2}-b_{3}}}(w)\mathbbm{1}_{V\cap
V-(b_{1}+b_{2}-b_{3})}\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}\mathbbm{1}_{V\cap
V-(b_{1}+b_{2}-b_{3})}(w)$ $\displaystyle\hskip
14.22636pt\mathbbm{1}_{A}(x_{2})\mathbbm{1}_{\tilde{U}_{x_{2}}}(w)\mathbbm{1}_{V\cap
V-x_{2}}\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}\mathbbm{1}_{V\cap
V-x_{2}}(w)\,\,\mathbbm{1}_{A}(x_{2}-b_{2}+b_{3})\mathbbm{1}_{\tilde{U}_{x_{2}-b_{2}+b_{3}}}(w)\mathbbm{1}_{V\cap
V-(x_{2}-b_{2}+b_{3})}\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}\mathbbm{1}_{V\cap
V-(x_{2}-b_{2}+b_{3})}(w)$ $\displaystyle\hskip
14.22636pt\mathbbm{1}_{A}(y_{3})\mathbbm{1}_{\tilde{U}_{y_{3}}}(w)\mathbbm{1}_{V\cap
V-y_{3}}\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}\mathbbm{1}_{V\cap
V-y_{3}}(w)\,\,\mathbbm{1}_{A}(y_{3}+b_{1}-b_{3})\mathbbm{1}_{\tilde{U}_{y_{3}+b_{1}-b_{3}}}(w)\mathbbm{1}_{V\cap
V-(y_{3}+b_{1}-b_{3})}\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}\mathbbm{1}_{V\cap
V-(y_{3}+b_{1}-b_{3})}(w)$ $\displaystyle\hskip
14.22636pt\mathbbm{1}_{A}(z_{1})\mathbbm{1}_{\tilde{U}_{z_{1}}}(w)\mathbbm{1}_{V\cap
V-z_{1}}\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}\mathbbm{1}_{V\cap
V-z_{1}}(w)\,\,\mathbbm{1}_{A}(b_{1}+b_{2}-z_{1})\mathbbm{1}_{\tilde{U}_{b_{1}+b_{2}-z_{1}}}(w)\mathbbm{1}_{V\cap
V-(b_{1}+b_{2}-z_{1})}\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}\mathbbm{1}_{V\cap
V-(b_{1}+b_{2}-z_{1})}(w)$ $\displaystyle\hskip
85.35826pt\geq\frac{c_{1}}{2}\delta^{36},$

provided $\xi\leq 2^{-20}c_{1}^{2}$ and $\varepsilon\leq
2^{-100}c_{1}^{8}\delta^{288}$.

Since every element $a\in A$ is $\sqrt[4]{\varepsilon}$-regular, by property
(ii) we have that $\mathbbm{1}_{V\cap V-a}\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}\mathbbm{1}_{V\cap
V-a}(b)\leq 2\delta^{3}$ holds for all but at most $\sqrt[4]{\varepsilon}|G|$
of $b\in G$. Combining this fact with the inequality above, we see that

$\displaystyle\frac{c_{1}}{2}\delta^{36}\leq
10\sqrt[4]{\varepsilon}+2^{10}\delta^{30}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{b_{1},b_{2},b_{3},x_{2},y_{3},z_{1}}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{w}\mathbbm{1}_{A}(b_{1})\mathbbm{1}_{\tilde{U}_{b_{1}}}(w)\mathbbm{1}_{A}(b_{2})\mathbbm{1}_{\tilde{U}_{b_{2}}}(w)\mathbbm{1}_{A}(b_{3})\mathbbm{1}_{\tilde{U}_{b_{3}}}(w)\mathbbm{1}_{A}(b_{1}+b_{2}-b_{3})\mathbbm{1}_{\tilde{U}_{b_{1}+b_{2}-b_{3}}}(w)$
$\displaystyle\hskip
56.9055pt\mathbbm{1}_{A}(x_{2})\mathbbm{1}_{\tilde{U}_{x_{2}}}(w)\mathbbm{1}_{A}(x_{2}-b_{2}+b_{3})\mathbbm{1}_{\tilde{U}_{x_{2}-b_{2}+b_{3}}}(w)\mathbbm{1}_{A}(y_{3})\mathbbm{1}_{\tilde{U}_{y_{3}}}(w)\mathbbm{1}_{A}(y_{3}+b_{1}-b_{3})\mathbbm{1}_{\tilde{U}_{y_{3}+b_{1}-b_{3}}}(w)$
$\displaystyle\hskip
56.9055pt\mathbbm{1}_{A}(z_{1})\mathbbm{1}_{\tilde{U}_{z_{1}}}(w)\mathbbm{1}_{A}(b_{1}+b_{2}-z_{1})\mathbbm{1}_{\tilde{U}_{b_{1}+b_{2}-z_{1}}}(w).$

Provided $\varepsilon\leq 2^{-40}c_{1}^{4}\delta^{144}$, the claim follows. ∎

We now set $\xi=\exp(-D\log^{D}(2c_{0}^{-1}))$, where $D$ is the constant from
Proposition 3.12 and write $A=A^{\xi}$.

Let us also show that subspaces $U_{a,i}$ cannot have a large intersection for
different choices of $a$.

######  Claim 3.13.

Let $r\in\mathbb{N}$ and let $\varepsilon\leq 2^{-500}\xi^{32}\delta^{32}$.
There exists $K\leq\exp\Big{(}r\log^{O(1)}(2\xi^{-1})\Big{)}$ such that for
all but at most $64r\delta^{-32r}\varepsilon|G|^{r}$ choices of
$(a_{1},\dots,a_{r})\in A^{r}$ we have

$|U_{a_{1},i_{1}}\cap U_{a_{2},i_{2}}\cap\dots\cap U_{a_{r},i_{r}}|\leq
K\delta^{r}|G|$

for all indices $i_{1}\in[m_{a_{1}}],\dots,i_{r}\in[m_{a_{r}}]$.

###### Proof.

Recall from Proposition 3.10 which constructs subspaces $U_{a,i}$ that we have
parameters $M\leq\exp\Big{(}\log^{O(1)}(2\xi^{-1})\Big{)}$ and
$\alpha\geq(\xi/2)^{O(1)}\delta^{15}$ such that $m_{a}\leq M$ for all $a\in A$
and that ${\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a}(b)\geq\alpha$ for all $b\in U_{a,i}$. Fix $a_{1},\dots,a_{r}\in A$. Note
that

$\displaystyle\alpha^{r}M^{-r}\sum_{i_{1}\in[m_{a_{1}}],i_{2}\in[m_{a_{2}}],\dots,i_{r}\in[m_{a_{r}}]}|U_{a_{1},i_{1}}\cap
U_{a_{2},i_{2}}\cap\dots\cap U_{a_{r},i_{r}}|$ $\displaystyle\hskip
56.9055pt\leq
M^{-r}\sum_{i_{1}\in[m_{a_{1}}],i_{2}\in[m_{a_{2}}],\dots,i_{r}\in[m_{a_{r}}]}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{b}\mathbbm{1}_{U_{a_{1},i_{1}}\cap\dots\cap
U_{a_{r},i_{r}}}(b)\Big{(}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-{a_{1}}}(b)\Big{)}\Big{(}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a_{2}}(b)\Big{)}$ $\displaystyle\hskip
341.43306pt\dots\Big{(}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a_{r}}(b)\Big{)}$ $\displaystyle\hskip
56.9055pt=\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{b}\bigg{(}M^{-r}\sum_{i_{1}\in[m_{a_{1}}],i_{2}\in[m_{a_{2}}],\dots,i_{r}\in[m_{a_{r}}]}\mathbbm{1}_{U_{a_{1},i_{1}}\cap\dots\cap
U_{a_{r},i_{r}}}(b)\bigg{)}\Big{(}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a_{1}}(b)\Big{)}\dots\Big{(}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a_{r}}(b)\Big{)}$ $\displaystyle\hskip
56.9055pt\leq\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{b}\Big{(}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a_{1}}(b)\Big{)}\dots\Big{(}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a_{r}}(b)\Big{)}.$ (20)

Let us define
$F(a_{1},\dots,a_{r})=\mathop{\mathbb{E}}_{b}\Big{(}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a_{1}}(b)\Big{)}\dots\Big{(}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a_{r}}(b)\Big{)}$. We claim that $\|F-\delta^{16r}\|^{2}_{L^{2}(G^{r})}\leq
64r\varepsilon$. To see that we first approximate
$\mathop{\mathbb{E}}_{a_{1},\dots,a_{r}}F(a_{1},\dots,a_{r})^{2}$ by
$\delta^{32r}$. We have

$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a_{1},\dots,a_{r}}F(a_{1},\dots,a_{r})^{2}=\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a_{[r]}}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{u,v}\Big{(}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a_{1}}(u)\Big{)}\dots\Big{(}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a_{r}}(u)\Big{)}\Big{(}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a_{1}}(v)\Big{)}\dots\Big{(}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a_{r}}(v)\Big{)}$ $\displaystyle\hskip
56.9055pt=\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a_{[r]}}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{u,v}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x_{[r]\times[7]},y_{[r]\times[7]}}\bigg{(}\prod_{i\in[r]}\Big{(}\prod_{j\in[7]}\mathbbm{1}_{V}(x_{i,j})\mathbbm{1}_{V}(x_{i,j}+a_{i})\Big{)}\mathbbm{1}_{V}\Big{(}\sum_{\ell\in[7]}(-1)^{\ell+1}x_{i,\ell}-u\Big{)}$
$\displaystyle\hskip
341.43306pt\mathbbm{1}_{V}\Big{(}\sum_{\ell\in[7]}(-1)^{\ell+1}x_{i,\ell}-u+a_{i}\Big{)}\bigg{)}$
$\displaystyle\hskip
113.81102pt\bigg{(}\prod_{i\in[r]}\Big{(}\prod_{j\in[7]}\mathbbm{1}_{V}(y_{i,j})\mathbbm{1}_{V}(y_{i,j}+a_{i})\Big{)}\mathbbm{1}_{V}\Big{(}\sum_{\ell\in[7]}(-1)^{\ell+1}y_{i,\ell}-v\Big{)}$
$\displaystyle\hskip
341.43306pt\mathbbm{1}_{V}\Big{(}\sum_{\ell\in[7]}(-1)^{\ell+1}y_{i,\ell}-v+a_{i}\Big{)}\bigg{)}.$

We apply Lemma 3.2 $32r$ times to the expression above, first we use pairs
$(u,a_{i})$ for
$\mathbbm{1}_{V}\Big{(}\sum_{\ell\in[7]}(-1)^{\ell+1}x_{i,\ell}-u+a_{i}\Big{)}$
and $(v,a_{i})$ for
$\mathbbm{1}_{V}\Big{(}\sum_{\ell\in[7]}(-1)^{\ell+1}y_{i,\ell}-v+a_{i}\Big{)}$,
then pairs $(u,x_{i,1})$ for
$\mathbbm{1}_{V}\Big{(}\sum_{\ell\in[7]}(-1)^{\ell+1}x_{i,\ell}-u\Big{)}$ and
$(v,y_{i,1})$ for
$\mathbbm{1}_{V}\Big{(}\sum_{\ell\in[7]}(-1)^{\ell+1}y_{i,\ell}-v\Big{)}$ and
obvious variables for the remaining terms. Similarly, we get
$\Big{|}\mathop{\mathbb{E}}_{a_{[r]}}F(a_{1},\dots,a_{r})-\delta^{16r}\Big{|}\leq
16r\varepsilon$. We conclude

$\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a_{[r]}}\Big{|}F(a_{1},\dots,a_{r})-\delta^{16r}\Big{|}^{2}\leq
64r\varepsilon,$

as claimed. In particular, $F(a_{1},\dots,a_{r})\leq 2\delta^{16r}$ holds for
all but at most $64r\varepsilon\delta^{-32r}$ proportion of
$(a_{1},\dots,a_{r})\in G^{r}$. Returning to (20), the proof is complete.∎

We are now ready to pass from an approximate quadratic variety to an
approximate quasirandom linear system of subspaces.

###### Proof of Theorem 3.1.

Recall that $\xi=\exp(-D\log^{D}(2c^{-1}))$, where $D$ is the constant from
Proposition 3.12 and set $A=A^{\xi}$. Claim 3.8 implies that
$|A^{\xi}|\geq\frac{c_{0}}{40}|G|$, giving property (ii). Apply Proposition
3.10 for each $a\in A^{\xi}$ and then take $W_{a}$ uniformly at random from
$U_{a,1},\dots,U_{a,m_{a}}$. Properties (iii) and (iv) follow immediately.
Property (v) follows from Claim 3.13.
Proposition 3.12 and the fact that $m_{a}\leq\exp(\log^{O(1)}(2c_{0}^{-1}))$
for all $a\in A$ imply

$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits\sum_{\begin{subarray}{c}b_{1},b_{2},b_{3}\\\
x_{2},y_{3},z_{1}\end{subarray}}\mathbbm{1}_{A}(b_{1}+b_{2}-b_{3})\mathbbm{1}_{A}(b_{1})\mathbbm{1}_{A^{\xi}}(b_{2})\mathbbm{1}_{A}(b_{3})\mathbbm{1}_{A}(x_{2})$
$\displaystyle\hskip
227.62204pt\mathbbm{1}_{A}(x_{2}-b_{2}+b_{3})\mathbbm{1}_{A}(y_{3})\mathbbm{1}_{A}(y_{3}+b_{1}-b_{3})\mathbbm{1}_{A}(z_{1})\mathbbm{1}_{A}(b_{1}+b_{2}-z_{1})$
$\displaystyle\hskip 56.9055pt|W_{b_{1}+b_{2}-b_{3}}\cap W_{b_{1}}\cap
W_{b_{2}}\cap W_{b_{3}}\cap W_{x_{2}}\cap W_{x_{2}-b_{2}+b_{3}}\cap
W_{y_{3}}\cap W_{y_{3}+b_{1}-b_{3}}\cap W_{z_{1}}\cap W_{b_{1}+b_{2}-z_{1}}|$
$\displaystyle\hskip
369.88582pt\geq\exp(-\log^{O(1)}(2c_{0}^{-1}))\delta^{6}|G|^{7}.$

As

$\displaystyle|W_{b_{1}+b_{2}-b_{3}}\cap W_{b_{1}}\cap W_{b_{2}}\cap
W_{b_{3}}\cap W_{x_{2}}\cap W_{x_{2}-b_{2}+b_{3}}\cap W_{y_{3}}\cap
W_{y_{3}+b_{1}-b_{3}}\cap W_{z_{1}}\cap W_{b_{1}+b_{2}-z_{1}}|$
$\displaystyle\hskip 56.9055pt\leq|W_{b_{1}}\cap W_{b_{2}}\cap W_{b_{3}}\cap
W_{x_{2}}\cap W_{y_{3}}\cap W_{z_{1}}|$

which is at most $\exp(\log^{O(1)}(2c_{0}^{-1}))\delta^{6}|G|$ for all but at
most $O(\delta^{-200}\varepsilon|G|^{6})$ choices of
$(b_{1},b_{2},b_{3},x_{2},y_{3},z_{1})$, we may choose the subspaces $W_{a}$
so that property (vi) holds. The value of $c_{1}$ is taken as the minimum of
relevant quantities arising in the previous steps.∎

## §4 Structure of approximate quasirandom linear systems of subspaces

This section is devoted to proving a structure theorem for approximate
quasirandom linear systems of subspaces. The main result is the following
theorem. Note that the conditions below are reformulated and simplified
conclusions of Theorem 3.1.

######  Theorem 4.1.

There exists an absolute constant $D\geq 1$ such that the following holds. Let
$c>0$ and let $d$ be a positive integer. Let $A\subseteq G$ be a set of size
$|A|\geq c|G|$ and let $W_{a}\leq G$ be a subspace of codimension $d$ for each
$a\in A$. Suppose that

$|W_{a_{1}}\cap W_{a_{2}}\cap\dots\cap W_{a_{r}}|\leq Kp^{-rd}|G|$

holds for all but at most $\eta|G|^{r}$ $r$-tuples
$(a_{1},a_{2},\dots,a_{r})\in A^{r}$ for each $r\in[9]$. Assume furthermore
that for at least $c|G|^{6}$ triples
$(a,b_{1},b_{2},b_{3},x_{2},x_{3},y_{1},y_{3},z_{1},z_{2})\in A^{10}$ we have

  * •

$a=b_{1}+b_{2}-b_{3},\,\,x_{3}=x_{2}-b_{2}+b_{3},\,\,y_{1}=y_{3}+b_{1}-b_{3},\,\,z_{2}=b_{1}+b_{2}-z_{1},$
(21)

and

  * •

the subspaces

$W_{a}\cap W_{b_{1}}\cap W_{b_{2}}\cap W_{b_{3}}\cap W_{x_{2}}\cap
W_{x_{3}}\cap W_{y_{1}}\cap W_{y_{3}}\cap W_{z_{1}}\cap W_{z_{2}}$ (22)

has size at least $K^{-1}p^{-6d}|G|$.

Then, provided $\eta\leq 2^{-31}c^{3}$, there exist parameters
$c^{\prime}\geq\exp\Big{(}-\exp\Big{(}(\log(2c^{-1})+\log_{p}K)^{D}\Big{)}\Big{)}$
and $r\leq\exp\Big{(}(\log(2c^{-1})+\log_{p}K)^{D}\Big{)}$, set
$A^{\prime}\subseteq A$ and a map $\Phi\colon G\times\mathbb{F}_{p}^{d}\to G$,
affine in the first variable and linear in the second, such that
$|A^{\prime}|\geq c^{\prime}|G|$ and for each $a\in A^{\prime}$ we have
$|\operatorname{Im}\Phi(a,\cdot)\cap W_{a}^{\perp}|\geq c^{\prime}p^{d}$.
Moreover, there exists a subspace $\Lambda\leq\mathbb{F}_{p}^{d}$ of dimension
$r$ such that whenever $\lambda\notin\Lambda$ we have

$\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x,y}\omega\Big{(}\Phi(x,\lambda)\cdot
y\Big{)}\leq\Big{(}\eta{c^{\prime}}^{-2}\Big{)}^{1/2r}.$

The key observation that allows us to pass from subspaces to mutually related
linear maps is the next lemma.

######  Lemma 4.2.

Let $U_{1},U_{2},U_{3},U_{4}\leq G$ be subspaces of dimension $d$. Let $K\geq
1$ be a parameter such that

$K^{-1}p^{3d}\leq|U_{i_{1}}+U_{i_{2}}+U_{i_{3}}|\leq|U_{1}+U_{2}+U_{3}+U_{4}|\leq
Kp^{3d}$

for any three distinct elements $i_{1},i_{2},i_{3}\in[4]$. Let
$\phi_{4}\colon\mathbb{F}_{p}^{d}\to U_{4}$ be a linear isomorphism. Then
there exist linear isomorphisms $\phi_{i}\colon\mathbb{F}_{p}^{d}\to U_{i}$
for $i\in[3]$ such that
$\operatorname{rank}(\phi_{1}+\phi_{2}-\phi_{3}-\phi_{4})\leq 20\log_{p}K$.

###### Proof.

By assumptions we have

$|U_{1}\cap(U_{2}+U_{3})|=\frac{|U_{2}+U_{3}||U_{1}|}{|U_{1}+U_{2}+U_{3}|}\leq\frac{|U_{2}||U_{3}||U_{1}|}{|U_{1}+U_{2}+U_{3}|}\leq
K.$

Let $V_{1}\leq U_{1}$ be an arbitrary subspace such that
$U_{1}=\Big{(}U_{1}\cap(U_{2}+U_{3})\Big{)}\oplus V_{1}$. Thus
$|V_{1}|\geq|U_{1}|/K$. Similarly, we may find subspaces $V_{2}\leq U_{2}$ and
$V_{3}\leq U_{3}$ such that $U_{2}=\Big{(}U_{2}\cap(U_{3}+U_{1})\Big{)}\oplus
V_{2}$ and $U_{3}=\Big{(}U_{3}\cap(U_{1}+U_{2})\Big{)}\oplus V_{3}$ which also
satisfy $|V_{2}|\geq|U_{2}|/K$ and $|V_{3}|\geq|U_{3}|/K$. We claim that
$V_{1}+V_{2}+V_{3}$ is actually a direct sum. To see this, let $x\in
V_{1}\cap(V_{2}+V_{3})$ be arbitrary. Since $V_{1}\cap(V_{2}+V_{3})\subseteq
U_{1}\cap(U_{2}+U_{3})$, we have that $x\in
V_{1}\cap(U_{1}\cap(U_{2}+U_{3}))$. But this intersection is $0$, proving that
$x=0$.
Write $S=V_{1}+V_{2}+V_{3}$. Since this is a direct sum, there exist linear
maps $\pi_{i}\colon S\to V_{i}$ for $i\in[3]$ such that
$s=\pi_{1}(s)+\pi_{2}(s)-\pi_{3}(s)$ for all $s\in S$.
Going back to assumptions, we see that

$|U_{4}\cap
S|=\frac{|U_{4}||S|}{|U_{4}+S|}\geq\frac{K^{-3}p^{4d}}{|U_{4}+U_{1}+U_{2}+U_{3}|}\geq
K^{-4}p^{d}.$

Recall that we are given a linear isomorphism
$\phi_{4}\colon\mathbb{F}_{p}^{d}\to U_{4}$. For $i\in[3]$, let
$\phi^{\prime}_{i}\colon\mathbb{F}_{p}^{d}\to U_{i}$ be linear map defined as
follows. We first define $\phi^{\prime}_{i}(x)=\pi_{i}(\phi_{4}(x))$ for all
$x\in\phi_{4}^{-1}(U_{4}\cap S)$, and then extend to whole
$\mathbb{F}_{p}^{d}$ arbitrarily. We claim that
$\operatorname{rank}\phi^{\prime}_{i}\geq d-5\log_{p}K$. To see this, we need
to estimate $|\operatorname{ker}\pi_{i}\cap(U_{4}\cap S)|$. By definition of
$\pi_{i}$, we have $\operatorname{ker}\pi_{i}=V_{j}+V_{k}$ for
$\\{j,k\\}=[3]\setminus\\{i\\}$. Thus

$|(V_{j}+V_{k})\cap(U_{4}\cap S)|\leq|(U_{j}+U_{k})\cap
U_{4}|=\frac{|U_{j}+U_{k}||U_{4}|}{|U_{j}+U_{k}+U_{4}|}\leq\frac{|U_{j}||U_{k}||U_{4}|}{|U_{j}+U_{k}+U_{4}|}\leq
K,$

from which we deduce

$\displaystyle\operatorname{rank}\phi^{\prime}_{i}\geq\operatorname{rank}\phi^{\prime}_{i}|_{\phi_{4}^{-1}(U_{4}\cap
S)}$ $\displaystyle\geq\dim(U_{4}\cap
S)-\dim\operatorname{ker}\phi^{\prime}_{i}|_{\phi_{4}^{-1}(U_{4}\cap S)}$
$\displaystyle\geq d-4\log_{p}K-\dim(\operatorname{ker}\pi_{i}\cap(U_{4}\cap
S))\geq d-5\log_{p}K.$

Using Lemma 2.5, we may find a linear isomorphism
$\phi_{i}\colon\mathbb{F}_{p}^{d}\to U_{i}$ such that
$\operatorname{rank}(\phi_{i}-\phi^{\prime}_{i})\leq 5\log_{p}K$. From the
definition, we see that
$\phi^{\prime}_{1}+\phi^{\prime}_{2}-\phi^{\prime}_{3}-\phi_{4}$ vanishes on
$\phi_{4}^{-1}(U_{4}\cap S)$. Thus
$\operatorname{rank}(\phi^{\prime}_{1}+\phi^{\prime}_{2}-\phi^{\prime}_{3}-\phi_{4})\leq
4\log_{p}K$, and the claim follows.∎

We also need a related uniqueness result.

######  Lemma 4.3.

Let $W,U_{1},U_{2},V_{1},V_{2}\leq G$ be subspaces of dimension $d$. Let
$K\geq 1$ be a parameter such that

$|W\cap(U_{1}+U_{2}+V_{1}+V_{2})|\leq K.$

Suppose that $\phi_{i}\colon\mathbb{F}_{p}^{d}\to U_{i}$, $i\in[2]$,
$\psi_{i}\colon\mathbb{F}_{p}^{d}\to V_{i}$, $i\in[2]$ and
$\theta\colon\mathbb{F}_{p}^{d}\to W$ are linear maps such that

$\operatorname{rank}\Big{(}\phi_{1}+\phi_{2}+\psi_{1}+\psi_{2}+\theta\Big{)}\leq
r.$

Then $\operatorname{rank}\theta\leq r+\log_{p}K$.

###### Proof.

Let
$I=\operatorname{im}\Big{(}\phi_{1}+\phi_{2}+\psi_{1}+\psi_{2}+\theta\Big{)}$,
which is a vector space of dimension at most $r$. Let
$J=\operatorname{im}\theta$. Then we have
$J\subseteq(I+U_{1}+U_{2}+V_{1}+V_{2})\cap W$. But

$|(I+U_{1}+U_{2}+V_{1}+V_{2})\cap W|\leq|I||U_{1}+U_{2}+V_{1}+V_{2})\cap
W|\leq p^{r}K,$

from which the claim follows.∎

We are now ready to prove Theorem 4.1.

###### Proof of Theorem 4.1.

Let us begin the proof by showing the following claim.

######  Claim 4.4.

Suppose $\eta\leq 2^{-31}c^{3}$. For at least $\frac{c}{2}|G|^{6}$ of
10-tuples $(a,b_{1},b_{2},b_{3},x_{2},x_{3},y_{1},y_{3},z_{1},z_{2})\in
A^{10}$ we have

  * •

$a=b_{1}+b_{2}-b_{3},\,\,x_{3}=x_{2}-b_{2}+b_{3},\,\,y_{1}=y_{3}+b_{1}-b_{3},\,\,z_{2}=b_{1}+b_{2}-z_{1}$,
and

  * •

each of 7 subspaces

$\displaystyle W_{b_{1}}\cap W_{b_{2}}\cap$ $\displaystyle W_{b_{3}}\cap
W_{a},\,\,W_{b_{1}}\cap W_{x_{2}}\cap W_{x_{3}}\cap W_{a},\,\,W_{b_{2}}\cap
W_{x_{3}}\cap W_{x_{2}}\cap W_{b_{3}},\,\,W_{y_{1}}\cap W_{b_{2}}\cap
W_{y_{3}}\cap W_{a}$ $\displaystyle W_{b_{1}}\cap W_{y_{3}}\cap W_{y_{1}}\cap
W_{b_{3}},\,\,W_{z_{1}}\cap W_{z_{2}}\cap W_{b_{3}}\cap
W_{a},\,\,W_{b_{1}}\cap W_{b_{2}}\cap W_{z_{1}}\cap W_{z_{2}}$

has size at least $K^{-3}p^{-3d}|G|$.

###### Proof.

Let $\mathcal{T}$ be the set of all 10-tuples
$(a,b_{1},b_{2},b_{3},x_{2},x_{3},y_{1},y_{3},z_{1},z_{2})\in A^{10}$ that
satisfy (21) and (22). Thus, $|\mathcal{T}|\geq c|G|^{6}$. We now show that at
most $\frac{c}{40}|G|^{6}$ 10-tuples in $\mathcal{T}$ have $|W_{b_{1}}\cap
W_{b_{2}}\cap W_{b_{3}}\cap W_{a}|<K^{-1}p^{-3d}|G|$. Same argument will apply
to other 6 subspaces and the claim will follow. (Note that the indices of each
of the 7 subspaces in the claim form an additive quadruple, with any three
indices behaving independently; these are the only properties that we shall
use in the proof.)
Let $\mathcal{B}$ be the set of all $(b_{1},b_{2},b_{3})\in A^{3}$ such that
the number of 10-tuples in $\mathcal{T}$ with these 3 elements is at least
$\frac{c}{1000}|G|^{3}$. The number of 10-tuples in $\mathcal{T}$ whose
$(b_{1},b_{2},b_{3})$ belongs to $\mathcal{B}$ is therefore at least
$\frac{999c}{1000}|G|^{6}$. Let $\mathcal{B}^{\prime}$ be the subset
$\mathcal{B}$ consisting of those triples $(b_{1},b_{2},b_{3})$ for whom the
number of $6$-tuples $(x,y,z,x^{\prime},y^{\prime},z^{\prime})\in A^{6}$ with

$|W_{b_{1}}\cap W_{b_{2}}\cap W_{b_{3}}\cap W_{x}\cap W_{y}\cap W_{z}\cap
W_{x^{\prime}}\cap W_{y^{\prime}}\cap W_{z^{\prime}}|\leq Kp^{-9d}|G|$

is at most $\frac{c^{2}}{2\cdot 10^{6}}|G|^{6}$. Thus the number of 10-tuples
in $\mathcal{T}$ whose $(b_{1},b_{2},b_{3})$ belongs to $\mathcal{B}^{\prime}$
is therefore at least $\frac{999c}{1000}|G|^{6}-\eta 2\cdot
10^{6}c^{-2}|G|^{6}\geq\frac{998c}{1000}|G|^{6}$, provided $\eta\leq
c^{3}/(2\cdot 10^{9})$.
Pick any 10-tuple $(a,b_{1},b_{2},b_{3},x_{2},x_{3},y_{1},y_{3},z_{1},z_{2})$
such that $(b_{1},b_{2},b_{3})\in\mathcal{B}^{\prime}$. Then
$a=b_{1}+b_{2}-b_{3}$ and we have at least $\frac{c^{2}}{10^{6}}|G|^{6}$ of
6-tuples $(x,y,z,x^{\prime},y^{\prime},z^{\prime})$ such that

$|W_{a}\cap W_{b_{1}}\cap W_{b_{2}}\cap W_{b_{3}}\cap W_{x}\cap W_{y}\cap
W_{z}|,|W_{a}\cap W_{b_{1}}\cap W_{b_{2}}\cap W_{b_{3}}\cap W_{x^{\prime}}\cap
W_{y^{\prime}}\cap W_{z^{\prime}}|\geq K^{-1}p^{-6d}|G|.$

Standard properties of subspaces then imply

$\displaystyle K^{-2}p^{-12d}|G|^{2}\leq|W_{a}\cap W_{b_{1}}\cap W_{b_{2}}\cap
W_{b_{3}}\cap W_{x}\cap W_{y}\cap W_{z}|\cdot|W_{a}\cap W_{b_{1}}\cap
W_{b_{2}}\cap W_{b_{3}}\cap W_{x^{\prime}}\cap W_{y^{\prime}}\cap
W_{z^{\prime}}|$ $\displaystyle\hskip 56.9055pt=\Big{|}\Big{(}W_{a}\cap
W_{b_{1}}\cap W_{b_{2}}\cap W_{b_{3}}\cap W_{x}\cap W_{y}\cap
W_{z}\Big{)}\,\,+\,\,\Big{(}W_{a}\cap W_{b_{1}}\cap W_{b_{2}}\cap
W_{b_{3}}\cap W_{x^{\prime}}\cap W_{y^{\prime}}\cap
W_{z^{\prime}}\Big{)}\Big{|}$ $\displaystyle\hskip 113.81102pt|W_{a}\cap
W_{b_{1}}\cap W_{b_{2}}\cap W_{b_{3}}\cap W_{x}\cap W_{y}\cap W_{z}\cap
W_{x^{\prime}}\cap W_{y^{\prime}}\cap W_{z^{\prime}}|$ $\displaystyle\hskip
56.9055pt\leq|W_{a}\cap W_{b_{1}}\cap W_{b_{2}}\cap
W_{b_{3}}|\cdot|W_{b_{1}}\cap W_{b_{2}}\cap W_{b_{3}}\cap W_{x}\cap W_{y}\cap
W_{z}\cap W_{x^{\prime}}\cap W_{y^{\prime}}\cap W_{z^{\prime}}|.$

But there exists a choice of $(x,y,z,x^{\prime},y^{\prime},z^{\prime})$ for
which

$|W_{b_{1}}\cap W_{b_{2}}\cap W_{b_{3}}\cap W_{x}\cap W_{y}\cap W_{z}\cap
W_{x^{\prime}}\cap W_{y^{\prime}}\cap W_{z^{\prime}}|\leq Kp^{-9d}|G|$

so we get $|W_{a}\cap W_{b_{1}}\cap W_{b_{2}}\cap W_{b_{3}}|\geq
K^{-3}p^{-3d}|G|$, as required.∎

Write $U_{a}=W_{a}^{\perp}$ for each $a\in A$. The assumptions on $W_{a}$ and
the claim above imply that

$|U_{a_{1}}+U_{a_{2}}+\dots+U_{a_{r}}|\geq K^{-1}p^{rd}$ (23)

holds for all but at most $\eta|G|^{r}$ $r$-tuples
$(a_{1},a_{2},\dots,a_{r})\in A^{r}$ for $r\in[9]$, and that for at least
$\frac{c}{2}|G|^{6}$ 10-tuples
$(a,b_{1},b_{2},b_{3},x_{2},x_{3},y_{1},y_{3},z_{1},z_{2})\in A^{10}$ we have

  * •

$a=b_{1}+b_{2}-b_{3},\,\,x_{3}=x_{2}-b_{2}+b_{3},\,\,y_{1}=y_{3}+b_{1}-b_{3},\,\,z_{2}=b_{1}+b_{2}-z_{1}$,
and

  * •

each of 7 subspaces

$\displaystyle U_{b_{1}}+U_{b_{2}}+$ $\displaystyle
U_{b_{3}}+U_{a},\,\,U_{b_{1}}+U_{x_{2}}+U_{x_{3}}+U_{a},\,\,U_{b_{2}}+U_{x_{3}}+U_{x_{2}}+U_{b_{3}},\,\,U_{y_{1}}+U_{b_{2}}+U_{y_{3}}+U_{a}$
$\displaystyle
U_{b_{1}}+U_{y_{3}}+U_{y_{1}}+U_{b_{3}},\,\,U_{z_{1}}+U_{z_{2}}+U_{b_{3}}+U_{a},\,\,U_{b_{1}}+U_{b_{2}}+U_{z_{1}}+U_{z_{2}}$
(24)

has size at most $K^{3}p^{3d}$.

Our aim is to use Lemma 4.2 to define linear isomorphisms between
$\mathbb{F}_{p}^{d}$ and $U_{a}$. To that end, we say that an additive
quadruple $(x_{1},x_{2},x_{3},x_{4})$ (where $x_{1}+x_{2}=x_{3}+x_{4}$) is
_good_ if we have
$K^{-1}p^{3d}\leq|U_{x_{j_{1}}}+U_{x_{j_{2}}}+U_{x_{j_{3}}}|$ for any distinct
indices $j_{1},j_{2},j_{3}\in[4]$ and
$|U_{x_{1}}+U_{x_{2}}+U_{x_{3}}+U_{x_{4}}|\leq K^{3}p^{3d}$. Notice that the
associated subspaces to elements of any good additive quadruple satisfy
conditions of Lemma 4.2.
Our next claim shows that we may find many $10$-tuples
$(a,b_{1},b_{2},b_{3},x_{2},x_{3},y_{1},y_{3},z_{1},z_{2})\in A^{10}$ which
satisfy stronger conditions than guaranteed by (24), and these stronger
conditions will allow us to apply Lemma 4.3.

######  Claim 4.5.

Suppose that $\eta\leq\frac{c}{100}$. For at least $\frac{c}{20}|G|^{6}$
10-tuples $(a,b_{1},b_{2},b_{3},x_{2},x_{3},y_{1},y_{3},z_{1},z_{2})\in
A^{10}$ we have

  * (i)

$a=b_{1}+b_{2}-b_{3},\,\,x_{3}=x_{2}-b_{2}+b_{3},\,\,y_{1}=y_{3}+b_{1}-b_{3},\,\,z_{2}=b_{1}+b_{2}-z_{1}$,

  * (ii)

each of 7 subspaces

$\displaystyle U_{b_{1}}+U_{b_{2}}+$ $\displaystyle
U_{b_{3}}+U_{a},\,\,U_{b_{1}}+U_{x_{2}}+U_{x_{3}}+U_{a},\,\,U_{b_{2}}+U_{x_{3}}+U_{x_{2}}+U_{b_{3}},\,\,U_{y_{1}}+U_{b_{2}}+U_{y_{3}}+U_{a}$
$\displaystyle
U_{b_{1}}+U_{y_{3}}+U_{y_{1}}+U_{b_{3}},\,\,U_{z_{1}}+U_{z_{2}}+U_{b_{3}}+U_{a},\,\,U_{b_{1}}+U_{b_{2}}+U_{z_{1}}+U_{z_{2}}$

has size at most $K^{3}p^{3d}$,

  * (iii)

each of 16 subspaces obtained by taking sum of 3 subspaces inside any of the 4
quadruples
$\\{U_{b_{1}},U_{b_{2}},U_{b_{3}},U_{a}\\},\\{U_{b_{1}},U_{x_{2}},U_{x_{3}},U_{a}\\},\\{U_{y_{1}},U_{b_{2}},U_{y_{3}},U_{a}\\}$
and $\\{U_{z_{1}},U_{z_{2}},U_{b_{3}},U_{a}\\}$ has size at least
$K^{-1}p^{3d}$,

  * (iv)

each of 3 subspaces

$\displaystyle
U_{b_{1}}\cap(U_{b_{2}}+U_{x_{3}}+U_{x_{2}}+U_{b_{3}}),\,\,U_{b_{2}}\cap(U_{b_{1}}+U_{y_{3}}+U_{y_{1}}+U_{b_{3}}),\,\,U_{b_{3}}\cap(U_{b_{1}}+U_{b_{2}}+U_{z_{1}}+U_{z_{2}})$

has size at most $K^{4}$.

###### Proof.

Combining conditions (23) for $r\in\\{3,4\\}$ and (24) we get at least
$(2^{-1}c-19\eta)|G|^{6}$ 10-tuples $(a,b_{1},b_{2},b_{3},x_{2},x_{3},$
$y_{1},$ $y_{3},$ $z_{1},z_{2})\in A^{10}$ such that conditions (i) and (ii)
in the conclusion of the claim hold and additionally we have each of 16
subspaces obtained by taking sum of 3 subspaces inside any of the 4 quadruples
$\\{U_{b_{1}},U_{b_{2}},U_{b_{3}},U_{a}\\},$
$\\{U_{b_{1}},U_{x_{2}},U_{x_{3}},U_{a}\\},$
$\\{U_{y_{1}},U_{b_{2}},U_{y_{3}},U_{a}\\}$ and
$\\{U_{z_{1}},U_{z_{2}},U_{b_{3}},U_{a}\\}$ has size at least $K^{-1}p^{3d}$
and each of 3 subspaces

$U_{b_{1}}+U_{b_{2}}+U_{b_{3}}+U_{x_{2}},\,\,U_{b_{1}}+U_{b_{2}}+U_{b_{3}}+U_{y_{3}},\,\,U_{b_{1}}+U_{b_{2}}+U_{b_{3}}+U_{z_{1}}$

has size at least $K^{-1}p^{4d}$. We now show that each such 10-tuple has the
properties described in the claim.
Take any such a 10-tuple
$(a,b_{1},b_{2},b_{3},x_{2},x_{3},y_{1},y_{3},z_{1},z_{2})\in A^{10}$. By the
way we choose 10-tuples we see that property (iii) holds. It remains to prove
property (iv). We have

$|U_{b_{1}}\cap(U_{b_{2}}+U_{x_{3}}+U_{x_{2}}+U_{b_{3}})|=\frac{|U_{b_{1}}||U_{b_{2}}+U_{x_{3}}+U_{x_{2}}+U_{b_{3}}|}{|U_{b_{1}}+U_{b_{2}}+U_{x_{3}}+U_{x_{2}}+U_{b_{3}}|}\leq\frac{p^{d}\cdot
K^{3}p^{3d}}{|U_{b_{1}}+U_{b_{2}}+U_{x_{2}}+U_{b_{3}}|}\leq K^{4}.$

Similar arguments prove the other two bounds.∎

Let $a\in A$ be an element that we shall specify later and let
$\theta\colon\mathbb{F}_{p}^{d}\to U_{a}$ be a linear isomorphism. For each
index $i\in[3]$, let $A_{i}\subseteq A$ be the set of all elements $x\in A$
that appear at $i$th position in a good additive quadruple in which $a$
appears as the last element. For each such element $x\in A_{i}$, we pick a
random good additive quadruple $(y_{1},y_{2},y_{3},a)$ such that $y_{i}=x$,
uniformly among all such quadruples. We do this independently for all $x$.
Once we have chosen such quadruple $(y_{1},y_{2},y_{3},a)$ we apply Lemma 4.2
with chosen linear isomorphism $\theta\colon\mathbb{F}_{p}^{d}\to U_{a}$ to
obtain linear isomorphisms $\psi_{j}\colon\mathbb{F}_{p}^{d}\to U_{y_{j}}$
such that
$\operatorname{rank}\Big{(}\psi_{1}+\psi_{2}-\psi_{3}-\theta\Big{)}\leq
60\log_{p}K$. Finally, define $\phi^{i}_{x}=\psi_{i}$.
The crucial claim is that, if we choose $a$ suitably, the system of maps
$(\phi^{1}_{x})_{x\in A^{1}}$ exhibits a considerable amount of additive
structure.

######  Claim 4.6.

There exists an element $a\in A$ such that in the above procedure we get at
least $2^{-28}c^{4}|G|^{2}$ additive quadruples $(b_{1},b_{2},b_{3},a)\in
A^{1}\times A^{2}\times A^{3}\times A$ such that
$\operatorname{rank}\Big{(}\phi^{1}_{b_{1}}+\phi^{2}_{b_{2}}-\phi^{3}_{b_{3}}-\theta\Big{)}\leq
500\log_{p}K$.

###### Proof.

Let $\mathcal{T}$ be the set of all 10-tuples satisfying properties in Claim
4.5. Let $a\in A$ be such that

$\displaystyle\mathcal{T}^{\prime}=\Big{\\{}(b_{1},b_{2},b_{3},$
$\displaystyle x_{2},x_{3},y_{1},y_{3},z_{1},z_{2})\in A^{9}\colon$
$\displaystyle(a,b_{1},b_{2},b_{3},x_{2},x_{3},y_{1},y_{3},z_{1},z_{2})\in\mathcal{T}\Big{\\}}$

has size at least $\frac{c}{40}|G|^{5}$. Now take any $(b_{1},b_{2},b_{3})\in
A^{3}$ such that $b_{1}+b_{2}=b_{3}+a$ and such that the number of 6-tuples
$(x_{2},x_{3},y_{1},y_{3},z_{1},z_{2})\in A^{6}$ such that
$(b_{1},b_{2},b_{3},x_{2},$ $x_{3},y_{1},y_{3},$
$z_{1},z_{2})\in\mathcal{T}^{\prime}$ is at least $\frac{c}{80}|G|^{3}$. By
averaging, the set of such triples $\mathcal{B}$ has size at least
$\frac{c}{80}|G|^{2}$. Let $\mathcal{S}_{b_{1},b_{2},b_{3}}$ be the set of the
6-tuples we considered above for $(b_{1},b_{2},b_{3})$. Let us observe for any
$(b_{1},b_{2},b_{3},x_{2},$ $x_{3},y_{1},y_{3},$
$z_{1},z_{2})\in\mathcal{T}^{\prime}$ that properties (ii) and (iii) of Claim
4.5 imply that quadruples $(b_{1},b_{2},b_{3},a)$, $(b_{1},x_{2},x_{3},a)$,
$(y_{1},b_{2},y_{3},a)$ and $(z_{1},z_{2},b_{3},a)$ are good and thus
$b_{1},y_{1},z_{1}\in A_{1},$ $b_{2},x_{2},z_{2}\in A_{2}$ and
$b_{3},x_{3},y_{3}\in A_{3}$. We now show that for every
$(b_{1},b_{2},b_{3})\in\mathcal{B}$ the event
$\operatorname{rank}\Big{(}\phi^{1}_{b_{1}}+\phi^{2}_{b_{2}}-\phi^{3}_{b_{3}}-\theta\Big{)}\leq
150\log_{p}K$ occurs with probability at least $2^{-18}c^{3}$.
To see that, fix $(b_{1},b_{2},b_{3})\in\mathcal{B}$. Apply Lemma 4.2 to
quadruple of subspaces $(U_{b_{1}},U_{b_{2}},U_{b_{3}},U_{a})$ and isomorphism
$\theta\colon\mathbb{F}_{p}^{d}\to U_{a}$. We thus get linear isomorphisms
$\theta_{i}\colon\mathbb{F}_{p}^{d}\to U_{b_{i}}$ for $i\in[3]$ such that
$\operatorname{rank}\Big{(}\theta_{1}+\theta_{2}-\theta_{3}-\theta\Big{)}\leq
60\log_{p}K$. Since
$|\mathcal{S}_{b_{1},b_{2},b_{3}}|\geq\frac{c}{80}|G|^{3}$, we see in
particular that there at least $\frac{c}{80}|G|$ of choices of $x_{2}\in
A_{2}$ such that for $x_{3}=b_{1}+x_{2}-a$ we have that additive quadruple
$(b_{1},x_{2},x_{3},a)$ is good and
$|U_{b_{1}}\cap(U_{b_{2}}+U_{x_{3}}+U_{x_{2}}+U_{b_{3}})|\leq K^{4}$ (using
property (iv) in the conclusion of Claim 4.5). If it happens that
$(b_{1},x_{2},x_{3},a)$ is used to define $\phi^{1}_{b_{1}}$, then we get also
linear isomorphisms $\rho_{2}\colon\mathbb{F}_{p}^{d}\to U_{x_{2}}$ and
$\rho_{3}\colon\mathbb{F}_{p}^{d}\to U_{x_{3}}$ such that
$\operatorname{rank}\Big{(}\phi^{1}_{b_{1}}+\rho_{2}-\rho_{3}-\theta\Big{)}\leq
60\log_{p}K$. But then

$\operatorname{rank}\Big{(}\Big{(}\phi^{1}_{b_{1}}-\theta_{1}\Big{)}+\rho_{2}-\rho_{3}-\theta_{2}+\theta_{3}\Big{)}\leq
120\log_{p}K$

so by Lemma 4.3 we get $\operatorname{rank}(\phi^{1}_{b_{1}}-\theta_{1})\leq
124\log_{p}K$. In particular, this happens with probability at least
$\frac{c}{80}$.
Similarly, events $\operatorname{rank}(\phi^{2}_{b_{2}}-\theta_{2})\leq
124\log_{p}K$ and $\operatorname{rank}(\phi^{3}_{b_{3}}-\theta_{3})\leq
124\log_{p}K$ happen with probability at least $\frac{c}{80}$ each, and all
three events are independent, so we get

$\operatorname{rank}\Big{(}\phi^{1}_{b_{1}}+\phi^{2}_{b_{2}}-\phi^{3}_{b_{3}}-\theta\Big{)}\leq\operatorname{rank}\Big{(}\theta_{1}+\theta_{2}-\theta_{3}-\theta\Big{)}+\operatorname{rank}(\phi^{1}_{b_{1}}-\theta_{1})+\operatorname{rank}(\phi^{2}_{b_{2}}-\theta_{2})+\operatorname{rank}(\phi^{3}_{b_{3}}-\theta_{3})\leq
432\log_{p}K$

with probability at least $2^{-21}c^{3}$.
Thus, the expected number of triples $(b_{1},b_{2},b_{3})\in B$ for which
$\operatorname{rank}\Big{(}\phi^{1}_{b_{1}}+\phi^{2}_{b_{2}}-\phi^{3}_{b_{3}}-\theta\Big{)}\leq
500\log_{p}K$ holds is at least $2^{-28}c^{4}|G|^{2}$, proving the claim.∎

We say that an additive quadruple $(b_{1},b_{2},b_{3},a)\in A^{1}\times
A^{2}\times A^{3}\times A$ is _very good_ if
$\operatorname{rank}\Big{(}\phi^{1}_{b_{1}}+\phi^{2}_{b_{2}}-\phi^{3}_{b_{3}}-\theta\Big{)}\leq
500\log_{p}K$. By the claim above we have $c^{\prime}|G|^{2}$ very good
additive quadruples, where $c^{\prime}=2^{-28}c^{4}$. Consider the bipartite
graph whose vertex classes $\mathcal{C}_{1}$ and $\mathcal{C}_{2}$ are copies
of $G$ and where we put edge between $b_{2}\in\mathcal{C}_{1}$ and
$b_{3}\in\mathcal{C}_{2}$ if $(b_{3}+a-b_{2},b_{2},b_{3},a)$ is very good.
This is a graph of density $c^{\prime}$ and hence it contains at least
${c^{\prime}}^{4}|G|^{4}$ ordered 4-cycles.
Let $(b_{2},b_{3},b^{\prime}_{2},b^{\prime}_{3})$ be an ordered 4-cycle in the
above graph. Let $x_{1}=b_{3}+a-b_{2}$, $x_{2}=b_{3}+a-b^{\prime}_{2}$,
$x_{3}=b^{\prime}_{3}+a-b^{\prime}_{2}$ and $x_{4}=b^{\prime}_{3}+a-b_{2}$, so
additive quadruples

$(x_{1},b_{2},b_{3},a),\,\,(x_{2},b^{\prime}_{2},b_{3},a),\,\,(x_{3},b^{\prime}_{2},b^{\prime}_{3},a),\,\,(x_{4},b_{2},b^{\prime}_{3},a)$

are very good. Observe also that $x_{1}+x_{3}=x_{2}+x_{4}$ and that

$\displaystyle\phi^{1}_{x_{1}}+\phi^{1}_{x_{3}}-\phi^{1}_{x_{2}}-\phi^{1}_{x_{4}}=\Big{(}\phi^{1}_{x_{1}}+\phi^{2}_{b_{2}}-\phi^{3}_{b_{3}}-\theta\Big{)}+\Big{(}\phi^{1}_{x_{3}}+$
$\displaystyle\phi^{2}_{b^{\prime}_{2}}-\phi^{3}_{b^{\prime}_{3}}-\theta\Big{)}$
$\displaystyle-$
$\displaystyle\Big{(}\phi^{1}_{x_{2}}+\phi^{2}_{b^{\prime}_{2}}-\phi^{3}_{b_{3}}-\theta\Big{)}-\Big{(}\phi^{1}_{x_{4}}+\phi^{2}_{b_{2}}-\phi^{3}_{b^{\prime}_{3}}-\theta\Big{)},$

so
$\operatorname{rank}\Big{(}\phi^{1}_{x_{1}}+\phi^{1}_{x_{3}}-\phi^{1}_{x_{2}}-\phi^{1}_{x_{4}}\Big{)}\leq
2000\log_{p}K$. Thus, by double-counting, there are at least
${c^{\prime}}^{4}|G|^{3}$ additive quadruples
$(x_{1},x_{3},x_{2},x_{4})\in(A^{1})^{4}$ with
$\operatorname{rank}\Big{(}\phi^{1}_{x_{1}}+\phi^{1}_{x_{3}}-\phi^{1}_{x_{2}}-\phi^{1}_{x_{4}}\Big{)}\leq
2000\log_{p}K$, as each such additive quadruple can arise from at most $|G|$
4-cycles considered above.
By Corollary 2.7 there exists a map $\Phi\colon G\times\mathbb{F}_{p}^{d}\to
G$, which is affine in the first coordinate and linear in the second, such
that $\operatorname{rank}(\Phi(a,\cdot)-\phi^{1}_{a})\leq R$ for at least
$c_{1}|G|$ elements $a\in A$, where
$c_{1}\geq\exp\Big{(}-\exp\Big{(}(\log{c^{\prime}}^{-1}+\log_{p}K)^{O(1)}\Big{)}\Big{)}$
and $R\leq\exp\Big{(}(\log{c^{\prime}}^{-1}+\log_{p}K)^{O(1)}\Big{)}$. Let $B$
be the set of such $a$.
Finally, we prove that $\Phi$ is highly quasirandom. Let $r=\lceil
2R+\log_{p}K\rceil$ and $\alpha=(2\eta c_{1}^{-2})^{1/2r}$. We claim there are
no $r$ linearly independent elements
$\lambda_{1},\dots,\lambda_{r}\in\mathbb{F}_{p}^{d}$ such that for each
$i\in[r]$ the bilinear form $(x,y)\in G^{2}\to\Phi(x,\lambda_{i})\cdot y$ has
bias at least $\alpha$. Suppose the contrary. This implies that for each
$i\in[r]$, there are at least $\alpha|G|$ elements $x$ for which
$\Phi(x,\lambda_{i})=0$. Intersecting all these sets, we get a subspace $S\leq
G$ of size $|S|\geq\alpha^{r}|G|$ such that for each $x\in S$ we have
$\Phi(x,\lambda_{i})=0$ for all $i\in[r]$. Averaging over cosets of $S$, we
may find $t$ such that $|B\cap(t+S)|\geq c_{1}|S|$.
Whenever $a\in B\cap(t+S)$, the condition
$\operatorname{rank}(\Phi(a,\cdot)-\phi^{1}_{a})\leq R$ implies that
$\Phi(a,\lambda)=\phi^{1}_{a}(\lambda)$ holds for at least $p^{d-R}$ elements
$\lambda\in\mathbb{F}_{p}^{d}$. Hence,
$|\operatorname{Im}\Phi(a,\cdot)\cap\operatorname{Im}\phi^{1}_{a}|\geq
p^{d-R}$, so recalling that $U_{a}=\operatorname{Im}\phi^{1}_{a}$, we may find
a subspace $T_{a}$ of dimension at most $R$ such that $U_{a}\subseteq
T_{a}+\operatorname{Im}\Phi(a,\cdot)$. In particular, for any two elements
$a_{1},a_{2}\in B\cap(t+S)$ we have

$\displaystyle|U_{a_{1}}+U_{a_{2}}|\leq$
$\displaystyle|(T_{a_{1}}+\operatorname{Im}\Phi(a_{1},\cdot))+(T_{a_{2}}+\operatorname{Im}\Phi(a_{2},\cdot))|$
$\displaystyle\leq$
$\displaystyle|T_{a_{1}}||T_{a_{2}}||\operatorname{Im}\Phi(a_{1},\cdot)+\operatorname{Im}\Phi(a_{2},\cdot)|\leq
p^{2R}|\operatorname{Im}\Phi(a_{1},\cdot)+\operatorname{Im}\Phi(a_{2},\cdot)|.$

However, since $a_{1},a_{2}\in B\cap(t+S)$, whenever $i\in[r]$, we have
$\Phi(a_{1},\lambda_{i})=\Phi(a_{1}-t,\lambda_{i})+\Phi(t,\lambda_{i})=\Phi(t,\lambda_{i})=\Phi(a_{2},\lambda_{i})$.
Thus
$|\operatorname{Im}\Phi(a_{1},\cdot)+\operatorname{Im}\Phi(a_{2},\cdot)|\leq
p^{2d-r}$ and we get

$|U_{a_{1}}+U_{a_{2}}|\leq p^{2R+2d-r}<K^{-1}p^{2d}$

by the choice of $r$. However, this is in contradiction with (23), since
$\eta<c_{1}^{2}\alpha^{2r}$ by the choice of $\alpha$.∎

## §5 Structure of approximate quadratic varieties

In the final part of the proof, we use the map $\Phi$ to deduce the structure
of the set $V$. The last step is articulated as the following proposition.

######  Proposition 5.1.

There is an absolute constant $D\geq 1$ such that the following holds. Let
$c,\delta,\varepsilon>0$ and $d\in\mathbb{N}$ be such that $c\leq\delta
p^{d}\leq c^{-1}$. Suppose that $\varepsilon\leq(2^{-1}c\delta)^{D}$. Let
$V\subseteq G$ be a set of density $\delta$ such that
$\|\mathbbm{1}_{V}-\delta\|_{\mathsf{U}^{2}}\leq\varepsilon$. Suppose that we
are also given a subset $A\subseteq G$ of size $|A|\geq c|G|$, a subspace
$W_{a}\leq G$ for each $a\in A$ and a bilinear map $\beta\colon G\times
G\to\mathbb{F}_{p}^{d}$ such that

  * (i)

for each $\lambda\in\mathbb{F}_{p}^{d}\setminus\\{0\\}$ we have
$\operatorname{bias}\lambda\cdot\beta\leq\varepsilon$,

  * (ii)

for each $a\in A$ we have $|W_{a}\cap\\{b\in G\colon\beta(a,b)=0\\}|\geq
cp^{-d}|G|$,

  * (iii)

for each $a\in A$ and $b\in W_{a}$ we have ${\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a}(b)\geq c\delta^{15}$.

Then there exists a quadratic variety $Q\subseteq G$ of size
$|Q|\leq(2c^{-1})^{D}\delta|G|$ such that $|Q\cap
V|\geq\exp\Big{(}-\log^{D}(2c^{-1})\Big{)}\delta|G|$. Moreover, $Q$ is defined
as $\\{x\in G\colon\gamma(x,x)-\psi(x)=\mu\\}$ for a symmetric bilinear map
$\gamma\colon G\times G\to\mathbb{F}_{p}^{\tilde{d}}$, an affine map
$\psi\colon G\to\mathbb{F}_{p}^{\tilde{d}}$ and
$\mu\in\mathbb{F}_{p}^{\tilde{d}}$, where
$\operatorname{bias}\lambda\cdot\gamma\leq\varepsilon$ for all
$\lambda\not=0$, for some $d-O(\log_{p}(2c^{-1}))\leq\tilde{d}\leq d$.

###### Proof.

The proof consists of three steps. In the first one we show that $\beta$ is
approximately symmetric, in the second we pass to an exactly symmetric
bilinear map and in the final step we use the symmetry to find the desired
quadratic variety.

Approximate symmetry. This step of the proof is based on the symmetry argument
of Green and Tao [14]. We may combine assumptions (ii) and (iii) to deduce
that

$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,b\in
G}\mathbbm{1}(\beta(a,b)=0){\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a}(b)\geq\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,b\in
G}\mathbbm{1}_{A}(a)\mathbbm{1}(\beta(a,b)=0){\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a}(b)$ $\displaystyle\hskip
56.9055pt\geq\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,b\in
G}\mathbbm{1}_{A}(a)\mathbbm{1}(\beta(a,b)=0)\mathbbm{1}_{W_{a}}(b){\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a}(b)$ $\displaystyle\hskip
56.9055pt\geq\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a\in
G}\mathbbm{1}_{A}(a)\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{b}\Big{(}\mathbbm{1}(\beta(a,b)=0)\mathbbm{1}_{W_{a}}(b)\Big{)}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a}(b)\geq c^{2}p^{-d}\delta^{15}\geq c^{3}\delta^{16}.$

Thus

$\displaystyle c^{3}\delta^{16}\leq$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,b\in
G}\mathbbm{1}(\beta(a,b)=0){\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a}(b)$ $\displaystyle=$ $\displaystyle
p^{-d}\sum_{\lambda\in\mathbb{F}^{d}_{p}}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,b\in
G}\omega^{\lambda\cdot\beta(a,b)}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x_{1},\dots,x_{7}}\mathbbm{1}_{V}(x_{1})\mathbbm{1}_{V}(x_{1}+a)\dots\mathbbm{1}_{V}(x_{7})\mathbbm{1}_{V}(x_{7}+a)$
$\displaystyle\hskip 170.71652pt\mathbbm{1}_{V}(x_{1}-x_{2}+\dots-
x_{6}+x_{7}-b)\mathbbm{1}_{V}(x_{1}-x_{2}+\dots-x_{6}+x_{7}-b+a).$

Observe furthermore that ${\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a}(b)={\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V+a}(b)$. Using this fact, we see that

$\displaystyle\overline{\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,b\in
G}\omega^{\lambda\cdot\beta(a,b)}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a}(b)}=$ $\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,b\in
G}\omega^{-\lambda\cdot\beta(a,b)}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a}(b)=\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,b\in
G}\omega^{\lambda\cdot\beta(-a,b)}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a}(b)$ $\displaystyle=$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,b\in
G}\omega^{\lambda\cdot\beta(a,b)}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V+a}(b)=\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,b\in
G}\omega^{\lambda\cdot\beta(a,b)}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a}(b),$

implying that $\mathop{\mathbb{E}}_{a,b\in
G}\omega^{\lambda\cdot\beta(a,b)}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a}(b)$ is a real number.

Since for each $\lambda\in\mathbb{F}^{d}_{p}$

$\displaystyle\bigg{|}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,b\in
G}\omega^{\lambda\cdot\beta(a,b)}{\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a}(b)\bigg{|}=\bigg{|}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,b}\omega^{\lambda\cdot\beta(a,b)}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x_{1},\dots,x_{7}}\mathbbm{1}_{V}(x_{1})\mathbbm{1}_{V}(x_{1}+a)\dots\mathbbm{1}_{V}(x_{7})\mathbbm{1}_{V}(x_{7}+a)$
$\displaystyle\hskip 199.16928pt\mathbbm{1}_{V}(x_{1}-x_{2}+\dots-
x_{6}+x_{7}-b)\mathbbm{1}_{V}(x_{1}-x_{2}+\dots-x_{6}+x_{7}-b+a)\bigg{|}$
$\displaystyle\leq$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,b}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x_{1},\dots,x_{7}}\mathbbm{1}_{V}(x_{1})\mathbbm{1}_{V}(x_{1}+a)\dots\mathbbm{1}_{V}(x_{7})\mathbbm{1}_{V}(x_{7}+a)$
$\displaystyle\hskip 199.16928pt\mathbbm{1}_{V}(x_{1}-x_{2}+\dots-
x_{6}+x_{7}-b)\mathbbm{1}_{V}(x_{1}-x_{2}+\dots-x_{6}+x_{7}-b+a)$
$\displaystyle=$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a}|G|^{-8}|V\cap V-a|^{8}\leq 2\delta^{16},$

by Claim 3.3 and provided $\varepsilon\leq 2^{-100}\delta^{64}$, we obtain a
set $\Lambda\subset\mathbb{F}_{p}^{d}$ of size $|\Lambda|\geq
2^{-2}c^{3}p^{d}$ such that

$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,b}\omega^{\lambda\cdot\beta(a,b)}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x_{1},\dots,x_{7}}$
$\displaystyle\mathbbm{1}_{V}(x_{1})\mathbbm{1}_{V}(x_{1}+a)\dots\mathbbm{1}_{V}(x_{7})\mathbbm{1}_{V}(x_{7}+a)$
$\displaystyle\mathbbm{1}_{V}(x_{1}-x_{2}+\dots-
x_{6}+x_{7}-b)\mathbbm{1}_{V}(x_{1}-x_{2}+\dots-x_{6}+x_{7}-b+a)\geq
2^{-1}c^{3}\delta^{16}.$

We now show that for such a $\lambda$ we have that
$\lambda\cdot(\beta-\beta\circ(1\,\,2))$ is of low rank.

Introduce an auxiliary variable $t$, and make a change of variables
$w_{i}=x_{i}-t$. Then

$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,b}\omega^{\lambda\cdot\beta(a,b)}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{t,w_{[7]}}$
$\displaystyle\mathbbm{1}_{V}(w_{1}+t)\mathbbm{1}_{V}(w_{1}+t+a)\dots\mathbbm{1}_{V}(w_{7}+t)\mathbbm{1}_{V}(w_{7}+t+a)$
$\displaystyle\mathbbm{1}_{V}(w_{1}-w_{2}+\dots-
w_{6}+w_{7}+t-b)\mathbbm{1}_{V}(w_{1}-w_{2}+\dots-w_{6}+w_{7}+t-b+a)\geq
2^{-1}c^{3}\delta^{16}$

Make a further change of variables $x=t,y=t+a,z=2t+a-b$ instead of $t,a,b$.
Then

$\displaystyle 2^{-1}c^{3}\delta^{16}\leq$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x,y}\omega^{\lambda\cdot\beta(y-x,x+y-z)}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{z,w_{[7]}}\mathbbm{1}_{V}(w_{1}+x)\mathbbm{1}_{V}(w_{1}+y)\dots\mathbbm{1}_{V}(w_{7}+x)\mathbbm{1}_{V}(w_{7}+y)$
$\displaystyle\hskip 85.35826pt\mathbbm{1}_{V}(w_{1}-w_{2}+\dots-
w_{6}+w_{7}+z-y)\mathbbm{1}_{V}(w_{1}-w_{2}+\dots-w_{6}+w_{7}+z-x)$
$\displaystyle=$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x,y,z}\omega^{\lambda\cdot\beta(y,x)-\lambda\cdot\beta(x,y)}\omega^{\lambda\cdot\beta(x-y,z)-\lambda\cdot\beta(x,x)+\lambda\cdot\beta(y,y)}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{w_{[7]}}\mathbbm{1}_{V}(w_{1}+x)\mathbbm{1}_{V}(w_{1}+y)\dots\mathbbm{1}_{V}(w_{7}+x)\mathbbm{1}_{V}(w_{7}+y)$
$\displaystyle\hskip 85.35826pt\mathbbm{1}_{V}(w_{1}-w_{2}+\dots-
w_{6}+w_{7}+z-y)\mathbbm{1}_{V}(w_{1}-w_{2}+\dots-w_{6}+w_{7}+z-x).$

Write $\rho(x,y)=\lambda\cdot\beta(y,x)-\lambda\cdot\beta(x,y)$ and for
$\boldsymbol{w}=w_{[7]}$ let

$f_{\boldsymbol{w}}(t)=\prod_{i\in[7]}\mathbbm{1}_{V}(w_{i}+t)$

and

$g_{\boldsymbol{w}}(t)=\mathbbm{1}_{V}(w_{1}-w_{2}+\dots-w_{6}+w_{7}+t).$

With the new notation we have

$2^{-1}c^{3}\delta^{16}\leq\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}x,y,z\\\
\boldsymbol{w}\end{subarray}}\omega^{\rho(x,y)}\Big{(}\omega^{\lambda\cdot\beta(x,z)-\lambda\cdot\beta(x,x)}f_{\boldsymbol{w}}(x)g_{\boldsymbol{w}}(z-x)\Big{)}\Big{(}\omega^{-\lambda\cdot\beta(y,z)+\lambda\cdot\beta(y,y)}f_{\boldsymbol{w}}(y)g_{\boldsymbol{w}}(z-y)\Big{)}.$

Note that $f_{\boldsymbol{w}}(y)g_{\boldsymbol{w}}(z-y)$ takes values 0 and 1
so
$f_{\boldsymbol{w}}(y)g_{\boldsymbol{w}}(z-y)=f_{\boldsymbol{w}}(y)^{2}g_{\boldsymbol{w}}(z-y)^{2}$.
Applying Cauchy-Schwarz inequality we get

$2^{-2}c^{6}\delta^{32}\leq\bigg{(}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}y,z\\\
\boldsymbol{w}\end{subarray}}f_{\boldsymbol{w}}(y)g_{\boldsymbol{w}}(z-y)\Big{|}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x}\omega^{\rho(x,y)}\omega^{\lambda\cdot\beta(x,z)-\lambda\cdot\beta(x,x)}f_{\boldsymbol{w}}(x)g_{\boldsymbol{w}}(z-x)\Big{|}^{2}\bigg{)}\bigg{(}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}y,z\\\
\boldsymbol{w}\end{subarray}}f_{\boldsymbol{w}}(y)g_{\boldsymbol{w}}(z-y)\bigg{)}.$

Observe that the second term in the product above equals $\delta^{8}$. Thus

$2^{-2}c^{6}\delta^{24}\leq\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}y,z,x,x^{\prime}\\\
\boldsymbol{w}\end{subarray}}f_{\boldsymbol{w}}(y)g_{\boldsymbol{w}}(z-y)\omega^{\rho(x-x^{\prime},y)}\omega^{\lambda\cdot\beta(x-x^{\prime},z)-\lambda\cdot\beta(x,x)+\lambda\cdot\beta(x^{\prime},x^{\prime})}f_{\boldsymbol{w}}(x)g_{\boldsymbol{w}}(z-x)f_{\boldsymbol{w}}(x^{\prime})g_{\boldsymbol{w}}(z-x^{\prime}).$

Another application of the Cauchy-Schwarz inequality gives

$\displaystyle 2^{-4}c^{12}\delta^{48}\leq$
$\displaystyle\bigg{(}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}z,x,x^{\prime}\\\
\boldsymbol{w}\end{subarray}}f_{\boldsymbol{w}}(x)g_{\boldsymbol{w}}(z-x)f_{\boldsymbol{w}}(x^{\prime})g_{\boldsymbol{w}}(z-x^{\prime})\Big{|}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{y}f_{\boldsymbol{w}}(y)g_{\boldsymbol{w}}(z-y)\omega^{\rho(x-x^{\prime},y)}\Big{|}^{2}\bigg{)}$
$\displaystyle\hskip
56.9055pt\bigg{(}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}z,x,x^{\prime}\\\
\boldsymbol{w}\end{subarray}}f_{\boldsymbol{w}}(x)g_{\boldsymbol{w}}(z-x)f_{\boldsymbol{w}}(x^{\prime})g_{\boldsymbol{w}}(z-x^{\prime})\bigg{)}.$

Usual argument based on Lemma 3.2 allows to bound the second term in the
product from above by $\delta^{16}+16\varepsilon\leq 2\delta^{16}$. Thus

$\displaystyle
2^{-5}c^{12}\delta^{32}\leq\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}z,x,x^{\prime}\\\
y,y^{\prime},\boldsymbol{w}\end{subarray}}f_{\boldsymbol{w}}(x)g_{\boldsymbol{w}}(z-x)f_{\boldsymbol{w}}(x^{\prime})g_{\boldsymbol{w}}(z-x^{\prime})f_{\boldsymbol{w}}(y)g_{\boldsymbol{w}}(z-y)f_{\boldsymbol{w}}(y^{\prime})g_{\boldsymbol{w}}(z-y^{\prime})\omega^{\rho(x-x^{\prime},y-y^{\prime})}$
$\displaystyle\hskip
56.9055pt=\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}z,x,x^{\prime}\\\
y,y^{\prime},\boldsymbol{w}\end{subarray}}\Big{(}\prod_{i\in[7]}\mathbbm{1}_{V}(w_{i}+x)\Big{)}\Big{(}\prod_{i\in[7]}\mathbbm{1}_{V}(w_{i}+x^{\prime})\Big{)}\Big{(}\prod_{i\in[7]}\mathbbm{1}_{V}(w_{i}+y)\Big{)}\Big{(}\prod_{i\in[7]}\mathbbm{1}_{V}(w_{i}+y^{\prime})\Big{)}$
$\displaystyle\hskip 113.81102pt\mathbbm{1}_{V}(w_{1}-w_{2}+\dots-
w_{6}+w_{7}+z-x)\mathbbm{1}_{V}(w_{1}-w_{2}+\dots-w_{6}+w_{7}+z-x^{\prime})$
$\displaystyle\hskip 113.81102pt\mathbbm{1}_{V}(w_{1}-w_{2}+\dots-
w_{6}+w_{7}+z-y)\mathbbm{1}_{V}(w_{1}-w_{2}+\dots-
w_{6}+w_{7}+z-y^{\prime})\omega^{\rho(x-x^{\prime},y-y^{\prime})}.$

Again, usual argument based on Lemma 3.2 allows777Note that Lemma 3.2 is
stated for function of a single variable, while we have additional term
$\omega^{\rho(x-x^{\prime},y-y^{\prime})}$ in the expression above. However,
the proof of Lemma 3.2 only uses the fact that some variables do not appear in
the functions that we want to remove (and that those functions take values in
$\mathbb{D}$) and variables $z,w_{1},\dots,w_{7}$ do not appear in
$\omega^{\rho(x-x^{\prime},y-y^{\prime})}$. to replace all terms involving
$\mathbbm{1}_{V}$ by $\delta$, namely we use variable $z$ and one of
$x,x^{\prime},y,y^{\prime}$ for each of the last 4 such terms, and then the
two variables appearing in each of the remaining terms. Thus

$2^{-6}c^{12}\delta^{32}\leq
2^{-5}c^{12}\delta^{32}-32\varepsilon\leq\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}x,x^{\prime}\\\
y,y^{\prime}\end{subarray}}\delta^{32}\omega^{\rho(x-x^{\prime},y-y^{\prime})},$

from which we see that $\operatorname{bias}\rho\geq 2^{-6}c^{12}$, provided
$\varepsilon\leq 2^{-12}c^{12}\delta^{32}$.

Obtaining exact symmetry. Let $R\colon\mathbb{F}_{p}^{d}\times G\times
G\to\mathbb{F}_{p}$ be the trilinear form defined by
$R(\lambda,x,y)=\lambda\cdot(\beta(x,y)-\beta(y,x))$. From the work above,

$\operatorname{bias}R\geq\frac{|\Lambda|}{p^{d}}\cdot 2^{-6}c^{12}\geq
2^{-12}c^{15}.$

By the Theorem 2.3 we obtain an integer $s\leq O(\log_{p}(2c^{-1}))$, linear
forms $\theta_{1},\dots,\theta^{\prime\prime}_{s}$ and bilinear forms
$\rho_{1},\dots,\rho^{\prime\prime}_{s}$ such that

$R(\lambda,x,y)=\sum_{i\in[s]}\theta_{i}(\lambda)\rho_{i}(x,y)+\sum_{i\in[s]}\theta^{\prime}_{i}(x)\rho^{\prime}_{i}(\lambda,y)+\sum_{i\in[s]}\theta^{\prime\prime}_{i}(y)\rho^{\prime\prime}_{i}(\lambda,x).$

Define subspace $U=\\{u\in
G\colon\theta^{\prime}(u)=0,\theta^{\prime\prime}(u)=0\\}$, which has
codimension at most $2s$ in $G$. Let $e_{1},\dots,e_{\tilde{d}}$ be a basis of
the subspace $\\{\lambda\in\mathbb{F}_{p}^{d}\colon\theta(\lambda)=0\\}$,
where $\tilde{d}\geq d-s$. Let $\tilde{\beta}\colon G\times
G\to\mathbb{F}_{p}^{\tilde{d}}$ be a bilinear map given by
$\tilde{\beta}_{i}(x,y)=e_{i}\cdot\beta(x,y)$. Then we have
$\tilde{\beta}(u,v)=\tilde{\beta}(v,u)$ for all $u,v\in U$. We now want to
replace $\beta$ by a map which is symmetric on the whole space $G$.

Going back to assumptions of the proposition, recall that we have a set $A$ of
size $|A|\geq c|G|$, a subspace $W_{a}$ for each $a\in A$ such that

$|W_{a}\cap\\{b\in G\colon\beta(a,b)=0\\}|\geq cp^{-d}|G|$

and for each $b\in W_{a}$ we have

${\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a}(b)\geq c\delta^{15}.$

Since $W_{a}$ is a subspace for each $a\in A$, we conclude that (observe that
$b$ ranges over $U$ in the expectation below)

$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a\in G,b\in
U}\mathbbm{1}(\tilde{\beta}(a,b)=0){\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a}(b)\geq\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a\in
G}\mathbbm{1}_{A}(a)\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{b\in
G}\mathbbm{1}(\beta(a,b)=0)\mathbbm{1}_{U}(b){\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a}(b)$ $\displaystyle\hskip 56.9055pt\geq
c\delta^{15}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a\in
G}\mathbbm{1}_{A}(a)\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{b\in
G}\mathbbm{1}(\beta(a,b)=0)\mathbbm{1}_{U}(b)\mathbbm{1}_{W_{a}}(b)$
$\displaystyle\hskip 56.9055pt\geq
c\delta^{15}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a\in G}\mathbbm{1}_{A}(a)\frac{|\\{b\in
G\colon\beta(a,b)=0\\}\cap W_{a}\cap U|}{|G|}$ $\displaystyle\hskip
56.9055pt\geq
cp^{-2s}\delta^{15}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a\in G}\mathbbm{1}_{A}(a)\frac{|\\{b\in
G\colon\beta(a,b)=0\\}\cap W_{a}|}{|G|}$ $\displaystyle\hskip 56.9055pt\geq
c^{3}p^{-2s-d}\delta^{15}\geq c^{4}p^{-2s}\delta^{16}.$

Let $T\leq G$ be an arbitrary subspace with the property that $G=U\oplus T$
and let $c_{1}=c^{4}p^{-2s}$. Thus,

$c_{1}\delta^{16}\leq\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{t\in T,a,b\in
U}\mathbbm{1}(\tilde{\beta}(a+t,b)=0){\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a-t}(b).$

By averaging, there exists $t_{0}\in T$ such that

$\displaystyle c_{1}\delta^{16}\leq$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,b\in
U}\mathbbm{1}(\tilde{\beta}(a+t_{0},b)=0){\mathop{\ast}\limits^{\vbox
to-1.50694pt{\kern-3.46594pt\hbox{$\bm{-}$}\vss}}}^{(8)}\mathbbm{1}_{V\cap
V-a-t_{0}}(b).$ $\displaystyle=$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\lambda\in\mathbb{F}_{p}^{\tilde{d}}}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}a,b\in U\\\
x_{1},\dots,x_{7}\in
G\end{subarray}}\omega^{\lambda\cdot\tilde{\beta}(a+t_{0},b)}\mathbbm{1}_{V}(x_{1})\mathbbm{1}_{V}(x_{1}+a+t_{0})\dots\mathbbm{1}_{V}(x_{7})\mathbbm{1}_{V}(x_{7}+a+t_{0})$
$\displaystyle\hskip
142.26378pt\mathbbm{1}_{V}(x_{1}-x_{2}+\dots+x_{7}-b)\mathbbm{1}_{V}(x_{1}-x_{2}+\dots+x_{7}-b+a+t_{0}).$

By Cauchy-Schwarz inequality we get

$\displaystyle
c_{1}^{2}\delta^{32}\leq\bigg{(}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}b\in
U,\lambda\in\mathbb{F}_{p}^{\tilde{d}}\\\ x_{1},\dots,x_{7}\in
G\end{subarray}}\mathbbm{1}_{V}(x_{1})\dots\mathbbm{1}_{V}(x_{7})\mathbbm{1}_{V}(x_{1}-x_{2}+\dots+x_{7}-b)\bigg{)}$
$\displaystyle\hskip
56.9055pt\bigg{(}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}b\in
U,\lambda\in\mathbb{F}_{p}^{\tilde{d}}\\\ x_{1},\dots,x_{7}\in
G\end{subarray}}\mathbbm{1}_{V}(x_{1})\dots\mathbbm{1}_{V}(x_{7})\mathbbm{1}_{V}(x_{1}-x_{2}+\dots+x_{7}-b)$
$\displaystyle\hskip
113.81102pt\Big{|}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a\in
U}\omega^{\lambda\cdot\tilde{\beta}(a+t_{0},b)}\mathbbm{1}_{V}(x_{1}+a+t_{0})\dots\mathbbm{1}_{V}(x_{7}+a+t_{0})\mathbbm{1}_{V}(x_{1}-x_{2}+\dots+x_{7}-b+a+t_{0})\Big{|}^{2}\bigg{)}.$

The first long sum above equals $\delta^{8}$ and hence

$\displaystyle
c_{1}^{2}\delta^{24}\leq\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}a,b,u\in
U,\lambda\in\mathbb{F}_{p}^{\tilde{d}}\\\ x_{1},\dots,x_{7}\in
G\end{subarray}}\mathbbm{1}_{V}(x_{1})\dots\mathbbm{1}_{V}(x_{7})\mathbbm{1}_{V}(x_{1}-x_{2}+\dots+x_{7}-b)\omega^{\lambda\cdot\tilde{\beta}(u,b)}$
$\displaystyle\hskip
56.9055pt\mathbbm{1}_{V}(x_{1}+a+t_{0})\dots\mathbbm{1}_{V}(x_{7}+a+t_{0})\mathbbm{1}_{V}(x_{1}-x_{2}+\dots+x_{7}-b+a+t_{0})$
$\displaystyle\hskip
56.9055pt\mathbbm{1}_{V}(x_{1}+a+t_{0}+u)\dots\mathbbm{1}_{V}(x_{7}+a+t_{0}+u)\mathbbm{1}_{V}(x_{1}-x_{2}+\dots+x_{7}-b+a+t_{0}+u)$
$\displaystyle\hskip
28.45274pt=\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}a,b,u\in
U,\lambda\in\mathbb{F}_{p}^{\tilde{d}}\\\ x_{1},\dots,x_{7}\in
G\end{subarray}}\mathbbm{1}_{V}(x_{1}-a)\dots\mathbbm{1}_{V}(x_{7}-a)\mathbbm{1}_{V}(x_{1}-x_{2}+\dots+x_{7}-a-b)\omega^{\lambda\cdot\tilde{\beta}(u,b)}$
$\displaystyle\hskip
56.9055pt\mathbbm{1}_{V}(x_{1}+t_{0})\dots\mathbbm{1}_{V}(x_{7}+t_{0})\mathbbm{1}_{V}(x_{1}-x_{2}+\dots+x_{7}-b+t_{0})$
$\displaystyle\hskip
56.9055pt\mathbbm{1}_{V}(x_{1}+t_{0}+u)\dots\mathbbm{1}_{V}(x_{7}+t_{0}+u)\mathbbm{1}_{V}(x_{1}-x_{2}+\dots+x_{7}-b+t_{0}+u),$

where we made a change of variables by shifting $x_{i}$ by $a$.
Applying Lemma 3.2,888As remarked before, the lemma still applies with the
additional bilinear phase term $\omega^{\lambda\cdot\tilde{\beta}(u,b)}$. we
may replace the first 8 $\mathbbm{1}_{V}$ terms by $\delta^{8}$ using
variables $b,a$ for $\mathbbm{1}_{V}(x_{1}-x_{2}+\dots+x_{7}-a+b)$ and then
$x_{i},a$ for each $\mathbbm{1}_{V}(x_{i}-a)$. Hence, provided
$\varepsilon\leq 2^{-4}c_{1}^{2}\delta^{24}$,

$\displaystyle 2^{-1}c_{1}^{2}\delta^{24}\leq
c_{1}^{2}\delta^{24}-8\varepsilon\leq\delta^{8}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}b,u\in
U,\lambda\in\mathbb{F}_{p}^{\tilde{d}}\\\ x_{1},\dots,x_{7}\in
G\end{subarray}}\omega^{\lambda\cdot\tilde{\beta}(u,b)}\mathbbm{1}_{V}(x_{1}+t_{0})\dots\mathbbm{1}_{V}(x_{7}+t_{0})\mathbbm{1}_{V}(x_{1}-x_{2}+\dots+x_{7}-b+t_{0})$
$\displaystyle\hskip
56.9055pt\mathbbm{1}_{V}(x_{1}+t_{0}+u)\dots\mathbbm{1}_{V}(x_{7}+t_{0}+u)\mathbbm{1}_{V}(x_{1}-x_{2}+\dots+x_{7}-b+t_{0}+u)$
$\displaystyle\hskip
28.45274pt=\delta^{8}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}b,u\in U\\\
x_{1},\dots,x_{7}\in
G\end{subarray}}\mathbbm{1}(\tilde{\beta}(u,b)=0)\mathbbm{1}_{V-t_{0}}(x_{1})\dots\mathbbm{1}_{V-t_{0}}(x_{7})\mathbbm{1}_{V-t_{0}}(x_{1}-x_{2}+\dots+x_{7}-b)$
$\displaystyle\hskip
56.9055pt\mathbbm{1}_{V-t_{0}}(x_{1}+u)\dots\mathbbm{1}_{V-t_{0}}(x_{7}+u)\mathbbm{1}_{V-t_{0}}(x_{1}-x_{2}+\dots+x_{7}-b+u).$

Let us misuse the notation and write $V$ instead of $V-t_{0}$, which is fine
as the quadratic variety that we obtain for $V-t_{0}$ can then be shifted by
$t_{0}$ to get the desired conclusion. Recall that the subspace $U$ has
codimension at most $2s$ in $G$. Extend $\tilde{\beta}|_{U\times U}$
arbitrarily to a symmetric bilinear map $\gamma\colon G\times
G\to\mathbb{F}_{p}^{\tilde{d}}$. Then
$\operatorname{rank}\lambda\cdot\gamma\geq\operatorname{rank}\lambda\cdot\tilde{\beta}$
for all $\lambda\not=0$ and hence

$\operatorname{bias}\lambda\cdot\gamma=p^{-\operatorname{rank}\lambda\cdot\gamma}\leq
p^{-\operatorname{rank}\lambda\cdot\tilde{\beta}}=\operatorname{bias}\lambda\cdot\tilde{\beta}\leq\varepsilon.$

Furthermore,

$\displaystyle 2^{-1}p^{-4s}c_{1}^{2}\delta^{16}\leq$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}a,b\in G\\\
x_{1},\dots,x_{7}\in
G\end{subarray}}\mathbbm{1}(\gamma(a,b)=0)\mathbbm{1}_{V}(x_{1})\dots\mathbbm{1}_{V}(x_{7})\mathbbm{1}_{V}(x_{1}-x_{2}+\dots+x_{7}-b)$
$\displaystyle\hskip
56.9055pt\mathbbm{1}_{V}(x_{1}+a)\dots\mathbbm{1}_{V}(x_{7}+a)\mathbbm{1}_{V}(x_{1}-x_{2}+\dots+x_{7}-b+a).$

Finding quadratic variety. Let $q(x)=\frac{1}{2}\gamma(x,x)$. Observe that for
each $a,t\in G$ we have

$q(t+a)-q(t)=\frac{1}{2}\gamma(t+a,t+a)-\frac{1}{2}\gamma(t,t)=\gamma(a,t)+\frac{1}{2}\gamma(a,a)=\gamma(a,t)+q(a).$

For $a\in G$ and $\mu\in\mathbb{F}_{p}^{\tilde{d}}$, let us define
$\rho_{a}(\mu)=\mathop{\mathbb{E}}_{x}\mathbbm{1}_{V\cap
V-a}(x)\mathbbm{1}(\gamma(a,x)=\mu)$. Let
$M_{a}=\max_{\mu\in\mathbb{F}_{p}^{\tilde{d}}}\rho_{a}(\mu)$. Writing
$c_{2}=2^{-1}p^{-4s}c_{1}^{2}$, we have

$\displaystyle c_{2}\delta^{16}\leq$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}a,b\in G\\\
x_{1},\dots,x_{7}\in
G\end{subarray}}\mathbbm{1}(\gamma(a,b)=0)\mathbbm{1}_{V\cap
V-a}(x_{1})\dots\mathbbm{1}_{V\cap V-a}(x_{7})\mathbbm{1}_{V\cap
V-a}(x_{1}-x_{2}+\dots+x_{7}-b)$ $\displaystyle=$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}a\in G\\\
x_{1},\dots,x_{8}\in G\end{subarray}}\mathbbm{1}(\gamma(a,x_{1}-x_{2}+\dots-
x_{8})=0)\mathbbm{1}_{V\cap V-a}(x_{1})\dots\mathbbm{1}_{V\cap
V-a}(x_{7})\mathbbm{1}_{V\cap V-a}(x_{8})$ $\displaystyle=$
$\displaystyle\sum_{\mu_{1},\dots,\mu_{8}\in\mathbb{F}_{p}^{\tilde{d}}}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}a\in G\\\
x_{1},\dots,x_{8}\in
G\end{subarray}}\mathbbm{1}(\mu_{1}-\mu_{2}+\dots-\mu_{8}=0)\prod_{i\in[8]}\Big{(}\mathbbm{1}_{V\cap
V-a}(x_{i})\mathbbm{1}(\gamma(a,x_{i})=\mu_{i})\Big{)}$ $\displaystyle=$
$\displaystyle\sum_{\mu_{1},\dots,\mu_{7}\in\mathbb{F}_{p}^{\tilde{d}}}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a}\rho_{a}(\mu_{1})\dots\rho_{a}(\mu_{7})\rho_{a}(\mu_{1}-\mu_{2}+\dots+\mu_{7})$
$\displaystyle\leq$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a}\sum_{\mu_{1},\dots,\mu_{7}\in\mathbb{F}_{p}^{\tilde{d}}}\rho_{a}(\mu_{1})\dots\rho_{a}(\mu_{7})M_{a}.$
(25)

Note that

$\sum_{\mu\in\mathbb{F}_{p}^{\tilde{d}}}\rho_{a}(\mu)=\sum_{\mu\in\mathbb{F}_{p}^{\tilde{d}}}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x}\mathbbm{1}_{V\cap
V-a}(x)\mathbbm{1}(\gamma(a,x)=\mu)=\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x}\mathbbm{1}_{V\cap V-a}(x)=\frac{|V\cap
V-a|}{|G|}.$

By Claim 3.3, we see for all but at most $8\sqrt{\varepsilon}|G|$ of $a\in G$
we have that the sum above is at most $2\delta^{2}$. Let $P\subseteq G$ be the
set of all $a\in G$ such that $M_{a}\geq 2^{-10}c_{2}\delta^{2}$ and $|V\cap
V-a|\leq 2\delta^{2}|G|$. Inequality (25) gives

$\displaystyle c_{2}\delta^{16}\leq
8\sqrt{\varepsilon}+2^{7}\delta^{14}\Big{(}2^{-10}c_{2}\delta^{2}+\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a}\mathbbm{1}_{P}(a)M_{a}\Big{)},$

from which we obtain $\mathop{\mathbb{E}}_{a}\mathbbm{1}_{P}(a)M_{a}\geq
2^{-10}c_{2}\delta^{2}$, provided $\varepsilon\leq
2^{-8}c_{2}^{2}\delta^{32}$.

For each $a\in P$, let $\mu(a)\in\mathbb{F}_{p}^{\tilde{d}}$ be an argument
for which $M_{a}$ is attained. Write $\tilde{\mu}(t)=\mu(t)+q(t)$. Then

$\displaystyle 2^{-10}c_{2}\delta^{2}\leq$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a}\mathbbm{1}_{P}(a)M_{a}=\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,x}\mathbbm{1}_{P}(a)\mathbbm{1}_{V\cap
V-a}(x)\mathbbm{1}(\gamma(a,x)=\mu(a))$ $\displaystyle=$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,x}\mathbbm{1}_{P}(a)\mathbbm{1}_{V}(x)\mathbbm{1}_{V}(x+a)\mathbbm{1}(\gamma(a,x)=\mu(a))$
$\displaystyle=$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,x}\mathbbm{1}_{P}(a)\mathbbm{1}_{V}(x)\mathbbm{1}_{V}(x+a)\mathbbm{1}(q(a+x)-q(x)=\mu(a)+q(a))$
$\displaystyle=$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x,y}\mathbbm{1}_{P}(y-x)\mathbbm{1}_{V}(x)\mathbbm{1}_{V}(y)\mathbbm{1}(q(y)-q(x)=\tilde{\mu}(y-x)).$

Let $\Gamma$ be the bipartite graph whose vertex classes $\mathcal{C}_{1}$ and
$\mathcal{C}_{2}$ are two copies of $V$, with
$(x,y)\in\mathcal{C}_{1}\times\mathcal{C}_{2}$ being an edge if $y-x\in P$ and
$q(y)-q(x)=\tilde{\mu}(y-x)$. The inequality above shows that the density of
$\Gamma$ is at least $2^{-10}c_{2}$. This means that $\Gamma$ has at least
$2^{-40}c_{2}^{4}|V|^{4}$ ordered 4-cycles. Each ordered 4-cycle
$(x_{1},y_{1},x_{2},y_{2})$ gives rise to an additive quadruple in $P$
respected by $\tilde{\mu}$ as
$(y_{1}-x_{1})+(y_{2}-x_{2})=(y_{1}-x_{2})+(y_{2}-x_{1})$ and

$\displaystyle\tilde{\mu}(y_{1}-x_{1})+\tilde{\mu}(y_{2}-x_{2})-\tilde{\mu}(y_{1}-x_{2})-\tilde{\mu}(y_{2}-x_{1})$
$\displaystyle\hskip
56.9055pt=\Big{(}q(y_{1})-q(x_{1})\Big{)}+\Big{(}q(y_{2})-q(x_{2})\Big{)}-\Big{(}q(y_{1})-q(x_{2})\Big{)}-\Big{(}q(y_{2})-q(x_{1})\Big{)}=0.$

By Claim 3.3 and provided $\varepsilon\leq\delta^{16}$, all but at most
$16\sqrt{\varepsilon}|G|^{3}$ additive quadruple $(a,a^{\prime},b,b^{\prime})$
in $P$ can arise from at most $2\delta^{4}|G|$ ordered 4-cycles, since this
corresponds to finding $x$ such that $x,x+a,x+a-b,x+a-b+a^{\prime}\in V$, i.e.
$x\in V\cap(V-a)\cap(V-a+b)\cap(V-a+b-a^{\prime})$. Hence, as long as
$\varepsilon\leq 2^{-100}c_{2}^{8}\delta^{8}$, $\tilde{\mu}$ respects at least
least $2^{-42}c_{2}^{4}|G|^{3}$ additive quadruples in $P$.

We may apply Theorem 2.2 to find an affine map $\psi\colon
G\to\mathbb{F}_{p}^{\tilde{d}}$ and a parameter
$c_{3}\geq\exp\Big{(}-\log^{O(1)}(2c_{2}^{-1})\Big{)}$ such that
$\psi(a)=\tilde{\mu}(a)$ holds for at least $c_{3}|G|$ elements $a\in P$. Let
$P^{\prime}$ be the set of such elements. Hence

$\displaystyle 2^{-10}c_{2}c_{3}\delta^{2}\leq$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a}\mathbbm{1}_{P^{\prime}}(a)\rho_{a}(\mu(a))=\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a}\mathbbm{1}_{P^{\prime}}(a)\Big{(}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x}\mathbbm{1}_{V\cap
V-a}(x)\mathbbm{1}(\gamma(a,x)=\mu(a))\Big{)}$ $\displaystyle=$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a}\mathbbm{1}_{P^{\prime}}(a)\Big{(}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x}\mathbbm{1}_{V\cap
V-a}(x)\mathbbm{1}(\gamma(a,x)=\tilde{\mu}(a)-q(a))\Big{)}$ $\displaystyle=$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a}\mathbbm{1}_{P^{\prime}}(a)\Big{(}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x}\mathbbm{1}_{V\cap
V-a}(x)\mathbbm{1}(\gamma(a,x)=\psi(a)-q(a))\Big{)}$ $\displaystyle\leq$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,x}\mathbbm{1}_{V\cap
V-a}(x)\mathbbm{1}(\gamma(a,x)=\psi(a)-q(a))$ $\displaystyle=$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,x}\mathbbm{1}_{V}(x)\mathbbm{1}_{V}(x+a)\mathbbm{1}(q(x+a)-q(x)-q(a)=\psi(a)-q(a))$
$\displaystyle=$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,x}\mathbbm{1}_{V}(x)\mathbbm{1}_{V}(x+a)\mathbbm{1}\Big{(}q(x+a)-\psi(x+a)=q(x)-\psi(x)+\psi(0)\Big{)}$
$\displaystyle=$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x,y}\mathbbm{1}_{V}(x)\mathbbm{1}_{V}(y)\mathbbm{1}\Big{(}q(y)-\psi(y)=q(x)-\psi(x)+\psi(0)\Big{)}$
$\displaystyle=$
$\displaystyle\sum_{\mu\in\mathbb{F}_{p}^{\tilde{d}}}\Big{(}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x}\mathbbm{1}_{V}(x)\mathbbm{1}(q(x)-\psi(x)=\mu)\Big{)}\Big{(}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{y}\mathbbm{1}_{V}(y)\mathbbm{1}(q(y)-\psi(y)=\mu+\psi(0))\Big{)}$
$\displaystyle\leq$
$\displaystyle\max_{\nu\in\mathbb{F}_{p}^{\tilde{d}}}\Big{(}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x}\mathbbm{1}_{V}(x)\mathbbm{1}(q(x)-\psi(x)=\nu)\Big{)}\cdot\sum_{\mu\in\mathbb{F}_{p}^{\tilde{d}}}\Big{(}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{y}\mathbbm{1}_{V}(y)\mathbbm{1}(q(y)-\psi(y)=\mu)\Big{)}$
$\displaystyle\leq$
$\displaystyle\delta\max_{\nu\in\mathbb{F}_{p}^{\tilde{d}}}\Big{(}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x}\mathbbm{1}_{V}(x)\mathbbm{1}(q(x)-\psi(x)=\nu)\Big{)},$

so there exists $\mu$ such that

$2^{-10}c_{2}c_{3}\delta\leq\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x}\mathbbm{1}_{V}(x)\mathbbm{1}(q(x)-\psi(x)=\mu)=\frac{|V\cap\\{x\in
G\colon q(x)-\psi(x)=\mu\\}|}{|G|}.$

Thus, the quadratic variety $Q=\\{x\in G\colon q(x)-\psi(x)=\mu\\}$ satisfies
$|V\cap Q|\geq 2^{-10}c_{2}c_{3}|V|$. Finally, notice that

$\displaystyle\Big{|}|G|^{-1}|Q|-p^{-\tilde{d}}\Big{|}=$
$\displaystyle\Big{|}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x\in
G}\mathbbm{1}(q(x)-\psi(x)=\mu)-p^{-\tilde{d}}\Big{|}=\Big{|}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x\in
G}\Big{(}p^{-\tilde{d}}\sum_{\lambda\in\mathbb{F}_{p}^{\tilde{d}}}\omega^{\lambda\cdot(q(x)-\psi(x)-\mu)}\Big{)}-p^{-\tilde{d}}\Big{|}$
$\displaystyle\leq$ $\displaystyle
p^{-\tilde{d}}\sum_{\lambda\in\mathbb{F}_{p}^{\tilde{d}}\setminus\\{0\\}}\Big{|}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x\in
G}\omega^{\lambda\cdot(q(x)-\psi(x)-\mu)}\Big{|}.$

It remains to give a bound on $|\mathop{\mathbb{E}}_{x\in
G}\omega^{\lambda\cdot(q(x)-\psi(x)-\mu)}|$ for non-zero $\lambda$. Note that

$\displaystyle\Big{|}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x}\omega^{\lambda\cdot(q(x)-\psi(x)-\mu)}\Big{|}^{4}=\Big{|}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x,y}\omega^{\lambda\cdot(q(x)-\psi(x)-\mu)-\lambda\cdot(q(y)-\psi(y)-\mu)}\Big{|}^{2}$
$\displaystyle\hskip
56.9055pt=\Big{|}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x,a}\omega^{\lambda\cdot(q(x+a)-q(x)-\psi(a)+\psi(0))}\Big{|}^{2}=\Big{|}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a}\Big{(}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x}\omega^{\lambda\cdot(q(x+a)-q(x)-\psi(a)+\psi(0))}\Big{)}\Big{|}^{2}$
$\displaystyle\hskip
56.9055pt\leq\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a}\Big{|}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x}\omega^{\lambda\cdot(q(x+a)-q(x)-\psi(a)+\psi(0))}\Big{|}^{2}\hskip
56.9055pt(\text{by Cauchy-Schwarz})$ $\displaystyle\hskip
56.9055pt=\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x,a,b}\omega^{\lambda\cdot(q(x+a+b)-q(x+a)-q(x+b)+q(x))}=\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{a,b}\omega^{\lambda\cdot\gamma(a,b)}=\operatorname{bias}\Big{(}\lambda\cdot\gamma\Big{)}\leq\varepsilon.$

Thus
$|Q|\leq\Big{(}p^{-\tilde{d}}+\sqrt[4]{\varepsilon}\Big{)}|G|\leq\Big{(}p^{s-d}+\sqrt[4]{\varepsilon}\Big{)}|G|$,
as desired.∎

Finally, we may prove Theorem 1.9.

###### Proof of Theorem 1.9.

Let $D$ be the maximum of the three absolute constants appearing in Theorems
3.1 and 4.1 and Propostion 5.1. Let $V\subseteq G$ be the given
$(c_{0},\delta,\varepsilon)$-approximate quadratic variety. Apply Theorem 3.1
to obtain a positive quantity $c_{1}$, a set $A\subseteq G$ and a collection
of subspaces $W_{a}\leq G$ indexed by $a\in A$ which satisfy properties
(i)-(vi) from the conclusion of that theorem. Let
$d=\lceil\log_{p}(c_{1}^{-1}\delta^{-1})\rceil$. By property (iv), the
codimension of each $W_{a}$ is at most $d$, so we may misuse the notation and
write $W_{a}$ for an arbitrary subspace inside it of codimension exactly $d$.
We need to replace $c_{1}$ by $c_{2}=c_{1}^{11}$ so that the conditions
(i)-(vi) still hold.
Apply Theorem 4.1 with parameters $c=c_{2},K=c_{2}^{-1}$ and
$\eta=D\varepsilon\delta^{-288}$. We thus obtain parameters
$c^{\prime}\geq\exp\Big{(}-\exp\Big{(}\log^{D}(2c_{2}^{-1})\Big{)}\Big{)}$ and
$r\leq\exp\Big{(}\log^{D}(2c_{2}^{-1})\Big{)}$, set $A^{\prime}\subseteq A$
and a map $\Phi\colon G\times\mathbb{F}_{p}^{d}\to G$, affine in the first
variable and linear in the second, such that $|A^{\prime}|\geq c^{\prime}|G|$
and for each $a\in A^{\prime}$ we have $|\operatorname{Im}\Phi(a,\cdot)\cap
W_{a}^{\perp}|\geq c^{\prime}p^{d}$. Moreover, there exists a subspace
$\Lambda\leq\mathbb{F}_{p}^{d}$ of dimension $r$ such that whenever
$\lambda\notin\Lambda$ we have

$\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x,y}\omega\Big{(}\Phi(x,\lambda)\cdot
y\Big{)}\leq\varepsilon^{\prime},$

where $\varepsilon^{\prime}=\Big{(}\eta{c^{\prime}}^{-2}\Big{)}^{1/2r}$.
Let $M$ be a subspace of $\mathbb{F}_{p}^{d}$ of codimension $r$ such that
$\mathbb{F}_{p}^{d}=\Lambda+M$ and let $e_{1},\dots,e_{d-r}$ be a basis of
$M$. Let us define bilinear map $\beta\colon G\times G\to\mathbb{F}_{p}^{d-r}$
by $\beta_{i}(x,y)=\Phi(x,e_{i})\cdot y$ for $i\in[d-r]$. Given any
$\lambda\in\mathbb{F}_{p}^{d-r}\setminus\\{0\\}$, we have

$\operatorname{bias}\lambda\cdot\beta=\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x,y}\omega^{\sum_{i\in[d-r]}\lambda_{i}\beta_{i}(x,y)}=\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x,y}\omega^{\sum_{i\in[d-r]}\lambda_{i}\Phi(x,e_{i})\cdot
y}=\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x,y}\omega^{\Phi\big{(}x,\sum_{i\in[d-r]}\lambda_{i}e_{i}\big{)}\cdot
y}\leq\varepsilon^{\prime},$

since $\sum_{i\in[d-r]}\lambda_{i}e_{i}\notin\Lambda$.
Next, we have $|\operatorname{Im}\Phi(a,\cdot)\cap W_{a}^{\perp}|\geq
c^{\prime}p^{d}$ for all $a\in A^{\prime}$. Thus,

${c^{\prime}}^{-1}p^{-d}|G|\geq|\operatorname{Im}\Phi(a,\cdot)^{\perp}+W_{a}|=\frac{|\operatorname{Im}\Phi(a,\cdot)^{\perp}||W_{a}|}{|\operatorname{Im}\Phi(a,\cdot)^{\perp}\cap
W_{a}|}$

so

$|\operatorname{Im}\Phi(a,\cdot)^{\perp}\cap
W_{a}|\geq\frac{c^{\prime}p^{d}|\operatorname{Im}\Phi(a,\cdot)^{\perp}||W_{a}|}{|G|}\geq
c^{\prime}|\operatorname{Im}\Phi(a,\cdot)^{\perp}|\geq c^{\prime}p^{-d}|G|.$

However, when $b\in\operatorname{Im}\Phi(a,\cdot)^{\perp}$ then we have
$0=\Phi(a,e_{i})\cdot b=\beta_{i}(a,b)$ for all $i\in[d-r]$, and hence
$\beta(a,b)=0$. Thus

$|\\{b\in G\colon\beta(a,b)=0\\}\cap W_{a}|\geq c^{\prime}p^{-d}|G|.$

All conditions of Propostion 5.1 are satisfied, as long as
$\varepsilon^{\prime}\leq(2^{-1}c^{\prime}\delta)^{D}$, hence there exists a
quadratic variety $Q\subseteq G$ of size
$|Q|\leq(2{c^{\prime}}^{-1})^{D}\delta|G|$ such that $|Q\cap
V|\geq\exp\Big{(}-\log^{D}(2{c^{\prime}}^{-1})\Big{)}\delta|G|$. ∎

## §6 Approximate polynomials and approximate varieties

In this appendix we show the connection between approximate quadratic
polynomials and approximate quadratic varieties. As in the rest of the paper,
$G$ and $H$ are finite-dimensional vector spaces over $\mathbb{F}_{p}$. We
need some preliminary lemmas. The first one estimates the probability that a
given tuple of vectors belongs to a random coset of fixed codimension.

######  Lemma 6.1.

Let $v_{1},\dots,v_{r}\in G$ and let $n=\dim G$. Let $U\leq G$ be a random
subspace of codimension $d$, among such subspaces. Then, if the maximum size
of independent set inside $v_{1},v_{2},\dots,v_{r}$ has size $m$, we have

$\mathbb{P}(v_{1},\dots,v_{r}\in
U)=\frac{(p^{n-d}-1)(p^{n-d}-p)\cdots(p^{n-d}-p^{m-1})}{(p^{n}-1)(p^{n}-p)\cdots(p^{n}-p^{m-1})}.$
(26)

In particular, provided $m+d<n-2$,

$p^{-md}-4p^{m+d}p^{-n}\leq\mathbb{P}(v_{1},\dots,v_{r}\in C)\leq p^{-md}.$
(27)

###### Proof.

We may view random model in this lemma as follows. Let
$\mathcal{L}\in\operatorname{GL}(G)$ be a linear automorphism chosen uniformly
at random. Fix arbitrary subspace $U_{0}$ of codimension $d$ and set
$U=\mathcal{L}(U_{0})$. Let $u_{1},\dots,u_{m}$ be a maximal independent
subset of $v_{1},v_{2},\dots,v_{r}$. Thus

$\mathbb{P}\Big{(}v_{1},\dots,v_{r}\in
U\Big{)}=\mathbb{P}\Big{(}u_{1},u_{2},\dots,u_{m}\in U\Big{)}.$

However, recalling that $U=\mathcal{L}(U_{0})$, we have that
$u_{1},u_{2},\dots,u_{m}\in U$ if and only
$\mathcal{L}^{-1}(u_{1}),\dots,\mathcal{L}^{-1}(u_{m})\in U_{0}$. Since
$\mathcal{L}$ is chosen uniformly at random and $u_{1},\dots,u_{m}$ are
independent, the $m$-tuple
$\Big{(}\mathcal{L}^{-1}(u_{1}),\dots,\mathcal{L}^{-1}(u_{m})\Big{)}$ is
uniformly distributed over all $m$-tuples of independent vectors. Thus,
$\mathbb{P}(u_{1},u_{2},\dots,u_{m}\in U)=N_{U}/N_{G}$, where $N_{U}$ is the
number of independent ordered $m$-tuples in $U$, and $N_{G}$ is the
corresponding quantity in $G$. Equality (26) follows from a direct counting
argument.
To conclude (27), note first that $\frac{p^{n-d}-k}{p^{n}-k}\leq p^{-d}$,
giving the upper bound. For the lower bound, we use elementary inequalities
$1-2x\leq\exp(-2x)\leq 1-x$, which holds for $x\in[0,1/2]$. We have

$\frac{p^{n-d}-p^{k}}{p^{n}-p^{k}}=p^{-d}\frac{p^{n-d}-p^{k}}{p^{n-d}-p^{k-d}}=p^{-d}\Big{(}1-\frac{p^{k}-p^{k-d}}{p^{n-d}-p^{k-d}}\Big{)}\geq
p^{-d}\Big{(}1-p^{k+d-n}\Big{)}\geq p^{-d}\exp(-2p^{k+d-n}),$

as long as $k+d+2<n$. Thus

$\displaystyle\mathbb{P}\Big{(}v_{1},\dots,v_{r}\in
C\Big{)}\geq\prod_{k=0}^{m-1}\Big{(}p^{-d}\exp(-2p^{k+d-n})\Big{)}=p^{-md}\exp\Big{(}-2\sum_{k=0}^{m-1}p^{k+d-n}\Big{)}\geq$
$\displaystyle p^{-md}\exp(-4p^{m+d-n})$ $\displaystyle\geq$ $\displaystyle
p^{-md}-4p^{m+d-n},$

as long as $m+d+2<n$.∎

The second lemma is a version of Lemma 3.2 in the context of maps between
vector spaces, rather than $\mathbb{C}$-valued functions on a vector space.

######  Lemma 6.2.

Suppose that $A\subset G$ and that $F\colon A\to H$ is a map. Let
$r,s\in\mathbb{N}$ and let $\lambda_{i\,j}\in\mathbb{F}_{p}$ for
$i\in[r],j\in[s]$ and $\mu_{i}\in\mathbb{F}_{p}$ for $i\in[r]$ be scalars.
Assume that

$\sum_{i\in[r]}\mu_{i}F\Big{(}\sum_{j\in[s]}\lambda_{i\,j}u_{j}\Big{)}=0$ (28)

holds for at least $\alpha|G|^{s}$ of $s$-tuples of $(u_{1},\dots,u_{s})\in
G^{s}$. Suppose that there are distinct indices $a$ and $b$ in $[s]$ and an
index $i_{0}\in[r]$ such that $\mu_{i_{0}}\not=0$ and
$\lambda_{i\,a}\lambda_{i\,b}\not=0$ holds if and only if $i=i_{0}$. Then $F$
respects at least $\alpha^{4}|G|^{3}$ additive quadruples in $A$.

As in the case of Lemma 3.2, the lemma still applies if the situation is
simpler and there is a variable $u_{i}$ that appears in a single copy $F$ in
the expression above.

###### Proof.

Let $I$ be the set of indices $i\in[r]$ such that $\lambda_{i\,a}\not=0$. For
given $u_{[s]\setminus\\{a\\}}$, let $N(u_{[s]\setminus\\{a\\}})$ be the
number of $u_{a}$ such that (28) holds. By Cauchy-Schwarz inequality, we have

$\sum_{u_{[s]\setminus\\{a\\}}}N(u_{[s]\setminus\\{a\\}})^{2}\geq|G|^{1-s}\Big{(}\sum_{u_{[s]\setminus\\{a\\}}}N(u_{[s]\setminus\\{a\\}})\Big{)}^{2}\geq\alpha^{2}|G|^{s+1}.$

In particular, we have at least $\alpha^{2}|G|^{s+1}$ $(s+1)$-tuples
$(u_{[s]\setminus\\{a\\}},v_{a},v^{\prime}_{a})$ such that

$\displaystyle 0=$
$\displaystyle\bigg{(}\sum_{i\in[r]}\mu_{i}F\Big{(}\sum_{j\in[s]\setminus\\{a\\}}\lambda_{i\,j}u_{j}+\lambda_{i\,a}v_{a}\Big{)}\bigg{)}-\bigg{(}\sum_{i\in[r]}\mu_{i}F\Big{(}\sum_{j\in[s]\setminus\\{a\\}}\lambda_{i\,j}u_{j}+\lambda_{i\,a}v^{\prime}_{a}\Big{)}\bigg{)}$
$\displaystyle=$ $\displaystyle\sum_{i\in
I}\mu_{i}F\Big{(}\sum_{j\in[s]\setminus\\{a\\}}\lambda_{i\,j}u_{j}+\lambda_{i\,a}v_{a}\Big{)}-\mu_{i}F\Big{(}\sum_{j\in[s]\setminus\\{a\\}}\lambda_{i\,j}u_{j}+\lambda_{i\,a}v^{\prime}_{a}\Big{)}.$
(29)

Let $M(u_{[s]\setminus\\{a,b\\}},v_{a},v^{\prime}_{a})$ be the number of
$u_{b}$ such that (29) holds for $(s+1)$-tuple
$(u_{[s]\setminus\\{a\\}},v_{a},v^{\prime}_{a})$. By Cauchy-Schwarz inequality
we get

$\sum_{u_{[s]\setminus\\{a,b\\}},v_{a},v^{\prime}_{a}}M(u_{[s]\setminus\\{a,b\\}},v_{a},v^{\prime}_{a})^{2}\geq|G|^{-s}\Big{(}\sum_{u_{[s]\setminus\\{a,b\\}},v_{a},v^{\prime}_{a}}M(u_{[s]\setminus\\{a,b\\}},v_{a},v^{\prime}_{a})\Big{)}^{2}\geq\alpha^{4}|G|^{s+2}.$

Hence, we get at least $|G|^{s+2}$ of $(s+2)$-tuples
$(u_{[s]\setminus\\{a,b\\}},v_{a},v^{\prime}_{a},w_{b},w^{\prime}_{b})$ such
that

$\displaystyle 0=$ $\displaystyle\bigg{(}\sum_{i\in
I}\mu_{i}F\Big{(}\sum_{j\in[s]\setminus\\{a,b\\}}\lambda_{i\,j}u_{j}+\lambda_{i\,a}v_{a}+\lambda_{i\,b}w_{b}\Big{)}-\mu_{i}F\Big{(}\sum_{j\in[s]\setminus\\{a,b\\}}\lambda_{i\,j}u_{j}+\lambda_{i\,a}v^{\prime}_{a}+\lambda_{i\,b}w_{b}\Big{)}\bigg{)}$
$\displaystyle\hskip 56.9055pt-\bigg{(}\sum_{i\in
I}\mu_{i}F\Big{(}\sum_{j\in[s]\setminus\\{a,b\\}}\lambda_{i\,j}u_{j}+\lambda_{i\,a}v_{a}+\lambda_{i\,b}w^{\prime}_{b}\Big{)}-\mu_{i}F\Big{(}\sum_{j\in[s]\setminus\\{a,b\\}}\lambda_{i\,j}u_{j}+\lambda_{i\,a}v^{\prime}_{a}+\lambda_{i\,b}w^{\prime}_{b}\Big{)}\bigg{)}$
$\displaystyle=$
$\displaystyle\mu_{i_{0}}\bigg{(}F\Big{(}\sum_{j\in[s]\setminus\\{a,b\\}}\lambda_{i_{0}\,j}u_{j}+\lambda_{i_{0}\,a}v_{a}+\lambda_{i_{0}\,b}w_{b}\Big{)}-F\Big{(}\sum_{j\in[s]\setminus\\{a,b\\}}\lambda_{i_{0}\,j}u_{j}+\lambda_{i_{0}\,a}v^{\prime}_{a}+\lambda_{i_{0}\,b}w_{b}\Big{)}$
$\displaystyle\hskip
56.9055pt-F\Big{(}\sum_{j\in[s]\setminus\\{a,b\\}}\lambda_{i_{0}\,j}u_{j}+\lambda_{i_{0}\,a}v_{a}+\lambda_{i_{0}\,b}w^{\prime}_{b}\Big{)}+F\Big{(}\sum_{j\in[s]\setminus\\{a,b\\}}\lambda_{i_{0}\,j}u_{j}+\lambda_{i_{0}\,a}v^{\prime}_{a}+\lambda_{i_{0}\,b}w^{\prime}_{b}\Big{)}\bigg{)}.$

Thus, averaging over $u_{[s]\setminus\\{a,b\\}}$ we see that $F$ respects at
least $\alpha^{4}|G|^{3}$ additive quadruples.∎

Finally, we make use of Green’s $\mathsf{U}^{2}$-arithmetic regularity lemma.

######  Lemma 6.3 (Theorem 2.1 [13]).

Given a set $A\subseteq G$ and a parameter $\varepsilon>0$, there exists a
decomposition $G=K\oplus T$, where $\dim T\leq W(O(\varepsilon^{-3}))$, where
$W(t)$ is a tower of twos of height $t$, such that for all but at most
$\varepsilon|T|$ of $t\in T$, we have

$\max_{k\notin
K^{\perp}}\Big{|}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x\in K}\mathbbm{1}_{A}(x+t)\omega^{-k\cdot
x}\Big{|}\leq\varepsilon.$ (30)

If condition (30) holds, we say that $t$ is _$\varepsilon$ -regular_.

We are now ready to prove Proposition 1.7.

###### Proof of Proposition 1.7.

By assumptions, we have a set $\mathcal{G}$ of quadruples $(x,a,b,c)\in G^{4}$
of size at least $c_{0}|G|^{4}$ such that
$\Delta_{a}\Delta_{b}\Delta_{c}F(x)=0$ and all 8 arguments of $F$ belong to
$A$.
In the first step of the proof, we need to pass to a sufficiently regular
subset of $A$. Let $\eta>0$ be a parameter to be specified later. Apply Lemma
6.3 to find a decomposition $G=K\oplus T$, with $\dim T\leq W(O(\eta^{-3}))$,
such that $t$ is $\eta$-regular for all but at most $\eta|T|$ of elements
$t\in T$. Let $T_{\text{reg}}$ be the set of $\eta$-regular elements $t\in T$.
Then, using decomposition $G=K\oplus T$, we have

$\displaystyle c_{0}\leq$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x,a,b,c\in
G}\mathbbm{1}_{A}(x)\mathbbm{1}_{A}(x+a)\dots\mathbbm{1}_{A}(x+a+b+c)\mathbbm{1}(\Delta_{a,b,c}F(x)=0)$
$\displaystyle\hskip
28.45274pt=\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x^{\prime},a^{\prime},b^{\prime},c^{\prime}\in
K}\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x^{\prime\prime},a^{\prime\prime},b^{\prime\prime},c^{\prime\prime}\in
T}\mathbbm{1}_{A}(x^{\prime}+x^{\prime\prime})\mathbbm{1}_{A}(x^{\prime}+x^{\prime\prime}+a^{\prime}+a^{\prime\prime})\dots$
$\displaystyle\hskip
113.81102pt\mathbbm{1}_{A}(x^{\prime}+x^{\prime\prime}+a^{\prime}+a^{\prime\prime}+b^{\prime}+b^{\prime\prime}+c^{\prime}+c^{\prime\prime})\mathbbm{1}(\Delta_{a^{\prime}+a^{\prime\prime},b^{\prime}+b^{\prime\prime},c^{\prime}+c^{\prime\prime}}F(x^{\prime}+x^{\prime\prime})=0).$

On the other hand, the fact that $|T\setminus T_{\text{reg}}|\leq\eta|T|$
implies

$\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}x^{\prime},a^{\prime},b^{\prime},c^{\prime}\in
K\\\ x^{\prime\prime},a^{\prime\prime},b^{\prime\prime},c^{\prime\prime}\in
T\end{subarray}}\mathbbm{1}_{T\setminus
T_{\text{reg}}}(x^{\prime\prime})\mathbbm{1}_{A}(x^{\prime}+x^{\prime\prime})\mathbbm{1}_{A}(x^{\prime}+x^{\prime\prime}+a^{\prime}+a^{\prime\prime})\dots\mathbbm{1}_{A}(x^{\prime}+x^{\prime\prime}+a^{\prime}+a^{\prime\prime}+b^{\prime}+b^{\prime\prime}+c^{\prime}+c^{\prime\prime})\leq\eta,$

as well as similar inequalities with any element among
$x^{\prime\prime}+a^{\prime\prime},x^{\prime\prime}+b^{\prime\prime},\dots,x^{\prime\prime}+a^{\prime\prime}+b^{\prime\prime}+c^{\prime\prime}$
instead of $x^{\prime\prime}$ as the argument of $\mathbbm{1}_{T\setminus
T_{\text{reg}}}$. It follows that, if we choose $\eta\leq c_{0}/16$,

$\displaystyle c_{0}/2\leq$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{\begin{subarray}{c}x^{\prime},a^{\prime},b^{\prime},c^{\prime}\in
K\\\ x^{\prime\prime},a^{\prime\prime},b^{\prime\prime},c^{\prime\prime}\in
T\end{subarray}}\mathbbm{1}_{T_{\text{reg}}}(x^{\prime\prime})\dots\mathbbm{1}_{T_{\text{reg}}}(x^{\prime\prime}+a^{\prime\prime}+b^{\prime\prime}+c^{\prime\prime})\mathbbm{1}_{A}(x^{\prime}+x^{\prime\prime})\mathbbm{1}_{A}(x^{\prime}+x^{\prime\prime}+a^{\prime}+a^{\prime\prime})\dots$
$\displaystyle\hskip
113.81102pt\mathbbm{1}_{A}(x^{\prime}+x^{\prime\prime}+a^{\prime}+a^{\prime\prime}+b^{\prime}+b^{\prime\prime}+c^{\prime}+c^{\prime\prime})\mathbbm{1}(\Delta_{a^{\prime}+a^{\prime\prime},b^{\prime}+b^{\prime\prime},c^{\prime}+c^{\prime\prime}}F(x^{\prime}+x^{\prime\prime})=0).$

Thus, by averaging, we may find
$x^{\prime\prime},a^{\prime\prime},b^{\prime\prime},c^{\prime\prime}\in T$
such that all 8 elements $x^{\prime\prime},$
$x^{\prime\prime}+a^{\prime\prime},$
$x^{\prime\prime}+b^{\prime\prime},\dots,$
$x^{\prime\prime}+a^{\prime\prime}+b^{\prime\prime}+c^{\prime\prime}+T$ are
$\eta$-regular and

$\displaystyle c_{0}/2\leq$
$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits_{x^{\prime},a^{\prime},b^{\prime},c^{\prime}\in
K}\mathbbm{1}_{A}(x^{\prime}+x^{\prime\prime})\mathbbm{1}_{A}(x^{\prime}+x^{\prime\prime}+a^{\prime}+a^{\prime\prime})\dots$
$\displaystyle\hskip
113.81102pt\mathbbm{1}_{A}(x^{\prime}+x^{\prime\prime}+a^{\prime}+a^{\prime\prime}+b^{\prime}+b^{\prime\prime}+c^{\prime}+c^{\prime\prime})\mathbbm{1}(\Delta_{a^{\prime}+a^{\prime\prime},b^{\prime}+b^{\prime\prime},c^{\prime}+c^{\prime\prime}}F(x^{\prime}+x^{\prime\prime})=0).$

A Cauchy-Schwarz inequlity based argument like that in Lemma 6.2 allows us to
pass to a subset of a single coset $A\cap(x^{\prime\prime}+K)$ on which $F$
respects at least $\frac{c_{0}^{8}}{2^{8}}|K|^{4}$ additive cubes, with
$x^{\prime\prime}\in T_{\text{reg}}$. Thus, writing
$c_{1}=\frac{c_{0}^{8}}{2^{8}}$ and misusing the notation and writing $A$
instead of $(A-x^{\prime\prime})\cap K$, and $G$ instead of $K$, we may assume
that $|\widehat{\mathbbm{1}_{A}}(r)|\leq\eta$ for all $r\in
G\setminus\\{0\\}$. Let $c_{2}$ be the density of $A$, hence $c_{2}\geq
c_{1}$. We also have that $F$ respects at most $\varepsilon^{\prime}|G|^{3}$
additive quadruples in $A$, where $\varepsilon^{\prime}=\varepsilon p^{3\dim
T}$. In particular, the number of additive quadruples in $A$ is then

$\sum_{x,a,b\in
G}\mathbbm{1}_{A}(x)\mathbbm{1}_{A}(x+a)\mathbbm{1}_{A}(x+b)\mathbbm{1}_{A}(x+a+b)=|G|^{3}\sum_{r\in
G}|\widehat{\mathbbm{1}_{A}}(r)|^{4}\leq(c_{2}^{4}+\eta^{2})|G|^{3}.$

Let $U$ be a random subspace of $H$ of codimension $d$. Let $V=\\{x\in A\colon
F(x)\in U\\}$. Let $X$ be the number of additive quadruples in $V$, and $Y$
the number of quadruples $(x,a,b,c)\in\mathcal{G}$ such that 8 points
$F(x),F(x+a),\dots,F(x+a+b+c)$ belong to $U$.
We use the second moment method to prove the theorem. We use Lemma 6.1
frequently below, without additional comments. Firstly, note that

$\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}}\displaylimits|V|=\sum_{x\in
A}\mathbb{P}(F(x)\in U)\geq(p^{-d}-4p^{1+d-n})|A|,$

and

$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}}\displaylimits|V|^{2}=\sum_{x,y\in A}\mathbb{P}(F(x),F(y)\in
U)\leq$ $\displaystyle p^{-2d}\sum_{x,y\in
A}\mathbbm{1}(\operatorname{rank}\\{F(x),F(y)\\}=2)+\sum_{x,y\in
A}\mathbbm{1}(\operatorname{rank}\\{F(x),F(y)\\}\leq 1).$

Note that the number of $x\in A$ such that $F(x)=0$ is at most
$\sqrt[4]{\varepsilon^{\prime}}|G|$, as otherwise we get more than
$\varepsilon^{\prime}|G|^{3}$ additive quadruples in $A$ that are respected by
$F$. Furthermore, for each $\lambda,\mu\not=0$ we get at most
$\sqrt[4]{\varepsilon^{\prime}}|G|^{2}$ pairs $(x,y)\in A^{2}$ such that
$\lambda F(x)+\mu F(y)=0$, by Lemma 6.2 (after a change of variables $y=x+a$),
again as $F$ respects few additive quadruples in $A$. Thus

$\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}}\displaylimits|V|^{2}\leq
p^{-2d}|A|^{2}+(p^{2}+2)\sqrt[4]{\varepsilon^{\prime}}|G|^{2}.$

By Chebyshev’s inequality we have

$\mathbb{P}\Big{(}\Big{|}|V|-p^{-d}|A|\Big{|}\leq\sqrt{\eta}|G|\Big{)}\geq
1-\Big{(}2c_{2}^{2}\eta^{-1}p^{2}\sqrt[4]{\varepsilon^{\prime}}+4\eta^{-1}p^{1+d-n}\Big{)}.$
(31)

Thus, this probability is at least $0.999$ if $\varepsilon^{\prime}$ is
sufficiently small in terms of other parameters.

Next, consider random variable $X$. We have

$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}}\displaylimits
X=$ $\displaystyle\sum_{x,a,b\in
G}\mathbbm{1}_{A}(x)\mathbbm{1}_{A}(x+a)\mathbbm{1}_{A}(x+b)\mathbbm{1}_{A}(x+a+b)\mathbb{P}(F(x),F(x+a),F(x+b),F(x+a+b)\in
U)$ $\displaystyle\geq$
$\displaystyle\Big{(}p^{-4d}-p^{4+d-n}\Big{)}\sum_{x,a,b\in
G}\mathbbm{1}_{A}(x)\mathbbm{1}_{A}(x+a)\mathbbm{1}_{A}(x+b)\mathbbm{1}_{A}(x+a+b)$
$\displaystyle\geq$
$\displaystyle\Big{(}p^{-4d}-p^{4+d-n}\Big{)}c_{2}^{4}|G|^{3}.$

Next, we have

$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}}\displaylimits
X^{2}=$ $\displaystyle\sum_{\begin{subarray}{c}x,a,b\in G\\\
x^{\prime},a^{\prime},b^{\prime}\in
G\end{subarray}}\mathbbm{1}_{A}(x)\mathbbm{1}_{A}(x+a)\mathbbm{1}_{A}(x+b)\mathbbm{1}_{A}(x+a+b)\mathbb{P}(F(x),F(x+a),F(x+b),F(x+a+b)\in
U)$ $\displaystyle\hskip
28.45274pt\mathbbm{1}_{A}(x^{\prime})\mathbbm{1}_{A}(x^{\prime}+a^{\prime})\mathbbm{1}_{A}(x^{\prime}+b^{\prime})\mathbbm{1}_{A}(x^{\prime}+a^{\prime}+b^{\prime})\mathbb{P}(F(x^{\prime}),F(x^{\prime}+a^{\prime}),F(x^{\prime}+b^{\prime}),F(x^{\prime}+a^{\prime}+b^{\prime})\in
U)$ $\displaystyle\leq$ $\displaystyle p^{-8d}\Big{(}\sum_{x,a,b\in
G}\mathbbm{1}_{A}(x)\mathbbm{1}_{A}(x+a)\mathbbm{1}_{A}(x+b)\mathbbm{1}_{A}(x+a+b)\Big{)}^{2}$
$\displaystyle\hskip 28.45274pt+\sum_{\begin{subarray}{c}x,a,b\in G\\\
x^{\prime},a^{\prime},b^{\prime}\in
G\end{subarray}}\mathbbm{1}_{A}(x)\dots\mathbbm{1}_{A}(x^{\prime}+a^{\prime}+b^{\prime})\mathbbm{1}\Big{(}\operatorname{rank}\\{F(x),\dots,F(x^{\prime}+a^{\prime}+b^{\prime})\\}\leq
7\Big{)}$ $\displaystyle\leq$ $\displaystyle
p^{-8d}(c_{2}^{4}+\eta^{2})^{2}|G|^{6}+p^{8}\sqrt[4]{\varepsilon^{\prime}}|G|^{6},$

again using Lemma 6.2 in the last line. By Chebyshev’s inequality we have

$\mathbb{P}\Big{(}\Big{|}X-p^{-4d}c_{2}^{4}|G|^{3}\Big{|}\leq\sqrt{\eta}|G|^{3}\Big{)}\geq
1-\Big{(}3\eta+p^{8}\sqrt[4]{\varepsilon^{\prime}}+p^{4+d-n}\Big{)},$ (32)

which is at least $0.999$, again provided $\varepsilon^{\prime}$ is
sufficiently small in terms of other parameters.

Finally, we consider random variable $Y$. Recall that if
$(x,a,b,c)\in\mathcal{G}$, then $\Delta_{a,b,c}F(x)=0$ (and all 8 points that
are arguments of $F$ belong to $A$). Then 8 values $F(x),\dots,F(x+a+b+c)$
belong to $U$ if and only if any 7 of them belong to $U$. Hence

$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}}\displaylimits
Y=\sum_{(x,a,b,c)\in\mathcal{G}}\mathbb{P}(F(x+a),F(x+b),\dots,F(x+a+b+c)\in
U)\geq\Big{(}p^{-7d}-4p^{7+d-n}\Big{)}|\mathcal{G}|.$

On the other hand,

$\displaystyle\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}}\displaylimits
Y^{2}=$
$\displaystyle\sum_{(x,a,b,c),(x^{\prime},a^{\prime},b^{\prime},c^{\prime})\in\mathcal{G}}\mathbb{P}(F(x+a),\dots,F(x+a+b+c),F(x^{\prime}+a^{\prime}),\dots,F(x^{\prime}+a^{\prime}+b^{\prime}+c^{\prime})\in
U)$ $\displaystyle\leq$ $\displaystyle
p^{-14d}|\mathcal{G}|^{2}+\sum_{x,a,b,c,x^{\prime},a^{\prime},b^{\prime},c^{\prime}\in
G}\mathbbm{1}\Big{(}\operatorname{rank}\\{F(x+a),\dots,F(x^{\prime}+a^{\prime}+b^{\prime}+c^{\prime})\\}\leq
13\Big{)}.$

Finally, for each non-trivial linear combination

$\lambda_{1}F(x+a)+\lambda_{2}F(x+b)+\dots+\lambda_{14}F(x^{\prime}+a^{\prime}+b^{\prime}+c^{\prime})$

we claim that there are at most $\sqrt[4]{\varepsilon^{\prime}}|G|^{8}$
choices of $(x,x^{\prime},\dots,c,c^{\prime})\in G^{8}$ such that it vanishes.
Make a change of variables $x\mapsto x-a-b-c$ and $x^{\prime}\mapsto
x^{\prime}-a^{\prime}-b^{\prime}-c^{\prime}$. Then the claim follows from
Lemma 6.2 if any of
$\lambda_{1},\lambda_{2},\lambda_{3},\lambda_{8},\lambda_{9},\lambda_{10}$ is
non-zero, using adequate two variables among
$a,b,c,a^{\prime},b^{\prime},c^{\prime}$. For the remaining 8 coefficients, we
use $x$ or $x^{\prime}$ and possibly one more variable. Thus,

$\mathop{\mathchoice{\vbox{\hbox{$\mathbb{E}$}}}{\kern 0.0pt\mathbb{E}}{\kern
0.0pt\mathbb{E}}{\kern 0.0pt\mathbb{E}}}\displaylimits Y^{2}\leq
p^{-14d}|\mathcal{G}|^{2}+p^{14}\sqrt[4]{\varepsilon^{\prime}}|G|^{8}.$

Using Chebyshev’s inequality one more time, we obtain

$\mathbb{P}\Big{(}\Big{|}Y-p^{-7d}|\mathcal{G}|\Big{|}\leq\sqrt{\eta}|G|^{4}\Big{)}\geq
1-\Big{(}p^{14}\sqrt[4]{\varepsilon^{\prime}}+4p^{7+d-n}\Big{)},$ (33)

which is at least 0.999, provided $\varepsilon^{\prime}$ is sufficiently
small.
To obtain desired bounds, we set $\eta=10^{-24}\xi^{8}c_{0}^{8}p^{-2d}$ and
$\varepsilon=W(K\eta^{-3})$ for a sufficiently large absolute constant $K$. To
sum everything up, combining (31), (32) and (33) we see that with probability
at least 0.99, we have

$\Big{|}|V|-p^{-d}|A|\Big{|}\leq\sqrt{\eta}|G|,\,\,\Big{|}X-p^{-4d}c_{2}^{4}|G|^{3}\Big{|}\leq\sqrt{\eta}|G|^{3},\text{
and }\Big{|}Y-p^{-7d}|\mathcal{G}|\Big{|}\leq\sqrt{\eta}|G|^{4}.$

For such a choice of $V$, we see that $V$ has density
$\delta\in[2^{-9}c_{0}^{8}p^{-d},2p^{-d}]$,
$\|\mathbbm{1}_{V}-\delta\|_{\mathsf{U}^{2}}\leq 100\eta^{1/8}\leq\xi$ and the
number of additive cubes in $V$ is at least
$p^{-7d}|\mathcal{G}|-\sqrt{\eta}|G|^{4}\geq p^{-7d}c_{0}^{8}2^{-9}|G|^{4}$.
On the other hand, since $\|\mathbbm{1}_{V}-\delta\|_{\mathsf{U}^{2}}\leq
100\eta^{1/8}$, Lemma 3.2 implies that the number of 7-tuples of the form
$(x+a,x+b,\dots,x+a+b+c)$ in $V$ is at most $2\delta^{7}|G|^{4}$. Hence, $V$
is a $(c^{\prime},\delta,\xi)$-approximate quadratic variety for some
$c^{\prime}\in[c_{0}^{8}2^{-9},2]$, as claimed.∎

## References

  * [1] K. Adiprasito, D. Kazhdan and T. Ziegler, _On the Schmidt and analytic ranks for trilinear forms_ , arXiv preprint (2021), `arXiv:2102.03659`.
  * [2] O. Antolín Camarena and B. Szegedy, _Nilspaces, nilmanifolds and their morphisms_ , arXiv preprint (2010), `http://arxiv.org/abs/1009.3825`.
  * [3] A. Balog and E. Szemerédi, _A statistical theorem of set addition_ , Combinatorica 14 (1994), 263–268.
  * [4] V. Bergelson, T. Tao and T. Ziegler, _An inverse theorem for the uniformity seminorms associated with the action of $\mathbb{F}_{p}^{\infty}$_, Geom. Funct. Anal. 19 (2010), 1539–1596.
  * [5] A. Bhowmick and S. Lovett, _Bias vs structure of polynomials in large fields, and applications in effective algebraic geometry and coding theory_ , IEEE Trans. Inform. Theory 69 (2022), 963–977.
  * [6] A. Cohen and G. Moshkovitz, _Structure vs. randomness for bilinear maps_ , Discrete Anal., 2022:12, 21 pp.
  * [7] G.A. Freiman, Foundations of a structural theory of set addition, American Mathematical Society, Providence, R. I., 1973. Translated from Russian, Translations of Mathematical Monographs, Vol 37.
  * [8] W.T. Gowers, _A new proof of Szemerédi’s theorem for progressions of length four_ , Geom. Funct. Anal. 8 (1998), no. 3, 529–551.
  * [9] W.T. Gowers, _A new proof of Szemerédi’s theorem_ , Geom. Funct. Anal. 11 (2001), 465–588.
  * [10] W.T. Gowers and L. Milićević, _A quantitative inverse theorem for the $U^{4}$ norm over finite fields_, arXiv preprint (2017), `arXiv:1712.00241`.
  * [11] W.T. Gowers and L. Milićević, _An inverse theorem for Freiman multi-homomorphisms_ , arXiv preprint (2020), `arXiv:2002.11667`.
  * [12] W.T. Gowers and J. Wolf, _The true complexity of a system of linear equations_ , Proc. Lond. Math. Soc. (3), 100 (2010), no. 1, 155–176.
  * [13] B. Green, _A Szemerédi-type regularity lemma in abelian groups, with applications_ , Geom. Funct. Anal. 15 (2005), 340–376.
  * [14] B.J. Green and T. Tao, _An inverse theorem for the Gowers $\mathsf{U}^{3}$-norm_, Proc. Edin. Math. Soc. (2) 51 (2008), 73–153.
  * [15] B. Green and T. Tao, _The distribution of polynomials over finite fields, with applications to the Gowers norms_ , Contrib. Discrete Math. 4 (2009), no. 2, 1–36.
  * [16] B. Green and T. Tao, _An arithmetic regularity lemma, an associated counting lemma, and applications_ , in _An Irregular Mind: Szemerédi is 70_ (pp. 261–334). Berlin, Heidelberg: Springer Berlin Heidelberg.
  * [17] B.J. Green, T. Tao and T. Ziegler, _An inverse theorem for the Gowers $\mathsf{U}^{s+1}[N]$-norm_, Ann. of Math. (2) 176 (2012), no. 2, 1231–1372.
  * [18] D. Kazhdan and T. Ziegler, _Approximate cohomology_ , Selecta Math. 24 (2018), 499–509.
  * [19] D. Kim, A. Li and J. Tidor, _Cubic Goldreich-Levin_ , in _Proceedings of the 2023 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA)_ (pp. 4846-4892). Society for Industrial and Applied Mathematics.
  * [20] F. Manners, _Quantitative bounds in the inverse theorem for the Gowers $\mathsf{U}^{s+1}$-norms over cyclic groups_, arXiv preprint (2018), `arXiv:1811.00718`.
  * [21] L. Milićević, _Quantitative inverse theorem for Gowers uniformity norms $\mathsf{U}^{5}$ and $\mathsf{U}^{6}$ in $\mathbb{F}_{2}^{n}$_, Canad. J. Math., _to appear_.
  * [22] I.Z. Ruzsa, _An analog of Freiman’s theorem in groups_ , Structure theory of set addition, Astérisque 258 (1999), 323–326.
  * [23] T. Sanders, _On the Bogolyubov-Ruzsa lemma_ , Anal. PDE 5 (2012), no. 3, 627–655.
  * [24] T. Schoen and O. Sisask, _Roth’s theorem for four variables and additive structures in sums of sparse sets_ , Forum Math. Sigma 4 (2016), e5, 28pp.
  * [25] T. Tao and T. Ziegler, _The inverse conjecture for the Gowers norm over finite fields in low characteristic_ , Ann. Comb. 16 (2012), 121–188.