Skip to content

Commit 5613bc0

Browse files
zstone1affeldt-aist
authored andcommitted
Lusin (#966)
* lusin for simple functions * main lusin theorem done * full version of lusin * linting * changelog * fixing build somehow * fixing build * prove measureU2 using content property * nitpicking * minor generalization --------- Co-authored-by: Reynald Affeldt <reynald.affeldt@aist.go.jp>
1 parent b513e81 commit 5613bc0

File tree

4 files changed

+176
-17
lines changed

4 files changed

+176
-17
lines changed

CHANGELOG_UNRELEASED.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@
4040
+ lemmas `set_predC`, `preimage_true`, `preimage_false`
4141
- in `lebesgue_measure.v`:
4242
+ lemmas `measurable_fun_ltr`, `measurable_minr`
43+
- in file `lebesgue_integral.v`,
44+
+ new lemmas `lusin_simple`, and `measurable_almost_continuous`.
45+
- in file `measure.v`,
46+
+ new lemmas `finite_card_sum`, and `measureU2`.
47+
48+
- in `topology.v`:
49+
+ lemma `bigsetU_compact`
4350

4451
- in `exp.v`:
4552
+ notation `` e `^?(r +? s) ``

theories/lebesgue_integral.v

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,6 +1580,7 @@ Qed.
15801580

15811581
End approximation.
15821582

1583+
15831584
Section semi_linearity0.
15841585
Local Open Scope ereal_scope.
15851586
Context d (T : measurableType d) (R : realType).
@@ -1714,6 +1715,128 @@ Qed.
17141715

17151716
End approximation_sfun.
17161717

1718+
Section lusin.
1719+
Hint Extern 0 (hausdorff_space _) => (exact: Rhausdorff ) : core.
1720+
Local Open Scope ereal_scope.
1721+
Context (rT : realType) (A : set rT).
1722+
Let mu := [the measure _ _ of @lebesgue_measure rT].
1723+
Let R := [the measurableType _ of measurableTypeR rT].
1724+
Hypothesis mA : measurable A.
1725+
Hypothesis finA : mu A < +oo.
1726+
1727+
Let lusin_simple (f : {sfun R >-> rT}) (eps : rT) : (0 < eps)%R ->
1728+
exists K, [/\ compact K, K `<=` A, mu (A `\` K) < eps%:E &
1729+
{within K, continuous f}].
1730+
Proof.
1731+
move: eps=> _/posnumP[eps]; have [N /card_fset_set rfN] := @fimfunP _ _ f.
1732+
pose Af x : set R := A `&` f @^-1` [set x].
1733+
have mAf x : measurable (Af x) by exact: measurableI.
1734+
have finAf x : mu (Af x) < +oo.
1735+
by rewrite (le_lt_trans _ finA)// le_measure// ?inE//; exact: subIsetl.
1736+
have eNpos : (0 < eps%:num/N.+1%:R)%R by [].
1737+
have dK' x := lebesgue_regularity_inner (mAf x) (finAf x) eNpos.
1738+
pose dK x : set R := projT1 (cid (dK' x)); pose J i : set R := Af i `\` dK i.
1739+
have dkP x := projT2 (cid (dK' x)).
1740+
have mdK i : measurable (dK i).
1741+
by apply: closed_measurable; apply: compact_closed => //; case: (dkP i).
1742+
have mJ i : measurable (J i) by apply: measurableD => //; exact: measurableI.
1743+
have dKsub z : dK z `<=` f @^-1` [set z].
1744+
by case: (dkP z) => _ /subset_trans + _; apply => ? [].
1745+
exists (\bigcup_(i in range f) dK i); split.
1746+
- by rewrite -bigsetU_fset_set//; apply: bigsetU_compact=>// i _; case: (dkP i).
1747+
- by move=> z [y _ dy]; have [_ /(_ _ dy) []] := dkP y.
1748+
- have -> : A `\` \bigcup_(i in range f) dK i = \bigcup_(i in range f) J i.
1749+
rewrite -bigcupDr /= ?eqEsubset; last by exists (f point), point.
1750+
split => z; first by move=> /(_ (f z)) [//| ? ?]; exists (f z).
1751+
case => ? [? _ <-] [[zab /= <- nfz]] ? [r _ <-]; split => //.
1752+
by move: nfz; apply: contra_not => /[dup] /dKsub ->.
1753+
apply: (@le_lt_trans _ _ (\sum_(i \in range f) mu (J i))).
1754+
by apply: content_sub_fsum => //; exact: fin_bigcup_measurable.
1755+
apply: le_lt_trans.
1756+
apply: (@lee_fsum _ _ _ _ (fun=> (eps%:num / N.+1%:R)%:E * 1%:E)) => //.
1757+
by move=> i ?; rewrite mule1; apply: ltW; have [_ _] := dkP i.
1758+
rewrite /=-ge0_mule_fsumr // -esum_fset // finite_card_sum // -EFinM lte_fin.
1759+
by rewrite rfN -mulrA gtr_pmulr // mulrC ltr_pdivr_mulr // mul1r ltr_nat.
1760+
- suff : closed (\bigcup_(i in range f) dK i) /\
1761+
{within \bigcup_(i in range f) dK i, continuous f} by case.
1762+
rewrite -bigsetU_fset_set //.
1763+
apply: (@big_ind _ (fun U => closed U /\ {within U, continuous f})).
1764+
+ by split; [exact: closed0 | exact: continuous_subspace0].
1765+
+ by move=> ? ? [? ?][? ?]; split; [exact: closedU|exact: withinU_continuous].
1766+
+ move=> i _; split; first by apply: compact_closed; have [] := dkP i.
1767+
apply: (continuous_subspaceW (dKsub i)).
1768+
apply: (@subspace_eq_continuous _ _ _ (fun=> i)).
1769+
by move=> ? /set_mem ->.
1770+
by apply: continuous_subspaceT => ?; exact: cvg_cst.
1771+
Qed.
1772+
1773+
Let measurable_almost_continuous' (f : R -> R) (eps : rT) :
1774+
(0 < eps)%R -> measurable_fun A f -> exists K,
1775+
[/\ measurable K, K `<=` A, mu (A `\` K) < eps%:E &
1776+
{within K, continuous f}].
1777+
Proof.
1778+
move: eps=> _/posnumP[eps] mf; pose f' := EFin \o f.
1779+
have mf' : measurable_fun A f' by exact/EFin_measurable_fun.
1780+
have [/= g_ gf'] := @approximation_sfun _ R rT _ _ mA mf'.
1781+
pose e2n n := (eps%:num / 2) / (2 ^ n.+1)%:R.
1782+
have e2npos n : (0 < e2n n)%R by rewrite divr_gt0.
1783+
have gK' n := @lusin_simple (g_ n) (e2n n) (e2npos n).
1784+
pose gK n := projT1 (cid (gK' n)); have gKP n := projT2 (cid (gK' n)).
1785+
pose K := \bigcap_i gK i; have mgK n : measurable (gK n).
1786+
by apply: closed_measurable; apply: compact_closed => //; have [] := gKP n.
1787+
have mK : measurable K by exact: bigcap_measurable.
1788+
have Kab : K `<=` A by move=> z /(_ O I); have [_ + _ _] := gKP O; apply.
1789+
have []// := @pointwise_almost_uniform _ rT R mu g_ f K (eps%:num / 2).
1790+
- by move=> n; exact: measurable_funTS.
1791+
- exact: (measurable_funS _ Kab).
1792+
- by rewrite (@le_lt_trans _ _ (mu A))// le_measure// ?inE.
1793+
- by move=> z Kz; have /fine_fcvg := gf' z (Kab _ Kz); rewrite -fmap_comp compA.
1794+
move=> D [/= mD Deps KDf]; exists (K `\` D); split => //.
1795+
- exact: measurableD.
1796+
- exact: subset_trans Kab.
1797+
- rewrite setDDr; apply: le_lt_trans => /=.
1798+
by apply: measureU2 => //; apply: measurableI => //; apply: measurableC.
1799+
rewrite [_%:num]splitr EFinD; apply: lee_lt_add => //=; first 2 last.
1800+
+ by rewrite (@le_lt_trans _ _ (mu D)) ?le_measure ?inE//; exact: measurableI.
1801+
+ rewrite ge0_fin_numE// (@le_lt_trans _ _ (mu A))// le_measure// ?inE//.
1802+
exact: measurableD.
1803+
rewrite setDE setC_bigcap setI_bigcupr.
1804+
apply: (@le_trans _ _(\sum_(k <oo) mu (A `\` gK k))).
1805+
apply: measure_sigma_sub_additive => //; [|apply: bigcup_measurable => + _].
1806+
by move=> k /=; apply: measurableD => //; apply: mgK.
1807+
by move=> k /=; apply: measurableD => //; apply: mgK.
1808+
apply: (@le_trans _ _(\sum_(k <oo) (e2n k)%:E)); last exact: epsilon_trick0.
1809+
by apply: lee_nneseries => // k _; apply: ltW; have [] := gKP k.
1810+
apply: (@uniform_limit_continuous_subspace _ _ _ (g_ @ \oo)) => //.
1811+
near_simpl; apply: nearW => // n; apply: (@continuous_subspaceW _ _ _ (gK n)).
1812+
by move=> z [+ _]; apply.
1813+
by have [] := projT2 (cid (gK' n)).
1814+
Qed.
1815+
1816+
Lemma measurable_almost_continuous (f : R -> R) (eps : rT) :
1817+
(0 < eps)%R -> measurable_fun A f -> exists K,
1818+
[/\ compact K, K `<=` A, mu (A `\` K) < eps%:E &
1819+
{within K, continuous f}].
1820+
Proof.
1821+
move: eps=> _/posnumP[eps] mf; have e2pos : (0 < eps%:num/2)%R by [].
1822+
have [K [mK KA ? ?]] := measurable_almost_continuous' e2pos mf.
1823+
have Kfin : mu K < +oo by rewrite (le_lt_trans _ finA)// le_measure ?inE.
1824+
have [D /= [cD DK KDe]] := lebesgue_regularity_inner mK Kfin e2pos.
1825+
exists D; split => //; last exact: (continuous_subspaceW DK).
1826+
exact: (subset_trans DK).
1827+
have -> : A `\` D = (A `\` K) `|` (K `\` D).
1828+
rewrite eqEsubset; split => z.
1829+
by case: (pselect (K z)) => // ? [? ?]; [right | left].
1830+
case; case=> az nz; split => //; [by move: z nz {az}; apply/subsetC|].
1831+
exact: KA.
1832+
apply: le_lt_trans.
1833+
apply: measureU2; apply: measurableD => //; apply: closed_measurable.
1834+
by apply: compact_closed; first exact: Rhausdorff.
1835+
by rewrite [_ eps]splitr EFinD lte_add.
1836+
Qed.
1837+
1838+
End lusin.
1839+
17171840
Section emeasurable_fun.
17181841
Local Open Scope ereal_scope.
17191842
Context d (T : measurableType d) (R : realType).

theories/measure.v

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,6 +1712,13 @@ Section dirac_lemmas.
17121712
Local Open Scope ereal_scope.
17131713
Context d (T : measurableType d) (R : realType).
17141714

1715+
Lemma finite_card_sum (A : set T) : finite_set A ->
1716+
\esum_(i in A) 1 = (#|` fset_set A|%:R)%:E :> \bar R.
1717+
Proof.
1718+
move=> finA; rewrite esum_fset// (eq_fsbigr (cst 1))//.
1719+
by rewrite card_fset_sum1// natr_sum -sumEFin fsbig_finite.
1720+
Qed.
1721+
17151722
Lemma finite_card_dirac (A : set T) : finite_set A ->
17161723
\esum_(i in A) \d_ i A = (#|` fset_set A|%:R)%:E :> \bar R.
17171724
Proof.
@@ -2946,8 +2953,8 @@ by apply: le_measure; rewrite ?inE.
29462953
Qed.
29472954

29482955
Section measureD.
2949-
Context d (R : realFieldType) (T : ringOfSetsType d).
2950-
Variable mu : {measure set T -> \bar R}.
2956+
Context d (T : ringOfSetsType d) (R : realFieldType).
2957+
Variable mu : {content set T -> \bar R}.
29512958

29522959
Lemma measureDI A B : measurable A -> measurable B ->
29532960
mu A = mu (A `\` B) + mu (A `&` B).
@@ -2971,24 +2978,41 @@ Qed.
29712978

29722979
End measureD.
29732980

2974-
Lemma measureUfinr d (T : ringOfSetsType d) (R : realFieldType) (A B : set T)
2975-
(mu : {measure set T -> \bar R}):
2976-
measurable A -> measurable B -> (mu B < +oo)%E ->
2977-
mu (A `|` B) = (mu A + mu B - mu (A `&` B))%E.
2981+
Section measureU2.
2982+
Context d (T : ringOfSetsType d) (R : realFieldType).
2983+
Variable mu : {content set T -> \bar R}.
2984+
2985+
Lemma measureU2 A B : measurable A -> measurable B ->
2986+
mu (A `|` B) <= mu A + mu B.
2987+
Proof.
2988+
move=> ? ?; rewrite -bigcup2inE bigcup_mkord.
2989+
rewrite (le_trans (@content_sub_additive _ _ _ mu _ (bigcup2 A B) 2%N _ _ _))//.
2990+
by move=> -[//|[//|[|]]].
2991+
by apply: bigsetU_measurable => -[] [//|[//|[|]]].
2992+
by rewrite big_ord_recr/= big_ord_recr/= big_ord0 add0e.
2993+
Qed.
2994+
2995+
End measureU2.
2996+
2997+
Section measureU.
2998+
Context d (T : ringOfSetsType d) (R : realFieldType).
2999+
Variable mu : {measure set T -> \bar R}.
3000+
3001+
Lemma measureUfinr A B : measurable A -> measurable B -> mu B < +oo ->
3002+
mu (A `|` B) = mu A + mu B - mu (A `&` B).
29783003
Proof.
29793004
move=> Am Bm mBfin; rewrite -[B in LHS](setDUK (@subIsetl _ _ A)) setUA.
29803005
rewrite [A `|` _]setUidl; last exact: subIsetr.
2981-
rewrite measureU//=; do ?by apply:measurableD; do ?apply: measurableI.
2982-
rewrite measureD//; do ?exact: measurableI.
2983-
by rewrite addeA setIA setIid setIC.
2984-
by rewrite setDE setCI setIUr -!setDE setDv set0U setDIK.
3006+
rewrite measureU//=; [|rewrite setDIr setDv set0U ?setDIK//..].
3007+
- by rewrite measureD// ?setIA ?setIid 1?setIC ?addeA//; exact: measurableI.
3008+
- exact: measurableD.
29853009
Qed.
29863010

2987-
Lemma measureUfinl d (T : ringOfSetsType d) (R : realFieldType) (A B : set T)
2988-
(mu : {measure set T -> \bar R}):
2989-
measurable A -> measurable B -> (mu A < +oo)%E ->
2990-
mu (A `|` B) = (mu A + mu B - mu (A `&` B))%E.
2991-
Proof. by move=> *; rewrite setUC measureUfinr// setIC [(mu B + _)%E]addeC. Qed.
3011+
Lemma measureUfinl A B : measurable A -> measurable B -> mu A < +oo ->
3012+
mu (A `|` B) = mu A + mu B - mu (A `&` B).
3013+
Proof. by move=> *; rewrite setUC measureUfinr// setIC [mu B + _]addeC. Qed.
3014+
3015+
End measureU.
29923016

29933017
Lemma eq_measureU d (T : ringOfSetsType d) (R : realFieldType) (A B : set T)
29943018
(mu mu' : {measure set T -> \bar R}):
@@ -3734,8 +3758,8 @@ have setDE : setD_closed E.
37343758
move=> A B BA [mA m1m2A AD] [mB m1m2B BD]; split; first exact: measurableD.
37353759
- rewrite measureD//; last first.
37363760
by rewrite (le_lt_trans _ m1oo)//; apply: le_measure => // /[!inE].
3737-
rewrite setIidr// m1m2A m1m2B measureD// ?setIidr//.
3738-
by rewrite (le_lt_trans _ m1oo)// -m1m2A; apply: le_measure => // /[!inE].
3761+
rewrite setIidr//= m1m2A m1m2B measureD// ?setIidr//.
3762+
by rewrite (le_lt_trans _ m1oo)//= -m1m2A; apply: le_measure => // /[!inE].
37393763
- by rewrite setDE; apply: subIset; left.
37403764
have ndE : ndseq_closed E.
37413765
move=> A ndA EA; split; have mA n : measurable (A n) by have [] := EA n.

theories/topology.v

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3151,6 +3151,11 @@ have /cptB[x BFx] : F B by apply: filterS FBA; exact: subIsetr.
31513151
by exists x; right.
31523152
Qed.
31533153

3154+
Lemma bigsetU_compact I (F : I -> set X) (s : seq I) (P : pred I) :
3155+
(forall i, P i -> compact (F i)) ->
3156+
compact (\big[setU/set0]_(i <- s | P i) F i).
3157+
Proof. by move=> ?; elim/big_ind : _ =>//; [exact:compact0|exact:compactU]. Qed.
3158+
31543159
(* The closed condition here is neccessary to make this definition work in a *)
31553160
(* non-hausdorff setting. *)
31563161
Definition compact_near (F : set_system X) :=

0 commit comments

Comments
 (0)