Monads and Adjunctions
21 April 2024- Monads
- Monads from Adjunctions
- Adjunctions from monads?
- Modules over a monad
- Free Modules
- The Reconstruction
- Outlook
Welcome to another episode of categories by diagrams! Today we will investigate the connection between adjunctions and monads. The results I present here are quite elementary. However, it is a nice exercise for learning how to utilize string diagrams. Of course, to the trained category theorist this approach will be less efficient than directly applying Yoneda-type arguments. Still, I think the string diagrams let us easily understand the underlying structure (compared to the usual commutative diagrams.)
Note: All diagrams use the notation from my post about Kan extensions.
Monads #
Let be category. The functor category is (strict) monoidal, and so we may define monoid objects in it. A monad is a monoid object in this category. More explicitly, a monad is a functor together with a multiplication and unit
such that the monoid axioms are satisfied. The associativity and unit axioms are readily expressed in string diagram notation.
Notice that by horizontally flipping the string diagrams we obtain the definition of a comonad which has to satisfy the coassociativity and counit axioms.
Monads from Adjunctions #
It turns out that every adjunction gives rise to both a monad and a comonad in a natural way. In fact, this is obvious from the string diagrams!
Suppose we have an adjunction with unit and counit . Then is already the unit of the corresponding monad where . The multiplication is given by whiskering the counit in the obvious way. The associativity and unit laws are a direct consequence of the zig-zag identities and naturality.
By flipping the diagrams horizontally and exchanging the roles of and we obtain a comonad with underlying functor .
Adjunctions from monads? #
We understand that every adjunction yields a monad. But does every monad come from an adjunction? More precisely: Given a monad , can we construct an adjunction whose monad is ? The answer to that question is “yes” and we can do it in more than one way. One such construction is the Eilenberg-Moore adjunction which effectively reconstructs the monad from its category of modules.
Modules over a monad #
Traditionally a module over a monoid is an object on which the monoid acts. We generalize this notion to monads: A module over a monad is an object with a -action in that satisfies the usual axioms we would require of a module action. To express the laws in string diagram notation, we identify objects with the functor that selects the object. A morphism in corresponds to a natural transformation between those functors. Here is the resulting string diagram for the action, along with the two module axioms (1) and (2).
Let be two -modules with actions and . We say that is a morphism of -modules, if it is compatible with the actions, i.e. the following diagram equation must hold.
It’s obvious from the diagrams that -modules form a category. This category is called the Eilenberg-Moore category and usually denoted by .
Free Modules #
To reconstruct we need to define a functor which assigns each object in a “free” -module. Since we have no information apart from and , the only reasonable thing to do is to use as an action on which doesn’t really depend on any information about . Indeed, it is completely obvious from the diagrams that is an action on for any because it doesn’t interact with at all.
Similarly, we can now observe that any morphism in is lifted by to a morphism of -modules. This is simply due to naturality of .
Hence, we can define the functor via
The Reconstruction #
It is left to show that where simply forgets the action. We want the unit of to be the unit of the adjunction. The components of the counit have the form so we define them to be the -action of each . The naturality condition of is merely stating that all morphisms in are -equivariant which holds by definition. The zig-zag identities are easy to work out using string diagrams.
Outlook #
We have seen one particular way to build an adjunction for a given monad. Another way to build an adjunction from a monad is by using the associated Kleisli category. By turning the adjunctions that produce a fixed monad into a category, one can show that the Eilenberg-Moore construction is terminal and the Kleisli construction is initial in this setting. In fact, one can show that those two constructions are equivalent when all modules over the monad are free.
Scroll to Top