# nLab module over a monad

### Context

#### 2-Category theory

2-category theory

## Structures on 2-categories

#### Higher algebra

higher algebra

universal algebra

# 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.

Modules over monads, especially in Cat, are also often called algebras for the monad; see below.

## Definition

Let $K$ be a bicategory and $t:a\to a$ a monad in $K$ with structure 2-cells $\mu :tt⇒t$ and $\eta :{1}_{a}⇒t$. Then a left $t$-module is given by a 1-cell $x:b\to a$ and a 2-cell $\lambda :tx⇒x$, where

$\begin{array}{ccc}ttx& \stackrel{\mu x}{\to }& tx\\ t\lambda ↓& & ↓\lambda \\ tx& \underset{\lambda }{\to }& x\end{array}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\begin{array}{ccc}x& \stackrel{\eta x}{\to }& tx\\ & 1↘& ↓\lambda \\ & & x\end{array}$\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 & \overset{\eta x}{\to} & t x \\ & 1\searrow & \downarrow \lambda \\ & & x }

commute. Similarly, a right $t$-module is given by a 1-cell $y:a\to c$ and a 2-cell $\rho :yt⇒y$, with commuting diagrams as above with $y$ on the left instead of $x$ on the right.

Clearly, a right $t$-module in $K$ is the same thing as a left $t$-module in ${K}^{\mathrm{op}}$. A left $t$-comodule or coalgebra is then a left $t$-module in ${K}^{\mathrm{co}}$, and a right $t$-comodule is a left $t$-module in ${K}^{\mathrm{coop}}$.

A $t$-module of any of these sorts is a fortiori an algebra over the underlying endomorphism $t$.

### Bimodules

Given monads $s$ on $b$ and $t$ on $a$, an $s,t$-bimodule is given by a 1-cell $x:b\to a$, together with the structures of a right $s$-module $\rho :xs⇒x$ and a left $t$-module $\lambda :tx⇒x$ that are compatible in the sense that the diagram

$\begin{array}{ccc}txs& \stackrel{t\rho }{\to }& tx\\ \lambda s↓& & ↓\lambda \\ xs& \underset{\rho }{\to }& x\end{array}$\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:s⇸t$.

A morphism of left $t$-modules $\left(x,\lambda \right)\to \left(x\prime ,\lambda \prime \right)$ is given by a 2-cell $\alpha :x⇒x\prime$ such that $\lambda \prime \circ t\alpha =\alpha \circ \lambda$. Similarly, a morphism of right $t$-modules $\left(y,\rho \right)\to \left(y\prime ,\rho \prime \right)$ is $\beta :y⇒y\prime$ such that $\rho \prime \circ \alpha s=\alpha \circ \rho$. A morphism of bimodules $\left(x,\lambda ,\rho \right)\to \left(x\prime ,\lambda \prime ,\rho \prime \right)$ is given by $\alpha :x⇒x\prime$ that is a morphism of both left and right modules.

More abstractly, the monads $s$ and $t$ in $K$ give rise to ordinary monads ${s}^{*}$ and ${t}_{*}$ on the hom-category $K\left(b,a\right)$, by pre- and post-composition. The associativity isomorphism of $K$ then gives rise to an invertible distributive law between these, so that the composite ${s}^{*}{t}_{*}\cong {t}_{*}{s}^{*}:x↦txs$ is again a monad. Then the category ${\mathrm{Mod}}_{K}\left(s,t\right)$ of bimodules from $s$ to $t$ is the ordinary Eilenberg--Moore category $K\left(b,a{\right)}^{{s}^{*}{t}_{*}}$.

### Algebras for monads in Cat

If $K=\mathrm{Cat}$ and $\left(T,\eta ,\mu \right)$ is a monad on a category $C$, then a left $T$-module $A:1\to C$, where $1$ is the terminal category, is usually called a $T$-algebra: it is given by an object $A\in C$ together with a morphism $\alpha :TA\to A$, such that

$\begin{array}{ccc}T\left(T\left(A\right)\right)& \stackrel{{\mu }_{A}}{\to }& T\left(A\right)\\ T\left(\alpha \right)↓& & ↓\alpha \\ T\left(A\right)& \stackrel{\alpha }{\to }& A\end{array}$\array { T(T(A)) & \stackrel{\mu_A}\rightarrow & T(A) \\ T(\alpha) \downarrow & & \downarrow \alpha \\ T(A) & \stackrel{\alpha}\rightarrow & A }

and

$\begin{array}{ccc}A& \stackrel{{\eta }_{A}}{\to }& T\left(A\right)\\ & {\mathrm{id}}_{A}↘& ↓\alpha \\ & & A\end{array}$\array { A & \stackrel{\eta_A}\rightarrow & T(A) \\ & id_A \searrow & \downarrow \alpha \\ & & A }

commute.

In particular, every algebra over a monad $\left(T,\eta ,\mu \right)$ in $\mathrm{Cat}$ 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 $\mathrm{End}\left(C\right)$. 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\prime :r⇸s$ and $x:s⇸t$, where $r,s,t$ are monads on $c,b,a$ respectively, we may be able to form the tensor product $x{\otimes }_{s}x\prime :r⇸t$ just as in the case of bimodules over rings. If the hom-categories of the bicategory $K$ have reflexive coequalizers that are preserved by composition on both sides, then the tensor product is given by the reflexive coequalizer in $K\left(c,a\right)$

$\begin{array}{cccc}xsx\prime & \stackrel{\to }{\to }& xx\prime & \to x{\otimes }_{s}x\prime \end{array}$\array{ x s x' & \overset{\to}{\to} & x x' & \to x \otimes_s x' }

where the parallel arrows are the two induced actions $\rho x\prime$ and $x\lambda$ on $s$. Indeed, under the hypothesis on $K$ the forgetful functor ${\mathrm{Mod}}_{K}\left(r,t\right)=K\left(c,a{\right)}^{{r}^{*}{t}_{*}}\to K\left(c,a\right)$ reflects reflexive coequalizers, because the monad ${r}^{*}{t}_{*}$ preserves them, and so $x{\otimes }_{s}x\prime$ is an $r,t$-bimodule.

If $K$ satisfies the above conditions then there is a bicategory $\mathrm{Mod}\left(K\right)$ consisting of monads, bimodules and bimodule morphisms in $K$. The identity module on a monad $t$ is $t$ itself, and the unit and associativity conditions follow from the universal property of the above coequalizer. There is a lax forgetful functor $\mathrm{Mod}\left(K\right)\to K$, with comparison morphisms ${1}_{a}\to t$ the unit of $t$, and $xx\prime \to x{\otimes }_{s}x\prime$ the coequalizer map.

## Examples

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

More generally, $\mathrm{Mod}\left(\mathrm{Span}\left(C\right)\right)$, 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.

## References

• John Isbell, Generic algebras Transactions of the AMS, vol 275, number 2 (pdf)

Discussion of model category structures on categories of coalgebras over comonads is in

Revised on December 11, 2012 12:21:52 by Finn Lawler (86.41.39.109)