Measure spaces #
The definition of a measure and a measure space are in MeasureTheory.MeasureSpaceDef
, with
only a few basic properties. This file provides many more properties of these objects.
This separation allows the measurability tactic to import only the file MeasureSpaceDef
, and to
be available in MeasureSpace
(through MeasurableSpace
).
Given a measurable space α
, a measure on α
is a function that sends measurable sets to the
extended nonnegative reals that satisfies the following conditions:
μ ∅ = 0
;μ
is countably additive. This means that the measure of a countable union of pairwise disjoint sets is equal to the measure of the individual sets.
Every measure can be canonically extended to an outer measure, so that it assigns values to all subsets, not just the measurable subsets. On the other hand, a measure that is countably additive on measurable sets can be restricted to measurable sets to obtain a measure. In this file a measure is defined to be an outer measure that is countably additive on measurable sets, with the additional assumption that the outer measure is the canonical extension of the restricted measure.
Measures on α
form a complete lattice, and are closed under scalar multiplication with ℝ≥0∞
.
We introduce the following typeclasses for measures:
IsProbabilityMeasure μ
:μ univ = 1
;IsFiniteMeasure μ
:μ univ < ∞
;SigmaFinite μ
: there exists a countable collection of sets that coveruniv
whereμ
is finite;IsLocallyFiniteMeasure μ
:∀ x, ∃ s ∈ 𝓝 x, μ s < ∞
;NoAtoms μ
:∀ x, μ {x} = 0
; possibly should be redefined as∀ s, 0 < μ s → ∃ t ⊆ s, 0 < μ t ∧ μ t < μ s
.
Given a measure, the null sets are the sets where μ s = 0
, where μ
denotes the corresponding
outer measure (so s
might not be measurable). We can then define the completion of μ
as the
measure on the least σ
-algebra that also contains all null sets, by defining the measure to be 0
on the null sets.
Main statements #
completion
is the completion of a measure to all null measurable sets.Measure.ofMeasurable
andOuterMeasure.toMeasure
are two important ways to define a measure.
Implementation notes #
Given μ : Measure α
, μ s
is the value of the outer measure applied to s
.
This conveniently allows us to apply the measure to sets without proving that they are measurable.
We get countable subadditivity for all sets, but only countable additivity for measurable sets.
You often don't want to define a measure via its constructor. Two ways that are sometimes more convenient:
Measure.ofMeasurable
is a way to define a measure by only giving its value on measurable sets and proving the properties (1) and (2) mentioned above.OuterMeasure.toMeasure
is a way of obtaining a measure from an outer measure by showing that all measurable sets in the measurable space are Carathéodory measurable.
To prove that two measures are equal, there are multiple options:
ext
: two measures are equal if they are equal on all measurable sets.ext_of_generateFrom_of_iUnion
: two measures are equal if they are equal on a π-system generating the measurable sets, if the π-system contains a spanning increasing sequence of sets where the measures take finite value (in particular the measures are σ-finite). This is a special case of the more generalext_of_generateFrom_of_cover
ext_of_generate_finite
: two finite measures are equal if they are equal on a π-system generating the measurable sets. This is a special case ofext_of_generateFrom_of_iUnion
usingC ∪ {univ}
, but is easier to work with.
A MeasureSpace
is a class that is a measurable space with a canonical measure.
The measure is denoted volume
.
References #
- https://en.wikipedia.org/wiki/Measure_(mathematics)
- https://en.wikipedia.org/wiki/Complete_measure
- https://en.wikipedia.org/wiki/Almost_everywhere
Tags #
measure, almost everywhere, measure space, completion, null set, null measurable set
See also MeasureTheory.ae_restrict_uIoc_iff
.
The measure of an a.e. disjoint union (even uncountable) of null-measurable sets is at least the sum of the measures of the sets.
The measure of a disjoint union (even uncountable) of measurable sets is at least the sum of the measures of the sets.
If s
is a countable set, then the measure of its preimage can be found as the sum of measures
of the fibers f ⁻¹' {y}
.
If s
is a Finset
, then the measure of its preimage can be found as the sum of measures
of the fibers f ⁻¹' {y}
.
If s ⊆ t
, μ t ≤ μ s
, μ t ≠ ∞
, and s
is measurable, then s =ᵐ[μ] t
.
Pigeonhole principle for measure spaces: if ∑' i, μ (s i) > μ univ
, then
one of the intersections s i ∩ s j
is not empty.
Pigeonhole principle for measure spaces: if s
is a Finset
and
∑ i in s, μ (t i) > μ univ
, then one of the intersections t i ∩ t j
is not empty.
If two sets s
and t
are included in a set u
, and μ s + μ t > μ u
,
then s
intersects t
. Version assuming that t
is measurable.
If two sets s
and t
are included in a set u
, and μ s + μ t > μ u
,
then s
intersects t
. Version assuming that s
is measurable.
Continuity from below: the measure of the union of a directed sequence of (not necessarily -measurable) sets is the supremum of the measures.
Continuity from above: the measure of the intersection of a decreasing sequence of measurable sets is the infimum of the measures.
Continuity from below: the measure of the union of an increasing sequence of measurable sets is the limit of the measures.
Continuity from above: the measure of the intersection of a decreasing sequence of measurable sets is the limit of the measures.
The measure of the intersection of a decreasing sequence of measurable sets indexed by a linear order with first countable topology is the limit of the measures.
One direction of the Borel-Cantelli lemma: if (sᵢ) is a sequence of sets such
that ∑ μ sᵢ
is finite, then the limit superior of the sᵢ
is a null set.
Obtain a measure by giving an outer measure where all sets in the σ-algebra are Carathéodory measurable.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If u
is a superset of t
with the same (finite) measure (both sets possibly non-measurable),
then for any measurable set s
one also has μ (t ∩ s) = μ (u ∩ s)
.
The measurable superset toMeasurable μ t
of t
(which has the same measure as t
)
satisfies, for any measurable set s
, the equality μ (toMeasurable μ t ∩ s) = μ (u ∩ s)
.
Here, we require that the measure of t
is finite. The conclusion holds without this assumption
when the measure is sigma_finite, see measure_toMeasurable_inter_of_sigmaFinite
.
The ℝ≥0∞
-module of measures #
Equations
- One or more equations did not get rendered due to their size.
Equations
- MeasureTheory.Measure.instInhabited = { default := 0 }
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Coercion to function as an additive monoid homomorphism.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
The complete lattice of measures #
Measures are partially ordered.
The definition of less equal here is equivalent to the definition without the
measurable set condition, and this is shown by Measure.le_iff'
. It is defined
this way since, to prove μ ≤ ν
, we may simply intros s hs
instead of rewriting followed
by intros s hs
.
Equations
- MeasureTheory.Measure.instPartialOrder = PartialOrder.mk (_ : ∀ (m₁ m₂ : MeasureTheory.Measure α), m₁ ≤ m₂ → m₂ ≤ m₁ → m₁ = m₂)
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Pushforward and pullback #
Lift a linear map between OuterMeasure
spaces such that for each measure μ
every measurable
set is caratheodory-measurable w.r.t. f μ
to a linear map between Measure
spaces.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The pushforward of a measure as a linear map. It is defined to be 0
if f
is not
a measurable function.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The pushforward of a measure. It is defined to be 0
if f
is not an almost everywhere
measurable function.
Instances For
We can evaluate the pushforward on measurable sets. For non-measurable sets, see
MeasureTheory.Measure.le_map_apply
and MeasurableEquiv.map_apply
.
Even if s
is not measurable, we can bound map f μ s
from below.
See also MeasurableEquiv.map_apply
.
Even if s
is not measurable, map f μ s = 0
implies that μ (f ⁻¹' s) = 0
.
Pullback of a Measure
as a linear map. If f
sends each measurable set to a measurable
set, then for each measurable set s
we have comapₗ f μ s = μ (f '' s)
.
If the linearity is not needed, please use comap
instead, which works for a larger class of
functions.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Pullback of a Measure
. If f
sends each measurable set to a null-measurable set,
then for each measurable set s
we have comap f μ s = μ (f '' s)
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Subtype of a measure space #
Equations
- MeasureTheory.Measure.Subtype.measureSpace = let src := Subtype.instMeasurableSpace; MeasureTheory.MeasureSpace.mk (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume)
Restricting a measure #
Restrict a measure μ
to a set s
as an ℝ≥0∞
-linear map.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Restrict a measure μ
to a set s
.
Equations
Instances For
This lemma shows that restrict
and toOuterMeasure
commute. Note that the LHS has a
restrict on measures and the RHS has a restrict on outer measures.
If t
is a measurable set, then the measure of t
with respect to the restriction of
the measure to s
equals the outer measure of t ∩ s
. An alternate version requiring that s
be measurable instead of t
exists as Measure.restrict_apply'
.
Restriction of a measure to a subset is monotone both in set and in measure.
Restriction of a measure to a subset is monotone both in set and in measure.
If s
is a measurable set, then the outer measure of t
with respect to the restriction of
the measure to s
equals the outer measure of t ∩ s
. This is an alternate version of
Measure.restrict_apply
, requiring that s
is measurable instead of t
.
If μ s ≠ 0
, then μ.restrict s ≠ 0
, in terms of NeZero
instances.
The restriction of the pushforward measure is the pushforward of the restriction. For a version
assuming only AEMeasurable
, see restrict_map_of_aemeasurable
.
If two measures agree on all measurable subsets of s
and t
, then they agree on all
measurable subsets of s ∪ t
.
This lemma shows that Inf
and restrict
commute for measures.
Extensionality results #
Two measures are equal if they have equal restrictions on a spanning collection of sets
(formulated using Union
).
Alias of the reverse direction of MeasureTheory.Measure.ext_iff_of_iUnion_eq_univ
.
Two measures are equal if they have equal restrictions on a spanning collection of sets
(formulated using Union
).
Two measures are equal if they have equal restrictions on a spanning collection of sets
(formulated using biUnion
).
Alias of the reverse direction of MeasureTheory.Measure.ext_iff_of_biUnion_eq_univ
.
Two measures are equal if they have equal restrictions on a spanning collection of sets
(formulated using biUnion
).
Two measures are equal if they have equal restrictions on a spanning collection of sets
(formulated using sUnion
).
Alias of the reverse direction of MeasureTheory.Measure.ext_iff_of_sUnion_eq_univ
.
Two measures are equal if they have equal restrictions on a spanning collection of sets
(formulated using sUnion
).
Two measures are equal if they are equal on the π-system generating the σ-algebra,
and they are both finite on an increasing spanning sequence of sets in the π-system.
This lemma is formulated using sUnion
.
Two measures are equal if they are equal on the π-system generating the σ-algebra,
and they are both finite on an increasing spanning sequence of sets in the π-system.
This lemma is formulated using iUnion
.
FiniteSpanningSetsIn.ext
is a reformulation of this lemma.
Sum of an indexed family of measures.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Absolute continuity #
We say that μ
is absolutely continuous with respect to ν
, or that μ
is dominated by ν
,
if ν(A) = 0
implies that μ(A) = 0
.
Equations
- MeasureTheory.Measure.AbsolutelyContinuous μ ν = ∀ ⦃s : Set α⦄, ↑↑ν s = 0 → ↑↑μ s = 0
Instances For
We say that μ
is absolutely continuous with respect to ν
, or that μ
is dominated by ν
,
if ν(A) = 0
implies that μ(A) = 0
.
Equations
- MeasureTheory.«term_≪_» = Lean.ParserDescr.trailingNode `MeasureTheory.term_≪_ 50 50 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ≪ ") (Lean.ParserDescr.cat `term 51))
Instances For
Alias of the forward direction of MeasureTheory.Measure.ae_le_iff_absolutelyContinuous
.
Alias of the reverse direction of MeasureTheory.Measure.ae_le_iff_absolutelyContinuous
.
Alias of the reverse direction of MeasureTheory.Measure.ae_le_iff_absolutelyContinuous
.
Alias of the reverse direction of MeasureTheory.Measure.ae_le_iff_absolutelyContinuous
.
Quasi measure preserving maps (a.k.a. non-singular maps) #
- measurable : Measurable f
- absolutelyContinuous : MeasureTheory.Measure.AbsolutelyContinuous (MeasureTheory.Measure.map f μa) μb
A map f : α → β
is said to be quasi measure preserving (a.k.a. non-singular) w.r.t. measures
μa
and μb
if it is measurable and μb s = 0
implies μa (f ⁻¹' s) = 0
.
Instances For
By replacing a measurable set that is almost invariant with the limsup
of its preimages, we
obtain a measurable set that is almost equal and strictly invariant.
(The liminf
would work just as well.)
The filter of sets s
such that sᶜ
has finite measure.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The preimage of a null measurable set under a (quasi) measure preserving map is a null measurable set.
See also MeasureTheory.ae_uIoc_iff
.
If two measurable sets are ae_eq then any proposition that is almost everywhere true on one is almost everywhere true on the other
If two measurable sets are ae_eq then any proposition that is almost everywhere true on one is almost everywhere true on the other
A version of the Borel-Cantelli lemma: if pᵢ
is a sequence of predicates such that
∑ μ {x | pᵢ x}
is finite, then the measure of x
such that pᵢ x
holds frequently as i → ∞
(or
equivalently, pᵢ x
holds for infinitely many i
) is equal to zero.
A version of the Borel-Cantelli lemma: if sᵢ
is a sequence of sets such that
∑ μ sᵢ
exists, then for almost all x
, x
does not belong to almost all sᵢ
.
A measure μ
is called finite if μ univ < ∞
.
Instances
The measure of the whole space with respect to a finite measure, considered as ℝ≥0
.
Equations
- MeasureTheory.measureUnivNNReal μ = ENNReal.toNNReal (↑↑μ Set.univ)
Instances For
le_of_add_le_add_left
is normally applicable to OrderedCancelAddCommMonoid
,
but it holds for measures with the additional assumption that μ is finite.
- measure_univ : ↑↑μ Set.univ = 1
A measure μ
is called a probability measure if μ univ = 1
.
Instances
Note that this is not quite as useful as it looks because the measure takes values in ℝ≥0∞
.
Thus the subtraction appearing is the truncated subtraction of ℝ≥0∞
, rather than the
better-behaved subtraction of ℝ
.
- measure_singleton : ∀ (x : α), ↑↑μ {x} = 0
Measure μ
has no atoms if the measure of each singleton is zero.
NB: Wikipedia assumes that for any measurable set s
with positive μ
-measure,
there exists a measurable t ⊆ s
such that 0 < μ t < μ s
. While this implies μ {x} = 0
,
the converse is not true.
Instances
A measure is called finite at filter f
if it is finite at some set s ∈ f
.
Equivalently, it is eventually finite at s
in f.small_sets
.
Instances For
- set_mem : ∀ (i : ℕ), MeasureTheory.Measure.FiniteSpanningSetsIn.set s i ∈ C
- finite : ∀ (i : ℕ), ↑↑μ (MeasureTheory.Measure.FiniteSpanningSetsIn.set s i) < ⊤
- spanning : ⋃ (i : ℕ), MeasureTheory.Measure.FiniteSpanningSetsIn.set s i = Set.univ
μ
has finite spanning sets in C
if there is a countable sequence of sets in C
that have
finite measures. This structure is a type, which is useful if we want to record extra properties
about the sets, such as that they are monotone.
SigmaFinite
is defined in terms of this: μ
is σ-finite if there exists a sequence of
finite spanning sets in the collection of all measurable sets.
Instances For
- out' : Nonempty (MeasureTheory.Measure.FiniteSpanningSetsIn μ Set.univ)
A measure μ
is called σ-finite if there is a countable collection of sets
{ A i | i ∈ ℕ }
such that μ (A i) < ∞
and ⋃ i, A i = s
.
Instances
If μ
is σ-finite it has finite spanning sets in the collection of all measurable sets.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A noncomputable way to get a monotone collection of sets that span univ
and have finite
measure using Classical.choose
. This definition satisfies monotonicity in addition to all other
properties in SigmaFinite
.
Equations
Instances For
spanningSetsIndex μ x
is the least n : ℕ
such that x ∈ spanningSets μ n
.
Equations
- MeasureTheory.spanningSetsIndex μ x = Nat.find (_ : ∃ i, x ∈ MeasureTheory.spanningSets μ i)
Instances For
In a σ-finite space, any measurable set of measure > r
contains a measurable subset of
finite measure > r
.
A set in a σ-finite space has zero measure if and only if its intersection with all members of the countable family of finite measure spanning sets has zero measure.
A set in a σ-finite space has positive measure if and only if its intersection with some member of the countable family of finite measure spanning sets has positive measure.
If the union of a.e.-disjoint null-measurable sets has finite measure, then there are only finitely many members of the union whose measure exceeds any given positive number.
If the union of disjoint measurable sets has finite measure, then there are only finitely many members of the union whose measure exceeds any given positive number.
If all elements of an infinite set have measure uniformly separated from zero, then the set has infinite measure.
If the union of a.e.-disjoint null-measurable sets has finite measure, then there are only countably many members of the union whose measure is positive.
If the union of disjoint measurable sets has finite measure, then there are only countably many members of the union whose measure is positive.
In a σ-finite space, among disjoint null-measurable sets, only countably many can have positive measure.
In a σ-finite space, among disjoint measurable sets, only countably many can have positive measure.
If a set t
is covered by a countable family of finite measure sets, then its measurable
superset toMeasurable μ t
(which has the same measure as t
) satisfies,
for any measurable set s
, the equality μ (toMeasurable μ t ∩ s) = μ (t ∩ s)
.
The measurable superset toMeasurable μ t
of t
(which has the same measure as t
)
satisfies, for any measurable set s
, the equality μ (toMeasurable μ t ∩ s) = μ (t ∩ s)
.
This only holds when μ
is σ-finite. For a version without this assumption (but requiring
that t
has finite measure), see measure_toMeasurable_inter
.
If μ
has finite spanning sets in C
and C ∩ {s | μ s < ∞} ⊆ D
then μ
has finite spanning
sets in D
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
If μ
has finite spanning sets in C
and C ⊆ D
then μ
has finite spanning sets in D
.
Equations
- MeasureTheory.Measure.FiniteSpanningSetsIn.mono h hC = MeasureTheory.Measure.FiniteSpanningSetsIn.mono' h (_ : ∀ (_s : Set α), _s ∈ C ∩ {s | ↑↑μ s < ⊤} → _s ∈ D)
Instances For
If μ
has finite spanning sets in the collection of measurable sets C
, then μ
is σ-finite.
An extensionality for measures. It is ext_of_generateFrom_of_iUnion
formulated in terms of
FiniteSpanningSetsIn
.
Given measures μ
, ν
where ν ≤ μ
, FiniteSpanningSetsIn.ofLe
provides the induced
FiniteSpanningSet
with respect to ν
from a FiniteSpanningSet
with respect to μ
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Every finite measure is σ-finite.
Similar to ae_of_forall_measure_lt_top_ae_restrict
, but where you additionally get the
hypothesis that another σ-finite measure has finite values on s
.
To prove something for almost all x
w.r.t. a σ-finite measure, it is sufficient to show that
this holds almost everywhere in sets where the measure has finite value.
- finiteAtNhds : ∀ (x : α), MeasureTheory.Measure.FiniteAtFilter μ (nhds x)
A measure is called locally finite if it is finite in some neighborhood of each point.
Instances
A measure μ
is finite on compacts if any compact set K
satisfies μ K < ∞
.
Instances
A compact subset has finite measure for a measure which is finite on compacts.
A bounded subset has finite measure for a measure which is finite on compact sets, in a proper space.
Note this cannot be an instance because it would form a typeclass loop with
isFiniteMeasureOnCompacts_of_isLocallyFiniteMeasure
.
A measure which is finite on compact sets in a locally compact space is locally finite. Not registered as an instance to avoid a loop with the other direction.
If a set has zero measure in a neighborhood of each of its points, then it has zero measure in a second-countable space.
If two finite measures give the same mass to the whole space and coincide on a π-system made of measurable sets, then they coincide on all sets in the σ-algebra generated by the π-system.
Two finite measures are equal if they are equal on the π-system generating the σ-algebra
(and univ
).
Given S : μ.FiniteSpanningSetsIn {s | MeasurableSet s}
,
FiniteSpanningSetsIn.disjointed
provides a FiniteSpanningSetsIn {s | MeasurableSet s}
such that its underlying sets are pairwise disjoint.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Alias of the forward direction of MeasureTheory.Measure.FiniteAtFilter.inf_ae_iff
.
Equations
- SetCoe.measureSpace s = MeasureTheory.MeasureSpace.mk (MeasureTheory.Measure.comap Subtype.val MeasureTheory.volume)
Interactions of measurable equivalences and measures
If we map a measure along a measurable equivalence, we can compute the measure on all sets (not just the measurable ones).
If s
is a compact set and μ
is finite at 𝓝 x
for every x ∈ s
, then s
admits an open
superset of finite measure.
If s
is a compact set and μ
is a locally finite measure, then s
admits an open superset of
finite measure.
Compact covering of a σ
-compact topological space as
MeasureTheory.Measure.FiniteSpanningSetsIn
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A locally finite measure on a σ
-compact topological space admits a finite spanning sequence
of open sets.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A locally finite measure on a second countable topological space admits a finite spanning sequence of open sets.