§ Category Theory

In Category Theory, Monoid is a Category with one object.

\begin{tikzcd} m \arrow[loop, "f", distance=2em, leftarrow, swap] \arrow[loop, "g", distance=4em, leftarrow, swap] \arrow[loop, "g \circ f", distance=6em, leftarrow, swap] \end{tikzcd}

In Set Theory, Monoid is a set of values with

  • an associative binary operator ∗*

  • a unit value ∃e∋∀a.  e∗a=a=a∗e\exists e \ni \forall a.\; e * a = a = a *e

These definitions are equivalent.

  • set of values → set of morphisms

  • associative binary operator → composition of morphisms

  • unit value → identity morphism