v_{p_{1}}(|a-b|/b)=v_{p_{1}}((a+b)/b)=0,$ $\displaystyle
v_{p_{2}}(|a-b|/b)\neq 0,$ $\displaystyle
v_{p_{2}}(a/b)=v_{p_{2}}((a+b)/b)=0.$

Moreover, we have $m:=|v_{2}((a+b)/b)|\geq 2$.

In this case, we define
$\phi:G_{L}\to\mathbb{Z}_{2m}\times\mathbb{Z}_{2}\times\mathbb{Z}_{2}$ by

$\phi(r)=(mv_{p_{1}}(r)+\text{Mod}(v_{2}(r),m),\left\lfloor\frac{v_{p_{2}}(r)}{v_{p_{2}}(|a-b|/b)}\right\rfloor,\left\lfloor\frac{v_{2}(r)}{m}\right\rfloor),$

so that $\phi$ meets the condition in Proposition 5.27.

E.g., when $a=7$ and $b=1$, we define

$\phi(r)=(3v_{7}(r)+\text{Mod}(v_{2}(r),3),v_{3}(r),\left\lfloor
v_{2}(r)/3\right\rfloor).$

  * •

There exist odd primes $p_{1},p_{3}$ such that

$\displaystyle v_{p_{1}}(a/b)\neq 0,$ $\displaystyle
v_{p_{1}}(|a-b|/b)=v_{p_{1}}((a+b)/b)=0,$ $\displaystyle
v_{p_{3}}((a+b)/b)\neq 0,$ $\displaystyle
v_{p_{1}}(a/b)=v_{p_{2}}(|a-b|/b)=0.$

Moreover, we have $m:=|v_{2}(|a-b|/b)|\geq 2$.

In this case, we define
$\phi:G_{L}\to\mathbb{Z}_{2m}\times\mathbb{Z}_{2}\times\mathbb{Z}_{2}$ by

$\phi(r)=(mv_{p_{1}}(r)+\text{Mod}(v_{2}(r),m),\left\lfloor\frac{v_{2}(r)}{m}\right\rfloor,\left\lfloor\frac{v_{p_{3}}(r)}{v_{p_{3}}((a+b)/b)}\right\rfloor),$

so that $\phi$ meets the condition in Proposition 5.27.

E.g., when $a=5$ and $b=1$, we define

$\phi(r)=(2v_{5}(r)+\text{Mod}(v_{2}(r),2),\left\lfloor
v_{2}(r)/2\right\rfloor,v_{3}(r)).$

  * •

$|a-b|=2$ and $a+b=2^{m}$, with $m\geq 3$. Moreover, there exist odd primes
$p_{1},p_{2}$ such that

$\displaystyle v_{p_{1}}(a)\neq 0,$ $\displaystyle v_{p_{1}}(b)=0,$
$\displaystyle v_{p_{2}}(b)\neq 0,$ $\displaystyle v_{p_{2}}(a)=0.$

In this case, we define
$\psi:G_{L}\to\mathbb{Z}_{2m-2}\times\mathbb{Z}_{2}\times\mathbb{Z}_{2}$ by

$\displaystyle\psi(r)=(u(r)(m-1)+\text{Mod}(w(r)+u(r),m-1),\,\left\lfloor\frac{v_{p_{2}}(r)}{v_{p_{2}}(b)}\right\rfloor-u(r),\,\left\lfloor\frac{w(r)+u(r)}{m-1}\right\rfloor)$

where

$u(r)=\left\lfloor\frac{v_{p_{1}}(r)}{v_{p_{1}}(a)}\right\rfloor,\quad
w(r)=v_{2}(r)-\left\lfloor\frac{v_{p_{2}}(r)}{v_{p_{2}}(b)}\right\rfloor.$

Then, we take $\phi(r)=(\psi(r)_{1},\psi(r)_{2}-\psi(r)_{3},\psi(r)_{3})$.

E.g., when $a=5$ and $b=3$, we define

$\psi(r)=(2v_{5}(r)+\text{Mod}(v_{2}(r)+v_{5}(r)-v_{3}(r),2),\,v_{3}(r)-v_{5}(r),\,\left\lfloor\frac{v_{2}(r)+v_{5}(r)-v_{3}(r)}{2}\right\rfloor).$

∎

Finally, for the five specific linear systems not covered by Lemma 5.29, we
will show in Section 5.7 that

$\begin{pmatrix}1&1&-1&-1&0\\\ 2&-2&1&0&-1\end{pmatrix}$

is common, and show in the following two lemmas that two of the other four are
uncommon (via simple periodic constructions). This finishes the proof of
Theorem 1.10 under Case C.

######  Lemma 5.30.

The $2\times 5$ linear system

$\begin{pmatrix}1&1&-1&-1&0\\\ 3&-3&1&0&-1\end{pmatrix}$

is uncommon over $\mathbb{F}_{p}$ for sufficiently large $p$.

###### Proof.

We have

$\displaystyle L_{5}\mathbf{x}$
$\displaystyle=x_{1}+x_{2}-x_{3}-x_{4}\qquad\qquad$ $\displaystyle
A_{5}=\\{\\!\\!\\{1,1,-1,-1\\}\\!\\!\\}$ $\displaystyle L_{4}\mathbf{x}$
$\displaystyle=3x_{1}-3x_{2}+x_{3}-x_{5}$ $\displaystyle
A_{4}=\\{\\!\\!\\{3,-3,1,-1\\}\\!\\!\\}$ $\displaystyle L_{3}\mathbf{x}$
$\displaystyle=4x_{1}-2x_{2}-x_{4}-x_{5}$ $\displaystyle
A_{3}=\\{\\!\\!\\{4,-2,-1,-1\\}\\!\\!\\}$ $\displaystyle L_{2}\mathbf{x}$
$\displaystyle=6x_{1}-2x_{3}-3x_{4}-1x_{5}$ $\displaystyle
A_{2}=\\{\\!\\!\\{6,-2,-3,-1\\}\\!\\!\\}$ $\displaystyle L_{1}\mathbf{x}$
$\displaystyle=6x_{2}-4x_{3}-3x_{4}+1x_{5}$ $\displaystyle
A_{1}=\\{\\!\\!\\{6,-4,-3,1\\}\\!\\!\\}$

which gives $P_{L}=\\{2,3\\}$ and
$G_{L}=\\{2^{d_{1}}3^{d_{2}}:d_{1},d_{2}\in\\{0,1,\dots\\}\\}$. Define $h:\pm
G_{L}\to\mathbb{C}$ by

$\begin{cases}h(r)=\phi(v_{2}(r),v_{3}(r))&r\in G_{L}\\\
h(r)=\overline{\phi(v_{2}(r),v_{3}(r))}&r\in-G_{L}\end{cases}$

where $\phi:\mathbb{Z}_{2}\times\mathbb{Z}_{4}\to\mathbb{C}$ is given by

$\begin{matrix}[l]&\phi(0,0)=1&\phi(0,1)=0&\phi(0,2)=0.25i&\phi(0,3)=0.5i\\\
&\phi(1,0)=-1&\phi(1,1)=0&\phi(1,2)=-0.25i&\phi(1,3)=-0.5i.\\\ \end{matrix}$

One can then check that

$\text{Re}\sum_{\begin{subarray}{c}0\leq d_{1}\leq 1\\\ 0\leq d_{2}\leq
3\end{subarray}}\sum_{i=1}^{5}h_{A_{i}}(2^{d_{1}}3^{d_{2}})=-0.265625<0.$

The result follows by Lemma 5.14. ∎

######  Lemma 5.31.

The $2\times 5$ linear system

$\begin{pmatrix}1&1&-1&-1&0\\\ 3&-3&2&0&-2\end{pmatrix}$

is uncommon over $\mathbb{F}_{p}$ for sufficiently large $p$.

###### Proof.

We have

$\displaystyle L_{5}\mathbf{x}$
$\displaystyle=x_{1}+x_{2}-x_{3}-x_{4}\qquad\qquad$ $\displaystyle
A_{5}=\\{\\!\\!\\{1,1,-1,-1\\}\\!\\!\\}$ $\displaystyle L_{4}\mathbf{x}$
$\displaystyle=3x_{1}-3x_{2}+2x_{3}-2x_{5}$ $\displaystyle
A_{4}=\\{\\!\\!\\{3,-3,2,-2\\}\\!\\!\\}$ $\displaystyle L_{3}\mathbf{x}$
$\displaystyle=5x_{1}-x_{2}-2x_{4}-2x_{5}$ $\displaystyle
A_{3}=\\{\\!\\!\\{5,-1,-2,-2\\}\\!\\!\\}$ $\displaystyle L_{2}\mathbf{x}$
$\displaystyle=6x_{1}-x_{3}-3x_{4}-2x_{5}$ $\displaystyle
A_{2}=\\{\\!\\!\\{6,-1,-3,-2\\}\\!\\!\\}$ $\displaystyle L_{1}\mathbf{x}$
$\displaystyle=6x_{2}-5x_{3}-3x_{4}+2x_{5}$ $\displaystyle
A_{1}=\\{\\!\\!\\{6,-5,-3,2\\}\\!\\!\\}$

which gives $P_{L}=\\{2,3,5\\}$ and
$G_{L}=\\{2^{d_{1}}3^{d_{2}}5^{d_{3}}:d_{1},d_{2},d_{3}\in\\{0,1,\dots\\}\\}$.
Define $h:\pm G_{L}\to\mathbb{C}$ by

$\begin{cases}h(r)=\phi(v_{5}(r),v_{3}(r))&r\in G_{L}\\\
h(r)=\overline{\phi(v_{5}(r),v_{3}(r))}&r\in-G_{L}\end{cases}$

where $\phi:\mathbb{Z}_{2}\times\mathbb{Z}_{4}\to\mathbb{C}$ is given by

$\begin{matrix}[l]&\phi(0,0)=1&\phi(0,1)=0&\phi(0,2)=0.25i&\phi(0,3)=0.5i\\\
&\phi(1,0)=-1&\phi(1,1)=0&\phi(1,2)=-0.25i&\phi(1,3)=-0.5i.\\\ \end{matrix}$

One can then check that

$\text{Re}\sum_{\begin{subarray}{c}0\leq d_{1}\leq 1\\\ 0\leq d_{2}\leq
3\end{subarray}}\sum_{i=1}^{5}h_{A_{i}}(2^{d_{1}}3^{d_{2}})=-0.265625<0.$

The result follows by Lemma 5.14. ∎

###  5.5. Proof of Theorem 1.10 under Case D

In this section, we prove Theorem 1.10 under Case D listed in Corollary 5.3.
We show that $L$ is common if and only if it is isomorphic to

$\begin{pmatrix}1&-1&1&-1&0\\\ 1&2&-1&0&-2\end{pmatrix}\text{ or
}\begin{pmatrix}1&-1&1&-1&0\\\ 0&1&2&-1&-2\end{pmatrix}.$

Without loss of generality, suppose

$\displaystyle L_{5}=x_{1}-x_{2}+\alpha x_{3}-\alpha x_{4}$ $\displaystyle
L_{4}=x_{1}+\beta x_{2}-x_{3}-\beta x_{5}$ $\displaystyle
L_{3}=(\alpha+1)x_{1}+(\alpha\beta-1)x_{2}-\alpha x_{4}-\alpha\beta x_{5}$
$\displaystyle L_{2}=(\beta+1)x_{1}+(\alpha\beta-1)x_{3}-\alpha\beta
x_{4}-\beta x_{5}$ $\displaystyle L_{1}=(\beta+1)x_{2}+(-1-\alpha)x_{3}+\alpha
x_{4}-\beta x_{5}$

with $\alpha,\beta\in\mathbb{Q}$ and $\alpha,\beta>0$, and at least one of
$L_{1},L_{2},L_{3}$ is common. Some elementary calculations (which we defer to
Section B.3) show that we can reduce to the following system:

$\displaystyle L_{5}=x_{1}-x_{2}+\alpha x_{3}-\alpha x_{4}$ $\displaystyle
L_{4}=x_{1}+\alpha x_{2}-x_{3}-\alpha x_{5}$ $\displaystyle
L_{3}=(\alpha+1)x_{1}+(\alpha^{2}-1)x_{2}-\alpha x_{4}-\alpha^{2}x_{5}$
$\displaystyle
L_{2}=(\alpha+1)x_{1}+(\alpha^{2}-1)x_{3}-\alpha^{2}x_{4}-\alpha x_{5}$
$\displaystyle L_{1}=(\alpha+1)x_{2}+(-1-\alpha)x_{3}+\alpha x_{4}-\alpha
x_{5}$ (5)

In this case, first observe that $L_{2}$ and $L_{3}$ are uncommon, as none of
$\alpha=\alpha+1$ or $\alpha=\alpha^{2}-1$ has rational solutions. Next,
observe that $\alpha\notin\\{-1,1\\}$, as either $\alpha=1$ or $\alpha=-1$
would give $s(L)<4$. This implies that $L_{4}$ and $L_{5}$ cannot be additive
quadruples.

Suppose $L_{1}$ is an additive quadruple, i.e, $\alpha=-1/2$. In this case,
$L$ is isomorphic to

$\begin{pmatrix}1&-1&1&-1&0\\\ 1&2&-1&0&-2\end{pmatrix}$

which is common (see Section 5.7 for proof of its commonness).

Suppose none of $L_{1},L_{4},L_{5}$ is an additive quadruple. Then the main
idea is to utilize the constructions in Section 5.2, where we set the value of
the Fourier template to be large on some well-chosen values. Recall that Lemma
5.9 and Lemma 5.10 give a criterion for when such a construction works.
Applying this criterion, it follows that $L$ is common only if we can
partition $\\{\\!\\!\\{\alpha+1,\alpha^{2}-1,-\alpha,-\alpha^{2}\\}\\!\\!\\}$
into two pairs, such that the ratio between the two numbers in each pair lies
in $\\{\alpha,-\alpha,\frac{\alpha}{1+\alpha},-\frac{\alpha}{1+\alpha}\\}$. By
a finite case check, the only $\alpha\in\mathbb{Q}\setminus\\{-1,0,1\\}$ with
this property is $\alpha=1/2$ 111Verifying this by hand is straightforward.
Alternatively, readers can find a Mathematica code checking this at
‘case-d.nb’ in the supplemental file.. When $\alpha=1/2$, $L$ is isomorphic to

$\begin{pmatrix}1&0&-1&2&-2\\\ 0&1&2&-1&-2\end{pmatrix}$

which is common (see Section 5.7 for proof of its commonness).

###  5.6. Proof of Theorem 1.10 for $s(L)<4$

In this section, we prove Theorem 1.10 for $s(L)<4$.

Suppose $L$ is an irredundant $2\times 5$ linear system with $s(L)<4$. We show
that $L$ is common over all $\mathbb{F}_{p}$ if and only if it is isomorphic
to a linear system of the form

$\displaystyle\begin{pmatrix}a&b&0&0&c\\\ 0&0&a&b&c\end{pmatrix}$ (6)
$\displaystyle\text{ or }\begin{pmatrix}1&-1&\lambda&-\lambda&0\\\
a&b&0&0&-a-b\end{pmatrix},\quad\text{$\\{|a/b|,|a/(a+b)|,|b/(a+b)|\\}\cap\\{|\lambda|,|\lambda|^{-1}\\}\neq\emptyset$.}$
(7)

First, we recall the following lemma from [16].

######  Lemma 5.32 ([16, Theorem 1.3]).

Let $L$ be an irredundant $2\times 5$ linear system with $s(L)$ even. If every
$1\times s(L)$ subsystem of $L$ (i.e., every length-$s(L)$ equation that is a
subsystem of $L$) is uncommon over $\mathbb{F}_{p}$, then $L$ is uncommon over
$\mathbb{F}_{p}$.

Applying Lemma 5.32, we first handle a few simple cases.

If $s(L)=2$, then since $L$ is irredundant (i.e., not having subsystems of the
form $x_{i}=x_{j}$), we know that every $1\times 2$ subsystem of $L$ is
uncommon . By Lemma 5.32, $L$ is uncommon .

If $s(L)=3$ and $L$ has a $2\times 4$ subsystem, then by Theorem 1.1 of [16],
$L$ is uncommon.

Suppose from now that $s(L)=3$ and $L$ does not have a $2\times 4$ subsystem.
If $L$ has two linearly independent $1\times 3$ subsystems, then it is
isomorphic to

$\begin{pmatrix}a_{1}&b_{1}&0&0&c\\\ 0&0&a_{2}&b_{2}&c\end{pmatrix}.$

In this case, we have $c(L)=4$ and $\mathcal{C}(L)=\\{\\{1,2,3,4\\}\\}$, i.e.,
the only element in $\\{L_{B}:B\in\mathcal{C}(L)\\}$ is the linear equation

$L_{5}\mathbf{x}=a_{1}x_{1}+b_{1}x_{2}-a_{2}x_{3}-b_{2}x_{4}.$

If $L_{5}$ is uncommon, then we can find a Fourier template
$g:\mathbb{Z}\to\mathbb{C}$ with $\sigma_{L_{5}}(g)<0$, so $L$ is uncommon
over sufficiently large $p$ by Theorem 3.5. We will show in Section 5.7 that,
when $L_{5}$ is common, $L$ is common if and only if it is of the form listed
in 6 and 7.

Now suppose that $L$ has only one $1\times 3$ subsystem. Again, by Theorem
3.5, if all $1\times 4$ subsystems $L$ are uncommon, then $L$ is uncommon as
well. Hence it suffices to consider the case where $L$ has a common $1\times
4$ subsystem, i.e., $L$ is isomorphic to either of the following:

$\displaystyle\begin{pmatrix}1&-1&\lambda&-\lambda&0\\\
a&b&0&0&c\end{pmatrix}\quad\begin{pmatrix}1&-1&\lambda&-\lambda&0\\\
a&0&b&0&c\end{pmatrix}$ (8)

with $\lambda\in\mathbb{Q}$, $\lambda>0$ and
$a,b,c\in\mathbb{Z}\setminus\\{0\\}$.

In the first case, the elements in $\\{L_{B}:B\in\mathcal{C}(L)\\}$ are

$\displaystyle L_{5}\mathbf{x}=x_{1}-x_{2}+\lambda x_{3}-\lambda x_{4}$
$\displaystyle A_{5}=\\{\\!\\!\\{1,-1,\lambda,-\lambda\\}\\!\\!\\}$
$\displaystyle L_{1}\mathbf{x}=(a+b)x_{2}-a\lambda x_{3}+a\lambda
x_{4}+cx_{5}\qquad$ $\displaystyle
A_{1}=\\{\\!\\!\\{a+b,-a\lambda,a\lambda,c\\}\\!\\!\\}$ $\displaystyle
L_{2}\mathbf{x}=(a+b)x_{1}+b\lambda x_{3}-b\lambda x_{4}+cx_{5}$
$\displaystyle A_{2}=\\{\\!\\!\\{a+b,b\lambda,-b\lambda,c\\}\\!\\!\\}.$

We first show that, if $a+b+c\neq 0$, then $L$ is uncommon. We prove this by
finding Fourier template $g:\mathbb{Z}\to\mathbb{C}$ such that
$\sigma_{L_{1}}(g)+\sigma_{L_{2}}(g)+\sigma_{L_{5}}(g)<0$ and applying Theorem
3.5. The construction of suitable Fourier templates uses nearly identical
ideas as that for 5.16 and Proposition 5.17. Indeed, we have the following
cases:

  * •

Each of $A_{1},A_{2}$ has three positive and one negative elements. Consider
$h:\pm G_{L}\to\mathbb{C}$ with

$\displaystyle\begin{cases}h(r)=i&r>0\\\ h(r)=-i&r<0.\end{cases}$

We know that each of $h_{A_{1}},h_{A_{2}},h_{A_{5}}$ is constant on $\pm
G_{L}$, with $h_{A_{5}}=1$ and $h_{A_{1}}=h_{A_{2}}=-1$. Hence Lemma 5.14
applies.

  * •

Each of $A_{1},A_{2}$ contains two positive and two negative elements, with
$a+b+c\neq 0$. Then since $A_{1},A_{2}$ are not cancelling, we can find some
$h:\pm G_{L}\to\mathbb{C}$ as in Proposition 5.17, so that each of
$\text{Re}(h_{A_{1}}),\text{Re}(h_{A_{2}}),h_{A_{5}}$ is constant on $\pm
G_{L}$, and $\text{Re}(h_{A_{1}})+\text{Re}(h_{A_{2}})+h_{A_{5}}<0$. Hence
Lemma 5.14 applies.

Finally, for $a+b+c=0$, we show in Section 5.7 that $L$ is common if and only
if is it of the form listed in 6 and 7.

Lastly, we have the second case, where the elements in
$\\{L_{B}:B\in\mathcal{C}(L)\\}$ are given by

$\displaystyle L_{5}\mathbf{x}=x_{1}-x_{2}+\lambda x_{3}-\lambda x_{4}$
$\displaystyle A_{5}=\\{\\!\\!\\{1,-1,\lambda,-\lambda\\}\\!\\!\\}$
$\displaystyle L_{1}\mathbf{x}=ax_{2}+(b-a\lambda)x_{3}+a\lambda
x_{4}+cx_{5}\qquad$ $\displaystyle
A_{1}=\\{\\!\\!\\{b-a\lambda,a,a\lambda,c\\}\\!\\!\\}$ $\displaystyle
L_{3}\mathbf{x}=(a\lambda-b)x_{1}+bx_{2}+b\lambda x_{4}+c\lambda x_{5}$
$\displaystyle A_{3}=\\{\\!\\!\\{a\lambda-b,b,b\lambda,c\lambda\\}\\!\\!\\}.$
(9)

Notice that we overlap with the previous case if $\lambda=-1$. We handle the
typical case $\lambda\neq 1$ and defer the case $\lambda=1$ to the appendix;
the construction for the case when $\lambda=1$ uses the same idea as that in
Example 5.20, Example 5.21 and the proof of Proposition 5.22.

When $\lambda\not\in\\{1,-1\\}$, the key idea is to reduce to the setup of
Lemma 5.9 and Lemma 5.10. Namely, Lemma 5.9 and Lemma 5.10 together show that
if the $A_{i}$ corresponding to $L$ cannot be partitioned into two
$L$-coincidental pairs, then $L$ is uncommon. For the system of $L$ above, we
will show that this is the case because of parity reasons.

Suppose $\lambda\notin\\{1,-1\\}$. In this case, note that at least one of
$|\frac{b-a\lambda}{c}|$ and $|\frac{a\lambda-b}{c\lambda}|$ is not an odd
power of $\lambda$. Without loss of generality, suppose
$|\frac{a\lambda-b}{c\lambda}|$ is not an odd power of $\lambda$. Note that
$L_{5}$ is $\lambda$-common. Moreover, if $L_{1}$ is common, then it must be
$\lambda$-common as well. This implies that
$A_{3}=\\{\\!\\!\\{a\lambda-b,b,b\lambda,c\lambda\\}\\!\\!\\}$ cannot be
partitioned into $L$-coincidental pairs, so $L$ is uncommon.

###  5.7. Proofs of commonality

In this section, we show the positive side of Theorem 1.10. That is, $L$ is
common if it is one of the forms listed in Theorem 1.10(1).

####  5.7.1. Common $2\times 5$ linear systems with $s(L)=4$

In this section, we show that the three $2\times 5$ linear systems

$\begin{pmatrix}1&-1&1&-1&0\\\
1&2&-1&0&-2\end{pmatrix}\quad\begin{pmatrix}1&0&-1&2&-2\\\
0&1&2&-1&-2\end{pmatrix}\quad\begin{pmatrix}1&1&-1&-1&0\\\
2&-2&1&0&-1\end{pmatrix}$

are common over all $\mathbb{F}_{p}$. Proofs that the first two linear systems
are common can also be found at [17, Examples 4.5 and 4.6].

Let $L$ be any irredundant $2\times 5$ linear system with $s(L)=4$. For
$f:\mathbb{F}_{p}^{n}\to[0,1]$ with $\mathbb{E}f=\alpha$, we have

$\displaystyle t_{L}(f)+t_{L}(1-f)$
$\displaystyle=\mathbb{E}_{L\mathbf{x}=0}[f(x_{1})\cdots
f(x_{5})+(1-f(x_{1}))\cdots(1-f(x_{5}))]$
$\displaystyle=1-5\alpha+\binom{5}{2}\alpha^{2}-\binom{5}{3}\alpha^{3}+\sum_{i=1}^{5}\mathbb{E}_{L\mathbf{x}=0}[\prod_{j\in[5]\setminus\\{i\\}}f(x_{j})]$
$\displaystyle=(1-\alpha)^{5}+\alpha^{5}-5\alpha^{4}+\sum_{i=1}^{5}t_{L_{i}}(f)$
$\displaystyle\overset{\lx@cref{creftype~refnum}{eqn:inversion1}}{=}(1-\alpha)^{5}+\alpha^{5}-5\alpha^{4}+\sum_{i=1}^{5}\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}}\prod_{a\in
A_{i}}\widehat{f}(ar).$

Since $\widehat{f}(0)=\alpha$, we have

$t_{L}(f)+t_{L}(1-f)=(1-\alpha)^{5}+\alpha^{5}+\sum_{i=1}^{5}\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}\prod_{a\in
A_{i}}\widehat{f}(ar).$

Thus, if

$\displaystyle\sum_{i=1}^{5}\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}\prod_{a\in
A_{i}}\widehat{f}(ar)\geq 0\qquad\text{ for all
$f:\mathbb{F}_{p}^{n}\to[0,1]$},$ (10)

we would have $t_{L}(f)+t_{L}(1-f)\geq(1-\alpha)^{5}+\alpha^{5}\geq 2^{-4}$
for all $f$, which implies that $L$ is common over all $\mathbb{F}_{p}$.

We now verify that 10 holds for the three linear systems mentioned above.

The first linear system has

$\displaystyle L_{5}\mathbf{x}$
$\displaystyle=x_{1}-x_{2}+x_{3}-x_{4}\qquad\qquad$ $\displaystyle
A_{5}=\\{\\!\\!\\{1,1,-1,-1\\}\\!\\!\\}$ $\displaystyle L_{4}\mathbf{x}$
$\displaystyle=x_{1}+2x_{2}-x_{3}-2x_{5}$ $\displaystyle
A_{4}=\\{\\!\\!\\{1,-1,2,-2\\}\\!\\!\\}$ $\displaystyle L_{3}\mathbf{x}$
$\displaystyle=2x_{1}+x_{2}-x_{4}-2x_{5}$ $\displaystyle
A_{3}=\\{\\!\\!\\{1,-1,2,-2\\}\\!\\!\\}$ $\displaystyle L_{2}\mathbf{x}$
$\displaystyle=3x_{1}+x_{3}-2x_{4}-2x_{5}$ $\displaystyle
A_{2}=\\{\\!\\!\\{1,3,-2,-2\\}\\!\\!\\}$ $\displaystyle L_{1}\mathbf{x}$
$\displaystyle=3x_{2}-2x_{3}+x_{4}-2x_{5}$ $\displaystyle
A_{1}=\\{\\!\\!\\{1,3,-2,-2\\}\\!\\!\\}.$

For all $f:\mathbb{F}_{p}^{n}\to[0,1]$, we have

$\displaystyle\sum_{i=1}^{5}\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}\prod_{a\in
A_{i}}\widehat{f}(ar)$
$\displaystyle=\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}2|\widehat{f}(r)|^{2}|\widehat{f}(2r)|^{2}+|\widehat{f}(r)|^{2}|\widehat{f}(3r)|^{2}+2\widehat{f}(r)\widehat{f}(2r)\widehat{f}(3r)\widehat{f}(-6r).$

Using the Cauchy–Schwarz inequality, we get that

$\displaystyle\left|\sum_{r}\widehat{f}(r)\widehat{f}(2r)\widehat{f}(3r)\widehat{f}(-6r)\right|$
$\displaystyle\leq\left(\sum_{r}|\widehat{f}(r)|^{2}|\widehat{f}(2r)|^{2}\right)^{1/2}\left(\sum_{r}|\widehat{f}(3r)|^{2}|\widehat{f}(-6r)|^{2}\right)^{1/2}$
$\displaystyle=\sum_{r}|\widehat{f}(r)|^{2}|\widehat{f}(2r)|^{2},$

which implies that
$\sum_{i=1}^{5}\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}\prod_{a\in
A_{i}}\widehat{f}(ar)\geq 0$ always.

The second linear system has

$\displaystyle L_{5}\mathbf{x}$
$\displaystyle=x_{1}-x_{2}-3x_{3}+3x_{4}\qquad\qquad$ $\displaystyle
A_{5}=\\{\\!\\!\\{1,-1,3,-3\\}\\!\\!\\}$ $\displaystyle L_{4}\mathbf{x}$
$\displaystyle=x_{1}+2x_{2}+3x_{3}-6x_{5}$ $\displaystyle
A_{4}=\\{\\!\\!\\{1,2,3,-6\\}\\!\\!\\}$ $\displaystyle L_{3}\mathbf{x}$
$\displaystyle=2x_{1}+x_{2}+3x_{4}-6x_{5}$ $\displaystyle
A_{3}=\\{\\!\\!\\{1,2,3,-6\\}\\!\\!\\}$ $\displaystyle L_{2}\mathbf{x}$
$\displaystyle=x_{1}-x_{3}+2x_{4}-2x_{5}$ $\displaystyle
A_{2}=\\{\\!\\!\\{1,-1,2,-2\\}\\!\\!\\}$ $\displaystyle L_{1}\mathbf{x}$
$\displaystyle=x_{2}+2x_{3}-x_{4}-2x_{5}$ $\displaystyle
A_{1}=\\{\\!\\!\\{1,-1,2,-2\\}\\!\\!\\}.$

For all $f:\mathbb{F}_{p}^{n}\to[0,1]$, we have

$\displaystyle\sum_{i=1}^{5}\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}\prod_{a\in
A_{i}}\widehat{f}(ar)$
$\displaystyle=\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}|\widehat{f}(r)|^{4}+2|\widehat{f}(r)|^{2}|\widehat{f}(2r)|^{2}+2\widehat{f}(r)\widehat{f}(3r)\widehat{f}(-2r)^{2}.$

Using the Cauchy–Schwarz inequality twice, we get that

$\displaystyle\left|\sum_{r}\widehat{f}(r)\widehat{f}(3r)\widehat{f}(-2r)^{2}\right|$
$\displaystyle\leq\left(\sum_{r}|\widehat{f}(r)|^{2}|\widehat{f}(-2r)|^{2}\right)^{1/2}\left(\sum_{r}|\widehat{f}(-2r)|^{2}|\widehat{f}(3r)|^{2}\right)^{1/2}$
$\displaystyle\leq\left(\sum_{r}|\widehat{f}(r)|^{2}|\widehat{f}(-2r)|^{2}\right)^{1/2}\left(\frac{1}{2}\left(\sum_{r}|\widehat{f}(-2r)|^{4}+\sum_{r}|\widehat{f}(3r)|^{4}\right)\right)^{1/2}$
$\displaystyle\leq\frac{1}{2}\sum_{r}|\widehat{f}(r)|^{2}|\widehat{f}(-2r)|^{2}+\frac{1}{4}\left(\sum_{r}|\widehat{f}(-2r)|^{4}+\sum_{r}|\widehat{f}(3r)|^{4}\right)$
$\displaystyle=\frac{1}{2}\sum_{r}|\widehat{f}(r)|^{2}|\widehat{f}(2r)|^{2}+\frac{1}{2}\sum_{r}|\widehat{f}(r)|^{4},$

which implies that
$\sum_{i=1}^{5}\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}\prod_{a\in
A_{i}}\widehat{f}(ar)\geq 0$ always.

The third linear system has

$\displaystyle L_{5}\mathbf{x}$
$\displaystyle=x_{1}-x_{2}+x_{3}-x_{4}\qquad\qquad$ $\displaystyle
A_{5}=\\{\\!\\!\\{1,1,-1,-1\\}\\!\\!\\}$ $\displaystyle L_{4}\mathbf{x}$
$\displaystyle=2x_{1}-2x_{2}+x_{3}-x_{5}$ $\displaystyle
A_{4}=\\{\\!\\!\\{2,-2,1,-1\\}\\!\\!\\}$ $\displaystyle L_{3}\mathbf{x}$
$\displaystyle=3x_{1}-x_{2}-x_{4}-x_{5}$ $\displaystyle
A_{3}=\\{\\!\\!\\{3,-1,-1,-1\\}\\!\\!\\}$ $\displaystyle L_{2}\mathbf{x}$
$\displaystyle=4x_{1}-x_{3}-2x_{4}-x_{5}$ $\displaystyle
A_{2}=\\{\\!\\!\\{4,-1,-2,-1\\}\\!\\!\\}$ $\displaystyle L_{1}\mathbf{x}$
$\displaystyle=4x_{2}-3x_{3}-2x_{4}+x_{5}$ $\displaystyle
A_{1}=\\{\\!\\!\\{4,-3,-2,1\\}\\!\\!\\}.$

For all $f:\mathbb{F}_{p}^{n}\to[0,1]$, we have

$\displaystyle\sum_{i=1}^{5}\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}\prod_{a\in
A_{i}}\widehat{f}(ar)$
$\displaystyle=\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}|\widehat{f}(r)|^{4}+|\widehat{f}(r)|^{2}|\widehat{f}(2r)|^{2}+\widehat{f}(3r)\widehat{f}(-r)^{3}+\widehat{f}(4r)\widehat{f}(-2r)\widehat{f}(-r)^{2}+\widehat{f}(4r)\widehat{f}(-3r)\widehat{f}(-2r)\widehat{f}(r)$
$\displaystyle=\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}\frac{3}{4}|\widehat{f}(r)|^{4}+\frac{1}{4}|\widehat{f}(3r)|^{4}+|\widehat{f}(2r)|^{2}|\widehat{f}(4r)|^{2}$
$\displaystyle\qquad\qquad\quad+\text{Re}(\widehat{f}(3r)\widehat{f}(-r)^{3}++\widehat{f}(4r)\widehat{f}(-2r)\widehat{f}(-r)^{2}+\widehat{f}(4r)\widehat{f}(-3r)\widehat{f}(-2r)\widehat{f}(r)).$

Thus, to show that $L$ is common, it suffices to show that

$\displaystyle\frac{3}{4}|\widehat{f}(r)|^{4}+\frac{1}{4}|\widehat{f}(3r)|^{4}+|\widehat{f}(2r)|^{2}|\widehat{f}(4r)|^{2}$
$\displaystyle\quad+\text{Re}(\widehat{f}(3r)\widehat{f}(-r)^{3}+\widehat{f}(4r)\widehat{f}(-2r)\widehat{f}(-r)^{2}+\widehat{f}(4r)\widehat{f}(-3r)\widehat{f}(-2r)\widehat{f}(r))\geq
0\qquad\text{for all }r\in\widehat{\mathbb{F}_{p}^{n}}.$

Consider any $r\in\widehat{\mathbb{F}_{p}^{n}}$. Let

$\displaystyle a_{1}=|\widehat{f}(r)|,\quad a_{2}=|\widehat{f}(2r)|,\quad
a_{3}=|\widehat{f}(3r)|,\quad a_{4}=|\widehat{f}(4r)|.$

Since

$\widehat{f}(3r)\widehat{f}(-r)^{3}\cdot\widehat{f}(4r)\widehat{f}(-3r)\widehat{f}(-2r)\widehat{f}(r)=\widehat{f}(4r)\widehat{f}(-2r)\widehat{f}(-r)^{2}\cdot|\widehat{f}(r)|^{2}|\widehat{f}(3r)|^{2},$

letting $\alpha,\beta$ be the arguments of
$\widehat{f}(3r)\widehat{f}(-r)^{3}$,
$\widehat{f}(4r)\widehat{f}(-3r)\widehat{f}(-2r)\widehat{f}(r)$ respectively,
our goal becomes showing that

$\displaystyle
I:=\frac{3}{4}a_{1}^{4}+\frac{1}{4}a_{3}^{4}+a_{2}^{2}a_{4}^{2}+a_{1}^{3}a_{3}\cos(\alpha)+a_{1}^{2}a_{2}a_{4}\cos(\alpha+\beta)+a_{1}a_{2}a_{3}a_{4}\cos(\beta)\geq
0.$ (11)

Setting $x=a_{1}^{2}$, $y=a_{1}a_{3}$ and $z=a_{2}a_{4}$, we have

$\displaystyle I$
$\displaystyle\geq\frac{1}{2}a_{1}^{4}+\frac{1}{2}a_{1}^{2}a_{3}^{2}+a_{2}^{2}a_{4}^{2}+a_{1}^{3}a_{3}\cos(\alpha)+a_{1}^{2}a_{2}a_{4}\cos(\alpha+\beta)+a_{1}a_{2}a_{3}a_{4}\cos(\beta)$
$\displaystyle=\frac{1}{2}(x^{2}+y^{2}+2z^{2}+2xy\cos(\alpha)+2xz\cos(\alpha+\beta)+2yz\cos(\beta)).$

Since

$\displaystyle 0$
$\displaystyle\leq(y+z\cos(\beta)+x\cos(\alpha))^{2}+(z\sin(\beta)-x\sin(\alpha))^{2}$
$\displaystyle=y^{2}+z^{2}+x^{2}+2yz\cos(\beta)+2xy\cos(\alpha)+2xz\cos(\alpha+\beta),$

we conclude that $I\geq 0$. This gives 11.

####  5.7.2. Common $2\times 5$ linear systems with $s(L)=3$

We first show that linear systems of the form

$L=\begin{pmatrix}a&b&0&0&c\\\ 0&0&a&b&c\end{pmatrix}\qquad
a,b,c\in\mathbb{Z}\setminus\\{0\\}$

are common. Define

$\displaystyle L_{1}\mathbf{x}$ $\displaystyle=ax_{1}+bx_{2}+cx_{5}$
$\displaystyle L_{2}\mathbf{x}$ $\displaystyle=ax_{1}+bx_{2}-ax_{3}-bx_{4}.$

Consider any $f:\mathbb{F}_{p}^{n}\to[0,1]$ with $\mathbb{E}f=\alpha\in[0,1]$.
For any $\\{i,j,k\\}\in\binom{[5]}{3}$, we have

$\mathbb{E}_{L\mathbf{x}=0}f(x_{i})f(x_{j})f(x_{k})=\begin{cases}t_{L_{1}}(f)&\\{i,j,k\\}=\\{1,2,5\\}\text{
or }\\{3,4,5\\}\\\ \alpha^{3}&\text{otherwise.}\end{cases}$

For any $\\{i,j,k,\ell\\}\in\binom{[5]}{4}$, we have

$\mathbb{E}_{L\mathbf{x}=0}f(x_{i})f(x_{j})f(x_{k})f(x_{\ell})=\begin{cases}t_{L_{2}}(f)&\\{i,j,k,\ell\\}=\\{1,2,3,4\\}\\\
\alpha t_{L_{1}}(f)&\text{otherwise.}\end{cases}$

Thus, we have

$\displaystyle t_{L}(f)+t_{L}(1-f)$
$\displaystyle=\mathbb{E}_{L\mathbf{x}=0}f(x_{1})\cdots
f(x_{5})+(1-f(x_{1}))\cdots(1-f(x_{5}))$
$\displaystyle=1-5\alpha+10\alpha^{2}-(8\alpha^{3}+2t_{L_{1}}(f))+(t_{L_{2}}(f)+4\alpha
t_{L_{1}}(f)).$

Since

$\displaystyle t_{L_{1}}(f)$
$\displaystyle=\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}}\widehat{f}(ar)\widehat{f}(br)\widehat{f}(cr)=\alpha^{3}+\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}\widehat{f}(ar)\widehat{f}(br)\widehat{f}(cr),$
$\displaystyle t_{L_{2}}(f)$
$\displaystyle=\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}}|\widehat{f}(ar)|^{2}|\widehat{f}(br)|^{2}=\alpha^{4}+\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}|\widehat{f}(ar)|^{2}|\widehat{f}(br)|^{2},$

we get that

$\displaystyle t_{L}(f)+t_{L}(1-f)$
$\displaystyle=\alpha^{5}+(1-\alpha)^{5}+(4\alpha-2)\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}\widehat{f}(ar)\widehat{f}(br)\widehat{f}(cr)+\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}|\widehat{f}(ar)|^{2}|\widehat{f}(br)|^{2}.$

Letting

$X=\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}\widehat{f}(ar)\widehat{f}(br)\widehat{f}(cr),\qquad
Y=\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}|\widehat{f}(ar)|^{2}|\widehat{f}(br)|^{2},$

we know from Cauchy–Schwarz and Parseval that

$\displaystyle X^{2}$ $\displaystyle\leq
Y\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}|\widehat{f}(cr)|^{2}=Y\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}|\widehat{f}(r)|^{2}$
$\displaystyle=Y(\mathbb{E}[|f|^{2}]-\alpha^{2})\leq
Y(||f||_{\infty}\mathbb{E}[f]-\alpha^{2})\leq Y(\alpha-\alpha^{2}).$

Since $0\leq Y=t_{L_{2}}(f)-\alpha^{4}\leq 1$, we get that

$t_{L}(f)+t_{L}(1-f)\geq\min_{0\leq\alpha,Y\leq
1}\alpha^{5}+(1-\alpha^{5})-|4\alpha-2|\sqrt{Y(\alpha-\alpha^{2})}+Y\geq\frac{1}{16}.$

Hence $L$ is common.

Next, we show that linear systems of the form

$L=\begin{pmatrix}1&-1&\lambda&-\lambda&0\\\ a&b&0&0&-a-b\end{pmatrix},$

with

$\\{|a/b|,|(a+b)/b|,|(a+b)/a|\\}\cap\\{|\lambda|,|\lambda|^{-1}\\}\neq\emptyset,$

are common. Define

$\displaystyle L_{1}\mathbf{x}$ $\displaystyle=ax_{1}+bx_{2}-(a+b)x_{5}$
$\displaystyle L_{2}\mathbf{x}$ $\displaystyle=x_{1}-x_{2}+\lambda
x_{3}-\lambda x_{4}$ $\displaystyle L_{3}\mathbf{x}$
$\displaystyle=(a+b)x_{1}+b\lambda x_{3}-b\lambda x_{4}-(a+b)x_{4}$
$\displaystyle L_{4}\mathbf{x}$ $\displaystyle=(a+b)x_{2}-a\lambda
x_{2}+a\lambda x_{3}-(a+b)x_{4}.$

For all $f:\mathbb{F}_{p}^{n}\to[0,1]$ with $\mathbb{E}f=\alpha\in[0,1]$,
again we can rewrite

$\displaystyle t_{L}(f)+t_{L}(1-f)$ $\displaystyle=\alpha^{5}+(1-\alpha)^{5}$
$\displaystyle\quad+(2\alpha-1)\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}\widehat{f}(ar)\widehat{f}(br)\overline{\widehat{f}((a+b)r)}+\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}|\widehat{f}(r)|^{2}|\widehat{f}(\lambda
r)|^{2}$
$\displaystyle\quad+\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}|\widehat{f}(b\lambda
r)|^{2}|\widehat{f}((a+b)r)|^{2}+\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}|\widehat{f}(a\lambda
r)|^{2}|\widehat{f}((a+b)r)|^{2}.$

Let

$X=\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}\widehat{f}(ar)\widehat{f}(br)\overline{\widehat{f}((a+b)r)},\qquad
Y=\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}|\widehat{f}(r)|^{2}|\widehat{f}(\lambda
r)|^{2}.$

Since one of
$|a/b|,|a/b|^{-1},|(a+b)/b|,|(a+b)/b|^{-1},|(a+b)/a|,|(a+b)/a|^{-1}$ equals
$|\lambda|$, we know from Cauchy–Schwarz and Parseval that

$\displaystyle X^{2}$ $\displaystyle\leq
Y\sum_{r\in\widehat{\mathbb{F}_{p}^{n}}\setminus\\{0\\}}|\widehat{f}(r)|^{2}=Y(\mathbb{E}[|f|^{2}]-\alpha^{2})\leq
Y(||f||_{\infty}\mathbb{E}[f]-\alpha^{2})$ $\displaystyle\leq
Y(\alpha-\alpha^{2}).$

Since $0\leq Y\leq 1$, we get that

$t_{L}(f)+t_{L}(1-f)\geq\min_{0\leq\alpha,Y\leq
1}\alpha^{5}+(1-\alpha^{5})-|2\alpha-1|\sqrt{Y(\alpha-\alpha^{2})}+Y\geq\frac{1}{16}.$

Hence $L$ is common.

Finally, we show that linear systems

$\displaystyle\begin{pmatrix}a&-a&0&0&c\\\
0&0&b&-b&c\end{pmatrix}\qquad\begin{pmatrix}1&-1&\lambda&-\lambda&0\\\
a&b&0&0&-a-b\end{pmatrix}$

not isomorphic to 6 and 7 are uncommon over sufficiently large
$\mathbb{F}_{p}$. For the first linear system, define

$\displaystyle L_{1}\mathbf{x}$ $\displaystyle=ax_{1}-ax_{2}+cx_{5}$
$\displaystyle L_{2}\mathbf{x}$ $\displaystyle=bx_{3}-bx_{4}+cx_{5}$
$\displaystyle L_{3}\mathbf{x}$ $\displaystyle=ax_{1}-ax_{2}+bx_{3}-bx_{4}.$

Since the linear system is not isomorphic to 6, we have $|a|\neq|b|$. Since it
is not isomorphic to 7, we also have $|a/b|\notin\\{|a/c|,|a/c|^{-1}\\}$. For
all $f:\mathbb{F}_{p}^{n}\to[0,1]$ with $\mathbb{E}f=\alpha\in[0,1]$, we have

$\displaystyle t_{L}(f)+t_{L}(1-f)$
$\displaystyle=\alpha^{5}+(1-\alpha)^{5}+(2\alpha-1)\sum_{r\in\widehat{\mathbb{F}_{p}}\setminus\\{0\\}}|\widehat{f}(ar)|^{2}\widehat{f}(cr)$
$\displaystyle\quad+(2\alpha-1)\sum_{r\in\widehat{\mathbb{F}_{p}}\setminus\\{0\\}}|\widehat{f}(br)|^{2}\widehat{f}(cr)+\sum_{r\in\widehat{\mathbb{F}_{p}}\setminus\\{0\\}}|\widehat{f}(ar)|^{2}|\widehat{f}(br)|^{2}.$

Suppose $p$ is sufficiently large. Define $f:\mathbb{F}_{p}\to[0,1]$ by

$\displaystyle\widehat{f}(0)$ $\displaystyle=0.4995:=\alpha,$
$\displaystyle\widehat{f}(a)$
$\displaystyle=\widehat{f}(-a)=\widehat{f}(c)=\widehat{f}(-c)=0.0834:=\beta.$

We then have

$\displaystyle t_{L}(f)+t_{L}(1-f)$
$\displaystyle\leq\alpha^{5}+(1-\alpha)^{5}+(2\alpha-1)\sum_{r\in\widehat{\mathbb{F}_{p}}\setminus\\{0\\}}|\widehat{f}(ar)|^{2}\widehat{f}(cr)$
$\displaystyle=\alpha^{5}+(1-\alpha)^{5}+(2\alpha-1)2\beta^{3}=0.0624995<1/16.$

For the second linear system, define

$\displaystyle L_{1}\mathbf{x}$ $\displaystyle=ax_{1}+bx_{2}-(a+b)x_{5}$
$\displaystyle L_{2}\mathbf{x}$ $\displaystyle=x_{1}-x_{2}+\lambda
x_{3}-\lambda x_{4}$ $\displaystyle L_{3}\mathbf{x}$
$\displaystyle=(a+b)x_{1}+b\lambda x_{3}-b\lambda x_{4}-(a+b)x_{4}$
$\displaystyle L_{4}\mathbf{x}$ $\displaystyle=(a+b)x_{2}-a\lambda
x_{2}+a\lambda x_{3}-(a+b)x_{4}.$

Since the linear system is not isomorphic to 7, we know that
$\lambda\notin\\{1,-1\\}$. Moreover, we have

$\displaystyle\\{|a/b|,|(a+b)/b|,|(a+b)/a|\\}$
$\displaystyle\quad\cap\\{|\lambda|,|\lambda|^{-1},|(a+b)/(b\lambda)|,|b\lambda/(a+b)|,|(a+b)/(a\lambda)|,|a\lambda/(a+b)|\\}=\emptyset.$

For all $f:\mathbb{F}_{p}^{n}\to[0,1]$ with $\mathbb{E}f=\alpha\in[0,1]$, we
have

$\displaystyle t_{L}(f)+t_{L}(1-f)$
$\displaystyle=\alpha^{5}+(1-\alpha)^{5}+(2\alpha-1)\sum_{r\in\widehat{\mathbb{F}_{p}}}\widehat{f}(ar)\widehat{f}(br)\overline{\widehat{f}((a+b)r)}$
$\displaystyle\quad+\sum_{r\in\widehat{\mathbb{F}_{p}}\setminus\\{0\\}}|\widehat{f}(r)|^{2}|\widehat{f}(\lambda
r)|^{2}+|\widehat{f}((a+b)r)|^{2}|\widehat{f}(b\lambda
r)|^{2}+|\widehat{f}((a+b)r)|^{2}|\widehat{f}(a\lambda r)|^{2}.$

Suppose $p$ is sufficiently large. Define $f:\mathbb{F}_{p}\to[0,1]$ by

$\displaystyle\widehat{f}(0)$ $\displaystyle=0.4995:=\alpha$
$\displaystyle\widehat{f}(a)$
$\displaystyle=\widehat{f}(-a)=\widehat{f}(b)=\widehat{f}(-b)=\widehat{f}(a+b)=\widehat{f}(-a-b)=0.0834:=\beta.$

We then have

$\displaystyle t_{L}(f)$
$\displaystyle=\alpha^{5}+(1-\alpha)^{5}+(2\alpha-1)\sum_{r\in\widehat{\mathbb{F}_{p}}\setminus\\{0\\}}\widehat{f}(ar)\widehat{f}(br)\overline{\widehat{f}((a+b)r)}$
$\displaystyle=\alpha^{5}+(1-\alpha)^{5}+(2\alpha-1)2\beta^{3}=0.0624995<1/16.$

## References

  * [1] Daniel Altman, _Local aspects of the Sidorenko property for linear equations_ , (2022), arXiv:2210.17493.
  * [2] Daniel Altman, _On a question of Alon_ , (2022), arXiv:2210.13515.
  * [3] P. Baldi, Y. Rinott, and C. Stein, _A normal approximation for the number of local maxima of a random function on a graph_ , Probability, statistics, and mathematics, Academic Press, Boston, MA, 1989, pp. 59–81.
  * [4] A. D. Barbour and Louis H. Y. Chen (eds.), _An introduction to Stein’s method_ , Lecture Notes Series. Institute for Mathematical Sciences. National University of Singapore, vol. 4, Singapore University Press, Singapore; World Scientific Publishing Co. Pte. Ltd., Hackensack, NJ, 2005, Lectures from the Meeting on Stein’s Method and Applications: a Program in Honor of Charles Stein held at the National University of Singapore, Singapore, July 28–August 31, 2003.
  * [5] G. R. Blakley and Prabir Roy, _A Hölder type inequality for symmetric matrices with nonnegative entries_ , Proc. Amer. Math. Soc. 16 (1965), 1244–1245.
  * [6] Stefan A. Burr and Vera Rosta, _On the Ramsey multiplicities of graphs—problems and recent results_ , J. Graph Theory 4 (1980), 347–361.
  * [7] David Conlon, Jacob Fox, and Benny Sudakov, _An approximate version of Sidorenko’s conjecture_ , Geom. Funct. Anal. 20 (2010), 1354–1366.
  * [8] David Conlon, Jeong Han Kim, Choongbum Lee, and Joonkyung Lee, _Some advances on Sidorenko’s conjecture_ , J. Lond. Math. Soc. (2) 98 (2018), 593–608.
  * [9] David Conlon and Joonkyung Lee, _Finite reflection groups and graph norms_ , Adv. Math. 315 (2017), 130–165.
  * [10] David Conlon and Joonkyung Lee, _Sidorenko’s conjecture for blow-ups_ , Discrete Anal. (2021), Paper No. 2, 13.
  * [11] David Conlon, Joonkyung Lee, and Alexander Sidorenko, _Extremal numbers and sidorenko’s conjecture_ , (2023), arXiv:2307.04588.
  * [12] Jacob Fox, Huy Tuan Pham, and Yufei Zhao, _Common and Sidorenko linear equations_ , Q. J. Math. 72 (2021), 1223–1234.
  * [13] A. W. Goodman, _On sets of acquaintances and strangers at any party_ , Amer. Math. Monthly 66 (1959), 778–783.
  * [14] Hamed Hatami, _Graph norms and Sidorenko’s conjecture_ , Israel J. Math. 175 (2010), 125–150.
  * [15] Chris Jagger, Pavel Šťovíček, and Andrew Thomason, _Multiplicities of subgraphs_ , Combinatorica 16 (1996), 123–141.
  * [16] Nina Kamčev, Anita Liebenau, and Natasha Morrison, _On uncommon systems of equations_ , (2021), arXiv:2106.08986.
  * [17] Nina Kamčev, Anita Liebenau, and Natasha Morrison, _Towards a characterization of Sidorenko systems_ , Q. J. Math. 74 (2023), 957–974.
  * [18] Jeong Han Kim, Choongbum Lee, and Joonkyung Lee, _Two approaches to Sidorenko’s conjecture_ , Trans. Amer. Math. Soc. 368 (2016), 5057–5074.
  * [19] László Lovász, _Subgraph densities in signed graphons and the local Simonovits-Sidorenko conjecture_ , Electron. J. Combin. 18 (2011), Paper 127, 21.
  * [20] Nathan Ross, _Fundamentals of Stein’s method_ , Probab. Surv. 8 (2011), 210–293.
  * [21] A. Saad and J. Wolf, _Ramsey multiplicity of linear patterns in certain finite abelian groups_ , Q. J. Math. 68 (2017), 125–140.
  * [22] A. F. Sidorenko, _Inequalities for functionals generated by bipartite graphs_ , Diskret. Mat. 3 (1991), 50–65.
  * [23] Alexander Sidorenko, _A correlation inequality for bipartite graphs_ , Graphs Combin. 9 (1993), 201–204.
  * [24] Balazs Szegedy, _An information theoretic approach to sidorenko’s conjecture_ , arXiv preprint arXiv:1406.6738 (2014).
  * [25] Andrew Thomason, _A disproof of a conjecture of Erdős in Ramsey theory_ , J. London Math. Soc. (2) 39 (1989), 246–255.
  * [26] Leo Versteegen, _Linear configurations containing 4-term arithmetic progressions are uncommon_ , J. Combin. Theory Ser. A 200 (2023), Paper No. 105792, 38.

##  Appendix A Proof of Lemma 4.6

In this section, we prove Lemma 4.6.

###### Proof of Lemma 4.6.

We will prove that

$d_{\text{Wass}}(W,Z)\leq\rho^{-3}\sum_{u\in V}\left(3\sum_{v,w\in
N_{u}}\left|\mathbb{E}[X_{u}X_{v}X_{w}]\right|+4\sum_{v\in
N_{u}}|\mathbb{E}[X_{u}X_{v}]|\cdot\mathbb{E}\left[\left|\sum_{w\in N_{u}\cup
N_{v}}X_{w}\right|\right]\right).$

This will imply the desired conclusion because we have the following (see for
instance [4, Theorem 3.1]) for any $x\in\mathbb{R}$:

$|\mathbb{P}[W\leq x]-\mathbb{P}[Z\leq
x]|\leq\sqrt{2d_{\textup{Wass}}(W,Z)/\pi}.$

Define the set of test functions

$\mathcal{D}=\left\\{f\in\mathcal{C}^{1}(\mathbb{R}):f^{\prime}\text{
absolutely continuous},\,\left\lVert f\right\rVert_{\infty}\leq
1,\,\left\lVert f^{\prime}\right\rVert_{\infty}\leq\sqrt{2/\pi},\,\left\lVert
f^{\prime\prime}\right\rVert_{\infty}\leq 2\right\\}.$

By Corollary 4.4, it follows that

$d_{\text{Wass}}(W,Z)\leq\sup_{f\in\mathcal{D}}\left|\mathbb{E}[f^{\prime}(W)-Wf(W)]\right|.$

Define

$\displaystyle Y_{v}=\rho^{-1}\sum_{u\in N_{v}}X_{u},$ $\displaystyle
J_{v}=\rho^{-1}\sum_{u\not\in N_{v}}X_{u},$ $\displaystyle
K_{vw}=\rho^{-1}\sum_{u\not\in N_{w}\cup N_{v}}X_{u},$ $\displaystyle
T_{vw}=\rho^{-1}\sum_{u\in N_{w}\setminus N_{v}}X_{u}.$

In particular, observe that for any choice of $v,w\in V$, we have
$Y_{v}+K_{vw}+T_{vw}=W$.

Write
$\mathbb{E}[Wf(W)-f^{\prime}(W)]=(\textrm{I})+(\textrm{II})+(\textrm{III})$ as
a telescoping sum, where

$\displaystyle(\textrm{I})$ $\displaystyle=\mathbb{E}Wf(W)-\rho^{-1}\sum_{v\in
V}\mathbb{E}X_{v}Y_{v}f^{\prime}(J_{v}),$ $\displaystyle(\textrm{II})$
$\displaystyle=\rho^{-1}\sum_{v\in
V}\mathbb{E}X_{v}Y_{v}f^{\prime}(J_{v})-\rho^{-2}\sum_{v\in V}\sum_{u\in
N_{v}}\mathbb{E}[X_{u}X_{v}]\mathbb{E}[f^{\prime}(K_{uv})],$
$\displaystyle(\textrm{III})$ $\displaystyle=\rho^{-2}\sum_{v\in V}\sum_{u\in
N_{v}}\mathbb{E}[X_{u}X_{v}]\left(\mathbb{E}f^{\prime}(K_{uv})-\mathbb{E}f^{\prime}(W)\right).$

By the triangle inequality, we have

$|\mathbb{E}Wf(W)-\mathbb{E}f^{\prime}(W)|\leq|(\textrm{I})|+|(\textrm{II})|+|(\textrm{III})|.$
(12)

In what remains, we upper bound each of the individual pieces
$|(\textrm{I})|$, $|(\textrm{II})|$ and $|(\textrm{III})|$.

For $(\textrm{I})$, we write $W=Y_{v}+J_{v}$ and by Taylor expansion about
$J_{v}$ to obtain

$Wf(W)=\rho^{-1}\sum_{v\in
V}\left(X_{v}f(J_{v})+X_{v}Y_{v}f^{\prime}(J_{v})+\frac{1}{2}X_{v}Y_{v}^{2}f^{\prime\prime}(J_{1})\right),$

where $J_{1}$ is a random variable in the interval $[J_{v},W]$. It follows by
the assumptions on $f$ that

$\displaystyle|(\textrm{I})|$ $\displaystyle\leq\rho^{-1}\sum_{v\in
V}|\mathbb{E}(X_{v}Y_{v}^{2})|\leq\rho^{-3}\sum_{v\in V}\sum_{u,w\in
N_{v}}|\mathbb{E}X_{u}X_{v}X_{w}|.$

For $(\textrm{II})$, fix $v\in V$ and by writing $J_{v}=K_{vw}+T_{vw}$, we
know from Taylor expansion about $K_{vw}$ that

$X_{v}Y_{v}f^{\prime}(J_{v})=\rho^{-1}\sum_{w\in
N_{v}}X_{v}X_{w}(f^{\prime}(K_{vw})+T_{vw}f^{\prime\prime}(J_{2}))$

where $J_{2}$ is a random variable in the interval $[K_{vw},J_{v}]$. By the
assumptions on $f$, we have

$\displaystyle|(\textrm{II})|$ $\displaystyle\leq 2\rho^{-2}\sum_{v\in
V}\left|\mathbb{E}\left[X_{v}\sum_{w\in N_{v}}X_{w}T_{vw}\right]\right|\leq
2\rho^{-3}\sum_{v\in V}\sum_{u,w\in N_{v}}|\mathbb{E}X_{v}X_{w}X_{u}|.$

Finally, for $(\textrm{III})$, fix $u,v\in V$. Since
$K_{uv}=W-(Y_{u}+T_{uv})$, by the mean value theorem, we have

$f^{\prime}(K_{uv})=f^{\prime}(W)-(Y_{u}+T_{uv})f^{\prime\prime}(J_{3})$

for some $J_{3}\in[K_{uv},W]$. Consequently, we have

$\displaystyle|\mathbb{E}f^{\prime}(K_{uv})-\mathbb{E}f^{\prime}(W)|$
$\displaystyle\leq 2\mathbb{E}|Y_{u}+T_{uv}|\leq
2\rho^{-1}\mathbb{E}\left|\sum_{w\in N_{u}\cup N_{v}}X_{w}\right|.$

Putting all the various pieces into 12 gives the desired bound. ∎

##  Appendix B Deferred proofs from Section 5

###  B.1. Case A

###### Proof of Lemma 5.8.

Suppose first that exactly one of $L_{1},\dots,L_{5}$ is common. Without loss
of generality, let

$L_{5}\mathbf{x}=x_{1}-x_{2}+\lambda x_{3}-\lambda
x_{4},\quad\lambda\in\mathbb{Q}\setminus\\{-1,0,1\\}.$

We use $a\sim b$ to denote that $a,b$ are $L$-coincidental, i.e.,
$\frac{a}{b}\in\\{\lambda,-\lambda,1/\lambda,-1/\lambda\\}$. Up to replacing
$\lambda$ by one of $-\lambda,1/\lambda,-1/\lambda$ and permuting the
variables, we have the following two cases:

  1. (1)

For every $i=1,\dots,4$, letting
$L_{i}\mathbf{x}=a_{i,1}x_{1}+\dots+a_{i,5}x_{5}$, we have $a_{i,1}\sim
a_{i,2}$ or $a_{i,3}\sim a_{i,4}$.

  2. (2)

Letting $L_{4}\mathbf{x}=a_{4,1}x_{1}+a_{4,2}x_{2}+a_{4,3}x_{3}+a_{4,5}x_{5}$,
we have $a_{4,1}\sim a_{4,3}$ and $a_{4,2}\sim a_{4,5}$.

Write

$\displaystyle L_{5}\mathbf{x}$ $\displaystyle=x_{1}-x_{2}+\lambda
x_{3}-\lambda x_{4}$ $\displaystyle
A_{5}=\\{\\!\\!\\{1,-1,\lambda,-\lambda\\}\\!\\!\\}$ $\displaystyle
L_{4}\mathbf{x}$ $\displaystyle=ax_{1}+bx_{2}+cx_{3}+dx_{5}$ $\displaystyle
A_{4}=\\{\\!\\!\\{a,b,c,d\\}\\!\\!\\}$ $\displaystyle L_{3}\mathbf{x}$
$\displaystyle=(\lambda a-c)x_{1}+(\lambda b+c)x_{2}+\lambda cx_{4}+\lambda
dx_{5}\qquad$ $\displaystyle A_{3}=\\{\\!\\!\\{\lambda a-c,\lambda b+c,\lambda
c,\lambda d\\}\\!\\!\\}$ $\displaystyle L_{2}\mathbf{x}$
$\displaystyle=(a+b)x_{1}+(\lambda b+c)x_{3}-\lambda bx_{4}+dx_{5}$
$\displaystyle A_{2}=\\{\\!\\!\\{a+b,\lambda b+c,-\lambda b,d\\}\\!\\!\\}$
$\displaystyle L_{1}\mathbf{x}$ $\displaystyle=(a+b)x_{2}+(c-\lambda
a)x_{3}+\lambda ax_{4}+dx_{5}$ $\displaystyle A_{1}=\\{\\!\\!\\{a+b,c-\lambda
a,\lambda a,d\\}\\!\\!\\}.$

Suppose (1) occurs. if each of $A_{1},\dots,A_{4}$ can be partitioned into two
$L$-coincidental pairs, then we must have

$\displaystyle a\sim b,\quad c\sim d,\quad(\lambda a-c)\sim(\lambda
b+c),\quad(\lambda b+c)\sim\lambda b,\quad(c-\lambda a)\sim\lambda a,\quad
a+b\sim d.$

Recall that $a\sim b$ corresponds to one of the four identities $\lambda a=b$,
$\lambda a=-b$, $\lambda b=a$, $\lambda b=-a$. Thus, for the above relation to
hold, $a,b,c,d,\lambda$ must satisfy a system of six equations on five
variables, and there are $4^{6}$ possible such systems of equations. A
computer search 222The code can be found at ‘case-a-1.nb’ in the supplemental
file. yields that none of these $4^{6}$ systems of equations has a solution
with $a,b,c,d\in\mathbb{Q}\setminus\\{0\\}$ and
$\lambda\setminus\\{-1,0,1\\}$.

Suppose (2) occurs. Similarly, if each of $A_{1},\dots,A_{4}$ can be
partitioned into two $L$-coincidental pairs, then we must have

$\displaystyle a\sim c,\quad b\sim d,$ $\displaystyle((\lambda
a-c)\sim(\lambda b+c),\quad\lambda c\sim\lambda d)\quad\text{ or
}\quad((\lambda a-c)\sim\lambda d,\quad(\lambda b+c)\sim\lambda c),$
$\displaystyle(-\lambda b\sim(\lambda b+c),\quad(a+b)\sim d)\quad\text{ or
}\quad((\lambda b+c)\sim d,\quad(a+b)\sim-\lambda b),$
$\displaystyle((c-\lambda a)\sim\lambda a,\quad(a+b)\sim d)\quad\text{ or
}\quad((c-\lambda a)\sim(a+b),\quad\lambda a\sim d).$

This is because $b\sim d$, so we cannot have $-\lambda b\sim d$ in $A_{2}$.
Then we either have $(\lambda b+c)\sim d$ or $(\lambda b+c)\sim-\lambda b$ in
$A_{2}$, which means that $|(\lambda b+c)/d|$ is an odd power of $|\lambda|$,
so we cannot have $(\lambda b+c)\sim\lambda d$ in $A_{3}$. Then we either have
$(\lambda a-c)\sim(\lambda b+c)$ or $(\lambda a-c)\sim\lambda d$ in $A_{3}$,
which means that $|(\lambda a-c)/d|$ is an even power of $|\lambda|$, so we
cannot have $(c-\lambda a)\sim d$ in $A_{1}$. Therefore, we obtain $8\cdot
4^{6}$ possible systems of eight equations on five variables. Again, using a
computer search 333The code can be found at ‘case-a-2.nb’ in the supplemental
file., one can verify that none of these $8\cdot 4^{6}$ systems of equations
has a solution with $a,b,c,d\in\mathbb{Q}\setminus\\{0\\}$ and
$\lambda\setminus\\{-1,0,1\\}$.

Now suppose two of $L_{1},\dots,L_{5}$ are common. Without loss of generality,
suppose

$\displaystyle L_{5}\mathbf{x}$ $\displaystyle=x_{1}-x_{2}+\lambda
x_{3}-\lambda x_{4}$ $\displaystyle
A_{5}=\\{\\!\\!\\{1,-1,\lambda,-\lambda\\}\\!\\!\\}$ $\displaystyle
L_{4}\mathbf{x}$ $\displaystyle=x_{1}+\mu x_{2}-x_{3}-\mu x_{5}$
$\displaystyle A_{4}=\\{\\!\\!\\{1,-1,\mu,-\mu\\}\\!\\!\\}$ $\displaystyle
L_{3}\mathbf{x}$ $\displaystyle=(\lambda+1)x_{1}+(\lambda\mu-1)x_{2}-\lambda
x_{4}-\lambda\mu x_{5}\qquad$ $\displaystyle
A_{3}=\\{\\!\\!\\{\lambda+1,\lambda\mu-1,-\lambda,-\lambda\mu\\}\\!\\!\\}$
$\displaystyle L_{2}\mathbf{x}$
$\displaystyle=(\mu+1)x_{1}+(\lambda\mu-1)x_{3}-\lambda\mu x_{4}-\mu x_{5}$
$\displaystyle
A_{2}=\\{\\!\\!\\{\mu+1,\lambda\mu-1,-\mu,-\lambda\mu\\}\\!\\!\\}$
$\displaystyle L_{1}\mathbf{x}$
$\displaystyle=(\mu+1)x_{2}+(-\lambda-1)x_{3}+\lambda x_{4}-\mu x_{5}$
$\displaystyle A_{1}=\\{\\!\\!\\{\mu+1,-\lambda-1,\lambda,-\mu\\}\\!\\!\\}$

with $\lambda,\mu\in\mathbb{Q}\setminus\\{-1,0,1\\}$. Since $L_{4}$ and
$L_{5}$ are both common, $a\sim b$ corresponds to one of the eight identities
$\lambda a=b$, $\lambda a=-b$, $\lambda b=a$, $\lambda b=-a$, $\mu a=b$, $\mu
a=-b$, $\mu b=a$, $\mu b=-a$. Since $A_{1}$ can be partitioned into two
cancelling pairs, we must have

$(\mu+1)\sim(-\lambda-1),\quad\lambda\sim-\mu$

or

$(\mu+1)\sim\lambda,\quad(-\lambda-1)\sim-\mu$

or

$(\mu+1)\sim-\mu,\quad\lambda\sim(-\lambda-1).$

Thus, $\lambda,\mu\in\mathbb{Q}\setminus\\{-1,0,1\\}$ must satisfy one of the
$3\cdot 8^{2}$ possible systems of two equations on two variables. A computer
search 444The code can be found at ‘case-a-3.nb’ in the supplemental file.
gives that this is only possible when $(\lambda,\mu)$ have the following
values:

$\displaystyle(1/2,-1/4),\,(-1/4,1/2),\,(-2,-1/3),\,(-1/3,-2),$
$\displaystyle(-2,-2/3),\,(-2/3,-2),\,(1/2,-3/4),\,(-3/4,1/2),$
$\displaystyle(-2,3),\,(3,-2),\,(-2,-5),\,(-5,2),\,(-2,-2),\,(\lambda,-\lambda/(1+\lambda)).$

This is what we obtain just by assuming that $A_{1}$ can be partitioned into
two cancelling pairs. One can then verify that $A_{2},A_{3}$ cannot be both
partitioned into $L$-coincidental pairs in any of these solutions. ∎

###### Proof of Lemma 5.9.

Let $E$ denote the collection of those $i\in[5]$ that satisfies the condition
in Lemma 5.9. That is, for every $i\in E$, there exists some $a\in A_{i}$ such
that $a,b$ are not $L$-coincidental for any $b\in A_{i}$.

Suppose there exists $i_{0}\in E$ with
$A_{i_{0}}=\\{\\!\\!\\{1,1,1,1\\}\\!\\!\\}$ or
$\\{\\!\\!\\{-1,-1,-1,-1\\}\\!\\!\\}$. In this case, the Fourier template
$g:\mathbb{Z}\to\mathbb{C}$ defined by

$\displaystyle\begin{cases}g(1)=e(1/8)\\\ g(-1)=e(-1/8)\\\
g(r)=0&\text{otherwise}\end{cases}$

has $\sum_{i=1}^{5}\sigma_{A_{i}}(g)\leq-2<0$.

Otherwise, suppose there exists $i_{0}\in E$ with
$A_{i_{0}}=\\{\\!\\!\\{1,1,1,-1\\}\\!\\!\\}$ or
$\\{\\!\\!\\{1,-1,-1,-1\\}\\!\\!\\}$. In this case, the Fourier template
$g:\mathbb{Z}\to\mathbb{C}$ defined by

$\displaystyle\begin{cases}g(1)=i\\\ g(-1)=-i\\\
g(r)=0&\text{otherwise}\end{cases}$

has $\sum_{i=1}^{5}\sigma_{A_{i}}(g)\leq-2<0$.

Otherwise, suppose there exists $i_{0}\in E$ with
$A_{i_{0}}=\\{\\!\\!\\{a,a,a,b\\}\\!\\!\\}$ or
$\\{\\!\\!\\{a,a,-a,b\\}\\!\\!\\}$ with $|a|\neq|b|$. In this case, the
Fourier template $g:\mathbb{Z}\to\mathbb{C}$ defined by

$\displaystyle\begin{cases}g(a)=g(-a)=C\\\ g(b)=g(-b)=-1\\\
g(r)=0\quad\text{otherwise}\end{cases}$

has $\sum_{i=1}^{5}\sigma_{A_{i}}(g)=-2C^{3}+O(C^{2})$, which is negative for
$C>0$ sufficiently large.

Otherwise, suppose there exists $i_{0}\in E$ with
$A_{i_{0}}=\\{\\!\\!\\{a,a,b,b\\}\\!\\!\\}$ with $|a|\neq|b|$. In this case,
consider the joined Fourier template $h:\mathbb{Z}^{2}\to\mathbb{C}$ defined
by $h(r_{1},r_{2})=g(r_{1})\widetilde{g}(r_{2})$, where
$g,\widetilde{g}:\mathbb{Z}\to\mathbb{C}$ are 1-dimensional Fourier templates
given by

$\displaystyle\begin{cases}g(a)=g(b)=e(1/8)\\\ g(-a)=g(-b)=e(-1/8)\\\
g(r)=0\quad\text{otherwise}\end{cases}\qquad\begin{cases}\widetilde{g}(a)=\widetilde{g}(-b)=e(1/8)\\\
\widetilde{g}(-a)=\widetilde{g}(b)=e(-1/8)\\\
\widetilde{g}(r)=0\quad\text{otherwise.}\end{cases}$

Observe that, since $a,b$ are not $L$-coincidental, there is no $i\in[5]$ with
$A_{i}=\\{\\!\\!\\{a,-a,b,-b\\}\\!\\!\\}$. Thus,
$\sigma_{A_{i}}(h)=\sigma_{A_{i}}(g)\sigma_{A_{i}}(\widetilde{g})\neq 0$ if
and only if $A_{i}$ equals one of $\pm S_{1},\pm S_{2},\pm S_{3},\pm S_{4}$,
defined by

$\displaystyle S_{1}=\\{\\!\\!\\{a,a,b,b\\}\\!\\!\\},\quad
S_{2}=\\{\\!\\!\\{a,-a,b,b\\}\\!\\!\\},\quad
S_{3}=\\{\\!\\!\\{a,a,b,-b\\}\\!\\!\\},\quad
S_{4}=\\{\\!\\!\\{a,a,-b,-b\\}\\!\\!\\}.$

One can check that

$\displaystyle\sigma_{S_{1}}(g)$
$\displaystyle=g(a)^{2}g(b)^{2}+g(-a)^{2}g(-b)^{2}=-2,$
$\displaystyle\sigma_{S_{1}}(\widetilde{g})$
$\displaystyle=\widetilde{g}(a)^{2}\widetilde{g}(b)^{2}+\widetilde{g}(-a)^{2}\widetilde{g}(-b)^{2}=2,$

and similarly

$\displaystyle\sigma_{S_{2}}(g)=0\qquad$
$\displaystyle\sigma_{S_{3}}(g)=0\qquad$ $\displaystyle\sigma_{S_{4}}(g)=2$
$\displaystyle\sigma_{S_{2}}(\widetilde{g})=0\qquad$
$\displaystyle\sigma_{S_{3}}(\widetilde{g})=0$
$\displaystyle\sigma_{S_{4}}(\widetilde{g})=-2.$

Therefore, we have $\sigma_{A_{i}}(h)\leq 0$ for all $i\in[5]$. Since
$A_{i_{0}}=S_{1}$ with
$\sigma_{A_{i_{0}}}(h)=\sigma_{A_{i_{0}}}(g)\sigma_{A_{i_{0}}}(\widetilde{g})=-4$,
we get that $\sum_{i=1}^{5}\sigma_{A_{i}}(h)<0$.

Otherwise, suppose there exists $i_{0}\in E$ with
$A_{i_{0}}=\\{\\!\\!\\{a,a,b,-b\\}\\!\\!\\}$ with $|a|\neq|b|$. In this case,
consider the joined Fourier template $h:\mathbb{Z}^{2}\to\mathbb{C}$ defined
by $h(r_{1},r_{2})=g(r_{1})\widetilde{g}(r_{2})$, where
$g,\widetilde{g}:\mathbb{Z}\to\mathbb{C}$ are 1-dimensional Fourier templates
given by

$\displaystyle\begin{cases}g(a)=g(-a)=1\\\ g(b)=i,\,\,g(-b)=-i\\\
g(r)=0\quad\text{otherwise}\end{cases}\qquad\begin{cases}\widetilde{g}(b)=\widetilde{g}(-b)=1\\\
\widetilde{g}(a)=i,\,\,\widetilde{g}(-a)=-i\\\
\widetilde{g}(r)=0\quad\text{otherwise.}\end{cases}$

Again, since $a,b$ are not $L$-coincidental, there is no $i\in[5]$ with
$A_{i}=\\{\\!\\!\\{a,-a,b,-b\\}\\!\\!\\}$. Thus,
$\sigma_{A_{i}}(h)=\sigma_{A_{i}}(g)\sigma_{A_{j}}(\widetilde{g})\neq 0$ if
and only if $A_{i}$ is one of $\pm S_{2},\pm S_{3}$ defined above. One can
check that

$\displaystyle\sigma_{S_{2}}(g)=2\qquad\quad$
$\displaystyle\sigma_{S_{3}}(g)=-2$
$\displaystyle\sigma_{S_{2}}(\widetilde{g})=-2$
$\displaystyle\sigma_{S_{3}}(\widetilde{g})=2.$

Therefore, we have $\sigma_{A_{i}}(h)\leq 0$ for all $i\in[5]$. Since
$A_{i_{0}}=S_{3}$ with
$\sigma_{A_{i_{0}}}(h)=\sigma_{A_{i_{0}}}(g)\sigma_{A_{i_{0}}}(\widetilde{g})=-4$,
we get that $\sum_{i=1}^{5}\sigma_{A_{i}}(h)<0$.

Otherwise, suppose there exists $i_{0}\in E$ with
$A_{i_{0}}=\\{\\!\\!\\{a,a,b,c\\}\\!\\!\\}$ or
$\\{\\!\\!\\{a,-a,b,c\\}\\!\\!\\}$, $|a|,|b|,|c|$ distinct, and $a$ is not
$L$-coincidental with $b$ or $c$. In this case, the Fourier template
$g:\mathbb{Z}\to\mathbb{C}$ defined by

$\displaystyle\begin{cases}g(a)=g(-a)=C\\\ g(b)=g(-b)=1\\\ g(c)=g(-c)=-1\\\
g(r)=0\quad\text{otherwise}\end{cases}$

has $\sum_{i=1}^{5}\sigma_{A_{i}}(g)=-2C^{2}+O(C)$, which is negative for
$C>0$ sufficiently large.

Finally, suppose for all $i\in E$ and all $a\in A_{i}$ not $L$-coincidental
with any element in $A_{i}$, we have $|A_{i}\cap\\{a,-a\\}|=1$. In this case,
pick any $i_{0}\in E$ and suppose
$A_{i_{0}}=\\{\\!\\!\\{a_{0},b_{0},c_{0},d_{0}\\}\\!\\!\\}$, such that $a_{0}$
is not $L$-coincidental with any of $b_{0},c_{0},d_{0}$. Consider the Fourier
template $g:\mathbb{Z}\to\mathbb{C}$ defined by

$\displaystyle\begin{cases}g(a_{0})=g(-a_{0})=-C\\\
g(b_{0})=g(-b_{0})=g(c_{0})=g(-c_{0})=g(d_{0})=g(-d_{0})=1\\\
g(r)=0\quad\text{otherwise.}\end{cases}$

Then we have $\sigma_{A_{i_{0}}}(g)=-2C$. Moreover, for all
$i\in[5]\setminus\\{i_{0}\\}$, we either have $\sigma_{A_{i}}(g)=-2C$ or have
$|\sigma_{A_{i}}(g)|=O(1)$. Hence for sufficiently large $C>0$, we have
$\sum_{i=1}^{5}\sigma_{A_{i}}(g)<0$. ∎

###  B.2. Case B

We first prove Lemma 5.14. To do so, we introduce the notion of “periodic sum”
for $h_{A_{i}}$ on the multiplicative grid $G_{L}$.

######  Definition B.1.

Suppose $h:\pm G_{L}\to\mathbb{C}$ is function such that
$h_{A_{1}},\dots,h_{A_{5}}$ are $\vec{u}$-periodic (recall Definition 5.12).
Define

$\sigma(h_{A_{i}},\vec{u})=\sum_{\begin{subarray}{c}0\leq d_{1}\leq u_{1}-1\\\
\vdots\\\ 0\leq d_{\ell}\leq
u_{\ell}-1\end{subarray}}h_{A_{i}}(p_{1}^{d_{1}}\ldots
p_{\ell}^{d_{\ell}}\cdot r).$

###### Proof of Lemma 5.14.

For $D>0$, define $G_{D}=\\{p_{1}^{d_{1}}\cdots
p_{\ell}^{d_{\ell}}:d_{1},\dots,d_{\ell}\in\\{0,1,\dots,D\\}\\}$ to be a
finite truncation of $G_{L}$, and $g\colon\pm G_{D}\to\mathbb{C}$ by
$g(r)=h(r)$. Observe that, if $r\in\pm G_{D}$ satisfies

$\\{ap_{1}^{d_{1}}\cdots p_{\ell}^{d_{\ell}}r:a\in A_{1}\cup\dots\cup
A_{5},\,0\leq d_{1}<u_{1},\,\dots,\,0\leq d_{\ell}<u_{\ell}\\}\subseteq\pm
G_{D},$

then we will have

$\sum_{0\leq d_{1}<u_{1}}\cdots\sum_{0\leq
d_{\ell}<u_{\ell}}g_{A_{i}}(p_{1}^{d_{1}}\cdots
p_{\ell}^{d_{\ell}}r)=\sigma_{A_{i}}(h,\vec{u}).$

As $D\to\infty$, we have

$\frac{|\\{r\in\mathbb{Z}:g_{A_{i}}\neq 0\text{ for some
}i\in[5]\\}|}{|\\{r\in\pm G_{D}:\text{$r$ satisfies (*)}\\}|}\to 1.$

This captures the idea that the fraction of “boundary terms” become negligible
and the main contribution comes from the internal portion of the grid. That
is, we have

$\displaystyle
1=\lim_{D\to\infty}\frac{\sum_{i=1}^{5}\sigma_{A_{i}}(g)}{\sum_{i=1}^{5}\sum_{\begin{subarray}{c}r\in\pm
G_{D}\text{ satisfies
(*)}\end{subarray}}g_{A_{i}}(r)}=\lim_{D\to\infty}\frac{\sum_{i=1}^{5}\sigma_{A_{i}}(g)}{\sum_{i=1}^{5}2\text{Re}(\sigma_{A_{i}}(h,\vec{u}))\cdot
D^{\ell}/u_{1}\cdots u_{\ell}}.$

Therefore, given $\sum_{i=1}^{5}\text{Re}(\sigma_{A_{i}}(h,\vec{u}))<0$, we
know that $\sum_{i=1}^{5}\sigma_{A_{i}}(g)<0$ for $D$ sufficiently large. ∎

###### Proof of 5.24.

For $\gamma_{1},\gamma_{2}\in\mathbb{Q}\setminus\\{0\\}$, we wish to find
$t\in\mathbb{R}$ such that $1+\cos(\gamma_{1}t)+\cos(\gamma_{2}t)<0$. Without
loss of generality, suppose $\gamma_{1},\gamma_{2}>0$. The statement clearly
holds for $\gamma_{1}=\gamma_{2}$, so suppose $\gamma_{1}<\gamma_{2}$.

If $\gamma_{1}>\gamma_{2}/2$, we can take $t=\pi/\gamma_{2}$, so that
$\gamma_{2}t=\pi$ and $\pi/2<\gamma_{1}t<\pi$.

If $\gamma_{2}/3\leq\gamma_{1}<\gamma_{2}/2$, we can take
$t=\frac{8\pi}{3\gamma_{2}}$, so that $\gamma_{2}t=\frac{8\pi}{3}$ and
$\frac{8\pi}{9}\leq\gamma_{1}t<\frac{4\pi}{3}$.

If $\gamma_{1}<\gamma_{2}/3$, then
$(\frac{\gamma_{2}}{\gamma_{1}}\cdot\frac{2\pi}{3},\frac{\gamma_{2}}{\gamma_{1}}\cdot\frac{4\pi}{3})$
has length $>2\pi$, so we can find $t$ such that
$\gamma_{1}t,\gamma_{2}t\in(\frac{2\pi}{3},\frac{4\pi}{3})$.

Finally, if $\gamma_{2}=2\gamma_{1}$, we can take $t=1.4\pi/\gamma_{1}$, so
that $1+\cos(1.4\pi)+\cos(2.8\pi)<0$. ∎

###### Proof of 5.18.

Without loss of generality, assume
$0<\gamma_{1}\leq\gamma_{2}\leq\gamma_{3}\leq\gamma_{4}$. Suppose for the sake
of contradiction that
$f(t)=1+\cos(\gamma_{1}t)+\cos(\gamma_{2}t)+\cos(\gamma_{3}t)+\cos(\gamma_{4}t)\geq
0$ for all $t\in\mathbb{R}$. In particular, we have that $f(t_{k})\geq 0$ for
all $k\in\mathbb{Z}$, with $t_{k}:=\frac{(2k+1)\pi}{\gamma_{4}}$ . This choice
of $t_{k}$ ensures that $\cos(\gamma_{4}t_{k})=-1$, so we have
$f(t_{k})=\cos(\gamma_{1}t_{k})+\cos(\gamma_{2}t_{k})+\cos(\gamma_{3}t_{k})\geq
0$.

Observe that for any $m>0$, we have

$\sum_{k=0}^{\gamma_{4}-1}\cos(mt_{k})=\sum_{k=0}^{\gamma_{4}-1}\cos\left(\frac{m\pi}{\gamma_{4}}+\frac{2km\pi}{\gamma_{4}}\right)=\begin{cases}0&\text{if
}\gamma_{4}\nmid m\\\ (-1)^{m/\gamma_{4}}&\text{if }\gamma_{4}\mid
m.\end{cases}$

By the maximality of $\gamma_{4}$ and non-negativity of $f(\cdot)$, it follows
that

$0\leq\sum_{k=0}^{\gamma_{4}-1}f(t_{k})=\sum_{j=1}^{3}\sum_{k=0}^{\gamma_{4}-1}\cos(\gamma_{j}t_{k})=-\gamma_{4}|\\{i\in[3]:\gamma_{i}=\gamma_{4}\\}|\leq
0.$

Consequently equality holds in the above chain of inequalities, which implies
that we have:

  * •

$f(t_{k})=0$ for all $0\leq k\leq\gamma_{4}-1$,

  * •

$0<\gamma_{1},\gamma_{2},\gamma_{3}<\gamma_{4}$.

Thus, for all $i,j\in[3]$, we have $|\gamma_{i}-\gamma_{j}|<\gamma_{4}$ and
$0<\gamma_{i}+\gamma_{j}<2\gamma_{4}$. This gives

$\displaystyle 0=\sum_{k=0}^{\gamma_{4}-1}f(t_{k})^{2}$
$\displaystyle=\sum_{i,j=1}^{3}\sum_{k=0}^{\gamma_{4}-1}\cos(\gamma_{i}t_{k})\cos(\gamma_{j}t_{k})$
$\displaystyle=\frac{1}{2}\sum_{i,j=1}^{3}\sum_{k=0}^{\gamma_{4}-1}(\cos((\gamma_{i}+\gamma_{j})t_{k})+\cos((\gamma_{i}-\gamma_{j})t_{k}))$
$\displaystyle=\frac{\gamma_{4}}{2}(|\\{(i,j):i,j\in[3],\gamma_{i}=\gamma_{j}\\}|-|\\{(i,j):i,j\in[3],\gamma_{i}+\gamma_{j}=\gamma_{4}|).$

Since $|\\{(i,j):i,j\in[3],\gamma_{i}=\gamma_{j}\\}|\geq 3$, we must have
$|\\{(i,j):i,j\in[3],\gamma_{i}+\gamma_{j}=\gamma_{4}|\geq 3$, which implies
that $\gamma_{1}+\gamma_{3}=2\gamma_{2}=\gamma_{4}$. In particular, we have

$\displaystyle\cos(\gamma_{3}\pi/\gamma_{4})=\cos(\pi-\gamma_{1}\pi/\gamma_{4})=-\cos(\gamma_{1}\pi/\gamma_{4}),$
$\displaystyle\cos(\gamma_{2}\pi/\gamma_{4})=\cos(\pi/2)=0.$

Thus, at $t_{0}=\pi/\gamma_{4}$, we have

  * •

$f(t_{0})=\cos(\gamma_{1}t_{0})+\cos(\gamma_{2}t_{0})+\cos(\gamma_{3}t_{0})=0$,
and

  * •

$f^{\prime}(t_{0})=-\gamma_{1}\sin(\gamma_{1}t_{0})-\gamma_{2}\sin(\gamma_{2}t_{0})-\gamma_{3}\sin(\gamma_{3}t_{0})<0$
since $0<\gamma_{1}t_{0},\gamma_{2}t_{0},\gamma_{3}t_{0}<\gamma_{4}t_{0}=\pi$.

It follows that $f(t_{0}+\epsilon)<0$ for sufficiently small $\epsilon>0$,
which is a contradiction as desired. ∎

In the remainder of this section we prove Proposition 5.22. In order to handle
the more intricate cases when some of the $A_{i}$ are cancelling, we need to
introduce more notation.

######  Definition B.2.

For prime numbers $p\neq\widetilde{p}$ and multiset $A$, define
$V_{p,\widetilde{p}}(A)=\\{\\!\\!\\{(v_{p}(a),v_{\widetilde{p}}(a)):a\in
A\\}\\!\\!\\}$.

######  Example B.3.

Suppose $A=\\{\\!\\!\\{-1,2,6,-12\\}\\!\\!\\}$. Then

  * •

$V_{2}(A)=\\{\\!\\!\\{0,1,1,2\\}\\!\\!\\}$,
$V_{3}(A)=\\{\\!\\!\\{0,0,1,1\\}\\!\\!\\}$,

  * •

$V_{2,3}(A)=\\{\\!\\!\\{(0,0),(1,0),(1,1),(2,1)\\}\\!\\!\\}$.

######  Observation B.4.

Consider $a,a^{\prime}\in\mathbb{Z}\setminus\\{0\\}$ and prime number $p$.

If $v_{p}(a)\neq v_{p}(a^{\prime})$, then
$v_{p}(a+a^{\prime})=v_{p}(a-a^{\prime})=\min\\{v_{p}(a),v_{p}(a^{\prime})\\}$.

If $v_{p}(a)=v_{p}(a^{\prime})$, then
$v_{p}(a+a^{\prime}),v_{p}(a-a^{\prime})\geq v_{p}(a)$.

Recall that in Case B, we assume (5.11) that $L$ is of the form

$\displaystyle L_{5}\mathbf{x}$ $\displaystyle=x_{1}+x_{2}-x_{3}-x_{4}$
$\displaystyle A_{5}=\\{\\!\\!\\{1,1,-1,-1\\}\\!\\!\\}$ $\displaystyle
L_{4}\mathbf{x}$ $\displaystyle=ax_{1}+bx_{2}+cx_{3}+dx_{5}$ $\displaystyle
A_{4}=\\{\\!\\!\\{a,b,c,d\\}\\!\\!\\}$ $\displaystyle L_{3}\mathbf{x}$
$\displaystyle=(a+c)x_{1}+(b+c)x_{2}-cx_{4}+dx_{5}\qquad$ $\displaystyle
A_{3}=\\{\\!\\!\\{a+c,b+c,-c,d\\}\\!\\!\\}$ $\displaystyle L_{2}\mathbf{x}$
$\displaystyle=(a-b)x_{1}+(b+c)x_{3}+bx_{4}+dx_{5}$ $\displaystyle
A_{2}=\\{\\!\\!\\{a-b,b+c,b,d\\}\\!\\!\\}$ $\displaystyle L_{1}\mathbf{x}$
$\displaystyle=(b-a)x_{3}+(a+c)x_{3}+ax_{4}+dx_{5}$ $\displaystyle
A_{1}=\\{\\!\\!\\{b-a,a+c,a,d\\}\\!\\!\\}$

with $a,b,c,d\in\mathbb{Z}\setminus\\{0\\}$, and none of $L_{1},\dots,L_{4}$
is common. By replacing $a,b,c,d$ by their negations if necessary, we may
suppose that at least two of $a,b,c,d$ are positive.

######  Lemma B.5.

Suppose $L$ is an irredundant $2\times 5$ linear system that falls under Case
B in Corollary 5.3. Assume 5.11. Then there cannot be three cancelling sets
among $A_{1},\dots,A_{4}$.

###### Proof.

By contradiction, suppose three among these sets are cancelling. Up to
isomorphism, we can suppose $A_{2},A_{3},A_{4}$ are cancelling and $a>0$. We
then have four different cases dependings on the coefficients in
$L_{1},\dots,L_{5}$:

  1. (1)

$a>0$, $b>0$, $c<0$, $d<0$, $a+c>0$, $b+c<0$, $a-b>0$,

$ab=cd$, $-c(a+c)=(b+c)d$, $b(a-b)=d(b+c)$;

  2. (2)

$a>0$, $b>0$, $c<0$, $d<0$, $a+c<0$, $b+c>0$, $a-b<0$,

$ab=cd$, $-c(b+c)=(a+c)d$, $b(b+c)=d(a-b)$;

  3. (3)

$a>0$, $c>0$, $b<0$, $d<0$, $a+c>0$, $b+c>0$, $a-b>0$,

$ac=bd$, $(a+c)(b+c)=-cd$, $(a-b)(b+c)=bd$;

  4. (4)

$a>0$, $d>0$, $b<0$, $c<0$, $a+c<0$, $b+c<0$, $a-b>0$,

$ad=bc$, $(a+c)(b+c)=-cd$, $d(a-b)=b(b+c)$.

One can then check by computation that none of these cases has real solutions.
∎

######  Corollary B.6.

Suppose $L$ is an irredundant $2\times 5$ linear system that falls under Case
B in Corollary 5.3. Assume 5.11. Then up to isomorphism, at least one of the
following occurs:

  1. (1)

$A_{4}$ is cancelling and
$V_{p}(A_{4})=\\{\\!\\!\\{0,v_{1},v_{2},v_{1}+v_{2}\\}\\!\\!\\}$ with
$0<v_{1}<v_{2}$ for some prime $p$.

  2. (2)

$A_{4}$ is cancelling and $V_{p}(A_{4})=\\{\\!\\!\\{0,v,v,2v\\}\\!\\!\\}$ with
$v>0$ for some prime $p$.

  3. (3)

$A_{4}$ is cancelling and
$V_{p,\widetilde{p}}(A_{4})=\\{\\!\\!\\{(0,0),(v_{1},0),(0,v_{2}),(v_{1},v_{2})\\}\\!\\!\\}$
with $v_{1},v_{2}>0$ for some primes $p\neq\widetilde{p}$. Moreover, none of
$A_{1},A_{2},A_{3}$ is cancelling.

  4. (4)

$A_{4}$ is cancelling and
$V_{p,\widetilde{p}}(A_{4})=\\{\\!\\!\\{(0,0),(v_{1},0),(0,v_{2}),(v_{1},v_{2})\\}\\!\\!\\}$
with $v_{1},v_{2}>0$ for some primes $p\neq\widetilde{p}$. Moreover, there is
exactly one $i\in[3]$ such that the following two conditions hold:

     * (i)

$A_{i}$ is cancelling, and

     * (ii)

$V_{p^{\prime},\widetilde{p}^{\prime}}(A_{i})=\\{\\!\\!\\{(0,0),(w_{1},0),(0,w_{2}),(w_{1},w_{2})\\}\\!\\!\\}$
with $w_{1},w_{2}>0$ for some primes $p^{\prime}\neq\widetilde{p}^{\prime}$.

We now state a reduction step which says that, when $h:\pm G_{L}\to\mathbb{C}$
satisfies certain conditions, we can combine it with constructions in 5.16 and
Proposition 5.17 appropriately, to obtain Fourier template $g$ with
$\sum_{i=1}^{5}\sigma_{A_{i}}(g)<0$.

######  Definition B.7.

Let $A$ be a multiset of size 4. We say that $A$ is (P2) if it contains two
positive and two negative elements, and is (P3) if it contains three positive
and one negative elements.

######  Proposition B.8.

Suppose $L$ is an irredundant $2\times 5$ linear system that falls under Case
B in Corollary 5.3. Assume 5.11. Moreover, suppose $A_{4}$ is cancelling, and
one of the following holds:

  1. (1)

One of $A_{1},A_{2},A_{3}$ is cancelling, and there exists $h:\pm
G_{L}\to\mathbb{C}$ such that $h_{A_{1}},\dots,h_{A_{5}}$ are
$\vec{u}$-periodic, with $\sum_{i\in[5],\,A_{i}\text{
cancelling}}\sigma(h_{A_{i}},\vec{u})<0$.

  2. (2)

None of $A_{1},A_{2},A_{3}$ is cancelling, and there exists $h:\pm
G_{L}\to\mathbb{C}$ such that $h_{A_{1}},\dots,h_{A_{5}}$ are
$\vec{u}$-periodic, with
$\sigma(h_{A_{5}},\vec{u})+\sigma(h_{A_{4}},\vec{u})=0$ and
$|\\{i\in[3]:\text{Re}(\sigma(h_{A_{i}},\vec{u}))\neq 0\\}|\in\\{1,3\\}$.

Then there exists a Fourier template $g:\mathbb{Z}^{d}\to\mathbb{C}$ such that
$\sum_{i=1}^{5}\sigma_{A_{i}}(g)<0$.

######  Remark B.9.

The caveat here is that, if for some $h:\pm G_{L}\to\mathbb{C}$ we have
$\sigma(h_{A_{5}},\vec{u})+\sigma(h_{A_{4}},\vec{u})=0$ and
$|\\{i\in[3]:\text{Re}(\sigma(h_{A_{i}},\vec{u}))\neq 0\\}|=2$, we might not
be able to produce, based on this, a Fourier template $g$ with
$\text{Re}\sum_{i=1}^{5}\sigma(h_{A_{i}},\vec{u})$ strictly less than 0\. (For
example, $1-1+xe^{i\gamma t}-xe^{i\gamma t}+0=0$ no matter what value $t$
takes.)

###### Proof of Proposition B.8.

We work under 5.11. One can check that, since $A_{4}$ is cancelling, either
$A_{1},\dots,A_{4}$ are all (P2), or two of them are (P2) and the other two
are (P3).

Recall that the function $h_{2}$ defined in 5.16 satisfies

$\displaystyle(h_{2})_{A_{i}}=\begin{cases}1&\text{$A_{i}$ is (P2)}\\\
-1&\text{$A_{i}$ is (P3)}.\end{cases}$

The function $h_{3}$ (with $\theta_{1},\dots,\theta_{\ell},t$ to be
determined) defined in Proposition 5.17 satisfies

$\displaystyle(h_{3})_{A_{i}}=\begin{cases}1&\text{$A_{i}$ is cancelling}\\\
e^{i\gamma t},\,\gamma\neq 0&\text{$A_{i}$ is (P2) but not
cancelling.}\end{cases}$

Suppose condition (1) in Proposition B.8 occurs. Then we can pick
$\theta_{1},\dots,\theta_{\ell},t$ so that the corresponding $h_{3}$ has

$\text{Re}\sum_{\begin{subarray}{c}\text{$A_{i}$ is (P2) but}\\\ \text{not
cancelling}\end{subarray}}\sigma((hh_{3})_{A_{i}},\vec{u})\leq 0,$

which then gives

$\text{Re}\sum_{\text{$A_{i}$ is (P2)}}\sigma((hh_{3})_{A_{i}},\vec{u})<0.$

Let $g$ be the finite truncation of $hh_{3}$ (recall Lemma 5.14) and $g_{2}$
be the finite truncation of $h_{2}$. Then, by Proposition 3.6, we have either

$\sum_{i=1}^{5}\sigma_{A_{i}}(g)<0\qquad\text{ or
}\qquad\sum_{i=1}^{5}\sigma_{A_{i}}(gg_{2})<0.$

Suppose condition (2) in Proposition B.8 occurs. If exactly one $i_{0}\in[3]$
has $\text{Re}(\sigma(h_{A_{i_{0}}},\vec{u}))\neq 0$, and this $A_{i_{0}}$ is
(P3), then letting $g$ be the finite truncation of $h$ and $g_{2}$ be the
finite truncation of $h_{2}$, we have either

$\sum_{i=1}^{5}\sigma_{A_{i}}(g)<0\qquad\text{or}\qquad\sum_{i=1}^{5}\sigma_{A_{i}}(gg_{2})<0.$

Otherwise, we have

$|\\{i\in[3]:\text{Re}(\sigma(h_{A_{i}},\vec{u}))\neq 0,\,\text{$A_{i}$ is
(P2)}\\}|\in\\{1,3\\},$

so we can pick $\theta_{1},\dots,\theta_{\ell},t$ such that

$\text{Re}\sum_{\text{$A_{i}$ is (P2)}}\sigma((hh_{3})_{A_{i}},\vec{u})<0.$

Again, letting $g$ be the finite truncation of $hh_{3}$ and $g_{2}$ be the
finite truncation of $h_{2}$, we have either

$\sum_{i=1}^{5}\sigma_{A_{i}}(g)<0\qquad\text{or}\qquad\sum_{i=1}^{5}\sigma_{A_{i}}(gg_{2})<0.$

∎

We will show in Propositions B.10, B.11, B.12 and B.13 that, in each of the
four cases listed in Corollary B.6, there exists some Fourier template
$g:\mathbb{Z}^{d}\to\mathbb{C}$ such that $\sum_{i=1}^{5}\sigma_{A_{i}}(g)<0$.

######  Proposition B.10.

Suppose $L$ is an irredundant $2\times 5$ linear system that falls under Case
B in Corollary 5.3. Assume 5.11. Moreover, suppose $A_{4}$ is cancelling and

$V_{p_{1}}(A_{4})=\\{\\!\\!\\{0,v_{1},v_{2},v_{1}+v_{2}\\}\\!\\!\\},\quad\,0<v_{1}<v_{2}<v_{1}+v_{2}.$

Then there exists a Fourier template $g:\mathbb{Z}^{d}\to\mathbb{C}$ such that
$\sum_{i=1}^{5}\sigma_{A_{i}}(g)<0$.

###### Proof.

Suppose $\text{gcd}(v_{1},v_{2})=1$. By B.4 and the fact that
$V_{p_{1}}(A_{4})=\\{\\!\\!\\{0,v_{1},v_{2},v_{1}+v_{2}\\}\\!\\!\\}$, one can
check that $\\{V_{p_{1}}(A_{1}),V_{p_{1}}(A_{2}),V_{p_{1}}(A_{3})\\}$ must be
one of the following:

  * •

$\\{\\{\\!\\!\\{0,0,0,v_{1}+v_{2}\\}\\!\\!\\},\\{\\!\\!\\{0,v_{1},v_{1},v_{1}+v_{2}\\}\\!\\!\\},\\{\\!\\!\\{0,v_{1},v_{2},v_{1}+v_{2}\\}\\!\\!\\}\\}$,

  * •

$\\{\\{\\!\\!\\{0,0,0,v_{1}\\}\\!\\!\\},\\{\\!\\!\\{0,v_{2},v_{2},v_{1}\\}\\!\\!\\},\\{\\!\\!\\{0,v_{2},v_{1}+v_{2},v_{1}\\}\\!\\!\\}\\}$,

  * •

$\\{\\{\\!\\!\\{0,0,0,v_{2}\\}\\!\\!\\},\\{\\!\\!\\{0,v_{1},v_{1},v_{2}\\}\\!\\!\\},\\{\\!\\!\\{0,v_{1},v_{2},v_{1}+v_{2}\\}\\!\\!\\}\\}$,

  * •

$\\{\\{\\!\\!\\{0,v_{1},v_{1},v_{1}\\}\\!\\!\\},\\{\\!\\!\\{0,v_{1},v_{2},v_{2}\\}\\!\\!\\},\\{\\!\\!\\{v_{1},v_{2},v_{1}+v_{2},0\\}\\!\\!\\}\\}$.

Let

$\displaystyle\mathcal{V}$
$\displaystyle=\\{\\{\\!\\!\\{0,0,0,v_{1}\\}\\!\\!\\},\\{\\!\\!\\{0,0,0,v_{2}\\}\\!\\!\\},\\{\\!\\!\\{0,0,0,v_{1}+v_{2}\\}\\!\\!\\},\\{\\!\\!\\{0,v_{1},v_{1},v_{1}\\}\\!\\!\\},$
$\displaystyle\qquad\\{\\!\\!\\{0,v_{1},v_{1},v_{2}\\}\\!\\!\\},\\{\\!\\!\\{0,v_{1},v_{1},v_{1}+v_{2}\\}\\!\\!\\},\\{\\!\\!\\{0,v_{1},v_{2},v_{2}\\}\\!\\!\\},\\{\\!\\!\\{0,v_{1},v_{2},v_{1}+v_{2}\\}\\!\\!\\}\\}$

denote the collection of all 4-multisets that appeared in the above
possibilities. Also, let

$W=V_{p_{1}}(A_{4})=\\{\\!\\!\\{0,v_{1},v_{2},v_{1}+v_{2}\\}\\!\\!\\}.$

Suppose first that one of $v_{1},v_{2}$ is even. Call this even number
$u_{e}$. Define $\phi:\\{0,1,\dots\\}\to\mathbb{R}$ by

$\displaystyle\begin{cases}\phi(v)=-1&v\equiv 0,2,\dots,u_{e}-2\mod 2u_{e}\\\
\phi(v)=1&\text{otherwise}\end{cases}$

and $h=\phi\circ v_{p_{1}}:\pm G_{L}\to\mathbb{R}$. Let
$\vec{u}=(2u_{e},1,\dots,1)$. Then $h_{A_{1}},\dots,h_{A_{5}}$ are
$\vec{u}$-periodic, with

$\displaystyle\sigma(h_{A_{i}},\vec{u})=\begin{cases}2u_{e}&A_{i}=A_{5}\\\
-2u_{e}&V_{p_{1}}(A_{i})=W\\\
0&V_{p_{1}}(A_{i})\in\mathcal{V}\setminus\\{W\\}.\end{cases}$

Since exactly two elements $i\in[4]$ have $V_{p_{1}}(A_{i})=W$, we get that
$\sum_{i=1}^{5}\sigma(h_{A_{i}},\vec{u})=-2u_{e}<0$, so Lemma 5.14 applies.

Suppose $v_{1},v_{2}$ are both odd. In this case, we build $h=\phi\circ
v_{p_{1}}:\pm G_{L}\to\mathbb{C}$ that satisfies Proposition B.8. If
$v_{1}+v_{2}$ is a multiple of 4, define $u_{e}=v_{1}+v_{2}$ and
$w_{e}=v_{2}-v_{1}$; if $v_{1}-v_{2}$ is a multiple of 4, define
$u_{e}=v_{2}-v_{1}$ and $w_{e}=v_{1}+v_{2}$.

Note that $w_{e}$ is a multiple of 2 but not 4, and
$\text{gcd}(w_{e}/2,u_{e}/2)=1$. This means that $w_{e}$ has order $u_{e}/2$
in $\mathbb{Z}_{u_{e}}$, so we can define $\phi:\\{0,1,\dots\\}\to\mathbb{R}$
by

$\displaystyle\begin{cases}\phi(v)=-1&v\equiv
0,1,2w_{e},2w_{e}+1,\dots,-2w_{e},-2w_{e}+1\mod u_{e}\\\
\phi(v)=1&\text{otherwise.}\end{cases}$

Let $\vec{u}=(u_{e},1,\dots,1)$. Then $h_{A_{1}},\dots,h_{A_{5}}$ are
$\vec{u}$-periodic, with

$\displaystyle\sigma(h_{A_{i}},\vec{u})=\begin{cases}2u_{e}&A_{i}=A_{5}\\\
-2u_{e}&V_{p_{1}}(A_{i})=\\{\\!\\!\\{0,v_{1},v_{2},v_{1}+v_{2}\\}\\!\\!\\}\\\
2u_{e}\text{ or
}-2u_{e}&V_{p_{1}}(A_{i})\in\\{\\{\\!\\!\\{0,0,0,v_{1}+v_{2}\\}\\!\\!\\},\,\\{\\!\\!\\{0,v_{1},v_{1},v_{1}+v_{2}\\}\\!\\!\\}\\}\\\
0&\text{otherwise.}\end{cases}$

This implies the condition of Proposition B.8, so we are done.

In general, for $\text{gcd}(v_{1},v_{2})=w>1$, up to replacing $\phi(v)$ by
$\phi(\left\lfloor v/w\right\rfloor)$ and the period
$\vec{u}=(u_{1},1,\dots,1)$ by $(u_{1}w_{1},1,\dots,1)$, we can still use the
previous constructions. ∎

######  Proposition B.11.

Suppose $L$ is an irredundant $2\times 5$ linear system that falls under Case
B in Corollary 5.3. Assume 5.11. Moreover, suppose $A_{4}$ is cancelling and

$V_{p_{1}}(A_{4})=\\{\\!\\!\\{0,v,v,2v\\}\\!\\!\\},\qquad v>0.$

Then there exists a Fourier template $g:\mathbb{Z}^{d}\to\mathbb{C}$ such that
$\sum_{i=1}^{5}\sigma_{A_{i}}(g)<0$.

###### Proof.

We first assume that $v=1$, i.e.,
$V_{p_{1}}(A_{4})=\\{\\!\\!\\{0,1,1,2\\}\\!\\!\\}$. Using B.4, one can check
that $\\{V_{p_{1}}(A_{1}),V_{p_{1}}(A_{2}),V_{p_{1}}(A_{3})\\}$ must be one of
the following form:

  * •

$\\{\\{\\!\\!\\{0,0,0,2\\}\\!\\!\\},\\{\\!\\!\\{0,1,x,2\\}\\!\\!\\},\\{\\!\\!\\{0,1,x,2\\}\\!\\!\\}\\}$
for some $x\geq 1$,

  * •

$\\{\\{\\!\\!\\{0,0,0,1\\}\\!\\!\\},\\{\\!\\!\\{0,1,1,1\\}\\!\\!\\},\\{\\!\\!\\{0,1,2,1\\}\\!\\!\\}\\}$,

  * •

$\\{\\{\\!\\!\\{1,x,2,0\\}\\!\\!\\},\\{\\!\\!\\{1,x,2,0\\}\\!\\!\\},\\{\\!\\!\\{1,1,2,0\\}\\!\\!\\}\\}$
for some $x\geq 1$.

Suppose $A_{i}$ is cancelling for some $i\in[3]$. Then we have
$V_{p_{1}}(A_{i})=\\{\\!\\!\\{0,1,x,2\\}\\!\\!\\}$ with $x=1$ or 3. If $x=3$,
then we can apply Proposition B.10 to find the desired $g$. If $x=1$, define
$h:\pm G_{L}\to\mathbb{C}$ by

$\displaystyle\begin{cases}h(r)=i&v_{p_{1}}(r)\text{ odd},\,r>0\\\
h(r)=-i&v_{p_{1}}(r)\text{ odd},\,r<0\\\ h(r)=1&v_{p_{1}}(r)\text{
even}\end{cases}$

so that for every $i\in[5]$, $h_{A_{i}}$ is $\vec{u}$-periodic with
$\vec{u}=(2,1,\dots,1)$. Moreover, we have

$\displaystyle\sigma(h_{A_{i}},\vec{u})=\begin{cases}2&A_{i}=A_{5}\\\
-2&i\in[4],\,\text{$A_{i}$ is cancelling.}\end{cases}$

This gives $\sum_{\text{$A_{i}$
cancelling}}\sigma(h_{A_{i}},\vec{u})\leq-2<0$, so Proposition B.8 applies.

Now suppose that none of $A_{1},A_{2},A_{3}$ is cancelling. In this case,
define $h:\pm G_{L}\to\mathbb{C}$ by

$\displaystyle\begin{cases}h(r)=e(1/8)&v_{p_{1}}(r)\text{ odd},\,r>0\text{ or
}v_{p_{1}}(r)\text{ even},\,r<0\\\ h(r)=e(-1/8)&v_{p_{1}}(r)\text{
odd},\,r<0\text{ or }v_{p_{1}}(r)\text{ even},\,r>0.\end{cases}$

One can check that

  * •

$h_{A_{5}}=1$ and $h_{A_{4}}=-1$ on $\pm G_{L}$;

  * •

if $A_{i}$ is (P3), and $V_{p_{1}}(A_{i})$ contains an odd number of even
elements, then $h_{A_{i}}$ is a constant function that is either 1 or $-1$;

  * •

if $A_{i}$ is (P2), and $V_{p_{1}}(A_{i})$ contains an even number of even
elements, then $h_{A_{i}}$ is a constant function that is either 1 or $-1$;

  * •

otherwise, $\text{Re}(\sigma(h_{A_{i}},\vec{u}))=0$.

This implies the condition of Proposition B.8(2), so we are done.

In general, suppose $\text{gcd}(v_{1},v_{2})=w>1$. If all elements in
$V_{p_{1}}(A_{1})\cup V_{p_{1}}(A_{2})\cup V_{p_{1}}(A_{3})$ are divisible by
$v$, then we can use the above constructions up to replacing $v_{p_{1}}(r)$ by
$\left\lfloor v_{p_{1}}(r)/v\right\rfloor$. Thus, it suffices to assume that
$\\{V_{p_{1}}(A_{1}),V_{p_{1}}(A_{2}),V_{p_{1}}(A_{3})\\}$ equals
$\\{\\{\\!\\!\\{0,0,0,2w\\}\\!\\!\\},\\{\\!\\!\\{0,w,x,2w\\}\\!\\!\\},\\{\\!\\!\\{0,w,x,2w\\}\\!\\!\\}\\}$
or
$\\{\\{\\!\\!\\{w,x,2w,0\\}\\!\\!\\},\\{\\!\\!\\{w,x,2w,0\\}\\!\\!\\},\\{\\!\\!\\{w,w,2w,0\\}\\!\\!\\}\\}$
with $w\nmid x$. Define $h:\pm G\to\mathbb{C}$ by

$\displaystyle\begin{cases}h(r)=1&\left\lfloor
v_{p_{1}}(r)/(2w)\right\rfloor\text{ even}\\\ h(r)=-1&\left\lfloor
v_{p_{1}}(r)/(2w)\right\rfloor\text{ odd}.\end{cases}$

In this case, one can check that

  * •

$h_{A_{5}}=1$ and $h_{A_{4}}=-1$ on $\pm G_{L}$;

  * •

$h_{A_{1}}$, $h_{A_{2}}$, $h_{A_{3}}$ are $\vec{u}$-periodic with
$\vec{u}=(4w,1,\dots,1)$;

  * •

$\sigma(h_{A_{1}},\vec{u})$, $\sigma(h_{A_{2}},\vec{u})$,
$\sigma(h_{A_{3}},\vec{u})$ are all nonzero.

Again, this implies the condition of Proposition B.8(2), so we are done. ∎

######  Proposition B.12.

Suppose $L$ is an irredundant $2\times 5$ linear system that falls under Case
B in Corollary 5.3. Assume 5.11. Moreover, suppose $A_{4}$ is cancelling, none
of $A_{1},A_{2},A_{3}$ is cancelling, and

$V_{p_{1},p_{2}}(A_{4})=\\{\\!\\!\\{(0,0),(v_{1},0),(0,v_{2}),(v_{1},v_{2})\\}\\!\\!\\},\qquad
v_{1},v_{2}>0.$

Then there exists a Fourier template $g:\mathbb{Z}^{d}\to\mathbb{C}$ such that
$\sum_{i=1}^{5}\sigma_{A_{i}}(g)<0$.

###### Proof.

Using B.4, one can check that
$\\{V_{p_{1},p_{2}}(A_{1}),V_{p_{1},p_{2}}(A_{2}),V_{p_{1},p_{2}}(A_{3})\\}$
must be one of the following form:

  * •

$\\{\\{\\!\\!\\{(v_{1},0),(0,0),(x,0),(0,0)\\}\\!\\!\\},\\{\\!\\!\\{(0,0),(0,v_{2}),(0,y),(0,0)\\}\\!\\!\\},\\{\\!\\!\\{(x,0),(0,y),(v_{1},v_{2}),(0,0)\\}\\!\\!\\}\\}$

  * •

$\\{\\{\\!\\!\\{(0,0),(x,0),(0,y),(v_{1},v_{2})\\}\\!\\!\\},\\{\\!\\!\\{(x,0),(0,v_{2}),(0,0),(v_{1},v_{2})\\}\\!\\!\\},\\{\\!\\!\\{(0,y),(0,0),(v_{1},0),(v_{1},v_{2})\\}\\!\\!\\}\\}$

  * •

$\\{\\{\\!\\!\\{(0,0),(x,0),(0,0),(v_{1},0)\\}\\!\\!\\},\\{\\!\\!\\{(x,0),(0,v_{2}),(0,y),(v_{1},0)\\}\\!\\!\\},\\{\\!\\!\\{(0,0),(0,y),(v_{1},v_{2}),(v_{1},0)\\}\\!\\!\\}\\}$

  * •

$\\{\\{\\!\\!\\{(0,0),(0,y),(0,0),(0,v_{2})\\}\\!\\!\\},\\{\\!\\!\\{(0,y),(v_{1},0),(x,0),(0,v_{2})\\}\\!\\!\\},\\{\\!\\!\\{(0,0),(x,0),(v_{1},v_{2}),(0,v_{2})\\}\\!\\!\\}\\}$

where $x,y\geq 0$.

Suppose first that $v_{1}\mid x$ and $v_{2}\mid y$. In this case, define
$h:\pm G_{L}\to\mathbb{C}$ by

$\displaystyle\begin{cases}h(r)=e(1/8)&\left\lfloor
v_{p_{1}}(r)/v_{1}\right\rfloor\equiv\left\lfloor
v_{p_{2}}(r)/v_{2}\right\rfloor\mod 2,\,r>0\\\ &\text{ or }\left\lfloor
v_{p_{1}}(r)/v_{1}\right\rfloor\not\equiv\left\lfloor
v_{p_{2}}(r)/v_{2}\right\rfloor\mod 2,\,r<0\\\ h(r)=e(-1/8)&\left\lfloor
v_{p_{1}}(r)/v_{1}\right\rfloor\not\equiv\left\lfloor
v_{p_{2}}(r)/v_{2}\right\rfloor\mod 2,\,r>0\\\ &\text{ or }\left\lfloor
v_{p_{1}}(r)/v_{1}\right\rfloor\equiv\left\lfloor
v_{p_{2}}(r)/v_{2}\right\rfloor\mod 2,\,r<0.\end{cases}$

In this case, one can check that

  * •

$h_{A_{5}}=1$ and $h_{A_{4}}=-1$;

  * •

if $A_{i}$ is cancelling for some $i\in[3]$, then $A_{i}=A_{4}$ and
$h_{A_{i}}=h_{A_{4}}=-1$;

  * •

if $A_{i}$ is (P3) and $V_{p_{1}}(A_{i})$ contains an odd number of elements
in $\\{(0,0),(v_{1},v_{2})\\}$, then $h_{A_{i}}$ is a constant function that
is either 1 or $-1$;

  * •

if $A_{i}$ is (P2) and $V_{p_{1}}(A_{i})$ contains an even number of elements
in $\\{(0,0),(v_{1},v_{2})\\}$, then $h_{A_{i}}$ is a constant function that
is either 1 or $-1$;

  * •

otherwise, $\text{Re}(\sigma(h_{A_{i}},\vec{u}))=0$.

Thus, in each of the above possibilities of
$\\{V_{p_{1},p_{2}}(A_{1}),V_{p_{1},p_{2}}(A_{2}),V_{p_{1},p_{2}}(A_{3})\\}$,
the condition of Proposition B.8 holds.

Suppose now that $2x\mid v_{1}$ and $2y\mid v_{2}$; moreover, either $x\equiv
v_{1}/2\mod v_{1}$ or $y\equiv v_{2}/2\mod v_{2}$. In this case, define $h:\pm
G_{L}\to\mathbb{C}$ by $h=h_{1}h_{2}$ or $h=h_{1}h_{3}$, where

$\displaystyle\begin{cases}h_{1}(r)=1&\left\lfloor
v_{p_{1}}(r)/v_{1}\right\rfloor\equiv\left\lfloor
v_{p_{2}}(r)/v_{2}\right\rfloor\equiv 0\mod 2\\\
h_{1}(r)=-1&\text{otherwise}\end{cases}$
$\displaystyle\begin{cases}h_{2}(r)=1&\left\lfloor
v_{p_{1}}(r)/y\right\rfloor+\left\lfloor v_{p_{2}}(r)/y\right\rfloor\equiv
0\mod 2\\\ h_{2}(r)=i&\left\lfloor v_{p_{1}}(r)/y\right\rfloor+\left\lfloor
v_{p_{2}}(r)/y\right\rfloor\equiv 0\mod 2,\,r>0\\\ h_{2}(r)=-i&\left\lfloor
v_{p_{1}}(r)/y\right\rfloor+\left\lfloor v_{p_{2}}(r)/y\right\rfloor\equiv
0\mod 2,\,r<0\end{cases}$ $\displaystyle\begin{cases}h_{2}(r)=1&\left\lfloor
v_{p_{1}}(r)/y\right\rfloor+\left\lfloor v_{p_{2}}(r)/y\right\rfloor\equiv
0\mod 2\\\ h_{2}(r)=-i&\left\lfloor v_{p_{1}}(r)/y\right\rfloor+\left\lfloor
v_{p_{2}}(r)/y\right\rfloor\equiv 0\mod 2,\,r>0\\\ h_{2}(r)=i&\left\lfloor
v_{p_{1}}(r)/y\right\rfloor+\left\lfloor v_{p_{2}}(r)/y\right\rfloor\equiv
0\mod 2,\,r<0.\end{cases}$

In this case, one can check that

  * •

$h_{A_{5}}=1$ and $h_{A_{4}}=-1$;

  * •

By picking $h\in\\{h_{1}h_{2},h_{1}h_{3}\\}$ apprpriately, we have
$|\\{i\in[3]:\text{Re}(\sigma(h_{A_{i}},\vec{u}))\neq 0|\in\\{1,3\\}$.

Finally, suppose we have $2v_{1}\nmid y$ or $2v_{2}\nmid y$. Set

$\displaystyle\begin{cases}h(r)=-1&\left\lfloor
v_{p_{1}}(r)/v_{1}\right\rfloor,\left\lfloor
v_{p_{2}}(r)/v_{2}\right\rfloor\text{ both odd}\\\
h(r)=1&\text{otherwise}.\end{cases}$

so that $h_{A_{1}},\dots,h_{A_{5}}$ are $\vec{u}$-periodic with period
$\vec{u}=(2v_{1},2v_{2},1,\dots,1)$. Moreover, we have
$\sigma(h_{A_{5}},\vec{u})=4v_{1}v_{2}$,
$\sigma(h_{A_{4}},\vec{u})=-4v_{1}v_{2}$, and
$\sigma(h_{A_{3}},\vec{u}),\sigma(h_{A_{2}},\vec{u}),\sigma(h_{A_{1}},\vec{u})$
are all nonzero. Thus the condition of Proposition B.8 always holds, so we are
done. ∎

######  Proposition B.13.

Suppose $L$ is an irredundant $2\times 5$ linear system that falls under Case
B in Corollary 5.3. Assume 5.11. Moreover, suppose

  * •

$A_{4}$ is cancelling and
$V_{p_{1},p_{2}}(A_{4})=\\{\\!\\!\\{(0,0),(v_{1},0),(0,v_{2}),(v_{1},v_{2})\\}\\!\\!\\}$
with $v_{1},v_{2}>0$.

  * •

$A_{i_{0}}$ is cancelling for some $i_{0}\in[3]$, and
$V_{p_{j_{1}},p_{j_{2}}}(A_{i})=\\{\\!\\!\\{(0,0),(w_{1},0),(0,w_{2}),(w_{1},w_{2})\\}\\!\\!\\}$
with $w_{1},w_{2}>0$.

  * •

$A_{i}$ is not cancelling for all $i\in[3]\setminus\\{i_{0}\\}$.

Then there exists a Fourier template $g:\mathbb{Z}^{d}\to\mathbb{C}$ such that
$\sum_{i=1}^{5}\sigma_{A_{i}}(g)<0$.

###### Proof.

Suppose first that $p_{1}=p_{j_{1}}$ and $p_{2}=p_{j_{2}}$. In this case, we
must have $v_{1}=w_{1}$ and $v_{2}=w_{2}$. Consider $h:\pm G_{L}\to\mathbb{C}$
defined by

$\displaystyle\begin{cases}h(r)=-1&\left\lfloor
v_{p_{1}}(r)/v_{1}\right\rfloor\equiv\left\lfloor
v_{p_{2}}(r)/v_{2}\right\rfloor\equiv 0\mod 2\\\
h(r)=1&\text{otherwise}\end{cases}$

so that $h_{A_{4}},h_{A_{i_{0}}}$ are the constant $-1$ function on $\pm
G_{L}$. This implies the condition of Proposition B.8(1).

Now suppose $\\{p_{1},p_{2}\\}\neq\\{p_{j_{1}},p_{j_{2}}\\}$. In this case,
since $A_{4},A_{i_{0}}$ are cancelling, $V_{p_{1},p_{2}}(A_{i_{0}})$ and
$V_{p_{j_{1}},p_{j_{2}}}(A_{4})$ can be partitioned into cancelling pairs.
Consider two function $h,h^{\prime}:\pm G\to\mathbb{C}$ defined by

$\displaystyle\begin{cases}h(r)=-1&\left\lfloor
v_{p_{1}}(r)/v_{1}\right\rfloor\equiv\left\lfloor
v_{p_{2}}(r)/v_{2}\right\rfloor\equiv 0\mod 2\\\
h(r)=1&\text{otherwise,}\end{cases}$
$\displaystyle\begin{cases}h^{\prime}(r)=-1&\left\lfloor
v_{p_{j_{1}}}(r)/w_{1}\right\rfloor\equiv\left\lfloor
v_{p_{j_{2}}}(r)/w_{2}\right\rfloor\equiv 0\mod 2\\\
h^{\prime}(r)=1&\text{otherwise.}\end{cases}$

We already know that $h_{A_{4}}$ and $h_{A_{i_{0}}}^{\prime}$ are the constant
$-1$ function. Moreover, since $V_{p_{1},p_{2}}(A_{i_{0}})$ and
$V_{p_{j_{1}},p_{j_{2}}}(A_{4})$ can be partitioned into cancelling pairs, we
additionally know that $h^{\prime}_{A_{4}}$ and $h_{A_{i_{0}}}$ are the
constant 1 function. Therefore, $(hh^{\prime})_{A_{4}}$ and
$(hh^{\prime})_{A_{i_{0}}}$ are the constant $-1$ function. Again, this
implies the condition of Proposition B.8(1), so we are done. ∎

###  B.3. Case D

In this subsection, we give the reduction to Section 5.5. We begin by
recalling the setup. Recall that we had the following system $L$,

$\displaystyle L_{5}=x_{1}-x_{2}+\alpha x_{3}-\alpha x_{4}$ $\displaystyle
L_{4}=x_{1}+\beta x_{2}-x_{3}-\beta x_{5}$ $\displaystyle
L_{3}=(\alpha+1)x_{1}+(\alpha\beta-1)x_{2}-\alpha x_{4}-\alpha\beta x_{5}$
$\displaystyle L_{2}=(\beta+1)x_{1}+(\alpha\beta-1)x_{3}-\alpha\beta
x_{4}-\beta x_{5}$ $\displaystyle L_{1}=(\beta+1)x_{2}+(-1-\alpha)x_{3}+\alpha
x_{4}-\beta x_{5}$

with $\alpha,\beta\in\mathbb{Q}$ and $\alpha,\beta>0$, and at least one of
$L_{1},L_{2},L_{3}$ is common.

We then have at least one of the following:

  1. (1)

$L_{3}$ is common, which means that
$(\alpha+1)(\alpha\beta-1)=\alpha\cdot\alpha\beta$;

  2. (2)

$L_{2}$ is common, which means that
$(\beta+1)(\alpha\beta-1)=\beta\cdot\alpha\beta$;

  3. (3)

$L_{1}$ is common, which means that $\alpha(\beta+1)=\beta(\alpha+1)$.

Note that the first two cases are the same up to switching $\alpha$ and
$\beta$. The first case implies that $\alpha\beta=\alpha+1$, which gives

$\displaystyle L_{5}=x_{1}-x_{2}+\alpha x_{3}-\alpha x_{4}$ $\displaystyle
L_{4}=x_{1}+\frac{\alpha+1}{\alpha}\cdot
x_{2}-x_{3}-\frac{\alpha+1}{\alpha}\cdot x_{5}$ $\displaystyle
L_{3}=(\alpha+1)x_{1}+\alpha x_{2}-\alpha x_{4}-(\alpha+1)x_{5}$
$\displaystyle L_{2}=\frac{2\alpha+1}{\alpha}\cdot x_{1}+\alpha
x_{3}-(\alpha+1)x_{4}-\frac{\alpha+1}{\alpha}x_{5}$ $\displaystyle
L_{1}=\frac{2\alpha+1}{\alpha}\cdot x_{2}+(-1-\alpha)x_{3}+\alpha
x_{4}-\frac{\alpha+1}{\alpha}x_{5}.$

The third case implies that $\alpha=\beta$, which gives

$\displaystyle L_{5}=x_{1}-x_{2}+\alpha x_{3}-\alpha x_{4}$ $\displaystyle
L_{4}=x_{1}+\alpha x_{2}-x_{3}-\alpha x_{5}$ $\displaystyle
L_{3}=(\alpha+1)x_{1}+(\alpha^{2}-1)x_{2}-\alpha x_{4}-\alpha^{2}x_{5}$
$\displaystyle
L_{2}=(\alpha+1)x_{1}+(\alpha^{2}-1)x_{3}-\alpha^{2}x_{4}-\alpha x_{5}$
$\displaystyle L_{1}=(\alpha+1)x_{2}+(-1-\alpha)x_{3}+\alpha x_{4}-\alpha
x_{5}.$

From here, we can see that these two cases are the same up to sending
$\alpha\mapsto-\frac{\alpha+1}{\alpha}$. Therefore, we may restrict our
attention to the third case.

###  B.4. Case E

###### Proof that Section 5.6 is uncommon when $\lambda=1$.

Recall that the setup is as follows: the elements in
$\\{L_{B}:B\in\mathcal{C}(L)\\}$ are

$\displaystyle L_{5}=x_{1}-x_{2}+\lambda x_{3}-\lambda x_{4}$ $\displaystyle
A_{5}=\\{\\!\\!\\{1,-1,\lambda,-\lambda\\}\\!\\!\\}$ $\displaystyle
L_{1}=ax_{2}+(b-a\lambda)x_{3}+a\lambda x_{4}+cx_{5}\qquad$ $\displaystyle
A_{1}=\\{\\!\\!\\{b-a\lambda,a,a\lambda,c\\}\\!\\!\\}$ $\displaystyle
L_{3}=(a\lambda-b)x_{1}+bx_{2}+b\lambda x_{4}+c\lambda x_{5}$ $\displaystyle
A_{3}=\\{\\!\\!\\{a\lambda-b,b,b\lambda,c\lambda\\}\\!\\!\\}.$

Suppose $\lambda=1$ and $|b-a|=|c|$. Up to switching $a$ and $b$, we can
assume that $b-a=c$. In this case

$\displaystyle A_{5}$ $\displaystyle=\\{\\!\\!\\{1,1,-1,-1\\}\\!\\!\\}$
$\displaystyle A_{1}$ $\displaystyle=\\{\\!\\!\\{a,a,c,c\\}\\!\\!\\}$
$\displaystyle A_{3}$ $\displaystyle=\\{\\!\\!\\{a+c,a+c,c,-c\\}\\!\\!\\}.$

  * •

If $a,c$ are of the same sign, then we can choose $z\in\mathbb{C}$ with
$|z|=1$ and $\text{Re}(z^{4}+z^{2}+1)<0$, and set $h:\pm G_{L}\to\mathbb{C}$
by

$\begin{cases}h(r)=z&r>0\\\ h(r)=\overline{z}&r<0,\end{cases}$

so that $\text{Re}(h_{A_{5}})$, $\text{Re}(h_{A_{1}})$, $\text{Re}(h_{A_{3}})$
are constant on $\pm G_{L}$, with
$\text{Re}(h_{A_{5}})+\text{Re}(h_{A_{1}})+\text{Re}(h_{A_{3}})=\text{Re}(z^{4}+z^{2}+1)<0$.

  * •

If $a,c$ are of different signs, then there exists some prime $p$ that divides
exactly one of $|a|$ and $|c|$. Suppose $\\{v_{p}(a),v_{p}(c)\\}=\\{v,0\\}$
with $v\in\mathbb{N}$. Again, we choose $z\in\mathbb{C}$ with $|z|=1$ and
$\text{Re}(z^{4}+z^{2}+1)<0$. Set $h:\pm G_{L}\to\mathbb{C}$ by

$h(r)=\begin{cases}z&\left\lfloor v_{p}(r)/v\right\rfloor\text{ is even,
}r>0\\\ \overline{z}&\left\lfloor v_{p}(r)/v\right\rfloor\text{ is odd,
}r>0\\\ \overline{z}&\left\lfloor v_{p}(r)/v\right\rfloor\text{ is even,
}r<0\\\ z&\left\lfloor v_{p}(r)/v\right\rfloor\text{ is odd, }r<0.\end{cases}$

One can check that $\text{Re}(h_{A_{5}})$, $\text{Re}(h_{A_{1}})$,
$\text{Re}(h_{A_{3}})$ are constant on $\pm G_{L}$, with
$\text{Re}(h_{A_{5}})+\text{Re}(h_{A_{1}})+\text{Re}(h_{A_{3}})=\text{Re}(z^{4}+z^{2}+1)<0$.

∎