I've been trying to figure out what having a monad in a monoid (i.e. a category with one object) would mean.
As far as I can tell it would be a homomorphism (functor) $T : M → M$, with two elements (natural transformation components) $\eta, \mu : M$, such that
- $\forall x. \eta x = T(x) \eta$
- $\forall x. \mu T(T(x)) = T(x) \mu$
- $\mu \eta$ = $\mu T(\eta)$ = 1
- $\mu T(\mu) = \mu \mu$
The identity monad $T(x) = x$, with $\eta = \mu = 1$, is an obvious example for any monoid. But no other examples really come to mind... These laws seem a bit strange. Are there any interesting examples, or any good intuition for what the laws would mean?
So you can interpret a functor $T$ as a homomorphism $T:M \rightarrow M$. What is the interpretation of a natural transformation between two such functors? Well, it should assign to each element in the base category (there's only one!) some morphism such that the necessary diagram is natural. So we can think of $\eta, \mu$ as being elements of the monoid $M$, satisfying the following identities: $$\begin{align*}\eta m &= T(m)\eta \\ \mu T^2(m) &= T(m) \mu \end{align*}$$ for all $m$.
The associativity of $T$ becomes $$ \mu T(\mu) = \mu^2 $$ Note two things. First, that this is an identity of elements of the monoid $M$. The LHS corresponds to the natural transformation $\mu \circ T\mu$, while the RHS is the natural transformation $\mu \circ \mu T$. Since the functor $T$ fixes the only point in the category, $\mu T = \mu$. The unit law is:
$$\mu T(\eta) = e = \mu \eta.$$
It's not clear to me right now what this means for a general monoid, but for a group, we see that $T$ is actually just conjugation by $\eta$, and $\mu$ is the inverse of $\eta$. So at least for groups, the monads are just inner automorphisms, which is nice. I can't think of an interpretation for a general monoid, but the intuition from groups might help.