Adjoint functors and tree duality

A family T of digraphs is a complete set of obstructions for a digraph H if for an arbitrary digraph G the existence of a homomorphism from G to H is equivalent to the non-existence of a homomorphism from any member of T to G. A digraph H is said to have tree duality if there exists a complete set of obstructions T consisting of orientations of trees. We show that if H has tree duality, then its arc graph delta H also has tree duality, and we derive a family of tree obstructions for delta H from the obstructions for H. Furthermore we generalise our result to right adjoint functors on categories of relational structures. We show that these functors always preserve tree duality, as well as polynomial CSPs and the existence of near-unanimity functions.


Introduction
Our primary motivation is the H-colouring problem (which has become popular under the name Constraint Satisfaction Problem-CSP ): for a fixed digraph H (a template) decide whether an input digraph G admits a homomorphism to H. The computational complexity of H-colouring depends on the template H. For some templates the problem tractable bounded treewidth duality tree duality nuf bounded height tree duality δ π C fin. duality Figure 1: The structure of tractable templates is known to be NP-complete, for others it is tractable (a polynomial-time algorithm exists). Assuming that P = NP, infinitely many complexity classes lie strictly between P and NP [10], but it has been conjectured that H-colouring belongs to no such intermediate class for any template H [3]. This conjecture has indeed been proved for symmetric templates H [5].
In this paper the focus is on tractable cases. Several conditions are known to imply the existence of a polynomial-time algorithm for H-colouring (definitions follow in the next two paragraphs): it is the case if H has a near-unanimity function (nuf), if H has bounded-treewidth duality, if H has tree duality, if H has finite duality (see [2,3,7]). Some of the conditions are depicted in the diagram (Fig. 1).
A digraph is a tree (has treewidth k) if its underlying undirected graph is a tree (has treewidth k, respectively). A set F of digraphs is a complete set of obstructions for H if for an arbitrary digraph G there exists a homomorphism from G to H if and only if no F ∈ F admits a homomorphism to G. A template has bounded-treewidth duality if it has a complete set of obstructions with treewidth bounded by a constant; it has tree duality if it has a complete set of obstructions consisting of trees; and it has finite duality if it has a finite complete set of obstructions.
There is a fairly straightforward way to generate templates with finite duality. For an arbitrary tree T there exists a digraph D(T ) such that {T } is a complete set of obstructions for D(T ). The digraph D(T ) is unique up to homomorphic equivalence * ; it is called the dual of T . Several explicit constructions are known (see [4,9,15,16]). If F is a finite set of oriented trees, then the product D = T ∈F D(T ) is a template with finite duality and F is a complete set of obstructions for D. This construction yields all digraphs with finite duality [15], thus also proving that finite duality implies tree duality.
Encouraged by the full description of finite dualities, we aim to provide a construction for some more digraphs with tree duality. To this end we use the arc-graph construction and consider the class δ π C of digraphs generated from finite duals by taking iterated arc graphs and finite Cartesian products. We show that all templates in this class have tree duality. We provide an explicit construction of the resulting tree obstructions, which allows us to show that all the digraphs in δ π C have in fact bounded-height tree duality, that is, they have a complete set of obstructions consisting of trees of bounded algebraic height (these are tree obstructions that allow a homomorphism to a fixed directed path). In this context we also prove that the problem of existence of a complete set of obstructions consisting of trees with bounded algebraic height is decidable.
The arc-graph construction is a special case of a more general phenomenon: it is a right adjoint in the category of digraphs and homomorphisms. We show in the more general setting of the category of relational structures that right adjoints (characterised by Pultr [17] for all locally presentable categories) preserve tractability of templates and moreover they preserve tree duality and existence of a near-unanimity function. In this case, nevertheless, it remains open to provide a nice general description of complete sets of obstructions.
We use some notions and properties of graphs and homomorphisms which the reader can look up in [6], as well as some category-theory notions, for which, e.g. [1,13] may be consulted.

Arc graphs and tree duality
Notice that δ is an endofunctor * * in the category of digraphs and homomorphisms. This implies in particular that if G → H, then δG → δH. (The notation G → H means that there exists a homomorphism from G to H.) If G is a digraph and ∼ is an equivalence relation on its vertex set V (G), the quo- of ∼ on V (G), and for X, Y ∈ V (G)/∼ we have (X, Y ) ∈ A if and only if there exist x ∈ X and y ∈ Y such that (x, y) ∈ A(G).
In the following, we use the notation V ′ (G) = V ′ , A ′ (G) = A ′ and ∼ 0 and ∼ for the sets and relations appearing in the definition of δ −1 ; the precise meaning will be clear from the context. Now δ −1 is also an endofunctor in the category of digraphs. Strictly speaking, it is not an inverse of δ; its name is chosen because of the following property. Proof. Let f : G → δH be a homomorphism. Then there exist two homomorphisms . Thereforeĝ is constant on the equivalence classes of ∼, and it induces a homomorphism from Thus δ and δ −1 are Galois adjoints * with respect to the ordering by existence of homomorphisms. They are in fact adjoint functors in the category of digraphs and homomorphisms. We return to this topic in Section 4. For the moment we aim to prove that δ preserves tree duality. More precisely, from the family T of tree obstructions of H, we will derive the family Sproink(T ) of tree obstructions of δH.
The algebraic height of an oriented tree T is the minimum number of arcs of a directed path to which T maps homomorphically. The algebraic height of every finite oriented tree is well-defined and finite, since every such tree admits a homomorphism to some finite directed path. Thus a tree T is of height at most one if its vertex set can be split into two parts 0 T , 1 T in such a way that for every arc (x, y) of T we have x ∈ 0 T and y ∈ 1 T . Note that if the tree T has no arcs, then it has only one vertex and thus one of the sets 0 T , 1 T is empty and the other one is a singleton.
Let T be a tree. For every vertex u of T , let F (u) be a tree of height at most one. For each arc e of T incident with u, let there be a fixed vertex v(e, F (u)) in F (u) such that if u is the initial vertex of e, then v(e, F (u)) ∈ 1 F (u) , and if u is the terminal vertex of e, then v(e, F (u)) ∈ 0 F (u) . * * A tree S is now constructed by taking all the trees F (u) for all vertices u of T , and by identifying the vertex v(e, F (u)) with v(e, F (u ′ )) whenever e = (u, u ′ ) is an arc of T .
Any such tree S constructed from T by the above procedure is called a sproink of T . The set of all sproinks of a tree T is denoted by Sproink(T ). The following lemma asserts that sproinks of obstructions for a template H are indeed obstructions for its arc graph δH.
Proof. We prove that T → δ −1 S. Consequently δ −1 S H because T H, and therefore S δH by Proposition 1. Thus let S ∈ Sproink(T ). For a vertex u of T , consider the tree F (u), which is a subgraph of S. Since F (u) has height at most one, its vertices are partitioned into the sets 0 F (u) and 1 F (u) . The set V ′ (S), which appears in the definition of δ −1 S, contains V ′ (F (u)) as a subset. If (x, y) is an arc of F (u), then t x ∼ 0 o y . Thus whenever In this way, we have defined a mapping f : is an arbitrary arc of T . Then the vertex v(e, F (u)), which belongs to 1 F (u) , has been identified with v(e, F (v)), which belongs to 0 For a set F of trees, let Sproink(F) = T ∈F Sproink(T ).

Theorem 3. Let F be a set of trees which is a complete set of obstructions for a template H. Then Sproink(F) is a complete set of obstructions for δH.
Proof. Lemma 2 implies that Sproink(F) is a set of obstructions for δH. It remains to prove that it is complete, that is whenever G δH, then there exists some S ∈ Sproink(F) such that S → G.
So let G δH. Thus by Proposition 1 we have δ −1 G H. Hence there exists a tree T ∈ F such that T → δ −1 G, because F is a complete set of obstructions for H. Consequently it suffices to prove that if T → δ −1 G then there exists S ∈ Sproink(T ) such that S → G.
Thus assume that f : Then f (u) = 1 u ∪ 0 u , and by the definition of ∼ as the least equivalence containing ∼ 0 , there exists a tree F (u) of height at most one and a homomorphism g u :

Figure 2: A thunderbolt
We then select y ∈ 1 F (u) and z ∈ 0 F (v) such that g u (y) = g v (z) = x, and identify them. Proceeding with all such identifications, we construct a tree S ∈ Sproink(T ) such that g = u∈V (T ) g u : S → G is a well-defined homomorphism.
Corollary 4. If a digraph H has tree duality, then its arc graph δH also has tree duality.
Example. Consider T = P 4 , the directed path with four arcs, and its dual D = T 4 , the transitive tournament on four vertices. Here δD has six vertices, but its core * is the directed path P 2 with two arcs. It is well known that a directed graph G admits a homomorphism to P 2 if and only if it does not admit a homomorphism from a "thunderbolt", that is, an oriented path with two forward arcs at the beginning and at the end, and with an odd-length alternating path between them (see Fig. 2). Thus the family of all thunderbolts is a complete set of tree obstructions for P 2 .
Our construction Sproink(T ) gives all obstructions obtained by stacking five trees L 0 , L 1 , L 2 , L 3 , L 4 of height at most one, with one top vertex of L i identified with one bottom vertex of L i+1 for i = 0, 1, 2, 3. The example of thunderbolts shows that in fact L 0 can be restricted to a single (top) vertex, and L 4 can be restricted to a single (bottom) vertex. The same holds for leaves of general trees. Also, L 1 , L 2 , L 3 can be restricted to paths of height one, and it is also true in general that it is sufficient to consider sproinks obtained by replacing vertices by paths of height at most one. In fact the name "sproink" is inspired by picturing such a path springing out of every non-leaf of T .
The results of this section show that we can construct an interesting class of templates with tree duality by repeatedly applying the arc-graph construction to digraphs with finite duality. Moreover, if templates H 1 , H 2 , . . . , H k all have tree duality, then also their product H 1 × H 2 × · · · × H k has tree duality as the union of the respective complete sets of obstructions of the factors is a complete set of obstructions for the product. The resulting class of templates is subject to examination in the next section. * The core of a digraph is any of its smallest subgraphs to which it admits a homomorphism. Every digraph H has a unique core C (up to isomorphism), which is moreover the only core homomorphically equivalent to it. In fact, the core C of H is a retract of H, which means that there exists a homomorphism ρ : H → C whose restriction on C is the identity mapping (such a homomorphism is called a retraction).

Finite duality
Following [15], every tree T admits a dual D(T ) such that for every digraph G, we have G → D(T ) if and only if T G. A digraph H has finite duality if and only if it is homomorphically equivalent to a finite product of duals of trees.
In this section, we consider the class δ π C, the smallest class of digraphs that contains all duals of trees and is closed under taking arc graphs, finite products and homomorphically equivalent digraphs. It follows from Corollary 4 that all elements of δ π C have tree duality. Moreover we know how to construct a complete set of obstructions for each of these templates, using iterated Sproink constructions and unions. The question then arises as to how significant the class δ π C is within the class of digraphs with tree duality. It turns out that the digraphs in δ π C have properties that are not shared by all digraphs with tree duality.
A digraph H has bounded-height tree duality provided there exists a constant m such that H admits a complete set of obstructions consisting of trees of algebraic height at most m.
Proposition 5. (i) Every core in δ π C admits a near-unanimity function.
(ii) Every member of δ π C has bounded-height tree duality.
Proof. (i): By Corollary 4.5 of [11], every structure with finite duality admits a nearunanimity function. Therefore it suffices to show that the class of structures admitting a near-unanimity function is closed under taking cores, finite products and the arc-graph construction.
Let C be the core of H, ρ : H → C a retraction and f : H k → H a near-unanimity function. Since C is an induced subgraph of H, the restriction ρ • f ↾ C k is a nearunanimity function on C. Now suppose that f : H k → H is a near-unanimity function. Then (δH) k is naturally isomorphic to δ(H k ), and we define g : (δH) k → δH by The fact that f is a homomorphism implies that g is well defined, and g is a homomorphism by the definition of adjacency in δH. Also, g clearly satisfies the near-unanimity identities, so it is a near-unanimity function on δH.
(ii): The class of digraphs with bounded-height tree duality is obviously preserved by taking cores and finite products. By Theorem 3, if H has a complete set of obstructions consisting of trees of algebraic height at most k, then δH has a complete set of obstructions consisting of trees of algebraic height at most k + 1, so the class of digraphs with bounded-height tree duality is also preserved by the arc-graph construction.
We know a core digraph with tree duality but no near-unanimity function and no bounded-height tree duality. (The example is complicated and out of the scope of this paper, therefore we omit it.) Thus the class δ π C does not capture all core digraphs with tree duality. The problem of generating all structures with tree duality by means of suitable functors applied to structures with finite duality remains nevertheless interesting.
Membership in δ π C is not known to be decidable. In the remainder of this section, we show that bounded-height tree duality is decidable.

(3) There exists a directed (upward) path from the first projection to the second in
Proof. (1) ⇒ (2): The two subgraphs obtained from H * n by removing the two ends both admit homomorphisms to H. Therefore, if a tree obstruction of H admits a homomorphism to H * n , its image must intersect the two ends hence its algebraic length must be at least n.
¬(1) ⇒ ¬(2): Let T be a critical obstruction of H of algebraic length n + 2. Let T 0 , T n be the subgraphs of T obtained by removing the vertices of height 0 and n + 2 respectively. Then there exists homomorphisms f 0 : T 0 → H and f n : T n → H. Let h : T → P n+2 be the height function of T . We define a map f : T → H * n by Therefore f is a homomorphism.

Corollary 7. The problem whether an input digraph has bounded-height tree duality is decidable.
Proof. It is decidable whether a digraph has tree duality [3] (see Theorem 11 below). For a digraph with tree duality, bounded height of the obstructions (the condition (1) of Theorem 6) is equivalent to the condition (3), which involves directed reachability in a finite graph. Hence bounded-height tree duality is decidable.

Adjoint functors and generation of tractable templates
The correspondence of Proposition 1 can be extended to a wide class of functors presented in this section. To illustrate this extension, we first redefine δ in terms of patterns. Let P be the digraph with vertices 0, 1 and arc (0, 1), and Q the digraph with vertices 0, 1, 2 and arcs (0, 1), (1,2). Furthermore let q 1 , q 2 : P → Q be the homomorphisms mapping the arc (0, 1) to (0, 1) and (1,2) respectively. For an arbitrary digraph G, its arc graph δG can be described as follows: The vertices of δG are the arcs of G, that is, the homomorphisms f : P → G. The arcs of δG are the couples of consecutive arcs in G, that is, the couples (f 1 , f 2 ) such that there exists a homomorphism g : Q → G satisfying g • q 1 = f 1 and g • q 2 = f 2 . Thus the functor δ is generated by the pattern {P, (Q, q 1 , q 2 ))} in a way that generalises quite naturally. The rest of this section deals with relational structures. A vocabulary is a finite set σ = {R 1 , . . . , R m } of relation symbols, each with an arity r i assigned to it. A σ-structure is a relational structure A = A; R 1 (A), . . . , R m (A) where A is a non-empty set called the universe of A, and R i (A) is an r i -ary relation on A for each i. Homomorphisms of relational structures are relation-preserving mappings between universes; a homomorphism is defined only between structures with the same vocabulary. Cores, trees, quotient structures, etc. can also be defined in the context of relational structures, consult [12] for the details (see also [8,11]). The notions of the constraint satisfaction problem, template, and tree duality also carry over naturally from the setting of digraphs.
Let σ and τ be two vocabularies. Let P be a σ-structure, and for every relation R of τ of arity r = a(R), let Q R be a σ-structure with r fixed homomorphisms q R,i : P → Q R for i = 1, . . . , r. Then the family {P } ∪ {(Q R , q R,1 , . . . , q R,a(R) ) : R ∈ τ } defines a functor Ψ from the category A of σ-structures to the category B of τ -structures as follows.
• For a σ-structure A, let B = ΨA be a τ -structure whose universe is the set of all homomorphisms f : P → A.
• For every relation R of τ of arity r = a(R), let R(B) be the set of r-tuples (f 1 , . . . , f r ) such that there exists a homomorphism g : Q R → A such that for i = 1, . . . , r we have g • q R,i = f i .
It was shown by Pultr [17] that functors Ψ defined by means of patterns are right adjoints into a category of relational structures characterised by axioms of a specific type. We exhibit their corresponding left adjoints Ψ −1 in the case when both the domain and the range of Ψ is the category of all relational structures with a given vocabulary.
For every τ -structure B, we define a σ-structure Ψ −1 B = A/∼, where • A is a disjoint union of σ-structures; for every element x of the universe of B, A contains a copy P x of P , and for every R ∈ τ and (x 1 , . . . , x r ) ∈ R(B), A contains a copy Q R,(x 1 ,...,xr) of Q R .
Corollary 9. If a σ-structure A has polynomial CSP, then the τ -structure ΨA also has polynomial CSP.
In fact, Corollary 4 generalises as follows.
Theorem 10. If a σ-structure A has tree duality, then the τ -structure ΨA also has tree duality.
We prove Theorem 10 using Feder and Vardi's characterisation of structures with tree duality. For a σ-structure A, let UA be the σ-structure defined as follows. The universe of UA is the set of all nonempty subsets of A, and for R ∈ σ of arity r, R(UA) is the set of all r-tuples (X 1 , . . . , X r ) such that for all j ∈ {1, . . . , r} and x j ∈ X j there exist x k ∈ X k , k ∈ {1, . . . , r} \ {j} such that (x 1 , . . . , x r ) ∈ R(A).
Unlike the case of the arc-graph construction, we are unable to provide an explicit description of the tree obstructions of ΨA in terms of those of A for a general right adjoint Ψ. However, in isolated cases we can do it, as the following example shows.
Let T be a tree of algebraic height h and consider the unique homomorphism t from T to the directed path P h . The arcs of T are of two kinds: blue arcs A b (T ) = {(x, y) : t(x) = 2k, t(y) = 2k + 1 for some integer k} and red arcs A r (T ) = {(x, y) : t(x) = 2k + 1, t(y) = 2k + 2 for some integer k}. We define two equivalence relations on the vertices of T : x ∼ b y if the (not necessarily directed) path from x to y in T has only blue arcs, and x ∼ r y if the path from x to y in T has only red arcs. Then T has two Ψ-Sproinks, namely T /∼ b and T /∼ r with loops removed.
For a collection T of trees, let Ψ-Sproink(T ) be the set of all Ψ-Sproinks of the trees contained in T . We claim that if T is a complete set of obstructions for a template H, then Ψ-Sproink(T ) is a complete set of obstructions for ΨH. To prove it, we follow the idea of the proofs of Lemma 2 and Theorem 3.
First we prove that T → Ψ −1 (T /∼ b ). This is not difficult: every blue arc of T was contracted to a vertex of T /∼ b and this vertex was blown up to an arc in T → Ψ −1 (T /∼ b ). Thus we can map blue arcs to the corresponding blown-up arcs. Red arcs of T are also arcs of T /∼ b , and hence we can map each red arc to the arc (1, 2) of the corresponding copy of Q in Ψ −1 (T /∼ b ). Clearly such a mapping is a homomorphism.
Analogously we show that T → Ψ −1 T /∼ r . Finally we want to prove that if T → Ψ −1 G, then either T /∼ b → G or T /∼ r → G. Suppose that f : T → Ψ −1 G. Then some arcs of T are mapped by f to arcs corresponding to vertices of G (arcs of copies of P ), and others are mapped to arcs corresponding to arcs of G (arcs (1, 2) of copies of Q). Let us call the former v-arcs and the latter a-arcs. It follows from the definition of Ψ −1 that either all blue arcs of T are v-arcs and all red arcs of T are a-arcs, or all blue arcs of T are a-arcs and all red arcs of T are v-arcs. In the former case T /∼ b → G, while in the latter case T /∼ r → G.
It is notable that in the above example each tree obstruction for H generates finitely many obstructions for ΨH. This is no accident.
Theorem 12. Let Ψ be a functor generated by a pattern {P } ∪ {(Q R , q R,1 , . . . , q R,a(R) ) : R ∈ τ }, where for every R ∈ τ and 1 ≤ i < j ≤ a(R), the image q R,i (P ) is vertexdisjoint from q R,j (P ). If a σ-structure A has finite duality, then the τ -structure ΨA also has finite duality.
The proof uses the characterisation of structures with finite duality of [11]. The square of a σ-structure B is the structure B × B. It contains the diagonal An element a of B is dominated by an element b of B if for every R ∈ σ, for every i and every (x 1 , . . . , x a(R) ) ∈ R(B) with x i = a, we have (y 1 , . . . , y a(R) ) ∈ R(B) with y i = b and y j = x j for j = i. A structure B dismantles to its induced substructure C if there exists a sequence x 1 , . . . , x k of distinct elements of B such that B \ C = {x 1 , . . . , x k } and for each 1 ≤ i ≤ k the element x i is dominated in the structure induced by C∪{x i , . . . , x k }. The sequence x 1 , . . . , x k is then called a dismantling sequence of B on C.

Theorem 13 ([11]).
A structure has finite duality if and only if it has a retract whose square dismantles to its diagonal.
Proof of Theorem 12. Let A be a σ-structure with finite duality. Without loss of generality, we assume that A is a core, so that A has no proper retracts; thus the square of A dismantles to its diagonal. Let (x 1 , y 1 ), . . . , (x k , y k ) be a dismantling sequence of A × A on ∆ A×A . Then Ψ(A × A) ∼ = ΨA × ΨA; we want to prove that it dismantles to ∆ ΨA×ΨA ∼ = Ψ∆ A×A .
For i ∈ {1, . . . , k}, define X i to be the substructure of A × A induced by the set ∆ A×A ∪ {(x i , y i ), . . . , (x k , y k )}, and let X k+1 = ∆ A×A . We will show that ΨX i can be dismantled to ΨX i+1 , i = 1, . . . , k.
Let b = (b 1 , b 2 ) be an element dominating a = (x i , y i ) in X i . Let f ∈ ΨX i \ ΨX i+1 , and assume that f = (f 1 , f 2 ) : P → A × A. Then there exists (at least one) p 0 ∈ P such that f (p 0 ) = a. We define g = (g 1 , g 2 ) : P → A × A by g(p 0 ) = b and g(p) = f (p) if p = p 0 . Since b dominates a, g is a homomorphism, and obviously g ∈ ΨX i . We claim that g dominates f . Indeed, for R ∈ τ and (f 1 , . . . , f a(R) ) ∈ R(ΨX i ) such that f = f j , there exists a homomorphism h : Q R → X i such that f = h • q R,j . Define h ′ : Q R → X i by h ′ (q R,j (p 0 )) = b and h ′ (z) = h(z) for z = q R,j (p 0 ). Since b dominates a = h(q R,j (p 0 )), the mapping h ′ is a homomorphism. By hypothesis, for ℓ = j, the image q R,ℓ (P ) is disjoint from q R,j (P ), whence f ℓ = h ′ • q R,ℓ , while h ′ • q R,j = g. Therefore R(ΨX i ) contains all the a(R)-tuples needed to establish the domination of f by g.
Let p 1 , p 2 , . . . , p m be an enumeration of the elements of P . We dismantle ΨX i to ΨX i+1 by successively removing the functions f such that f (p j ) = (x i , y i ) for j = 1, . . . , m.
Perhaps the lack of knowledge of a general construction is natural since there is no restriction on the pattern {P } ∪ {(Q R , q R,1 , . . . , q R,a(R) ) : R ∈ τ }. On the other hand, there are many possible transformations T ′ on a family T of tree obstructions, in the style of Sproink(T ). Any such transformation gives rise to a complete set of obstructions to homomorphisms into a structure H ′ = Π T ∈T ′ D T ; however in general there is no way of guaranteeing that such structure H ′ is finite, even when T is a complete set of obstructions for a finite structure H.

Concluding comments
In this paper we tried to shed more light on the structure of tractable templates with tree duality. Let us turn our attention one more time to Fig. 1. The grey areas in the diagram are areas that need a closer look in future research.
Currently we do not know any digraph with a near-unanimity function and with bounded-height tree duality that could not be generated using right adjoints and products, starting from digraphs with finite duality; it is not clear whether any such "reasonable" class of structures with tree duality can be generated from structures with finite duality with a "reasonable" set of adjoint functors.
We have shown here that possession of bounded-height tree duality is decidable. It is natural to ask what its complexity is; in particular, whether it is complete for some class of problems.
Equally interesting is the decidability of membership in other classes depicted in Fig. 1. Tree duality is known to be decidable [3], but not known to be in PSPACE. Our decision procedure for bounded-height duality is in PSPACE for graphs with tree duality; this suggests that checking tree duality may be harder than checking bounded height of the obstructions.
Furthermore, finite duality is NP-complete [11]. The decidability of bounded-treewidth duality is unknown, and so is the decidability of a near-unanimity function (see [14] for a related result).
The properties of near-unanimity functions proved in the proof of Proposition 5 (i) in the context of digraphs and the arc-graph construction, also hold in the context of general structures and right adjoints. The proofs carry over naturally.