Ramsey theory for layered semigroups

We further develop the theory of layered semigroups, as introduced by Farah, Hindman and McLeod, providing a general framework to prove Ramsey statements about such a semigroup $S$. By nonstandard and topological arguments, we show Ramsey statements on $S$ are implied by the existence of"coherent"sequences in $S$. This framework allows us to formalise and prove many results in Ramsey theory, including Gowers' $\mathrm{FIN}_k$ theorem, the Graham-Rothschild theorem, and Hindman's finite sums theorem. Other highlights include: a simple nonstandard proof of the Graham-Rothschild theorem for strong variable words; a nonstandard proof of Bergelson-Blass-Hindman's partition theorem for located variable words, using a result of Carlson, Hindman and Strauss; and a common generalisation of the latter result and Gowers' theorem, which can be proven in our framework.


Introduction
Ramsey theory mathematically studies to what extent regular configurations appear in disorder. A Ramsey-type result typically has the following form: for any finite colouring of some structure M, we can find a monochromatic substructure N ⊆ M with certain properties. The structure M and required properties of N are what distinguish the various results. Commonly, the structure in question will be a semigroup. An early example is van der Waerden's theorem on monochromatic arithmetic progressions: Theorem 1.1 (van der Waerden). For every k ∈ N and finite colouring of N, there is a, d ∈ N such that the arithmetic progression a, a + d, a + 2d, . . . , a + (k − 1)d is monochromatic.
Infinitary Ramsey theory received a boost in the 1970s with the advent of ultrafilter methods, as pioneered by Glazer in his proof of Hindman's finite sums theorem [Com77,Thm 10.3]. Given a semigroup (S, +), we can naturally extend + to an operation ⊕ on the set βS of ultrafilters on S. Furthermore, βS admits a natural topology, making it a compact right-topological semigroup. The rich algebraic structure of βS has powerful applications and consequences all throughout combinatorics [HS12]. More recently, nonstandard methods have also seen success in Ramsey theory [DGL19], particularly in studying partition regularity of Diophantine equations [DL18; DR18; BLM19].
In [FHM02], Farah, Hindman and McLeod introduced layered semigroups, as well as shifts and layered actions thereon. The motivation was to generalise partition results about certain spaces of variable words, such as Gowers' FIN k theorem, the Hales-Jewett theorem, and Bergelson, Blass and Hindman's theorem on located words. Layered semigroups were further explored by Lupini [Lup17] and Farmaki-Negrepontis [FN]. This paper should be considered a "spiritual successor" to [FHM02]. We also work in the setting of layered semigroups, but we consider a different, much broader class of morphisms, called regressive maps. Working in this setting, we develop a general framework to prove partition theorems about a layered semigroup S, assuming only the existence of certain "coherent" sequences in S. This framework allows a general way to formulate and prove many fundamental results of Ramsey theory.
While [FHM02] was phrased in the language of ultrafilters, we instead formalise our results using nonstandard analysis. We believe the nonstandard formulation is more intuitive, but our work has an equivalent translation in the setting of ultrafilters. §2.1 reviews the necessary concepts of nonstandard analysis, working in an internal superstructure model. Effectively, every object M under consideration is assigned a nonstandard extension * M , such that the transfer principle holds-M and * M satisfy the same "elementary" properties.
Ellis' theory of compact semitopological semigroups (CSTSs) is also essential to our nonstandard study of Ramsey theory, and we discuss the topological prerequisites in §2.2. For a semigroup S, we define a topology on * S such that * S is "nearly" a CSTS. This gives us analogues of results in CSTS theory-particularly the Ellis-Numakura lemma guaranteeing the existence of idempotents, which are essential to our work.
In §3, we define layered semigroups S-those which can be partitioned into countably many layers S 0 , S 1 , . . . so that S 0 ∪ · · · ∪ S n forms a semigroup, of which S n is an ideal. We see some examples which naturally occur in Ramsey theory, some of which are in fact partial, but adequate in a specified sense. §4 considers regressive maps on S-semigroup homomorphisms f : S → S which map layers downwards, and don't separate or reorder them. Natural examples of maps on layered semigroups are generally regressive, hence this notion distills the essential Ramsey-theoretic properties of such maps.
In §3.1 and §4.1, nonstandard analysis comes in, as we consider sequences (α i ) of nonstandard elements where α n ∈ * S n . Such a sequence is coherent if it is closed under all regressive maps under consideration, and Ramsey if α n absorbs all α i , i ≤ n under the semigroup operation. We present the main mechanism for proving Ramsey statements in §5. If F is a collection of regressive maps on S, the framework is summarised diagrammatically below: It is difficult to construct general arguments giving the implication above, without having to impose very strong conditions on S and F. Therefore, the construction of an F-coherent will usually depend on the specific semigroup under consideration. The most general construction we give is Lemma 7.8, for "complete" subsemigroups of FIN A -this covers Gowers' theorem and Bergelson-Blass-Hindman's theorem on located variable words.
However, the other two implications work much more generally, only requiring weak, natural conditions on S and F. As a result, Ramsey statements on (S, F) can be reduced to the existence of coherent sequences in S. Towards the end of the paper, we show how our general framework recovers many fundamental results in Ramsey theory, including • Gowers' FIN k theorem, and its generalisation due to Lupini ( §6.1); • The Graham-Rothschild parameter sets theorem ( §6.2); • The Galvin-Glazer theorem and Hindman's finite sums theorem ( §6.3); • An infinitary, multivariable generalisation of Bergelson, Blass and Hindman's partition theorem on located variable words ( §7).
Collectively, these theorems imply a variety of other Ramsey-type results, including Hindman's finite unions theorem, the Hales-Jewett theorem, and van der Waerden's theorem. In each case, we give elementary nonstandard constructions of coherent sequences, which is enough to imply the corresponding result via our framework. We also present a common generalisation of Gowers' theorem and the multivariable Bergelson-Blass-Hindman theorem (and even the Milliken-Taylor theorem) in §7.1, which is provable using our framework. Again, an elementary nonstandard argument constructs an Fcoherent in this case. Throughout, we let N = {0, 1, 2, . . .} be the set of nonnegative integers. We may use interval notation, e.g. [0, 3], [1, 7), and this should be interpreted in the natural numbers, i.e. [n, m] = {k ∈ N : n ≤ k ≤ m}. This notation will later extend to nonstandard integers * N, i.e. [ξ, ζ] = {α ∈ * N : ξ ≤ α ≤ ζ}.
In general, we will use uppercase Latin letters A, B, . . . , S, T, . . . for sets and semigroups, lowercase Latin letters s, t, . . . for elements thereof, and lowercase Greek letters α, β, . . . for elements of nonstandard extensions * S of semigroups.

Nonstandard analysis
The main results of this paper (in §5) will be proved using the tools of nonstandard analysis. Here, we give a basic overview of the concepts needed-for a more in-depth exposition of nonstandard methods and their applications to Ramsey theory, see [DGL19]. All our work can alternatively be formulated using ultrafilter methods, as per [Tod10; HS12; Bar20].
Effectively, we work inside a "universe" V which includes the semigroup (S, +) under consideration, as well as subsets thereof and functions f : S k → S m . This universe comes equipped with a star map * : V → V, which assigns every object M ∈ V to its nonstandard extension * M , in such a way that the following properties hold: Axioms 2.1 (Basic properties of the star map).
(i) For a set A, * A is also a set, and σ A ⊆ * A, where σ A := { * x : x ∈ A}. This containment is strict iff A is infinite; (ii) If A, B are sets such that A ⊆ B, then * A ⊆ * B; (iii) For a set A and k ∈ N, we have * (A k ) = ( * A) k ; (iv) If f is a function A → B, then * f is a function * A → * B; ( (vii) If s ∈ S, then * s = s; (viii) If n ∈ N, then * n = n.
The star map also satisfies the following key principle: Axiom 2.2 (Transfer principle). For any elementary 1 formula ϕ(x 1 , . . . , x n ) and objects M 1 , . . . , M n ∈ V, we have For a rigorous construction satisfying Axioms 2.1 and 2.2, see [DGL19]. Here, we will take on faith that such a structure does exist.
The semigroup operation + can be considered as a function + : S 2 → S, thus we get a natural extension * + of this operation to * S. Abusing notation, we will use + to denote both the original operation and its nonstandard extension-this is somewhat justified by Axiom 2.1.(v). We will generally do the same for functions f : S k → S m .
A peculiarity of our approach will be that we may iterate the star map, to obtain nonstandard extensions of nonstandard extensions, and so on. In this way, we get objects M, * M, * * M, . . .. We will use n * M to denote the n-fold nonstandard extension of an object M ∈ V. Axioms 2.1 and 2.2 also hold when the objects under consideration are themselves nonstandard.
Remark 2.3. In general, the simplifying assumptions made in Axioms 2.1.(vii) and 2.1.(viii) cannot be extended to elements of * S, * N or higher in the nonstandard hierarchy. As an example, N is an initial segment of * N [DGL19, Prop 2.27], so by transfer, * N is an initial segment of * * N. Now, if we take ξ ∈ * N \ N, we have * ξ ∈ * * N \ * N by transfer. It follows that ξ < * ξ =⇒ ξ = * ξ.

u-semigroups
Here, we develop some further notions that prove essential in the study of Ramsey semigroups. These are mostly based on the theory of compact semitopological semigroups (see [Tod10,§2]), as developed by Ellis and others. An example is given by βS, the set of ultrafilters on S, whose topological and algebraic structure is well-studied [HS12;Tod10]. βS is also homeomorphic to the Stone-Čech compactification of S with the discrete topology. The following map allows us to transport this structure to * S.
Definition 2.4. Elements α ∈ * S generate ultrafilters on S via the ultrafilter map: Proposition 2.5. ∼ is an equivalence relation on * S.
The relation ∼ on * S was first considered by Di Nasso in [DiN15], and has seen extensive combinatorial and Ramsey-theoretic applications in [DGL19; DL18; DR18; BLM19]. Some of the key properties are summarised below.
There is a natural way to define a topology on * S as follows: Definition 2.7. For any semigroup S, equip * S with the u-topology-that generated by the basic open sets * A for A ⊆ S. We say * S is a compact u-semigroup, i.e.
Proposition 2.10. For any function f : S → S, its nonstandard extension * f : * S → * S is continuous with respect to the u-topology on * S. Idempotent ultrafilters are key to most applications of infinitary methods in Ramsey theory-their existence follows from the Ellis-Numakura lemma. Throughout this paper, we will use a similar notion of idempotence for elements of * S.
Lemma 2.12 (Ellis-Numakura). If T ⊆ * S is a closed u-subsemigroup, then T contains a u-idempotent element.
Often, we will need a strengthening of Lemma 2.12, as follows.
Definition 2.13. Define a relation on * S by is a partial order (up to u-equivalence) on the u-idempotents of * S.

Layered semigroups
Our results concern the framework of layered semigroups, as introduced by Farah, Hindman and McLeod in [FHM02]. We will work with the following adaptation of their definition: Definition 3.1. A layered semigroup is a (total) semigroup S, with a layering map ℓ : S → N such that for all s, t ∈ S, ℓ(s + t) = max{ℓ(s), ℓ(t)}.
The map ℓ splits S into layers S n = ℓ −1 (n) for each n ∈ range(ℓ). Without loss of generality, we will suppose 2 that range(ℓ) is an initial segment of N. We will encounter situations where range(ℓ) is finite (i.e. our semigroup has finitely many layers), but also cases when range(ℓ) = N (i.e. our semigroup has infinitely many layers. In theory, we could allow range(ℓ) = δ for ordinals δ > ω, but we will not pursue such generalisations here.
Definition 3.1 is equivalent to the following, which is more in the style of Farah, Hindman and McLeod's original definition:  [FHM02] is given by only allowing finitely many layers, and further positing that S 0 = {e}, where e is a two-sided identity for any element of S. We have relaxed both conditions, since we will encounter layered semigroups for which neither holds.

Remark 3.3. Farah, Hindman and McLeod's original definition in
To illustrate Definition 3.1, we present some examples of layered semigroups which naturally arise in Ramsey theory, and which will be relevant later in this paper.
Example 3.4. For each i, let M i be a monoid (semigroup with identity e i ), such that only the identity has an inverse. Let S be the set of tuples (m 0 , m 1 , m 2 , . . .) ∈ ∞ i=0 M i with finite support (i.e. m n = e n for finitely many n). Then, S is an layered semigroup under pointwise operations, and the layering map ℓ (m i ) = min{k : ∀i ≥ k m i = e i }.
Example 3.5. Fix a finite alphabet A. For k ∈ N, a k-parameter word is an element of (A ∪ {x 1 , x 2 , . . . , x k }) * such that all the variables x 1 , x 2 , . . . , x k appear, and their first appearances are in increasing order. Let W k be the set of all k-parameter words. 3 Then, W = ∞ k=0 W k is a layered semigroup 4 under concatenation, called the Graham-Rothschild semigroup.
We will also consider partial semigroups-those for which the operation is not always defined. To exclude trivial cases, such as when the operation is never defined, we have the following notion of adequacy for a partial semigroup.
Definition 3.6. A partial semigroup S is adequate [FHM02; HS12, Defn 1.15.6] or directed [Tod10] if, for any finite subset F ⊆ S, there exists y such that x + y is defined for all x ∈ F . We now generalise Definition 3.1 to the case of partial semigroups. However, it is not enough for just S to be adequate-we need each layer to be adequate also.
Definition 3.7. An adequate partial layered semigroup is a partial semigroup S, with a layering map ℓ : S → N such that: (i) For all s, t ∈ S such that s + t is defined, ℓ(st) = max{ℓ(s), ℓ(t)}; (ii) For all s 1 , . . . , s n ∈ S with ℓ(s 1 ) = · · · = ℓ(s n ), there is t ∈ S such that ℓ(t) = ℓ(s i ) and s i + t is defined for all i ≤ n.
Example 3.8. Let FIN be the set of all functions f : = 0 for all n ∈ N. 5 Then, FIN is an adequate partial layered semigroup under the layering map ℓ(f ) = max(range(f )), called the Gowers semigroup.
Example 3.9. Later, we will consider nonstandard extensions of these semigroups. We use transfer to deduce what these extensions look like. For example, * FIN k will consist 6 of functions ϕ : * N → [0, k] with hyperfinite support (i.e. supp(ϕ) ⊆ [0, ξ] for some ξ ∈ * N) and having max(range(ϕ)) = k. This is clear from writing the definition of FIN k as an elementary formula, and applying transfer.
Remark 3.10. In general, i<δ * S i ⊆ * S, but this containment may be strict when S has infinitely many layers. For example, in the Graham-Rothschild semigroup W of Example 3.5, * W consists of parameter words having hyperfinite length 7 ξ and ζ-many variables for some ξ, ζ ∈ * N. In contrast, ∞ i=0 * W i is the subset of * W consisting of words with only finitely many variables. We will never need to consider all of * S; just the * S i will be enough for our purposes.

The * -product Π S
We will consider sequences (α i ) of nonstandard elements, where each ℓ(α i ) = i. For notational convenience, we define the following: Definition 3.11. Given a total layered semigroup S, define where δ is the number of layers. If it is clear what layered semigroup we are referring to, we may just use the notation Π.
We now generalise Definition 3.11 to adequate partial semigroups.
Definition 3.12. For a subsemigroup A ⊆ S, we define γ A := {α ∈ * A : x + α is defined for all x ∈ A} Example 3.13. Let FIN be the Gowers semigroup of Example 3.8. Then, for k ∈ N, γ FIN k consists of the cofinite functions ϕ ∈ * FIN k -those whose supports are disjoint from N.
Remark 3.14. In the case of partial adequate semigroups S, generally the whole of βS is not considered, but only a special subset, which is notated γS [Tod10] or δS [HS12;FHM02]. For each A ⊆ S, γ A is the preimage of γA ⊆ βA under the ultrafilter map (Definition 2.4), hence the notation.
The sets γ A are useful because they have the following property: By adequacy, each K s is nonempty, so each * K s is nonempty, and closed in the u-topology on A. The collection { * K s : s ∈ A} has the finite intersection property, since for any finite F ⊆ A: which is nonempty by adequacy of A. The result follows by compactness of * A (it is a closed subset of the compact space * S).
Definition 3.17. Given an adequate layered semigroup S, define where δ is the number of layers. If it is clear what layered semigroup we are referring to, we may just use the notation Π.
Notice that if S is total, then γ A = * A for any A ⊆ S, so Definitions 3.11 and 3.17 coincide.
Proposition 3.18. For any layered semigroup S, Π S is a compact u-semigroup, with the product topology and operation defined componentwise.

Regressive maps
Our Ramsey-type results will be in the context of certain functions acting on layered semigroups. We will require our functions f : S → S to have the following properties.
Definition 4.1. A regressive map is a function f : S → S such that for all s, t ∈ S: Remark 4.2. Property (i) seems natural, since we are dealing with semigroups. The "layering" of our semigroups motivates property (ii). More specifically, in §5, we will inductively construct "coherent" sequences α (0) ∈ γ S 0 , α (1) ∈ γ S 1 , . . . which are closed under all the functions f under consideration. Property (ii) makes such a construction tractable, since we can build each α (k) based only on the α (j) for j < k.
Properties (iii) and (iv) are harder to motivate, but they are essential to the proof of Lemma 5.7, which plays a big part in the proof of Theorem 5.8. We will see below that many natural examples of maps on layered semigroups satisfy these two properties.
We will consider sequences which are "well-behaved" with respect to a collection F of regressive maps on S. Generally, F will be closed under composition-however, this is not required for our arguments to work. To make effective use of the transfer principle, we do require the following: Example 4.4. Let W be the Graham-Rothschild semigroup of Example 3.5. Now, we consider infinite parameter wordsw -elements of (A ∪ {x 1 , x 2 , . . .}) ω such that all x i appear, with their initial appearances in increasing order.
Every suchw defines a function W → W , u → u[w], called the substitution map, by replacing each occurrence of x i in u with the ith character inw. Each substitution map is a regressive map, and the collection F of all such maps is locally finite, and closed under composition.
Example 4.5. Let FIN be the Gowers semigroup of Example 3.8. Every F : N → N induces a mapF : FIN → FIN by composition, i.e.F (f ) = F • f . When F is a nondecreasing surjection,F is a regressive map, and the collection F of all such maps is locally finite, and closed under composition. We call these maps (generalised) tetris operations.

Special sequences in Π S
Throughout this section, fix a layered semigroup S and a locally finite collection of regressive maps F on S. Essential to the proof of Theorem 5.8 is the following notion of coherence for elements of Π S .
Intuitively, (α i ) is F-coherent if it is closed under all functions f ∈ F. Definition 4.6 doesn't say anything about the product of elements in (α i ), so a stronger notion of coherence is needed to draw conclusions about products.
Definition 4.7. An F-coherent element (α i ) i<δ ∈ Π S is F-Ramsey if, for all i ≤ j < δ, α i α j . 9 We say S itself is F-Ramsey if Π S contains an F-Ramsey element.
Remark 4.8. Sequences of ultrafilters satisfying the analogue of Definition 4.7 (as well as being -minimal) are termed reductive in [HSZ19].

Main results
Throughout this section, fix a layered semigroup S and a locally finite collection of regressive maps F on S. The existence of an F-Ramsey in Π S is a powerful statementit implies that general Ramsey statements (Theorems 5.3 and 5.4) are true of our layered semigroup S. When put into context, these general statements reduce to familiar results of Ramsey theory. Before proving these statements, we need the following concept: [Lup17] or basic sequence [Tod10, Thm 2.20] if, for any n 0 < · · · < n ℓ−1 and f 0 , . . . , f ℓ−1 ∈ F, f 0 (x n 0 ) + · · · + f ℓ−1 (x n ℓ−1 ) is defined.
Remark 5.2. The above definition has content only when S is partial -every sequence in a total semigroup is a block sequence.
Theorem 5.3. Suppose S is F-Ramsey with δ layers, and n < δ. Then, for any finite colouring of S, there exists a block sequence (x i ) ∞ i=1 ⊆ S n such that for every k ≤ n, the following set is monochromatic: S k ∩ f 1 (x n 1 ) + · · · + f ℓ (x n ℓ ) : 1 ≤ n 1 < · · · < n ℓ , f 1 , . . . , f ℓ ∈ F We sketch the proof. Note that for an F-Ramsey (α i ) i<δ ∈ Π, the constant sequence (α n , α n , α n , . . .) effectively satisfies the conclusion of the theorem, except that it is in γ S n rather than S n . Given the existence of α n , we repeatedly apply transfer to deduce the existence of each x i .
Proof of Theorem 5.3. Fix an F-Ramsey sequence (α i ) i<δ ∈ Π. For each i < δ, let α n witnesses that the sentence 10 ∃ τ ∈ * S n : is true, so by transfer, there exists x 1 ∈ S n such that, for all f 1 , f 2 ∈ F, f 1 (x 1 ) ∈ A, and f 1 (x 1 ) + f 2 (α n ) is defined and in * A.
In general, suppose we have defined x 1 , . . . , x j−1 ∈ S n such that for all ℓ < j, all n 1 < · · · < n ℓ < j, and all f 1 , . . . , f ℓ , f ∈ F, we have Then, by a similar argument to before, it is also true that f 1 (x n 1 ) + · · · + f ℓ (x n ℓ ) + f (α n ) + * f ′ (α n ) is defined and in * * A for any choice of f ′ ∈ F. Thus, α n witnesses the truth of ∃ τ ∈ * S n : so by transfer, we get x j ∈ S n with similar properties. Continue ad infinitum.
Theorem 5.4. Suppose S is F-Ramsey with δ layers. Then, for any finite colouring of S, there exists a block sequence (x i ) i<δ ∈ i<δ S i such that for every k < δ, the following set is monochromatic: S k ∩ f 1 (x n 1 ) + · · · + f ℓ (x n ℓ ) : 0 ≤ n 1 < · · · < n ℓ < δ, f 1 , . . . , f ℓ ∈ F Proof. Identical to that of Theorem 5.3, but at each stage when defining x i , replace α n with α i , and S n with S i . Continue up to stage δ.
Theorem 5.3 easily implies a finite version: Theorem 5.5. Suppose S is F-Ramsey with δ layers, and n < δ, m ∈ N. Then, for any finite colouring of S, there exists a block sequence (x 1 , . . . , x m ) ⊆ S n of length m such that for every k ≤ n, the following set is monochromatic: S k ∩ f 1 (x n 1 ) + · · · + f ℓ (x n ℓ ) : n 1 < · · · < n ℓ ≤ m, f 1 , . . . , f ℓ ∈ F Corollary 5.6 (m = 1). Suppose S is F-Ramsey with δ layers, and n < δ. Then, for any finite colouring of S, there exists x ∈ S n such that for every k ≤ n, S k ∩ {f (x) : f ∈ F} is monochromatic.
Incredibly, given the existence of any F-coherent element in Π S , we can construct an F-Ramsey, and thus show that the general Ramsey statements above hold in S. The following lemma is essential to this construction.
Proof. The following argument is based on [Lup17]. Recall that Π is a compact usemigroup by Proposition 3.18. We show that the subset Π F ⊆ Π of F-coherent elements is a closed u-subsemigroup. Π F closed: apply Lemma 2.9, writing Π F as is F-coherent, by Proposition 2.6 and the fact that all f ∈ F are homomorphisms. By transfer, there exists (δ i ) ∈ Π F with (δ i ) ∼ (β i + * γ i ), as required.
It follows that Π F is itself a compact u-semigroup. By induction on k < δ, we will construct a sequence of elements α (k) i i<δ ∈ Π F with the following properties: To begin, take any u-idempotent α ′ i i<δ ∈ Π F by Lemma 2.12. Let Then, Z 0 is a compact u-semigroup by Lemma 2.9. Furthermore, it is nonempty, since it contains the element β i i<δ defined by To see this is in Π F , observe that for any f ∈ F, f α ′ 0 ∼ α ′ 0 , since f is regressive and Proceeding inductively, suppose sequences α have been defined as required. Let Then, Z k is a compact u-semigroup by Lemma 2.9. Furthermore, it is nonempty, since it contains the element β i i<δ defined by which is F-coherent by Lemma 5.7. Since α (k−1) i satisfies properties (i)-(iii), we have that β i i<δ ∈ Z k . Picking some u-idempotent α (k) i i<δ ∈ Z k , we can verify that α (k) i satisfies properties (i)-(iii) above.
⊆ FIN n such that for every k ≤ n, the following set is monochromatic: The finite version (due to Bartošová . . . , f m ) ⊆ FIN n of length m such that for every k ≤ n, the following set is monochromatic: Theorem 1] is obtained by taking the subset F ′ ⊆ F consisting of iterates of the tetris operation T (n) = max{n − 1, 0}. Since any F-coherent sequence is also F ′ -coherent, it follows that FIN is F ′ -Ramsey, so Theorem 5.3 gives: Corollary 6.3 (Gowers). For any finite colouring of FIN, there exists a block sequence (f i ) ∞ i=1 ⊆ FIN n such that for every k ≤ n, the following set is monochromatic: FIN k ∩ T (m 1 ) (f n 1 ) + · · · +T (m ℓ ) (f n ℓ ) : n 1 < · · · < n ℓ ; m 1 , . . . , m ℓ ∈ N whereT (m) denotes the mth iterate of the tetris operation.
By identifying a set A with its characteristic function 1 A , FIN 1 is identified with P fin (N) = {A ⊆ N : A finite}. Then, the case k = n = 1 gives Hindman's finite unions theorem [Hin74, Cor 3.3]: Corollary 6.4 (Hindman). For any finite colouring of P fin (N), there exists a disjoint sequence (A i ) ∞ i=1 of finite subsets of N such that the set {A n 1 ∪ · · · ∪ A n ℓ : n 1 < · · · < n ℓ } of all finite unions of elements of (A i ) ∞ i=1 is monochromatic.
Gowers' theorem admits many variants. For f, g ∈ FIN, say f < g if max(supp(f )) < min(supp(g)). Then, we can further restrict the operation of pointwise sum f + g to only be defined when f < g. The resulting semigroup is still adequate, and the γ FIN k are identical to before. Therefore, exactly the same argument proves the strong Gowers' theorem: Corollary 6.5 (Strong Gowers'). For any finite colouring of FIN, there exists an increasing sequence (f 1 < f 2 < · · · ) ⊆ FIN n such that for every k ≤ n, the following set is monochromatic: F 1 (f n 1 ) + · · · +F ℓ (f n ℓ ) : n 1 < · · · < n ℓ ,F 1 , . . . ,F ℓ ∈ F Again, k = n = 1 gives a strengthening of Corollary 6.4-we can find an increasing sequence (A 1 < A 2 < · · · ) with the same property, where for A, B ⊆ N, A < B ⇐⇒ max(A) < min(B).

The Graham-Rothschild theorem
Let W be the Graham-Rothschild semigroup of Example 3.5, and F be the collection of substitution mapsw on W, as in Example 4.4.
As we have seen, Theorem 6.6 is enough to deduce a Ramsey result about W. In fact, Theorems 5.3 and 5.4 give the main results from [CHS06], infinitary versions of the Graham-Rothschild theorem: Corollary 6.7 (Carlson-Hindman-Strauss, Theorem 1.4). For any finite colouring of W, there exists a sequence (u i ) ∞ i=0 ⊆ ∞ i=0 W i such that for every k ∈ N, the following set is monochromatic: : n 1 < · · · < n ℓ ,w 1 , . . . ,w ℓ ∈ F Corollary 6.8 (Carlson-Hindman-Strauss, Corollary 1.7). For any finite colouring of W, there exists a sequence (u i ) ∞ i=0 ⊆ W n such that for every k ≤ n, the following set is monochromatic: W k ∩ u n 1 [w 1 ] ⌢ · · · ⌢ u n ℓ [w ℓ ] : n 1 < · · · < n ℓ ,w 1 , . . . ,w ℓ ∈ F Corollary 5.6 gives Graham and Rothschild's original theorem [GR71]: Corollary 6.9 (Graham-Rothschild). For every m ≥ k and every finite colouring of W k , there exists u ∈ W m such that the set {u[w] :w↾ m ∈ W k } is monochromatic.
The case k = 0, m = 1 of Corollary 6.9 gives the famed Hales-Jewett theorem: Corollary 6.10 (Hales-Jewett). For every finite colouring of W 0 = A * , there is a variable word u ∈ W 1 such that {u[a] : a ∈ A} is monochromatic. Corollary 6.10 is known to imply van der Waerden's theorem [GRS90,p38]: Corollary 6.11 (van der Waerden). For every k ∈ N and finite colouring of N, there is a, d ∈ N such that the arithmetic progression {a + jd : 0 ≤ j < k} is monochromatic.
Remark 6.12. A construction satisfying Theorem 6.6 is given by Carlson, Hindman and Strauss [CHS06, Thm 2.12], and by Hindman, Strauss and Zamboni [HSZ19]. In fact, in both cases, they directly construct an F-Ramsey, all of whose elements are -minimal. Both arguments used to construct such a sequence are extraordinarily involved, long and complicated. The author believes that an F-coherent could be constructed by a significantly simpler argument, from which an F-Ramsey could be constructed via the general framework laid out in this paper, but has not been able to significantly simplify their argument, nor find an alternative method.
Remark 6.13. Nonetheless, if we restrict to the subset F ′ ⊆ F of strong variable words, i.e. those where all variables appear in order, a simple nonstandard argument can construct an F ′ -coherent. We rely on the following result from the theory of compact semitopological semigroups: Lemma 6.14 ([Tod10, Lemma 2.3]). If α ∈ * K is u-idempotent, and I ⊆ * K is a closed left ideal, then there is u-idempotent β ∈ I + * α such that β α.

Galvin-Glazer and Hindman's theorem
Let S be an adequate partial semigroup such that s + s is never defined. S is trivially layered by the layering map ℓ : S → N, s → 0. Let F consist of only the identity map id : S → S, which is a regressive map. Then, any α ∈ * S is trivially F-coherent, thus S is F-Ramsey. Applying Theorem 5.3 with n = 0 gives the Galvin-Glazer theorem (see [Tod10,Thm 2.20] or [Com77]): Corollary 6.17 (Galvin-Glazer). For any finite colouring of S, there exists an infinite sequence (x i ) i=0 ⊆ S of distinct elements such that the set x n 0 + · · · + x n ℓ−1 : n 0 < · · · < n ℓ−1 , is c-monochromatic.
The special case S = N and A = {x i : i ∈ N} gives us Hindman's finite sums theorem [Hin74, Thm 3.1]: Corollary 6.18 (Hindman). For any finite colouring c : N → r, there exists an infinite set A ⊆ N, such that the set FS(A) of all finite, nonrepeating sums from A is c-monochromatic.

Located variable words
In this section, we give a simple nonstandard proof of Bergelson, Blass and Hindman's partition theorem for located variable words [BBH94], using Theorem 6.6 and the general framework of layered semigroups developed herein. In fact, we obtain an infinitary, multivariable generalisation of that result, related to a result of Solecki [Sol19, §4.3.1].
Fix a finite alphabet A. A located word over A is a partial function w : N → A, where dom(w) is finite and nonempty. In the vein of Example 3.5, a located k-parameter word over A is a partial function w : N → A ∪ {x 1 , . . . , x k }, where dom(w) is finite, all the x i appear, and in increasing order. For such a word w, we define its length to be |w| = min{n ∈ N : w(n) undefined}.
For each k ∈ N, we let L k be the set of all located k-parameter words over A (where L 0 simply contains located words). Then, L = ∞ i=0 L i is a layered semigroup, with the operation + defined only when dom(w) ∩ dom(v) = ∅. Notice that L is an adequate partial semigroup, and the γ L m are exactly the cofinite located m-variable words α-those whose domains dom(α) ⊆ * N are disjoint from N. As in Example 4.4, substitution maps u → u[w] are defined by infinite variable words w, in much the same way: In fact, we can naturally identify the Graham-Rothschild semigroup W as a subset of L, and the above definition extends the substitution maps on W. As before, all such substitution maps are regressive, and the collection F of all of them is locally finite, and closed under composition. Assuming the existence of an F-coherent in Π W , we can construct an F-coherent in Π L by a simple nonstandard argument: Lemma 7.1. L has an F-coherent.
Proof. Pick an F GR -coherent sequence (α i ) ∞ i=0 in the Graham-Rothschild semigroup. Note that all substitution maps preserve the length of words, thus each α i must have infinite length. If any α i was finite, F-coherence and Proposition 2.6.(i) would imply all the α i are finite, and of the same length |α i | = n. But then α n+1 cannot exist, since there are no (n + 1)-parameter words of length n.
Define g : L → L as the map which takes the "second half" of any located variable word: g(w)(n) = w(n) n ≥ |w|/2 undefined n < |w|/2 Note that g commutes with every substitution map, i.e. g u[w] = g(u)[w] for all u ∈ L, w ∈ F. By transfer, this is also true for nonstandard words α ∈ * L. Now, define β i = g(α i ) for each i ∈ N. Since the lengths |α i | ∈ * N \ N are infinite, it follows that each β i is undefined up to |α i |/2 ∈ * N \ N, whence β i ∈ γ L i . Thus, The F-coherence of (β i ) follows from Proposition 2.6.(ii)-for all i ∈ N andw ∈ F, there is j ≤ i such that It follows by Theorem 5.8 that L is F-Ramsey. Applying Theorems 5.3 gives an infinitary, multivariable generalisation of the Bergelson-Blass-Hindman theorem on located words [BBH94]: Corollary 7.2. For any n and finite colouring of L, there exists a block sequence (u i ) ∞ i=1 ⊆ L n such that for every k ≤ n, the following set is monochromatic: L k ∩ u n 1 [w 1 ] + · · · + u n ℓ [w ℓ ] : n 1 < · · · < n ℓ ,w 1 , . . . ,w ℓ ∈ F The original theorem of Bergelson, Blass and Hindman is the finite version when m = 0, k = 1: If we instead take Corollary 7.2 with m = k = 1 and A = ∅, we again obtain Hindman's finite unions theorem (Corollary 6.4).
Remark 7.4. The proof of Lemma 7.1 is also valid for the subcollection F ′ ⊆ F of substitution maps corresponding to strong variable words (see Remark 6.13), so along with Theorem 6.16, this gives a short nonstandard proof of the weaker version of Corollary 7.2 for strong variable words.
Remark 7.5. As with Corollary 6.5, we can also restrict the operation w + v to only be defined when w < v, i.e. dom(w) < dom(v). The proof then goes through unchanged, and we get a stronger version of Corollary 7.2, where the block sequence (u 1 < u 2 < · · · ) ⊆ L n can be taken to be increasing.

A common generalisation
It is notable that Gowers' theorem and the infinitary Bergelson-Blass-Hindman theorem both generalise the finite unions theorem of Hindman [Hin74,Cor 3.3]. Here, we present a common generalisation of both theorems, and prove it using the general framework of layered semigroups previously described.
Let A be a finite alphabet, and X = {x 0 , x 1 , x 2 , . . .} be a countably infinite set of variables. Note that, compared to the Graham-Rothschild case, we have added an extra variable symbol x 0 , which we interpret to mean "undefined". Let FIN A be the set of f : N → A ∪ X which are eventually constant and equal to x 0 .
For f, g ∈ FIN A , the sum f + g is defined iff for every n ∈ N, at least one of f (n), g(n) is x 0 . In this case, f + g is defined as Under this operation, and the layering map ℓ(f ) = max{k : f (n) = x k for some n}, FIN A is a commutative, adequate, partial layered semigroup. Call a map F : N → A ∪ X strong if F (0) = x 0 , and all x i appear as values of F in increasing order (i.e. whenever F (n) = x i , F (m) = x j for n ≤ m, then i ≤ j). The strong maps act on FIN A by "composition": Every strongF is a regressive map, and the collection F of all such strong maps is locally finite, and closed under composition.
Identifying "undefined" with the symbol x 0 , the semigroup L A of located words over A is a subset of FIN A . As this containment is strict, we need to strengthen Theorem 5.3 to ensure that the sequence can be found inside a specified subsemigroup T ⊆ FIN A . Henceforth, we assume T is layerwise adequate, and closed under all strong maps. We define Π T := ∞ i=0 γ T i , and say that T is F-Ramsey if Π T contains an F-Ramsey element. Theorem 5.3 admits the following strengthening: Theorem 7.6. Suppose T ⊆ FIN A is F-Ramsey, and n ∈ N. Then, for any finite colouring of FIN A , there exists a block sequence (f i ) ∞ i=1 ⊆ T n := T ∩ FIN A n such that for every k ≤ n, the following set is monochromatic: F 1 (f n 1 ) + · · · +F ℓ (f n ℓ ) : n 1 < · · · < n ℓ ,F 1 , . . . ,F ℓ ∈ F Proof. As for Theorem 5.3, but replace all occurrences of S n with T n .
The question remains-when is T F-Ramsey?
Lemma 7.8. Every complete T ⊆ FIN A is F-Ramsey.
Proof. Pick u-idempotent ν ∈ γ T 0 , ω ∈ γ T 1 such that ω ν and ω[a] ∼ ν for every a ∈ A (see Lemma 6.15). Since T is complete, the argument in Theorem 6.16 works, giving an F-coherent in Π T . Theorem 5.8 now shows T is F-Ramsey, by restricting to Π T rather than Π S .
Note that FIN A is trivially complete, hence it is F-Ramsey. Applying Theorem 7.6 with A = ∅ and T = FIN ∅ = FIN gives Gowers' theorem (Corollary 6.1, where we interpret each variable symbol x k as the number k ∈ N). L A ⊆ FIN A is also complete, and Theorem 7.6 with T = L A gives the Bergelson-Blass-Hindman theorem for strong variable words (Corollary 7.2, interpreting x 0 to mean "undefined").
Remark 7.9. Theorem 7.6 doesn't recover the full strength of Corollary 7.2-we could attempt to do so by considering a wider class F + of regressive maps F : N → A ∪ X, where only the first occurrences of each x i must appear in increasing order. It is unclear whether FIN A is F + -Ramsey. If it were, we would expect that the argument to construct an F + -coherent would be more complicated, as per Remark 6.12. This would give an even more generalised version of Gowers' theorem, where some layers of a function f ∈ FIN can be "reversed".
Theorem 7.6 is the case m = 1, while the Milliken-Taylor theorem is the case A = ∅, T = FIN ∅ = FIN, n = 1.

Closing remarks
This paper outlines a general framework for proving Ramsey-type results about layered semigroups. We have seen in §6 and §7 that many results in Ramsey theory can be expressed and proven via our framework. However, there are still Ramsey statements about semigroups which we have not been able to recover.
In particular, we saw that van der Waerden's theorem is a corollary of the Graham-Rothschild theorem, which can be proven in our framework, but a direct formulation remains elusive. We could attempt to obtain it from Theorem 5.4 by letting S = N + × {0, 1} and ℓ : (n, i) → i. Then, consider maps f c : S → S 0 , where f c : (n, 0) → (n, 0), (m, 1) → (cm, 0) for all c up to some fixed k. Taking the operation + on S 0 to be usual addition, Theorem 5.4 obtains the structure of van der Waerden's theorem. However, it may not be possible to extend + to S so that (S, ℓ) is layered and the f c are homomorphisms.
Question 8.1. Is there a layered semigroup S, and regressive maps F on S, such that Theorem 5.3 or Theorem 5.4 reduce to van der Waerden's theorem?
Another result notably missing is Ramsey's theorem itself. The most sensible attempt seems to be taking S = P fin (N) = {F ⊆ N : F finite}, and layering it by ℓ : F → |F |. Then, given a sequence (F i ) ∞ i=1 of finite sets, an infinite homogeneous set B could be obtained by B = ∞ i=1 F i . The challenge is how to define a semigroup operation and regressive maps that allow us to generate any finite subset of B.
Question 8.2. Is there a layered semigroup S, and regressive maps F on S, such that Theorem 5.3 or Theorem 5.4 reduce to Ramsey's theorem?
Definition 4.1 imposed strong conditions on the types of maps considered, particularly conditions (iii) and (iv). While all examples considered satisfied all these conditions, perhaps a different argument is possible which doesn't require these conditions. This would require a new construction in the proof, since conditions (iii) and (iv) are necessary to Lemma 5.7. Question 8.3. Can Theorem 5.8 be proven when conditions (iii) and/or (iv) are weakened or removed from Definition 4.1?
Our framework allows us to deduce Ramsey statements about (S, F) from the existence of an F-coherent in S. However, we have not found a general way to construct Fcoherents in arbitrary layered semigroups S, or ensure they exist. The most general construction we have given of an F-coherent is Lemma 7.8, but this still depends crucially on the structure of FIN A . Farah-Hindman-McLeod [FHM02, Thm 3.8] give a fairly general construction, but it requires very strong conditions on F, which do not hold in many natural examples.
Problem 8.4. Find a general way to construct an F-coherent in a layered semigroup S, making as few assumptions about S and F as possible.
We did not present a construction of an F-coherent in the Graham-Rothschild semigroup W, instead deferring to a result of Carlson-Hindman-Strauss [CHS06, Thm 2.12]. They directly construct a -minimal F-Ramsey, and as a result, their argument is extremely complicated. Morally, if we only need to construct an F-coherent, there should be a simpler argument-then our framework would imply the Graham-Rothschild theorem.
Problem 8.5. Find a simpler construction of an F-coherent in the Graham-Rothschild semigroup W.
Our results generalise many Ramsey-type or partition results on layered semigroups. However, there is another thread of Ramsey theory dealing with density results, having the form that any set A ⊆ M of positive "density" contains a substructure N ⊆ M with certain properties. Often, we take M = N and interpret density to mean upper density; d(A) = lim sup n→∞ |A ∩ [0, n)|/n for each A ⊆ N . For example, Szemerédi's theorem is the density version of van der Waerden's theorem: Theorem 8.6 (Szemerédi). For any k ∈ N and A ⊆ N with d(A) > 0, there are a, d ∈ N + such that the arithmetic progression {a + cd : 0 ≤ c < k} ⊆ A.
By defining a suitable notion of density on W, Furstenberg and Katznelson obtained a density version of the Hales-Jewett theorem [FK91]. Nonstandard methods have also been applied successfully to prove density-type results [DGL19, Part III]. Thus, it may be possible to develop a similar framework for proving density theorems in layered semigroups. This would require a suitable notion of density on layered semigroups-McLeod has already generalised some combinatorial notions of size in N to this setting [McL00].
Problem 8.7. Develop an analogous framework for proving density results on layered semigroups.
Variations on the basic structure of Theorem 5.3 also appear in Ramsey theory. For example, take the Graham-Rothschild semigroup W, and let LV ⊆ W be the subset consisting of left-variable words-those whose first character is the variable x 1 . The Hales-Jewett theorem for left-variable words states: Theorem 8.8 ([Tod10, Theorem 2.37]). For any finite colouring of W 0 = A * , there exists a word w ∈ W 0 and a sequence (u i ) ∞ i=0 ⊆ LV ∩ W 1 of left-variable words such that the following set is monochromatic: w ⌢ u n 1 [a 1 ] ⌢ · · · ⌢ u n ℓ [a ℓ ] : n 1 < · · · < n ℓ , a 1 , . . . a ℓ ∈ A Effectively, we ensure that all products of subsequences have the same nonvariable part. LV ⊆ W is a right ideal, so we could generalise this idea to right layered semigroups (S, ℓ, R), with R ⊆ S a distinguished right ideal meeting every layer except S 0 . Then, we instead consider sequences in Λ S := * S 0 × 1≤i<δ * R i , and define analogous notions of right F-coherent and right F-Ramsey sequences. Further investigation is required to see if the proofs of Theorems 5.3 and 5.8 translate to this setting. Problems may arise in translating the proof of Theorem 5.8, if we require conditions such as κ+ * f (α i ) ∼ κ+ * α j , which are not continuous in α i . Problem 8.9. Translate our ideas to the setting of right layered semigroups.