%! TEX root = AC.tex
% vim: tw=50
% 15/10/2024 10AM

Note that this is symmetric, but is not
necessarily non-negative, so we cannot prove that
it is a metric. It does, however, satisfy triangle
inequality:

\begin{fclemma}[Ruzsa's triangle inequality]
  \label{ruzsa_ineq}
  % Lemma 1.8
  Assuming:
  - $A, B, C \subseteq G$ finite
  Then:
  \[
    \rd(A, C) \le \rd(A, B) + \rd(B, C)
  .\]
\end{fclemma}

\begin{proof}
  Observe that
  \[
    |B| \cdot |A \minus C| \le |A \minus B| \cdot
    |B \minus C|
  .\]
  Indeed, writing each $d \in A \minus C$ as $d = a_d -
  c_d$ with $a_d \in A$, $c_d \in C$, the map
  \begin{align*}
    \phi : B \times (A \minus C)
    &\to (A \minus B) \times (B \minus C) \\
    (b, d)
    &\mapsto (a_d - b, b - c_d)
  \end{align*}
  is injective. The triangle inequality now
  follows from the definition.
\end{proof}

\begin{fcdefn}[Doubling / difference constant]
  % Definition 1.9
  \glsnoundefn{doubc}{doubling constant}{doubling
  constants}%
  \glsnoundefn{diffc}{difference
  constant}{difference constants}%
  \glssymboldefn{doubc}%
  Given a finite $A \subseteq G$, we write
  \[
    \sigma(A) \defeq \frac{|A \plus A|}{|A|}
  \]
  for the \emph{doubling constant} of $A$ and
  \[
    \delta(A) \defeq \frac{|A \minus A|}{|A|}
  \]
  for the \emph{difference constant} of $A$.
\end{fcdefn}

Then \cref{ruzsa_ineq} shows, for example, that
\[
  \log \diffc(A) = \rd(A, A) \le \rd(A, -A) +
  \rd(-A, A) = 2\log \doubc(A)
.\]
So $\diffc(A) \le \doubc(A)^2$, or $|A \minus A| \le
\frac{|A \plus A|^2}{|A|}$.

\begin{notation*}
  \glssymboldefn{mdiff}%
  Given $A \subseteq G$ and $l, m \in \Nbb_0$, we
  write
  \[
    lA - mA \defeq \ub{A \plus A \plus \cdots
    \plus A}_{\text{$l$ times}} \minus \ub{A
    \minus A \minus \cdots \minus A}_{\text{$m$
    times}}
  .\]
\end{notation*}

\begin{fcthm}[Plunnecke's Inequality]
  \label{plunn}
  % [Pl\'unnecke's Inequality]
  % Theorem 1.10
  Assuming:
  - $A, B \subseteq G$ are finite sets
  - $|A \plus B| \le K|A|$ for some $K \ge 1$
  Then:
  $\forall l, m \in \Nbb_0$,
  \[
    |\mdiff lB - mB| \le K^{l + m}|A|
  .\]
\end{fcthm}

\begin{proof}
  Choose a non-empty subset $A' \subseteq A$ such
  that the ratio $\frac{|A' \plus B|}{|A'|}$ is
  minimised, and call this ratio $K'$. Then $|A'
  \plus B| = K'|A'|$, $K' \le K$, and $\forall
  A'' \subseteq A$, $|A'' \plus B| \ge K'|A''|$.

  \textbf{Claim:} For every finite $C \subseteq
  G$, $|A' \plus B \plus C| \le K'|A' \plus C|$.

  Let's complete the proof of the theorem assuming
  the claim. We first show that $\forall m \in
  \Nbb_0$, $|A' \plus mB| \le K'^m |A'|$. Indeed,
  the case $m = 0$ is trivial, and $m = 1$ is true
  by assumption. Suppose $m > 1$ and the
  inequality holds for $m - 1$. By the claim with
  $C = (m - 1)B$, we get
  \[
    |A' \plus mB|
    = |A' \plus B \plus (m - 1) B|
    \le K' |A' + (m - 1)B|
    \le K'^m |A'|
  .\]
  But as in the proof of \nameref{ruzsa_ineq},
  $\forall l, m \in \Nbb_0$, we can show
  \[
    |A'| |\mdiff lB - mB|
    \le |A' \plus lB| |A' \plus mB|
    \le K'^l |A'| K'^m |A'|
    = K'^{l + m}|A'|^2
  .\]
  Hence $|\mdiff lB - mB| \le K'^{l + m} |A'| \le
  K'^{l + m} |A|$, which completes the proof
  (assuming the claim).

  We now prove the claim by induction on $|C|$.
  When $|C| = 1$ the statement follows from the
  assumptions. Suppose the claim is true for $C$,
  and consider $C' = C \cup \{x\}$ for some $x
  \notin C$. Observe that
  \[
    A' \plus B \plus C' = (A' \plus B \plus C)
    \plus ((A' \plus B \plus x) \setminus (D \plus
    B \plus x))
  \]
  with $D = \{a \in A' : a \plus B \plus x
  \subseteq A' \plus B \plus X\}$.

  By definition of $K'$, $|D \plus B| \ge K'|D|$,
  so
  \begin{align*}
    |A' \plus B \plus C'|
    &\le |A' \plus B \plus C| + |A' \plus B \plus
    x| - |D \plus B \plus x| \\
    &\stackrel{\text{IH}}{\le} K' |A' \plus C| +
    K'|A'| - K'|D| \\
    &= K'(|A' \plus C| + |A'| - |D|)
   \end{align*}
    We apply this argument a second time, writing
    \[
      A' \plus C' = (A' \plus C) \sqcup ((A' \plus x)
      \setminus (E \plus x))
    \]
    where $E = \{a \in A' : a + x \in A' \plus C\}
    \subseteq D$. We conclude that
    \[
      |A' \plus C'| = |A' \plus C| + |A' \plus x|
      - |E \plus x|
      \ge |A' \plus C| + |A'| - |D|
    \]
    so
    \[
      |A' \plus B \plus C'| \le K'(|A' \plus C| +
      |A'| - |D|) \le K'|A' \plus C'|
    ,\]
    proving the claim.
\end{proof}

We are now in a position to generalise
\cref{example_1_6}.

\begin{fcthm}[Freiman-Ruzsa]
  \label{thm_1_11}
  % Theorem 1.11
  Assuming:
  - $A \subseteq \Fp^n$
  - $|A + A| \le K|A|$ (i.e. $\doubc(A) \le K$)
  Then:
  $A$ is contained in a subspace $H \le \Fp^n$ of
  size $|H| \le K^2 p^{K^4}|A|$.
\end{fcthm}
