monads partial evaluations and rewriting
play

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


  1. Transitivity Question: Can partial evaluations be composed? ((1 + 1) + (1 + 1)) µ TTe T µ (1 + 1) + (1 + 1) (1 + 1 + 1 + 1) (2 + 2) µ µ Te Te µ Te 1 + 1 + 1 + 1 2 + 2 4 9 of 22

  2. Transitivity Question: Can partial evaluations be composed? TTTA µ TTe T µ TTA TTA TTA µ µ Te Te µ Te TA TA TA 9 of 22

  3. Transitivity Question: Can partial evaluations be composed? TTTA µ TTe T µ TTA TTA TTA µ µ Te Te µ Te TA TA TA We are asking for the existence of a “rewriting of rewritings”. 9 of 22

  4. Transitivity Definition: The diagram a b f A B g m C D n c d 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

  5. Transitivity Definition: The diagram a b f A B g m C D n c d 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

  6. Transitivity Definition: The diagram a b f A B g m C D n c d 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

  7. Transitivity Definition: The diagram a b f A B g m C D n c d 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

  8. Transitivity Definition: A cartesian monad is a monad ( T , η, µ ) such that: • T preserves pullbacks; • All naturality squares of η and µ are pullbacks. 11 of 22

  9. 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

  10. 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

  11. 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

  12. Transitivity What is known [Clementino et al., 2014]: 12 of 22

  13. 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

  14. 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

  15. 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

  16. 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

  17. Examples Factorization Let T be the free commutative monoid monad. Consider ( N , · ) as an algebra. 13 of 22

  18. 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

  19. 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

  20. 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

  21. Examples Group or monoid action Let G be an internal monoid (or group) in a (cartesian) monoidal category. 14 of 22

  22. 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

  23. 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

  24. 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

  25. 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

  26. 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 . g x ℓ · x g · x ℓ h 14 of 22

  27. 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 . g x ℓ · x g · x ℓ h 14 of 22

  28. Probability monads Idea [Giry, 1982]: Spaces of random elements as formal convex combinations. 15 of 22

  29. Probability monads Idea [Giry, 1982]: Spaces of random elements as formal convex combinations. • Base category C 15 of 22

  30. Probability monads Idea [Giry, 1982]: Spaces of random elements as formal convex combinations. • Base category C X 15 of 22

  31. Probability monads Idea [Giry, 1982]: Spaces of random elements as formal convex combinations. • Base category C • Functor X �→ PX PX X 15 of 22

  32. Probability monads Idea [Giry, 1982]: Spaces of random elements as formal convex combinations. • Base category C • Functor X �→ PX • Unit δ : X → PX PX X 15 of 22

  33. Probability monads Idea [Giry, 1982]: Spaces of random elements as formal convex combinations. • Base category C • Functor X �→ PX • Unit δ : X → PX 1/2 1/2 15 of 22

  34. Probability monads Idea [Giry, 1982]: Spaces of random elements as formal convex combinations. • Base category C • Functor X �→ PX • Unit δ : X → PX 1/2 1/2 1/2 1/2 15 of 22

  35. 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 1/2 1/2 1/2 1/2 15 of 22

  36. Probability monads Idea [Giry, 1982]: Spaces of random elements as formal convex combinations. ? ? 1/2 1/2 • Base category C 3/4 1/4 • Functor X �→ PX • Unit δ : X → PX 1/2 1/2 1/2 1/2 15 of 22

  37. Probability monads Idea [Giry, 1982]: Spaces of random elements as formal convex combinations. ? ? 1/2 1/2 • Base category C 3/4 1/4 • Functor X �→ PX • Unit δ : X → PX 1/2 1/2 1/2 1/2 • Composition E : PPX → PX PX PPX 15 of 22

  38. Probability monads Idea [Giry, 1982]: Spaces of random elements as formal convex combinations. • Algebras a e : PA → A are “convex spaces” b A 16 of 22

  39. Probability monads Idea [Giry, 1982]: Spaces of random elements as formal convex combinations. • Algebras a a b e : PA → A are “convex spaces” a b b a b A PA 16 of 22

  40. Probability monads Idea [Giry, 1982]: Spaces of random elements as formal convex combinations. • Algebras a a b e : PA → A are “convex spaces” a b b a b A PA 16 of 22

  41. Probability monads Idea [Giry, 1982]: Spaces of random elements as formal convex combinations. • Algebras a a b e : PA → A are λ a + (1 − λ ) b “convex spaces” a b • Formal averages are b mapped to actual a b averages A PA 16 of 22

  42. 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 : � � � � � d PX ( p , q ) = sup f ( x ) d ( p − q )( x ) � � � � f : X → R X 17 of 22

  43. 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 : � � � � � d PX ( p , q ) = sup f ( x ) d ( p − q )( x ) � � � � f : X → R X • The assignment X �→ PX is part of a monad on the category of complete metric spaces and short maps. 17 of 22

  44. 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 : � � � � � d PX ( p , q ) = sup f ( x ) d ( p − q )( x ) � � � � f : X → R 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

  45. Probability monads Idea: Partial evaluations for P are “partial expectations”. 18 of 22

  46. Probability monads Idea: Partial evaluations for P are “partial expectations”. 18 of 22

  47. Probability monads Idea: Partial evaluations for P are “partial expectations”. 18 of 22

  48. Probability monads Idea: Partial evaluations for P are “partial expectations”. 18 of 22

  49. Probability monads Idea: Partial evaluations for P are “partial expectations”. 18 of 22

  50. 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

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend