### Formal Theory of Monads (Following Street)

#### Posted by Emily Riehl

*Guest post by Eduard Balzin*

The Kan extension seminar continues, and with it we now come to the paper by Ross Street. Published in 1972, this paper is one of the first instances where the notion of a monad was made relative to an arbitrary 2-category. A lot of aspects, such as algebras over a monad, Eilenberg-Moore and Kleisli categories, the relation with adjunctions, were generalised accordingly. Other topics involve representability, duality, and the example of $\mathbf{Cat}$. I will therefore try to talk about this paper in detail, and add something of my own.

Myself, in the course of my (higher)-categorical education, I have not learned in full about monads. I do not mean definitions or main theorems, but rather the answer to the question *why monads*. While preparing for the seminar, I’ve managed to give a series of answers to this (my own) question, and I hope that the discussion will take me (and everyone else) even further.

Let me sincerely thank Emily Riehl for organising the seminar. I truly hope it will be a new castle on the landscape of categorical life. I am also quite grateful for the participants of the seminar, who have greatly contributed during the online discussion and in their readers discussion. It all makes me happy.

I. What follows below is my summary and exposition of Street’s paper. At times, I add words of mine. The notation is not exactly of Street, but follows him closely for reading convenience. In addition, I rearranged some of the paragraphs in my exposition.

At the time this paper has written, monads had been around for quite a while and had achieved some recognition due to their usefulness in homological algebra and homotopy theory. Indeed, this is not the first paper where a monad internal to an arbitrary (weak) 2-category appears. Apparently the first mention of such general monads was made by Jean Bénabou in 1967. Formal Theory of Monads also restricts its attention to 2-categories instead of bicategories, strict 2-adjunctions instead of coherent ones. This brings more transparency to the theory but lessens the ability to apply the results of this paper directly.

II. A *monad* in a 2-category $K$ is a monoid object $S$ inside $K(X,X)$ for some $X \in K$. Thus we have ‘multiplication’ 2-cells $\mu: S S \to S$ and ‘unit’ $\eta: 1_X \to S$ such that if we draw associativity and unit diagrams, we witness commutativity of those. A *monad morphism* $(U,\phi):(X,S) \to (Y,T)$ consists of a 1-cell $U: X \to Y$ together with a 2-cell $\phi: T U \to U S$. It should be required that $\phi$ preserves units and associativity. A *monad functor transformation* $(U, \phi) \to (V, \psi)$ is a 2-cell $U \to V$ suitably commuting with 2-cells. For each $K$, this defines a 2-category $\mathbf{Mnd}(K)$, the construction is actually functorial in $K$.

Maybe some readers are not willing to take this definition for granted. Then I remind them of the following situation in $\mathbf{Cat}$. For a monad $S: C \to C$, a $C$-*algebra* is an object $x \in C$ equipped with a map $S x \to x$, commuting suitably with $\mu$ and $\eta$. The map of monads $(U,\phi):(C,S) \to (D,T)$ will send an $S$-algebra $x$ to a $T$-algebra.

A 2-category $K$ admits *construction of algebras* if the inclusion 2-functor $Inc:K \to \mathbf{Mnd}(K)$, sending $X$ to $(X,1_X)$, has a right adjoint (in the strict 2-categorical sense) $Alg:(X,S) \mapsto X^S$. ($Inc$ always has a left adjoint $Und:(X,S) \mapsto X$.) The counit of 2-adjunction gives rise to a monad morphism $(U^S, \chi) : (X^S,1) \to (X,S)$ through which each morphism of monads $(Y,1) \to (X,S)$ factors. The adjunct of $(S, \mu) \colon (X,1) \to (X,S)$ defines a map $J^S:X \to X^S$ that is left adjoint to $U^S$ and such that $S = U^S J^S$. This gives us a theorem which says that when $Alg$ exists, each monad is generated by an adjunction.

Also, for each adjunction $J:X \leftrightharpoons A:U$, there is a *comparison 1-morphism* $A \to X^{UJ}$. $A$ is *monadic* when this is an equivalence (Street asks for an *isomorphism*, though).

III. The paper also studies representability questions. In $\mathbf{Cat}$, we know that $C^S$ has the form of the category of algebras for a monad mentioned above. By direct consideration, it turns out, that there is an isomorphism (of categories — things are strict in this paper!) $K(Y, X^S) \cong K(Y,X)^{K(Y,S)}$ where $K(Y,S):K(Y,X) \to K(Y,X)$ is the monad induced by Yoneda embedding. With this, we have two things to mention:

(a) $X^S$ represents a functor $K^{op} \to Cat$. It turns out that $X^S$ can be obtained as a weighted limit. This is observed but not proved in the paper, but was actually done afterwards.

(b) Many things about monads in $K$ can be deduced by passing to $\mathbf{Cat}$-presheaves. For instance, $N:A \to X^S$ is an equivalence iff for each $Y \in K$ the functor $K(Y,N):K(Y,A) \to K(Y, X^S) \cong K(Y,X)^{K(Y,S)}$ is an equivalence. So $A$ is monadic iff $K(Y,A)$ is for each $Y$.

IV. For a given object $X$ of $K$, we can form the comma category $\mathbf{Mnd}(K)/X$ (we use the underlying functor) of monads over $X$. One can ask, given a monad $(A,R)$ and $E: A \to X$, if there is a pushforward monad $E_{\ast} R$ on $X$ which is universal (any monad morphism $(A,R) \to (X,S)$ factors through the canonical one $(A,R) \to (X,E_{\ast} R)$). Those $(A,R,E)$ for which this pushforward exists are called *tractable*.

For instance, we can try taking $E_\ast R$ to be the right Kan extension of $E R: A \to X$ along $E: A \to X$, and this (if exists) will give us a desired universal pushforward. When $R$ is unity, this is precisely what is called *codensity monad*. Observe that when $E$ has a left adjoint $J$, we can always take $E_{\ast} {1_A} = E J$, and this will satisfy the desired universal property. Thus codensity monads are monads one would get if $E:A \to X$ actually had a left adjoint.

Let us restrict our attention to the category $\mathbf{Mnd}(X)$ which is the same as the inverse image of the underlying functor $\mathbf{Mnd}(K) \to K$ over $X$. The construction of algebras can be actually seen as a ‘semantics’ functor $Sem: \mathbf{Mnd}(X) \to \mathbf{Mnd}(K)/X$, $(X,S) \mapsto (X^S,1,E^S)$, and it will land in the full subcategory $\mathbf{Tract}(X)$ of tractable objects. For each tractable object, forming the universal monad gives us the ‘structure’ functor $Str: \mathbf{Tract}(X) \to \mathbf{Mnd}(X)$, $(A,R,E) \mapsto (X,E_{\ast} R)$. $Sem$ is right adjoint to $Str$, and the counit of this adjunction is moreover an isomorphism.

V. For a 2-category $K$, there are its duals $K^{op}$, $K^{co}$, and $K^{coop}$. There is a big section of the paper which studies questions involving interpretations of monads and the construction of algebras in these dual 2-categories.

In $K^{op}$ we again get monads (and so if $S$ is generated by an adjunction in $K^{op}$, same is true in $K$), but the functors between them are different. Precisely, if we consider $\mathbf{Mnd}(K^{op})^{op}$ (so that the direction of 1-morphisms is the same as in $K$), we get that a 1-morphism $(X,S) \to (Y,T)$ here is a *monad opfunctor* in $K$: a 1-cell $U: X \to Y$ with a 2-cell $\phi: U S \to S T$, opposite direction. The category of algebras in this case is denoted $X_S$, and comes with canonical $J_S: X \to X_S$. That’s the generalisation of Kleisli category.

Opfunctors often appear if one considers adjunctions: for two monads (X,S) and (Y,T) and an adjunction $J:Y \rightleftharpoons X:U$, supplying the right adjoint $U$ with a 2-cell to make it into a monad functor is the same as supplying $J$ in a 2-cell to make it into a monad opfunctor.

Monads in $K^{co}$ and $K^{coop}$ by contrast are *comonads* in $K$. Of more interest for consideration (for reasons explained below) is the 2-category $\mathbf{Mnd}(K^{coop})^{coop}$, whose objects are comonads and morphisms are comonad opfunctors (the 2-cells are going in the same direction as 2-cells for monad functors). Again, when we have the construction of algebras for $K^{coop}$, there is a universal object $X_S$ for each comonad $S$, with the opfunctor $X \to X_S$.

If there is an adjunction $J:X \rightleftharpoons A:U$, then we get a monad on $X$ but a comonad on $A$. When we do the $X^S$ construction for a monad, the fact that $S=E^S J^S$ gives us a comonad $J^S E^S$ on $X^S$. This allows to define a 2-functor $ALG: \mathbf{Mnd}(K) \to \mathbf{Mnd}(K^{coop})^{coop}$, which sends $(X,S)$ to $(X^S, J^S E^S)$ (provided that $K$ admits the construction of algebras). Dually, there is $COALG: \mathbf{Mnd}(K^{coop})^{coop} \to \mathbf{Mnd}(K)$ (if, again, $K^{coop}$ is nice enough). A big calculation reveals that this is an adjunction: $COALG:\mathbf{Mnd}(K^{coop})^{coop} \rightleftharpoons \mathbf{Mnd}(K):ALG$ which can be thought of lifting one of the construction of algebras adjunctions $CoAlg:\mathbf{Mnd}(K^{coop})^{coop} \rightleftharpoons \mathbf{Mnd}(K):Inc$ (here $CoAlg$ is just a fancy name for the ‘coop’ of $Alg$ on $K^{coop}$). Street hypothesises if one can use this lifting idea together with ‘2-triangle’ theorems to actually prove that if $K^{coop}$ admits algebras, then so does $K$. One could hope that a version of 2-lifting theorem would obtain the right adjoint $ALG$ as above from knowing the right adjoint $Inc$ to $CoAlg$, and then apply the (dual of the) underlying functor $\mathbf{Mnd}(K^{coop})^{coop} \to K$ after $ALG$, as to show that $K$ admits algebras for monads. That would be something special, however.

The other result mentioned in this section is when $K$ has a duality involution $(-)^{op}:K \to K^{co}$. In that case, $K$ admits construction of algebras whenever $K^{op}$ does, and $Alg(X,S) \cong Alg(X^{op},S^{op})^{op}$.

VI. A *distributive law* consists of two monads $(X,S)$ and $(X,T)$ together with a 2-cell $\lambda: ST \to TS$ so that $\lambda$ makes $T$ into a monad functor $(X,S) \to (X,S)$ with $\eta_T$ and $\mu_T$ becoming monad morphism transformations (equivalently, $S$ becomes a monad opfunctor on $(X,T)$). An example here is given by

$Mon: Set \to Set$, the monoid monad, and

$Ab: Set \to Set$, the abelian group monad

(the usual distribution of $+$ and $\times$ gives a map $Ab Mon \to Mon \Ab$). By writing out what $\mathbf{Mnd}(\mathbf{Mnd}(K))$ means, one can witness that distributive laws in $K$ are the objects of $\mathbf{Mnd}(\mathbf{Mnd}(K))$. Moreover, using the $\lambda$’s coming with each distributive law, one can define a natural transformation $\mathbf{Mnd}\mathbf{Mnd} \to \mathbf{Mnd}$, which together with $Inc: Id \to \mathbf{Mnd}$ makes $\mathbf{Mnd}$ into a (3-)monad on $2$-$\mathbf{Cat}$.

In addition, one can also consider the ‘opfunctor’ monad $\mathbf{Mnd}^{op} = (-)^{op} \mathbf{Mnd} (-)^{op}$. Taking compositions like $\mathbf{Mnd}^{op} \mathbf{Mnd}^{op}$, $\mathbf{Mnd} \mathbf{Mnd}^{op}$ or $\mathbf{Mnd}^{op} \mathbf{Mnd}$ again gives distributive laws (as objects), but different kinds of morphisms between them. One can ask if the resulting monads $\mathbf{Mnd}$ and $\mathbf{Mnd}^{op}$ are related by a distributive law; however one can actually check that the law is a canonical isomorphism:

$\mathbf{Mnd}^{op} \mathbf{Mnd} \cong \mathbf{Mnd} \mathbf{Mnd}^{op}.$

VII. Essentially, the sole example of this paper is $\mathbf{Cat}$. Using the fact that, for a monad $(C,S) \in \mathbf{Mnd}^{op}(\mathbf{Cat})$, the category of algebras $C_S$ is in fact what is known as Kleisli category, which certainly exists (its objects are the same as of $C$ and morphisms are maps of the form $x \to S y$), we conclude that $\mathbf{Cat},\mathbf{Cat}^{op},\mathbf{Cat}^{co},$ and $\mathbf{Cat}^{coop}$ all admit the construction of algebras. A really nice result which follows is the statement that for a monad $S: C \to C$, $C^S \cong C \times_{Pr(C)} Pr(C_S)$ where $Pr(-)=Fun((-)^{op},Set)$ and $Pr(C_S) \to Pr(C)$ is induced by the canonical functor $J_S: C \to C_S$. So we see that algebras for $S$ is a full subcategory of presheaves on Kleisli category which are representable when restricted to $C$.

Finally, for $V$-$\mathbf{Cat}$, it is stated that the formal theory is applicable to this 2-category once a couple of properties are satisfied. Unfortunately, not much more is said about the enriched categories case in detail.

VIII. And that was it, (some of) the formal theory of monads! I must say that the 2-categorical content of that paper is really interesting, and one could ask if there is a way to proceed in the same manner in a higher $(\infty,2)$-categorical setting. Another thing is that, if one wishes to discuss monads in full, it is (as I presume) quite desirable to look beyond the formal theory for as many examples as possible. This is why I conclude my exposé with some references I know to the subjects that look interesting. Everyone is welcome to make her or his own list!

There is a follow-up of “The formal theory of monads”, called “The formal theory of monads, II”, in which the idea of $X^S$ being a weighted limit is taken seriously, to the extent that the authors consider, for a 2-category $K$, its completion $EM(K)$ with respect to these limits. The 1-interior of $EM(K)$ turns out to be the same as the one of $\mathbf{Mnd}(K)$, and moreover one can use $EM(K)$ to work with monads in a very useful way using mostly the universal property of this completion. The authors also study

wreaths— the objects of $EM(EM(K))$, and in addition the paper is quite filled with examples for the notions presented.The result everyone knows today as the Monadicity Theorem has a lot of applications. One of them which I like is the result that, given an (elementary) topos $T$, the ‘maps into the classifier’ functor $A \mapsto \Omega^A$ from $T^{op} \to T$ is monadic. Because of this, $T$ has all finite colimits. On the other hand, when I talk to some (derived) algebraic geometers, they tell me that from their experience the only place where monadicity theorem comes close to be used fully and faithfully is Tannaka duality, and even there it can be avoided as was done in some first expositions. This might be subjective; however my search of any details on the question revealed a paper named The Formal Theory of Tannaka Duality, the author of which claims that it is inspired by Ross Street’s writeup! One might want to have a look for the detail.

Monads are strongly connected with algebraic theories (the latter term can actually be used here in a general sense). What is less known, probably, is that one can use monads themselves to describe some ‘ring-like’ objects. What I mention here is the theory of generalised commutative rings (which are some special monads on $Set$) by Durov, which appeared in his thesis, and can include such things as the field of one element as an example. One can then do a lot of algebraic geometry with this monads, up to K-theory and intersection stuff.

Monads do appear in higher categories. When working with model categories, one can work with

weakmonadic projections to treat Bousfield localisation (e.g. see Section 11.2 of Simpson’s book on Segal categories). Another thing is that it is often the case that one runs into a question if the category of algebras for a monad (or even a comonad) admits a model structure. For monads, one can see this, and for comonads, this and probably the recent one(!) . Finally, our dear host of this seminar has co-authored a paper which treats homotopy coherent adjunctions and monadicity theorem in quasi-categories, in a way much simpler than originally done by Jacob Lurie in his DAG II (the approach of Lurie still has some interesting flavour, coming from the treatment of algebraic structures via fibrations).

## Re: Formal Theory of Monads (Following Street)

Thanks a lot for this summary and your very interesting remarks at the end.

I have a question about the phrasing of Theorem 6. Using your notation, Theorem 6 begins as follows:

But

Semis only defined on the assumption that $K$ admits the construction of algebras, since its definition employsAlg. So is this just a redundant qualification at the beginning of the theorem? Should the theorem be read as saying: WhenSemis defined as such, italwayshas a left adjoint? Or is there a way (which I cannot see, based on this paper) to define an analogue ofSemwithout assuming the construction of algebras, in which case the first phrase of Theorem 6 would not be redundant?