Definition

A monad in a category consists of:

  • A functor .
  • Natural transformations (unit) and (multiplication).
  • Such that the following diagrams commute in the category of endofunctors :

Associativity Law

We require that as natural transformations from to .

\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
T^3 \arrow[r, "T\mu"] \arrow[d, "\mu T"'] & T^2 \arrow[d, "\mu"] \\
T^2 \arrow[r, "\mu"'] & T
\end{tikzcd}
\end{document}

Unit Laws

We require that as natural transformations from to .

\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
T \arrow[r, "T\eta"] \arrow[d, "\eta T"'] \arrow[rd, "1_T"] & T^2 \arrow[d, "\mu"] \\
T^2 \arrow[r, "\mu"'] & T
\end{tikzcd}
\end{document}

Comonad

A comonad is a monad in the opposite category .

Relation to Adjunctions

Given any adjunction for , defines a monad in .

See also

References

A monad or a Kleisli triple over a category is a triple where … See capretta2005-partiality.