# What is a Monad in the two category $Rel$?

The 2-category $Rel$ is a category with sets as $0$-cells, relations as $1$-cells (with relation composition as composition), and inclusions as $2$-cells (with vertical composition being the fact that inclusion is a preorder, and horizontal composition being the fact that relation composition respects inclusions.)

What is a monad in this category?

A monad in $REL$ is a preorder on a set. To see this, note that we need a $1$-cell $R: A \to A$, a relation, such that we have $2$-cells:

$$\eta: id_A \to R$$ $$\mu: R \circ R \to R$$

but these are just inclusions $id_A \subseteq R$ and $R \circ R \subseteq R$.

$id_A \subseteq R$ means that if $x=y$ then $x R y$.

$R \circ R \subseteq R$ means that if $\exists y. xRy \wedge yRz$ then $xRz$.

These two conditions are the axioms of a preorder.

• Similarly, a monad in the bicategory of spans is a category. – tcamps Jun 8 '15 at 19:54
• Of course, that only says what happens on the level of objects. The next question one should ask is, what is a morphism of monads? – Zhen Lin Jun 8 '15 at 21:31
• @ZhenLin I was going to ask that, but then I would only have a partial answer. – PyRulez Jun 8 '15 at 21:54
• @ZhenLin I am pretty sure it would just be inclusion of equivalence relations. – PyRulez Jun 8 '15 at 22:34
• Inclusion of equivalence relations? We're talking about preorders! Anyway, part of the story here is that the morphisms of monads are more general than order-preserving maps. In order to get these morphisms, you need to use the proarrow equipment structure which axiomatizes the interplay between relations and functions, or spans and functions, or profunctors and functors, or bimodules and ring homomorphisms, or... – tcamps Jun 9 '15 at 15:02