Elaboration for $μ ∘Tμ = μ ∘ μT$ from a Monad definition

216 Views Asked by At

A part of Monad definition is an endofunctor $T$, and a natural transformation $\mu : T²→T$, such that the $\mu ∘T\mu = \mu ∘\mu T$ holds.

I struggled hard with both sides of the equation, so here're points with my misunderstandings:

  1. What $\mu ∘T\mu$ does? As far as I could break it down, by virtue of having the same category as both domain and codomain, $T$ can lift its natural transformations. So $T\mu$ simplifies to $T(T²→T)$.

    Intuitively I'd think, $\mu ∘T\mu$ would "unwrap" $T\mu$ from the functor, so whole thing simplifies to $T²→T$. But the problem: $\mu$ is defined on $T²$ — not on $T$, or $T³$, or something. So actually the application $\mu(T(T²→T))$ gives a non-sensical result, like "a functor it would be if it was $T²(T²→T)$, but which it isn't".

  2. What $\mu ∘\mu T$ does? $\mu$ is defined as a family of morphisms of the underlying category, whilst $T$ is not its part, so formally the application $\mu T$ doesn't make a sense. Perhaps the author meant rather $\mu ∘\mu ∘ T$, I don't know. Whatever it means, I see again the application of $\mu$ to a non-$T²$ argument — is it even defined?

  3. Oh, wait, there's a small print about the equation, it says "(as natural transformations $T³→T$)". What?? How could they get to $T³$, there's a single $T$ in the formula!

3

There are 3 best solutions below

29
On BEST ANSWER

$\mu\circ T\mu$ is the natural transformation whose component at $X$ is $T^3X\stackrel{T(\mu_X)}{\to} T^2X\stackrel{\mu_X}{\to} TX$. On the other hand, $\mu\circ \mu T$ is the composition $T^3X\stackrel{\mu_{TX}}{\to} T^2X\stackrel{\mu_X}{\to} TX$.

8
On

Take $c\in C,$ Then, since $\mu :T^2\to T$ is a natural transformation, and noting that $\mu_c:T^2c\to Tc$ is a morphism in the category $C, $we see that the following square commutes:

\begin{matrix}T^2(Tc)=T(T^2c) &\stackrel{T\mu_c}{\rightarrow}&T(Tc)=T^2c\\\downarrow{\mu_{Tc} }&&\downarrow{\mu_c}\\ T(Tc)=T^2c& \stackrel{\mu_c}{\rightarrow}&Tc\end{matrix}

That is, we have $\mu_c\circ T\mu_c=\mu_c\circ \mu_{Tc}\Rightarrow (\mu\circ T\mu)_c=(\mu\circ \mu_{T})_c\Rightarrow \mu\circ T\mu=\mu\circ \mu_{T}.$

Remark: We used the fact that $T\mu$ and $\mu_T$ are themselves natural transformations. In fact, they are the horizontal composition of $1_T$ and $\mu$, and $\mu$ and $1_T$, resp.

2
On

Here is a graphical depiction of the operation $\mu \circ (T\mu)$.

Diagram of the composite

Here, $T$ is depicted as the identity natural transformation $1_T$, and appears as the parallelogram in the top-left. The top-right trapezoid is $\mu$, and they are composed horizontally, forming a larger trapezoid $T^3 \to T^2$. $\mu$ again appears as the bottom trapezoid, and the two trapezoids are composed vertically.

If we horizontally compose on the right with a functor from the one-point category that picks out an object $X$, we can resolve the diagram down to an arrow:

$$ T^3 X \xrightarrow{T \mu_X} T^2 X \xrightarrow{\mu_X} TX $$

This is simply computed by working right to left in the diagram. Here's a picture with all of the intermediate results filled in:

enter image description here

Note the dotted lines are not arrows of the category; I only left them in to help compare with the previous diagram.

Similarly, if we did this with $\mu \circ (\mu T)$, we get the arrow

$$ T^3 X \xrightarrow{\mu_{TX}} T^2 X \xrightarrow{\mu_X} TX $$


Alternatively, we can work this out algebraically, by inserting identities as needed and applying the interchange law $(ab)\circ(cd) = (a\circ c)(b \circ d)$ when both make sense:

(note that I identify $T$ and $X$ with their corresponding identity natural transformations, so that $X = X \circ X$)

$$ (\mu \circ (T\mu)) X = (\mu \circ (T\mu)) (X \circ X) = (\mu X) \circ (T\mu X) = \mu_X \circ T(\mu_X)$$ $$ (\mu \circ (\mu T)) X =(\mu \circ (\mu T)) (X \circ X) = (\mu X) \circ (\mu TX) = \mu_X \circ \mu_{T(X)}$$