What is a monoid? How I learnt to stop worrying and love skewness - - PowerPoint PPT Presentation

what is a monoid how i learnt to stop worrying and love
SMART_READER_LITE
LIVE PREVIEW

What is a monoid? How I learnt to stop worrying and love skewness - - PowerPoint PPT Presentation

What is a monoid? How I learnt to stop worrying and love skewness Paul Blain Levy University of Birmingham July 12, 2019 Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 1 / 23


slide-1
SLIDE 1

What is a monoid? How I learnt to stop worrying and love skewness

Paul Blain Levy

University of Birmingham

July 12, 2019

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 1 / 23

slide-2
SLIDE 2

The big picture

Monoidal category

  • Left skew

monoidal category

  • Multicategory
  • Right skew

monoidal category

  • Left skew

multicategory

  • Right skew

multicategory

  • Bi-skew

multicategory The notion of monoid can be defined in each of these settings.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 2 / 23

slide-3
SLIDE 3

Outline

1

Monoidal categories and multicategories

2

The world of skew

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 3 / 23

slide-4
SLIDE 4

Monoid in a monoidal category

A monoid consists of an object a, the carrier a map e: 1 → a, the unit a map m: a ⊗ a → a, the multiplication Three diagrams must commute: Associativity Left unitality Right unitality.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 4 / 23

slide-5
SLIDE 5

Examples

Monoid = monoid in Set. Ring = monoid in Ab. Algebra = monoid in VectR. Quantale = monoid in CompSupLatt. Regular∗ cardinal = monoid in Card. Monad on C = monoid in [C, C].

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 5 / 23

slide-6
SLIDE 6

Examples

Monoid = monoid in Set. Ring = monoid in Ab. Algebra = monoid in VectR. Quantale = monoid in CompSupLatt. Regular∗ cardinal = monoid in Card. Monad on C = monoid in [C, C]. Monad on an object c of a bicategory.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 5 / 23

slide-7
SLIDE 7

Multicategory

In a multicategory, a morphism (“multi-map”) goes from a list of objects to an object. f : − → a → b

Example

Vector spaces and multilinear maps. We have an identity maps ida : a → a and can compose f : − → a → bi with g: − → b → c. Four equations must be satisfied.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 6 / 23

slide-8
SLIDE 8

Virtual bicategories

A virtual bicategory has

  • bjects

morphisms—not composable 2-cells a1 · · · an−1

fn−1

  • a0

f0

  • α ⇓

g

an

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 7 / 23

slide-9
SLIDE 9

Virtual bicategories

A virtual bicategory has

  • bjects

morphisms—not composable 2-cells a1 · · · an−1

fn−1

  • a0

f0

  • α ⇓

g

an

Also: virtual double categories.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 7 / 23

slide-10
SLIDE 10

Monoids and monads, using multi-maps

Monoid in a multicategory

A monoid consists of an object a and multi-maps e: → a m: a, a → a satisfying associativity, left and right unitality.

Monad on an object of a virtual bicategory

A monad on a consists of a 1-cell g: a → a and 2-cells a

g ⇓e

a

g

  • a

g

  • m ⇓

g

a

satisfying associativity, left and right unitality.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 8 / 23

slide-11
SLIDE 11

Example: light categories

Often said

Small category = monad in the bicategory Span.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 9 / 23

slide-12
SLIDE 12

Example: light categories

Often said

Small category = monad in the bicategory Span. A category C is light (or “moderate and locally small”) when |C| is a class, and each C(a, b) is a set. Light category = monad in ?

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 9 / 23

slide-13
SLIDE 13

Example: light categories

Often said

Small category = monad in the bicategory Span. A category C is light (or “moderate and locally small”) when |C| is a class, and each C(a, b) is a set. Light category = monad in ?

Answer

The virtual bicategory of classes and set-valued relations. A set-valued relation A → B is a family of sets (C(a, b))a∈A,b∈B. Composites don’t exist; they would be class-valued.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 9 / 23

slide-14
SLIDE 14

Example: bimodules

Let Bimod be the virtual bicategory of light categories and bimodules. A (light) bimodule C → D is a functor Cop × D → Set. Composites of bimodules don’t exist: they would be functors to Class.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 10 / 23

slide-15
SLIDE 15

Example: bimodules

Let Bimod be the virtual bicategory of light categories and bimodules. A (light) bimodule C → D is a functor Cop × D → Set. Composites of bimodules don’t exist: they would be functors to Class. A monad in Bimod on C is a (Heunen-Jacobs) arrow on C i.e. an identity-on-objects functor C → D.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 10 / 23

slide-16
SLIDE 16

Example: bimodules

Let Bimod be the virtual bicategory of light categories and bimodules. A (light) bimodule C → D is a functor Cop × D → Set. Composites of bimodules don’t exist: they would be functors to Class. A monad in Bimod on C is a (Heunen-Jacobs) arrow on C i.e. an identity-on-objects functor C → D. We can adapt this example to include strength. (Freyd category)

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 10 / 23

slide-17
SLIDE 17

Multicategories vs monoidal categories

In some multicategories, tensors don’t exist. In others they exist but are complicated, Compare: A quantale is a monoid in the monoidal category CompSupLatt. A quantale is a monoid in the multicategory CompSupLatt. The latter is easy to unpack.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 11 / 23

slide-18
SLIDE 18

Skew monoidal categories (Szlachanyi)

A left skew monoidal category consists of a category C an object 1 a bifunctor ⊗: C × C → C an associator (a ⊗ b) ⊗ c → a ⊗ (b ⊗ c) a left unitor 1 ⊗ c → c a right unitor a → a ⊗ 1 satisfying five coherence laws.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 12 / 23

slide-19
SLIDE 19

Monoid in a skew monoidal category

In a skew monoidal category, we can define monoids just as in a monoidal category.

Example: relative monads

Under certain size conditions: relative monads are monoids in a skew monoidal category. (Altenkirch, Chapman, Uustalu)

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 13 / 23

slide-20
SLIDE 20

What is a monoid?

The notion of monoid in a multicategory generalizes to monoid in a left skew monoidal category monoid in a right skew monoidal category monoid in a multicategory.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 14 / 23

slide-21
SLIDE 21

What is a monoid?

The notion of monoid in a multicategory generalizes to monoid in a left skew monoidal category monoid in a right skew monoidal category monoid in a multicategory. Bourke and Lack introduced skew multicategories.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 14 / 23

slide-22
SLIDE 22

Skew multicategories

Bourke, Lack; Veltri, Uustalu, Zeilberger In a left skew multicategory C, a morphism goes from s[− → a where the house − → a is a list of objects. and the left stoup s is either nothing or an object.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 15 / 23

slide-23
SLIDE 23

Skew multicategories

Bourke, Lack; Veltri, Uustalu, Zeilberger In a left skew multicategory C, a morphism goes from s[− → a where the house − → a is a list of objects. and the left stoup s is either nothing or an object. A morphism f from c[− → a can be left-housed giving f[ from [c, − → a .

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 15 / 23

slide-24
SLIDE 24

Skew multicategories

Bourke, Lack; Veltri, Uustalu, Zeilberger In a left skew multicategory C, a morphism goes from s[− → a where the house − → a is a list of objects. and the left stoup s is either nothing or an object. A morphism f from c[− → a can be left-housed giving f[ from [c, − → a . When left-housing is invertible, C is “just” a multicategory.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 15 / 23

slide-25
SLIDE 25

Bi-skew multicategories

In a bi-skew multicategory, a morphism goes from s[− → a ]t. The house − → a is a list of objects. The left stoup s is either nothing or an object. The right stoup t is either nothing or an object.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 16 / 23

slide-26
SLIDE 26

Bi-skew multicategories

In a bi-skew multicategory, a morphism goes from s[− → a ]t. The house − → a is a list of objects. The left stoup s is either nothing or an object. The right stoup t is either nothing or an object. We have left and right housing. They commute for a morphism from c[− → a ]d.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 16 / 23

slide-27
SLIDE 27

Bi-skew multicategories

In a bi-skew multicategory, a morphism goes from s[− → a ]t. The house − → a is a list of objects. The left stoup s is either nothing or an object. The right stoup t is either nothing or an object. We have left and right housing. They commute for a morphism from c[− → a ]d. If right housing is an isomorphism, then it’s “just” left skew.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 16 / 23

slide-28
SLIDE 28

Bi-skew multicategories

In a bi-skew multicategory, a morphism goes from s[− → a ]t. The house − → a is a list of objects. The left stoup s is either nothing or an object. The right stoup t is either nothing or an object. We have left and right housing. They commute for a morphism from c[− → a ]d. If right housing is an isomorphism, then it’s “just” left skew. 3 kinds of composition, 3 kinds of identity.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 16 / 23

slide-29
SLIDE 29

Monoid in a bi-skew multicategory

A monoid consists of an object a and multi-maps e: [] → a and m: a[]a → a Associativity a[a]a → a Left unitality a[] → a. Right unitality []a → a.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 17 / 23

slide-30
SLIDE 30

Category on a span of classes

A (light) category on a span of classes I

α

  • β
  • X

Y consists of the following: For each x ∈ X, y ∈ Y , a set C(x, y) of morphisms x → y. For each i ∈ I, an identity idi : α(i) → β(i). For each f : x → β(i) and g: α(i) → y, a composite f; g: x → y. Equations: Left identity for g: α(i) → y. Right identity for f : x → β(i). Associativity for f : x → β(i) and g: α(i) → β(j) and h: α(j) → y. Category on the span = monoid in ?

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 18 / 23

slide-31
SLIDE 31

Answer: a bi-skew multicategory

An object is a family of sets (A(x, y))x∈X,y∈Y A map A[B]C → D is a family of functions A(x, β(i)) × B(α(i), β(j)) × C(β(j), y) → D(x, y) A map A[B] → D is a family of functions A(x, β(i)) × B(α(i), β(j)) → D(x, β(j))

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 19 / 23

slide-32
SLIDE 32

Relative monad

Let O be a bimodule A → B. For example FinSet → Set giving function sets. A relative monad on O provides for each a ∈ A, an object Ta ∈ B and unit ηa : a → Ta for each O-map f : a → Tb, a D-map f∗ : Ta → Tb subject to the three “Kleisli triple” laws. Relative monad = monoid in ?

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 20 / 23

slide-33
SLIDE 33

Answer: a left skew multicategory

An object is a function |A| → |B|. A map S[T0, T1] → U is a family of maps O(a0, T0a1) × O(a1, T1a2) → D(Sa0, Ua2) A map [T0, T1] → U is a family of maps O(a0, T0a1) × O(a1, T1a2) → O(a0, Ua2)

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 21 / 23

slide-34
SLIDE 34

Call-by-push-value: the type constructor F

Two kinds of terms: values (e.g. variables) and computations. Two kinds of type: value type A and computation type B. FA is the type of computations that aim to return a value of type A. Γ ⊢v V : A Γ ⊢c return V : FA Γ ⊢c M : FA Γ, x : A ⊢c N : B Γ ⊢c M to x. N : B

Three laws

(M to x. N) to y. P = M to x. (N to y. P) (return V ) to x. M = M[V/x] M = M to x. return x

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 22 / 23

slide-35
SLIDE 35

Conclusion

In any bi-skew multicategory C, we have a notion of a monoid.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 23 / 23

slide-36
SLIDE 36

Conclusion

In any bi-skew multicategory C, we have a notion of a monoid. If C is a monoidal category or multicategory, this is just the standard notion of monoid.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 23 / 23

slide-37
SLIDE 37

Conclusion

In any bi-skew multicategory C, we have a notion of a monoid. If C is a monoidal category or multicategory, this is just the standard notion of monoid. By choosing an appropriate bi-skew multicategory, the following notions are monoid notions:

category on a given span of classes model of the F fragment of call-by-push-value relative monad on a bimodule guardedness predicate.

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 23 / 23

slide-38
SLIDE 38

Conclusion

In any bi-skew multicategory C, we have a notion of a monoid. If C is a monoidal category or multicategory, this is just the standard notion of monoid. By choosing an appropriate bi-skew multicategory, the following notions are monoid notions:

category on a given span of classes model of the F fragment of call-by-push-value relative monad on a bimodule guardedness predicate.

THANKS FOR LISTENING!

Paul Blain Levy (University of Birmingham) What is a monoid? July 12, 2019 23 / 23