Not all Monads are Idempotent, a Cautionary Tale on Natural Transformations

145 Views Asked by At

I was scratching my head over the following for almost an hour today, and since I don't have a blog to share the resolution on, I'll post it here.

Let $\mathbb{T} = (T,\eta,\mu)$ be a monad on a category $\mathcal{C}$. Consider the following instances of the unit identities at objects $M$ and $T(M)$ of $\mathcal{C}$: $$\require{AMScd} \begin{CD} T(M) @>{\eta_{TM}}>> T^2(M) @<{T\eta_M}<< T(M) \\ @| @VV{\mu_M}V @|\\ T(M) @= T(M) @=T(M) \end{CD} \text{ } \begin{CD} T^2(M) @>{T\eta_{T(M)}}>> T^3(M)\\ @| @VV{\mu_{T(M)}}V\\ T^2(M) @= T^2(M) \end{CD}$$ By naturality of $\mu$ we also have the following square: $$\begin{CD} T^2(M) @>{T\eta_{T(M)}}>> T^3(M)\\ @VV{\mu_{M}}V @VV{\mu_{T(M)}}V\\ T(M) @>{\eta_{T(M)}}>> T^2(M). \end{CD}$$ From this we conclude that $\eta_{T(M)}$ is both a left and right adjoint to $\mu_M$, and so (since $M$ was arbitrary), $\mu$ is a natural isomorphism and hence $\mathbb{T}$ is an idempotent monad...

Obviously not all monads are idempotent (your favourite monad probably isn't for obvious reasons). So what's wrong here?

1

There are 1 best solutions below

0
On

Never forget that naturality diagrams only apply to morphisms in the images of the functors involved! For a monad, the multiplication is a natural transformation $\mu:T^2 \to T$, so since $\eta_{T(M)}$ typically isn't of the form $T(g)$ for some morphism $g$ in $\mathcal{C}$, there is no requirement for the lower square to be commutative in general. In fact, it is not much of a stretch to realise that commutativity of that square for every object $M$ is equivalent to idempotency of the monad.