Skip to content

Commit 34694c5

Browse files
committed
use bool instead of I_2
1 parent 2fb4502 commit 34694c5

File tree

1 file changed

+29
-31
lines changed

1 file changed

+29
-31
lines changed

theories/probability.v

+29-31
Original file line numberDiff line numberDiff line change
@@ -926,13 +926,12 @@ Section independent_RVs.
926926
Context {R : realType} d d' (T : measurableType d) (T' : measurableType d').
927927
Variable P : probability T R.
928928

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

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

937936
End independent_RVs.
938937

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

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

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

10101009
Lemma independent_RVs2_funrnegneg (X Y : {RV P >-> R}) :
10111010
independent_RVs2 P X Y -> independent_RVs2 P X^\- Y^\-.
10121011
Proof.
1013-
move=> indeXY; split=> [/= i [|] -> /=|J J01 E JE].
1012+
move=> indeXY; split=> [/= [|]// _ |J J2 E JE].
10141013
- exact: g_sigma_algebra_mapping_funrneg.
10151014
- exact: g_sigma_algebra_mapping_funrneg.
10161015
- apply indeXY => //= i iJ; have := JE _ iJ.
1017-
move/J01 : (iJ) => /= -[|] ->//=; rewrite !inE.
1016+
move/J2 : iJ; move: i => [|]// _; rewrite !inE.
10181017
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr (- x) 0)%R).
10191018
exact: measurable_funrneg.
10201019
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr (- x) 0)%R).
@@ -1024,11 +1023,11 @@ Qed.
10241023
Lemma independent_RVs2_funrpospos (X Y : {RV P >-> R}) :
10251024
independent_RVs2 P X Y -> independent_RVs2 P X^\+ Y^\+.
10261025
Proof.
1027-
move=> indeXY; split=> [/= i [|] -> /=|J J01 E JE].
1026+
move=> indeXY; split=> [/= [|]//= _ |J J2 E JE].
10281027
- exact: g_sigma_algebra_mapping_funrpos.
10291028
- exact: g_sigma_algebra_mapping_funrpos.
10301029
- apply indeXY => //= i iJ; have := JE _ iJ.
1031-
move/J01 : (iJ) => /= -[|] ->//=; rewrite !inE.
1030+
move/J2 : iJ; move: i => [|]// _; rewrite !inE.
10321031
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr x 0)%R).
10331032
exact: measurable_funrpos.
10341033
+ apply: (g_sigma_algebra_mapping_comp (fun x => maxr x 0)%R).
@@ -1167,15 +1166,14 @@ have {EX EY}EXY' : 'E_P[X_ n] * 'E_P[Y_ n] @[n --> \oo] --> 'E_P[X] * 'E_P[Y].
11671166
suff : forall n, 'E_P[X_ n \* Y_ n] = 'E_P[X_ n] * 'E_P[Y_ n].
11681167
by move=> suf; apply: (cvg_unique _ EXY) => //=; under eq_fun do rewrite suf.
11691168
move=> n; apply: expectationM_nnsfun => x y xX_ yY_.
1170-
suff : P (\big[setI/setT]_(j <- [fset 0%N; 1%N]%fset)
1169+
suff : P (\big[setI/setT]_(j <- [fset false; true]%fset)
11711170
[eta fun=> set0 with 0%N |-> X_ n @^-1` [set x],
11721171
1%N |-> Y_ n @^-1` [set y]] j) =
1173-
\prod_(j <- [fset 0%N; 1%N]%fset)
1172+
\prod_(j <- [fset false; true]%fset)
11741173
P ([eta fun=> set0 with 0%N |-> X_ n @^-1` [set x],
11751174
1%N |-> Y_ n @^-1` [set y]] j).
11761175
by rewrite !big_fsetU1/= ?inE//= !big_seq_fset1/=.
11771176
move: indeXY => [/= _]; apply => // i.
1178-
by rewrite /= !inE => /orP[|]/eqP ->; auto.
11791177
pose AX := approx_A setT (EFin \o X).
11801178
pose AY := approx_A setT (EFin \o Y).
11811179
pose BX := approx_B setT (EFin \o X).

0 commit comments

Comments
 (0)