Module mathcomp.analysis.measure_theory.measure_negligible
From HB Require Import structures.From mathcomp Require Import boot order algebra.
#[warning="-warn-library-file-internal-analysis"]
From mathcomp Require Import unstable.
From mathcomp Require Import boolp classical_sets functions cardinality reals.
From mathcomp Require Import interval_inference ereal topology normedtype.
From mathcomp Require Import sequences numfun.
From mathcomp Require Import measurable_structure measure_function.
# Negligibility
NB: See CONTRIBUTING.md for an introduction to HB concepts and commands.
```
mu.-negligible A == A is mu negligible
measure_is_complete mu == the measure mu is complete
{ae mu, P} == P holds almost everywhere for the measure mu,
declared as an instance of the type of
filters
P must be of the form forall x, Q x.
Prefer this notation when P is an existing
statement (i.e., a definition) that needs to
be relativised.
The notation used the definition
`almost_everywhere`.
\forall x \ae mu, P x == equivalent to {ae mu, forall x, P x}
Prefer this notation when the statement
forall x, P x does not stand alone.
f = g %[ae mu in D ] == f is equal to g almost everywhere in D
f = g %[ae mu] == f is equal to g almost everywhere
mu-.null_set == (measure-theoretic) null sets
m1 `<< m2 == m1 is absolutely continuous w.r.t. m2 or
m2 dominates m1
content_dominates mu nu == forall A, measurable A ->
mu A = 0 -> nu A = 0
```
Reserved Notation "mu .-negligible" (format "mu .-negligible").
Reserved Notation "{ 'ae' m , P }" (format "{ 'ae' m , P }").
Reserved Notation "\forall x \ae mu , P"
(at level 200, x name, P at level 200, format "\forall x \ae mu , P").
Reserved Notation "f = g %[ae mu 'in' D ]"
(at level 70, g at next level, format "f = g '%[ae' mu 'in' D ]").
Reserved Notation "f = g %[ae mu ]"
(at level 70, g at next level, format "f = g '%[ae' mu ]").
Reserved Notation "m .-null_set" (at level 2, format "m .-null_set").
Reserved Notation "m1 `<< m2" (at level 51).
Unset SsrOldRewriteGoalsOrder.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import ProperNotations.
Import Order.TTheory GRing.Theory.
Local Open Scope classical_set_scope.
Local Open Scope ring_scope.
Section negligible.
Context ( : semiRingOfSetsType d) ( : realFieldType).
Definition
negligible
Source code
( : set T -> \bar R) :=Source code
exists , [/\ measurable A, mu A = 0 & N `<=` A].
Local Notation
"mu .-negligible"
Source code
:= (negligible mu).Source code
Variable : {content set T -> \bar R}.
Lemma
negligibleP
Source code
: measurable A -> mu.-negligible A <-> mu A = 0.Source code
Proof.
move=> mA; split => [[B [mB mB0 AB]]|mA0]; last by exists A; split.
by apply/eqP; rewrite -measure_le0 -mB0 le_measure ?inE.
Qed.
by apply/eqP; rewrite -measure_le0 -mB0 le_measure ?inE.
Qed.
Lemma
negligible_set0
Source code
: mu.-negligible set0.Source code
Proof.
exact/negligibleP. Qed.
Lemma
measure_negligible
Source code
( : set T) :Source code
measurable A -> mu.-negligible A -> mu A = 0%E.
Proof.
Lemma
negligibleS
Source code
: B `<=` A -> mu.-negligible A -> mu.-negligible B.Source code
Proof.
Lemma
negligibleI
Source code
:Source code
mu.-negligible A -> mu.-negligible B -> mu.-negligible (A `&` B).
Proof.
move=> [N [mN N0 AN]] [M [mM M0 BM]]; exists (N `&` M); split => //.
- exact: measurableI.
- by apply/eqP; rewrite -measure_le0 -N0 le_measure ?inE//; exact: measurableI.
- exact: setISS.
Qed.
- exact: measurableI.
- by apply/eqP; rewrite -measure_le0 -N0 le_measure ?inE//; exact: measurableI.
- exact: setISS.
Qed.
End negligible.
Notation
"mu .-negligible"
Source code
:= (negligible mu) : type_scope.Source code
Definition
measure_is_complete
Source code
( : semiRingOfSetsType d) ( : realFieldType)Source code
( : set T -> \bar R) :=
mu.-negligible `<=` measurable.
Section negligible_ringOfSetsType.
Context ( : ringOfSetsType d) ( : realFieldType).
Variable : {content set T -> \bar R}.
Lemma
negligibleU
Source code
:Source code
mu.-negligible A -> mu.-negligible B -> mu.-negligible (A `|` B).
Proof.
move=> [N [mN N0 AN]] [M [mM M0 BM]]; exists (N `|` M); split => //.
- exact: measurableU.
- apply/eqP; rewrite -measure_le0 -N0 -[leRHS]adde0 -M0 -bigsetU_bigcup2.
apply: le_trans.
+ apply: (@content_subadditive _ _ _ _ _ (bigcup2 N M) 2%N) => //.
* by move=> [|[|[|]]].
* apply: bigsetU_measurable => // i _; rewrite /bigcup2.
by case: ifPn => // i0; case: ifPn.
+ by rewrite big_ord_recr/= big_ord_recr/= big_ord0 add0e.
- exact: setUSS.
Qed.
- exact: measurableU.
- apply/eqP; rewrite -measure_le0 -N0 -[leRHS]adde0 -M0 -bigsetU_bigcup2.
apply: le_trans.
+ apply: (@content_subadditive _ _ _ _ _ (bigcup2 N M) 2%N) => //.
* by move=> [|[|[|]]].
* apply: bigsetU_measurable => // i _; rewrite /bigcup2.
by case: ifPn => // i0; case: ifPn.
+ by rewrite big_ord_recr/= big_ord_recr/= big_ord0 add0e.
- exact: setUSS.
Qed.
Lemma
negligible_bigsetU
Source code
( : (set T)^nat) ( : pred nat) :Source code
(forall , P k -> mu.-negligible (F k)) ->
mu.-negligible (\big[setU/set0]_( <- s | P k) F k).
Proof.
End negligible_ringOfSetsType.
Lemma
negligible_bigcup
Source code
( : sigmaRingType d) ( : realFieldType)Source code
( : {measure set T -> \bar R}) ( : (set T)^nat) :
(forall , mu.-negligible (F k)) -> mu.-negligible (\bigcup_ F k).
Proof.
move=> mF; exists (\bigcup_ sval (cid (mF k))); split.
- by apply: bigcupT_measurable => // k; have [] := svalP (cid (mF k)).
- rewrite seqDU_bigcup_eq measure_bigcup//.
move=> k _; apply: measurableD; first by case: cid => //= A [].
by apply: bigsetU_measurable => i _; case: cid => //= A [].
rewrite eseries0// => k _ _.
have [mFk mFk0 ?] := svalP (cid (mF k)).
rewrite measureD//=.
+ by apply: bigsetU_measurable => i _; case: cid => // A [].
+ by rewrite mFk0.
rewrite mFk0 sub0e eqe_oppLRP oppe0; apply/eqP; rewrite -measure_le0.
rewrite -[leRHS]mFk0 le_measure//= ?inE//; apply: measurableI => //.
by apply: bigsetU_measurable => i _; case: cid => // A [].
- by apply: subset_bigcup => k _; rewrite /sval/=; by case: cid => //= A [].
Qed.
- by apply: bigcupT_measurable => // k; have [] := svalP (cid (mF k)).
- rewrite seqDU_bigcup_eq measure_bigcup//.
move=> k _; apply: measurableD; first by case: cid => //= A [].
by apply: bigsetU_measurable => i _; case: cid => //= A [].
rewrite eseries0// => k _ _.
have [mFk mFk0 ?] := svalP (cid (mF k)).
rewrite measureD//=.
+ by apply: bigsetU_measurable => i _; case: cid => // A [].
+ by rewrite mFk0.
rewrite mFk0 sub0e eqe_oppLRP oppe0; apply/eqP; rewrite -measure_le0.
rewrite -[leRHS]mFk0 le_measure//= ?inE//; apply: measurableI => //.
by apply: bigsetU_measurable => i _; case: cid => // A [].
- by apply: subset_bigcup => k _; rewrite /sval/=; by case: cid => //= A [].
Qed.
Section ae.
Definition
almost_everywhere
Source code
( : semiRingOfSetsType d) ( : realFieldType)Source code
( : set T -> \bar R) : set_system T :=
fun => mu.-negligible (~` [set | P x]).
Let
almost_everywhereT
Source code
( : semiRingOfSetsType d) ( : realFieldType)Source code
( : {content set T -> \bar R}) : almost_everywhere mu setT.
Proof.
Let
almost_everywhereS
Source code
( : semiRingOfSetsType d) ( : realFieldType)Source code
( : {measure set T -> \bar R}) : A `<=` B ->
almost_everywhere mu A -> almost_everywhere mu B.
Proof.
Let
almost_everywhereI
Source code
( : ringOfSetsType d) ( : realFieldType)Source code
( : {measure set T -> \bar R}) :
almost_everywhere mu A -> almost_everywhere mu B ->
almost_everywhere mu (A `&` B).
Proof.
Definition
ae_filter_ringOfSetsType
Source code
{ : ringOfSetsType d} ( : realFieldType)Source code
( : {measure set T -> \bar R}) : Filter (almost_everywhere mu).
Proof.
Definition
ae_properfilter_algebraOfSetsType
Source code
{ : algebraOfSetsType d}counting : forall {T : choiceType} {R : realType}, set T -> \bar R counting is not universe polymorphic Arguments counting {T R} X%_classical_set_scope counting is transparent Expands to: Constant mathcomp.analysis.measure_theory.counting_measure.counting Declared in library mathcomp.analysis.measure_theory.counting_measure, line 25, characters 11-19
Source code
( : realFieldType) ( : {measure set T -> \bar R}) :
(mu [set: T] > 0)%E -> ProperFilter (almost_everywhere mu).
Proof.
move=> muT; split=> [|]; last exact: ae_filter_ringOfSetsType.
rewrite /almost_everywhere setC0 => /(measure_negligible measurableT).
by move/eqP; rewrite -measure_le0 leNgt => /negP.
Qed.
rewrite /almost_everywhere setC0 => /(measure_negligible measurableT).
by move/eqP; rewrite -measure_le0 leNgt => /negP.
Qed.
End ae.
#[global] Hint Extern 0 (Filter (almost_everywhere _)) =>
(apply: ae_filter_ringOfSetsType) : typeclass_instances.
#[global] Hint Extern 0 (Filter (nbhs (almost_everywhere _))) =>
(apply: ae_filter_ringOfSetsType) : typeclass_instances.
#[global] Hint Extern 0 (ProperFilter (almost_everywhere _)) =>
(apply: ae_properfilter_algebraOfSetsType) : typeclass_instances.
#[global] Hint Extern 0 (ProperFilter (nbhs (almost_everywhere _))) =>
(apply: ae_properfilter_algebraOfSetsType) : typeclass_instances.
Notation
"{ 'ae' m , P }"
Source code
:= {near almost_everywhere m, P} : type_scope.Source code
Notation
"\forall x \ae mu , P"
Source code
:= (\forall \near almost_everywhere mu, P)Source code
: type_scope.
Definition
ae_eq
Source code
( : semiRingOfSetsType d) ( : realType)Source code
( : {measure set T -> \bar R}) ( : T -> Type) ( : forall , V x) :=
\forall \ae mu, D x -> f x = g x.
Notation
"f = g %[ae mu 'in' D ]"
Source code
:= (\forall \ae mu, D x -> f x = g x).Source code
Notation
"f = g %[ae mu ]"
Source code
:= (f = g %[ae mu in setT ]).Source code
Lemma
measure0_ae
Source code
{ : algebraOfSetsType d} { : realType}Source code
( : {measure set T -> \bar R}) ( : set T) :
mu [set: T] = 0 -> \forall \ae mu, P x.
Proof.
Lemma
aeW
Source code
{} { : semiRingOfSetsType d} { : realFieldType}Source code
( : {measure set _ -> \bar R}) ( : T -> Prop) :
(forall , P x) -> \forall \ae mu, P x.
Proof.
Instance
ae_eq_equiv
Source code
( : ringOfSetsType d) :Source code
RelationClasses.Equivalence (@ae_eq d T R mu V D).
Proof.
Section ae_eq.
Local Open Scope ring_scope.
Context ( : sigmaRingType d) ( : realType).
Implicit Types (U V : Type) (W : pzRingType).
Variables ( : {measure set T -> \bar R}) ( : set T).
Local Notation
ae_eq
Source code
:= (ae_eq mu D).Source code
Lemma
ae_eq0
Source code
( : T -> U) : measurable D -> mu D = 0 -> f = g %[ae mu in D].Source code
Proof.
Instance
comp_ae_eq
Source code
( : T -> U -> V) :Source code
Proper (ae_eq ==> ae_eq) (fun => j x (f x)).
Instance
comp_ae_eq2
Source code
( : T -> U -> U' -> V) :Source code
Proper (ae_eq ==> ae_eq ==> ae_eq) (fun => j x (f x) (g x)).
Proof.
Instance
comp_ae_eq2'
Source code
( : U -> U' -> V) :Source code
Proper (ae_eq ==> ae_eq ==> ae_eq) (fun => j (f x) (g x)).
Proof.
Instance
sub_ae_eq2
Source code
: Proper (ae_eq ==> ae_eq ==> ae_eq) (@GRing.sub_fun T R).Source code
Proof.
Lemma
ae_eq_refl
Source code
( : T -> U) : ae_eq f fSource code
Proof.
exact/aeW. Qed.
Lemma
ae_eq_comp
Source code
( : U -> V) : ae_eq f g -> ae_eq (j \o f) (j \o g).Source code
Proof.
by move->. Qed.
Lemma
ae_eq_comp2
Source code
( : T -> U -> V) :Source code
ae_eq f g -> ae_eq (fun => j x (f x)) (fun => j x (g x)).
Local Open Scope ereal_scope.
Lemma
ae_eq_funeposneg
Source code
( : T -> \bar R) :Source code
ae_eq f g <-> ae_eq f^\+ g^\+ /\ ae_eq f^\- g^\-.
Proof.
split=> [fg|[pfg nfg]].
by split; near=> x => Dx; rewrite !(funeposE,funenegE) (near fg).
near=> x => Dx.
by rewrite -(funeposBneg f) -(funeposBneg g) ?(near pfg, near nfg).
Unshelve. all: by end_near. Qed.
by split; near=> x => Dx; rewrite !(funeposE,funenegE) (near fg).
near=> x => Dx.
by rewrite -(funeposBneg f) -(funeposBneg g) ?(near pfg, near nfg).
Unshelve. all: by end_near. Qed.
Lemma
ae_eq_sym
Source code
( : T -> U) : ae_eq f g -> ae_eq g f.Source code
Proof.
by symmetry. Qed.
Lemma
ae_eq_trans
Source code
( : T -> U) : ae_eq f g -> ae_eq g h -> ae_eq f h.Source code
Proof.
Lemma
ae_eq_sub
Source code
( : T -> W) : ae_eq f g -> ae_eq h i ->Source code
ae_eq (f \- h) (g \- i).
Proof.
Lemma
ae_eq_mul2r
Source code
( : T -> W) : ae_eq f g -> ae_eq (f \* h) (g \* h).Source code
Proof.
Lemma
ae_eq_mul2l
Source code
( : T -> W) : ae_eq f g -> ae_eq (h \* f) (h \* g).Source code
Proof.
Lemma
ae_eq_mul1l
Source code
( : T -> W) : ae_eq f (cst 1) -> ae_eq g (g \* f).Source code
Lemma
ae_eq_abse
Source code
( : T -> \bar R) : ae_eq f g ->Source code
ae_eq (abse \o f) (abse \o g).
Lemma
ae_foralln
Source code
( : nat -> T -> Prop) :Source code
(forall , \forall \ae mu, P n x) -> \forall \ae mu, forall , P n x.
Proof.
move=> /(_ _)/cid - /all_sig[A /all_and3[Ameas muA0 NPA]].
have seqDUAmeas := seqDU_measurable Ameas.
exists (\bigcup_ A n); split => //.
- exact/bigcup_measurable.
- rewrite seqDU_bigcup_eq measure_bigcup// eseries0// => i _ _.
by rewrite (@subset_measure0 _ _ _ _ _ (A i))//=; exact: subset_seqDU.
- by move=> x /=; rewrite -existsNP => -[n NPnx]; exists n => //; exact: NPA.
Qed.
have seqDUAmeas := seqDU_measurable Ameas.
exists (\bigcup_ A n); split => //.
- exact/bigcup_measurable.
- rewrite seqDU_bigcup_eq measure_bigcup// eseries0// => i _ _.
by rewrite (@subset_measure0 _ _ _ _ _ (A i))//=; exact: subset_seqDU.
- by move=> x /=; rewrite -existsNP => -[n NPnx]; exists n => //; exact: NPA.
Qed.
End ae_eq.
Section ae_eq_lemmas.
Context ( : sigmaRingType d) ( : realType) ( : Type).
Implicit Types (mu : {measure set T -> \bar R}) (A : set T) (f g : T -> U).
Lemma
ae_eq_subset
Source code
: B `<=` A -> ae_eq mu A f g -> ae_eq mu B f g.Source code
Proof.
End ae_eq_lemmas.
Section ae_eqe.
Context ( : sigmaRingType d) ( : realType).
Local Open Scope ereal_scope.
Implicit Types (mu : {measure set T -> \bar R}) (D : set T) (f g h : T -> \bar R).
Lemma
ae_eqe_mul2l
Source code
: ae_eq mu D f g -> ae_eq mu D (h \* f)%E (h \* g).Source code
End ae_eqe.
Section null_set.
Context ( : semiRingOfSetsType d) ( : numDomainType).
Implicit Types m : set T -> \bar R.
Definition
null_set
Source code
:=Source code
[set | forall , measurable A -> A `<=` N -> m A = 0].
End null_set.
Notation
"m .-null_set"
Source code
:= (null_set m).Source code
Section null_set_lemmas.
Context ( : semiRingOfSetsType d) ( : numDomainType).
Implicit Types m : set T -> \bar R.
Lemma
subset_null_set
Source code
: A `<=` B -> m.-null_set B -> m.-null_set A.Source code
Proof.
End null_set_lemmas.
Section content_null_set_lemmas.
Context ( : measurableType d) ( : realType).
Implicit Types m : {content set T -> \bar R}.
Lemma
negligible_null_set
Source code
: m.-negligible A -> m.-null_set A.Source code
Proof.
move=> [N [mN N0 AN]]; apply: (subset_null_set AN) => C mC CN.
by apply/eqP; rewrite -measure_le0 -N0 le_measure// inE.
Qed.
by apply/eqP; rewrite -measure_le0 -N0 le_measure// inE.
Qed.
Lemma
measure0_null_setP
Source code
: measurable A -> m.-null_set A <-> m A = 0.Source code
Proof.
Lemma
null_setU
Source code
: measurable B ->Source code
m.-null_set B <-> (forall , measurable A -> m (A `|` B) = m A).
Proof.
move=> mB; split=> [nullB A mA|B0 A mA AB].
- apply/eqP; rewrite eq_le.
rewrite (@le_measure _ _ _ _ A) ?inE ?andbT//; first exact: measurableU.
by rewrite (le_trans (measureU2 _ _ _))// (nullB B)// adde0.
- apply/eqP; rewrite eq_le measure_ge0 andbT.
by rewrite -(measure0 m) -[leRHS]B0// set0U le_measure// inE.
Qed.
- apply/eqP; rewrite eq_le.
rewrite (@le_measure _ _ _ _ A) ?inE ?andbT//; first exact: measurableU.
by rewrite (le_trans (measureU2 _ _ _))// (nullB B)// adde0.
- apply/eqP; rewrite eq_le measure_ge0 andbT.
by rewrite -(measure0 m) -[leRHS]B0// set0U le_measure// inE.
Qed.
End content_null_set_lemmas.
Section absolute_continuity.
Context ( : semiRingOfSetsType d) ( : realType).
Implicit Types m : set T -> \bar R.
Definition
null_dominates
Source code
:= m2.-null_set `<=` m1.-null_set.Source code
End absolute_continuity.
Notation
"m1 `<< m2"
Source code
:= (null_dominates m2 m1).Source code
Section null_dominates_lemmas.
Context ( : semiRingOfSetsType d) ( : realType).
Implicit Types m : set T -> \bar R.
Lemma
null_dominates_trans
Source code
: m1 `<< m2 -> m2 `<< m3 -> m1 `<< m3.Source code
Proof.
by move=> m12 m23 A /m23 /m12. Qed.
End null_dominates_lemmas.
Definition
content_dominates
Source code
{} { : measurableType d} { : realType}Source code
( : {content set T -> \bar R}) ( : set T -> \bar R) :=
forall , measurable A -> mu A = 0 -> nu A = 0.
Section null_content_dominatesP.
Context ( : measurableType d) ( : realType).
Implicit Types (mu : {content set T -> \bar R}).
Lemma
null_content_dominatesP
Source code
( : set T -> \bar R) :Source code
nu `<< mu <-> content_dominates mu nu.
Proof.
split.
- by move=> dom A mA muA0; apply: (dom A) => //; exact/measure0_null_setP.
- by move=> + A muA0 B mB BA; apply => //; exact: muA0.
Qed.
- by move=> dom A mA muA0; apply: (dom A) => //; exact/measure0_null_setP.
- by move=> + A muA0 B mB BA; apply => //; exact: muA0.
Qed.
End null_content_dominatesP.
Section null_dominates_ae_eq.
Context ( : measurableType d) ( : realType) ( : Type).
Implicit Types (nu mu : {measure set T -> \bar R}) (f g : T -> U).
Lemma
null_dominates_ae_eq
Source code
: measurable E ->Source code
nu `<< mu -> ae_eq mu E f g -> ae_eq nu E f g.
Proof.
End null_dominates_ae_eq.
#[deprecated(since="mathcomp-analysis 1.15.0", note="renamed `null_dominates_ae_eq`")]
Notation
measure_dominates_ae_eq
Source code
:= null_dominates_ae_eq (only parsing).Source code