Module mathcomp.analysis.borel_hierarchy
From mathcomp Require Import boot order algebra.From mathcomp Require Import boolp classical_sets functions cardinality.
From mathcomp Require Import reals topology normedtype sequences.
From mathcomp Require Import measure real_measure.
# Basic facts about G-delta and F-sigma sets
```
Gdelta S == S is countable intersection of open sets
Gdelta_dense S == S is a countable intersection of dense open sets
Fsigma S == S is countable union of closed sets
```
Set Implicit Arguments.
Unset Strict Implicit.
Unset Printing Implicit Defensive.
Import Order.TTheory GRing.Theory Num.Theory.
Import numFieldNormedType.Exports.
Local Open Scope classical_set_scope.
Section Gdelta_Fsigma.
Context {TSource code : topologicalType}.
Implicit Type S : set T.
Definition Gdelta
Source code SSource code :=
exists2 FSource code : (set T)^nat, (forall iSource code, open (F i)) & S = \bigcap_iSource code (F i).
Lemma open_GdeltaSource code SSource code : open S -> Gdelta S.
Proof.
Definition Gdelta_dense
Gdelta : forall {T : topologicalType}, set T -> Prop Gdelta is not universe polymorphic Arguments Gdelta {T} S%_classical_set_scope Gdelta is transparent Expands to: Constant mathcomp.analysis.borel_hierarchy.Gdelta Declared in library mathcomp.analysis.borel_hierarchy, line 31, characters 11-17
Source code SSource code :=
exists2 FSource code : (set T)^nat,
(forall iSource code, open (F i) /\ dense (F i)) & S = \bigcap_iSource code (F i).
Definition Fsigma
Gdelta_dense : forall {T : topologicalType}, set T -> Prop Gdelta_dense is not universe polymorphic Arguments Gdelta_dense {T} S%_classical_set_scope Gdelta_dense is transparent Expands to: Constant mathcomp.analysis.borel_hierarchy.Gdelta_dense Declared in library mathcomp.analysis.borel_hierarchy, line 37, characters 11-23
Source code SSource code :=
exists2 FSource code : (set T)^nat, (forall iSource code, closed (F i)) & S = \bigcup_iSource code (F i).
Lemma closed_FsigmaSource code SSource code : closed S -> Fsigma S.
Proof.
End Gdelta_Fsigma.
Import MeasurableR.
Lemma Gdelta_measurableSource code {RSource code : realType} (SSource code : set R) : Gdelta S -> measurable S.
Proof.
Lemma Gdelta_subspace_openSource code {RSource code : realType} (ASource code : set R) (SSource code : set (subspace A)) :
open A -> Gdelta S -> Gdelta (A `&` S).
Proof.
move=> oA [/= S_ oS_ US]; exists (fun nSource code => A `&` (S_ n)).
by move=> ?; rewrite open_setSI.
by rewrite bigcapIr// US.
Qed.
by move=> ?; rewrite open_setSI.
by rewrite bigcapIr// US.
Qed.
Section irrational_Gdelta.
Context {RSource code : realType}.
Lemma irrational_GdeltaSource code : Gdelta_dense (@irrational R).
Proof.
rewrite irrationalE.
have /pcard_eqP/bijPex[f bijf] := card_rat.
pose f1 := 'pinv_(fun => 0%R) [set: rat] f.
exists (fun nSource code => ~` [set ratr (f1 n)]).
move=> n; rewrite openC; split; last exact: dense_set1C.
exact/accessible_closed_set1/hausdorff_accessible/Rhausdorff.
apply/seteqP; split => [/= r/= rE n _/= rf1n|/=r rE q _/= [_ -> qr]].
by apply: (rE (f1 n)) => //=; exists (f1 n).
apply: (rE (f q)) => //=.
by rewrite /f1 pinvKV ?inE//=; exact: set_bij_inj bijf.
Qed.
have /pcard_eqP/bijPex[f bijf] := card_rat.
pose f1 := 'pinv_(fun => 0%R) [set: rat] f.
exists (fun nSource code => ~` [set ratr (f1 n)]).
move=> n; rewrite openC; split; last exact: dense_set1C.
exact/accessible_closed_set1/hausdorff_accessible/Rhausdorff.
apply/seteqP; split => [/= r/= rE n _/= rf1n|/=r rE q _/= [_ -> qr]].
by apply: (rE (f1 n)) => //=; exists (f1 n).
apply: (rE (f q)) => //=.
by rewrite /f1 pinvKV ?inE//=; exact: set_bij_inj bijf.
Qed.
End irrational_Gdelta.
Lemma not_rational_GdeltaSource code (RSource code : realType) : ~ Gdelta (@rational R).
Proof.
apply/forall2NP => A; apply/not_andP => -[oA ratrA].
have dense_A n : dense (A n).
move=> D D0 /(@dense_rat R D D0); apply/subset_nonempty; apply: setIS.
by rewrite -/(@rational R) ratrA; exact: bigcap_inf.
have [/= B oB irratB] := @irrational_Gdelta R.
pose C : (set R)^nat := fun nSource code => A n `&` B n.
have C0 : set0 = \bigcap_iSource code C i by rewrite bigcapI -ratrA -irratB setICr.
have /Baire : forall nSource code, open (C n) /\ dense (C n).
move=> n; split.
- by apply: openI => //; apply oB.
- by apply: denseI => //; apply oB.
by rewrite -C0; exact: dense0.
Qed.
have dense_A n : dense (A n).
move=> D D0 /(@dense_rat R D D0); apply/subset_nonempty; apply: setIS.
by rewrite -/(@rational R) ratrA; exact: bigcap_inf.
have [/= B oB irratB] := @irrational_Gdelta R.
pose C : (set R)^nat := fun nSource code => A n `&` B n.
have C0 : set0 = \bigcap_iSource code C i by rewrite bigcapI -ratrA -irratB setICr.
have /Baire : forall nSource code, open (C n) /\ dense (C n).
move=> n; split.
- by apply: openI => //; apply oB.
- by apply: denseI => //; apply oB.
by rewrite -C0; exact: dense0.
Qed.