nLab list monad

Contents

Contents

Idea

The list monad or free monoid monad is the monad on Sets (or generally on a distributive monoidal category)

List:Set Set S n:S ×n \array{ \mathllap{List \;\colon\;} Set &\longrightarrow& Set \\ S &\mapsto& \displaystyle{ \underset{n \colon \mathbb{N}}{\textstyle{\coprod}} } S^{\times n} }

which sends a set SS to the underlying set U(F(S))U\big(F(S)\big) of the free monoid F(S)S *F(S) \equiv S^\ast on SS, hence the set of lists (strings) of elements of SS, hence of nn-tuples (s 1,s 2,,s n):S ×n(s_1, s_2, \cdots, s_n) \colon S^{\times n} for any natural number nn.

Its join operation is by concatenating a list-of-lists to a single list,

and its unit assigns to an element of SS the list consisting of that single element:

The Eilenberg-Moore category of modules over the list monad is the category of monoids MonMon:

References

Discussion of the list monad as a monad in computer science (in Haskell):

Last revised on August 27, 2023 at 20:20:22. See the history of this page for a list of all contributions to it.