Arboreal Categories and Equi-resource Homomorphism Preservation Theorems

The classical homomorphism preservation theorem, due to {\L}o\'s, Lyndon and Tarski, states that a first-order sentence $\phi$ is preserved under homomorphisms between structures if, and only if, it is equivalent to an existential positive sentence $\psi$. Given a notion of (syntactic) complexity of sentences, an"equi-resource"homomorphism preservation theorem improves on the classical result by ensuring that $\psi$ can be chosen so that its complexity does not exceed that of $\phi$. We describe an axiomatic approach to equi-resource homomorphism preservation theorems based on the notion of arboreal category. This framework is then employed to establish novel homomorphism preservation results, and improve on known ones, for various logic fragments, including first-order, guarded and modal logics.

1. Introduction 1.1.Summary.In this paper, we take steps towards an axiomatic model theory which is resource-sensitive, and well adapted for finite and algorithmic model theory and descriptive complexity.This builds on previous work on game comonads [3,8,17,4,19,5,28], which describe model comparison games in terms of resource-indexed comonads on the category of relational structures.This allows the syntax-free description of a wide range of logics, indexed by resource parameters such as quantifier rank and number of variables.As explained in [2], this opens up a landscape in which properties of the comonad are related to the degree of tractability of the logic.
Game comonads and the associated (comonadic) adjunctions have been axiomatised at a general categorical level in terms of arboreal categories [6,7], in which the objects have an intrinsic tree structure.This structure can be used to define notions of bisimulation, game, etc. at an abstract level, and to transfer these process notions via an adjunction to an extensional category-the main concrete example in applications being the category of relational structures.
In this paper, we show that this axiomatic framework can be used to prove a substantial resource-sensitive model-theoretic result, Rossman's equirank homomorphism preservation theorem, as well as a number of extensions and variations, e.g. to modal and guarded logics, and relativisations to a wide range of subclasses of structures.
Some striking features of this axiomatic approach are its generality, its resource sensitivity, and the fact that it does not use compactness.It is interesting to compare this with the use of accessible categories as an axiomatic framework for the study of abstract elementary classes [14].This is aimed at extending first-order model theory into the infinite, replacing compactness by λ-accessibility.By contrast, motivated by the needs of finite model theory and descriptive complexity, we are interested in capturing fine structure "down below", in fragments of first-order logic. 1   1.2.Extended discussion.Homomorphism preservation theorems relate the syntactic shape of a sentence with the semantic property of being preserved under homomorphisms between structures.Recall that a first-order sentence φ in a vocabulary τ is said to be preserved under homomorphisms if, whenever there is a homomorphism of τstructures A → B and A ⊨ φ, then also B ⊨ φ.Further, an existential positive sentence is a first-order sentence that uses only the connectives ∨, ∧ and the quantifier ∃.The following classical result, known as the homomorphism preservation theorem, is due to Loś, Lyndon and Tarski [33,34,42] and applies to arbitrary (first-order) vocabularies.
Theorem 1.1.A first-order sentence is preserved under homomorphisms if, and only if, it is equivalent to an existential positive sentence.
The homomorphism preservation theorem is a fairly straightforward consequence of the compactness theorem, see e.g.[43,Lemma 3.1.2].However, applying the compactness theorem means that we lose control over the syntactic shape of an existential positive sentence ψ that is equivalent to a sentence φ preserved under homomorphisms.In particular, it is an ineffective approach if we want to determine to which extent the passage from φ to ψ increases the "complexity".
One way to measure the complexity of a formula φ is in terms of its quantifier rank, i.e. the maximum number of nested quantifiers appearing in φ.Rossman's equirank homomorphism preservation theorem [41], which applies to relational vocabularies (i.e.vocabularies that contain no constant or function symbols), shows that it is possible to find a ψ whose quantifier rank is less than or equal to the quantifier rank of φ: Theorem 1.2.A first-order sentence of quantifier rank at most k is preserved under homomorphisms if, and only if, it is equivalent to an existential positive sentence of quantifier rank at most k.This is a considerable improvement on the classical homomorphism preservation theorem and was proved by Rossman on the way to his celebrated finite homomorphism preservation theorem, stating that Theorem 1.1 admits a relativisation to finite structures. 2 In the proof of the equirank homomorphism preservation theorem, the application of the compactness theorem is replaced with a model construction which is similar in spirit to the construction of a saturated elementary extension of a given structure.
The main contribution of this paper consists in laying out a categorical framework in which "equi-resource" homomorphism preservation theorems can be proved in an axiomatic fashion.In [3,8], game comonads were introduced to capture in a structural way a number of logic fragments and corresponding combinatorial and game-theoretic notions, both at the level of finite and infinite structures.For a recent survey article, see [2].The template of game comonads was axiomatised in [6], see also [7], by means of the notion of arboreal category.Our proof strategy consists in establishing abstract homomorphism preservation theorems at the general level of arboreal categories, and then instantiating these results for specific choices of game comonads.
We thus obtain novel equi-resource homomorphism preservation theorems for modal and guarded logics (Theorems 5.6 and 5.8, respectively), along with relativisations to appropriate subclasses of structures-e.g. the class of finite structures (Theorems 5.20 and 5.21, respectively).Further, we derive a relativisation result (Theorem 6.12) which refines Rossman's equirank homomorphism preservation theorem.
This paper is organised as follows.In Section 2 we provide a brief introduction to game comonads, and in Section 3 we recall the necessary definitions and facts concerning arboreal categories.Homomorphism preservation theorems are recast into categorical statements and proved at the level of arboreal categories in Sections 4, 5 and 6.Section 7 contains the proof of our main technical result, namely Theorem 6.9.Finally, in Section 8 we present a simple class of relativisation results for classes of well-behaved structures; these are discussed separately as they are not equi-resource homomorphism preservation theorems.
Throughout this article, we shall assume the reader is familiar with the basic notions of category theory; standard references include e.g.[10,35].
Let us conclude this introduction with some observations to guide the reader through the article: From games to arboreal categories: This paper builds on our prior work [7] on arboreal categories.Familiarity with the latter work would be beneficial, but we do recall the necessary material in Section 3 in order to make the article self-contained.Let us briefly overview the different levels of abstractions leading from model-comparison games to arboreal categories.
Preservation of many fragments of first-order logic, and variations thereof, can be described in terms of the existence of a winning strategy in a game.Game comonads arise from the insight that the construction associating to a structure A its collection GA of "explorations" in the game induces a comonad G, which is an enrichment of the (finite-)list comonad.The coalgebras for the comonad G capture compatible forest covers of structures, which can be thought of as unfoldings of games, and winning strategies in the game correspond to various types of morphisms between coalgebras.
Arboreal categories capture the main features of the categories of coalgebras for game comonads, and the minimal properties required to fruitfully imitate the notions of backand-forth equivalence and bisimulation, and to show that they coincide, gave rise to the axioms of arboreal categories.The filtering of coalgebra covers corresponding to the stratification induced by the resource parameter in the logic (e.g. the quantifier rank of formulas) begets resource-indexed arboreal adjunctions.
A dividing line: Analysing homomorphism preservation theorems from a categorical perspective, we identify the bisimilar companion property as a key dividing line, and Section 5 is divided accordingly.Suppose that G is a game comonad on a category of structures corresponding to a logic fragment L. Typically, any structure A is equivalent to GA in the existential positive fragment of L, but there could be a sentence in L that is valid in precisely one of the two structures.The bisimilar companion property asserts that this is not the case: A and GA are indistinguishable in the logic fragment L.
The bisimilar companion property is satisfied e.g. by the comonads corresponding to modal and guarded logics.For these logics, we obtain simple proofs of equi-resource homomorphism preservation theorems.
On the other hand, the bisimilar companion property fails for first-order logic with bounded quantifier rank, or with a bounded number of variables (the latter falls outside of the scope of this paper, see Remark 6.1), and showing that this property can be "forced" requires a considerable amount of work.Our approach is inspired by that of Rossman [41], and shows that the methods and ideas put forward in op.cit.can be lifted to the axiomatic setting.There is a difference though: whereas Rossman uses n-cores, approximating the notion of core [24], we use cofree coalgebras.The former are (minimal) retracts of structures, while the latter can be thought of as "coverings".

Equality:
The framework of game comonads typically encodes the preservation of equality-free fragments of logics.Generally, the difference is invisible when dealing with existential positive fragments, or extensions with counting quantifiers, as these often admit equality elimination (cf.[19,§VI] for the case of logics with counting quantifiers).The difference is also immaterial for modal logic, because its standard translation is contained in the equality-free fragment of first-order logic.Nevertheless, this gap needs to be addressed when considering e.g.first-order logic with bounded quantifier rank.
This was handled in [3,9] and subsequent works by considering a fresh binary relation I and assuming that (i) I is interpreted as the identity relation on the class of structures we are interested in, and (ii) all homomorphisms preserve I.Note however that, if A is a structure in which I coincides with the identity relation, the structure GA obtained by applying a game comonad G to A need not have the same property.
In the present paper, we adopt the approach outlined in [7], which is better suited for an axiomatic treatment.This consists in composing the comonadic adjunction induced by a game comonad with an adjunction that "introduces and eliminates I" (see Example 3.18 for more details).This is why, throughout, we need to work with possibly non-comonadic adjunctions.

Logic fragments and game comonads
We shall mainly deal with two types of vocabularies: • Relational vocabularies, i.e. first-order vocabularies that contain no function or constant symbols.• Multi-modal vocabularies, i.e. relational vocabularies in which every relation symbol has arity at most 2.
Multi-modal vocabularies will be referred to simply as modal vocabularies.If σ is a modal vocabulary, we can assign to each unary relation symbol P ∈ σ a propositional variable p, and to each binary relation symbol R ∈ σ modalities ♢ R and □ R .We refer to σ-structures as Kripke structures.For any Kripke structure A, the interpretation of P in A, denoted by P A , corresponds to the valuation of the propositional variable p, and the binary relation R A to the accessibility relation for the modalities ♢ R and □ R .
For our running examples and intended applications, we will be interested in the following resource-bounded fragments of first-order logic (always including the equality symbol) and modal logic, for a relational vocabulary σ and positive integer k: • FO k and ∃ + FO k : these denote, respectively, the set of sentences of quantifier rank ≤ k in the vocabulary σ, and its existential positive fragment.• ML k and ∃ + ML k : if σ is a modal vocabulary, ML k is the set of modal formulas of modal depth ≤ k in the vocabulary σ (recall that the modal depth is the maximum number of nested modalities in a formula).Moreover, ∃ + ML k denotes the existential positive fragment of ML k , i.e. the set of formulas in ML k that use only the connectives ∨, ∧ and the diamond modalities.• ML k (#): this is the extension of ML k with graded modalities.Recall that graded modalities have the form ♢ n R and □ n R , with n ≥ 0, and A, a |= ♢ n R φ if there are at least n R-successors of a satisfying φ; □ n R φ is logically equivalent to ¬♢ n R ¬φ.Further logics, namely guarded logics, will be considered in Section 5.1.
Any logic fragment3 L, i.e. any set of first-order sentences in a vocabulary τ , induces an equivalence relation ≡ L on τ -structures defined as follows: for all τ -structures A, B, If L consists of all first-order sentences, ≡ L coincides with elementary equivalence.
Syntax-free characterisations of the equivalence relations ≡ L play an important role in model theory.For example, the Keisler-Shelah theorem states that two τ -structures are elementarily equivalent if, and only if, they have isomorphic ultrapowers.A different approach is through model comparison games.These have a wide range of applications in model theory, see e.g.[26, §3], and are central to finite model theory where tools such as the compactness theorem and ultraproducts are not available.Model comparison games lead to a perspective which may be described as "model theory without compactness".
Game comonads arise from the insight that model comparison games can be seen as semantic constructions in their own right.Although we shall not employ games as a tool, we recall two examples of games to motivate the framework of game comonads.
Henceforth we shall work with a relational vocabulary σ.Let A, B be σ-structures.Both types of game are two-player games played between Spoiler and Duplicator.Whereas Spoiler aims to show that A and B are different, Duplicator aims to show that they are similar.Each game is played in a number of rounds: Remark 2.1.In both Ehrenfeucht-Fraïssé and bisimulation games, the resource parameter is the number of rounds.This need not be the case in general.For instance, the resource parameter for pebble games [13,27], which correspond to finite-variable fragments of first-order logic, is the number of pebbles available to the players.
Next, we introduce the comonads corresponding to Ehrenfeucht-Fraïssé and bisimulation games, respectively.For each σ-structure A, denote by E k (A) the set of all non-empty sequences of length at most k of elements from A. In other words, E k (A) is the set of all plays in A in the k-round Ehrenfeucht-Fraïssé game.The interpretations of the relation symbols can be lifted from A to E k (A) as follows.Let ε A : E k (A) → A be the function sending a sequence to its last element.For each relation symbol R ∈ σ of arity j, we define R E k (A) to be the set of all tuples (s 1 , . . ., s j ) ∈ E k (A) j such that: (i) The sequences s 1 , . . ., s j are pairwise comparable in the prefix order.
For every homomorphism f : A → B, let This yields a comonad (in fact, a family of comonads indexed by k > 0) on the category Struct(σ) of σ-structures and their homomorphisms, known as Ehrenfeucht-Fraïssé comonad [8].The underlying functor of this comonad is E k : Struct(σ) → Struct(σ), the counit is ε, and the comultiplication at A is the homomorphism A similar construction applies to k-round bisimulation games.Suppose σ is a modal vocabulary and let (A, a) be a pointed Kripke structure.We define a Kripke structure M k (A, a) whose carrier is the set of all paths p of length at most k starting from a: a where R 1 , . . ., R n are binary relation symbols in σ.If P ∈ σ is unary then P M k (A,a) is the set of paths p whose last element a n belongs to P A .For a binary relation symbol R in σ, R M k (A,a) is the set of pairs of paths (p, p ′ ) such that p ′ is obtained by extending p by one step along R. The distinguished element of the Kripke structure M k (A, a) is the trivial path ⟨a⟩ of length 0, and the function ε (A,a) : (M k (A, a), ⟨a⟩) → (A, a) sending a path to its last element is a morphism of pointed Kripke structures.By similar reasoning to the one above, the assignment (A, a) → (M k (A, a), ⟨a⟩) can be upgraded to a comonad on the category Struct • (σ) of pointed Kripke structures and their homomorphisms, the modal comonad [8].
In addition to the examples mentioned above, the framework of game comonads covers a number of model comparison games, cf.e.g.[3,4,5,17,28,38].In each case, they yield structural (syntax-free) characterisations of equivalence in the corresponding logic fragments.This will be illustrated from an axiomatic perspective in Section 3.4.

Arboreal categories
In this section, we recall from [7] the basic definitions and facts concerning arboreal categories.All categories under consideration are assumed to be locally small and wellpowered, i.e. every object has a small set of subobjects (as opposed to a proper class).

Proper factorisation systems.
Given arrows e and m in a category C, we say that e has the left lifting property with respect to m, or that m has the right lifting property with respect to e, if for every commutative square as on the left-hand side below there is an arrow d such that the right-hand diagram above commutes.For any class H of morphisms in C, let ⋔ H (respectively H ⋔ ) be the class of morphisms having the left (respectively right) lifting property with respect to every morphism in H. Definition 3.1.A pair of classes of morphisms (Q, M) in a category C is a weak factorisation system provided it satisfies the following conditions: A proper factorisation system is a weak factorisation system (Q, M) such that each arrow in Q is epic and each arrow in M is monic.We refer to M-morphisms as embeddings and denote them by ↣.Q-morphisms will be referred to as quotients and denoted by ↠.
Next, we state some well known properties of proper factorisation systems (cf.e.g.[23] or [40]) which will be used throughout the paper without further reference.
Assume C is a category admitting a proper factorisation system (Q, M).In the same way that one usually defines the poset of subobjects of a given object X ∈ C, we can define the poset S X of M-subobjects of X.Given embeddings m : S ↣ X and n : T ↣ X, let us say that m ⊴ n provided there is a morphism i : This yields a preorder on the class of all embeddings with codomain X.The symmetrisation ∼ of ⊴ is given by m ∼ n if, and only if, there exists an isomorphism i : S → T such that m = n • i.Let S X be the class of ∼-equivalence classes of embeddings with codomain X, equipped with the natural partial order ≤ induced by ⊴.We shall systematically represent a ∼-equivalence class by any of its representatives.As C is well-powered and every embedding is a monomorphism, S X is a set.For any morphism f : X → Y and embedding m : S ↣ X, consider the (quotient, embedding) factorisation of f • m: This yields a monotone map ∃ f : S X → S Y sending m to ∃ f m.Note that the map ∃ f is well-defined because factorisations are unique up to isomorphism.If f is an embedding (or, more generally, f • m is an embedding), ∃ f m can be identified with f • m.For the following observation, cf.e.g.[7, Lemma 2.7(a)].
Lemma 3.3.Let C be a category equipped with a proper factorisation system and let f : X ↣ Y be an embedding in C. Then ∃ f : S X → S Y is an order-embedding.

Paths and arboreal categories.
Let C be a category endowed with a proper factorisation system (Q, M).
Definition 3.4.An object X of C is called a path provided the poset S X is a finite linear order.Paths will be denoted by P, Q and variations thereof.
The collection of paths is closed under embeddings and quotients.That is, given an arrow f : X → Y , if f is an embedding and Y is a path then X is a path, and if f is a quotient and X is a path then Y is a path [7,Lemma 3.5].
A path embedding is an embedding P ↣ X whose domain is a path.We let P X denote the sub-poset of S X consisting of the path embeddings.Because paths are closed under quotients, for any arrow f : X → Y the monotone map ∃ f : S X → S Y restricts to a monotone map Henceforth, we shall assume that C contains, up to isomorphism, only a set of paths.Thus, whenever convenient, we shall work with a small skeleton of the full subcategory of paths.For any object X of C, we have a diagram with vertex X consisting of all path embeddings with codomain X; the morphisms between paths are those which make the obvious triangles commute (note that they are necessarily embeddings): This yields a cocone over the small diagram P X.We say that X is path-generated provided this is a colimit cocone in C. Suppose for a moment that coproducts of sets of paths exist in C.An object X of C is connected if, for all non-empty sets of paths {P i | i ∈ I} in C, any morphism X → i∈I P i factors through some coproduct injection P j → i∈I P i .
In order to state the definition of arboreal category, let us say that a proper factorisation system is stable if, for any quotient e and embedding m with common codomain, the pullback of e along m exists and is a quotient.Definition 3.5.An arboreal category is a category C, equipped with a stable proper factorisation system, that satisfies the following conditions: (i) C has all coproducts of sets of paths.(ii) For any paths Remark 3.6.Item (ii) in the previous definition is equivalent to the following 2-out-of-3 condition: For any paths P, Q, Q ′ and morphisms if any two of f , g, and g • f are quotients, then so is the third.See [7, Remark 3.9].Moreover, item (iii) is equivalent to saying that the inclusion functor C p → C is dense, where C p is the full subcategory of C defined by the paths [7, Lemma 5.1].
Finally, note that any arboreal category admits an initial object, obtained as the coproduct of the empty set, and any initial object is a path because its poset of Msubobjects has a single element-namely, the equivalence class of the identity.
If (P, ≤) is a poset, then C ⊆ P is a chain if it is linearly ordered.(P, ≤) is a forest if, for all x ∈ P , the set ↓x := {y ∈ P | y ≤ x} is a finite chain.The height of a forest is the supremum of the cardinalities of its chains.The covering relation ≺ associated with a partial order ≤ is defined by u ≺ v if and only if u < v and there is no w such that u < w < v.The roots of a forest are the minimal elements, and a tree is a forest with at most one root.Morphisms of forests are maps that preserve roots and the covering relation.The category of forests is denoted by F, and the full subcategory of trees by T.
Example 3.7.Let σ be a relational vocabulary.A forest-ordered σ-structure (A, ≤) is a σ-structure A equipped with a forest order ≤.A morphism of forest-ordered σ- is also a forest morphism.This determines a category R(σ).We equip R(σ) with the factorisation system given by (surjective morphisms, embeddings), where an embedding is a morphism which is an embedding qua σ-homomorphism.Let R E (σ) be the full subcategory of R(σ) determined by those objects (A, ≤) satisfying the following condition: For each k > 0, let R E k (σ) be the full subcategory of R E (σ) of forest-ordered structures of height ≤ k.In [9, Theorem 9.1], it is shown that R E k (σ) is isomorphic to the category of coalgebras for the Ehrenfeucht-Fraïssé comonad E k on Struct(σ).The objects (A, ≤) of R E k (σ) are forest covers of A witnessing that its tree-depth is at most k [36].The category R E (σ) is arboreal when equipped with the restriction of the factorisation system on R(σ).The paths in R E (σ) are those objects in which the order is a finite chain.Similarly, R E k (σ) is an arboreal category for all k > 0, when equipped with the restriction of the factorisation system on R(σ).See [7,Examples 5.4].
Example 3.8.Assume that σ is a modal vocabulary.Let R M (σ) be the full subcategory of R(σ) consisting of the tree-ordered σ-structures (A, ≤) satisfying: For each k > 0, the full subcategory R M k (σ) of R M (σ) consisting of the tree-ordered structures of height at most k is isomorphic to the category of coalgebras for the modal comonad M k on Struct • (σ) [9, Theorem 9.5].When equipped with the restriction of the factorisation system on R(σ), the category R M (σ) is arboreal and its paths are those objects in which the order is a finite chain.Likewise for R M k (σ).It follows from the definition of path that, for any object X of an arboreal category, the poset P X is a tree; in fact, a non-empty tree.Crucially, this assignment extends to a functor into the category of trees (for a proof, see [7,Theorem 3.11]): Theorem 3.9.Let C be an arboreal category.The assignment f → P f in equation (1) induces a functor P : C → T into the category of trees.
Finally, recall from [7, Lemma 3.15, Proposition 5.6 and Remark 5.7] the following properties of paths and posets of embeddings.
Lemma 3.10.The following statements hold in any arboreal category C: (a) Between any two paths there is at most one embedding.(b) For all objects X of C, the poset S X of its M-subobjects is a complete lattice. 5c) Let X be an object of C and let U ⊆ P X be a non-empty subset.A path embedding m ∈ P X is below U ∈ S X if, and only if, it is below some element of U.
If it exists, the unique embedding between paths P, Q in an arboreal category is denoted by !P,Q : P ↣ Q.If no confusion arises, we simply write !: P ↣ Q.As we shall see next, if C has binary products the bisimilarity relation can be characterised in terms of back-and-forth systems.Let X, Y be objects of C. Given m ∈ P X and n ∈ P Y , we write m, n to indicate that dom(m) ∼ = dom(n).Intuitively, the pair m, n encodes a partial isomorphisms between X and Y "of shape P ", with P a path.Definition 3.13.A back-and-forth system between objects X and Y of C is a set Two objects X and Y of C are said to be back-and-forth equivalent if there exists a back-and-forth system between them.
For a proof of the following result, see [7,Theorem 6.4].
Theorem 3.14.Let X, Y be objects of an arboreal category admitting a product.Then X and Y are bisimilar if, and only if, they are back-and-forth equivalent.
The existence of a back-and-forth system between X and Y can be equivalently described in terms of the existence of a Duplicator winning strategy in a two-player game played between P X and P Y [7, §6.2].Since winning strategies can be composed to yield again a winning strategy, in any arboreal category with binary products the bisimilarity relation is transitive, hence an equivalence relation.

3.4.
Resource-indexed arboreal adjunctions.Let C be an arboreal category, with full subcategory of paths C p .We say that C is resource-indexed if for all positive integers k there is a full subcategory C k p of C p closed under embeddings 6 with p the full subcategory of R E (σ) consisting of the objects in which the order is a finite chain of cardinality ≤ k.The generated subcategory C k then coincides with R E k (σ).Similar reasoning shows that the arboreal category R M (σ) from Example 3.8 can also be regarded as a resource-indexed arboreal category.Definition 3.16.Let {C k } be a resource-indexed arboreal category and let E be a category.A resource-indexed arboreal adjunction between E and C is an indexed family of adjunctions Similarly, if σ is a modal vocabulary, there is a resource-indexed arboreal cover of Example 3.18.To deal with the equality symbol in the logic, we consider resourceindexed arboreal adjunctions constructed as follows.Let  Lemma 25].We can then compose the adjunction H ⊣ J with e.g. the Ehrenfeucht-Fraïssé resource-indexed arboreal cover of Struct(σ I ) by R E (σ I ) from Example 3.17.
The composite adjunctions HL E k ⊣ R E k J, which are not comonadic, yield the Ehrenfeucht-Fraïssé resource-indexed arboreal adjunction between Struct(σ) and R E (σ I ).
Crucially, a resource-indexed arboreal adjunction between E and C can be used to define several resource-indexed relations between objects of E: Definition 3.19.Consider a resource-indexed arboreal adjunction between E and C, with adjunctions L k ⊣ R k , and any two objects a, b of E. For all k > 0, we define: k for the symmetrisation of the preorder → C k .There are inclusions The first inclusion is trivial, the second follows from [7,Lemma 6.20].For a proof of the following easy observation, see [7,Lemma 7.20].
Lemma 3.20.Consider a resource-indexed arboreal adjunction between E and C, with adjunctions L k ⊣ R k .The following hold for all a, b ∈ E and all k > 0: To conclude, we recall how the relations in Definition 3.19 capture, in our running examples, preservation of the logics introduced at the beginning of Section 2. Given a set of sentences (or modal formulas) L, let ⇛ L be the preorder on (pointed) σ-structures given by The equivalence relation ≡ L is the symmetrisation of ⇛ L .
Example 3.21.Let σ be a finite relational vocabulary.Consider the Ehrenfeucht-Fraïssé resource-indexed arboreal adjunction between Struct(σ) and R E (σ I ) in Example 3.18, and write → E k and ↔ E k for the relations on Struct(σ) induced according to Definition 3.19.For all σ-structures A, B and all k > 0, we have  Proposition 15] and [20,Proposition 3.6].We mention in passing that the relation ↔ M k coincides with equivalence in ML k [9, Theorem 10.13].

Homomorphism preservation theorems
In this section, we recast the statement of a generic equi-resource homomorphism preservation theorem into a property (HP)-and its strengthening (HP # )-that a resourceindexed arboreal adjunction may or may not satisfy.Sufficient conditions under which properties (HP) and (HP # ) hold are provided in Section 5.

(HP) and (HP #
).Given a first-order sentence φ in a relational vocabulary σ, its "model class" Mod(φ) is the full subcategory of Struct(σ) defined by the σ-structures A such that A ⊨ φ.To motivate the formulation of properties (HP) and (HP # ), we recall a well-known characterisation of model classes of sentences in FO k , i.e. first-order sentences of quantifier rank at most k, and in its existential positive fragment ∃ + FO k .Since a sentence can only contain finitely many relation symbols, for the purpose of investigating homomorphism preservation theorems we can safely assume that σ is finite.
For a full subcategory D of a category A, and a relation ∇ on the class of objects of A, we say that If ∇ is an equivalence relation and the latter condition is satisfied, we say that D is saturated under ∇.The following lemma follows from the fact that, for all k ≥ 0, there are finitely many sentences in FO k up to logical equivalence.Cf. e.g.[32,Lemma 3.13].
Lemma 4.1.The following hold for all k ≥ 0 and all full subcategories D of Struct(σ):   In Section 6 we will prove that (HP) holds for any resource-indexed arboreal adjunction satisfying appropriate properties (see Corollary 6.10), which are satisfied in particular by the Ehrenfeucht-Fraïssé resource-indexed arboreal adjunction.

Exploring the landscape: tame and not-so-tame
We shall identify, in Section 5.1, a class of "tame" resource-indexed arboreal adjunctions, namely those satisfying the bisimilar companion property, for which (HP) always holds.As an application, we derive equi-resource homomorphism preservation theorems for graded modal logic and guarded first-order logics.
In the absence of the bisimilar companion property, one may try to "force" it; this leads us, in Section 5.2, to the notion of extendability, inspired by the work of Rossman [41].Finally, in Section 5.3, we provide simple sufficient conditions under which properties (HP) and (HP # ) admit a relativisation to a full subcategory.In order to establish a similar result for property (HP # ), recall that a comonad G is idempotent if its comultiplication G ⇒ GG is a natural isomorphism.Proof.Recall that G k is idempotent if, and only if, ηR k is a natural isomorphism, where η is the unit of the adjunction L k ⊣ R k .In particular, for any a ∈ E, the component of ηR k at a yields an isomorphism k G k a for all a ∈ E. Reasoning as in the proof of Proposition 5.2, it is easy to see that (HP # ) holds.□ Remark 5.5.Consider an idempotent resource-indexed arboreal adjunction between E and C with induced comonads G k on E. The previous proof shows that, for all a ∈ E and k > 0, we have a Therefore, any idempotent resource-indexed arboreal adjunction satisfies the bisimilar companion property.
Next, we show how Propositions 5.2 and 5.4 can be exploited to obtain equi-resource homomorphism preservation theorems for (graded) modal logic and guarded first-order logics.Relativisations of these results to subclasses of structures, e.g. to the class of all finite structures, are discussed in Section 5.3.

Graded modal logic.
Let σ be a finite modal vocabulary.As observed in [9, §9.3], the modal comonads M k on Struct • (σ) are idempotent, hence so is the modal resourceindexed arboreal cover of Struct • (σ) by R M k (σ).This corresponds to the fact that a tree-ordered Kripke structure is isomorphic to its tree unravelling.Thus, Proposition 5.4 entails the following equidepth homomorphism preservation theorem for graded modal formulas (i.e., modal formulas that possibly contain graded modalities): Theorem 5.6.The following statements are equivalent for any graded modal formula φ of modal depth at most k in a modal vocabulary: (1) φ is preserved under homomorphisms between pointed Kripke structures.
(2) φ is logically equivalent to an existential positive modal formula of modal depth at most k.
Proof.Fix a graded modal formula φ ∈ ML k (#).Since a single modal formula contains only finitely many modalities and propositional variables, we can assume without loss of generality that φ is a formula in a finite modal vocabulary.By Example 3.22 we have ) .In particular, the latter inclusion entails that the full subcategory Mod(φ) of Struct • (σ) is saturated under ∼ = M k .As the modal resource-indexed arboreal cover is idempotent, Proposition 5.4 implies that Mod(φ) is closed under morphisms if, and only if, it is upwards closed with respect to → M k .Note that Mod(φ) is closed under morphisms precisely when φ is preserved under homomorphisms between pointed Kripke structures.On the other hand, the equality → M k = ⇛ ∃ + ML k implies that Mod(φ) is upwards closed with respect to → M k if, and only if, Mod(φ) = Mod(ψ) for some ψ ∈ ∃ + ML k (this is akin to Lemma 4.1(b) and hinges on the fact that ∃ + ML k contains finitely many formulas up to logical equivalence).Thus the statement follows.□ Remark 5.7.Forgetting about both graded modalities and modal depth, Theorem 5.6 implies that a modal formula is preserved under homomorphisms if, and only if, it is equivalent to an existential positive modal formula.This improves the well known result that a modal formula is preserved under simulations precisely when it is equivalent to an existential positive modal formula (see e.g.[16, Theorem 2.78]).
Guarded fragments of first-order logic.The study of guarded fragments of firstorder logic was initiated by Andréka, van Benthem and Németi in [12] to analyse, and extend to the first-order setting, the good algorithmic and model-theoretic properties of modal logic.Guarded formulas (over a relational vocabulary σ) are defined by structural induction, starting from atomic formulas and applying Boolean connectives and the following restricted forms of quantification: if φ(x, y) is a guarded formula, then so are ∃x.G(x, y) ∧ φ(x, y) and ∀x.G(x, y) → φ(x, y) where G is a so-called guard.The (syntactic) conditions imposed on guards determine different guarded fragments of first-order logic.We shall consider the following two: • Atom guarded: G(x, y) is an atomic formula in which all variables in x, y occur.
• Loosely guarded: G(x, y) is a conjunction of atomic formulas such that each pair of variables, one in x and the other in x, y, occurs in one of the conjuncts.
The atom guarded fragment of first-order logic was introduced in [12] under the name of F2 ("Fragment 2"), whereas the loosely guarded fragment was defined by van Benthem in [15].The atom guarded fragment can be regarded as an extension of modal logic, in the sense that the standard translation of the latter is contained in the former.In turn, the loosely guarded fragment extends the atomic one and can express e.g.(the translation of) the Until modality in temporal logic, cf.[15, p. 9].
For each notion of guarding g (atomic or loose), denote by gFO n and ∃ + gFO n , respectively, the n-variable g-guarded fragment of first-order logic and its existential positive fragment.In [4], guarded comonads G g n on Struct(σ) are defined for all n > 0. The associated categories of Eilenberg-Moore coalgebras are arboreal and induce the g-guarded resource-indexed arboreal cover of Struct(σ) with resource parameter n.For an explicit description of the resource-indexed arboreal category in question, cf.[4,§IV].
Assume the vocabulary σ is finite and let → g n and ↔ g n be the resource-indexed relations on Struct(σ) induced by the g-guarded resource-indexed arboreal cover.It follows from [4, Theorems III.4 and V.2] that, for all σ-structures A, B and all n > 0, To obtain an analogue of Lemma 4.1, we consider finite fragments of gFO n by stratifying in terms of guarded-quantifier rank (cf.Remark 4.2).Note that, as guarded quantifiers bound tuples of variables, rather than single variables, the guarded-quantifier rank of a guarded formula is typically lower than its ordinary quantifier rank.Nevertheless, for all k ≥ 0, the fragment gFO n k of gFO n consisting of those sentences with guarded-quantifier rank at most k contains finitely many sentences up to logical equivalence.This stratification can be modelled in terms of comonads G g n,k on Struct(σ), for all n, k > 0, as explained in [4,§VII].Fixing n and letting k vary, we obtain an n-variable g-guarded resource-indexed arboreal cover of Struct(σ), with resource parameter k.The induced relations → g n,k and ↔ g n,k on Struct(σ) coincide, respectively, with preservation of ∃ + gFO n k and equivalence in gFO n k .Thus, for any full subcategory D of Struct(σ): • D = Mod(φ) for some φ ∈ gFO n k if, and only if, D is saturated under ↔ g n,k .• D = Mod(ψ) for some ψ ∈ ∃ + gFO n k if, and only if, D is upwards closed with respect to → g n,k .As observed in [5, §6.1], the g-guarded resource-indexed arboreal cover of Struct(σ) satisfies the bisimilar companion property, and so does the n-variable g-guarded resourceindexed arboreal cover for all n > 0. Therefore, Proposition 5.2 implies the following equirank-variable homomorphism preservation theorem for guarded logics: Theorem 5.8.Let g be a notion of guarding (either atom or loose).The following statements are equivalent for any g-guarded sentence φ in n variables of guarded-quantifier rank at most k in a relational vocabulary: (1) φ is preserved under homomorphisms.
(2) φ is logically equivalent to an existential positive g-guarded sentence in n variables of guarded-quantifier rank at most k.

5.2.
Not-so-tame: extendability.A resource-indexed arboreal adjunction may fail to satisfy the bisimilar companion property, in which case Proposition 5.2 does not apply.This is the case e.g. for the Ehrenfeucht-Fraïssé resource-indexed arboreal adjunction: When the bisimilar companion property fails, i.e. a ̸ ↔ C k G k a for some a ∈ E and k > 0, we may attempt to force it by finding appropriate extensions a * and (G k a) * of a and G k a, respectively, satisfying a * ↔ C k (G k a) * .This motivates the notion of kextendability (see Definition 5.14 below), inspired by the work of Rossman [41] and its categorical interpretation in [1].
To start with, we introduce the following notations.Given objects a, b of a category A, we write a → b to denote the existence of an arrow from a to b.
Now, let a be an object of an arboreal category C and let m : P ↣ a be a path embedding.As S a is a complete lattice by Lemma 3.10(b), the supremum ↑m in S a of all path embeddings above m exists and we shall denote it by Clearly, m ≤ i m in S a, and so there is a path embedding m ⋆ : P ↣ S m satisfying i m • m ⋆ = m.(Note that i m is well defined only up to isomorphism in the coslice category C/a, but as usual we work with representatives for isomorphism classes.)Remark 5.11.To provide an intuition for the previous definition, let us say for the sake of this remark that a path embedding m : P ↣ a is "dense in a" if all elements of P a are comparable with m.Then Lemma 5.12(a) below implies that i m : S m ↣ a is the largest M-subobject of a in which m is dense.
Lemma 5.12.The following statements hold for all path embeddings m : P ↣ a: Proof.(a) The map i m • − : S S m → S a is an order-embedding by Lemma 3.3, and so its restriction P S m → P a is an injective forest morphism.Hence, P S m is isomorphic to the subtree of P a consisting of those elements that factor through i m , i.e. that are below ↑m.By Lemma 3.10(c), an element of P a is below ↑m precisely when it is below some element of ↑m.In turn, the latter is equivalent to being comparable with m.
(b) Since S m is path-generated, it is the colimit of the canonical cocone C of path embeddings over the small diagram P S m which, by item (a), can be identified with the subdiagram of P a consisting of those elements comparable with m.As P (f • i m ) is monotone, it sends path embeddings comparable with m to path embeddings comparable with n, and so the cocone {f and so g = g ′ because i n is monic.
(c) Suppose there exists f : We shall see in Proposition 5.16 below that, under appropriate assumptions, the kextendability property allows us to upgrade the relation ⇄ C k to the finer relation ↔ C k .For the next lemma, recall that a category is locally finite if there are finitely many arrows between any two of its objects.Lemma 5.15.Let C be an arboreal category whose full subcategory C p consisting of the paths is locally finite.If f : P ↠ Q and g : Q ↠ P are quotients between paths, then f and g are inverse to each other.
Proof.The set M of quotients P ↠ P is a finite monoid with respect to composition, and it satisfies the right-cancellation law because every quotient is an epimorphism.Hence M is a group, and so g • f ∈ M has an inverse.It follows that g • f is an embedding.
Because there is at most one embedding between any two paths by Lemma 3.10(a), g • f = id P .By symmetry, also f • g = id Q .□ Fix arbitrary morphisms f : X → Y and g : Y → X, and let m and n denote generic elements of P X and P Y , respectively.We claim that is a back-and-forth system between X and Y , i.e. it satisfies items (i)-(iii) in Definition 3.13.For item (i), let ⊥ X , ⊥ Y be the roots of P X and P Y , respectively.Note that S ⊥ X and S ⊥ Y can be identified, respectively, with X and Y .As P f and P g are forest morphisms, For item (ii), suppose m, n ∈ B and let m ′ ∈ P X satisfy m ≺ m ′ .We seek n ′ ∈ P Y such that n ≺ n ′ and m ′ , n ′ ∈ B. By assumption, there are arrows s : S m → S n and t : S n → S m such that P s(m ⋆ ) = n ⋆ and P t(n ⋆ ) = m ⋆ .Writing P := dom(m) and P ′ := dom(n), we have the following diagrams ⋆ is an embedding, and similarly It remains to show that n ≺ n ′ .For any element x of a tree, denote by ht(x) its height.As n ≤ n ′ in P Y , it is enough to show that ht(n ′ ) = ht(n) + 1.Using the fact that forest morphisms preserve the height of points and is proved in a similar way using the fact that a is k-extendable.□ Definition 5.17.Consider a resource-indexed arboreal adjunction between E and C, and an object a ∈ E. For all k > 0, a k-extendable cover of a is a section a → a * in E such that a * is k-extendable.
Proposition 5.18.(HP) holds for any resource-indexed arboreal adjunction between E and C satisfying the following properties for all k > 0: (i) C k p is locally finite.(ii) E has binary products and each of its objects admits a k-extendable cover.Relativising to full subcategories.Let E ′ be a full subcategory of E. We say that (HP) holds relative to E ′ if the following condition is satisfied: For any full subcategory Likewise for (HP # ).For the next proposition, observe that in order for a comonad G on E to restrict to a full subcategory E ′ of E it is necessary and sufficient that Ga ∈ E ′ for all a ∈ E ′ .Proposition 5.19.Consider a resource-indexed arboreal adjunction between E and C, and let E ′ be a full subcategory of E such that the induced comonads G k := L k R k restrict to E ′ .If the resource-indexed arboreal adjunction has the bisimilar companion property then (HP) holds relative to E ′ .If it is idempotent then (HP # ) holds relative to E ′ .
Proof.The same, mutatis mutandis, as for Propositions 5.2 and 5.4, respectively.□ Since the modal comonads M k restrict to finite pointed Kripke structures, the previous result yields a variant of Theorem 5.6 for finite structures: Theorem 5.20.The following statements are equivalent for any graded modal formula φ of modal depth at most k in a modal vocabulary: (1) φ is preserved under homomorphisms between finite pointed Kripke structures.
(2) φ is logically equivalent over finite pointed Kripke structures to an existential positive modal formula of modal depth at most k.
Similarly, since the guarded comonads G g n,k restrict to finite structures, we obtain the following variant of Theorem 5.8 for finite structures: Theorem 5.21.Let g be a notion of guarding (either atom or loose).The following statements are equivalent for any g-guarded sentence φ in n variables of guardedquantifier rank at most k in a relational vocabulary: (1) φ is preserved under homomorphisms between finite structures.
(2) φ is logically equivalent over finite structures to an existential positive g-guarded sentence in n variables of guarded-quantifier rank at most k.
In all our examples of resource-indexed arboreal adjunctions and covers, the counits of the induced comonads G k := L k R k are componentwise surjective.The next easy observation, combined with Proposition 5.19, then provides a useful criterion to relativise equi-resource homomorphism preservation theorems to subclasses of structures.Recall that a negative formula is one obtained from negated atomic formulas and ∨, ∧, ∃, ∀.Lemma 5.22.Let G be a comonad on Struct(σ) whose counit is componentwise surjective and let T be a set of negative sentences.Then G restricts to Mod(T ).
Proof.If ψ ∈ T , its negation is logically equivalent to a positive sentence χ.Positive sentences are preserved under surjective homomorphisms and so, for all A ∈ Struct(σ), considering the component of the counit GA ↠ A we obtain I.e., G restricts to Mod(ψ).As Mod(T ) = ψ∈T Mod(ψ), the statement follows.□ The counits of the guarded comonads G g n,k are componentwise surjective, thus the equirank-variable homomorphism preservation theorem for guarded logics and its finite variant (Theorems 5.8 and 5.21, respectively) admit a relativisation to any full subcategory of the form Mod(T ) where T is a set of negative g-guarded sentences.
The counits of the modal comonads M k are also componentwise surjective.As positive modal formulas are preserved under surjective homomorphisms between pointed Kripke structures, a slight variant of Lemma 5.22 shows that the comonads M k restrict to any full subcategory of the form Mod(T ), with T a set of negative modal formulas.Hence, the equidepth homomorphism preservation theorem for graded modal logic and its finite version (Theorems 5.6 and 5.20, respectively) can be relativised to any such subcategory.
Relativisations to subclasses of structures can be obtained even in the absence of the bisimilar companion property; in that case, we need to ensure that k-extendable covers can be constructed within the subclass.We defer the statement of this result to Section 6.2 (see Corollary 6.11).

An axiomatic approach
In this section, we consider resource-indexed arboreal adjunctions between E and C that need not satisfy the bisimilar companion property.Using the notion of k-extendable cover introduced in Section 5.2, we identify sufficient conditions ensuring that property (HP) is satisfied (see Corollary 6.10).We introduce first conditions (E1)-(E2) on E in Section 6.1 and then, in Section 6.2, conditions (A1)-(A4) on the adjunctions.In Section 6.3, we derive a slight generalisation of the equirank homomorphism preservation theorem by showing that these conditions are satisfied by the Ehrenfeucht-Fraïssé resource-indexed arboreal adjunction.Remark 6.1.Let us point out that we cannot derive from this axiomatic approach an equivariable homomorphism preservation theorem, whereby the number of variables in a sentence is preserved, let alone an equirank-variable one.In fact, the corresponding (k-round) n-pebble comonads do not satisfy property (A3) below.On the other hand, under the additional assumption that k ≤ n + 2, where k is the quantifier rank and n is the number of variables in a sentence, an equirank-variable homomorphism preservation theorem was proved by Paine in [38].Also, our approach does not readily apply to hybrid logic because the hybrid comonads H k in [5] do not satisfy the path restriction property (A4) (cf.Definition 6.8).
6.1.Axioms for the extensional category.We require that the category E have the following properties: (E1) E has all finite limits and small colimits.(E2) E is equipped with a proper factorisation system such that: • Embeddings are stable under pushouts along embeddings.
• Pushout squares of embeddings are also pullbacks.
• Pushout squares of embeddings are stable under pullbacks along embeddings.Remark 6.2.Note that property (E2) only involves one half of the factorisation system, namely the embeddings.In fact, it could be weakened to the requirement that E admit a class of monomorphisms N satisfying appropriate properties.When N is the class of all monomorphisms, these are akin to the conditions for an adhesive category, cf.[31].Example 6.3.If σ is a relational vocabulary, Struct(σ) satisfies (E1)-(E2).In fact, it is well known that Struct(σ) is complete and cocomplete, hence it satisfies (E1).For (E2), consider the proper factorisation system given by surjective homomorphisms and embeddings.Up to isomorphism, embeddings can be identified with inclusions of induced substructures.The pushout of a span of embeddings in Struct(σ) can be identified with a union of structures, and so embeddings are stable under pushouts along embeddings.The remaining two conditions in (E2) hold because they are satisfied in Set by the class of monomorphisms, and the forgetful functor Struct(σ) → Set preserves and reflects pullback and pushout diagrams consisting of embeddings.
Proof.Fix an arbitrary object e ∈ E. It is well known that limits and colimits in e/E are inherited from E, so e/E satisfies (E1) because E does.
By assumption, E admits a proper factorisation system satisfying (E2).Let Q and M be the classes of arrows in e/E whose underlying morphisms in E are quotients and embeddings, respectively.It is folklore that (Q, M) is a weak factorisation system in e/E.Moreover, this factorisation system is proper because the codomain functor cod : e/E → E is faithful.Recall that cod : e/E → E preserves pushouts, so embeddings in e/E are stable under pushouts along embeddings because the corresponding property is satisfied in E. The remaining two properties in (E2) follow by similar reasoning, using the fact that cod : e/E → E preserves and reflects limits and pushouts.□ Example 6.5.It follows from Example 6.3 and Lemma 6.4 that, for all relational vocabularies σ, the category Struct • (σ) of pointed σ-structures satisfies (E1)-(E2).
6.2.Axioms for the resource-indexed adjunctions.We now assume that the extensional category E satisfies (E1)-(E2), and proceed to introduce conditions on the resource-indexed arboreal adjunction between E and C. To start with, consider an arbitrary adjunction L ⊣ R : E → C. As with any adjunction, there are hom-set bijections where ε is the counit of the adjunction.Naturality of these bijections means that for all morphisms f 1 : e → e ′ and f 2 : Lc → e in E, and Next, we introduce the path restriction property for resource-indexed arboreal adjunctions.In a nutshell, this states that whenever a ∈ E embeds into the image under L k of a path, a itself can be equipped with a path structure.Furthermore, these path structures can be chosen in a coherent fashion.We start with an auxiliary definition: Definition 6.6.Consider a resource-indexed arboreal adjunction between E and C. A path P ∈ C k p is smooth if there exist e ∈ E and an embedding P ↣ R k e.
Corollary 6.11.Let σ be a relational vocabulary and consider a resource-indexed arboreal adjunction between Struct(σ) and C satisfying (A1)-(A4).The following hold: (1) If D is a full subcategory of Struct(σ) closed under co-retracts such that each induced comonad G k := L k R k restricts to D, then (HP) holds relative to D. (2) If the counits of the comonads G k are componentwise surjective and T is a set of negative sentences in the vocabulary σ, then (HP) holds relative to Mod(T ).
Proof.The proof of item 1 is the same, mutatis mutandis, as for Proposition 5.18, using Theorem 6.9 and the fact that if D is closed under co-retracts then k-extendable covers can be constructed within D. Item 2 is an immediate consequence of item 1.Just observe that the comonads G k restrict to Mod(T ) by Lemma 5.22, and Mod(T ) is closed under co-retracts (cf. the proof of the aforementioned lemma).□ 6.3.The equirank homomorphism preservation theorem.As observed in Section 4.1, Rossman's equirank homomorphism preservation theorem is equivalent to property (HP) for the Ehrenfeucht-Fraïssé resource-indexed arboreal adjunction between Struct(σ) and R E (σ I ).In turn, by Corollary 6.10, to establish (HP) it suffices to show that the latter resource-indexed arboreal adjunction satisfies (E1)-(E2) and (A1)-(A4).By Example 6.3, the category Struct(σ) satisfies (E1)-(E2) when equipped with the (surjective homomorphisms, embeddings) factorisation system, so it remains to show that (A1)-(A4) hold.Before doing so, note that Corollary 6.11 yields the following slight generalisation of the equirank homomorphism preservation theorem (just observe that the counits of the induced comonads on Struct(σ) are componentwise surjective).
Theorem 6.12.Let σ be a relational vocabulary and let D be a full subcategory of Struct(σ) closed under co-retracts such that the comonads on Struct(σ) induced by the Ehrenfeucht-Fraïssé resource-indexed arboreal adjunction restrict to D. Then the equirank homomorphism preservation theorem holds relative to D.
In particular, the equirank homomorphism preservation theorem holds relative to Mod(T ) whenever T is a set of negative sentences in the vocabulary σ.Remark 6.13.A consequence of the first part of Theorem 6.12 is that the equirank homomorphism preservation theorem admits a relativisation to any class of structures that is co-homomorphism closed, i.e. downwards closed with respect to the homomorphism preorder on Struct(σ), a fact already pointed out by Rossman in [41, §7.1.2].
We proceed to verify conditions (A1)-(A4) for the adjunctions L k ⊣ R k , where with the notation of Example 3.18.Note that, since a first-order sentence contains only finitely many relation symbols, in order to deduce the equirank homomorphism preservation theorem, as well as Theorem 6.12 above, we can assume without loss of generality that the relational vocabulary σ is finite.
(A1) Recall from Example 3.7 that, for all k > 0, the paths in R E k (σ I ) are those forestordered σ I -structures (A, ≤) such that the order is a chain of cardinality at most k.
(A4) Finally, we show that the path restriction property is satisfied.Let Q = (B, ≤) be a smooth path in R E k (σ I ), and let j : A ↣ H(B) be an embedding in Struct(σ).Without loss of generality, we can identify A with a substructure of H(B), and j with the inclusion map.As observed above, since Q is smooth, I B is an equivalence relation and property ( * ) is satisfied (with B in place of A).If q B : B ↠ H(B) is the canonical quotient map, let Q A denote the substructure of B whose underlying set is ) when equipped with the restriction of the order on B and, using ( * ), we get It follows from the definition of Q A that item (i) in Definition 6.8 is satisfied.Just observe that any substructure of Q A that is downwards closed in Q is also downwards closed in Q A .With regards to item (ii), consider a path embedding !P,Q : P ↣ Q with P = (C, ≤) and form the following pullback square in Struct(σ).

D H(C)
A H(B) Identifying H(C) with a substructure of H(B), we can assume D is the intersection of A and That is, there is an inclusion Q D ↣ Q A whose image under L k coincides with the pullback of L k (! P,Q ) along j.Hence the path restriction property holds.
7. Proof of Theorem 6.9 For the remainder of this section, we fix an arbitrary resource-indexed arboreal adjunction between E and C, with adjunctions L k ⊣ R k : E → C k , satisfying (E1)-(E2) and (A1)-(A4).Proof.Fix an arbitrary path embedding m : P ↣ R k a.By (A1), there is a finite set of paths P = {P 1 , . . ., P j } ⊆ C k p such that each path in C k is isomorphic to exactly one member of P. We can assume without loss of generality that P ∈ P.
For each path embedding p ∈ P (R k a), denote by T p the tree obtained by first considering the tree ↑p ⊆ P (R k a) and then replacing each node q (which is an isomorphism class of a path embedding) with the unique path P i ∈ P such that P i ∼ = dom(q).We assume that T p is reduced, i.e. given any two nodes x and y of T p that cover the same node, if the trees ↑x and ↑y are equal then x = y.(If T p is not reduced, we can remove branches in the obvious manner to obtain a maximal reduced subtree T ′ p .)We refer to T p as the type of p; note that this is a finite tree.In particular, if ⊥ is the root of P (R k a), we get a finite tree T ⊥ .Now, for each node x of T ⊥ , we shall define a path embedding m x into R k a whose domain belongs to P. The definition of m x is by induction on the height of x.Suppose x has height 0, i.e. x is the root of T ⊥ .Then x = P i for a unique i ∈ {1, . . ., j}.Define m x as the restriction of m to P i , i.e. the composition of m : P ↣ R k a with the unique embedding P i ↣ P .Next, suppose m z has been defined for all nodes z of height at most l, and let x be a node of height l + 1 labeled by some P j .We distinguish two cases: • If there is a node y ≥ x such that T m coincides with the tree ↑y ⊆ T ⊥ , then we let m x be the restriction of m to P j .Note that, in this case, the type of m x coincides with the tree ↑x ⊆ T ⊥ .Moreover, if z is the predecessor of x then m z will also be an appropriate restriction of m, and thus m x extends m z .• Otherwise, we let m x : P j ↣ R k a be any path embedding such that: (i) If p is the root of P (R k a), then it factors through R k f : R k a ↣ R k a, and so it yields an embedding φ p : dom(p) ↣ R k a. (ii) Suppose that p has height l + 1 and φ q has been defined whenever q has height at most l.We distinguish two cases: if p factors through R k f : R k a ↣ R k a, i.e. p = R k f • s p for some embedding s p , then we set φ p := s p .This is the case, in particular, when p ≤ m in P (R k a).Clearly, if p extends q then φ p extends φ q .
Otherwise, let q be such that p ≻ q.By inductive hypothesis, we can suppose that R k f • φ q coincides with an embedding m x : P j ↣ R k a in V (up to an isomorphism dom(q) ∼ = P j ) whose type coincides with the tree ↑x ⊆ T ⊥ .As q corresponds to a node y covering x labeled by some P h ∼ = dom(p), by definition of V there is an embedding m y : P h ↣ R k a in V such that m y extends m x , and the type m y coincides with ↑y.Since m y factors through R k f , precomposing with the isomorphism dom(p) ∼ = P h we get an embedding φ p : dom(p) ↣ R k a. Observe that φ p extends φ q .
The compatibility condition for the cocone W states that φ p extends φ q whenever p extends q, which is ensured by the definition above.Thus, W induces a morphism g : R k a → R k a and, by construction, g • m = m.Hence, m → m. □ The construction of k-extendable covers is akin to that of ω-saturated elementary extensions in model theory, where one starts with a first-order structure M and constructs an elementary extension M 1 of M in which all types over (finite subsets of) M are realised, then an elementary extension M 2 of M 1 in which all types over M 1 are realised, and so forth.The union of the induced elementary chain of models yields the desired ω-saturated elementary extension of M .
In the same spirit, we introduce a notion of k-extendability relative to a homomorphism, which models the one-step construction just outlined.Definition 7.3.Let h : a → b be an arrow in E. We say that b is k-extendable relative to h if the following property is satisfied for all e ∈ L k [C k ]: For all path embeddings m : P ↣ R k a and n : Suppose that, given an object a ∈ E, we are able to construct a section s : a → b such that b is k-extendable relative to s. Iterating this process countably many times, we obtain a k-extendable cover a → a * , thus settling Theorem 6.9.The main hurdle consists in establishing the following proposition; a proof is offered in Section 7.2.Proposition 7.4.For all a ∈ E and all k > 0 there is a section s : a → b such that b is k-extendable relative to s.
We can finally prove Theorem 6.9: Proof of Theorem 6.9.Let a ∈ E. By applying Proposition 7.4 repeatedly, we obtain a chain of sections By (A2), L k P is finitely presentable in E and so m # : L k P → a * factors through one of the colimit maps.Assume without loss of generality that m # factors through h j : b j → a for some j ≥ 1, so there is an arrow r : In particular, m j is an embedding because so is m.Since R k h j is a section, Remark 5.10 entails m j ⇄ m, and so (m j ) ⋆ ⇄ m ⋆ by Lemma 5.12(c).Because m ⋆ ⇄ n ⋆ , also (m j ) ⋆ ⇄ n ⋆ .Now, let n ′ : Q ↣ R k e be any path embedding such that n ≤ n ′ in P (R k e).Since b j+1 is k-extendable relative to s j+1 , there is a path embedding m ′ : Q ↣ R k b j+1 such that m ′ ⋆ ⇄ n ′ ⋆ and the following diagram commutes.Each such pair (u, v) induces a pushout square in E as follows.

⌜
This pushout square exists by (E1) and consists entirely of embeddings by virtue of (E2).
Proof.Just observe that, since Lv ⋆ → u # , there is g : LS v → a such that g • Lv ⋆ = u # .By the universal property of the pushout, there is an arrow h : a If i m : S m ↣ Ra is the canonical embedding, we get a commutative triangle as on the right-hand side above.Just observe that ι (m,n) : a → a + LP LS n be the corresponding arrow in the diagram D. To improve readability we shall write, respectively, ι, λ and t instead of ι (m,n) , λ (m,n) and t (m,n) .
Let n ′ : Q ↣ Re be a path embedding with n ≤ n ′ in P (Re).We must exhibit a path embedding m ′ : Q ↣ Rb such that the leftmost square below commutes and m Note that, because n ≤ n ′ , we get S n ′ ≤ S n in S Re.Thus, n ′ ⋆ can be identified with a path embedding into S n .Consider the arrow Lemma 7.7.ξ is an embedding.
Proof.By the first part of (A3), (n ′ ) # is an embedding.Then Ln ′ is an embedding since (n ′ ) # = ε e • Ln ′ , and so is Ln ′ ⋆ .It follows that λ • Ln ′ ⋆ is an embedding because it is a composition of embeddings, and ξ is an embedding by the second part of (A3).□ Lemma 7.7, combined with the fact that Rt is a section (hence an embedding), entails that the composite m ′ := Rt • ξ : Q ↣ Rb is an embedding.Moreover showing that the leftmost diagram in equation (2) commutes.Since Rt is a section, we have ξ ⇄ m ′ by Remark 5.10, and so ξ ⋆ ⇄ m ′ ⋆ by Lemma 5.12(c).Therefore, in order to show that m ′ ⋆ ⇄ n ′ ⋆ it suffices to prove that ξ ⋆ ⇄ n ′ ⋆ .We have ⋆ ; the proof of this fact will occupy us for the rest of this section.As C k is an arboreal category, S ξ is the colimit of its path embeddings.Thus, in order to define a morphism S ξ → S n ′ it suffices to define a compatible cocone with vertex S n ′ over the diagram of path embeddings into S ξ .By Lemma 5.12(a), the path embeddings into S ξ can be identified with the path embeddings into R(a + LP LS n ) that are comparable with ξ.For each such path embedding q : Q ′ ↣ R(a + LP LS n ), we shall define an arrow ζ q : Q ′ → Re and prove that these form a compatible cocone.We will then deduce, using the induced mediating morphism S ξ → Re, that ξ ⋆ → n ′ ⋆ .
Fix an arbitrary path embedding q : Q ′ ↣ R(a + LP LS n ) above ξ and consider the following diagram in E, where the four vertical faces are pullbacks.(3) Note that the previous diagram consists entirely of embeddings because q # is an embedding by the first part of (A3), and the pullback in E of an embedding exists by (E1) and is again an embedding.Because q is above ξ, there is an embedding Q ↣ Q ′ , and thus also an embedding P ↣ Q ′ .By the universal property of pullbacks, there are unique arrows ϑ : LP ↣ a and ∆ : LP ↣ LP making the following diagrams commute.Note in particular that µ 2 is a retraction whose right inverse is ∆.As µ 2 is also an embedding, it must be an isomorphism with (two-sided) inverse ∆.By (A4) (more precisely, by item (i) in Definition 6.8) there is an arrow w : P → Q a between paths such that Lw = ϑ.Hence, we can consider σ ♭ 2 : Q a → Ra.Note that and so σ ♭ 2 • w = m.In particular, w is an embedding.As Q a is a path, i w : S w ↣ Q a can be identified with the identity Q a → Q a .By Lemma 5.12(b), there is a unique arrow ψ q : Q a → S m making the following diagram commute.Hence, precomposing with µ 2 we get For convenience of notation, let us write γ q := L(f • ψ q ) : a → LS n and γ q := ε e • Li n • γ q : a → e.
With this notation we have

⌜
Now, note that by (E2) the top face of diagram (3), displayed in the rightmost diagram above, is a pushout in E. By the universal property of pushouts, there is a unique δ q : LQ ′ → e satisfying δ q • σ 1 = γ q and δ q • τ 1 = ε e • Li n • τ 2 .
Define ζ q := (δ q ) ♭ : Q ′ → Re for all path embeddings q : Q ′ ↣ R(a + LP LS n ) above ξ.Further, if q is below ξ, we let ζ q be the obvious restriction of ζ ξ .Lemma 7.9.The following family of arrows forms a compatible cocone over the diagram of path embeddings into S ξ : {ζ q | q : Q ′ ↣ R(a + LP LS n ) is a path embedding comparable with ξ}.
Proof.Fix arbitrary path embeddings q : Q ′ ↣ R(a + LP LS n ) and q ′ : Q ′′ ↣ R(a + LP LS n ) comparable with ξ.The compatibility condition for the cocone states that ζ q extends ζ q ′ whenever q ≥ q ′ .It suffices to settle the case where ξ ≤ q ≤ q ′ .Also, it is enough to show that δ q extends δ q ′ , i.e. δ q • L! = δ q ′ where !: Q ′′ ↣ Q ′ is the unique embedding.Just observe that δ q • L! = δ q ′ entails ζ q • != δ ♭ q • != ((δ ♭ q • !) # ) ♭ = (δ q • L!) ♭ = δ ♭ q ′ = ζ q ′ .Consider the following diagram all whose vertical faces are pullbacks and note that by (A4), and more precisely by item (ii) in Definition 6.8, the pullback of L! along σ 1 is of the form Lℓ for some arrow ℓ : In view of the definition of δ q ′ in terms of the universal property of pushouts, it suffices to show that δ q • L! satisfies (δ q • L!) • σ 1 = γ q ′ and (δ q • L!) The latter equation follows at once from the identity δ q • τ 1 = ε e • Li n • τ 2 .With regards to the former, we have Thus it suffices to show that γ q • Lℓ = γ q ′ , and this clearly follows if we prove that γ q • Lℓ = γ q ′ .Recall that ψ q ′ is the unique morphism such that the composite The previous lemma entails the existence of a unique morphism h : S ξ → Re satisfying h • q = ζ q for all path embeddings q into R(a + LP LS n ) that are comparable with ξ.In order to conclude that ξ ⋆ → n ′ ⋆ as desired, we prove the following useful property of the cocone consisting of the morphisms ζ q .Lemma 7.10.Let G := LR and consider the composite morphism RLS n RGe Re.
Proof.Suppose that q = Rλ • α for some α : Q ′ ↣ RLS n .We have By the universal property of δ q = ζ # q , ζ q = Rε e • RLi n • α if, and only if, and Observe that and λ is a monomorphism.Thus, equation (4) holds.Further, note that and so τ 1 in diagram ( 3) is an isomorphism.As pushout squares of embeddings in E are also pullbacks by (E2), µ 1 in diagram (3) is also an isomorphism.Therefore, and so α # • σ 1 = γ q .Equation ( 5) then follows at once.□ Since ξ = Rλ • (Ln ′ ⋆ ) ♭ , recalling that we identify n ′ ⋆ with a path embedding into S n , an application of the previous lemma with α := (Ln ′ ⋆ ) ♭ yields In other words, h • ξ ⋆ = n ′ and so ξ ⋆ → n ′ .It follows from Remark 5.13 that ξ ⋆ → n ′ ⋆ , thus concluding the proof of Proposition 7.4.Remark 8.3.It is enough to consider the Ehrenfeucht-Fraïssé resource-indexed arboreal cover of Struct(σ) by R E (σ), rather than the resource-indexed arboreal adjunction between Struct(σ) and R E (σ I ) in Example 3.21, because every existential positive sentence (with quantifier rank at most k) is equivalent to one (with quantifier rank at most k) that does not use the equality symbol.
In a similar fashion, we deduce the following result for classes of finite σ-structures: Corollary 8.4.On any class of finite σ-structures whose cores have tree-depth at most k, every first-order sentence that is preserved under homomorphisms is also definable by an existential positive sentence of quantifier rank at most k.
Note that these are not equi-resource homomorphism preservation theorems, as the quantifier rank of the ensuing existential positive sentence is bounded by the tree-depth of the class of (cores of) structures under consideration, which may be larger than the quantifier rank of the first-order sentence we started with.
On the other hand, since we did not assume in Proposition 8.2 that D is saturated under ↔ C k , Corollary 8.4 holds, more generally, for all (not necessarily first-order definable) Boolean queries; see e.g.[32, §2.1] for the latter notion.Generalisations to non-Boolean queries are also available, by considering extensions of the Ehrenfeucht-Fraïssé resourceindexed arboreal cover to categories of n-pointed σ-structures.

Ehrenfeucht-
Fraïssé game: In the ith round, Spoiler chooses an element in one of the structures and Duplicator responds by choosing an element in the other structure.After k rounds have been played, we have sequences [a 1 , . . ., a k ] and [b 1 , . . ., b k ] of elements from A and B respectively.Duplicator wins this play if the ensuing relation r := {(a i , b i ) | 1 ≤ i ≤ k} is a partial isomorphism.Duplicator wins the k-round game if they have a strategy which is winning after i rounds, for all 1 ≤ i ≤ k.Bisimulation game: Suppose σ is a modal vocabulary.The game is played between pointed Kripke structures (A, a) and (B, b), where a ∈ A and b ∈ B. The initial position is (a 0 , b 0 ) = (a, b).In the ith round, with current position (a i−1 , b i−1 ), Spoiler chooses one of the two structures, say A, a binary relation symbol R in σ, and an element a i ∈ A such that (a i−1 , a i ) ∈ R A .Duplicator responds by choosing an element in the other structure, say b i ∈ B, such that (b i−1 , b i ) ∈ R B .If Duplicator has no such response, they lose.Duplicator wins the k-round game if, for all unary relation symbols P in σ, we have P A (a i ) ⇔ P B (b i ) for all 0 ≤ i ≤ k.Assume the vocabulary σ is finite.The classical Ehrenfeucht-Fraïssé theorem [21, 22] states that Duplicator has a winning strategy in the k-round Ehrenfeucht-Fraïssé game played between A and B if, and only if, A and B satisfy the same first-order sentences of quantifier rank at most k.Similarly, Duplicator has a winning strategy in the k-round bisimulation game played between pointed Kripke structures (A, a) and (B, b) if, and only if, (A, a) and (B, b) satisfy the same modal formulas of modal depth at most k [25].

Lemma 3 . 2 .
Let (Q, M) be a proper factorisation system in C. The following hold: (a) Q and M are closed under compositions.(b) Q contains all retractions, M contains all sections, and Q∩M = {isomorphisms}.(c) The pullback of an M-morphism along any morphism, if it exists, is in M.

3. 3 .
Bisimilarity and back-and-forth systems.Throughout this section, we fix an arbitrary arboreal category C. A morphism f : X → Y in C is said to be open if it satisfies the following path-lifting property: Given any commutative square P X Q Y f with P, Q paths, there is an arrow Q → X making the two triangles commute.(If such an arrow exists, it is automatically an embedding.)Further, f is a pathwise embedding if, for all path embeddings m : P ↣ X, the composite f • m : P → Y is a path embedding.Combining these notions, we can define a bisimilarity relation between objects of C: Definition 3.11.Two objects X, Y of C are said to be bisimilar if there exist an object Z of C and a span of open pathwise embeddings X ← Z → Y .Remark 3.12.The definition of open morphism given above is a refinement of the one introduced in [30] (cf.[7, §4.1] for a discussion of the relation between these notions), which is a special case of the (axiomatic) concept of open map in toposes [29].
This induces a corresponding tower of full subcategories C k of C, with the objects of C k those whose cocone of path embeddings with domain in C k p is a colimit cocone in C. It turns out that each category C k is arboreal.Furthermore, the paths in C k are precisely the objects of C k p , i.e. (C k ) p = C k p .Cf. [7, Proposition 7.7] and its proof.Example 3.15.Consider the arboreal category R E (σ) from Example 3.7.This can be regarded as a resource-indexed arboreal category by taking as C k be the vocabulary obtained by adding a fresh binary relation symbol I to σ.Any σstructure can be expanded to a σ I -structure by interpreting I as the identity relation.This yields a fully faithful functor J : Struct(σ) → Struct(σ I ).The functor J has a left adjoint H : Struct(σ I ) → Struct(σ) which sends a σ I -structure A to the quotient of the σ-reduct of A by the equivalence relation generated by I A [19, Cf. [9, Theorems 3.2 and 5.1] and [9, Theorem 10.5], respectively.We also mention that ∼ = E k coincides with equivalence in the extension of FO k with counting quantifiers [9, Theorem 5.3(2)], although we shall not need this fact.Example 3.22.Suppose σ is a finite modal vocabulary and consider the relations → M k and ∼ = M k on Struct • (σ) induced by the modal resource-indexed arboreal cover of Struct • (σ) by R M k (σ) in Example 3.17.For all pointed Kripke structures (A, a), (B, b) and all k > 0, we have whenever there is an arrow a → b in E with a ∈ D, also b ∈ D. Note that, when E = Struct(σ) and D = Mod(φ) is the model class of some sentence φ, the category D is closed under morphisms precisely when φ is preserved under homomorphisms.Consider the following statement, where → C k and ↔ C k are the relations on the objects of E induced by the resource-indexed arboreal adjunction as in Definition 3.19: (HP) For any full subcategory D of E saturated under ↔ C k , D is closed under morphisms precisely when it is upwards closed with respect to → C k .Replacing the relation ↔ C k with ∼ = C k , we obtain a strengthening of (HP), namely: (HP # ) For any full subcategory D of E saturated under ∼ = C k , D is closed under morphisms precisely when it is upwards closed with respect to → C k .Just recall that ∼ = C k ⊆ ↔ C k , and so any full subcategory D saturated under ↔ C k is also saturated under ∼ = C k .Thus, (HP # ) entails (HP).

Remark 4 . 3 .
By Lemma 3.20(a), any full subcategory of E that is upwards closed with respect to → C k is closed under morphisms.Hence, the right-to-left implications in (HP) and (HP # ) are always satisfied.In view of Example 3.21 and Lemma 4.1, for the Ehrenfeucht-Fraïssé resource-indexed arboreal adjunction between Struct(σ) and R E (σ I ), property (HP) coincides with Rossman's equirank homomorphism preservation theorem (Theorem 1.2).

5. 1 .
Tame: bisimilar companion property and idempotency.For all k > 0, write G k := L k R k for the comonad on E induced by the adjunction L k ⊣ R k : E → C k .Definition 5.1.A resource-indexed arboreal adjunction between E and C, with induced comonads G k , has the bisimilar companion property if a ↔ C k G k a for all a ∈ E and k > 0. Proposition 5.2.(HP) holds for any resource-indexed arboreal adjunction between E and C satisfying the bisimilar companion property.Proof.For the left-to-right implication in (HP), let D be a full subcategory of E closed under morphisms and saturated under ↔ C k .Suppose that a → C k b for objects a, b of E. By definition, this means that there is an arrow R k a → R k b and so, as L k is left adjoint to R k , there is an arrow G k a → b.Using the bisimilar companion property, we get a ↔ C k G k a → b.Therefore, if a ∈ D then also b ∈ D. That is, D is upwards closed with respect to → C k .The converse direction follows from Remark 4.3.□

Definition 5 . 3 .
A resource-indexed arboreal adjunction between E and C is idempotent if so are the induced comonads G k , for all k > 0.Proposition 5.4.(HP # ) holds for any idempotent resource-indexed arboreal adjunction between E and C.

Example 5 . 9 .
The Ehrenfeucht-Fraïssé resource-indexed arboreal adjunction between Struct(σ) and R E (σ I ) does not have the bisimilar companion property.Suppose that σ = {R} consists of a single binary relation symbol and let A be the σ-structure with underlying set {a, b} satisfying R A = {(a, b), (b, a)}.In view of Examples 3.18 and 3.21, it suffices to find k > 0 and a first-order sentence φ of quantifier rank ≤ k such that A ⊨ φ and HE k JA ̸ ⊨ φ.Let φ be the sentence ∀x∀y (x ̸ = y ⇒ xRy) of quantifier rank 2 stating that any two distinct elements are R-related.Then φ is satisfied by A but not by HE k JA, because the sequences [a] and [b] are not R-related in HE k JA.This shows that the bisimilar companion property fails for all k ≥ 2.

Remark 5 . 10 .
Further, we write a ⇄ b to indicate that a → b and b → a, i.e. a and b are homomorphically equivalent.This applies in particular to coslice categories.Recall that, for any c ∈ A, the coslice category c/A (also known as under category) has as objects the arrows in A with domain c.For any two objects m : c → a and n : c → b of c/A, an arrow f : m → n in c/A is a morphism f : a → b in A such that f • m = n.Hence, m ⇄ n in c/A precisely when there are arrows f : a → b and g : b → a in A satisfying f • m = n and g • n = m.We shall represent this situation by means of the following diagram: Note that m ⇄ n in c/A whenever there is a section (a) P S m is isomorphic to the subtree of P a consisting of the elements that are comparable with m.(b) For all path embeddings n : P ↣ b and arrows f : a → b such that f • m = n, there is a unique g : S m → S n making the following diagram commute.For all path embeddings n : P ↣ b, if m → n then m ⋆ → n ⋆ .

Proposition 5 . 16 .
Consider a resource-indexed arboreal adjunction between E and C such that C k p is locally finite for all k > 0. For all k-extendable objects a, b of E admitting a product, we have a ⇄ C k b if and only if a ↔ C k b.Proof.Fix an arbitrary k > 0 and recall that C k is an arboreal category.The "if" part of the statement follows from the inclusion ↔ C k ⊆ ⇄ C k .For the "only if" part suppose that a ⇄ C k b, i.e.R k a and R k b are homomorphically equivalent in C k .To improve readability, let X := R k a and Y := R k b.We must prove that X and Y are bisimilar.As X and Y admit a product in C k , namely the image under R k of the product of a and b in E, by Theorem 3.14 it suffices to show that X and Y are back-and-forth equivalent.
Proof.Fix a full subcategory D of E saturated under ↔ C k .For the non-trivial implication in (HP), assume D is closed under morphisms and let a, b ∈ E satisfy a → C k b and a ∈ D.

k a b s t − 1
Let s : a → a * and t : G k a → (G k a) * be sections with a * and (G k a) * k-extendable objects.It follows from Lemma 3.20(a) that a ⇄ C k a * and G k a ⇄ C k (G k a) * .By Lemma 3.20(b) we have a ⇄ C k G k a and so, by transitivity, a * ⇄ C k (G k a) * .An application of Proposition 5.16 yields a * ↔ C k (G k a) * .We thus have the following diagram, where t −1 denotes the left inverse of t. a * ↔ C k (G k a) * a ⇄ C k G Since a ∈ D, and D is saturated under ↔ C k and closed under morphisms, all the objects in the diagram above sit in D. In particular, b ∈ D and thus (HP) holds.□ 5.3.
natural in c ∈ C and e ∈ E. Explicitly, f ♭ is defined as the composite c RLc Re ηc Rfwhere η is the unit of the adjunction L ⊣ R. The inverse of the function f → f ♭ sends g ∈ C(c, Re) to the morphism g # given by the composition

7. 1 .Remark 7 . 1 . 9 . 7 . 2 .
Relative extendability.For all k > 0, we denote by C k the full subcategory of C k whose objects are colimits of finite diagrams of embeddings in C k p .Further, we write L k [C k ] for the full subcategory of E defined by the objects of the form L k c for c ∈ C k .It follows from (A1) that C k is equivalent to a finite category.Therefore L k [C k ] contains, up to isomorphism, only finitely many objects.As we shall see in the following lemma, every path embedding P ↣ R k a is homomorphically equivalent to one of the form P ↣ R k a with a ∈ L k [C k ].Consequently, in the definition of k-extendable object (see Definition 5.14) we can assume without loss of generality that e ∈ L k [C k ].This observation, combined with Remark 7.1, will allow us to control the size of the diagrams featuring in the proof of Theorem 6.Lemma For all path embeddings m : P ↣ R k a, there are a ∈ L k [C k ] and a path embedding m : P ↣ R k a such that m ⇄ m in P/C k .
(i) The type of m x coincides with the tree ↑x ⊆ T ⊥ .(ii) m x extends m z , where z is the predecessor of x.Note that such an embedding m x exists because x ∈ ↑z ⊆ T ⊥ and, by inductive hypothesis, ↑z coincides with the type of m z .The setV := {m x | x ∈ T ⊥ }is finite and contains m.We regard V as a cocone over a finite diagram D of paths and embeddings between them.Let a := L k (colim D) and note that a∈ L k [C k ].The functor L k preserves colimits because it is left adjoint, hence a is the colimit in E of the diagram L k D. The cocone {n # | n ∈ V } with vertex a over L k D then factors through a unique morphism f : a → a.By construction, m : P ↣ R k a factors through R k f , and so there is m : P ↣ a such that m = R k f • m.Hence, m → m.Next, with the aim of showing that m → m, we shall define a morphism R k a → R k a.As R k a is path generated, it suffices to define a coconeW = {φ p | p ∈ P (R k a)}with vertex R k a over the diagram of path embeddings into R k a. Suppose p ∈ P (R k a).We define the corresponding arrow φ p by induction on the height of p: the identity of a. □ We let D be the diagram in E consisting of all the morphisms ι (u,v) : a → a + LP LS v as above.Because C k is locally finite and e varies among the objects of L[C k ], choosing representatives for isomorphism classes in an appropriate way we can assume by Remark 7.1 that D is a small diagram.By (E1), D admits a colimit b := colim D. In other words, b is obtained as a wide pushout in E. Denote by s : a → b the colimit map with domain a, and by t (u,v) : a + LP LS v → b the colimit map corresponding to the arrow ι (u,v) .As all arrows in D are sections by Lemma 7.6, so are the colimit maps.In particular, s : a → b is a section.We claim that b is k-extendable relative to s, thus settling Proposition 7.4.Assume we are given path embeddings m : P ↣ Ra and n : P ↣ Re, with e ∈ L[C k ], such that m ⋆ ⇄ n ⋆ as displayed in the leftmost diagram below.

2 im 7 . 8 . 2 L
LemmaThe following diagram commutes.(f•ψq) Proof.Note that i m • ψ q • w = σ ♭ 2 • w = m = i m • m ⋆ and so ψ q • w = m ⋆ since i m isa monomorphism.Applying the functor L to the outer commutative diagram on the left-hand side below, we obtain the commutative diagram on the right-hand side.
arboreal cover of E by C is a resource-indexed arboreal adjunction between E and C such that all adjunctions L k ⊣ R k are comonadic, i.e. for all k > 0 comparison functor from C k to the category of Eilenberg-Moore coalgebras for the comonad G k := L k R k is an isomorphism.which forgets the forest order.This functor is comonadic.The right adjoint R E k sends a σ-structure A to E k (A) equipped with the prefix order, and the comonad induced by this adjunction coincides with the k-round Ehrenfeucht-Fraïssé comonad E k .This gives rise to a resource-indexed arboreal cover of Struct(σ) by R E (σ).
6That is, for any embeddingP ↣ Q in C with P, Q paths, if Q ∈ C k p then also P ∈ C k p .We shall further assume that each category C k p contains the initial object of C.the where φ and ψ are isomorphisms.By Lemma 5.15, φ • e and ψ • e ′ are inverse to each other, thus the left-hand diagram below commutes.
and arrows s ′ : S m ′ → S n ′ and t ′ : S n ′ → S m ′ making the righthand diagram above commute.It follows that m ′ , n ′ ∈ B; just observe that P s ′ for all i ≥ 1. Denote the previous diagram by D and let a * be the colimit of D in E, which exists by (E1).Let h i : b i → a * be the colimit map with domain b i , and s : a → a * the one with domain a.As all the arrows in D are sections, so are the colimit maps; in particular, s is a section.We claim that a * is k-extendable.Suppose m : P ↣ R k (a * ) and n : P ↣ R k e are path embeddings such that m ⋆ ⇄ n ⋆ .By Lemma 7.2, we can assume without loss of generality that e ∈ L k [C k ].
Again by Remark 5.10 and Lemma 5.12(c) we get m ′′ ⋆ ⇄ m ′ ⋆ , and thus m ′′ ⋆ ⇄ n ′ ⋆ .This shows that a * is k-extendable.□ 7.2.Proof of Proposition 7.4.Fix an object a of E and a positive integer k.To improve readability, we drop the subscript from L k and R k , and simply write L and R (but continue to denote by C k the arboreal category).We must find a section s : a → b such that b is k-extendable relative to s.Consider all pairs of path embeddings Remark 7.5.Note that Lv ⋆ → u # entails that Lv ⋆ is an embedding.Just observe that u # is an embedding by the first part of (A3).
(u : P ↣ Ra, v : P ↣ Re) in C k such that e ∈ L[C k ] and Lv ⋆ → u # in LP/E.