Semantic Factorization and Descent

Let $\mathbb{A}$ be a $2$-category with suitable opcomma objects and pushouts. We give a direct proof that, provided that the codensity monad of a morphism $p$ exists and is preserved by a suitable morphism, the factorization given by the lax descent object of the higher cokernel of $p$ is up to isomorphism the same as the semantic factorization of $p$, either one existing if the other does. The result can be seen as a counterpart account to the celebrated B\'{e}nabou-Roubaud theorem. This leads in particular to a monadicity theorem, since it characterizes monadicity via descent. It should be noted that all the conditions on the codensity monad of $p$ trivially hold whenever $p$ has a left adjoint and, hence, in this case, we find monadicity to be a $2$-dimensional exact condition on $p$, namely, to be an effective faithful morphism of the $2$-category $\mathbb{A} $.


Introduction
Grothendieck descent theory [7] has been generalized from a solution of the problem of understanding the image of the functors Mod(f ) in which Mod : Ring → Cat is the usual pseudofunctor between the category of rings and the 2-category of categories that associates each ring R with the category Mod(R) of right R-modules (e.g. [10]).
It is often more descriptive to portray descent theory as a higher dimensional counterpart of sheaf theory (see, for instance, the introduction of [8]). In this context, the analogy can be roughly stated as follows: the descent condition and the descent data are respectively two-dimensional counterparts of the sheaf condition and the gluing condition.
The most fundamental constructions in descent theory are the lax descent category and its variations (e.g. [28, pag. 177]). Namely, given a truncated pseudocosimplicial category A : ∆ 3 → Cat we construct its lax descent category or descent category. An object of the lax descent category (descent category) is an object x of the category A(1) endowed with a descent data which is a morphism (respectively, invertible morphism) A(d 1 )(x) → A(d 0 )(x) satisfying the usual cocycle/associativity and identity conditions. Morphisms are morphisms between the underlying objects in A(1) that respect the descent data.
Another perspective, which highlights descent theory's main role in Janelidze-Galois theory, is that, given a bifibred category, the lax descent category of the truncated pseudocosimplicial category induced by an internal category generalizes the notion of the category of internal (pre)category actions (e.g. [9,Section 1]).
In the setting above, if the bifibration is the basic one, we actually get the notion of internal actions. The simplest example is the category of actions of a small category in Set; that is to say, the category of functors from a small category into Set. A small category a is just an internal category in Set and the category of actions (functors) a → Set coincides with the lax descent category of the composition of the (image by op : Cat co → Cat of the) internal category a, op(a) : ∆ 3 → Set op , with the pseudofunctor Set/− : Set op → Cat that comes from the basic fibration.
Assume that we have a pseudofunctor F : C op → Cat such that C has pullbacks, and F (q)! ⊣ F (q) for every morphism q of C. Given a morphism q : w → w ′ of C, the Bénabou-Roubaud theorem (see [4] or, for instance, [19,Theorem 1.4]) says that the (lax) descent category of the truncated pseudocosimplicial category given by the composition of F with the internal groupoid induced by q, is equivalent to the Eilenberg-Moore category of the monad induced by the adjunction F (q)! ⊣ F (q), provided that F satisfies the so called Beck-Chevalley condition (see, for instance, the Beck-Chevalley condition for pseudofunctors in [21,Section 4]).
Since monad theory already was a established subfield of category theory, the Bénabou-Roubaud theorem gave an insightful connection between the theories, motivating what is nowadays often called monadic approach to descent by giving a characterization of descent via monadicity in several cases of interest (see, for instance, [24,Section 1], [8,Section 2], or the introduction of [19]).
The main contribution of the present article can be seen as a counterpart account to the Bénabou-Roubaud theorem. We give the semantic factorization via descent, hence giving, in particular, a characterization of monadicity via descent. Although the Bénabou-Roubaud theorem is originally a result in the setting of the 2-category Cat, our contribution takes place in the more general context of two-dimensional category theory (e.g. [12]), or in the so called formal category theory, as briefly explained below.
In his pioneering work on bicategories, Bénabou observed that the notion of monad, formerly called standard construction or triple, coincides with the notion of a lax functor 1 → Cat and can be pursued in any bicategory, giving convincing examples to the generalization of the notion [3,Section 5].
Taking Bénabou's point in consideration, Street [25,26] gave a formal account and generalization of the former established theory of monads by developing the theory within the general setting of 2-categories. The formal theory of monads is a celebrated example of how two-dimensional category theory can give insight to 1-dimensional category theory, since, besides generalizing several notions, it conceptually enriches the formerly established theory of monads. Street [25] starts showing that, when it exists, the Eilenberg-Moore construction of a monad in a 2-category A is given by a right 2-reflection of the monad along a 2-functor from the 2-category A into the 2-category of monads in A. From this point, making good use of the four dualities of two-dimensional category theory, Street develops the formal account of aspects of monad theory, including distributive laws, Kleisli construction, and a generalization of the semantics-structure adjunction (e.g. [5,Chapter II]).
The theory of two-dimensional limits (e.g. [28,11]), or weighted limits in 2-categories, also provides a great account of formal category theory, since it shows that several constructions previously introduced in 1-dimensional category theory are actually examples of weighted limits and, hence, are universally defined and can be pursued in the general context of a 2-category.
Examples of the constructions that are particular weighted limits are: the lax descent category and variations, the Eilenberg-Moore category [6,Theorem 2.2] and the comma category [15, pag. 36]. Duality also plays important role in this context: it usually illuminates or expands the original concepts of 1-dimensional category theory. For instance: -The dual of the notion of descent object gives the notion of codescent object, which is important, for instance, in 2-dimensional monad theory (see, for instance, [14,17,18]); -The dual notion of the Eilenberg-Moore object in Cat gives the Kleisli category [13] of a monad, while the codual gives the category of the coalgebras of a comonad.
Despite receiving less attention in the literature than the notion of comma object, the dual notion, called opcomma object, was already considered in [27, pag. 109] and it is essential to the present work. More precisely, given a morphism p : e → b of a 2-category A, if A has suitable opcomma objects and pushouts, on one hand, we can consider the two-dimensional cokernel diagram of p, whose precise definition can be found in 2.9 below. Assuming that A has the lax descent object of H p , the universal property of lax-Desc (H p ) and the universal 2-cell of the opcomma object induce a factorization of p, called herein the semantic lax descent factorization. If the comparison morphism e → lax-Desc (H p ) is an equivalence, we say that p is an effective faithful morphism. This concept is actually self-codual, meaning that its codual notion coincides with the original one.
On the other hand, if such a morphism p has a codensity monad t which means that the right Kan extension of p along itself exists in A, then the universal 2-cell of the ran p p induces the semantic factorization through the Eilenberg-Moore object b t of t provided that it exists (see, for instance, [5, pag. 67] for the case of the 2-category of enriched categories). If the comparison e → b t is an equivalence, we say that p is monadic. The codual notion is that of comonadicity.
The main theorem of the present article concerns both the factorizations above. More precisely, Theorem 4.8 states the following: Main Theorem: Let A be a 2-category which has the two-dimensional cokernel diagram of a morphism p. Moreover, assume that ran p p exists and is preserved by the universal morphism δ 0 p↑p of the opcomma object b ↑ p b. There is an isomorphism between the Eilenberg-Moore object b t and the lax descent object lax-Desc (H p ), either one existing if the other does. In this case, the semantic factorization (SF) is isomorphic to the semantic lax descent factorization (SLDF).
In particular, this gives a formal monadicity theorem as a corollary, since it shows that, assuming that a morphism p of A satisfies the conditions above on the codensity monad, p is monadic if and only if p is an effective faithful morphism. Moreover, since this result holds for any 2-category, we can consider the duals of this formal monadicity theorem: namely, we also get characterizations of comonadic, Kleisli and co-Kleisli morphisms.
By the Dubuc-Street formal adjoint-functor theorem (viz., [5,Theorem I.4.1] and [30,Prop. 2]), if p has a left adjoint, the codensity monad is the monad induced by the adjunction and ran p p is absolute. Thus, in this case, assuming the existence of the twodimensional cokernel diagram, the hypothesis of our theorem holds. Therefore, as a corollary of our main result, we get the following monadicity characterization: Monadicity Theorem: Assume that the 2-category A has the two-dimensional cokernel diagram of p : e → b.
-The morphism p is monadic if and only if p is an effective faithful morphism and has a left adjoint; -The morphism p is comonadic if and only if p is an effective faithful morphism and has a right adjoint.
Recall that, in the particular case of A = Cat (and other 2-categories, such as the 2-category of enriched categories), we have Beck's monadicity theorem (e.g. [2, Theorem 3.14] and [5, Theorem II.2.1]). It states that: a functor is monadic if and only if it creates absolute coequalizers and it has a left adjoint. Hence, by our main result, we can conclude that: provided that the functor p has a left adjoint, p creates absolute coequalizers if and only if it is an effective faithful morphism.
The fact above suggests the following question: are effective faithful morphisms in Cat characterized by the property of creating absolute coequalizers? In Remark 5.14 we show that the answer to this question is negative by the self coduality of the concept of effective faithful morphism and non-self duality of the concept of functor that creates absolute coequalizers. This work was motivated by two main aims. Firstly, to get a formal monadicity theorem given by a 2-dimensional exact condition. Secondly, to better understand the relation between descent and monadicity in a given 2-category and, together with [19], get alternative guiding templates for the development of higher descent theory and monadicity.
Although we do not make these connections in this paper, the results on 2-dimensional category theory of the present work already establish framework and have applications to the author's ongoing work on descent theory in the context of [8,19].
The main aim of Section 1 is to set up basic terminology related to the category of the finite nonempty ordinals ∆ and its strict replacement ∆ Str . As observed above, this work is meant to be applicable in the classical context of descent theory and, hence, we should consider lax descent categories of pseudofunctors ∆ 3 → Cat. In order to do so, we consider suitable strict replacements ∆ Str → Cat.
The main results (Theorem 4.7 and Theorem 4.8) can be seen as theorems on 2dimensional limits and colimits. For this reason, we recall basics on 2-dimensional limits in Section 2. We give an explicit definition of the 2-dimensional limits related to the two-dimensional cokernel diagram. This helps to establish terminology and framework for the rest of the paper. In 2.5, we give an explicit definition of the lax descent object for 2-functors ∆ Str → A in order to establish the lax descent factorization induced by the two-dimensional cokernel diagram (2.11.1) of a morphism p, the semantic lax descent factorization of p. This perspective over lax descent objects is also useful to future work on giving further applications of the results of the present paper in Grothendieck descent theory within the context of [8,19].
In Section 3, we recall basic aspects of Eilenberg-Moore objects in a 2-category A. Given a tractable morphism p in A, it induces a monad and, in the presence of the Eilenberg-Moore objects, it also induces a factorization, the semantic factorization of p (e.g. [25,Section 2] or [5, Theorem II.1.1]). We are only interested in morphisms p that have codensity monads, that is to say, the right Kan extension of p along itself. We recall the basics of this setting, including the definitions of right Kan extensions and codensity monads in Section 3.
We do not present more than very basic toy examples of codensity monads. We refer to [5,Chapter II] for the classical theory on codensity monads, while [1,16] are recent considerations that can be particularly useful to understand interesting examples.
Still in Section 3, Lemma 3.5 gives a connection between opcomma objects and right Kan extensions. The statement is particularly useful for establishing an important adjunction (see Propositions 4.1 and 4.2) and proving the main results. The Dubuc-Street formal adjoint-functor theorem, also important for our proofs, is recalled in Theorem 3.14.
The mate correspondence [12, Proposition 2.1] is a useful framework in 2-dimensional category theory that states an isomorphism between two special double categories that come from each 2-category A. It plays a central role in the proof of Theorem 4.7, but we only need it in very basic terms as recalled in Remark 3.15, with which we finish Section 3.
The point of Section 4 is to prove the main results of the present paper. We start by establishing an important condition to the main theorem, which arises from Propositions 4.1 and 4.2: the condition of preservation of ran p p by the universal morphism δ 0 p↑p . We, then, go towards the proof of the main result, constructing an adjunction in Proposition 4.4, defining particularly useful 2-cells for our proof in Lemma 4.6 and, finally, proving Theorem 4.7.
We also give a brief discussion on the condition of Proposition 4.2. Firstly, we show that every right adjoint morphism satisfies the condition in Proposition 4.3. Then we give examples and counterexamples in 4.12.
The final section is mostly intended to apply our main result in order to get our monadicity theorem using the concept of effective faithful morphism. We finish the article with a remark on the self-coduality of this concept, in opposition to the non-self duality of the property of creating absolute coequalizers. This gives a comparison between the Beck's monadicity theorem and ours, showing in particular that effective faithful morphisms in Cat are not characterized by the property of creating absolute coequalizers.

Categories of ordinals
Let Cat be the cartesian closed category of categories in some universe. We denote the internal hom by A 2-category A herein is the same as a Cat-enriched category. As usual, the composition of 1-cells (morphisms) is denoted by •, ·, or omitted whenever it is clear from the context. The vertical composition of 2-cells is denoted by · or omitted when it is clear, while the horizontal composition is denoted by * . Recall that, from the vertical and horizontal compositions, we construct the basic operation of pasting (see [12, pag. 79] and [23]).
As mentioned in the introduction, duality is one of the most fundamental aspects of theories on 2-categories. Unlike 1-dimensional category theory, two-dimensional category theory has four duals. More precisely, any 2-category A gives rise to four 2-categories: A, A op , A co , A coop which are respectively related to inverting the directions of nothing, morphisms, 2-cells, morphisms and 2-cells. Hence every concept/result gives rise to four (not necessarily different) duals: the concept/result itself, the dual, the codual, the codual of the dual.
Although it is important to keep in mind the importance of duality, we usually leave to the interested reader the straightforward exercise of stating precisely the four duals of most of the dualizable aspects of the present work.
In this section, we fix notation related to the categories of ordinals and the strict replacement ∆ Str . We denote by ∆ the locally discrete 2-category of finite nonempty ordinals and order preserving functions between them. Recall that ∆ is generated by the degeneracy and face maps; that is to say, ∆ is generated by the diagram For simplicity, we use the same notation to the objects and morphisms of ∆ and their images by the usual inclusion ∆ → Cat which is locally bijective on objects. It should be noted that the image of the faces and degeneracy maps by ∆ → Cat are given by: Furthermore, in order to give the weight of the lax descent object, we consider the 2category ∆ Str .
We denote by ∆ Str the 2-category freely generated by the diagram with the invertible 2-cells: There is a biequivalence e ∆ Str : ∆ Str ≈ ∆ 3 which is bijective on objects, defined by:

Remark.
It should be noted that, given a 2-category A and a pseudofunctor B : ∆ 3 → A, we can replace it by a 2-functor A : ∆ Str → A defined by

Weighted colimits and the two-dimensional cokernel diagram
The main result of this paper relates the factorization given by the lax descent object of the two-dimensional cokernel diagram of a morphism with the semantic factorization, in the presence of opcomma objects and pushouts inside a 2-category A. In other words, it relates the lax descent objects, the Eilenberg-Moore objects, the opcomma objects and pushouts. These are known to be examples of 2-dimensional limits and colimits. Hence, in this section, before defining the two-dimensional cokernel diagram and the factorization induced by its lax descent object, we recall the basics of the special weighted (co)limits related to the definitions. Two dimensional limits are the same as weighted limits in the Cat-enriched context [28,11]. Assuming that S is a small 2-category, let W : S → Cat, D : S → Cat and D ′ : S op → A be 2-functors. If it exists, we denote the weighted limit of D with weight W by lim (W, D). Dually, we denote by colim (W, D ′ ) the weighted colimit of D ′ provided that it exists. Recall that colim (W, D ′ ) is a weighted colimit if and only if we have a 2-natural isomorphism (in z) in which [S op , Cat] denotes the 2-category of 2-functors S op → Cat, 2-natural transformations and modifications. By the Yoneda embedding of 2-categories, if a two dimensional (co)limit exists, it is unique up to isomorphism. It is also important to keep in mind the fact that existing weighted limits in A are created by the Yoneda embedding A → [A op , Cat], since it preserves weighted limits and is locally an isomorphism (Cat-fully faithful).
Recall that Cat has all weighted colimits and all weighted limits. Moreover, in any 2-category A, every weighted colimit can be constructed from some special 2-colimits provided that they exist: namely, tensor coproducts (with 2), coequalizers and (conical) coproducts. Dually, weighted limits can be constructed from cotensor products (with 2), equalizers and products provided that they exist.
2.1. Tensorial coproducts. Tensorial products and tensorial coproducts are weighted limits and colimits with the domain/shape 1. So, in this case, the weight of a tensorial coproduct is entirely defined by a category a in Cat. If b is an object of A, assuming its existence, we usually denote by a ⊗ b the tensorial coproduct, while the dual, the cotensorial product, is denoted by a ⋔ b.
Clearly, if b is an object of Cat, the tensorial coproduct a ⊗ b in Cat is isomorphic to the (conical) product a × b, while a ⋔ b ∼ = Cat[a, b].

Pushouts and coproducts.
Two dimensional conical (co)limits are just weighted limits with a weight constantly equal to the terminal category 1. Hence the weight/shape of a two dimensional conical (co)limits is entirely defined by the domain of the diagram.
The existence of a 2-dimensional conical (co)limit of a 2-functor D : S → A defined in a locally discrete 2-category S (i.e. a diagram defined in a category S) in a 2-category A is stronger than the existence of the 1-dimensional conical (co)limit of the underlying functor of the 2-functor D in the underlying category of A. However, in the presence of the former, by the Yoneda lemma for 2-categories, both are isomorphic.
As in the 1-dimensional case, the conical 2-colimits of diagrams shaped by discrete categories are called coproducts, while the conical 2-colimits of diagrams with the domain being the opposite of the category S defined by (2.2.1) gives the notion of pushout.
Recall that, if p 0 : e → b 0 , p 1 : e → b 1 are morphisms of a 2-category A, assuming its existence, the pushout of p 1 along p 0 is an object b 0 ⊔ (p 0 ,p 1 ) b 1 , also denoted by p 0 ⊔ e p 1 , satisfying the following: there are 1-cells commutative and, for every object y and every pair of 2-cells

Opcomma objects.
We consider the 2-category S defined in (2.2.1) and the weight P : S → Cat, defined by P (1) := P (0) := 1, P (2) := 2, and P (d 0 ) = d 0 , P (d 1 ) = d 1 ; that is to say, the weight 2 in which d 0 and d 1 are respectively the inclusion of the codomain and the inclusion of the domain of the non-trivial morphism of 2 (as defined in Section 1). Limits weighted by P are the well known comma objects, while the colimits weighted by P are called opcomma objects. By definition, if p 0 : e → b 0 , p 1 : e → b 1 are morphisms of a 2-category A and p 0 ↑ p 1 is the opcomma object of p 1 along p 0 , then A(p 0 ↑ p 1 , −) is the comma object of A(p 1 , −) along A(p 0 , −). This means that: there are 1-cells satisfying the following: hold.

Remark. Since
Cat has all weighted colimits and limits, it has opcomma objects. More generally, if any 2-category A has tensorial coproducts and pushouts, then A has opcomma objects. More precisely, assuming that the tensorial coproduct 2 ⊗ e exists in A, we have the universal 2-cell d 1 ⊗ e ⇒ d 0 ⊗ e : e → 2 ⊗ e given by the image of the identity 2 ⊗ e → 2 ⊗ e by the isomorphism If it exists, the conical colimit of the diagram below is the opcomma object p 0 ↑ p 1 of 2.5. Lax descent objects. We consider the 2-category ∆ Str of Definition 1.1 and we define the weight D : ∆ Str → Cat by in which: -3 is the category corresponding to the preordered set in which the preorder induced by the first coordinate, that is to say, In other words, the category 3 is defined by the preordered set below.
-The natural transformation

Definition.
[Lax descent object] Given a 2-functor B : ∆ Str → A, if it exists, the weighted limit lim(D, B) is called the lax descent object of B.

Remark. Since
Cat has all weighted limits, it has lax descent objects. More precisely, if A : ∆ Str → Cat is a 2-functor, is the category in which: 1. Objects are 2-natural transformations ψ : D −→ A. We have a bijective correspondence between such 2-natural transformations and pairs (w, ψ) in which w is an object of A(1) and ψ : satisfying the following equations: Associativity: If ψ : D −→ A is a 2-natural transformation, we get such pair by the correspondence 2. The morphisms are modifications. In other words, a morphism m : of a morphism (D,B) and a 2-cell Ψ (D,B) in A satisfying the following three properties.

For each pair
in which h is a morphism and β is a 2-cell of A such that the equations commutative and such that (2.7.5) holds.
satisfying the equation there is a unique 2-cell of p along itself and the pushout (2.8.2) of δ 0 along δ Henceforth, in this section, we assume that A has the two-dimensional cokernel diagram of p. We denote by the unique morphism such that the equations is called the two-dimensional cokernel diagram of p.
2.10. Remark. This construction was, for instance, already considered in [31, pag. 135] under the name resolution, specially in the 2-category of pretoposes and in the 2-category of exact categories.
2.11. Remark. The 2-category of categories Cat has the two-dimensional cokernel diagram of any functor. In particular, the two-dimensional cokernel diagram of id 1 is which is just the usual inclusion of the locally discrete 2-category ∆ 3 in Cat.
By the definitions of ∂ 1 and s 0 ((2.8.4) and (2.8.5)), the pair satisfies the descent associativity and identity w.  such that e b holds.
Inspired by our main result (Theorem 4.7), we establish the following terminology. and by the pair  is given by Clearly, if A has the lax descent object of the two-dimensional cokernel diagram H p , the factorization given in (2.13.2) is isomorphic to the factorization given by the image of (2.11.1) by A(x, −) : A → Cat, since the Yoneda embedding creates any existing lax descent objects in A.

2.
14. Remark. It should be noted that, assuming that we can construct H p in A, the factorization (2.13.2) always exists, since Cat has lax descent objects (lax descent categories). Moreover, since opcomma objects (weighted colimits in general) might not be preserved by the Yoneda embedding, the definition of the factorization given in (2.13.2) does not coincide with the definition of semantic lax descent factorization of A(x, p) in Cat.
For instance, consider the example of Remark 2.11. For any object x of Cat, clearly the opcomma object of Cat[x, id 1 ] along itself is isomorphic to the opcomma object of id 1 along itself, that is to say, 2. Hence, since there is a category x such that Cat[x, 2] is not isomorphic to 2, this shows that the Yoneda embedding does not preserve the opcomma object id 1 ↑ id 1 .

Remark.
[Duality: two-dimensional kernel diagram and the induced factorization] The codual notion of that of the two-dimensional cokernel diagram gives the same notion of factorization (assuming the existence of the suitable lax descent object): namely, the factorization given in (2.11.1) of the morphism p.
The dual concept of the two-dimensional cokernel diagram, the 2-dimensional kernel diagram of l : b → e, if it exists, is a 2-functor In the special case of the 2-category Cat, the 2-dimensional kernel diagram was, for instance, also considered in [29, pag. 544

Semantic factorization
Assuming that A has suitable Eilenberg-Moore objects, the semantics-structure adjunction (e.g. [25, Section 2]) gives rise to what is called herein the semantic factorization of a tractable morphism p. In this section, we recall the semantic factorization of morphisms that have codensity monads. Before doing so, we recall the definition of the Eilenberg-Moore object of a given monad.
3.1. Eilenberg-Moore object. Recall that a monad in a 2-category A is a quadruple in which b is an object, t is a morphism and m, η are 2-cells in A such that the equations hold. A monad can be seen as a 2-functor t : mnd → A from the free monad 2-category mnd = Σ∆ to A (e.g. [28, pag. 178] or [19,Sect. 6]). If it exists, the Eilenberg-Moore object, also called the object of algebras, is a special weighted limit of t. More precisely, given a monad t in A, the object b t is the Eilenberg-Moore object of t if and only if there is a 2-natural isomorphism (in y) in which A(y, b) A(y,t) is the Eilenberg-Moore category of the monad in Cat. This means that, if the Eilenberg-Moore object b t of t = (b, t, m, η) exists, it is characterized by the following universal property. There is a pair in which Ù t is a morphism, and µ t is a 2-cell in A satisfying the following three properties.
1. For each pair (h : y → b, β : t · h ⇒ h) in which h is a morphism and β is a 2-cell in A making the equations It should be noted that, in this case, we get in particular that commutes.
2. The pair (Ù t , µ t ) satisfies the algebra associativity (3.1.4) and identity (3.1.5) equations. In this case, the unique morphism induced is clearly the identity on b t .

Assume that h
is satisfied, there is a unique 2-cell This means that the right Kan extension is actually a pair ran g f : x → y, γ rangf : (ran g f ) · g ⇒ f of a morphism ran g f and a 2-cell γ rangf , called the universal 2-cell, such that, for each morphism h : x → y of A, defines a bijection A(x, y)(h, ran g f ) ∼ = A(z, y)(h · g, f ).

Remark. [Duality: right lifting and left Kan extension] The dual notion of that of a right Kan extension is called right lifting (see [30, Section 1]), while the codual notion is called the left Kan extension.
Finally, of course, we also have the codual notion of the right lifting: the left lifting.
Let p 0 : e → b 0 , p 1 : e → b 1 be morphisms of a 2-category A. Assume that A has the opcomma object p 0 ↑ p 1 and is the universal 2-cell that gives p 0 ↑ p 1 as the opcomma object of p 1 along p 0 , as in 2.3 (Eq. 2.3.2). In this case, we have: 3.5. Lemma. Given a morphism h : p 0 ↑ p 1 → y, the following statements are equivalent.

Proof. Assuming i), given a 2-celľ
we conclude, by the universal property of the opcomma object, that there is a unique morphism h ′ : p 0 ↑ p 1 → y such that and h ′ · δ 0 p 0 ↑p 1 = h · δ 0 p 0 ↑p 1 . By the universal property of the Kan extension, there is a unique 2-cell β : h ′ ⇒ h such that the equation is satisfied.
By the universal property of the opcomma object (see (2.3.4)), this means that β * id δ 1 p 0 ↑p 1 is the unique 2-cell such that This proves ii).
Reciprocally, assuming ii), by the universal property of the right Kan extension of the hypothesis, we have that, given any 2-cell holds, in which, for each i ∈ {1, 2}, h ′ i := h ′ · δ i p 0 ↑p 1 and h i := h · δ i p 0 ↑p 1 . By the universal property of the opcomma p 0 ↑ p 1 , this implies that there is a unique β : h ′ ⇒ h such that β * id δ 0 p 0 ↑p 1 = β 0 . Hence we get i).

Definition.
[Codensity monad] A morphism p : e → b of a 2-category A has the codensity monad if the right Kan extension (ran p p, γ) of p along itself exists. Assuming that A has the codensity monad of p and denoting ran p p by t, we consider: In this case, by the universal property of the right Kan extension of p along itself, the quadruple t = (b, t, m, η) is a monad called the codensity monad of p.
Assuming that t = (b, t, m, η) is the codensity monad of p : e → b as above, by (3.6.1) and (3.6.2), it is clear that the pair (p : e → b, γ : t · p ⇒ p) satisfies the algebra associativity and identity equations w.r.t. the monad t (that is to say, (3.1.5) and (3.1.4) w.r.t. the monad t). Hence, assuming that A has the Eilenberg-Moore object Since the Yoneda embedding creates any existing Eilenberg-Moore object of A, the factorization (3.7.1) coincides up to isomorphism with the factorization of A(x, p) induced by (A(x, p), A(x, γ)) and A(x, b) A(x,t) ; that is to say, the commutative triangle which is given by 3.8. Remark. Let p be a morphism of A which has the codensity monad t. Since Cat has Eilenberg-Moore objects, the factorization of A(x, p) induced by (A(x, p), A(x, γ)) and A(x, b) A(x,t) as above always exists, even if A does not have the Eilenberg-Moore object of t .

Remark.
[Duality: op-codensity monad] The codual notion of the notion of codensity monad is that of density comonad, which is induced by the left Kan extension of the morphism along itself, assuming its existence. The dual notion is herein called op-codensity monad. Notice that, if it exists, the opcodensity monad of a morphism is induced by the right lifting of the morphism through itself. Finally, of course, we have also the codual notion of the op-codensity monad, called herein the op-density comonad.
Therefore, we also have factorizations: assuming the existence of the Kleisli object of the op-codensity monad of a morphism, we get the op-semantic factorization. Codually, we have the co-semantic factorization of a morphism that has the density comonad, provided that the 2-category has its co-Eilenberg-Moore object.
are, respectively, the identities id l : l ⇒ l and id p : p ⇒ p. In this case, p is right adjoint to l and we denote the adjunction by (l ⊣ p, ε, η) : b → e. If (l ⊣ p, ε, η) : b → e is an adjunction in a 2-category A, p has the codensity monad and the op-density comonad. More precisely, in this case, the pair (pl, id p * ε) is the right Kan extension of p along itself and (lp, η * id p ) is the left lifting of p through itself. Hence, the codensity monad of p coincides with the monad t = (b, pl, id p * ε * id l , η) induced by the adjunction, while the op-density comonad coincides with the comonad (e, lp, id l * η * id p , ε) induced by the adjunction. Codually, if (l ⊣ p, ε, η) : b → e is an adjunction, the density comonad and the op-codensity monad induced by l : b → e are the same of those induced by the adjunction.
Assuming the existence of the Eilenberg-Moore object of the monad (codensity monad t) induced by the adjunction (l ⊣ p, ε, η), the semantic factorization is the usual factorization of the right adjoint morphism through the object of algebras. Dually and codually, assuming the existence of the suitable weighted limits and colimits, we get all the four usual factorizations of l and p.
More precisely, the op-semantic factorization of l : b → e is the usual Kleisli factorization e b l right Kan extension ran g f if gives the right Kan extension of the morphism δ · f along g. Furthermore, the right Kan extension ran g f, γ rangf is absolute if it is preserved by any morphism with domain in y.

Remark.
[Duality: respecting liftings] The dual notion of that of preservation of a Kan extension is that of respecting a lifting. If a pair rlift g f, γ rliftgf is the right lifting of f through g, a morphism δ : y ′ → y respects the right lifting of f through g if (rlift g f ) · δ, γ rliftgf * id δ is the right lifting of f · δ through g. If (l ⊣ p, ε, η) : b → e is an adjunction in a 2-category A, p preserves any right Kan extension with codomain in b. Furthermore: 3.14. Theorem. 30]] If p : e → b is a morphism in a 2-category A, the following statements are equivalent.
i) The pair (l, ε) is the right Kan extension of id e along p and it is preserved by p.
ii) The pair (l, ε) is the right Kan extension of id e along p and it is absolute.
iii) The morphism p has a left adjoint l, with the counit ε : lp ⇒ id e .
In particular, if p : e → b has a left adjoint, then it has the codensity monad and the right Kan extension of p along itself is absolute.
The image of a 2-cell β : , h e · l 0 ) above is called the mate of β under the adjunction l 0 ⊣ p 0 and l 1 ⊣ p 1 .

Main theorems
Let A be a 2-category and p : e → b a morphism of A. Throughout this section, we assume that p has the codensity monad t = (b, t, m, η), in which (t, γ) is the right Kan extension of p along itself. Furthermore, we assume that A has the two-dimensional cokernel diagram H p : ∆ Str → A of p.
We follow the notation respectively established in 3.6, 2.8 and 2.9 for the codensity monad of p, the two-dimensional cokernel diagram of p and the morphisms involved in the diagram.
Moreover, by the universal property of the opcomma object b ↑ p b, there is a unique morphism ℓ such that (4.0.1) and (4.0.2) hold. Henceforth, we denoted this morphism by Proof. By Lemma 3.5, since (t, γ) is the right Kan extension of ℓ · δ 0 · p = p along p, we get that (ℓ, γ) is the right Kan extension of ℓ · δ 0 = id b along δ 0 .

Proposition. [Condition]
The right Kan extension (t, γ) of p along itself is preserved by δ 0 : b → b ↑ p b if and only if ℓ is left adjoint to δ 0 . In this case, we have an adjunction Proof. It follows from Lemma 3.5 and Proposition 4.1 that (δ 0 · ℓ, id δ 0 ) is the right Kan extension of δ 0 along itself if and only if (δ 0 · t, id δ 0 * γ) is the right Kan extension of δ 0 · p along p. By Proposition 4.1 and Theorem 3.14, we know that δ 0 preserves the right Kan extension (ℓ, id id b ) of id b along δ 0 if and only if ℓ ⊣ δ 0 with the counit id b .
We postpone the discussion on examples and counterexamples of morphisms satisfying the condition of Proposition 4.2 (see 4.12). For now, we only observe that:

Proposition.
If the morphism p : e → b has a left adjoint, then it satisfies the condition of Proposition 4.2.
In particular, since Cat has the two-dimensional cokernel diagram of any functor, any right adjoint functor satisfies the condition of Proposition 4.2.
Proof. By the Dubuc-Street Theorem (Theorem 3.14), if p : e → b is a right adjoint morphism of the 2-category A, we get, in particular, that ran p p ∼ = p • ran p id e exists and is absolute.
We prove below that the condition of Proposition 4.2 on the morphism p also implies that ∂ 0 δ 0 has a left adjoint ℓ * . This result is going to be particularly useful to the proof of our main theorem (Theorem 4.7).
Finally, by the universal property of the pushout b ↑ p b ↑ p b of δ 0 along δ 1 , the 2-cell id ℓ * * ρ is the identity on ℓ * , since: which is a vertical composition of identities, since id ℓ * η is equal to the identity by the triangle identity of the adjunction (ℓ ⊣ δ 0 , id id b , η).
In order to prove Theorem 4.7, we consider the 2-cells defined in Lemma 4.6. Before defining them, it should be noted that:

Lemma.
[ℓ * · ∂ 1 ] Assume that p satisfies the condition of Proposition 4.2. The morphism ℓ * · ∂ 1 is the unique morphism such that the equations Proof. In fact, by the definitions of ℓ (see Proposition 4.1) and ℓ * (see Proposition 4.4), the equations such that the equations Proof. In fact, by the universal property of the opcomma object b ↑ p b of p along itself: -there is a unique 2-cell θ : s 0 ⇒ ℓ such that θ * id δ 1 = η and θ * id δ 0 = id id b , since by the definitions of ℓ, η and s 0 ; -there is a unique 2-cell λ : ℓ * · ∂ 1 ⇒ ℓ such that λ * id δ 1 = m and λ * id δ 0 = id id b , since it follows from the definitions of ℓ and m : t 2 ⇒ t that defined by β → id ℓ * β, that is to say, the mate correspondence under the identity adjunction id x ⊣ id x and the adjunction (ℓ ⊣ δ 0 , id id b , η), see Remark 3.15.
Given an object h of A(x, b), we prove below that a 2-cell β : δ 1 · h ⇒ δ 0 · h satisfies the descent associativity and identity ((2.7.2) and (2. 1. Observe that, given a 2-cell β : δ 1 · h ⇒ δ 0 · h, by the definition of θ in Lemma 4.6, we get that which, by the interchange law, is equal to the left side of the equation which holds by Lemma 4.6. Thus, of course, 2. Recall the adjunction (ℓ * ⊣ ∂ 0 δ 0 , id id b , ρ) of Proposition 4.4. Given a 2-cell β : δ 1 · h ⇒ δ 0 · h, consider the 2-cells defined by the pastings below. We have that β c = β 1 if, and only if, (h, β) satisfies the descent associativity (2.7.2) w.r.t. H p . Therefore, by the mate correspondence under the identity adjunction id x ⊣ id x and the adjunction (ℓ * ⊣ ∂ 0 δ 0 , id id b , ρ), we conclude that (h, β) satisfies the descent associativity (2.7.2) w.r.t. H p if, and only if, Now, we observe that: (a) Since ℓ * · ∂ 2 = t · ℓ and ℓ * · ∂ 0 = ℓ, we have that which, by the interchange law and Lemma 4.6, is equal to if and only if the mate of the left side is equal to the mate of the right side, which means which is precisely the condition of being a morphism of algebras in A(x, b) A(x,t) . In other words, this proves that ξ gives a morphism between (h 1 , β 1 ) and if and only if it gives a morphism between (h 1 , id ℓ * β 1 ) and (h 0 , id ℓ * β 0 ) in A(x, b) A(x,t) . Finally, given the facts above, we can conclude that we actually can define which is clearly functorial and, hence, it defines an invertible functor (since it is bijective on objects and fully faithful as proved above). This invertible functor is 2-natural in x, giving a 2-natural isomorphism between (2.13.2) and (3.7.2).

Theorem. [Main Theorem]
Assume that ran p p exists and is preserved by the mor- We have that the semantic factorization (3.6.3) of p is isomorphic to the semantic lax descent factorization (2.11.1) of p, either one existing if the other does.
Proof. It is clearly a direct consequence of Theorem 4.7.
Recall that, since the result above works for any 2-category, we have the dual results. For instance, we have Theorem 4.9 and Theorem 4.10.

(Counter)examples of morphisms satisfying Proposition 4.2. Even
Cat has morphisms that do not satisfy the condition of Proposition 4.2.
For instance, the inclusion of the domain d 1 : 1 → 2 has the codensity monad. More precisely ran d 1 d 1 is given by id 2 : 2 → 2 with the unique 2-cell (natural transformation) d 1 ⇒ d 1 . However, in this case, δ 0 d 1 ↑d 1 is the inclusion It should be noted that d 1 is left adjoint to s 0 and, hence, it does satisfy the codual of the condition of Proposition 4.2. More precisely, since d 1 : 1 → 2 is a left adjoint functor, it satisfies the hypothesis of 3 of Theorem 4.11. Hence the co-semantic factorization (usual factorization through the category of coalgebras) coincides with the semantic lax descent factorization of d 1 . These factorizations are given by By Proposition 4.3, any right adjoint morphism satisfies Proposition 4.2. The converse is false, that is to say, the condition of Proposition 4.2 does not imply the existence of a left adjoint. There are simple counterexamples in Cat. In order to construct such an example, we observe that: 4.13. Lemma. Let ι e : e → 1 be a functor between a small category e and the terminal category. We have that ran ιe ι e and lan ιe ι e are given by the identity on 1. Therefore the semantic factorization and the co-semantic factorization are both given by Moreover, ι e has a left adjoint (right adjoint) if and only if e has initial object (terminal object).
Since the thin category R corresponding to the usual preordered set of real numbers does not have initial or terminal objects, the only functor ι R : R → 1 does not have any adjoint. However, it is clear that every functor 1 → b preserves the (conical) limit of R → 1 and, hence, any such functor does preserve ran ι R ι R . In particular, ι R does satisfy Proposition 4.2.
This proves that, although the morphism ι R : R → 1 does not satisfy any of the versions of Theorem 4.11, it does satisfy the conditions of Theorem 4.8. Hence the semantic lax descent factorization of ι R (Eq. 2.11.1) coincides with the semantic factorization of ι R . In this case, by Lemma 4.13, both factorizations are given by 4.14. Remark. Although (by Lemma 4.13) the codensity monad and the density comonad of ι 1⊔1 are the identity on 1, the functor ι 1⊔1 does not satisfy the condition of Proposition 4.2 nor the codual.
The opcomma category of ι 1⊔1 along itself is the category with two distinct objects and two parallel arrows between them: hence it does not have any preterminal or preinitial objects. This shows that neither ran ι 1⊔1 ι 1⊔1 nor lan ι 1⊔1 ι 1⊔1 is preserved by any functor This proves that the functor ι 1⊔1 : 1 ⊔ 1 → 1 does not satisfy the hypotheses of Theorem 4.8. Since Cat has Eilenberg-Moore objects, two-dimensional cokernel diagrams and lax descent objects, we have the semantic lax descent factorization of ι 1⊔1 and the semantic factorization. However, in this case, they do not coincide. More precisely, they are respectively given by the commutative triangles below.

Monadicity and effective faithful morphisms
In this section, we show direct consequences of Theorem 4.8 on monadicity. Henceforth, whenever a 2-category A has the two-dimensional cokernel diagram H p of a morphism p : e → b, we use the notation of 2.8 and 2.9. If A has the two-dimensional kernel diagram of a morphism l : e → b, we use the notation of Remark 2.15.
Recall that a morphism p : e → b of a 2-category A is an equivalence if there is are a morphism l : b → e and invertible 2-cells lp ⇒ id e , id b ⇒ pl. It is a basic coherence result the fact that, whenever we have such a data, we can actually get an adjunction l ⊣ p and an adjunction p ⊣ l with invertible units and invertible counits. These adjunctions are called adjoint equivalences.

Definition. Let
A : ∆ Str → A be a 2-functor. We say that the pair of p. If the morphism p is itself the equalizer, p is said to be an effective monomorphism.  [9,19]. Since the present work is intended to be applied to the context of [19], we adopt the alternative terminology. -the semantic factorization of p = Ù t • p t is such that p t is an equivalence.
Dually, l : b → e is a Kleisli morphism if the corresponding morphism in A op is monadic, while l is comonadic if its corresponding morphism in A co is monadic.
By Theorem 4.8 and its dual versions, we get the following characterizations of monadicity, comonadicity and Kleisli morphisms: 5.9. Corollary. [Monadicity theorem] Assume that A has the two-dimensional cokernel diagram of a morphism p : e → b.
1. provided that ran p p exists and is preserved by δ 0 , p is monadic if and only if p is an effective faithful morphism; 2. provided that lan p p exists and is preserved by δ 1 , p is comonadic if and only if p is an effective faithful morphism.
Proof. The first result follows immediately from the definitions and from Theorem 4.8. The second one is just its codualization (see Lemma 5.6, Theorem 4.9 and Remark 2.15).

Corollary. [Characterization of Kleisli morphisms]
Assume that A has the higher kernel of a morphism l : b → e.
1. assuming that rlift l l exists and is respected by δ l↓l 0 , l is a Kleisli morphism if and only if l is an effective op-faithful morphism; 2. assuming that llift p p exists and is respected by δ l↓l 1 , l is comonadic if and only if l is an effective op-faithful morphism.
It is a well known fact that, whenever a morphism is monadic in a 2-category A, it has a left adjoint. In our setting, if p is monadic as in Definition 5.8, the existence of a left adjoint follows from: (1) since p t is an equivalence, it has a left adjoint; (2) Ù t has always a left adjoint induced by the underlying morphism of the monad t : b → b, the multiplication m : t 2 ⇒ t and the universal property of b t ; and (3) composition of right adjoint morphisms is right adjoint. From this fact and Theorem 4.11, we get cleaner versions of our monadicity results: 5.11. Corollary. [Monadicity theorem] Assume that the 2-category A has the twodimensional cokernel diagram of a morphism p.
1. The morphism p is monadic if and only if p has a left adjoint and p is an effective faithful morphism.
2. The morphism p is comonadic if and only if p has a right adjoint and p is an effective faithful morphism.

Corollary. [Characterization of Kleisli morphisms] Assume that the 2-category
A has the two-dimensional kernel diagram of a morphism l.
1. The morphism l is a co-Kleisli morphism if and only if l has a left adjoint and l is an effective op-faithful morphism.
2. The morphism l is Kleisli morphism if and only if l has a right adjoint and l is an effective op-faithful morphism.

Remark.
[Monadicity vs comonadicity] It should be noted that, unlike Beck's monadicity theorem in Cat, the condition to get monadicity from a right adjoint morphism coincides with the condition to get comonadicity from a left adjoint morphism; namely, to be an effective faithful morphism. Of course, as a consequence, we get that, under the conditions of Corollary 5.11, if the morphism p has a left and a right adjoint morphism, the following statements are equivalent: i) p is an effective faithful morphism; ii) p is monadic; iii) p is comonadic.

Remark.
[Beck's monadicity theorem vs formal monadicity theorem] Beck's monadicity theorem states that, in Cat, a functor p is monadic if and only if p has a left adjoint and p creates absolute coequalizers. By our monadicity theorem, we can conclude that, provided that a functor p : e → b has a left adjoint, p creates absolute coequalizers if and only if p is an effective faithful morphism in Cat. However, the effective faithful morphisms in Cat are not characterized by the property of creation of absolute coequalizers. For instance, this follows from the fact that, by Lemma 5.6, the concept of effective faithful morphism is self codual, while the property of creation of absolute coequalizers is not self dual.
More precisely, one of the key aspects of duality in 1-dimensional category theory is that the usual 2-functor op given by It is clear that a functor p : e → b creates absolute coequalizers if and only if the functor corresponding to p op : e op → b op creates absolute equalizers. Since there are functors that create absolute coequalizers but do not create absolute equalizers, the property of creation of absolute equalizers is not self dual. It follows, then, that there are functors that do create absolute coequalizers but are not effective faithful morphisms.
For instance, consider the usual forgetful functor between the category of free groups and the category of sets. This functor reflects isomorphisms and preserves equalizers: hence, since the category of free groups has equalizers, this forgetful functor creates all equalizers. However, since it has a left adjoint, it does not create absolute coequalizers and it is not an effective faithful morphism in Cat (otherwise, it would be monadic). Therefore the image of the morphism corresponding to this functor in Cat co by op is a functor that creates absolute coequalizers but it is not an effective faithful morphism in Cat. Acknowledgments I am grateful to the Coimbra Category Theory Group for their unfailing support. I am also thankful to the Software Technology Group at Utrecht University for their welcoming and supportive environment.
This work was realized during my postdoctoral fellowship at the Centre for Mathematics, University of Coimbra, in 2018. My ideas and results for this project were positively influenced by the peaceful and inspiring atmosphere I found there.
I want to give special thanks to Marino Gran and Tim Van der Linden, who warmly hosted me at Université catholique de Louvain in May 2018, where my ideas and work for this project started. In my stay there, I found a very encouraging and productive environment.
Maria Manuel Clementino made my stay at UCLouvain even more memorable, allowing me to work with her on exciting problems about Janelidze-Galois Theory. My discussions on examples of codensity monads with her and Eduardo Dubuc, whom I also wish to thank, were instrumental in coming up with counterexamples to some tempting but wrong strengthening of some of the present paper's results.
After publishing this work, I have received several questions and suggestions for future work, terminology and bibliography. In these directions, I am specially thankful to George Janelidze, Zurab Janelidze and Steve Lack.
I want to thank Eduardo Ochs for taking his valuable time to teach me about his Dednat6 L A T E X package. During the revision of the present paper, Dednat6 proved very efficient to write and edit diagrams quickly.