Distributive Laws and Tensor Products of Enriched Categories

Distributive laws are a fundamental concept in monad theory. They allow us to form well-behaved composite monads, lift monads to Kleisli and Eilenberg-Moore categories, and play key roles in various computer science applications.

As with any worthwhile mathematical object, it is useful to have multiple perspectives to clarify the underlying idea. This post aims to show how we might rediscover the notion of distributive from an enriched category theory point of view.

Monads and Enrichment

For a monoidal category (\mathcal{V}, \otimes, I), we can:

  1. Define \mathcal{V}-enriched categories, more concisely referred to as \mathcal{V}-categories.
  2. Define \mathcal{V}-functors between \mathcal{V}-categories.
  3. If \mathcal{V} is a symmetric monoidal category, we can define a tensor product of \mathcal{V}-categories \mathcal{C} and \mathcal{D}, denoted \mathcal{C} \otimes \mathcal{D}, generalising product categories from ordinary category theory.

We considered monads from an enriched point of view in a previous post. For our current discussion, we slightly vary the emphasis, and consider monads on a fixed category \mathcal{C} (or more generally object in a 2-category). We enrich over the endofunctor category [\mathcal{C},\mathcal{C}] with functor composition as the monoidal structure.

In this setting:

  1. A monad (\mathbb{T} : \mathcal{C} \rightarrow \mathcal{C}, \eta, \mu) is a one object [\mathcal{C}, \mathcal{C}]-category, which we shall denote \mathbb{T}. The unit and multiplication of the monad encode the identities and composition of the category, and the monad axioms ensure they behave as expected.
  2. A monad map is the same things as a [\mathcal{C}, \mathcal{C}]-functor, encoding the functor action on the hom object, with the monad map axioms enforcing preservation of identities and commuting with composition.
  3. The monoidal category ([\mathcal{C}, \mathcal{C}], \otimes, \mathsf{Id}) is clearly not symmetric. How do we get an analog of the tensor product of enriched categories?

The tensor product of \mathcal{V} categories has objects pairs of objects from the components categories, and hom objects given by the tensor product of the component homs:

(𝒞𝒟)((c1,d1),(c2,d2))=𝒞(c1,c2)𝒟(d1,d2)(\mathcal{C} \otimes \mathcal{D})((c_1, d_1), (c_2, d_2)) = \mathcal{C}(c_1,c_2) \otimes \mathcal{D}(d_1,d_2)

In order to define the composition maps

(𝒞𝒟)((c2,d2),(c3,d3))(𝒞𝒟)((c1,d1),(c2,d2))(𝒞𝒟)((c1,d1),(c3,d3))(\mathcal{C} \otimes \mathcal{D})((c_2,d_2),(c_3, d_3)) \otimes (\mathcal{C} \otimes \mathcal{D})((c_1,d_1),(c_2,d_2)) \rightarrow (\mathcal{C} \otimes \mathcal{D})((c_1,d_1),(c_3,d_3))

from the composition maps in the component categories, we need the assumption \mathcal{V} is symmetric to allow us to wire things up in the right order.

Now if we consider our case of interest, monads

(𝕊,η,μ)and(𝕋,η,μ)(\mathbb{S}, \eta, \mu) \quad\text{and}\quad(\mathbb{T},\eta,\mu)

viewed as one-object [\mathcal{C}, \mathcal{C}]-categories, if we could form the tensor product of these categories,

𝕋𝕊\mathbb{T} \otimes \mathbb{S}

it would have a single hom object

𝕋𝕊\mathbb{T} \circ \mathbb{S}

As we have no symmetry, we need to figure out how to form a composition map

𝕋𝕊𝕋𝕊𝕋𝕊\mathbb{T} \circ \mathbb{S} \circ \mathbb{T} \circ \mathbb{S} \Rightarrow \mathbb{T} \circ \mathbb{S}

using the composition maps (monad multiplications) in the component categories. Following the standard tensor product construction, we need a natural transformation

λ:𝕊𝕋𝕋𝕊\lambda : \mathbb{S} \circ \mathbb{T} \Rightarrow \mathbb{T} \circ \mathbb{S}

to swap the middle two components of the domain as follows:

𝕋𝕊𝕋𝕊𝕋λ𝕊𝕋𝕋𝕊𝕊\mathbb{T} \circ \mathbb{S} \circ \mathbb{T} \circ \mathbb{S} \xRightarrow{\mathbb{T} \circ \lambda \circ \mathbb{S}} \mathbb{T} \circ \mathbb{T} \circ \mathbb{S} \circ \mathbb{S}

Not any old natural transformation will do, in order to prove the resulting composition map is unital and associative, we will need some equational axioms. In fact, what we need is a distributive law!

Summary

This post stems from a simple line of reasoning:

  • Monads are special enriched categories
  • There are standard ways of composing monads and composing enriched categories, are these also related?

I would be very interested to understand if there is a well-known construction on enriched categories of which the perspective on distributive laws above is a special case?

Leave a comment