Codensity and the Giry monad Tom Avery 19th June 2015 Tom Avery - - PowerPoint PPT Presentation

codensity and the giry monad
SMART_READER_LITE
LIVE PREVIEW

Codensity and the Giry monad Tom Avery 19th June 2015 Tom Avery - - PowerPoint PPT Presentation

Codensity and the Giry monad Tom Avery 19th June 2015 Tom Avery Codensity and the Giry monad Structure of this talk Introduction The Giry monad Codensity monads Main result Tom Avery Codensity and the Giry monad Introduction Let X be a


slide-1
SLIDE 1

Codensity and the Giry monad

Tom Avery 19th June 2015

Tom Avery Codensity and the Giry monad

slide-2
SLIDE 2

Structure of this talk Introduction The Giry monad Codensity monads Main result

Tom Avery Codensity and the Giry monad

slide-3
SLIDE 3

Introduction

Let X be a ‘space’. Want to choose a point of X at random.

Tom Avery Codensity and the Giry monad

slide-4
SLIDE 4

Introduction

Let X be a ‘space’. Want to choose a point of X at random. Need a probability measure on X. Write TX for the ’space’ of probability measures on X; then we want a point of TX.

Tom Avery Codensity and the Giry monad

slide-5
SLIDE 5

Introduction

Let X be a ‘space’. Want to choose a point of X at random. Need a probability measure on X. Write TX for the ’space’ of probability measures on X; then we want a point of TX. To be fair we should choose this at random too. To do this, we need a probability measure on TX, i.e. an element of TTX.

Tom Avery Codensity and the Giry monad

slide-6
SLIDE 6

Introduction

Let X be a ‘space’. Want to choose a point of X at random. Need a probability measure on X. Write TX for the ’space’ of probability measures on X; then we want a point of TX. To be fair we should choose this at random too. To do this, we need a probability measure on TX, i.e. an element of TTX. So, given ρ ∈ TTX, we can

1 choose π ∈ TX at random according to ρ, 2 choose x ∈ X at random according to π. Tom Avery Codensity and the Giry monad

slide-7
SLIDE 7

Introduction

Let X be a ‘space’. Want to choose a point of X at random. Need a probability measure on X. Write TX for the ’space’ of probability measures on X; then we want a point of TX. To be fair we should choose this at random too. To do this, we need a probability measure on TX, i.e. an element of TTX. So, given ρ ∈ TTX, we can

1 choose π ∈ TX at random according to ρ, 2 choose x ∈ X at random according to π.

This is a way of choosing an element of X ‘at random’ i.e. a probability measure on X. So we have a map TTX → TX

Tom Avery Codensity and the Giry monad

slide-8
SLIDE 8

Introduction

Let X be a ‘space’. Want to choose a point of X at random. Need a probability measure on X. Write TX for the ’space’ of probability measures on X; then we want a point of TX. To be fair we should choose this at random too. To do this, we need a probability measure on TX, i.e. an element of TTX. So, given ρ ∈ TTX, we can

1 choose π ∈ TX at random according to ρ, 2 choose x ∈ X at random according to π.

This is a way of choosing an element of X ‘at random’ i.e. a probability measure on X. So we have a map TTX → TX Given x ∈ X we have a way of choosing a point of X at random: “always choose x”. So we have X → TX.

Tom Avery Codensity and the Giry monad

slide-9
SLIDE 9

Introduction

So we might expect space X → probability measures on X to form a monad.

Tom Avery Codensity and the Giry monad

slide-10
SLIDE 10

Introduction

So we might expect space X → probability measures on X to form a monad. Can vary what we mean by ‘space’: sets, measurable spaces, topological spaces, Polish spaces, etc.

Tom Avery Codensity and the Giry monad

slide-11
SLIDE 11

Introduction

So we might expect space X → probability measures on X to form a monad. Can vary what we mean by ‘space’: sets, measurable spaces, topological spaces, Polish spaces, etc. and what notion of ‘measure’ we are interested in: measures taking values in {0, 1}, [0, 1], [0, ∞], R, C, etc. finitely vs. countably additive distributions of compact support etc.

Tom Avery Codensity and the Giry monad

slide-12
SLIDE 12

Introduction

So we might expect space X → probability measures on X to form a monad. Can vary what we mean by ‘space’: sets, measurable spaces, topological spaces, Polish spaces, etc. and what notion of ‘measure’ we are interested in: measures taking values in {0, 1}, [0, 1], [0, ∞], R, C, etc. finitely vs. countably additive distributions of compact support etc. We get the Giry monad when we take ‘measurable spaces’ and ‘probability measures’.

Tom Avery Codensity and the Giry monad

slide-13
SLIDE 13

Introduction

Question: Is there a unified categorical description of all these variations?

Tom Avery Codensity and the Giry monad

slide-14
SLIDE 14

Introduction

Codensity monads provide one tool. Theorem The Giry monad and finitely additive Giry monad arise as codensity monads (of certain functors).

Tom Avery Codensity and the Giry monad

slide-15
SLIDE 15

Introduction

Codensity monads provide one tool. Theorem The Giry monad and finitely additive Giry monad arise as codensity monads (of certain functors). analogous to Theorem (Gildenhuys, Kennison) The ultrafilter monad (on Set) is the codensity monad of FinSet ֒ → Set. (The ultrafilter monad is a measure monad: An ultrafilter on a set X is the same as a finitely additive probability measure defined on the power set of X taking values in {0, 1})

Tom Avery Codensity and the Giry monad

slide-16
SLIDE 16

Introduction

Notation: Meas is the category of measurable spaces and maps. I = [0, 1] (with Borel σ-algebra). If S is a set, X an object of a category, then [S, X] is the ‘S-th power of X’.

Tom Avery Codensity and the Giry monad

slide-17
SLIDE 17

The Giry Monad

The Giry monad, G = (G, η, µ) consists of: Endofunctor: G : Meas → Meas, sends Ω to the set of probability measures on Ω, with a suitable σ-algebra.

Tom Avery Codensity and the Giry monad

slide-18
SLIDE 18

The Giry Monad

The Giry monad, G = (G, η, µ) consists of: Endofunctor: G : Meas → Meas, sends Ω to the set of probability measures on Ω, with a suitable σ-algebra. Unit: If ω ∈ Ω and A ⊆ Ω, is measurable then η(ω)(A) =

  • 1

if ω ∈ A

  • therwise.

Tom Avery Codensity and the Giry monad

slide-19
SLIDE 19

The Giry Monad

The Giry monad, G = (G, η, µ) consists of: Endofunctor: G : Meas → Meas, sends Ω to the set of probability measures on Ω, with a suitable σ-algebra. Unit: If ω ∈ Ω and A ⊆ Ω, is measurable then η(ω)(A) =

  • 1

if ω ∈ A

  • therwise.

Multiplication: If ρ ∈ GGΩ and A ⊆ Ω, then µ(ρ)(A) =

  • π∈GΩ

π(A) dρ(π)

Tom Avery Codensity and the Giry monad

slide-20
SLIDE 20

The Giry Monad

The Giry monad, G = (G, η, µ) consists of: Endofunctor: G : Meas → Meas, sends Ω to the set of probability measures on Ω, with a suitable σ-algebra. Unit: If ω ∈ Ω and A ⊆ Ω, is measurable then η(ω)(A) =

  • 1

if ω ∈ A

  • therwise.

Multiplication: If ρ ∈ GGΩ and A ⊆ Ω, then µ(ρ)(A) =

  • π∈GΩ

π(A) dρ(π) replacing ‘probability measures’ with ‘finitely additive probability measures’ gives the finitely additive Giry monad F = (F, η, µ). Note that G is a submonad of F.

Tom Avery Codensity and the Giry monad

slide-21
SLIDE 21

The Giry Monad

Let C be the category with

  • bjects I n for n ∈ N,

morphisms are affine maps (i.e. maps that preserve convex combinations)

Tom Avery Codensity and the Giry monad

slide-22
SLIDE 22

The Giry Monad

Let C be the category with

  • bjects I n for n ∈ N,

morphisms are affine maps (i.e. maps that preserve convex combinations) Then C is in fact a Lawvere theory. A C-algebra can be described as a set A equipped with for each r ∈ I, a map +r : A × A → A (think of this as x +r y = rx + (1 − r)y), for each r ∈ I, an element ¯ r ∈ A, (’constant at r’), a unary operation i : A → A (think of i(a) as ’1 − a’) satisfying some axioms.

Tom Avery Codensity and the Giry monad

slide-23
SLIDE 23

The Giry Monad

Let C be the category with

  • bjects I n for n ∈ N,

morphisms are affine maps (i.e. maps that preserve convex combinations) Then C is in fact a Lawvere theory. A C-algebra can be described as a set A equipped with for each r ∈ I, a map +r : A × A → A (think of this as x +r y = rx + (1 − r)y), for each r ∈ I, an element ¯ r ∈ A, (’constant at r’), a unary operation i : A → A (think of i(a) as ’1 − a’) satisfying some axioms. Examples: I and Meas(Ω, I) for any Ω ∈ Meas.

Tom Avery Codensity and the Giry monad

slide-24
SLIDE 24

The Giry Monad

Let C be the category with

  • bjects I n for n ∈ N,

morphisms are affine maps (i.e. maps that preserve convex combinations) Then C is in fact a Lawvere theory. A C-algebra can be described as a set A equipped with for each r ∈ I, a map +r : A × A → A (think of this as x +r y = rx + (1 − r)y), for each r ∈ I, an element ¯ r ∈ A, (’constant at r’), a unary operation i : A → A (think of i(a) as ’1 − a’) satisfying some axioms. Examples: I and Meas(Ω, I) for any Ω ∈ Meas.

Tom Avery Codensity and the Giry monad

slide-25
SLIDE 25

The Giry Monad

Consider C-algebra homomorphisms Meas(Ω, I) → I. Call such a homomorphism continuous if it preserves pointwise limits of sequences. That is φ ∈ C-Alg(Meas(Ω, I), I) is continuous if, for every sequence fn : Ω → I with fn → f pointwise as n → ∞, we have φ(fn) → φ(f ) as n → ∞. Write C-Algcts(Meas(Ω, I), I) for the set of continuous homomorphisms.

Tom Avery Codensity and the Giry monad

slide-26
SLIDE 26

The Giry Monad

Consider C-algebra homomorphisms Meas(Ω, I) → I. Call such a homomorphism continuous if it preserves pointwise limits of sequences. That is φ ∈ C-Alg(Meas(Ω, I), I) is continuous if, for every sequence fn : Ω → I with fn → f pointwise as n → ∞, we have φ(fn) → φ(f ) as n → ∞. Write C-Algcts(Meas(Ω, I), I) for the set of continuous homomorphisms. Proposition (correction of Sturtz) Let Ω ∈ Meas. As sets, we have C-Alg(Meas(Ω, I), I) ∼ = FΩ and C-Algcts(Meas(Ω, I), I) ∼ = GΩ.

Tom Avery Codensity and the Giry monad

slide-27
SLIDE 27

The Giry Monad

Consider C-algebra homomorphisms Meas(Ω, I) → I. Call such a homomorphism continuous if it preserves pointwise limits of sequences. That is φ ∈ C-Alg(Meas(Ω, I), I) is continuous if, for every sequence fn : Ω → I with fn → f pointwise as n → ∞, we have φ(fn) → φ(f ) as n → ∞. Write C-Algcts(Meas(Ω, I), I) for the set of continuous homomorphisms. Proposition (correction of Sturtz) Let Ω ∈ Meas. As sets, we have C-Alg(Meas(Ω, I), I) ∼ = FΩ and C-Algcts(Meas(Ω, I), I) ∼ = GΩ. (Compare: An ultrafilter on a set S is an element of Bool(Set(S, 2), 2).)

Tom Avery Codensity and the Giry monad

slide-28
SLIDE 28

The Giry Monad

Proposition (correction of Sturtz) Let Ω ∈ Meas. As sets, we have C-Alg(Meas(Ω, I), I) ∼ = FΩ and C-Algcts(Meas(Ω, I), I) ∼ = GΩ. Given φ: Meas(Ω, I) → I, define a finitely additive probability measure π by π(A) = φ(χA), for A ⊆ Ω measurable, with characteristic function χA.

Tom Avery Codensity and the Giry monad

slide-29
SLIDE 29

The Giry Monad

Proposition (correction of Sturtz) Let Ω ∈ Meas. As sets, we have C-Alg(Meas(Ω, I), I) ∼ = FΩ and C-Algcts(Meas(Ω, I), I) ∼ = GΩ. Given φ: Meas(Ω, I) → I, define a finitely additive probability measure π by π(A) = φ(χA), for A ⊆ Ω measurable, with characteristic function χA. Given a finitely additive probability measure π, define φ: Meas(Ω, I) → I by φ(f ) =

f dπ for f ∈ Meas(Ω, I).

Tom Avery Codensity and the Giry monad

slide-30
SLIDE 30

Codensity Monads

Let U : B → M be a functor. The codensity monad of U (if it exists) is the right Kan extension T U : M → M of U along itself. Write κ: T UU → U for the universal natural transformation.

Tom Avery Codensity and the Giry monad

slide-31
SLIDE 31

Codensity Monads

Let U : B → M be a functor. The codensity monad of U (if it exists) is the right Kan extension T U : M → M of U along itself. Write κ: T UU → U for the universal natural transformation. We obtain η: idM → T U and µ: T UT U → T U making T U into a monad via: B

U

  • U
  • κ

M

idM

  • T U
  • η

M = B

U

  • U
  • M

M and B

U

  • U
  • κ

M

T U

  • T U
  • µ

M

T U

  • M

= B

U

  • U
  • U
  • κ

κ

M

T U

  • M

T U

  • M.

Tom Avery Codensity and the Giry monad

slide-32
SLIDE 32

Codensity Monads

Remark: If U is a right adjoint, then T U is the monad induced by the adjunction.

Tom Avery Codensity and the Giry monad

slide-33
SLIDE 33

Codensity Monads

Remark: If U is a right adjoint, then T U is the monad induced by the adjunction. The end formula for right Kan extensions gives T UX ∼ =

  • b∈B

[M(X, Ub), Ub] for X ∈ M.

Tom Avery Codensity and the Giry monad

slide-34
SLIDE 34

Codensity Monads

Remark: If U is a right adjoint, then T U is the monad induced by the adjunction. The end formula for right Kan extensions gives T UX ∼ =

  • b∈B

[M(X, Ub), Ub] for X ∈ M. Example: If B is a Lawvere theory and U : B → M is a model with underlying object R, say, then T U is characterised by M(Y , T UX) ∼ = B-Alg(M(X, R), M(Y , R)).

Tom Avery Codensity and the Giry monad

slide-35
SLIDE 35

Main Result

Recall C is the category (Lawvere theory, in fact) with

  • bjects: I n, n ∈ N.

morphisms: affine maps. The objects of C have natural (Borel) σ-algebras so there is a functor U : C → Meas. This exhibits I ∈ Meas as a C-algebra.

Tom Avery Codensity and the Giry monad

slide-36
SLIDE 36

Main Result

Recall C is the category (Lawvere theory, in fact) with

  • bjects: I n, n ∈ N.

morphisms: affine maps. The objects of C have natural (Borel) σ-algebras so there is a functor U : C → Meas. This exhibits I ∈ Meas as a C-algebra. Define the category D with

  • bjects: the objects of C together with

d0 = {(xn)∞

n=0 | xn ∈ I and xn → 0 as n → ∞}

morphisms: affine maps. There is a similar functor V : D → Meas. (But D is not a Lawvere theory)

Tom Avery Codensity and the Giry monad

slide-37
SLIDE 37

Main Result

Theorem (TA) The codensity monad of U : C = {I 0, I 1, I 2, . . .} → Meas is the finitely additive Giry monad F. The codensity monad of V : D = {I 0, I 1, . . . , d0} → Meas is the Giry monad G. Sketch proof: The forgetful functor Meas → Set is representable. Hence for Ω ∈ Meas, the underlying set of T UΩ is C-Alg(Meas(Ω, I), I) ∼ = FΩ. Then check the isomorphisms are compatible with measurable space and monad structure. Similarly one can see that the underlying set of T V Ω is C-Algcts(Meas(Ω, I), I) ∼ = GΩ, and check compatibility.

Tom Avery Codensity and the Giry monad

slide-38
SLIDE 38

Related Results

Let U′ : C′ → Meas be any of the following: C′ the category of simplices ∆n ⊆ Rn and affine maps between them, and U′ the obvious forgetful functor;

Tom Avery Codensity and the Giry monad

slide-39
SLIDE 39

Related Results

Let U′ : C′ → Meas be any of the following: C′ the category of simplices ∆n ⊆ Rn and affine maps between them, and U′ the obvious forgetful functor; C′ the monoid of affine endomorphisms of I 2 (or ∆2), and U′ the action on I 2 ∈ Meas (or ∆2 ∈ Meas respectively);

Tom Avery Codensity and the Giry monad

slide-40
SLIDE 40

Related Results

Let U′ : C′ → Meas be any of the following: C′ the category of simplices ∆n ⊆ Rn and affine maps between them, and U′ the obvious forgetful functor; C′ the monoid of affine endomorphisms of I 2 (or ∆2), and U′ the action on I 2 ∈ Meas (or ∆2 ∈ Meas respectively); C′ the category of all bounded convex subsets of Euclidean space with affine maps, and U′ the forgetful functor.

Tom Avery Codensity and the Giry monad

slide-41
SLIDE 41

Related Results

Let U′ : C′ → Meas be any of the following: C′ the category of simplices ∆n ⊆ Rn and affine maps between them, and U′ the obvious forgetful functor; C′ the monoid of affine endomorphisms of I 2 (or ∆2), and U′ the action on I 2 ∈ Meas (or ∆2 ∈ Meas respectively); C′ the category of all bounded convex subsets of Euclidean space with affine maps, and U′ the forgetful functor. Then the codensity monad of U′ is still the finitely additive Giry monad F.

Tom Avery Codensity and the Giry monad

slide-42
SLIDE 42

Related Results

Consider the last of these: C′ = {bounded convex subsets of Rn}, U′ = forgetful. Here’s an interpretation of the result in this case. The collection FΩ of finitely additive probability measures on Ω ∈ Meas satisfies the following:

Tom Avery Codensity and the Giry monad

slide-43
SLIDE 43

Related Results

Consider the last of these: C′ = {bounded convex subsets of Rn}, U′ = forgetful. Here’s an interpretation of the result in this case. The collection FΩ of finitely additive probability measures on Ω ∈ Meas satisfies the following: FΩ is a measurable space, and f.a. probability measures can be pushed forward along measurable maps, every f.a. probability measure on a convex bounded C ⊆ Rn has a ’barycentre’ in C, pushforward along affine maps between convex bounded sets respects barycentres, and F is characterised by being terminal such.

Tom Avery Codensity and the Giry monad

slide-44
SLIDE 44

Related Results

Let V ′ : D′ → Meas be any of the following D′ the category of simplices, together with ∆ω = {(xn)∞

n=0 | xn ∈ I, ∞ n=0 xn = 1}

and affine maps, and V ′ forgetful;

Tom Avery Codensity and the Giry monad

slide-45
SLIDE 45

Related Results

Let V ′ : D′ → Meas be any of the following D′ the category of simplices, together with ∆ω = {(xn)∞

n=0 | xn ∈ I, ∞ n=0 xn = 1}

and affine maps, and V ′ forgetful; D′ the monoid of affine endomorphisms of d0 (or ∆ω), and V ′ the action on d0 ∈ Meas (or∆ω respectively);

Tom Avery Codensity and the Giry monad

slide-46
SLIDE 46

Related Results

Let V ′ : D′ → Meas be any of the following D′ the category of simplices, together with ∆ω = {(xn)∞

n=0 | xn ∈ I, ∞ n=0 xn = 1}

and affine maps, and V ′ forgetful; D′ the monoid of affine endomorphisms of d0 (or ∆ω), and V ′ the action on d0 ∈ Meas (or∆ω respectively); D′ the category of closed, convex, bounded subsets of the vector space c0 = {(xn)∞

n=0 | xn ∈ R, xn → 0}

with the sup norm, with affine maps between them, and V ′ forgetful. Then the codensity monad of V ′ is still the Giry monad G. A similar interpretation of the last of these holds as on the previous slide.

Tom Avery Codensity and the Giry monad

slide-47
SLIDE 47

Related monads

Recall C is the category with objects I n and affine maps (WITHOUT d0). There is an obvious functor from C to CHaus, the category of compact Hausdorff spaces. The codensity monad of this sends a space X to the space of regular Borel probability measures on X.

Tom Avery Codensity and the Giry monad

slide-48
SLIDE 48

Related monads

Recall C is the category with objects I n and affine maps (WITHOUT d0). There is an obvious functor from C to CHaus, the category of compact Hausdorff spaces. The codensity monad of this sends a space X to the space of regular Borel probability measures on X. There is a monad on Top of ’Scott-continuous probability valuations’. This can be realised as the codensity monad of a certain forgetfull functor C → Top, where C is a category whose objects are spaces of (transfinite) sequences in I.

Tom Avery Codensity and the Giry monad

slide-49
SLIDE 49
  • T. Avery. Codensity and the Giry monad. arXiv:1410.4432,

2014.

  • M. Giry. A categorical approach to probability theory. In

Categorical Aspects of Topology and Analysis, volume 915 of Lecture Notes in Mathematics, pages 65–85. Springer 1982.

  • K. Sturtz. The Giry monad as a codensity monad.

arXiv:1406.6030, 2014.

  • D. Gildenhuys and J. F. Kennison. Equational completion,

model induced triples and pro-objects. Journal of Pure and Applied Algebra, 1:317–346, 1971.

  • T. Leinster. Codensity and the ultrafilter monad. Theory and

Applications of Categories, 28(13):332270, 2013.

Tom Avery Codensity and the Giry monad