[step:Define the Fourier transform and count progressions]Let $V := \mathbb{F}_p^n$, let $N := |V| = p^n$, and let
\begin{align*}
\omega := e^{2\pi i/p}.
\end{align*}
For $\xi \in V$, define the character
\begin{align*}
\chi_\xi: V &\to \mathbb{C} \\
x &\mapsto \omega^{\xi \cdot x},
\end{align*}
where $\xi \cdot x := \sum_{j=1}^n \xi_j x_j \in \mathbb{F}_p$ is interpreted in the exponent through its representative in $\{0,\dots,p-1\}$.
For a function $g: V \to \mathbb{C}$, define its normalized [Fourier transform](/page/Fourier%20Transform) by
\begin{align*}
\widehat{g}: V &\to \mathbb{C} \\
\xi &\mapsto \mathbb{E}_{x \in V} g(x)\overline{\chi_\xi(x)}
= \frac{1}{N}\sum_{x \in V} g(x)\overline{\chi_\xi(x)}.
\end{align*}
The character orthogonality relation is
\begin{align*}
\mathbb{E}_{x \in V}\chi_\xi(x)
=
\begin{cases}
1, & \xi = 0,\\
0, & \xi \neq 0.
\end{cases}
\end{align*}
Indeed, if $\xi \neq 0$, choose $h \in V$ with $\xi \cdot h \neq 0$; translation by $h$ gives
\begin{align*}
\mathbb{E}_{x \in V}\chi_\xi(x)
=
\mathbb{E}_{x \in V}\chi_\xi(x+h)
=
\chi_\xi(h)\mathbb{E}_{x \in V}\chi_\xi(x),
\end{align*}
and $\chi_\xi(h)\neq 1$, so the expectation is $0$.
Let $a := \mathbb{1}_A:V \to \{0,1\}$. Define the normalized three-term progression count
\begin{align*}
T(a) := \mathbb{E}_{x,d \in V} a(x)a(x+d)a(x+2d).
\end{align*}
Fourier inversion, obtained from the orthogonality relation, gives
\begin{align*}
a(x)=\sum_{\xi \in V}\widehat{a}(\xi)\chi_\xi(x).
\end{align*}
Substituting this into $T(a)$ and using orthogonality in the variables $x$ and $d$ gives
\begin{align*}
T(a)
&=
\sum_{\xi,\eta,\zeta \in V}
\widehat{a}(\xi)\widehat{a}(\eta)\widehat{a}(\zeta)
\mathbb{E}_{x,d \in V}
\chi_\xi(x)\chi_\eta(x+d)\chi_\zeta(x+2d)\\
&=
\sum_{\xi,\eta,\zeta \in V}
\widehat{a}(\xi)\widehat{a}(\eta)\widehat{a}(\zeta)
\mathbb{E}_{x \in V}\chi_{\xi+\eta+\zeta}(x)
\mathbb{E}_{d \in V}\chi_{\eta+2\zeta}(d)\\
&=
\sum_{\zeta \in V}\widehat{a}(\zeta)^2\widehat{a}(-2\zeta).
\end{align*}
The last equality uses that $p$ is odd, so multiplication by $2$ is invertible in $\mathbb{F}_p$.[/step]