2
$\begingroup$

Take a Cartesian (or monoidal) closed category; define Reader monad for a given object $E$ as $X \mapsto X^E$; and take a strong monad $M$ (strong means preserves product or tensor product).

Now the composition $M\circ E$ ($M$ followed by $E$) is a monad again.

At least I believe it is true; and I wonder if it is a known fact, or plain wrong.

$\endgroup$
1
  • $\begingroup$ I suggest that you edit the question to include all the corrections to the question that Todd Trimble starts his answer off with. $\endgroup$ Commented Dec 11, 2012 at 17:07

1 Answer 1

7
$\begingroup$

Although I believe the question needs cleaning up, what I believe to be the desired statement is true. I cannot find a direct reference for it at the moment, but the statement should be equivalent to something familiar from the literature.

First, the "Reader monad" for a fixed object $E$ crucially uses cartesian (not general monoidal) products; the canonical comonoid structure on $E$, with counit the unique map $!: E \to 1$ to the terminal object and comultiplication the diagonal map $\delta: E \to E \times E$, induces the monad structure on the Reader monad, with unit and multiplication given respectively by

$$X \cong X^1 \stackrel{X^!}{\to} X^E,$$

$$(X^E)^E \cong X^{E \times E} \stackrel{X^\delta}{\to} X^E.$$

So, let $\mathcal{C}$ be a cartesian closed category; for an object $E$ of $\mathcal{C}$, we'll denote the associated reader monad by $\mathbf{E}$.

Next, there are standard notions of strong endofunctors on $\mathcal{C}$ and strong monads $M$ on $\mathcal{C}$; it is not that $M$ preserves products, but rather that there is a tensorial strength, i.e., a natural transformation

$$\theta_{X, Y}: X \times MY \to M(X \times Y)$$

satisfying a number of coherence conditions. These conditions involve only finite products, but if we are dealing (as we are here) with a cartesian closed category $\mathcal{C}$ so that $\mathcal{C}$ is enriched in itself in the usual way, then strong endofunctors $M: \mathcal{C} \to \mathcal{C}$ are tantamount to $\mathcal{C}$-enriched endofunctors where the enrichment

$$A^B \to MA^{MB}$$

is derived from the strength by currying the composite

$$A^B \times MB \stackrel{\theta_{A^B, B}}{\to} M(A^B \times B) \stackrel{M(eval_{A, B})}{\to} MA;$$

there is a similar inverse procedure for deriving the strength from the enrichment. Similarly, a strong monad means we are dealing with an enriched monad, meaning that we have an enriched endofunctor $M: \mathcal{C} \to \mathcal{C}$ and enriched natural transformations $m: MM \to M$, $u: 1_{\mathcal{C}} \to M$.

Next, the question seems to be about a canonical monad structure on the $\mathbf{E} \circ M$ (which is $M$ followed by $\mathbf{E}$), not $M \circ \mathbf{E}$ as confusingly written. (The notation $\circ$ should be used only for the traditional right-to-left order of composition; the left-to-right "followed by" is usually denoted by a semicolon $;$ instead of $\circ$, to avoid confusion.)

It is well-known that such a monad structure on the composite is guaranteed by a distributive law between monads. Here the distributive law is a natural transformation $\sigma: M \circ \mathbf{E} \to \mathbf{E} \circ M$, in other words a transformation

$$\sigma_X: M(X^E) \to (MX)^E$$

natural in $X$, satisfying a number of compatibility conditions between the two monad structures. Given such a distributive law, the monad multiplication on $\mathbf{E} \circ M$ is given by

$$\mathbf{E} \circ M \circ \mathbf{E} \circ M \stackrel{\mathbf{E} \circ \sigma \circ M}{\to} \mathbf{E} \circ \mathbf{E} \circ M \circ M \stackrel{m_{\mathbf{E}} \circ m_M}{\to} \mathbf{E} \circ M.$$

Now the punchline is that the desired distributive law is tantamount to the strength on the monad, i.e., $\sigma_X$ is obtained by currying

$$M(X^E) \times E \to M(X^E \times E) \stackrel{eval_{X, E}}{\to} MX$$

where the first arrow is related to the strength $\theta$ (as written above) by applying some symmetry isomorphisms (in the first and third arrows) as follows:

$$M(X^E) \times E \cong E \times M(X^E) \stackrel{\theta}{\to} M(E \times X^E) \cong M(X^E \times E)$$

I cannot find a suitable reference where the (routine) diagram chase is carried out, but compare the remarks after definition 6.1.1 (page 14) of

  • Brookes, S., Van Stone, K.: Monads and Comonads in Intensional Semantics. Tech. Rep. CMUCS-93-140, Pittsburgh, PA, USA (1993)

(see here), where instead of working with distributivity over the reader monad $\mathbf{E}$, the authors relate the tensorial strength to distributivity of a strong monad $M$ over the associated comonad $E \times -$ that is adjoint to $(-)^E$ (see pages 12-13 for the notion of distributivity between a monad and comonad).

$\endgroup$
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .