Measurable spaces and measurable functions #
This file provides properties of measurable spaces and the functions and isomorphisms between them.
The definition of a measurable space is in Mathlib/MeasureTheory/MeasurableSpace/Defs.lean
.
A measurable space is a set equipped with a σ-algebra, a collection of subsets closed under complementation and countable union. A function between measurable spaces is measurable if the preimage of each measurable subset is measurable.
σ-algebras on a fixed set α
form a complete lattice. Here we order
σ-algebras by writing m₁ ≤ m₂
if every set which is m₁
-measurable is
also m₂
-measurable (that is, m₁
is a subset of m₂
). In particular, any
collection of subsets of α
generates a smallest σ-algebra which
contains all of them. A function f : α → β
induces a Galois connection
between the lattices of σ-algebras on α
and β
.
A measurable equivalence between measurable spaces is an equivalence which respects the σ-algebras, that is, for which both directions of the equivalence are measurable functions.
We say that a filter f
is measurably generated if every set s ∈ f
includes a measurable
set t ∈ f
. This property is useful, e.g., to extract a measurable witness of Filter.Eventually
.
Notation #
- We write
α ≃ᵐ β
for measurable equivalences between the measurable spacesα
andβ
. This should not be confused with≃ₘ
which is used for diffeomorphisms between manifolds.
Implementation notes #
Measurability of a function f : α → β
between measurable spaces is
defined in terms of the Galois connection induced by f.
References #
Tags #
measurable space, σ-algebra, measurable function, measurable equivalence, dynkin system, π-λ theorem, π-system
The forward image of a measurable space under a function. map f m
contains the sets
s : Set β
whose preimage under f
is measurable.
Equations
- MeasurableSpace.map f m = { MeasurableSet' := fun (s : Set β) => MeasurableSet (f ⁻¹' s), measurableSet_empty := ⋯, measurableSet_compl := ⋯, measurableSet_iUnion := ⋯ }
Instances For
The reverse image of a measurable space under a function. comap f m
contains the sets
s : Set α
such that s
is the f
-preimage of a measurable set in β
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Alias of the forward direction of measurable_iff_le_map
.
Alias of the reverse direction of measurable_iff_le_map
.
Alias of the reverse direction of measurable_iff_comap_le
.
Alias of the forward direction of measurable_iff_comap_le
.
A version of measurable_const
that assumes f x = f y
for all x, y
. This version works
for functions between empty types.
This is slightly different from Measurable.piecewise
. It can be used to show
Measurable (ite (x=0) 0 1)
by
exact Measurable.ite (measurableSet_singleton 0) measurable_const measurable_const
,
but replacing Measurable.ite
by Measurable.piecewise
in that example proof does not work.
The measurability of a set A
is equivalent to the measurability of the indicator function
which takes a constant value b ≠ 0
on a set A
and 0
elsewhere.
If a function coincides with a measurable function outside of a countable set, it is measurable.
Equations
Equations
Equations
Equations
- ⋯ = ⋯
Equations
Equations
- ⋯ = ⋯
Equations
Equations
Equations
- ULift.instMeasurableSpace = MeasurableSpace.map ULift.up inst
Equations
- Quot.instMeasurableSpace = MeasurableSpace.map (Quot.mk r) m
Equations
- Quotient.instMeasurableSpace = MeasurableSpace.map Quotient.mk'' m
Equations
- QuotientAddGroup.measurableSpace S = Quotient.instMeasurableSpace
Equations
- QuotientGroup.measurableSpace S = Quotient.instMeasurableSpace
Equations
- Subtype.instMeasurableSpace = MeasurableSpace.comap Subtype.val m
Equations
- ⋯ = ⋯
Alias of Measurable.subtype_coe
.
The measurable atom of x
is the intersection of all the measurable sets countaining x
.
It is measurable when the space is countable (or more generally when the measurable space is
countably generated).
Equations
- measurableAtom x = ⋂ (s : Set β), ⋂ (_ : x ∈ s), ⋂ (_ : MeasurableSet s), s
Instances For
A MeasurableSpace
structure on the product of two measurable spaces.
Equations
- MeasurableSpace.prod m₁ m₂ = MeasurableSpace.comap Prod.fst m₁ ⊔ MeasurableSpace.comap Prod.snd m₂
Instances For
Equations
- Prod.instMeasurableSpace = MeasurableSpace.prod m₁ m₂
Equations
- ⋯ = ⋯
A piecewise function on countably many pieces is measurable if all the data is measurable.
Let t i
be a countable covering of a set T
by measurable sets. Let f i : t i → β
be a
family of functions that agree on the intersections t i ∩ t j
. Then the function
Set.iUnionLift t f _ _ : T → β
, defined as f i ⟨x, hx⟩
for hx : x ∈ t i
, is measurable.
Let t i
be a countable covering of α
by measurable sets. Let f i : t i → β
be a family of
functions that agree on the intersections t i ∩ t j
. Then the function Set.liftCover t f _ _
,
defined as f i ⟨x, hx⟩
for hx : x ∈ t i
, is measurable.
Let t i
be a nonempty countable family of measurable sets in α
. Let g i : α → β
be a
family of measurable functions such that g i
agrees with g j
on t i ∩ t j
. Then there exists
a measurable function f : α → β
that agrees with each g i
on t i
.
We only need the assumption [Nonempty ι]
to prove [Nonempty (α → β)]
.
Given countably many disjoint measurable sets t n
and countably many measurable
functions g n
, one can construct a measurable function that coincides with g n
on t n
.
Equations
- MeasurableSpace.pi = ⨆ (a : δ), MeasurableSpace.comap (fun (b : (a : δ) → π a) => b a) (m a)
The function (f, x) ↦ update f a x : (Π a, π a) × π a → Π a, π a
is measurable.
The function update f a : π a → Π a, π a
is always measurable.
This doesn't require f
to be measurable.
This should not be confused with the statement that update f a x
is measurable.
Equations
- ⋯ = ⋯
Equations
- TProd.instMeasurableSpace π [] = PUnit.instMeasurableSpace
- TProd.instMeasurableSpace π (head :: is) = Prod.instMeasurableSpace
Equations
- Sum.instMeasurableSpace = MeasurableSpace.map Sum.inl m₁ ⊓ MeasurableSpace.map Sum.inr m₂
Alias of the reverse direction of measurableSet_inl_image
.
Alias of the reverse direction of measurableSet_inr_image
.
Equations
- Sigma.instMeasurableSpace = ⨅ (a : α), MeasurableSpace.map (Sigma.mk a) (m a)
Alias of the reverse direction of measurableSet_setOf
.
Alias of the reverse direction of measurable_mem
.
This instance is useful when talking about Bernoulli sequences of random variables or binomial random graphs.
Equations
- ⋯ = ⋯
The sigma-algebra generated by a single set s
is {∅, s, sᶜ, univ}
.
A map f : α → β
is called a measurable embedding if it is injective, measurable, and sends
measurable sets to measurable sets. The latter assumption can be replaced with “f
has measurable
inverse g : Set.range f → α
”, see MeasurableEmbedding.measurable_rangeSplitting
,
MeasurableEmbedding.of_measurable_inverse_range
, and
MeasurableEmbedding.of_measurable_inverse
.
One more interpretation: f
is a measurable embedding if it defines a measurable equivalence to its
range and the range is a measurable set. One implication is formalized as
MeasurableEmbedding.equivRange
; the other one follows from
MeasurableEquiv.measurableEmbedding
, MeasurableEmbedding.subtype_coe
, and
MeasurableEmbedding.comp
.
- injective : Function.Injective f
A measurable embedding is injective.
- measurable : Measurable f
A measurable embedding is a measurable function.
- measurableSet_image' : ∀ ⦃s : Set α⦄, MeasurableSet s → MeasurableSet (f '' s)
The image of a measurable set under a measurable embedding is a measurable set.
Instances For
Equivalences between measurable spaces. Main application is the simplification of measurability statements along measurable equivalences.
- toFun : α → β
- invFun : β → α
- left_inv : Function.LeftInverse self.invFun self.toFun
- right_inv : Function.RightInverse self.invFun self.toFun
- measurable_toFun : Measurable ⇑self.toEquiv
The forward function of a measurable equivalence is measurable.
- measurable_invFun : Measurable ⇑self.symm
The inverse function of a measurable equivalence is measurable.
Instances For
Equivalences between measurable spaces. Main application is the simplification of measurability statements along measurable equivalences.
Equations
- «term_≃ᵐ_» = Lean.ParserDescr.trailingNode `term_≃ᵐ_ 25 25 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ≃ᵐ ") (Lean.ParserDescr.cat `term 26))
Instances For
Any measurable space is equivalent to itself.
Equations
- MeasurableEquiv.refl α = { toEquiv := Equiv.refl α, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
Equations
- MeasurableEquiv.instInhabited = { default := MeasurableEquiv.refl α }
The composition of equivalences between measurable spaces.
Equations
- ab.trans bc = { toEquiv := ab.trans bc.toEquiv, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
The inverse of an equivalence between measurable spaces.
Equations
- ab.symm = { toEquiv := ab.symm, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
See Note [custom simps projection]. We need to specify this projection explicitly in this case, because it is a composition of multiple projections.
Equations
Instances For
See Note [custom simps projection]
Equations
- MeasurableEquiv.Simps.symm_apply h = ⇑h.symm
Instances For
A measurable equivalence is a measurable embedding.
Equal measurable spaces are equivalent.
Equations
- MeasurableEquiv.cast h hi = { toEquiv := Equiv.cast h, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
Any two types with unique elements are measurably equivalent.
Equations
- MeasurableEquiv.ofUniqueOfUnique α β = { toEquiv := Equiv.equivOfUnique α β, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
Products of equivalent measurable spaces are equivalent.
Equations
- MeasurableEquiv.prodCongr ab cd = { toEquiv := Equiv.prodCongr ab.toEquiv cd.toEquiv, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
Products of measurable spaces are symmetric.
Equations
- MeasurableEquiv.prodComm = { toEquiv := Equiv.prodComm α β, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
Products of measurable spaces are associative.
Equations
- MeasurableEquiv.prodAssoc = { toEquiv := Equiv.prodAssoc α β γ, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
Sums of measurable spaces are symmetric.
Equations
- MeasurableEquiv.sumCongr ab cd = { toEquiv := Equiv.sumCongr ab.toEquiv cd.toEquiv, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
s ×ˢ t ≃ (s × t)
as measurable spaces.
Equations
- MeasurableEquiv.Set.prod s t = { toEquiv := Equiv.Set.prod s t, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
univ α ≃ α
as measurable spaces.
Equations
- MeasurableEquiv.Set.univ α = { toEquiv := Equiv.Set.univ α, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
{a} ≃ Unit
as measurable spaces.
Equations
- MeasurableEquiv.Set.singleton a = { toEquiv := Equiv.Set.singleton a, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
α
is equivalent to its image in α ⊕ β
as measurable spaces.
Equations
- MeasurableEquiv.Set.rangeInl = { toEquiv := Equiv.Set.rangeInl α β, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
β
is equivalent to its image in α ⊕ β
as measurable spaces.
Equations
- MeasurableEquiv.Set.rangeInr = { toEquiv := Equiv.Set.rangeInr α β, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
Products distribute over sums (on the right) as measurable spaces.
Equations
- MeasurableEquiv.sumProdDistrib α β γ = { toEquiv := Equiv.sumProdDistrib α β γ, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
Products distribute over sums (on the left) as measurable spaces.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Products distribute over sums as measurable spaces.
Equations
- MeasurableEquiv.sumProdSum α β γ δ = (MeasurableEquiv.sumProdDistrib α β (γ ⊕ δ)).trans (MeasurableEquiv.sumCongr (MeasurableEquiv.prodSumDistrib α γ δ) (MeasurableEquiv.prodSumDistrib β γ δ))
Instances For
A family of measurable equivalences Π a, β₁ a ≃ᵐ β₂ a
generates a measurable equivalence
between Π a, β₁ a
and Π a, β₂ a
.
Equations
- MeasurableEquiv.piCongrRight e = { toEquiv := Equiv.piCongrRight fun (a : δ') => (e a).toEquiv, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
Moving a dependent type along an equivalence of coordinates, as a measurable equivalence.
Equations
- MeasurableEquiv.piCongrLeft π f = let __src := Equiv.piCongrLeft π f; { toEquiv := __src, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
Pi-types are measurably equivalent to iterated products.
Equations
- MeasurableEquiv.piMeasurableEquivTProd hnd h = { toEquiv := List.TProd.piEquivTProd hnd h, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
The measurable equivalence (∀ i, π i) ≃ᵐ π ⋆
when the domain of π
only contains ⋆
Equations
- MeasurableEquiv.piUnique π = { toEquiv := Equiv.piUnique π, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
If α
has a unique term, then the type of function α → β
is measurably equivalent to β
.
Equations
- MeasurableEquiv.funUnique α β = MeasurableEquiv.piUnique fun (a : α) => β
Instances For
The space Π i : Fin 2, α i
is measurably equivalent to α 0 × α 1
.
Equations
- MeasurableEquiv.piFinTwo α = { toEquiv := piFinTwoEquiv α, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
The space Fin 2 → α
is measurably equivalent to α × α
.
Equations
- MeasurableEquiv.finTwoArrow = MeasurableEquiv.piFinTwo fun (x : Fin 2) => α
Instances For
Measurable equivalence between Π j : Fin (n + 1), α j
and
α i × Π j : Fin n, α (Fin.succAbove i j)
.
Equations
- MeasurableEquiv.piFinSuccAbove α i = { toEquiv := Equiv.piFinSuccAbove α i, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
Measurable equivalence between (dependent) functions on a type and pairs of functions on
{i // p i}
and {i // ¬p i}
. See also Equiv.piEquivPiSubtypeProd
.
Equations
- MeasurableEquiv.piEquivPiSubtypeProd π p = { toEquiv := Equiv.piEquivPiSubtypeProd p π, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
The measurable equivalence between the pi type over a sum type and a product of pi-types.
This is similar to MeasurableEquiv.piEquivPiSubtypeProd
.
Equations
- MeasurableEquiv.sumPiEquivProdPi α = let __src := Equiv.sumPiEquivProdPi α; { toEquiv := __src, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
The measurable equivalence for (dependent) functions on an Option type
(∀ i : Option δ, α i) ≃ᵐ (∀ (i : δ), α i) × α none
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The measurable equivalence (∀ i : s, π i) × (∀ i : t, π i) ≃ᵐ (∀ i : s ∪ t, π i)
for disjoint finsets s
and t
. Equiv.piFinsetUnion
as a measurable equivalence.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If s
is a measurable set in a measurable space, that space is equivalent
to the sum of s
and sᶜ
.
Equations
- MeasurableEquiv.sumCompl hs = { toEquiv := Equiv.sumCompl fun (x : α) => x ∈ s, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
Convert a measurable involutive function f
to a measurable permutation with
toFun = invFun = f
. See also Function.Involutive.toPerm
.
Equations
- MeasurableEquiv.ofInvolutive f hf hf' = { toEquiv := Function.Involutive.toPerm f hf, measurable_toFun := hf', measurable_invFun := hf' }
Instances For
A set is equivalent to its image under a function f
as measurable spaces,
if f
is a measurable embedding
Equations
- MeasurableEmbedding.equivImage s hf = { toEquiv := Equiv.Set.image f s ⋯, measurable_toFun := ⋯, measurable_invFun := ⋯ }
Instances For
The domain of f
is equivalent to its range as measurable spaces,
if f
is a measurable embedding
Equations
- MeasurableEmbedding.equivRange hf = (MeasurableEquiv.Set.univ α).symm.trans ((MeasurableEmbedding.equivImage Set.univ hf).trans (MeasurableEquiv.cast ⋯ ⋯))
Instances For
The measurable Schröder-Bernstein Theorem: given measurable embeddings
α → β
and β → α
, we can find a measurable equivalence α ≃ᵐ β
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A filter f
is measurably generates if each s ∈ f
includes a measurable t ∈ f
.
- exists_measurable_subset : ∀ ⦃s : Set α⦄, s ∈ f → ∃ t ∈ f, MeasurableSet t ∧ t ⊆ s
Instances
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Alias of the reverse direction of Filter.principal_isMeasurablyGenerated_iff
.
Equations
- ⋯ = ⋯
The set of points for which a sequence of measurable functions converges to a given value is measurable.
We say that a collection of sets is countably spanning if a countable subset spans the
whole type. This is a useful condition in various parts of measure theory. For example, it is
a needed condition to show that the product of two collections generate the product sigma algebra,
see generateFrom_prod_eq
.
Equations
Instances For
Typeclasses on Subtype MeasurableSet
#
Equations
- MeasurableSet.Subtype.instSingleton = { singleton := fun (a : α) => { val := {a}, property := ⋯ } }
Equations
- ⋯ = ⋯
Equations
- MeasurableSet.Subtype.instTop = { top := { val := Set.univ, property := ⋯ } }
Equations
- MeasurableSet.Subtype.instBooleanAlgebra = Function.Injective.booleanAlgebra (fun (a : Subtype MeasurableSet) => ↑a) ⋯ ⋯ ⋯ ⋯ ⋯ ⋯ ⋯