Skip to content

Commit 1bfa4da

Browse files
committed
cleanup
1 parent 1213fbd commit 1bfa4da

2 files changed

Lines changed: 62 additions & 32 deletions

File tree

coq/ProbTheory/ProductSpace.v

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8597,6 +8597,66 @@ Proof.
85978597
reflexivity.
85988598
Qed.
85998599

8600+
Lemma isfe_prod_fst {Ts} {dom : SigmaAlgebra Ts} (prts : ProbSpace dom) (f : Ts -> R)
8601+
{rv : RandomVariable dom borel_sa f}
8602+
{isfe : IsFiniteExpectation prts f} :
8603+
IsFiniteExpectation (product_ps prts prts)
8604+
(fun p : Ts * Ts => f (fst p)).
8605+
Proof.
8606+
generalize (@pullback_law (Ts * Ts) Ts (product_sa dom dom) dom
8607+
(product_ps prts prts) fst f); intros.
8608+
generalize (fst_rv (T1 := Ts * Ts) (T2 := Ts) (product_sa dom dom) dom ); intros.
8609+
specialize (H _ _).
8610+
unfold compose in H.
8611+
rewrite <- Expectation_Rbar_Expectation in H.
8612+
rewrite <- Expectation_Rbar_Expectation in H.
8613+
unfold IsFiniteExpectation.
8614+
rewrite H.
8615+
assert (Expectation
8616+
(Prts :=
8617+
(@pullback_ps (prod Ts Ts) Ts (@product_sa Ts Ts dom dom) dom
8618+
(@product_ps Ts Ts dom dom prts prts) (@fst Ts Ts)
8619+
(@fst_rv Ts Ts dom dom))) f =
8620+
Expectation (Prts := prts) f).
8621+
{
8622+
apply Expectation_ext_ps'; try easy.
8623+
intros ?.
8624+
now rewrite <- product_pullback_fst.
8625+
}
8626+
rewrite H1.
8627+
apply isfe.
8628+
Qed.
8629+
8630+
Lemma isfe_prod_snd {Ts} {dom : SigmaAlgebra Ts} (prts : ProbSpace dom) (f : Ts -> R)
8631+
{rv : RandomVariable dom borel_sa f}
8632+
{isfe : IsFiniteExpectation prts f} :
8633+
IsFiniteExpectation (product_ps prts prts)
8634+
(fun p : Ts * Ts => f (snd p)).
8635+
Proof.
8636+
generalize (@pullback_law (Ts * Ts) Ts (product_sa dom dom) dom
8637+
(product_ps prts prts) snd f); intros.
8638+
generalize (fst_rv (T1 := Ts * Ts) (T2 := Ts) (product_sa dom dom) dom ); intros.
8639+
specialize (H _ _).
8640+
unfold compose in H.
8641+
rewrite <- Expectation_Rbar_Expectation in H.
8642+
rewrite <- Expectation_Rbar_Expectation in H.
8643+
unfold IsFiniteExpectation.
8644+
rewrite H.
8645+
assert (Expectation
8646+
(Prts :=
8647+
(@pullback_ps (prod Ts Ts) Ts (@product_sa Ts Ts dom dom) dom
8648+
(@product_ps Ts Ts dom dom prts prts) (@snd Ts Ts)
8649+
(@snd_rv Ts Ts dom dom))) f =
8650+
Expectation (Prts := prts) f).
8651+
{
8652+
apply Expectation_ext_ps'; try easy.
8653+
intros ?.
8654+
now rewrite <- product_pullback_snd.
8655+
}
8656+
rewrite H1.
8657+
apply isfe.
8658+
Qed.
8659+
86008660
Require Import Dynkin.
86018661
Section monotone_class.
86028662

coq/QLearn/Tsitsiklis.v

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9824,36 +9824,6 @@ End FixedPoint_contract.
98249824
split; trivial.
98259825
Qed.
98269826

9827-
Lemma isfe_prod_fst (f : Ts -> R)
9828-
{rv : RandomVariable dom borel_sa f}
9829-
{isfe : IsFiniteExpectation prts f} :
9830-
IsFiniteExpectation (product_ps prts prts)
9831-
(fun p : Ts * Ts => f (fst p)).
9832-
Proof.
9833-
generalize (@pullback_law (Ts * Ts) Ts (product_sa dom dom) dom
9834-
(product_ps prts prts) fst f); intros.
9835-
generalize (fst_rv (T1 := Ts * Ts) (T2 := Ts) (product_sa dom dom) dom ); intros.
9836-
specialize (H _ _).
9837-
unfold compose in H.
9838-
rewrite <- Expectation_Rbar_Expectation in H.
9839-
rewrite <- Expectation_Rbar_Expectation in H.
9840-
unfold IsFiniteExpectation.
9841-
rewrite H.
9842-
assert (Expectation
9843-
(Prts :=
9844-
(@pullback_ps (prod Ts Ts) Ts (@product_sa Ts Ts dom dom) dom
9845-
(@product_ps Ts Ts dom dom prts prts) (@fst Ts Ts)
9846-
(@fst_rv Ts Ts dom dom))) f =
9847-
Expectation (Prts := prts) f).
9848-
{
9849-
apply Expectation_ext_ps'; try easy.
9850-
intros ?.
9851-
now rewrite <- product_pullback_fst.
9852-
}
9853-
rewrite H1.
9854-
apply isfe.
9855-
Qed.
9856-
98579827
Instance isfe_qmin2' (Q : Ts -> Rfct (sigT M.(act)))
98589828
(isrvQ : forall sa, RandomVariable dom borel_sa (fun ω => Q ω sa))
98599829
(isfeQ : forall sa, IsFiniteExpectation prts (fun ω => Q ω sa))
@@ -9865,8 +9835,8 @@ End FixedPoint_contract.
98659835
intros.
98669836
apply IsFiniteExpectation_bounded with
98679837
(rv_X1 := fun p => Rmin_all (Q (fst p))) (rv_X3 := fun p => Rmax_all (Q (fst p))).
9868-
- apply (isfe_prod_fst (fun ω => Rmin_all (Q ω))).
9869-
- apply (isfe_prod_fst (fun ω => Rmax_all (Q ω))).
9838+
- apply (isfe_prod_fst prts (fun ω => Rmin_all (Q ω))).
9839+
- apply (isfe_prod_fst prts (fun ω => Rmax_all (Q ω))).
98709840
- intros ?.
98719841
unfold Rmin_all, qlearn_Qmin.
98729842
match_destr.

0 commit comments

Comments
 (0)