{'fraction_non_alphanumeric': 0.04701277297074578, 'fraction_numerical': 0.007780524653206977, 'mean_word_length': 3.933796374724716, 'pattern_counts': {'":': 3, '<': 3, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 30, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A 2-categories companion

This paper is a rather informal guide to some of the basic theory of 2-categories and bicategories, including notions of limit and colimit, 2-dimensional universal algebra, formal category theory, and nerves of bicategories. As is the way of these things, the choice of topics is somewhat personal. No attempt is made at either rigour or completeness. Nor is it completely introductory: you will not find a definition of bicategory; but then nor will you really need one to read it. In keeping with the philosophy of category theory, the morphisms between bicategories play more of a role than the bicategories themselves.


Overview and basic examples
This paper is a rather informal guide to some of the basic theory of 2-categories and bicategories, including notions of limit and colimit, 2-dimensional universal algebra, formal category theory, and nerves of bicategories. As is the way of these things, the choice of topics is somewhat personal. No attempt is made at either rigour or completeness. Nor is it completely introductory: you will not find a definition of bicategory; but then nor will you really need one to read it. In keeping with the philosophy of category theory, the morphisms between bicategories play more of a role than the bicategories themselves.
1.1. The key players. There are bicategories, 2-categories, and Cat-categories. The latter two are exactly the same (except that strictly speaking a Cat-category should have small hom-categories, but that need not concern us here). The first two are nominally different -the 2-categories are the strict bicategories, and not every bicategory is strict -but every bicategory is biequivalent to a strict one, and biequivalence is the right general notion of equivalence for bicategories and for 2-categories. Nonetheless, the theories of bicategories, 2-categories, and Catcategories have rather different flavours.
An enriched category is a category in which the hom-functors take their values not in Set, but in some other category V . The theory of enriched categories is now very well developed, and Cat-category theory is the special case where V = Cat. In Cat-category theory one deals with higher-dimensional versions of the usual notions of functor, limit, monad, and so on, without any "weakening". The passage from category theory to Cat-category theory is well understood; unfortunately Catcategory theory is generally not what one wants to do -it is too strict, and fails to deal with the notions that arise in practice.
In bicategory theory all of these notions are weakened. One never says that arrows are equal, only isomorphic, or even sometimes only that there is a comparison 2-cell between them. If one wishes to generalize a result about categories to bicategories, it is generally clear in principle what should be done, but the details can be technically very difficult.
2-category theory is a "middle way" between Cat-category theory and bicategory theory. It uses enriched category theory, but not in the simple minded way The support of the Australian Research Council and DETYA is gratefully acknowledged.
of Cat-category theory; and it cuts through some of the technical nightmares of bicategories. The prefix "2-", as in 2-functor or 2-limit, will always denote the strict notion; although often we will use it to describe or analyze non-strict phenomena.
There are also various other related notions, which will be less important in this companion. SSet-categories are categories enriched in simplicial sets; every 2category induces an SSet-category, by taking nerves of the hom-categories. Double categories are internal categories in Cat. Once again every 2-category can be seen as a double category. A slight generalization of double categories allows bicategories to fit into this picture. Finally there are the internal categories in SSet; both SSetcategories and double categories can be seen as special cases of these.
1.2. Nomenclature and symbols. In keeping with our general policy, the word 2-functor is understood in the strict sense: a 2-functor between 2-categories A and B assigns objects to objects, morphisms to morphisms, and 2-cells to 2-cells, preserving all of the 2-category structure strictly. We shall of course want to consider more general types of morphism between 2-categories later on.
If "widget" is the name of some particular categorical structure, then there are various systems of nomenclature for weak 2-widgets. Typically one speaks of pseudo widgets for the up-to-isomorphism notion, lax widgets for the up-to-not-necessarilyinvertible comparison notion, and when the direction of the comparison is reversed, either oplax widget or colax widget, depending on the specific case. But there are also other conventions. In contexts where the pseudo notion is most important, this is called simply a widget, and then one speaks explicitly of strict widgets in the strict case. In contexts where the lax notion is most important (such as with monoidal functors), it is this which has no prefix; and one has strict widgets in the strict case or strong widgets in the pseudo.
As we move up to 2-categories and higher categories, there are various notions of sameness, having the following symbols: • = is equality • ∼ = is isomorphism (morphisms f and g with gf = 1, f g = 1) • ≃ is equivalence (gf ∼ = 1, f g ∼ = 1) • ∼ is sometimes used for biequivalence.
In Sections 1.4 and 1.5 we look at various examples of 2-categories and bicategories. The separation between the 2-category examples and the bicategory examples is not really about strictness but about the sort of morphisms involved. The 2-category examples involve functions or functors of some sort; the bicategory examples (except the case of a monoidal category) involve more general types of morphism such as relations. These "non-functional" morphisms are often depicted using a slashed arrow ( → ) rather than an ordinary one (→). Typically the functional morphisms can be seen as a special case of the non-functional ones. Sometimes it is also possible to characterize the non-functional ones as a special type of functional morphism (with different domain and/or codomain), and this can provide a concrete construction of a 2-category biequivalent to the given bicategory. The other special type of arrow often used is a "wobbly" one ( ); this denotes a weak (pseudo, lax, etc.) morphism.

Contents.
In the remainder of this section we look at examples of 2-categories and bicategories. In Section 2 we begin the study of formal category theory, including adjunctions, extensions, and monads, but stopping short of the full-blown formal theory of monads. In Section 3 we look at various types of morphism between bicategories or 2-categories: strict, pseudo, lax, partial; and see how these can be used to describe enriched and indexed categories. In Section 4 we begin the study of 2-dimensional universal algebra, with the basic definitions and the construction of weak morphism classifiers. This is continued in Section 5 on presentations for 2-monads, which demonstrates how various categorical structures can be described using 2-monads. Section 6 looks at various 2-categorical and bicategorical notions of limit and considers their existence in the 2-categories of algebras for 2-monads. Section 7 is about aspects of Quillen model structures related to 2-categories and to 2-monads. In Section 8 we return to the formal theory of monads, applying some of the earlier material on limits. Section 9 looks at the formal theory of pseudomonads, developed in a Gray-category. Section 10 looks at notions of nerve for bicategories. There are relatively few references throughout the text, but at the end of each section there is a brief commented bibliography. 1.4. Examples of 2-categories. Cat is the mother of all 2-categories, just as Set is the mother of all categories. From many points of view, it has all the best properties as a 2-category (but not as a category: for example colimits in Cat are not stable under pullback).
A small category involves a set of objects and a set of arrows, and also hom-sets between any two objects. One can generalize the notion of category in various ways by replacing various of these sets by objects of some other category.
(a) If V is a monoidal category one can consider the 2-category V -Cat of categories enriched in V ; these have V -valued hom-objects rather than hom-sets. The theory works best when V is symmetric monoidal closed, complete, and cocomplete.
As for examples of enriched categories, one has ordinary categories (V = Set), additive categories (V = Ab), 2-categories (V = Cat), preorders (V = 2, the "arrow category"), simplicially enriched categories (V = SSet), and DG-categories (V the category of chain complexes). (b) More generally still, one can consider a bicategory W as a many-object version of a monoidal category; there is a corresponding notion of W -enriched category: see [5] or Section 3.1. Sheaves on a site can be described as W -categories for a suitable choice of W . (c) If E is a category with finite limits, one can consider the 2-category Cat(E) of categories internal to E; these have an E-object of objects and an E-object of morphisms. The theory works better the better the category E; the cases of a topos or an abelian category are particularly nice. This includes ordinary categories (E = Set), double categories (E = Cat), morphisms of abelian groups (E = Ab), and crossed modules (E = Grp).
There is another class of examples, in which the objects are "categories with structure". The structure could be something like (d) category with finite products (e) category with finite limits (f) monoidal category (g) topos (h) category with finite products and coproducts and a distributive law For most of these there are also analogues involving enriched or internal categories with the relevant structure.
In each case you need to decide which morphisms to use. Normally you don't want the strictly algebraic ones (preserving the structure on the nose): although they can be technically useful, they are rare in nature. More common are the "pseudo" morphisms: these are functors preserving the structure "up to (suitably coherent) isomorphism". In (e), for example, this would correspond to the usual notion of finite-limit-preserving functor.
Sometimes, however, it's good to consider an even weaker notion of morphism, as in the 2-category MonCat of monoidal categories, monoidal functors, and monoidal natural transformations. Monoidal functors are the "lax" notion, involving maps F A ⊗ F B → F (A ⊗ B), coherent, but not necessarily invertible. Here are some reasons you might like this level of generality: • Consider the monoidal categories Ab of abelian groups, with the usual tensor product, and Set of sets, with the cartesian product. The forgetful functor U from Ab to Set definitely does not preserve this structure, but we have the universal bilinear map U G × U H → U (G ⊗ H), and this makes U into a monoidal functor. • A monoidal functor V → W sends monoids in V to monoids in W , via the rule • Suppose V and W are monoidal categories and F : V → W is a left adjoint which does preserve the monoidal structure up to coherent isomorphism. There is no reason why the right adjoint U should do so, but there will be induced comparison maps U A ⊗ U B → U (A ⊗ B) making U a monoidal functor. (Think of the tensor product as a type of colimit, so the left adjoint preserves it, but the right adjoint doesn't necessarily.) In fact the monoidal functor U : Ab → Set arises in this way.
The case of monoidal categories is typical. Given an adjunction F ⊣ U between categories A and B with algebraic structure, to make the right adjoint U a colax morphism is equivalent to making the left adjoint F lax, while if the whole adjunction lives within the world of lax morphisms, then F is not just lax but pseudo. This phenomenon is called doctrinal adjunction [21].
For a further example, consider the structure of categories with finite coproducts. For a functor F : A → B between categories with finite coproducts there are canonical comparison maps F A + F B → F (A + B), and these make every such functor uniquely into a lax morphism; it is a pseudo morphism exactly when it preserves the coproducts in the usual sense. Thus in this case every adjunction between categories with finite coproducts lives in the lax world, and the fact that the left adjoint is actually pseudo reduces to the well known fact that left adjoints preserve coproducts.
In the case of categories with finite products or finite limits, however, the lax morphisms are the same as the pseudo morphisms; they are just the functors preserving the products or limits in the usual sense. 1.5. Examples of bicategories. Any monoidal category V determines a oneobject bicategory ΣV whose morphisms are the objects of V , and whose 2-cells are the morphisms of V . The tensor product of V is the (horizontal) composition in ΣV .
(i) Rel consists of sets and relations. The objects are sets and the morphisms X → Y are the relations from X to Y ; that is, the monomorphisms R X ×Y . This bicategory is 'locally posetal', in the sense that for any two parallel 1-cells, there is at most one 2-cell between them. There is a 2-cell from R to S if and only if R is contained in S as a subobject of X × Y ; in other words, if there is a morphism R → S making the triangles in R y y t t t t t t 7 7 t t t t t t X Y S e e t t t t t t X X t t t t t t commute. As usual, xRy means that (x, y) ∈ R. The composite of R X × Y and S Y × Z is the relation R • S defined by x(R • S)z ⇐⇒ (∃y)xRySz.
We get a 2-category biequivalent to this one by identifying isomorphic 1-cells; this works for any locally posetal 2-category. Another 2-category biequivalent to Rel has sets for objects, and as morphisms from X to Y the join-preserving maps from PX to PY , where PX denotes the set of all subsets of X. Here a relation R is represented by the function sending a subset U ⊂ X to {y ∈ Y : (∃x ∈ U )xRy}. (j) Par consists of sets and partial functions. A partial function from X to Y is a diagram X D → Y in Set, where D is the domain of definition of the partial function; 2-cells and composition are defined as in Rel. Again, we get a biequivalent 2-category by identifying isomorphic 1-cells. Alternatively, this is biequivalent to the 2-category of pointed sets and basepoint-preserving maps, with suitably defined (exercise!) 2-cells. (k) Span consists of sets and "spans" X ← E → Y in Set, with composition by pullback, and with 2-cells given by diagrams such as E y y t t t t t t

t t t t t
Unlike the previous two bicategories, this one is no longer locally posetal, so to get a biequivalent 2-category we need to do more than just identify isomorphic 1-cells. There are general results asserting that any bicategory is biequivalent to a 2-category, but in fact naturally occurring bicategories tend to be biequivalent to naturally occurring 2-categories. In this case, we can take the 2-category whose objects are sets and whose morphisms are the left adjoints Set/X → Set/Y . Here the span given by pulling back along u then composing with v. (l) Mat has sets as objects, X × Y -indexed families ("matrices") of sets as morphisms from X to Y , and 2-cells are families of functions. Composition of 1-cells is given by matrix multiplication: if A = (A xy ) and B = (B yz ) then This is biequivalent to Span, but we'll see below that spans and matrices become different when we start to consider enrichment and internalization. A biequivalent 2-category consists of sets and left adjoints Set X → Set Y . (Here X × Y → Set can be seen as a functor X → Set Y , and so, since Set X is the free cocompletion of X, as a left adjoint Set X → Set Y .) This is really just the same as the construction given for Span, since Set/X ≃ Set X ; once again, though, when we start to enrich or internalize, the two pictures diverge. (m) Mod has rings as objects, left R-, right S-modules as 1-cells R → S, and homomorphisms as 2-cells. The composite of modules R → S and S → T is given by tensoring over S. A biequivalent 2-category involves adjunctions R-Mod ⇄ S-Mod. A ring is the same thing as an Ab-category (a category enriched in abelian groups) with only one object. The underlying additive group of the ring is the single hom-object; the multiplication of the ring is the composition. If we identify rings with the corresponding one-object Ab-categories, then a module R → S becomes an Ab-functor R → [S op , Ab] But there is no reason to restrict ourselves to one-object categories, and there is a bicategory Ab-Mod whose objects are Ab-categories, and whose 1-cells are Ab-modules A → B; that is, Ab-functors A → [B op , Ab].
More generally still, we can replace Ab by any monoidal category V with coequalizers which are preserved by tensoring on either side, and there is then a bicategory V -Mod of V -categories and V -modules: once again, if A and B are V -categories then a There's even, if you really want, a version with a bicategory W rather than a monoidal category V . Now let's internalize and enrich the other examples. (n) If E is a regular category, meaning that any morphism factorizes as a strong epimorphism followed by a monomorphism, and the strong epimorphisms are stable under pullback, then we can form Rel(E) whose objects are those of E and whose morphisms X → Y are monomorphisms R X × Y . To compose R : X → Y and S : Y → Z we pullback over Y , but the resulting map into X ×Z need not be monic, so we need the factorization system to define composition. It turns out that our assumption that strong epimorphisms are stable under pullback is precisely what is needed for this composition to be associative. (o) Similarly, if C is a category and M is a class of monomorphisms in C , then we can look at Par(C , M), defined as above where the given monomorphism is in M. There are conditions on M you need to make this work well: you want to be able to pullback an M-map by an arbitrary map and obtain an M-map, and you want M to be closed under composition and to contain the isomorphisms. (p) If E has finite limits, we can look at Span(E) defined in an obvious way. You need the pullbacks for composition to work. You don't need any exactness properties to get a bicategory, but if you want to get a nice biequivalent 2category, you'll need to start making more assumptions on E. It turns out that Span(E) plays a crucial role in internal category: we shall see in Example 2.7 below that an internal category in E is the same thing as a monad in Span(E). (q) Mat, on the other hand, gets enriched rather than internalized. Then V -Mat has sets as objects and V -valued matrices X × Y → V as morphisms. V -Mat stands in exactly the same relationship to V -categories as Span(E) does to categories in E . In the case V = Set of course V -Mat is just Mat, but there is also another special case which we have already seen. Let V be the arrowcategory 2, consisting of two objects 0 and 1, and a single non-identity arrow 0 → 1. This is cartesian closed (a V -category in this case is just a preorder) and V -Mat in this case is Rel (we identify a subject of X ×Y with its characteristic function, seen as landing in 2).
1.6. Duality. A bicategory B has not one but three duals: • B op is obtained by reversing the 1-cells • B co is obtained by reversing the 2-cells • B coop is obtained by reversing both In the case of a monoidal category V , we can form the monoidal category V op by reversing the sense of the morphisms; this reverses the 2-cells of the corresponding bicategory ΣV , so Σ(V op ) = (ΣV ) co . Reversing the 1-cells of ΣV corresponds to reversing the tensor of V , denoted V rev , so Σ(V rev ) = (ΣV ) op .
Categories enriched in a bicategory were first defined by Walters to deal with the example of sheaves on a space (or site) [61,62]. A good general reference is [5].
The importance of monoidal functors (not necessarily strong) was observed both by Eilenberg-Kelly [14] and by Bénabou [4].

Formal category theory
One point of view is that a 2-category is a generalized category (add 2-cells). Another important one is that an object of a 2-category is a generalized category (since Cat is the primordial 2-category). This is "formal category theory": think of a 2-category as a collection of category-like things.
You don't capture all of V -category theory by thinking of V -categories as objects of V -Cat, just as you don't capture all of group theory by thinking of groups as objects of Grp, but many things do work out well when we take this "elementfree" approach. In formal category theory you tend to avoid talking about objects of a category, instead talking about morphisms (functors) into the category. Thus morphisms become generalized objects (of their codomain) in exactly the same way that morphisms in categories are generalized elements.
One of the starting points of formal category theory was Street's beautiful work on the "formal theory of monads". This was motivated by the desire to develop a uniform approach to universal algebra for enriched and internal categories. It uses all four dualities to incredible effect.
2.1. Adjunctions and equivalences. We start here with the notion of adjunction in a 2-category (in other words, adjunction between objects of a 2-category -this is not to be confused with adjunctions between 2-categories). In ordinary category theory there are two main ways to say that a functor f : A → B is left adjoint to u : B → A. First there is the local approach, consisting of a bijection between hom-sets B(f a, b) ∼ = A(a, ub) for each object a ∈ A and b ∈ B, natural in both a and b. Alternatively, there is the global approach, involving natural transformations η : 1 A → uf and ε : f u → 1 B satisfying the usual triangle equations. Each can be generalized to the 2-categorical setting.
Let K be a 2-category. Everything I'm going to say works for bicategories, but let's keep things simple; of course you can always replace a bicategory by a biequivalent 2-category anyway.
An adjunction in K consists of 1-cells f : A → B and u : B → A, and 2-cells η : 1 A → uf and ε : f u → 1 B satisfying the triangle equations. This is exactly the global approach to ordinary adjunctions, with functors replaced by 1-cells, and natural transformations by 2-cells. In a lot of 2-categories, this is a good thing to study. We mentioned above the case MonCat. The study of adjunctions in Mod is called Morita theory: it involves adjunctions and equivalences between categories of the form R-Mod for a ring R.
In the case where η and ε are invertible, we have not just an adjunction but an adjoint equivalence.
The local approach to adjunctions also works well here, provided that one uses generalized objects rather than objects. For any 1-cells a : X → A and b : X → B, there is a bijection between 2-cells f a → b and 2-cells a → ub. One now has naturality with respect to both 1-cells x : Y → X, and 2-cells a → a ′ or b → b ′ . This local-global correspondence can be proved more or less as in the usual case, or it can be deduced from the usual case using a suitable version of the Yoneda lemma. In fact the global-to-local part follows from the easy fact that 2-functors preserve adjunctions, so that the representable 2-functors K (X, −) send the adjunction f ⊣ u in K to an adjunction K (X, f ) ⊣ K (X, u) in Cat, between K (X, A) and K (X, B), and so the usual properties of adjunctions give the correspondence between f a = K (X, f )a → b and a → K (X, u)b = ub.
The contravariant representable functors K (−, X) : K op → Cat also preserve adjunctions. This prepares you for: Show that for any equivalence f these data can be chosen so as to give an adjoint equivalence. Hint: you can keep the same f and g; you'll need to change at most one of the isomorphisms.
Considering an adjunction f ⊣ u in K as an adjunction in K op , and using the local approach, we see that to give a 2-cell s → tf is the same as to give a 2-cell su → t. Even in the case K = Cat this is not as well known as it should be.
More generally, given a pair of adjunctions f ⊣ u and f ′ ⊣ u ′ , we have bijections These pairs of 2-cells are called mates. To pass between α and β one pastes with the unit and counit: Let K be a 2-category. What is the universal solution to extending f along j?
Such a universal solution is denoted lan j f ; by universal we mean that it induces a bijection f −→ gj lan j f −→ g for any g : B → C. When such a lan j f exists in K , it is called a left extension of f along j.
A colimit is called absolute if it is preserved by any functor; similarly we say that the left extension lan j f is absolute if composing with any h : C → D gives another extension, so that hlan j f = lan j (hf ).
Consider the case K = Cat. There would be such a bijection if lan j f were the left Kan extension Lan j f of f along j, as indeed the notation is supposed to suggest. In the case of (pointwise) left Kan extensions, we have a coend formula Alternatively the right hand side can be expressed using colimits: given b we can form the comma category j/b, with pairs (a ∈ A, ja → b) as objects, and the canonical functor d : j/b → A, then the coend on the right hand side is (canonically isomorphic to) the colimit of f d : j/b → C.
Kan extensions which are not 'pointwise' -in other words, which don't satisfy this formula -can exist if C is not cocomplete, but should be regarded as somewhat pathological.
How might we express this formula so that it makes sense in an arbitrary 2category? Once again, the answer will involve generalized objects. Staying for a moment in the case of Cat, consider an object b ∈ B as a morphism b : 1 → B, and then consider the diagram the colimit of f d, as we saw, but the colimit of f d is itself isomorphic to the left Kan extension of f d along the unique map j/b → 1. A careful calculation of the isomorphisms involved reveals that the coend formula amounts to the assertion that the diagram above is a left extension. This motivates the definition of pointwise extension in a general 2-category K with comma objects. We say that the left extension lan j f is pointwise if, for any b : X → B, when we form the comma object the 2-cell This agrees with the usual definition in the case K = Cat, works perfectly in the case of Cat(E), and captures many but not all features in V -Cat. The problem is that for V -categories A and B, the (V -)functor category [A, B] should really be regarded as a V -category, but the 2-category V -Cat can't see this extra structure. There are ways around this if B is sufficiently complete or cocomplete.
Let's leave the pointwise aspect aside and go back to extensions.
• A left extension in K co (reverse the 2-cells) is called a right extension.
• A left extension in K op (reverse the 1-cells) is called a left lifting.
• A left extension in K coop (reverse both) is called a right lifting.
The right lifting r : a −→ r which is a sort of internal-hom; indeed, in the one-object case, where the composite f a is given by tensoring, it really is an internal hom. Some people use the notation r = f \ b for this lifting.
A special case is adjunctions. Given f ⊣ u : B → A, we have a bijection f a −→ b a −→ ub and so ub = f \ b is the right lifting of b through f . In particular, u is the right lifting of the identity 1 B through f . Conversely, a right lifting u of the identity through f is a right adjoint if and only if it is absolute; in other words, if ub is the right lifting of b through f for all b : Dually, given an adjunction f ⊣ u : B → A we have a bijection xu −→ y x −→ yf and so yf = ran u y and f = ran u 1 B ; while in general a right extension f = ran u 1 B of the identity is a left adjoint of u if and only if it is absolute. A bicategory is said to be closed if it has right extensions and right liftings. In the one-object case, this means that the endofunctors − ⊗ c and c ⊗ − of the monoidal category have right adjoints for any object c.
We saw that pointwise left extensions in Cat are given by colimits. Thus the existence of left extensions is some kind of internal cocompleteness condition. So in 2-categories like Cat(E) or V -Cat they will exist only in some cases. In bicategories like V -Mod, on the other hand, all extensions exist (provided that V is itself complete and cocomplete).
Let me point out a little lemma which everyone knows for Cat, but which is true for 2-categories basically because everything is representable. A morphism f : A → B in a 2-category K is said to be representably fully faithful if K (X, f ) : is a fully faithful functor for all objects X of K . For K = Cat this is equivalent to f being fully faithful. Lemma 2.3. Let f ⊣ u be an adjunction in a 2-category K for which the unit η : 1 → uf is invertible. Then f is representably fully faithful.
Similarly, under the same hypotheses, u will be (representably) "co-fully-faithful", in the sense that each K (u, X) : K (B, X) → K (A, X) is fully faithful.

2.3.
Monads. Just as in ordinary category theory, an adjunction f ⊣ u : B → A in a 2-category induces a 1-cell t = uf , with 2-cells η : 1 → uf = t, given by the unit of the adjunction, and a multiplication µ = uεf : where ε : f u → 1 is the counit. This η and µ make t into a monoid in the monoidal category K (A, A).
More generally, a monad in a 2-category K on an object A ∈ K consists of a 1-cell t : A → A equipped with 2-cells η : 1 → t and µ : t 2 → t satisfying the usual (associative and identity) equations; the situation of the previous paragraph is a special case. One often speaks simply of a monad (A, t), when η and µ are understood.
The case K = Cat is just the usual notion of monad on a category A. (This is sometimes called a monad in A, but this usage is to be avoided: it is in K and on A.)  [47]).
Example 2.5. Monads in the one-object 2-category ΣV are monoids in the strict monoidal category V . Conversely, a monad in an arbitrary 2-category K , on an object X of K , is a monoid in the (strict) monoidal category K (X, X). There are analogous facts for bicategories and (not necessarily strict) monoidal categories.
Example 2.6. Monads in Rel. We have a set E 0 ; a relation t : E 0 → E 0 , in the form of a subset R of E 0 × E 0 ; the "identity" 1 → t amounts to the assertion that the relation R is reflexive, and the multiplication to the fact that R is transitive. The associative and unit laws are automatic.
Example 2.7. Monads in Span(E). We have an object E 0 , a 1-cell t : from the object of composable pairs to the object of morphisms, giving a composite; associativity of the monad multiplication is precisely associativity of the composition. Similarly the unit 1 η −→ t gives E 0 → E 1 since the identity span is and the unit laws for the monad are precisely the identity laws for the internal category. Thus a monad in Span(E) is the same as an internal category in E . This is one of the main reasons for considering the span construction.
Example 2.8. Monads in V -Mat. We have an object X, which is just a set, a 1cell X → X, in the form of a matrix X ×X → V , which we think of as sending (x, y) to a hom-object C (x, y). The multiplication map goes from the matrix product, as in and gives a composition map. Once again the associative and identity laws for the composition are precisely the associative and unit laws for the monad, and we see that a monad in V -Mat is the same as a category enriched in V .
In the special case V = 2 we have V -Mat = Rel, and so we recover the observation, made in Example (q) above, that a category enriched in 2 is just a preorder (a reflexive and transitive relation).
A morphism of monads from (A, t) to (B, s) consists of a 1-cell f : A → B equipped with a 2-cell ϕ : sf → f t, satisfying two conditions: see [52] or Section 8 below. A morphism of monads in Span(E) is not an internal functor, since it would involve a 1-cell (a span) E 0 → F 0 between the objects of objects, rather than a morphism in E. In order to get internal functors, we need to consider not Span(E) itself, but rather Span(E) equipped with the class of "special" 1-cells consisting of those spans whose left leg is the identity; these can of course be identified with the 1-cells in E. An internal functor will turn out to be a monad morphism, for which the span E 0 → F 0 is "special".
The case of enriched functors is similar: one needs to keep track of which 1-cells in V -Mat are really just functions.
To get (enriched or internal) natural transformations, you do not use the obvious notion of monad 2-cells as in [52], but rather those of [39]; once again see Section 8 below.
2.4. References to the literature. For adjunctions in 2-categories and the calculus of mates see [29] or [16]. For monads in 2-categories see the classic [52]. For extensions and liftings see [57]. The idea that categories can be seen as monads in Span comes from [4].

Morphisms between bicategories
3.1. Lax morphisms. We talked before about the virtues of monoidal functors between monoidal categories. The corresponding morphisms between bicategories are the lax functors (originally just called morphisms of bicategories by Bénabou). A lax functor A → B sends objects A ∈ A to objects F A ∈ B, has functors F : A (A, B) → B(F A, F B) (thus preserving 2-cell composition in a strict way), and has comparison maps ϕ : F g · F f → F (gf ) and ϕ 0 : 1 F A → F (1 A ) and some coherence conditions, which are formally identical to those for monoidal functors.
All the good things that happen for monoidal functors happen for lax functors. For example, monoidal functors take monoids to monoids, and lax functors take monads to monads. (Recall that a monad in B on an object X is the same as a monoid in the monoidal category B(X, X).) As a very special case, consider the terminal 2-category 1. This has a unique object * , and a unique monad on * (the identity monad). Then for any lax functor 1 → B, the object * gets sent to F * = A, the identity 1 is sent to F 1 = t, the comparison maps become µ : tt → t and η : 1 → t, and the coherence conditions make this precisely a monad. In fact, monads in B are the same as lax functors 1 → B. For Bénabou, this was a key reason to consider lax morphisms of bicategories, rather than the stronger version.
In particular, V -categories are the same as monads in V -Mat, and so also the same as lax functors 1 → V -Mat. This is the same as a set X together with a lax functor X ch −→ ΣV where X ch is X made into a chaotic bicategory (also called indiscrete: every homcategory X ch (x, y) is trivial). Why? We send each x to * , we have a functor 1 = X ch (x, y) → ΣV ( * , * ) = V picking out the hom-object C (x, y) ∈ V , and the lax comparison maps ϕ become the composition and identity maps.
If we replace ΣV by an arbitrary bicategory W , we get the notion of a W -enriched category: a set X with a lax functor Another way to think about X ch , as a bicategory, is to say that the unique map X → 1 is fully faithful. But we can also consider, more generally, a pair of bicategories with a partial map where the hooked arrow ֒→ denotes a fully faithful strict morphism, and the wobbly map denotes a lax functor. This partial map is called a 2-sided enrichment or a category enriched from A to B . If A is 1, it's just a category enriched over B.
Using the notion of composition for these things is very helpful in analyzing the change of base between different bicategories. For example, a B-category is a partial map from 1 to B; this can be composed with a partial map from B to C to get a C -category. As a (better-known) special case, lax functors from B to C send B-categories to C -categories; as a still more special case, monoidal functors from V to W send V -categories to W -categories.

Pseudofunctors and 2-functors.
A pseudofunctor (or homomorphism of bicategories) is a lax functor for which ϕ and ϕ 0 are invertible.   An important property of pseudofunctors not shared by lax functors is that they preserve adjunctions. Consider a pseudofunctor F : A → B, and an adjunction f ⊣ u : B → A in A , with unit η : 1 A → uf and ε : f u → 1 B . We may apply F to f and u to get F f : F A → F B and F u : F B → F A, and now the composite 2-cells provide the unit and counit for an adjunction F f ⊣ F u. This fails for a general lax functor F . If ϕ and ϕ 0 are not just invertible, but in fact identities, then one speaks of a strict homomorphism; or, in the case of 2-categories, of a 2-functor. Note that in the bicategory case the associativity and identity constraints must still be preserved: this is the content of the coherence condition for ϕ and ϕ 0 .
2-functors are much nicer to work with, but often it is the pseudofunctors which arise in nature. One reason you might prefer 2-functors is so as not to have to worry about coherence. Furthermore, 2-functors have better properties than pseudofunctors: for example, the category 2-Cat of 2-categories and 2-functors has limits and colimits, but the category 2-Cat ps of 2-categories and pseudofunctors does not. For example the diagram has no pushout: such a pushout would have to have morphisms 0 → 1 → 2 and a composite, but in some other cocone we have no way to decide where to send the composite. If, however, we made 2-Cat ps into a tricategory, then it would have trilimits (the relevant "weak" notion of limits for tricategories). On the other hand, even if you start in the world of 2-categories and 2-functors, you may be forced out of it.
are equivalences and it is "bi-essentially surjective", in the sense that for all X ∈ B, there exists an A ∈ A and an equivalence F A ≃ X in B. This is the "right notion" of equivalence for 2-functors.
The point is that you'd like something going back the other way from B to A . Well you do have something, but it's just not a 2-functor in general. Given X ∈ B, pick A ∈ A and F A ≃ X and let GX = A. Given X x −→ Y , we can bring it across the equivalences F A ≃ X and F B ≃ Y to get x : F A → F B, and since F is locally an equivalence, x ∼ = F a for some a : A → B; let Gx = a. This all works, but since everything is only defined up to isomorphism, there's no way you can possibly hope for G to preserve things strictly.
There is a Quillen model structure on 2-Cat -see Section 7.5 below -for which the weak equivalences are the biequivalences, and clearly getting a 2-functor B → A is going to have something to do with B being cofibrant.
3.3. Higher structure. As well as lax (and other) morphisms between bicategories, there is higher structure. Given morphisms F, G : A → B, one can consider families αA : F A → GA of morphisms in B indexed by the objects of A , and subject to (lax, oplax, pseudo, or strict) naturality conditions. There is even a further level of structure, consisting of morphisms between such transformations: these are called modifications.

3.4.
References to the literature. The importance of lax functors, especially lax functors with domain 1, was observed by Bénabou [4].
Categories enriched in a bicategory were first defined by Walters to deal with the example of sheaves (on a space or site) [61,62]. A good general reference is [5]. Two-sided enrichments (although not from the point of view of partial morphisms of bicategories) were defined in [30], in order to deal with change of base issues.

2-dimensional universal algebra
There are various categorical approaches to universal algebra: theories, operads, sketches, and others, but I'll mostly talk about monads, although you may see parallels with operads and with theories if you know about those.
The ordinary universal algebra picture you might have in mind is monoids (or groups, rings, etc.) living over sets. But our algebras don't have to be single-sorted; they could live over some power of sets. Abstractly, of course, we could be living over almost everything. A good many-sorted example to have in mind is the functor category [C , Set] living over [obC , Set], for a small category C . If C has one object, then we may identify C with the monoid M of its arrows, and the functor category is then the category of M -sets.
When we come to 2-categories, we might generalize monoids over sets to monoidal categories over categories; or (also living over categories) categories with finite products, or with finite coproducts, or with both, or with finite products and finite coproducts and a distributive law.
For an example of the many-sorted case, let B be a small bicategory. There is a 2-category Hom(B, Cat) of homomorphisms from B to Cat (B-indexed categories), whose morphisms and 2-cells are the pseudonatural transformations and modifications. The domain of the forgetful 2-functor is an example of the sort of algebraic structure we have in mind.
In the next two sections there is a lot of interplay between 2-category theory and Cat-category theory. Since I don't want to assume enriched category theory, I'll tend to describe the ordinary (unenriched) setting, take it for granted that one can modify this to get a Cat-enriched version, and concentrate more on how to modify this to do the proper 2-categorical one.
4.1. 2-monads. We continue to follow the convention that the prefix 2-indicates a strict notion. Thus a 2-monad consists of a 2-category K equipped with a 2functor T : K → K , and 2-natural transformations m : T 2 → T and i : 1 → T , satisfying the usual equations for a monad. In other words, this is a monad in the (large) 2-category of 2-categories, 2-functors, and 2-natural transformations. (This could be made into a 3-category, but we don't need to do so for this observation.) There is a good theory of enriched monads -this was one of the motivations of the formal theory of monads -and 2-monads are just V -monads in the case V = Cat.
A (strict) T -algebra is the usual thing, an object A ∈ K with a morphism a : T A → A satisfying the usual equations, written (A, a). Once again, this is the strict (or Cat-enriched) notion.
Remark 4.1. There are pseudo and lax notions of monad and of algebra, but they seem to be less important in universal algebra than the strict ones. The main reason for this is that the actual structures one wants to describe using 2-dimensional monads are the strict algebras for strict monads in a fairly straightforward wayan example is given below -whereas identifying the structures of interest with pseudoalgebras is rather more work. A secondary reason is that in reasonable cases a pseudomonad T can be replaced by a strict monad T ′ whose strict algebras are the pseudoalgebras of T .
Note that the outer 1-cells are the same (I wouldn't write this equation down if they weren't), and that empty regions commute, and are deemed to contain the relevant identity 2-cell. Let's do a baby example: K = Cat and T A = n A n the usual free monoid construction. The T -algebras are strict monoidal categories, and a lax morphism involves 2-cells for each n. The definition of monoidal functor only mentions the cases n = 0 and n = 2, but all the others can be built up from these in an obvious way; the coherence conditions for lax T -morphisms say that you do build them up in this sensible way, and that the coherence conditions for monoidal functors are satisfied. So for this T , the lax morphisms are precisely the monoidal functors. This provides a practical motivation for the definition of lax T -morphism. Here's a theoretical one. There's a 2-category Lax(2, K ) where 2 is the arrow category. In detail: • An object is an arrow a : Since this is functorial in K , the 2-monad T induces a 2-monad Lax(2, T ) on Lax(2, K ). Then a (strict) Lax(2, T )-algebra is precisely a lax T -morphism. The coherence conditions for lax morphisms become the usual axioms for algebras. Similarly In the baby example, for n = 2 this says that which is exactly the condition for ρ : f → g to be a monoidal natural transformation.
Exercise 4.2. Play the Lax(2, K ) game with T -transformations: find a 2-category K ′ and a 2-monad T ′ on K ′ whose algebras are the T -transformations.
There is a 2-category T -Alg ℓ of T -algebras, lax T -morphisms, and T -transformations, and a forgetful 2-functor T -Alg ℓ U ℓ −→ K and in some cases, such as that of monoidal categories, this is the 2-category of primary interest, but often the pseudo case is more important (and of course strong monoidal functors are themselves important). If f is invertible, we say that (f, f ) is a pseudo T -morphism or just a T -morphism (privileging these over the strict or the lax). These are the morphisms of the 2-category T -Alg of T -algebras, pseudo T -morphisms, and T -transformations; it has a forgetful 2-functor When f is an identity we have a strict T -morphism. Of course this just means that the square commutes, and we have a morphism in the usual unenriched sense, but it is still useful to think of the identity 2-cell as being "an f ", since it is used in the condition on 2-cells. The T -algebras, strict T -morphisms, and Ttransformations form a 2-category T -Alg s with a 2-functor Each of these 2-categories has the same objects, and we have a diagram

t t t t t t t K of 2-categories and 2-functors,
where T -Alg c is the 2-category of colax morphisms, defined like lax morphisms except that the direction of the 2-cell is reversed. I won't worry too much about them since they can be treated as the lax morphisms for an associated 2-monad on K co .
At this point we need to start making some assumptions. To start with, suppose that K is cocomplete, and that T has a rank, which means that T : K → K preserves α-filtered colimits for some α. For ordinary monads on categories, it says that we can describe the structure in terms of operations which may not be finitary, but are at least α-ary for some regular cardinal α. The famous example of a monad on Set which is not α-filtered for any α is the covariant power set monad.
Under these conditions have left adjoints. What does this mean? Among other things it means that for each algebra A there is an algebra A ′ and bijections where the wobbly arrow denotes a weak morphism and the normal arrow a strict one. Here "weak" might mean either pseudo or lax, depending on the context; of course there will be a different A ′ depending on whether we consider the pseudo or the lax case.
These are 2-adjunctions, so these bijections are just part of isomorphisms of categories 2-natural in A and B. We usually omit writing the J, since it is the identity on objects. We say that such an A ′ classifies weak morphisms out of A. From this we get a unit p : A A ′ and counit q : A ′ → A and one of the triangle equations tells you that qp = 1. An unfortunate consequence of the (otherwise reasonable) notation A ′ , is that the left adjoint to J : T -Alg s → T -Alg is sometimes saddled with the rather embarrassing name ( ) ′ ; I shall call it Q instead.

4.2.
Sketch proof of the existence of A ′ .
Step 1. T -Alg s is cocomplete. This part is entirely "strict": it is really an enriched category phenomenon, and not really any harder than the corresponding fact for ordinary categories. It is here that you use the assumptions on K and T .
Colimits of algebras, as we know, are generally hard. The problem is essentially that algebras are a "quadratic" notion, involving a : T A → A with two copies of A. We "linearize" and it becomes easy. What does that mean? Take the T -algebra (A, a : T A → A), forget the axioms, and also forget that the two A's are the same, so consider it only as a map a : T A → A 1 . This defines the objects of a new category, whose morphisms are squares of the form With the obvious notion of 2-cell this becomes a 2-category; in fact it is just the comma 2-category T /K . The point is that we have a full embedding T -Alg s ֒→ T /K since by the unit condition for algebras, any morphism in T /K between algebras must have f = f 1 and so be a strict T -morphism. It is this T /K which is the "linearization" of T -Alg s , and colimits in it are easy. Say we have a diagram of things T A i → B i . Take the colimits in K and take the pushout to get the colimits in T /K . The hard bit, which I'll leave out, is the construction of a reflection T /K → T -Alg s (a left adjoint to the inclusion). This is where we use the assumption on T . There are some transfinite calculations, as you might expect given the condition on α-filtered colimits.
Note, however, that should T preserve all colimits, then this Step 1 becomes easy: the colimits are constructed pointwise. In particular, this is true in the case of categories of diagrams (T -Alg s = [B, Cat]).
In fact when we come to step 2, we'll see that only certain (finite) colimits in T -Alg s are actually needed, and if T should preserve these colimits, as does sometimes happen, then once again the proof simplifies.
Step 2. Let (A, a) be an algebra; we want to construct the pseudomorphism clas- consists of various data in K , and we want to translate all these data into T -Alg s .
• The condition f .iA = id corresponds to saying that ζ.T iA = id • The other condition becomes We have a truncated simplicial object: We now form a 2-categorical colimit, called the codescent object, of this truncated simplicial object, and the result is the desired A ′ . Alternatively, we can break this up into bite-sized pieces. We first construct the coinserter of mA and T a: this is the universal p : T f → f a, without any coherence conditions. To capture the coherence conditions, we have to perform a special sort of quotient, called a coequifier, which universally makes equal a parallel pair of 2-cells. We'll talk about 2-categorical limits and colimits later. If we used the "pseudo" version of weak morphisms, then we'd use a co-isoinserter instead of an coinserter, which is the obvious analogue in which ρ is invertible.

Consequences of the pseudomorphism classifier. Recall that we have
It's also true that pq ∼ = 1, so that this is an equivalence, and thus A ≃ A ′ in T -Alg, although generally not in T -Alg s . If however q has a section s in T -Alg s , so that qs = 1, then s ∼ = p, so sq ∼ = 1, and q is an equivalence in T -Alg s . When q does have such a section, the algebra A is said to be flexible.
We'll see in Section 7.3 that there is a model structure on T -Alg s for which A ′ is a cofibrant replacement of A. The weak equivalences are the strict morphisms which become equivalences in T -Alg, or equivalently in K ; the cofibrant objects are precisely the flexible algebras.
The equivalence A ≃ A ′ is a kind of coherence result for morphisms. There are also coherence results for algebras. Consider the composite To give a left adjoint is to construct a pseudo morphism classifier A ′ ∈ T -Alg s not just for each strict T -algebra, but also for pseudo-T -algebras. This can still be done; rather than a truncated simplicial object one has a truncated pseudosimplicial object (some of the simplicial identities are satisfied only up to isomorphism), but we can still form the codescent object A ′ and obtain an isomorphism of categories for any strict algebra B, natural in B with respect to strict maps. This time we have a counit q : B ′ → B only when B is strict, and a unit A A ′ for any pseudo algebra A. For a general pseudo algebra A, there seems no way to construct a map from A ′ back to A, and so no way to show that p is an equivalence. In some cases, however p is an equivalence. In particular it is so if T preserves the relevant codescent objects, since then one can construct the codescent object in K , and get the inverse-equivalence down there. There are various other sufficient conditions for this to work.
The existence of A ′ for each pseudoalgebra A, along with the fact that the unit A A ′ is an equivalence is sometimes called the "full coherence result". There are 2-monads for which not every pseudoalgebra is equivalent to a strict one, but the only examples I know involve horrible 2-categories K . I don't know of an example satisfying the assumptions made in this section (K cocomplete and T preserving α-filtered colimits).

4.4.
References to the literature. 2-monads were first considered in [41]. The basic reference is [7], although many of the key ideas go all the way back to Kelly's [20], including the constructions A, A and {f, f } which allow one to describe algebras in terms of monad morphisms. For the latter, see also [27]. The accessibility issues in [7] were treated in Blackwell's (unpublished) thesis, and later in the monumental (and somewhat impenetrable) [23], which builds on many earlier papers, in particular [2]. Anyway, [7] contains the results about limits and (bi)colimits in T-Alg, biadjoints to algebraic 2-functors, and the left adjoint to T-Alg s → T-Alg. The proof given here for the existence of this left adjoint follows [33]. See [33] and the references therein for a discussion of proofs that pseudo algebras are equivalent to strict ones. (But I can't omit explicit mention of one those references: the short and beautiful paper [49] of Power.) Kelly's work [22] on clubs was not at first appreciated, but it has been influentially recently in monad-theoretic approaches to higher categories.

Presentations for 2-monads
Presentations involve free gadgets and colimits. Both are defined in terms of a universal property involving maps out of the constructed gadget. Why are these important in the case of 2-monads (or monads)? It turns out that one can use colimits to build up 2-monads out of free ones exactly as one builds up algebraic structure using basic operations, derived operations, and equations. Both the colimits and the freeness will involve the world of strict morphisms of monads. Exactly what this world might be is discussed below, but to start with we indicate why (strict) maps out of a given monad are important. 5.1. Endomorphism monads. Let T be a monad on a complete category K . Everything works without change for 2-categories, or indeed for V -categories. For objects A, B ∈ K , the right Kan extension for a set (or category or object of V , as the case may be) X, and objects B and D of K . The universal property of the right Kan extension implies in particular that we have bijections of natural transformations.
T −→ A, B T A −→ B (This is starting to look like something you might want to do if T is a monad.) We have natural "composition" and "identity" maps (Writing down where the composition and identity come from is a good exercise.) Thus A, A becomes a monoid in [K , K ]; that is, a monad. This can be regarded as the monoid of endomorphisms of A in the [K , K ]-category K .
The important thing about this monad is that the bijection

−→ A between monad maps into A, A and algebra structures on A.
This is exactly like the endomorphism operad of an object, except that instead of an object of n-ary operations for each n ∈ N, we have an object "C-ary operations" Thus colimits of monads are interesting. For simple example, algebras for S + T (coproduct as monads) are objects with an algebra structure for S and an algebra structure for T , with no particular relationship between the two.
We can play the same game with morphisms. First observe that A, B is functorial (covariant in B, contravariant in A), and so for any f : A → B we can form the solid part of and now if we have monad maps α : T → A, A and β : T → B, B , then the square commutes if and only if f is a strict map between the corresponding algebras.
It is at this point that we want to make things 2-categorical, and allow for pseudo or lax morphisms. So suppose that K is a (complete) 2-category, and that T is a 2-monad on K . To give a 2-cell The comma object is the universal diagram of this shape, so to givef as above is equivalent to giving a 1-cell ϕ : Now {f, f } ℓ becomes a monad: this can be seen via a routine argument using pasting diagrams; or one can get more sophisticated, and show that Lax(2, K ) is enriched over [K , K ], and now regard {f, f } ℓ as the endomorphism monoid. The important thing is that A, A are monad maps (although A, B is not a monad), and that a map T → {f, f } ℓ is a monad map if and only if the corresponding (f, f ) is a lax T -morphism.
Of course there is also a pseudo version of this: use the iso-comma object {f, f } rather than the comma object {f, f } ℓ ; this is the evident analogue in which the 2-cell is required to be invertible.
Thus we can work out the algebras and the (strict, pseudo, or lax) morphisms for a monad just by looking at monad morphisms out of T , and that shows why free monads and colimits of monads should be important.

5.2.
Pseudomorphisms of monads. In addition to strict monad maps, where the good colimits live, there are also pseudo maps of monads. A pseudomorphism of 2-monads on K is a 2-natural transformation which preserves the multiplication and unit in exactly the sense that strong monoidal functors preserve the tensor product and unit of monoidal categories. Thus there are invertible 2-cells satisfying the same usual coherence conditions. We have seen that to give an arbitrary map α : T → A, A is equivalent to giving a : T A → A in K , and that α is a strict map of monads if and only if a makes A into a strict algebra; it turns out that to make α into a pseudomorphism of monads α : T A, A is precisely equivalent to making a : T A → A into a pseudoalgebra.

5.3.
Locally finitely presentable 2-categories. For a large 2-category K , the 2-category Mnd(K ) of 2-monads on K has all sorts or problems: its hom-categories are large, it is not cocomplete, and free monads don't exist. We shall therefore pass to a smaller 2-category of 2-monads. Assume that K is a locally finitely presentable 2-category. If you know what a locally finitely presentable category is then this is just the obvious 2-categorical analogue. If not, then here are some ways you could think about them: • The formal definition (which you don't need to know because I'm not going to prove anything): a cocomplete 2-category with a small full subcategory which is a strong generator and consists of finitely presentable objects. • A 2-category which is complete and cocomplete and in which transfinite arguments are more inclined to work then is usually the case. • A 2-category of all finite-limit-preserving 2-functors from C to Cat, where C is a small 2-category with finite limits; you can take C to be K op f where K f is the full subcategory of finitely presentable objects.
• Full reflective sub-2-categories of presheaf 2-categories which are closed under filtered colimits.
• A 2-category which is complete and cocomplete, and is the free cocompletion under filtered colimits of some small 2-category (an Ind-completion).
In fact you don't need to suppose both completeness and cocompleteness: for an Ind-completion, either implies the other.
Examples include the presheaf 2-category [A , Cat] for any small 2-category A , or Cat X for any set X. The 2-category of groupoids is another example.
Once again, this is really an enriched categorical notion: there is a notion of locally finitely presentable V -category, provided that V itself has a good notion of finitely presentable object: more precisely, provided that V is a locally finitely presentable category and the full subcategory of finitely presentable objects is closed under the monoidal structure.
Because K is the free completion of K f under filtered colimits, to give an arbitrary 2-functor K f → K is equivalent to giving a finitary (that is, filteredcolimit-preserving) 2-functor K → K . We write End f (K ) for the monoidal 2-category of finitary endo(-2-)functors on K . Unlike [K , K ] this is locally small, since K f is small.
A 2-monad is said to be finitary if its endo-2-functor part is so. Then the 2category Mnd f (K ) of finitary 2-monads on K is the 2-category of monoids in End f (K ), and the forgetful 2-functor U : Mnd f (K ) → End f (K ) does indeed have a left adjoint, so in this world we do have free monads.
Moreover, the adjunction is monadic; there is a 2-monad on End f (K ) for which Mnd f (K ) is the strict algebras and strict morphisms. We can drop down even further to get The lower adjunction is also monadic, as indeed is the composite, although this does not follow from monadicity of the two other adjunctions.
Thus Mnd f (K ) is monadic both over End f (K ) and over [obK f , K ], and the choice of which base 2-category to work over affects what the pseudomorphisms and pseudoalgebras will be. Dropping down one level, the transformations are 2natural ones, as in Section 5.2; while if we drop down the whole way, they will be only pseudonatural.
The induced monads on [obK f , K ] are finitary, and so it follows that End f (K ) and Mnd f (K ) are themselves locally finitely presentable, and in particular are complete and cocomplete. In fact slightly more is true, since the inclusion of Mnd f (K ) in Mnd(K ) has a right adjoint, and so preserves colimits. Mnd(K ) does not have colimits in general, but it does have colimits of finitary monads, and these are finitary. Free monads on arbitrary endo-2-functors may not exist, but free monads on finitary endo-2-functors do, and they are themselves finitary. This is useful since the A, A are not finitary, although we can use the coreflection of Mnd(K ) into Mnd f (K ) to obtain a finitary analogue.
Everything in this section remains true if you replace "finite" by some regular cardinal α.

5.4.
Presentations. The most primitive generator for a 2-monad is an object of [obK f , K ]: a family (X c ) c∈obK f of objects of K , indexed by the objects of K f . This then generates a free 2-monad F X. What is an F X-algebra? A monad map which is the same as X → U A, A . This just means that for each c, we have between hom-categories. Since K is cocomplete, this is the same as a map where K (c, A) · Xc denotes the tensor of Xc ∈ K by the category K (c, A). Thus we can think of Xc as the "object of all c-ary operations".
Example 5.2. Let K = Cat, so K f is the finitely presentable categories, and X assigns to every such c a category Xc of c-ary operations. We take where 2 is the discrete category 1 + 1. Thus we have one binary operation and one nullary operation. An F X-algebra is then a category A with maps as above. If Xc is empty, then K (Xc, A) is terminal, so there's nothing to do. In the other cases, we get maps A 2 → A when c = 2 and A 0 = 1 → A when c = 0. This is the first step along the path of building up the 2-monad for monoidal categories. The pseudo (or lax) morphisms can be determined using {f, f } or {f, f } ℓ : they will preserve ⊗ and I in the pseudo or the lax sense, as the case may be, but without coherence conditions. Then an F X algebra is a category with a map in other words, a pair of maps with a natural transformation A .
This is an example in which Xc is not discrete. We say that X specifies a "basic operation of arity 1 (unary) and type arrow".
In the case of monoidal categories, you can use operations of "type arrow" to provide the associativity and unit isomorphisms, but I'll take a different approach. 5.5. Monoidal categories. Actually, let's forget about the units, just worry about the binary operation. Then Xc is 1 if c = 2 and 0 otherwise, so an F X-algebra is a category with a single binary operation. Then we have a (non-commutative) diagram of 2-categories and 2-functors and now we have the two maps with two 2-cells in the middle. Note that U s F s = F X is the monad, so that we have two natural transformations which are morphisms of endofunctors. We can now construct the free 2-monad HCat(3, −) on Cat(3, −) and the induced monad morphisms Consider now an F X-algebra (C, ⊗), and the corresponding monad map γ : F X → C, C . Then (C, ⊗) is strictly associative if and only if γκ 1 = γκ 2 , while to give an isomorphism ⊗(1⊗) ∼ = ⊗(⊗1) is equivalent to giving an isomorphism γκ 1 ∼ = γκ 2 . In the 2-category Mnd f (K ) construct the universal map ρ : F X → S equipped with an isomorphism ρκ 1 ∼ = ρκ 2 : this is called a co-iso-inserter, and it's a (completely strict) 2-categorical colimit, which we'll meet later on. Now, an S-algebra is a category C equipped with a monad map S → C, C , or equivalently a monad map ρ : F X → C, C and an isomorphism ρκ 1 ∼ = ρκ 2 , or equivalently with a functor ⊗ : C 2 → C and a natural isomorphism α : ⊗(1⊗) ∼ = ⊗(⊗1). You can also write down what it means to be a pseudo or lax morphism of such algebras, and it's what you want it to be: the tensor-preserving isomorphisms must be compatible with the associativity constraints.
The coherence condition states that a pair of 2-cells T T Now we form the coequifier q : S → T , in the category of monads, of these two 2-cells Λ 1 and Λ 2 : this is the universal map q with the property that qΛ 1 = qΛ 2 .
Then the 2-category T -Alg is the 2-category of "semigroupoidal categories" and strong morphisms (we can get the strict and lax morphisms in the obvious way too). All this follows from the universal property of the monad T .
Often, as here, we build up structure in a particular order, starting with the operations of type object, then those of type arrow or isomorphism, and finally impose equations on these arrows or isomorphisms. 5.6. Terminal objects. Consider the structure of category with terminal object. This is a baby example, but you can do any limits you like once you understand this example.
How do you say algebraically that a category A has a terminal object? You give an object 1 t −→ A with a natural transformation Let's give a presentation for it. First we have the nullary operation t, which takes the form where now Xc is 0 unless c = 0. Thus an object A with nullary operation t : 1 → A is precisely an F X-algebra, where For any F X-algebra (A, t), there are two canonical maps from A → A, given by and these are clearly natural in (A, t); in other words, they define a pair of natural transformations from U s : F X-Alg s → Cat to itself. Taking mates under the adjunction F s ⊣ U s gives a pair of natural transformations 1 Cat → U s F s . Now U s F s is just F X, so forming the free monad H1 on the identity 1 Cat , we get a pair of monad maps κ 1 , κ 2 : H1 → F X. We now form the coinserter ρ : F X → S of κ 1 and κ 2 . This is another 2-categorical colimit; it is the universal ρ equipped with a 2-cell ρκ 1 → ρκ 2 . An S-algebra is now an A equipped with an object t : 1 → A, and a natural transformation τ : 1 A → t•!, as in our earlier description of terminal objects. Finally one can construct a suitable coequifier q : S → T to obtain the 2-monad T for categories with terminal objects.
Here's a different presentation: it starts as before by putting in a nullary operation but then adds a unary operation of type arrow: which specifies two endomorphisms of A and a natural transformation between them: Later we'll introduce equations f = 1, g = t•!, and τ t = id.
To specify t and τ , define which acts on an F X-algebra (A, t, τ ) by There is a map α (A,t,τ ) : A + A + 2 → A whose components are f : A → A, g : A → A, and the functor 2 → A corresponding to τ • t. This is natural in (A, t, τ ). There is another map β (A,t,τ ) : A + A + 2 → A whose components are 1 : A → A, t•! : A → A, and the functor 2 → A corresponding to the identity natural transformation on t. Once again this is natural in (A, t, τ ).
A category with terminal object is precisely an F X-algebra (A, t, τ ) for which α (A,t,τ ) = β (A,t,τ ) . Now α and β live in the diagram where EC = C + C + 2, and we can take their mates under the adjunction F s ⊣ U s to obtain natural transformations α ′ , β ′ : E → U s F s and now U s F s is the monad F X, so there are induced monad maps α, β : HE → F X from the free monad HE on E, and the required 2-monad T for categories-withterminal object is obtained as the coequalizer Remark 5.4. Whichever approach we take, the algebras will be the categories with a chosen terminal object. This may seem strange, but is not really a problem. The strict morphisms preserve the chosen terminal object strictly, which is probably not what we really want, but the pseudo morphisms preserve it in the usual sense.

5.7.
Bicategories. There are two reasons for including this example: first of all it's a fairly easy case with K = Cat, and second it's important for 2-nerves. I won't give all the details. Let K = Cat-Grph, the 2-category of category-enriched graphs. A Cat-graph consists of objects G, H, . . . and hom-categories G (G, H) ∈ Cat. (Of course one could do this for any V in place of Cat.) A morphism is a function G → F G on objects, along with functors G (G, H) → H (F G, F H) between hom-categories. One might hope that the 2-cells would be some sort of natural transformations, but since Cat-graphs have no composition law, there is no way to assert that a square in a Cat-graph commutes, and so no way to state naturality. Instead, we use a special sort of lax naturality. We only allow 2-cells to exist when F and F ′ agree on objects, and then the 2-cell consists of natural transformations Let comp and arr be the Cat-graphs · → · → · and · → · (no 2-cells). Then where ob denotes the Cat-graph · (no 1-cells or 2-cells). An F Y -algebra structure on a Cat-graph G is a map where 1 denotes the terminal category. Suppose now that (G , M ) is an F X-algebra. There are many induced F Yalgebra structures on G ; in particular, there are the following two: Each is functorial, and so each induces a monad map F Y → F X; we form their coequalizer q 1 : F X → S 1 , and now an S 1 -algebra is a Cat-graph G equipped with a composition M such that M G,H,K lands in K G (G, K). A further quotient forces M G,H,K to land in G (G, K) as desired.
One now introduces an associativity isomorphism. This has the form of a map where triple is the Cat-graph · → · → · → · and iso is · · . There are also left and right identity isomorphisms, and various coherence conditions to be encoded, but I'll leave all that as an exercise. The result of the exercise is: • An algebra is a bicategory.
• A lax morphism is a lax functor.
• A pseudo morphism is a pseudo functor.
• A strict morphism is a strict functor.
• A 2-cell is an icon. This is an oplax natural transformation (which we haven't officially met yet) for which the 1-cell components are identities. ICON stands for "Identity Component Oplax Natural-transformation". An icon F → G can exist only if F and G agree on objects, in which case it consists of a 2-cell GB for each f : A → B in G , subject to conditions expressing compatibility with respect to composition of 1-cells and identities, and naturality in f with respect to 2-cells. In the case of one-object bicategories these are precisely the monoidal natural transformations.
These icons are just nice enough to give us a 2-category of bicategories. In general, lax natural transformations between lax functors can't even be whiskered by lax functors -the composite isn't well-defined. In the pseudo case it is defined, but not associative, and so we are led into the world of tricategories. But with just icons, we do get a 2-category, which is moreover the category of algebras for the 2-monad just described. For example, in this 2-category, it's true that every bicategory is equivalent (in the 2-category) to a 2-category; this works because in replacing a bicategory by a biequivalent 2-category you don't have to change the objects of the bicategory. The 2-category NHom of bicategories, normal homomorphisms, and icons, is a full sub-2-category of the the 2-category [∆ op , Cat] of simplicial objects in Cat, via a "2-nerve" construction. In order to deal with normal homomorphisms (which preserve identities strictly) rather than general ones, it's convenient to start with reflexive Cat-graphs rather than Cat-graphs.
The choice of direction of the 2-cell in lax transformations and oplax transformations goes back to Bénabou. It seems that the oplax transformations are generally more important than the lax ones. 5.8. Cartesian closed categories. The comments in this section apply equally to monoidal closed categories, symmetric monoidal closed categories, and toposes.
There is no problem constructing a monad for categories with finite products, similarly to the constructions given above. When we come to the closed structure, however, things are not so straightforward. The internal hom is a functor and we're not allowed to talk about A op the way we're doing things: our operations are supposed to be of the form A c → A. How can we deal with this?
In fact, it's a theorem that cartesian closed categories don't have the form T -Alg for a 2-monad T on Cat. What you can do, however, is change the base 2-category K to the 2-category Cat g of categories, functors, and natural isomorphisms. Recall that Cat(2, A) is just A × A, but in Cat g (2, A) we have only A iso × A iso , where A iso is the subcategory of A consisting of the isomorphisms. The internal-hom does give us a functor which has the form Cat g (2, A) −→ Cat g (1, A) since we can turn around an isomorphism in the first variable to make everything covariant. This gives a new problem; the product is now only given as a functor A iso × A iso → A iso , we have to put in the rest of the functoriality separately "by hand", using an operation subject to various equations. You also have to relate the product to the internal hom. Any 2-monad on Cat induces monads on Cat g and on the 1-category Cat 0 (since things are stable under change of base monoidal category: categories to groupoids to sets). But at each stage, to present the same structure becomes harder. In the groupoid enriched stage we can still talk about pseudomorphisms, although at this stage every lax morphism is pseudo; by the time we get to the Set-enriched stage there is no longer any genuine pseudo notion at all -everything is strict. 5.9. Diagram 2-categories. The first version of this is not really an example of a presentation at all, since the 2-monad pops out for free. Let C be a small 2-category, and consider the 2-category [C , Cat] of (strict) 2-functors, 2-natural transformations, and modifications. This is the Cat-enriched functor category. The forgetful 2-functor has both adjoints given by left and right Kan extension. The existence of the right adjoint tells us that the forgetful functor preserves all colimits. In this case U s is strictly monadic as is easily proved using the enriched version of Beck's theorem. The induced monad T then preserves all colimits, and we can write, using the Kan extension formula, It's now a long, but essentially routine, exercise to check that • pseudo T -algebras are pseudo-functors, • lax algebras are lax functors, • pseudo morphisms are pseudo-natural transformations, and so on. When you write down the coherence conditions for a lax morphism it will tell you more than is in the definition of a lax functor: it will also include a whole lot of consequences of the definition. Notice, by the way, that this is a 2-monad for which every pseudoalgebra is equivalent to a strict one, and so every pseudofunctor from C to Cat is equivalent to a strict one. Now let C be a bicategory. If we tried the same game, we wouldn't get a 2monad, since the associativity of the multiplication for the monad corresponds to the associativity of composition in C , so we'd just get a pseudo-monad. We could just go ahead and do this, but we've been avoiding pseudo-monads, and there is an alternative. One can give a presentation for a 2-monad T on [obC , Cat] whose • (strict) algebras are pseudofunctors C → Cat, • pseudomorphisms of algebras are pseudonatural transformations, and so on. You start with a family (X c ) c∈obC , then introduce operations and so on. The target doesn't really need to be Cat, although it would need to be cocomplete.

5.10.
References to the literature. For locally finitely presentable categories see [15] or [1]; and for the enriched version see [24]. A more formal approach to presentations for 2-monads can be found in [28], which in turn builds upon ideas of [12] See [31] for the monadicity of Mnd f (K ) over [obK f , K ].

Limits
We'll begin with some concrete examples of limits, looking in particular at limits in T -Alg, for a finitary 2-monad T on a complete and cocomplete 2-category K (you could get by with much less for most of this). Recall that T -Alg is the 2category of strict algebras and pseudomorphisms. A good example to bear in mind would have K = Cat, and T -Alg the 2-category of categories with chosen limits of some particular type, and functors which preserve these limits in the usual, up-to-isomorphism, sense.
which makes A × B into a T -algebra (exactly as for ordinary monads: nothing 2-categorical going on here). The point is that if we have pseudo morphisms we get a unique induced pseudo morphism and indeed there is a natural isomorphism (of categories) Thus A × B is a product in T -Alg in the strict Cat-enriched sense. Note that the projections A × B → A and A × B → B are actually strict maps, by construction. Moreover, they jointly "detect strictness": a map into A × B is strict if and only if its composites into A and B are strict. This is a useful technical property.
Actually, we didn't really need to check anything, since we've already seen that T -Alg s ֒→ T -Alg has a left adjoint, hence preserves all limits, and in the case of terminal objects and products the diagram of which we are taking the limit consists only of objects, so already exists in the strict world. (On the other hand, the explicit argument works for any 2-monad on any 2-category with the relevant products, whereas the adjunction needs a transfinite argument, and much stronger assumptions on T and K .) 6.3. Equalizers. Now let's look at equalizers. Here it's different, because the morphisms whose equalizer we seek may not be strict. If they are, then the equalizer exists in T -Alg s and is preserved, but if they aren't, the adjunction doesn't help. In fact, in general equalizers of pseudo morphisms need not exist.
For example, let T be the 2-monad on Cat for categories with a terminal object. Let 1 be the terminal category and let I be the free-living isomorphism, consisting of two objects and a single isomorphism between them. Clearly both categories have a terminal object, and both inclusions are pseudo morphisms. But any functor which equalizes them has to have empty domain, and no category with an empty domain has a terminal object.
Thus T -Alg is not complete, but we can look at some of the limits that it does have.

Equifiers. Consider a parallel pair of 1-cells in T -Alg with a parallel pair of 2-cells between them:
The equifier of these 2-cells, is the universal 1-cell k : C → A with αk = βk. Here universality means that K (D, C) is isomorphic (not just equivalent) to the a) and (B, b) are T -algebras, (f, f ) and (g, g) are T -morphisms, and α and β are T -transformations, then the composites are equal. Paste the isomorphism g : b.T g ∼ = ga on the bottom of each side and the isomorphism f : f a ∼ = b.T f on the top, and use the T -transformation condition for α and β to get the equation and now by the universal property of the equifier C there is a unique c : T C → C satisfying kc = a.T k. Two applications of the universal property show that c makes C into a T -algebra, and so clearly k becomes a strict T -morphism (C, c) → (A, a). Further judicious use of the universal property shows that k : (C, c) → (A, a) is indeed the equifier in T -Alg.
Observe that once again, the projection map k of the limit is actually a strict map, and detects strictness of incoming maps.
Why does the analogous argument for equalizers fail? Given pseudo morphisms (f, f ) and (g, g) from (A, a) to (B, b), we could form the equalizer k : C → A of f and g, and then hope to make C into a T -algebra using the universal property of C, but we'd need to show that f a.T k = ga.T k. All we actually know is that c.T f.T k = c.T g.T k while c.T f.T k ∼ = f a.T k and c.T g.T k ∼ = ga.T k, which just isn't good enough.
The moral is that in forming limits in T -Alg, we can ask for existence or invertibility of 2-cells, and equations between them, but we can't generally force equations between 1-cells.

6.5.
Inserters. There is a sort of lax version of an equalizer, called an inserter. Rather than making 1-cells equal, you put a 2-cell in between them. The inserter of a parallel pair of arrows f, g : A → B is the universal k : C → A equipped with a 2-cell κ : f k → gk. More precisely, the universal property states that K (D, C) should be isomorphic to the category whose objects are morphisms ℓ : D → A equipped with a 2-cell λ : f ℓ → gℓ, and whose morphisms (ℓ, λ) → (m, µ) are 2-cells commutes. Thus for every pair (l : D → A, λ : f l → gl), there is a unique l ′ : D → C with kl ′ = l and κl ′ = λ. Furthermore, given l, λ, m, µ, α as above, there is a unique α ′ : l ′ → m ′ with kα ′ = α. Once again, inserters in K lift to T -Alg, where they have strict projections and detect strictness. Given a pair of pseudo morphisms, we construct the inserter (k : C → A, κ : f k → gk) of f and g in K , and want to make it an algebra. We need a 2-cell f.a.T k → g.a.T k to induce c : T C → C, so we follow our nose: This composite must be κc for a unique c, by the universal property of the inserter in K . Now check that c makes C into an algebra, and so on; everything goes through just as before.
Observe that an inserter in a (2-)category with no non-identity 2-cells is just an equalizer.
6.6. PIE-limits. Thus T -Alg has Products, Inserters, and Equifiers, and many important types of limit can be constructed out of these. A limit which can be so constructed is called a PIE-limit, so clearly T -Alg has all PIE-limits, and equally clearly equalizers are not PIE-limits. Some other examples of PIE-limits are: • iso-inserters, which are inserters where we ask the 2-cell to be invertible. Insert 2-cells in each direction, then equify their composites with identities.
(Of course you can't go the other way: iso-inserters don't suffice to construct inserters.) • inverters, where we start with a 2-cell α and make it invertible: we want the universal k such that αk is invertible. Insert something going back the other way, then equify composites with the identities. • cotensors by categories. Cotensors by discrete categories can be constructed using products. Any category can be constructed from discrete ones using coinserters (to add morphisms) and coequifiers (to specify composites). So cotensors by arbitrary categories can be constructed from cotensors by discrete categories using inserters and equifiers. The dual (colimit) notions of coinserter, coequifier, and co-iso-inserter were important in giving presentations of monads. The dual of inverter is the coinverter. The coinverter of a 2-cell α : f → g : A → B is the universal q : B → C with qα invertible. In Cat, this is just the category of fractions B[Σ −1 ], where Σ consists of all arrows in B which appear as components of α. Of course the dual of cotensor is tensor, not cocotensor! 6.7. Weighted Limits. In this section we briefly review the general notion of weighted limit, before turning in the next section to the case V = Cat, where we shall see how the various examples of the previous section arise.
Let S : C → K be a functor between, say, ordinary categories. The limit is supposed to be defined by the fact that where the right hand side is the set of cones under S with vertex A. This is typically defined as the hom-set [C , K ](∆A, S), where ∆A denotes the constant functor at A, but it can also be expressed as [C , Set](∆1, K (A, S)). It is this last description of cones which forms the basis for the generalization to weighted limits; we're going to replace ∆1 by some more general functor C → Set. Example 6.1. No one really uses this in practice, but it's useful to think about, and motivates the name "weighted" in "weighted limit". Let C = 2 have two objects, so a functor S : C → K is a pair of objects B and C, and a weight is a functor J : C → Set, say it sends one to 2 and the other to 3. Then consists of functions 2 → K (A, B) and 3 → K (A, C), or equivalently two arrows A → B and three arrows A → C, so that the "weighted product" is B 2 × C 3 .
For general V , we start with V -functors S : C → K and J : C → V and consider K (A, S)).
If this is representable as a functor of A, the representing object is called the Jweighted limit of S and written {J, S}. Thus we have a natural isomorphism K (A, S)).
which defines the limit. When V = Set, weighted limits don't give you any new limits: if K is an ordinary category which is complete in the usual sense of having all conical limits (J = ∆1), then it also has all weighted limits. More precisely, for any weight J : C → Set and any diagram S : C → K , there is a category D and a diagram R : D → K , such that the universal property of {J, S} is precisely the universal property of the usual limit of R.
But the weighted ones are more expressive, so it's still useful to think about them. In particular, you might want to talk about all limits indexed by a particular weight J : C → Set; this class is not so easy to express using only conical limits.
When V = Set it's not longer true that all limits can be reduced to conical ones. But if you have all conical limits and cotensors, you can construct all weighted limits. Remark 6.3. There is a slight subtlety here. In the case V = Set, the conical limit of a functor S : C → K is just the limit of S weighted by ∆1 : C → Set. But for a V -category C , the "constant functor at 1" (from C to V ) is usually not what you want to look at, and indeed may fail to exist. What you really want, to get the right universal property, is the constant functor ∆I at the unit object I of V . But even this may not exist, unless C is the free V -category on an ordinary category B. So this is the right general context for conical limits in enriched category theory.
That's all I want to say about general V . 6.8. Cat-weighted limits. Here I describe the weights for some of the limit notions introduced earlier.
Example 6.4 (Inserters). Let C be the 2-category · ⇉ ·, so S is determined by a parallel pair of arrows A ⇉ B. The weight J : C → Cat has image (1 ⇉ 2). Then a natural transformation J → K (C, S) gives has two components. The first is a functor 1 → K (C, A), or equivalently a morphism h : C → A, while the second is a functor 2 → K (C, B), or equivalently a 2-cell Naturality of these components means precisely that u = f h and v = gh, so the data consists of 1-cell h : C → A and a 2-cell β : f h → gh. To give h and β is just to give a map from C into the inserter. This is the 1-dimensional aspect of the universal property, which characterizes the 1-cells into C; there is also a 2-dimensional aspect characterizing the 2-cells, since the limit is defined in terms of an isomorphism of categories, not just a bijection between sets. In general, this 2-dimensional aspect must be checked, but if the 2-category K should admit tensors, the 2-dimensional aspect follows from the 1-dimensional one. Similar comments apply to all the examples. Example 6.5 (Equifiers). Here, our 2-category C is @ @ T T α⇓ ⇓β and our weight is in which α and β get mapped to the same 2-cell in Cat.
Example 6.6 (Comma objects). C is the same shape as for pullbacks G G and J is 1 There is no 2-cell in C , since we don't start with a 2-cell, we only add one universally.
Example 6.7 (Inverters). Recall, this is where we start with a 2-cell and universally make it invertible. Then C is 9 9 U U 11 11 and J is where I is the "free-living isomorphism" · ⇄ ·.
6.9. Colimits. Colimits in K are limits in K op . That's really all you have to say, but I should show you the notation. As usual, we rewrite things so as to refer to K . In this case, it's also convenient to replace C by C op , so that we start with and now the weighted colimit is written J ⋆ S and defined by a natural isomorphism K (S, A)).
One form of the Yoneda lemma says that where Y : C → [C op , V ] is the Yoneda embedding and J : C op → V is arbitrary.
Here's an application. Suppose you have some "limit-notion" which you know in advance is a weighted limit, but you don't know what the weight is. Thus you know {J, S} given S, but you don't know J itself. Consider the version of the Yoneda embedding Y : C → [C , V ] op and take its "limit", for the notion of limit we're interested in; equivalently, take the relevant colimit of Y : C → [C op , V ]. This is J ⋆ Y for our as yet unknown J; but by the Yoneda lemma this J ⋆ Y is itself the desired weight. This can be used to calculate the weights for all the concrete examples of Cat-weighted limits discussed here.  1 1 G G with isomorphisms in each triangle. We have made the cones commute only up to isomorphisms, but the universal property and factorizations are still strict. Note that the pseudopullback is equivalent (not isomorphic) to the iso-comma object (assuming both exist). In the latter, we specify f a ∼ = gb without specifying the middle diagonal arrow. Of course, we can take it to be f a, or gb, so we get ways of going back and forth.
The pseudopullback is not in general equivalent to the pullback, although it is possible to characterize when they are [18]. This situation is entirely analogous to homotopy pullbacks, and indeed it can be regarded as a special case, via the "categorical" Quillen model structure on Cat (see Section 7).
Again, given a weight J : C → Cat, the weighted pseudolimit is defined by  which just defines the universal property for the J ′ -weighted limit. In other words, pseudolimits are not some more general thing, but a special case of ordinary (weighted) limits. Thus we say that a weight "is" a pseudolimit if it has the form J ′ for some J.
Remark 6.9. This sort of phenomenon is common. Recall, for example, that pseudoalgebras for monads are strict algebras over a cofibrant replacement monad. Thus talking about things of the form Ps-T -Alg is actually less general than things of the form T -Alg, since everything of the former form has the latter form, but not conversely.
6.11. PIE-limits again. Recall that PIE-limits are the limits constructible from products, inserters, and equifiers. We can now make this more precise. A weight J : C → Cat is a (weight for a) PIE-limit if and only if the following conditions hold: • any 2-category K with products, inserters, and equalizers has J-weightedlimits; • any 2-functor F : K → L which preserves products, inserters, and equalizers (and for which K has these limits) also preserves J-weighted limits.
There is a characterization of such weights. Given a 2-functor J : C → Cat, first consider the underlying ordinary functor J 0 : C 0 → Cat 0 obtained by throwing away all 2-cells. Now compose this with the functor ob : Cat 0 → Set which throws away the arrows of a category, leaving just the set of objects. This gives a functor j : C 0 → Set. Then J is a PIE-weight if and only if j is a coproduct of representables; and j will be a coproduct of representables if and only if each connected component of the category of elements of j has an initial object.
Pseudolimits are also PIE-limits, as we shall now see. For a general T -algebra A, the pseudomorphism classifier A ′ was constructed from free algebras using coinserters and coequifiers. Thus for a general weight J : C op → Cat we can construct J ′ from "free weights", using coinserters and coequifiers. Free weights, in this context, are coproducts of representables, thus J ′ can be constructed from representables using coproducts, coinserters, and coequifiers. It will follow that pseudolimits can indeed be constructed using products, inserters, and equifiers, and so that they are PIE-limits. Now a limit weighted by a representable C (C, −) is given by evaluation at C; a limit weighted by a coproduct of representables is given by the product of the evaluations; a limit weighted by a coinserter of coproducts of representables is given by an inserter of products of evaluations, and so on. This is part of a general result, not needed here, that colimits of weights give iterated limits, as in the formula sending a weight J to the J-weighted limit of S, sends colimits in [C , Cat] to limits in K . In any case we can conclude in the current context that J ′ -weighted limits can be constructed using products, inserters, and equifiers, and so we have: Proposition 6.10. Pseudolimits are PIE-limits.
The converse is false: for example inserters are not pseudolimits. Neither are iso-comma objects, although they're pretty close (as we saw above).
Remember that T -Alg has all PIE-limits. It therefore has all pseudolimits as well. But consider the class of all limits (weights) which are equivalent (in [C , Cat], so that the equivalences are 2-natural) to pseudolimits. It is not the case that T -Alg has all of those limits. So equivalence of limits is not always totally trivial.
For example, consider splitting of idempotent equivalences, which seems like a very benign thing to do. If we split an idempotent equivalence in T -Alg, we won't necessarily get a T -algebra back, only a pseudo-algebra.
As an example, let C be a non-strict monoidal category, and C st its strictification. Then there is an idempotent equivalence on C st , which when split, gives C . This shows that T -Alg does not have splittings of idempotents when T is the 2-monad for strict monoidal categories.
6.12. Bilimits. I'm going to write down all the same symbols, but they'll just mean different things! So now C and K are bicategories, while S : C → K and J : C → Cat are now homomorphisms (pseudofunctors). The weighted bilimit is defined by an equivalence K (C, S)). Now our limits are determined only up to equivalence, instead of up to isomorphism.
In the case when C and K are 2-categories and J and S are 2-functors, then the right hand side is equal to the right hand side for pseudolimits, just by definition (since Ps(C , Cat) ֒→ Hom(C , Cat) is locally an isomorphism). Thus every pseudolimit is a bilimit.
On the other hand, if just K is a 2-category, then you can replace C by a 2category C ′ such that homomorphisms out of C are the same as 2-functors out of C ′ . Now for any A ∈ K we have Hom(C op , Cat)(J, K (S, A)) ≃ Ps(C op , Cat)(J, K (S, A)) whereJ andS are the 2-functors corresponding to J and S. Thus a 2-category with all pseudolimits also has all bilimits.
As we shall see in the following section, the converse is false: there are 2categories with bilimits which do not have pseudolimits, so the definition of pseudolimit is logically harder to satisfy than that of bilimit. On the other hand in concrete examples it is often much easier to verify the definition using pseudolimits than bilimits. This is certainly the case for pseudolimits in T -Alg. It's also the case for the opposite of the 2-category of Grothendieck toposes. 6.13. Bilimits and bicolimits in T -Alg. Suppose once more that K is locally finitely presentable and T is finitary, and consider the 2-category T -Alg. It has PIE-limits, as we saw, and so has pseudo-limits, and so has bilimits. So from a bicategorical perspective, we have all the limits we might want.
T -Alg also has bicolimits, although not in general pseudocolimits or PIE-colimits. Thus T -Alg op is an example of a 2-category with bilimits but not pseudolimits.
Just as in the case of ordinary monads, the (bi)colimits in T -Alg are not generally constructed as in K .
The existence of bicolimits follows from: A direct proof that T -Alg has bicolimits would be a nightmare, but using pseudocolimits it becomes manageable.
6.14. References to the literature. Many people came up with some notion of weighted limit at about the same time. But I guess the main reference for general V is now just [26]. On the other hand, for various limit notions for 2-categories, [25] is very readable. Once you've got through that, you should turn to [6], [54], and [16]. For the beautiful theory of PIE-limits, see [50]. For the connection between pullbacks and pseudopullbacks, see [18]. Section 6.13 is based on [7]. For relationships between pseudolimits and bilimits, see [48].

Model categories, 2-categories, and 2-monads
This section involves Quillen model categories, henceforth called model categories, or model structures on categories. There are various connections between model categories, 2-categories, and 2-monads which I'll discuss.
(i) Model structures on 2-categories: a model 2-category is a category with a model structure and an enrichment over Cat, with suitable compatibility conditions between these structures. Any 2-category with finite limits and colimits has a "trivial" such structure, in which the weak equivalences are the categorical equivalences. These trivial model 2-categories are not so interesting in themselves, but can be used to generate other more interesting model 2-categories. on K is also a model 2-category. One thing which I won't discuss, but deserves further study: (v) "Many-object monoidal model categories". There's a notion of monoidal model category: this is a monoidal category with a model structure, suitably compatible with the tensor product. The many-object version of this would involve a bicategory (or 2-category) with a model structure on each hom-category, subject to certain conditions (somewhat more complicated than those for monoidal model categories).

Model 2-categories.
There's a model structure on the category Cat 0 of categories and functors in which the weak equivalences are the equivalences of categories, and the fibrations are the functors f : A → B such that for any object a ∈ A and any isomorphism β : b ∼ = f a in B, there is an isomorphism α : a ′ ∼ = a in A with f a ′ = b and f α = β. This is sometimes called the "categorical model structure" or "folklore model structure". (There are other model structures on Cat 0 , in particular the famous one due to Thomason that gives you a homotopy theory equivalent to simplicial sets.) As mentioned above, a category with a monoidal structure and a model structure satisfying certain compatibility conditions is called a monoidal model category. The cartesian product makes Cat 0 into a monoidal model category.
If we now consider a category that has both a model structure and an enrichment over Cat, there is a notion of compatibility between these structures, which can be expressed in terms of the monoidal model structure on Cat 0 . We call this notion a model 2-category.
First of all the 2-category K is required to have finite limits and colimits in the 2-categorical sense; if the underlying ordinary category K 0 already has finite limits and colimits, then the extra requirement is that K have tensors and cotensors with 2. A model structure on K 0 makes K into a model 2-category if two new axioms hold for any cofibration i : A → B and fibration p : C → D: It follows that every equivalence is a weak equivalence, and that any morphism isomorphic to a weak equivalence is itself a weak equivalence.
7.2. Trivial model 2-categories. Let K be a 2-category with finite limits and colimits. The most important limit here will be the pseudolimit of an arrow f : A → B. Ordinarily we don't talk about limits of an arrow, since the ordinary limit of an arrow is just its domain, but the pseudolimit is only equivalent to the domain, not equal. It's the universal diagram such that given a : X → A, b : X → B, and β : f a ∼ = b, there is a unique c : X → L with λc = β (and so also uc = a and vc = b). In this case, u is an equivalence, because id : f 1 ∼ = f factors through by a d : A → L with ud = 1, and one can also check that du ∼ = 1. The technique of Section 6.9 can be used to calculate the weight for pseudolimits of arrows. The model structure on K is: • The weak equivalences are the equivalences; • The fibrations are the isofibrations, the maps such that each invertible 2-cell • The cofibrations have the left lifting property with respect to the trivial fibrations. • It follows that the trivial fibrations are the surjective equivalences: the p for which there exists an s with ps = 1 and sp ∼ = 1. We call such a model 2-category K a trivial model 2-category. When K = Cat this is just the folklore structure. When K has no non-identity 2-cells, then the equivalences are the isomorphisms, and all maps are isofibrations, so this agrees with the usual notion of trivial model category. For a general 2-category K , however, there will be weak equivalences which are not invertible.
The pseudolimit of f gives us, for any f , a factorization f = vd where v is a fibration (which follows from the universal property of the pseudolimit) and d is an equivalence. In the case of Cat, you could stop there and d would already be a trivial cofibration, but in general there's more work to do, although we have reduced the problem to factorizing an equivalence.
The way you do that is also the way you get the other factorization: use the dual construction. Form the pseudocolimit of the arrow f , as in the diagram below, and let e be the unique map with ei = f , ej = 1, and eϕ = id.
This time i is a cofibration and e is a trivial fibration, and if f itself is an equivalence, then i has the left lifting property with respect to the fibrations (so it's what's going to become a trivial cofibration). That's all I'll say about the proof. There is, of course, a dual model structure in which the cofibrations are characterized and the fibrations are defined by a right lifting property. For Cat, these coincide, in general they don't.
When K is arbitrary, there is no reason why the model structure should be cofibrantly generated. Certainly for Cat it is, but even for such a simple 2-category as Cat 2 it is not. From the homotopical point of view the trivial model structure is trivial in several ways, including: • All objects are cofibrant and fibrant; • The morphisms in the homotopy category Ho(K 0 ) are the isomorphism classes of 1-cells in K . In the case K = Cat(E), one typically considers different model structures: an internal functor F : A → B is usually called a weak equivalence if it's full and faithful and essentially surjective in an internal sense. For Cat this is equivalent to the usual notion (by the axiom of choice), but in general it won't be. It's the weak equivalences in this sense that people tend to use as their weak equivalences for Cat(E). When E is a topos, this was studied by Joyal and Tierney, and there's been recent work on other cases, when E is groups (so that internal categories are crossed modules) or abelian groups. is an equivalence, then any inverse-equivalence g : B → A naturally becomes an equivalence upstairs in T -Alg. This is a 2-categorical analogue of the fact that if an algebra morphism is a bijection, its inverse also preserves the algebra structure. But if f is strict (f is an identity), there is no reason why its inverse equivalence should also be strict, and thus no reason why f should be an equivalence in T -Alg s . For example, a strict monoidal functor which is an equivalence of categories has an inverse which is strong monoidal, but which need not be strict.
Recall the adjoint to the inclusion This fits into the model category framework very nicely. The counit of this adjunction is a cofibrant replacement: a trivial fibration with A ′ being cofibrant. So we see that T -Alg, which is the thing we're more interested in, is starting to come out of the picture: a weak morphism out of A is the same thing as a strict morphism out of the "special cofibrant replacement" A ′ of A. This is much tighter than the general philosophy that "we should think of maps in the homotopy category as maps out of a cofibrant replacement." An algebra turns out to be cofibrant if and only if q : A ′ → A has a section in T -Alg s . (There's always a section in T -Alg, using a pseudomorphism.) Since q is a trivial fibration, there will certainly be a section if A is cofibrant. Conversely, if there is a section, then A is a retract of A ′ ; but A ′ is always cofibrant, and so then A must be cofibrant too. In 2-categorical algebra, the word flexible is used in place of cofibrant. 7.4. Model structures for 2-monads. Recall now that we have adjunctions It's the M -model structure (the one lifted from End f (K )) which seems to be more important, and we'll only consider that one here. The corresponding prime construction classifies pseudomorphisms of monads. These are precisely the things that arise when talking about pseudoalgebras: recall that a pseudo-T -algebra was an object A with a pseudo-morphism T A, A into the "endomorphism 2-monad" of A, corresponding to maps T A a −→ A which are associative and unital up to coherent isomorphism.
This corresponds to a strict map T ′ → A, A , so that T ′ -Alg = Ps-T -Alg. (This is the part of the justification for working with strict algebras that people tend to understand first, but it's the less important one: see Remark 4.1 above.) If q : T ′ → T has a section in M -Alg s = Mnd f (K ), then T is said to be flexible (=cofibrant ). This was the context in which the notion of flexibility was first introduced. Any monad that you can give a presentation for without having to use equations between objects is always flexible. For example, the monad for monoidal categories is flexible, but the monad for strict monoidal categories, which involves the equation (X ⊗ Y ) ⊗ Z = X ⊗ (Y ⊗ Z), is not.
Flexible monads have the property that every pseudo-algebra is (not just equivalent but) isomorphic to a strict one; in fact isomorphic via a pseudomorphism whose underlying K -morphism is an identity! Remember that the importance of pseudo-algebras is not for describing concrete things, but for the theoretical side, since various constructions don't preserve strictness of algebras. For particular structures like monoidal categories, you're better off choosing the "right" monad to start with: the one for which monoidal categories are the strict algebras. 7.5. Model structure on 2-Cat. 2-Cat is the category of 2-categories and 2functors. It underlies a 3-category, and a 2-category, and perhaps more importantly a Gray-category. But we want to describe a model structure on the mere category 2-Cat, analogous to the one above for Cat.
The weak equivalences will be the biequivalences. Recall that F : is an equivalence of categories; and • F is "biessentially surjective" on objects: if C ∈ B, there exists an A ∈ A with F A ≃ C in B. Every equivalence has an inverse-equivalence, going back the other way. For a biequivalence F : A → B you can build a thing G : B → A with GF ≃ 1 and F G ≃ 1. You can make G a pseudofunctor, but generally not a 2-functor, even when F is one. That's somehow the whole point of the model structure. Similarly the equivalences F G ≃ 1 and GF ≃ 1 will generally only be pseudonatural.
Clearly biequivalence is the right notion of "sameness" for bicategories, or 2categories, but there is this stability (under biequivalence-inverses) problem, if you want to work entirely within 2-Cat. If you allow pseudofunctors, and so move to 2-Cat ps , then as we have seen, you lose completeness and cocompleteness.
The fibrations are similar to the case of categories. Fibrations for the model structure on Cat involved lifting invertible 2-cells; here we lift equivalences: a 2-functor F : A → B is a fibration if • given an object A upstairs and equivalence downstairs, we have a lift as in • given a 1-cell f upstairs and an invertible 2-cell downstairs, we have a lift as in is an (iso)fibration in Cat. Note that the notion of biequivalence is not internal to the 3-category or Graycategory of 2-categories, 2-functors, and so on, which speaks against the existence of a general model structure on an arbitrary 3-category or Gray-category which would reduce to this one.
There's an equivalent way of characterizing the fibrations which is useful. Keep the iso-2-cell lifting property as is, but modify the equivalence-lifting to deal with adjoint equivalences rather than equivalences. Here it is not just the 1-cell, but also the equivalence-inverse, and the invertible unit and counit which must be lifted.
In the presence of the iso-2-cell lifting property, these two types of equivalenceliftings are equivalent: clearly the lifting of adjoint equivalences implies the lifting of equivalences, since we can complete any equivalence to an adjoint equivalence, but the converse is also true provided that we can lift 2-cell isomorphisms.
This is related to a mistake I made in my first paper on this topic, where I used a condition like this on lifting equivalences that aren't necessarily adjoint equivalences. Regard "being an equivalence" as a property, and "an adjoint equivalence" as a structure, but be wary of regarding "a not-necessarily-adjoint equivalence" as a structure. Adjoint equivalences are now completely algebraic, classified by maps out of "the free-living adjoint equivalence", which is biequivalent to the terminal 2-category 1. A "free-living not-necessarily-adjoint equivalence" would not be biequivalent to 1.
The trivial fibrations, which are the things which are both fibrations and weak equivalences, can be characterized as the 2-functors that • are surjective on objects; and a surjective equivalence (a trivial fibration in Cat). Note that the trivial fibrations don't use the 2-category structure; you don't need anything about the composition to know what these things are, only the "2-graph" structure. So they're much simpler to work with.
There's an ω-categorical analogue to these things, which permeates Makkai's work on ω-categories. You don't need the ω-category structure, only a globular set, to say what this means. The corresponding notion of "cofibrant object" is then what he calls a "computad".
It's a bit less trivial than with the other model structures to prove that this all works, but it's not really hard. Everything is directly a lifting property (once you use the version with adjoint equivalences), so finding generating cofibrations and trivial cofibrations is easy.
All objects are fibrant, but not all objects are cofibrant. We have a "special" cofibrant replacement q : A ′ → A with the property that pseudofunctors out of A are the same as 2-functors out of A ': A B A ′ → B and A is cofibrant (flexible) if and only if the trivial fibration q has a section in 2-Cat. This happens exactly when the underlying category A 0 is free on some graph (you haven't imposed any equations on 1-cells, but you may have introduced isomorphisms between them). In principle, a cofibrant A 0 could be a retract of something free, but it turns out that this already implies that it is free.
There are three main things of interest to me in relation to the model structure on 2-Cat. The first is the equation "cofibrant = flexible". The second involves the monoidal structures. The model structure is not compatible with the cartesian product ×. The thing to have in mind is that the locally discrete 2-category 2 = (0 → 1) is cofibrant, but 2 × 2 is not, since the commutative square is not free. There are various tensor products you can put on 2-Cat. The cartesian product is also called the ordinary product (since it is also a special case of the tensor product of V -categories), but I like to call it the black product since the square is "filled in", in the sense that the square commutes. (Think of nerves of categories: 2simplices, or solid triangles, represent commutative triangles in a category, whereas the boundary of a 2-simplex represents a not necessarily commutative triangle.) There's also the white or funny product, in which the square does not commute (think of it as just the boundary, not filled in). It's a theorem that on Cat there are exactly 2 symmetric monoidal closed structures: the ordinary one and the "funny" one. The closed structure corresponding to the funny product is the not-necessarilynatural transformations (just components). Enriching over this structure gives you a "sesquicategory" (perhaps an unfortunate name, but you can see how it came about), which has hom-categories and whiskering, but no middle-four interchange, hence no well-defined horizontal composition of 2-cells. This funny tensor product can also be defined on 2-Cat, or indeed on V -Cat for any V .
In the case of 2-Cat, there's an intermediate possibility: the Gray or grey tensor product, due to John Gray, in which you put an isomorphism in the square, so it's "partially filled in".
(This is the "pseudo" version of the Gray tensor product; there's also a "lax" version: different shade of grey!) The black and white tensor product make sense for any V at all, but the grey one doesn't. There's a canonical comparison from the funny/white product to the ordinary/black one, and the Gray/grey tensor product is a sort of "cofibrant replacement" in between.
The Gray tensor product 2 ⊗ 2 is cofibrant, and more generally, the model structure is compatible with the Gray tensor product.
The third thing of interest is the connection between 2-categories and bicategories. There is a model structure on the category Bicat of bicategories and strict homomorphisms. The notion of biequivalence still makes perfectly good sense, and these are the weak equivalences. The fibrations are once again the maps which are isofibrations on the hom-categories, and have the equivalence lifting property. Thus the full inclusion 2-Cat ֒→ Bicat preserves and reflects weak equivalences and fibrations. This inclusion has a left adjoint "free strictification" given by universally making the associativity and identity isomorphisms into identities. This left adjoint is not a pseudomorphism classifier, since we are using strict morphisms of bicategories and of 2-categories, and it's not the usual strictification functor "st" either: in general the unit is not a biequivalence. But the component of the unit at a cofibrant bicategory is an equivalence. This fits well into the model category picture: it's part of what makes this adjunction a Quillen equivalence (one that induces an equivalence of homotopy categories). In fact the usual strictification can be seen as a derived version of the free strictification. There exist bicategories (even monoidal categories) for which there does not exist a strict map into a 2-category which is a biequivalence, although we know that any B has a pseudofunctor B B st which is a biequivalence. The point about cofibrant bicategories B is that "there aren't any equations between 1-cells", and this is what makes the unit at such a B an equivalence.
Just as for 2-Cat, we have pseudomorphism classifiers in Bicat, which serve as "special cofibrant replacements".
The model structure on 2-Cat is proper: showing that it's left proper (biequivalences are stable under pushout along cofibrations) is harder than any of the other results mentioned above, but the fact that it is right proper is an immediate consequence of the fact that every object is fibrant. 7.6. Back to 2-monads. There's a connection between the model structure on since if a : T A → A is a T -algebra, then its composite with f A : SA → T A makes A into an S-algebra.
In the ordinary unenriched case or the V -enriched case, or even here, if we used T → T -Alg s rather than T → T -Alg, the semantics functor would be fully faithful. But the semantics functor defined above, using T -Alg, is not: to give a map sem(T ) → sem(S) in 2-CAT/Cat corresponds to giving a weak morphism from S to T , but not in the sense of pseudomorphisms of monads, considered above; rather in a still broader sense, in which the f A : SA → T A need not even be natural. Now the definitions of fibration, weak equivalence, and trivial fibration in 2-Cat have nothing to do with smallness, and make perfectly good sense in the category 2-CAT of not-necessarily-small 2-categories. We can therefore define a morphism in 2-CAT/Cat to be a fibration, weak equivalence, or trivial fibration if the underlying 2-functor in 2-CAT is one.
Under these definitions, sem preserves limits, fibrations, and trivial fibrations, as one verifies using the 2-monads A, A , {f, f } ℓ , and so on. Limits, fibrations, and trivial fibrations in Mnd f (Cat) op , correspond to colimits, cofibrations, and trivial cofibrations in Mnd f (Cat). Thus, it should in principle be the right adjoint part of a Quillen adjunction. It's not, of course, because of size problems: 2-CAT/Cat has large hom-categories, and sem lacks a left adjoint.
The assertion that sem preserves the weak equivalence q : T ′ → T is equivalent to the assertion that every pseudo T -algebra is equivalent to a strict one. More generally, sem preserves all weak equivalences if and only if pseudo algebras are equivalent to strict ones for every T . Whether or not this is the case is an open problem in the current generality, but it is true that sem preserves weak equivalences between cofibrant objects (flexible monads). 7.7. References to the literature. Model categories go back to [51]. There are now several modern treatments: [17] is one which emphasizes the compatibility between model structures and monoidal structures. The "categorical" model structure on Cat seems to be folklore; the first reference I know is [19]. The Thomason model structure on Cat comes from [59], which does have an error in the proof of properness, corrected in [9]. For the model structures on 2-Cat and Bicat see [34,35]. There is also a "Thomason-style" model structure on 2-Cat [63]. The theory of model 2-categories, the model structure on the category of monads, and its relation to structure and semantics, all come from [37].

The formal theory of monads
In this section we return to formal category theory; in fact, to one of its high points: the formal theory of monads.
8.1. Generalized algebras. Let's start by thinking about ordinary monads. Let A be a category, t = (t, µ, η) a monad on A. Write A t for the Eilenberg-Moore category (the category of algebras). The starting point is to think about the universal property of this construction. What is it to give a functor C a −→ A t ? We give an algebra ac for each c ∈ C, and use ac also for the name of the underlying object, with structure map tac αc −→ ac. And for every γ : c → d, we have an aγ : ac → ad with a commutative square This square awfully like a naturality square; it wants to say that α is natural with respect to γ, and indeed this is in fact the case. What we're actually doing is giving a functor C a −→ A and a natural transformation which just says that on components, it makes each ac into a t-algebra. You might call this a generalized algebra, or a t-algebra with domain C. Think of a usual algebra as an algebra with domain 1.
Similarly, you can look at natural transformations. To give a natural transformation A t amounts to giving which is suitably compatible, in the sense that This is the universal property of the Eilenberg-Moore construction, and the starting point of the theory. I've been talking all along about categories, but once we've moved beyond algebras with domain 1, there's no reason to restrict in that way, so we can talk instead about a monad on an object A in any 2-category K . (The notion of monad has not been weakened in any way. The 2-category K might be Cat, or 2-Cat, or V -Cat, but we use the same definition.) We can't just construct A t as we did before, but we can ask whether there exists an object A t with the universal property. A slick way to do this is as follows. The hom-category K (C, A) has a monad K (C, t) on it (since 2-functors take monads to monads), and this is the ordinary type of monad in Cat. The endofunctor part of this monad sends a : C → A to ta : C → A. This generalized notion of algebra is then nothing but the usual sort of algebra for the ordinary monad K (C, t). So what we want is an isomorphism naturally in C (where the right hand side means the ordinary Eilenberg-Moore category of algebras for the ordinary monad K (C, t)). We call A t the Eilenberg-Moore object of t, or EM-object for short.
It turns out that in some 2-categories, such as Cat, it's enough to check the universal property for C = 1, since 1 generates Cat, in a suitable sense; but in an abstract 2-category there may not be a 1, and if there is one, it may not be enough to get the full universal property. Of course there are similar phenomena in ordinary category theory.
The universal property of A t makes it look like a limit, and indeed it is one, but we'll look at some other points of view first. 8.2. Monads in K . Let K be a 2-category. Previously we looked at the 2category Mnd f (K ) of finitary 2-monads on K (as a fixed base object). We now consider the 2-category mnd(K ) of all the (internal) monads in K , with variable base object.
• Its objects are monads in K .
• Its 1-cells correspond to morphisms which lift to the level of algebras: where we assume temporarily that A t and B s exist, and we can think of this commutative diagram as an identity 2-cell and then take its mate, since the u's are right adjoints: which we then paste together to get a 2-cell, and the forgetful-free composite gives us the monads. Thus we should define a morphism of monads to be a morphism m : A → B with a 2-cell ϕ : sm → mt such that the diagrams commute. We could define a morphism of monads to be a morphism m : A → B with a lifting m : A t → B s as above, except that the EM-objects need not exist in a general 2-category; but when they do exist, the two descriptions are equivalent. in K with a compatibility condition, which you could express as saying that ρ lifts to a ρ between EM-objects, or you could equivalently express as saying that There's a full embedding id : K ֒→ mnd(K ) sending A to the identity monad (A, 1) on A, and doing the obvious thing on 1-cells and 2-cells. This is particularly clear in the EM-objects picture, since if t = 1 then A t = A, so obviously m will lift uniquely to an m, which is what fully faithfulness of id says.
A trivial observation is that for any monad we can always choose to forget the monad and be left with the object, and this is left adjoint to id. The more interesting thing, however, is the existence of a right adjoint: this amounts exactly to a choice of an EM-object for each monad in K . Why? Look at the universal property: If A → A t is the right adjoint, this says that The key point is that the right hand side is equal to K (C, A) K (C,t) , since an object (that is, a morphism (C, 1) → (A, t)) involves a and α as in subject to exactly the conditions which make (a, α) into a generalized algebra. Now the really beautiful thing happens: we can start looking at duals of K and see what happens. Consider first K co , where we reverse the 2-cells but not the 1-cells. A monad in K co is then a comonad in K . And an EM-object in K co is the obvious analogue for comonads. If K = Cat, we get ordinary comonads, and the EM-object is the usual category of coalgebras for the comonad.
That's nice, but not incredibly surprising. What's more interesting is what happens in K op . When we consider monads not in K but in K op we have to reverse the direction of the 1-cells, as in but this is nothing but a monad in K ! But what about the EM-object? The arrows are reversed, so we get a different universal property. An algebra for this monad consists of The wonderful thing is that in the case K = Cat this is the same thing as a map A t → C where A t is the Kleisli category. Recall that the Kleisli category can be defined as the full subcategory of the Eilenberg-Moore category consisting of the free T -algebras (the algebras of the form (tx, µx) for some x ∈ A), or equivalently as the category with the same objects as A, but with morphisms from x to y given by the morphisms in A from x to ty (the monad structure is then used to make this into a category). The latter description is more convenient here: given (a : A → C, α : at → a) as above, the induced functor A t → C sends an object x ∈ A to ax, and a morphism ϕ : x → ty to the composite For a general 2-category K , the Eilenberg-Moore objects in K co are called Kleisli objects (in K ). It's true in any 2-category that the EM-object is the terminal adjunction giving rise to the monad, and the Kleisli object is the initial one, but the universal property given above is richer in that it refers to maps with arbitrary domains.
Using K coop , of course, gives you Kleisli objects for comonads.  −→ s (with conditions) • a unit 1 → (s, λ) corresponding to 1 → s (with conditions) As well as the conditions for these to be 1-cells and 2-cells in mnd(K ), we need the conditions for this to be a monad there. These make s itself into a monad on A in K . The 2-cell λ is now what's called a distributive law between these two monads, which is exactly what you need to "compose" these two monads and get another monad.
Think about this as being like the tensor product of rings. R ⊗ S is the tensor product of the underlying abelian groups, with multiplication The point is we're trying to do something very similar, but here we're in a world where the tensor product is not commutative, so we don't have the twist. So λ plays the role of the twist; it's a "local" commutativity that only applies to these two objects. The conditions put on it are exactly what we need to make the composite st into a monad. For example, the multiplication on st is then The notion of distributive law, in the ordinary case of categories, is due to Jon Beck, and he proved that we have a bijection between distributive laws ts → st and "compatible" monad structures on st, and also to liftings of s to A t (whenever A t exists). It's not as well known as it should be and is frequently rediscovered.
You can also do this for K co or K op or K coop , of course. A distributive law in K op is formally the same as a distributive law in K , but now rather than liftings of s to A t , it gives you extensions of t to A s along the left adjoint f s : A → A s . Remark 8.1. Operads are monoids in a monoidal category, so there is a corresponding notion of distributive law between operads. Furthermore, the passage from the monoidal category of collections to the monoidal category of endofunctors is strong monoidal, so distributive laws between operads induce distributive laws between the induced monads, and this process is compatible with the formation of the composite operad/monad. Just as not every monad arises from an operad, not every distributive law between monads arises from a distributive law between operads, even when the monads themselves do arise from operads.
Example 8.2. Groups are particular monoids in Set, so there is a corresponding notion of distributive law. If a group G acts on a group H, then there is a distributive law G × H → H × G sending (g, h) to (g.h, g), and the induced "composite" is the semidirect product H ⋊ G. This generalizes to arbitrary monoids in a cartesian monoidal category.
8.4. Eilenberg-Moore objects as limits. There are two ways to see Eilenberg-Moore objects as weighted limits. Remember that way back in Section 3.1, we saw that monads t in K correspond to lax functorst : 1 → K . Then the lax limit oft is exactly the EM-object A t . I haven't explicitly discussed lax limits of lax functors, but it's not hard to extend the definition of lax limit to cover this case. Alternatively one can replace the lax functor by the corresponding 2-functor out of the "lax morphism classifier", and then just take the lax limit of the 2-functor. Let's see how this would work.
First recall howt is defined. It sends * to A, and 1 * to an endomorphism t : A → A, the unit is the lax unit comparison, and the multiplication is the lax composition comparison. To understand the lax limit of these sorts of things, we should think about lax cones. A lax cone would involve a vertex C of K , with just one component C a −→ A, and a lax naturality 2-cell for every 1-cell in 1: and some conditions. The lax morphism classifier on 1 is a 2-category mnd with a bijection 2-functors mnd −→ K lax functors 1 −→ K but such lax functors are in turn the same as monads in K . Thus mnd is the universal 2-category containing a monad. Remember that a monad in K is the same as a monoid in a hom-category, and we know the universal monoidal category containing a monoid is the "algebraic ∆", the category Ord f of (possibly empty) finite ordinals. This is not the ∆ of simplicial sets: an extra object has been added. Thus mnd has one object * and mnd( * , * ) = Ord f . Now we have a limit notion (t → A t ), and we want to know the corresponding weight J : mnd → Cat, so that {J,t} = A t . We saw in Section 6.9 that the recipe for calculating J is to consider the Yoneda functor mnd → [mnd, Cat] op and form the limit of it, or equivalently the colimit of mnd op → [mnd, Cat]. The colimit is the Kleisli object; since we are in a presheaf 2-category [mnd, Cat] it is computed pointwise. The weight is called alg; it's now a straightforward exercise to calculate it.
Of course, in general, alg-weighted limits may or may not exist. Subject to the existence of the relevant limits, they can be built up from other limits we already know: • Then take the equifier of k(ηk) and 1 to get an A 2 k ′ −→ A 1 such that the identity law holds.
• Finally take the equifier of something else to get the associativity.
In particular, this shows that EM-objects are PIE-limits, in fact finite PIE-limits. 8.5. Limits in T -Alg ℓ and T -Alg c . T -Alg ℓ and T -Alg c are, recall, the 2-categories of strict T -algebras with lax and with colax morphisms. Recall also that we had nice pseudo-limits in T -Alg; here it's much harder.
In T -Alg ℓ , you have oplax limits, and in T -Alg c you have lax limits (it's a twisted world we live in!) These are much more restricted classes of limits, not including inserters, equifiers, comma objects and many of our other favourite limits.
I described how to construct inserters and equifiers in T -Alg: form the limit downstairs and show that the thing you get canonically becomes an algebra. This involves morphisms (f, f ) and (g, g) between T -algebras (A, a) and (B, b), and 2cells f k → gk for some k. If you look carefully at the construction, you'll see that f needs to be invertible, but g can be arbitrary. So you can form inserters and equifiers in T -Alg ℓ provided that one of the 1-cells (the one that is, or tries to be, the domain of the 2-cells) is actually pseudo.
Dually, in T -Alg c , it's the other 1-cell which needs to be pseudo. Now the Eilenberg-Moore object of a monad (A, t) can be constructed using the inserter k : C → A of t and 1 A , and then an equifier (see Section 8.4). Furthermore 1 A will always be strict, and it turns out that T -Alg c does have Eilenberg-Moore objects for monads. The most important case is where T -algebras are monoidal categories and so T -Alg c has opmonoidal functors. Then a monad in T -Alg s is an ordinary monad for which the category is monoidal, the endofunctor opmonoidal, and the natural transformations are opmonoidal natural transformations; this is sometimes called a Hopf monad. 8.6. The limit-completion approach. We can now see EM-objects as weighted limits in the strict sense, and there's a well-developed theory of free completions under classes of weighted limits. So we can form the free completion EM(K ) of a 2-category K under EM-objects; or we can form the corresponding colimit completion KL(K ), which freely adds Kleisli objects. These are related: The colimit side is more familiar to construct. To freely add all colimits to an ordinary category, we take the presheaf category; to add a restricted class, we take the closure in the presheaf category under the colimits we want to add. So here, to get KL(K ), we take the closure of the representables in [K op , Cat] under Kleisli objects. It's part of a general theorem that this works, at least when K is small.
Sometimes it can be tricky to calculate exactly which things appear in this completion process. You start with the representables and throw in the relevant colimits of representables. There will now be new diagrams, and we may have to add colimits for these. This can continue transfinitely. The nice thing about the case of Kleisli objects is that, as we shall see, it stops after one step.
Colimits in the functor category are constructed pointwise, so we construct Kleisli objects as in Cat. The key facts are: • A left adjoint in Cat is of Kleisli type if and only if it is bijective on objects; • These are closed under composition. Now, given a monad t on A we throw in the Kleisli object A t in [K op , Cat], which may have a new monad s on it. We then throw in its Kleisli object for s to get (A t ) s , but then the composite is also a bijective-on-objects left adjoint, hence (A t ) s is also a Kleisli object for a monad on A. Thus this is a 1-step process. Therefore, we can identify (up to equivalence) the objects of KL(K ) with monads in K , and then explicitly describe morphisms and 2-cells between them in terms of K itself.
In the dual case EM(K ) = (KL(K op )) op we get • The objects are the monads in K , • The morphisms are the monad morphisms (same as in mnd(K )), and (B, s) are 2-cells m → sn (which should look "Kleisli-like") with some compatibility with t. Composition is like in the Kleisli category. Think of sn as the "free s-algebra on n", so using the universal property of free algebras, can express this as something sm → sn, and express compatibility that way.
Why is this a good thing to do? (i) We still have a fully faithful inclusion id : K → EM(K ), and by general nonsense for limit-completions, a right adjoint to id is just a choice of EMobjects in K . (ii) It comes up in examples. If we start with Span, we've seen that categories are just monads in Span, and that functors can be seen as special morphisms between such monads; now we can also deal with natural transformations. There is a 2-functor Cat → KL(Span) which is bijective-on-objects and locally fully faithful, so that KL(Span) captures precisely the notion of natural transformation. This works equally well for Cat(E), for V -Cat, or for generalized multicategories. (iii) Remember that a distributive law is a monad in mnd(K ). The multiplication and unit are 2-cells in mndK , so if we change the 2-cells, the notion of monad changes. A monad in EM(K ) is more general: we call it a wreath, since the composition operation is a wreath product.
A wreath still lives on a monad (A, t) in K . We have an endomorphism s : A → A as before, along with a 2-cell λ : ts → st with some conditions as before, but s is no longer a monad: the multiplication is now something ν : ss → st, and the unit σ : 1 → st. You can still make sense of associativity and unit using λ, but everything ends up in st. Ultimately this gives a monad structure on st, which is called the wreath product or composite of s and t.
For example, consider the monoidal category Set under cartesian product. This can be regarded as a one-object bicategory, and so, after strictification, as a 2category. Let G be a group acting on an abelian group A, and consider a normalized 2-cocycle G × G ρ −→ A. We consider A as a monoid (in Set). G happens also to be a monoid (in fact a group), but the monoid structure isn't used directly. Rather we have the action λ : G × A → A × G (g, a) → ( g a, g) and the "A × G-valued multiplication" which gives a wreath, and so induces a monoid structure A ⋊ G (which is actually a group). The multiplication is the usual one coming from the cocycle.
There's a corresponding thing for Hopf algebras, giving a type of "twisted smash product". 8.7. The module-theoretic approach. Here's another point of view. It's particularly suggestive if we take K to be the monoidal category (1-object bicategory) Ab of abelian groups. Then a monad (monoid) in Ab is a ring R: the objects of EM(Ab) are the rings.
We Composition of 1-cells is the ordinary module composition, but because of the freeness condition, don't need to use any coequalizers. If we were to look at KL(K ), we'd get the left-free modules.
One could also consider arbitrary modules. This is an important construction, but it requires the bicategory to have coequalizers in the hom-categories in order to define composition; and these coequalizers to be preserved by whiskering on either side in order for this composition to be associative (up to isomorphism), and so this has rather a different flavour. 8.8. References to the literature. The formal theory of monads goes back of course to [52]; for the account using limit-completions, and the notion of wreath see the much later sequel [39]. Distributive laws (for ordinary monads) are due to Beck [3]. The Eilenberg-Moore object was described as a lax limit of a lax functor in "Two constructions on lax functors" [53]: it was the first construction, the Kleisli object was the second. This was done using weighted limits in [54]. For limits in T-Alg l , including Eilenberg-Moore objects for comonads, see [36]; for Hopf monads see [47] and also [46].

Pseudomonads
These are formally very similar to monoidal categories. A pseudomonad involves a thing T , which plays the role of a category, a multiplication m : T 2 → T , a unit i : 1 → T , an associativity isomorphism unit isomorphisms λ, ρ, and so on, all looking very like a monoidal category. Just as monads can be defined in any 2-category or bicategory, pseudomonads can be defined in any Gray-category or tricategory.
The monoidal 2-category Cat (with cartesian structure) can be regarded as a one-object tricategory, and a pseudomonad in this tricategory is precisely a monoidal category. The associativity pentagon becomes a cube, relating ways to go from T 4 to T , involving a bunch of µ's and a pseudonaturality isomorphism. In monoidal categories, one side of the cube corresponds to S S j j j j j j j j j j j j j j j and the other side corresponds to where in general, the equality will be replaced by an isomorphism, saying that it doesn't matter whether we tensor A and B first, then C and D, or vice versa.
to make it a Gray-category. You basically take the composition in Ord f , use that to define it on the generators, then build it up to deal with arbitrary 1-cells, but since the relations only hold up to isomorphism, that's why the Gray-tensor appears. Now you prove that this has the universal property that I said it does, so it really does classify pseudo-monads in a Gray-category. I'm certainly not going to do that. Roughly, how does it go? Given a pseudomonad, we have and so on, which defines the putative Gray-functor Psm → A on objects, 1-cells, and 2-cells. The fun starts when we come to the 3-cells: we have µ, λ, and ρ, and we need to build up all the other required 3-cells. The idea is that for any 2-cell f in Psm (any 1-cell in the above picture, generated by m's and i's), there is a normal form f and a unique isomorphism f ∼ = f built up out of the 3-cells in Psm that one might expect to call µ, λ, and ρ. Thus any 3-cell f ∼ = g in Psm can be written as a composite f ∼ = f = g ∼ = g, and this can be used to define the Gray-functor Psm → A on a 3-cells. The details of the rewrite system that these normal forms come from are a bit technical.
9.2. Algebras. The next step is to construct a particular weight Psa : Psm → Gray such that for any Gray-functor T : Psm → A, the weighted limit {Psa, T} is the object of pseudoalgebras, pseudomorphisms, and algebra 2-cells (all suitably defined) for the pseudomonad corresponding to T. Again, this is sort of a "cofibrant replacement" for the corresponding one for 2-categories, although the domain has changed. I won't do this, but I do want to make one point. It is the fact that we are working with Gray-categories rather than 3-categories which causes the pseudomorphisms to appear here. Recall that for ordinary monads, we talked about the fact that to give something C → A t is the same as a : C → A with an action α : ta → a, where c → (αc : tac → ac), and γ : c → d is sent to tac αc G G taγ ac aγ tad αd G G ad and the fact that aγ is a homomorphism can be seen as the naturality of α. There's an analogous fact for operads and Lawvere theories: the actions are natural with respect to homomorphisms. When we come up to the Gray situation, we are thinking of pseudonatural transformations, hence the square commutes up to isomorphism, so we get pseudomorphisms, not strict ones. That's the "reason" for making the formal theory of pseudo-monads live in the Gray context. Even if you wanted only to consider 3-categories A, the fact of working over Gray gives you the pseudomorphisms. 9.3. References to the literature. The basic definitions involving pseudomonads in Gray-categories were given in [45,44], or in the equivalent language of pseudomonoids in [11]; for the universal pseudomonad, and the Gray-limit approach to pseudoalgebras, see [32]. For further work see also [8,56,40].

Nerves
In this section we use ∆ for the "topologists' delta", the category of non-empty finite ordinals. As usual, we write [n] for the ordinal {0 < 1 < . . . < n}. This section is particularly light on details; see [38] for more.
The nerve of an ordinary category C is the simplicial set N C in which • a 0-simplex is an object • a 1-simplex is a morphism • a 2-simplex is a composable pair and its composite and so on. This process gives a fully faithful embedding where "nlax" indicates that we are taking the normal lax functors as morphisms: these are the lax functors which strictly preserve identities. A lot of the time you want to talk about homomorphisms or strict homomorphisms rather than lax ones. If you want to get your hands on those there are various possibilities. One is to have a bit more structure than a simplicial set: specify as extra data a class of simplices called the thin simplices. Every degenerate simplex is thin, but there can also be non-degenerate thin simplices. The resulting structure is called a stratified simplicial set. The stratified nerve of a 2category is the usual nerve, made equipped with a suitable stratification, in which a 2-simplex is thin when the 2-cell it contains is in fact an identity. (There is also a different stratification, often used for nerves of bicategories, in which a 2-simplex is then when the 2-cell is invertible.) One can now characterize the stratified simplicial sets which are stratified nerves of 2-categories (or bicategories); and indeed similarly for strict or weak ω-categories. The stratified simplicial sets which arise as nerves of ω-categories are called complicial sets.
A different way to specify this extra structure is to use simplicial objects not in Set but in Cat. For a bicategory B, the 2-nerve N 2 B of B (or just N B from now on) is a functor N B : ∆ op → Cat • the category (N B) 0 of 0-simplices is the discrete category consisting of the objects of B. • the category (N B) 1 of 1-simplices has morphisms of B as objects and 2-cells of B as morphisms. So far this looks like some kind of enriched nerve. • the category (N B) 2 of 2-simplices doesn't need to include the 2-cells, since we already have them; we can therefore take 2-simplices to be invertible 2-cells pε = β. This implies that if and pε = id, then ε = id; (d) X 3 → cosk 1 (X) 3 (could also use the 2-coskeleton) is also a discrete isofibration (e) The Segal maps are equivalences.
A Tamsamani weak 2-category, or just Tamsamani 2-category, since no strict notion is considered, is a functor X : ∆ op → Cat satisfying (a) and (d); thus the 2-nerve of a bicategory is a Tamsamani 2-category. Tamsamani suggests a way of getting from a bicategory to a Tamsamani 2-category, but it is not the 2-nerve construction given here.
The inclusion of NHom into Tamsamani  in analogy with the case of nerves of ordinary categories. If you try to do this, the simplicial identities fail, due to the failure of associativity. Actually, what we do is to take the pseudo-limit of the composition functor as (N B) 2 . And this continues: for composable triples, we have and N B 3 is the pseudo-limit of this whole diagram. Going on, we can construct each (N B) n as the pseudolimit of some higher cube.

10.1.
References to the literature. The notion of nerve of a bicategory is due to Street. For nerves of ω-categories as stratified simplicial sets, see [60], and the references therein. The notion of 2-nerve of a bicategory is described in [38]. Tamsamani's definition of weak n-category is in [58].
Acknowledgements. It is a pleasure to acknowledge support and encouragement from a number of sources. I am grateful to the Institute for Mathematics and its Applications, Minneapolis for hosting and supporting the workshop on higher categories in 2004, and to John Baez and Peter May who organized the workshop and who encouraged me to publish these notes. The material here was based on lectures I gave at the University of Chicago in 2006, at the invitation of Peter May and Eugenia Cheng. I'm grateful to them for their hospitality, and the interest that they and the topology/categories group at Chicago took in these lectures. I'm particularly grateful to Mike Shulman, whose excellent TeXed notes of the lectures were the basis for the companion.