### A Puzzle on Multi-Sorted Lawvere Theories

#### Posted by John Baez

I hope you know that a **Lawvere theory** is a category $T$ with finite products where the objects are all of the form $x^n$ for some object $x$. A **model** of $T$ is a finite-product-preserving functor $M : T \to \Set$. There’s a category $Mod(T)$ where the objects are models and the morphisms are natural transformations between such functors. Many familiar algebraic structures defined by $n$-ary operations and equations, like groups or vector spaces over some field $k$, can be seen as models of Lawvere theories. So, there’s a Lawvere theory $T$ for which $Mod(T)$ is equivalent to $Grp$, another one that gives $Vect_k$, and so on.

Categories of this sort have been studied a lot and are sometimes called **finitary monadic** categories or **finitary algebraic** categories (though sometimes the latter term is used more generally — see the link). These categories always have coproducts, so it’s natural to wonder when the canonical morphism

$i: M \to M + N$

is monic. After all, it’s true in $Grp$ and $Vect_k$, and in enough other cases that people sometimes call $i$ the ‘inclusion’ of an object $M$ in $M + N$.

But $i: M \to M + N$ is not always monic in the category of models of a Lawvere theory. Can you think of a counterexample before read on?

Okay, here’s one: it’s not always monic in the category $CommRing$, where the coproduct is the familiar ‘tensor product’ of commutative rings. Consider the commutative rings $\mathbb{Q}$ and $\mathbb{Z}/2$; then $\mathbb{Q} \otimes \mathbb{Z}/2 = \{0\}$, since we always have

$a \otimes b = \frac{1}{2}a \, \otimes \, 2b = 0$

so of course the canonical morphism $\mathbb{Q} \to \mathbb{Q} + \mathbb{Z}/2$ is not monic.

However, something weaker is true. For any Lawvere theory $T$ there’s a forgetful functor

$U : Mod(T) \to Set$

and this is monadic, meaning there’s a left adjoint

$F : Set \to Mod(T)$

giving a monad $U F$ on $Set$ whose category of algebras is equivalent (in a standard sort of way) to $Mod(T)$.

So, we can talk about ‘free’ models of $T$, and it turns out that the canonical morphism

$M \to M + N$

is monic when $N$ is free.

**Proposition.** If $T$ is a Lawvere theory, $M \in Mod(T)$ and $X \in Set$, the canonical morphism $i: M \to M + F(X)$ is monic.

I would like, just for the sake of my happiness, to know that this proposition generalizes to multi-sorted Lawvere theories. These are like ordinary Lawvere theories except instead of describing a *single* set with $n$-ary operations obeying equations, they describe a *bunch* of sets with $n$-ary operations obeying equations. For example, there’s a 2-sorted Lawvere theory that describes ring-module pairs. A model of this theory is a ring together with a module of that ring.

Here’s the definition: a **multi-sorted Lawvere theory** with $S$ as its set of sorts is a category with finite products where every object is a finite product of some chosen objects $\{x_\lambda\}_{\lambda \in S}$. So, if $S = 1$ we’re back to an ordinary Lawvere theory, and if $S = 2$ we have a 2-sorted Lawvere theory, and so on. Click the link if you want a more conscientious definition… but honestly, I’m not leaving out anything.

A **model** of an $S$-sorted Lawvere theory $T$ is a functor $M : T \to \Set^S$. Again we get a category $Mod(T)$ with these models as objects and natural transformations as morphisms. Again we have a forgetful functor

$U : Mod(T) \to Set^S$

that’s monadic, and thus a left adjoint

$F : Set^S \to Mod(T)$

Here’s my guess:

**Conjecture.** If $T$ is an multi-sorted Lawvere theory with $S$ as its set of sorts, $M \in Mod(T)$ and $X \in Set^S$, the canonical morphism $i: M \to M + F(X)$ is monic.

Can you prove this? One approach would be to actually ‘build’ $M + F(X)$ in a very concrete way as an $S$-tuple of sets equipped with a bunch of $n$-ary operations, then look at the underlying morphism

$U(i): U(M) \to U(M + F(X))$

in $Set^S$ and show this is monic. That would do the job: since $U$ is faithful it reflects monics. And it’s easy to check if a morphism in $Set^S$ is monic: it’s an $S$-tuple of functions, and they all need to be monic. But it would be nice to find a less grungy proof.

Todd Trimble found a very quick proof for the unsorted case, but curiously, it doesn’t obviously generalize to this case. Nonetheless, he figured out how to handle the case I actually *needed*: I’m studying PROPs, which are models of a certain multi-sorted Lawvere theory, and I needed to show that for any PROP $M$ and any free PROP $F(X)$, the canonical morphism $i : M \to M + F(X)$ is monic. In fact Todd’s argument applies to any multi-sorted Lawvere theory that comes from a multi-sorted operad, more commonly called a colored operad.

Any good ideas?

## Re: A Puzzle on Multi-Sorted Lawvere Theories

I don’t know what the very elegant proof is in the unsorted case. But: would it apply to your setup in the case that $X$ only has elements of a single sort? If so, the result would follow (using that filtered colimits in $Mod(T)$ commute with $U$).