In a previous post, we noted that for a monad , and set , there is a bijective correspondence between:

- Eilenberg-Moore algebras for the monad with underlying set .
- Monad morphisms of type with codomain the continuation monad induced by .

We also briefly remarked that this observation can be generalised beyond the category . In this post, using some of the ideas we have learned in recent posts, we are going to explore relationships of this type between algebras and morphisms of monads in more detail.

## Enrichment

We previously encountered enriched monads. Recall that for a monoidal category , a -enriched category has an object in , rather than a mere set. We can also defined -enriched functors and natural transformations which respect this structure.

**Example**: The category has objects preorders, and morphisms monotone maps. This category has products, and so can be seen as a monoidal category with respect to this structure. A -enriched category is a category in which:

- The collection of morphisms of type is a preorder.
- Composition of morphisms is monotone in both arguments. That is and implies that .

A -functor a functor which is also monotone in its action on morphisms.

If a category s monoidal closed, this category is itself a -category, with hom object the exponential . This is usually phrased as being enriched over itself.

**Example**: The category is Cartesian closed, and therefore is enriched over itself. The exponential in is simply the collection of morphisms of that type, with the pointwise order on monotone functions.

If our base of enrichment is symmetric monoidal closed, then for a -category we can define the opposite category by setting , and defining the composition morphism of type

as the composite

where is the symmetry, and is the composition morphism in .

With these technical preliminaries in place, for a symmetric monoidal category , seen as enriched over itself, and -object , there is a -functor$:

As in the unenriched case, this functor is adjoint to itself, and so induces continuation or double dualisation -enriched monad . We then get a generalisation of the previous result, that for any other -monad , and -object there is a bijective correspondence between:

- Eilenberg-Moore algebras for the monad , with underlying object .
- Monad maps .

So the previous result generalises to enriched category theory. Note that the assumptions are unfortunately quite restrictive, as we can only consider monads on the base of enrichment itself. This is the enriched version of the fact the ordinary category theory result only applied to monads. This seems frustrating, so it is natural to ask if we can do any better.

## Codensity and Formality

We previously encountered codensity monads. These were built using right Kan extensions. For a functor , the codensity monad induced by has endofunctor . We will write for this codensity monad.

With any unfamiliar construction, it is natural to consider what it does in some simple cases. One obvious choice is to fix a set , and consider the codensity monad induced by the functor that picks out that object. This will induce a monad on . Using some standard tools for calculating right Kan extensions in , we find something familiar. is the continuation monad induced by .

We can therefore rephrase the original result that motivated our investigations as saying for monad on , there is a bijective correspondence between:

- Eilenberg-Moore algebras for , with underlying set .
- Monad morphisms , with codomain the codensity monad induced by the functor .

So far, we don’t have anything new, except a shift in viewpoint from emphasising the continuation monad, to a codensity based perspective. It is natural to then consider whether there is anything special about the category in this observation, and in fact there isn’t. So we can make a much stronger statement.

For a monad and -object , assuming the required right Kan extensions exist, there is a bijective correspondence between:

- Eilenberg-Moore algebras for , with underlying object .
- Monad morphisms , with codomain the codensity monad induced by the functor .

We can go further still, and ask if there’s anything special about the fact we’re doing category theory? Can we use the formal category theory perspective we’ve introduced in recent posts to get a more general result?

To do so, we must address a couple of wrinkles:

- We need to abstract the notion of right Kan extension to an arbitrary 2-category. This is routine, we just require the same universal property, but now of abstract 0,1 and 2-cells, rather than categories, functors and natural transformations. The resulting structures are usually called a
**right extensions**. - We have been making heavy use of the terminal category to pick out objects, via functors of the form . This may not make sense in an arbitrary 2-category.

To address the second point, we are looking to generalise from Eilenberg-Moore algebras built upon individual objects, to something more suitable in an arbitrary 2-category. We have already seen the required abstraction before, left monad actions, which solved a similar problem when we looked at Eilenberg-Moore objects.

Putting this all together, we get a much more general statement. Let be a 2-category, and a monad in . For a 1-cell , there is a bijective correspondence between:

- Left actions with underlying 1-cell .
- Monad morphisms with codomain the codensity monad induced by .

So we learn that the previous result only hinged on the universal property of extensions, and nothing specific to category theory. The previous result about enriched monads arises as a special case in the 2-category of -categories.

## Conclusion

We’ve explored a classic result that often crops up in many guises in the literature. By exploiting our new tools of codensity monads, formal category theory, and left monad actions, we abstracted away a lot of distracting clutter, and reached a clearer understanding of what was really making this bijection work.

**Further reading**: This post was motivated by some discussions in the excellent “A 2-Categories Companion” by Lack, which is well worth reading. The material about enriched dual dualisation monads is almost exclusively contained in Kock’s “On Double Dualization Monads”. Readers wanting more than the details we briefly sketched will find a thorough and very readable account in that paper.

## One thought on “Monad maps and Algebras Redux”