additive combinatorics.

\[lem:ruzsa\_triangle\] For sets $A, B, C \subseteq {\mathbb{Z}}$, $$|A - C| |B| {\leqslant}|A - B||B - C|.$$

\[lem:energy\_cs\] For sets $A, B \subseteq {\mathbb{Z}}$, $$E(A, B) {\leqslant}E(A,A)^{1/2} E(B,B)^{1/2}.$$

We will require the following lemma bounding $T(S_1, S_2, S_3)$.

\[lem:uniform\_bound\_symmetric\] Suppose that $S_1, S_2, S_3 \subseteq {\mathbb{Z}}$ are sets with sizes $s_1, s_2 {\text{ and }}s_3$ respectively. Then, we have the bound $$\label{eqn:uniform_bound}
T(S_1, S_2, S_3) {\leqslant}\frac{1}{4}\left(s_1s_2 + s_2s_3 + s_1s_3 + 1\right).$$

We will first prove Lemma \[lem:uniform\_bound\_symmetric\] in the case that $a_1, a_2 {\text{ and }}a_3$ are all 1.

Without loss of generality, assume that $s_1 {\leqslant}s_2 {\leqslant}s_3$.

Suppose first that $s_3 {\geqslant}s_1 + s_2$. In that case, we have $$\begin{aligned}
T(S_1, S_2, S_3) &{\leqslant}s_1s_2 \\
&{\leqslant}\frac{1}{4} (s_1 + s_2)^2 \\
&{\leqslant}\frac{1}{4} (s_1s_3 + s_2s_3).\end{aligned}$$ The first line follows from the trivial observation that for each pair of $x \in S_1 {\text{ and }}y \in S_2$, there can be at most one solution to $x + y + z = 0$ with $z \in S_3$. The third line follows from our assumption on $s_3$. Thus, (\[eqn:uniform\_bound\]) follows in this case.

Now, suppose that $s_3 < s_1 + s_2$. In this case, we may apply [@LevPinchasi Lemma 2], 