Skip to content

Commit 7be5887

Browse files
committed
use bool instead of I_2
1 parent 9bda506 commit 7be5887

1 file changed

Lines changed: 29 additions & 31 deletions

File tree

theories/probability.v

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -927,13 +927,12 @@ Section independent_RVs.
927927
Context {R : realType} d d' (T : measurableType d) (T' : measurableType d').
928928
Variable P : probability T R.
929929

930-
Definition independent_RVs (I0 : choiceType) (I : set I0)
931-
(X : I0 -> {mfun T >-> T'}) : Prop :=
930+
Definition independent_RVs (I0 : choiceType)
931+
(I : set I0) (X : I0 -> {mfun T >-> T'}) : Prop :=
932932
mutual_independence P I (fun i => g_sigma_algebra_mapping (X i)).
933933

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

938937
End independent_RVs.
939938

@@ -968,54 +967,54 @@ Local Open Scope ring_scope.
968967
Lemma independent_RVs2_comp (X Y : {RV P >-> R}) (f g : {mfun R >-> R}) :
969968
independent_RVs2 P X Y -> independent_RVs2 P (f \o X) (g \o Y).
970969
Proof.
971-
move=> indeXY; split => [i [|]->{i}/= Z/=|J J01 E JE].
972-
- by rewrite /g_sigma_algebra_mapping/= /preimage_class/= => -[B mB <-];
973-
exact/measurableT_comp.
974-
- by rewrite /g_sigma_algebra_mapping/= /preimage_class/= => -[B mB <-];
975-
exact/measurableT_comp.
976-
- apply indeXY => //= i iJ; have := JE _ iJ.
977-
have : i \in [set 0%N; 1%N] by rewrite inE; apply: J01.
978-
rewrite inE/= => -[|] /eqP ->/=; rewrite !inE.
979-
+ exact: g_sigma_algebra_mapping_comp.
980-
+ by case: ifPn => [/eqP ->|i0]; exact: g_sigma_algebra_mapping_comp.
970+
move=> indeXY; split => /=.
971+
- move=> [] _ /= A.
972+
+ by rewrite /g_sigma_algebra_mapping/= /preimage_class/= => -[B mB <-];
973+
exact/measurableT_comp.
974+
+ by rewrite /g_sigma_algebra_mapping/= /preimage_class/= => -[B mB <-];
975+
exact/measurableT_comp.
976+
- move=> J _ E JE.
977+
apply indeXY => //= i iJ; have := JE _ iJ.
978+
by move: i {iJ} =>[|]//=; rewrite !inE => Eg;
979+
exact: g_sigma_algebra_mapping_comp Eg.
981980
Qed.
982981

983982
Lemma independent_RVs2_funrposneg (X Y : {RV P >-> R}) :
984983
independent_RVs2 P X Y -> independent_RVs2 P X^\+ Y^\-.
985984
Proof.
986-
move=> indeXY; split=> [/= i [|] -> /=|J J01 E JE].
987-
- exact: g_sigma_algebra_mapping_funrpos.
985+
move=> indeXY; split=> [[|]/= _|J J2 E JE].
988986
- exact: g_sigma_algebra_mapping_funrneg.
987+
- exact: g_sigma_algebra_mapping_funrpos.
989988
- apply indeXY => //= i iJ; have := JE _ iJ.
990-
move/J01 : (iJ) => /= -[|] ->//=; rewrite !inE.
991-
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr x 0)%R).
992-
exact: measurable_funrpos.
989+
move/J2 : iJ; move: i => [|]// _; rewrite !inE.
993990
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr (- x) 0)%R).
994991
exact: measurable_funrneg.
992+
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr x 0)%R) => //.
993+
exact: measurable_funrpos.
995994
Qed.
996995

997996
Lemma independent_RVs2_funrnegpos (X Y : {RV P >-> R}) :
998997
independent_RVs2 P X Y -> independent_RVs2 P X^\- Y^\+.
999998
Proof.
1000-
move=> indeXY; split=> [/= i [|] -> /=|J J01 E JE].
1001-
- exact: g_sigma_algebra_mapping_funrneg.
999+
move=> indeXY; split=> [/= [|]// _ |J J2 E JE].
10021000
- exact: g_sigma_algebra_mapping_funrpos.
1001+
- exact: g_sigma_algebra_mapping_funrneg.
10031002
- apply indeXY => //= i iJ; have := JE _ iJ.
1004-
move/J01 : (iJ) => /= -[|] ->//=; rewrite !inE.
1005-
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr (- x) 0)%R).
1006-
exact: measurable_funrneg.
1003+
move/J2 : iJ; move: i => [|]// _; rewrite !inE.
10071004
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr x 0)%R).
10081005
exact: measurable_funrpos.
1006+
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr (- x) 0)%R).
1007+
exact: measurable_funrneg.
10091008
Qed.
10101009

10111010
Lemma independent_RVs2_funrnegneg (X Y : {RV P >-> R}) :
10121011
independent_RVs2 P X Y -> independent_RVs2 P X^\- Y^\-.
10131012
Proof.
1014-
move=> indeXY; split=> [/= i [|] -> /=|J J01 E JE].
1013+
move=> indeXY; split=> [/= [|]// _ |J J2 E JE].
10151014
- exact: g_sigma_algebra_mapping_funrneg.
10161015
- exact: g_sigma_algebra_mapping_funrneg.
10171016
- apply indeXY => //= i iJ; have := JE _ iJ.
1018-
move/J01 : (iJ) => /= -[|] ->//=; rewrite !inE.
1017+
move/J2 : iJ; move: i => [|]// _; rewrite !inE.
10191018
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr (- x) 0)%R).
10201019
exact: measurable_funrneg.
10211020
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr (- x) 0)%R).
@@ -1025,11 +1024,11 @@ Qed.
10251024
Lemma independent_RVs2_funrpospos (X Y : {RV P >-> R}) :
10261025
independent_RVs2 P X Y -> independent_RVs2 P X^\+ Y^\+.
10271026
Proof.
1028-
move=> indeXY; split=> [/= i [|] -> /=|J J01 E JE].
1027+
move=> indeXY; split=> [/= [|]//= _ |J J2 E JE].
10291028
- exact: g_sigma_algebra_mapping_funrpos.
10301029
- exact: g_sigma_algebra_mapping_funrpos.
10311030
- apply indeXY => //= i iJ; have := JE _ iJ.
1032-
move/J01 : (iJ) => /= -[|] ->//=; rewrite !inE.
1031+
move/J2 : iJ; move: i => [|]// _; rewrite !inE.
10331032
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr x 0)%R).
10341033
exact: measurable_funrpos.
10351034
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr x 0)%R).
@@ -1168,15 +1167,14 @@ have {EX EY}EXY' : 'E_P[X_ n] * 'E_P[Y_ n] @[n --> \oo] --> 'E_P[X] * 'E_P[Y].
11681167
suff : forall n, 'E_P[X_ n \* Y_ n] = 'E_P[X_ n] * 'E_P[Y_ n].
11691168
by move=> suf; apply: (cvg_unique _ EXY) => //=; under eq_fun do rewrite suf.
11701169
move=> n; apply: expectationM_nnsfun => x y xX_ yY_.
1171-
suff : P (\big[setI/setT]_(j <- [fset 0%N; 1%N]%fset)
1170+
suff : P (\big[setI/setT]_(j <- [fset false; true]%fset)
11721171
[eta fun=> set0 with 0%N |-> X_ n @^-1` [set x],
11731172
1%N |-> Y_ n @^-1` [set y]] j) =
1174-
\prod_(j <- [fset 0%N; 1%N]%fset)
1173+
\prod_(j <- [fset false; true]%fset)
11751174
P ([eta fun=> set0 with 0%N |-> X_ n @^-1` [set x],
11761175
1%N |-> Y_ n @^-1` [set y]] j).
11771176
by rewrite !big_fsetU1/= ?inE//= !big_seq_fset1/=.
11781177
move: indeXY => [/= _]; apply => // i.
1179-
by rewrite /= !inE => /orP[|]/eqP ->; auto.
11801178
pose AX := approx_A setT (EFin \o X).
11811179
pose AY := approx_A setT (EFin \o Y).
11821180
pose BX := approx_B setT (EFin \o X).

0 commit comments

Comments
 (0)