Todd Trimble Home Page All Pages Feeds multisorted Lawvere theories Contents 1. Background 2. Crude monadicity Existence of the left adjoint 3. Further consequences 4. References

This material is in reply to a query of John Baez at the n- Café.

1. Background

This section is just to provide some background for notions of multisorted Lawvere theories, to state a form of John’s desired theorem, and to fix some general notation.

Let i: Fin → Set be the inclusion of the category of finite sets {1, …, n} into the category of all sets. Let Λ be a set, and let i ↓ Λ, or just Fin/Λ, be the comma category whose objects are pairs (S, x: S → Λ) where S is a finite set.

We can think of such a pair (S, x) as a finite set fibered over Λ, so that all but finitely many fibers are empty. The category Fin/Λ has finite coproducts (they are just coproducts in each separate fiber).

A key fact we need is that Fin/Λ is the free category with finite coproducts generated by Λ. More formally: treat the set Λ as a discrete category; there is an evident functor ι: Λ → Fin/Λ which takes λ ∈ Λ to the evident fibered set λ: 1 → Λ.

Lemma 1.1. Let C be a category with finite coproducts, and let f: Λ → C be a functor. There is (up to unique isomorphism) a unique coproduct-preserving functor ˜f : Fin/Λ → C that extends f along ι: Λ → Fin/Λ. If C has chosen coproducts, we can demand preservation on the nose.

˜ The idea of proof is that f takes a fibered set x: S → Λ to the coproduct ∑i ∈ Sf(x(i)) in C.

Dually, the free category with finite products generated by Λ is (Fin/Λ)op. For C a category with finite products, the product-preserving extension of f: Λ → C to (Fin/Λ)op → C will be denoted f − .

Definition 1.2. A Λ-sorted Lawvere theory is a category with finite products Θ equipped with a finite- product preserving functor k: (Fin/Λ)op → Θ that is the identity on objects. (Thus we can think of Θ as having chosen products.)

Yes, this is “evil”, but it can be a convenient (and harmless) evil. Even in the usual one-sorted case, if we purge this evil, we can have a Lawvere theory in which the generic object x is isomorphic to its square x2. Whereas it is convenient to think of them as distinct so that n-ary operations in the theory are identified with morphisms xn → x, and the arity is well-defined. But anyone who is offended by this evil can rewrite matters, at the cost of some extra words (replacing “identity/bijective on objects” with “essentially surjective”).

As usual, a model of a Lawvere theory Θ in a category with finite products C is a product-preserving functor F: Θ → C. A homomorphism of models is a natural transformation between such functors. Thus we define the category of models, ≔ ModC(Θ) Prod(Θ, C),

Λ and there is a forgetful functor ModC(Θ) → C obtained by an obvious composition: Prod ( k , C ) Prod(Θ, C) → Prod((Fin/Λ)op, C) ≃ CΛ.

We will prove

Theorem 1.3. Let C be a category that admits general colimits and finite products that distribute over Λ colimits. Then the forgetful functor ModC(Θ) → C is monadic.

There are a number of ways of proving this theorem. One idea is to invoke a monadicity theorem, say a crude monadicity theorem, and in fact we will pursue this first. If all we are after is monadicity, then this approach is arguably overkill: the monadicity can be proved in a much “softer” and more direct fashion (by adapting some of Kelly’s ideas on operad theory). This approach is touched upon here; perhaps at some point we’ll go through it in more detail. However, an extra bonus of the approach via crude monadicity is that it makes cocompleteness of ModC(Θ) immediate, by an old result of Linton.

2. Crude monadicity

Recall the crude monadicity theorem: a functor U: A → B is monadic if

1. U has a left adjoint F: B → A, 2. The category A has reflexive coequalizers, 3. The functor U: A → B preserves reflexive coequalizers and reflects isomorphisms.

In the case of the forgetful functor U: Prod(Θ, C) → CΛ, these conditions are not difficult to check, although for our purposes the existence of the left adjoint will require some preface, so we save this for later.

Lemma 2.1. U: Prod(Θ, C) → CΛ reflects isomorphisms.

Proof. On account of Prod((Fin/Λ)op, C) ≃ CΛ, this is equivalent to saying the functor G: Prod(Θ, C) → Prod((Fin/Λ)op, C), induced from the product-preserving functor k: (Fin/Λ)op → Θ, reflects isomorphisms.

Suppose M, N: Θ → C are product-preserving functors and ψ: M → N is a natural transformation, such that the whiskering ψk: Mk → Nk is invertible. But such a natural transformation is invertible iff all its components ψk(x) are invertible. Since k is the identity on objects, this means each component ψ(x) is invertible, so ψ itself is invertible, as was to be shown. ▮

Lemma 2.2. Suppose C has finite products and reflexive coequalizers, and that products distribute over reflexive coequalizers. Then the product functor C × C → C preserves reflexive coequalizers.

The following proof is based on a neat argument given by Steve Lack. Another proof may be based on lemma 0.17 from Johnstone’s Topos Theory, page 4 (you can see it by looking inside the book at Amazon).

→ Proof. The walking reflexive fork a → b → a is a sifted category D, meaning precisely that the diagonal functor Δ: D → D × D is a final functor. (See Adámek, Rosický, Vitale for basic information on sifted categories and sifted colimits; see particularly their example 1.2.)

Now suppose we have a reflexive fork diagram D → C × C given by two reflexive fork diagrams F, G: D → C in our category C. We have ≅ (colimd ∈ DF(d)) × (colimd ′ ∈ DG(d′ )) colimd ∈ D[F(d) × colimd ′ ∈ DG(d′ )] ≅ colimd ∈ Dcolimd ′ ∈ D[F(d) × G(d′ )] ≅ colim ( d , d ′ ) ∈ D × DF(d) × G(d′ ) ≅ colimd ∈ DF(d) × G(d) where the first two isomorphisms are come from products distributing over reflexive coequalizers, the third comes from a “Fubini theorem”, and the last from the finality of Δ: D → D × D. This shows the product applied to a reflexive coequalizer of ⟨F, G⟩: D → C × C is canonically isomorphic to the reflexive coequalizer of the product F × G: D → C, as was to be shown. ▮ Proposition 2.3. If products distribute over reflexive coequalizers in C, then Prod(Θ, C) admits reflexive coequalizers and U: Prod(Θ, C) → CΛ preserves them.

Proof. Let [Θ, C] denote the category of all functors Θ → C; this certainly has reflexive coequalizers if C has them. For any category A, let AD be the category of reflexive fork diagrams in A. Let

j: Prod(Θ, C) ↪ [Θ, C] be the full inclusion. We show Prod(Θ, C) is closed under reflexive coequalizers as computed in [Θ, C], i.e., that the composite (where “colim” means coequalizer)

D D Prod(Θ, C) ↪ jD[Θ, C] → colim[Θ, C] factors through the full inclusion j: Prod(Θ, C) ↪ [Θ, C]. This will mean both that Prod(Θ, C) has reflexive coequalizers and that j preserves them, whence U which is the composite

↪ Λ Prod(Θ, C) j[Θ, C] → [ kι , 1C ] [Λ, C] = C also preserves them.

But if θ1, θ2 are two objects of Θ, and if F: D → Prod(Θ, C) is a reflexive fork, then colim jF preserves the product θ1 × θ2 since ≅ [colimd ∈ DF(d)](θ1) × [colimd ′ ∈ DF(d′ )](θ2) colimd[F(d)(θ1)] × colimd ′ [F(d′ )(θ2)] ≅ colimd[F(d)(θ1) × F(d)(θ2)] ≅ colimdF(d)(θ1 × θ2) ≅ [colimdF(d)](θ1 × θ2) where the first and last isomorphisms hold since colimits in [Θ, C] are computed pointwise, the second isomorphism holds by the lemma, and the third holds since each F(d): Θ → C is product-preserving. ▮

Existence of the left adjoint

Now we show that U: Prod(Θ, C) → CΛ has a left adjoint Free: CΛ → Prod(Θ, C), under the following assumptions

C has all colimits (we don’t actually need all, but that’s certainly the most natural assumption), C has finite products, and Products distribute over colimits.

We will call such a category cartesian monoidally cocomplete, or CMC. (Another name for it could be ‘cartesian 2-rig’, and indeed some of the material below is a cartesian analogue of the formalism of typed operads in the context of 2-rigs; see Baez-Dolan, section 2.3.)

It’s possible to dive right in and write down a coend formula for the asserted left adjoint Free, but it is clarifying to introduce it by telling a little abstract story. The basic theme is the idea of the free cartesian monoidally cocomplete category on a set Λ and suitable monads thereon as being “Λ-typed cartesian operads”; this kind of idea has been used by various authors (Kelly, Baez-Dolan) in the symmetric monoidal case instead of the cartesian monoidal case undertaken here, but the development is conceptually almost identical. We will see that typed or multisorted Lawvere theories canonically give rise to such typed cartesian operads.

Proposition 2.4. Let D be a category with finite products. For CMC categories A, B, let CMC(A, B) denote the category of finite-product preserving, cocontinuous functors between them. Then, if D is a category op with finite products, then the Day convolution product on SetD induced by the cartesian monoidal op op structure on D is also cartesian, and SetD is CMC. Furthermore, SetD is the free CMC category generated by D as a cartesian monoidal category, in the sense that for any CMC category there is an equivalence

op Prod(D, C) ≃ CMC(SetD , C) which takes a finite-product preserving functor H: D → C to the left Kan extension Hˆ , of H along the Yoneda op embedding D → SetD .

I won’t go through the proof here (which is outlined for example here), but it will be handy to recall the coend formula for the left Kan extension: it is

d ∈ D Hˆ (W) = ∫ H(d) ⋅ W(d) where W: Dop → Set is a weight over D.

Proposition 2.5. SetFin / Λ is the free cartesian monoidally cocomplete category generated by the discrete category Λ.

The point is that for a cartesian monoidally cocomplete C, there are equivalences of categories

[Λ, C] ≃ Prod((Fin/Λ)op, C) ≃ CMC(SetFin / Λ, C) both of which have been described above. Putting them together: there is in the first place, for each typing f: Λ → C an induced finite-product preserving map f − : (Fin/Λ)op → C; here we think of fx as being a fiberwise finite power of f if x: S → Λ is a finite set over Λ, i.e.,

x x f = ∏ λ ∈ Λf(λ) λ.

− Fin / Λ where xλ denotes the fiber over λ. In the second place, we pass from f to a CMC functor Set → C defined on weights W: Fin/Λ → Set by

∈ op W ↦ ∫x ( Fin / Λ ) W(x) ⋅ fx.

Now for a key definition:

Definition 2.6. A Λ-typed or Λ-sorted cartesian operad is a monoid in the monoidal category CMC(SetFin / Λ, SetFin / Λ) (taking endofunctor composition as the monoidal product and the identity as monoidal unit).

A principal moral of our story is that a Λ-typed cartesian operad is essentially the same thing as Λ-sorted Lawvere theory. We need just a little from that story here.

Let Θ be a Λ-sorted Lawvere theory (with canonical product-preserving functor k: (Fin/Λ)op → Θ; recall also our earlier notation ι: Λ → (Fin/Λ)op for the canonical inclusion). The Lawvere theory Θ gives rise to a product-preserving functor (Fin/Λ)op → SetFin / Λ defined by

∈ op ↦ (x (Fin/Λ) ) (homΘ(k − , k(x)): Fin/Λ → Set).

According to our development, this gives rise to a CMC endofunctor which we denote Op(Θ): SetFin / Λ → SetFin / Λ:

op ↦ x ∈ ( Fin / Λ ) ⋅ (W: Fin/Λ → Set) ∫ homΘ(k − , k(x)) W(x).

Composition in Θ induces a multiplication for Op(Θ):

∘ y x ⋅ ⋅ (Op(Θ) Op(Θ))(W) = ∫ ∫ homΘ(k − , k(y)) homΘ(k(y), k(x)) W(x) ≅ x y ⋅ ⋅ ∫ ∫ homΘ(k − , k(y)) homΘ(k(y), k(x)) W(x) x ⋅ ∫ comp 1W ( x ) x ⋅ → ∫ homΘ(k − , k(x)) W(x) = Op(Θ)(W) and similarly identities in Θ induce a monad unit for Op(Θ). This defines the cartesian operad associated with the Lawvere theory Θ. Definition 2.7. Let C be a CMC category, and let M: SetFin / Λ → SetFin / Λ be a Λ-sorted cartesian operad. The monad induced by M on [Λ, C] is the monad MC obtained by transporting the monad

− ∘ M CMC(SetFin / Λ, C) → CMC(SetFin / Λ, C) across the equivalence CMC(SetFin / Λ, C) ≃ [Λ, C].

Actually, it seems a good idea to overload the notation and use MC for any one of three monads induced by M:

− ∘ M CMC(SetFin / Λ, C) → CMC(SetFin / Λ, C),

Prod((Fin/Λ)op, C) → Prod((Fin/Λ)op, C),

[Λ, C] → [Λ, C], since all three indicated categories are canonically equivalent – and let the choice be dictated by doctrinal needs.

In particular, to construct the free Θ-model in Prod(Θ, C) generated by a typing function f: Λ → C, the obvious choice is the second. Here the monad

op op Op(Θ)C : Prod((Fin/Λ) , C) → Prod((Fin/Λ) , C) takes the product-preserving functor f − : (Fin/Λ)op → C to another product-preserving functor (Fin/Λ)op → C, which by following the formulas above is expressed by the coend

op x ∈ ( Fin / Λ ) ⋅ x ∫ homΘ(k(x), k − ) f .

In essence this gives the free model generated by f: Λ → C. More exactly, the free model (as a product- preserving functor Free(f): Θ → C) is just

≔ x ⋅ x Free(f) ∫ homΘ(k(x), −) f .

This is manifestly a functor Θ → C.

Proposition 2.8. Free(f): Θ → C is product-preserving.

Proof. We already know that Free(f) ∘ k: (Fin/Λ)op → C is product-preserving, since that is exactly

x ⋅ x − ∫ homΘ(k(x), k − ) f = Op(Θ)C(f )

op and Op(Θ)C was after all designed to land in product-preserving functors Prod((Fin/Λ) , C). But a functor G: Θ → C is product-preserving iff G ∘ k is product-preserving: this is because product-preservation just comes down to preservation of projection and diagonal maps for all objects x, y in Θ, and all that projection and diagonal data is already contained in (Fin/Λ)op under the product-preserving “inclusion” k: (Fin/Λ)op → Θ (which we recall is the identity on objects). ▮

Proposition 2.9. Free: [Λ, C] → Prod(Θ, C) is left adjoint to U: Prod(Θ, C) → [Λ, C].

Proof. Suppose M: Θ → C is product-preserving and that we have a natural transformation Free(f) → M. We have natural bijections between families that are extranatural in the indicated arguments, as follows: x ⋅ x ∫ homΘ(k(x), θ) f → M(θ) ⋅ x homΘ(k(x), θ) f → M(θ)

fx → M(θ)homΘ ( k ( x ) , θ )

x homΘ ( k ( x ) , θ ) f → ∫θM(θ) x f → Nat ( homΘ ( k ( x ) , − ) , M ) Yoneda lemma fx → M ( k ( x ) ) with both sides product-preserving in x ∈ Ob((Fin/Λ)op). Under the equivalence Prod((Fin/Λ)op, C) ≃ [Λ, C], the last is in natural bijection with maps

f → M(k ∘ ι) = U(M) in [Λ, C]. This completes the proof, and thus also the proof of Theorem 1.3. ▮

3. Further consequences

It goes without saying that if C and therefore also CΛ is complete, then so is any monadic category over CΛ such as ModC(Θ). In general it is not true that a category that is monadic over a cocomplete category is itself cocomplete, but fortunately the following is true.

Proposition 3.1. If C is CMC, then the category of models ModC(Θ) is cocomplete for any Λ-sorted Lawvere theory Θ.

Proof. It is an old result of Linton that if B is cocomplete and T is a monad on B, then the category of algebras A = BT is cocomplete if it has reflexive coequalizers. This applies here to give the desired conclusion, in view of Proposition 2.3, Theorem 1.3, and the fact that CΛ is cocomplete.

For convenience we reproduce a proof of Linton’s result here. Let U: A → B be monadic with left adjoint F: B → A; let T be the monad UF; let η: 1B → UF be the unit and ε: FU → 1A be the counit of the adjunction. First, a family of free T-algebras {F(ci)}i ∈ I has a coproduct: it’s just F( ∑ici) since the left adjoint F preserves coproducts.

Next, under our hypotheses, the category of T-algebras A has arbitrary coproducts, because the coproduct of a family {ai}i ∈ I of algebras can be exhibited as a coequalizer of a reflexive fork diagram consisting of coproducts of free algebras:

∑iFηUai ∑iεFUai ⇉ ∑ iFUai → ∑ iFUFUai ∑iFUεai ∑ iFUai.

Finally, coequalizers (not just reflexive coequalizers) exist in A, because A has binary coproducts, and the f → coequalizer of a general pair of arrows a′ → ga can be computed as the coequalizer of the reflexive fork

incl ( 1a , f ) ⇉ a → a + a′ ( 1a , g ) a.

Remark 3.2. As pointed out to me by Mike Shulman, the standard presentation of colimits in terms of coproducts and coequalizers is actually in terms of coproducts and reflexive coequalizers (being a truncation of a simplicial object, namely a two-sided bar construction). This observation can be used in lieu of the final paragraph of the proof above of Linton’s result.

Let k: (Fin/Λ)op → Θ and k′ : (Fin/Λ)op → Θ′ be Λ-sorted Lawvere theories. A morphism of theories is a finite- product preserving functor Θ → Θ′ . This is the same as a functor g: Θ → Θ′ such that k′ = g ∘ k (since the projection and diagonal map data on objects of Θ are already in (Fin/Λ)op, and k, k′ are product-preserving).

Theorem 3.3. If C is CMC and g: Θ → Θ′ is a morphism of theories, then the functor g * ≔ Prod(g, C): Prod(Θ′ , C) → Prod(Θ, C) is monadic.

Lemma 3.4. g * : Prod(Θ′ , C) → Prod(Θ, C) preserves reflexive coequalizers and reflects isomorphisms (we already know Prod(Θ′ , C) has reflexive coequalizers).

Proof. That g * reflects isomorphisms is easy: given that g * (f) is an iso, then also k * g * (f) = (k′ ) * (f) is an iso, whence f is an iso since (k′ ) * reflects isos.

Similarly, suppose i, j is a reflexive pair of maps M → N in Prod(Θ′ , C), with coequalizer p: N → P, and suppose the reflexive pair g * (i), g * (j) in Prod(Θ, C) has coequalizer q: g * (N) → Q. Then there is a unique map r: Q → g * (P) such that g * (p) = r ∘ q; to show g * preserves reflexive coequalizers, we must show r is an iso. Since k * preserves reflexive coequalizers, we see k * (q) is the coequalizer of

(k * g * (i), k * g * (j)) = ((k′ ) * (i), (k′ ) * (j)) as is (k′ ) * (p) = k * g * (p) since (k′ ) * preserves reflexive coequalizers. This implies k * (r) is an iso, and so r is an iso since k * reflects isos. ▮

Proof of Theorem. We invoke the crude monadicity theorem; in view of the preceding lemma, the only hypothesis left to verify is the existence of a left adjoint to g * . But this clearly follows from the adjoint triangle theorem. ▮

4. References

John Baez, Finite Product Theories, n-Category Café blog posting (April 20, 2014). (web)

J. Adámek, J. Rosický, and E.M. Vitale, What are sifted colimits?, TAC Vol. 23 No. 13 (2010), 251- 260. (web)

Steve Lack (http://mathoverflow.net/users/10862/steve-lack), Why do filtered colimits commute with finite limits?, URL (version: 2011-03-02): http://mathoverflow.net/q/57099 (web)

Peter T. Johnstone, Topos Theory, Dover Books on Mathematics (paperback), (2014). Originally published by Academic Press, 1977. (web)

Todd Trimble, Towards a doctrine of operads, personal nLab web. (web)

Fred Linton, Coequalizers in categories of algebras, Seminar on Triples and Categorical Homology Theory, Lecture Notes in Mathematics Vol. 80 (1969), 75-90.

The consideration of CMC categories closely parallels the development of operad theory in terms of 2-rigs given here:

John Baez and James Dolan, Higher-dimensional algebra III: n-categories and the algebra of opetopes, Adv. Math. 135 (1998), 145–206. (arXiv)

The preceding article was discussed further (with some errors corrected) in

Eugenia Cheng, The category of opetopes and the category of opetopic sets, Th. Appl. Cat. 11 (2003), 353–374. arXiv) Tom Leinster, Structures in higher-dimensional . (arXiv)

Also providing a template for the abstract consideration of cartesian monoidally cocomplete categories is the seminal article of Kelly:

G.M. Kelly, On the operads of J.P. May, Reprints in Theory and Applications of Categories, No. 13 (2005) pp. 1-13. (web)

Revised on January 31, 2018 at 10:57:42 by Todd Trimble