# 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 \colon a \to a$ a monad in $K$ with structure 2-cells $\mu \colon t t \Rightarrow t$ and $\eta \colon 1_a \Rightarrow t$. Then a left $t$-module is given by a 1-cell $x \colon b \to a$ and a 2-cell $\lambda \colon t x \Rightarrow x$, where

$\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 \colon a \to c$ and a 2-cell $\rho \colon y t \Rightarrow 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\colon b \to a$, together with the structures of a right $s$-module $\rho \colon x s \Rightarrow x$ and a left $t$-module $\lambda \colon t x \Rightarrow x$ that are compatible in the sense that the diagram

$\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 \colon s ⇸ t$.

A morphism of left $t$-modules $(x,\lambda) \to (x',\lambda')$ is given by a 2-cell $\alpha \colon x \Rightarrow x'$ such that $\lambda' \circ t\alpha = \alpha \circ \lambda$. Similarly, a morphism of right $t$-modules $(y,\rho) \to (y',\rho')$ is $\beta \colon y \Rightarrow y'$ such that $\rho' \circ \alpha s = \alpha \circ \rho$. A morphism of bimodules $(x,\lambda,\rho) \to (x',\lambda',\rho')$ is given by $\alpha \colon x \Rightarrow x'$ 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(b,a)$, 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^* \colon x \mapsto t x s$ is again a monad. Then the category $Mod_K(s,t)$ of bimodules from $s$ to $t$ is the ordinary Eilenberg--Moore category $K(b,a)^{s^* t_*}$.

### Algebras for monads in Cat

If $K = Cat$ and $(T,\eta,\mu)$ is a monad on a category $C$, then a left $T$-module $A \colon C \to 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 \colon T A \to A$, such that

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

and

$\array { A & \stackrel{\eta_A}\rightarrow & T(A) \\ & id_A \searrow & \downarrow \alpha \\ & & A }$

commute.

In particular, every algebra over a monad $(T,\eta,\mu)$ in $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 $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' \colon r ⇸ s$ and $x \colon 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' \colon 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(c,a)$

$\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'$ and $x \lambda$ on $s$. Indeed, under the hypothesis on $K$ the forgetful functor $Mod_K(r,t) = K(c,a)^{r^* t_*} \to K(c,a)$ reflects reflexive coequalizers, because the monad $r^* t_*$ preserves them, and so $x \otimes_s x'$ is an $r,t$-bimodule.

If $K$ satisfies the above conditions then there is a bicategory $Mod(K)$ 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 $Mod(K) \to K$, with comparison morphisms $1_a \to t$ the unit of $t$, and $x x' \to x \otimes_s x'$ the coequalizer map.

## Examples

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.

## 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 June 22, 2013 07:51:00 by Ivanych? (31.162.99.151)