Monads, Partial Evaluations, and Rewriting Paolo Perrone Joint work - - PowerPoint PPT Presentation

monads partial evaluations and rewriting
SMART_READER_LITE
LIVE PREVIEW

Monads, Partial Evaluations, and Rewriting Paolo Perrone Joint work - - PowerPoint PPT Presentation

Monads, Partial Evaluations, and Rewriting Paolo Perrone Joint work with Tobias Fritz Max Planck Institute for Mathematics in the Sciences Leipzig, Germany SYCO 1, 2018 Idea What do these things have in common? 30 6 5 2 15 3 10 2


slide-1
SLIDE 1

Monads, Partial Evaluations, and Rewriting

Paolo Perrone Joint work with Tobias Fritz

Max Planck Institute for Mathematics in the Sciences Leipzig, Germany

SYCO 1, 2018

slide-2
SLIDE 2

Idea

What do these things have in common?

30 6 · 5 2 · 15 3 · 10 2 · 3 · 5

2 of 22

slide-3
SLIDE 3

Idea

What do these things have in common?

30 6 · 5 2 · 15 3 · 10 2 · 3 · 5

2 of 22

slide-4
SLIDE 4

Idea

What do these things have in common?

30 6 · 5 2 · 15 3 · 10 2 · 3 · 5

2 of 22

slide-5
SLIDE 5

Idea

What do these things have in common?

30 6 · 5 2 · 15 3 · 10 2 · 3 · 5

2 of 22

slide-6
SLIDE 6

Idea

What do these things have in common?

30 6 · 5 2 · 15 3 · 10 2 · 3 · 5

2 of 22

slide-7
SLIDE 7

Idea

What do these things have in common?

30 6 · 5 2 · 15 3 · 10 2 · 3 · 5

2 of 22

slide-8
SLIDE 8

Idea

What do these things have in common?

30 6 · 5 2 · 15 3 · 10 2 · 3 · 5

2 of 22

slide-9
SLIDE 9

Monads and formal expressions

3 of 22

slide-10
SLIDE 10

Monads and formal expressions

Setting:

Let C be a concrete category and (T, µ, η) a monad with η monic.

3 of 22

slide-11
SLIDE 11

Monads and formal expressions

Setting:

Let C be a concrete category and (T, µ, η) a monad with η monic. X =

  • x , y , z , . . .
  • 3 of 22
slide-12
SLIDE 12

Monads and formal expressions

Setting:

Let C be a concrete category and (T, µ, η) a monad with η monic. X =

  • x , y , z , . . .
  • TX

=

  • x + y , x + y + z , x , . . .
  • 3 of 22
slide-13
SLIDE 13

Monads and formal expressions

Setting:

Let C be a concrete category and (T, µ, η) a monad with η monic. X =

  • x , y , z , . . .
  • TX

=

  • x + y , x + y + z , x , . . .
  • TTX

=

  • (x + y) + (x + z) , (x) , . . .
  • 3 of 22
slide-14
SLIDE 14

Monads and formal expressions

Setting:

Let C be a concrete category and (T, µ, η) a monad with η monic. X =

  • x , y , z , . . .
  • TX

=

  • x + y , x + y + z , x , . . .
  • TTX

=

  • (x + y) + (x + z) , (x) , . . .
  • f : X → Y

− → Tf : x + x′ → f (x) + f (x′)

3 of 22

slide-15
SLIDE 15

Monads and formal expressions

  • η : X → TX maps the element x to x as a formal expression

4 of 22

slide-16
SLIDE 16

Monads and formal expressions

  • η : X → TX maps the element x to x as a formal expression
  • µ : TTX → TX removes the brackets:

(x + y) + (z + t) − → x + y + z + t.

4 of 22

slide-17
SLIDE 17

Monads and formal expressions

  • η : X → TX maps the element x to x as a formal expression
  • µ : TTX → TX removes the brackets:

(x + y) + (z + t) − → x + y + z + t. ((x + y) + (z)) (x + y + z) TTTX TTX TTX TX (x + y) + (z) x + y + z

Tµ µ µ µ

4 of 22

slide-18
SLIDE 18

Monads and formal expressions

  • η : X → TX maps the element x to x as a formal expression
  • µ : TTX → TX removes the brackets:

(x + y) + (z + t) − → x + y + z + t. ((x + y) + (z)) (x + y + z) TTTX TTX TTX TX (x + y) + (z) x + y + z

Tµ µ µ µ

4 of 22

slide-19
SLIDE 19

Monads and formal expressions

  • η : X → TX maps the element x to x as a formal expression
  • µ : TTX → TX removes the brackets:

(x + y) + (z + t) − → x + y + z + t. ((x + y) + (z)) (x + y + z) TTTX TTX TTX TX (x + y) + (z) x + y + z

Tµ µ µ µ

4 of 22

slide-20
SLIDE 20

Monads and formal expressions

  • η : X → TX maps the element x to x as a formal expression
  • µ : TTX → TX removes the brackets:

(x + y) + (z + t) − → x + y + z + t. ((x + y) + (z)) (x + y + z) TTTX TTX TTX TX (x + y) + (z) x + y + z

Tµ µ µ µ

4 of 22

slide-21
SLIDE 21

Monads and formal expressions

  • An algebra e : TA → A is an object in which formal expressions

can be evaluated.

5 of 22

slide-22
SLIDE 22

Monads and formal expressions

  • An algebra e : TA → A is an object in which formal expressions

can be evaluated. 2 + 1 − → 3.

5 of 22

slide-23
SLIDE 23

Monads and formal expressions

  • An algebra e : TA → A is an object in which formal expressions

can be evaluated. 2 + 1 − → 3. (1 + 2) + (3) 3 + 3 TTA TA TA A 1 + 2 + 3 6

Te µ e e

5 of 22

slide-24
SLIDE 24

Monads and formal expressions

  • An algebra e : TA → A is an object in which formal expressions

can be evaluated. 2 + 1 − → 3. (1 + 2) + (3) 3 + 3 TTA TA TA A 1 + 2 + 3 6

Te µ e e

5 of 22

slide-25
SLIDE 25

Monads and formal expressions

  • An algebra e : TA → A is an object in which formal expressions

can be evaluated. 2 + 1 − → 3. (1 + 2) + (3) 3 + 3 TTA TA TA A 1 + 2 + 3 6

Te µ e e

5 of 22

slide-26
SLIDE 26

Monads and formal expressions

  • An algebra e : TA → A is an object in which formal expressions

can be evaluated. 2 + 1 − → 3. (1 + 2) + (3) 3 + 3 TTA TA TA A 1 + 2 + 3 6

Te µ e e

5 of 22

slide-27
SLIDE 27

Partial evaluations and partial decompositions

Idea:

A formal expression of elements of an algebra can also be partially evaluated, instead of totally.

6 of 22

slide-28
SLIDE 28

Partial evaluations and partial decompositions

Idea:

A formal expression of elements of an algebra can also be partially evaluated, instead of totally. (2 + 3) + (4) 2 + 3 + 4 5 + 4 remove brackets evaluate brackets

6 of 22

slide-29
SLIDE 29

Partial evaluations and partial decompositions

Idea:

A formal expression of elements of an algebra can also be partially evaluated, instead of totally. (2 + 3) + (4) 2 + 3 + 4 5 + 4 remove brackets evaluate brackets

6 of 22

slide-30
SLIDE 30

Partial evaluations and partial decompositions

Idea:

A formal expression of elements of an algebra can also be partially evaluated, instead of totally. (2 + 3) + (4) 2 + 3 + 4 5 + 4 remove brackets evaluate brackets

6 of 22

slide-31
SLIDE 31

Partial evaluations and partial decompositions

Idea:

A formal expression of elements of an algebra can also be partially evaluated, instead of totally. (2 + 3) + (4) 2 + 3 + 4 5 + 4 remove brackets evaluate brackets

6 of 22

slide-32
SLIDE 32

Partial evaluations and partial decompositions

Idea:

A formal expression of elements of an algebra can also be partially evaluated, instead of totally. (2 + 3) + (4) 2 + 3 + 4 5 + 4 remove brackets evaluate brackets TTA TA TA

µ Te

6 of 22

slide-33
SLIDE 33

Partial evaluations and partial decompositions

Definition:

Let p, q ∈ TA. If µ(m) = p and (Te)(m) = q for some m ∈ TTA, we call q a partial evaluation of p and p a partial decomposition of q. (2 + 3) + (4) 2 + 3 + 4 5 + 4 remove brackets evaluate brackets TTA TA TA

µ Te

6 of 22

slide-34
SLIDE 34

Partial evaluations and partial decompositions

Properties:

7 of 22

slide-35
SLIDE 35

Partial evaluations and partial decompositions

Properties:

  • Every p ∈ TA is a partial evaluation/decomposition of itself:

TTA TA

Te µ Tη

(2) + (3) 2 + 3

7 of 22

slide-36
SLIDE 36

Partial evaluations and partial decompositions

Properties:

  • Every p ∈ TA is a partial evaluation/decomposition of itself:

TTA TA

Te µ Tη

(2) + (3) 2 + 3

7 of 22

slide-37
SLIDE 37

Partial evaluations and partial decompositions

Properties:

  • Every p ∈ TA is a partial evaluation/decomposition of itself:

TTA TA

Te µ Tη

(2) + (3) 2 + 3

  • Every p ∈ TA admits a unique total evaluation:

TA TTA A TA

e η Te µ η

2 + 3 (2 + 3) 5 5

7 of 22

slide-38
SLIDE 38

Partial evaluations and partial decompositions

Properties:

  • Every p ∈ TA is a partial evaluation/decomposition of itself:

TTA TA

Te µ Tη

(2) + (3) 2 + 3

  • Every p ∈ TA admits a unique total evaluation:

TA TTA A TA

e η Te µ η

2 + 3 (2 + 3) 5 5

7 of 22

slide-39
SLIDE 39

Partial evaluations and partial decompositions

Properties:

  • Every p ∈ TA is a partial evaluation/decomposition of itself:

TTA TA

Te µ Tη

(2) + (3) 2 + 3

  • Every p ∈ TA admits a unique total evaluation:

TA TTA A TA

e η Te µ η

2 + 3 (2 + 3) 5 5

7 of 22

slide-40
SLIDE 40

In terms of rewriting systems

Abstract rewriting system on TA:

8 of 22

slide-41
SLIDE 41

In terms of rewriting systems

Abstract rewriting system on TA:

  • Reflexivity: 2 + 3 → 2 + 3;

8 of 22

slide-42
SLIDE 42

In terms of rewriting systems

Abstract rewriting system on TA:

  • Reflexivity: 2 + 3 → 2 + 3;
  • Confluence:

1 + 1 + 1 + 1 2 + 2 3 + 1 4

8 of 22

slide-43
SLIDE 43

In terms of rewriting systems

Abstract rewriting system on TA:

  • Reflexivity: 2 + 3 → 2 + 3;
  • Confluence:

1 + 1 + 1 + 1 2 + 2 3 + 1 4

8 of 22

slide-44
SLIDE 44

In terms of rewriting systems

Abstract rewriting system on TA:

  • Reflexivity: 2 + 3 → 2 + 3;
  • Confluence:

1 + 1 + 1 + 1 2 + 2 3 + 1 4

  • The irreducible elements are the total evaluations.

8 of 22

slide-45
SLIDE 45

Transitivity

Question:

Can partial evaluations be composed?

9 of 22

slide-46
SLIDE 46

Transitivity

Question:

Can partial evaluations be composed? ((1 + 1) + (1 + 1)) (1 + 1) + (1 + 1) (1 + 1 + 1 + 1) (2 + 2) 1 + 1 + 1 + 1 2 + 2 4

µ Tµ TTe µ Te µ Te µ Te

9 of 22

slide-47
SLIDE 47

Transitivity

Question:

Can partial evaluations be composed? ((1 + 1) + (1 + 1)) (1 + 1) + (1 + 1) (1 + 1 + 1 + 1) (2 + 2) 1 + 1 + 1 + 1 2 + 2 4

µ Tµ TTe µ Te µ Te µ Te

9 of 22

slide-48
SLIDE 48

Transitivity

Question:

Can partial evaluations be composed? ((1 + 1) + (1 + 1)) (1 + 1) + (1 + 1) (1 + 1 + 1 + 1) (2 + 2) 1 + 1 + 1 + 1 2 + 2 4

µ Tµ TTe µ Te µ Te µ Te

9 of 22

slide-49
SLIDE 49

Transitivity

Question:

Can partial evaluations be composed? ((1 + 1) + (1 + 1)) (1 + 1) + (1 + 1) (1 + 1 + 1 + 1) (2 + 2) 1 + 1 + 1 + 1 2 + 2 4

µ Tµ TTe µ Te µ Te µ Te

9 of 22

slide-50
SLIDE 50

Transitivity

Question:

Can partial evaluations be composed? ((1 + 1) + (1 + 1)) (1 + 1) + (1 + 1) (1 + 1 + 1 + 1) (2 + 2) 1 + 1 + 1 + 1 2 + 2 4

µ Tµ TTe µ Te µ Te µ Te

9 of 22

slide-51
SLIDE 51

Transitivity

Question:

Can partial evaluations be composed? ((1 + 1) + (1 + 1)) (1 + 1) + (1 + 1) (1 + 1 + 1 + 1) (2 + 2) 1 + 1 + 1 + 1 2 + 2 4

µ Tµ TTe µ Te µ Te µ Te

9 of 22

slide-52
SLIDE 52

Transitivity

Question:

Can partial evaluations be composed? TTTA TTA TTA TTA TA TA TA

µ TTe Tµ Te µ µ Te µ Te

9 of 22

slide-53
SLIDE 53

Transitivity

Question:

Can partial evaluations be composed? TTTA TTA TTA TTA TA TA TA

µ TTe Tµ Te µ µ Te µ Te

We are asking for the existence of a “rewriting of rewritings”.

9 of 22

slide-54
SLIDE 54

Transitivity

Definition:

The diagram a b A B C D c d

f g m n

is called a weak or meek pullback if for every b ∈ B and c ∈ C such that m(b) = n(c) there exists an a ∈ A such that f (a) = b and g(a) = c.

10 of 22

slide-55
SLIDE 55

Transitivity

Definition:

The diagram a b A B C D c d

f g m n

is called a weak or meek pullback if for every b ∈ B and c ∈ C such that m(b) = n(c) there exists an a ∈ A such that f (a) = b and g(a) = c.

10 of 22

slide-56
SLIDE 56

Transitivity

Definition:

The diagram a b A B C D c d

f g m n

is called a weak or meek pullback if for every b ∈ B and c ∈ C such that m(b) = n(c) there exists an a ∈ A such that f (a) = b and g(a) = c.

10 of 22

slide-57
SLIDE 57

Transitivity

Definition:

The diagram a b A B C D c d

f g m n

is called a weak or meek pullback if for every b ∈ B and c ∈ C such that m(b) = n(c) there exists an a ∈ A such that f (a) = b and g(a) = c.

10 of 22

slide-58
SLIDE 58

Transitivity

Definition:

A cartesian monad is a monad (T, η, µ) such that:

  • T preserves pullbacks;
  • All naturality squares of η and µ are pullbacks.

11 of 22

slide-59
SLIDE 59

Transitivity

Definition [Weber, 2004]:

A weakly cartesian monad is a monad (T, η, µ) such that:

  • T preserves weak pullbacks;
  • All naturality squares of η and µ are weak pullbacks.

11 of 22

slide-60
SLIDE 60

Transitivity

Definition [Weber, 2004]:

A weakly cartesian monad is a monad (T, η, µ) such that:

  • T preserves weak pullbacks;
  • All naturality squares of η and µ are weak pullbacks.

Proposition:

  • For weakly cartesian monads, composition is always defined;

11 of 22

slide-61
SLIDE 61

Transitivity

Definition [Weber, 2004]:

A weakly cartesian monad is a monad (T, η, µ) such that:

  • T preserves weak pullbacks;
  • All naturality squares of η and µ are weak pullbacks.

Proposition:

  • For weakly cartesian monads, composition is always defined;
  • For cartesian monads, composition is always uniquely defined.

11 of 22

slide-62
SLIDE 62

Transitivity

What is known [Clementino et al., 2014]:

12 of 22

slide-63
SLIDE 63

Transitivity

What is known [Clementino et al., 2014]:

  • All monads presented by an operad are cartesian;
  • Monoid and group action monads;
  • Free monoid monads;
  • Maybe monad;

12 of 22

slide-64
SLIDE 64

Transitivity

What is known [Clementino et al., 2014]:

  • All monads presented by an operad are cartesian;
  • Monoid and group action monads;
  • Free monoid monads;
  • Maybe monad;
  • A wide class of monads, including the free commutative monoid

monad, are weakly cartesian;

12 of 22

slide-65
SLIDE 65

Transitivity

What is known [Clementino et al., 2014]:

  • All monads presented by an operad are cartesian;
  • Monoid and group action monads;
  • Free monoid monads;
  • Maybe monad;
  • A wide class of monads, including the free commutative monoid

monad, are weakly cartesian;

  • Most monads of classical algebras are not weakly cartesian;

12 of 22

slide-66
SLIDE 66

Transitivity

What is known [Clementino et al., 2014]:

  • All monads presented by an operad are cartesian;
  • Monoid and group action monads;
  • Free monoid monads;
  • Maybe monad;
  • A wide class of monads, including the free commutative monoid

monad, are weakly cartesian;

  • Most monads of classical algebras are not weakly cartesian;
  • As we prove, the Kantorovich probability monad is weakly cartesian

(more on that later).

12 of 22

slide-67
SLIDE 67

Examples

Factorization

Let T be the free commutative monoid monad. Consider (N, ·) as an algebra.

13 of 22

slide-68
SLIDE 68

Examples

Factorization

Let T be the free commutative monoid monad. Consider (N, ·) as an algebra.

  • Given a number n, its partial decompositions are its factorizations.

13 of 22

slide-69
SLIDE 69

Examples

Factorization

Let T be the free commutative monoid monad. Consider (N, ·) as an algebra.

  • Given a number n, its partial decompositions are its factorizations.
  • Each number admits a unique total decomposition, the

decomposition into prime factors.

13 of 22

slide-70
SLIDE 70

Examples

Factorization

Let T be the free commutative monoid monad. Consider (N, ·) as an algebra.

  • Given a number n, its partial decompositions are its factorizations.
  • Each number admits a unique total decomposition, the

decomposition into prime factors. 6 · 5 · 11 30 · 11 2 · 3 · 5 · 11 2 · 15 · 11 6 · 55 330 2 · 3 · 55 3 · 110

13 of 22

slide-71
SLIDE 71

Examples

Group or monoid action

Let G be an internal monoid (or group) in a (cartesian) monoidal category.

14 of 22

slide-72
SLIDE 72

Examples

Group or monoid action

Let G be an internal monoid (or group) in a (cartesian) monoidal category.

  • X → G × X is a monad;

14 of 22

slide-73
SLIDE 73

Examples

Group or monoid action

Let G be an internal monoid (or group) in a (cartesian) monoidal category.

  • X → G × X is a monad;
  • The algebras e : G × A → A are G-spaces.

14 of 22

slide-74
SLIDE 74

Examples

Group or monoid action

Let G be an internal monoid (or group) in a (cartesian) monoidal category.

  • X → G × X is a monad;
  • The algebras e : G × A → A are G-spaces.

Let (g, x), (h, y) ∈ G × A.

14 of 22

slide-75
SLIDE 75

Examples

Group or monoid action

Let G be an internal monoid (or group) in a (cartesian) monoidal category.

  • X → G × X is a monad;
  • The algebras e : G × A → A are G-spaces.

Let (g, x), (h, y) ∈ G × A. A partial evaluation from (g, x) to (h, y) is an element (h, ℓ, x) ∈ G × G × A such that hℓ = g and ℓ · x = y.

14 of 22

slide-76
SLIDE 76

Examples

Group or monoid action

Let G be an internal monoid (or group) in a (cartesian) monoidal category.

  • X → G × X is a monad;
  • The algebras e : G × A → A are G-spaces.

Let (g, x), (h, y) ∈ G × A. A partial evaluation from (g, x) to (h, y) is an element (h, ℓ, x) ∈ G × G × A such that hℓ = g and ℓ · x = y. x ℓ · x g · x

g ℓ h

14 of 22

slide-77
SLIDE 77

Examples

Group or monoid action

Let G be an internal monoid (or group) in a (cartesian) monoidal category.

  • X → G × X is a monad;
  • The algebras e : G × A → A are G-spaces.

Let (g, x), (h, y) ∈ G × A. A partial evaluation from (g, x) to (h, y) is an element (h, ℓ, x) ∈ G × G × A such that hℓ = g and ℓ · x = y. x ℓ · x g · x

g ℓ h

14 of 22

slide-78
SLIDE 78

Probability monads

Idea [Giry, 1982]:

Spaces of random elements as formal convex combinations.

15 of 22

slide-79
SLIDE 79

Probability monads

Idea [Giry, 1982]:

Spaces of random elements as formal convex combinations.

  • Base category C

15 of 22

slide-80
SLIDE 80

Probability monads

Idea [Giry, 1982]:

Spaces of random elements as formal convex combinations.

X

  • Base category C

15 of 22

slide-81
SLIDE 81

Probability monads

Idea [Giry, 1982]:

Spaces of random elements as formal convex combinations.

X PX

  • Base category C
  • Functor X → PX

15 of 22

slide-82
SLIDE 82

Probability monads

Idea [Giry, 1982]:

Spaces of random elements as formal convex combinations.

X PX

  • Base category C
  • Functor X → PX
  • Unit δ : X → PX

15 of 22

slide-83
SLIDE 83

Probability monads

Idea [Giry, 1982]:

Spaces of random elements as formal convex combinations.

1/2 1/2

  • Base category C
  • Functor X → PX
  • Unit δ : X → PX

15 of 22

slide-84
SLIDE 84

Probability monads

Idea [Giry, 1982]:

Spaces of random elements as formal convex combinations.

1/2 1/2 1/2 1/2

  • Base category C
  • Functor X → PX
  • Unit δ : X → PX

15 of 22

slide-85
SLIDE 85

Probability monads

Idea [Giry, 1982]:

Spaces of random elements as formal convex combinations.

?

1/2 1/2 1/2 1/2 1/2 1/2

  • Base category C
  • Functor X → PX
  • Unit δ : X → PX

15 of 22

slide-86
SLIDE 86

Probability monads

Idea [Giry, 1982]:

Spaces of random elements as formal convex combinations.

? ?

1/2 1/2 1/2 1/2 1/2 1/2 1/4 3/4

  • Base category C
  • Functor X → PX
  • Unit δ : X → PX

15 of 22

slide-87
SLIDE 87

Probability monads

Idea [Giry, 1982]:

Spaces of random elements as formal convex combinations.

PPX PX

? ?

1/2 1/2 1/2 1/2 1/2 1/2 1/4 3/4

  • Base category C
  • Functor X → PX
  • Unit δ : X → PX
  • Composition

E : PPX → PX

15 of 22

slide-88
SLIDE 88

Probability monads

Idea [Giry, 1982]:

Spaces of random elements as formal convex combinations.

A

a b

  • Algebras

e : PA → A are “convex spaces”

16 of 22

slide-89
SLIDE 89

Probability monads

Idea [Giry, 1982]:

Spaces of random elements as formal convex combinations.

PA A

a b a b a b a b

  • Algebras

e : PA → A are “convex spaces”

16 of 22

slide-90
SLIDE 90

Probability monads

Idea [Giry, 1982]:

Spaces of random elements as formal convex combinations.

PA A

a b a b a b a b

  • Algebras

e : PA → A are “convex spaces”

16 of 22

slide-91
SLIDE 91

Probability monads

Idea [Giry, 1982]:

Spaces of random elements as formal convex combinations.

PA A

a b λa + (1−λ)b a b a b a b

  • Algebras

e : PA → A are “convex spaces”

  • Formal averages are

mapped to actual averages

16 of 22

slide-92
SLIDE 92

Probability monads

Kantorovich monad [van Breugel, 2005, Fritz and Perrone, 2017]:

  • Given a complete metric space X, PX is the set of Radon

probability measures of finite first moment, equipped with the Wasserstein distance, or Kantorovich-Rubinstein distance, or earth mover’s distance: dPX(p, q) = sup

f :X→R

  • X

f (x) d(p − q)(x)

  • 17 of 22
slide-93
SLIDE 93

Probability monads

Kantorovich monad [van Breugel, 2005, Fritz and Perrone, 2017]:

  • Given a complete metric space X, PX is the set of Radon

probability measures of finite first moment, equipped with the Wasserstein distance, or Kantorovich-Rubinstein distance, or earth mover’s distance: dPX(p, q) = sup

f :X→R

  • X

f (x) d(p − q)(x)

  • The assignment X → PX is part of a monad on the category of

complete metric spaces and short maps.

17 of 22

slide-94
SLIDE 94

Probability monads

Kantorovich monad [van Breugel, 2005, Fritz and Perrone, 2017]:

  • Given a complete metric space X, PX is the set of Radon

probability measures of finite first moment, equipped with the Wasserstein distance, or Kantorovich-Rubinstein distance, or earth mover’s distance: dPX(p, q) = sup

f :X→R

  • X

f (x) d(p − q)(x)

  • The assignment X → PX is part of a monad on the category of

complete metric spaces and short maps.

  • Algebras of P are closed convex subsets of Banach spaces.

17 of 22

slide-95
SLIDE 95

Probability monads

Idea:

Partial evaluations for P are “partial expectations”.

18 of 22

slide-96
SLIDE 96

Probability monads

Idea:

Partial evaluations for P are “partial expectations”.

18 of 22

slide-97
SLIDE 97

Probability monads

Idea:

Partial evaluations for P are “partial expectations”.

18 of 22

slide-98
SLIDE 98

Probability monads

Idea:

Partial evaluations for P are “partial expectations”.

18 of 22

slide-99
SLIDE 99

Probability monads

Idea:

Partial evaluations for P are “partial expectations”.

18 of 22

slide-100
SLIDE 100

Probability monads

Idea:

Partial evaluations for P are “partial expectations”.

Properties:

  • 1. A partial expectation makes a distribution “more concentrated”, or

“less random” (closer to its center of mass);

18 of 22

slide-101
SLIDE 101

Probability monads

Idea:

Partial evaluations for P are “partial expectations”.

Properties:

  • 1. A partial expectation makes a distribution “more concentrated”, or

“less random” (closer to its center of mass);

  • 2. Partial expectations can always be composed (not uniquely);

18 of 22

slide-102
SLIDE 102

Probability monads

Idea:

Partial evaluations for P are “partial expectations”.

Properties:

  • 1. A partial expectation makes a distribution “more concentrated”, or

“less random” (closer to its center of mass);

  • 2. Partial expectations can always be composed (not uniquely);
  • 3. The relation on PA induced by partial evaluations is a closed

partial order, which is known in the literature as the Choquet or convex order, used in statistics and finance [Winkler, 1985], [Rothschild and Stiglitz, 1970].

18 of 22

slide-103
SLIDE 103

Probability monads

Theorem, extending [Winkler, 1985, Theorem 1.3.6]

Let A be a P-algebra and p, q ∈ PA. The following conditions are equivalent:

19 of 22

slide-104
SLIDE 104

Probability monads

Theorem, extending [Winkler, 1985, Theorem 1.3.6]

Let A be a P-algebra and p, q ∈ PA. The following conditions are equivalent:

  • 1. p is a partial evaluation of q;

19 of 22

slide-105
SLIDE 105

Probability monads

Theorem, extending [Winkler, 1985, Theorem 1.3.6]

Let A be a P-algebra and p, q ∈ PA. The following conditions are equivalent:

  • 1. p is a partial evaluation of q;
  • 2. There exists random variables X and Y on A with laws p and q,

respectively, and such that Y is a conditional expectation of X.

19 of 22

slide-106
SLIDE 106

Probability monads X

19 of 22

slide-107
SLIDE 107

Probability monads X

19 of 22

slide-108
SLIDE 108

Probability monads X

19 of 22

slide-109
SLIDE 109

Probability monads X A

19 of 22

slide-110
SLIDE 110

Probability monads X A

19 of 22

slide-111
SLIDE 111

Probability monads X A

19 of 22

slide-112
SLIDE 112

Probability monads X A

19 of 22

slide-113
SLIDE 113

Probability monads

Theorem, extending [Winkler, 1985, Theorem 1.3.6]

Let A be a P-algebra and p, q ∈ PA. The following conditions are equivalent:

  • 1. p is a partial evaluation of q;
  • 2. There exists random variables X and Y on A with laws p and q,

respectively, and such that Y is a conditional expectation of X.

19 of 22

slide-114
SLIDE 114

Probability monads

Theorem, extending [Winkler, 1985, Theorem 1.3.6]

Let A be a P-algebra and p, q ∈ PA. The following conditions are equivalent:

  • 1. p is a partial evaluation of q;
  • 2. There exists random variables X and Y on A with laws p and q,

respectively, and such that Y is a conditional expectation of X.

Corollary

A chain of composable partial decompositions in PA is (basically) the same as a martingale on A.

19 of 22

slide-115
SLIDE 115

Towards higher rewritings (work in progress)

· · · TTTA TTA TA A

µT Tµ TTe TηT TTη Te µ Tη e

20 of 22

slide-116
SLIDE 116

Towards higher rewritings (work in progress)

· · · TTTA TTA TA A

µT Tµ TTe TηT TTη Te µ Tη e

20 of 22

slide-117
SLIDE 117

Towards higher rewritings (work in progress)

· · · TTTA TTA TA A

µT Tµ TTe TηT TTη Te µ Tη e

20 of 22

slide-118
SLIDE 118

Towards higher rewritings (work in progress)

· · · TTTA TTA TA A

µT Tµ TTe TηT TTη Te µ Tη e

20 of 22

slide-119
SLIDE 119

Towards higher rewritings (work in progress)

· · · TTTA TTA TA A

µT Tµ TTe TηT TTη Te µ Tη e

20 of 22

slide-120
SLIDE 120

Towards higher rewritings (work in progress)

· · · TTTA TTA TA A

µT Tµ TTe TηT TTη Te µ Tη e

20 of 22

slide-121
SLIDE 121

Towards higher rewritings (work in progress)

· · · TTTA TTA TA A

µT Tµ TTe TηT TTη Te µ Tη e

  • The partial evaluation rewriting system is the 1-dimensional

truncation of a simplicial set.

20 of 22

slide-122
SLIDE 122

Towards higher rewritings (work in progress)

· · · TTTA TTA TA A

µT Tµ TTe TηT TTη Te µ Tη e

  • The partial evaluation rewriting system is the 1-dimensional

truncation of a simplicial set.

  • Composition is a 2-simplex of TTTA, which can be seen as a Kan

filler condition for inner 2-horns.

20 of 22

slide-123
SLIDE 123

Towards higher rewritings (work in progress)

20 of 22

slide-124
SLIDE 124

Towards higher rewritings (work in progress)

2 + 2 (1 + 1) + (1 + 1) (2 + 2) ((1 + 1) + (1 + 1)) 1 + 1 + 1 + 1 (1 + 1 + 1 + 1) 4

µ Te µ Te µ Tµ TTe µ Te 20 of 22

slide-125
SLIDE 125

Towards higher rewritings (work in progress)

2 + 2 (1 + 1) + (1 + 1) (2 + 2) ((1 + 1) + (1 + 1)) 1 + 1 + 1 + 1 (1 + 1 + 1 + 1) 4

µ Te µ Te µ Tµ TTe µ Te 20 of 22

slide-126
SLIDE 126

Acknowledgements

Joint work with Tobias Fritz Special thanks to Slava Matveev and Sharwin Rezagholi (MPI MIS Leipzig)

21 of 22

slide-127
SLIDE 127

References

Book, R. V. and Otto, F. (1993). String Rewriting Systems. Springer. Clementino, M. M., Hofmann, D., and Janelidze, G. (2014). The monads of classical algebra are seldom weakly cartesian.

  • J. Homotopy Relat. Struct., 9:175–197.

Fritz, T. and Perrone, P. (2017). A Probability Monad as the Colimit of Finite Powers.

  • Submitted. arXiv:1712.05363.

Giry, M. (1982). A Categorical Approach to Probability Theory. In Categorical aspects of topology and analysis, volume 915 of Lecture Notes in Mathematics. Hyland, M. and Power, J. (2007). The category-theoretic understanding of universal algebra: Lawvere theories and monads. ENTCS. Perrone, P. (2018). Categorical Probability and Stochastic Dominance in Metric Spaces. PhD thesis.

  • Submitted. www.paoloperrone.org/phdthesis.pdf.

Rothschild, M. and Stiglitz, J. E. (1970). Increasing risk: I. A definition. Journal of Economic Theory, 2:225–243. van Breugel, F. (2005). The Metric Monad for Probabilistic Nondeterminism. Weber, M. (2004). Generic morphisms, parametric representations and weakly cartesian monads. Theory and Applications of Categories, 13(14):191–234. Winkler, G. (1985). Choquet order and simplices with applications in probabilistic models. Lecture Notes in Mathematics. Springer. 22 of 22

slide-128
SLIDE 128

Contents

Front Page Idea Monads and formal expressions Partial evaluations and partial decompositions Transitivity Examples Probability monads References

22 of 22