Module mathcomp.analysis.lebesgue_integral_theory.giry
From HB Require Import structures.From mathcomp Require Import boot order algebra boolp classical_sets.
From mathcomp Require Import fsbigop functions reals topology separation_axioms.
From mathcomp Require Import ereal sequences numfun measure measurable_realfun.
From mathcomp Require Import lebesgue_measure lebesgue_integral.
Reserved Notation "m >>= f" (at level 49).
Unset SsrOldRewriteGoalsOrder.
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import Order.TTheory GRing.Theory Num.Def Num.Theory.
Definition
Source code
measure T R -> measure T R -> Prop :=
fun => forall : set T, measurable S -> m1 S = m2 S.
Notation
Source code
Global Hint Extern 0 (_ ≡μ _) => reflexivity : core.
Local Open Scope classical_set_scope.
Local Open Scope ereal_scope.
Section giry_def.
Context ( : measurableType d) ( : realType).
Definition
Source code
.
Source code
Source code
Source code
.
Source code
Source code
Source code
.
Source code
Source code
Source code
Definition
Source code
Definition
Source code
preimage_set_system [set: giry] (giry_ev ^~ A) measurable.
Definition
Source code
Let
Source code
Proof.
Let
Source code
giry_measurable U -> giry_measurable (~` U).
Proof.
Let
Source code
(forall , giry_measurable (F i)) -> giry_measurable (\bigcup_ F i).
Proof.
Definition
Source code
Proof.
.
Source code
Source code
Source code
giry_measurable0 giry_measurableC giry_measurableU.
Lemma
Source code
measurable_fun [set: giry] (giry_ev ^~ A).
Proof.
apply: (@measurability giry_display _ giry _ setT (giry_ev ^~ A) measurable).
by rewrite smallest_id//; exact: sigma_algebra_measurable.
apply: subset_trans; last exact: sub_gen_smallest.
exact: (bigcup_sup mS).
Qed.
End giry_def.
Arguments giry_ev {d T R} mu A.
Section giry_integral.
Context {} { : measurableType d} { : realType}.
Definition
Source code
Import HBNNSimple.
Import MeasurableR.
Source code
measurable_fun [set: T] f -> (forall , 0 <= f x) ->
measurable_fun [set: giry T R] (giry_int ^~ f).
Proof.
pose g := nnsfun_approx measurableT mf.
pose Eg := fun => EFin \o g n.
pose intEg := fun => giry_int mu (Eg n).
have mintgE n : measurable_fun [set: giry T R] (intEg n).
rewrite /intEg /giry_int/=.
under eq_fun do rewrite integralT_nnsfun sintegralE.
apply: emeasurable_fsum => //= r.
by apply: measurable_funeM => //=; exact: measurable_giry_ev.
apply: (emeasurable_fun_cvg _ (giry_int ^~ f) mintgE) => mu _.
rewrite (_ : giry_int mu f = \int[mu]_ limn (Eg ^~ x)).
apply: eq_integral => t _.
by apply/esym/cvg_lim => //; exact/cvg_nnsfun_approx.
apply: cvg_monotone_convergence => //.
- by move=> n; exact/measurable_EFinP.
- by move=> n x _; rewrite lee_fin.
- by move=> t _ n m nm; apply/lefP/nd_nnsfun_approx.
Qed.
End giry_integral.
Arguments giry_int {d T R} mu f.
Section measurable_giry_codensity.
Context { : measurableType d1}.
Lemma
Source code
( : set T1) ( : T1 -> giry T2 R) :
measurable D ->
(forall , measurable B -> measurable_fun D (f ^~ B)) ->
measurable_fun D f.
Proof.
pose G : set_system (giry T2 R) := \bigcup_( in measurable) preimg_giry_ev B.
apply: (measurability G) => //= _ [_ [C mC [Z mZ] <-] <-].
by rewrite setTI; exact: mf.
Qed.
End measurable_giry_codensity.
Section giry_map.
Context {} {} { : measurableType d1} { : measurableType d2}
{ : realType}.
Variables ( : T1 -> T2) ( : measurable_fun [set: T1] f) (
Source code
Let
Source code
Let
Source code
Proof.
Let
Source code
Proof.
Let
Source code
Proof.
.
Source code
Source code
Source code
map0 map_ge0 map_sigma_additive.
Let
Source code
Proof.
.
Source code
Source code
Source code
Definition
giry_ev : forall {d : measure_display} {T : measurableType d} {R : realType}, giry T R -> set T -> \bar R giry_ev is not universe polymorphic Arguments giry_ev {d}%_measure_display_scope {T R} mu A%_classical_set_scope giry_ev is transparent Expands to: Constant mathcomp.analysis.lebesgue_integral_theory.giry.giry_ev Declared in library mathcomp.analysis.lebesgue_integral_theory.giry, line 60, characters 11-18
Source code
End giry_map.
Section giry_map_lemmas.
Context ( : measurableType d1) ( : measurableType d2) ( : realType).
Variable : T1 -> T2.
Hypothesis : measurable_fun [set: T1] f.
Lemma
Source code
Proof.
apply: measurable_giry_codensity => // B mB.
apply: measurable_giry_ev.
by rewrite -(setTI (f @^-1` B)); exact: mf.
Qed.
Lemma
Source code
measurable_fun [set: T2] h -> (forall , 0 <= h x) ->
giry_int (giry_map mf mu) h = giry_int mu (h \o f).
Proof.
Lemma
Source code
Source code
giry_map mf mu1 B = \int[mu1]_ (\d_(f x))%R B.
Proof.
rewrite -[in LHS](setIT B) -[LHS]integral_indic// [LHS]giry_int_map//.
exact/measurable_EFinP/measurable_indic.
Qed.
End giry_map_lemmas.
Section giry_ret.
Context {} { : measurableType d} { : realType}.
Definition
preimg_giry_ev : forall [d : measure_display] [T : measurableType d] [R : realType], set T -> set_system (giry T R) preimg_giry_ev is not universe polymorphic Arguments preimg_giry_ev [d]%_measure_display_scope [T R] A%_classical_set_scope _ preimg_giry_ev is transparent Expands to: Constant mathcomp.analysis.lebesgue_integral_theory.giry.preimg_giry_ev Declared in library mathcomp.analysis.lebesgue_integral_theory.giry, line 62, characters 11-25
Source code
Lemma
Source code
Proof.
Lemma
Source code
giry_int (giry_ret x) f = f x.
Proof.
End giry_ret.
Section giry_join.
Context {} { : measurableType d} { : realType}.
Variable : giry (giry T R) R.
Let
Source code
Let
Source code
Proof.
Let
Source code
Proof.
Let
Source code
Proof.
giry_int M (fun => \sum_(0 <= <oo) x (F k))).
apply: eq_integral => mu _.
by apply/esym/cvg_lim => //; exact: measure_sigma_additive.
rewrite [X in X @ _](_ : _ =
(fun => giry_int M (fun => \sum_(0 <= < n) mu (F i)))).
apply/funext => n; rewrite -ge0_integral_sum//.
by move=> ?; exact: measurable_giry_ev.
apply: cvg_monotone_convergence => //.
- by move=> n; apply: emeasurable_sum => m; exact: measurable_giry_ev.
- by move=> n x _; rewrite sume_ge0.
- by move=> x _ m n mn; exact: ereal_nondecreasing_series.
Qed.
.
Source code
Source code
Source code
join0 join_ge0 join_semi_sigma_additive.
Let
Source code
Proof.
rewrite (le_trans _ (@sprobability_setT _ _ _ M))//.
rewrite -[leRHS]mul1e integral_le_bound//.
exact: measurable_giry_ev.
by apply/aeW => x _; rewrite gee0_abs// sprobability_setT.
rewrite ge0_le_integral//=.
- exact: measurable_giry_ev.
- by apply: measurableT_comp => //; exact: measurable_giry_ev.
- by move=> x _; rewrite gee0_abs.
Qed.
.
Source code
Source code
Source code
Definition
giry_measurable : forall [d : measure_display] [T : measurableType d] [R : realType], set (set (giry T R)) giry_measurable is not universe polymorphic Arguments giry_measurable [d]%_measure_display_scope [T R] _ giry_measurable is transparent Expands to: Constant mathcomp.analysis.lebesgue_integral_theory.giry.giry_measurable Declared in library mathcomp.analysis.lebesgue_integral_theory.giry, line 65, characters 11-26
Source code
End giry_join.
Arguments giry_join {d T R}.
Section measurable_giry_join.
Context {} { : measurableType d} { : realType}.
Lemma
Source code
Proof.
by apply: measurable_giry_int => //; exact: measurable_giry_ev.
Qed.
Import HBNNSimple.
Import MeasurableR.
Lemma
Source code
sintegral (giry_join M) h = \int[M]_ sintegral mu h.
Proof.
rewrite ge0_integral_fsum//.
- by move=> r; apply: measurable_funeM; exact: measurable_giry_ev.
- by move=> n x _; exact: nnsfun_mulemu_ge0.
rewrite sintegralE /=; apply: eq_fsbigr => // r rh.
rewrite integralZl//.
have := finite_measure_integrable_cst M 1 measurableT.
apply: le_integrable => //; first exact: measurable_giry_ev.
move=> mu _ /=.
rewrite normr1 (le_trans _ (@sprobability_setT _ _ _ mu))// gee0_abs//.
by rewrite le_measure// ?inE.
Qed.
Lemma
Source code
measurable_fun [set: T] h -> (forall , 0 <= h x) ->
giry_int (giry_join M) h = giry_int M (giry_int ^~ h).
Proof.
pose g := nnsfun_approx measurableT mh.
pose gE := fun => EFin \o g n.
have mgE n : measurable_fun [set: T] (gE n) by exact/measurable_EFinP.
have gE_ge0 n x : 0 <= gE n x by rewrite lee_fin.
have nd_gE x : {homo gE ^~ x : / (n <= m)%O >-> n <= m}.
by move=> *; exact/lefP/nd_nnsfun_approx.
rewrite /giry_int.
transitivity (limn (fun => \int[giry_join M]_ gE n x)).
rewrite -monotone_convergence//; apply: eq_integral => t _.
by apply/esym/cvg_lim => //; exact: cvg_nnsfun_approx.
transitivity (limn (fun => \int[M]_ \int[mu]_ gE n x)).
apply: congr_lim; apply/funext => n.
rewrite integralT_nnsfun sintegral_giry_join; apply: eq_integral => x _.
by rewrite integralT_nnsfun.
rewrite -[LHS]monotone_convergence//.
- by move=> n; exact: measurable_giry_int.
- by move=> n x _; exact: integral_ge0.
- by move=> x _ m n mn; apply: ge0_le_integral => // t _; exact: nd_gE.
apply: eq_integral => mu _.
rewrite -monotone_convergence//.
apply: eq_integral => t _.
by apply/cvg_lim => //; exact: cvg_nnsfun_approx.
Qed.
End measurable_giry_join.
Section giry_bind.
Context ( : measurableType d1) ( : measurableType d2) ( : realType).
Implicit Types (mu : giry T1 R) (f : T1 -> giry T2 R).
Definition
giry_map : forall {d1 d2 : measure_display} {T1 : measurableType d1} {T2 : measurableType d2} {R : realType} [f : T1 -> T2], measurable_fun (T:=T1) (U:=T2) [set: T1] f -> giry T1 R -> giry T2 R giry_map is not universe polymorphic Arguments giry_map {d1 d2}%_measure_display_scope {T1 T2 R} [f]%_function_scope mf mu1 giry_map is transparent Expands to: Constant mathcomp.analysis.lebesgue_integral_theory.giry.giry_map Declared in library mathcomp.analysis.lebesgue_integral_theory.giry, line 181, characters 11-19
Source code
(giry_join \o giry_map mf) mu.
Local Notation
Source code
Lemma
Source code
measurable_fun [set: giry T1 R] (fun => mu >>= mf).
Proof.
exact: measurable_giry_join.
exact: measurable_giry_map.
Qed.
Lemma
Source code
measurable_fun [set: T2] h -> (forall , 0 <= h x)%E ->
giry_int (mu >>= mf) h = giry_int mu (fun => giry_int (f x) h).
Proof.
exact: measurable_giry_int.
by move=> ?; exact: integral_ge0.
Qed.
End giry_bind.
Section giry_monad.
Context ( : measurableType d1) ( : measurableType d2)
( : measurableType d3) ( : realType).
Lemma
Source code
(giry_join \o giry_map measurable_giry_join) x ≡μ
(giry_join \o giry_join) x.
Proof.
rewrite giry_int_map//; first exact: measurable_giry_ev.
by rewrite giry_int_join//; exact: measurable_giry_ev.
Qed.
Lemma
Source code
(giry_join \o giry_map measurable_giry_ret) x ≡μ
(giry_join \o giry_ret) x.
Proof.
rewrite giry_int_map//; first exact: measurable_giry_ev.
rewrite giry_int_ret//; first exact: measurable_giry_ev.
by rewrite /giry_int /giry_ev /giry_ret/= /dirac integral_indic// setIT.
Qed.
Lemma
Source code
( : measurable_fun [set: T1] f) :
(giry_join \o giry_map (measurable_giry_map mf)) x ≡μ
(giry_map mf \o giry_join) x.
Proof.
End giry_monad.
Definition
giry_ret : forall {d : measure_display} {T : measurableType d} {R : realType}, T -> giry T R giry_ret is not universe polymorphic Arguments giry_ret {d}%_measure_display_scope {T R} x giry_ret is transparent Expands to: Constant mathcomp.analysis.lebesgue_integral_theory.giry.giry_ret Declared in library mathcomp.analysis.lebesgue_integral_theory.giry, line 216, characters 11-19
Source code
{ : realType} ( : giry T1 R * giry T2 R) : giry (T1 * T2)%type R :=
@product_subprobability _ _ T1 T2 R m.
Section measurable_giry_prod.
Context {} {} { : measurableType d1} { : measurableType d2}
{ : realType}.
Lemma
Source code
measurable_fun [set: giry T1 R * giry T2 R] giry_prod.
Proof.
rewrite prod_measurable_rectangle.
apply: dynkin_induction => /=.
- by rewrite prod_measurable_rectangle.
- move=> _ _ [A1 mA1 [A2 mA2 <-]] [B1 mB1 [B2 mB2 <-]].
exists (A1 `&` B1); first exact: measurableI.
exists (A2 `&` B2); first exact: measurableI.
by rewrite setXI.
- apply: (eq_measurable_fun (fun : giry T1 R * giry T2 R =>
x.1 [set: T1] * x.2 [set: T2])).
by move=> x _; rewrite -setXTT product_measure1E.
by apply: emeasurable_funM => /=;
apply: (@measurableT_comp _ _ _ _ _ _ (giry_ev ^~ _)) => //;
exact: measurable_giry_ev.
- move=> _ [A mA [B mB <-]].
apply: (eq_measurable_fun (fun : giry T1 R * giry T2 R => x.1 A * x.2 B)).
by move=> x _; rewrite product_measure1E.
by apply: emeasurable_funM;
apply: (@measurableT_comp _ _ _ _ _ _ (giry_ev ^~ _)) => //;
exact: measurable_giry_ev.
- move=> S mS HS.
apply: (eq_measurable_fun (fun : giry T1 R * giry T2 R =>
x.1 [set: T1] * x.2 [set: T2] - (x.1 \x x.2) S)).
move=> /= x _; rewrite product_subprobability_setC//.
by rewrite -setXTT product_measure1E.
apply emeasurable_funB => //=.
by apply: emeasurable_funM => //=;
apply: (@measurableT_comp _ _ _ _ _ _ (giry_ev ^~ _)) => //;
exact: measurable_giry_ev.
- move=> F mF tF Fn.
apply: (eq_measurable_fun (fun : giry T1 R * giry T2 R =>
\sum_(0 <= <oo) (x.1 \x x.2) (F k))).
by move=> x _; rewrite measure_semi_bigcup//; exact: bigcup_measurable.
exact: ge0_emeasurable_sum.
Qed.
End measurable_giry_prod.
Section giry_prod_int.
Context {} {} { : measurableType d1} { : measurableType d2}
{ : realType} ( : giry T1 R) ( : giry T2 R) ( : T1 * T2 -> \bar R).
Hypotheses ( : measurable_fun [set: T1 * T2] h) ( : forall , 0 <= h x).
Lemma
Source code
giry_int m1 (fun => giry_int m2 (fun => h (x, y))).
Proof.
Lemma
Source code
giry_int m2 (fun => giry_int m1 (fun => h (x, y))).
Proof.
End giry_prod_int.