# mathlibdocumentation

Let X be a measurable space. The collection of all measures on X again forms a measurable space. This construction forms a monad on measurable spaces and measurable functions, called the Giry monad.

Note that most sources use the term "Giry monad" for the restriction to probability measures. Here we include all measures on X.

See also measure_theory/category/Meas.lean, containing an upgrade of the type-level monad to an honest monad of the functor Measure : Meas ⥤ Meas.

## Tags

@[instance]
def measure_theory.measure.measurable_space {α : Type u_1}  :

Measurability structure on measure: Measures are measurable w.r.t. all projections

Equations
theorem measure_theory.measure.measurable_coe {α : Type u_1} {s : set α} :
measurable (λ (μ : , μ s)

theorem measure_theory.measure.measurable_of_measurable_coe {α : Type u_1} {β : Type u_2} (f : β → ) :
(∀ (s : set α), measurable (λ (b : β), (f b) s))

theorem measure_theory.measure.measurable_measure {α : Type u_1} {β : Type u_2} {μ : α → } :
∀ (s : set β), measurable (λ (b : α), (μ b) s)

theorem measure_theory.measure.measurable_map {α : Type u_1} {β : Type u_2} (f : α → β) :
measurable (λ (μ : ,

theorem measure_theory.measure.measurable_dirac {α : Type u_1}  :

theorem measure_theory.measure.measurable_lintegral {α : Type u_1} {f : α → ennreal} :
measurable (λ (μ : , ∫⁻ (x : α), f x μ)

def measure_theory.measure.join {α : Type u_1}  :

Monadic join on measure in the category of measurable spaces and measurable functions.

Equations
@[simp]
theorem measure_theory.measure.join_apply {α : Type u_1} {s : set α} :
(m.join) s = ∫⁻ (μ : , μ s m

theorem measure_theory.measure.measurable_join {α : Type u_1}  :

theorem measure_theory.measure.lintegral_join {α : Type u_1} {f : α → ennreal} :
∫⁻ (x : α), f x m.join = ∫⁻ (μ : , ∫⁻ (x : α), f x μ m

def measure_theory.measure.bind {α : Type u_1} {β : Type u_2}  :

Monadic bind on measure, only works in the category of measurable spaces and measurable functions. When the function f is not measurable the result is not well defined.

Equations
@[simp]
theorem measure_theory.measure.bind_apply {α : Type u_1} {β : Type u_2} {m : measure_theory.measure α} {f : α → } {s : set β} :
(m.bind f) s = ∫⁻ (a : α), (f a) s m

theorem measure_theory.measure.measurable_bind' {α : Type u_1} {β : Type u_2} {g : α → } :
measurable (λ (m : , m.bind g)

theorem measure_theory.measure.lintegral_bind {α : Type u_1} {β : Type u_2} {m : measure_theory.measure α} {μ : α → } {f : β → ennreal} :
∫⁻ (x : β), f x m.bind μ = ∫⁻ (a : α), ∫⁻ (x : β), f x μ a m

theorem measure_theory.measure.bind_bind {α : Type u_1} {β : Type u_2} {γ : Type u_3} {m : measure_theory.measure α} {f : α → } {g : β → } :
(m.bind f).bind g = m.bind (λ (a : α), (f a).bind g)

theorem measure_theory.measure.bind_dirac {α : Type u_1} {β : Type u_2} {f : α → } (hf : measurable f) (a : α) :
= f a

theorem measure_theory.measure.map_dirac {α : Type u_1} {β : Type u_2} {f : α → β} (hf : measurable f) (a : α) :

theorem measure_theory.measure.join_eq_bind {α : Type u_1}  :
μ.join = μ.bind id

theorem measure_theory.measure.join_map_map {α : Type u_1} {β : Type u_2} {f : α → β} (hf : measurable f)  :

theorem measure_theory.measure.join_map_join {α : Type u_1}  :

theorem measure_theory.measure.join_dirac {α : Type u_1} (μ : measure_theory.measure α) :