nLab algebra over a monad

Redirected from "algebras over a monad".
Contents

Contents

Idea

There are different, related ways in which one could view the notion of algebra over a monad:

Algebras over a monad are usually objects equipped with extra structure, not just properties. (They can also be seen as algebras over the underlying endofunctor, satisfying extra compatibility properties.)

The corresponding dual notion is that of coalgebra over a comonad.

Definition

Let (T,ฮท,ฮผ)(T,\eta, \mu) be a monad on a category ๐’ž\mathcal{C}.

Algebras

Definition

An algebra over TT (or just TT-algebra or TT-module) consists of:

  1. an object AA of ๐’ž\mathcal{C},

  2. a morphism a:T(A)โŸถAa \colon T (A) \longrightarrow A of ๐’ž\mathcal{C},

such that the following diagrams commute in ๐’ž\mathcal{C} (cf. the definition of module object here):

(1)Unit Property: \text{Unit Property:}


(2)Action Property: \text{Action Property:}

Remark

The diagram (1) is also sometimes called the unit triangle, and the diagram (2) is also called the multiplication square or algebra square.

Homomorphisms

Let (A,a)(A,a) and (B,b)(B,b) be TT-algebra. A homomorphism of TT-algebras is a morphism f:Aโ†’Bf \colon A \to B of ๐’ž\mathcal{C} which makes the following diagram commute.

The category formed by TT-algebras and their homomorphisms is known as the Eilenberg-Moore category of TT and often denoted by ๐’ž T\mathcal{C}^T.

Free algebras

Given a monad (T,ฮผ,ฮท)(T,\mu,\eta) on a category ๐’ž\mathcal{C}, then for every object XX of ๐’ž\mathcal{C}, the object TXT X is canonically equipped with a TT-algebra structure, given by the multiplication map ฮผ\mu of the monad. The relevant diagrams commute by the monad axioms.

TT-Algebras of this sort are called free TT-algebras.

Given any morphism ฯ•:Xโ†’Y\phi \colon X \to Y of ๐’ž\mathcal{C}, the morphism Tฯ•:TXโŸถTYT \phi \colon T X \longrightarrow T Y is evidently a homomorphism of TT-algebras, by naturality of ฮผ\mu. But not every homomorphism of TT-algebras between the free TT-algebras TXT X and TYT Y arises this way, in general.

However, for any morphism of the form

f:XโŸถTY f \colon X \longrightarrow T Y

in ๐’ž\mathcal{C} (called a TT-Kleisli morphism), the induced morphism

(3)ฮผ Yโˆ˜Tf:TXโ†’TfTTYโ†’ฮผ YTY \mu_{Y} \circ T f \;\colon\; T X \xrightarrow{\;\; T f \;\;} T T Y \xrightarrow{\;\; \mu_Y \;\;} TY

is a homomorphism of TT-algebras between these free TT-algebras, as one verifies again using the naturality of ฮผ\mu. Now, all homomorphisms of TT-algebras between the free algebras TXT X and TYT Y do arise this way.

Moreover, given in addition a morphism in ๐’ž\mathcal{C} of the form g:YโŸถTZg \colon Y \longrightarrow T Z, then, under this association, the composition of the corresponding TT-algebra morphisms (3) of ff and gg equals the TT-algebra homomorphism corresponding to their Kleisli composite, defined by

gโˆ˜ Tfโ‰”Xโ†’fTYโ†’TgTTZโ†’ฮผ ZTZ. g \circ_T f \;\coloneqq\; X \xrightarrow{ f } T Y \xrightarrow{ T g } T T Z \xrightarrow{ \mu_Z } T Z \,.

The category of Kleisli morphisms equipped with this Kleisli composition is called the Kleisli category and is equivalent to the full subcategory of TT-algebras on the free TT-algebras (see there for more).

Tensor product

In the case of a commutative monad TT , one can define a tensor product of monad algebras, see there for more.

Examples

Many monads are named after their (free) algebras:

  • The algebras of the free monoid monad on Set are monoids, and the morphisms of algebras the monoid homomorphisms.

  • The algebras of the free commutative monoid monad on Set are commutative monoids, and their morphisms the monoid homomorphisms between them.

  • The algebras of the free group monad on Set are groups, and their morphisms are the group homomorphisms.

  • โ€ฆand so on.

In these cases, the notion of free group, free monoid, et cetera coincide with the notion of free algebra given above.

Generalizations

An algebra over a monad is a special case of a module over a monad in a bicategory. See there for more information.

The Eilenberg-Moore and Kleisli categories are also special cases of more general 2-dimensional universal constructions, namely the Eilenberg-Moore object and the Kleisli object. See those pages for more information.

References

General

See the References at monad, such as:

An introduction to the basic ideas, which gives some intuition for newcomers, can be found in

Kleisli/extension system-style

For monads presented in โ€œextension systemโ€/โ€œKleisli tripleโ€-form (the way traditionally used for monads in computer science โ€“ i.e. in terms of a โ€œbindโ€-operation taking Kleisli maps to actual morphisms, not explicitly referring to the monad product) there is the corresponding โ€œKleisli-triple styleโ€ or โ€œMendler styleโ€ [Uustalu (2021), p. 4] for presenting the algebra/module-structures for these monads:

See also

Last revised on August 11, 2023 at 14:17:48. See the history of this page for a list of all contributions to it.