Skip to content

basic facts about Gdelta sets #1615

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions CHANGELOG_UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

### Added

### Changed

- in `sequences.v`:
+ lemma `subset_seqDU`

Expand All @@ -17,13 +15,23 @@
+ lemma `ae_foralln`
+ lemma `ae_eqe_mul2l`

- in `reals.v`:
+ definition `irrational`
+ lemmas `irrationalE`, `rationalP`

- file `borel_hierarchy.v`:
+ lemmas ``

### Changed

- in `measure.v`:
+ notation `{ae mu, P}` (near use `{near _, _}` notation)
+ definition `ae_eq`
+ `ae_eq` lemmas now for `ringType`-valued functions (instead of `\bar R`)

- moved from `pi_irrational.v` to `reals.v` and changed
+ definition `rational`

### Renamed

### Generalized
Expand Down
1 change: 1 addition & 0 deletions theories/Make
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ forms.v
derive.v
measure.v
numfun.v
borel_hierarchy.v

lebesgue_integral_theory/simple_functions.v
lebesgue_integral_theory/lebesgue_integral_definition.v
Expand Down
140 changes: 140 additions & 0 deletions theories/borel_hierarchy.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
From mathcomp Require Import all_ssreflect all_algebra archimedean finmap.
From mathcomp Require Import mathcomp_extra unstable boolp classical_sets.
From mathcomp Require Import functions cardinality fsbigop interval_inference.
From mathcomp Require Import reals ereal topology normedtype sequences.
From mathcomp Require Import real_interval esum measure lebesgue_measure numfun.

(**md**************************************************************************)
(* # 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.

Lemma denseI (T : topologicalType) (A B : set T) :
open A -> dense A -> dense B -> dense (A `&` B).
Proof.
move=> oA dA dB C C0 oC.
have CA0 : C `&` A !=set0 by exact: dA.
suff: (C `&` A) `&` B !=set0 by rewrite setIA.
by apply: dB => //; exact: openI.
Qed.

Lemma dense0 {R : ptopologicalType} : ~ dense (@set0 R).
Proof.
apply/existsNP; exists setT.
apply/not_implyP; split; first exact/set0P/setT0.
apply/not_implyP; split; first exact: openT.
by rewrite setTI => -[].
Qed.

Lemma dense_set1C {R : realType} (r : R) : dense (~` [set r]).
Proof.
move=> /= O O0 oO.
suff [s Os /eqP sr] : exists2 s, O s & s != r by exists s; split.
case: O0 => o Oo.
have [->{r}|ro] := eqVneq r o; last by exists o => //; rewrite eq_sym.
have [e' /= e'0 e'o] := open_itvoo_subset oO Oo.
near (0:R)^'+ => e.
exists (o + e/2)%R; last by rewrite gt_eqF// ltrDl// divr_gt0.
apply: (e'o e) => //=.
by rewrite sub0r normrN gtr0_norm.
rewrite in_itv/= !ltrD2l; apply/andP; split.
by rewrite (@lt_le_trans _ _ 0%R) ?divr_ge0// ltrNl oppr0.
by rewrite gtr_pMr// invf_lt1// ltr1n.
Unshelve. all: by end_near. Qed.

Section Gdelta_Fsigma.
Context {T : topologicalType}.
Implicit Type S : set T.

Definition Gdelta S :=
exists2 F : (set T)^nat, (forall i, open (F i)) & S = \bigcap_i (F i).

Lemma open_Gdelta S : open S -> Gdelta S.
Proof. by exists (fun=> S)=> //; rewrite bigcap_const. Qed.

Definition Gdelta_dense S :=
exists2 F : (set T)^nat,
(forall i, open (F i) /\ dense (F i)) & S = \bigcap_i (F i).

Definition Fsigma S :=
exists2 F : (set T)^nat, (forall i, closed (F i)) & S = \bigcup_i (F i).

Lemma closed_Fsigma S : closed S -> Fsigma S.
Proof. by exists (fun=> S)=> //; rewrite bigcup_const. Qed.

End Gdelta_Fsigma.

Lemma Gdelta_measurable {R : realType} (S : set R) : Gdelta S -> measurable S.
Proof.
move=> [] B oB ->; apply: bigcapT_measurable => i.
exact: open_measurable.
Qed.

Lemma Gdelta_subspace_open {R : realType} (A : set R) (S : set (subspace A)) :
open A -> Gdelta S -> Gdelta (A `&` S).
Proof.
move=> oA [/= S_ oS_ US].
exists (fun n => A `&` (S_ n)).
by move=> ?; rewrite open_setSI.
by rewrite bigcapIr// US.
Qed.

Section irrational_Gdelta.
Context {R : realType}.

Lemma irrational_Gdelta : 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 n => ~` [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)) => //=.
rewrite /f1 pinvKV ?inE//=.
exact: set_bij_inj bijf.
Qed.

End irrational_Gdelta.

Lemma not_rational_Gdelta (R : realType) : ~ Gdelta (@rational R).
Proof.
apply/forall2NP => A.
apply/not_andP => -[oA ratrA].
have dense_A n : dense (A n).
move=> D D0 oD.
have := @dense_rat R D D0 oD.
apply: subset_nonempty.
apply: setIS.
rewrite -/(@rational R) ratrA.
exact: bigcap_inf.
have [/= B oB irratB] := @irrational_Gdelta R.
pose C : (set R)^nat := fun n => A n `&` B n.
have C0 : set0 = \bigcap_i C i by rewrite bigcapI -ratrA -irratB setICr.
have : forall n, open (C n) /\ dense (C n).
move=> n; split.
by apply: openI => //; apply oB.
by apply: denseI => //; apply oB.
move/Baire.
rewrite -C0.
exact: dense0.
Qed.
5 changes: 1 addition & 4 deletions theories/pi_irrational.v
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ apply/measurable_funTS; apply: continuous_measurable_fun.
exact/continuous_horner.
Qed.

(* TODO: move somewhere to classical *)
Definition rational {R : realType} (x : R) := exists m n, x = (m%:~R / n%:R)%R.

Module pi_irrational.
Local Open Scope ring_scope.

Expand Down Expand Up @@ -409,7 +406,7 @@ End pi_irrational.

Lemma pi_irrationnal {R : realType} : ~ rational (pi : R).
Proof.
move=> [a [b]]; have [->|b0 piratE] := eqVneq b O.
move/rationalP => [a [b]]; have [->|b0 piratE] := eqVneq b O.
by rewrite invr0 mulr0; apply/eqP; rewrite gt_eqF// pi_gt0.
have [na ana] : exists na, (a%:~R = na %:R :> R)%R.
exists `|a|; rewrite natr_absz gtr0_norm//.
Expand Down
Loading