nLab
module over a monad

Contents

Idea

Just as the notion of a monad in a bicategory K generalizes that of a monoid in a monoidal category, modules over monoids generalize easily to modules over monads.

A special case of this (see below) is often called an algebra for a monad.

Definition

Let K be a bicategory and t:aa a monad in K with structure 2-cells μ:ttt and η:1 at. Then a left t-module is given by a 1-cell x:ba and a 2-cell λ:txx, where

ttx μx tx tλ λ tx λ xx1x ηx tx 1 λ x\array{ t t x & \overset{\mu x}{\to} & t x \\ t\lambda\downarrow & & \downarrow \lambda \\ t x & \underset{\lambda}{\to} & x } \qquad \qquad \array{ x \cong 1 x & \overset{\eta x}{\to} & t x \\ & 1\searrow & \downarrow \lambda \\ & & x }

commute. Similarly, a right t-module is given by a 1-cell y:ac and a 2-cell ρ:yty, with commuting diagrams as above with y on the left instead of x on the right.

Given monads s on b and t on a, an s,t-bimodule is given by a 1-cell x:ba, together with the structures of a right s-module ρ:xsx and a left t-module λ:txx that are compatible in the sense that the diagram

txs tρ tx λs λ xs ρ x\array{ t x s & \overset{t\rho}{\to} & t x \\ \lambda s \downarrow & & \downarrow \lambda \\ x s & \underset{\rho}{\to} & x }

commutes. Such a bimodule may be written as x:st.

A morphism of left t-modules (x,λ)(x,λ) is given by a 2-cell α:xx such that λtα=αλ. Similarly, a morphism of right t-modules (y,ρ)(y,ρ) is β:yy such that ραs=αρ. A morphism of bimodules (x,λ,ρ)(x,λ,ρ) is given by α:xx that is a morphism of both left and right modules.

Algebras for monads in Cat

If K=Cat and (T,η,μ) is a monad on a category C, then a left T-module A:1C, where 1 is the terminal category, is usually called a T-algebra: it is given by an object AC together with a morphism α:TAA, such that

T(T(A)) μ A T(A) T(α) α T(A) α A\array { T(T(A)) & \stackrel{\mu_A}\rightarrow & T(A) \\ T(\alpha) \downarrow & & \downarrow \alpha \\ T(A) & \stackrel{\alpha}\rightarrow & A }

and

A η A T(A) id A α A id A A\array { A & \stackrel{\eta_A}\rightarrow & T(A) \\ id_A \downarrow & & \downarrow \alpha \\ A & \stackrel{id_A}\rightarrow & A }

commute.

In particular, every algebra in this sense over a monad (T,η,μ) has the structure of an algebra over the underlying endofunctor T.

T-algebras can also be defined as left modules over T qua monoid in End(C). There the object A is represented by the constant endofunctor at A.

The Eilenberg-Moore category of T is the category of these algebras. It has a universal property that allows the notion of Eilenberg–Moore object to be defined in any bicategory.

Tensor product

Given bimodules x:rs and x:st, where r,s,t are monads on c,b,a respectively, we may be able to form the tensor product x sx:rt just as in the case of bimodules over rings. If the hom-categories of the bicategory K have coequalizers that are preserved by composition on both sides, then the tensor product is given by the coequalizer in K(c,a)

xsx xx x sx\array{ x s x' & \overset{\to}{\to} & x x' & \to x \otimes_s x' }

where the parallel arrows are the two induced actions ρx and xλ on s. It is straightforward, though a little tedious, to show that this is an r,t-bimodule, the conditions following from those on x,x together with the fact that coequalizers are epimorphisms and that (because of the condition on K) whiskering one coequalizer diagram on either side results in another.

If K satisfies the above conditions then there is a bicategory Mod(K) consisting of monads, bimodules and bimodule morphisms in K.

Example

If K=Span(Set), the bicategory of spans of sets, then a monad in K is precisely a small category. Then Mod(K)=Prof, the category of small categories, profunctors and natural transformations.

More generally, Mod(Span(C)), for C any category with coequalizers and pullbacks that preserve them, consists of internal categories in C, together with internal profunctors between them and transformations between those.