[proofplan]
We encode additive quadruples by the representation function $R_A(t)$ counting pairs in $A^2$ with sum $t$. Grouping quadruples by their common sum gives $E(A)=\sum_{t\in G}R_A(t)^2$. The function $R_A$ is the convolution $\mathbb{1}_A*\mathbb{1}_A$, so its [Fourier transform](/page/Fourier%20Transform) is the square of $\widehat{\mathbb{1}_A}$. [Parseval's identity](/theorems/434) for the unnormalized finite-group Fourier transform then converts the $L^2$ norm of $R_A$ into the fourth moment of the Fourier coefficients of $\mathbb{1}_A$.
[/proofplan]
[step:Define the representation function as a convolution]
Define the representation function $R_A:G\to\mathbb Z_{\ge 0}$ by
\begin{align*}
R_A(t):=\#\{(a_1,a_2)\in A^2:a_1+a_2=t\}.
\end{align*}
Define the convolution of functions $f,g:G\to\mathbb C$ by
\begin{align*}
(f*g)(t):=\sum_{x\in G}f(x)g(t-x).
\end{align*}
For every $t\in G$, applying this definition with $f=g=\mathbb{1}_A$ gives
\begin{align*}
(\mathbb{1}_A*\mathbb{1}_A)(t)=\sum_{x\in G}\mathbb{1}_A(x)\mathbb{1}_A(t-x).
\end{align*}
The summand is $1$ exactly when $x\in A$ and $t-x\in A$, equivalently exactly when $(x,t-x)\in A^2$ and $x+(t-x)=t$. Hence
\begin{align*}
R_A(t)=(\mathbb{1}_A*\mathbb{1}_A)(t).
\end{align*}
[/step]
[step:Group additive quadruples by their common sum]
For each $t\in G$, let
\begin{align*}
P_t:=\{(a_1,a_2)\in A^2:a_1+a_2=t\}.
\end{align*}
Then $|P_t|=R_A(t)$. The set of additive-energy quadruples is the disjoint union, indexed by $t\in G$, of the sets $P_t\times P_t$, because a quadruple $(a_1,a_2,a_3,a_4)\in A^4$ satisfies $a_1+a_2=a_3+a_4$ exactly when both ordered pairs have the same sum $t$. Therefore
\begin{align*}
E(A)=\sum_{t\in G}|P_t|^2.
\end{align*}
Since $R_A(t)$ is a nonnegative integer, this is
\begin{align*}
E(A)=\sum_{t\in G}R_A(t)^2=\sum_{t\in G}|R_A(t)|^2.
\end{align*}
[guided]
The purpose of $R_A$ is to replace one condition on four variables by a sum over one common value. For a fixed $t\in G$, the set
\begin{align*}
P_t:=\{(a_1,a_2)\in A^2:a_1+a_2=t\}
\end{align*}
contains exactly the representations of $t$ as a sum of two elements of $A$, so $|P_t|=R_A(t)$.
Now consider a quadruple $(a_1,a_2,a_3,a_4)\in A^4$. It contributes to $E(A)$ precisely when
\begin{align*}
a_1+a_2=a_3+a_4.
\end{align*}
If this common value is $t$, then $(a_1,a_2)\in P_t$ and $(a_3,a_4)\in P_t$. Conversely, every element of $P_t\times P_t$ gives a quadruple with equal pair-sums. The sets $P_t\times P_t$ are disjoint as $t$ varies, because the common sum of a quadruple is determined uniquely. Hence counting the disjoint union gives
\begin{align*}
E(A)=\sum_{t\in G}|P_t\times P_t|=\sum_{t\in G}|P_t|^2.
\end{align*}
Substituting $|P_t|=R_A(t)$ gives
\begin{align*}
E(A)=\sum_{t\in G}R_A(t)^2.
\end{align*}
Since $R_A(t)\in\mathbb Z_{\ge 0}$, we also have $R_A(t)^2=|R_A(t)|^2$, so
\begin{align*}
E(A)=\sum_{t\in G}|R_A(t)|^2.
\end{align*}
This last form is the one compatible with Parseval's identity.
[/guided]
[/step]
[step:Compute the Fourier transform of the representation function]
Let $\gamma\in\widehat G$. Using the convolution identity for $R_A$ and the definition of the Fourier transform,
\begin{align*}
\widehat{R_A}(\gamma)=\sum_{t\in G}\sum_{x\in G}\mathbb{1}_A(x)\mathbb{1}_A(t-x)\overline{\gamma(t)}.
\end{align*}
Make the substitution $y=t-x$, so $t=x+y$. Since $G$ is finite, this substitution is a bijection from pairs $(t,x)\in G^2$ to pairs $(x,y)\in G^2$. Thus
\begin{align*}
\widehat{R_A}(\gamma)=\sum_{x\in G}\sum_{y\in G}\mathbb{1}_A(x)\mathbb{1}_A(y)\overline{\gamma(x+y)}.
\end{align*}
Because $\gamma$ is a character, $\gamma(x+y)=\gamma(x)\gamma(y)$, and therefore
\begin{align*}
\widehat{R_A}(\gamma)=\left(\sum_{x\in G}\mathbb{1}_A(x)\overline{\gamma(x)}\right)\left(\sum_{y\in G}\mathbb{1}_A(y)\overline{\gamma(y)}\right).
\end{align*}
Hence
\begin{align*}
\widehat{R_A}(\gamma)=\widehat{\mathbb{1}_A}(\gamma)^2.
\end{align*}
[/step]
[step:Apply Parseval with the unnormalized Fourier convention]
For the unnormalized Fourier transform on a finite abelian group, Parseval's identity states that every function $f:G\to\mathbb C$ satisfies
\begin{align*}
\sum_{x\in G}|f(x)|^2=\frac{1}{N}\sum_{\gamma\in\widehat G}|\hat f(\gamma)|^2.
\end{align*}
Applying this identity to the function $R_A:G\to\mathbb C$ gives
\begin{align*}
\sum_{t\in G}|R_A(t)|^2=\frac{1}{N}\sum_{\gamma\in\widehat G}|\widehat{R_A}(\gamma)|^2.
\end{align*}
Using $\widehat{R_A}(\gamma)=\widehat{\mathbb{1}_A}(\gamma)^2$, we obtain
\begin{align*}
|\widehat{R_A}(\gamma)|^2=|\widehat{\mathbb{1}_A}(\gamma)^2|^2=|\widehat{\mathbb{1}_A}(\gamma)|^4.
\end{align*}
Therefore
\begin{align*}
\sum_{t\in G}|R_A(t)|^2=\frac{1}{N}\sum_{\gamma\in\widehat G}|\widehat{\mathbb{1}_A}(\gamma)|^4.
\end{align*}
Combining this with $E(A)=\sum_{t\in G}|R_A(t)|^2$ proves
\begin{align*}
E(A)=\frac{1}{N}\sum_{\gamma\in\widehat G}|\widehat{\mathbb{1}_A}(\gamma)|^4.
\end{align*}
[/step]