A NEW PERSPECTIVE ON SEMI-RETRACTIONS AND THE RAMSEY PROPERTY

. We investigate the notion of a semi-retraction between two ﬁrst order structures (in typically diﬀerent signatures) that was introduced by the second author as a link between the Ramsey property and generalized indiscernible sequences. We further these connections between combinatorics and model theory, and look at semi-retractions through a new lens establishing transfers of the Ramsey property and ﬁnite Ramsey degrees under quite general conditions that are optimal as demonstrated by counterexamples. Finally, we compare semi-retractions to the category theoretic notion of a pre-adjunction.


Introduction
Our current subject is finiteness of Ramsey degrees for embeddings of finitely generated structures and mechanisms that transfer this property between classes.Given a first-order structure A in any signature, let K := age(A) be the class of all finitely generated substructures of A. Given an element A ∈ K, we may refer to all substructures of A isomorphic to A as the A-substructures of A. We say that K has the Ramsey property if it has a certain partition property as stated in Definition 2.5: The class K has the Ramsey property (RP) if for all A, B ∈ K and integers k ≥ 1 there exists C ∈ K such that for any coloring of the A-substructures of C, there exists a copy B ′ of B in C such that the coloring is constant on the A-substructures of B ′ .There has been much recent work in structural Ramsey theory to understand the full landscape of classes of structures with the Ramsey property.The Nešetřil-Rödl and Abramson-Harrington theorems gave general classes of structures with the Ramsey property [1,26], such as linearly ordered graphs and hypergraphs.Several years later, this work was extended to first order structures in signatures that are not purely relational [13], which is our present context.
Ramsey, in his 1929 paper, described the Entscheidungsproblem from the 1928 book by Hilbert and Ackermann, Grundzüge der theoretischen Logik as "the problem of finding a regular procedure to determine the truth or falsity of any given logical formula" [30].In an effort to address this problem for special cases of formulas, Ramsey proved what is now known as the infinite Ramsey theorem for sets, followed by the finite Ramsey theorem for sets (what we would call the Ramsey property for the class of finite sets, in the language of Definition 2.5).The main theorem in [30] for universal sentences F in a relational signature The first author was supported by National Science Foundation grants DMS-1953955 and CAREER DMS-2144118.
The second author was supported by National Science Foundation grant number DMS-2246995.This article is based upon work supported by the National Science Foundation under Grant No. DMS-1928930 while the second author participated in a program hosted by the Mathematical Sciences Research Institute in Berkeley, California, during Summer 2022.The second author completed parts of this paper in collaboration with the first author while supported by an AWM-NSF Travel Grant in 2023.
A portion of this research was carried out as part of the American Institute of Mathematics (AIM) SQuaREs program.The authors thank AIM for their support.
states that there is an integer m depending on certain quantities derived from F , such that F is consistent in a structure whose universe has m or more members if and only if some logically equivalent sentence P in disjunctive normal form contains a disjunct of a certain syntactic form.Let ∆ be a finite set of relation symbols and let n be an integer.It is the presence of ∆-n-indiscernible sequences (see Definition 2.22) of a certain size depending on m, guaranteed by Ramsey's combinatorial theorems, that guarantees the necessity of the condition in this main theorem.For further implications of Ramsey's work, the interested reader is invited to consult [19].Later, in [7], the infinite Ramsey theorem for sets is applied to obtain infinite ∆-n-indiscernible sequences locally based on an infinite subset of a structure.This notion was generalized in [34] to I-indexed indiscernible sets, which were the starting point for the investigations of the second author.
An I-indexed (generalized) indiscernible set (see Definition 2.23) is an I-indexed set of same-length finite tuples a i from some structure M, for i ∈ I, which sequence is homogeneous in a certain way: The structure M does not make any more distinctions between finite strings a ı , a  of tuples than the atomic formulas in I do between ı and .This tool gives streamlined proofs of the equivalence of certain dividing lines in classification theory in model theory, for example that a theory is unstable if and only if it has the independence property or the strict order property; or that a theory has the tree property if and only if it has the tree property of either the first or second kind [34].A property stated for a specific class of trees in [6] was referred to as the modeling property by the second author in [31] and proved to be equivalent to age(I) having the Ramsey property, under certain assumptions on I.In the Introduction to [32], this latter result was termed a "dictionary" theorem, in the spirit that the theorem translates phrase (1) (stated in the language of model theory) into phrase (2) (stated in the language of partition theory) under mild conditions: For the structure I, I-indexed indiscernible sets have the modeling property.(1) For the structure I, age(I) has the Ramsey property.(2) It is arguable that the entanglement of logic and partition theory from the start (as in [30]) renders the use of the term "dictionary" moot.The second author appeals to recent history when the two properties described in (1) and (2) were not as well understood to be equivalent.Though the Ramsey property was used extensively in [34] in different contexts to prove the existence of I-indexed indiscernible sets that model the definable relations on a pre-existing set of parameters (as was done in [7]), it was not generally clear that these were equivalent properties, and indeed, that the failure of the Ramsey property would guarantee failure of the modeling property in specific contexts, to the detriment of certain modeltheoretic investigations.The outstanding hope is that manipulations on the model-theory side could yield new results in partition theory.In fact, an argument in [32] that leveraged the theory of generalized indiscernible sequences provided a new proof of the result in [18] that a certain class of trees in a functional signature has the Ramsey property.In [32], the dictionary theorem was extended to include all cases when I is locally finite and ordered, modulo an additional property which was eliminated in [33] as a result of conversations with the first author.The complete Dictionary Theorem is stated in Theorem 2. 30.
In [33], the notion of semi-retraction was introduced by the second author, which is a pair of maps between two structures A, B in possibly different signatures (see Definition 2.20).This notion, together with the Dictionary Theorem, yielded a theorem detailing when a semi-retraction transfers the Ramsey property from B to A, stated in Corollary 2.34.Since the notion of semi-retraction is essentially algebraic, the first author suggested an investigation into a "formula-free" proof of the same result (one that does not specifically use the tools of first-order logic).This approach ultimately led to Theorem 5.1, Corollary 5.5 and Theorem 5.9, which are sharper refinements of Corollary 2. 34.
The paper is organized as follows.In Section 2, we outline our basic definitions and notational conventions as well as overview prior results.In Section 3, we state a characterization of semi-retractions in terms of the Ramsey property under certain conditions, Theorem 3.7, and give several examples and non-examples of semi-retractions.In Section 4, we show that the countable random graph and countable random n-regular hypergraphs for n ≥ 3 are semi-retracts of the countable atomless Boolean algebra.In Section 5, we present our "formula-free" argument for how semi-retractions transfer the Ramsey property, Corollary 5.5: If A is locally finite and the finitely-generated substructures of B are rigid, then if B has RP and A is a semi-retract of B, A must have RP.Moreover, Theorem 5.9 eliminates the assumption of rigidity in the case of relational structures.The same technique yields a result on transfer of finite small Ramsey degrees in Corollary 5.3 and Theorem 5.1 (in the latter, rigidity may be omitted again).In Section 6, we explore a categorical characterization of semi-retractions as well as the relationship to pre-adjunctions, which were introduced in [22].In section 7, we discuss the relationship between semi-retractions and more commons constructions in model theory.

Preliminaries
We present our basic notation around sequences.A tuple a is a finite sequence (a 0 , . . ., a n−1 ) for some natural number n, and |a| = n is defined to be the length of the tuple.Given a set X and an integer s ≥ 1, X s denotes the set of all s-tuples from X.We define ran a := {a 0 , . . ., a n−1 }.All tuples a are assumed to be finite unless said otherwise.For two tuples a 1 , a 2 , by a 1 ⊆ a 2 we mean that ran a 1 ⊆ ran a 2 as sets.For an integer k ≥ 0, k := {0, 1, 2, . . ., k − 1}.For an integer k ≥ 1 a k-coloring of a set X is any function c : X → k.We denote the image {c(x) : x ∈ X} by c(X).Given a function f : X n → Y and ı ′ := (i k : k < s) ∈ X s , we define f (ı ′ ) = (f (i k ) : k < s).Let f : X → Y be an injective function and let ψ : A → B be a function between two subsets of X.We will denote by A signature L is a list of symbols that must be interpreted in any L-structure as either relations or functions of the specified arity.The signature is relational if it consists only of relation symbols, and functional if it contains at least one function symbol.We do not assume that signatures are either finite or relational, unless explicitly stated.The cardinality of a set S is denoted by |S|.Given a structure A, L(A) refers to the signature of A, |A| refers to the underlying set of A, and ||A|| to the cardinality of the set |A|.We denote by Th(A) the theory of A -the set of all L(A)-sentences true in A. Given a from A, a A denotes the substructure generated by a in A (it will be the closure of a under the n-ary function symbols of L(A) for all n ≥ 0).Given a (possibly infinite) tuple x in 1-1 correspondence with an enumeration a of A, by Diag A (x) we mean the set of all R(x i 0 , . . ., x i n−1 ) for relation symbols R ∈ L(A) such that A R(a i 0 , . . ., a i n−1 ).For an integer n ≥ 1, an n-ary L-formula is a first-order formula with free variables included in the list x 0 , . . ., x n−1 .We say that a set X ⊆ |A| n is definable if there exists n and an n-ary L(A)-formula ϕ(x) such that for all a from A, A ϕ(a) if and only if a ∈ X, and 0-definable if ϕ(x) may be chosen without parameters from A. A set X ⊆ |A| n is quantifierfree definable if it is 0-definable by way of a quantifier-free formula ϕ(x).A structure A is ω-homogeneous if any partial isomorphism between finite subsets of A can be extended to an automorphism of A. For the basics of formulas, structures, and Fraïssé theory the reader is referred to [20,12].
For structures A, B, A ⊆ B always denotes that A is a substructure of B, in which case they are structures in the same signature.The age of a structure A, age(A) is the set of all finitely-generated substructures of A, modulo L(A)-isomorphism.We will use Roman letters A, B for finitely generated substructures of a given structure A. For structures A, A ′ , A ∼ = A ′ means that the structures are isomorphic (and thus, they are in the same signature).To emphasize the shared signature, we might write A ∼ = L A ′ , where L = L(A) = L(A ′ ).We say that a structure A is rigid if the only automorphism of A is the identity map.(1) Given a set ∆ of L-formulas, a ∆-n-type (over ∅ in A) is a set of n-ary formulas from ∆ that is consistent with Th(A).A complete ∆-n-type π is a ∆-n-type such that for every n-ary formula ϕ from ∆, either ϕ ∈ π or ¬ϕ ∈ π.If we drop the use of n, we mean ∆-n-type for some n.(2) In the case that ∆ is the set of all quantifier-free L-formulas, we call a ∆-n-type in A a quantifier-free n-type in A. In the case that ∆ is the set of all L-formulas, we call a ∆-n-type in A an n-type in A. Such types are described as "complete" if they are complete ∆-n-types for the appropriate ∆.
for all ϕ ∈ p. (4) A structure A is κ-saturated if for all subsets S ⊆ |A| such that |S| < κ, A realizes all types in A over S. We say that A is saturated, if it is ||A||-saturated.∆ (a) is the complete ∆-n-type of a in A. For tp A ∆ (a), we write qftp A (a) when ∆ is the set of all quantifier-free formulas, and we write tp A (a) when ∆ is the set of all formulas.(7) For same-length tuples a, a ′ from A, we will use a ∼ A a ′ to mean that qftp 2.1.Structural Ramsey theory and topological dynamics.We start this section with some standard definitions from structural Ramsey theory, see [16, Introduction of part (D)], [28], [25].Given L-structures A, B we define B A to be the set of all substructures A ′ ⊆ B such that A ′ ∼ = A and Emb(A, B) to be the set of all L-embeddings f : Following [21], we define two types of Erdős-Rado partition arrow denotes that for all r-colorings c : M A → r, there exists We say that the structure B ′ above is ≤ d-chromatic (for the coloring c on copies of A).
If d = 1, it will be dropped in the notation, and we will write denotes that for all r-colorings c : Emb(A, M) → r, there exists , it will be dropped in the notation, and we will write Let K be a class of finitely-generated L-structures, for some signature L, and let A, B ∈ K.We say that (A, B) is a Ramsey duo for K if for all integers r ≥ 2 there exists C ∈ K such that C −→ (B) A r .We say that B ′ is a copy of B homogeneous for c (on copies of A).Definition 2.5.We say that K has the Ramsey property (RP) if for all A, B ∈ K, (A, B) is a Ramsey duo for K.
As we can see in examples above, the class of finite graphs does not have the Ramsey property, but its expansion by linear orders does.This phenomenon leads to the notion of a Ramsey degree.Definition 2.8.Let K be a class of L-structures and let A ∈ K.We say that A has finite Ramsey degree in K if there is an integer d ≥ 1 such that for every B ∈ K and every r ≥ 2, there is C ∈ K such that C −→ (B) A r,d .We define d(A, K) to be the least such integer d, if it exists, and otherwise define d(A, K) = ∞.If d(A, K) is finite, it is the Ramsey degree of A in K.
Observation 2.9.A class K has RP if and only if d(A, K) = 1 for all A ∈ K.
We can make a related definition for an infinite structure M. Definition 2.10.Given an L-structure M and a finitely-generated substructure A ⊆ M, we say that A has finite small Ramsey degree in M if for some integer d ≥ 1, for all finitely-generated structures B ⊆ M, for all integers r ≥ 2, M −→ (B) A r,d .If A has finite small Ramsey degree in M, then we define d(A, M) to be the least integer d such that for all finitely generated structures B ⊆ M, for all integers r ≥ 2, M −→ (B) A r,d .If A does not have finite small Ramsey degree in M, we define d(A, M) = ∞.We say that (A, B) is a Ramsey duo for M if for all integers r ≥ 2, M → (B) A r Proposition 2.11.Fix a signature L and a locally finite L-structure M .Let K := age(M).Then, for any finite substructures A, B ⊆ M, (A, B) is a Ramsey duo for K if and only if (A, B) is a Ramsey duo for M.
A proof for Proposition 2.11 is straightforward and provided in the Appendix.Given the ability to do calculations in a countably infinite structure, the following is common usage: Definition 2.12.We say that A has RP if age(A) has RP.
Striking connections between dynamics of an automorphism group of an ω-homogeneous structure A and Ramsey degrees of age(A) were established in [16].The work of these authors and others shows that this relationship is best explained in terms of the Ramsey properties of embeddings rather than substructures.Definition 2.13.Let K be a class of L-structures and let A ∈ K.We say that A has finite Ramsey degree for embeddings in K if there is an integer d ≥ 1 such that for every B ∈ K and every r ≥ 2 there is C ∈ K such that for every coloring c : Emb(A, C) → {0, 1, . . ., r − 1}, there is h ∈ Emb(B, C) such that c on h • Emb(A, B) takes at most d colors.
We define d e (A, K) to be the least such integer d, if it exists, and otherwise define d e (A, K) = ∞.If d e (A, K) is finite, it is the Ramsey degree for embeddings of A in K.
If d e (A, K) = 1 for all A ∈ K, then we say that K has the Ramsey property for embeddings.
Definition 2.14.Given an L-structure M and a finitely-generated substructure A ⊆ M, say that A has finite small Ramsey degree for embeddings in M if for some integer d ≥ 1, for all finitely-generated structures B ⊆ M, for all integers r ≥ 2, M e − −→ (B) A r,d .We define d e (A, M) to be the least such integer d, if it exists, and otherwise define It is well known that the Ramsey property for a class K that is an age of finite structures can be understood as a property of an infinite structure M with age(M) = K.This is proved for a countable age of finite structures in Proposition 3 of [28] using ultrafilters, and the generalization to Ramsey degrees is proved in the more general setting of a category C with a distinguished subcategory C fin satisfying certain assumptions in Lemma 3.4 of [21].
In the Appendix we provide a model-theoretic argument for Lemma 2.15 by compactness as an alternative approach.The relationship between Ramsey degrees for structures and Ramsey degrees for embeddings has a long history, dating back to work in [1], [26], [10].This history is cataloged in the introduction to Section 10 of [16], in which the case of K having an ordered expansion with RP is worked out in detail.A more general result in a category theory context is offered by Proposition 3.1 of [21].
Proposition 2.16 ([16, 21]).Given a signature L and a class K of finite L-structures and A ∈ K, if d e (A, K) is finite, then so is d(A, K) and Below we state the famous Kechris-Pestov-Todorčević correspondence from [16] between the Ramsey property of age(A) for a (countable) ω-homogeneous structure A and the fixed point on compacta property of Aut(A).We start by introducing the necessary notions from topological dynamics.
Let G be a topological group and X a compact Hausdorff space.A continuous function (1) α(e, x) = x for any x ∈ X and e the neutral element of G, (2) α(gh, x) = α(g, α(h, x)) for every g, h ∈ G and x ∈ X.
In, other words, a flow is a continuous group action, where continuity is considered with respect to the product topology.We typically write gx in place of α(g, x).A G-flow on X is minimal if X does not contain a non-empty proper closed G-invariant subset.A homomorphism between G-flows X and Y is a G-equivariant continuous map φ : X → Y, i.e., for every g ∈ G and x ∈ X, we have φ(gx) = gφ(x).If φ is onto, we say that Y is a quotient of X and if φ is bijective, it is called an isomorphism.Ellis showed that up to isomorphism, for every topological group G, there is a unique universal minimal flow, M (G), that is, a minimal G-flow which has every minimal G-flow as a quotient (see [8] for discrete and [9] for arbitrary groups).We call G extremely amenable if every G-flow X has a fixed point -a point x 0 ∈ X such that gx 0 = x 0 for every g ∈ G.It immediately follows that G is extremely amenable if and only if M (G) is a single point (and thus every minimal G-flow is a single point).
(2) The class age(A) satisfies the Ramsey property and consists of rigid elementsstructures whose automorphism group is trivial.
In fact a consequence of Proposition 2.16 was observed as Proposition 2.3 in [23] stated in a more general category theory context, namely that a class K of finite structures has the Ramsey property for embeddings if and only if K has the Ramsey property for substructures and every member of K is rigid.Thus item (2) in Theorem 2.17 can be replaced by (2)' age(A) satisfies the Ramsey property for embeddings.
In [16], the authors computed a number of universal minimal flows of automorphism groups of countable ω-homogeneous structures whose ages have finite Ramsey degrees.In fact, Zucker later proved in [37] that finite Ramsey degrees are equivalent to the universal minimal flow being metrizable, as stated precisely below.
(2) The class age(A) has finite Ramsey degrees for embeddings.

Semi-retractions.
In this section, we will review the notions that informed the proof of the Ramsey transfer result Corollary 2.34.These notions come from model theory, but we will see later that the more general approach in the current paper allows us to drop some of the assumptions originally thought to be necessary in Corollary 2.34, as evidenced by Corollary 5.5.

Definition 2.19 ([33]
).Given any structures A, B, not necessarily in the same signature, we say that an injection h : (ii) quantifier-free type-preserving (qftp-preserving) if A, B are structures in the same signature and qftp A (ı) = qftp B (h(ı)) (thus, it is also qftp-respecting).

Definition 2.20 ([33]
).Let A, B be any structures.We say that A is a semi-retract of B (via (g, f )) if (1) there exist qftp-respecting injections (2) such that A f g − → A is an embedding (equivalently, is qftp-preserving).
We refer to the pair (g, f ) as the semi-retraction between A and B. We will refer to property (1) in this Definition as the qftp-respecting property of semi-retractions and property (2) as the composition property of semi-retractions.

2.3.
The modeling property.The first use of Definition 2.22 was in [7] to construct models with many automorphisms.The presentation of Definition 2.22 that we adopt in this paper can be found in [34].
Definition 2.22 ([7], [34]).Given a structure M, a set ∆ of L(M)-formulas, and an integer n ≥ 1, a ∆-n-indiscernible sequence is a sequence of finite l-tuples a i from M for some integer l ≥ 1 indexed by some linear order I = (|I|, <) such that for all increasing n-tuples ı,  from I, a ı ≡ M ∆ a  .In the study of classification theory in model theory there has been significant use of a generalization of this notion named "I-indexed indiscernible sets" in [34] which we will define as follows.

Definition 2.23 ([34]
). Fix a structure I, an integer l ≥ 1, and l-tuples a i from some structure M, for all i ∈ I.We say that (a i | i ∈ I) is an I-indexed indiscernible set if for any integer n ≥ 1, for all n-tuples ı,  from I, We say that (a i | i ∈ I) is an I-indexed indiscernible sequence if I is an ordered structure, and additionally a generalized indiscernible sequence when I is clear from context.
We review some definitions and basic results from [33], where the second author gave a more complete proof that the modeling property is a model-theoretic analogue of the Ramsey property.Definition 2.24 ([32]).Given an integer l ≥ 1, an L ′ -structure I, an L-structure M and an I-indexed set of l-tuples from M, X = (a i | i ∈ I), we define the EM-type of X (EMtp(X)) to be a syntactic type in variables (x i | i ∈ I), where |x i | = l for each i ∈ I, as follows: [32]).Given an L ′ -structure I and an L-structure M, fix sets of l-tuples from M indexed by Y EMtp(X) if and only if for any integer n ≥ 1, for all complete quantifier-free n-types η in I and all n • l-ary formulas ϕ ∈ L, if we have the rule then we have the rule where a i , b i are from some L-structure M. We say Y is locally based on X if for any finite set of L-formulas, ∆, and for any finite tuple (j 0 , . . ., j n−1 ) from A, there exists a tuple (i 0 , . . ., i n−1 ) from A such that Where Y and X are understood from context, this property will be referred to as local basedness.
We give a proof sketch to illustrate the idea behind Proposition 2.27.
We have that Y is locally based on X if and only if Y EMtp(X).
Proof.Suppose Y EMtp(X).To show local basedness, fix a finite set of L-formulas ∆ and a finite tuple  from I with complete quantifier-free type η in I. Let ϕ be a conjunction of all the formulas in the finite ∆-type of b  .Suppose, for contradiction, there is no ı Since Y EMtp(X), we must have that Suppose Y is locally based on X.To show Y EMtp(X), consider a rule from EMtp(X): Fix any  from I such that I η().By local basedness, there is ı By the rule for η, M ϕ(a ı ).Thus we have that M ϕ(b  ), as well.And so we have proved the rule (∀)(I η() ⇒ M ϕ(b  )).Since this is true for any rule, Y EMtp(X).
Definition 2.28 ([32]).Given a structure I, we say that I-indexed indiscernible sets have the modeling property if for any integer l ≥ 1, any ||I|| + -saturated structure M, and any 29.In fact, it suffices to require that M in Definition 2.28 be ||I||-saturated, since the type describing Y has ||I|| variables and no parameters from M, as noted in Remark 2.2.Previously, in [32], the bound was required to be ||I|| + not ||I||.
Theorem 2.30 (Dictionary Theorem, [31,32,33]).Suppose that I is a locally finite ordered structure.Then I-indexed indiscernible sequences have the modeling property if and only if age(I) has RP.
Theorem 2.30 fails when we drop order: Example 2.31.Let I = (N, =) and note that age(I) has RP by Example 2.6.If we take an I-indexed set in M := (N, <), X = (i | i ∈ I), then there is no I-indexed indiscernible set in any extension M ′ M locally based on X.Such a set would need to have tp M ′ (i, j) = tp M ′ (j, i) for i = j ∈ N, which is not possible.
Example 2.31 illustrates why rigidity has been important in applications of structural Ramsey theory to generalized indiscernible sequences in model theory.Consider an injection f : I → M and parameters (a i : i ∈ I) such that a i = f (i), for all i ∈ I. Given a finite substructure A ⊆ I of size n, the injection f induces a (possibly infinite) coloring on tuples (a 0 , . . ., a n ) such that ran(a) ∼ = A, where tp M (f (a)) is the color of a. Thus, if finitelygenerated substructures of M are rigid, then we will not have an I-indexed indiscernible set locally based on (a i : i ∈ I) if A has a nontrivial automorphism.Note that the modeling property (Definition 2.28) is a universal statement about all structures M, and so it would immediately fail for I-indexed indiscernible sets if I is not rigid.The reason for the modeling property to be a universal property is so that I can function as a tool in classification theory to compare all theories, even those theories whose models have rigid finitely-generated substructures.In fact, theories whose models are linearly ordered by a formula in the language play an important role in classification theory as they are unstable and have the strict order property.
Theorem 2.30 fails when we drop local finiteness: Example 2.32.Let I = (Z, p, s, <) be the structure on Z with the usual order < and where p, s are unary function symbols interpreted as "predecessor" and "successor", respectively.The only possible finitely generated substructure of Z is the whole structure.Since ||age(I)|| = 1, the class trivially has RP.However, we will show that I-indexed indiscernibles do not have the modeling property, showing the essentialness of the assumption that I be locally finite in Theorem 2.30.Let M be the Fraïssé limit of finite convexly ordered equivalence classes in signature {E, ≺}.Let X = (a i | i ∈ Z) be such that all a i for i odd are in one E-class that we call Odd and all a j for j even are in a separate E-class that we call Even.Moreover, let i < j ⇒ a i ≺ a j , and Odd < Even in M. Within this example, we use ∼ to denote E-equivalence in the following visualization, where elements are listed in ≺-increasing order in M: . . .a 1 ∼ a 3 ∼ a 5 . . .≁ . . .a 2 ∼ a 4 ∼ a 6 . . .
The type EMtp(X) requires that whenever j = s(s(i)), x i ≺ x j and E(x i , x j ).However, a decision is not made about x i ≺ x j when j = s(i), since sometimes a i ≺ a j and sometimes a j ≺ a i , when j = s(i), though a i , a j are always E-inequivalent when j = s(i).Suppose there is an I-indexed indiscernible set locally based on X.If this indiscernible set chooses the rule that b i ≺ b j , whenever j = s(i), then M would admit equivalence classes that are not convexly ordered, e.g. with b Theorem 2.33 ([33]).Let A and B be any structures.Suppose that A is a semi-retract of B. Furthermore, suppose that B-indexed indiscernible sets have the modeling property.
Then A-indexed indiscernible sets have the modeling property.

Corollary 2.34 ([33]
).Let A and B be locally finite ordered structures.Suppose that A is a semi-retract of B and B has RP.Then A has RP.
Proof.This follows by Theorem 2.33 and Theorem 2.30.

Semi-retractions, Reducts and Examples
In this section, we consider basic examples of semi-retractions and give a characterization of semi-retractions in Theorem 3.7 under certain assumptions.(1) The signature L(A) is contained in the signature L(B).
(2) Every atomic formula of A with no parameters is equivalent to a quantifier-free formula of B with no parameters.Remark 3.6.In Theorem 3.7, the assumption that every quantifier-free type realized in B is equivalent in B to an L(B)-formula follows from the assumption that there are only finitely many quantifier-free n-types realized in B for any n ≥ 1.To see why this is true, enumerate the quantifier-free n-types realized in B, {q s : s < m}, and note that there exists a quantifier-free formula θ s ∈ q t \ q s for all s = t, s < m.Then, for any t < m, M ∀x q t (x) ↔ s =t θ s (x) .
The assumption that there are only finitely many quantifier-free n-types realized in B for any n ≥ 1 holds in any countable ω-homogeneous structure B in a finite signature that is uniformly locally finite (meaning for each n, there is a finite bound on the size of substructures of B generated by n elements).A proof of this result can be read in Corollary 7.4.2 of [12].Theorem 3.7.Fix locally finite ordered structures A and B and suppose that A is a quantifier-free reduct of B (thus, for some κ, |A| = |B| = κ.)Assume that B is saturated (i.e., κ-saturated.)Suppose that every quantifier-free type realized in B is equivalent in B to an L(B)-formula.Suppose that B has RP.Then, A is a semi-retract of B if and only if A has RP.
Proof.The ⇒ is from Corollary 2.34.It remains to show ⇐.
Suppose that A has RP.Let X = (a i | i ∈ A) enumerate B where a i = i.Since A has RP, by Theorem 2.30, A-indexed indiscernible sets have the modeling property.Let Y = (b i | i ∈ A) be an A-indexed indiscernible set locally based on X.By the saturation assumption, we know that we can witness Y in B, and not just in some elementary extension of B (see Remark 2.2).Define f : A → B to take i → b i .This is an injective map, since a i = a j for all i = j and Y is A-indexed indiscernible locally based on X.It remains to show that By Observation 3.2, we already know that the identity map is qftp-respecting.We must show the remaining properties from Definition 2.19: for all n < ω.We have (i) as a direct consequence of A-indexed indiscernibility.We have (ii) from local basedness: for every finite subset of L(B)-formulas ∆, for any Given an arbitrary , let ∆ contain the formula equivalent to qftp B (f ()), and fix a corresponding ı Example 3.8.Let B := R < be the random ordered graph (the Fraïssé limit of finite ordered graphs) and A := B ↾ {<}, so A is isomorphic to the rational linear order.It is easy to see that A is a quantifier-free reduct of B, B is countably saturated, and both are locally finite and ordered.By Theorem 3.7, A is a semi-retract of B.
In order to find a semi-retraction (g, f ) between A and B, one strategy is to take an indiscernible sequence (g(i) | i ∈ A) in R < , i.e. such that for all integers n ≥ 0, for all i 0 < . . .< i n−1 and j 0 < . . .< j n−1 from A, the map g(i k ) → g(j k ) for all k < n provides an isomorphism of ordered graphs in B. Such an indiscernible sequence is guaranteed to exist in B, but in such a straightforward case, we can discern the existence of such a one directly: let g(A) be a copy of the countably infinite complete graph K ω whose vertices form a dense linear order without endpoints under < (guaranteed to exist in B by its saturation), where g : A → B is set up to preserve order.Then f can be taken to be merely the identity map, as follows This pair (g, f ) now witnesses that A is a semi-retract of R.
Though both A, B are well-known to have RP, this fact can be thought of as an instance of transfer by Corollary 5.5.
A similar argument can be made for the case A = (Q, <) and B = (|B|, E, ≺) where B is either of the ordered equivalence relation structures described in Example 2.6 or Example 2.7.
Next we look at three locally finite ordered structures known to have RP: the Shelah tree I stree , the strong tree I strtree and the convexly ordered equivalence relation I eq .The structure I eq has RP (Example 2.6) which fact is related to the usefulness of mutually indiscernible sequences in model theory (see Theorem III 7.12 (iii) in [34] for an early example of mutually indiscernible sequences) even if RP is not explicitly mentioned.An infinitary proof that shows that I stree has RP is given in the Appendix of [34] and a finitary proof is given in Ch.2 §2.2 Lemma 2 of [27].The fact that I strtree has RP is implicitly used in the proof of Thm III.7.11 in [34] and used explicitly in the survey paper [17].See [32] for a more detailed discussion of this history.Definition 3.9.
• Define I strtree to be the structure on ω <ω in the signature { , ∧, < lex , < len } where , ∧, < lex are interpreted as in I stree and < len is the preorder on µ, ν ∈ ω <ω defined by the lengths of the sequences: • Define I eq to be the structure on ω × ω in the signature {E, ≺} where for all (i, j), (s, t) We recall the following example of a semi-retraction that transfers RP from age(I strtree ) to age(I eq ).Proposition 3.10 ( [33]).Let A be the structure on the underlying set ω × Q such that age(A) = age(I eq ) and each equivalence class in A is densely ordered by ≺.Let B be the structure on the underlying set Q <ω such that age(B) = age(I strtree ) and the -successors of any fixed node in B are densely ordered by < lex .Then A is a semi-retract of B.
Proof.Given i ∈ ω, by the ith level in B, we mean all sequences in Q <ω of length i, and by the ith equivalence class in A, we mean {(i, x) | x ∈ Q}.
Let η i = (0, . . ., 0) 2i .Let g take the ith equivalence class in A into {η i (j) | j ∈ Q >0 } in a way that preserves the order.Let f : B → A be the map that takes the ith level in B into the ith equivalence class in A in a way that preserves the order.Then A is a semi-retract of B via (g, f ).
The following example is an application of Theorem 3.7.
Example 3.11.Since I stree is ordered and has RP, age(I stree ) is an amalgamation class.Let B be the Fraïssé limit of I stree and let A be the reduct of B to the signature of I strtree .Thus, age(A) = age(I strtree ) and so A has RP and B has RP.Since B is ω-homogeneous and uniformly locally finite in a finite signature, Th(B) is ℵ 0 -categorical and has quantifier elimination, as in Remark 3.6, and so B is ℵ 0 -saturated and every quantifier-free type in B is equivalent to an L(B)-formula in B. Since the conditions in Theorem 3.7 are satisfied and A has RP, it must be that A is a semi-retract of B.

(Counter)example
This section is inspired by an example of Mašulović from [22] where a pre-adjunction (see Section 6.1) is constructed to transfer RP from the category of finite naturally ordered Boolean algebras to the category of finite linearly ordered graphs.Both classes were previously known to have RP (see [26] and [1] for linearly ordered graphs, and [11] for Boolean algebras), but the mechanism of transfer is quite interesting with a number of applications.
Let R denote the countably infinite Random graph (the Fraïssé limit of finite graphs) and let H n denote the countably infinite random n-regular hypergraph (the Fraïssé limit of finite n-regular hypergraphs).Let B ba denote the countable atomless Boolean algebra (the Fraïssé limit of finite Boolean algebras) with its induced partial order denoted by < B ba .Below we show that R and H n are semi-retracts of B ba .By Theorem 5.1, this gives us upper bounds on Ramsey degrees for embeddings of finite graphs, respectively finite nregular hypergraphs, in terms of Ramsey degrees for embeddings of finite Boolean algebras, and consequently on Ramsey degrees of substructures by Corollary 5.2.See Remark 4.2 for a more detailed analysis.Proof.We define a graph relation R on B ba as Mašulović does on power set algebras of finite sets in [22]: (a, b) ∈ R if and only if a = b and a ∧ b = 0. We will build a graph embedding g : R → (B ba , R) that will be qftp-respecting when B ba is considered as a Boolean algebra.Since R is universal for countable graphs, there must be a graph embedding f : (B ba , R) → R. Clearly, f will remain qftp-respecting with respect to B ba in the signature of Boolean algebras.Since g and f are graph embeddings, f • g is a graph embedding from R to itself.Thus (g, f ) will be a semi-retraction between R and B ba .
Let V = {v n : n ∈ ω} be an enumeration of vertices in R. Recall that an antichain in a Boolean algebra is a collection of non-zero elements such that every two distinct elements have zero meet.Pick an infinite antichain B = {b n : n ∈ ω} in B ba .For any b n ∈ B, let {b i n : i ∈ ω} be an antichain ≤ B ba -below b n .Define g : R → B ba by where We will show that g is qftp-respecting: Every quantifier-free type in R is determined by E on pairs of points, and that needs to be reflected in the image of g.By the definition of g, Any Boolean expression with variables x 0 , . . ., x n−1 has its unique equivalent full disjunctive normal form, that is, a disjunction of clauses, where each clause consist of conjuction of literals x i or ¬x i so that each of the variables x i appears in every clause.We will show that an n-type of elements of B ba in the image of g depends only on the type of the graph they encode: (1) For every triple of distinct numbers i, j, k: g (2) Whenever i < j, we have that g It follows that every non-zero clause has at most two positive literals.Further, (3) For any i = j, )) by de Morgan's law.Let v i 0 , v i 2 , . . ., v i n−1 be n distinct vertices of R. We will consider Boolean expression in g(v i 0 ), . . ., g(v i n−1 ) in full disjunctive normal form.From the analysis above, we have three cases.
(i) If a clause contains no positive literal, then it is equal to ¬( n−1 k=0 g(v i k )), which is a positive element disjoint from any g(v i k ).(ii) If a clause has one positive literal g(v i k ) and all other n − 1 negative, it equals to Since {b j i : i < j < ω} is an antichain, we get that any two distinct clauses have empty meet.Therefore, it is not possible to obtain one clause below a join of the others, unless it equals to zero.It means that there are no non-trivial equations with quantifier free formulas about an n-tuple in the image of g other than comparison with 0. Since clauses in items (i) and (ii) are never equal to 0, the entire type is decided by the clauses as in (iii), which corresponds exactly to the type of the finite graph in the preimage.Remark 4.2.We say that A is a Ramsey object in K if for all B ∈ K, (A, B) is a Ramsey duo for K.The class of finite Boolean algebras has RP (as in Example 2.6) while only complete or empty graphs are Ramsey objects in the class of finite graphs, as shown in [24].Therefore, to secure transfer of RP by semi-retractions, the requirement on rigidity of B in Corollary 5.5 or on relational signature in Theorem 5.9 cannot be completely removed.The reason in the example of Theorem 4.1 is that there can be two distinct copies Γ 1 , Γ 2 of the same finite graph in R such that f −1 (Γ 1 ) and f −1 (Γ 2 ) have the same quantifier-free type and generate the same Boolean subalgebra A of B ba (thanks to function symbols in the signature of Boolean algebras).This would not have been possible if age(B ba ) were rigid, since a partial isomorphism from f −1 (Γ 1 ) to f −1 (Γ 2 ) given by having the same quantifierfree type would extend to a non-trivial automorphism of A.
Theorem 5.1 applied to (g, f ) shows that the finite Ramsey degree of a finite graph Γ in the class of finite graphs with embeddings is bounded above by the Ramsey degree of the Boolean subalgebra of B ba generated by g(Γ) in the class of finite Boolean algebras with embeddings (which is equal to n!, where n is the number of atoms in g(Γ) ).It can be derived from results in [1] and [26] that the exact Ramsey degree for embeddings of a graph on m vertices is m!.Thus our estimate is optimal only in the case of discrete graphs.
Question 4.3.The example of a semi-retraction on Theorem 4.1 was inspired by an example in [22].However, Mašulović's example is about the classes of finite ordered graphs and finite naturally ordered Boolean algebras, rather than their unordered versions presented here.Is the random ordered graph (the Fraïssé limit of finite linearly ordered graphs) a semi-retract of the countable atomless Boolean algebra with a generic normal order (the Fraïssé limit of finite naturally ordered Boolean algebras)?
Let H n = (V, E) be the countable random n-regular hypergraph.Mašulović commented in his paper [22] that the method he used to witness the Ramsey property of linearly ordered graphs by that of finite naturally ordered Boolean algebras did not generalize to higher arity hypergraphs.We were able to overcome this obstacle in the unordered case.As in graphs, one needs to ensure that the g-part of the semi-retraction maps to a portion of the Boolean algebra, where every type is determined only by the hypergraph relation.This can be achieved by a construction similar to that in Theorem 4.1, while making sure that all k-tuples for k < n have the same type.b l = 0. We will define an embedding g : H n → (B ba , H n ) and by universality of H n , there is an embedding f : (B ba , H n ) → H n .Since H n is quantifier-free definable in B, taking the reduct B ba of (B ba , H n ), (g, f ) will be a semi-retraction between B ba and H n , as in the case of the random graph.However, we need to be more careful when defining g than in the graph case -in (B ba , H n ) there are different < n-types, which is not true in } be an antichain in B ba , where ω [k] denotes all strictly increasing sequences in ω of length k.We further require that if ı is an initial segment of , then b  < B ba b ı .Let {v l : l ∈ ω} be an enumeration of vertices of H n and let E denote the set of hyperedges.We define g : Since each B k is an antichain, we have that for any ı ∈ ω We have that g and f are hypergraph embeddings and thus f g is an embedding.As in the proof of Theorem 4.1, one can show that every N -type for N ≥ n in g(H n ) is determined by n-types.Here it is crucial that every two k-tuples for k < n have the same type and therefore n-types are determined solely by the hypergraph relation.We can conlude that g considered as a map H n → B ba is qftp-respecting.
Remark 4.5.As in 4.2, by Theorem 5.1, the Ramsey degree for embeddings of a finite hypergraph H in the class of finite hypergraphs is bounded above by the Ramsey degree of g(H) in the class of finite Boolean algebras with embeddings.
5. Formula-free approach to transferring the RP In prior work [33], Corollary 2.34 demonstrated how semi-retractions transfer RP when A and B are both ordered and locally finite.In this section we show in Corollary 5.5 that some of the assumptions in Corollary 2.34 may be dropped.Namely, we only need rigidity of the structures in age(B) and we only need local finiteness of A. In fact, the transfer can be done locally for a pair of finite structures (A, B) in A, as demonstrated in Corollary 5.4.Moreover, if the signatures of A and B are relational, we no longer need rigidity in age(B) as shown in Theorem 5.9.
In Remark 4.2, we noted that the rigidity assumption in Corollary 5.4 or the relational language in Theorem 5.9 cannot be removed.However, if we consider the Ramsey property for embeddings rather than for substructures, which is the natural framework in dynamical applications, we obtain a transfer principle for finite Ramsey degrees for embeddings (Theorem 5.1) that does not assume more about A and B other than that A is a locally finite semi-retract of B. We include examples that demonstrate the necessity of the assumptions in Corollary 5.5 and Corollary 5.4.
Theorem 5.1.Suppose that A is a locally finite semi-retract of B via (g, f ).Let A ∈ age(A).Suppose that g(A) B has Ramsey degree d for embeddings in age(B).Then A has Ramsey degree ≤ d for embeddings in age(A).
By assumption, there exists h ∈ Emb(B ′ , B) such that c 0 restricted to h • Emb(A ′ , B ′ ) takes on at most d colors.We let k = f (h ↾ g(B 0 )).By an argument similar to the one in the previous paragraph, we have that k ∈ Emb(B, A).We claim that c restricted to k • Emb(A, B) takes on at most d colors: Fix any j ∈ Emb(A, B).It is enough to show that c(k • j) = c 0 (h • j ′ ) for some j ′ ∈ Emb(A ′ , B ′ ).By the definition of A and B, and since f g : A → A is an embedding, we have that (f g) −1 (j) ∈ Emb(A 0 , B 0 ).Let j ′ ∈ Emb(A ′ , B ′ ) to be unique embedding extending the partial embedding g((f g) In Proposition 2.16, we recalled the exact formula relating the Ramsey degree for embeddings and the Ramsey degree for substructures in case of a locally finite class.Therefore Theorem 5.1 immediately yields the following corollary.
Corollary 5.2.Suppose that A is a locally finite semi-retract of B via (g, f ).Let A ∈ age(A).Suppose that g(A) B has Ramsey degree d for embeddings in age(B).Then A has Ramsey degree ≤ d/|Aut(A)| for substructures in age(A).
In Theorem 4.1, we provided an example of the random graph as a semi-retract of the countable atomless Boolean algebra.While the class of finite Boolean algebras is a Ramsey class, the class of finite graphs is not, so we cannot simply say that semi-retractions transfer the Ramsey property for structures.However, the existence of the semi-retraction provides a bound on finite Ramsey degrees of finite graphs as per Corollary 5.2.We point out that the reason that Section 4 does not provide a direct transfer of the Ramsey property is that the signature of Boolean algebras contains function symbols, age(B ba ) is not rigid, and the semi-retraction defined in the proof of Theorem 4.1 allows two distinct finite isomorphic graphs to generate the same Boolean algebra via preimages under f .We show in Theorem 5.9 that restricting to relation symbols and in Corollary 5.5 that restricting to B with age consisting to rigid structure, suffice to transfer the Ramsey property, respectively.
Example 2.31 explained why rigidity is essential for applications of Ramsey theory to indiscernible sequences.Thus we present a few special cases of Theorem 5.1 in the rigid setting.
Corollary 5.3.Let A, B be structures and let K := age(A), K ′ = age(B).Assume A is locally finite and K ′ consists of rigid elements.Suppose that A is a semi-retract of B by the maps (g, f ).For any finite substructure A ⊆ A, letting A ′ := g(A) B , if A ′ has finite Ramsey degree d in K ′ , then A has finite Ramsey degree in K, and in fact, d(A, K) ≤ d.
).Thus we have the inequalities: where the middle inequality follows from Theorem 5.1.To show the necessity of the assumptions in Corollary 5.5, we give an example of a structure A that is a semi-retract of B, where each structure is in a non-relational signature, such that A fails to be locally finite, the element in age(B) is not rigid, and RP fails to transfer from B to A.
Example 5.6.Let A = (Z, s), B = (Z, s, p) where s, p are interpreted as the successor and predecessor functions, respectively, that is, s(z) = z + 1 and p(z) = z − 1 for every z ∈ Z.Note that any finite subset of B generates B, and so B trivially has RP.On the other hand, any finite subset X of A generates the tail [a, ∞) ⊆ Z where a = min X.
To see that A fails to have RP, let A = B = [0, ∞).For any copy of A, there is a unique element a ∈ A (min A) that generates all of A. Color copies of A in A red if that unique element is odd, blue, if it is even.There is no copy of B in A that is homogeneous for this coloring on copies of A.
It remains to verify that the identity maps give a semi-retraction A id − → B id − → A, but this is the case because A and B are quantifier-free interdefinable (see Remark 3.5).In the case of the predecessor function, we can define it from the successor function by switching variables: For any To show the necessity of the assumptions in Corollary 5.4, we give an example of a structure A that is a semi-retract of B, where A is in a non-relational signature, such that all structures in age(B) are finite and rigid, and a Ramsey duo for B fails to transfer to a Ramsey duo for A, specifically because the pair in A is a counterexample to local finiteness in A.
Example 5.7.Let A = (Z, s) be the structure where s is interpreted as the successor function on Z.Let B = (Z, {R (n,k) }) where R (n,k) (a 0 , . . ., a n−1 ) for k = (k 0 , . . ., k n−1 ) holds exactly of increasing n-tuples a 0 < a 1 < . . .< a n−1 from Z such that a i+1 − a i = k i , for all i < n.The identity maps (g, f ) := (id, id) give a semi-retraction because A and B are quantifier-free interdefinable (see Remark 3.5).
However, the structures generated by a and b in A are not finite, so the assumptions of Corollary 5.4 are not satisfied.And indeed, the conclusion of Corollary 5.4 is not achieved: (A, B) is not a Ramsey duo for A, as we saw in Example 5.6.
Example 5.7 can be modified slightly to satisfy the assumptions of Corollary 5.5.
Example 5.8.Let A = (N, p) be the structure where p is interpreted as the predecessor function on the positive integers, i.e. p(n + 1) = n, for all n ∈ N, and p(0) := 0. Let B = (N, p, s) where p is defined as in A and s is the successor function on N. The identity maps (g, f ) := (id, id) give a semi-retraction because A and B are quantifier-free interdefinable (see Remark 3.5).In the case of the successor function, we can define it from the predecessor function by switching variables: for any a 1 , a It is clear that A is locally finite.The structure A trivially has RP because for all A, B in age(A), there is at most one copy of A in B. The structure B trivially has RP because age(B) consists of one element (as in Example 5.6) however this one element (which is all of B) happens to be rigid, because the element 0 must be fixed by any automorphism of B. Thus, the assumptions (and conclusion) of Corollary 5.5 are satisfied in this example.Theorem 5.9.Let A, B be structures each in relational signatures and suppose that A is a semi-retract of B, and let A ∈ age(A).If g(A) B has Ramsey degree d in age(B), then A has Ramsey degree bounded by d in A.
It would be possible to prove Theorem 5.9 with no mention of function symbols, but there is a property, the "restricted inverse images under f " property (defined in Definitions 5.10 and 5.13, that could be of independent interest in the functional case.For this reason, we pursue a slightly longer development of the argument than needed here.The reader who would like to pursue the additional details for a proof of Corollary 5.5 using the "restricted inverse images under f " property, is invited to read Section 8.1 within the Appendix.
The argument for Theorem 5.1 is of a category-theoretic nature and so certain details at the level of substructures may not be immediately evident.For example, consider Definition 5.10 and what it would take for a certain finite B 0 ⊆ B to have this property.Definition 5.10.Fix structures A, B in relational signatures, finite substructures A, B ⊆ A and an injection f : B → A. Fix substructures A 0 , B 0 from B such that ||A 0 || = ||A||.We say that B 0 has the relational restricted inverse images under f property for A witnessed by A 0 if for any It turns out that if A is a semi-retract of B via (g, f ), so long as B 0 is isomorphic to an image under g of a structure in A containing A as a substructure, then B 0 has restricted inverse images under f for A. To develop the proof, we first state the analogues of Definition 5.10 and Proposition 5.11 in the case that the signatures contain function symbols.Since Definition 5.13 seems technical at first, we motivate it with Example 5.12.
Example 5.12.Let A and B be as defined in Proposition 3.10.Fix a quantifer-free type p(x 0 , x 1 ) = {E(x 0 , x 1 ), E(x 1 , x 2 ), x 0 ≺ x 1 ≺ x 2 } in A and let a be a realization of this type in A. Let b be a finite tuple from A containing the elements of a.Let (g, f ) be the semi-retraction described in Proposition 3.10.Define a 0 := g(a), b 0 := g(b).
Consider the various quantifier-free types of {b 0 < lex b 1 < lex b 2 } in the tree B := I strtree that map to copies of a in A under the map f : B → A: (1) The quantifier-free type described in (3) corresponds to a 0 in Definition 5.13, since it is the only quantifier-free type that is realized within b 0 in B that is a preimage of a. Fix a tuple c 1 in b 1 A such that: We will argue that c 0 By the embedding property of semi-retractions, The equations ( 1) and ( 2) imply that: Thus, by the qftp-respecting property of semi-retractions: By (4), we may conclude that c 0 = f −1 (c 1 ) ∼ B a 0 , as desired.
To complete the proof, fix any b Having pointed out this technical property, we can deduce the relational case with little machinery.
Proof of Theorem 5.9.Fix structures A, B in relational signatures and A ∈ age(A).Fix the pair of maps g : A → B and f : B → A witnessing that A is a semi-retract of B. Assume that A 0 := g(A) ∈ age(B) has Ramsey degree d in age(B).Note that A 0 is a substructure of B since the signature of B is relational.
Let B ∈ age(A) and let c : A A → k be a coloring.Denote B 0 := g(B), A 1 := f (A 0 ), B 1 := f (B 0 ).Define an induced coloring c 0 : ).This coloring is well-defined by the qftp-preserving property of semi-retractions.
Since d(A 0 , age(B)) = d, there exists a copy B ′ 0 of B 0 such that c 0 takes at most d colors on B ′ 0 .We will argue that c takes at most d colors on ).This proves the claim.

Semi-retractions and categorical notions
In the next two sections, we point out similarities between semi-retractions and two category theoretic notions -pre-adjunctions and retractions.
6.1.Pre-adjunctions.Dragan Mašulović realized in [22] that a categorical notion of preadjunction was implicitly used in coding one Ramsey problem into another in the book [29] by Pröml.The notions of pre-adjunction and semi-retraction appear to be closely related in the usual setting of classes of finitely-generated structures.We show that every semi-retraction defines a pre-adjunction and that in some instances pre-adjunctions define semi-retractions.For a category C, we denote by Obj(C) its objects and by hom C (A, B) the collection of morphisms between objects A, B ∈ Obj(C).Definition 6.1.Let C and D be categories and let F : Obj(D) → Obj(C) and G : Obj(C) → Obj(D) be maps on objects.We say that (F, G) is a pre-adjunction if for every A ∈ Obj(D) and C ∈ Obj(C) we have a map Φ A,C : hom We state a version of Mašulović's result restricted to our setting.
Therefore (F, G) is a pre-adjunction.
Theorem 6.4.Let A and B be locally finite and let (g, f ) be a semi-retraction between A and B. Then there is a pre-adjunction between age(A) and age(B) with embeddings as morphisms.
Proof.The proof goes along the same lines as the proof of Theorem 6.
3. Semi-retractions from pre-adjunctions.We now consider the reverse directionbuilding semi-retractions out of pre-adjunctions.Suppose that A and B are countable structures in relational signatures.Let D be age(A) with embeddings as morphisms and let C be age(B) with embeddings as morphisms.Theorem 6.5.Suppose that (F, G) is a pre-adjunction between D and C and assume that F and G preserve cardinality.Then there is a semi-retraction between A and a structure B ′ whose age is contained in C.

Proof. Let A = ∞
i=1 A i be an increasing enumeration of A, where each ||A i || = i.For any e i : A i ⊂ A i+1 we consider the identity morphis, id : ) by the definition of pre-adjunction satisfying the following: We will define g : A → B ′ for some B ′ with age included in age(B) by g(A 1 ) = F (A 1 ) and Since F and G are cardinality preserving, we have for every Question 6.6.Let A and B be (locally finite) structures and suppose that there is a pre-adjunction between age(A) and age(B) with embeddings as morphisms.Under which conditions is there a semi-retraction between A and B?

Concluding Remarks
In this section we gather together some concepts and prior work related to semi-retractions.From a model-theoretic perspective, it is natural to ask what is the relationship of semiretractions to interpretations, and we approach this question in Section 7.1.In Section 7.2 we cite work that has addressed the question of when interpretations preserve RP.
The notion of a retraction is defined generally for categories, which we quote from [4].The term "retraction" in Definition 7.7 implies the existence of a retraction in the category of topological groups.In Section 7.3 we indicate a retraction that exists in the category of products of types spaces (S A n (∅)) n<ω for structures A that have the property rqe, which retraction is induced by any semi-retraction.
The fact that pairs of interpretations (under certain conditions) induce a retraction in a distinct category from the category associated to semi-retractions suggests that these are different concepts.We also give an example of an interpretation map that is not qftprespecting in Example 7.4. is 0-definable in A. In other words, there exists a formula ϕ R (x 0 , . . ., x m−1 ) in the signature of A such that for all a i ∈ U , for all i < m: Theorem 7.9 (T.Coquand).Given countable ℵ 0 -categorical structures A and B, A is a retraction of B iff there are continuous homomorphisms Aut Corollary 7.10 ( [2]).Countable ℵ 0 -categorical structures A, B are bi-interpretable if and only if their automorphism groups are isomorphic as topological groups.
In the preliminaries we introduced the notion of a definable set.Here we introduce a generalization.
Remark 7.12.Using Scott sentences one can show that any quasidefinable subset of a countable structure A is definable by an L ω 1 ,ω formula with no parameters.If A is countable and ℵ 0 -categorical, then quasidefinable sets are in fact 0-definable (see [15]).Remark 7.13.In Definition 7.2, if "0-definable" is replaced with "quasidefinable" and the map f is replaced with a countable collection of maps f i such that equality between f i (u) and f j (v) is quasidefinable in A (just as equality between f (u) and f (v) must be definable in A in a finitary interpretation) we may call this an infinitary interpretation, see the introductory chapter of [15], "Models and Groups." An account due to Kaye in [15], "Models and Groups" expands on Corollary 7.10 as follows: Theorem 7.14 ([15]).If A, B are countable structures, Aut(A) ∼ = Aut(B) as topological groups if and only if A, B are infinitarily bi-interpretable.
It is satisfying to see that the following proposition and corollary follow immediately from [16] and [37].
Proposition 7.15.Let A, B be countable ω-homogeneous structures, and suppose that A is a retraction of B in the sense of Definition 7.7.If B has finite Ramsey degrees for embeddings, then A has finite Ramsey degrees for embeddings.
Proof.Since B is ω-homogeneous, if B has finite Ramsey degrees for embeddings then the universal minimal flow M (Aut(B)) is metrizable by the reverse direction of Theorem 2.18.Let K be the kernel of the quotient ψ : Aut(B) → Aut(A).Any Aut(A)-flow on X induces an Aut(B)-flow on X by f x = (Kf )x, where Aut(A) is identified with the quotient group {Kf : f ∈ Aut(B)}.If M is a non-metrizable minimal flow of Aut(A), it induces a nonmetrizable minimal Aut(B)-flow as above, which is a contradiction.We may conclude that M (Aut(A)) is metrizable, and thus that A has finite Ramsey degrees for embeddings by Theorem 2.  [5]).Given a countable ω-homogeneous ℵ 0 -categorical structure Γ with RP for embeddings, every structure M with a first-order interpretation in Γ has an ℵ 0 -categorical expansion N with RP for embeddings.Furthermore, if Γ is ωhomogeneous in a finite relational signature, we can choose N to be ω-homogeneous in a finite relational signature.
In [36], classes of structures interpretable in a fixed class K of finite structures in some relational signature L are defined and investigated with respect to the Ramsey property.For example, EK is defined to be all structures A in the signature L ∪ {E}, where E / ∈ L is interpreted as an equivalence relation.In the following, by an ordered expansion of a structure we mean an expansion by a new relation symbol whose interpretation linearly orders the structure.Suppose that K * is a class of ordered expansions of structures in K, (this context could easily be adapted to the case where K is ordered by a relation in L) and define CE[K * ] to be all ordered expansions of structures A ∈ EK such that the ordering is convex (meaning that each equivalence class is an interval with respect to the ordering) and the induced ordered structure A/E ∈ K * .Theorem 4.5 of [36] states that K * has the Ramsey property if and only if CE[K * ] has the Ramsey property.
The previous works provide an intriguing look into the relationship between the Ramsey property and interpretations, but do not completely settle the question.Suppose A is interpreted in B by way of D, E, where D is a definable subset of B, E is a definable equivalence relation on D, and A is isomorphic to some reduct of D/E.If age(A) = K, and age(B) = K ′ , then the interpretation demonstrates that a subset (the substructures of D) of a reduct of K ′ coincides with EK.Thus, the Ramsey transfer given by a particular interpretation is related to the question of which reducts of a structure with the Ramsey property have the Ramsey property.
We have learned that in recent work, a notion weaker than a semi-retraction has been used in Lemma 3.14(iii) of [14], which paper generalizes many of the Ramsey transfer results of [17] to positive logic.7.3.Semi-Retractions and Retractions.In the case that A, B are countable and ℵ 0categorical, the type spaces are finite, and so a well-defined map between them is continuous.Under additional assumptions, qftp-respecting maps induce maps between type spaces.Remark 7.21.If A is in a finite relational signature and Th(A) has quantifier elimination, then complete quantifier-free types are complete types that are also finite types, so any type realized in an elementary extension is realized in A. Thus A has rqe.
More generally, if A is an ω-homogeneous uniformly locally finite structure in a finite signature, then Th(A) is ℵ 0 -categorical and has quantifier elimination as in Remark 3.6, thus A has rqe.Definition 7.22.Given A, B that have rqe, let g : A → B be a qftp-respecting injection on the underlying sets.We define θ g : S A n (∅) → S B n (∅) to take p ∈ S A n (∅) to q ∈ S B n (∅) such that there exists ı ∈ |A| n satisfying p(x) and g(ı) ∈ B n satisfies q(x) (i.e.q = qftp B (g(ı))).
Observation 7.24.Given countable, ℵ 0 -categorical A, B that have rqe, let g : A → B be a qftp-respecting injection on the underlying sets.The map θ g as in Definition 7.22 is continuous.
Proposition 7.25.Let A, B be countable ℵ 0 -categorical and rqe.If A is a semi-retract of B via (g, f ), then the pair of maps (θ g , θ f ) is a retraction of S B n (∅) onto S A n (∅) in the category C of type spaces with continuous maps as morphisms.
Proof.By Observation 7.24, we know that (θ g , θ f ) are maps in the category C.
By assumption, there exist qftp-respecting injections on the underlying sets A

Appendix
We start by providing proofs of some of the basic results quoted in the Preliminaries.Since M is assumed to be locally finite with age K, we may expand L to a signature L ′ that contains new predicates p C (x), for all C ∈ K, and expand M to an L ′ -structure M ′ such that M ′ p C (c ′ ) if and only if c ′ is an enumeration of some structure C ′ such that C ′ ∼ = C.
We may further expand L ′ to a signature L * that contains new n-ary predicate symbols {R i (x) : i < ω}.Define θ A,r to be the L * -sentence stating that the interpretations of {R i } i<r form a partition on the copies of A in M: Define ψ B,A,r,d to be the L * -sentence stating (in conjunction with θ A,r ) that the r-coloring of copies of A given by the interpretations of the {R i } i<r achieves at least d colors on copies of A within any copy of B: If A does have finite Ramsey degree in K, then it follows immediately that A has finite small Ramsey degree in M, and d(A, M) ≤ d(A, K).By the argument above, we also have that d(A, M) ≥ d(A, K), and so d(A, M) = d(A, K).
To see (1), for each finite substructure C ⊆ M we fix an enumeration c of C that we call its "natural" enumeration.We then expand L to a signature L ′ that contains new predicates p e C (x), for all C ∈ K, and expand M to an L ′ -structure M ′ such that M ′ p e C (c ′ ) if and only if c ′ ∼ c, where c is the natural enumeration of C.
Then we expand by predicates {R i (x) : i < ω} and define After this, the argument proceeds in the same manner.Proof.If (A, B) is a Ramsey duo for K, it follows immediately that (A, B) is a Ramsey duo for M. Suppose (A, B) is not a Ramsey duo for K. Then there exists an integer r ≥ 2 such that for all C ∈ K, there exists a bad r-coloring f C : C A → r.As in Proposition 2.15, we can write the type of a structure M ′ isomorphic to M with a bad r-coloring, i.e. such that for all B ′ ∼ = B in M ′ , |c( B ′ A )| ≥ 2. This type is finitely satisfiable using the bad colorings f C and the fact that K = age(M).Now the L-reduct of the realization of this type is isomorphic to M, and the isomorphism induces a bad coloring on M. that is somewhere in g(B), and may be outside the image g(b) of the original generators, b.In general, the Ramsey property for B does not constrain infinite sets such as g(B) that are not contained in elements of age(B).For a more specific illustration of what could go wrong, see Example 5.7.

Remark 2 . 1 .
If age(B) consists of rigid elements, then for any C, C ′ ∈ age(B), if C ∼ = C ′ , then this is witnessed by a unique isomorphism τ : C → C ′ .Fix a signature L, an L-structure A, and an integer n ≥ 1.

( 5 )
We define S M n (∅) to be the space of all complete n-types over ∅ in A with the usual Stone topology, with basic open sets [ψ] := {p ∈ S M n (∅) | ψ ∈ p}.(6) Given a tuple a ∈ |A| n , tp A

Definition 2 . 3 .
Given a signature L, L-structures A, B, M, and integers k, d ≥ 1, the notation M −→ (B) A r,d

Observation 3 . 2 .
Note that A is a quantifier-free reduct of B if and only if |A| = |B| and the identity map id : B → A is qftp-respecting.Example 3.3.For two structures A, B such that |A| = |B|, A is a quantifier-free reduct of B if any of the following hold.

4. 1 .
Semi-retracts of the countable atomless Boolean algebra.Theorem 4.1.The countable random graph R is a semi-retract of the countable atomless Boolean algebra B ba .

Theorem 4 . 4 .
For any integer n ≥ 2, H n is a semi-retract of B ba .Proof.We define an n-ary hypergraph relation H n on B ba by (b 0 , . . ., b n−1 ) ∈ H n iff i<j<n b i = b j and n−1 l=0

Corollary 5 .
4 follows easily from the argument for Theorem 5.1: we merely need to be aware of how we fix B in the beginning and set d = 1.An alternative argument, not as a corollary of Theorem 5.1, is presented in the Appendix in Section 8.1.Corollary 5.4.Let A, B be structures and suppose (g, f ) is a semi-retraction between A and B. Suppose that a, b are finite tuples from A that generate finite substructures A, B, respectively, of A, such that g(a), g(b) generate rigid substructures A 0 , B 0 , respectively, of B. If (A 0 , B 0 ) is a Ramsey duo for B, then (A, B) is a Ramsey duo for A. Corollary 5.5 is a special case of Corollary 5.4.Corollary 5.5.Let A, B be structures and suppose (g, f ) is a semi-retraction between A and B. Suppose that A is locally finite, and age(B) consists of rigid structures.If B has RP, then A has RP.

Proposition 5 . 11 .
Fix structures A and B in relational signatures.Fix a semi-retraction (g, f ) between A and B and finite substructures A, B ⊆ A. Let A 0 = g(A), B 0 = g(B), A 1 = f (A 0 ).Then, for any B ′ 0 ∼ = L(B) B 0 , B ′ 0 has the relational restricted inverse images under f property for A witnessed by A 0 .

Definition 5 . 13 .
Fix finite tuples a, b from A and an injection f : B → A. Fix finite tuples a 0 , b 0 from B such that |a| = |a 0 |.We say that b 0 has the restricted inverse images under f property for a witnessed by a 0 if for any c 1 in f (b 0 ) A such that c 1 ∼ A a, c 0 := f −1 (c 1 ) ⊆ b 0 and c 0 ∼ B a 0 .Proposition 5.14.Let A and B be any structures with a semi-retraction (g, f ) between A and B. For any finite tuples a, b enumerating substructures of A, for any b ′ 0 ∼ B g(b), b ′ 0 has the restricted inverse images under f property for a witnessed by g(a).Proof.Fix structures A, B and a pair of maps g : A → B and f : B → A witnessing that A is a semi-retract of B. Fix finite tuples a, b enumerating substructures of A and let a 0 := g(a), b 0 := g(b), a 1 := f (a 0 ), and b 1 := f (b 0 ).Let n := |a|.
Then there exists e 0 := f −1 (e 1 ) ⊆ b ′ 0 .The similarity(5) guarantees the existence of some e ′ 0 ⊆ b 0 (on the same coordinates as e 0 ⊆ b ′ 0 ) such that e ′ 0 ∼ B e 0 .By the qftp-respecting property for semi-retractions, f (e ′ 0 ) ∼ A f (e 0 ) = e 1 ∼ A a, and we just argued that b 0 has the restricted inverse images under f property for a witnessed by a 0 , so e ′ 0 ∼ B a 0 , thus e 0 ∼ B a 0 , as desired.Now we are ready to adapt Proposition 5.14 to the case of relational signatures.Proof of Proposition 5.11.Let A, B, f, g, A, B, A 0 , B 0 , A 1 be as in the statement.Let a, b be enumerations of A, B, respectively, and let a 0 := g(a), b 0 := g(b), a 1 := f (a 0 ).Clearly a 0 , b 0 , a 1 enumerate A 0 , B 0 , A 1 , respectively, and |a| = |a 0 |.Fix any B ′ 0 ∼ = L(B) B 0 and fix an isomorphism σ : B 0 → B ′ 0 and let b ′ 0 := σ(b 0 ).By Proposition 5.14, b ′ 0 has the restricted inverse images under f property for a witnessed by a 0 .Clearly, this implies that B ′ 0 has the relational restricted inverse images under f property for A witnessed by A 0 .
by the qftp-respecting property of semi-retractions.Fix any copyA ′ 1 of A in B ′ 1 , and let A ′ 0 := f −1 (A ′ 1 ) ⊆ B ′ 0 .By Proposition 5.11, B ′ 0 has the relational restricted inverse images under f property for A witnessed by A 0 , thus, A ′ 0

Theorem 6 . 2 ( 6 . 2 .
[22]).Let C and D be categories of finite structures with embeddings as morphisms.Assume that F : Obj(D) ⇄ Obj(C) : G is a pre-adjunction and that C has the Ramsey property for embeddings.Then D has the Ramsey property for embeddings.Pre-adjunctions from semi-retractions.Theorem 6.3.Any semi-retraction (g, f ) between A and B defines a pre-adjunction between the categories of finite tuples of A and B, respectively, with qftp-preserving injections.Proof.Let D be all finite tuples of A with qftp-preserving injections as morphisms and let C be all finite tuples of B with qftp-preserving injections as morphisms.Define F : Obj(D) → Obj(C) by F (a) = g(a) and G : Obj(C) → Obj(D) by G(c) = f (c), and we simply let Φ a,c : hom C (F (a), c) → hom D (a, G(c)) be defined by ψ → f (ψ) • f • g.Suppose that a, b ∈ Obj(D), c ∈ Obj(C), ψ ∈ hom C (g(b), c), and v ∈ hom D (a, b).Let w ∈ hom C (g(a), g(b)) be equal to g(v).Then Φ

3 .
Let g : A → B and f : B → A be a semi-retraction and let C be age(B) with embeddings and let D be age(A) with embeddings.Define F : Obj(D) → Obj(C) by F (A) = g(A) B and G : Obj(C) → Obj(D) by G(C) = f (C) A .For any A, B ∈ Obj(D) and embedding v : A → B, denote by g(v) ′ the unique extension of g(v) to g(A) B , and similarly for C, D ∈ Obj(C) and embedding w : C → D we define f (w) ′ to be the unique extension of f (w) to f (C) A .Finally, define Φ B,C : hom C ( g(B) B , C) → hom D (B, f (C) A ) by ψ → f (ψ ↾ g(B)) • f • g.By analogous diagram chasing as in the proof of Theorem 6.3, we can verify that we obtain a pre-adjunction.

Definition 7 . 1 .
Given a category C and morphisms f ∈ C(X, Y ) and g ∈ C(Y, X), if f g = id Y , i.e. − → Y we say that the pair of maps (g, f ) is a retraction of X onto Y and that Y is the retract of X (via f and g).

7. 1 .Definition 7 . 2 .
Interpretations and the Ramsey property.The results presented in this subsection are well-known.Given two structures A, B a (finitary) interpretation of B in A denoted by f : A B is a surjective function f : U → |B| where U ⊆ |A| n is 0-definable, n < ω, and for every integer m and 0-definable m-ary relation R in B (where we include the relation x 0 = x 1 ), the set {(a 0 , . . ., a m−1 ) : B R(f (a 0 ), . . ., f (a m−1 ))} ⊆ |A| n•m

Definition 7 . 19 .
Say that a structure A has property rqe (realized, quantifier-eliminable types) if S A n (∅) = {qftp(a) : a ∈ |A| n }.Observation 7.20.If A has rqe then every n-type over the empty set in A is realized in A.
θ f •θg=id S A n (∅) − −−−−−−−− → S An (∅) which shows that the pair of maps is indeed a retraction in this category.

Lemma 2 . 15 .
Fix a signature L and a locally finite L-structure M .Let K := age(M).Then, for any finite substructure A ⊆ M, (1) d e (A, K) = d e (A, M), and (2) d(A, K) = d(A, M).Proof.Fix L, M, K and A as in the assumptions.Let n := ||A||.First we prove (2) and then we indicate how (1) follows by a similar argument.

ψ
B,A,r,d := ∀y    p B (y) → x 0 , . . ., x d−1 ⊆ y; |x i | = n, i < d   i<d p A (x i ) ∧ i 0 <i 1 <...<i d−1 <r Suppose d(A, K) ≥ d, for some integer d ≥ 1.By definition, there exists an integer r ≥ 2 and a structure B ∈ K such that for all C ∈ K, there is a coloring c : C A → r such that for all B ′ ⊆ C with the property that B ′ ∼ = B, |c( B ′ A )| ≥ d.Thus, the following L * -type Γ is finitely satisfiable (in expansions of M ′ ): Γ({x c : c ∈ |M|}) := Diag(M ′ ) ∪ {θ A,r ∧ ψ B,A,r,d }.A realization of Γ induces a coloring c 0 : M A → r such that for any B ′ ⊆ M with the property that B ′ ∼ = B, |c 0 ( B ′ A )| ≥ d.Thus, we have shown that d(A, M) ≥ d.If A does not have finite Ramsey degree in K, then for all integers d ≥ 1, d(A, K) ≥ d.By the previous argument, d(A, M) ≥ d, for all integers d ≥ 1, and so A does not have finite small Ramsey degree in M.

Proposition 2 . 11 .
Fix a signature L and a locally finite L-structure M .Let K := age(M).Then, for any finite substructures A, B ⊆ M, (A, B) is a Ramsey duo for K if and only if (A, B) is a Ramsey duo for M.
Definition 3.4.We say that A and B are quantifier-free interdefinable if |A| = |B| and each of A, B is a quantifier-free reduct of the other.Remark 3.5.If |A| = |B|, then A and B are quantifier-free interdefinable if and only if the pair of identity maps between A and B give a semi-retraction (in either order).

18 .
Corollary 7.16.If A, B are countable ω-homogeneous infinitarily bi-interpretable structures, then A has finite Ramsey degrees (for embeddings) if and only if B has finite Ramsey degrees (for embeddings).Remark 7.17.Note that in the proof of Proposition 7.15 we only needed that Aut(A) is a quotient of Aut(B).7.2.Related Work.It is a natural question to ask under what conditions interpretations transfer the Ramsey property.Proposition 7.18 gives an example of this type of result.