Distributive laws for Lawvere theories

Eugenia Cheng

University of Sheffield CT2011

1. Plan

1. Introduction

2. Plan

1. Introduction 2. Lawvere theories

2. Plan

1. Introduction 2. Lawvere theories 3. Distributive laws for monads

2. Plan

1. Introduction 2. Lawvere theories 3. Distributive laws for monads 4. Three ways to do it

2. Plan

1. Introduction 2. Lawvere theories 3. Distributive laws for monads 4. Three ways to do it 5. Comparison.

2. 1. Introduction

Distributive laws give us a way of combining two or more types of algebraic structure expressed as monads.

3. 1. Introduction

Distributive laws give us a way of combining two or more types of algebraic structure expressed as monads.

E.g. monoids and abelian groups rings

3. 1. Introduction

Distributive laws give us a way of combining two or more types of algebraic structure expressed as monads.

E.g. monoids and abelian groups rings

Question What’s a distributive law for Lawvere theories?

3. 1. Introduction

Distributive laws give us a way of combining two or more types of algebraic structure expressed as monads.

E.g. monoids and abelian groups rings

Question What’s a distributive law for Lawvere theories? • Lawvere theories correspond to finitary monads on Set.

3. 1. Introduction

Distributive laws give us a way of combining two or more types of algebraic structure expressed as monads.

E.g. monoids and abelian groups rings

Question What’s a distributive law for Lawvere theories? • Lawvere theories correspond to finitary monads on Set. • Lawvere theories are themselves monads in a certain bicategory.

3. 1. Introduction

Distributive laws give us a way of combining two or more types of algebraic structure expressed as monads.

E.g. monoids and abelian groups rings

Question What’s a distributive law for Lawvere theories? • Lawvere theories correspond to finitary monads on Set. • Lawvere theories are themselves monads in a certain bicategory. —So we can look for distributive laws between these monads.

3. 1. Introduction

• A on V only gives algebras in V. • A Lawvere theory gives models in any finite-product .

4. 1. Introduction

• A monad on V only gives algebras in V. • A Lawvere theory gives models in any finite-product category.

LTs monads

4. 1. Introduction

• A monad on V only gives algebras in V. • A Lawvere theory gives models in any finite-product category.

LTs monads

algebras

4. 1. Introduction

• A monad on V only gives algebras in V. • A Lawvere theory gives models in any finite-product category.

LTs monads

algebras

4. 1. Introduction

• A monad on V only gives algebras in V. • A Lawvere theory gives models in any finite-product category.

LTs monads

models algebras

4. 1. Introduction

• A monad on V only gives algebras in V. • A Lawvere theory gives models in any finite-product category.

LTs monads

models algebras

Example Distributive law for monoids over abelian groups rings internal to any finite-product category V.

4. 2. Lawvere theories

5. 2. Lawvere theories

Idea Encapsulate an algebraic theory in a category L.

5. 2. Lawvere theories

Idea Encapsulate an algebraic theory in a category L.

• The objects of L are the natural numbers, our arities. • A morphism k 1 is an operation of arity k. • A morphism k m is m operations of arity k.

5. 2. Lawvere theories

Idea Encapsulate an algebraic theory in a category L.

• The objects of L are the natural numbers, our arities. • A morphism k 1 is an operation of arity k. • A morphism k m is m operations of arity k. We use F a skeleton of FinSet (finite sets and functions).

5. 2. Lawvere theories

Idea Encapsulate an algebraic theory in a category L.

• The objects of L are the natural numbers, our arities. • A morphism k 1 is an operation of arity k. • A morphism k m is m operations of arity k. We use F a skeleton of FinSet (finite sets and functions).

Definition A Lawvere theory is a small category L with finite products, equipped with a strict identity-on-objects functor

Fop L.

5. 2. Lawvere theories

Idea Encapsulate an algebraic theory in a category L.

• The objects of L are the natural numbers, our arities. • A morphism k 1 is an operation of arity k. • A morphism k m is m operations of arity k. We use F a skeleton of FinSet (finite sets and functions).

Definition A Lawvere theory is a small category L with finite products, equipped with a strict identity-on-objects functor

Fop L. Note: in Fop the object m is the product of m copies of 1.

5. 2. Lawvere theories Note We are allowed to forget and repeat variables.

6. 2. Lawvere theories Note We are allowed to forget and repeat variables. Example 2-ary operations in the theory of monoids

6. 2. Lawvere theories Note We are allowed to forget and repeat variables. Example 2-ary operations in the theory of monoids • (non-Σ) operads: only one i.e. ab

6. 2. Lawvere theories Note We are allowed to forget and repeat variables. Example 2-ary operations in the theory of monoids • (non-Σ) operads: only one i.e. ab • Lawvere theory: ab, a, a2, b, b2, aba, ab3a5,...

6. 2. Lawvere theories Note We are allowed to forget and repeat variables. Example 2-ary operations in the theory of monoids • (non-Σ) operads: only one i.e. ab • Lawvere theory: ab, a, a2, b, b2, aba, ab3a5,... i.e. everything in the free monad on {a, b}.

6. 2. Lawvere theories Note We are allowed to forget and repeat variables. Example 2-ary operations in the theory of monoids • (non-Σ) operads: only one i.e. ab • Lawvere theory: ab, a, a2, b, b2, aba, ab3a5,... i.e. everything in the free monad on {a, b}.

A morphism 3 2 is two 3-ary operations e.g.

(ab, a3), (a2b, abc),...

6. 2. Lawvere theories Note We are allowed to forget and repeat variables. Example 2-ary operations in the theory of monoids • (non-Σ) operads: only one i.e. ab • Lawvere theory: ab, a, a2, b, b2, aba, ab3a5,... i.e. everything in the free monad on {a, b}.

A morphism 3 2 is two 3-ary operations e.g.

(ab, a3), (a2b, abc),...

{ab, a3} x2y Composition: 3 2 1

6. 2. Lawvere theories Note We are allowed to forget and repeat variables. Example 2-ary operations in the theory of monoids • (non-Σ) operads: only one i.e. ab • Lawvere theory: ab, a, a2, b, b2, aba, ab3a5,... i.e. everything in the free monad on {a, b}.

A morphism 3 2 is two 3-ary operations e.g.

(ab, a3), (a2b, abc),...

{ab, a3} x2y Composition: 3 2 1 ab.ab.a3 | {z } 6. 2. Lawvere theories

We have many arities for the “same” operation. arity operation 3 a, b, c abc 4 a,b,c,d abc 5 a, b, c, d, e abc . .

7. 2. Lawvere theories

We have many arities for the “same” operation. arity operation 3 a, b, c abc 3 1 4 a,b,c,d abc 5 a, b, c, d, e abc 4 . . 5 These are all related by forgetting variables i.e. via projections in Fop. 6. .

7. 2. Lawvere theories

Generalisations

8. 2. Lawvere theories

Generalisations

• use F = FinSet instead of a skeleton

8. 2. Lawvere theories

Generalisations

• use F = FinSet instead of a skeleton

• put P = “free finite product category” 2-monad note that FinSet op is P1 —could use PA to get “typed” theory

8. 2. Lawvere theories

Generalisations

• use F = FinSet instead of a skeleton

• put P = “free finite product category” 2-monad note that FinSet op is P1 —could use PA to get “typed” theory

• could just say a Lawvere theory is any finite product category C

8. 2. Lawvere theories

Generalisations

• use F = FinSet instead of a skeleton

• put P = “free finite product category” 2-monad note that FinSet op is P1 —could use PA to get “typed” theory

• could just say a Lawvere theory is any finite product category C

• could do finite limits instead of just products.

8. 2. Lawvere theories

Models ≡ algebras A model for L in a finite-product category C is a finite-product preserving functor L C

9. 2. Lawvere theories

Models ≡ algebras A model for L in a finite-product category C is a finite-product preserving functor L C Idea 1 A ∈ C underlying data

9. 2. Lawvere theories

Models ≡ algebras A model for L in a finite-product category C is a finite-product preserving functor L C Idea 1 A ∈ C underlying data k Ak

9. 2. Lawvere theories

Models ≡ algebras A model for L in a finite-product category C is a finite-product preserving functor L C Idea 1 A ∈ C underlying data k Ak operation of arity k k Ak

1 A

9. 2. Lawvere theories Lawvere theories vs monads

10. 2. Lawvere theories Lawvere theories vs monads

Lawvere theory monad

10. 2. Lawvere theories Lawvere theories vs monads

Lawvere theory monad morphism “k-ary k 1 operation”

10. 2. Lawvere theories Lawvere theories vs monads set of k elements Lawvere theory monad morphism “k-ary element of T ([k]) k 1 operation”

10. 2. Lawvere theories Lawvere theories vs monads set of k elements Lawvere theory monad morphism “k-ary element of T ([k]) k 1 operation” i.e. 1 T ([k]) ∈ Set

10. 2. Lawvere theories Lawvere theories vs monads set of k elements Lawvere theory monad morphism “k-ary element of T ([k]) k 1 operation” i.e. 1 T ([k]) ∈ Set morphism “m operations k m of arity k”

10. 2. Lawvere theories Lawvere theories vs monads set of k elements Lawvere theory monad morphism “k-ary element of T ([k]) k 1 operation” i.e. 1 T ([k]) ∈ Set morphism “m operations m elements of T ([k]) k m of arity k”

10. 2. Lawvere theories Lawvere theories vs monads set of k elements Lawvere theory monad morphism “k-ary element of T ([k]) k 1 operation” i.e. 1 T ([k]) ∈ Set morphism “m operations m elements of T ([k]) k m of arity k” i.e. [m] T ([k]) ∈ Set

10. 2. Lawvere theories Lawvere theories vs monads set of k elements Lawvere theory monad morphism “k-ary element of T ([k]) k 1 operation” i.e. 1 T ([k]) ∈ Set morphism “m operations m elements of T ([k]) k m of arity k” i.e. [m] T ([k]) ∈ Set i.e. [m] [k] ∈ KlT

10. 2. Lawvere theories Lawvere theories vs monads set of k elements Lawvere theory monad morphism “k-ary element of T ([k]) k 1 operation” i.e. 1 T ([k]) ∈ Set morphism “m operations m elements of T ([k]) k m of arity k” i.e. [m] T ([k]) ∈ Set i.e. [m] [k] ∈ KlT

Idea Lawvere theories are related to monads via the Kleisli category.

10. 2. Lawvere theories

Definition

Monad T on Set Lawvere theory LT

op LT = full subcategory of (KlT ) whose objects are finite sets.

11. 2. Lawvere theories

Definition

Monad T on Set Lawvere theory LT

op LT = full subcategory of (KlT ) whose objects are finite sets.

Lawvere theory L monad TL on Set

n∈F op n TLX = L(n, 1) × X . Z

11. 2. Lawvere theories

Definition

Monad T on Set Lawvere theory LT

op LT = full subcategory of (KlT ) whose objects are finite sets.

Lawvere theory L monad TL on Set

n∈F op n TLX = L(n, 1) × X . Z

Theorem This gives a correspondence between Lawvere theories and finitary monads on Set.

11. 3. Distributive laws for monads

12. 3. Distributive laws for monads Idea Given monads S and T on C, can we make TS into a monad?

12. 3. Distributive laws for monads Idea Given monads S and T on C, can we make TS into a monad? µT µS TSTS? TTSS TS

12. 3. Distributive laws for monads Idea Given monads S and T on C, can we make TS into a monad? µT µS TSTS? TTSS TS

Definition (Beck) A distributive law of monads S over T consists of a natural transformation λ : ST ⇒ TS satisfying some axioms.

12. 3. Distributive laws for monads Idea Given monads S and T on C, can we make TS into a monad? µT µS TSTS? TTSS TS

Definition (Beck) A distributive law of monads S over T consists of a natural transformation λ : ST ⇒ TS satisfying some axioms.

• Formal theory of monads (Street) Do this inside any bicategory, not just Cat.

12. 3. Distributive laws for monads Idea Given monads S and T on C, can we make TS into a monad? µT µS TSTS? TTSS TS

Definition (Beck) A distributive law of monads S over T consists of a natural transformation λ : ST ⇒ TS satisfying some axioms.

• Formal theory of monads (Street) Do this inside any bicategory, not just Cat. • Iterated distributive laws (Cheng) Combine n monads with distributive laws and Yang-Baxter condition. 12. 3. Distributive laws for monads Examples monoid + abelian group ring horizontal vertical + 2-category composition composition

13. 3. Distributive laws for monads Examples monoid + abelian group ring horizontal vertical + 2-category composition composition

Or combining more structures:

0-composition +   1-composition   +  n-category .  . +   (n − 1)-composition    13. 3. Distributive laws for monads A point of view

• The monad TS says we can express all structure as “S-structure followed by T -structure”.

14. 3. Distributive laws for monads A point of view

• The monad TS says we can express all structure as “S-structure followed by T -structure”. • The distributive law ST TS says “if we had it the other way round we could switch it over”.

14. 3. Distributive laws for monads A point of view

• The monad TS says we can express all structure as “S-structure followed by T -structure”. • The distributive law ST TS says “if we had it the other way round we could switch it over”.

For Lawvere theories We want a way of combining A and B to give BA corresponding to a distributive law of monads

TATB TBTA

14. 3. Distributive laws for monads A point of view

• The monad TS says we can express all structure as “S-structure followed by T -structure”. • The distributive law ST TS says “if we had it the other way round we could switch it over”.

For Lawvere theories We want a way of combining A and B to give BA corresponding to a distributive law of monads

TATB TBTA with TBTA = TBA

14. 4. Three ways to do it

1. Factorisation systems over Fop. —Rosebrugh and Wood, Distributive laws and factorization (JPAA 2002)

15. 4. Three ways to do it

1. Factorisation systems over Fop. —Rosebrugh and Wood, Distributive laws and factorization (JPAA 2002)

2. Profunctors internal to Mon. —Lack, Composing props (TAC 2004) —Akhvlediani, Composing Lawvere theories (CT2010)

15. 4. Three ways to do it

1. Factorisation systems over Fop. —Rosebrugh and Wood, Distributive laws and factorization (JPAA 2002)

2. Profunctors internal to Mon. —Lack, Composing props (TAC 2004) —Akhvlediani, Composing Lawvere theories (CT2010)

3. Kleisli bicategory of P on profunctors —Hyland, Distributive laws (CLP 2010)

15. 4. Three ways to do it

1. Factorisation systems over Fop

16. 4. Three ways to do it

1. Factorisation systems over Fop In the composite theory BA every morphism can be expressed as a composite ∈A ∈B

16. 4. Three ways to do it

1. Factorisation systems over Fop In the composite theory BA every morphism can be expressed as a composite ∈A ∈B

For example: × and + The composite 3-ary operation a(b + c) can be expressed as

16. 4. Three ways to do it

1. Factorisation systems over Fop In the composite theory BA every morphism can be expressed as a composite ∈A ∈B

For example: × and + The composite 3-ary operation a(b + c) can be expressed as

3 1

ab, ac x + y 2

16. 4. Three ways to do it

1. Factorisation systems over Fop In the composite theory BA every morphism can be expressed as a composite ∈A ∈B

For example: × and + The composite 3-ary operation a(b + c) can be expressed as

ab, ac, ab2c 3 x + y

3 1

ab, ac x + y 2

16. 4. Three ways to do it

1. Factorisation systems over Fop In the composite theory BA every morphism can be expressed as a composite ∈A ∈B

For example: × and + The composite 3-ary operation a(b + c) can be expressed as

ab, ac, ab2c 3 x + y

3p1,p2 1

ab, ac x + y 2

16. 4. Three ways to do it

1. Factorisation systems over Fop In the composite theory BA every morphism can be expressed as a composite ∈A ∈B

For example: × and + The composite 3-ary operation a(b + c) can be expressed as

ab, ac, ab2c 3 x + y

3p1,p2 1

ab, ac x + y 2 —factorisations are only unique up to morphisms in Fop.

16. 4. Three ways to do it Appealing fact (Rosebrugh and Wood) Strict factorisation systems are distributive laws in Span.

17. 4. Three ways to do it Appealing fact (Rosebrugh and Wood) Strict factorisation systems are distributive laws in Span.

• A and B are categories i.e. monads in Span. • AB BA makes BA into a monad in Span i.e. a category.

17. 4. Three ways to do it Appealing fact (Rosebrugh and Wood) Strict factorisation systems are distributive laws in Span.

• A and B are categories i.e. monads in Span. • AB BA makes BA into a monad in Span i.e. a category. It is the pullback

A

obF obF

17. 4. Three ways to do it Appealing fact (Rosebrugh and Wood) Strict factorisation systems are distributive laws in Span.

• A and B are categories i.e. monads in Span. • AB BA makes BA into a monad in Span i.e. a category. It is the pullback

A B

obF obF obF

17. 4. Three ways to do it Appealing fact (Rosebrugh and Wood) Strict factorisation systems are distributive laws in Span.

• A and B are categories i.e. monads in Span. • AB BA makes BA into a monad in Span i.e. a category. It is the pullback .

A B

obF obF obF

17. 4. Three ways to do it Appealing fact (Rosebrugh and Wood) Strict factorisation systems are distributive laws in Span.

• A and B are categories i.e. monads in Span. • AB BA makes BA into a monad in Span i.e. a category. It is the pullback composable pairs . ∈A ∈B k l m A B

obF obF obF

17. 4. Three ways to do it Appealing fact (Rosebrugh and Wood) Strict factorisation systems are distributive laws in Span.

• A and B are categories i.e. monads in Span. • AB BA makes BA into a monad in Span i.e. a category. It is the pullback composable pairs . ∈A ∈B k l m A B

obF obF obF

The distributive law tells us how to re-express a pair

∈B ∈A ∈A ∈B k l m as k l′ m

17. 4. Three ways to do it RW define distributive laws over I for I a groupoid —ensures equivalence relation on composable pairs.

18. 4. Three ways to do it RW define distributive laws over I for I a groupoid —ensures equivalence relation on composable pairs. However instead we can generate an equivalence relation.

18. 4. Three ways to do it RW define distributive laws over I for I a groupoid —ensures equivalence relation on composable pairs. However instead we can generate an equivalence relation. Idea

18. 4. Three ways to do it RW define distributive laws over I for I a groupoid —ensures equivalence relation on composable pairs. However instead we can generate an equivalence relation. Idea B ⊗ A Our original pullback A B

obF obF obF ignored the fact that Fop is in both A and B.

18. 4. Three ways to do it RW define distributive laws over I for I a groupoid —ensures equivalence relation on composable pairs. However instead we can generate an equivalence relation. Idea B ⊗ A Our original pullback A B

obF obF obF ignored the fact that Fop is in both A and B. So we want a coequaliser

absorb F op into A op B ⊗ F ⊗ A B ⊗ A B ⊗F op A absorb F op into B —looks like bimodules.

18. 4. Three ways to do it Definition 1 A distributive law of Lawvere theories A over B is a factorisation system over Fop on the composite B ⊗ A in Span.

19. 4. Three ways to do it Definition 1 A distributive law of Lawvere theories A over B is a factorisation system over Fop on the composite B ⊗ A in Span. ≡ a distributive law of A over B expressed as monads in Bim(Span)

19. 4. Three ways to do it Definition 1 A distributive law of Lawvere theories A over B is a factorisation system over Fop on the composite B ⊗ A in Span. ≡ a distributive law of A over B expressed as monads in Bim(Span) ≃ Prof.

19. 4. Three ways to do it Definition 1 A distributive law of Lawvere theories A over B is a factorisation system over Fop on the composite B ⊗ A in Span. ≡ a distributive law of A over B expressed as monads in Bim(Span) ≃ Prof.

Aside on profunctors

19. 4. Three ways to do it Definition 1 A distributive law of Lawvere theories A over B is a factorisation system over Fop on the composite B ⊗ A in Span. ≡ a distributive law of A over B expressed as monads in Bim(Span) ≃ Prof.

Aside on profunctors F Given categories C and D, a profunctor C D is a functor F Dop × C Set.

19. 4. Three ways to do it Definition 1 A distributive law of Lawvere theories A over B is a factorisation system over Fop on the composite B ⊗ A in Span. ≡ a distributive law of A over B expressed as monads in Bim(Span) ≃ Prof.

Aside on profunctors F Given categories C and D, a profunctor C D is a functor F Dop × C Set. A A monad C C ∈ Prof corresponds to a category A equipped with an identity-on-objects functor C A.

19. 4. Three ways to do it Definition 1 A distributive law of Lawvere theories A over B is a factorisation system over Fop on the composite B ⊗ A in Span. ≡ a distributive law of A over B expressed as monads in Bim(Span) ≃ Prof.

Aside on profunctors F Given categories C and D, a profunctor C D is a functor F Dop × C Set. A A monad C C ∈ Prof corresponds to a category A equipped with an identity-on-objects functor C A. So Lawvere theories arise as particular monads on Fop. 19. 4. Three ways to do it 2. Prof(Mon) —internal profunctors in monoids

20. 4. Three ways to do it 2. Prof(Mon) —internal profunctors in monoids A monad C C is now a monoidal category A equipped with an identity-on-objects monoidal functor C A.

20. 4. Three ways to do it 2. Prof(Mon) —internal profunctors in monoids A monad C C is now a monoidal category A equipped with an identity-on-objects monoidal functor C A. So again Lawvere theories arise as particular monads on Fop.

20. 4. Three ways to do it 2. Prof(Mon) —internal profunctors in monoids A monad C C is now a monoidal category A equipped with an identity-on-objects monoidal functor C A. So again Lawvere theories arise as particular monads on Fop.

Definition 2 A distributive law of Lawvere theories A over B is a distributive law in the bicategory Prof(Mon).

20. 4. Three ways to do it 2. Prof(Mon) —internal profunctors in monoids A monad C C is now a monoidal category A equipped with an identity-on-objects monoidal functor C A. So again Lawvere theories arise as particular monads on Fop.

Definition 2 A distributive law of Lawvere theories A over B is a distributive law in the bicategory Prof(Mon).

Theorem Such a distributive law makes B⊗Fop A into a Lawvere theory. i.e. if A and B are finite-product categories, so is B ⊗Fop A.

20. 4. Three ways to do it 2. Prof(Mon) —internal profunctors in monoids A monad C C is now a monoidal category A equipped with an identity-on-objects monoidal functor C A. So again Lawvere theories arise as particular monads on Fop.

Definition 2 A distributive law of Lawvere theories A over B is a distributive law in the bicategory Prof(Mon).

λ A ⊗Fop B B ⊗Fop A Theorem Such a distributive law makes B⊗Fop A into a Lawvere theory. i.e. if A and B are finite-product categories, so is B ⊗Fop A.

20. 4. Three ways to do it 2. Prof(Mon) —internal profunctors in monoids A monad C C is now a monoidal category A equipped with an identity-on-objects monoidal functor C A. So again Lawvere theories arise as particular monads on Fop.

Definition 2 A distributive law of Lawvere theories A over B is a distributive law in the bicategory Prof(Mon).

λ A ⊗Fop B B ⊗Fop A Theorem Such a distributive law makes B⊗Fop A into a Lawvere theory. i.e. if A and B are finite-product categories, so is B ⊗Fop A.

Proof • Bare hands, or

20. 4. Three ways to do it 2. Prof(Mon) —internal profunctors in monoids A monad C C is now a monoidal category A equipped with an identity-on-objects monoidal functor C A. So again Lawvere theories arise as particular monads on Fop.

Definition 2 A distributive law of Lawvere theories A over B is a distributive law in the bicategory Prof(Mon).

λ A ⊗Fop B B ⊗Fop A Theorem Such a distributive law makes B⊗Fop A into a Lawvere theory. i.e. if A and B are finite-product categories, so is B ⊗Fop A.

Proof • Bare hands, or • The free finite-product category 2-monad on Prof. 20. 4. Three ways to do it 3. Free finite-product category 2-monad approach.

21. 4. Three ways to do it 3. Free finite-product category 2-monad approach.

• Let P be the free finite-product category 2-monad on Cat. • P extends to Prof via a distributive law. • Let ProfP be the Kleisli bicategory for the extended P.

21. 4. Three ways to do it 3. Free finite-product category 2-monad approach.

• Let P be the free finite-product category 2-monad on Cat. • P extends to Prof via a distributive law. • Let ProfP be the Kleisli bicategory for the extended P.

Then monads on 1 in ProfP are precisely Lawvere theories.

21. 4. Three ways to do it 3. Free finite-product category 2-monad approach.

• Let P be the free finite-product category 2-monad on Cat. • P extends to Prof via a distributive law. • Let ProfP be the Kleisli bicategory for the extended P.

Then monads on 1 in ProfP are precisely Lawvere theories.

• A monad in ProfP is a profunctor 1 P1

21. 4. Three ways to do it 3. Free finite-product category 2-monad approach.

• Let P be the free finite-product category 2-monad on Cat. • P extends to Prof via a distributive law. • Let ProfP be the Kleisli bicategory for the extended P.

Then monads on 1 in ProfP are precisely Lawvere theories.

• A monad in ProfP is a profunctor 1 P1 i.e. P1op × 1 Set

21. 4. Three ways to do it 3. Free finite-product category 2-monad approach.

• Let P be the free finite-product category 2-monad on Cat. • P extends to Prof via a distributive law. • Let ProfP be the Kleisli bicategory for the extended P.

Then monads on 1 in ProfP are precisely Lawvere theories.

• A monad in ProfP is a profunctor 1 P1 i.e. P1op × 1 Set i.e. FinSet Set a finitary monad.

21. 4. Three ways to do it 3. Free finite-product category 2-monad approach.

• Let P be the free finite-product category 2-monad on Cat. • P extends to Prof via a distributive law. • Let ProfP be the Kleisli bicategory for the extended P.

Then monads on 1 in ProfP are precisely Lawvere theories.

• A monad in ProfP is a profunctor 1 P1 i.e. P1op × 1 Set i.e. FinSet Set a finitary monad.

Definition 3

21. 4. Three ways to do it 3. Free finite-product category 2-monad approach.

• Let P be the free finite-product category 2-monad on Cat. • P extends to Prof via a distributive law. • Let ProfP be the Kleisli bicategory for the extended P.

Then monads on 1 in ProfP are precisely Lawvere theories.

• A monad in ProfP is a profunctor 1 P1 i.e. P1op × 1 Set i.e. FinSet Set a finitary monad.

Definition 3 A distributive law of Lawvere theories A over B is a distributive law in the bicategory ProfP. 21. 5. Comparison

22. 5. Comparison

Claim These three methods all give the same answer as a distributive law between the associated monads.

22. 5. Comparison

Claim These three methods all give the same answer as a distributive law between the associated monads.

Idea

22. 5. Comparison

Claim These three methods all give the same answer as a distributive law between the associated monads.

Idea Compare • Finitary monads Set Set in CAT

22. 5. Comparison

Claim These three methods all give the same answer as a distributive law between the associated monads.

Idea Compare • Finitary monads Set Set in CAT

• Lawvere theories as 1. monads F F in Prof 2. monads F F in Prof(Mon)

3. monads 1 1 in ProfP.

22. 5. Comparison

Claim These three methods all give the same answer as a distributive law between the associated monads.

Idea Compare

T • Finitary monads Set Set in CAT Set Set

• Lawvere theories as 1. monads F F in Prof 2. monads F F in Prof(Mon)

3. monads 1 1 in ProfP.

22. 5. Comparison

Claim These three methods all give the same answer as a distributive law between the associated monads.

Idea Compare

T • Finitary monads Set Set in CAT Set Set

• Lawvere theories as I∗ T∗ I∗ 1. monads F F in Prof F Set Set F 2. monads F F in Prof(Mon)

3. monads 1 1 in ProfP.

22. 5. Comparison

23. 5. Comparison

ProfP(1, 1)

Prof(F, F)

Prof(Mon)(F, F)

23. 5. Comparison Monads

ProfP(1, 1)

Prof(F, F)

Prof(Mon)(F, F)

23. 5. Comparison Monads

ProfP(1, 1) Lawvere theories

Prof(F, F)

Prof(Mon)(F, F)

23. 5. Comparison Monads

ProfP(1, 1) Lawvere theories

id-on-objects functors Prof(F, F) F −→ A

Prof(Mon)(F, F)

23. 5. Comparison Monads

ProfP(1, 1) Lawvere theories

id-on-objects functors Prof(F, F) F −→ A

id-on-objects Prof(Mon)(F, F) monoidal functors F −→ A

23. 5. Comparison Monads

ProfP(1, 1) Lawvere theories

id-on-objects functors CATf (Set, Set) Prof(F, F) F −→ A

id-on-objects Prof(Mon)(F, F) monoidal functors F −→ A

23. 5. Comparison Monads

ProfP(1, 1) Lawvere theories

f+f id-on-objects functors CATf (Set, Set) Prof(F, F) F −→ A

id-on-objects Prof(Mon)(F, F) monoidal functors F −→ A

23. 5. Comparison Monads

ProfP(1, 1) Lawvere theories

equivalence

f+f id-on-objects functors CATf (Set, Set) Prof(F, F) F −→ A

id-on-objects Prof(Mon)(F, F) monoidal functors F −→ A

23. 5. Comparison Monads

ProfP(1, 1) Lawvere theories

equivalence forgetful

Prof(P1, P1)

f+f ≃ id-on-objects functors CATf (Set, Set) Prof(F, F) F −→ A

id-on-objects Prof(Mon)(F, F) monoidal functors F −→ A

23. 5. Comparison Monads

ProfP(1, 1) Lawvere theories

equivalence forgetful

Prof(P1, P1)

f+f ≃ id-on-objects functors CATf (Set, Set) Prof(F, F) F −→ A

forgetful f+f id-on-objects Prof(Mon)(F, F) monoidal functors F −→ A

23. 5. Comparison Key points

24. 5. Comparison Key points

• The functors send T to LT .

24. 5. Comparison Key points

• The functors send T to LT . • By pseudo-functoriality distributive laws map to distributive laws, and

LT ◦ LS ∼= LTS

24. 5. Comparison Key points

• The functors send T to LT . • By pseudo-functoriality distributive laws map to distributive laws, and

LT ◦ LS ∼= LTS

• Moreover the functors are full and faithful, so given Lawvere theories on the right, any distributive law between them corresponds to one on the left.

So we have three equivalent notions of distributive laws for Lawvere theories, which correspond to distributive laws between the associated monads.

24. 5. Comparison Monads

ProfP(1, 1) Lawvere theories

equivalence forgetful

Prof(P1, P1)

f+f ≃ id-on-objects functors CATf (Set, Set) Prof(F, F) F −→ A

forgetful f+f id-on-objects Prof(Mon)(F, F) monoidal functors F −→ A

25. 5. Comparison Key points

• The functors are monoidal, and send T to LT . • By pseudo-functoriality distributive laws map to distributive laws, and

LT ◦ LS ∼= LTS

• Moreover the functors are full and faithful, so given Lawvere theories on the right, any distributive law between them corresponds to one on the left.

26. 5. Comparison Key points

• The functors are monoidal, and send T to LT . • By pseudo-functoriality distributive laws map to distributive laws, and

LT ◦ LS ∼= LTS

• Moreover the functors are full and faithful, so given Lawvere theories on the right, any distributive law between them corresponds to one on the left.

So we have three equivalent notions of distributive laws for Lawvere theories, which correspond to distributive laws between the associated monads.

26.