How to compute a monad from this adjunction

adjoint-functorscategory-theorymonads

What are the steps to computing a Monad from an adjunction?

There has to be the following steps:

  1. Compute the endofunctor on the base category given the adjunction
  2. Compute the product natural transformation
  3. Compute the unit natural transformation

I would like to see each of these steps and I am interested in the following adjunction. There is a functor from the category, Gpd, of Groupoids and Cat, of Categories. It has an adjoint called the core which goes in the opposite direction. Can I see this computation done with this adjunction?

Best Answer

So, this is not going to be a particularly enlightening example, but we can definitely walk through it together. In the interest of showing something a bit more complex as well, I've also included a worked version of another pair of adjoints.

So you're totally right. Every groupoid is a category, so there is an inclusion functor

$$\iota : \mathsf{Grpoid} \to \mathsf{Cat}$$

Moreover, by ignoring any non-isos, we can look at "the biggest groupoid living inside $\mathsf{Cat}$". This gives us a functor

$$\text{core} : \mathsf{Cat} \to \mathsf{Grpoid}$$

The first question to ask yourself after "is this an adjunction?" is "which one goes on which side?". Since a functor sends isos to isos, the image of any groupoid under a functor must be a groupoid itself. So a functor $\iota G \to C$ must factor through the core of $C$ (which is the largest possible groupoid in $C$). Succinctly:

$$\iota \dashv \text{core}$$

So now we want to look at the monad associated to this adjunction. I always remember this in terms of the free-forgetful adjunction of an algebraic structure. For groups, say, we have

$$(F : \mathsf{Set} \to \mathsf{Grp}) \dashv (U : \mathsf{Grp} \to \mathsf{Set})$$

This should give us a monad on $\mathsf{Set}$, so our monad must be $UF : \mathsf{Set} \to \mathsf{Set}$.

By analogy, our monad is

$$\text{core} \circ \iota : \mathsf{Grpoid} \to \mathsf{Grpoid}$$

And now we see why this is not a particularly enlightening example: If we look at the largest groupoid contained in $G$.... Well, $G$ is already a groupoid. So we're actually looking at the identity monad $I$!1

Of course, we can still work out the things that you've asked for.

  • The endofunctor $\text{core} \circ \iota$ sends $G \mapsto G$ and sends a groupoid hom to itself.
  • The product is a natural transformation from $\text{core} \circ \iota \circ \text{core} \circ \iota \Rightarrow \text{core} \circ \iota$. But this is a natural transformation $I^2 \Rightarrow I$ from the identity monad to itself. In particular, each component of this natural transformation is the identity.
  • The unit is also somewhat silly. We need a map from $I \Rightarrow \text{core} \circ \iota$. But this is just a map from $I \Rightarrow I$, and again taking the identity arrows on each component works.

As a slightly more instructive example, here is something that I thought about a little while ago:

Given a graph $\Gamma = (V,E)$, we can form the Right Angled Artin Group

$$A\Gamma = \langle V~|~[x,y] \iff xEy \rangle$$

This is the free group on the vertices, where we force two vertices to commute when they're connected by an edge.

Conversely, given a group $G$, we can form is Commutation Graph $CG$ whose vertices are group elements, and we connect two group elements exactly when they commute.

You can convince yourself that these form a pair of adjoint functors $A \dashv C$ between $\mathsf{ReflGph}$ and $\mathsf{Grp}$. Here $\mathsf{ReflGph}$ is the category of graphs (sets equipped with a reflexive, symmetric binary relation). We really need reflexivity here (do you see why?) but that's fine. Graph homomorphisms are the natural thing: Functions on the vertices which preserve (but don't necessary reflect) the edge relation.

Now I claim $A \dashv C$ is a pair of adjoint functors. So then the monad will be $CA : \mathsf{ReflGph} \to \mathsf{ReflGph}$. It sends a graph $\Gamma$ to a new graph $CA\Gamma$ with

  • a vertex for every element of $A\Gamma$. So we roughly have a vertex for each word in the vertices of $\Gamma$, but we have to declare certain words equivalent (like $xy$ and $yx$ for adjacent $x,y \in \Gamma$).

  • an edge connecting any two commuting elements of $A \Gamma$. So, for instance, we have a countable clique connecting all of the $x^n$ for $n \in \mathbb{Z}$. Moreover, we have an edge from the empty word to every other vertex.

Ok. So this is a monad on $\mathsf{ReflGph}$. What are the operations?

  • The product should send $CACA \Rightarrow CA$. So we need to know how to map the vertices of $CACA\Gamma$ to vertices of $CA\Gamma$. But vertices of $CACA\Gamma$ are words in the vertices of $CA\Gamma$. That is, words of words of vertices of $\Gamma$. So concatenation gives us a map from $CACA\Gamma \to CA\Gamma$. This may sound complicated at first, but after some meditation it really is simple: Given a word of words, say $[[x,y],[z],[w,x^{-1},y^{-1}]]$ we concatenate these to get the word $[x,y,z,w,x^{-1},y^{-1}]$.

  • The unit, though, is simple even on first hearing! $\Gamma$ sits naturally as a subgraph of $CA\Gamma$ by sending each vertex to the word of length $1$ containing that vertex.


1: As an aside, this situation happens often enough to have a name. When the inclusion functor $\mathcal{C} \hookrightarrow \mathcal{D}$ admits a right adjoint we call $\mathcal{C}$ a coreflective subcategory of $\mathcal{D}$.


I hope this helps ^_^

Related Question