{'fraction_non_alphanumeric': 0.058156855125963344, 'fraction_numerical': 0.008850894803877124, 'mean_word_length': 3.5810917721518987, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 60, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
The Eilenberg-Moore category and a Beck-type theorem for a Morita context

The Eilenberg-Moore constructions and a Beck-type theorem for pairs of monads are described. More specifically, a notion of a {\em Morita context} comprising of two monads, two bialgebra functors and two connecting maps is introduced. It is shown that in many cases equivalences between categories of algebras are induced by such Morita contexts. The Eilenberg-Moore category of representations of a Morita context is constructed. This construction allows one to associate two pairs of adjoint functors with right adjoint functors having a common domain or a {\em double adjunction} to a Morita context. It is shown that, conversely, every Morita context arises from a double adjunction. The comparison functor between the domain of right adjoint functors in a double adjunction and the Eilenberg-Moore category of the associated Morita context is defined. The sufficient and necessary conditions for this comparison functor to be an equivalence (or for the {\em moritability} of a pair of functors with a common domain) are derived.

In the last two decades, Hopf-Galois theory went through a series of generalisations, ultimately leading to the theory of Galois comodules over corings, which elucidates its relation with well-known Beck's monadicity theorem. This evolution has revived the interest among Hopf algebraists in the theory of (co)monads. Several aspects of Hopf(-Galois) theory have been reformulated in the framework of (co)monads so that further clarification of the underlying categorical mechanisms of the theory has been achieved. This has led in particular to two different approaches to the definition of a categorical (functorial) notion of a herd or pre-torsor, appearing almost simultaneously in [4] and [3]. The motivation for the present paper was to study the connection between these two approaches in more detail.
The definition of a pre-trosor in [3] takes a pair of adjunctions (with coinciding codomain category for the left adjoints) as a starting point. The aim of this paper is to show that there is a close relationship between pairs of adjunctions and functorial Morita contexts similar to the correspondence between single adjunctions and monads. In this sense the results presented here can be interpreted as a 'two-dimensional' version of the latter correspondence. A key feature of this work is that it links aspects of the theory that are of more algebraic nature (Morita contexts) with aspects that are of more categorical nature (Beck's theorem). More precisely, we prove a version of Beck's theorem on precise monadicity in this 'two-dimensional' setting and provide a categorical (monadic) version of classical Morita theory.
These are the main results and the organisation of the paper. In Section 2 we recall from [3] the definition of the category of double adjunctions on categories X and Y, Adj(X , Y), and introduce the category Mor(X , Y) of (functorial) Morita contexts.
In Section 3 we describe functors connecting categories of double adjunctions and Morita contexts. More precisely we compare categories Adj(X , Y) and Mor(X , Y). First we define a functor Υ : Adj(X , Y) → Mor(X , Y). To construct a functor in the converse direction, to each Morita context T we associate its Eilenberg-Moore category (X , Y) T . This is very reminiscent of the classical Eilenberg-Moore construction of algebras of a monad (recalled in Section 2.1), and, in a way, is based on doubling of the latter. Objects in (X , Y) T are two algebras, one for each monad in T, together with two connecting morphisms. Once (X , Y) T is defined, two adjunctions, one between (X , Y) T and X the other between (X , Y) T and Y, are constructed. This construction yields a functor Γ : Mor(X , Y) → Adj(X , Y). Next it is shown that the functors (Γ, Υ) form an adjoint pair, and that Γ is a full and faithful functor. The counit of this adjunction is given by a comparison functor K which compares the common category Z in a double adjunction Z with the Eilenberg-Moore category of the associated Morita context T = Υ(Z). A necessary and sufficent condition for the comparison functor to be an equivalence are derived. This is closely related to the existence of colimits of diagrams of certain type in Z and is a Morita-double adjunction version of the classical Beck theorem (on precise monadicity).
In Section 4 we analyse which objects of Mor(X , Y) describe equivalences between categories of algebras of monads. It is also proven that large classes of equivalences between categories of algebras are induced by Morita contexts.
In Section 5 examples and special cases of the theory developed in preceding sections are given. In particular, it is shown how the main results of Section 3 can be applied to a single adjunction leading to a new point of view on some aspects of descent theory. The Eilenberg-Moore category associated to the module-theoretic Morita context is identified as the category of modules of the associated matrix Morita ring. This procedure can be imiated in the general case if we assume the existence and preservation of binary coproducts in all categories and by all functors involved. We also show that the theory developed in Sections 2-4 is applicable to pre-torsors and herd functors, thus bringing forth means for comparing pre-torsors with balanced herds. The paper is completed with comments on dual versions of constructions presented and with an outlook.
Throughout the paper, the composition of functors is denoted by juxtaposition, the symbol • is reserved for composition of natural transformations and morphisms. The action of a functor on an object or morphism is usually denoted by juxtaposition of corresponding symbols (no brackets are typically used). Similarly the morphism corresponding to a natural transformation, say α, evaluated at an object, say X, is denoted by a juxtaposition, i.e. by αX. For an object X in a category, we will use the symbol X as well to denote the identity morphism on X. Typically, but not exclusively, objects and functors are denoted by capital Latin letters, morphisms by small Latin letters and natural transformations by Greek letters.

Double adjunctions and Morita contexts
The aim of this section is to recall the standard correspondence between adjoint functors and (co)monads and to introduce the main categories studied in the paper.
2.1. Adjunctions and (co)monads. It is well-known from [6] that there is a close relationship between pairs of adjoint functors (L : X → Y, R : Y → X ), monads A on X and comonads C on Y. Starting from an adjunction (L, R) with unit η : X → RL and counit ε : LR → Y, the corresponding monad and comonad are A = (RL, RεL, η) and C = (LR, LηR, ε). Starting from a monad A = (A, m, u) (where m is the multiplication and u is the unit), one first defines the Eilenberg-Moore category X A of A-algebras, whose objects are pairs (X, ρ X ), where X is an object in X and ρ X : AX → X is a morphism in X such that ρ X • Aρ X = ρ X • mX and ρ X • uX = X. There is a pair of adjoint functors (F A : where U A is a forgetful functor and F A is the induction or free algebra functor, for all objects X ∈ X defined by F A X = (AX, mX). Similarly, one defines the category Y C of coalgebras over C, and obtains an adjoint pair (U C : where F C is the induction or free coalgebra functor and U C is the forgetful functor. The original and constructed adjunctions are related by the comparision K : Y → X A (or K ′ : X → Y C in the comonad case). For any Y ∈ Y, the comparision functor is given by KY = (RY, RεY ). The functor R is said to be monadic if K is an equivalence of categories. Similarly L is said to be comonadic if K ′ is an equivalence of categories. Beck's Theorem [2] provides one with necessary and sufficient conditions for the functors R and L to be monadic or comonadic respectively. For more detailed and comprehensive study of matters described in this section we refer to [1].

2.2.
The category of double adjunctions. In this paper, rather than looking at one adjunction, we consider two adjunctions with right adjoints operating on a common category. More precisely, let X and Y be two categories. Following [3], the category Adj(X , Y) is defined as follows. An object in Adj(X , Y) is a pentuple (or a triple) Z = (Z, (L A , R A ), (L B , R B )), where Z is a category and (L A : X → Z, R A : Z → X ) and (L B : Y → Z, R B : Z → Y) are adjunctions whose units and counits are denoted respectively by η A , η B and ε A , In other words, Adj(X , Y) is a full subcategory of the category of spans Span(X , Y) which consists of all spans X ← Z → Y such that the functors Z → X and Z → Y have left adjoints.
To a morphism F in Adj(X , Y), one associates two natural transformations , which satisfy the following compatibility conditions 2.3. The category of Morita contexts. Consider two categories X and Y. Let , is a functor T : Y → X equipped with two natural transformations ρ : T B → T and λ : AT → T such that A bialgebra morphism φ : T → T ′ between two A-B bialgebra functors is a natural transformation that satisfies the following conditions An A-B bialgebra functor T induces a functor Y → X A , which is denoted again by T and is defined by T Y = (T Y, λY ), for all Y ∈ Y.
A Morita context on X and Y is a sextuple T = (A, B, T, T, ev, ev), that consists of a monad A = (A, m A , u A ) on X , a monad B = (B, m B , u B ) on Y, an A-B bialgebra functor T, a B-A bialgebra functor T and natural transformations ev : T T → A and ev : T T → B. These are required to satisfy the following conditions: ev is an A-A bialgebra morphism, ev is a B-B bialgebra morphism, and the following diagrams commute Let k A and k B be unital associative rings. Set X to be the category of left k A -modules and Y the category of left k B -modules. For a k A -ring A (i.e. a ring map k A → A) with multiplication µ A and unit ι A and a k B -ring B with multiplication µ B and unit ι B consider monads Then the definition of a Morita context with monads A and B coincides with the classical definition of a (ring-theoretic) Morita context between rings A and B; see Section 2.3 for a more detailed study of this example. Note however that the definition of a categorical Morita context introduced in this paper differs from the notion of a wide Morita context [5], which also gives a categorical albeit different interpretation of classical Morita contexts. The connection between categorical Morita contexts and wide Morita contexts is discussed in Section 4.
A morphism φ : T = (A, B, T, T, ev, ev) → T ′ = (A ′ , B ′ , T ′ , T ′ , ev ′ , ev ′ ) between Morita contexts on X and Y is a quadruple (φ 1 , φ 2 , φ 3 , φ 4 ) defined as follows. First, where the shorthand notation φ 1 φ 1 := A ′ φ 1 • φ 1 A = φ 1 A ′ • Aφ 1 etc. for the Godement product of natural transformations is used. These make T ′ an A-B bialgebra functor and T ′ a B-A bialgebra functor with structures given by To check that T is a bialgebra functor one can proceed as follows: the associativity conditions (of left A-action, right B-action and mixed associativity) are a straightforward consequence of naturality of the counits. The unitality of left and right actions follows by the triangular identities for units and counits of adjunctions (L A , R A ) and All compatibility diagrams (6)-(7) follow (trivially) by the naturality of the counits ε A and ε B .
For any morphism F : Z → Z ′ in Adj(X , Y), the corresponding morphism of Morita contexts, is defined as follows. The monad morphisms are: where a and b are defined by equations (1) in Section 2.2. Equations (2) express exactly that φ 1 and φ 2 satisfy the second diagrams in (8) and (9), respectively. That φ 1 and φ 2 satisfy the first diagrams in (8) and (9) follows by (3) and by the naturality. The morphisms of bialgebras are: That φ 3 and φ 4 are bialgebra morphisms satisfying compatibility conditions (10) follows by equations (3) and by the naturality (the argument is very similar to the one used for checking that φ 1 and φ 2 preserve multiplications).
3.2. The Eilenberg-Moore category of a Morita context. Before we can make a converse construction for the functor Υ introduced in Section 3.1, we need to define a category of representations for a Morita context. This construction is similar to that of the Eilenberg-Moore category of algebras for a monad; see Section 2.1. Let T = (A, B, T, T, ev, ev) be an object in Mor(X , Y). The Eilenberg-Moore category associated to T, (X , Y) T , is defined as follows. Objects in (X , Y) T are sextuples (or quadruples) satisfying the following compatibility conditions This completes the construction of the Eilenberg-Moore category of a Morita context.
The definition of the functors G A and G B is slightly more involved. For any X ∈ X and Y ∈ Y, define (AX, m A X) is simply the free A-algebra on X (see Section 2.1), hence it is an object of X A . From the discussion in Section 2.3 we know that ( T X,λX) ∈ Y B , with a Balgebra structure induced by the B-A bialgebra functor T . To complete the check that G A X is an object of (X , Y) T it remains to verify whether the maps evX : T T X → AX and ρX : T AX → T X satisfy all needed compatibility conditions. The left hand side of (11) expresses that ev is left A-linear, the left hand side of (12) that ev is right A-linear. The right hand side of (11) follows by the mixed associativity of the B-A bialgebra T (see the last diagram of (5)). The right hand side of (12) is the second Morita identity of the maps ev and ev; see the right hand side of (6). The left hand side of (13) follows again from the properties of T as a B-A bialgebra, in particular by the associativity of its right A-action; compare with the first diagram in (4). Finally, the right hand side of (13) is an application of the fact that ev is B-balanced, which is expressed in the right hand side of (7). We conclude that G A (and, by symmetric arguments, also G B ) is well-defined on objects. For a morphism f : X → X ′ in X , define G A f = (Af, T f ) and similarly G B g = (T g, Bg) for any morphism g in Y.
Verification that G A f and G B g are well defined is very simple and left to the reader.
Proof. We construct units ν A , ν B and counits ζ A , ζ B of adjunctions. For any objects X ∈ X and Y ∈ Y, ν A , ν B are defined as morphisms in X and Y respectively, For any X ∈ (X , Y) T , the counits ζ A , ζ B are given by the following morphisms in (X , Y) T , To check that ζ A X is a morphism in (X , Y) T , one has to verify that diagrams (14) and (15) commute. The left hand side of (14) holds, since f A X = ρ X is canonically a morphism in X A , the right hand side holds since g A X = w is a morphism in Y B by definition. The left hand side of (15) is exactly the left hand side of (13), and the right hand side of (15) is precisely the left hand side of (12). Similarly one checks that ζ B X is a morphism in (X , Y) T . Now take any object X ∈ X . The first triangular identity translates to the following diagram u u l l l l l l l l l l l l l l l G A X which commutes by the unit properties of the monad A and the bialgebra functor For the second triangular identity, take any X ∈ (X , Y) T and consider the diagram which commutes by the unit property of the A-algebra (X, ρ X ). In the same way one verifies that (G B , U B ) is an adjoint pair. ⊔ ⊓ To check diagrams (11), (12), (13), one has to rely on the naturality of φ 1 , φ 2 , φ 3 , φ 4 , and their properties as morphisms of monads and bialgebras.
For a morphism (f, g) : Then, by construction (or by naturality of φ 1 and φ 2 ), f is a morphism in X A and g is a morphism in Y B . Diagram (15) for F(f, g) to be a morphism in (X , Y) T follows by the naturality of φ 3 and φ 4 , combined with the corresponding diagram for (f, g) as a morphism in (X , Y) T ′ .
Finally, the construction of F immediately implies that, for any X ∈ (X , Y) T ′ , This completes the construction of a functor Γ : Mor(X , Y) → Adj(X , Y).

Every Morita context arises from a double adjunction.
Here we prove that starting with a Morita context and performing subsequent constructions of a double adjunction and a Morita context gives back the original Morita context, i.e. we prove the following Proof. The computation that, for any Morita context T ∈ Mor(X , Y), ΥΓT = T is easy and left to the reader. Consider two Morita contexts T = (A, B, T, T, ev, ev), In view of the definition of functor Υ in Section 3.1, to compute the φ i Γ(φ) one first needs to compute natural transformations a, b (see equations (1) in Section 2.2) ); see Section 3.3. These are given by where the second equality follows by the naturality of φ 1 , while the third one is a consequence of the unitality of a monad. Similarly, For any object Z ∈ Z, define The first two components in K(Z), that is, are an application of the comparison functors K A : Z → X A and K B : Z → Y B , corresponding to the adjunctions (L A , R A ) and (L B , R B ) respectively (see Section 2.1). Obviously, are well-defined. They satisfy conditions (11), (12) and (13) by the naturality of counits.
For a morphism f : In view of the definition of the comparison functors K A and K B , it is clear that respectively. Diagrams (15) follow by the naturality of ε A and ε B , respectively. Proof. Note that the definition of the comparison functor K immediately implies that K is a morphism in Adj(X , Y). Furthermore, K can be defined for any Z ∈ Adj(X , Y). We claim that the assignment Z → (K : The naturality of κ is equivalent to the commutativity of the following diagram Let λ : 1 1 Mor(X ,Y) → ΥΓ be the natural (identity) transformation described in Section 3.4. That the composite κΓ • Γλ is the identity natural transformation Γ → Γ is immediate. To compute the other composite Υκ • λΥ : Υ → Υ, take a double adjunction Z = (Z, (L A , R A ), (L B , R B )), so that Then κZ = K : Z → (X , Y) ΥZ is the comparison functor, and hence Furthermore, using the definition of the comparison functor (applied to L A X and L B Y , for any objects X ∈ X , Y ∈ Y), we obtain Therefore, Thus Υκ is the identity natural transformation, and since also λΥ is the identity, so is their composite Υκ • λΥ. This proves that λ is a unit and κ is a counit of the adjunction (Γ, Υ). Since the unit λ is a natural isomorphism, Γ is a full and faithful functor. ⊔ ⊓ Proof. The moritability of each of (R A , R B ) is paramount to the comparison functor K being an equivalence, for all Z ∈ Adj(X , Y), i.e. to the natural transformation κ in the proof of Proposition 3.5.2 being an isomorphism. Since the latter is the counit of adjunction (Γ, Υ), the corollary is an immediate consequence of Proposition 3.5.2. ⊔ ⊓ 3.6. Moritability. The aim of this section is to determine, when a pair of functors is moritable in the sense of Definition 3.5.1. We begin with the following simple Lemma 3.6.1. Let T be an object in Mor(X , Y) and let (f, g) be a morphism in (X , Y) T . Then (f, g) is an isomorphism in (X , Y) T if and only if f is an isomorphism in X and g is an isomorphism in Y.
Proof. If (f, g) is an isomorphism in (X , Y) T , then clearly f and g are isomorphisms (as all functors, in particular forgetful functors, preserve isomorphisms). Conversely, let f −1 be the inverse (in X ) of f and g −1 be the inverse of g (in Y). By applying f −1 , g −1 to both sides of equalities described by diagrams (14) and (15) one immediately obtains that (f −1 , g −1 ) is a morphism in (X , Y) T . ⊔ ⊓ From now on we fix a double adjunction Z = (Z, (L A , R A ), (L B , R B )) on X and Y (with counits ε A , ε B and units η A , η B ), and set to be the corresponding Morita context. K : Z → (X , Y) T is the comparison functor. The aim of this section is to determine, when K is an equivalence of categories.
If R A f and R B f are isomorphisms, then, by Lemma 3.6.1 also Kf is an isomorphism. Since an equivalence of categories reflects isomorphisms, also f is an isomorphism. ⊔ ⊓ Definition 3.6.3. The pair (R A , R B ) is said to reflect isomorphisms if the fact that both R A f and R B f are isomorphisms for a morphism f ∈ Z implies that f is an isomorphism. That is, the pair (R A , R B ) reflects isomorphisms if and only if the induced functor into the product category Note that if R A or R B reflects isomorphisms, then the pair (R A , R B ) reflects isomorphisms, but not the other way round. By Proposition 3.6.2, a moritable pair (R A , R B ) reflects isomorphisms.
To analyse the comparison functor K further we assume the existence of particular colimits in Z. For any object y y r r r r r r r r r r r r r r r r r r r r r r u u j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j j From this point until Theorem 3.6.7 assume that Z has colimits of all such diagrams, and let it induces a natural transformation between functors from a six-object category to Z that define diagrams (16)) by applying suitable combinations of the L and R to f and g. Therefore, by the universality of colimits, there is a unique morphism D(f, g) : DX → DX ′ in Z which satisfies the following identies This construction yields a functor Proof. For any object Z in Z there is a cocone x x p p p p p p p p p p p p p p p p p p p p p p p s s g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g g r r ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee ee e

Z.
This is a cocone under the diagram of type (16) corresponding to the object KZ. By the universal property of colimits there is a unique morphism εZ : This construction defines a natural transformation ε from the functor DK to the identity functor on Z. For all objects X in (X , Y) T , define η A X : X → R A DX and η B X : Y → R B DX as composites Using the naturality of ε A , ε B , η A and η B , the triangular identities for units and counits of adjunctions, and the definition of (DX, d A X, d B X) as a cocone under the diagram (16), one can verify that the pair ηX := (η A X, η B X) is a morphism in (X , Y) T . The assignment X → ηX defines a natural transformation η from the identity functor on (X , Y) T to KD. We now prove the triangular identities for ε and η.
Take any object Z in Z and compute where the second equality follows by (18) and the third by the triangular identities for ε A and η A . Similarly, R B εZ • η B KZ = R B Z. This proves that the composite Kε • ηK is the identity natural transformation on K.
Next take any object X in (X , Y) T . Since DηX = D(η A X, η B X), DηX satisfies equalities (17). In particular where the second equality follows by (18), the third one by the naturality of ε A , and the final one is one of the triangular identities for ε A and η A . Similarly, The universality of colimits now yields εDX • DηX = DX, i.e. the second triangular identity for ε and η. ⊔ ⊓ Definition 3.6.5. The pair (R A , R B ) is said to convert colimits into coequalisers if, for all objects X = ((X, are coequalisers in X and Y respectively. Proof. For all objects X = ((X, ρ X ), (Y, ρ Y ), v, w) ∈ (X , Y) T , consider the following diagram Since the multiplication in monad R A L A is given by R A ε A L A , the top row is a coequaliser; see [1, Proposition 4, Section 3.3]. Thus there exists a morphism X → R A DX, which, by its uniqueness, must coincide with η A X. By considering a similar diagram for the other adjoint pair, one fits into it the other component of the unit of adjunction, η B X. If (R A , R B ) converts colimits into coequalisers, then (by the uniqueness of coequalisers) both η A X and η B X are isomorphisms. Hence, by Lemma 3.6.1, η is an isomorphism, i.e. D is fully faithful. Conversely, if η is an isomorphism, then both (R A DX, R A d A X) and (R B DX, R B d B X) are (isomorphic to) coequalisers, i.e. the pair (R A , R B ) converts colimits into coequalisers. ⊔ ⊓ The main result of this section is contained in the following precise moritability theorem (Beck's theorem for double adjunctions). For this theorem the existence of colimits of diagrams (16) needs not to be assumed a priori. Proof. Assume that K is an equivalence of categories. Consider a diagram of the form (16) in Z. We can choose X = KZ for some Z ∈ Z and we know that (Z, ε A , ε B ) is a cocone for this diagram. Now apply the functor K to diagram (16), then we claim that (KZ, Kε A , Kε B ) is a colimit for the new diagram in (X , Y) T . To check this, consider any cocone (H, (f A , g A ), (f B , g B )) on the diagram. Define (h, k) : KZ → H by putting h = f A • η A R A Z and k = g B • η B R B Z. One can verify that (h, k) is indeed a morphism in (X , Y) T (apply the fact that H is a cocone and that (f A , g A ) and (f B , g B ) are morphisms in (X , Y) T , together with the adjunction properties of (L A , R A ) and (L B , R B )). Since K is an equivalence of categories, it reflects colimits and therefore (Z, ε A , ε B ) is the colimit of the original diagram (16) in Z. Furthermore, (R A , R B ) reflects isomorphisms by Proposition 3.6.2 and it converts colimits into coequalisers by Lemma 3.6.6.
In the converse direction, the counit η is an isomorphism by Lemma 3.6.6. Applying R A to the first column of the cocone defining εZ we obtain the following diagram The first column is a (contractible) coequaliser, the second is a coequaliser by the assumption that (R A , R B ) converts colimits into coequalisers. Thus R A εZ is an isomorphism. Similarly, R B εZ is an isomorphism. Since the pair (R A , R B ) reflects isomorphisms, also εZ is an isomorphism in Z. ⊔ ⊓

Morita theory
In this section we study when, given a Morita context T = (A, B, T, T, ev, ev) on X and Y, the bialgebra functors T and T induce an equivalence of categories between the categories X A and Y B . In particular, we prove that if X and Y have coequalisers and U A and U B preserve coequalisers, then any equivalence between two categories X A and Y B of algebras of monads A and B is induced by a Morita context in Mor(X , Y).  Proof. Consider a coequaliser

Preservation of coequalisers by algebras. Consider a monad
in X and assume that it is preserved by SA. Applying the functors S and SA to this coequaliser, one obtains the following diagram in Y By assumption the lower row is a coequaliser. Suppose that there exists a pair (h, H), where H is an object in Y and h : By the univeral property of the coequaliser (SAZ, SAz), there is a unique morphism k ′ : SAZ → H such that k ′ • SAz = h • σY . This, together with the naturality of u A and the unitality of the right A-algebra S imply that The second statement is verified by a similar computation. ⊔ ⊓ Lemma 4.1.2. Let f, g : X → Y be morphisms in X A . Suppose that the coequaliser (E, e) of (U A (f ), U A (g)) exists in X . If AA preserves this coequaliser, then the coequaliser (E, ǫ) of the pair (f, g) exists in X A and U A (E, ǫ) = (E, e).
Proof. By Lemma 4.1.1, A preserves the coequaliser (E, e). The universal property of coequalisers implies the existence of a unique map ρ E : AE → E such that ρ E •Ae = e • ρ Y and ρ E • u A E = E. Using the fact that the coequaliser (E, e) is preserved by AA, one checks that ρ E defines a (associative) left action of A on E, i.e. (E, ρ E ) is an object of X A . ⊔ ⊓ The following standard lemma relates various preservation properties for coequalisers. We include a brief proof for completeness. (i) A : X → X preserves coequalisers; (ii) AA : X → X preserves coequalisers; (iii) X A has (all) coequalisers and they are preserved by U A : X A → X ; (iv) U A : X A → X preserves coequalisers.
Similarly, given a monad A = (A, m A , u A ) on X and a right A-algebra functor ( T : X → Y,ρ), consider an object (X, ρ X ) in X A , and set ( T A X,τ X) to be the following coequaliser in Y (if it exists) Finally, recall that for any B-algebra (Y, ρ Y ), the following diagram is a contractible coequaliser in Y and a (usual) coequaliser in Y B , As in Section 2.1, the free-forgetful adjunctions for A and B are denoted by (F A , U A ), (F B , U B ), respectively. The counits are denoted byε A ,ε B . We are now ready to state the following lifting theorem.
Proposition 4.2.1. Let A be a monad on X and B a monad on Y. There is a bijective correspondence between the following data: (i) A-B bialgebra functors T, such that coequalisers of the form (19) exist in X for any Y ∈ Y, and they are preserved by AA; Let T be a bialgebra functor as in (i) and T B the corresponding functor of (ii), then given a functor P : X → W, the functor P preserves coequalisers of the form (19) if and only if the functor P U A T B : Y B → W preserves coequalisers of the form (21).
To check that T B f is a morphism in X A , one can proceed as follows. By Lemma 4.1.1, A preserves coequalisers of the form (19), so in particular, Aτ Y is an epimorphism. Therefore, it is enough to verify that which follows from the defining properties of ρ T B Y , ρ T B Y ′ and T B f , combined with the naturality of the right action ρ of T . Thus there is a well-defined functor T B : Y B → X A . Consider now a functor P : X → W which preserves all the coequalisers of the form (19). For any (Y, ρ Y ) ∈ Y B , construct the following diagram in X P T BBBY The first and second rows of this diagram are coequalisers, as they are obtained by applying functors to the contractible coequaliser (21). All three columns are coequalisers, since they are coequalisers of type (19) to which the functor P is applied. The diagram chasing arguments then yield that the lower row is a coequaliser too. The first part of the proof is then completed by setting P = AA.
is an A-B bialgebra functor. Note that U A T B is also a left A-algebra functor with action U Aε A T B . Lemma 4.1.1 implies that U A T B preserves the coequaliser (21). This means that, for any Y = (Y, ρ Y ) ∈ Y B , the following diagram is a coequaliser in X This diagram is exactly the coequaliser (19) in this situation. Applying the functor AA (resp. any functor P : X → W) to the coequaliser (22) yields the same result as applying the functor AAU A T B (resp. P U A T B ) to (21). Therefore, the functor AA (resp. P ) preserves coequalisers (19). ⊔ ⊓ In the following the notation introduced in Proposition 4.2.1 is used. For an A-B bialgebra functor T, T B denotes the functor defined by coequalisers (19), and Proof. Note that the functor T A is well-defined by (the dual version of) Proposition 4.2.1. We can now consider the following diagram in Y: By assumption, the first row is a coequaliser; by Lemma 4.1.1, the second row is a coequaliser too. All three columns are coequalisers by definition. Therefore, the lower row is an equaliser as well. If we apply the functor BB to this diagram, the same reasoning yields that BB preserves the equaliser in the lower row of (23), therefore it is an equaliser in Y B by Lemma 4.1.

⊔ ⊓
Recall that a wide Morita context (F, G, µ, τ ) between categories C and D, consists of two functors F : C → D and G : D → C, and two natural transformations µ : GF → C and τ : F G → D, satisfying F µ = τ F and µG = Gτ . In [5], left (resp. right) wide Morita contexts are studied. In this setting, C and D are abelian (or Grothendieck) categories and F and G are left (resp. right) exact functors. Left and right wide Morita contexts are used to characterise equivalences between the categories C and D. In the remainder of this section we study wide Morita contexts between categories of algebras over monads. This allows us to weaken the assumptions made in [5]. Moreover, we study the relationship between wide Morita contexts and Morita contexts.
Consider monads A on X and B on Y. A pair of functors T A : X A → Y B and T B : Y B → X A is said to be algebraic if the functors AAU A T B and U B T A AAU A T B preserve coequalisers of the form (21) for all (Y, ρ Y ) ∈ Y B , and the functors BBU B T A and U A T B BBU B T A preserve coequalisers of the form for all (X, ρ X ) ∈ X A . By an algebraic wide Morita context we mean a wide Morita context (T B , T A ,ω, ω) between categories of algebras Y B and X A , such that the functors T B and T A form an algebraic pair of functors.  Similarly, one defines ω : T B T A → X A . To check that the compatibility conditions betweenω and ω hold, one starts with objects T B T AT BY and T AT B T AX and constructs coequaliser diagrams resulting in T B T A T B Y and T A T B T A X, respectively. The compatibility conditions between ev and ev (diagrams (6)- (7)), as well as the facts that they are bialgebra morphisms and that T and T are bialgebra functors, induce the needed compatibility conditions forω and ω.
(ii) ⇒ (i). By Proposition 4.2.1 there exist bialgebra functors T and T, where such that all coequalisers of the form (19) and (20) exist, and they are preserved by AA, T A and BB, T B respectively. Define  (19) and (20) exist and are preserved by AA, T A and BB, T B respectively. Because ev and ev are respectively B and A-balanced, the universal property of the coequaliser implies the existence of natural transformations π : T B T → A andπ : T A T → B such that, for all objects X ∈ X and Y ∈ Y, evX = πX • τ T X and evY =πY •τ T Y.
Since the coequalisers (19) and (20) are preserved by T A and T B , respectively (see Proposition 4.2.1), for all objects (X, where ω : (1) There is a bijective correspondence between the following data: Proof. We only prove part (1), as (2) follows by combining (1) with its X -Y symmetric version.
(ii) ⇔ (i). Let (T B , T A , ω,ω) be an algebraic wide Morita context and let̟ denote the inverse natural transformation ofω. For any X ∈ X A , The first equality is the compatibility condition between ω andω in the wide Morita context (see Theorem 4.2.4).
is an adjoint pair with unit̟ and counit ω. T B is fully faithful since the unit of adjunction is a natural isomorphism. Conversely, if ( T A , T B ) is an algebraic adjoint pair and T B is fully faithful, then similar computation confirms that (T B , T A , ω,ω) is an algebraic wide Morita context, where ω is the counit andω is the inverse of the unit of the adjunction.
(ii) ⇔ (iii). Assume first that the statement (iii) holds. In light of Theorem 4.2.4 suffices it to construct the natural inverse̟ : The naturality of̟ follows by the preservation of coequalisers by T A and T B (see diagram (23)). Take any (Y, ρ Y ) ∈ Y B and computê The second equality follows by (25). Furthermore, for any (Y, The first two equalities follow by the definitions of̟ andπ, and by(25). The third step is a consequence of the naturality ofχ. The equalising property of the maps T τ Y andτ T Y , as well as the equivalent expressions for the Godement product are used in the fourth step. The final equality follows by the first of diagrams (6) that express compatibility between ev and ev in the Morita context. On the other hand, where the first equality follows by the naturality ofτ , the second is the equalising property ofτ T Y (recall from Section 2.3 that ρ T Y = λY ), the third equality follows by the second of diagrams (6). The final equality is the defining property ofπY . Sincê τ T T T Y is an epimorphism, we conclude that Since T A τ Y •τ T Y is an epimorphism,̟ •ω is the identity natural transformation on T A T B , and henceω is a natural isomorphism with inverse̟.
In the converse direction, apply Theorem 4.2.4 to obtain a Morita context. Let ̟ : Y B → T A T B be the inverse ofω and putχ =̟ • u B . It follows from naturality thatχ satisfies the required conditions. ⊔ ⊓ Remark 4.2.6. A sufficient condition for the existence of a natural transformation χ as in part (1)(iii) of Theorem 4.2.5 is the existence of a natural transformation ve : Y → T T such that ev• ve = u B . In the case of a ring-theoretic Morita context (see Remark 2.3.1) this condition expresses exactly that the Morita map ev is surjective.
Remark 4.2.7. In case the forgetful functors U A and U B preserve coequalisers and X A and Y B (or equivalently X and Y) have all coequalisers, Theorem 4.2.5 has the following slightly stronger formulation, which follows directly from the observations made in Remark 4.2.3. There is a bijective correspondence between the following data: (i) pairs of adjoint functors (resp. equivalences of categories) (T B : Y B → X A , T A : X A → Y B ) such that T A preserves coequalisers; (ii) right wide Morita contexts (T B , T A , ω,ω) such thatω is a natural isomorphism (resp.ω and ω are natural isomorphisms); (iii) Morita contexts (A, B, T, T, ev, ev) such that T and T preserve coequalisers and there exist a natural transformationχ : Y → T A T such thatπ •χ = u B (resp. there exists as well a natural transformation χ : X → T B T such that π • χ = u A ).

Examples and applications
In this section we apply the criterion for moritability to specific situations of one adjunction, ring-theoretic Morita contexts, and herds and pre-torsors.

5.1.
Blowing up one adjunction. Consider an adjunction (L : X → Z, R : Z → X ) with unit η and counit ε. Let C = (LR, LηR, ε) be the associated comonad on Z and A = (RL, RεL, η) the associated monad on X ; see Section 2.1. Associated to the Eilenberg-Moore category of C-coalgebras Z C , there is a second adjunction (U C : Z C → Z, F C : Z → Z C ) with unit ν and counit ζ, and hence there is an object (Z, (L, R), (U C , F C )) in the category Adj(X , Z C ). The adjunction (U C , F C ) induces a monad B = (F C U C , F C ζU C , ν) = (LR, LRε, ν) on Z C . Therefore, there is a Morita context where T = R and T = LRL, and the corresponding Eilenberg-Moore category (X , Z C ) T can be constructed. This leads to the following diagram of functors.
_ _ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ The adjunctions (F A , U A ) and (F B , U B ) are the usual free algebra-forgetful adjunctions associated to a monad (see Section 2.1). The category (Z C ) B is the category of dual descent data and consists of triples (Y, ρ Y , τ Y ), where (Y, ρ Y : Y → LRY ) is an object in Z C , and τ Y : LRY → Y is a morphism in Z C that satisfies the following con- Finally, the functor Λ : X A → (Z C ) B is defined as follows: for all objects (X, ρ X ) in X A , set Λ(X, ρ X ) := (LX, LηX, Lρ X ).
Here V A and V B denote the obvious forgetful functors. The functor H can now be defined as follows: H(X, ρ X ) = ((X, ρ X ), Λ(X, ρ X ), ρ X , Lρ X ).
is a pair of adjoint functors, and H is fully faithful. Furthermore, there is a natural transformation γ : Proof. We construct the unit α and the counit β of this adjunction. Take an object (X, ρ X ) in X A and define αX : (X, ρ X ) → (X, ρ X ) as the identity. For all objects X ∈ (X , Z C ) T , define Combining naturality and the adjunction properties of the unit η and counit ε with the diagrams (12) − (13), one can check that f and g are indeed morphisms in (X , Z C ) T . Now define γ by putting γX = gX, for all X ∈ (X , Z C ) T . ⊔ ⊓ Proposition 5.1.2. With notation as above, K is an equivalence of categories if and only if K A is an equivalence of categories and γ : ΛV A → V B is a natural isomorphism.
Proof. Assume that K is an equivalence. Up to an isomorphism, any X ∈ (X , Z C ) T has the form X = KZ, for some Z ∈ Z, i.e. Since (L, R) is an adjoint pair, γX is an isomorphism. By the construction of the comparison functor in Section 3.5, K B = V B K and K A = V A K. Denote the inverse functor of K by D. In view of Proposition 3.6.4, for an object X in (X , Z C ) T , DX is the following colimit in Z, Since γ is a natural isomorphism, this colimit reduces to (each) one of the following isomorphic coequalisers Therefore, there are functors D A : X A → Z and D B : The fact that K is an equivalence of categories is used in the last isomorphism of (27) and in the second isomorphism of (28). The first isomorphism of (28) follows by Lemma 5.1.1. These natural isomorphisms are exactly the unit and counit of the adjunction (D A , K A ), hence K A is an equivalence of categories.
Conversely, if γ is a natural isomorphism, then, in light of its construction in the proof of Lemma 5.1.1, the counit of the adjunction (H, V A ) is a natural isomorphism, hence V A is an equivalence of categories. Since K = V A K A , we infer that K is an equivalence of categories as well. ⊔ ⊓ Next, we apply the results of Section 4 to the pair of monads described at the beginning of this section. T of (26) is a Morita context between X and Z C . For any (X, ρ X ) ∈ X A , the coequaliser (20) is a contractible coequaliser in Z C : Hence the functor T A exists and, furthermore, T A = Λ. For any (Y, ρ Y , τ Y ) ∈ (Z C ) B , consider the following pair in X (or in X A ) Then Rρ Y is a common right inverse for RεY and Rτ Y . Furthermore, the following is a contractible coequaliser in ( Hence, (29) is a reflexive L-contractible coequaliser pair. Thus if the coequaliser of the pair (29) exists (in X ), it is exactly the coequaliser (19).
The unmarked arrows are canonical isomorphisms (induced by actions). With every Morita context one associates a matrix-type Morita ring with the product given by Since Q has two orthogonal idempotents summing up to the identity, its left modules split into direct sums. More precisely, left Q-modules correspond to quadruples (X, Y,v,w), where X is a left A-module, Y is a left B-module,v : M ⊗ B Y → X is a left A-module map andw : N ⊗ A X → Y is a left B-module map such that the following diagrams With the interpretation of (Ab, Ab) T as left Q-modules Q M, the functors U A ⊗ , U B ⊗ constructed in Section 3.3 are forgetful functors Q M → Ab, The functors G A ⊗ , G B ⊗ send an abelian group X to its tensor product with respective columns in Q. More precisely, G A ⊗ (X) = A ⊗ X ⊕ N ⊗ X with the multiplication by Q, for all m, m ′ ∈ M, n, n ′ ∈ N, a, a ′ ∈ A, b, b ′ ∈ B and x, y ∈ X.
The construction presented in this section can be repeated with X chosen to be the category k A M of left modules over a ring k A and Y the category of left modules over a ring k B . All the functors A ⊗ , B ⊗ , T , T can be chosen as tensor functors with the tensor product over respective rings k A or k B . For example, take a k A -k A bimodule A and define A ⊗ as a functor − ⊗ k A A : Since modules over a k A -ring A coincide with modules of the ring A, one can choose further an A-B bimodule M and B-A bimodule N and proceed as above, taking care to decorate suitably tensor products with k A and k B .

5.3.
Categories with binary coproducts. The characterisation of the Eilenberg-Moore category of a module-theoretic Morita context described in Section 5.2 can be seen as a special case of the following situation. Assume that categories X and Y have binary coproducts. Take a Morita context T = (A, B, T, T, ev, ev) on X and Y which functors A, B, T and T preserve (binary) coproducts. These data lead to the following monad Q = (Q, m, u) on the product category X × Y. The functor Q is defined as Q : (X, Y ) → (AX + T Y, BY + T X). The unit u of Q is the composite: with shepherds γ and γ ′ , i.e. whose third and fourth components make the following diagram The category of herd functors between categories X and Y is denoted by Herd(X , Y). This category contains a full subcategory Herd(X , Y) of balanced herds with objects those herds, whose underlying formally dual pair is a Morita cotext (i.e. characterised by the forgetful functor Herd(X , Y) → Mor(X , Y)). u u k k k k k k k k k k k k k k k A morphism from a pre-torsor (Z, (L A , R A ), (L B , R B ), τ ) to (Z ′ , (L ′ A , R ′ A ), (L ′ B , R ′ B ), τ ′ ) is a morphism F in Adj(X , Y) that is compatible with the structure maps τ and τ ′ . The compatibility condition is expressed as the equality where a and b are defined by (1) and the shorthand notation for the Godement product is used. The category of pre-torsors on categories X and Y is denoted by PreTor(X , Y). Even the most perfunctory comparison of diagrams (32) with (34)-(35) reveals that the functor Υ applied to the double adjunction Z underlying a pre-torsor (Z, τ ) yields a (balanced) herd with a shepherd τ , i.e. (ΥZ, τ ) is a herd. The definition of Υ on morphisms immediately affirms that the condition (36) for F implies condition (33) for ΥF . Thus Υ yields the functor Υ : PreTor(X , Y) → Herd(X , Y) ⊆ Herd(X , Y), (Z, τ ) → (ΥZ, τ ).
The key observation is that T = U A G B and T = U B G A , hence the shepherd γ of the herd T becomes the natural transformation τ for the corresponding pre-torsor ((X , Y) T , (G A , U A ), (G B , U B )); see the definition of U A , G A , U B , G B in Section 3.3. As (implicitly) calculated in the proof of Proposition 3.5.2, the natural trasformations a and b corresponding to the comparison functor K : Z → (X , Y) T are identity maps, hence the condition (36) is trivially satisfied, so, for any pre-torsor, K is a morphism of pre-torsors. Thus Proposition 3.5.2 and Corollary 3.5.3 immediately imply On the other hand, one can consider the category of Morita-Takeuchi contexts, whose objects are sextuples (C, D, P, P, cov, cov) consisting of two comonads, two bicoalgebra functors, and two bicolinear cobalanced natural transformations satisfying compatibility conditions dual to those in Section 2.3. Also, one can consider an intermediate version, where the first two objects in the sextuple are a monad and a comonad respectively.
By (semi-)dualising the results of the previous sections, functors between the respective categories with pairs of adjunctions and the respective categories of contexts can be constructed. Appropriate Eilenberg-Moore categories for various contexts can be defined thus yielding a converse construction and leading to the definition of a comparison functor in each case, and to the solution of the corresponding moritability problem.
6.2. Bicategories. Adjoint pairs, Morita and Takeuchi contexts have a natural formulation within the framework of bicategories; see, for example, the bicategorical formulation of wide Morita contexts in [7]. We believe that our work can, taking into account the needed (computational) care but without any conceptual problems, be transferred to this (more general) setting. However, we preferred to formulate the results of this paper in the present way, as this presentation might be clearer, more accessible and we believe that even in this generality it covers already enough interestering examples and applications.