Homogeneous 3-dimensional permutation structures

We provide a classification of the homogeneous 3-dimensional permutation structures, i.e. homogeneous structures in a language of 3 linear orders, partially answering a 2002 question of Cameron. We also arrive at a natural description of all known homogeneous finite-dimensional permutation structures by modifying the language used in the construction from [Samuel Braunfeld, Electronic Journal of Combinatorics, 2016], completing the catalog begun there. Mathematics Subject Classifications: 03C13, 03C50


Introduction
In [3], Cameron classified the homogeneous permutations, which he identified with homogeneous structures consisting of two linear orders. He then posed the problem of classifying the homogeneous structures consisting of n linear orders for any n [3, §6, Problem 1], which we call n-dimensional permutation structures. The first step toward such a classification is to take a census of examples occurring "in nature", undertaken in [1], which introduced a construction for producing many new imprimitive examples. However, the construction did not quite capture all examples that were known at the time (see Examples 1,2 in §2 below).
While working in [2] on the structural Ramsey property for the structures from [1], it became apparent that rather than working with linear orders, the proper language decomposes linear orders that are E-convex for some ∅definable equivalence relation E into an order within E-classes and an order on the quotient; we call these pieces of orders subquotient orders. Definition 1.1. Let X be a structure, and E ≤ F equivalence relations on X. A subquotient-order from E to F is a partial order on X/E in which two E-classes are comparable iff they lie in the same F -class (note, this pulls back to a partial order on X). Thus, this partial order provides a linear order of C/E for each C ∈ X/F . We call E the bottom relation and F the top relation of the subquotient-order.
When the construction from [1] is carried out with subquotient orders rather than linear orders, it produces all known examples of homogeneous finite-dimensional permutation structures. The following question asks whether the list produced by this modified construction is complete, using terminology introduced in [2] and reviewed in §2. Question 1. Is every homogeneous finite-dimensional permutation structure with lattice of ∅-definable equivalence relations isomorphic to Λ interdefinable with the Fraïssé limit of some well-equipped lift of the class of all finite Λ-ultrametric spaces, for some distributive lattice Λ?
The following classification in the primitive case was conjectured in [1]. We show in Proposition 2.9 that this would follow from a positive answer to the above question.
Conjecture 1 (Primitivity Conjecture, [1]). Every primitive homogeneous finite dimensional permutation structure can be constructed by the following procedure.
(2) Take the Fraïssé limit of the resulting amalgamation class, getting a fully generic structure, possibly in a simpler language.
We next extract a consequence of the Primitivity Conjecture. Lemma 3.2 proves this subconjecture for k = 3, and it seems it should be tractable for several further small values of k via the methods used there.
Conjecture 2. Let Γ be a homogeneous k-dimensional permutation structure realizing all 3-types. Then Γ is fully generic.
The main result of the present paper is the following classification of the homogeneous 3-dimensional permutation structures, which gives a positive answer to Question 1 in this case. Definition 1.2. Given structures Γ 1 , Γ 2 , the composition of Γ 1 with Γ 2 , denoted Γ 1 [Γ 2 ], is the structure obtained by expanding Γ 1 with an equivalence relation E, and replacing the points of Γ 1 by E-classes that are copies of Γ 2 . Theorem 1.3 (The Catalog). Let (Γ, < 1 , < 2 , < 3 ) be a homogeneous 3dimensional permutation structure. We use Γ (g) i to denote the generic idimensional permutation structure; in particular Γ (g) 0 is a set equipped only with equality. Then Γ is quantifier-free interdefinable with one of the following 16 structures.
(1) Γ has no non-trivial ∅-definable congruence (a) Γ is primitive: Γ = Γ (b) Γ is a composition of primitive and imprimitive structures: Let Γ * denote the structure from (1b) with j = 0. Then Γ = Γ * [Γ The classification proceeds in two stages. First, we confirm the Primitivity Conjecture for 3 orders using explicit amalgamation arguments. Then for the imprimitive case, we pick a minimal non-trivial equivalence relation E. The Primitivity Conjecture makes it fairly clear what happens on E-classes, and some analysis of the type structure between E-classes eventually allows us to carry out an inductive classification. Corollary 1.4. Every homogeneous 3-dimensional permutation structure is interdefinable with the Fraïssé limit of some well-equipped lift of the class of all finite Λ-ultrametric spaces, for some distributive lattice Λ.
Despite the fact that assuming a positive answer to Question 1 gives a simple description of all finite-dimensional permutation structures, it is difficult to determine the corresponding catalog for a fixed number of linear orders. This is because it is not known what lattices of ∅-definable equivalence relations can be realized with a given number of orders (this problem is discussed, and an upper bound provided, in [1, §3.4]), nor is it true that one needs at most n orders to represent a structure with at most 2 n 2-types.
Question 2. Given a lattice Λ, what is the minimal n such that Λ is isomorphic to the lattice of ∅-definable equivalence relations of some homogeneous n-dimensional permutation structure?
Given a homogeneous finite-dimensional permutation structure Γ presented in a language of equivalence relations and subquotient orders, what is the minimal n such that Γ is quantifier-free interdefinable with an ndimensional permutation structure?
Thus, Corollary 1.4 is not proven by first producing a conjectural classification and then confirming it. Rather, it is proven by observing that all the structures appearing in the classification may be presented appropriately.
Finally, although we have a positive answer to Question 1 in the case of 3 orders, a plausible exceptional imprimitive structure arises in the analysis (see Lemma 4.9) that is ultimately shown not to exist. However, the proof of non-existence makes use of the limited type structure with 3 orders, and it seems possible similar structures will appear in the richer languages afforded by more orders.

Λ-Ultrametric Spaces and Subquotient Orders
This section is not strictly needed for the classification of the 3-dimensional case, but does provide context by giving the necessary background for Question 1. Because we hewed to the language of linear orders, we were unable to provide a satisfactory "census" in [1] of homogeneous finite-dimensional permutation structures, since some known examples were not produced by the construction. After modifying the construction to work with subquotient orders, we show such examples, for which we can now give a straightforward description. The notion of a well-equipped lift, which ensures that we may translate from the language of subquotient orders to linear orders, is then introduced, thus defining all the terms in Question 1, which in turn provides a conclusion to our "census". Finally, we show that Question 1 subsumes the Primitivity Conjecture from [1].
Definition 2.1. Let Λ be a complete lattice. A Λ-ultrametric space is a metric space where the metric takes values in Λ and the triangle inequality involves join rather than addition, i.e. d(x, z) ≤ d(x, y) ∨ d(y, z).
. For a given finite lattice Λ, there is an isomorphism between the category of Λ-ultrametric spaces and the category of structures consisting of a set equipped with a family of equivalence relations, closed under taking intersections in the lattice of all equivalence relations on the set, and labeled by the elements of Λ in such a way that the map from Λ to the lattice of equivalence relations is meet-preserving. Furthermore, the functors of this isomorphism preserve homogeneity.
Although we do not prove this theorem here, we will define the functors giving this isomorphism.
Given a system of equivalence relations as specified above, we get the corresponding Λ-ultrametric space by taking the same universe and defining d(x, y) = {λ ∈ Λ|xE λ y}. In the reverse direction, given a Λ-ultrametric space, we get the corresponding structure of equivalence relations by taking the same universe and defining E λ = {(x, y)|d(x, y) ≤ λ}.
Since the lattices we are considering will always be finite, they will have a top and bottom element, denoted 1 and 0, respectively. Thus, d(x, y) = 0 iff x = y.
For every finite distributive lattice Λ, a construction was given in [1] producing a countable homogeneous finite-dimensional permutation structure Γ, such that the lattice of ∅-definable equivalence relations in Γ is isomorphic to Λ. The structure Γ is naturally presented as a Λ-ultrametric space, equipped with multiple orders. When Λ is distributive, the class of all finite Λ-ultrametric spaces is an amalgamation class. The structure Γ is constructed by taking the generic Λ-ultrametric space, and adding linear orders that are generic, except that they are required to be convex with respect to a prescribed set of equivalence relations corresponding to a chain of meetirreducibles in Λ; enough such linear orders have to be added so that every meet-irreducible is convex with respect to at least one order, and there are further complications if 0 (equality) is meet-reducible.
Working at the level of subquotient orders requires a straightforward revision of the proof of amalgamation in [1,Lemma 3.7]. The proof is actually simplified by the language change, eliminating a special case the construction required when 0 is meet-reducible, yielding the following. Theorem 2.3. Let Λ be a finite distributive lattice, and Γ the generic Λultrametric space. Then there is a homogeneous expansion of Γ by finitely many subquotient orders, each of which has a meet-irreducible bottom relation, which is generic in a natural sense.
Proof. See Appendix A.
We now define two useful constructions with subquotient orders, and then give two examples of homogeneous finite-dimensional permutation structures not produced by the construction of [1], but which can be produced once linear orders are replaced by subquotient orders.
Definition 2.4. If x is an E-class, and F an equivalence relation above E, then x/F will represent the F -class containing x.
Definition 2.5. Let < E,F be a subquotient order with bottom relation E and top relation F , and let < F,G be a subquotient order with bottom relation F and top relation G. Then the composition of < F,G with < E,F , denoted < F,G [< E,F ], is the subquotient order with bottom relation E and top relation F given by x < F,G [< E,F ]y iff either of the following holds.
(1) x and y are in the same F -class, and x < E,F y (2) x and y are in distinct F -classes, and x/F < F,G y/F . Definition 2.6. Let < E,F be a subquotient order with bottom relation E and top relation F , and let G be an equivalence relation lying between E and F . Then the restriction of < E,F to G, denoted < E,F ↾ G , is the subquotient order with bottom relation E and top relation G given by x < E,F ↾ G y iff x and y are in the same G-class and x < E,F y. Example 1. Let A be the amalgamation class consisting of all finite structures in the language {E, < 1 , < 2 }, where E is an equivalence relation, < 1 is a linear order, and < 2 is an E-convex linear order that agrees with < 1 on E-classes.
Let A ′ be the class of all finite structures in the language {E ′ , < ′ 1 , < ′ 2 }, where E ′ is an equivalence relation, < ′ 1 is a subquotient order from = to 1, and < ′ 2 a subquotient order from E ′ to 1. This is also an amalgamation class, and its Fraïssé limit Γ ′ is interdefinable with the Fraïssé limit Γ of A.
Example 2. For a more complex example of the use of subquotient orders, consider the full product Q 2 . This is a homogeneous structure with universe Q 2 in the language {E 1 , E 2 , < 1 , < 2 }, where E 1 and E 2 are the relations defined by agreement in the first and second coordinates, respectively, < 1 is a generic subquotient order from E 1 to 1, and < 2 is a generic subquotient order from E 2 to 1.
As this structure requires four linear orders, it does not appear in our catalog.
It is not clear how either of these examples can be produced by a generic construction using linear orders. Neither can be obtained by the construction from [1]. There the only constraints we put on the linear orders were convexity conditions, which involves forbidding substructures of order 3. However, in Example 1, we must forbid a substructure of order 2 to force < 1 and < 2 to agree between E-related points. In Example 2, we must forbid the following substructure of order 4 (as well as another symmetric substructure): (1) Definition 2.7. Let Λ be a finite distributive lattice, and let L be a language consisting of relations for the distances in Λ and finitely many subquotient orders, labeled with their top and bottom relations. We say that the language L is Λ-well-equipped if E ∈ Λ appears as the bottom relation of some subquotient order in L with distinct bottom and top relations iff E is meet-irreducible, for every E ∈ Λ. If A Λ is the class of all finite Λ-ultrametric spaces, and L a Λ-wellequipped language, we will call A Λ a well-equipped lift of A Λ if it consists of all finite Λ-ultrametric spaces equipped with subquotient orders from L. Proposition 2.8 ([2, Prop 3.12]). Let Λ be a finite distributive lattice, A Λ be the class of all finite Λ-ultrametric spaces, and A Λ a well-equipped lift of A Λ , with Fraïssé limit Γ. Then the relations of Γ are interdefinable with a set of linear orders.
We close this section by showing the Primitivity Conjecture follows from a positive answer to Question 1. Proposition 2.9. Let Γ be the generic n-dimensional permutation structure, in the language {< 1 , ..., < n }, and let < be a definable linear order on Γ. Then there is an i ∈ [n] such that <=< i or <=< opp i . Proof. Note that < must be a union of 2-types ∪q i , and for each 2-type, exactly one of it and its opposite must be appear as some q i . We may assume q 0 = {x < 1 y, ..., x < n y}. If the conclusion is false, then for each i ∈ [n], there must be a type p i = q j for some j, such that p i ⊢ y < i x.
Now consider the partial structure on {x 1 , ..., x n+1 } given by setting . For each i ∈ [n], looking at < i gives a directed acyclic graph, whose transitive closure is a partial order in which x 1 and x n are < i -incomparable. This can then be completed to a linear order in which x n < i x 1 .
Each < i is a linear order in the resulting structure, which is thus a substructure of Γ. However, we have x 1 < ... < x n but x n < x 1 . Thus < is not transitive on this structure, and so does not define a linear order on Γ.

The Primitive Case
In this section, we classify the primitive homogeneous 3-dimensional permutation structures, obtaining the following. The main lemmas needed for the proof are below.
is homogeneous and contains all 3types. Then Γ is generic.  Thus the resulting structure is quantifier-free interdefinable with a primitive homogeneous 2-dimensional permutation structure. By the classification in [3], these satisfy the Primitivity Conjecture.
The amalgamation diagram appearing in the following definition is the key to the proof of Proposition 3.4, and will be used elsewhere in this section.
Definition 3.5. Give 2-types p, q, r, the (p, q, r)-majority diagram is the following amalgamation diagram, where x 1 q → x 3 holds (and follows from Remark 3.6. We offer some guidance on interpreting the above amalgamation diagram. Solid points lie in the base, while circled points lie outside the base; those on the left are in the first factor, while those on the right are in the second. Labeled arrows indicate 2-types. The diagram is completed by determining tp(a 1 , a 2 ).
Lemma 3.7. There is a unique solution to the (p, q, r)-majority diagram, given by a 1 < i a 2 iff < i is true in the majority of p, q, and r.
3.1. Reduction to 3-types. The following lemma strengthens an argument appearing in the proof of [3, Theorem 1].
Lemma 3.8. Let Γ be a homogeneous k-dimensional permutation structure that contains all configurations on n − 1 points, where n satisfies Then Γ is generic. More precisely, any configuration on N ≥ n points is contained in the unique amalgam of (N − 1)-point configurations.
Proof. Let A be a structure on N points. Let a pairing be an ℓ-set of unordered pairs of points from A, with each point appearing in at most one pair. A pairing is separated if, for every i ≤ k, there is a pair (a i , a ′ i ) such that a i and a ′ i are not < i -adjacent; otherwise the pairing is unseparated. Claim. There is at least one separated pairing on A.
Proof of Claim. The number of pairings is given by n 2ℓ 2ℓ 2 1 ,2 2 ,...,2 ℓ /ℓ! = n! 2 ℓ ℓ!(n−2ℓ)! . We will now show the number of unseparated pairings is at most k n−ℓ ℓ . First suppose k = 1. If N is even, there is only 1 unseparated pairing. If N is odd, the pairing is determined after choosing any one of the odd-indexed points to not appear, so there are ⌈n/2⌉. In both cases, there are n−ℓ ℓ . For larger k, note that an unseparated pairing must be unseparated with respect to at least one order, so there are at most k n−ℓ ℓ . By inequality in the hypothesis, we are done. ♦ Let P be a separated pairing. By extending A by a single point, we may, in every order, make one pair non-adjacent. Thus, after extending A by at most ℓ − 1 points, an extension we will denote by A * , we may assume that every pair in P is non-adjacent in every order.
Let (a 1 , a ′ 1 ) be a pair from P , and let By assumption, for every i ≤ k, there is a point b i ∈ B 1 that is < i -between a 1 and a ′ 1 . Thus A * is the unique amalgam of F 1 and F ′ 1 over B.
We may recursively continue this process on each factor until we have gone through all the pairs in P . At the end, each factor will look like a copy of A * with ℓ points removed, and so have size N − 1.
is homogeneous and contains all 3types. Then Γ is generic.
There are three possible pairings: Each order can be unseparated in at most one pairing, so if all the pairings are unseparated, each must be so with respect to a different order. By possibly relabeling the points, we may assume that a < 1 b < 1 c < 1 d, and by relabeling orders we may assume that P i is unseparated with respect to < i .
Thus, we have that a, c and b, d must be < 2 -adjacent, and a, d and b, c must be < 3 -adjacent.
We may extend A by a single point, e, that lies between a and b with respect to < 1 , lies between a and c with respect to < 2 , and lies between b and c with respect to < 3 , and label the resulting structure A * . Then, viewing B = {e, c, d} as the base of an amalgamation digram with F = B ∪ {a} the first factor and F ′ = B ∪ {b} the second, we have that A * is the unique amalgam.
We now show that F and F ′ have separable pairings, and so are contained in the unique amalgam of certain 3-types. For F , P = {{a, c} , {e, d}} is separated, since e and d are never < 2 -adjacent and only < 3 -adjacent if b and d were < 3 -adjacent, in which case a and c not < 3 -adjacent. For F ′ , P ′ = {{b, c} , {e, d}} is separated, since e and d are never < 3 -adjacent and only < 2 -adjacent if a and d were < 2 -adjacent, in which case b and c are not < 2 -adjacent.

3.2.
Notation. There are 8 2-types, which we may associate with the vertices of the unit cube {±1} 3 based on whether < i holds in the 2-type. The unit cube is bipartite, with one part consisting of the following four types at Hamming distance 2, while the other part consists of their opposites. We now introduce notation for 3 families of 3-types that will recur in our analysis. From left to right, the 3-types below will be denoted p⇒q, p⇐q, and C 3 (p, q, r).
In the following lemmas, (p, q, r, s) is taken to be some permutation of the types (0, 1, 2, 3). Lemma 3.9. Suppose p⇒q is forbidden. Then one of each of the following combinations of types is forbidden. (A) (p⇒r and C 3 (p, r, s)) or (r⇐q and C 3 (p, q, r)) (B) p⇐q or q⇐p Proof. For (A), we amalgamate one 3-type from each pair over an edge of type r. In the below diagrams, we assume p⇒r is realized; the arguments assuming C 3 (p, r, s) is realized are similar. Figure 3. 3 We wish to argue that the only way to complete both diagrams is to take tp(x, y) = p. This is clear for the right diagram, by transitivity. For the left diagram, note that since p and r are at Hamming distance 2, p and r opp agree on exactly 2 orders, as do p and q opp . Thus, by transitivity, tp(x, y) must agree with p in all 3 orders.
For (B), we use the (p opp , q, p)-majority diagram (see Figure 3.1), and then take Lemma 3.11 into account. Lemma 3.10. Suppose p⇒q, C 3 (p, q, r), and C 3 (p, q, s) are forbidden. If p and q are realized, then q⇐p is realized.
Proof. We try to complete the following amalgamation diagram.
x⊙ ⊙y By assumption tp(x, y) = p, r opp , s opp . The remaining types, except q, are ruled out by transitivity.
Lemma 3.11. Suppose p⇒q is forbidden. If p and q are realized, then q⇒p is realized.
Proof. We try to complete the following amalgamation diagram.
x⊙ ⊙y By assumption tp(x, y) = p. The remaining types, except q opp , are ruled out by transitivity.
3.4. Case Division. The proof of Lemma 3.3 proceeds by consideration of several cases. However, the following lemma provides a uniform point of departure.
Lemma 3.12. If Γ is primitive and omits a 3-type then without loss of generality it omits the 3-type of type (0 ⇒ 1) while realizing the 2-types 0, 1.
Proof. We may assume that at least 3 of the 2-types 0, 1, 2, 3, say 0, 1, 2 after relabeling, are realized, since otherwise we reduce to the case of fewer linear orders.
If any 3-type p ⇒ q or p ⇐ q is forbidden while p and q are realized, then by reversing the orders and changing the language we may assume that 0 ⇒ 1 is forbidden. So assume this is not the case.
By the above paragraphs, we may construct the standard (0, 1, 2)-majority diagram, which shows 3 is realized as well. Up to a change of language, the forbidden 3-type must be of the form C 3 (0, 1, 2). But this is a substructure of the unique solution to the (1 opp , 0 opp , 2 opp )-majority diagram.
Remark 3.13. Although we may assume the 2-types 1 is realized, we may not want to, since it breaks the symmetry between 1, 2, and 3. Thus, this will not be assumed unless otherwise noted.
We now divide into cases the ways Lemma 3.3 might fail.
Case 1: All 3-types of type 0⇒p (p = 1, 2, 3) are forbidden, and 0 is realized. Case 2: For a given pair of 2-types p, q at Hamming distance 2, at most 2 3-types of type p⇒q are forbidden, and 0, 1 are realized.
Case 2.1: There exist p, q, r at Hamming distance 2 such that p⇒q and p⇒r are forbidden.
Case 2.2: For any p, q, r at Hamming distance 2, at most one of p⇒q and p⇒r is forbidden. We also wish to divide Case 1 into subcases, so assume 0⇒p is forbidden, for p = 1, 2, 3. Consider the directed graph with vertex set {1, 2, 3}, and an edge (p, q) when the type C 3 (0, p, q) is forbidden.
By Lemma 3.9, for any arrangement (p, q, r) of the vertices, either (p, q) or (q, r) is an edge. Thus, D contains a symmetric edge p ↔ q, which we may assume is 1 ↔ 2, and D has at least 4 edges.
We now subdivide Case 1 as follows. 3.5. Proof of Lemma 3.3. The proof proceeds by starting with the assumptions of one of the subcases and then repeatedly applying the amaglamation lemmas 3.9, 3.10, and 3.11 until reaching a contradiction. This contradiction could either be that a structure is both forbidden and realized, or could be a violation of the primitivity constraint by the appearance of a definable equivalence relation. More explicitly, the 2-types p 1 , ..., p k generate a definable equivalence relation if every 3-type on points x, y, z satisfying the following is forbidden.
(1) tp(x, y), tp(y, z) ∈ {p 1 , ..., p k } (2) tp(x, z) ∈ {p 1 , ..., p k } The proofs are presented in tables. In each line, some 3-type is shown to be realized or forbidden. The reason is given; if the reason is one of the amalgamation lemmas then the assignment of (p, q, r, s) is given; finally the previous lines used are given. When one of the amalgamation lemmas is used with opposite types, so for example p⇐q is assumed forbidden rather than p⇒q, an "R" (for "reversed") is appended to the name of the lemma.
In the tables, we assume all 2-types are realized; after every table is a remark noting the alterations required if some 2-type is forbidden. Now 0 generates an equivalence relation, contradicting primitivity.
Remark 3.14. This proof works with some 2-type forbidden. If 1, 2, or 3 is forbidden, then the corresponding case of line 4 follows without needing line 3.
The treatment of the remaining cases follows the same scheme at somewhat greater length, and show that the amalgamation lemmas given previously suffice to complete the analysis. Other methods will be required in §4.
Remark 3.15. This proof works with some 2-types forbidden. By assumption, the types 2 and 3 are realized. The assumption that the type 1 is realized only appears in line 4, which becomes unnecessary if 1 is forbidden since line 4 is only used for line 6. Case 1.3 requires further subdivision according to our assumptions on the directed graph D. We draw the D corresponding to each of the further subcases.   Now 0 ∪ 2 ∪ 3 generates an equivalence relation.

The Imprimitive Case
We make an initial case division of the imprimitive case for Γ an imprimitive homogeneous 3-dimensional permutation structure. Let E be a minimal non-trivial ∅-definable equivalence relation.
Case 1: E is convex with respect to < 1 , < 2 , < 3 , and thus a congruence. Case 2: E is not convex with respect to at least one of < 1 , < 2 , < 3 . Without loss of generality, we assume E is not < 1 -convex.
In Case 1, we may inductively proceed by factoring out E, noting that the resulting structure now omits a 2-type, and so Γ will be a composition of a homogeneous 3-dimensional permutation structure with one fewer 2-type available and a primitive homogeneous 3-dimensional permutation structure.
Our goal for Case 2 will be to show that Γ is still determined by its restriction to E-classes and by the E-quotient of the reduct of Γ forgetting all orders for which E is non-convex.
The following statement, which is immediate from Theorem 3.1, will be important for both cases.
Lemma 4.1. Let E be a minimal non-trivial ∅-definable equivalence relation in a homogeneous 3-dimensional permutation structure, and C be an Eclass. Then the induced structure on C is generic, modulo the agreement of certain orders up to reversal.
We will frequently use the following characterization of genericity.
Proposition 4.2. Let Γ be a homogeneous n-dimensional permutation structure. Then Γ is generic iff for any non-empty open intervals I i in each order, Proof. Genericity of Γ is equivalent to the following one-point extension property: given a type p over a finite set A not realized in A, p is realized iff its restriction to each individual order is realized by an element not in A. The restriction of p to an order < i specifies a < i -interval with endpoints in A ∪ {±∞}, which is open since p is not realized in A. This interval is non-empty exactly when the restriction has a realization not in A.

Convex Closure.
In this section, we show E-classes are < 1 -dense in their < 1 -convex closures, and the < 1 -convex closure of E is an equivalence relation. The arguments we present depend heavily on the type structure in the case k = 3, although in a few cases a step where our argument depends on k = 3 could have been carried out in greater generality.
Lemma 4.3. Let E be a minimal non-trivial ∅-definable equivalence relation in a homogeneous finite-dimensional permutation structure, and C, C ′ be distinct E-classes. Then no 2-type p is realized in both C × C ′ and C ′ × C.
, and note that p = q, since otherwise transitivity would force a ′ p → b ′ and so p ⊂ E. By homogeneity, there is an automorphism sending (a, b ′ ) to (a ′ , b). Thus there must be some c ∈ C such that b ′ q → c. But then by transitivity b q → c, which is a contradiction.
Definition 4.4. Let E be the < 1 -convex closure of E, i.e. a Eb if there exists a c such that aEc and b is < 1 -between a and c. Given an E-class C, C is the < 1 -convex closure of C.
Notation. For the rest of §4, we fix notation, by reversing and switching orders as needed, so that the 2-type 123 → is contained in E, and if E contains another 2-type besides 123 → and its opposite then it contains 23 →.
Lemma 4.5. Let E be a minimal non-trivial ∅-definable equivalence relation in a homogeneous 3-dimensional permutation structure, and C be an Eclass. Let a 1 , a 2 ∈ C, b ∈ C, and a 1 < 1 b < 1 a 2 . Then tp(a 1 , b) = Corollary 4.6. Let E be a minimal non-trivial ∅-definable equivalence relation in a homogeneous 3-dimensional permutation structure, and C be an E-class. Suppose b ∈ C\C. Then b/E ⊂ C.
Corollary 4.7. Let E be a minimal non-trivial ∅-definable equivalence relation in a homogeneous 3-dimensional permutation structure, and C be an Proof. We only treat the case a < 1 b, since the other case is similar.
Suppose tp(a, b) = Corollary 4.8. Let E be a minimal non-trivial ∅-definable equivalence relation in a homogeneous 3-dimensional permutation structure. Then any non-trivial ∅-definable equivalence relation contains E.
Proof. Consider the equivalence relation generated by a 2-type p, and without loss of generality assume < 1 holds in p. Given a, b such that a  → is generated by p as well.
We note that much of the proof of the following lemma is concerned with ruling out a plausible configuration in which given E-classes C, C 1 such that C 1 ⊂ C, then C 1 defines a non-trivial < 1 -Dedekind cut in C. Although the type structure is too constrained to allow this with 3 orders, it seems possible that it may occur with more orders.
Lemma 4.9. Let E be a minimal non-trivial ∅-definable equivalence relation in a homogeneous 3-dimensional permutation structure, and C be an Eclass. Then C is < 1 -dense in C.
Proof. Given an E-class C and an element a, we use a(C) to denote the < 1 -Dedekind cut defined by a in C.
Let a, b ∈ C, with a < 1 b, and suppose a(C) = b(C). We first show we may suppose that a/E = b/E and a 123 → b. Trivially, we cannot have a, b ∈ C. Now assume only one of a, b ∈ C, say a. Then a is a maximal element of the cut b(C). But given any d ∈ C\C, d(C) has no maximal or minimal elements; otherwise, the elements of C would realize at least 3 types over d, but there are only 2 realized types by Lemma 4.5. Thus a, b ∈ C\C.
Now suppose a/E = b/E, but a 23 ← b. By the genericity of C, there is a b ′ in the < 1 -interval (a, b) < 1 such that a 123 → b ′ , so we may replace b by b ′ .
Then there exists a ′ ∈ C 1 such that a ′ 123 → a and a(C) = a ′ (C) Proof of Claim 1. Let a ′ 123 → a. Since a < 1 b, by Corollary 4.7 tp(a, b) = tp(a ′ , b). Since by Lemma 4.6, a/E ∈ C, there is a c ∈ C such that c < 1 a ′ , so by Corollary 4.7 tp(a, c) = tp(a ′ , c). Thus (a, b, c) ∼ = (a ′ , b, c), so by homogeneity there is an automorphism fixing c and taking (a, b) to (a ′ , b). Thus a ′ (C) = b(C) = a(C). ♦ In this case, we may then replace a, b by a ′ , a. Thus, we may now suppose that a/E = C 1 = b/E and a 123 → b.
Claim 2. c(C) is independent of the choice of c ∈ C 1 .
Proof of Claim 2. Consider x, y ∈ C 1 , and, using the genericity of C 1 , find c 1 , c 2 ∈ C 1 such that c 1 < 1 x, y < 1 c 2 and c 1 123 → c 2 . Take z ∈ C, with z < 1 a, c 1 . By Corollary 4.7, (z, a, b) ∼ = (z, c 1 , c 2 ). Thus, since a(C) = b(C), we have c 1 (C) = c 2 (C), so x(C) = y(C). ♦ Without loss of generality, we now assume C < 2 C 1 , so by Lemma 4.5, the types realized in C × C 1 are 12 → and 13 ←. Thus by homogeneity, given any E-classes C, C ′ , if 12 → or 13 ← is realized in C × C ′ , then C ′ defines a < 1 -Dedekind cut in C; if neither these types nor their opposites are realized, then the only remaining types are 23 → and 23 ←, and by Lemma 4.3 exactly one of them is realized, so neither class is in the < 1 -convex closure of the other. In particular, E-classes are < 2 , < 3 -convex.
Note that if every E-class C ′ ⊂ C such that C < 2 C ′ defined the same < 1 -Dedekind cut in C, then C would have an ∅-definable partition, contradicting the minimality of E.
Claim 3. Both factors of the (12, 23, 13)-majority diagram, displayed below (with the edge x 23 → z not drawn), are realized in Γ. Figure 4.7 Proof of Claim 3. We only prove the first factor is realized, since the argument for the second is nearly identical. First, as shown below, the first factor is the unique amalgam of the following 3-types, so it suffices to show these are realized. Figure 4.8 For the triangle (a, x, y) from the diagram, let a/E = C. Take distinct Eclasses C ′ , C ′′ ⊂ C such that C < 2 C ′ < 2 C ′′ and C ′ and C ′′ define distinct < 1 -cuts in C. Then there are x ∈ C ′ , y ∈ C ′′ realizing the triangle (a, x, y).
For the triangle (a, y, z), we will show it is the unique amalgam of the following diagram.  By transitivity, y < 3 z and z < 1 y, so the possible completions are y 23 → z and z 12 → y. However, if z 12 → y, then y/E defines a < 1 -Dedekind cut in both a/E and z/E, but z/E < 1 a/E, which is a contradiction. Thus the only allowed completion is y 23 → z. ♦ We are forced to complete the (12, 23, 13)-majority diagram by a 123 → b, so that aEb. However, a 12 → x 23 → b violates the requirement that E-classes are < 2 -convex. Thus Γ is not homogeneous.
Proposition 4.10. Let E be a minimal non-trivial ∅-definable equivalence relation in a homogeneous 3-dimensional permutation structure, and C be an E-class. Then E is an equivalence relation.
Proof. Let C be an E-class. By Corollary 4.6, C is a union of E-classes. Now suppose C ′ ⊂ C is an E-class. By Lemma 4.9 there are c 1 , c 2 ∈ C ′ such that c 1 (C) = c 2 (C), and applying Corollary 4.6 again we see C ⊂ C ′ . Thus E defines a partition.

Reduction via Quotients.
Since E is a congruence by Corollary 4.11, it suffices to consider the case E = 1, since we may otherwise consider the restriction Γ ↾ E. For this subsection, we work with k-dimensional permutation structures.
We now aim for the following lemmas. The first implies that Γ is determined by its restriction to E-classes and the reduct of Γ/E forgetting all orders that are not E-convex. The second allows us to carry out our induction by showing that the above reduct of Γ/E must be homogeneous.
The following lemma is more naturally stated in the language of subquotient orders, but as it is the concluding step in the classification of certain permutation structures, we give it in a form appropriate for its intended application.
for j, j ′ in a given I i , and the induced structure on any E-class C is fully generic, modulo the identification of orders in the same I i .
Lemma 4.13. Let Γ be a homogeneous k-dimensional permutation structure. Let E be a minimal non-trivial ∅-definable equivalence relation in Γ, and suppose E-classes are < i -convex for 1 ≤ i ≤ ℓ and < i -dense for ℓ + 1 ≤ i ≤ k. Suppose each E-class is generic, modulo the agreement of certain orders up to reversal. Then (Γ/E, < 1 , ..., < ℓ ) is homogeneous.
The following lemma is not necessary for the case k = 3, since E is only dense with respect to one order.
Lemma 4.14. Suppose (Γ, < 1 , ..., < k ) is homogeneous. Let E be a minimal non-trivial ∅-definable equivalence relation in Γ, and C be an E-class. Suppose C is generic, modulo the agreement of certain orders up to reversal. Further suppose that C is < i -convex for 1 ≤ i ≤ ℓ and < i -dense for ℓ + 1 ≤ i ≤ k. Then (1) If C 1 , C 2 are E-classes, then C 1 remains homogeneous after naming Proof.
(1) Given a finite A ⊂ C 1 and i ≥ ℓ + 1, let B i = {x ∈ C 2 |A < i x}. Each such B i is a < i -terminal segment of C 2 , so by genericity their intersection is non-empty. Now, consider A 1 ∼ = A 2 finite substructures of C 1 . Let A = A 1 ∪ A 2 , and choose a b in the intersection of the corresponding B i . By homogeneity, there is an automorphism taking A 1 b to A 2 b and fixing b, hence C 2 .
(2) Suppose this is false, as witnessed by < i , < j . We consider E-classes as ordered sets with respect to the common restriction of these orders.
Take a, b with a < i b and b < j a, and let C 1 = a/E and C 2 = b/E. Let Note that these are intervals in C 2 and C 1 , respectively.

Claim. J a = {a}
Proof of Claim. By density and genericity, there are b 1 , b 2 ∈ C 2 such that b 1 < i,j a < i,j b 2 , so I a ⊂ (b 1 , b 2 ). Then find a 1 , a 2 ∈ C 1 such that a 1 < i,j b 1 , b 2 < i,j a 2 , so J a ⊂ (a 1 , a 2 ). Thus J a is (a, C 2 )-definable and < i,j -bounded. By (1), J a is a-definable in C 1 and < i,j -bounded, so J a = {a} by genericity of C 1 . ♦ If there were some b ′ ∈ I a with b ′ = b, then by density, we could find some a ′ ∈ C 1 < i -between b and b ′ , and so would have a ′ ∈ J a . Thus I a = {b}. But by density there is a b ′ ∈ C 2 < i -between a and b, so b ′ ∈ I a , which is a contradiction.
(4) Forget the < ′ i for i ≥ ℓ + 1. We now prove a 1-point extension property, which shows that to realize a type p in an E-class C , it is sufficient that the restriction of the type to each subquotient order is individually realized.
Lemma 4.15. Let (Γ, < 1 , ..., < k ) be homogeneous such that no orders agree up to reversal. Let E be a minimal non-trivial ∅-definable equivalence relation in Γ, and C be an E-class. Suppose the induced structre on C is generic, modulo the agreement of certain orders up to reversal. Suppose that C is < i -convex for 1 ≤ i ≤ ℓ and < i -dense for ℓ + 1 ≤ i ≤ k. We now work in Γ red .
Let A ⊂ Γ red be finite, and p a 1-type over A not realized in A. Then p is realized in a given E-class C by a point not in A iff the following hold. ( (4) p does not contain the formula "x = a" for any a ∈ A.
Proof. These conditions are clearly necessary. We will prove they suffice. By condition (1), all of C satisfies p ↾ (< ′′ 1 , ..., < ′′ ℓ ). List all the subquotient orders from 0 to E together with < i for i ≥ ℓ + 1 as < * 1 , ..., < * n , and let p i = p ↾< * i . It now suffices to show p i contains a non-empty open < * iinterval of C, since then by the genericity of C there will be some point in their intersection, which thus realizes p.
In the case < * i is a subquotient order from 0 to E, by condition (2) some point in C realizes p i restricted to parameters outside of C, and so all of C does; again by condition (2), p i restricted to parameters inside of C then contains an open interval of C. In the case < * i =< j for j ≥ ℓ + 1, condition (3) implies p i contains a non-empty open interval in Γ; since E-classes are < * i -dense, this interval meets C in a non-empty open interval. Proof of Lemma 4.13. LetĀ ∼ =B be finite subsets of (Γ/E, < 1 , ..., < ℓ ). We liftĀ to A ⊂ (Γ, < 1 , ..., < k ), and look for an automorphism moving A to a set covering B.
Let p = tp(a/A 0 ). We will now work in Γ red and use Lemma 4.15 to find a realization of p in C. Condition (1) is equivalent toĀ ∼ =B. Sinceā ∈Ā 0 , simply says x is not < ′ i -related to any a ∈ A, which will be true for every x ∈ C. Finally, sinceā ∈Ā 0 , a ∈ A 0 , so a witnesses condition (3).
Proof of Lemma 4.12. For existence, let Γ be the composition Γ * [C], where C only carries the equality relation, and let E be the corresponding equivalence relation. Note that each < * i is now a subquotient order from E to 1.
, add a generic subquotient order < ′ i from 0 to E. For ℓ + 1 ≤ i ≤ k, add a generic linear order < i . We may then define the specified convex orders < i for 1 ≤ i ≤ ℓ as compositions of the < * i with the < ′ j or the restrictions to E of the < n for ℓ + 1 ≤ n ≤ k.
For uniqueness, suppose we have a structure (Γ ′ , < 1 , ..., < k ) satisfying the conditions. We will show Γ ′red has the same finite substructures as the Γ red we constructed above; as they are both homogeneous, they will thus be isomorphic.
As all the subquotient orders added to construct Γ red were added generically, every finite substructure of Γ ′red is a substructure of Γ red . We proceed by induction on the size of the substructure, so let A ∪ {a} be a finite substructure of Γ red , such that A is a substructure of Γ ′red . We will use Lemma 4.15 to show p = tp(a/A) is realized in Γ ′red .
We may assume a ∈ A, otherwise we are done, so condition (4) is satisfied. As (suitable reducts of) Γ red /E and Γ ′red /E both are isomorphic to Γ * , and as a/E realizes p ↾ (< ′′ 1 , ..., < ′′ ℓ ) in the former, there is some E-class C realizing it in the latter, so condition (1) is satisfied. For condition (2), again since the quotient structures are isomorphic, we may pick C such that for each b ∈ A, C = b/E iff a/E = b/E. Thus, we are only concerned about (p ↾< ′ i ) ↾ (A ∩ C); but as this restricted type doesn't violate transitivity, it is realized in C since < ′ i is dense on C. Finally for condition (3), we again have that p ↾< j doesn't violate transitivity, and so is realized by some element not in A since < j is dense on Γ ′red .
Remark 4.16. Lemma 4.12 is also true if (3) is relaxed to allow certain restrictions to be the reversals of others. The only case that isn't immediate is if we require < i ↾ E = (< j ↾ E ) opp for < i , < j dense. But then < i =< opp j by Lemma 4.14.
4.3. The Imprimitive Catalog. We now classify the imprimitive homogeneous structures. Listing all these structures in the language of linear orders yields a mob of examples, since (pieces of) orders may be reversed, which orders a given order agrees with may differ for the various pieces of that order, and orders may be permuted. Thus, we present the structures up to definable equivalence, and do so in a language of subquotient orders, each of which is generic, and equivalence relations.
Also note that when presented in the language of 3 linear orders, (1) uses all 8 2-types, while (2) only uses 6 of them. Thus (1) cannot appear as a factor in a composition, while (2) can.
If Γ has a non-trivial ∅-definable congruence, then it is a composition, whose factors are either primitive or one of the above structures. Below, let Γ (g) i to denote the generic i-dimensional permutation structure If all of the factors are primitive, then each factor is interdefinable with Γ (g) i for i ∈ {1, 2}. Each such factor contributes 2 i 2-types. As there are at most 8 2-types available, we get at most the following structures.
(3) For any multisubset I ⊂ {1, 2} such that |I| > 1 and i∈I 2 i ≤ 8, Γ is the composition in any order of Γ (g) i for i ∈ I. Finally, if one of the factors is imprimitive, we noted earlier it must be (2). There are only 2 2-types remaining, so the other factor must be Γ (g) 1 .
(4) Let Γ * be the structure from (2). Then Γ = Γ * [Γ For all of these structures we have only shown that at most 8 2-types are realized, but it is easy to check that each structure can be presented in a language of 3 linear orders by taking restrictions and compositions of the subquotient orders, which concludes our derivation of the catalog. This last step prompts the following special case of Question 2.
Question 3. Let Γ be a finite-dimensional permutation structure, with a linear lattice of ∅-definable equivalence relations. If Γ has at most 2 k nontrivial 2-types, can Γ be presented as a k-dimensional permutation structure?
We remark that the linearity hypothesis is necessary, since the full product Q 2 (see Example 2) only has 8 non-trivial 2-types, but requires 4 linear orders.
Proposition A.2 ([1, Proposition 2.4]). Let Λ be a distributive lattice, and let K be the class of all finite Λ-ultrametric spaces. Then K is an amalgamation class, and any amalgamation diagram can be completed by canonical amalgamation.
Definition A.3. Let X be a structure, equipped with a binary relation R and an equivalence relation E. We say that E is a <-congruence if E(x, x ′ ) and E(y, y ′ ) implies that R(x, y) iff R(x ′ , y ′ ). Theorem 2.3 will follow from the following lemma, which handles the case of an expansion by a single subquotient order, since if there are multiple subquotient orders, we may amalgamate them independently.
Lemma A.4. Let Λ be a finite distributive lattice. Let A * be the class of finite structures (A, d, < E ) satisfying the following conditions.
• < E is a subquotient order with bottom relation E, for some meetirreducible E ∈ Λ, and top relation F ∈ Λ. Then A * is an amalgamation class.
Proof. We first introduce some notation. We define the relations E and d(a, b) ≤ E). We will make use of the following properties of E on A * -structures.
(1) If a E b < E c or a < E b E c, then a < E c.
(3) If a E b E c and d(a, c) ≤ E, then d(a, b), d(a, c) ≤ E.
(4) If a E b E a, then d(a, b) ≤ E. Property (1) follows from the fact that E is a E -congruence. Properties (2) and (3) follow from (1), and (4) is a special case of (3).
It suffices to show that A * contains solutions to all two-point amalgamation problems A * 0 ⊆ A * 1 , A * 2 , A * i = A * 0 ∪ {a i } for i = 1, 2. Let A be the extension of the free amalgam given by determining d(a 1 , a 2 ) by pre-canonical amalgamation. Either < E is already a subquotient order with bottom relation E and top relation F , or we need to extend it to one by determining either a 1 < E a 2 or a 2 < E a 1 . We break this into three cases. Claim 1. Suppose d(a 1 , a 2 ) ≤ E. Then for x ∈ A * 0 , we have a 1 < E x ⇐⇒ a 2 < E x In particular, < E is a subquotient order on A from E to F .

Proof of Claim.
Since E is meet-irreducible, if pre-canonical amalgamation yields d(a 1 , a 2 ) ≤ E, then there is a y ∈ A * 0 such that d(a 1 , y), d(a 2 , y) ≤ E. By the fact that E is a < E -congruence, we get a 1 < E x ⇐⇒ y < E x ⇐⇒ a 2 < E x. This proves the first part of the claim, and the second part follows immediately. ♦