Skip to content

Commit 0358507

Browse files
committed
use bool instead of I_2
1 parent b33c9ba commit 0358507

File tree

1 file changed

+30
-32
lines changed

1 file changed

+30
-32
lines changed

theories/probability.v

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -915,13 +915,12 @@ Section independent_RVs.
915915
Context {R : realType} d d' (T : measurableType d) (T' : measurableType d').
916916
Variable P : probability T R.
917917

918-
Definition independent_RVs (I0 : choiceType) (I : set I0)
919-
(X : I0 -> {mfun T >-> T'}) : Prop :=
918+
Definition independent_RVs (I0 : choiceType)
919+
(I : set I0) (X : I0 -> {mfun T >-> T'}) : Prop :=
920920
mutual_independence P I (fun i => g_sigma_algebra_mapping (X i)).
921921

922922
Definition independent_RVs2 (X Y : {mfun T >-> T'}) :=
923-
independent_RVs [set 0%N; 1%N]
924-
[eta (fun=> cst point) with 0%N |-> X, 1%N |-> Y].
923+
independent_RVs [set: bool] [eta (fun=> cst point) with false |-> X, true |-> Y].
925924

926925
End independent_RVs.
927926

@@ -956,54 +955,54 @@ Local Open Scope ring_scope.
956955
Lemma independent_RVs2_comp (X Y : {RV P >-> R}) (f g : {mfun R >-> R}) :
957956
independent_RVs2 P X Y -> independent_RVs2 P (f \o X) (g \o Y).
958957
Proof.
959-
move=> indeXY; split => [i [|]->{i}/= Z/=|J J01 E JE].
960-
- by rewrite /g_sigma_algebra_mapping/= /preimage_set_system/= => -[B mB <-];
961-
exact/measurableT_comp.
962-
- by rewrite /g_sigma_algebra_mapping/= /preimage_set_system/= => -[B mB <-];
963-
exact/measurableT_comp.
964-
- apply indeXY => //= i iJ; have := JE _ iJ.
965-
have : i \in [set 0%N; 1%N] by rewrite inE; apply: J01.
966-
rewrite inE/= => -[|] /eqP ->/=; rewrite !inE.
967-
+ exact: g_sigma_algebra_mapping_comp.
968-
+ by case: ifPn => [/eqP ->|i0]; exact: g_sigma_algebra_mapping_comp.
958+
move=> indeXY; split => /=.
959+
- move=> [] _ /= A.
960+
+ by rewrite /g_sigma_algebra_mapping/= /preimage_set_system/= => -[B mB <-];
961+
exact/measurableT_comp.
962+
+ by rewrite /g_sigma_algebra_mapping/= /preimage_set_system/= => -[B mB <-];
963+
exact/measurableT_comp.
964+
- move=> J _ E JE.
965+
apply indeXY => //= i iJ; have := JE _ iJ.
966+
by move: i {iJ} =>[|]//=; rewrite !inE => Eg;
967+
exact: g_sigma_algebra_mapping_comp Eg.
969968
Qed.
970969

971970
Lemma independent_RVs2_funrposneg (X Y : {RV P >-> R}) :
972971
independent_RVs2 P X Y -> independent_RVs2 P X^\+ Y^\-.
973972
Proof.
974-
move=> indeXY; split=> [/= i [|] -> /=|J J01 E JE].
975-
- exact: g_sigma_algebra_mapping_funrpos.
973+
move=> indeXY; split=> [[|]/= _|J J2 E JE].
976974
- exact: g_sigma_algebra_mapping_funrneg.
975+
- exact: g_sigma_algebra_mapping_funrpos.
977976
- apply indeXY => //= i iJ; have := JE _ iJ.
978-
move/J01 : (iJ) => /= -[|] ->//=; rewrite !inE.
979-
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr x 0)%R).
980-
exact: measurable_funrpos.
977+
move/J2 : iJ; move: i => [|]// _; rewrite !inE.
981978
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr (- x) 0)%R).
982979
exact: measurable_funrneg.
980+
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr x 0)%R) => //.
981+
exact: measurable_funrpos.
983982
Qed.
984983

985984
Lemma independent_RVs2_funrnegpos (X Y : {RV P >-> R}) :
986985
independent_RVs2 P X Y -> independent_RVs2 P X^\- Y^\+.
987986
Proof.
988-
move=> indeXY; split=> [/= i [|] -> /=|J J01 E JE].
989-
- exact: g_sigma_algebra_mapping_funrneg.
987+
move=> indeXY; split=> [/= [|]// _ |J J2 E JE].
990988
- exact: g_sigma_algebra_mapping_funrpos.
989+
- exact: g_sigma_algebra_mapping_funrneg.
991990
- apply indeXY => //= i iJ; have := JE _ iJ.
992-
move/J01 : (iJ) => /= -[|] ->//=; rewrite !inE.
993-
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr (- x) 0)%R).
994-
exact: measurable_funrneg.
991+
move/J2 : iJ; move: i => [|]// _; rewrite !inE.
995992
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr x 0)%R).
996993
exact: measurable_funrpos.
994+
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr (- x) 0)%R).
995+
exact: measurable_funrneg.
997996
Qed.
998997

999998
Lemma independent_RVs2_funrnegneg (X Y : {RV P >-> R}) :
1000999
independent_RVs2 P X Y -> independent_RVs2 P X^\- Y^\-.
10011000
Proof.
1002-
move=> indeXY; split=> [/= i [|] -> /=|J J01 E JE].
1001+
move=> indeXY; split=> [/= [|]// _ |J J2 E JE].
10031002
- exact: g_sigma_algebra_mapping_funrneg.
10041003
- exact: g_sigma_algebra_mapping_funrneg.
10051004
- apply indeXY => //= i iJ; have := JE _ iJ.
1006-
move/J01 : (iJ) => /= -[|] ->//=; rewrite !inE.
1005+
move/J2 : iJ; move: i => [|]// _; rewrite !inE.
10071006
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr (- x) 0)%R).
10081007
exact: measurable_funrneg.
10091008
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr (- x) 0)%R).
@@ -1013,11 +1012,11 @@ Qed.
10131012
Lemma independent_RVs2_funrpospos (X Y : {RV P >-> R}) :
10141013
independent_RVs2 P X Y -> independent_RVs2 P X^\+ Y^\+.
10151014
Proof.
1016-
move=> indeXY; split=> [/= i [|] -> /=|J J01 E JE].
1015+
move=> indeXY; split=> [/= [|]//= _ |J J2 E JE].
10171016
- exact: g_sigma_algebra_mapping_funrpos.
10181017
- exact: g_sigma_algebra_mapping_funrpos.
10191018
- apply indeXY => //= i iJ; have := JE _ iJ.
1020-
move/J01 : (iJ) => /= -[|] ->//=; rewrite !inE.
1019+
move/J2 : iJ; move: i => [|]// _; rewrite !inE.
10211020
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr x 0)%R).
10221021
exact: measurable_funrpos.
10231022
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr x 0)%R).
@@ -1156,23 +1155,22 @@ have {EX EY}EXY' : 'E_P[X_ n] * 'E_P[Y_ n] @[n --> \oo] --> 'E_P[X] * 'E_P[Y].
11561155
suff : forall n, 'E_P[X_ n \* Y_ n] = 'E_P[X_ n] * 'E_P[Y_ n].
11571156
by move=> suf; apply: (cvg_unique _ EXY) => //=; under eq_fun do rewrite suf.
11581157
move=> n; apply: expectationM_nnsfun => x y xX_ yY_.
1159-
suff : P (\big[setI/setT]_(j <- [fset 0%N; 1%N]%fset)
1158+
suff : P (\big[setI/setT]_(j <- [fset false; true]%fset)
11601159
[eta fun=> set0 with 0%N |-> X_ n @^-1` [set x],
11611160
1%N |-> Y_ n @^-1` [set y]] j) =
1162-
\prod_(j <- [fset 0%N; 1%N]%fset)
1161+
\prod_(j <- [fset false; true]%fset)
11631162
P ([eta fun=> set0 with 0%N |-> X_ n @^-1` [set x],
11641163
1%N |-> Y_ n @^-1` [set y]] j).
11651164
by rewrite !big_fsetU1/= ?inE//= !big_seq_fset1/=.
11661165
move: indeXY => [/= _]; apply => // i.
1167-
by rewrite /= !inE => /orP[|]/eqP ->; auto.
11681166
pose AX := dyadic_approx setT (EFin \o X).
11691167
pose AY := dyadic_approx setT (EFin \o Y).
11701168
pose BX := integer_approx setT (EFin \o X).
11711169
pose BY := integer_approx setT (EFin \o Y).
11721170
have mA (Z : {RV P >-> R}) m k : (k < m * 2 ^ m)%N ->
11731171
g_sigma_algebra_mapping Z (dyadic_approx setT (EFin \o Z) m k).
11741172
move=> mk; rewrite /g_sigma_algebra_mapping /dyadic_approx mk setTI.
1175-
rewrite /preimage_class/=; exists [set` dyadic_itv R m k] => //.
1173+
rewrite /preimage_set_system/=; exists [set` dyadic_itv R m k] => //.
11761174
rewrite setTI/=; apply/seteqP; split => z/=.
11771175
by rewrite inE/= => Zz; exists (Z z).
11781176
by rewrite inE/= => -[r rmk] [<-].

0 commit comments

Comments
 (0)