Exercises 4: Monads and algebras

EX 1: Algebras for a monad

Algebras $(A, a)$ correspond to ways of evaluating formal expressions of the structure $A$.


\[T = UF\]
  • $η$ is the unit $φ(id_{FA})$ of the adjunction
  • $μ ≝ U ε F$, where $ε$ is the counit $φ^{-1}(id_{UM})$ of the adjunction

If $(A, f)$ is a $T$-algebra, let us build a monoid structure on $A$.

\[m ≝ \begin{cases} A × A ⟶ A \\ a, b \mapsto f([a, b]) \end{cases}\] \[e ≝ f([\;])\]


  • $a = f([a])$ for $a ∈ A$
  • $f (Tf) = f μ_A$

Associativity of $m$:

\[m(m(a, b), c) = m(a, m(b, c))\]

Because $f (Tf) = f μ_A$, so that:

\[\begin{align*} f(Tf([[a, b], [c]])) & = f([f([a, b]), f([c])])) \\ & = f([m(a, b), c]) \\ & = m(m(a, b), c) \end{align*}\]


\[\begin{align*} f(μ_A([[a, b], [c]])) & = f([a, b, c]) \\ & = f(μ_A([[a], [b,c]])) \end{align*}\]

Morphism of $T$-algebras:

\[\begin{xy} \xymatrix{ TA \ar[r]^{Tf} \ar[d]_a & TB \ar[d]^b \\ A \ar[r]_f & B } \end{xy}\]

We have:

\[f(m(a,b)) = m(f(a), f(b))\]

So whenever we have an adjunction between $Set$ and $𝒞$, if $T$ is the associated monad, we have a category of algebras $Set^T$

BUT warning!: $𝒞^T$ is not always equal to $𝒞$ (as it is for monoids):

counter-example: with $𝒞 = Top$:

  • $F$ is the “free topological space functor”, with the discrete topology (every subset is an open set).

  • $T = UF$ is the identity monad

BUT: the associated category of algebras is isomorphic to $Set$, since the only algebras are of the form $(A, id_A)$.

2. Distributive laws between monads


$Cat$ is a category where:

  • categories are 0-cells
  • functors are 1-cells
  • natural transformations are 2-cells

Leave a comment