aa r X i v : . [ m a t h . C T ] F e b Kan extensions are partial colimits
Paolo Perrone ∗ and Walter Tholen University of Oxford, England, U.K. York University, Toronto ON, Canada
One way of interpreting a left Kan extension is as taking a kind of “partialcolimit”, whereby one replaces parts of a diagram by their colimits. We makethis intuition precise by means of the “partial evaluations” sitting in the so-called bar construction of monads. The (pseudo)monads of interest for formingcolimits are the monad of diagrams and the monad of small presheaves, bothon the (huge) category CAT of locally small categories. Throughout, particularcare is taken to handle size issues, which are notoriously delicate in the contextof free cocompletion.We spell out, with all 2-dimensional details, the structure maps of thesepseudomonads. Then, based on a detailed general proof of how the “restriction-of-scalars” construction of monads extends to the case of pseudoalgebras overpseudomonads, we define a morphism of monads between them, which wecall “image”. This morphism allows us in particular to generalize the idea of“confinal functors”, i.e. of functors which leave colimits invariant in an absoluteway. This generalization includes the concept of absolute colimit as a specialcase.The main result of this paper spells out how a pointwise left Kan extensionof a diagram corresponds precisely to a partial evaluation of its colimit. Thiscategorical result is analogous to what happens in the case of probabilitymonads, where a conditional expectation of a random variable corresponds toa partial evaluation of its center of mass. ∗ Correspondence: paolo.perrone [at] cs.ox.ac.uk ontents
1. Introduction 3
Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Categorical setting, notation, and conventions . . . . . . . . . . . . . . . . . . . 6
2. The monad of diagrams 6
3. Image presheaves 29
4. The monad of small presheaves 39
5. Partial colimits 51
A. Some 2-dimensional monad theory 63
A.1. Pseudomonads and their morphisms . . . . . . . . . . . . . . . . . . . . . . 63A.2. Pseudoalgebras and their morphisms . . . . . . . . . . . . . . . . . . . . . 69A.3. Restriction of scalars for pseudomonads . . . . . . . . . . . . . . . . . . . . 73
Bibliography 78
1. Introduction
Kan extensions are a prominent tool of category theory, to the extent that, already inthe preface to the first edition of [Mac98], Mac Lane declared that “all concepts of cate-gory theory are Kan extensions” , a claim reinforced more recently in [Rie14, Chapter 1].However, they are also considered to be a notoriously slippery concept, especially by new-comers to the subject. One of the most powerful pictures that help understanding howthey work may be the idea that Kan extensions, especially in their pointwise form, “re-place parts of a diagram with their best approximations, either from the right or from theleft”. In other words, Kan extensions can be seen as taking limits or colimits of “parts”of a diagram. The scope of this paper is making this intuition mathematically precise.We make use of the concept of partial evaluation , which was introduced in [FP20], andwhich is a way to formalize “partially computed operations” in terms of monads. Thestandard example is that “1 + 2 + 3 + 4” may be evaluated to “10”, but also partiallyevaluated to “3 + 7”, whereby parts of the given sum have been replaced by their sums.Just as monads on sets may be seen as encoding different algebraic structures andoperations, here we consider pseudomonads on categories which encode the operationof taking colimits . We are in particular interested in two pseudomonads: the monad ofdiagrams and the monad of small presheaves (also known as the free (small) cocompletion onad ). Both monads are known in the literature, but certainly not presented in sufficientdetail as needed for our purposes. To make the paper more accessible, we therefore decidedto spell out their definition in full detail, in Section 2 and Section 4.The definitions of pseudomonads, pseudoalgebras, and their morphisms are also hardto find in the literature in sufficient detail. For this reason, to avoid any ambiguity, wehave given a detailed account of them in Appendix A. Readers who are familiar withthese pseudomonads, and with the concepts of pseudomonads in general, may skip thesesections, with the exception of Section 2.5, Section 4.6 and Appendix A.3, which containnew results.Here is what the novel content of this work consists of. First of all, we introducethe concept of “image presheaf”, which takes a diagram and forms a presheaf that canbe considered the “free colimit” of the diagram. This induces a morphism of monadsfrom the monad of diagrams to the monad of small presheaves, which in turn gives a“pullback” functor between the categories of algebras (we prove the 2-dimensional versionof this statement in Appendix A.3). This morphism of monads is not injective in anysense. Indeed, it turns out that diagrams with isomorphic image presheaves have thesame colimit, in a very strong sense, analogous to “differing by a confinal functor”. Weindeed generalize the theory of confinal functors, and connect it to the theory of absolutecolimits – both because we need that in order to prove the subsequent statements, andbecause it should be interesting for its own sake.We then turn to the central topic of this paper and study partial evaluations for bothmonads. We prove that partial evaluations for the monad of diagrams correspond topointwise left Kan extensions along split opfibrations, by invoking the Grothendieck cor-respondence between split opfibrations and functors into Cat . For the monad of smallpresheaves, we show that partial evaluations correspond to pointwise left Kan extensionsalong arbitrary functors. This result may be summarized in the following way: givensmall presheaves P and Q on a locally small, small-cocomplete category, Q is a partialcolimit of P if and only if they can be written as image presheaves of small diagrams D and D ′ , in such a way that D ′ is the left Kan extension of D along some functor. Moreconcisely, Kan extensions are partial colimits , as claimed by the paper’s title.This result is analogous to, and was motivated by, an analogous result in measuretheory involving probability monads, where partial evaluations (or “partial expectations”)correspond exactly to conditional expectations (Theorem 5.13). Indeed, one could say that“if coends are like integrals, then Kan extensions are like conditional expectations”. (SeeSection 5.4 for more on this.)As usual, when one talks about free cocompletion, one has to be very careful with sizeissues. This is why some parts of this work, such as the proof of Lemma 5.12, appearto be rather technical. The payoff is that the main theorems of this work will hold forarbitrary (small) colimits in arbitrary (locally small) categories, beyond the trivial caseof preorders. 4 utline.
In Section 2 we study the category of diagrams in a given category, and showthat the construction gives a pseudomonad on the 2-category of locally small categories.While this construction seems to be known, its details don’t seem to have been spelledout previously. The content of Section 2.5, however, seems to be entirely new. Weshow that cocomplete categories, equipped with a choice of colimit for each diagrams, arepseudoalgebras over this pseudomonad, and that not all pseudoalgebras are of that form.In Section 3 we define the concept of “image presheaf”, which can be seen as a “freecolimit of a diagram”, or as a “colimit blueprint”. We show that “having the same imagepresheaf” is a strong and consistent generalization both of the theory of confinal functors(Proposition 3.9), and of the concept of absolute colimit (Proposition 3.13). As far as weknow, this generalization is new.In Section 4 we study small presheaves and show that they form a pseudomonad. Again,this is known, but here we spell out the construction in much greater detail than previousaccounts have done. This enables us to establish the new result presented in Section 4.6:the image presheaf construction forms a morphism of pseudomonads from diagrams topresheaves.The principal new results of this paper appear in Section 5. Theorem 5.5 and Theo-rem 5.6 state that partial colimits for the monad of diagrams correspond to pointwise leftKan extensions of diagrams along split opfibrations. In Theorem 5.10 we prove that par-tial colimits for the free cocompletion monad correspond to pointwise left Kan extensionsof diagrams along arbitrary functors. Then, in Section 5.4, we compare this categoricalresult to the analogous measure-theoretic fact that partial expectations for probabilitymonads correspond (in some cases) to conditional expectations of random variables. Thisis in line with the famous analogy between coends and integrals.Finally, in Appendix A we recall the (known) definition of pseudomonads and pseudoal-gebras, and of the categories they form, which we use in the rest of the paper. We alsoprovide a 2-dimensional version of the “restriction of scalars” construction (Theorem A.7),where a morphism of monads induces a functor between the categories of their algebrasin opposite direction. As far as we know, this 2-dimensional version has not appeared inthe literature previously..
Acknowledgements.
The first author would like to thank Bartosz Milewski and DavidJaz Myers for the insight on coends and weighted limits, Joachim Kock and Emily Riehlfor enlightenment on some of the higher-dimensional aspects, and Tobias Fritz for furtherhelpful insight.The first author would also like to thank Sean McKenna, as well as David Spivak andMIT as a whole, for all the support during the 2020 pandemic, and Nathanael Arkor forthe development of the app Quiver, which proved to be very helpful in writing some ofthe diagrams in this document.The first author was affiliated to the Massachusetts Institute of Technology (MIT) for5ost of the time of writing. This research was partially funded by the Fields Institute(Canada) and by AFOSR grants FA9550-19-1-0113 and FA9550-17-1-0058 (U.S.A.). Thesecond author acknowledges partial financial support by the Natural Science and Engi-neering Council of Canada under the Discovery Grants Program (grant no. 501260).
Categorical setting, notation, and conventions.
As it is to be expected when onetalks about generic colimits, size issues are relevant. Here are our conventions.All the categories in this work (except
CAT ) are assumed locally small. We denote by
Cat the 2-category of small categories, and by
CAT the 2-category of possibly large, locallysmall categories. Note that
CAT is itself larger than a large category (some authors callit a “huge” category).When we say “category”, without specifying the size, we will always implicitly refer toa possibly large, locally small category.Similarly, by “cocomplete category” we always mean a possibly large, locally smallcategory which admits all small colimits.
2. The monad of diagrams
In this section we define the monad of diagrams. The first source for it that we are awareof is Guitart’s article [Gui73], but without an explicit construction. We give in detail allthe structure maps, and in Section 2.5 we prove that cocomplete categories with a choiceof colimits are pseudoalgebras (but not all pseudoalgebras are in this form). The notionsof pseudomonad and pseudoalgebra that we use are given in detail in Appendix A.Note that, differently from some of the literature, we use the following slightly general-ized notion of morphism of diagrams (also used, for example, in Guitart’s original work[Gui73]). Moreover, in order to avoid size issues, we require every diagram to be small.
Definition 2.1.
Let C be a locally small category. • We call a diagram in C a small category J together with a functor D : J → C .Throughout this work, all the diagrams will be implicitly assumed to be of this form(i.e. be small). • Given diagrams ( J , D ) and ( J ′ , D ′ ) in C , we call a morphism of diagrams a functor R : J → J ′ together with a natural transformation ρ : D → D ′ ◦ R , i.e. a diagram in CAT as the following.
J CJ ′ DR D ′ ρ Given diagrams ( J , D ) and ( J ′ , D ′ ) in D and morphisms of diagrams ( R, ρ ) , ( R ′ , ρ ′ ) :( J , D ) → ( J ′ , D ′ ) , we call a of diagrams a natural transformation α : R ⇒ R ′ such that the following 2-cells are equal. J CJ ′ DR ′ R D ′ ρα = J CJ ′ DR ′ D ′ ρ ′ We denote by
Diag ( C ) the 2-category of diagrams in C , their morphisms, and their2-cells. (Sometimes we will still denote by Diag ( C ) the underlying 1-category.) Note that the definition of morphism of diagrams is slightly more general than just anatural transformation between parallel functors. This is still compatible with the tra-ditional intuitive picture of “deforming a diagram into another one”, provided that onenotices the following. In principle R may be not essentially surjective, so one should visu-alize the natural transformation ρ as “deforming” the figure drawn by D into a subfigure of the one drawn by D ′ .Note moreover that: • For C locally small, Diag ( C ) is locally small too; • The forgetful functor
Diag ( C ) → Cat given by the domain is a fibration (via pre-composition), and it is an opfibration (via left Kan extensions) if and only if C iscocomplete (see for example [PT20, Proposition 2.8]).In the rest of this section we show that C Diag ( C ) is part of a pseudomonad on CAT ,and that cocomplete categories with a choice of colimit for each diagram are pseudoalge-bras, with the structure map given by such chosen colimits. For the precise definitions ofpseudomonads and pseudoalgebras, see Appendix A.
We show that the assignment C Diag ( C ) is part of a 2-functor on CAT . First of all, let C and D be locally small categories, and let F : C → D be a functor.Consider now Diag ( C ) and Diag ( D ) as 1-categories. There is a (1-)functor F ∗ : Diag ( C ) → Diag ( D ) induced by F via postcomposition and whiskering, as follows. J C D J C D
D F CJ ′ DR D ′ ρ J C DJ ′ DR FD ′ ρ Therefore,
Diag is an endofunctor of
CAT .The functor F ∗ : Diag ( C ) → Diag ( D ) extends to 2-cells giving a 2-functor, but we willnot need this in order for Diag to be a pseudomonad
CAT .On the other hand, we need to extend
Diag to the 2-cells of
CAT . So let C and D belocally small categories, let F, G : C → D be functors, and let α : F ⇒ G be a naturaltransformation. We have an induced natural transformation α ∗ : F ∗ ⇒ G ∗ induced viawhiskering, as follows. To each diagram ( J , D ) in C , we assign the morphism of diagrams(id J , αD ) of D , i.e. J C D J C D
D FGα
Naturality follows from naturality of α . This makes Diag a strict 2-functor
CAT → CAT . The unit of the monad is a map constructing “one-object diagrams”. In detail, let C bea locally small category. We construct the functor η C : C → Diag ( C ) as follows. C C C C ′ f C id C ′ f For brevity, we will denote η C simply by η . This is (strictly) natural in the category C :given a functor F : C → D , the following diagram commutes strictly. C DDiag ( C ) Diag ( D ) η F ηF ∗ Indeed, both paths in the diagram give the following assignment, C C F C ′ f C id FC ′ f using the fact that F ( C ) = F ◦ C if we view C as a functor 1 → C , and that analogously F f is given by whiskering f (seen as a natural transformation) with F . Let’s now turn to the multiplication. We first notice that an object of
Diag ( Diag ( C )) isthe same as a lax cocone in CAT with tip C , where the indexing category and all thecategories appearing in the cone except C are required to be small. Let’s see how. Let J be a small category. A functor D : J → Diag ( C ) assigns to each object J of J a diagramin C , i.e. a small category D J together with a functor D J : D J → C : J D J C D J and to each morphism j : J → J ′ of J a morphism of diagrams, which amounts to afunctor D j : D J → D J ′ together with a natural transformation D j as below: JJ ′ j D J C D J ′ D JD j D J ′ D j Moreover, since we want D to be a functor, we need it to preserve identities and composi-tion, i.e. D needs to be a functor, and D needs to satisfy the conditions D (id J ) = id D J and D ( j ′ ◦ j ) = D j ′ D j ◦ D J , which are exactly the conditions of lax naturality. Inpictures, JJ id D J C D J D J id D J id JJ ′ J ′′ jj ′ D JD J C D J ′′ D JD j D J ′ D j ′ D j D J ′′ D j ′
9n other words, a functor D : J → Diag ( C ) consists of a functor D : J → Cat ⊆ CAT ,together with a lax cocone D in CAT under D with tip C . A lax cocone is a lax naturaltransformation D : D ⇒ ∆ C , where ∆ C is the constant functor at C . Given now D = ( D , D ) as above, take the Grothendieck construction R D of D : J → Cat ⊆ CAT , which we recall. • An object of R D consists of a pair ( J, X ) where J is an object of J and X is anobject of the category D J ; • A morphism (
J, X ) → ( J ′ , X ′ ) of R D consists of a pair ( j, f ) where j : J → J ′ is amorphism of J , and f : D j ( X ) → X ′ is a morphism of the category D J ′ .The short integral sign does not denote a coend here, it is standard for the Grothendieckconstruction (we use different sizes to avoid confusion, since both symbols are standardnotation). Note that since J and all the D J are small, R D is small too. Its set of objectsis given by a J ∈ J D J. Moreover: • For each object J of J , the inclusion maps i J : D J → R D defined by the coproductabove can be canonically made into functors via XX ′ f ( J, X )( J, X ′ ) (id J ,f ) We will call the images of the i J the fibers of R D . • For each morphism j : J → J ′ of J , there is a natural transformation D J R D D J ′ i J D j i J ′ i j whose component at each object X of D J is given by( J, X ) ( J ′ , D j ( X )) ( j, id D j ( X ) ) • The i J and i j assemble into a lax cocone D ⇒ ∆ R D , i.e. the identity and compo-sition conditions are satisfied. 10t is well known that R D is the oplax colimit of D in Cat , with the universal laxcocone given by the i J . We now show that it is so also in CAT , and we also give a strict version of the universal property. Proposition 2.2.
Let D : J → Cat ⊆ CAT be a small diagram of small categories. Let D : D ⇒ C be a lax cocone over D in CAT , with tip C locally small (but not necessarilysmall). There is a unique functor R D → C such that • for all objects J of J , the following triangle commutes (strictly); D J R D C i J D J (2.1) • for all morphisms j : J → J ′ of J , the following 2-cells coincide. D J C D J ′ D JD j D J ′ D j = D J R D C D J ′ D Ji J D j i J ′ D J ′ i j (2.2)Denote this functor by µ ( D , D ), or more briefly by µ ( D ). It is a diagram in C . Thiswill give the multiplication of the monad Diag . Proof of Proposition 2.2.
Since we want the diagram 2.1 to commute strictly, the onlypossibility to define µ ( D ) on objects is as follows. For every object J of J , and for everyobject X of D J , µ ( D )( J, X ) := D J ( X ) . Just as well, for all the morphisms of R D in the fiber, i.e. in the form (id J , f ) for amorphism f : X → X ′ of D J , we are forced to define µ ( D )(id J , f ) := D J ( f ) . Moreover, since we want the condition (2.2) to hold, for all morphisms j : J → J ′ of J we have to require that µ ( D ) on the components of i j has to give the respective componentof D j . Explicitly, for each object X of D J , µ ( D )( i j ) X = µ ( D )( j, id D j ( X ) ) := ( D j ) X . By “strict” here we mean “we give an isomorphism of hom-categories, not just an equivalence”. Thecolimit is still oplax, not strict. j, f ) : (
J, X ) → ( J ′ , X ′ ), for j : J → J ′ and f : D j ( X ) → X ′ can be decomposed as( J, X ) ( J ′ , D j ( X )) ( J ′ , X ′ ) ( j, id D j ( X ) ) (id J ,f ) and so we have determined the action of µ ( D ) for all morphisms of R D .Functoriality of this assignment is routine. We now have to show that the assignment ( D , D ) µ ( D , D ) is functorial, and thatit is natural in the category C .To address functoriality, we need to look at morphisms in Diag ( Diag ( C )).Given diagrams D : J → Diag ( C ) and E : K → Diag ( C ), where J and K are smallcategories, a morphism of diagrams from D to E amounts to a functor F : J → K together with a natural transformation J Diag ( C ) K DF Eφ
Explicitly, D consists of a functor D : J → Cat ⊆ CAT and a lax cocone D : D ⇒ C ,and E has an analogous form. The natural transformation φ amounts to the following.For each object J of J , we have a morphism of diagrams D J C E F J φ JD J E Jφ J and for each morphism j : J → J ′ of J , the following diagrams have to commute. First ofall, this diagram of functors has to commute strictly. D J E F JD J ′ E F J ′ D j φ J E F jφ J ′ Moreover, the following composite 2-cells have to coincide, forming a commutative pyra-mid with 2-cells as lateral faces, whose square base is the commutative square just de-12cribed above. C D J E F J ′ D J D jD J E F J ′ D j D J ′ φ J ′ φ J ′ = C E F JD J E F J ′ D J E F JE F jφ JD jD J E F J ′ E F jφ J ′ φ J (2.3)Form now the Grothendieck construction of E . We can form a lax cocone over D with tip R E as follows. J D J E F J R E φ J i
F J JJ ′ j D J E F J R E D J ′ E F J ′ φ JD j i F J E F jφ J ′ i F J ′ i F j
Note that this is a lax cocone D ⇒ R E . By the universal property of the Grothendieckconstruction as an oplax colimit (Proposition 2.2), there is a unique functor R D → R E such that • for all objects J of J , the following square commutes; D J E F J R D R E i J φ J i
F J (2.4) • for all morphisms j : J → J ′ of J , the following composite 2-cells coincide. D J E F J R E D J ′ E F J ′ φ JD j i F J E F jφ J ′ i F J ′ i F j = D J E F J R D R E D J ′ E F J ′ D j i J φ J i
F J i j i J ′ φ J ′ i F J ′ µ ( F, φ ). This gives a triangle R D C R E µ ( D ) µ ( F,φ ) µ ( E ) which does not necessarily commute. In order to get a morphism of diagram µ ( D ) → µ ( E )we need to fill the triangle above with a 2-cell which we form as follows. Consider theobject ( J, X ) of R D , where J is an object of J and X is an object of D J . Note that,by the diagram 2.1, µ ( D )( J, X ) = D J ( X ). Analogously, using the diagram 2.1 for E together with the diagram 2.4, µ ( E )( µ ( J, X )) = µ ( E )( J, φ J ( X )) = E F J ( φ J ( X )) . We now assign to the object (
J, X ) the morphism of C given by the component of φ J at X , µ ( D )( J, X ) = D J ( X ) E F J ( φ J ( X )) = µ ( E )( µ ( J, X )) . ( φ J ) X Let’s now show that this assignment is natural. We will again test this first along thefibers, and then on the opcartesian morphisms of R D . So let f : X → Y be a morphismof D J . The following diagram commutes simply by naturality of φ J . µ ( D )( J, X ) D J ( X ) E F J ( φ J ( X )) µ ( E )( µ ( J, X )) µ ( D )( J, D j ( X )) D J ( X ) E F J ( φ J ( X )) µ ( E )( µ ( J, X )) µ ( D )(id J ,f ) D J ( f )( φ J ) X E F J ( φ J ( f )) µ ( E )( µ (id J ,f ))( φ J ) X Let now j : J → J ′ be a morphism of J . We have to prove that the following diagramcommutes. D J ( X ) E F J ( φ J ( X )) D J ′ ( D j ( X )) E F J ′ ( φ J ′ ( D j ( X ))) ( D j ) X ( φ J ) X ( E F j ) φ J ( X ) ( φ J ′ ) D j ( X ) This is however exactly Equation (2.3), written out in components. Therefore we have anatural transformation, which we denote by µ ( F, φ ), and we get a morphism of diagrams R D C R E µ ( D ) µ ( F,φ ) µ ( E ) µ which makes µ functorial. (The identity and composition conditions follow by uniqueness.)14 roposition 2.3. The functor µ : Diag ( Diag ( C )) → Diag ( C ) is strictly natural in C .Proof. Let F : C → D be a functor. The induced functor Diag ( Diag ( C )) Diag ( Diag ( D )) F ∗∗ maps a lax cocone with tip C to the lax cocone with tip D obtained simply via postcom-position with F . D J C D J ′ D JD j D J ′ D j D J C D D J ′ D JD j FD J ′ D j In other words, F ∗∗ ( D , D ) = ( D , F ◦ D ). If we take the Grothendieck construction inboth cases we get morphisms µ ( D ) : R D → C and µ ( F ∗∗ D ) : R D → D . By uniqueness(Proposition 2.2), necessarily µ ( F ∗ ∗ D ) = F ◦ µ ( D ), and therefore µ is strictly natural. Let D : J → C be a diagram. We can apply to it the unit η Diag ( C ) : Diag ( C ) → Diag ( Diag ( C )) to form the diagram ( C ) ( J ,D ) corresponding to the following (rather trivial) lax cocone in CAT with tip C . J C D We view this as a lax cocone over the diagram J : → CAT which maps the unique objectof to J . If we form the Grothendieck construction as prescribed by the multiplication ofthe monad, we get the category R J which is isomorphic to J , explicitly given as follows: • Objects are pairs ( • , X ), where • is the unique object of and X is an object of J ; • A morphism ( • , X ) → ( • , Y ) is simply a morphism f : X → Y of J .The functor µ ( η ( D )) maps then ( • , X ) to DX and f : ( • , X ) → ( • , Y ) to Df in C .The functor R J → J given by ( • , X ) X is an isomorphism of categories. This definesan isomorphism of diagrams µ C ( η Diag ( C ) ( D )) → D , in the category Diag ( C ). Denote thisisomorphism by ℓ . This is the map that we take as left unitor. Proposition 2.4.
The map ℓ induces a modification µ ◦ ( η Diag ) ⇛ id . roof. Let’s first show that ℓ is natural in the diagram D . If ( R, ρ ) : ( J , D ) → ( K , E ) is amorphism of diagrams, it’s easy to see that this diagram commutes strictly, R J J R K K ˜ R ℓ Rℓ where ˜ R is the functor mapping ( • , X ) to ( • , RX ), and acting similarly on morphisms.This commutative diagram induces an analogous commutative diagram in Diag ( C ), sothat ℓ is a natural isomorphism of functors Diag ( C ) Diag ( Diag ( C )) Diag ( C ) id η ℓ µ In order to show that ℓ is a modification, we have to show that ℓ is natural in thecategory C as well, in the sense that for each functor F : C → D the following composite2-cells are equal, Diag ( D ) Diag ( Diag ( D )) Diag ( C ) Diag ( Diag ( C )) Diag ( D ) Diag ( C ) η µηF ∗ id F ∗∗ µℓ F ∗ = Diag ( D ) Diag ( Diag ( D )) Diag ( C ) Diag ( D ) Diag ( C ) id η ℓ µF ∗ id F ∗ where the squares without a 2-cell commute (by naturality).Explicitly, we have to check that given a diagram D : J → C , the following parallelfunctors coincide. µ ( η ( F ∗ D )) F ∗ D F ∗ ℓℓ Note however that F ∗ acts on the codomain of the diagram, by postcomposing with F ,while ℓ acts on the domain of the diagram, mapping J to its isomorphic copy R J . Thereforeboth arrows give the same morphism of diagrams, explicitly the following commutativediagram of CAT , R J C DJ D ∼ = F ˜ D where ˜ D ( • , X ) = D ( X ), and the action on morphisms is similarly defined. Therefore ℓ isa modification. 16 .3.2. Right unitor Let D : J → C be a diagram. This time we apply to it the map η ∗ : Diag ( C ) → Diag ( Diag ( C )) given by the functor image of η under Diag . Explicitly, the result is thefollowing lax cocone in
CAT , with tip C , indexed by J via the constant functor ∆ : J → CAT at . In pictures, JJ ′ j DJDJ ′ j If we form the Grothendieck construction, this time we get the category R ∆1 which isagain isomorphic to J , explicitly given as follows: • Objects are pairs ( X, • ), where X is an object of J and • is the unique object of ; • A morphism ( X, • ) → ( Y, • ) is simply a morphism f : X → Y of J .The functor µ ( η ∗ ( D )) maps ( X, • ) to DX and f : ( X, • ) → ( Y, • ) to Df in C .Analogously to the left unitor case, we have a functor R ∆ → J given by ( X, • ) X which induces an isomorphism of categories. This defines in turn an isomorphism ofdiagrams µ ( η ∗ ( D )) → D , which we denote by r − (and its inverse by r . See Definition A.1for the convention we are using). The map r is the one that we take as right unitor. Proposition 2.5.
The map r induces a modification id ⇛ µ ◦ η ∗ . We omit the proof, since it is analogous to the case of ℓ . In order to define the associator, we have to look at
Diag ( Diag ( Diag ( C ))). So let D : J → Diag ( Diag ( C )) be a diagram which assigns to each object J of J a diagram of diagrams D J : D J → Diag ( C ), itself mapping the object K of D J to the diagram ( D J ) :( D J ) K → C , which, in turn, maps an object L of ( D J ) K to the object ( D J ) ( L ) of C . We could depict the situation as follows. For brevity we omit the action on morphisms,which is similarly constructed. J Diag ( Diag ( C )) J (cid:26) D J Diag ( C ) (cid:27) K (cid:26) ( D J ) K C (cid:27) L (( D J ) K )( L ) D D J ( D J ) K
17e can now take the Grothendieck construction at two different depths, which we canthink of as “joining levels J and K ” and “joining levels K and L ”. The former way, whichis µ ( D ) ∈ Diag ( Diag ( C )), gives the following diagram of diagrams (only two levels). R D Diag ( C )( J ∈ J , K ∈ D J ) (cid:26) ( D J ) K C (cid:27) L (( D J ) K )( L ) µ ( D ) ( D J ) K The latter way, which is µ ∗ D ∈ Diag ( Diag ( C )), gives instead the following diagram ofdiagrams, which is in general not isomorphic to the former. J Diag ( C ) J (cid:26) R ( D J ) C (cid:27) ( K ∈ D J, L ∈ ( D J ) K ) (( D J ) K )( L ) µ ∗ D µ ( D J ) If we apply once again the Grothendieck construction to the two, we do obtain isomorphicdiagrams: R µ ( D ) C (( J ∈ J , K ∈ D J ) , L ∈ ( D J ) K ) (( D J ) K )( L )and R µ ∗ D C ( J ∈ J , ( K ∈ D J, L ∈ ( D J ) K )) (( D J ) K )( L )These are isomorphic as diagrams through the map R µ ∗ D R µ ( D )( J, ( K, L )) (( J, K ) , L )and so the following diagram commutes up to isomorphism. Diag ( Diag ( Diag ( C ))) Diag ( Diag ( C )) ∼ = Diag ( Diag ( C )) Diag ( C ) µ ∗ µ µµ We call this isomorphism the associator , and denote it by a . Again, analogously as forthe unitors, we have: Proposition 2.6.
The associators assemble to a modification µ ◦ µ ∗ ⇛ µ ◦ µ . .4. Higher coherence laws The associator and unitors satisfy coherence conditions that are analogous to the ones ofmonoidal categories (see Definition A.1 for the precise definition). We spell them out indetail for this case.
Instantiating the unit condition of Definition A.1 in our case, we get the following state-ment, which reminds us of the unit condition of monoidal categories. • Consider a diagram of diagrams as follows.
J Diag ( C ) J (cid:26) D J C (cid:27) K ( D J )( K ) D D J Applying directly the Grothendieck construction we would have a diagram (
J, K ) ( D J )( K ). However, we instead want to insert a “bullet” via the unitor, and thiscan be done in two ways. • We can either apply the (inverse of the) left unitor ℓ at depth K , and then take theGrothendieck construction, obtaining the following diagram. R ( µ ∗ η ∗ D ) C ( J, ( • , K )) ( D J )( K ) µ ( µ ∗ η ∗ D ) • Alternatively, we can apply the right unitor r at depth J , and again take theGrothendieck construction, obtaining the following isomorphic diagram. R ( µ ( η ∗ D )) C (( J, • ) , K ) ( D J )( K ) µ ( µ ( η ∗ D )) • Now, not only are the two diagrams isomorphic, but the isomorphism relating themis exactly the associator, ( J, ( • , K )) (( J, • ) , K )which we can view as “rebracketing”. 19 .4.2. Pentagon equation Instantiating the pentagon condition of Definition A.1 in our case, we get the followingstatement, which reminds us of the analogous condition for monoidal categories. Considera four-level diagram, as follows.
J Diag ( Diag ( Diag ( C ))) J (cid:26) D J Diag ( Diag ( C )) (cid:27) K (cid:26) ( D J ) K Diag ( C ) (cid:27) L (cid:26) (( D J ) K ) L C (cid:27) M ((( D J ) K ) L )( M ) D ( D J ) K (( D J ) K ) L There are several ways of obtaining a depth-one diagram via applying the Grothendieckconstruction three times, and they are related to one another via the associators. In par-ticular, we can apply the Grothendieck construction repeatedly starting from the deepest(rightmost) level, R µ ∗ µ ∗∗ D C ( J, ( K, ( L, M ))) ((( D J ) K ) L )( M ) µ ( µ ∗ µ ∗∗ D ) or we can start from the outermost (leftmost) level. R µ ( µ ( D )) C ((( J, K ) , L ) , M ) ((( D J ) K ) L )( M ) µ ( µ ( µ ( D ))) There are now two ways of obtaining the former from the latter via associators, and theyare equal. They are induced by the following rebracketings, which form a commutativepentagon (analogous to the one of monoidal categories).( J, (( K, L ) , M ))( J, ( K, ( L, M ))) (( J, ( K, L )) , M )(( J, K ) , ( L, M )) (((
J, K ) , L ) , M ) a aa ∗ aa In this section we prove the following statements.20 heorem 2.7.
Every cocomplete category C equipped with a choice of colimit for eachdiagram has the structure of a pseudoalgebra over Diag . As shown in Section 2.5.4, the converse of the theorem does not hold: not all pseudoal-gebras are in this form.A definition of pseudoalgebra over a pseudomonad is given in Appendix A.
Let C be a cocomplete category. For each diagram D : J → C , choose a colimit (theyare all isomorphic, pick one in each equivalence class). Let’s see why this construction isfunctorial. A colimit does not just consist of an object of C , but also of the arrows of thecolimiting cocone. Denote by c ( D ) the (chosen) colimit object of D , and by h ( D ) : D ⇒ c ( D ) the colimiting cocone. In components, the cocone consists of arrows DJ c ( D ) h ( D ) J for each object J of J . Now consider a morphism of diagrams as follows. J CJ ′ DR D ′ ρ Using ρ and the colimit cocone h ( D ′ ) : D ′ ⇒ c ( D ′ ) we can construct a cocone under D ,with tip c ( D ′ ): the one of components DJ D ′ RJ c ( D ′ ) ρ J h ( D ′ ) RJ for each J of J . This cocone must then factor uniquely through c ( D ) by the universalproperty of c ( D ) as a colimit: DJ D ′ RJc ( D ) c ( D ′ ) h ( D ) J ρ J h ( D ′ ) RJ Denote the resulting map c ( D ) → c ( D ′ ) by c ( R, ρ ). It is the unique map that makesthe diagram above commute for each J of J . By uniqueness, this assignment preservesidentities and composition, and so c is a functor Diag ( C ) → C . Technically speaking, foreach diagram one can choose many possible colimits within the same equivalence class.However, once c ( D ) and c ( D ′ ) are fixed, the map c ( D ) → c ( D ′ ) is unique. So any choiceof such colimit objects gives rise to a functor, and all these functors will be naturallyisomorphic, again by uniqueness. 21e can say even more: the map c : Diag ( C ) → C is even if we view Diag ( C )as a 2-category (as in Definition 2.1), and C (which is a 1-category) as a locally discrete2-category. This is made precise by the following lemma. Lemma 2.8.
Let C be a cocomplete category and c : Diag ( C ) → C a choice of colimitfor each diagram. Consider diagrams ( J , D ) and ( J ′ , D ′ ) in C , morphisms of diagrams ( R, ρ ) , ( R ′ , ρ ′ ) : ( J , D ) → ( J ′ , D ′ ) , and suppose there exists a 2-cell of diagrams α : ( R, ρ ) ⇒ ( R ′ , ρ ′ ) . Then c ( R, ρ ) = c ( R ′ , ρ ′ ) .Proof. Recall that α consists of a natural transformation α : R ⇒ R ′ such that J CJ ′ DR ′ R D ′ ρα = J C . J ′ DR ′ D ′ ρ ′ This way, for each object J of J , the following diagram commutes, D ′ RJDJ c ( D ′ ) D ′ R ′ J Dα J h ( D ′ ) R ′ J ρ J ρ ′ J h ( D ′ ) RJ where h ( D ′ ) : D ′ ⇒ c ( D ′ ) denotes the colimit cone of c ( D ′ ) under D ′ . The maps c ( R, ρ )and c ( R ′ , ρ ′ ) : c ( D ) → c ( D ′ ) are both defined as the unique maps making the followingdiagram commute, DJc ( D ) c ( D ′ ) h ( D ′ ) R ′ J ◦ ρ J = h ( D ′ ) RJ ◦ ρ ′ J h ( D ) J and are therefore equal. We now give the structure 2-cells of the pseudoalgebras, namely the unitor and the mul-tiplicator.
Lemma 2.9.
The following diagram commutes up to a canonical natural isomorphism.
C Diag ( C ) ∼ = C id η c
22e denote the natural isomorphism by ι : c ◦ η ⇒ id C . Proof.
Let C be an object of C . The diagram η ( C ) is the one-object diagram whoseunique node is given by C . A colimit cocone over η ( C ) consists of an object C ′ togetherwith a specified isomorphism C → C ′ . Therefore, for any choice of c , we get canonicallyan isomorphism ι C : C → c ( η ( C )). The maps ι C assemble to a natural isomorphism ι : c ◦ η ⇒ id C , since for each f : C → C ′ of C the following diagram commutes, C C ′ c ( η ( C )) c ( η ( C ′ )) fι C ι C ′ c ( η ( f )) since the map c ( η ( f )) is defined (by definition of how c acts on morphisms) as the uniquemap making the diagram above commute. Lemma 2.10.
The following diagram commutes up to a canonical natural isomorphism.
Diag ( Diag ( C )) Diag ( C ) ∼ = Diag ( C ) C µ c ∗ cc Denote the natural isomorphism by γ : c ◦ c ∗ ⇒ c ◦ µ .This statement is known in the literature, see for example [CS02, Section 40], as wellas [PT20, Theorem 3.2]. Here we present a direct proof. In the proof we can see how theobjects in the top right corner of the square are, in some sense, partial colimits of theobjects in the bottom left corner. This will be made precise in Section 5. Proof.
Let D : J → Diag ( C ). The diagram c ∗ D : J → C is given by the followingpostcomposition. J Diag ( C ) C J D J c ( DJ ) C J ′ D J ′ c ( D J ′ ) D cj D JD j c ( Dj ) D J ′ D j In other words, the nodes of D are diagrams (one for each object of J ), and c ∗ replacesthem by their (chosen) colimit, obtaining a diagram in C indexed by J .Recall that µ is given by the Grothendieck construction, so that µ ( D ) is a diagramobtained by the union of the diagrams DJ for each J of J , plus additional arrows between23hose subdiagrams, induced by the morphisms of J . Specifically, for every morphism j : J → J ′ of J and for every f : X → Y of D J , the following square commutes. D J ( X ) D J ′ ( D j ( X )) D J ( Y ) D J ′ ( D j ( Y )) D Jf ( D j ) X D J ′ ( D j ( f ))( D j ) Y The object c ( µ ( D )) is a colimit of the resulting diagram involving all the j and the f as above. Recall now the universal property of the Grothendieck construction, and inparticular diagrams (2.1) and (2.2). For each object J of J , the morphism of diagramsgiven by the inclusion i J of the fiber over J , D J C R D i J D Jµ ( D ) induces a map between their (chosen) colimits c ( i J , id) : c ( DJ ) → c ( µ ( D )). The maps c ( i J , id) : c ( DJ ) → c ( µ ( D )), for each J , assemble to a cocone under c ∗ D : J → C , withtip c ( µ ( D )), meaning that for each morphism j : J → J ′ of J , the following diagramcommutes. c ( DJ ) c ( µ ( D )) c ( DJ ′ ) c ( Dj ) c ( i J , id) c ( i J ′ , id) (2.5)Indeed, we can rewrite (2.2) as follows, D J C R D D Ji J ′ ◦ D j i J µ ( D ) i j = D J C R D D Ji J ′ ◦ D j µ ( D ) D j which is exactly the condition for a 2-cells of diagrams ( i J , id) ⇒ ( i J ′ ◦ D J, D j ) (seeDefinition 2.1). By Lemma 2.8, then, c ( i J , id) = c ( i J ′ ◦ D J, D j ), which means that (2.5)commutes.As we said, the maps c ( i J , id) : c ( DJ ) → c ( µ ( D )), assemble to a cocone under c ∗ D : J → C , with tip c ( µ ( D )). Therefore, by the universal property of c ( c ∗ D ) as a colimit, thereexists a unique arrow c ( c ∗ D ) → c ( µ ( D )), which we denote by γ D , making the following24iagram commute for all J of J , c ( DJ ) c ( c ∗ D ) c ( µ ( D )) c ( i J , id) h ( c ∗ D ) J γ D where the h ( c ∗ D ) J denote the arrows of the colimiting cocone. Note that for each object X of D J we can extend the diagram above to the following commutative diagram, D J ( X ) c ( DJ ) c ( c ∗ D ) c ( µ ( D )) h ( DJ ) X h ( µ ( D )) X c ( i J , id) h ( c ∗ D ) J γ D (2.6)where h ( DJ ) X and h ( µ ( D )) X are the components at X of the colimiting cocones of c ( DJ )and c ( µ ( D )).To show that γ D is an isomorphism, we invoke the Yoneda embedding. Let K be anyobject of C . We want to show that the functionHom C (cid:0) c ( µ ( D )) , K (cid:1) Hom C (cid:0) c ( c ∗ D ) , K (cid:1) f f ◦ γ D , γ D ∗ (2.7)which is natural in K , is a bijection. To this end, we note that by the universal propertyof colimits, the set on the left is naturally isomorphic (via composing with the componentsof h ( µ ( D ))) to the subset S ⊆ Y J ∈ J Y X ∈ D J Hom C (cid:0) D J ( X ) , K (cid:1) whose elements are families of arrows ( k J,X : D J ( X ) → K ) such that for each j : J → J ′ of J and each f : X → Y of D J the following diagram commutes. D J ( X ) D J ′ ( D j ( X )) KD J ( Y ) D J ′ ( D j ( Y )) k J,X k J,Y D J ( f ) D J ( D j ( f ))( D j ) X ( D j ) Y k J ′ ,D j ( X ) k J ′ ,D j ( Y ) Now, for each J of J , the quantity appearing in S given by S J ⊆ Y X ∈ D J Hom C (cid:0) D J ( X ) , K (cid:1) k J,X : D J ( X ) → K ) such that f : X → Y of D J thefollowing diagram commutes, D J ( X ) KD J ( Y ) k J,X k J,Y D J ( f ) is in natural bijection with Hom C (cid:0) c ( DJ ) , K (cid:1) by universal property of the colimit, via composing with the cocones h ( DJ ). In otherwords, S is in natural bijection with the subset of S ′ ⊆ Y J ∈ J Hom C (cid:0) c ( DJ ) , K (cid:1) whose elements are arrows ( k ′ J : c ( DJ ) → K ) such that the following diagram commutes. c ( DJ ) C ( DJ ′ ) K c ( Dj ) k ′ J k ′ J ′ The subset S ′ , again by the universal property of the colimit, is in bijection (via composingwith h ( c ∗ D )) with Hom C (cid:0) c ( c ∗ D ) , K (cid:1) , which is exactly at the right side of (2.7). Since(2.6) commutes, composing with γ D has the same effect as applying the bijections givenby (the inverse of) composing with h ( c ∗ D ) and h ( DJ ) X (all the bijections are invertible),and then composing with h ( µ ( D )) X . Therefore (2.7) is a bijection too. By the Yonedalemma, then, γ D is an isomorphism. In order to prove Theorem 2.7 it remains to be checked that the unit and multiplicationcoherence conditions of Definition A.4 hold. Intuitively, such coherence conditions holdby the “uniqueness property of maps between colimits”. In other words, not only doobjects satisfying the same universal property admit an isomorphism between them, butthey admit a unique one compatible with the universal property (in our case, the cocone):while colimit objects of a diagram may have many automorphisms (as objects), colimit cocones over the same diagram form a contractible groupoid.Let’s see this more explicitly. The unit condition of Definition A.4, instantiated in ourcase, says the following. Let C be a cocomplete locally small category, and construct(choose) the functor c : Diag ( C ) → C as before. Consider now a diagram D : J → C .26e can apply the map η ∗ : Diag ( C ) → Diag ( Diag ( C )) as in Section 2.3.2 and obtain thediagram η ∗ D : J → Diag ( C ) as follows. J Diag ( C ) J (cid:26) (cid:27) • DJ η ∗ D DJ
Now we can either • apply to η ∗ D the map c ∗ , which replaces each one-object diagram DJ with its chosencolimit c ( DJ ) (isomorphic to DJ via the unitor ι ), giving the diagram c ( D − ) : J → C ; or • form the Grothendieck construction and obtain the diagram ( J, • ) DJ , withexactly the same image in C as D , but indexed by a nominally different category,and isomorphic to D via the counit ρ .Both ways give isomorphic diagrams in C , which then have isomorphic colimits. Theisomorphism between the colimits can be written a priori in two ways: • It is the one induced by γ : c ◦ c ∗ ⇒ c ◦ µ ; • It is the one induced by the isomorphism of diagrams of components ι : DJ → c ( DJ )for each object J of J .The unit condition of pseudoalgebras says that these two isomorphism should be equal.This is indeed the case, by uniqueness of the morphism γ : forming the colimit coconesof D and of c ( D − ), which are isomorphic diagrams via ι , we have a unique morphismmaking the following diagram commute for all J of J , DJ c ( DJ ) c ( D ) c ( c ( D − )) ι − h ( D ) h ( c ( D − )) which can be seen as either the map γ (by definition), or as the map induced by ι , aftersuitably translating D into ( J, • ) DJ via the right unitor r .The multiplication condition of Definition A.4, again instantiated in our case, says thefollowing. As in Section 2.3.3, let D ∈ Diag ( Diag ( Diag ( C ))) be a diagram as follows. J Diag ( Diag ( C )) J (cid:26) D J Diag ( C ) (cid:27) K (cid:26) ( D J ) K C (cid:27) L (( D J ) K )( L ) D D J ( D J ) K
27e can now take the colimit progressively, a priori in two ways: first of all, “from theinside out”, that is, • For each J of J and K of D J , take the (chosen) colimits of the diagrams ( D J ) K ,obtaining the following diagram of diagrams; J Diag ( C ) J (cid:26) D J C (cid:27) K c (( D J ) K ) c ∗∗ D c ∗ ( D J ) • Then, for each J of J , take the (chosen) colimit of the remaining innermost leveldiagram c ∗ ( D J ), obtaining the following diagram; J C J c ( c ∗ ( D J )) c ∗ c ∗∗ D • Finally, take the colimit c ( c ∗ ( c ∗∗ D )) of the diagram just obtained.Alternatively, we could • Form the Grothendieck construction of D joining levels J and K , obtaining thefollowing diagram of diagrams; R D Diag ( C )( J ∈ J , K ∈ D J ) (cid:26) ( D J ) K C (cid:27) L (( D J ) K )( L ) µ ( D ) ( D J ) K • Form again the Grothendieck construction, joining level L as well; R µ ( D ) C (( J ∈ J , K ∈ D J ) , L ∈ ( D J ) K ) (( D J ) K )( L ) µ ( µ ( D )) • Finally, take the colimit c ( µ ( µ ( D ))) of the resulting diagram.The colimits constructed this way are isomorphic, a priori, in two different ways, usingthe maps obtained by γ in different orders (first inner level, then outer, or vice versa).However, the different ways coincide, since both colimits come equipped with the followingcocones, (( D J ) K )( L ) c (( D J ) K ) c ( c ∗ ( D J )) c ( µ ( µ ( D ))) c ( c ∗ ( c ∗∗ D )) h (( D J ) K ) h ( c ∗ ( D J )) h ( c ∗ ( c ∗∗ D )) h ( µ ( µ ( D ))) and there is a unique map making the diagram above commute for all J , K and L .This finally proves that cocomplete categories are pseudoalgebras of Diag (Theorem 2.7).28 .5.4. Not all algebras are of this form
We now want to show the following statement.
Proposition 2.11.
Not every pseudoalgebra over
Diag is in the form of Theorem 2.7.
We use the following known result [PT20, Theorem 2.7].
Theorem 2.12.
Let C be a cocomplete category. Then the category Diag ( C ) is cocompletetoo. Moreover, the functor Diag ( C ) → Cat which assigns to each diagram D : I → C itsdomain I preserves colimits. We are now ready to prove the proposition. We will prove it by showing that for free pseudoalgebras, in the form (
Diag ( C ) , µ ), the map µ is in general not taking colimits ofdiagrams (of diagrams). Proof of Proposition 2.11.
Let C be a cocomplete category with at least two non-isomorphicobjects X and Y and a morphism f : X → Y . Consider now the morphism η ( f ) of Diag ( C ),which can be seen as the morphism of diagrams, X id Yf and so, in particular, also as a diagram of diagrams (indexed by the walking arrow ).Denote by D : → Diag ( C ) this diagram of diagrams. We have that µ ( D ), as given by theGrothendieck construction, is a diagram indexed again by . Instead, by Theorem 2.12,the colimit of D in Diag ( C ) is a diagram whose domain must be the colimit of id : → in Cat , which is . In particular, this colimit is not isomorphic to µ ( D ) .Therefore, for the free algebra ( Diag ( C ) , µ ), the algebra structure map µ is not in theform of Theorem 2.7. (See the end of Appendix A.2 for why ( Diag ( C ) , µ ) is indeed apseudoalgebra.)A structural reason for why not all Diag -algebras arise this way will be given in Sec-tion 4.6.1. Conjecturally, the generic
Diag -algebras may be given by taking oplax colimits,instead of strict (in 2-categories rather than categories).
3. Image presheaves
In this section we define the notion of image presheaf of a diagram, which may be inter-preted as its “free” or “prototype colimit”. We also extend and generalize the theory ofcofinal functors (which we call confinal , see Section 3.2) and of absolute colimits, givingconditions for when certain diagrams have isomorphic colimits even after applying a func-tor to them (Proposition 3.9). This incorporates absolute colimits as a special case (seeProposition 3.13 and the subsequent discussion).29 .1. Diagrams and presheaves
Given a diagram D : J → C , we obtain a presheaf Im D on C canonically, as follows. Definition 3.1.
The image presheaf of the diagram D , which we denote by Im D , is thecolimit of the following composite functor, J C [ C op , Set ] D Y where Y denotes the Yoneda embedding. We can view the image as a “free colimit”, the presheaf obtained as the colimit ofrepresentables indexed by the diagram D . As usual, by the universal property of colimitsthis assignment is functorial.Equivalently, Im D is the (pointwise) left Kan extensionIm D := Lan D op , as in the following diagram, J op SetC op 1 D op Im Dλ D where 1 : J op → Set is the constant presheaf at the singleton set 1, and λ D denotes theuniversal 2-cell. This way one could generalize the definition to the case of weighteddiagrams, which is however beyond the scope of the present paper.Concretely, given an object C of C , the set (Im D )( C ) is the setcolim J ∈ J (cid:0) Hom C ( C, DJ ) (cid:1) . Its elements are the equivalence classes of arrows of C of the form C → DJ , for someobject J of J , where we identify any two arrows f : C → DJ and f ′ : C → DJ ′ wheneverthere exists a morphism g : J → J ′ of J such that f ′ = Dg ◦ f , as in the following diagram. J DJ CJ ′ DJ ′ g Dgff ′ Functoriality of Im is given by pasting arrows and commutative diagrams.In general, two arrows f : C → DJ ′ and f ′ : C → DJ ′ are identified if there is a zig-zagof arrows of J connecting J and J ′ , which we write as J ! J ′ , such that the followingdiagram “commutes”. J DJ CJ ′ DJ ′ ff ′
30y convention, we say that a triangle containing a zig-zag as the one above commutesif and only if each arrow in the zig-zag gives a commutative triangle. For later use, wedenote by [
J, f ] the equivalence class in Im D represented by f : C → DJ . Let P : C op → Set be a presheaf. Recall the discrete fibration given by the category ofelements R o P → C . Note that we use again the short integral sign, as we had used for the Grothendieck con-struction – but here it denotes the category of elements, as we are using the contravariantversion. The category R o P is the category where • Objects consist of pairs (
C, x ), where C is an object of C and x C is an element ofthe set P C . • A morphism (
C, x ) → ( C ′ , y ) is a morphism g : C → C ′ of C such that the function P g : P C ′ → P C sends y ∈ P C ′ to x ∈ P C .If C is small (resp. locally small), R o P is small too (resp. locally small). The functor R o P → C , which is a discrete fibration, maps ( C, x ) to C and a morphism of R o P to theunderlying morphism of C . The category of elements is functorial in the following way.Let α : P → Q be a morphism of presheaves, i.e. a natural transformation C op Set . PQα we can construct a functor R o α : R o P → R o Q which makes the following diagram com-mute, R o P R o Q C R o α where the morphisms into C are the canonical discrete fibrations. The functor R o α isconstructed as follows. • It maps the object (
C, p ), where C is an object of C and p ∈ P C , to the object(
C, α C ( p )). Note that α C ( p ) ∈ QC ; • It maps the morphism (
C, P f ( q )) → ( C ′ , q ) induced by the morphism f : C → C ′ of C to the morphism ( C, Qf ( α C ′ ( q ))) → ( C ′ , α C ′ ( q )) again induced by f . Note that31he following naturality diagram commutes. P C ′ QC ′ P C QC α C ′ P f Qfα C Consider now a diagram D : J → C , take its image presheaf Im D and form its categoryof elements R o Im D . Let’s see what we get explicitly. • An object of R o Im D consists of an object C of C together with an equivalence class[ J, f ] represented by an object J of J and a morphism f : C → DJ of C . • A morphism ( C, [ J, f ]) → ( C ′ , [ J ′ , f ′ ]) consists of a morphism g : C → C ′ of C suchthat (Im D )( g )([ J ′ , f ′ ]) = [ J, f ]. This means that there is a zig-zag of arrows of J connecting J and J ′ , which we write as J ! J ′ , such that the following diagramcommutes. J C DJ J ′ C ′ DJ ′ g ff ′ Proposition 3.2.
Given a morphism of diagrams
J CK
FR F ′ ρ the 2-cell ρ factors in the following form, J R o Im F CK R o Im F ′ R ˜ F ˜ F ′ ˜ ρ where the triangle on the right commutes, with the vertical arrow given by R o Im(
R, ρ ) (recall that both R o and Im are functorial). Before the proof, let’s see what the functor R o Im(
R, ρ ) : R o Im F → R o Im F ′ looks like.It maps an object ( C, [ J, C f −→ F J ])of R o Im F to the object ( C, [ RJ, C f −→ F J ρ J −→ F ′ RJ ])32f R o Im F ′ . On morphisms, given g : C → C ′ in C and a zig-zag J ! J ′ in J making thediagram on the left commute, we get the diagram on the right. C F JC ′ F J ′ g ff C F J F ′ RJC ′ F J ′ F ′ RJ ′ g f ρ J f ρ ′ J The right-most square commutes by naturality of ρ applied to the zig-zag. Proof.
Let J be an object of J . Let’s give the component of ˜ ρ at J explicitly. Note firstthat R o Im(
R, ρ )( ˜ F ( J )) = ( J, [ F J id −→ F J ρ J −→ F ′ RJ ])and that ˜ F ′ ( R ( J )) = ( RJ, [ F ′ RJ id −→ F ′ RJ ]) . The morphism ˜ ρ J : R o Im(
R, ρ )( ˜ F ( J )) → ˜ F ′ ( R ( J )) is then given by the following diagram, F J F J F ′ RJF ′ RJ F ′ RJ ρ id ρ id with the zig-zag given by the identity. By construction, whiskering ˜ ρ with the forgetfulfunctor to C we get back ρ . Here we extend a bit the theory of confinal functors, and unify it with the theory ofabsolute colimits. A reference for the standard theory is for example given in [Bor94,Section 2.11] (note that there the term “final functor” is used instead, for limit-invariantfunctors, rather than colimit-invariant). Definition 3.3.
A functor F : C → D is called confinal if for every object D of D , thecomma category D/F is non-empty and connected.
The importance of confinal functors is due to the following well-known statement, whichis actually an equivalent characterization of confinality. These are known in the literature also as “cofinal”, “coinitial” and “final”, terms which may causeconfusion. The “co” in “cofinal” (e.g. in “cofinal subnet”) does not denote duality, but rather, followsthe Latin particle “cum” which means “with, together”. As such, we feel that “confinal” is bothcloser to the original etymology, and less prone to cause confusion. The term “confinal” (or inGerman, “konfinal”) was introduced by Hausdorff for the case of ordered sets [Hau14, Section IV.4,page 86], and it has been in use at least until [GU71, Definition 2.12]. roposition 3.4. If F : C → D is confinal, for every functor G : D → E admitting acolimit, the functor G ◦ F : C → E admits a colimit too, and the map between colimits colim C ∈ C G ( F ( C )) → colim D ∈ D G ( D ) induced by the following morphism of (possibly large) diagrams C DE FG ◦ F G is an isomorphism.
For a proof, see for example the proof of the very similar statement [Bor94, Proposi-tion 2.11.2] (again, note the different conventions there).
We would like now to prove the following statement.
Proposition 3.5.
Let C be (small-)cocomplete. The (large) colimit of the fibration π : R o Im F → C exists, and it coincides with the (small) colimit of the diagram F : J → C . This is almost an instance of the following known result, sometimes called the “com-prehension factorization schema”.
Theorem 3.6 ([SW73]) . There is an orthogonal ( E, M ) -factorization system on Cat ,where E are the confinal functors and M are the discrete fibrations. However, in our case we are not requiring C to be small, only locally small. Becauseof this, and because we need the construction explicitly, we give a dedicated proof. Weconstruct a functor ˜ F : J → R o Im F as follows. • For each object J of J , define ˜ F J := (
F J, [ J, id F J ]) , i.e. assign to J the equivalence class represented by the identity arrow F J → F J of C . • For each morphism f : J → J ′ , take the map F f : F J → F J ′ . Notice that we havethe following commutative diagram, F J F JF J ′ F J ′ F f id F f id
34o that we have a well-defined morphism of R o Im F (the zig-zag is simply given bythe morphism f ). Proposition 3.7.
The functor ˜ F : J → R o Im F is confinal. This suffices to deduce Proposition 3.5, since the following diagram commutes. R o Im F J C π ˜ F F
Proof of Proposition 3.7.
We need to show that for every object ( C, [ J, f ]) of R o Im F , thecomma category ( C, [ J, f ]) / ˜ F is non-empty and connected. This is guaranteed by the waythe category R o Im F is constructed, as follows.First, since ˜ F J is the equivalence class represented by the identity
F J → F J , we canconsider f as an arrow ( C, [ J, f ]) → ˜ F J of R o Im F and, hence, an object of ( C, [ J, f ]) / ˜ F ,as we have the trivially commuting diagram C F JF J F J f f id with the zig-zag given by the identity. Now, given any other arrow f ′ : ( C, [ J, f ]) → ˜ F J ′ in R o Im F , we have [ J ′ , f ′ ] = Im F ( f ′ )([ J ′ , DJ ′ ]) = [ J, f ]. So there is a zig-zag J ! J ′ in J , which actually links f ′ with f in the comma category ( C, [ J, f ]) / ˜ F , as required. We will make use of the following well-known fact:
Lemma 3.8.
Consider the functors
A B C
F G where A , B and C are locally small categories. If G ◦ F is confinal and G is fully faithful,then F and G separately are confinal too. Proposition 3.9.
Let C be a locally small category. Let D : J → C and E : K → C besmall diagrams. The following conditions are equivalent.(a) Im D and Im E are naturally isomorphic;(b) for every locally small category D and every functor F : C → D , the compositediagram F ◦ D : J → D admits a colimit if and only if F ◦ E : K → D does, and inthat case the two colimits are isomorphic; c) D and E are connected by a zigzag in Cat / C such that all the arrows of the underlyingzigzag J ! K in Cat are confinal functors.
Definition 3.10.
If the diagrams D : J → C and E : K → C satisfy any (and, hence, all)of the conditions above, we call them mutually confinal . One should view the property of being mutually confinal as the absolute coincidence oftheir colimits: existence granted, their colimits remain the same even after applying anyother functor.
Proof of Proposition 3.9.
The statement ( c ) ⇒ ( b ) is part of the standard theory of con-final functors (see the references). The statement ( b ) ⇒ ( a ) follows from choosing for F : C → D the Yoneda embedding η : C → PC .The real work is to prove ( a ) ⇒ ( c ). To this end, suppose that α is an isomorphismIm D ∼ = Im E . We have an isomorphism between the corresponding categories of elements, R o Im D R o Im E C R o α ∼ = together with functors ˜ D : J → R o Im D and ˜ E : K → R o Im E which are confinal byProposition 3.7. We have the following diagram of confinal functors. J K R o Im D R o Im E ˜ D ˜ E R o α ∼ = Denote now by S the full subcategory of R o Im E given by the joint full image of the twofunctors R o α ◦ ˜ D and ˜ E . The situation is depicted in the following commutative diagram. J K R o Im D S R o Im E ˜ D ˜ E R o α By construction, S is small, since its cardinality is bounded by the one of the disjointunion of the sets of objects of J and K , which are small. Moreover, the resulting functors J → S and K → S are confinal by Lemma 3.8. The resulting diagram J S KC
D E gives the desired zigzag (of length 2). 36 .2.3. Absolute colimits An absolute colimit is a colimit which is preserved by every functor [Par71]. We canredefine the concept of absolute colimits in terms of mutually confinal functor as follows.As we will see, this is equivalent to the usual definition. Definition 3.11.
Let C be a locally small category, and let D : J → C be a small diagram.An absolute colimit of D is an object X of C such that the diagrams D : J → C and X : → C are mutually confinal. The image presheaf of a one-object diagram is the one given by the Yoneda embedding y : C → [ C op , Set ], as the following proposition show.
Proposition 3.12.
For each locally small category C , the following diagram commutesup to natural isomorphism. CDiag ( C ) [ C op , Set ] η y Im Proof.
Using the definition of image in terms of Kan extensions, and recalling that η ( X )is the diagram X : → C that picks out the object X , we have that Im( η ( X )) is givenby the following Kan extension, op 1 X Lan X λ which is isomorphic to Hom C ( − , X ), i.e. the image of X under the Yoneda embedding.The isomorphism is moreover natural in X , by the universal property of (free) colimits.Therefore, equivalently, an object X is an absolute colimit of the diagram D : J → C ifand only if Im D is naturally isomorphic to the representable presheaf Hom C ( − , X ).If we instance Proposition 3.9 for this case, we get the following statement. Proposition 3.13.
Let C be a locally small category. Let D : J → C and be a smalldiagram, and let X be an object of C . The following conditions are equivalent.(a) X is an absolute colimit of D (i.e. Im D ∼ = Hom C ( − , X ) naturally);(b) for every locally small category D and every functor F : C → D , the object F ( X ) isthe colimit in D of the composite diagram F ◦ D : J → D ;(c) D : J → C and X : → C are connected by a zigzag in Cat / C such that all thearrows of the underlying zigzag J ! in Cat are confinal functors. X is a colimit of D (take F to be the identity). Denote the colimit cone by h : D ⇒ X .We can now rewrite condition (c) in a more elementary way. Recall that in the proofof Proposition 3.9 we had obtained condition (c) from (a) by forming the category ofelements of the (common) image presheaf, and taking the joint image of the confinalfunctors from J and from to this category of elements. The category of elements of therepresentable presheaf Hom C ( − , X ) is isomorphic to the slice category C /X . We thereforehave to take the joint image in C /X of the two functors at the top of this diagram, J C /X D π X where the functor J → C /X maps an object J ∈ J to the arrow of the colimit cone h J : DJ → X . Just as in the proof of Proposition 3.9, denote this joint full image by S . Now, the resulting functor → S is trivially confinal, since it maps the unique objectof to id X ∈ C /X . More interestingly, the proof of Proposition 3.9 says that also theresulting functor J → S is confinal. The condition is nontrivial for the only object of S that does not come from J , which is the one coming from , namely id X ∈ C /X . For thisobject, the confinality condition of the functor J → S says the following:(d) There exist an object J of J and an arrow f : X → DJ of C such that the followingdiagram commutes: X DJX id f h J and such that moreover, for each object J ′ of J and arrow f ′ : X → DJ ′ making asimilar diagram commute, there exists a zigzag J ! J ′ in J making the followingdiagram in C commute. DJ ′ X DJX h ′ J id f ′ f h J Intuitively, we can interpret this condition as “the colimit cone eventually has a section,which is in some sense unique”. This is similar to very well-known statements in theliterature, see for example Theorems 2.1 and 4.1 in [Par71]. Therefore we can view ourtheory of mutually confinal functor as a joint generalization both of confinal functors andof absolute colimits. 38 . The monad of small presheaves
In this section we study small presheaves, and show that they also form a pseudomonad.Moreover, the image map of the previous section gives a morphism of pseudomonads (alsoexplicitly defined in Appendix A). Again, cocomplete categories are pseudoalgebras of thismonad, but this time, every pseudoalgebra is of this form. Indeed, considering the longhistory of (co)completion theory of categories (see [Isb60; Lam66] for early contributions),one should view the monad of small presheaves as the “free small-cocompletion monad”.The fact that
Diag admits cocomplete categories as algebras is then to be thought of asan instance of the “restriction of scalars” construction, where algebras of a monad can bepulled back along a morphism of monads, see Appendix A.3.It is known that small presheaves form a pseudomonad [DL07]. However, we did not findan explicit construction in the literature, so we give one in the present section. Comparedto the pseudomonad of Section 2, this one is weaker: the underlying pseudofunctor isnot a strict 2-functor. A short review of the relevant basic definitions can be found inAppendix A. The fact that Im defines a morphism of pseudomonads (Section 4.6) seemsto be new.
Definition 4.1.
A presheaf is called small if it is (naturally isomorphic to) the imagepresheaf of a small diagram.Denote by PC the full subcategory of [ C op , Set ] whose objects are small presheaves. The image presheaf of a (small) diagram is by definition a small presheaf, so that thefunctor Im :
Diag ( C ) → [ C op , Set ] actually lands in PC . We denote the resulting functor Diag ( C ) → PC again by Im. This will not cause confusion, since from now on we will onlyconsider small presheaves.Despite the slightly new terminology, this is a known concept, see for example [DL07].We recall the following facts. • A presheaf is small if and only if it can be written as a small colimit of representables[DL07, Section 2]. Therefore we can think of small presheaves as of forming the freesmall cocompletion of a category. • The category PC of small presheaves on a locally small category C is itself locallysmall. This allows us to avoid several size issues when talking about the free cocom-pletion.Notice also the following fact. Remark 4.2.
Let C be a locally small category, and let P : C op → Set be a small presheaf.Then we know (Proposition 3.7) that there exists a small category S and confinal functor39 F : S → R o P . By Lemma 3.8, we can assume that ˜ F is fully faithful, or equivalently thatit is the inclusion of a full subcategory.For later use in this section, we recall the following known statement, sometimes calledthe co-Yoneda lemma (see [Kel82, Section 3.10], as well as [Lor15, Section 2.2]). Proposition 4.3.
Let C be a category, and let H : C → Set be a functor. There is anisomorphism H ( C ) ∼ = Z C ′ ∈ C Hom C ( C ′ , C ) × H ( C ′ ) , for each object C of C and natural in C , given by mapping each element x ∈ H ( C ) to theequivalence class in the coend above the ordered pair (id C , x ) ∈ Hom C ( C, C ) × H ( C ) . Given locally small categories C and D and a functor F : C → D , we would like to find anassignment PC → PD , which maps small presheaves to small presheaves. Definition 4.4.
Let F : C → D be a functor between locally small categories, and let P be a small presheaf on C . The pushforward of P along F is the presheaf on D given bythe following left Kan extension. C op SetD op PF op Lan F op Pλ We denote the resulting presheaf by F ♯ P . Equivalently, F ♯ P is given by the free colimit of F , weighted by P . By the universalproperty of (weighted) colimits, it is therefore functorial in F . Note that this definitionspecifies F ♯ P only up to isomorphism. As usual, the choice of a particular object withinits isomorphism class is de facto irrelevant.Recall the following fact, which says that Kan extension diagrams can be pasted verti-cally. While the statement is folklore and a consequence of the simple fact that universalarrows [Mac98] compose in an obvious sense, we provide a proof because the explicitisomorphism given in the proof will be of use later. Proposition 4.5.
Let A , B , C and D be categories, and let F : A → B , G : B → C , H : A → D be functors. The left Kan extensions Lan G (Lan F H ) and Lan G ◦ F H are naturally Often a stronger statement is called “co-Yoneda lemma”, see Proposition 4.14. somorphic. AB DC
HF λ F Lan F HG Lan G (Lan F H ) λ G ∼ = AB DC
HFG
Lan G ◦ F Hλ G ◦ F (4.1) Proof.
By the universal property of Lan F H , the natural transformation λ G ◦ F on the rightof (4.1) factors uniquely through λ F , i.e. there exists a unique 2-cell ν : Lan F H ⇒ Lan G ◦ F H ◦ G such that the following 2-cells are equal. AB DC
HF λ F Lan F HG Lan G ◦ F Hν = AB DC
HFG
Lan G ◦ F Hλ G ◦ F Moreover, by the universal property of Lan G (Lan F H ), the natural transformation ν fac-tors uniquely through λ G , meaning that there exists a unique natural transformation κ : Lan G (Lan F H ) ⇒ Lan G ◦ F H such that the following 2-cells are equal, B DC
Lan F HG Lan G ◦ F Hλ G κ = B DC
Lan F HG Lan G ◦ F Hν where the unlabeled arrow (for reasons of space) denotes Lan G (Lan F H ). We now showthat κ is an isomorphism, by providing an inverse. By the universal property of Lan G ◦ F H ,the composite natural transformation on the left of (4.1) factors uniquely through λ G ◦ F ,meaning that there exists a unique natural transformation δ : Lan G ◦ F H ⇒ Lan G (Lan F H )such that the following 2-cells are equal. AB DC
HFG
Lan G (Lan F H ) λ G ◦ F δ = AB DC
HF λ F Lan F HG Lan G (Lan F H ) λ G (4.2)41here this time the unlabeled arrow denotes Lan G ◦ F H . By the universal properties ofthe respective Kan extensions, we then have that κ ◦ δ has to be the identity naturaltransformation at Lan G ◦ F H , and δ ◦ κ has to be the identity natural transformation atLan G (Lan F H ). Corollary 4.6.
Pushforwards of small presheaves exist, are given by pointwise left Kanextensions, and are small.
Remark 4.7.
Since we are dealing with pointwise Kan extensions, we can also expressthis vertical pasting law in terms of coends, where it is an instance of the co-Yoneda lemma(Proposition 4.3). In particular, let A and B be locally small categories, let F : A → B bea functor, and let P : A op → Set be a small presheaf. Then F ♯ P ( B ) ∼ = Z A ∈ A P ( A ) × Hom B ( B, F A ) . Let moreover C be locally small, and G : B → C be a functor. Then G ♯ F ♯ P ( C ) ∼ = Z A ∈ A Z B ∈ B P ( A ) × Hom B ( B, F A ) × Hom C ( C, GB ) ∼ = Z A ∈ A P ( A ) × Hom C ( C, GF A ) ∼ = ( G ◦ F ) ♯ P ( C ) , where the middle isomorphism, which in the proof Proposition 4.5 was denoted by κ , isgiven by the co-Yoneda lemma.Now, given F : C → D , we have a (chosen) mapping F ♯ : PC → PD . For P to be apseudofunctor, we first of all need F ♯ to be a functor. To this end, let α : P → Q be anatural transformation between small presheaves on C . By the universal property of F ♯ P as a Kan extension, there is a unique 2-cell F ♯ P ⇒ F ♯ Q , which we denote by F ♯ α , whichmakes the following 2-cells equal. C op SetD op PQF op F ♯ Qλ Q α = C op SetD op PF op F ♯ QF ♯ Pλ P F ♯ α (4.3)This makes F ♯ a functor PC → PD , where functoriality holds by uniqueness of the cell F ♯ α . Uniqueness of such cell holds once a choice of F ♯ has been made. (One can obtainthis 2-cell also using the pointwise characterization of F ♯ as a coend.)42 .2.1. Unitor and compositor The left Kan extension of P ∈ PC along the identity functor id : C → C is naturallyisomorphic to P itself, and this isomorphism is natural in P as well. In other words,id ♯ : PC → PC is naturally isomorphic to id : PC → PC . Since we are free to choose id ♯ P within its isomorphism class, we can in particular pick id ♯ P = P , so that the unitor ofour pseudofunctor is the identity (one speaks of a normal pseudofunctor ).With composition, the matters are not so simple. By Proposition 4.5, or by Remark 4.7,we know that Kan extensions preserve compositions up to a specified natural isomorphism,which we had denoted by κ . In general we cannot assume that κ is the identity, we cannotmake that choice consistently across the whole category. However, we can show that κ satisfies all the properties of a compositor, and so it makes P pseudofunctorial.As in Remark 4.7, let A , B and C be locally small categories, and let F : A → B and G : B → C be functors. Let moreover P be a small presheaf on A . The isomorphism κ : G ♯ ( F ♯ P ) → ( G ◦ F ) ♯ P of PC given by the co-Yoneda lemma, as in Remark 4.7, is(strictly) natural in P , in F , and in G , by the universal property of coends.In order to have pseudofunctoriality it remains to be shown that the compositor κ isassociative and unital. Unitality is guaranteed by our choice of unitor (identities), we nowprove associativity. Proposition 4.8.
The following “associativity” diagram commutes for all locally smallcategories A , B , C and D and functors F : A → B , G : B → C and H : C → D . H ♯ ◦ G ♯ ◦ F ♯ ( H ◦ G ) ♯ ◦ F ♯ H ♯ ◦ ( G ◦ F ) ♯ ( H ◦ G ◦ F ) ♯κ ◦ idid ◦ κ κκ One could again invoke the co-Yoneda lemma, but it may be instructive to give a proofby explicitly pasting Kan extensions vertically. For simplicity, we equivalently prove thestatement in terms of the inverse κ − . Proof.
Let P be a small presheaf on A . By iterating (4.2), both composite cells A op B op SetC op D op F op PG op H op λ H ◦ G ◦ F ( H ◦ G ◦ F ) ♯ P ( H ◦ G ) ♯ F ♯ P H ♯ G ♯ F ♯ Pκ − κ − and A op B op SetC op D op F op PG op H op λ H ◦ G ◦ F ( H ◦ G ◦ F ) ♯ PH ♯ ( G ◦ F ) ♯ P H ♯ G ♯ F ♯ Pκ − κ − A op B op SetC op D op F op PG op F ♯ Pλ F H op G ♯ F ♯ Pλ G H ♯ G ♯ F ♯ Pλ H By the universal property of ( H ◦ G ◦ F ) ♯ P as a Kan extension, then, the two composite2-cells ( H ◦ G ◦ F ) ♯ P ⇒ H ♯ G ♯ F ♯ P are equal.This proves that P is a pseudofunctor CAT → CAT . Consider a functor F : C → D between locally small categories, and let D : I → C bea (small) diagram in C . One can either form the image presheaf of D and then push itforward along F , or one can first form the diagram F ◦ D : I → D , and then take the imagepresheaf. As we will see shortly, the result is the same, up to coherent isomorphism. Proposition 4.9.
The functors
Im :
Diag ( C ) → PC form a pseudonatural transformation Diag ⇒ P .Proof. First of all, for each functor F : C → D of CAT we need a natural isomorphism inthe following form.
Diag ( C ) PCDiag ( D ) PD F ∗ Im F ♯ ν ∼ = Im (4.4)Let now D : I → C be a small diagram. Using the definition of image in terms of Kanextensions, the two routes of Equation (4.4) are given by the following Kan extensions,respectively, IC SetD DF Lan F ◦ D λ F ◦ D IC SetD D λ D Lan D F Lan F (Lan D λ F κ of Proposition 4.5 and Section 4.2.1,which is also natural both in D and in F . The unit and multiplication conditions corre-spond to the unitality and associativity condition for κ . Let C be a locally small category. By Proposition 3.12, the Yoneda embedding y : C → [ C op , Set ] lands in PC : representable presheaves are small. We denote again by η : C → PC the functor induced by the Yoneda embedding C Hom C ( − , C ). When this causesconfusion because both monads Diag and P are present, we will denote the two units by η Diag and η P . Proposition 4.10.
The unit η : C → PC is canonically pseudonatural in C .Proof. Let C and D be locally small, and let F : C → D be a functor. We have to provethat the following diagram commutes up to coherent isomorphism. C PCD PD
F η F ♯ η In practice, using the coend description of F ♯ (via Kan extensions), this amounts to anatural isomorphism of presheaves,Hom D ( − , F C ) ∼ = Z C ′ ∈ C Hom C ( C ′ , C ) × Hom D ( − , F C ′ )which is given by the co-Yoneda lemma (Proposition 4.3), by setting H ( C ) = Hom D ( − , F C ).In particular, the isomorphism is given pointwise, for each object D of D by mapping f : D → F C to the equivalence class of (id C , f ) ∈ Hom C ( C, C ) × Hom D ( D, F C ). Itcan be checked that, defined this way, the isomorphism respects identities and composi-tion.
Let’s now turn to the multiplication of the monad. One could define it as the left-adjointto the unit, since the monad turns out to be lax idempotent (a.k.a. Kock-Z¨oberlein). Here,instead, we define the multiplication directly.
Definition 4.11.
Let C be locally small, and let Φ be an object of PPC (i.e. a smallpresheaf on small presheaves). We define µ (Φ) as the object of PC specified, up to iso-morphism, by the following “free weighted colimit”, µ (Φ)( C ) := Z P ∈ PC Φ( P ) × P ( C )45 or each object C of C . Remark 4.12.
By functoriality of colimits, µ (Φ) is a presheaf C op → Set . Since
P C is ingeneral not small, let’s show why the coend exists. Since Φ is small, there exists a smalldiagram D : I → PC such that Im( D ) ∼ = Φ. In other words, µ (Φ)( C ) ∼ = Z P ∈ PC Z I ∈ I Hom PC ( P, DI ) × P ( C ) , which by Fubini and by the co-Yoneda lemma (Proposition 4.3) is naturally isomorphicto Z I ∈ I DI ( C ) . This coend exists, since it is a coend in
Set indexed by a small category, and it gives asmall presheaf (since PC is cocomplete).Therefore µ is a functor PPC → PC (as usual, defined up to natural isomorphism). Proposition 4.13.
The functor µ : PPC → PC is pseudonatural in the category C .Proof. We have to prove that the following diagram commutes up to coherent naturalisomorphism.
PPC PCPPD PD F ♯♯ µ F ♯ µ Given Φ ∈ P P C , the top right path gives the presheaf Z C ∈ C Z P ∈ PC Hom D ( − , F C ) × Φ( P ) × P ( C ) , which (by Fubini) is isomorphic to Z P ∈ PC Φ( P ) × F ♯ P. (4.5)The bottom left path gives the presheaf Z Q ∈ PD Z P ∈ PC Hom PD ( Q, F ♯ P ) × Φ( P ) × Q, which by the co-Yoneda lemma (Proposition 4.3) is isomorphic to (4.5). One can checkthat this isomorphism respects identities and composition.46 .4. Unitors, associators, coherence The left unitor
PC PPC ∼ = PC η PC µ C id is given as follows. Starting with a presheaf P in PC , we can apply the unit to get thefollowing representable presheaf on PC ,Hom PC ( − , P ) , and then, applying the multiplication, we get the following presheaf, Z Q ∈ PC Hom PC ( Q, P ) × Q ( − ) ∼ = P, where the last isomorphism, filling the diagram above, is given by the co-Yoneda lemma(Proposition 4.3), and defines the left unitor ℓ . Naturality in P follows from naturality ofthe co-Yoneda isomorphism. The modification property for ℓ against functors F : C → D is again an instance of the coherence of colimits (uniqueness of the isomorphism), just asin Section 2.5.3 and Proposition 4.8, this time for weighted colimits.The right unitor PC PPC ∼ = PC ( η C ) ♯ µ C id is given as follows. Again start with a presheaf P in PC . This time we apply the map η ♯ ,to get the following presheaf. Q Z C ∈ C P C × Hom PC ( Q, η C ( C )) = Z C ∈ C P C × Hom PC ( Q, Hom C ( − , C ))(Note that we cannot apply the Yoneda lemma to simplify the expression on the right.)We now apply the multiplication again, to obtain X Z Q ∈ PC Z C ∈ C P C × Hom PC ( Q, Hom C ( − , C )) × Q ( X ) ∼ = Z C ∈ C P ( C ) × Hom C ( X, C ) ∼ = P ( X ) , where both isomorphisms are given again by the co-Yoneda lemma (Proposition 4.3). Thisgives the right unitor r , and the reason why it’s a modification is analogous to the onefor the left unitor ℓ . 47he associator PPPC PPC ∼ = PPC PC ( µ C ) ♯ µ C µ C µ PC is again an instance of the co-Yoneda lemma (Proposition 4.3). Namely, given Φ ∈ PPPC ,the top-right path of the diagram gives the following presheaf C Z P ∈ PC Z Ψ ∈ PPC P ( C ) × Φ(Ψ) × Hom PC (cid:18) P, Z Q ∈ P C Ψ( Q ) × Q ( − ) (cid:19) while the bottom-left path gives the following, C Z Ψ ∈ PPC Z Q ∈ P C
Φ(Ψ) × Φ( Q ) × Q ( C )and the two differ by one application of the co-Yoneda lemma (over P ). This gives theassociator a , which is a modification for reasons analogous to the above.Again, the higher coherence conditions hold by the uniqueness of isomorphisms givenby the universal property, as in Section 2.5.3. It is well-known that the pseudoalgebras of the pseudomonad P are cocomplete categorieswith a choice of (weighted) colimit, and pseudomorphisms of pseudoalgebras are cocontin-uous functors [DL07]. Differently from the case of Diag , this is a complete characterization.Let’s see in detail how the structure maps look.Given a small-cocomplete, locally small category C , let e : PC → C be a choice ofweighted colimits, that is, e ( P ) ∼ = Z X ∈ C P ( X ) ⊗ X, (4.6)where ⊗ denotes the copower (also known as tensor , see for example [Kel82, Section 3.7]).The copower satifies a (more general) version of the “co-Yoneda lemma” of Proposi-tion 4.3, as follows. See again [Kel82, Section 3.10] for more details. Proposition 4.14.
Let C be a category, let D be a cocomplete category, and let H : C → D be a functor. There is an isomorphism H ( C ) ∼ = Z C ′ ∈ C Hom C ( C ′ , C ) ⊗ H ( C ′ ) , for each object C of C and natural in C , given by selecting the component of id C ∈ Hom C ( C, C ) in the copower.
48 similar argument as Remark 4.12 shows then that the coend in (4.6) exists. Theaction of e on morphisms is the one given by the universal property, as usual.The unitor and multiplicator of the algebras are given as follows. First of all, the unitor C PCC id η C ι e is the canonical isomorphism given by the general co-Yoneda lemma (Proposition 4.14), Z X ∈ C Hom C ( X, C ) ⊗ X ∼ = X. for all C ∈ C .The multiplicator PPC PCPC C µ C e ♯ eγe is also given by the generalized co-Yoneda lemma, as follows, Z Y ∈ C Z P ∈ PC Φ( P ) × Hom C (cid:18) Y, Z X ∈ C P ( X ) ⊗ X (cid:19) ⊗ Y ∼ = Z P ∈ PC Z X ∈ C Φ( P ) × P ( X ) ⊗ X for all Φ ∈ PPC . This can be seen as a “generalized Fubini” for coends or weightedcolimits, analogous to Lemma 2.10.Again, the coherence conditions can be seen as a matter of uniqueness of the isomor-phism by the universal property of weighted colimits.
Here we want to show that the image is a (pseudo)morphism of (pseudo)monads, followingDefinition A.2. The unit modification u is given by the isomorphism of Proposition 3.12.Again, the fact that this gives a modification comes from the universal property.The multiplication modification m is in the following form, Diag ( Diag ( C )) PPCDiag ( C ) PC (Im Im) C µ Diag C µ P C Im C m C (4.7)49here Im Im is shorthand for the following composite. Diag ( Diag ( C )) Diag ( PC ) PPC (Im C ) ∗ Im PC (Note that, since the interchange law of pseudonatural transformations holds only up tonatural isomorphism, a priori horizontal composition is not uniquely defined, as in a weakbicategory. The choice we make, which will be consistent throughout the document, ismotivated by later convenience.)Explicitly, m is given as follows. Let D : J → Diag ( C ) be the following diagram ofdiagrams. J D J C D J Then, for every C ∈ C , writing images and µ in terms of coends, the two paths of diagram(4.7) are the following objects, Z P ∈ PC Z J ∈ J Hom
P C (cid:18) P, Z K ∈ D J Hom C ( − , D J ( K )) (cid:19) × P ( C )and Z J ∈ J Z K ∈ D ( J ) Hom C ( X, D J ( K ))and they are again isomorphic by the co-Yoneda lemma (Proposition 4.3), over P . Thisisomorphism is what we take as the multiplicator m . Again, the fact that it forms amodification follows from uniqueness, and so do the higher coherence conditions of Defi-nition A.2. In algebra, given a ring morphism f : R → R ′ , every R ′ -module is canonically an R -moduletoo, via the map f , and morphisms of R ′ -modules are morphisms of R -modules too.The resulting “pullback” functor between the categories of R ′ -modules and R -modulesis known as the “restriction of scalars” [Bou74, Chapter II], or “Weil restriction” inalgebraic geometry [Wei82, Section 1.3]. Not every R -module arises this way if f is notan isomorphism (for example, R itself, seen as an R -module, does not).More generally, given a morphism of monads λ : T → T ′ , every T ′ -algebra is canon-ically a T -algebra via λ , and morphisms of T ′ -algebras are automatically morphisms of T -algebras. This is well known (see, for example, [BW83, Theorem 3 in Section 3.6]),and the pullback functor is again called “restriction of scalars”, after its instance for thecase of rings. Again, not every T -algebra arises this way (if λ is not an isomorphism), forexample, the free algebra ( T X, µ ), where X is any object, in general does not.With Im : Diag → P we are witnessing an instance of this phenomenon in higherdimensions: every P -algebra, i.e. a cocomplete category, is also a Diag -algebra, via the50ap Im, which is a morphism of monads. As we have seen in Section 2.5.4, not every
Diag -algebra arises this way, for example, in general free algebras do not. The 2-dimensionalrestriction-of-scalars theorem is given in Appendix A.3 as Theorem A.7.To see that cocomplete categories as
Diag -algebras indeed arise in this way, note thatthe following diagram commutes up to natural isomorphism for each cocomplete category C (and any choices of colimits c and coends e ). Diag ( C ) PC ∼ = C Im C ec Indeed, the fact that this diagram commutes is, for the last time, an instance of thegeneral co-Yoneda lemma (Proposition 4.14): given D : J → C , Z X ∈ C Z J ∈ J Hom C ( X, DJ ) ⊗ X ∼ = Z J DJ, which is indeed just the colimit of D , given up to isomorphism by c . (Compare this withthe analogous “free” case of Remark 4.12.)
5. Partial colimits
We review here the basic ideas of partial evaluations, which are a categorical formalizationof the idea of “computing only pieces of an operation”. We will apply this to the operationof colimit encoded by the monads
Diag and P . We will then show that, for both monads,we have a correspondence between Kan extensions and partial evaluations of colimits(Theorems 5.5, 5.6 and 5.10). Intuitively, these results may be interpreted as the fact that“a left Kan extension is a partially computed colimit”. While the statement for the Diag monad is rather straightforward, the corresponding statement for P requires quite morework. Partial evaluations were introduced in [Per18, Chapter 4] for the case of probability mon-ads, and defined for the general case in [FP20]. A detailed study of their compositionalstructure (in general they don’t form a category) is given in [Con+20].
Definition 5.1.
Let ( T, µ, ν ) be a monad on Set , and let ( A, e ) be a T -algebra. Considerthe parallel pair of maps T T A T A µ A T e f which e : T A → A is the coequalizer. Given elements p, q ∈ T A , a partial evaluation from p to q is an element r ∈ T T A such that µ A ( r ) = p and T e ( r ) = q .If such a partial evaluation exists, we also say that q is a partial evaluation of p andthat p can be partially evaluated to q . Example 5.2.
Let (
T, µ, ν ) be the free commutative monoid monad. Given a set X , theelements of T X can be thought of as formal sums of elements of X , for example in theform x + y + z with x, y, z ∈ X . Natural numbers with addition form a commutativemonoid, and so N forms a T -algebra. The formal sum3 + 4 + 5 + 6 , seen as an element of T N , can be partially evaluated to the formal sum7 + 11via the element [3 + 4] + [5 + 6] ∈ T T N . The interpretation is that “we haven’t summedeverything together, but only some of the terms”.An essential property of partial evaluations is that “they don’t change the total result”.This is reflected by the multiplication diagram of the algebra, T T A T AT A A
T eµ e e which can be seen as saying that evaluating (via the map e ) two formal expressions whichdiffer by a partial evaluation, the (total) result of the evaluation is the same. In theexample above, both formal sums evaluate to 18.We refer the interested reader to [FP20] and [Con+20] for more details and examples.In our case we need a higher-dimensional, weaker analogue of the concept, since we aredealing with pseudomonads on CAT rather than monads on
Set . Definition 5.3.
Let ( T, µ, ν ) be a pseudomonad on CAT , and let ( A , e ) be a T -pseudoalgebra.Given objects P, Q ∈ A , a partial evaluation from P to Q is an object R of T T A suchthat µ A ( R ) ∼ = P and T e ( R ) ∼ = Q .If such a partial evaluation exists, we also say that Q is a partial evaluation of P andthat P can be partially evaluated to Q . .2. Partial evaluations of diagrams We now instance Definition 5.3 for the case of the monad
Diag , keeping in mind thefollowing multiplication square, which commutes up to isomorphism.
Diag ( Diag ( C )) Diag ( C ) ∼ = Diag ( C ) C µ c ∗ cc (5.1) Definition 5.4.
Let C be a cocomplete category, and let D : J → C and D ′ : K → C besmall diagrams. A partial evaluation from D to D ′ for the monad Diag is an object E of Diag ( Diag ( C )) such that µ ( E ) ∼ = D and c ∗ E ∼ = D ′ . If such an object exists, we also saythat D ′ is a partial colimit of D for the monad Diag . As we see shortly, we now establish an equivalence between partial evaluations of dia-grams and left Kan extensions along split opfibrations. There are now two ways of talkingabout the correspondence. One, which is probably the easiest to state, is as an equivalenceof properties.
Theorem 5.5.
Let C be a cocomplete category, and let D : J → C and D ′ : K → C besmall diagrams. Then D ′ is a partial colimit of D (for the monad Diag ) if and only if D ′ can be written as the (pointwise) left Kan extension of D along a split opfibration. Instead of an equivalence of properties we can also write the result as an equivalenceof structures, as follows.
Theorem 5.6.
Let C be a cocomplete category, and let D : J → C and D ′ : K → C besmall diagrams. There is a bijection between partial evaluations of colimits from D to D ′ and split opfibrations F : J → K exhibiting D ′ as a (pointwise) left Kan extension of D along F . J CK
DF D ′ ∼ = Lan F Dλ We will prove the latter statement, since it clearly implies the former. We will usethe following property of Kan extensions along opfibrations, which can be interpreted as“fiberwise colimits”. The following two statements are well known (see for example thenLab page on Kan extensions).
Proposition 5.7.
Let F : E → B be an opfibration between small categories. For eachobject E of E , the inclusion of the fiber F − ( E ) into the comma category F/E has a leftadjoint. Hence, it is a confinal functor. orollary 5.8. Let F : E → B be an opfibration between small categories, and let C becocomplete and locally small. The (pointwise) left Kan extension of a functor G : E → C along F at B can then be computed by a colimit labeled by the fiber of F at B : Lan F G ( B ) ∼ = colim E ∈ F − ( B ) G ( E ) . We are now ready to prove the theorem. The crucial point of the theorem is thecorrespondence between split opfibrations and (strict!) functors into
Cat . Proof of Theorem 5.6.
First of all, suppose that we have a partial evaluation from D to D ′ . That is, let E = ( E , E ) be an object of Diag ( Diag ( C )) such that µ ( E ) = D and c ∗ E = D ′ . Note that this implies that E is necessarily indexed by K (up to isomorphism),it is a functor K → Cat . We can now express c ∗ ( E ) as the left Kan extension of µ ( E )along the Grothendieck fibration π : R E → K . Indeed, using Corollary 5.8, we have thatfor each object K of K ,Lan π µ ( E )( K ) ∼ = colim ( K,X ) ∈ π − ( K ) µ ( E )( K, X )= colim X ∈ E K E K ( X ) ∼ = c ∗ ( E )( K ) . Conversely, let F : J → K be a split opfibration and suppose that D ′ is the left Kanextension of D along F . J CK
DF D ′ λ Let now E : K → Cat ⊆ CAT be the functor associated with the opfibration F . Con-cretely, this is the functor mapping each object K of K to its preimage F − ( K ), and eachmorphism k : K → K ′ to the functor F − ( K ) → F − ( K ′ ) given by the opcartesian lifts.Define also, for each object K of K , the functor E K : E K → C to be given by E K = F − ( K ) J C . D For each morphism k : K → K ′ , define E j ′ to be the 2-cell given by the opcartesianlifts in J , whiskered by D . We have that, by construction, µ ( E , E ) = D . Moreover, byCorollary 5.8, D ′ = c ∗ ( E , E ).Note also that, in the hypotheses above, D and D ′ must necessarily have isomorphiccolimits, either because “Kan extensions can be stacked vertically” (Proposition 4.5), orbecause of the multiplication square (5.1). A different but related picture is given in[PT20, Proposition 2.9]. 54 .3. Partial evaluations of presheaves We now give and prove a similar statement for the monad P . Let’s instance Definition 5.3for the case of the monad P . Definition 5.9.
Let C be a cocomplete category, and let P and Q be small presheaves on C . A partial evaluation from P to Q for the monad P is a presheaf on presheaves Φ in PPC such that µ (Φ) ∼ = P and e ♯ Φ ∼ = Q . If such an object exists, we also say that Q is a partial colimit of P for the monad P . This time we establish a correspondence with Kan extensions along any functor, notjust along a split opfibration. Moreover, we only have a weak statement, analogous toTheorem 5.5, an equivalence of properties rather than of structures.
Theorem 5.10.
Let C be a cocomplete category, and let P, Q ∈ PC . The followingconditions are equivalent.(a) There exists a small diagram D : J → C such that Im D ∼ = P , and a small category K with a functor F : J → K such that Im(Lan F D ) ∼ = Q . J CK DF Lan F Dλ (b) There exists a partial evaluation from P to Q for the monad P , i.e. an object Φ ∈ PPC such that µ (Φ) ∼ = P and e ♯ (Φ) ∼ = Q . Φ ∈ PPC P ∈ PC Q ∈ PC µ e ♯ In other words, Q is a partial colimit of P if and only if it can be written as the imagepresheaf of the left Kan extension of a diagram with image presheaf P .The proof of this statement, which can be considered the main result of this paper,requires more work than the analogous statement for Diag , and will have to use twoauxiliary lemmas.
Lemma 5.11.
Let F : J → K be a functor between small categories. There exist a smallcategory H , a confinal functor G : H → J , and a split opfibration π : H → K such thatfor every locally small category C and every diagram D : J → C , the pointwise left Kanextension of D ◦ G along π exists if and only if the one of D along F exists, and in thatcase the two Kan extensions are naturally isomorphic.
55e can depict the situation as follows:
H J CK πG F D
Lan π ( D ◦ G ) ∼ = Lan F D Note that the diagram above does not necessarily commute, nor does any of its twosubdiagrams.
Proof of Lemma 5.11.
Given an object K of K , the comma category F/K has • As objects, pairs (
J, k ) where J is an object of J and k : F J → K is a morphism of K ; • As morphisms, commutative diagrams in the following form,
F J F J ′ K F jk k ′ where j : J → J ′ is a morphism of J .Now define the functor F/ − : K → Cat as follows. • To each object K of K assign the comma category F/K ; • To each morphism ℓ : K → K ′ of K , assign the functor F/K → F/K ′ given bypost-composition with ℓ .Choose now as H the Grothendieck construction R F/ − , and notice that it is small. Upto isomorphism, • Its objects are triplets (
K, J, k ) where K is an object of K , J is an object of J , and k : F J → K is a morphism of K ; • Each morphism ℓ : K → K ′ of K defines an “opcartesian” morphism ℓ ∗ : ( K, J, k : F J → K ) → ( K ′ , J, ℓ ◦ k : F J → K ′ ); • For each object K of K , a morphism j : ( J, k : F J → K ) → ( J ′ , k ′ : F J ′ → K ) of F/K (i.e. a morphism j : J → J ′ of J with k ′ ◦ F j = k ) defines a morphism “in thefiber” ( K, J, k ) → ( K, J ′ , k ′ ), which we denote again by j . • Any other morphism of H is a composition of two morphisms in the two forms above.The forgetful functor π : H → K which maps ( K, J, k ) to K is a split opfibration. We canalso construct the forgetful functor G : H → J which maps ( K, J, k ) to J . This functor isconfinal: indeed, let J be an object of J . 56 The category
J/G is nonempty: it always contains
J J = G ( F J, J, id F J ); id J • The category
J/G is connected: let ( K ′ , J ′ , k ′ : F J ′ → K ′ ) and ( K ′′ , J ′′ , k ′′ : F J ′′ → K ′′ ) be objects of H , and let f : J → J ′ and g : J → J ′′ be morphisms of J . We canthen form the following zigzag in H :( F J, J, id F J )( F J ′ , J, F f ) ( F J ′′ , J, F g )( K ′ , J, k ′ ◦ F f ) ( K ′′ , J, k ′′ ◦ F g )( K ′ , J ′ , k ′ ) ( K ′′ , J ′′ , k ′′ ) . ( F f ) ∗ ( F g ) ∗ k ′∗ k ′′∗ f g Suppose now the pointwise left Kan extension
H CK D ◦ Gπ Lan π ( D ◦ G ) λ exists. We claim that Lan π D ◦ G ∼ = Lan F D . To see this, let K be an object of K . Since π is an opfibration, by Corollary 5.8 we can write Lan π ( D ◦ G )( K ) up to isomorphism asthe colimit of the following composite functor. π − ( K ) H J C
G D
Recall now that H = R F/ − , so that π − ( K ) ⊆ H is isomorphic to F/K , and the followingdiagram commutes,
F/K R F/ − D U G where U is the forgetful functor mapping ( J, k : F J → K ) to just J . Therefore we canrewrite Lan π ( D ◦ G )( K ) up to isomorphism as the colimit of this simpler composition, F/K
J C
U D which gives the pointwise left Kan extension of D along F .57 emma 5.12. Let C be a locally small category. The functor Im Im :
Diag ( Diag ( C )) → PPC is essentially surjective on objects.
Recall that the following diagram commutes only up to natural isomorphism,
Diag ( Diag ( C )) Diag ( PC ) ∼ = P ( Diag ( C )) PPC
Im Im ∗ ImIm ♯ and that, by convention, we denoted by Im Im the top-right path. Proof of Lemma 5.12.
Since Im is essentially surjective, it suffices to prove that
Diag
Imis as well. In other words, we have to prove that every small diagram of small presheavescan be obtained from a diagram of diagrams (by taking the image presheaf of each subdi-agram).Let I be a small category, and let D : I → PC be a diagram. Explicitly, for each object I of I we have a small presheaf DI : C op → Set , and for each morphism of I we havea morphism of presheaves. We can now take the category of elements of each DI , asdescribed in Section 3.1.1. For each I of I we have a discrete fibration π I : R o DI → C ,and for each morphism i : I → J of I we have a commutative triangle as follows. R o DI R o DJ C π I R o Di π J However, the categories R o DI are large in general, and so they do not form the desireddiagram of (small) diagrams yet. We then proceed as follows. Since each presheaf DI is small, for each I of I there exists (Remark 4.2) a small full subcategory S I of R o DI ,such that the inclusion functor is confinal. Denote by F I : S I → C the composition (orrestriction) S I R o DI C . π i By construction, Im( F i ) ∼ = DI . The assignment I S I is not functorial in I : for eachmorphism i : I → J of I , we get the following commutative diagram. S I S J R o DI R o DJ C π I R o Di π J R o Di to get a commutative square, that is, a priorithe restriction of R o Di to S I does not necessarily land in S J . We now extend the S I , asfollows.Let I be an object of I , and consider the slice category I /I , whose objects are pairs( H, h ) where H is an object of I , and h : H → I is an arrow of I . This category is small,since its set of objects is given by a H ∈ Ob( I ) Hom I ( H, I ) , which is a small union of small sets. Now define T I to be the full subcategory of R o DI whose set of objects is given by [ ( H,h ) ∈ I /I Image S H R o DH R o DI R o Dh . That is, an object of E I is in the form R o Dh ( C, x ) for some object ( C ∈ C , x ∈ DH ( C ))in S H and some morphism h : H → I of I . The category T I is small, since its set ofobjects is a small union of small sets. Moreover, since we can pick h to be the identity I → I , the category S I is fully embedded into T I , i.e. we have a commutative diagram ofinclusions S I T I R o DI which are all confinal by Lemma 3.8. In particular, if we denote by E I : T I → C thecomposition (or restriction) T I R o DI C , π i we have again that Im( E I ) ∼ = DI .This time, the assignment I T I is functorial. To see this, let i : I → J be a morphismof I , and form the following commutative diagram. T I T J R o DI R o DJ C π I R o Di π J We claim that the restriction of R o Di to the subcategory T I lands in T J . Any object of T I is of the form R o Dh ( C, x ) for some (
C, x ) in S H and some h : H → I of I . We then59ave R o Di (cid:0)R o Dh ( C, x ) (cid:1) = R o D ( i ◦ h ) , ( C, x ) , which lies in T J since i ◦ h : H → J belongs to the slice category I /J . We can thencomplete the diagram to a commutative diagram T I T J R o DI R o DJ C T i π I R o Di π J or equivalently T I T J C T i E I E J The assignment I T I , i T i is a functor I → Cat , and the corresponding assignment I ( T I , E I : E I → C ) gives a functor E : I → Diag ( C ).This functor E : I → Diag ( C ) is the diagram of diagrams that we want. Indeed, Diag (Im)( E ) is given by the postcomposition with the image I Diag ( C ) PC , E Im and we know that for each I of I , Im( E I ) ∼ = DI . To show that Diag (Im)( E ) ∼ = D , andhence conclude the proof, we have to show that the isomorphism Im( E I ) → DI is naturalin I . So let i : I → J be a morphism of I . We have to show that the following diagram of PC commutes, Im( E I ) Im( E J ) DI DJ
Im( E i ) ∼ = ∼ = Di (5.2)where the isomorphisms are the ones given in Proposition 3.4. Diagram (5.2) commutessince the vertices are the colimits of the functors η ◦ E i , η ◦ E J , η ◦ π I and η ◦ π J obtainedby the following commutative diagram of CAT , T I T J R o DI R o DJ C PC E I T i E J π I R o Di π J η (5.3)and the induced maps between their colimits are the arrows of (5.2). Since the square in(5.3) commutes, (5.2) commutes too (by uniqueness of the induced map).We are now finally ready to prove the theorem.60 roof of Theorem 5.10. Since Im is a morphism of monads, the following diagram com-mutes up to natural isomorphism.
Diag ( C ) Diag ( Diag ( C )) Diag ( C ) PC PPC PC Im µ Diag colimIm Im Im µ P k (5.4)In particular, this can be interpreted as “Im, as a morphism of monads, preserves partialevaluations”. With this and the previous lemmas in mind, let’s proceed with the proof. • ( a ) ⇒ ( b ): Consider D : J → C and F : J → K as in (a). By Lemma 5.11there exists a diagram D : H → C together with a confinal functor G : H → J and an opfibration π : H → K with Lan π D ◦ G ∼ = Lan F D . Since G is confinal,by Proposition 3.9 we have that Im( D ◦ G ) ∼ = Im D ∼ = P . Now, by Theorem 5.5,there exists a diagram of diagrams E ∈ Diag ( Diag ( C )) such that µ ( E ) ∼ = D ◦ G and Diag colim( E ) ∼ = Lan π D ◦ G . Chasing diagram (5.4), we see that Im Im( E ) is thedesired partial evaluation between Im( D ◦ G ) ∼ = Im D ∼ = P and Im(Lan π D ◦ G ) ∼ =Im(Lan F D ) ∼ = Q . • ( b ) ⇒ ( a ): Let Φ be a partial evaluation from P to Q . By Lemma 5.12, Im Imis essentially surjective on objects, so that there exists E ∈ Diag ( Diag ( C )) withIm Im( E ) ∼ = Φ. Chasing diagram (5.4), let D = µ ( E ) and D ′ = Diag colim( E ), sothat Im D ∼ = P and Im D ′ ∼ = Q . By Theorem 5.5, D ′ can be written as the pointwiseleft Kan extension of D along a split opfibration. Coends, in particular when they denote weighted colimits, are often considered similar tointegrals in analysis, which is why they are normally denoted by an integral sign. Thecorrespondence can roughly be summarized in terms of monads, by saying that the monad P on CAT behaves similarly to the Giry monad P on the category of (say) measurablespaces [Gir82], and to other probability and measure monads. In particular, • small presheaves on a category are similar to measures on a measurable space; • cocomplete categories (categories where one can take colimits) are similar to algebrasover probability monads (spaces where one can take integrals or expectation values,such as the real line); • in a (sufficiently) cocomplete category C , given a small presheaf P ∈ PC the followingcoend Z X ∈ C P X × X
61s similar to the following integral of a measure p on, say, real numbers, Z R x dp ( x ); • as Kleisli morphisms, (small) profunctors are similar to Markov kernels.An introduction to probability monads, for the interested reader, can be found in [Per18,Chapter 1] as well as in [FP20, Section 6].We now wish to emphasize that Theorem 5.10 adds a further analogy between integralsand coends: just like Kan extensions can be thought of as “partial colimits”, conditionalexpectations can be thought of as “partial expectations”. In particular, we compareTheorem 5.10 to a similar theorem for a probability monad on the category of metricspaces, the Kantorovich monad (see [FP19] as well as the more introductory material in[FP20, Section 6]).The following statement is known ([FP20, Theorem 6.13] or [Per18, Theorem 4.2.14]).
Theorem 5.13.
Let ( A, e ) be a Banach space (an algebra of the Kantorovich monad).Let p, q ∈ P A be Radon probability measures on A of finite first moment. The followingconditions are equivalent: • There exist probability spaces (Ω , µ ) and (Ω ′ , µ ′ ) , random variables f : Ω → A and g : Ω ′ → A with image measures p and q respectively, and a measure-preservingmap m : Ω → Ω ′ such that g is the conditional expectation of f along (the pull-back sigma-algebra induced by) m – as in the following not necessarily commutativediagram: Ω A Ω ′ fm g = E ( f | m ) (5.5) • There is a partial evaluation k ∈ P P A from p to q (for the Kantorovich monad). kp q E P e
The similarity to Theorem 5.10 is evident. One could say intuitively that if coends areanalogous to integrals, Kan extensions are analogous to conditional expectations . The for-mer can be interpreted as partial (weighted) colimits, and the latter as partial (weighted)averages. Notice also that the diagram (5.5) does not commute, but the conditional expec-tation map, just like a Kan extension, can be thought of as the one “making the diagramas close as possible to commuting”. 62t has to be noted that, while we proved Theorem 5.10 by invoking an analogous (butsimpler and stronger) statement for the monad of diagrams, Theorem 5.13 was provendirectly, using measure-theoretic methods. In the statement of the Theorem 5.13 it seemsthat random variables play somewhat the role that diagrams play in Theorem 5.10 (orat least, of diagrams equipped with weights, analogous to the measures on Ω and Ω ′ ).However, currently it is not clear whether random variables, or related structures, mayform a monad analogous to Diag , and on which category such a structure could be found.
A. Some 2-dimensional monad theory
Here we recall some definitions of 2-dimensional monad theory, and spell out explicitlythe definitions that we use in the rest of this work. We also prove a result, Theorem A.7,which extends to pseudomonads the “restriction of scalars” construction. We follow thedefinitions given in [Luc18, Section 2.12]. We refer the interested reader to that article,as well as [Lac00] and [Mar97], for further details.
A.1. Pseudomonads and their morphisms
Definition A.1. A pseudomonad on a strict -category K consists of • a pseudofunctor T : K → K , together with • pseudonatural transformations η : id K ⇒ T and µ : T T ⇒ T , which we call unit and multiplication respectively, and • invertible modifications T T TT ηT id µℓ T T TT
T η id µr T T T T TT T T
T µµT µµa which we call (left and right) unitors and associator, respectively, such that • the following two coherence laws are satisfied, µ ◦ T µ ◦ T ηT µ ◦ µT ◦ T ηTµ ◦ id T Ta ( T ηT ) µ ( c T ℓ ) µ ◦ rT ◦ T µ ◦ T T µµ ◦ µT ◦ T T µ µ ◦ T µ ◦ T µTµ ◦ T µ ◦ µT T µ ◦ µT ◦ T µTµ ◦ µT ◦ µT T a ( T T µ ) µ ( c T a ) µ ( µ µ ) a ( T µT ) a ( µT T ) µ ( aT ) which we call the unit and pentagon condition, respectively, where c T ℓ = υ − ◦ T ℓ ◦ κ , c T a = κ − ◦ T a ◦ κ , and κ and υ are the compositor and unitor, respectively, of thepseudofunctor T . The arrow µ µ is the invertible 3-cell filling the pseudonaturalitysquare of µ along the morphism µ itself, of (2-cell) components T T T T X T T T XT T T X T T X µ TTX µ TX T µ X T T µ X ( µ µ ) X for each object X of K . For some readers it may be easier to interpret the coherence conditions above if weexpress them as 2-dimensional diagrams. In particular, the unit and pentagon conditionscan be expressed as the following commutative cubes, respectively,
T T T T T T TT T T T TT T T
T ηTT ηT id T µT µ µµT µT µµ c T ℓrT = T T T T TT T T T TT T T T T T
T ηTT ηT T ηT T µT µµT µµT µa This name comes from the theory of monoidal categories, where the diagram has the shape of apentagon (in that case, the analogue of µ is strictly natural, and so the arrow corresponding to µ µ isan identity). c T ℓ denotes the following composite cell,
T T TT T T T
T µT ηTT ( µ ◦ ηT ) T id id κT ℓυ − and T T T T T T T T TT T T T TT T T
T T µµT T T µµT µT µµT µµµ µ aa = T T T T T T TT T T T TT T T T T T
T T µµT T T µT T µT µµT µµT µ c T aaT a where c T a denotes the following composite cell.
T T TT T T T T TT T T
T µT T µT µT T ( µ ◦ T µ ) T ( µ ◦ µT ) T µκT aκ − We now give the definition of a morphism of pseudomonads (over the same category).
Definition A.2.
Let K be a strict 2-category. Let ( T, µ, η, ℓ, r, a ) and ( T ′ , µ ′ , η ′ , ℓ ′ , r ′ , a ′ ) be pseudomonads on K . A (pseudo-) morphism of pseudomonads consists of • a pseudonatural transformation λ : T ⇒ T ′ , together with • invertible modifications as follows, id K T T ′ η ′ η λu and T T T ′ T ′ T T ′ λλµ µ ′ λm here we recall that λλ , as in Section 4.6, is shorthand for the following composition, T T T T ′ T ′ T ′ , T λ λT ′ such that • the following diagrams commute, µ ′ ◦ ( η ′ T ′ ) ◦ λ µ ′ ◦ λλ ◦ ηTλ λ ◦ µ ◦ ηT ℓ ′ λ µ ′ [ uT ′ η m ( ηT ) λ ( ℓ ) λ λ ◦ µ ◦ T ηµ ′ ◦ ( T ′ η ′ ) ◦ λ µ ′ ◦ λλ ◦ T η r ′ λ λ ( r ) µ ′ d T uλ m ( T η ) µ ′ ◦ T ′ µ ′ ◦ λλλµ ′ ◦ µ ′ T ′ ◦ λλλ µ ′ ◦ λλ ◦ T µµ ′ ◦ λλ ◦ µT λ ◦ µ ◦ T µλ ◦ µ ◦ µT a ′ ( λλλ ) µ ′ [ T mλµ ′ \ mT ′ µ m ( T µ ) m ( µT ) λa which we call left unitality, right unitality, and associativity conditions, respectively,where – [ uT ′ η denotes ( λT ′ η λ ) ◦ ( uT ′ λ ) , – d T uλ denotes λT ′ ( κ − ◦ T u ) ◦ λ − η ′ , – \ mT ′ µ denotes ( λT ′ µ λ ) ◦ ( mT ′ T T λ ) , and – [ T mλ denotes ( λT ′ ( κ − ◦ T m ◦ κκ )) ◦ ( λ − µ ′ T λT ′ T T λ ) . We can write the coherence conditions 2-dimensionally, as follows. The unitality condi-tions are the following two commutative prisms, T ′ T ′ T ′ T T ′ T id η ′ T ′ µ ′ λ id λ ℓ ′ = T ′ T ′ T ′ T T T T ′ T η ′ T ′ µ ′ ηTλ id λλµ λℓ [ uT ′ η m [ uT ′ η denotes the following composite, T T ′ T T T T ′ T ′ T ′ ληT η ′ T ′ ηT ′ η λ T λ uT ′ λT ′ and T ′ T T ′ T ′ T ′ T T T T ′ η ′ id T η λ µ ′ λλµ λr ′ d T uλ m = T ′ T T ′ T T T id η λ id µ λr where d T uλ denotes the following composite and the unfilled 3-cells are intended to beidentities;
T T ′ T T T T ′ T ′ T ′ λT η T η ′ T ( λ ◦ η ) T ′ η ′ λ − η ′ T λκ − λT ′ T u associativity is the following commutative cube,
T T T T ′ T ′ T ′ T ′ T ′ T T T ′ T ′ T T ′ λλλµT µ ′ T ′ T ′ µ ′ \ mT ′ µ µ ′ a ′ µ λλ µ ′ m λ = T T T T ′ T ′ T ′ T T T ′ T ′ T T T T ′ T µλλλµT T ′ µ ′ [ T mλµ λλa µ ′ mµ λ \ mT ′ µ and [ T mλ denote the following compositions, respectively,
T T T T T T ′ T T ′ T ′ T ′ T ′ T ′ T T T T ′ T ′ T ′ µT T T λ T λT ′ µT ′ µ λ λT ′ T ′ µ ′ T ′ mT ′ T λ λT ′ and T T T T T T ′ T T ′ T ′ T ′ T ′ T ′ T T T T ′ T ′ T ′ T µ T T λ T ( µ ′ ◦ λT ′ ◦ T λ ) T ( T λ ◦ µ ) T λT ′ T µ ′ λT ′ T ′ T ′ µ ′ λ − µ ′ T λ λT ′ κκT mκ − Finally, 2-cells of pseudomonads are defined as follows.
Definition A.3.
Let K be a strict 2-category. Let ( T, µ, η, ℓ, r, a ) and ( T ′ , µ ′ , η ′ , ℓ ′ , r ′ , a ′ ) be pseudomonads on K . Let ( λ, u, m ) and ( ξ, v, n ) be (pseudo)morphisms T → T ′ . A is a modification T T ′ λξ t such that the following diagrams commute, λ ◦ ηη ′ ξ ◦ η t ηuv µ ′ ◦ ( λλ ) λ ◦ µµ ′ ◦ ( ξξ ) ξ ◦ µ mµ ( tt ) t µn which we call “unit” and “multiplication” conditions, respectively. As above, it may be helpful to write the conditions 2-dimensionally. The unit conditionforms the following commutative “cone”,id K T T ′ η ′ η λξ tu = id K T T ′ η ′ η ξv T T T ′ T ′ T T ′ λλµ µ ′ λξm t = T T T ′ T ′ T T ′ λλξξµ µ ′ ξ ttn In line with our usual convention for horizontal composition, tt denotes the following3-cell. T T T T ′ T ′ T ′ T λT λ λT ′ λT ′ T t tT ′ A.2. Pseudoalgebras and their morphisms
Definition A.4.
Let ( T, µ, η, ℓ, r, a ) be a pseudomonad on K . A pseudoalgebra over thepseudomonad T consists of • an object A of K , together with • a morphism e : T A → A , and • invertible 2-cells A T AA id η A ι e and T T A T AT A A µ A T e eγe such that • the following diagrams commute, e ◦ T e ◦ T η A e ◦ µ A ◦ T η A e ◦ id T Aγ ( T η A ) e ( c T ι ) e r A ◦ T e ◦ T T ee ◦ µ A ◦ T T e e ◦ T e ◦ T µ A e ◦ T e ◦ µ T A e ◦ µ A ◦ T µ A e ◦ µ ◦ µ T Aγ ( T T e ) e ( c T γ ) e µ e γ ( T µ A ) γ µ A e a A which we call unit and multiplication conditions, respectively, where c T ι = υ − ◦ T ι ◦ κ ,and c T γ = κ − ◦ T γ ◦ κ .We call the pseudoalgebra normal if the 2-cell ι is the identity. We can write the coherence diagrams 2-dimensionally as well, as follows. Here is theunit condition,
T A T T A T AT T A T AT A A
T ηT η id T eT e eµ µ ee c T ιr = T A T T AT T A T AT T A T A A
T ηT η T η T eT eµ eµ eγ where the unfilled 2-cells are identities, and c T ι denotes the following composite cell,
T T AT A T A
T eT ηT ( e ◦ η ) T id id κT ιυ − T T T A T T A T AT T A T AT A A
T T eµ T eµ eT eµ ee γγµ e = T T T A T T AT T A T AT T A T A A
T T eµ T µ T eT eµ eµ e c T γa γ where c T γ denotes the following composite cell.
T T AT T T A T AT T A
T eT T eT µ T ( e ◦ T e ) T ( e ◦ µ ) T eκT γκ − Definition A.5.
Let ( A, e A , ι A , γ A ) and ( B, e B , ι B , γ B ) be pseudoalgebras over the pseu-domonad ( T, µ, η, ℓ, r, a ) . A (strong) morphism of pseudoalgebras consists of • a morphism f : A → B of K , together with • an invertible 2-cell T A T BA B e A T f e B φf such that • the following diagrams commute, e B ◦ η B ◦ f e B ◦ T f ◦ η A f f ◦ e A ◦ η Aι B e B η f φ η A f ι A e B ◦ T e B ◦ T T fe B ◦ µ B ◦ T T f e B ◦ T f ◦ T e A e B ◦ T f ◦ µ A f ◦ e A ◦ T e A f ◦ e A ◦ µ A e B ( c T φ ) γ B ( T T f ) e B µ f φ ( T e A ) φ µ A f γ A which we call the unit and multiplication condition, respectively, where c T φ = κ − ◦ T φ ◦ κ .
71s above, it may be helpful to draw the coherence conditions in a 2-dimensional way.The unit condition is the following commutative prism,
B T BA BA η id e B ι B f id f = B T BA T A BA ηη f e B φfη id T fe A ι A f where again the unfilled 2-cell is an identity, and the multiplication condition is thefollowing commutative cube, T T A T T B T BT A T BA B µ T T f µ T e B µ f e B γ B T fe A e B φ f = T T A T T BT A T BT A A B
T e A µ T T f T e B c T φ T fe A γ A e B φe A f where c T φ denotes the following composite cell.
T T BT T A T BT T A
T e B T T fT e A T ( e B ◦ T f ) T ( f ◦ e A ) T fκT φκ − Definition A.6.
Let ( A, e A , ι A , γ A ) and ( B, e B , ι B , γ B ) be pseudoalgebras over the pseu-domonad ( T, µ, η, ℓ, r, a ) . Let ( f, φ ) and ( g, χ ) be strong morphisms of pseudoalgebras. A is a 2-cell A B fgα such that the following diagram commutes. e B ◦ T f f ◦ e A e B ◦ T g g ◦ e Aφe B T α α e A χ
72f we draw the condition in a 2-dimensional way, we get the following commutative“cylinder”:
T A T BA B
T fe A e B φ fgα = T A T BA B
T fT ge A e B T αχg
It is immediate from the definitions to check that, given any object X of K , the object T X is canonically a pseudoalgebra, with structure morphism µ X : T T X → T X and 2-cells ℓ X : µ X ◦ η T X ⇒ id T X and a X : µ X ◦ T µ X ⇒ µ X ◦ µ T X . We call this a “free algebra”,analogously to the 1-dimensional case. Moreover, by naturality of µ , for any morphism f : X → Y of K , the morphism T f : T X → T Y gives a morphism of pseudoalgebras.Similarly, for every f, g : X → Y and α : f ⇒ g , the 2-cell T α : T f ⇒ T g is automaticallya 2-cell of algebras.
A.3. Restriction of scalars for pseudomonads
It is very well known that in the one-dimensional context, a morphism of monads inducesa pullback functor between the algebras, sometimes named “restriction of scalars” afterits instance in ring theory [BW83, Theorem 3 in Section 3.6]. A similar phenomenonoccurs in two dimensions, as follows. We use this statement in Section 4.6.1, see therealso for further context.
Theorem A.7.
Let K be a (strict) 2-category. Let ( T, µ, η, ℓ, r, a ) and ( T ′ , µ ′ , η ′ , ℓ ′ , r ′ , a ′ ) be pseudomonads on K , and let ( λ, u, m ) be a pseudomorphism of monads from T to T ′ .Each T ′ -pseudoalgebra ( A, e ′ , ι ′ , γ ′ ) , defines canonically a T -pseudoalgebra structure on A with the following structure 1- and 2-cells. e := T AT ′ AA λ A e ′ ι := T AA T ′ AA λ A id η ′ A η A e ′ u − A ι ′ γ := T T A T T ′ A T AT ′ T ′ A T ′ AT A T ′ A A
T λ A µ A λ T ′ A T e ′ m λ A λ e ′ µ ′ A T ′ e ′ e ′ γ ′ λ A e ′ (A.1) Moreover, this construction defines a 2-functor between the categories of pseudoalgebras λ ∗ : K T ′ → K T . In analogy with the 1-dimensional case, we call λ ∗ the restriction of scalar functor. Proof.
The unit diagram for (
A, e, ι, γ ), obtained by plugging (A.1) into the unit diagramof Definition A.4, can be decomposed in the following way, where the whiskerings have73een suppressed for reasons of space. e ′ ◦ λ A ◦ Te ′ ◦ Tλ A ◦ Tη A e ′ ◦ T ′ e ′ ◦ ( λλ ) A ◦ Tλ A e ′ ◦ µ ′ A ◦ ( λλ ) A ◦ Tλ A e ′ ◦ λ A ◦ µ A ◦ Tη A e ′ ◦ λ A ◦ Te ′ ◦ Tη ′ A e ′ ◦ T ′ e ′ ◦ λ T ′ A ◦ Tη ′ A e ′ ◦ µ ′ A ◦ λ T ′ A ◦ Tη ′ A e ′ ◦ T ′ e ′ ◦ T ′ η ′ A ◦ Tλ A e ′ ◦ µ ′ A ◦ Tη ′ A ◦ λ A e ′ ◦ λ Aγ ′ λ e ′ m A Tu − A ◦ κ Tu − A ◦ κλ e ′ λ η ′ γ ′ Tu − A ◦ κλ η ′ γ ′ r ′ A d T ′ ι ′ A d Tι ′ A r A Now, • the region on the right commutes by the right unit condition of ( λ, u, m ), as inDefinition A.2 (recall that all the arrows of the diagram are invertible); • the triangle in the center bottom is the right unitality condition of the algebra( A, e ′ , ι ′ , γ ′ ), as in Definition A.4; • the region on the bottom left commutes by pseudonaturality of λ ; • finally, the remaining parallelograms commute by the interchange law.The multiplication diagram for ( A, e, ι, γ ), analogously obtained by plugging (A.1) intothe multiplication diagram of Definition A.4, can be decomposed as follows, where againthe whiskerings have been suppressed, and the hat denotes the suitable application of thecompositors. e ′ ◦ λ A ◦ Te ′ ◦ Tλ A ◦ TTe ′ ◦ TTλ A e ′ ◦ Te ′ ◦ ( λλ ) A ◦ TTe ′ ◦ TTλ A e ′ ◦ λ A ◦ Te ′ ◦ TTe ′ ◦ Tλ T ′ A ◦ TTλ A e ′ ◦ µ ′ A ◦ ( λλ ) A ◦ TTe ′ ◦ TTλ A e ′ ◦ Te ′ ◦ λ T ′ A ◦ TTe ′ ◦ Tλ T ′ A ◦ TTλ A e ′ ◦ λ A ◦ Te ′ ◦ Tµ ′ A ◦ Tλ T ′ A ◦ TTλ A e ′ ◦ λ A ◦ µ A ◦ TTe ′ ◦ TTλ A e ′ ◦ µ ′ A ◦ λ T ′ A ◦ TTe ′ ◦ Tλ T ′ A ◦ TTλ A e ′ ◦ λ A ◦ Te ′ ◦ Tλ A ◦ Tµ A e ′ ◦ Te ′ ◦ T ′ T ′ e ◦ ( λλλ ) A e ′ ◦ T ′ e ′ ◦ λ T ′ A ◦ Tµ ′ A ◦ Tλ T ′ A ◦ TTλ A e ′ ◦ µ ′ A ◦ T ′ T ′ e ◦ ( λλλ ) A e ′ ◦ T ′ e ′ ◦ T ′ µ ′ A ◦ ( λλλ ) A e ′ ◦ T ′ e ′ ◦ ( λλ ) A ◦ Tµ A e ′ ◦ µ ′ A ◦ λ T ′ A ◦ Tµ ′ A ◦ Tλ T ′ A ◦ TTλ A e ′ ◦ λ A ◦ Te ′ ◦ µ T ′ A ◦ TTλ A e ′ ◦ T ′ e ′ ◦ µ ′ T ′ A ◦ ( λλλ ) A e ′ ◦ µ ′ A ◦ T ′ µ ′ A ◦ ( λλλ ) A e ′ ◦ µ ′ A ◦ ( λλ ) A ◦ Tµ A e ′ ◦ T ′ e ′ ◦ ( λλ ) A ◦ µ TA e ′ ◦ µ ′ A ◦ µ ′ T ′ A ◦ ( λλλ ) A e ′ ◦ λ A ◦ Te ′ ◦ Tλ a ◦ µ TA e ′ ◦ µ ′ A ◦ ( λλ ) A ◦ µ TA e ′ ◦ λ A ◦ µ A ◦ Tµ A e ′ ◦ T ′ e ′ ◦ ( λλ ) A ◦ µ TA e ′ ◦ µ ′ A ◦ ( λλ ) A ◦ µ TA e ′ ◦ λ A ◦ µ A ◦ µ TAλ e ′ γ ′ m A d Tλ e ′ d Tγ ′ \ Tm A d Tλ e ′ λ e ′ d Tλ e ′ m A γ ′ λ e ′ \ Tm A λ e ′ γ ′ λ µ ′ a ′ A γ ′ λ µ ′ γ ′ µ ′ e ′ γ ′ λ T ′ e ′ γ ′ λ T ′ e ′ d T ′ γ ′ \ Tm A a A γ ′ λ e ′ m A m T ′ A λ e ′ µ λ m T ′ A µ λ γ ′ µ λ µ e ′ • the bottom right region commutes by the associativity condition of ( λ, u, m ), as inDefinition A.2; • the top right hexagon commutes by pseudonaturality of λ ; • the center hexagon commutes by the multiplication condition of the algebra ( A, e ′ , ι ′ , γ ′ ),as in Definition A.4; • the top left hexagon commutes by the modification property for m ; • all the remaining parallelograms commute by the interchange law.Therefore, ( A, e, ι, γ ) is a T -pseudoalgebra.For functoriality, consider now T ′ -pseudoalgebras ( A, e ′ A , ι ′ A , γ ′ A ) and ( B, e ′ B , ι ′ B , γ ′ B ), anda morphism of T ′ -pseudoalgebras ( f, φ ) from A to B . The composite 2-cell T A T BT ′ A T ′ BA B
T fλ A λ B λ f T ′ fe ′ A e ′ B φf makes f a morphism between the T -pseudoalgebra structures defined above. Indeed, theunit condition, obtained by plugging (A.1) into Definition A.5, can be decomposed asfollows, again omitting the whiskering. e ′ B ◦ λ B ◦ η B ◦ f e ′ B ◦ λ B ◦ T f ◦ η A e ′ B ◦ η ′ B ◦ f e ′ B ◦ T ′ f ◦ η ′ A e ′ B ◦ T ′ f ◦ λ A ◦ η A f f ◦ e ′ A ◦ η ′ A f ◦ e ′ A ◦ λ A ◦ η Au − B ι ′ B ι ′ A u − A λ f φη f u − A φη ′ f Now • the top region commutes by the modification property for u ; • the bottom left rectangle commutes by the unit condition for ( f, φ ) as in Defini-tion A.5; • the bottom right rectangle commutes by the interchange law.75imilarly, the multiplication condition can be decomposed as follows, where again thewhiskerings are omitted. e ′ B ◦ λ B ◦ T e ′ B ◦ T λ B ◦ T T fe ′ B ◦ T ′ e ′ B ◦ ( λλ ) B ◦ T T f e ′ B ◦ λ B ◦ T e ′ B ◦ T T ′ f ◦ T λ A e ′ B ◦ µ ′ B ◦ ( λλ ) B ◦ T T f e ′ B ◦ T ′ e ′ B ◦ λ T ′ B ◦ T T ′ f ◦ T λ A e ′ B ◦ λ B ◦ T f ◦ T e ′ A ◦ T λ A e ′ B ◦ λ B ◦ µ B ◦ T T f e ′ B ◦ µ ′ B ◦ λ T ′ B ◦ T T ′ f ◦ T λ A e ′ B ◦ T ′ e ′ B ◦ T ′ T ′ f ◦ ( λλ ) A e ′ B ◦ T ′ f ◦ λ A ◦ T e ′ A ◦ T λ A e ′ B ◦ µ ′ B ◦ T ′ T ′ f ◦ ( λλ ) A e ′ B ◦ T f ◦ T ′ e ′ A ◦ ( λλ ) A f ◦ e ′ A ◦ λ A ◦ T e ′ A ◦ T λ A e ′ B ◦ λ B ◦ T f e ′ B ◦ T ′ f ◦ µ ′ A ◦ ( λλ ) A f ◦ e ′ A ◦ T ′ e ′ A ◦ ( λλ ) A e ′ B ◦ T ′ f ◦ λ A ◦ µ A f ◦ e ′ A ◦ µ ′ A ◦ ( λλ ) A f ◦ e ′ A ◦ λ A ◦ µ A d Tλ f c Tφ φλ e ′ A γ ′ A λ f m A λ e ′ B γ ′ B m B µ f λ f φ d Tλ f λ f µ ′ f m A d Tλ f γ ′ B λ f γ ′ B φ d T ′ φ φλ e ′ B λ e ′ A Now, • the region on the far left commutes by the modification property for m ; • the hexagon on the bottom commutes by the multiplication condition for ( f, φ ) asin Definition A.5; • the hexagon on the top right commutes by pseudonaturality of λ ; • all the remaining parallelograms commute by the interchange law.This makes ( f, φ λ ) a pseudomorphism of T -pseudoalgebras.Finally, to prove 2-functoriality, let ( f, φ ) and ( g, χ ) be pseudomorphisms of T ′ -pseudoalgebras A → B , and let α : f ⇒ g be a 2-cell of T ′ -pseudoalgebras. We have that α is canoni-cally also a 2-cell of T -pseudoalgebras, since the relevant diagram can be decomposed asfollows, e ′ B ◦ λ B ◦ T f e ′ B ◦ T ′ f ◦ λ A f ◦ e ′ A ◦ λ A e ′ B ◦ λ B ◦ T g e ′ B ◦ T ′ g ◦ λ A g ◦ e ′ A ◦ λ AT α λ f φT ′ α αλ g χ again omitting the whiskerings, and now 76 the left square commutes by pseudonaturality of λ ; • the right square commutes since α is a 2-cell of pseudoalgebras, as in Definition A.6.This action on pseudoalgebras, their morphisms and their 2-cells defines then a 2-functorfrom the 2-category of T ′ -pseudoalgebras to the 2-category of T -pseudoalgebras (noticethe direction).We encourage the readers more familiar with 2-dimensional diagrams to rewrite theproof using 2-cells and, for clarity, we suggest to dedicate one direction in each diagramto the transformation λ . References [Bor94] Francis Borceux.
Handbook of Categorical Algebra I . Cambridge UniversityPress, 1994 (cit. on pp. 33, 34).[Bou74] Nicholas Bourbaki.
Algebra I . Hermann, 1974 (cit. on p. 50).[BW83] Michael Barr and Charles Wells.
Toposes, triples, and theories . Grundlehrender mathematischen Wissenschaften 278. Springer, 1983 (cit. on pp. 50, 73).[Con+20] Carmen Constantin, Tobias Fritz, Paolo Perrone, and Brandon Shapiro. “Par-tial evaluations and the compositional structure of the bar construction”.arXiv:2009.07302. 2020 (cit. on pp. 51, 52).[CS02] Wojciech Chach´olski and J´erˆome Scherer. “Homotopy theory of diagrams”. In:
Memoirs of the American Mathematical Society
736 (2002) (cit. on p. 23).[DL07] Brian J. Day and Stephen Lack. “Limits of small functors”. In:
Journal ofPure and Applied Algebra
210 (3 2007), pp. 651–663 (cit. on pp. 39, 48).[FP19] Tobias Fritz and Paolo Perrone. “A probability monad as the colimit of spacesof finite samples”. In:
Theory and Applications of Categories
Proceedings of MFPS 36, ENTCS (2020) (cit. on pp. 3, 51, 52, 62).[Gir82] Mich`ele Giry. “A categorical approach to probability theory”. In:
LectureNotes in Mathematics 915: Categorical Aspects of Topology and Analysis . Springer,1982, pp. 68–85. doi : (cit. on p. 61).[GU71] Peter Gabriel and Friedrich Ulmer. Lokal pr¨asentierbare Kategorien . LectureNotes in Mathematics 221. Springer, 1971 (cit. on p. 33).[Gui73] Ren´e Guitart. “Sur le foncteur diagramme”. In:
Cahiers de topologie et g´eom´etriediff´erentielle cat´egoriques
Grundz¨uge der Mengenlehre . Veit & comp., Leipzig, 1914 (cit.on p. 33).[Isb60] John R Isbell. “Adequate subcategories”. In:
Illinois Journal of Mathematics
Basic concepts in enriched category theory . Available at Reprintsin TAC, No. 10, 2005. Cambridge University Press, 1982 (cit. on pp. 40, 48).[Lac00] Stephen Lack. “A coherent approach to pseudomonads”. In:
Advances inMathematics
52 (2000), pp. 179–202 (cit. on p. 63).[Lam66] Joachim Lambek.
Completions of Categories . Lecture Notes in Mathematics24. Springer, 1966 (cit. on p. 39).[Lor15] Fosco Loregian. “Coend calculus”. arXiv:1501.02503. 2015 (cit. on p. 40).[Luc18] Fernando Lucatelli Nunes. “Pseudo-Kan extensions and descent theory”. In:
Theory and Applications of Categories
Categories for the Working Mathematician (Second Edi-tion) . Springer, 1998 (cit. on pp. 3, 40).[Mar97] Francisco Marmolejo. “Doctrines whose structures forms a fully faithful ad-joint string”. In:
Theory and Applications of Categories
Journal of Algebra
19 (1 1971),pp. 80–95 (cit. on pp. 37, 38).[Per18] Paolo Perrone. “Categorical Probability and Stochastic Dominance in Met-ric Spaces”. Available at http://paoloperrone.org/phdthesis.pdf. PhD thesis.University of Leipzig, 2018 (cit. on pp. 51, 62).[PT20] George Peschke and Walter Tholen. “Diagrams, Fibrations, and the Decom-position of Colimits”. arXiv:2006.10890. 2020 (cit. on pp. 7, 23, 29, 54).[Rie14] Emily Riehl.
Categorical Homotopy Theory . Cambridge University Press, 2014(cit. on p. 3).[SW73] Ross Street and Robert F. C. Walters. “The comprehensive factorization of afunctor”. In:
Bulletin of the American Mathematical Society