|
| 1 | +From mathcomp Require Import all_ssreflect all_algebra archimedean finmap. |
| 2 | +From mathcomp Require Import mathcomp_extra unstable boolp classical_sets. |
| 3 | +From mathcomp Require Import functions cardinality fsbigop interval_inference. |
| 4 | +From mathcomp Require Import reals ereal topology normedtype sequences. |
| 5 | +From mathcomp Require Import real_interval esum measure lebesgue_measure numfun. |
| 6 | + |
| 7 | +(**md**************************************************************************) |
| 8 | +(* ``` *) |
| 9 | +(* Gdelta S == S is a set of countable intersection of open sets *) |
| 10 | +(* ``` *) |
| 11 | +(* *) |
| 12 | +(******************************************************************************) |
| 13 | + |
| 14 | +Set Implicit Arguments. |
| 15 | +Unset Strict Implicit. |
| 16 | +Unset Printing Implicit Defensive. |
| 17 | + |
| 18 | +Import Order.TTheory GRing.Theory Num.Theory. |
| 19 | +Import numFieldNormedType.Exports. |
| 20 | + |
| 21 | +Local Open Scope classical_set_scope. |
| 22 | + |
| 23 | +Definition irrational (R : realType) : set R := ~` (ratr @` [set: rat]). |
| 24 | +Arguments irrational : clear implicits. |
| 25 | + |
| 26 | +Definition rational (R : realType) : set R := (ratr @` [set: rat]). |
| 27 | + |
| 28 | +Lemma irratE (R : realType) : |
| 29 | + irrational R = \bigcap_(q : rat) ~` (ratr @` [set q]). |
| 30 | +Proof. |
| 31 | +apply/seteqP; split => [r/= rE q _/=|r/= rE [q] _ qr]; last first. |
| 32 | + by apply: (rE q Logic.I) => /=; exists q. |
| 33 | +by apply: contra_not rE => -[_ -> <-{r}]; exists q. |
| 34 | +Qed. |
| 35 | + |
| 36 | +Lemma dense_set1C {R : realType} (r : R) : dense (~` [set r]). |
| 37 | +Proof. |
| 38 | +move=> /= O O0 oO. |
| 39 | +suff [s Os /eqP sr] : exists2 s, O s & s != r by exists s; split. |
| 40 | +case: O0 => o Oo. |
| 41 | +have [->{r}|ro] := eqVneq r o; last by exists o => //; rewrite eq_sym. |
| 42 | +have [e' /= e'0 e'o] := open_itvoo_subset oO Oo. |
| 43 | +near (0:R)^'+ => e. |
| 44 | +exists (o + e/2)%R; last by rewrite gt_eqF// ltrDl// divr_gt0. |
| 45 | +apply: (e'o e) => //=. |
| 46 | + by rewrite sub0r normrN gtr0_norm. |
| 47 | +rewrite in_itv/= !ltrD2l; apply/andP; split. |
| 48 | + by rewrite (@lt_le_trans _ _ 0%R) ?divr_ge0// ltrNl oppr0. |
| 49 | +by rewrite gtr_pMr// invf_lt1// ltr1n. |
| 50 | +Unshelve. all: by end_near. Qed. |
| 51 | + |
| 52 | +Lemma denseI (T : topologicalType) (A B : set T) : |
| 53 | + open A -> dense A -> dense B -> dense (A `&` B). |
| 54 | +Proof. |
| 55 | +move=> oA dA dB C C0 oC. |
| 56 | +have CA0 : C `&` A !=set0 by exact: dA. |
| 57 | +suff: (C `&` A) `&` B !=set0 by rewrite setIA. |
| 58 | +by apply: dB => //; exact: openI. |
| 59 | +Qed. |
| 60 | + |
| 61 | +Lemma dense0 {R : realType} : ~ dense (@set0 R). |
| 62 | +Proof. |
| 63 | +apply/existsNP; exists setT. |
| 64 | +apply/not_implyP; split; first exact/set0P/setT0. |
| 65 | +apply/not_implyP; split; first exact: openT. |
| 66 | +by rewrite setTI => -[]. |
| 67 | +Qed. |
| 68 | + |
| 69 | +Section Gdelta. |
| 70 | + |
| 71 | +Definition Gdelta (R : topologicalType) (S : set R) := |
| 72 | + exists2 A_ : (set R)^nat, |
| 73 | + (forall i : nat, open (A_ i)) & S = \bigcap_i (A_ i). |
| 74 | + |
| 75 | +Lemma open_Gdelta (R : topologicalType) (S : set R) : open S -> Gdelta S. |
| 76 | +Proof. |
| 77 | +exists (bigcap2 S setT)=> [i |]; last by rewrite bigcap2E setIT. |
| 78 | +by rewrite /bigcap2; case: ifP => // _; case: ifP => // _; apply: openT. |
| 79 | +Qed. |
| 80 | + |
| 81 | +Section irrat_Gdelta. |
| 82 | +Context {R : realType}. |
| 83 | + |
| 84 | +Definition Gdelta_dense (R : topologicalType) (S : set R) := |
| 85 | + exists2 A_ : (set R)^nat, |
| 86 | + (forall i, open (A_ i) /\ dense (A_ i)) & S = \bigcap_i (A_ i). |
| 87 | + |
| 88 | +Lemma irrat_Gdelta : Gdelta_dense (irrational R). |
| 89 | +Proof. |
| 90 | +rewrite irratE. |
| 91 | +have /pcard_eqP/bijPex[f bijf] := card_rat. |
| 92 | +pose f1 := 'pinv_(fun => 0%R) [set: rat] f. |
| 93 | +exists (fun n => ~` [set ratr (f1 n)]). |
| 94 | + move=> n. |
| 95 | + rewrite openC. |
| 96 | + split; last exact: dense_set1C. |
| 97 | + exact/accessible_closed_set1/hausdorff_accessible/Rhausdorff. |
| 98 | +apply/seteqP; split => [/= r/= rE n _/= rf1n|/=r rE q _/= [_ -> qr]]. |
| 99 | + by apply: (rE (f1 n)) => //=; exists (f1 n). |
| 100 | +apply: (rE (f q)) => //=. |
| 101 | +rewrite /f1 pinvKV ?inE//=. |
| 102 | +exact: set_bij_inj bijf. |
| 103 | +Qed. |
| 104 | + |
| 105 | +End irrat_Gdelta. |
| 106 | + |
| 107 | +Lemma rat_not_Gdelta (R : realType) : ~ Gdelta (@rational R). |
| 108 | +Proof. |
| 109 | +apply/forall2NP => A. |
| 110 | +apply/not_andP => -[oA ratrA]. |
| 111 | +have dense_A n : dense (A n). |
| 112 | + move=> D D0 oD. |
| 113 | + have := @dense_rat R D D0 oD. |
| 114 | + apply: subset_nonempty. |
| 115 | + apply: setIS. |
| 116 | + rewrite -/(@rational R) ratrA. |
| 117 | + exact: bigcap_inf. |
| 118 | +have [/= B oB irratB] := @irrat_Gdelta R. |
| 119 | +pose C : (set R)^nat := fun n => A n `&` B n. |
| 120 | +have C0 : set0 = \bigcap_i C i. |
| 121 | + by rewrite bigcapI -ratrA -irratB setICr. |
| 122 | +have : forall n, open (C n) /\ dense (C n). |
| 123 | + move=> n; split. |
| 124 | + by apply: openI => //; apply oB. |
| 125 | + by apply: denseI => //; apply oB. |
| 126 | +move/Baire. |
| 127 | +rewrite -C0. |
| 128 | +exact: dense0. |
| 129 | +Qed. |
| 130 | + |
| 131 | +Lemma Gdelta_measurable {R : realType} (S : set R) : Gdelta S -> (@measurable _ R) S. |
| 132 | +Proof. |
| 133 | +move=> [] B oB ->; apply: bigcapT_measurable => i. |
| 134 | +exact: open_measurable. |
| 135 | +Qed. |
| 136 | + |
| 137 | +Lemma Gdelta_subspace_open {R : realType} (A : set R) (S : set (subspace A)) : |
| 138 | + open A -> Gdelta S -> @Gdelta R (A `&` S). |
| 139 | +Proof. |
| 140 | +move=> oA [/= S_ oS_ US]. |
| 141 | +exists (fun n => A `&` (S_ n)). |
| 142 | + by move=> ?; rewrite open_setSI. |
| 143 | +by rewrite bigcapIr// US. |
| 144 | +Qed. |
0 commit comments