The Finite Satisfiability Problem for Two-Variable, First-Order Logic with one Transitive Relation is Decidable

We consider the two-variable fragment of first-order logic with one distinguished binary predicate constrained to be interpreted as a transitive relation. The finite satisfiability problem for this logic is shown to be decidable, in triply exponential non-deterministic time. The complexity falls to doubly exponential non-deterministic time if the distinguished binary predicate is constrained to be interpreted as a partial order.


Introduction
The two-variable fragment, henceforth denoted L 2 , is the fragment of firstorder logic with equality but without function-symbols, in which only two logical variables may appear.It is well-known that L 2 has the finite model property, and that its satisfiability (= finite satisfiability) problem is NEXPTIME-complete [3].It follows that it is impossible, within L 2 , to express the condition that a given binary predicate r denotes a transitive relation, since in that case the L 2 -formula ∀x¬r(x, x) ∧ ∀x∃yr(x, y) becomes an axiom of infinity.This observation has prompted investigation of what happens when L 2 is enriched by imposing various semantic restrictions on the interpretations of certain predicates.For k > 0, denote by L 2 kT the logic whose formulas are exactly those of L 2 , but where k distinguished predicates are required to be interpreted as transitive relations, and denote by L 2 kE the same set of formulas, but where k distinguished predicates are required to be interpreted as equivalence relations.For each of these logics, the question arises as to whether the satisfiability and finite satisfiability problems are decidable, and, if so, what their computational complexity is.
The following is known.(i) L 2 1E has the finite model property, and its satisfiability (= finite satisfiability) problem is NEXPTIME-complete [8].(ii) L 2 2E lacks the finite model property, but its satisfiability and finite satisfiability problems are both 2-NEXPTIME-complete [7].(iii) For k ≥ 3, the satisfiability and finite satisfiability problems for L 2 kE are both undecidable [8].(iv) L 2 1T lacks the finite model property and its satisfiability problem is 2-EXPTIME-hard and in 2-NEXPTIME [9].(v) For k ≥ 2, the satisfiability and finite satisfiability problems for L 2 kT are both undecidable [5].(In fact, the satisfiability and finite satisfiability problems for the two-variable fragment with one transitive relation and one equivalence relation are already undecidable [10].)This resolves the decidability and (within narrow limits) the complexity of the satisfiability and finite satisfiability problems for all of the logics L 2 kT and L 2 kE except for one case: the finite satisfiability problem for L 2 1T, where decidability is currently open.This article deals with that case, by showing that the finite satisfiability problem for L 2 1T is in 3-NEXPTIME.The best currently known lower bound for this problem is 2-EXPTIME-hard [4].We remark that the approach employed in [9] to establish the decidability of the satisfiability problem for L 2 1T breaks down if models are required to be finite: the algorithm presented here for determining finite satisfiability employs a quite different strategy.
Denote by L 2 1PO the logic defined in exactly the same way as L 2 1T, except that the distinguished binary relation is constrained to be interpreted as a (strict) partial order-i.e. as an transitive and irreflexive relation.Since the L 2 -formula ∀x∀y¬r(x, x) asserts that r is irreflexive, it follows that L 2 1PO no stronger, in terms of expressive power, than L 2 1T.In addition, we take the logic L 2 1PO u to be the fragment of L 2 1PO in whichapart from equality and the distinguished (partial order) predicate-only unary predicates are allowed.Our strategy in the sequel is first to consider L 2 1PO u .Structures interpreting this logic are, in effect, partial orders in which each element is assigned one of a finite number of types.We obtain a 2-NEXPTIME upper complexity-bound on the finite satisfiability problem for this logic, by introducing a method for 'factorizing' such typed partial orders into smaller partial orders on blocks of elements of the same type.We then extend this upper bound to L 2 1PO by exhibiting a method to eliminate all binary predicates in L 2 1PO-formulas (other than equality and the distinguished predicate).Finally, we obtain the 3-NEXPTIME upper complexity-bound on the finite satisfiability problem for L 2 1T by exhibiting a method to replace the distinguished transitive relation by a partial order.This latter reduction produces an exponential increase in the size of the formula in question.
Stronger complexity-theoretic upper bounds are available when the distinguished predicates are required to be interpreted as linear orders: the satisfiability and finite satisfiability problems for L 2 together with one linear order are both NEXPTIME-complete [11]; the finite satisfiability problem for L 2 together with two linear orders (and only unary non-navigational predicates) is EXPSPACE-complete [12]; with three linear orders, satisfiability and finite satisfiability are both undecidable [6,11].Also somewhat related to L 2 1PO u is the propositional modal logic known as navigational XPATH, which features a signature of proposition letters interpreted over vertices of some finite, ordered tree, together with modal operators giving access to vertices standing in the relations of daughter and next-sister, as well as their transitive closures.It is known that, over finite trees, navigational XPATH has the same expressive power as two-variable, first-order logic with a signature consisting of unary predicates (representing properties of vertices) together with binary 'navigational' predicates (representing the modal accessibility relations).The exact complexity of satisfiability for p q Figure 1: A linear order on the elements satisfying p, and an anti-chain on the elements satisfying q.
all natural variants of this logic is given in [1].
To convey a sense of the expressive power of the logics we are working with, we give an example showing that the logic L 2 1PO u can force the existence of an infinite anti-chain: that is, an infinite collection of elements none of which is related to any other in the partial ordering.The example is due to E. Kiero ński (personal communication).In the following, we use < as the distinguished binary predicate of L 2 1PO u (written using infix notation).First of all, the formulas ∃x.p(x) ∀x∀y(p(x) ∧ p(y) → (x < y ∨ x = y ∨ y < x)) ensure that elements satisfying p form a non-empty linear order.Pick some such element a 1 .Now the formulas ∀x(p(x) → ∃y(¬x < y ∧ ¬y < x ∧ q(y)) ∀x(q(x) → ∃y(x < y ∧ p(y)) ensure that, for every element, say a i , satisfying p, there is an incomparable element, say b i , satisfying q, and, for every element b i satisfying q, there is a greater element, say a i+1 , satisfying p.Thus, we generate sequences of elements a 1 , a 2 , . . ., satisfying p, and b 1 , b 2 , . . ., satisfying q.A moment's thought shows that for all i, a i < a i+1 , so that, by a simple induction, a i < b j for all i < j.This immediately implies that the b j are all distinct, since a i and b i are, by construction, incomparable.The formula ∀x∀y(q(x) ∧ q(y) → (¬x < y ∧ ¬y < x)).
Then secures the sought-after infinite anti-chain.That the formulas are satisfiable is shown by the partially-ordered structure depicted in Fig. 1.We remark that, even under the assumption that structures are finite, L 2 1PO u can force doubly-exponential-sized models; this is demonstrated, for example, using the construction of [4].

Preliminaries
We employ standard model-theoretic notation: structures are indicated by (possibly decorated) fraktur letters A, B, . . ., and their domains by the corresponding Roman letters A, B, . . . .In this paper, we adopt the nonstandard assumption that all structures have cardinality at least 2. Thus, the formula ∀x∃y(x = y) is for us a validity, and ∀x∀y(x = y) a contradiction.This assumption does not represent a significant restriction: over domains of size 1, first-order logic reduces to propositional logic.
A binary relation R on some carrier set A is transitive if aRb and bRc implies aRc, reflexive if aRa always holds, irreflexive if aRa never holds, and anti-symmetric if aRb and bRa implies a = b.Every transitive, irreflexive relation is trivially anti-symmetric.A weak partial order is a relation that is transitive, reflexive and anti-symmetric; a strict partial order is a relation that is transitive and irreflexive.If R is a weak partial order and I the identity (diagonal) relation on A, then R \ I is a strict partial order; moreover, all strict partial orders on A arise in this way.Likewsie, if R is a strict partial order then R ∪ I is a weak partial order; moreover, all weak partial orders on A arise in this way.In the sequel, the unmodified phrase partial order will always mean strict partial order.
The two-variable fragment, here denoted L 2 , is the fragment of firstorder logic with equality but without function-symbols, in which only two variables, x and y, may appear.There are no other syntactic restrictions.In particular, formulas such as ∀x(p(x) → ∃y(r(x, y) ∧ ∃x.s(y, x))), in which bound occurrences of a variable u may appear within the scope of a quantifier Qu, are allowed.It is routine to show that predicates having arity other than 1 or 2 add no effective expressive power in the context of L 2 .It is likewise routine to show that individual constants add no effective expressive power given the presence of the equality predicate.Henceforth, then, we shall take all signatures to consist only of unary and binary predicates.
We define L 2 1T to be the set of formulas of L 2 over any signature of unary and binary predicates which features a distinguished binary predicate t.The semantics of L 2 1T is exactly as for L 2 , except that the interpretation of t is required to be a transitive relation.Similarly, we define L 2 1PO to be the set of formulas of L 2 over any signature of unary and binary predicates which features a distinguished binary predicate < (written using infix notation).The semantics of L 2 1PO is exactly as for L 2 , except that the interpretation of < is required to be a partial order.Finally, we define L 2 1PO u to be the subset of L 2 1PO in which no binary predicates other than = and < appear.
A formula of L 2 is said to be unary if it features just one free variable.A unary formula ζ is generally silently assumed to have x as its only free variable; if ζ is such a formula, we write ζ(y) for the result of replacing x in ζ by y.The unary formulas µ 1 , . . ., µ n are mutually exclusive if |= ∀x(µ i → ¬µ j ) for all i (1 ≤ i < j ≤ n).Any formula η of L 2 with two free variables is assumed to have those variables taken in the order x, y.Thus, we write where a, b are elements of A, to indicate that η is satisfied in A under the assignment a → x and b → y.For the purposes of this paper, we may take the size of an L 2 -formula ϕ, denoted ϕ , to be the number of symbols it contains.
For any signature σ, a σ-atom is a formula of the form p(x) where p is a predicate of σ and x a tuple of variables of the appropriate arity.A σ-literal is a σ-atom or a negated σ-atom.The reference to σ is omitted if unimportant or clear from context.A clause is a disjunction of literals; we allow ⊥ (the disjunction of no literals) to be a clause.A 1-type over σ is a maximal consistent set of equality-free σ-literals involving only the variable x; and a 2-type over σ is a maximal consistent set of σ-literals involving the variables x and y. (Thus, 1-and 2-types are what are sometimes called atomic 1-and 2-types.)Consistency here is to be understood as taking into account the semantic constraints on distinguished predicates.Thus, if σ contains <, then the 1-type over σ contains the literals x = x and ¬x < x, with similar restrictions applying to 2-types.Likewise, if σ contains t, then any 2-type containing the literals t(x, y) and t(y, x) also contains t(x, x) and t(y, y).We usually identify 1-and 2-types with the conjunction of their literals.If A is a structure and a, b ∈ A, we write tp A [a] for the unique 1-type satisfied in A by a and tp A [a, b] for the unique 2-type satisfied by a, b .
A formula ϕ of L 2 (or of L 2 1PO or L 2 1T) is said to be in standard normal form if it conforms to the pattern where η, θ 0 , . . ., θ m−1 are quantifier-and equality-free formulas, with m ≥ 1.
A formula is said to be in weak normal form if it conforms to the pattern where Z is a finite set of unary quantifier-and equality-free formulas and the other components are as in (1).We refer to the parameter m in both ( 1) and ( 2) as the multiplicity of ϕ.
The following basic fact about L 2 goes back, essentially, to [13], and is widely used in studies of L 2 and its variants [2,Lemma 8.1.2].Remembering our general assumption that all structures have cardinality at least 2, we have: Obviously, Lemma 1 applies without change to L 2 1PO and L 2 1PO u .Under our general restriction to structures with at least 2 elements, ∃x.ζ is logically equivalent to ∀x∃y(x = y ∧ (ζ ∨ ζ(y))).Hence any formula in weak normal form can be converted, in polynomial time, to a logically equivalent one in standard normal form.However, this process increases the multiplicity of the formula in question: in the sequel, we shall sometimes need (2) in full generality, in order to obtain finer control over this parameter.

Unary two-variable logic with one partial order
The purpose of this section is to show that the logic L 2 1PO u has the doubly exponential-sized finite model property (Theorem 25): if ϕ is a finitely satisfiable L 2 1PO u -formula, then ϕ has a model of size bounded by some fixed doubly exponential function of ϕ .It follows that the finite satisfiability problem for All structures in this section interpret a signature of unary predicates, together with the distinguished predicate <.To make reading easier, we typically write x > y for y < x and x ∼ y for ¬(x = y ∨ x < y ∨ y < x).
In practice, we will simply treat the symbols > and ∼ as if they were binary predicates (subject to the obvious constraints on their interpretations).With this concession to informality, we see that, in the logics L 2 1PO and L 2 1PO u , any pair of distinct elements of a structure satisfies exactly one of the atomic formulas x < y, x > y or x ∼ y.Where a structure A is clear from context, we typically do not distinguish between the predicate < and its interpretation in A, writing a < b to mean a, b ∈< A ; similarly for >, ∼ and =.We sometimes refer to the distinguished predicates t, <, >, ∼ and = as navigational predicates.(The allusion here is to the terminology employed in XPATH.)A predicate that is not navigational is called ordinary.A formula is navigation-free if it contains no navigational predicates.A formula is said to be pure Boolean if it is quantifier-, and navigation-free-i.e. if it is a Boolean combination of literals featuring ordinary predicates.Notice that all 1-types contain the conjuncts ¬x < x and x = x, and hence are not, technically speaking, pure Boolean formulas.However, they are of course logically equivalent to the pure Boolean formulas obtained by deleting all navigational conjuncts.

Basic formulas
Structures interpreting L 2 1PO u -formulas have a very simple form, and it will be convenient to diverge slightly from standard model-theoretic terminology when discussing them.(Remember, all structures are taken to have cardinality at least 2 in this paper.)Let Π be a fixed set of 1-types over some unary signature σ.A typed partial order (over Π) is a triple A = (X, <, tp), where X is a set of cardinality at least 2, < a partial order on X, and tp : X → Π a function.We can regard A as a structure interpreting L 2 1PO u -formulas in the obvious way; and it is evident that all structures interpreting L 2 1PO u -formulas can be regarded as typed partial orders over some set of 1-types.This is what we shall do in the sequel, therefore.If A = (X, <, tp) is a typed partial order and a ∈ X, we call a maximal if it a largest element of its 1-type, i.e. there exists no a ′ such that tp(a ′ ) = tp(a) and a < a ′ ; similarly, mutatis mutandis, for minimal.We call a extremal if it is either maximal or minimal.
We begin by establishing a stronger normal form theorem for L 2 1PO u .We call a formula basic if it has one of the forms where α and β are distinct 1-types and µ is a unary pure Boolean formula.We typically use the variable ψ to range over basic formulas and Ψ to range over finite sets of basic formulas.Formulas of the forms (B3) and (B5b) receive special treatment in the sequel, and will be referred to-for reasons that will become evident-as factor-controllable formulas.If Ψ is any finite set of basic formulas, we denote by FC(Ψ) the set of factor-controllable formulas in Ψ.

Factorizations
The following notion will play a crucial role in the sequel.Let A = (X, <, tp) be a typed partial order.A factorization of A is a pair B = (B, ≪), where B is a partition of X, and ≪ is a partial order on B satisfying: We refer to the elements of B as blocks, and to the ordering ≪ as the block ordering (in contradistinction to the element ordering <).Notice that, if |B| ≥ 2, the triple (B, ≪, tp) is itself a typed partial order.If tp(B) = α, we call B an α-block.We say that a block B is of type α ∨ β if it is either of type α or of type β, and we call B an (α ∨ β)-block.
In the context of a factorization (B, ≪), we use A ≫ B as an alternative to B ≪ A. If A and B are blocks, we write A ≈ B to mean that A and B are distinct and neither A ≪ B nor B ≪ A. Thus, ≈ stands in the same relation to ≪ as ∼ does to <.Note that, if A ≈ B, it is possible for there to be a, a ′ ∈ A and b, b ′ ∈ B such that a < b and a ′ > b ′ .A block B is maximal if there exists no block B ′ such that tp(B) = tp(B ′ ) and B ≪ B ′ ; similarly for minimal.A block is extremal if it is either maximal or minimal.We denote the set of extremal blocks of B by B × .
Thus, a factorization of a typed partial order is an organization of its elements into blocks of uniform type, with a partial order on the blocks such that all blocks of a given type are linearly ordered, and, such that, whenever one block is less than another in the block ordering, every element of the first block is less than every element of the second in the element ordering.Fig. 2 shows a factorization of a finite typed partial order over 1types π 1 , . . ., π N , depicted as an acyclic directed graph: the block order ≪ is the transitive closure of the edges; extremal blocks are marked with thick boundaries.The shaded blocks and the line marked χ will be explained in Sec.3.3.It is important to realize that the factorization (B, ≪) does not determine the partial order (X, <).Indeed, any typed partial order A has a factorization, namely, the trivial factorization in which the blocks are simply the non-empty sets {a ∈ X | tp(a) = π} for π ∈ Π, and the block-order is empty.The next two lemmas show that we can generally find more informative factorizations than this.Recall in this context that a factor-controllable basic formula is one of either of the forms (B3) or (B5b).

Lemma 3.
Let A be a typed partial order over a set of types Π, with α, β ∈ Π distinct.Suppose B is a factorization of A in which every block of type α lies below every block of type β in the block order.Then the formula (B3), namely ∀x(α(x) → ∀y(β(y) → x < y)), If the typed partial order A is clear from context, and B is a factorization of A, we write B |= ∀x(α(x) → ∀y(β(y) → x < y)) to mean that every block of type α is less than every block of type β in the block order.The motivation for this notation should be obvious from Lemma 3.

Lemma 4.
Let A be a typed partial order over a set of types Π, with α, β ∈ Π distinct.Suppose B is a factorization of A in which the set of blocks of type α ∨ β is linearly ordered.Then the formula (B5b), namely To show that B = (B, ≪) has the desired properties, we first observe that, if A is an α-block and B a β-block, then A ≪ B if and only if, for all a ∈ A and b ∈ B, a < b.Now suppose that A and A ′ are distinct α-blocks.Let b 0 be some element such that there exist a 0 ∈ A and a 1 ∈ A ′ such that either a 0 < b 0 < a 1 or a 1 < b 0 < a 0 .In the former case, a < a ′ for all a ∈ A and a ′ ∈ A ′ ; and in the latter, a > a ′ for all a ∈ A and a ′ ∈ A ′ .Similar remarks apply to β-blocks.Thus, for any (α ∨ β)-blocks C and D, C ≪ D if and only if, for all c ∈ C and d ∈ D, c < d.It follows that ≪ is a partial order in which the collection of (α ∨ β)-blocks is linearly ordered.Therefore, the collection of α-blocks and the collection of β-blocks are also both linearly ordered.For γ ∈ Π \ {α, β}, there is at most one γ-block.That is, (B, ≪) is a factorization of A.
If the typed partial order A is clear from context, and B is a factorization of A, we write B |= ∀x(α(x) → ∀y(β(y) → (x < y ∨ x > y)) to mean that the set of blocks of type α ∨ β is linearly ordered.The motivation for this notation should be obvious from Lemma 4.
Suppose A is a typed partial order and

Lemma 5. Any two factorizations of a typed partial order have a common refinement.
Proof.Let B 1 = (B 1 , ≪ 1 ) and B 2 = (B 2 , ≪ 2 ) be factorizations of the typed partial order A. Define B = (B, ≪) as follows: let and let ≪ be the transitive closure of the relation A simple induction shows that, if A is related to B by ≪ then, for all a ∈ A and all b ∈ B, a < b.It follows that ≪ is irreflexive and hence is a partial order.It is thus immediate from the definition of ≪ that the partially ordered set B = (B, ≪) is a factorization of A and moreover that it is a refinement of both B 1 and B 2 .
Refinements of block orders are useful because they preserve the properties featured in Lemmas 3 and 4. The following Lemma is immediate.Lemma 6.Let A be a typed partial order and B, B ′ factorizations of A with A unit block of B is a block containing exactly one element of A. Trivially, every unit block is linearly ordered by <.We say that B is unitary if every block of B which is linearly ordered by < is a unit block.Combining all of the above lemmas, we have: Lemma 7. Let A be a typed partial order and Ψ a finite set of basic formulas such that A |= Ψ.Then there is a unitary factorization B of A such that B |= FC(Ψ).
Proof.For each ψ ∈ FC(Ψ), we apply Lemmas 3 or 4 as appropriate, and take a common refinement of all the resulting factorizations by Lemma 5. Now further refine by replacing all linearly ordered blocks with unit blocks having the obvious block order.The result then follows by Lemma 6.
Let A = (X, <, tp) be a typed partial order and B = (B, ≪) a factorization of A. We have already observed that B does not contain all the information required to reconstruct the element order <.However, it very nearly does, in a sense that we can make precise.Let us first overload the block-order ≪ by writing for all a, b ∈ X, a ≪ b if there exist A, B ∈ B such that a ∈ A, b ∈ B and A ≪ B. We might call ≪ the inter-block order on X.It is obvious that the inter-block order is a partial order, and, from (B3), that it is contained in the element order <.Now, for all a, b ∈ X, write a < 0 b if a < b, and both a and b belong to the same block of B. Again, this is clearly a partial order: we call it the intra-block order.Finally, define a < × b if a < b, and both a and b are both extremal elements of (X, <); once again, < × is clearly a partial order: we call it the extremal order.Now define the binary relation ⋖ on X to be the transitive closure of (≪ ∪ < 0 ∪ < × ).It is obvious that ⋖ is a partial order no stronger than (i.e.included in) <, but that, nevertheless, B is a factorization of the typed partial order (X, ⋖, tp).It is also obvious that, when restricted to elements of some fixed 1-type π, < and ⋖ coincide.We say that A is thin over B if < and ⋖ coincide over the whole of X. Lemma 8. Suppose A = (X, <, tp) is a finite typed partial order and Ψ a set of basic formulas such that A |= Ψ.Let B be a factorization of A such that B |= FC(Ψ).Then there exists a typed partial order Ȧ over the domain X such that B is a factorization of Ȧ, Ȧ |= Ψ, and Ȧ is thin over B.
(B5a): When restricted to elements of some fixed type, < and ⋖ coincide.
(B6): Suppose that a ∈ X is of type α.Since < and ⋖ coincide on elements of some fixed type, let a * be a maximal element of type α such that either a = a * or a < a * (equivalently: a = a * or a ⋖ a * ).But A |= ψ, so there exists an element b satisfying µ-say of type β = α-such that a * < b, and hence a maximal element b * of type (B7): Similar to (B6).

Reducing the number of blocks
For any cut χ, and any 1-type π, a a minimal π-block above χ is a block A minimal block above χ is a minimal π-block above χ for some π.The notion of maximal (π)-block below χ is defined analogously.Denote by F + (χ) the set of minimal blocks above χ, and by F − (χ) the set of maximal blocks below χ.Note that F + (χ) contains at most one block of each type, and similarly for If χ and χ ′ are cuts of B, with χ below χ ′ , we say that χ and χ ′ are equivalent if there exists a function f : F (χ) → F (χ ′ ) satisfying the following conditions; (E1): ) is a typed partial order isomorphism, i.e., f is 1-1 and onto, for all B ∈ F (χ), tp(B) = tp(f (B)), and for all A, B ∈ F (χ), and Suppose χ and χ ′ are equivalent cuts, with χ ′ above χ.Obviously, no extremal block can lie between χ and χ ′ .For example, if A is minimal, then Denote by B * the pair (B * , ≪ * ).Let X * = B * , and let tp * be the restriction of the function tp to X * .Noting that B × ⊆ B * , we see that the extremal order < × is defined on X * .Let < * 0 be the restriction of the intra-block order < 0 to X * .As before, we overload the symbol ≪ * so that it denotes the inter-block order on X * under B * : a ≪ * b if the blocks A, B ∈ B * such that a ∈ A, b ∈ B satisfy A ≪ * B. (Note that ≪ * is not in general equal to the restriction to X * of the inter-block order on X under B.) Finally, let < * be the transitive closure of (≪ * ∪ < * 0 ∪ < × ).We denote by A * the triple (X * , < * , tp * ).
For Lemmas 9-14, we keep A, B, χ and χ ′ fixed, with B * and A * as defined above.Proof.The first assertion is immediate from the fact that ≪ * is the transitive closure of three relations all contained in ≪.For the second assertion, observe first that, if there are no α-blocks below χ or above χ ′ , the result is immediate; hence we may assume otherwise.It suffices to show that, if Proof.We may assume that there exist α-blocks and β-blocks, for otherwise the lemma is trivial.Since χ and χ ′ are equivalent, either all α-blocks of B are below χ, and there are both αand β-blocks below χ ′ , or all β-blocks are above χ ′ , and there are both αand β-blocks above χ.The result then follows from the definition of ≪ * .Lemma 13.If the blocks of type (α ∨ β) are linearly ordered in B, then the blocks of this type are linearly ordered in B * .
Proof.It suffices to show that, if A is the maximal (α ∨ β)-block below χ, and B ′ the minimal (α ∨ β) block above χ ′ , then A ≪ * B ′ .Let B be the minimal (α ∨ β)-block above χ.Since χ and χ ′ are equivalent, B and B ′ must be of the same type, so Assume, for definiteness, that A lies below χ.Let β = tp(b) = tp(B 0 ), and let B be the minimal β-block above χ.We remark that β = α: for if a and b are of the same 1-type, then they must be in the same block of B, contradicting the supposition that B 0 is not in B * .We claim that A ≈ B. For either B = B 0 or B ≪ B 0 , and certainly A ≈ B 0 , so that A ≪ B; on the other hand no block B above χ satisfies B ≪ A, which proves the claim.Now let B ′ be the minimal β-block above χ ′ , so that f χ,χ ′ (B) = B ′ .Since no extremal block can lie between the equivalent cuts χ and χ ′ , B is not extremal; hence B ′ is not extremal, by (E1) and the fact that f χ,χ ′ is injective.We claim that A ≈ * B ′ .Certainly, B ′ ≪ * A, so it suffices to suppose A ≪ * B ′ , and derive a contradiction.By the construction of ≪ * , there exist But then A ≪ B, which is the desired contradiction (see Fig. 3).
Recall now that B ′ is not extremal, and that a ∈ A, b ∈ B 0 with a ∼ b.Pick any b ′ ∈ B ′ .From a ∼ b and B ≪ B ′ , we know that b ′ < a, whence, by Lemma 10, b ′ < * a.So suppose, for contradiction, that a < * b ′ .By the definition of < * , there exists a sequence a = a 0 , . . ., a m = b such that, for all i (0 ≤ i < m), the pair a i , a i+1 is in (≪ * ∪ < * 0 ∪ < × ).But we already know that A ≈ * B ′ , so there must be some ℓ (0 ≤ ℓ < m) such that a ℓ < × a ℓ+1 .Take the largest such value of ℓ, and let C be the block containing a ℓ+1 .Thus, C is extremal, and indeed, since B ′ is non-extremal, we have ℓ < m − 1, and C ≪ * B ′ , whence C ≪ B ′ by Lemma 9.By the fact that B ′ = f χ,χ (B), and C is extremal, we have C ≪ B and hence C ≪ B 0 .On the other hand, a < a ℓ+1 ∈ C, contradicting the fact that a ∼ b.Thus, a ∼ * b ′ , as required.The case where A lies above χ ′ proceeds similarly.
Lemma 15.Let Ψ be a conjunction of basic formulas, and suppose A is a typed partial order such that A |= Ψ.Let B be a factorization of A such that B |= FC(Ψ), and suppose χ, χ ′ are equivalent cuts in B.
Lemmas Since the frontier of any cut is at most exponential in size, there can be at most doubly exponentially many cuts in B m , and hence at most doubly exponentially many blocks in B m .This proves the lemma.

Reducing the size of blocks
With Lemma 16, we have established that, if a collection Ψ of basic formulas has a finite model, then it has a finite model A with a small factorization B, such that B guarantees the truth of all factor-controllable members of Ψ, and A is thin over B. However, while the number of the blocks in B was bounded by a doubly exponential function of the size of the signature of Ψ, nothing at all was said about their size.In this section we show that the blocks themselves can bounded in size.Fix some finite typed partial order A = (X, <, tp) with unitary factorization B = (B, ≪), such that A is thin over B. Let us suppose that, for some finite set Ψ of basic formulas, A |= Ψ and B |= FC(Ψ).Our strategy in the sequel will be to divide up the blocks of B into sub-blocks, and then to replace each sub-block by a set of either one or two elements, imposing a partial order on these elements which secures satisfaction of Ψ.The difficulty is that, in reducing the size of each block, we are in danger of creating connections between elements arising from previously unrelated blocks, and in particular of creating unwanted cycles in the partial order we are trying to define.A sub-block will be replaced by a singleton if the block that includes it is itself is a unit block; otherwise, it will be replaced by a pair of incomparable elements.The assumption that A is thin over B underpins an inductive argument in Lemma 17 crucial in showing that the order we eventually define contains no cycles.The assumption that B is unitary rules out the possibility that some sub-block is made to contain a pair of incomparable elements when the including block is required to be linearly ordered-in particular, if Ψ contains a basic formula of type (B5a).
For a ∈ X, and B ∈ B, we say that B is below a if there exists b ∈ B such that b < a; similarly, we say that B is above a if there exists b ∈ B such that a < b.Notice that, if a ∈ B, we may have B above and indeed also below a.We define the sub-type of a to be the triple B − , B, B + , where B is the block containing a, B − is the set of blocks below a and B + the set of blocks above a.A sub-block is a maximal set s of elements all having the same sub-type.We write tp(s) = tp(B).Thus, each block is partitioned into a finite number of sub-blocks, and all elements of a sub-block s have 1-type tp(s).If s and t are sub-blocks contained in the respective blocks A and B, and A ≪ B, we write s ≪ t.
Lemma 17.Let a, b ∈ X with a < b.Let the sub-type of a be s = A − , A, A + and the sub-type of b be t = B − , B, B + , where s = t.Then (i) A − ⊆ B − ; (ii) A + ⊇ B + ; and (iii) {A} ∪ A + ⊇ {B} ∪ B + .Furthermore, at least one of these inclusions is strict.
Proof.The inclusions themselves are immediate.To show strictness, therefore, since A is thin over B, it evidently suffices to prove the result in the cases where one of a < 0 b, a ≪ b or a < × b holds.If a < 0 b, then A = B, and strictness of either (i) or (ii) follows from the assumption s = t.If a ≪ b, then A ≪ B, and hence A ∈ B + , since there certainly cannot exist a ′ ∈ A with b < a ′ .Hence, inclusion (iii) is strict.Suppose, then that a < × b, so that A = B, and a is either a maximal α-element or a minimal α-element, where α = tp(a).If the former, then, since a < b, we again have A ∈ B + , so that inclusion (iii) is strict.If the latter, then A ∈ A − , so inclusion (i) is strict.
For every sub-block s, let ŝ = {ŝ(0), ŝ(1)}, where ŝ(0) and ŝ(1) are some objects.If s is contained in (and hence is equal to) a unit block, we set ŝ(0) = ŝ(1); otherwise, we set ŝ(0) = ŝ(1).Thus, each ŝ has cardinality either 1 or 2. We call objects of the form ŝ(0) left-objects, and those of the form ŝ(1) right-objects.For s = t, we insist that ŝ ∩ t = ∅. For Note that, when sub-blocks s and t contain elements related by <, we relate the corresponding left-objects and the corresponding right-objects by r ∃ ; however, unless either of s or t has cardinality 1, we do not relate leftobjects to right-objects via r ∃ or vice versa.On the other hand, if the block order B enforces an ordering between the elements of s and t, we relate all elements of ŝ to all elements of t via r ∀ .The idea is to keep left-hand elements from being related to right-hand elements by ≺ wherever possible.
Lemma 18.If c ∈ ŝ, d ∈ t and c ≺ d, then ŝ = t.Hence, ≺ is a partial order on X.
Proof.Suppose c = c 0 , . . ., c m = d is a sequence of elements of X, where c i , c i+1 ∈ r ∃ ∪ r ∀ for all i (0 ≤ i < m).For all i (0 ≤ i ≤ m), let c i ⊆ ŝi , and let A − i , A i , A + i be the sub-type defining the sub-block s i .It is immediate from Lemma 17 that this sequence of sub-types cannot contain repeated elements.It immediately follows that ≺ is irreflexive.
Define the function tp on X by setting tp(ŝ(i)) = tp(s) for every sub-block s and every i ∈ {0, 1}.Now define Â to be the typed partial order ( X, ≺, tp).Note that, if B ∈ B, the 1-type tp(ŝ(i)) is constant for all ŝ(i) ∈ B; we denote this value by tp( B).Finally, we define a partial order on B by setting Â B just in case A ≪ B, and define B = ( B, ).The number of sub-types is bounded by |B| 2N +1 , where N is the number of 1-types.To see this, notice that, since blocks of any given type are linearly ordered, the sets B − and B + are each specified by a sequence of at most N blocks.At the same time, Thus, Â does not violate our general restriction to structures of cardinality at least 2. We now prove a sequence of lemmas culminating in Lemma 24, which states that Â |= Ψ. Proof.We may suppose c = c 0 , . . ., c m = d are elements of X such that (c i , c i+1 ) ∈ r ∃ ∪ r ∀ for all i (0 ≤ i < m).We establish (i) by induction on m.If m = 1, from the definition of r ∃ and r ∀ , there exist a ∈ s and b ∈ t ⊆ B such that a < b.Since s is a sub-block, for all a ∈ s, there exists b ∈ B such that a < b.If m > 1, suppose the result holds for c, d joined by shorter sequences.Let c 1 ∈ ŝ1 .From the definition of r ∃ and r ∀ , there exist a ∈ s and a ′ ∈ s 1 such that a < a ′ .By inductive hypothesis, there exists b ∈ B such that a ′ < b, whence a < b.Since s is a sub-block, for all a ∈ s, there exists b ∈ B such that a < b.The proof of (ii) is similar.Proof.Assume without loss of generality that c = ŝ(0) is a left-element.We claim that d = t(1) is incomparable to c.For suppose c ≺ d.Then there is a sequence c = c 0 , . . ., c m = d of elements of X such that (c i , c i+1 ) ∈ r ∃ ∪ r ∀ for all i (0 ≤ i < m).Let c i ∈ ŝi and s i ⊆ A i for all i.Since c is a left-element and d is a right element, either A i is a unit block for some i (0

Two-variable logic with one partial order
The purpose of this section is to show that the logic L 2 1PO has the doubly exponential-sized finite model property (Theorem 30): if ϕ is a finitely satisfiable L 2 1PO-formula, then ϕ has a model of size bounded by some fixed doubly exponential function of ϕ .It follows that the finite satisfiability problem for L 2 1PO is in 2-NEXPTIME.We proceed by reduction to the corresponding problem for weak normal-form L 2 1PO u -formulas, paying particular attention to the size of the relevant signature, and the multiplicities of the formulas in question.In this section, we continue to assume that all signatures contain the navigational predicates <, > and ∼, subject to the usual semantic constraints.We use the (possibly decorated) variable τ to range over 2-types, λ, µ, ν over unary pure Boolean formulas and ζ, η, θ, ϕ, χ, ψ, ω over arbitrary formulas.Henceforth, for any integer n, we denote by ⌊n⌋ the value n modulo 3. A crucial step in our reduction is the definition of a specialized normal form for L 2 1PO-formulas, from which it is easy to eliminate ordinary binary predicates.Say that an L 2 1PO-formula is in spread normal form if it conforms to the pattern where: (i) Z is a set of unary pure Boolean formulas; (ii) η, θ 0 , . . ., θ m−1 are quantifier-and equality-free formulas, with m ≥ 1; and (iii) λ 0 , λ 1 , λ 2 are mutually exclusive unary pure Boolean formulas; and (iv) µ 0 , . . ., µ m−1 are mutually exclusive unary pure Boolean formulas.Spread normal form ismodulo insertion of harmless conjuncts x = y-a special case of weak normal form (2). We take the multiplicity of the spread normal form formula (7) to be the quantity 3m.(Thus, the definitions of multiplicity for spread normal form and weak normal form agree.) Its distinguishing feature is that witnesses are required to be 'spread' over disjoint sets of elements.Thus, suppose A is a model of the formula (7), and A |= λ k [a] for some a ∈ A and some k (0 ≤ k < 3).Then there exist b 0 , . . ., b m−1 ∈ A such that, for each h It follows that the b 0 , . . ., b m−1 are distinct; moreover, all of these elements satisfy λ ⌊k+1⌋ (y), so that their witnesses, which satisfy λ ⌊k+2⌋ (y), cannot include a.Thus, the witnesses for an element of A are never duplicated, and nothing is a witness of a witness of itself.
In order to transform L 2 1PO-formulas into spread normal form, we must first establish a lemma allowing us to create copies of certain parts of structures without compromising the truth of those formulas.If A is any structure interpreting a signature σ, we call any element of a a king if it is the unique element of A realizing its 1-type (over σ): Elements which are kings are said to be royal.The following lemma says that we may duplicate the non-royal elements of any structure any (finite) number of times.
Lemma 26.Let A 1 be a structure over domain A 1 , A 0 the set of kings of A 1 , and B 1 = A 1 \ A 0 .There exists a family of sets {B i } i≥2 , pairwise disjoint and disjoint from A 1 , a family of bijections {f i } i≥2 , where f i : B i → B 1 , and

and all 2-types realized in
(iv) < Ai is a partial order.
Proof.Enumerate B 1 as {a 1 , a 2 , a 3 , . . .}.Let the set of indices of this enumeration (which may be finite or infinite) be K.
We prove the lemma by induction on i.The base case, i = 1, is vacuous.Observe that the domain of A 1 is the disjoint union of A 0 and B 1 , and define the bijection f 1 : B 1 → B 1 to be the identity map.For the inductive case, suppose the sets A i−1 , B i , the structure A i , and the bijection f i : B i → B 1 have been defined, such that the domain A i of A i is the disjoint union of A i and B i , and Statements (i)-(iv) hold whenever i ≥ 2. We proceed to define A i+1 , B i+1 , A i+1 and f i+1 , and establish the corresponding properties for these objects.
The definition employs a subsidiary induction.Let A 1 i = A i and A 1 i = A i .We shall construct a sequence of structures {A k i } k∈K over the corresponding sequence of domains {A k i } k∈K .Assume that A k i has been defined over domain A k i and k + 1 ∈ K. Let a k i+1 be a new element (not in A k i ), and let (The indexing reflects the intuition that a k i+1 will form the kth new element in the structure A i+1 when this is completed.)We extend A k i to a structure A k+1 i over A k+1 i by setting: From the fact that tp Intuitively, A i+1 is just like A i except that we have added an extra copy of the set B 1 , relating the new elements to each other and to A i as specified by A 1 .Define the bijection f i+1 : B i+1 → B 1 by setting f i+1 (a k i+1 ) = a k for all k ∈ K.We need to secure Statements (i)-(iv) of the lemma, but with i replaced by i + 1.For Statement (i), it is immediate by construction that A i ⊆ A i+1 and from ( 9) and (10), via a subsidiary induction on k, we see that A i+1 realizes only those 2-types realized in A i , and hence, by inductive hypothesis, in A 1 .For Statement (ii), it follows from (10), again via a subsidiary induction on k, that, for all a ∈ B i+1 and all For Statement (iii), we consider separately the cases j = i + 1 and j ≤ i.The former is the simpler: observe that, for k, ℓ ∈ K with k < ℓ, tp This secures Statement (iii) for the case j = i + 1.The case 2 ≤ j ≤ i is illustrated in Fig. 4. Writing a ′ = f i+1 (a), by statement (ii) of the inductive hypothesis, if Turning to Statement (iv), it follows from (8) that < A k i+1 is not reflexive.We claim that, in addition, this relation is transitive.It evidently suffices to show that if < A k i is a transitive relation, then so is < A k+1 i .Suppose, therefore that < A k i is transitive, and let a, b, c be elements of .Hence, we may assume that the elements a, b and c are distinct, and that exactly one of them is equal to a k i+1 .We therefore have three cases to consider.
Case 1: a k i+1 = a.We claim first of all that c = a k .For suppose c = a k = b.
Case 3: a k i+1 = c.The same as Case 1, but with the order reversed.
This completes the induction.
We now come to the lemma allowing us to transform any L 2 1PO-formula in standard normal form into one in spread normal form.We require some additional notation.Let p = p 1 , . . ., p n be a sequence of unary predicates.For all i (0 ≤ i < 2 n ), we abbreviate by p i the unary, pure Boolean formula ρ 1 ∧ • • • ∧ ρ n , where, for all j (1 ≤ j ≤ n), ρ j is p j (x) if the jth bit in the n-digit binary representation of i is 1, and ¬p j (x) otherwise.We call p i (x) the ith labelling formula (over p 1 , . . ., p n ).Evidently, if A = {a 0 , . . ., a M−1 } is a set of cardinality M ≤ 2 n , then we can interpret the predicates in p j (1 ≤ j ≤ n) over A so as to ensure that, for all i (0 ≤ i < M ), a i satisfies p i .Lemma 27.Let ϕ be an L 2 1PO-formula in standard normal form over a signature σ, having multiplicity m.There exists a formula ϕ * in spread normal form over a signature σ * with the following properties: (i) |= ϕ * → ϕ; (ii) if ϕ has a (finite) model then so has ϕ * ; and (iii) |σ * | is polynomially bounded as a function of |σ| + m, and ϕ * has multiplicity 3m.
Suppose A 1 |= ϕ, and let A 0 be the set of kings of A 1 .By taking A 1 to interpret two fresh unary predicates if necessary, we may assume |A 0 | ≥ 2. Let B 1 = A 1 \ A 0 and let f 1 : B 1 → B 1 be the identity map.Now take {B i } i≥2 , {f i } i≥2 and {A i } i≥2 to be the series of sets, bijections and structures guaranteed by Lemma 26.Let A = A 3m ; thus, A is finite if A 1 is.Finally, re-index the sets B 1 , . . ., B 3m (in any order whatever) as B h,k , where 0 ≤ h < m and 0 ≤ k < 3; and re-index the f 1 , . . ., f 3m correspondingly asf h,k .
For each a ∈ A 0 and each h (0 and let C 0 consist of the elements of A 0 together with all of the (at most m • |A 0 |) elements thus selected.We refer to C 0 as the court of A. Let us enumerate A 0 as c 0 , . . ., c S−1 and the rest of C 0 as c S , . . ., c T −1 .Thus, 0 ≤ S ≤ T ≤ (m + 1)2 |σ| .Let t = ⌈log(T + 1)⌉, and let q 1 , . . ., q t be new unary predicates.Writing q i for the ith labelling formula over q 1 , . . ., q t , let A be expanded to a structure A ′ such that, for all i (0 ≤ i < T ), Thus, under the interpretation A ′ , for 0 ≤ i < S, we may read q i (x) as "x is the ith king;" and for 0 ≤ i < T , we may read q i as "x is the ith member of the court."(Hence, the kings come before the non-royal courtiers in the numbering.)Now let χ be the formula and ψ 1 the formula Conversely, in any model of χ ∧ ψ 1 , we see that for all h (0 ≤ h < m) and for any element a satisfying p i for some i (0 ≤ i < S), there exists b = a such that the pair a, b satisfies θ h .
Let s = ⌈log(S + 1)⌉.For each h (0 ≤ h < m), let q h 1 , . . ., q h s be new unary predicates, and write qh i (x) for the ith labelling formula over these predicates.Expand A ′ to a model A ′′ as follows.For each a ∈ A \ A 0 , and each h (0 ≤ h < m), if there exists any b ∈ A 0 such that A |= θ h [a, b], choose some such element, say, c i (with i depending on a and h), and interpret the predicates q h 1 , . . ., q h s so that A ′′ |= qh i [a]; otherwise, interpret the predicates q h 1 , . . ., q h s so that A ′′ |= qh S [a].Thus, under the interpretation A ′′ , for 0 ≤ i < S, we may read qh i (x) as "x is an element such that the ith king provides a θ h -witness for x." Now let ψ 2 be the formula recording this fact.Obviously, A ′′ |= ψ 2 .Conversely, in any model of χ ∧ ψ 2 , we see that for all h (0 ≤ h < m), and all elements a satisfying qh i (x) for some i (0 ≤ i < S), there exists b = a such that the pair a, b satisfies θ h .Finally, let o 0 , o 1 , o 2 and p 0 , . . ., p m−1 be new unary predicates, and expand A ′′ to a structure A ′′′ by setting Thus, we may read o k (x) as "x is in B h,k for some h", and . Thus, λ 0 , λ 1 , λ 2 are mutually exclusive pure unary formulas.Similarly, let µ h (x) = q h (x) ∧ h−1 h ′ =0 ¬q h ′ (x) for all h (0 ≤ h < m).Thus, µ 0 , . . ., µ m−1 are also mutually exclusive unary pure Boolean formulas.Now let ψ 3 be the formula which, we note, is equivalent (over structures with cardinality at least 2) to ∀x It is immediate by construction that A ′′′ |= ψ 3 , since every a ∈ A 0 satisfies q i (x) for some i (0 ≤ i < S), and every a ∈ A \ A 0 lies in one of the sets B h,k .In addition, let θ * h (x, y) be the formula for all h (0 ≤ h < m), and let ω be the formula We claim that A ′′′ |= ω.To see this, fix 0 ≤ h < m and 0 ≤ k < 3, and suppose for some i (0 ≤ i < S), then we may pick any element b ∈ B h,⌊k+1⌋ as a witness, since Therefore, A ′′′ |= ω as claimed.Conversely, in any model of ω, we see that for all h (0 ≤ h < m) and all elements a satisfying λ k (x) but not satisfying qh i (x) for any i (0 ≤ i < S), there exists some b = a such that the pair a, b satisfies θ h .
Finally, let ϕ * be the formula and let σ * be the signature of ψ * .Thus, ϕ * is in spread form, with multiplicity 3m.Moreover, the only new predicates in σ * are o 0 , o 1 , o 2 , p 0 , . . ., p m−1 , q 1 , . . .q t , and the q h 1 , . . .q h s (0 ≤ h < m), so that |σ * | is bounded by a polynomial function of |σ| + m.Moreover, we have shown that, if A |= ϕ, then A ′′′ |= ϕ * , and, moreover, In the sequel, we employ terminology and techniques familiar from the area of automated theorem proving.In particular, a a clause is a disjunction (possibly empty) of literals.The empty disjunction is written as ⊥, and is taken to denote the falsum.We use (possibly decorated) lower-case Greek letters γ, δ, ǫ to range over clauses, and upper-case Greek letters Γ, ∆ to range over finite sets of clauses.If Γ is a finite set of clauses, then we denote by Γ −1 the result of transposing the variables x and y in Γ.To avoid notational clutter, we frequently identify a finite set of clauses with its conjunction, writing, for example, Γ when we actually mean Γ.It is a familiar fact that, for any quantifier-free formula ϕ over relational signature, there exists a collection of clauses Γ such that |= ϕ ↔ Γ (so-called conjunctive normal form).In general |Γ| will be exponential in ϕ ; however, Γ and ϕ employ the same signature.
Let ρ be an ordinary atomic formula featuring two distinct variablesi.e. a formula of either of the forms r(x, y) or r(y, x), where r is an ordinary binary predicate, and let γ ′ , δ ′ be clauses.Then, γ = ρ ∨ γ ′ and δ = ¬ρ ∨ δ ′ are also clauses, as indeed is γ ′ ∨ δ ′ .In that case, we call γ ′ ∨ δ ′ an ordinary binary resolvent of γ and δ, and we say that γ ′ ∨ δ ′ is obtained by ordinary binary resolution from γ and δ on ρ, or simply: γ and δ resolve to form γ ′ ∨ δ ′ .Note that no unification of variables occurs in ordinary binary resolution: in fact, ordinary binary resolution is just the familiar rule of propositional resolution restricted to the case where the resolved-on atom is of the form r(x, y) or r(y, x), with r an ordinary binary predicate.Observe that: (i) if γ and δ resolve to form ǫ, then |= γ ∧ δ → ǫ; (ii) the ordinary binary resolvent of two clauses may or may not involve ordinary binary predicates; (iii) if the clause γ involves no ordinary binary predicates, then it cannot undergo ordinary binary resolution at all.
If Γ is a set of clauses, denote by [Γ] * the smallest set of clauses including Γ and closed under ordinary binary resolution, in the sense that, if γ, δ ∈ [Γ] * , and ǫ is an ordinary binary resolvent of γ and δ, then ǫ ∈ [Γ] * .We further denote by [Γ] • the result of deleting from [Γ] * any clause involving an atom r(x, y) or r(y, x), where r is an ordinary binary predicate.Notice, incidentally, that [Γ] • may feature ordinary binary predicates: however, all occurrences of these must be in atoms of the forms r(x, x) or r(y, y).
This last observation prompts the introduction of some additional notation and terminology that will be used in the next lemma.Call a literal diagonal if it is of the form ±r(u, u), where r is a binary predicate and u a variable.Let σ be a relational signature and σ ′ ⊆ σ such that σ \ σ ′ consists only of binary predicates.A semi-diagonal 2-type over (σ, σ ′ ) is a maximal consistent set of literals over σ each one of which is either a literal over σ ′ or a diagonal literal.The following lemma, which will form the core of our reduction of FinSat(L 2 1PO) to FinSat(L 2 1PO u ), is, in effect, nothing more than the familiar completeness theorem for (ordered) propositional resolution.
The next lemma allows us to eliminate atoms of the forms r(x, y) and r(y, x), where r is an ordinary binary predicate, from spread-form L 2 1POformulas.Recall that, if Γ is a finite set of clauses, Γ −1 denotes the result of transposing the variables x and y in Γ.
Proof.It is immediate that |= ϕ → ϕ • , by the validity of resolution.Now suppose A is a structure such that A |= ϕ • ; we define a structure A ′ over the same domain as A, such that A |= ϕ.Fix a ∈ A and h (0 ≤ h < m).If a satisfies one (hence: exactly one) of the formulas λ 0 , λ 1 , λ 2 , there exists b such that • involves no atoms of the forms r(x, y) or r(y, x), where r is an ordinary binary predicate, we have and therefore, by Lemma 28, there is a 2-type τ such that |= τ → τ − and |= τ → (∆ h ∪ Γ ∪ Γ −1 ).So set the interpretations of the ordinary binary predicates of ϕ such that A ′ |= τ [a, b].Keeping a fixed, carry out the above procedure for all values of h, thus choosing m witnesses for a. Since, in each case, the chosen element b satisfies µ h , these witnesses are all distinct, and so no clashes arise when setting 2-types in A ′ .Now carry out the above procedure for all values of a.If a satisfies λ k , then any b chosen as a witness for a satisfies λ ⌊k+1⌋ , so that a could not previously have been chosen as a witness for b.Again, therefore, no clashes arise when setting 2-types in A ′ .At this stage, although A ′ is not completely defined, we know that, however the construction of A ′ is completed, for all a ∈ A and k (0 , and all h (0 ≤ h < m), there will exist b ∈ A \ {a} such that Proof.We prove the first statement of the theorem.The remainder then follows by Lemma 1.By Lemma 27, let ϕ * be an L 2 1PO-formula in spread normal form (7) with multiplicity 3m over a signature σ * having the following properties: (i) |= ϕ * → ϕ; (ii) if ϕ has a (finite) model then so has ϕ * ; and (iii) |σ * | is polynomially bounded as a function of |σ| + m.By rewriting the sub-formulas η, θ 0 , . . ., θ m−1 of ϕ * in conjunctive normal form, we may assume that ϕ * has the form required for Lemma 29.This re-writing will not affect the signature or multiplicity of ϕ * .By Lemma 29, there is an L 2 1PO u -formula ϕ • in weak normal form over the same signature as ϕ * , having the same multiplicity, and satisfiable over the same domains, in which all occurrences of ordinary binary predicates are in atoms of the forms r(x, x) or r(y, y).Let ϕ ′ be the result of replacing any such atoms in ϕ • with the respective atoms r(x), r(y), where r is a fresh unary predicate for each ordinary binary predicate r.It is obvious that ϕ • and ϕ ′ are satisfiable over the same domains.Moreover, given that the formulas λ 0 , λ 1 and λ 2 are mutually exclusive, we may insert the condition x = y in all ∀∃conjuncts of ϕ ′ .Thus, ϕ ′ is an L 2 1PO u -formula in weak normal form over some signature σ ′ with multiplicity m ′ = 3m such that |σ ′ | is polynomially bounded as function of |σ|+ m.By Theorem 25, if ϕ ′ has a finite model, then it has a model of size bounded by a doubly exponential function of |σ ′ | + m ′ .Therefore, ϕ has a model of size bounded by a doubly exponential function of |σ| + m.

Two-variable logic with one transitive relation
The purpose of this section is to show that the logic L  If A is a structure interpreting a distinguished binary predicate t as a transitive relation over a domain A, we refer to the t A -cliques, simply, as the cliques of A. We employ the following abbreviations: t ≡ (x, y) := t(x, y) ∧ t(y, x) ∧ x = y t < (x, y) ≡ t(x, y) ∧ ¬t(y, x) t ∼ (x, y) ≡ ¬t(x, y) ∧ ¬t(y, x) ∧ x = y t > (x, y) ≡ ¬t(x, y) ∧ t(y, x).
It is then easy to see that the following validity holds: A formula of L 2 1T is said to be in transitive normal form if it conforms to the pattern s∈{≡,<,>,∼} where m ≥ 1, the p h,s are unary predicates, and the η s and θ h,s quantifierand equality-free formulas not featuring either of the atoms t(x, y) or t(y, x).Transitive normal form is-modulo trivial logical manipulation-a special case of standard normal form (1). Note that, in the above definition, the sub-formulas η s and θ h,s may contain the atoms t(x, x) or t(y, y).
We have the following normal-form theorem for L 2 1T.
Lemma 32.Let ϕ be a L 2 1T-formula.There exists an L 2 1T-formula ϕ * in transitive normal form such that: (i) |= ϕ * → ϕ; (ii) every model of ϕ can be expanded to a model of ϕ * ; and (iii) ϕ * is bounded by a polynomial function of ϕ .
Proof.By Lemma 1, we may without loss of generality assume ϕ to be in standard normal form: where η, θ 0 , .Since A |= m−1 h=0 ∀x∃y(x = y ∧ θ h ), and bearing in mind the validity (12), it follows that A ′ |= ψ ′ 1 .Moreover, under our general assumption that all domains have cardinality at least 2, ψ ′ 1 is logically equivalent to the formula ψ 1 given by: For all s ∈ {≡, <, >, ∼}, let η s be the result of replacing all atoms of the forms t(x, y) or t(y, x) in η by either ⊤ or ⊥ as specified by t s (x, y); and let ψ 2 be the formula Since A |= ∀x∀y(x = y ∨ η), we have A ′ |= ψ 2 .Observe that none of the η s contains either of the atoms t(x, y) or t(y, x).
Let ϕ * = ψ 1 ∧ ψ 2 ∧ ω.Thus, ϕ * is bounded by a polynomial function of ϕ .We have shown that, if ϕ has a model, so does ϕ * .Moreover, it follows easily from (12) that |= ϕ * → ϕ. a distinguished predicate, q Ā 0 is still a transitive relation.)Let the result of applying Lemma 33 to Ā and B be a structure Ā′ , in which B ′ is the replacement for B; and write A ′ for the domain of Ā′ .Notice that, if τ is a 2-type realized in Ā containing the literals u < (x) and u(y), then τ also contains the literals q 0 (x, y) and ¬q 0 (y), and similarly, mutatis mutandis, with u < replaced by u > and u ∼ .But from property (iii) of Lemma 33, we have tp for all (and hence some) b ′ ∈ B, and similarly for t > and t ∼ .It is then obvious that q Ā 0 is a transitive relation with set of cliques (A \ {B}) ∪ {B ′ }, and indeed that the clique ordering induced by t on A and clique ordering induced by q 0 on Ā′ are isomorphic under replacement of B by B ′ .Now let A ′ be the structure obtained from Ā′ by dropping the interpretations of u, u < , u > and u ∼ and renaming q 0 back to t.Now for the promised lemma allowing us to confine attention to models with small cliques.
Lemma 35.Let ϕ be a (finitely) satisfiable L 2 1T-sentence in transitive normal form over a signature σ.Then there exists a (finite) model of ϕ in which the size of each clique is bounded exponentially in |σ|.
Proof.Let ϕ be as given in (13), and suppose A |= ϕ.Let B ⊆ A be a clique of A, let C = A \ B, and let A ′ , with domain A ′ = B ′ ∪ C, be the result of applying of Lemma 34 to A. We claim that A ′ |= ϕ.The universally quantified conjuncts of ϕ are true in A ′ thanks to property (iii) of Lemma 34.As for the existential conjuncts, for any c ∈ C, properties (i) and (v) guarantee that c has all required witnesses.For any b ∈ B ′ , the same thing is guaranteed by property (iv).This establishes the claim.Now let A be a countable σ-structure.Let I 1 , I 2 , . . .be a (possibly infinite) sequence of all cliques in a A, A 0 = A and A j+1 be the structure A j modified by replacing clique I j+1 by its small replacement I ′ j+1 as described above.We define the limit structure A ∞ with the domain I ′ 1 ∪ I ′ 2 , . . .such that for all k, l the connections between I ′ k and I ′ l are defined in the same way as in A max(k,l) .It is easy to see that A ∞ |= ϕ and all cliques in A ∞ are bounded exponentially in |σ|.
We are now ready to prove the main result of this section: an exponential reduction of the (finite) satisfiability problem for L 2 1T to the (finite) satisfiability problem for standard normal form L 2 1PO-formulas.We introduce one final piece of terminology regarding diatoms.Recalling the abbreviations (11), consider any diatom D with cliques E ⊆ E and E ′ ⊆ E ′ .Evidently, for some s ∈ {<, >, ∼}, we have D |= t s [e, e ′ ] for all e ∈ E and e ′ ∈ E. We call s the order-type of D. Thus, the order type of D is > if and only if the order type of D −1 is <, and the order type of D is ∼ if and only if the order type of D −1 is ∼.Working with the corresponding indices, we denote the order-type of D k by s k .
Suppose ϕ has a model A with at least two cliques, where no clique of A has more than n elements.We proceed to construct an L 2 1PO-formula φ (depending only on ϕ, and not A), together with a model Â of φ.To avoid confusion, we use the variables u and v in φ in place of x and y: it helps to think of u and v as ranging over the set of cliques of A. Let p = p 1 , . . ., p s be a list of fresh unary predicates and q = q 1 , . . ., q t a list of fresh binary predicates, where ⌈s = log M ⌉ and ⌈t = log N ⌉.Applying the same technique as employed in the proof of Lemma 27, we may form the labelling formulas p j (u), for 0 ≤ j < M , and q k (u, v) for 0 ≤ k < N .Now let Â be the set of cliques of A, and for each â ∈ Â, fix some (arbitrary) 1-1 function â → C, where C is the initial segment of C of cardinality |â|.Denote by ι : A → C the union of all these functions.(In effect, ι orders the elements in each cell.)For any â ∈ Â, the substructure A |â is isomorphic, under ι, to some cell or other, say, C â, which we call the reference cell of â.Now suppose that â, â′ ∈ Â are distinct, and let C and C ′ be their respective reference cells.(There is no requirement that C and C ′ be distinct.)Recalling the functions ǫ and ǫ ′ defined above, and setting E = ǫ(C), E ′ = ǫ ′ (C), define the function κ : (â ∪ â′ ) → E ∪ E ′ (see Fig. .Now let Â be the structure over Â with signature σ = p ∪ q ∪ {<}, defined as follows. 1.For all â ∈ Â, and all j (0 ≤ j < M ), Â |= p j [â] if and only if C â = C j ; 2. for all distinct â, â′ ∈ Â and all k (0 ≤ k < N ), Â |= q k [â, â′ ] if and only if D â,â ′ = D k ; 3. for all distinct â, â′ ∈ Â, and all s ∈ {<, >, ∼}, Â |= s(â, â′ ) if and only if D â,â ′ is of order-type s.
Under this interpretation, and taking the variables u and v to range over the cliques of A, the formula p j (u) says "the reference cell C u of u is C j ," while the formula q k (u, v) says "the reference diatom D u,v of u, v is D k ."Furthermore, by Lemma 31, < Â is a partial order, with > Â and ∼ Â standing in the expected relations to < Â.Since A by assumption has at least two cliques, Â does not violate our general assumption that all structures have cardinality at least 2. We now proceed to define the sought-after formula φ, building it up conjunct-by-conjunct, verifying, as we do so, that all these conjuncts are true in Â.We begin by taking ψ ′ 1 to be the conjunction q k (u, v) .
Under the interpretation Â, we may read ψ ′ 1 as saying: "Every clique of A has some reference cell, and every pair of distinct cliques has some reference diatom."This is obviously true by construction.Under the general assumption that all domains have cardinality at least 2, ψ ′ 1 is equivalent to the formula ψ 1 given by ∀u∀v so that Â |= ψ 1 .Now let ψ 2 be the formula Under the interpretation Â, we may read ψ 2 as stating that, if u and v are distinct cliques of A such that D u,v = D k , then C u = C L(k) and C v = C R(k) .
By Lemma 36, let φ be an L 2 1PO-formula in standard normal form with multiplicity m over a signature σ, such that: (i) if ϕ has a finite model with at least 2 cliques, then φ is finitely satisfiable, (ii) if φ has a model of size L, then ϕ has a model of size n • L, where n is bounded by an exponential function of ϕ ; and (iii) both |σ| and m are bounded by an exponential function of ϕ .By Theorem 30, if ϕ, and therefore φ, is finitely satisfiable, then φ has a model of size L bounded by a doubly exponential function of |σ| + m, and hence by a triply exponential function of ϕ , whence ϕ also has a model of size bounded by a triply exponential function of ϕ .
then there exists a factorization B of A such that the set of blocks of type α ∨ β is linearly ordered.Proof.The first statement of the lemma is obvious.For the converse, let A 0 = {a ∈ X | tp(a) = α} and B 0 = {a ∈ X | tp(a) = β}.We may assume that both these sets are non-empty, since otherwise the trivial factorization satisfies the conditions of the lemma.Define an equivalence relation ≡ on A 0 by setting a ≡ a ′ if, for all b ∈ B 0 , a < b ⇔ a ′ < b.Similarly, define an equivalence relation ≡ on B 0 by setting b ≡ b ′ if, for all a ∈ A 0 , b ′ < a ⇔ b ′ < a.Let B be the partition of X whose cells are: (i) the equivalence classes of ≡ in A 0 , (ii) the equivalence classes of ≡ in B 0 , and (iii) the non-empty sets {a ∈ X | tp(a) = π}, where π ∈ Π \ {α, β}.For any C, D ∈ B write C ≪ D just in case C and D are distinct (α ∨ β)-blocks such that there exist c ∈ C and d ∈ D with c < d.

Suppose
A = (X, <, tp) is a finite typed partial order with factorization B = (B, ≪).The following notions will help us to reason about B. Recall that B × denotes the set of extremal blocks of B. If B ∈ B, define the depth of B, denoted d(B), to be the length m of the longest path B = B 0 ≪ • • • ≪ B m .The depth of B, denoted d(B), is the maximum value attained by d(B) for B ∈ B. A cut is a number χ = i + 0.5 where 0 ≤ i < d(B).If χ and χ ′ are cuts, we say χ ′ is above χ (and χ is below χ ′ ) if χ ′ < χ. (Depth increases as we go down.)Similarly, if B ∈ B, we say that B is above χ if d(B) < χ, and below Fig.2shows a cut χ = 4.5 in a factorization of a typed partial order over π 1 , . . ., π N .The sets of blocks F + (χ) and F − (χ) are shown by shading.
Fixing A = (X, <, tp) and B = (B, ≪), suppose χ, χ ′ are equivalent cuts in B with χ below χ ′ .Let B − = {B ∈ B | d(B) > χ} be the set of blocks below χ and B + = {B ∈ B | d(B) < χ ′ } the set of blocks above χ ′ .Define B * = B − ∪ B + , and define the relation ≪ * on B * to be the transitive closure of the three relations

Lemma 9 .
For all A, B ∈ B * , A ≪ * B implies A ≪ B. In addition, for any 1-type α, the α-blocks of B * are linearly ordered by ≪ * .
and we are done.Lemma 10.For all a, b ∈ X * , a < * b implies a < b.If, in addition, tp * (a) = tp * (b), the converse implication holds.Proof.The first assertion is immediate from the first assertion of Lemma 9: < * is the transitive closure of three relations all included in <.For the second assertion, suppose a < b, and that a and b belong to the respective blocks A and B. If A = B, the result follows from the fact that < * extends the intra-block order < * 0 .Otherwise, we have A ≪ B, and hence B ≪ A. By Lemma 9, A ≪ * B and so a < * b by the fact that < * extends the inter-block order ≪ * .Lemma 11.A * is a typed partial order, and B * is a factorization of A * .Moreover, A * is thin over B * .Proof.By the first assertions of Lemmas 9 and 10, both ≪ * and < * are partial orders.By construction, for all B ∈ B * , every element b ∈ B satisfies tp * (b) = tp(b) = tp(B).Thus, we can write tp * (B) = tp(B) to denote the 1-type of B in B * .The second assertion of Lemma 9 ensures that all blocks of any fixed 1-type in B * are linearly ordered.Finally, the requirement that A ≪ * B implies a < * b for all a ∈ A, b ∈ B is secured by the fact that < * extends the inter-block ordering on X * .The final statement of the lemma is immediate from the definition of < * .Lemma 12.If all blocks of type α are less then all blocks of type β in the block ordering B, then the same is true of the block ordering B * .

Figure 3 :
Figure 3: Proof of Lemma 14: the claim that A ≈ * B ′ in the case where A is below χ.
each B ∈ B, let B = {ŝ | s a sub-block of B}.Now let B = { B | B ∈ B}, and X = B. Define an relation ≺ on X to be the transitive closure of r ∃ ∪ r ∀ , where

Lemma 19 .
B is a factorization of Â.Moreover, the mapping B → B is an isomorphism of typed partial-orders (B, ≪, tp) → ( B, , tp).Proof.Immediate from the above construction.Lemma 20.Let c ∈ ŝ and d ∈ t, where s, t are sub-blocks of B, and let s ⊆ A, t ⊆ B, where A, B are blocks of B. If c ≺ d, then: (i) for all a ∈ s, there exists b ∈ B such that a < b; and (ii) for all b ∈ t, there exists a ∈ A such that a < b.

Lemma 21 .
Let c 1 ∈ ŝ1 , c 2 ∈ ŝ2 and c 3 ∈ ŝ3 , where s 1 , s 2 , s 3 are sub-blocks of B, with s 2 included in ( and hence equal to) a unit block B. If s 1 ≺ s 2 ≺ s 3 , then, for all a ∈ s 1 and all b ∈ s 3 , a < b.Proof.By Lemma 20, for all a ∈ s 1 there exists b ′ ∈ B such that a < b, and, for all b ∈ s 3 there exists b ′ ∈ B such that b ′ < b.But B is a singleton, whence a < b.Lemma 22.Let c 1 ∈ ŝ1 , c 2 ∈ ŝ2 , c 3 ∈ ŝ3 and c 4 ∈ ŝ4 where s 1 , s 2 , s 3 s 4 are sub-blocks of B. If c 1 ≺ c 2 , c 2 , c 3 ∈ r ∀ and c 3 ≺ c 4 , then, for all a ∈ s 1 and all b ∈ s 4 , a < b.Proof.Similar reasoning to Lemma 21.Now for the crucial lemma guaranteeing the existence of incomparable witnesses in the typed partial order Â.For c, d ∈ X, we write c ≍ d to mean that c = d, c ≺ d and d ≺ c.That is, ≍ stands in the same relation to ≺ as ∼ does to <. Lemma 23.Suppose a, b ∈ X with a ∼ b.Let s be the sub-block containing a and t the sub-block containing b.Then, for every c ∈ ŝ, there exists d ∈ t such that c ≍ d.
It then follows from Lemmas 21 or 22 that, for all a ′ ∈ s, and all b ′ ∈ t, a ′ < b ′ , contradicting the supposition that a ∼ b.Hence c ≺ d.By a similar argument, d ≺ c.Lemma 24.Â |= Ψ. Proof.We consider the possible forms of ψ ∈ Ψ in turn.(B1a): A |= ψ implies that there is just one block A of B having 1-type α, and A = s is a unit block.But then there is only one element of X having 1-type α, namely ŝ(0) = ŝ(1).Thus Â |= ψ. (B1b): This formula is equivalent to ∀x¬α ∨ ∀x¬β; but the realized 1-types in A and Â are the same.(B2a): Suppose c ∈ ŝ, d ∈ t be such that tp(c) = α and tp(d) = α.Let s, t be sub-blocks of the respective blocks A and B. If c ≺ d, then, by Lemma 20, there exist a ∈ A and b ∈ B such that a < b, contradicting A |= ψ.Similarly if d ≺ c.Thus, Â |= ψ. (B2b): Similar to (B2a).(B3), (B5b): By Lemma 19, B is isomorphic to B (as a typed partial order), so that B |= ψ.But since B is a factorization of Â, we have, by the first statements of Lemmas 3 and 4, Â |= ψ. (B4): Let c = ŝ(i) be of 1-type β and d = t(j) be of 1-type α.Let t lie in the block B of B. Suppose, for contradiction, c ≺ d.Pick any a ∈ s.By Lemma 20, there exists b ∈ B such that a < b.But a is of type β and b of type α, contradicting A |= ψ.Hence Â |= ψ. (B5a): A |= ψ implies that every block of B having 1-type α is linearly ordered, and hence, by assumption, is in fact a unit-block.But then every block of B having 1-type α is a unit-block, whence Â |= ψ. (B6): Let c = ŝ(i) be of 1-type α, and pick any a ∈ s.Since A |= ψ, we have b > a such that tp(b) = α and A |= µ[b].Let b be in the sub-block t, and let d = t(i).By construction, c ≺ d and Â |= µ[d], whence Â |= ψ. (B7): Similar to (B6).(B8): Let c ∈ ŝ be of 1-type α, and pick any a ∈ s.Since A |= ψ, we have b ∼ a such that A |= µ[b].Let b be in the sub-block t.By Lemma 23 there exists d ∈ t such that c ≍ d.Hence Â |= ψ. (B9), (B10): The realized 1-types in A and Â are the same.Theorem 25.Let ϕ be an L
in either case contradicting the supposition that A k+1 i |= a < b and A k+1 i |= b < c.Moreover, an exactly similar argument applies if a = c ∈ A k i and b = a k i+1 If A is a structure interpreting σ and a, b distinct elements of the domain A, we denote by tp A /σ ′ [a, b] the unique semi-diagonal 2-type over (σ, σ ′ ) satisfied by the pair a, b .Thus, tp A /σ ′ [a, b] is just like tp A [a, b], except that it is silent on the question of which binary relations in σ \ σ ′ are satisfied by the pairs a, b and b, a .
Finally, suppose a, b are distinct elements of A for which tp A ′ [a, b] has not yet been defined, and let τ = tp A /σ ′ [a, b].Since A |= ψ, it follows that |= τ − → [Γ∪Γ −1 ] • , and hence by Lemma 28 that there exists a 2-type τ such that |= τ → τ − and |= τ → (Γ ∪ Γ −1 ).Again, set the interpretations of the ordinary binary predicates so that A ′ |= τ [a, b]; and repeat the process until A ′ is completely defined.At the end of this process, for any distinct a, b of A, A |= ψ, τ |= Γ[a, b].Thus, A ′ |= ϕ, as required.Theorem 30.Let ϕ be an L 2 1PO-formula in standard normal form with multiplicity m over a signature σ.If ϕ has a finite model, then it has a model of size bounded by a doubly exponential function of |σ|+m.Hence, any finitely satisfiable L 2 1PO-formula ϕ has a model of size bounded by a doubly exponential function of ϕ , and so FinSat(L 2 1PO) is in 2-NEXPTIME.
a, b ∈ B, aT b.It is obvious that the maximal strongly-connected subsets of A form a partition: we refer to the cells of this partition as the T -cliques of A. If C is a T -clique of A and |C| > 1, then T ⊇ C × C; if, however, C = {a}, then a may or may not be related to itself by T .If C and D are distinct T -cliques of A, then we write: (i) C < T D if, for all a ∈ C and b ∈ D, aT b but not bT a; (ii) C > T D if, for all a ∈ C and b ∈ D, bT a but not aT b; and (iii) C ∼ T D if, for all a ∈ C and b ∈ D, neither aT b nor bT a.It is routine to show: Lemma 31.Let A be a set and T a transitive relation on A. Then the relation < T is a partial order on the set of T -cliques of A. Moreover, if C and D are distinct T -cliques, then C < T D if and only if D > T C and, furthermore, exactly one of C < T D, C > T D and C ∼ T D obtains.

Lemma 36 .
Let ϕ be formula of L 2 1T.There exists an L 2 1PO-formula φ in standard normal form over a signature σ with multiplicity m, such that: (i) if ϕ has a (finite) model with at least 2 cliques, then φ has a (finite) model; (ii) if φ has a model of size L, then ϕ has a model of size at most n • L, where n is bounded by an exponential function of ϕ ; and (iii) both |σ| and m are bounded by an exponential function of ϕ .Proof.By Lemma 32, we may without loss of generality assume ϕ to be in transitive normal form:s∈{≡,<,>,∼} ∀x∀y(t s (x, y) → η s ) ∧ m−1 h=0 s∈{≡,<,>,∼} ∀x∃y(p h,s (x) → (t s (x, y) ∧ θ h,s )).Let σ be the signature of ϕ.From Lemma 35, we know that, if ϕ has a (finite) model, then it has one in which each clique is of size at most n, where n is bounded by an exponential function of |σ|.Let C = {c 1 , . . ., c n } be some set of n objects (n ≥ 1).We call any setC = {c 1 , . . ., c m } for some m (1 ≤ m ≤ n) an initial segment of C. Say that a cell is a σ-structure C whose domain C is an initial segment of C such that C has exactly one clique, namely C itself.Here (and here only) we lift our usual assumption that all structures have cardinality at least 2, thus allowing cells with the singleton domain {c 1 }.Enumerate the cells as C 0 , . . ., C M−1 .Thus, M is bounded by a doubly exponential function of |σ|.Notice that, if C is a cell containing more than 1 element, then by the transitivity of t C , we have C |= ∀x.t(x, x), and hence t C = C × C. On the other hand, if C = {c 1 }, then we may have eitherC |= t[c 1 , c 1 ] or C |= t[c 1 , c 1 ].(It follows, incidentally, that M ≥ 2.)Now let E = {e 1 , . . ., e n } and E ′ = {e ′ 1 , . . ., e ′ n } be disjoint sets of cardinality n, and define the notion of an initial segment of these sets in the same way as for C. Say that a diatom is a σ-structure D with domain D = E ∪ E ′ , where E is an initial segment of E and E ′ an initial segment of E ′ (not necessarily of the same cardinality), such that such that the set of cliques in D is exactly {E, E ′ }.Enumerate the diatoms as D 0 , . . ., D N −1 .Thus, N is bounded by a doubly exponential function of |σ|.(On the other hand, N ≥ M ≥ 2.)If C is an initial segment of C we define the mappings ǫ : C → E andǫ ′ : C → E ′ by ǫ(c i ) = e i and ǫ ′ (c i ) = e ′ i for all i (1 ≤ i ≤ |C|).Thus, if D = D k is a diatom with cliques E ⊆ E and E ′ ⊆ E ′ ,there exist unique cells C = C j and C ′ = C j ′ such that ǫ : C ≃ D |E and ǫ ′ : C ′ ≃ D |E ′ .We refer to C and C ′ as the left-and right-cells of D, respectively, and, working with the corresponding indices, we define, for all k (0 ≤ k < N ), L(k) = j and R(k) = j ′ .Suppose now that we replaced the elements e 1 , e 2 , . . . of E ⊆ E with the corresponding elements e ′ 1 , e ′ 2 , . . . of E ′ , and we replaced the elements e ′ 1 , e ′ 2 , . . . of E ′ ⊆ E ′ with the corresponding elements e 1 , e 2 , . . . of E. The result would be another diatom, say, D −1 , obtained (in essence) by reversing the choice of which clique of D defines the left-cell, and which the right-cell.We refer to D −1 = D k ′ as the inverse of D = D k , and, working with the corresponding indices, we define, for all k (0 ≤ k < N ), I(k) = k ′ .

C M− 1 Figure 5 :
Figure 5: The function κ mapping â ∪ â′ to the reference diatom D = D â,â ′ .The construction of κ composes the function ι mapping â and â′ to their respective reference cells C = C â and C ′ = C â′ with the functions ǫ : C → E and ǫ ′ : C → E ′ .
Obviously, |= χ * h → χ h ; moreover, any model A of χ h can be expanded to a model A ′ of χ h by setting p A ′ h,< = {a ∈ A | there exists b < a s.t.A |= θ h [a, b]}, and similarly for p h,> and p h,∼ .Carrying out this replacement for all h (0 ≤ h < m), let σ * denote the enlarged signature.Evidently, |σ * | = |σ|+3m.Formula ( 12and 13 ensure that B(χ, χ ′ ) |= FC(Ψ).The remaining statements of the lemma are obvious.Suppose Ψ is a finitely satisfiable conjunction of basic formulas.Then there is a model A |= Ψ with unitary factorization B of size bounded by a doubly exponential function of the size of the signature of Ψ, such that A is thin over B.Proof.Suppose A 0 is a finite typed partial order such that A 0 |= Ψ.By Lemma 7, let B 0 be a factorization of A 0 such that B 0 |= FC(Ψ).By Lemma 8, we may assume that B 0 is unitary and that A 0 is thin over B 0 .Assuming A i and B i have been defined, if B i contains a pair of equivalent cuts, χ and χ ′ , let A i+1 = A i /(χ, χ ′ ) and B i+1 = B i /(χ, χ ′ ).By Lemma 15, A i+1 |= Ψ and B i+1 |= FC(Ψ); moreover, B i+1 is unitary, and A i+1 is thin over B i+1 .Since the number of blocks in B i is strictly decreasing, we eventually reach a structure A m with factorization B m , in which no two cuts are equivalent.
21T has the triply exponential-sized finite model property (Theorem 37): if ϕ is a finitely satisfiable L 2 1T-formula, then ϕ has a model of size bounded by some fixed triply exponential function of ϕ .It follows that the finite satisfiability problem for L 2 1T is in 3-NEXPTIME.We proceed by reduction to the corresponding problem for standard normal-form L 2 1PO-formulas, but over signatures of exponential size, and with exponentially large multiplicities.Recall that, in L 2 1T, we have a distinguished binary predicate, t, which must be interpreted as a transitive relation.When speaking about 2-types, we take the assumed transitivity of t into account: specifically, if a 2-type contains the literals t(x, y) and t(y, x), then it must also contain t(x, x) and t(y, y).Let A be a set and T a transitive relation on A. A subset B ⊆ A is strongly connected if, for all distinct . ., θ m−1 are equality-and quantifier-free.Suppose A |= ϕ.For all h (0 ≤ h < m), all s ∈ {≡, <, >, ∼}, let p h,s be a fresh unary predicate, and expand A to an interpretation A ′ by settingA ′ |= p h,s [a] if there exists b ∈ A \ {a} such that A |= t s [a, b] and A |= θ h [a, b].Further, set θ h,s to be the result of replacing all atoms of the forms t(x, y) or t(y, x) in θ h by either ⊤ or ⊥ as specified by t s (x, y).Thus, setting ω to be the formula ∀x(p h,s (x) → ∃y(t s (x, y) ∧ θ h,s )), we see by construction of A ′ that A ′ |= ω.Observe that none of the θ h,s contains either of the atoms t(x, y) or t(y, x).Let ψ ′ 1 be the formula ∀x m−1 h=0 s∈{≡,<,>,∼} p h,s (x).