Contents

### Context

#### Categorical algebra

internalization and categorical algebra

universal algebra

categorical semantics

#### 2-Category theory

2-category theory

Definitions

Transfors between 2-categories

Morphisms in 2-categories

Structures in 2-categories

Limits in 2-categories

Structures on 2-categories

# Contents

## Idea

A relative monad $T \colon A \to E$ is much like a monad except that its underlying functor is not required to be an endofunctor: rather, it can be an arbitrary functor between categories. To even formulate such a notion, (for instance the definition of the unit), the two categories have to be related somehow, typically via a specified comparison functor $J \colon A \to E$, in which case we say that $T$ is a monad relative to $J$.

Ordinary monads are the special case of $J$-relative monads where $J$ is the identity functor.

## Definitions

Let $J \colon A \to E$ be a functor between categories, the root.

## In extension form

The following definition is a variation of the formulation of a monad in extension form:

###### Definition

A $J$-relative monad $T$ [ACU15, Def. 2.1] comprises:

• a function $T \colon |A| \to |E|$, the underlying functor;

• for each object $X \in |A|$, a morphism $\eta_X \colon JX \to TX$ in $E$, the unit;

• for each morphism $f \colon JX \to TY$ in $A$, a morphism $f^\dagger \colon TX \to TY$ in $E$, the extension operator,

such that, for each $X, Y, Z \in |A|$, the following equations hold:

• $f = f^\dagger \circ \eta_X$ for each $f \colon JX \to TY$ (left unitality);

• $(\eta_X)^\dagger = 1_{TX}$ (right unitality);

• $(g^\dagger \circ f)^\dagger = \g^\dagger \circ f^\dagger$ for each $f \colon JX \to TY$ and $g \colon JY \to TZ$.

It follows that $T$ is canonically equipped with the structure of a functor. For each $f \colon X \to Y$ in $A$:

$T f \;:=\; \big( \eta_{Y} \circ J f \big)^\dagger \,.$

and that the unit $\eta$ and the extension operator $({-})^\dagger$ are then natural transformations.

In particular, in the special case that $J$ is the identity functor, Def. reduces to the definition of monad in extension form.

### As monoids in a skew-monoidal category, skew-multicategory, or multicategory

Monads are, by definition, monoids in monoidal categories of endofunctors. It is similarly possible to present relative monads as monoids in categories of functors. However, generally speaking, arbitrary functor categories are not monoidal. However, given a fixed functor $J \colon A \to E$, the functor category $[A, E]$ may frequently be equipped with skew-monoidal structure. The notion of a skew-monoidal category is like that of a monoidal category except that the unitors and associators are not necessarily invertible. Monoids may be defined in a skew-monoidal category analogously as to in a monoidal category, and a monoid in $[A, E]$ (equipped with the skew-monoidal structure induced by $J$) is precisely a $J$-relative monad.

###### Theorem

(ACU15, Thm. 3.4)
Let $J \colon A \to E$ be a functor for which $\mathrm{Lan}_J \colon [A, E] \to [E, E]$ exists (e.g. if $A$ is small and $E$ cocomplete). Then $[A, E]$ admtis a skew-monoidal structure, with unit $J$ and tensor $F \circ^J G = (\mathrm{Lan}_J F) \circ G$, and a relative monad is precisely a monoid in $([A, E], J, \circ^J)$.

When $J \colon A \to E$ is a free completion of $A$ under a class $\mathcal{F}$ of small colimits, then this skew-monoidal structure on $[A, E]$ is properly monoidal, since it is equivalent to the $\mathcal{F}$-colimit preserving functors $E \to E$, and the monoidal structure is just functor composition.

More generally, if $\mathrm{Lan}_J$ does not exist, we may still define a skew-multicategory? structure on $[A, E]$. Thus, relative monads are always monoids.

###### Theorem

(AM, Thm. 4.16)
Let $J \colon A \to E$ be a functor. Then $[A, E]$ admits a unital skew-multicategory structure, and a relative monad is precisely a monoid therein.

This skew-multicategory structure is representable just when $\mathrm{Lan}_J$ exists, recovering the result of ACU15. When $J$ is a dense functor, the above theorem simplifies.

###### Theorem

(AM, Cor. 4.17)
Let $J \colon A \to E$ be a dense functor. Then $[A, E]$ admits a unital multicategory structure, and a relative monad is precisely a monoid therein.

### As monads in the bicategory of distributors

An alternative useful perspective on relative monads is the following.

###### Theorem

(AM, Thm. 4.22)
Let $J \colon A \to E$ be a dense functor. A $J$-relative monad is precisely a monad in the bicategory of distributors whose underlying 1-cell is of the form $E(J, T)$ for some functor $T \colon A \to E$.

### Relative to a distributor

The above definition makes sense even more generally when $J$ is a distributor $E ⇸ A$, i.e. a functor $\mathbf A^{op} \times E \to Set$. Explicitly, we ask for:

• a functor $T \colon A \to E$;

• a unit $\eta_X \in J(X, T X)$ for each $X \in |A|$, natural in $X \in |A|$ (equivalently, an element of the end, $\eta \in \int_{X \in |A|}J(X, T X)$);

• an extension operator $(-)^\dagger \colon J(X, T Y) \to \mathbf C(T X, T Y)$ natural in $X,Y \in |A|$

with essentially the same equations. We recover the previous definition by taking the corepresentable distributor $E(J-,=)$. See Remark 4.24 of AM24.

## Examples

### Generic examples

###### Example

Given

• $J \,\colon\, A \to E$,

• a $\;$ monad

$T \,\colon\, E \to E$

with

• unit $\;$ $\eta^T_{(-)}$

• extension operator $\;$ $bind^T$

the composite

• $T \circ J \,\colon\, A \to E$

defines a $A$-relative monad (Def. ) with

• unit

$\eta^{T J}_X \,\coloneqq\, \eta^T_{J(X)}$

• extension operator

$bind^{T J}\big( J(X) \overset{k}{\to} T \circ J(Y) \big) \;\coloneqq\; bind^T\big( J(X) \overset{k}{\to} T \circ J(Y) \big) \,.$

This example is stated in ACU15, Prop. 2.3 (1). More generally, we can precompose any relative monad with a functor to obtain a new relative monad: see Proposition 5.36 of AM24.

###### Proof

The required conditions on the relative monad structure $T \circ J$ immediately reduce to those of the monad structure of $T$:

Given

$k \,\colon\, J(X) \to T \circ J(X') ,\;\;\; \ell \,\colon\, J(X') \to T \circ J(X'')$

we have

left unitality:

$\begin{array}{l} bind^{T J}(k) \circ \eta^{T J}_{X} \\ \;\equiv\; bind^T(k) \circ \eta^T_{J(X)} \\ \;=\; k \end{array}$

right unitality:

$\begin{array}{l} bind^{T J}\big( \eta^{T J}_{X} \big) \\ \;\equiv\; bind^T\big( \eta^T_{J (X)} \big) \\ \;=\; id_{T \circ J(X)} \end{array}$

associativity:

$\begin{array}{l} bind^{T J}\big( bind^{T J}(\ell) \circ k \big) \\ \;\equiv\; bind^{T}\big( bind^{T}(\ell) \circ k \big) \\ \;=\; bind^T(\ell) \circ bind^T(k) \\ \;\equiv\; bind^{T J}(\ell) \circ bind^{T J}(k) \end{array}$

A concrete instance of Exp. is spelled out in Exp. below.

###### Example

A relative monad on the embedding $J \colon \mathbf{FinSet} \to \mathbf {Set}$ is equivalent to an abstract clone. These are equivalent to finitary monads and single-sorted algebraic theories.

###### Example

Fixing a category $\mathbb{V}$ with finite products, to give a Freyd category is to give a strong relative monad on the Yoneda embedding $\mathbb{V}\to [\mathbb{V}^{\mathrm{op}},\mathbf{Set}]$.

###### Example

The presheaf category-construction $(\mathbb{C}\mapsto [{\mathbb{C}}^{\mathrm{op}},\mathbf{Set}])$ may be regarded as a relative pseudomonad on the inclusion $\mathbf{Cat}\to \mathbf{CAT}$. (See also Yoneda structures.)

###### Example

A monad on $\mathbf C$ with arities in $A\subseteq \mathbf C$ is the same thing as a relative monad for the embedding $A\to \mathbf C$. (Here $A\subseteq E$ is required to be a dense subcategory, so that to give a functor $A\subseteq E$ is to give a functor $E\toE$ preserving $J$-absolute colimits.)

### Specific examples

###### Example

(linear span)
We spell out the simple but maybe instructive example of the construction which sends a set $B$ to the vector space which it spans, i.e. to the $B$-indexed direct sum of some ground field $\mathbb{K}$, regarded in $\mathbb{K}$-vector spaces.

In detail, for $\mathbb{K}$ any ground field, consider:

1. $A \coloneqq$ Set;

2. $E \coloneqq \int_{B \colon Set} Vect_B$ (or “VectBund”, for short, see there for more) the category of indexed sets of vector spaces – hence of vector bundles over sets (i.e. over discrete topological spaces)

$\array{ \mathscr{H} \\ \big\downarrow \\ B }$

with possibly base-changing vector bundle maps between them:

$\array{ \mathscr{H} &\longrightarrow& \mathscr{H}' \\ \big\downarrow && \big\downarrow \\ B &\underset{f}{\longrightarrow}& B' }$
3. the relativization functor given by sending a set to the trivial tensor unit-bundle over it:

(1)$\array{ J &\colon& Set &\longrightarrow& \int_{B \colon Set} Vect_B \\ && B &\mapsto& B \times \mathbb{K} }$

Notice that for each map $f \;\colon\; B \to B'$ of base sets, there is a base change adjoint triple of functors

(2)$f_! \dashv f^\ast \dashv f_\ast \;\;\colon\;\; Vect_{B} \leftrightarrow Vect_{B'} \,.$

In particular, for $S' = \ast$ the terminal singleton set, the left base change along the unique $p_X \colon S \to \ast$ is the operation which forms the direct sum of the (fiber-)vector spaces in the bundle, and regards the resulting vector space as a bundle over the point:

$(p_B)_! \;\colon\; Vect_B \longrightarrow Vect_\ast \,=\, Vect \,.$

In view of this, we claim that the functor

$\array{ Q &\colon& Set &\longrightarrow& \int_{B \colon Set} Vect_{B} \\ && S &\mapsto& (p_B)_!\big( B \times \mathbb{K} \big) \mathrlap{ \;\simeq\; \underset{b \colon B}{\bigoplus} \mathbb{K} } }$

which may be understood as sending a set to its $\mathbb{K}$-linear span,

carries the structure of a monad relative to the functor $J$ from (1) with

1. unit given by

$\array{ \eta_{B} &\colon& B \times \mathbb{K} &\longrightarrow& \underset{b \colon B}{\bigoplus} \mathbb{K} \\ && (b,k) &\mapsto& (k)_b }$
2. Kleisli extension given by

$\Big( B \times \mathbb{K} \xrightarrow{f} \underset{ \mathclap{b' \colon B'} }{\oplus} \mathbb{K} \Big) \;\;\;\;\mapsto\;\;\;\; \Big( \underset{b \colon B}{\oplus} \mathbb{K} \xrightarrow{ \big( f(b,-) \big)_{b \colon B} } \underset{b' \colon B}{\oplus} \mathbb{K} \Big)$

This specific example may be understood as a special case of the general situation of relative monads induced from an actual monad (Exmp. ): Here the actual monad in question is:

$\array{ \triangle &\colon& \int_{B \colon Set} Vect_B &\longrightarrow& \int_{B \colon Set} Vect_B \\ && \left[ \array{ \mathscr{V} \\ \big\downarrow\mathrlap{{}^p} \\ B } \;\;\; \right] &\mapsto& p_! \mathscr{V} }$

This monad is in fact the reflective localization of the reflective subcategory-embedding of plain VectorSpaces into bundled/parameterized vector spaces:

$Vect \;\simeq\; Vect_\ast \xhookrightarrow{\phantom{--}} \int_{B \colon Set} Vect_B \,.$

## References

The concept was introduced, in the context of monads in computer science, in:

A comprehension development in the context of formal category theory may be found in:

Exposition:

On distributive laws for relative monads:

Last revised on May 12, 2024 at 22:12:54. See the history of this page for a list of all contributions to it.