Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Tic-Tac-Toe is a game played by two people writing the symbols O and X in turn on a pattern of nine squares with the purpose of getting three such marks in a row. Of course, the traditional 3 × 3 Tic-Tac-Toe need not to have a winner, the second player can achieve a tie. But this does not remain true in general if we consider certain generalizations of the 3 × 3 Tic-Tac-Toe game. The t n-game is played on a \(t \times \ldots \times t\) (n times) array of points in n space, say on t n. The rules are that each player in turn claims as his own a previously unclaimed element of t n. He draws either a nought or a cross at this particular place. The game proceeds either until one of the players has claimed a complete line in t n, in which case he wins, or until every element in t n has been claimed, but no one has yet won, in which case the game is a tie.

Thereby a line forming a possible winning set is a subset \(L \subseteq {t}^{n},L =\{ a_{i}\mid i <t\}\), where \(a_{i} = (a_{i,0},\ldots,a_{i,n-1})\), and for each i < t either \(a_{i,j} = b_{i} \in t\) for all j < n or a i, j = j for all j < n or \(a_{i,j} = t - 1 - j\) for all j < n. Thus the winning sets are exactly the one-parameter words of length n over \([t,\{e,\pi \}]\), where \(\pi\): \(t \rightarrow t\) is given by \(\pi (j) = t - 1 - j\).

Analyzing this game of Tic-Tac-Toe, A.W. Hales and R.I. Jewett (1963) proved a partition theorem for zero-parameter words, basically asserting that the first player always has a winning strategy, provided that n is sufficiently large with respect to t. This result will be proved in this chapter along with a brief discussion of bounds on n and t, which enable us to draw some conclusion about the existence of winning and tying strategies.

But the influence of Hales-Jewett’s theorem goes much beyond the analysis of Tic-Tac-Toe. In this chapter we will only give a glimpse on its consequences deriving some quite direct applications from this pigeon hole principle for parameter words, for example reproving van der Waerden’s theorem on arithmetic progressions. But throughout the next chapters we shall meet several generalizations and ramifications of the Hales-Jewett theorem, and applications thereof, in various branches of Ramsey theory.

1 Hales-Jewett’s Theorem

Throughout this section A denotes a fixed finite alphabet (set).

Convention. Let \(f \in [A]\binom{m}{k}\) and \(g \in [A]\binom{n}{\ell}\). Then \(f \times g \in [A]\binom{m + n}{k+\ell}\) denotes the ‘concatenation’ of f and g, i.e.,

$$\displaystyle{(f\times g)(i) = \left \{\begin{array}{@{}l@{\quad }l@{}} f(i) \quad &\mbox{ if $i <m$,} \\ g(i - m)\quad &\mbox{ if $m \leq i <n + m$ and $g(i - m) \in A$, and} \\ \lambda _{k+j} \quad &\mbox{ if $m \leq i <n + m$ and $g(i - m) =\lambda _{j}$.} \end{array} \right.}$$

The theorem of Hales and Jewett (1963) is concerned with partitions of zero-parameter words, i.e., with partitions of A n. We separate the special case of the two element alphabet, first considering partitions of 2n only. On the one hand this will be done because this case is of particular interest via its interpretation as Boolean lattices, cf. Sect. 3.1.3, on the other hand because its proof is easier and will hopefully make some ideas more accessible.

Proposition 4.1.

Let m and r be positive integers. Then there exists a least positive integer n = HJ(2,m,r) such that for every coloring \(\varDelta: [2]\binom{n}{0} \rightarrow r\) there exists a monochromatic m-parameter word \(f \in [2]\binom{n}{m}\) , which is to say that

$$\displaystyle{\varDelta (f \cdot g) =\varDelta (f \cdot h)\quad \mbox{ for all $g,h \in [2]\binom{m}{0}$.}}$$

Proof.

The proof proceeds by induction on m. Let m = 1, r be an arbitrary positive integer and R be the following set of r + 1 many words each of length r:

$$\displaystyle{\begin{array}{rcccccccl} R =\ \{ & ( & 0, & 0, & \ldots, & 0, & 0 & ) \\ & ( & 0, & 0, & \ldots, & 0, & 1 & )\\ &&&&\ldots \\ & ( & 0, & 1, & \ldots, & 1, & 1 & ) \\ & ( & 1, & 1, & \ldots, & 1, & 1 & ) & \}.\end{array} }$$

For every r-coloring Δ of R there exist two words having the same color. Say

$$\displaystyle{(0,\ldots,0,0,\ldots,0,1,\ldots,1)}$$

and

$$\displaystyle{(0,\ldots,0,1,\ldots,1,1,...,1).}$$

Then the one-parameter word

$$\displaystyle{(0,\ldots,0,\lambda _{0},\ldots,\lambda _{0},1,\ldots,1)}$$

is monochromatic with respect to Δ.

Now assume that the assertion is true for some m > 0 and every r and choose

$$\displaystyle{M = \mathit{HJ}(2,1,r)\quad \text{and}\quad N = \mathit{HJ}(2,m,{r}^{{2}^{M} })}$$

and consider words of length N + M.

Let \(\varDelta: [2]\binom{M + N}{0} \rightarrow r\) be a coloring. This induces a coloring \(\varDelta _{N}: [2]\binom{N}{0} \rightarrow {r}^{{2}^{M} }\) on the tails of length N by coloring each tail with the sequence of colors it gets by varying over all possible initial pieces, i.e.,

$$\displaystyle{\varDelta _{N}(h) =\langle \varDelta (g \times h)\mid g \in [2]\binom{M}{0}\rangle.}$$

By choice of N there exists an m-parameter word \(f_{N} \in [2]\binom{N}{m}\) which is monochromatic with respect to Δ N . This means, fixing one initial piece, all insertions in f N get the same color with respect to Δ.

Next consider \(\varDelta _{M}: [2]\binom{M}{0} \rightarrow r\) given by \(\varDelta _{M}(g) =\varDelta (g \times (f_{N} \cdot h))\) for some (and hence for all) \(h \in [2]\binom{m}{0}\). By the inductive assumption we know that there exists \(f_{M} \in [2]\binom{M}{1}\) which is monochromatic with respect to Δ M . Now the construction yields immediately that \(f_{M} \times f_{N} \in [2]\binom{M + N}{1 + m}\) is the desired monochromatic (m + 1)-parameter word. □

In the language of Boolean lattices, Proposition 4.1 says that for every r-coloring of the points of \(\mathcal{B}(n)\) there exists a \(\mathcal{B}(m)\)-sublattice of \(\mathcal{B}(n)\) which is monochromatic, provided that n was chosen sufficiently large. This can be visualized as in Fig. 4.1.

Fig. 4.1
figure 1

Point partition property of Boolean lattices

Now we prove Hales-Jewett’s theorem for general (finite) alphabets.

Theorem 4.2 (Hales, Jewett).

Let A be a finite alphabet and let m and r be positive integers. Then there exists a least positive integer n = HJ(|A|,m,r) such that for every coloring \(\varDelta: [A]\binom{n}{0} \rightarrow r\) there exists an m-parameter word \(f \in [A]\binom{n}{m}\) , which is monochromatic.

Proof.

Let t = | A |. We show the following two inequalities:

  1. (1)

    \(\mathit{HJ}(t,m + 1,r) \leq \mathit{HJ}(t,1,r) + \mathit{HJ}(t,m,{r}^{{t}^{\mathit{HJ}(t,1,r)} })\)

  2. (2)

    \(\mathit{HJ}(t + 1,1,r + 1) \leq \mathit{HJ}(t,1 + \mathit{HJ}(t + 1,1,r),r + 1)\).

Together with the trivial observation that for every m and r we have that HJ(1, m, r) = m (or using Proposition 4.1 instead) these two inequalities yield immediately the proof of Hales-Jewett’s theorem by induction on t, m and r.

Proof of (1): We closely follow the approach from Proposition 4.1. Let M = HJ(t, 1, r) and \(N = \mathit{HJ}(t,m,{r}^{{t}^{\mathit{HJ}(t,1,r)} })\) and consider \(\varDelta: [A]\binom{M + N}{0} \rightarrow r\). This induces a coloring \(\varDelta _{N}: [A]\binom{N}{0} \rightarrow {r}^{{t}^{M} }\) by

$$\displaystyle{\varDelta _{N}(h) =\langle \varDelta (g \times h)\mid g \in [A]\binom{M}{0}\rangle.}$$

By choice of N there exists an m-parameter word \(f_{N} \in [A]\binom{N}{m}\) which is monochromatic with respect to Δ N . Next consider \(\varDelta _{M}: [A]\binom{M}{0} \rightarrow r\), given by

$$\displaystyle{\varDelta _{M}(g) =\varDelta (g \times (f_{N} \cdot h))\quad \mbox{ for some (and hence all) $h \in [A]\binom{m}{0}$.}}$$

By choice of M there exists \(f_{M} \in [A]\binom{M}{1}\) which is monochromatic with respect to Δ M . Now \(f_{M} \times f_{N} \in [A]\binom{M + N}{m + 1}\) proves that inequality (1) is valid.

Proof of (2): Let \(N = \mathit{HJ}(t,1 + \mathit{HJ}(t + 1,1,r),r + 1)\), bA and consider \(\varDelta: [A \cup \{ b\}]\binom{N}{0} \rightarrow r + 1\). Let \(\varDelta _{A} =\varDelta \rceil [A]\binom{N}{0}\). By choice of N there exists \(f_{A} \in [A]\binom{N}{1 + M}\), where \(M = \mathit{HJ}(t + 1,1,r)\), which is monochromatic with respect to Δ A . Say, \(\varDelta _{A}\rceil f_{A} \cdot [A]\binom{1 + M}{0} \equiv r\). If \(\varDelta (f_{A} \cdot (b \times g)) = r\) for some \(g \in [A \cup \{ b\}]\binom{M}{0}\), then replace all b’s in \(f_{A} \cdot (b \times g)\) by λ 0 and call the resulting one-parameter word f. Clearly, \(f \in [A \cup \{ b\}]\binom{N}{1}\) and \(\varDelta \rceil f \cdot [A \cup \{ b\}]\binom{1}{0}\) is constant. If no such \(g \in [A \cup \{ b\}]\binom{M}{0}\) exists, consider Δ M : \([A \cup \{ b\}]\binom{M}{0} \rightarrow r\) defined by \(\varDelta _{M}(g) =\varDelta (f_{A} \cdot (b \times g))\). By choice of M there exists \(f_{M} \in [A \cup \{ b\}]\binom{M}{1}\) monochromatic with respect to Δ M . In this case \(f_{A} \cdot (b \times f_{M})\) proves that inequality (2) is valid. □

The inequalities (1) and (2) immediately show that the bound on the function n = HJ( | A |, m, r) which we get from this proof of Hales-Jewett’s theorem is not primitive recursive. Whether this reflects the truth or whether this is just a consequence of the double induction used in the proof was an open problem for quite some time, until Shelah (1988) in a celebrated paper came up with a different proof of Hales-Jewett’s theorem which implied that the function n = HJ( | A |, m, r) is primitive recursive.

2 Some Applications

2.1 Arithmetic Progressions

In some sense, Hales-Jewett’s theorem reveals the combinatorial heart of van der Waerden’s theorem on arithmetic progressions, stripping the arithmetic structure of the problem. Consider the alphabet \(A = t =\{ 0,\ldots,t - 1\}\). The mapping Ψ : \({A}^{n} \rightarrow n(t - 1)\) with \(\varPsi (a_{0},\ldots,a_{n-1}) =\sum a_{i}\) has the property that it maps every one-parameter word onto a t-term arithmetic progression (cf. Sect. 3.1.4). Hence, Hales-Jewett’s theorem implies immediately van der Waerden’s theorem on arithmetic progressions:

Theorem 4.3 (van der Waerden).

Let r and t be positive integers. Then there exists a least positive integer n = W(t,r) such that for every coloring Δ: [1,n] → r there exists a monochromatic t-term arithmetic progression .

2.2 Gallai-Witt’s Theorem

A multidimensional version of van der Waerden’s theorem was proved independently by Gallai (=Grünwald), cf. Rado (1943), and Witt (1952).

Let \(X =\{\boldsymbol{ x}_{0},\ldots,\boldsymbol{x}_{t-1}\} \subseteq {\mathbb{R}}^{m}\) be a finite set of points in the Euclidean m-space. A homothetic mapping (homothety) is a mapping \(h: {\mathbb{R}}^{m} \rightarrow {\mathbb{R}}^{m}\) of the form \(h(\boldsymbol{x}) =\boldsymbol{ a} + d\boldsymbol{x}\), where \(\boldsymbol{a} \in {\mathbb{R}}^{m}\) is the translation vector and \(d \in \mathbb{R}\setminus \{0\}\) describes a dilatation. The image \(h(X) \subseteq {\mathbb{R}}^{m}\) is a homothetic copy of X.

Theorem 4.4 (Gallai, Witt).

Let r,m be positive integers and \(X \subseteq {\mathbb{R}}^{m}\) be a finite set. Then there exists a finite set \(Y \subseteq {\mathbb{R}}^{m}\) such that for every coloring \(\varDelta: Y \rightarrow r\) there exists a homothetic copy of X in Y which is monochromatic.

Proof.

Here the same idea applies as in proving van der Waerden’s theorem. Put A = X and let n = HJ( | A |, 1, r). Consider \(\varPsi: {A}^{n} \rightarrow {\mathbb{R}}^{m}\) given by \(\varPsi (\boldsymbol{a}_{0},\ldots,\boldsymbol{a}_{n-1}) =\sum _{i<n}\boldsymbol{a}_{i}\) and let \(Y =\varPsi ({A}^{n})\).

Now let Δ: Y → r be a coloring. This induces a coloring Δ : A nr via \({\varDelta }^{{\ast}}(\boldsymbol{a}_{0},\ldots,\boldsymbol{a}_{n-1}) =\varDelta (\sum _{i<n}\boldsymbol{a}_{i})\). By choice of n there exists \(f\in[A]\binom{n}{1}\) being monochromatic with respect to Δ . Put a = {f(i)∣f(i) ≠ λ 0} and \(d = \vert \{i\mid f(i) =\lambda _{0}\}\vert\). Then, obviously Δ⌉{a + d xxX} is constant. □

2.3 Deuber’s (m, p, c)-Sets

The next application of Hales-Jewett’s theorem extends the Gallai-Witt theorem and completes the proof of Rado’s Theorem 2.8.

Let m, p, c be positive integers. Recall from Sect. 2.5 that a set \(M \subseteq N\) is an (m, p, c)-set if there exist positive integers \(x_{0},\ldots,x_{m}\) such that

$$\displaystyle\begin{array}{rcl} M& =& M_{p,c}(x_{0},\ldots,x_{m}) {}\\ & =& \{cx_{i} +\sum _{ j=i+1}^{m}\xi _{ j}x_{j}\mid \xi _{j} \in [-p,p] \cap \mathbb{Z}\mbox{ for every $j \in [i + 1,m]$ and $i \leq m$}. {}\\ \end{array} $$

Helpful for our purposes is to visualize an (m, p, c)-set in the following way:

$$\displaystyle{\begin{array}{r} cx_{0} +\xi _{1}x_{1} +\xi _{2}x_{2} +\ldots +\xi _{m}x_{m} \\ cx_{1} +\xi _{2}x_{2} +\ldots +\xi _{m}x_{m} \\ cx_{2} +\ldots +\xi _{m}x_{m}\\ \vdots\ \ \ \quad \ \ \\ cx_{m} \end{array} }$$

where \(\xi _{j} \in [-p,p] \cap \mathbb{Z}\) for j ∈ [1, m].

We will sometimes refer to this figure speaking, e.g., of the kth row of an (m, p, c)-set, which is the row that starts with cx k , i.e., we start with a 0th row. Observe that besides the leading coefficient c each row is a multiple arithmetic progression.

We now use Hales-Jewett’s theorem to prove the partition theorem for (m, p, c)-sets.

Theorem 4.5 (Deuber).

Let m, p, c and r be positive integers. Then there exist positive integers n, q and d such that for every coloring \(\varDelta: \mathbb{N} \rightarrow r\) of the positive integers every (n,q,d)-set \(N \subseteq \mathbb{N}\) contains a monochromatic (m,p,c)-set.

Proof.

First we show:

  1. (1)

    Let m, p, c, r and km be positive integers. Then there exist positive integers n, q, and d with the following property:Let N be an (n, q, d)-set. Then for every coloring \(\varDelta: N \rightarrow r\) there exists an (m, p, c)-set MN such that on each of the first k rows of M the coloring Δ is constant, i.e., Δ(x) = Δ(y) whenever x, y are elements of the ith row of M for some ik.

We prove (1) by induction on k. First consider the case k = 0. Let q = cp, d = c 2, \(A = [-p,p]\) and let n = HJ( | A |, m, r) be according to Hales-Jewett’s theorem. Let \(N = N_{q,d}(y_{0},\ldots,y_{n})\) be an (n, q, d)-set and Δ: Nr an r-coloring of N. We define a coloring \([A]\binom{n}{0}\rightarrow r\) by

$$\displaystyle{\varDelta ^{\prime}(\xi _{1},\ldots,\xi _{n}) =\varDelta (\mathit{dy}_{0} + c\sum _{i=1}^{n}\xi _{ i}y_{i}).}$$

Observe that the definition of an (n, q, d)-set, together with choice of q = cp, implies that the sums on the right hand side are indeed contained in N. By choice of n there exists an \(f \in [A]\binom{n}{m}\) which is monochromatic with respect to Δ′. Now consider the (m, p, c)-set M defined by \(M = M_{p,c}(z_{0},z_{1},\ldots,z_{m})\), where

$$\displaystyle{z_{0} = \mathit{cy}_{0} +\sum _{i:f(i)\in A}f(i)\;y_{1+i},}$$

and

$$\displaystyle{z_{1+j} = c\sum _{i:f(i)=\lambda _{j}}y_{1+i}\quad \mbox{ for $j <m$}.}$$

Then the fact that \(f \in [A]\binom{n}{m}\) is monochromatic with respect to Δ′ implies that Δ is constant on each of the 0th rows of M.

Now assume that (1) is valid for some k ≥ 0. We proceed similarly as in the case k = 0. Let q = cp 2, d = c 2, \(A = [-p,p]\) and let \(n = \mathit{HJ}(\vert A\vert,m - k,r) + k\) be according to Hales-Jewett’s theorem. We apply the induction assumption for k and with respect to \(m \leftarrow n\), pq, and cd in order to see that by starting with appropriate parameters n′, q′, d′ we may assume that every (n′, q′, d′)-set N′ and coloring Δ: N′ → r contains an (n, q, d)-set N such that Δ is constant on each of the first k rows of N. To handle the (k + 1)st row define a coloring \([A]\binom{n-k}{0}\rightarrow r\) by

$$\displaystyle{\varDelta ^{\prime}(\xi _{k+1},\ldots,\xi _{n}) =\varDelta (\mathit{dy}_{k} + c\sum _{i=k+1}^{n}\xi _{ i}y_{i}).}$$

By choice of n there exists an \(f \in [A]\binom{n - k}{m - k}\) which is monochromatic with respect to Δ′. We define an (m, p, c)-set by \(M = M_{p,c}(\mathit{cy}_{0},\ldots,\mathit{cy}_{k-1},z_{k},\ldots,z_{m})\), where

$$\displaystyle\begin{array}{rcl} z_{k}& =& \mathit{cy}_{k} +\sum _{f(i)\in A}f(i)\;y_{k+1+i},\text{and} {}\\ z_{k+1+j}& =& c\sum _{f(i)=\lambda _{j}}y_{k+1+i}\quad \mbox{ for $j <m - k$}. {}\\ \end{array}$$

Observe that for ik the ith row of M is a subset of the ith row of N. (To see this use that q = cp 2.) Hence, Δ is monochromatic on these rows. For row k + 1, on the other hand, the fact that \(f \in [A]\binom{n}{m}\) is monochromatic with respect to Δ′ implies that Δ is constant on the (k + 1)st row of M, completing the proof of (1).

To complete the proof of the theorem, put \(\tilde{m} = \mathit{rm}\) and use (1) in order to observe that there exist n, q, and d such that every (n, q, d)-set N contains for every r-coloring \(\varDelta: N \rightarrow r\) an \((\tilde{m},p,c)\)-set \(\tilde{M} =\tilde{ M}_{p,\mathrm{c}}(x_{0},\ldots,x_{\tilde{m}})\) so that Δ is constant on each row of \(\tilde{M}\). By the pigeon hole principle, then, there exist m + 1 rows, say i 0 < < i m on which Δ has the same color. Hence, the (m, p, c)-set \(M = M_{p,c}(x_{i_{0}},\ldots,x_{i_{m}}) \subseteq N\) is monochromatic with respect to Δ. □

2.4 Idempotents in Finite Algebras

Let a be a nonnegative integer and let \(\alpha = (\alpha _{0},\ldots,\alpha _{a})\) be a sequence of positive integers. An algebra of type α is a pair \((B,\mathcal{B})\), where B is a nonempty set and \(\mathcal{B}\): \({B}^{\alpha _{i}} \rightarrow B\), for ia, is an α i -ary operation (by abuse of language we use the same for all i). An algebra \((A,\mathcal{A})\) of type α is a subalgebra of (B, ) if AB and A is closed under the operations .

Theorem 4.6.

Let \(\mathcal{K}\) be a class of finite algebras of type α which is closed under finite products and such that every member \((A,\mathcal{A})\) of \(\mathcal{K}\) contains idempotents only, i.e., \(A(x,\ldots,x) = x\) for every x ∈ A. Let r be a positive integer and \((A,\mathcal{A}) \in \mathcal{K}\) . Then there exists a \((B,\mathcal{B}) \in \mathcal{K}\) such that for every coloring Δ: B → r there exists a monochromatic subalgebra of (B,ℬ) which is isomorphic to \((A,\mathcal{A})\) .

Proof.

Let n = HJ( | A |, 1, r) and choose \((B,\mathcal{B}) = {(A,\mathcal{A})}^{n}\). Recall that \(\mathcal{K}\) is closed under finite products. Hence, \((B,\mathcal{B}) \in \mathcal{K}\). Moreover, by Hales-Jewett’s theorem we know that (B, ) has the desired property. □

We will abbreviate this result by saying that the class \(\mathcal{K}\) has the partition property with respect to points. Theorem 4.6 occurs in Ježek and Nešetřil (1983) and Prömel and Voigt (1981b).

2.5 Lattices and Posets

Theorem 4.6 applies in particular to a variety of finite lattices. Some of them we will mention explicitly. For basic facts about lattices we refer the reader to Birkhoff (1967) or Grätzer (1998).

Distributive lattices. Although the partition property of points in distributive lattices follows from Theorem 4.6, it can already be derived from Proposition 4.1 using that distributive lattices are exactly the sublattices of Boolean lattices. Distributive lattices will be discussed in more detail in Sect. 5.2.3.

Partially ordered sets (posets). It can easily be seen that every poset can be embedded (as an order) in some Boolean lattice. So we get from Proposition 4.1 that the class of all finite posets has the partition property with respect to points. In full length:

Let r be a positive integer and Q be a finite poset. Then there exists a finite poset P such that for every coloring Δ: Pr of the points of P there exists a Q -subposet of P which is monochromatic.

A slight generalization of Theorem 4.6 covering also relational systems of a certain type and in particular covering posets, is given in Pouzet and Rosenberg (1985).

Partition lattices. By a celebrated theorem of Pudlák and Tu̇ma (1980) every finite lattice can be embedded into some partition lattice Π(n). Using that the class of all finite lattices has the partition property with respect to points we can derive immediately from this that the class of all finite partition lattices has also the partition property with respect to points, i.e., for every pair m and r of positive integers there exists a positive integer n = n(m, r) such that for every coloring \(\varDelta:\varPi (n) \rightarrow r\) of the points of Π(n) with r colors there exists a Π(m)-sublattice of Π(n) which is monochromatic. This situation is depicted in Fig. 4.2.

Fig. 4.2
figure 2

Point partition property of partition lattices

3 A ∗-Version

In this section not only colorings of zero-parameter words of one fixed length are considered, as in Hales-Jewett’s theorem, but words of variable length (where a ∗ indicates the end of a word). Such ∗-parameter words were originally introduced by Voigt (1980) to prove a partition theorem for finite Abelian groups. They will also be a quite useful tool in proving a higher dimensional analogue to Hales-Jewett’s theorem (cf. Chap. 5).

Convention. Let ′ ∗′ be a symbol not contained in \(A \cup \{\lambda _{0},\ldots,\lambda _{m-1}\}\) and let \({[A]}^{{\ast}}\binom{n}{m}\) denote the set of all m-parameter words f of length n over \(A \cup \{{\ast}\}\) satisfying the condition

$$\displaystyle{f(i) = {\ast}\quad \mbox{ for some $i <n$ implies that}\quad f(j) = {\ast}\quad \mbox{ for all $i \leq j <n$.}}$$

Hence, \({[A]}^{{\ast}}\binom{n}{m}\) can be viewed as the set of m-parameter words of length at most n over A. Note that in this sense \([A]\binom{n}{m} \subseteq {[A]}^{{\ast}}\binom{n}{m}\).

For \(f \in {[A]}^{{\ast}}\binom{n}{m}\) and \(g \in {[A]}^{{\ast}}\binom{m}{k}\) the composition \(f \cdot g \in {[A]}^{{\ast}}\binom{n}{k}\) is defined by

$$\displaystyle{(f\cdot g)(i) = \left \{\begin{array}{@{}l@{\quad }l@{}} {\ast} \quad &\mbox{ if there exists $j <i$ such that $(f \cdot g)(j) = {\ast}$,} \\ f(i)\quad &\mbox{ if $f(i) \in A \cup \{{\ast}\}$ and $(f \cdot g)(j)\neq {\ast}$ for all $j <i$,} \\ g(j)\quad &\mbox{ if $f(i) =\lambda _{j}$ and $(f \cdot g)(j)\neq {\ast}$ for all $j <i$} \end{array} \right.}$$

Intuitively, the composition fg interpreted as the insertion of g into the parameters of f is performed as long as possible, eventually ∗’s are filled in.

Theorem 4.7.

Let A be a finite alphabet and let m, r be positive integers. Then there exists a positive integer n = HJ (|A|,m,r) such that for every coloring \(\varDelta: {[A]}^{{\ast}}\binom{n}{0} \rightarrow r\) there exists a monochromatic \(f \in {[A]}^{{\ast}}\binom{n}{m}\) , i.e., \(\varDelta (f \cdot g) =\varDelta (f \cdot h)\) for all \(g,h \in {[A]}^{{\ast}}\binom{m}{0}\) .

Proof.

Let n mr = mr and \(n_{\mathit{mr}-j} = \mathit{HJ}(\vert A\vert,n_{\mathit{mr}-j+1} -\mathit{mr} + j,r) + \mathit{mr} - j\). Choose n = n 0 and let \(\varDelta: {[A]}^{{\ast}}\binom{n}{0} \rightarrow r\) be a coloring.

For \(g \in {[A]}^{{\ast}}\binom{k}{0}\) let ∗ (g) denote the number of ∗’s at the end of g, i.e., \({\ast}(g) = k - 1 -\max \{ i <k\mid g(i) \in A\}\) with \(\max \varnothing = -1\). For every ik put

$$\displaystyle{{[A]}^{i}\binom{k}{0} =\{ g \in {[A]}^{{\ast}}\binom{k}{0}\vert {\ast} (g) = i\}.}$$

In particular,

$$\displaystyle{\bigcup _{i\leq k}{[A]}^{i}\binom{k}{0} = {[A]}^{{\ast}}\binom{k}{0}.}$$

First we prove inductively that for every jmr there exists \(f_{j} \in [A]\binom{n}{n_{j+1}}\) such that for every \(g,h \in \bigcup _{i\leq j}{[A]}^{i}\binom{n_{j+1}}{0}\) satisfying ∗ (g) = ∗(h) we have \(\varDelta (f_{j} \cdot g) =\varDelta (f_{j} \cdot h)\).

For j = 0, i.e., considering only words without ∗’s at the end, this is Hales-Jewett’s theorem. So assume that the assertion is true for some j < mr and let Δ j+1: \({[A]}^{j+1}\binom{n_{j+1}}{0} \rightarrow r\) be given by \({\varDelta }^{j+1}(g) =\varDelta (f_{j} \cdot g)\). By choice of \(n_{j+1} = \mathit{HJ}(\vert A\vert,n_{j+2} - j - 1,r) + j + 1\) and Hales-Jewett’s theorem there exists

$$\displaystyle{f^{\prime} \in [A]\binom{n_{j+1} - j - 1}{n_{j+2} - j - 1}}$$

which is monochromatic with respect to Δ j+1. Then, obviously, \(f_{j+1} = f_{j} \cdot (f^{\prime} \times \ (\lambda _{n_{j+2}-j-1},\ldots,\lambda _{n_{j+2}-1}))\) fulfills the requirement of the induction.

Choosing j = mr we get \(f_{\mathit{mr}} \in [A]\binom{n}{\mathit{mr}}\) such that all \(g,h \in {[A]}^{{\ast}}\binom{\mathit{mr}}{0}\) satisfying ∗ (g) = ∗(h) have the same color with respect to Δ. This defines an r-coloring Δ′ of the integers 0, , mr by Δ′(i) = Δ(f mr g) for any g with ∗ (g) = i. By the pigeonhole principle we get 0 ≤ i 0 < < i m mr in one color. Now let \(f^{\prime\prime}\in[A]\binom{\it mr}{m}\) be given by f(i) = a for some aA if i < i 0, f(i) = λ j if i j i < i j+1 and f(i) = ∗ for i m i. Clearly, f = f mr f″ has the desired properties. □