4

Let $T:\mathbf{Set} \rightarrow \mathbf{Set}$ denote a finitary monad such that $T(\emptyset) \cong 1$ and $T(A \sqcup B) \cong T(A) \times T(B)$, naturally in $A$ and $B$.

Question. Does $T$ necessarily arise as the free module monad for some unital semiring?

goblin GONE
  • 69,385
  • I'll comment that if $T$ is the free monoid monad, then we have a natural family of morphisms $T(A \sqcup B) \rightarrow T(A) \times T(B),$ but these aren't isomorphisms. On the other hand, if $T$ is the powerset monad, then $T$ isn't finitary. – goblin GONE Dec 06 '16 at 17:16
  • The corner case $TX=1$ is a finitary monad with the required properties (additivity). The only way to obtain this as a free module monad (i.e. formal linear combinations over some semiring), is if one allowed a semiring to be empty. – Thorsten Dec 08 '16 at 01:38
  • 1
    @Thorsten, the trivial (unital) semiring with $0=1$ has the desired properties. – goblin GONE Dec 08 '16 at 01:40
  • oh right. Sorry for the noise! – Thorsten Dec 08 '16 at 01:55
  • The finite-powerset monad is another example, but this turns out to be the free module monad for $\mathbb{F}_2$. – HeinrichD Apr 15 '17 at 09:06
  • @HeinrichD, actually its the monad for the boolean semiring; the one with $1+1=1$. Think about the underlying endofunctors; they're fundamentally different. However if we just consider what they do to injections, the relevant endofunctors become isomorphic. – goblin GONE Apr 15 '17 at 10:27
  • You are right. The free module monad for $\mathbb{F}2$ maps a finite set $X$ to $E(X)$, the set of finite subsets of $X$, but a map $f : X \to Y$ is mapped to $f* : E(X) \to E(Y)$, $T \mapsto {y \in Y : \exists ! , x \in T . ~ y = f(x)}$, correct? And for the semiring with $1+1=1$ we get $\exists$ instead of $\exists !$. – HeinrichD Apr 15 '17 at 10:43
  • @HeinrichD, you're on the right track, but that's not quite right. In maximum generality: given a set $X$ and a set $R$ with a distinguished element $0$, define $R \langle X \rangle$ to be the set of finitely-supported functions $X \rightarrow R$. Already, $R\langle - \rangle$ can be made into a functor $(\mathbf{Set},\mathrm{Inj}) \rightarrow (\mathbf{Set},\mathrm{Inj})$ as follows: given an injection $f : A \rightarrow B$, we define $$R\langle f \rangle(j) = b \mapsto \begin{cases} j(f^{-1}(b)), & f^{-1}(b) \neq \emptyset \ 0 \end{cases}.$$ – goblin GONE Apr 15 '17 at 12:29
  • (cont.) If we want to make this into a functor $\mathbf{Set} \rightarrow \mathbf{Set}$, we need a bit more structure on $R$. Specifically, we need an additively denoted commutative monoid structure (making $0$ into the identity). In this case, we can define: $$R\langle f \rangle(j) = b \mapsto \sum_{a \in f^{-1}(b)}j(a),$$ which improves upon the previous definition. Now observe that in $\mathbb{Z}_2$, we have: $$0 = 0, \quad 1=1, \quad 1+1=0, \quad 1+1+1=1,\ldots$$ So basically, things are summing to $1$ iff we have an odd number of $1$'s. – goblin GONE Apr 15 '17 at 12:32
  • (cont.) It follows that $$\mathbb{Z}_2\langle f\rangle(j) = b \mapsto \begin{cases} 1, & |f^{-1}(b)| \mbox{ is odd} \ 0 \end{cases}.$$ Whereas in $\mathbb{B}$, we have: $$0 = 0, \quad 1=1, \quad 1+1=1, \quad 1+1+1=1,\ldots$$ So basically, things are summing to $1$ iff we have one or more $1$'s. It follows that $$\mathbb{B}\langle f\rangle(j) = b \mapsto \begin{cases} 1, & |f^{-1}(b)| \mbox{ is inhabited} \ 0 \end{cases}.$$ Notice we haven't used the fact that you can multiply elements in a semiring; we've just used that you can add things. – goblin GONE Apr 15 '17 at 12:35
  • In fact, it turns out that the only part of the monad structure on $R\langle - \rangle$ that requires the ring multiplication $R \times R \rightarrow R$ is the multiplication $$\mu : R\langle R\langle-\rangle\rangle \rightarrow R\langle-\rangle.$$ Basically, we need to know how to multiply things in the semring so that we can flatten linear combinations of linear combinations correctly. For example, to flatten $a(bx+cy)$ to obtain $(ab)x+(ac)y$, we need to know what $ab$ and $ac$ mean. – goblin GONE Apr 15 '17 at 12:39

1 Answers1

1

I think the answer is Yes.

Since $T$ is finitary, we may restrict to finite sets in the domain. We have natural isomorphisms $T(A) \cong T(\{1\})^A$. The set $T(\{1\})$ has a semiring structure defined as follows:

  • The unique map $\emptyset \to \{1\}$ induces a map $\{1\} \cong T(\emptyset) \to T(\{1\})$, i.e. an element $0 \in T(\{1\})$.

  • The monad unit $\{1\} \to T(\{1\})$ induces another element $1 \in T(\{1\})$.

  • The codiagonal $\{1\} + \{1\} \to \{1\}$ induces the addition map $T(\{1\}) \times T(\{1\}) \to T(\{1\} + \{1\}) \to T(\{1\}).$

  • There is a natural map $T(A) \times B \to T(A \times B)$, a so-called strength, induced by the natural map $B \to \hom(A,A \times B) \to \hom(T(A),T(A \times B))$. This induces a multiplication map $$T(A) \times T(A) \to T(A \times T(A)) \cong T(T(A) \times A) \to T(T(A \times A)) \to T(A).$$ In the last step, we have used the monad multiplication.

Of course one has to check that the semiring axioms are satisfied (this requires some work), and that the isomorphism $T(A) \cong T(\{1\})^A$ respects the monad structure (this should be easy). I think the proof may appear somewhere in Durov's thesis.

Edit: It is 4.8.6 in Durov's thesis. But we have to require that the natural maps $T(A + B) \cong T(A) \times T(B)$ are not arbtirary, but rather induced by the monad structure in a certain way, see 4.8.1. Specifically, the projection $T(A + B) \to T(A)$ (and likewise $T(A + B) \to T(B)$) should be the $T$-module map which is induced by the map $A + B \to T(A)$ which is the monad unit on $A$ and the "zero map" $B \to \{1\} \to T(\emptyset) \to T(A)$ on $B$.

HeinrichD
  • 2,694