# Difference between revisions of "Coloring Hales-Jewett theorem"

## Introduction

The Hales-Jewett theorem states that for every k and every r there exists an n such that if you colour the elements of $[k]^n$ with r colours, then there must be a combinatorial line with all its points of the same colour.

This is a consequence of the Density Hales-Jewett theorem, since there must be a set of density at least $r^{-1}$ of elements of $[k]^n$ all of whose elements have the same colour. It also follows from the Graham-Rothschild theorem.

By iterating the Hales-Jewett theorem, one can also show that one of the color classes contains an m-dimensional combinatorial subspace, if n is sufficiently large depending on k, r and m.

There are two combinatorial proofs of the Hales-Jewett theorem: the original one by Hales and Jewett, and a second proof by Shelah. They are given below.

There is an infinitary generalisation of this theorem known as the Carlson-Simpson theorem.

Here is the Wikipedia entry on this theorem.

For a fixed r and k, the least n needed for the Hales-Jewett theorem to apply is denoted HJ(k,r). The following bounds are known:

$HJ(3,1) = 1$
$HJ(3,2) = 4$
$HJ(3,3) \gt 6$

## The original proof of the Hales-Jewett theorem

The first proof of the Hales-Jewett theorem was an abstraction of the argument used to prove van der Waerden's theorem. It goes like this. As above, let us write HJ(k,r) for the smallest n such that for every r-colouring of $[k]^n$ there is a monochromatic combinatorial line. We shall attempt to bound HJ(k,r) in terms of the function $s\mapsto HJ(k-1,s),$ which we may assume by induction to take finite values for every s.

Let $t_1,t_2,\dots,t_r$ be a rapidly increasing sequence of integers, to be chosen later, let $n=t_1+\dots+t_r$ and consider an r-colouring of $[k]^n=[k]^{t_1}\times\dots\times[k]^{t_r}.$ Now define an induced $k^{n-t_r}$-colouring on $[k]^{t_r}$ by colouring each x according to the function that takes $w\in[k]^{n-t_r}$ to the colour of $(w,x).$ By induction, we can find a monochromatic combinatorial line $L_r$ in $[k]^{t_r}$ such that all the points in that line have the same (induced) colour, with the possible exception of the point where the value of the variable coordinates is k. For this we need $t_r\geq HJ(k-1,k^{n-t_r}).$

Now pass to the subspace $[k]^{n-t_r}\times L_r,$ and note that the only way a sequence in this space can depend on its final coordinate is through whether that final coordinate takes the value k or not. Inside this subspace, run precisely the same argument, but this time with $[k]^{t_{r-1}}$ taking over the role of $[k]^{t_r}.$ There is a choice here about what "precisely the same argument" means. It can either mean that we treat $[k]^{n-t_r}\times L_r$ as $([k]^{n-t_r-t_{r-1}}\times L_r)\times[k]^{t_{r-1}}$ and talk about the original colouring, or it can mean that we restrict attention to the set $[k]^{n-t_r}=[k]^{t_1}\times\dots\times[k]^{t_{r-1}}$ and talk about the colouring where the colour of w is the colour of (w,x) for the points $x\in L_r$ with variable coordinate not equal to k. The usual argument goes via the second option, but for the sake of comparison with Shelah's proof it is nicer to go for the first (so what we are presenting here is not quite identical to the proof of Hales and Jewett).

After the second stage of the iteration, for which we require that $t_{r-1}\geq HJ(k-1,k^{n-t_r-t_{r-1}+1}),$ we have a line $L_{r-1}$ such that the colour of a point in $[k]^{t_1}\times\dots\times[k]^{t_{r-2}}\times L_{r-1}\times L_r$ does not depend on which point you choose in $L_{r-1}\times L_r,$ except if you change a non-k to a k or a k to a non-k.

Continuing this process, one ends up with a subspace $L_1\times\dots\times L_r$ such that the colour of a point depends only on which of its coordinates are equal to k. This reduces the problem to HJ(2,r), which follows trivially from the pigeonhole principle. To spell it out, consider the points $(k-1,k-1,\dots,k-1),$ $(k,k-1,k-1,\dots,k-1),$ $(k,k,k-1,\dots,k-1),\dots(k,k,k,\dots,k).$ There are r+1 of these points, so two of them have the same colour. Those two are the top two points of a combinatorial line, all the rest of which must have the same colour as well.

## Shelah's proof of the Hales-Jewett theorem

This is very unfair to Shelah, but I am trying to present what he did as an almost trivial exercise in "turning an induction upside-down". The above proof used HJ(k-1) to create a subspace that we can treat as $[2]^r,$ because the colouring in that subspace depends only on which coordinates are k and which are not k. Now let us try to use HJ(2) to create a subspace that we can treat as $[k-1]^m,$ for some appropriate m, since in the subspace we shall ensure that the colouring is insensitive to changes between k-1 and k. To emphasize how easy this is, I shall paste the above paragraphs into this section and make the necessary adjustments.

Let $t_1,t_2,\dots,t_m$ be a rapidly increasing sequence of integers, to be chosen later (including m), let $n=t_1+\dots+t_m$ and consider an r-colouring of $[k]^n=[k]^{t_1}\times\dots\times[k]^{t_m}.$ Now define an induced $k^{n-t_m}$-colouring on $[k]^{t_m}$ by colouring each x according to the function that takes $w\in[k]^{n-t_m}$ to the colour of $(w,x).$ By HJ(2) (a trivial application of the pigeonhole principle, as we saw above), we can find a monochromatic combinatorial line $L_r$ in $[k]^{t_m}$ such that the first two points in that line have the same (induced) colour. For this we need $t_r\geq HJ(2,k^{n-t_m})=k^{n-t_m}.$

Now pass to the subspace $[k]^{n-t_m}\times L_m,$ and note that if you change the final coordinate of a sequence in this space from a 1 to a 2, or vice versa, then it does not change the colour of the sequence. Inside this subspace, run precisely the same argument, but this time with $[k]^{t_{m-1}}$ taking over the role of $[k]^{t_m}$ and $L_m$ taking over the role of $[k]^{t_{m-1}}.$

After the second stage of the iteration, for which we require that $t_{m-1}\geq HJ(2,k^{n-t_r-t_{m-1}+1})=k^{n-t_m-t_{m-1}}+1,$ we have a line $L_{m-1}$ such that the colour of a point in $[k]^{t_1}\times\dots\times[k]^{t_{m-2}}\times L_{m-1}\times L_m$ does not change if you change any of the coordinates in $L_{m-1}\times L_m,$ from a 1 to a 2 or vice versa.

Continuing this process, one ends up with a subspace $L_1\times\dots\times L_m$ such that the colour of a point does not change if you change a coordinate from a 1 to a 2 or vice versa. This reduces the problem to HJ(k-1), so we can take m to be HJ(k-1,r) and we are done. To spell it out, consider the set of all points in $L_1\times\dots\times L_m$ that have no variable coordinate equal to 1. Inside this set, we can find, by HJ(k-1,m), a combinatorial line such that all points in the line with variable coordinate not equal to 1 have the same colour. But by the way the subspace is chosen, we still have the same colour if we change the variable coordinate to a 1.