Skip to content

Commit cd6f295

Browse files
Add section: Lebesgue-Stieltjes measure of cdf (#1689)
* add lemma lebesgue_stieltjes_cdf_id * more systematic use of measurableTypeR --------- Co-authored-by: Reynald Affeldt <[email protected]>
1 parent 3abeb14 commit cd6f295

File tree

5 files changed

+77
-17
lines changed

5 files changed

+77
-17
lines changed

CHANGELOG_UNRELEASED.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
- in `constructive_ereal.v`:
88
+ lemma `ltgte_fin_num`
99

10+
- in `probability.v`:
11+
+ lemmas `cdf_fin_num`, `lebesgue_stieltjes_cdf_id`
12+
1013
- in `num_normedtype.v`:
1114
+ lemma `nbhs_infty_gtr`
1215

theories/ftc.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ Proof. by move=> xu locf F ax fx; exact: (@continuous_FTC1 _ _ _ u). Qed.
348348
End FTC.
349349

350350
Definition parameterized_integral {R : realType}
351-
(mu : {measure set (g_sigma_algebraType (R.-ocitv.-measurable)) -> \bar R})
351+
(mu : {measure set (measurableTypeR R) -> \bar R})
352352
a x (f : R -> R) : R :=
353353
(\int[mu]_(t in `[a, x]) f t)%R.
354354

theories/lebesgue_measure.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ End hlength_extension.
335335
End LebesgueMeasure.
336336

337337
Definition lebesgue_measure {R : realType} :
338-
set (g_sigma_algebraType R.-ocitv.-measurable) -> \bar R :=
338+
set (measurableTypeR R) -> \bar R :=
339339
lebesgue_stieltjes_measure idfun.
340340
HB.instance Definition _ (R : realType) := Measure.on (@lebesgue_measure R).
341341
HB.instance Definition _ (R : realType) :=
@@ -399,7 +399,7 @@ have mF_ m : mu (F_ m) < completed_mu E + m.+1%:R^-1%:E.
399399
apply: lee_nneseries => // n _.
400400
by rewrite -((measurable_mu_extE hlength) (A m n))//; have [/(_ n)] := mA m.
401401
pose F := \bigcap_n (F_ n).
402-
have FM : @measurable _ (g_sigma_algebraType R.-ocitv.-measurable) F.
402+
have FM : @measurable _ (measurableTypeR R) F.
403403
apply: bigcapT_measurable => k; apply: bigcupT_measurable => i.
404404
by apply: sub_sigma_algebra; have [/(_ i)] := mA k.
405405
have EF : E `<=` F by exact: sub_bigcap.
@@ -434,7 +434,7 @@ have mG_ m : mu (G_ m) < completed_mu (F `\` E) + m.+1%:R^-1%:E.
434434
apply: lee_nneseries => // n _.
435435
by rewrite -((measurable_mu_extE hlength) (B m n))//; have [/(_ n)] := mB m.
436436
pose G := \bigcap_n (G_ n).
437-
have GM : @measurable _ (g_sigma_algebraType R.-ocitv.-measurable) G.
437+
have GM : @measurable _ (measurableTypeR R) G.
438438
apply: bigcapT_measurable => k; apply: bigcupT_measurable => i.
439439
by apply: sub_sigma_algebra; have [/(_ i)] := mB k.
440440
have FEG : F `\` E `<=` G by exact: sub_bigcap.

theories/lebesgue_stieltjes_measure.v

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -510,12 +510,14 @@ Arguments lebesgue_stieltjes_measure {R}.
510510
#[deprecated(since="mathcomp-analysis 1.1.0", note="renamed `wlength_sigma_subadditive`")]
511511
Notation wlength_sigma_sub_additive := wlength_sigma_subadditive (only parsing).
512512

513+
Definition measurableTypeR (R : realType) :=
514+
g_sigma_algebraType R.-ocitv.-measurable.
515+
513516
Section lebesgue_stieltjes_measure.
514517
Variable R : realType.
515-
Let gitvs : measurableType _ := g_sigma_algebraType (@ocitv R).
516518

517519
Lemma lebesgue_stieltjes_measure_unique (f : cumulative R R)
518-
(mu : {measure set gitvs -> \bar R}) :
520+
(mu : {measure set (measurableTypeR R) -> \bar R}) :
519521
(forall X, ocitv X -> lebesgue_stieltjes_measure f X = mu X) ->
520522
forall X, measurable X -> lebesgue_stieltjes_measure f X = mu X.
521523
Proof.
@@ -550,14 +552,13 @@ Arguments completed_lebesgue_stieltjes_measure {R}.
550552
Section salgebra_R_ssets.
551553
Variable R : realType.
552554

553-
Definition measurableTypeR := g_sigma_algebraType (R.-ocitv.-measurable).
554555
Definition measurableR : set (set R) :=
555556
(R.-ocitv.-measurable).-sigma.-measurable.
556557

557558
HB.instance Definition _ := Pointed.on R.
558559
HB.instance Definition R_isMeasurable :
559560
isMeasurable default_measure_display R :=
560-
@isMeasurable.Build _ measurableTypeR measurableR
561+
@isMeasurable.Build _ (measurableTypeR R) measurableR
561562
measurable0 (@measurableC _ _) (@bigcupT_measurable _ _).
562563
(*HB.instance (Real.sort R) R_isMeasurable.*)
563564

@@ -631,7 +632,6 @@ Section probability_measure_of_lebesgue_stieltjes_mesure.
631632
Context {R : realType} (f : cumulativeBounded (0:R) (1:R)).
632633
Local Open Scope measure_display_scope.
633634

634-
Let T := g_sigma_algebraType R.-ocitv.-measurable.
635635
Let lsf := lebesgue_stieltjes_measure f.
636636

637637
Let lebesgue_stieltjes_setT : lsf setT = 1%E.

theories/probability.v

Lines changed: 65 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,11 @@ Lemma cdf_ge0 r : 0 <= cdf X r. Proof. by []. Qed.
169169

170170
Lemma cdf_le1 r : cdf X r <= 1. Proof. exact: probability_le1. Qed.
171171

172+
Lemma cdf_fin_num r : cdf X r \is a fin_num.
173+
Proof.
174+
by rewrite ge0_fin_numE ?cdf_ge0//; exact/(le_lt_trans (cdf_le1 r))/ltry.
175+
Qed.
176+
172177
Lemma cdf_nondecreasing : nondecreasing_fun (cdf X).
173178
Proof. by move=> r s rs; rewrite le_measure ?inE//; exact: subitvPr. Qed.
174179

@@ -252,17 +257,16 @@ HB.instance Definition _ := isCumulative.Build R _ (\bar R) (cdf X)
252257

253258
End cumulative_distribution_function.
254259

255-
Section cdf_of_lebesgue_stieltjes_mesure.
260+
Section cdf_of_lebesgue_stieltjes_measure.
256261
Context {R : realType} (f : cumulativeBounded (0:R) (1:R)).
257262
Local Open Scope measure_display_scope.
258263

259-
Let T := g_sigma_algebraType R.-ocitv.-measurable.
260-
Let lsf := lebesgue_stieltjes_measure f.
261-
262-
Let idTR : T -> R := idfun.
264+
Let idTR : measurableTypeR R -> R := idfun.
263265

264266
#[local] HB.instance Definition _ :=
265-
@isMeasurableFun.Build _ _ T R idTR (@measurable_id _ _ setT).
267+
@isMeasurableFun.Build _ _ _ _ idTR (@measurable_id _ _ setT).
268+
269+
Let lsf := lebesgue_stieltjes_measure f.
266270

267271
Lemma cdf_lebesgue_stieltjes_id r : cdf (idTR : {RV lsf >-> R}) r = (f r)%:E.
268272
Proof.
@@ -277,12 +281,65 @@ have : lsf `]-n%:R, r] @[n --> \oo] --> (f r)%:E.
277281
apply: (cvg_comp _ _ (cvg_comp _ _ _ (cumulativeNy f))) => //.
278282
by apply: (cvg_comp _ _ cvgr_idn); rewrite ninfty.
279283
have : lsf `]- n%:R, r] @[n --> \oo] --> lsf (\bigcup_n `]-n%:R, r]%classic).
280-
apply: nondecreasing_cvg_mu; rewrite /I//; first exact: bigcup_measurable.
284+
apply: nondecreasing_cvg_mu => //; first exact: bigcup_measurable.
281285
by move=> *; apply/subsetPset/subset_itv; rewrite leBSide//= lerN2 ler_nat.
282286
exact: cvg_unique.
283287
Unshelve. all: by end_near. Qed.
284288

285-
End cdf_of_lebesgue_stieltjes_mesure.
289+
End cdf_of_lebesgue_stieltjes_measure.
290+
291+
Section lebesgue_stieltjes_measure_of_cdf.
292+
Context {R : realType} (P : probability (measurableTypeR R) R).
293+
Local Open Scope measure_display_scope.
294+
295+
Let idTR : measurableTypeR R -> R := idfun.
296+
297+
#[local] HB.instance Definition _ :=
298+
@isMeasurableFun.Build _ _ _ _ idTR (@measurable_id _ _ setT).
299+
300+
Let fcdf r := fine (cdf (idTR : {RV P >-> R}) r).
301+
302+
Let fcdf_nd : nondecreasing fcdf.
303+
Proof.
304+
by move=> *; apply: fine_le; [exact: cdf_fin_num.. | exact: cdf_nondecreasing].
305+
Qed.
306+
307+
Let fcdf_rc : right_continuous fcdf.
308+
Proof.
309+
move=> a; apply: fine_cvg.
310+
by rewrite fineK; [exact: cdf_right_continuous | exact: cdf_fin_num].
311+
Qed.
312+
313+
#[local] HB.instance Definition _ :=
314+
isCumulative.Build R _ R fcdf fcdf_nd fcdf_rc.
315+
316+
Let fcdf_Ny0 : fcdf @ -oo --> (0:R).
317+
Proof. exact/fine_cvg/cvg_cdfNy0. Qed.
318+
319+
Let fcdf_y1 : fcdf @ +oo --> (1:R).
320+
Proof. exact/fine_cvg/cvg_cdfy1. Qed.
321+
322+
#[local] HB.instance Definition _ :=
323+
isCumulativeBounded.Build R 0 1 fcdf fcdf_Ny0 fcdf_y1.
324+
325+
Let lscdf := lebesgue_stieltjes_measure fcdf.
326+
327+
Lemma lebesgue_stieltjes_cdf_id (A : set _) (mA : measurable A) : lscdf A = P A.
328+
Proof.
329+
apply: lebesgue_stieltjes_measure_unique => [I [[a b]]/= _ <- | //].
330+
rewrite /lebesgue_stieltjes_measure /measure_extension/=.
331+
rewrite measurable_mu_extE/=; last exact: is_ocitv.
332+
have [ab | ba] := leP a b; last first.
333+
by rewrite set_itv_ge ?wlength0 ?measure0// bnd_simp -leNgt ltW.
334+
rewrite wlength_itv_bnd// EFinB !fineK ?cdf_fin_num//.
335+
rewrite /cdf /distribution /pushforward !preimage_id.
336+
have : `]a, b]%classic = `]-oo, b] `\` `]-oo, a] => [|->].
337+
by rewrite -[RHS]setCK setCD setCitvl setUC -[LHS]setCK setCitv.
338+
rewrite measureD ?setIidr//; first exact: subset_itvl.
339+
by rewrite -ge0_fin_numE// fin_num_measure.
340+
Qed.
341+
342+
End lebesgue_stieltjes_measure_of_cdf.
286343

287344
HB.lock Definition expectation {d} {T : measurableType d} {R : realType}
288345
(P : probability T R) (X : T -> R) := (\int[P]_w (X w)%:E)%E.

0 commit comments

Comments
 (0)