%! TEX root = Ramsey.tex
% vim: tw=50
% 22/10/2024 11AM

\begin{fcthm}[Van der Waerden]
  \label{VW}
  % Theorem 1.6
  Assuming:
  - $k, m \in \Nbb$
  Then:
  there exists an $n \in \Nbb$ such that whenever
  we $k$-colour $[n]$ we can find a monochromatic
  \gls{ap} of length $m$.
\end{fcthm}

Recall that we defined $\W(k, m)$ to be the
smallest $n$ (if it exists) such that whenever $[n]$ is
$k$-coloured, there exists a monochromatic
\gls{ap} of length $m$.

\begin{proof}
  This will be by induction on $m$. For any $k$:

  $m = 1$ is trivial.

  $m = 2$ is pigeonhole.

  $m = 3$ is \cref{thm:1.5}.

  Assume that this is true for some $m - 1$ fixed,
  but for any $k$. In other words, $\W(k, m - 1)$
  exists for all $k \ge 1$.

  \textbf{Claim:} For every $r \le k$ there exists
  $n$ such that we always have one of the
  following:
  \begin{itemize}
    \item have a monochromatic \gls{ap} of length
      $m$
    \item $r$ \gls{cfoc} \glspl{ap} of length
      $m - 1$
  \end{itemize}
  When $r = k$ we are done by looking at the
  focus. Now we prove the claim. We will prove it
  by induction on $r$.

  For $r = 1$ we can take $n = \W(k, m - 1)$.

  Now assume that the result is true for $r - 1$
  and that there does not exist a monochromatic
  \gls{ap} of length $m$. We will show that $n$
  works for $r - 1$, then $\W(k^{2n} , m - 1) 2n$
  will work for $r$.

  Aim: whenever we $k$-colour $[\W(k^{2n}, m -
  1)2n]$ we can find $r$ \gls{cfoc} \glspl{ap} of
  length $m - 1$. Let $B_1 = \{1, 2, \ldots,
  2n\}$, $B_2 = \{2n + 1, \ldots, 4n\}$ etc, i.e.
  $B_i = [2n(i - 1) + 1, 2ni]$ for $i \in \{1,
  \ldots, \W(k^{2n}, m - 1)\}$.

  Let us look at the indices of these blocks. I
  colour $i$ with $k^{2n}$ colours like so:
  \[
    c'(i) = (c(2n(i - 1) + 1), c(2n(i - 1) + 2),
    \ldots, c(2ni))
  .\]
  We therefore colour $[\W(k^{2n}, m - 1)]$ with
  $k^{2n}$ colours. By the definition of $\W$,
  there exists a monochromatic \gls{ap} of length
  $m - 1$ (with respect to $c'$). Say $\alpha,
  \alpha + t, \ldots, \alpha + (m - 2)t$.

  So the respective blocks $B_\alpha, B_{\alpha +
  2t}, \ldots, B_{\alpha + (m - 2)t}$ are
  identically coloured. Look at $B_\alpha$. It has
  length $2n$, so by induction $B\alpha$ contains
  $r - 1$ \gls{cfoc} \glspl{ap} of length $m - 1$
  together with their focus.

  Let $A_i = \{a_i, a_i + di, \ldots, a_i + (m -
  2) di\}$ for $i \in \{1, \ldots, r - 1\}$. Let
  $f$ be their focus. Look at $B_i = \{a_i, a_i +
  di + 2nt, a_i + 2di + 4nt, \ldots, a_i + (m -
  2) di + 2(m - 2)t\}$, $i = 1, \ldots, r - 1$.

  They are monochromatic because the blocks are
  identically coloured and the $B_i$s are
  monochromatic. Since the colour of $A_i$ is the
  colour of $B_i$ and the $A_i$s are \gls{cfoc},
  we must have that the $B_i$s have pairwise
  distinct colours.

  Remember that the $A_i$s are
  are \gls{foc} at $f_i$ and the colour of $f_i$ is
  different than the colour of all the $A_i$s.
  Note $f_i = a_i + (m - 1) di$.

  Look at $A = \{f, f + 2nt, 2 + 4nt, \ldots, f +
  2n(m - 2)t\}$. This is an \gls{ap} of length $m
  - 1$ and monochromatic and of a different colour
  from all of the $A_i$s.

  Enough to show $a_i + (m - 1)(di + 2nt) = f +
  2n(m - 1)t$ for all $i$, which is equivalent to
  $a_i + (m - 1)di = f$, which is true as all the
  $B_i$s are \gls{foc} at $f$.
\end{proof}

Non-examinable: what about bounds?

We define the Ackermann hierarchy to be the
seqeunce of functions
\[
  f_1, f_2, \ldots, f_n : \Nbb \to \Nbb
\]
by
\begin{align*}
  f_1(x)
  &= 2x \\
  f_{n + 1}(x)
  &= f_n^{(x)}(1)
  = \ub{f_n(f_n(\ldots f_n(1)))}_{\text{$x$ times}}
\end{align*}
Observe:
\begin{align*}
  f_2(x)
  &= x \\
  f_3(x)
  &= 2^{2^{2^{\iddots^{2}}}}
  &&\text{$x$ times} \\
  f_4(1)
  &= 2 \\
  f_4(2)
  &= 2^2 = 4 \\
  f_4(3)
  &= 2^{2^{2^2}} = 65536 \\
  f_4(4)
  &= 2^{2^{\iddots^{2}}}
  &&\text{65536 times}
\end{align*}
These functions grow \emph{very} fast.

We say that a function $f : \Nbb \to \Nbb$ is of
type $n$ if there exists $c, d$ such that
\[
  f(cx) \le f_n(x) \le f(dx)
.\]
Our bound on $\W(k, 3)$ was of type $3$.

If you check our proof carefully, then $\W(k, m)$ (as a
function of $k$) is bounded by a ``type $m$''
bound.

Define: $\W(m) = \W(2, m)$. Then our proof gives a
bound that grows faster than any $f_n$.

\begin{remark*}
  This is often a feature of a double induction
  proof.

  It was believed that $\W(m)$ does indeed grow
  this fast.

  Shelah (1987) found a proof by \emph{just}
  induction on $m$, and showed that $\W(k, m) \le
  f_4(m + k)$.

  A prize of \$1000 was placed by Graham to show
  that $\W(m) \le f_3(m)$.

  Gowers (1998) showed that $\W(m) \le
  2^{2^{2^{2^{2^{m + 9}}}}}$, which is ``almost type 2''.

  The best lower bound is $\W(m) \ge
  \frac{2^m}{8m}$.
\end{remark*}
