Module FormalML.ProbTheory.BorelSigmaAlgebra
Require Import Qreals.
Require Import Coquelicot.Coquelicot.
Require Import ProbSpace SigmaAlgebras.
Require Import Reals.
Require Import Lra Lia.
Require Import Utils.
Require Import NumberIso.
Require Import Equivalence.
Require Import Program.
Require Import QArith.
Set Bullet Behavior "
Strict Subproofs".
Instance open_borel_sa :
SigmaAlgebra R
:=
generated_sa open_set.
Instance borel_sa :
SigmaAlgebra R
:=
generated_sa (
fun (
s:
R->
Prop) =>
exists r,
forall m,
m <=
r <->
s m)%
R.
Section Borel.
Local Open Scope R.
Context {
Ts:
Type}
{
dom :
SigmaAlgebra Ts}.
Lemma borel_sa_preimage
(
rvx:
Ts ->
R)
(
pf_pre:
forall r:
R,
sa_sigma (
fun omega:
Ts => (
rvx omega) <=
r)%
R) :
(
forall B:
event borel_sa,
sa_sigma (
event_preimage rvx B)).
Proof.
Lemma borel_sa_preimage2
(
rvx:
Ts ->
R):
(
forall r:
R,
sa_sigma (
fun omega:
Ts => (
rvx omega) <=
r)%
R) <->
(
forall B:
event borel_sa, (
sa_sigma (
event_preimage rvx B))).
Proof.
Lemma open_borel_sa_preimage
(
rvx:
Ts ->
R)
(
pf_pre:
forall B:
pre_event R,
open_set B ->
sa_sigma (
pre_event_preimage rvx B)%
R) :
(
forall B:
event open_borel_sa,
sa_sigma (
event_preimage rvx B)).
Proof.
Lemma open_borel_sa_preimage2
(
rvx:
Ts ->
R):
(
forall B:
pre_event R,
open_set B ->
sa_sigma (
pre_event_preimage rvx B)%
R) <->
(
forall B:
event open_borel_sa,
sa_sigma (
event_preimage rvx B)).
Proof.
Lemma equiv_le_lt (
f :
Ts ->
R) (
r:
R) :
pre_event_equiv (
fun omega :
Ts =>
f omega <
r)
(
pre_union_of_collection
(
fun (
n:
nat) => (
fun omega :
Ts =>
f omega <=
r - / (1 +
INR n)))).
Proof.
Lemma equiv_ge_gt (
f :
Ts ->
R) (
r:
R) :
pre_event_equiv (
fun omega :
Ts =>
f omega >
r)
(
pre_union_of_collection
(
fun (
n:
nat) => (
fun omega :
Ts =>
f omega >=
r + / (1 +
INR n)))).
Proof.
Lemma sa_le_gt (
f :
Ts ->
R) :
(
forall (
r:
R),
sa_sigma (
fun omega :
Ts =>
f omega <=
r)) ->
(
forall (
r:
R),
sa_sigma (
fun omega :
Ts =>
f omega >
r)).
Proof.
Lemma sa_ge_lt (
f :
Ts ->
R) :
(
forall (
r:
R),
sa_sigma (
fun omega :
Ts =>
f omega >=
r)) ->
(
forall (
r:
R),
sa_sigma (
fun omega :
Ts =>
f omega <
r)).
Proof.
Lemma sa_le_ge (
f :
Ts ->
R) :
(
forall (
r:
R),
sa_sigma (
fun omega :
Ts =>
f omega <=
r)) ->
(
forall (
r:
R),
sa_sigma (
fun omega :
Ts =>
f omega >=
r)).
Proof.
Lemma sa_ge_le (
f :
Ts ->
R) :
(
forall (
r:
R),
sa_sigma (
fun omega :
Ts =>
f omega >=
r)) ->
(
forall (
r:
R),
sa_sigma (
fun omega :
Ts =>
f omega <=
r)).
Proof.
Lemma sa_le_lt (
f :
Ts ->
R) :
(
forall (
r:
R),
sa_sigma (
fun omega :
Ts =>
f omega <=
r)) ->
(
forall (
r:
R),
sa_sigma (
fun omega :
Ts =>
f omega <
r)).
Proof.
Lemma sa_ge_gt (
f :
Ts ->
R) :
(
forall (
r:
R),
sa_sigma (
fun omega :
Ts =>
f omega >=
r)) ->
(
forall (
r:
R),
sa_sigma (
fun omega :
Ts =>
f omega >
r)).
Proof.
Lemma sa_closed_intervals (
f :
Ts ->
R) :
(
forall (
r:
R),
sa_sigma (
fun omega :
Ts =>
f omega <=
r)) ->
(
forall (
l r:
R),
sa_sigma (
fun omega :
Ts =>
l <=
f omega <=
r)).
Proof.
Lemma sa_open_intervals (
f :
Ts ->
R) :
(
forall (
r:
R),
sa_sigma (
fun omega :
Ts =>
f omega <=
r)) ->
(
forall (
l r:
R),
sa_sigma (
fun omega :
Ts =>
l <
f omega <
r)).
Proof.
Lemma sa_le_pt (
f :
Ts ->
R) :
(
forall (
r:
R),
sa_sigma (
fun omega :
Ts =>
f omega <=
r)) ->
(
forall (
pt:
R),
sa_sigma (
fun omega :
Ts =>
f omega =
pt)).
Proof.
Definition Q_interval (
l r :
Q) (
x:
R) :
Prop :=
Q2R l <
x <
Q2R r.
Lemma Q_neighborhood_included (
D:
R ->
Prop) (
x:
R) :
neighbourhood D x ->
exists (
l r :
Q),
Q_interval l r x /\
included (
Q_interval l r)
D.
Proof.
unfold neighbourhood,
included,
disc;
intros.
destruct H as [
eps H].
generalize (
cond_pos eps);
intros.
assert (
x <
x+
eps)%
R by lra.
assert (
x -
eps <
x)%
R by lra.
generalize (
Q_dense (
x-
eps)
x H2);
intros.
generalize (
Q_dense x (
x +
eps)
H1);
intros.
destruct H3 as [
l0 H3].
destruct H4 as [
r0 H4].
exists l0;
exists r0.
unfold Q_interval.
split; [
lra | ].
intros;
apply H.
rewrite Rcomplements.Rabs_lt_between';
lra.
Qed.
Lemma Q_open_set (
D:
R ->
Prop) :
open_set D <->
(
forall x:
R,
D x ->
exists (
l r :
Q),
Q_interval l r x /\
included (
Q_interval l r)
D).
Proof.
Lemma sa_le_open_set (
f :
Ts ->
R) :
(
forall (
r:
R),
sa_sigma (
fun omega :
Ts => (
f omega <=
r)%
R)) ->
(
forall B:
pre_event R,
open_set B ->
sa_sigma (
pre_event_preimage f B)).
Proof.
Lemma sa_open_set_le (
f :
Ts ->
R) :
(
forall B:
pre_event R,
open_set B ->
sa_sigma (
pre_event_preimage f B)) ->
(
forall (
r:
R),
sa_sigma (
fun omega :
Ts => (
f omega <=
r)%
R)).
Proof.
Lemma sa_open_iff_le (
f :
Ts ->
R) :
(
forall B:
pre_event R,
open_set B ->
sa_sigma (
pre_event_preimage f B)) <->
(
forall (
r:
R),
sa_sigma (
fun omega :
Ts => (
f omega <=
r)%
R)).
Proof.
End Borel.
Local Open Scope equiv_scope.
Lemma sa_borel_open_le_sub1 :
sa_sub open_borel_sa borel_sa.
Proof.
Lemma sa_borel_open_le_sub2 :
sa_sub borel_sa open_borel_sa.
Proof.
Theorem sa_borel_open_le_equiv :
open_borel_sa ===
borel_sa.
Proof.
Local Open Scope R.
Section RbarBorel.
Instance Rbar_borel_sa :
SigmaAlgebra Rbar
:=
generated_sa (
fun (
s:
Rbar->
Prop) =>
exists r,
forall m,
Rbar_le m r <->
s m).
Context {
Ts:
Type}
{
dom:
SigmaAlgebra Ts}.
Class RbarMeasurable (
f:
Ts ->
Rbar)
:=
rbarmeasurable :
forall (
r:
Rbar),
sa_sigma (
fun omega :
Ts =>
Rbar_le (
f omega)
r).
Lemma Rbar_borel_sa_preimage
(
rvx:
Ts ->
Rbar)
(
pf_pre:
forall r:
Rbar,
sa_sigma (
fun omega:
Ts =>
Rbar_le (
rvx omega)
r)) :
(
forall B:
event Rbar_borel_sa,
sa_sigma (
event_preimage rvx B)).
Proof.
Lemma Rbar_borel_sa_preimage2
(
rvx:
Ts ->
Rbar):
(
forall r:
Rbar,
sa_sigma (
fun omega:
Ts =>
Rbar_le (
rvx omega)
r)) <->
(
forall B:
event Rbar_borel_sa, (
sa_sigma (
event_preimage rvx B))).
Proof.
Lemma Rbar_equiv_le_lt (
f :
Ts ->
Rbar) (
r:
R) :
pre_event_equiv (
fun omega :
Ts =>
Rbar_lt (
f omega)
r)
(
pre_union_of_collection
(
fun (
n:
nat) => (
fun omega :
Ts =>
Rbar_le (
f omega)
(
Rbar_minus r (/ (1 +
INR n)))))).
Proof.
Definition Rbar_ge (
x y :
Rbar) :=
Rbar_le y x.
Lemma Rbar_sa_le_ge (
f :
Ts ->
Rbar) :
(
forall (
r:
Rbar),
sa_sigma (
fun omega :
Ts =>
Rbar_le (
f omega)
r)) ->
(
forall (
r:
Rbar),
sa_sigma (
fun omega :
Ts =>
Rbar_ge (
f omega)
r)).
Proof.
Lemma Rbar_sa_le_lt (
f :
Ts ->
Rbar) :
(
forall (
r:
Rbar),
sa_sigma (
fun omega :
Ts =>
Rbar_le (
f omega)
r)) ->
(
forall (
r:
Rbar),
sa_sigma (
fun omega :
Ts =>
Rbar_lt (
f omega)
r)).
Proof.
Definition Rbar_gt (
x y :
Rbar) :=
Rbar_lt y x.
Lemma Rbar_sa_le_gt (
f :
Ts ->
Rbar) :
(
forall (
r:
Rbar),
sa_sigma (
fun omega :
Ts =>
Rbar_le (
f omega)
r)) ->
(
forall (
r:
Rbar),
sa_sigma (
fun omega :
Ts =>
Rbar_gt (
f omega)
r)).
Proof.
Lemma Rbar_equiv_ge_gt (
f :
Ts ->
Rbar) (
r:
R) :
pre_event_equiv (
fun omega :
Ts =>
Rbar_gt (
f omega)
r)
(
pre_union_of_collection
(
fun (
n:
nat) => (
fun omega :
Ts =>
Rbar_ge (
f omega) (
r + / (1 +
INR n))))).
Proof.
Lemma Rbar_sa_ge_le (
f :
Ts ->
Rbar) :
(
forall (
r:
Rbar),
sa_sigma (
fun omega :
Ts =>
Rbar_ge (
f omega)
r)) ->
(
forall (
r:
Rbar),
sa_sigma (
fun omega :
Ts =>
Rbar_le (
f omega)
r)).
Proof.
Lemma Rbar_sa_le_pt (
f :
Ts ->
Rbar) :
(
forall (
r:
Rbar),
sa_sigma (
fun omega :
Ts =>
Rbar_le (
f omega)
r)) ->
(
forall (
pt:
Rbar),
sa_sigma (
fun omega :
Ts =>
f omega =
pt)).
Proof.
End RbarBorel.
Section RbarBorel2.
Context {
Ts:
Type}
{
dom:
SigmaAlgebra Ts}.
Lemma Rbar_borel_singleton (
c:
Rbar) :
sa_sigma (
SigmaAlgebra:=
Rbar_borel_sa) (
pre_event_singleton c).
Proof.
End RbarBorel2.