%! TEX root = GT.tex
% vim: tw=50
% 11/11/2023 09AM

\begin{flashcard}[ramseyd-explicit-bound]
\begin{corollary}
  $\ramseyd(s, t) \le \cloze{{s + t - 2 \choose s
  - 1}}$
  for \cloze{all $s, t \ge 2$}.
  In particular, $\ramsey(s)
  \le \cloze{2^{2s}}$.
\end{corollary}
\end{flashcard}

\begin{proof}
  Induction on $s + t$. True if $s = 2$ or $t =
  2$. Given $s, t \ge 3$:
  \[ \ramseyd(s, t)
  \le \ramseyd(s - 1, t) +
  \ramseyd(s, t - 1)
  \le {s + t - 3 \choose s - 1} + {s + t - 3 \choose s - 1}
  = {s + t - 2 \choose s - 1}. \qedhere \]
\end{proof}

What about more colours?

\begin{flashcard}[ramseyk-defn]
\begin{definition*}
  \glssymboldefn{ramseyk_num}{$R(s_1,
  \ldots, s_k)$}{$R(s_1, \ldots, s_k)$}
  \cloze{For $k \ge 1$ and $s_1, \ldots, s_k \ge 2$,
  write} $R_k(s_1, \ldots, s_k)$ \cloze{for the least $n$
  (if it exists) such that whenever $\complete_n$
  is \rcoled{k}, there exists a monochromatic
  $\complete_{s_i}$ for some $1 \le i \le k$.}
\end{definition*}
\end{flashcard}

\begin{flashcard}[ramseyk-thm]
\begin{theorem}[Ramsey for $k$ colours]
  \label{ramsey_k_thm}
  \cloze{$\ramseyk_k(s_1, \ldots, s_k)$ exists for all
  $k$ and $s_1, \ldots, s_k$.}
\end{theorem}

\begin{proof}
  \cloze{``Turquoise spectacles'':

  Induction on $k$. $k = 1$ is trivial (or
  alternatively can start with $k = 2$ by using
  \cref{ramseys_thm}). Given $k > 1$, we'll show
  that $\ramseyk_k(s_1, \ldots, s_k) \le
  \ramseyd(s_1, \ramseyk_{k - 1}(s_1, \ramseyk_{k
  - 1}(s_2, \ldots, s_k))$. Indeed, given a
  \rcolring{k} of $\complete_n$, where $n =
  \ramseyd(s_1, \ramseyk_{k - 1}(s_2, \ldots,
  s_k))$: view the colours as `1' and `2 or 3 or
  \ldots or $k$'. By definition of $n$, we obtain
  either a $\complete_{s_1}$ coloured $1$ (done)
  or a $\complete_{\ramseyk_{k - 1}(s_2, \ldots,
  s_k)}$ coloured with $k - 1$ colours (so done by
  definition of $\ramseyk_{k - 1}(s_2, \ldots,
  s_k)$).}
\end{proof}
\end{flashcard}

\begin{remark*}
  Or could redo the proof of \cref{ramseys_thm}.
\end{remark*}
\vspace{-1em}

What about $r$-sets? Suppose we colour each
\emph{triangle} red or blue -- do we get a $4$-set
all of whose triangles are the same colour?

\glssymboldefn{Xr}{$X^{(r)}$}{$X^{(r)}$}
This is asking (in general) for a much
\emph{denser} monochromatic structure.
\begin{flashcard}[Xr-notation]
For a set
$X$ and $r = 1, 2, 3, \ldots$, write $X^{(r)} =
\cloze{\{A \subset X : |A| = r\}}$\cloze{ -- the collection of
all $r$-sets in $X$.}
\end{flashcard}

\glssymboldefn{sqb}{$[n]$}{$[n]$}
\begin{flashcard}[sqb-n-notation]
\fcscrap{Unless otherwise stated, }$X =
[n] = \cloze{\{1, \ldots, n\}}$.
\end{flashcard}

\begin{flashcard}[ramseyd-r-notation]
\begin{notation*}
  \glssymboldefn{ramsey_r}{$R^{(r)}(s,
  t)$}{$R^{(r)}(s, t)$}
  Write $R^{(r)}(s, t)$ \cloze{for the least $n$ (if it
  exists) such that whenever $\xr X^r$ is
  \rcoled{2} ($c : \xr X^r \to \{1, 2\}$), then
  there exists a red $s$-set (an $s$-set, all of
  whose $r$-sets are colour $1$) or a blue $t$-set
  (for each $r \ge 1$ and $s, t \ge r$).}
\end{notation*}
\end{flashcard}

\begin{remark*}
  \phantom{}
  \begin{enumerate}[(1)]
    \item $\ramseyr^2(s, t) = \ramseyd(s, t)$
    \item $\ramseyr^1(s, t) = s + t - 1$
      (pigeonhole)
    \item $R^r(s, t) = R^r(t, s)$
    \item $R^r(s, r) = s$
  \end{enumerate}
\end{remark*}

\begin{flashcard}[ramsey-for-r-sets-thm]
\begin{theorem}[Ramsey for $r$-sets]
  \cloze{
  $\ramsey^r(s, t)$ exists for all $r \ge 1$ and
  $s, t \ge r$.}
\end{theorem}

\textbf{Idea:} \cloze{in proof of $r = 2$
(\nameref{ramseys_thm}), we used $r = 1$ (i.e.
pigeonhole).}

\begin{proof}
  \cloze{
  Induction on $r$: $r = 1$ trivial (alternatively
  start at $r = 2$ using \cref{ramseys_thm}).
  Given $r > 1$. Induct on $s + t$ ($s = r$ or $t
  = r$ is straightforward).

  So, given $r > 1$ and $s, t > 1$, we'll show
  \[ \ramseyr^r(s, t)
  \le \ramseyr^{r - 1}(\ramseyr^r(s - 1, t),
  \ramseyr^r(s, t - 1)) + 1 .\]
  Let $a = \ramseyr^r(s - 1, t)$, $b =
  \ramseyr^r(s, t - 1)$, $n = \ramseyr^{r - 1}(a,
  b) + 1$. Given a \rcolring{2} $c$ of $\xr X^r = \xr \sq
  [n]^r$:
  \begin{center}
    \includegraphics[width=0.6\linewidth]{images/fd1da32a995f4487.png}
  \end{center}
  Pick $x \in X$, and put $Y = X \setminus \{x\}$.
  Then have induced colouring $c'$ of $\xr Y^r$:
  $c'(A) = c(A \cup \{x\})$, for each $A \in \xr Y^{r
  - 1}$. By definition of $n$, we have a red
  $a$-set or blue $b$-set for $c'$.

  If $a$-set: have $Z \subset Y$, $|Z| = a$ such
  that $\forall A \in \xr Z^{r - 1}$ have $c(A
  \cup \{x\})$ is red. Inside $Z$, by definition
  of $a$, there exists a red $s - 1$ set for $c$
  or a blue $t - 1$ set for $c$. But a blue
  $t$-set for $c$ is done, and a red $(s - 1)$-set
  for $c$ forms, with $x$, a red $s$-set for $c$.

  If blue $b$-set: same argument but swapping
  colours.
  }
\end{proof}
\end{flashcard}

\begin{remark*}
  ALso works for $k$ colours (e.g. by turquoise
  spectacles).
\end{remark*}
\vspace{-1em}

What bounds do we get on $\ramseyr^r(s, t)$?

Define functions $f_1, f_2, \ldots$ as follows:
\begin{itemize}
  \item $f_1(x) = 2x$
  \item $f_r(x) = \ub{f_{r - 1}(f_{r - 1}(\ldots
    f_{r - 1}}_{\text{$x$
    times}}(1) \ldots ))$ for each $r > 1$.
\end{itemize}
So $f_2(x) = 2^x$, $f_3(x) =
\ob{2^{2^{\iddots^2}}}^{x}$. What about $f_4$?
\[ f_4(1), \quad f_4(2) = 2^2 = 4, \quad f_4(3) =
2^{2^{2{2^2}}} = 65536, \quad f_4(4) =
\ob{2^{2^{\iddots^2}}}^{65536} \]
Our bound for $\ramseyd(s, t)$ is of the form
$f_2(s + t)$ and for $\ramseyr^r(s + t)$ of form
$f_r(s + t)$. These very large upper bounds are
often a feature of such `double inductions'.
(Lower bounds, e.g. on $\ramseyd(s, t)$? See
later.)
