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

\begin{remark*}
  \phantom{}
  \begin{enumerate}[(1)]
    \item This proof gives no bound on this $n(k,
      m)$. There are other proofs that give some
      bounds.
      \glsnoundefn{pbc}{proof by
      compactness}{proofs by compactness}%
    \item This is a ``proof by compactness'': what
      we (essentially) showed is that $\{0,
      1\}^{\Nbb}$ with the product topology is
      (sequentially) compact. If you prefer, the
      product topology can be thought of as the
      topology derived from the metric
      \[
        d(f, g) = \begin{cases}
          0 & f = g \\
          \frac{1}{\min\{n : f(n) \neq g(n)\}} &
          \text{otherwise}
        \end{cases}
      .\]
  \end{enumerate}
\end{remark*}

What happens if we have $c : \Nbb^{(2)} \to X$
with $X$ being potentially infinite?

\begin{fcthm}[Canonical Ramsey Theorem]
  \label{can_ram_thm}
  % Theorem 1.4
  Assuming:
  - $\Nbb^{(2)}$ is coloured (possibly with an
  infinite number of colours)
  Then:
  there exists an infinite set $M$ such that
  one of the following holds:
  \begin{enumerate}[(i)]
    \item $c$ is constant on $M$.
    \item $c$ is injective on $M$.
    \item $c(\{i, j\}) = c(\{k, l\})$ if and only
      if $i = k$ for $i < j$, $k < l$ in $M$.
    \item $c(\{i, j\}) = c(\{k, l\})$ if and only
      if $j = l$, for all $i < j$, $k < l$.
  \end{enumerate}
\end{fcthm}

\begin{proof}
  We colour an element $\{i < j < k < l\}$ of
  $\Nbb^{(4)}$ as follows:
  We say that it is red if $c(ij) = c(kl)$, and
  blue otherwise.

  By \nameref{ramsey_rsets}, there exists an
  infinite set $M_1$ that is monochromatic under
  this colouring.
  \begin{enumerate}[(1)]
    \item Suppose $M_1$ is red. Then $c$ is
      constant on $M_1$.

      Let $i < j$, $k < l$. Pick $m < n$ (in $M_1$) bigger
      than all $4$. Then $i < j < m < n$ hence
      $c(ij) = c(mn)$. Also, $k < l < m < n$, so
      $c(kl) = c(mn)$. So $c$ is constant on
      $M_1$.
    \item Now let's assume $M_1$ is blue. So for $i <
      j < k < l$ we have $c(ij) \neq c(kl)$. Next:
      colour $M_1^{(4)}$ as follows: we will say
      that $\{i, j, k, l\}$ is green if $c(il) =
      c(jk)$, and purple otherwise. By
      \nameref{ramsey_rsets} we can pick infinite $M_2
      \subset M_1$ monochromatic.

      We claim that
      $M_2$ cannot be green. This is because if
      $M_2$ is green, let $i < j < k < l < m < n$
      in $M_2$. Then:
      \begin{itemize}
        \item $\{i < j < k < n\}$ gives us that
          $c(in) = c(jk)$
        \item $\{i < l < m < n\}$ gives us that
          $c(in) = c(lm)$
      \end{itemize}
      But using these we get $c(jk) = c(lm)$,
      which contradicts the fact that $\{i < j < k <
      l\}$ is blue.

      Therefore $M_2$ is purple: for $i < j < k <
      l$ we have $c(il) \neq c(jk)$.

      Next we colour $M_2^{(4)}$ as follows: $\{i
      < j < k < l\}$ is orange if $c(ik) = c(jl)$,
      and white otherwise. Again, by
      \nameref{ramsey_rsets} we can pick an
      infinite $M_3 \subset M_2$ such that it is
      monochromatic with respect to this
      colouring.

      We claim that $M_3$ cannot be orange. If it
      is, then we again consider $i < j < k < l <
      m < n$:
      \begin{itemize}
        \item $\{j < l < m < n\}$ gives that
          $c(jm) = c(ln)$
        \item $\{i < j < k < m\}$ gives that $c(jm) =
          c(ik)$
      \end{itemize}
      Hence $c(ik) = c(ln)$, which contradicts the
      fact that $\{i < j < l < n\}$ is blue.

      Therefore $M_3$ is white. This finally tells
      us (using earlier working) that given any
      pair disjoint edges, the colours must be
      different.

      Now, we colour $M_3^{(3)}$ via:
      $\{i < j < k\}$ yellow if $c(ik) = c(jk)$,
      and pink otherwise. By
      \nameref{ramsey_rsets}, there is an infinite
      $M_4 \subset M_3$ that is monochromatic.

      We claim that $M_4$ is not yellow. If it is,
      then given $i < j < k < l$, we have $c(ij) =
      c(jk) = c(kl)$, which contradicts blueness.

      Thus for any $i < j < k$ in $M_4$, we have
      $c(ij) \neq c(jk)$.

      Finally: we colour $M_4^{(3)}$ with 4
      colours, with $\{i < j < k\}$ coloured
      according to:
      \begin{itemize}
        \item turquoise if $c(ij) = c(ik)$ and
          $c(ik) = c(jk)$
        \item magenta if $c(ij) = c(ik)$ and
          $c(ik) \neq c(jk)$
        \item cyan if $c(ij) \neq c(ik)$ and
          $c(ik) = c(jk)$
        \item maroon if $c(ij) \neq c(ik)$ and
          $c(ik) \neq c(jk)$
      \end{itemize}
      By \nameref{ramsey_rsets}, there exists a
      monochromatic set $M_5 \subset M_4$. It
      cannot be turquoise because $c(ij) = c(jk)$
      contradicts $M_4$. Then:
      \begin{itemize}
        \item magenta implies case (iii)
        \item cyan implies case (iv)
        \item maroon implies (ii), i.e. injective.
          \qedhere
      \end{itemize}
  \end{enumerate}
\end{proof}

