@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Sébastien Gouëzel
5
5
-/
6
6
import analysis.specific_limits
7
+ import order.filter.countable_Inter
7
8
8
9
/-!
9
10
# Baire theorem
@@ -18,10 +19,13 @@ covered by a countable union of closed sets, then the union of their interiors i
18
19
19
20
The names of the theorems do not contain the string "Baire", but are instead built from the form of
20
21
the statement. "Baire" is however in the docstring of all the theorems, to facilitate grep searches.
22
+
23
+ We also define the filter `residual α` generated by dense `Gδ` sets and prove that this filter
24
+ has the countable intersection property.
21
25
-/
22
26
23
27
noncomputable theory
24
- open_locale classical
28
+ open_locale classical topological_space
25
29
26
30
open filter encodable set
27
31
86
90
87
91
end is_Gδ
88
92
93
+ /-- A set `s` is called *residual* if it includes a dense `Gδ` set. If `α` is a Baire space
94
+ (e.g., a complete metric space), then residual sets form a filter, see `mem_residual`.
95
+
96
+ For technical reasons we define the filter `residual` in any topological space
97
+ but in a non-Baire space it is not useful because it may contain some non-residual
98
+ sets. -/
99
+ def residual (α : Type *) [topological_space α] : filter α :=
100
+ ⨅ t (ht : is_Gδ t) (ht' : closure t = univ), principal t
101
+
89
102
section Baire_theorem
90
- open metric
91
- variables [metric_space α] [complete_space α]
103
+ open emetric ennreal
104
+ variables [emetric_space α] [complete_space α]
92
105
93
106
/-- Baire theorem: a countable intersection of dense open sets is dense. Formulated here when
94
107
the source space is ℕ (and subsumed below by `dense_Inter_of_open` working with any
95
108
encodable source space). -/
96
109
theorem dense_Inter_of_open_nat {f : ℕ → set α} (ho : ∀n, is_open (f n))
97
110
(hd : ∀n, closure (f n) = univ) : closure (⋂n, f n) = univ :=
98
111
begin
99
- let B : ℕ → ℝ := λn, ((1 /2 )^n : ℝ),
100
- have Bpos : ∀n, 0 < B n := λn, begin apply pow_pos, by norm_num end ,
112
+ let B : ℕ → ennreal := λn, 1 /2 ^n,
113
+ have Bpos : ∀n, 0 < B n,
114
+ { intro n,
115
+ simp only [B, div_def, one_mul, ennreal.inv_pos],
116
+ exact pow_ne_top two_ne_top },
101
117
/- Translate the density assumption into two functions `center` and `radius` associating
102
118
to any n, x, δ, δpos a center and a positive radius such that
103
119
`closed_ball center radius` is included both in `f n` and in `closed_ball x δ`.
@@ -106,40 +122,40 @@ begin
106
122
{ assume n x δ,
107
123
by_cases δpos : δ > 0 ,
108
124
{ have : x ∈ closure (f n) := by simpa only [(hd n).symm] using mem_univ x,
109
- rcases metric.mem_closure_iff.1 this (δ/2 ) (half_pos δpos) with ⟨y, ys, xy⟩,
110
- rw dist_comm at xy,
111
- rcases is_open_iff.1 (ho n) y ys with ⟨r, rpos, hr⟩,
112
- refine ⟨y, min (min (δ/2 ) (r/2 )) (B (n+1 )), λ_, ⟨_, _, λz hz, ⟨_, _⟩⟩⟩,
113
- show 0 < min (min (δ / 2 ) (r/2 )) (B (n+1 )),
114
- from lt_min (lt_min (half_pos δpos) (half_pos rpos)) (Bpos (n+1 )),
115
- show min (min (δ / 2 ) (r/2 )) (B (n+1 )) ≤ B (n+1 ), from min_le_right _ _,
125
+ rcases emetric.mem_closure_iff.1 this (δ/2 ) (ennreal.half_pos δpos) with ⟨y, ys, xy⟩,
126
+ rw edist_comm at xy,
127
+ obtain ⟨r, rpos, hr⟩ : ∃ r > 0 , closed_ball y r ⊆ f n :=
128
+ nhds_basis_closed_eball.mem_iff.1 (is_open_iff_mem_nhds.1 (ho n) y ys),
129
+ refine ⟨y, min (min (δ/2 ) r) (B (n+1 )), λ_, ⟨_, _, λz hz, ⟨_, _⟩⟩⟩,
130
+ show 0 < min (min (δ / 2 ) r) (B (n+1 )),
131
+ from lt_min (lt_min (ennreal.half_pos δpos) rpos) (Bpos (n+1 )),
132
+ show min (min (δ / 2 ) r) (B (n+1 )) ≤ B (n+1 ), from min_le_right _ _,
116
133
show z ∈ closed_ball x δ, from calc
117
- dist z x ≤ dist z y + dist y x : dist_triangle _ _ _
118
- ... ≤ (min (min (δ / 2 ) (r/ 2 )) (B (n+1 ))) + (δ/2 ) : add_le_add hz (le_of_lt xy)
119
- ... ≤ δ/2 + δ/2 : add_le_add (le_trans (min_le_left _ _) (min_le_left _ _)) (le_refl _)
120
- ... = δ : add_halves _ ,
134
+ edist z x ≤ edist z y + edist y x : edist_triangle _ _ _
135
+ ... ≤ (min (min (δ / 2 ) r) (B (n+1 ))) + (δ/2 ) : add_le_add' hz (le_of_lt xy)
136
+ ... ≤ δ/2 + δ/2 : add_le_add' (le_trans (min_le_left _ _) (min_le_left _ _)) (le_refl _)
137
+ ... = δ : ennreal. add_halves δ ,
121
138
show z ∈ f n, from hr (calc
122
- dist z y ≤ min (min (δ / 2 ) (r/2 )) (B (n+1 )) : hz
123
- ... ≤ r/2 : le_trans (min_le_left _ _) (min_le_right _ _)
124
- ... < r : half_lt_self rpos) },
139
+ edist z y ≤ min (min (δ / 2 ) r) (B (n+1 )) : hz
140
+ ... ≤ r : le_trans (min_le_left _ _) (min_le_right _ _)) },
125
141
{ use [x, 0 ] }},
126
142
choose center radius H using this ,
127
143
128
144
refine subset.antisymm (subset_univ _) (λx hx, _),
129
- refine metric.mem_closure_iff. 2 (λε εpos, _),
145
+ refine (mem_closure_iff_nhds_basis nhds_basis_closed_eball). 2 (λ ε εpos, _),
130
146
/- ε is positive. We have to find a point in the ball of radius ε around x belonging to all `f n`.
131
147
For this, we construct inductively a sequence `F n = (c n, r n)` such that the closed ball
132
148
`closed_ball (c n) (r n)` is included in the previous ball and in `f n`, and such that
133
149
`r n` is small enough to ensure that `c n` is a Cauchy sequence. Then `c n` converges to a
134
150
limit which belongs to all the `f n`. -/
135
- let F : ℕ → (α × ℝ ) := λn, nat.rec_on n (prod.mk x (min (ε/ 2 ) 1 ))
151
+ let F : ℕ → (α × ennreal ) := λn, nat.rec_on n (prod.mk x (min ε (B 0 ) ))
136
152
(λn p, prod.mk (center n p.1 p.2 ) (radius n p.1 p.2 )),
137
153
let c : ℕ → α := λn, (F n).1 ,
138
- let r : ℕ → ℝ := λn, (F n).2 ,
154
+ let r : ℕ → ennreal := λn, (F n).2 ,
139
155
have rpos : ∀n, r n > 0 ,
140
156
{ assume n,
141
157
induction n with n hn,
142
- exact lt_min (half_pos εpos) (zero_lt_one ),
158
+ exact lt_min εpos (Bpos 0 ),
143
159
exact (H n (c n) (r n) hn).1 },
144
160
have rB : ∀n, r n ≤ B n,
145
161
{ assume n,
@@ -148,20 +164,17 @@ begin
148
164
exact (H n (c n) (r n) (rpos n)).2 .1 },
149
165
have incl : ∀n, closed_ball (c (n+1 )) (r (n+1 )) ⊆ (closed_ball (c n) (r n)) ∩ (f n) :=
150
166
λn, (H n (c n) (r n) (rpos n)).2 .2 ,
151
- have cdist : ∀n, dist (c n) (c (n+1 )) ≤ B n,
167
+ have cdist : ∀n, edist (c n) (c (n+1 )) ≤ B n,
152
168
{ assume n,
153
- rw dist_comm,
154
- have A : c (n+1 ) ∈ closed_ball (c (n+1 )) (r (n+1 )) :=
155
- mem_closed_ball_self (le_of_lt (rpos (n+1 ))),
169
+ rw edist_comm,
170
+ have A : c (n+1 ) ∈ closed_ball (c (n+1 )) (r (n+1 )) := mem_closed_ball_self,
156
171
have I := calc
157
172
closed_ball (c (n+1 )) (r (n+1 )) ⊆ closed_ball (c n) (r n) :
158
173
subset.trans (incl n) (inter_subset_left _ _)
159
174
... ⊆ closed_ball (c n) (B n) : closed_ball_subset_closed_ball (rB n),
160
175
exact I A },
161
- have : cauchy_seq c,
162
- { refine cauchy_seq_of_le_geometric (1 /2 ) 1 (by norm_num) (λn, _),
163
- rw one_mul,
164
- exact cdist n },
176
+ have : cauchy_seq c :=
177
+ cauchy_seq_of_edist_le_geometric_two _ one_ne_top cdist,
165
178
-- as the sequence `c n` is Cauchy in a complete space, it converges to a limit `y`.
166
179
rcases cauchy_seq_tendsto_of_complete this with ⟨y, ylim⟩,
167
180
-- this point `y` will be the desired point. We will check that it belongs to all
@@ -177,16 +190,13 @@ begin
177
190
{ assume n,
178
191
refine mem_of_closed_of_tendsto (by simp) ylim is_closed_ball _,
179
192
simp only [filter.mem_at_top_sets, nonempty_of_inhabited, set.mem_preimage],
180
- exact ⟨n, λm hm, I n m hm ( mem_closed_ball_self (le_of_lt (rpos m))) ⟩ },
193
+ exact ⟨n, λm hm, I n m hm mem_closed_ball_self⟩ },
181
194
split,
182
195
show ∀n, y ∈ f n,
183
196
{ assume n,
184
197
have : closed_ball (c (n+1 )) (r (n+1 )) ⊆ f n := subset.trans (incl n) (inter_subset_right _ _),
185
198
exact this (yball (n+1 )) },
186
- show dist x y < ε, from calc
187
- dist x y = dist y x : dist_comm _ _
188
- ... ≤ r 0 : yball 0
189
- ... < ε : lt_of_le_of_lt (min_le_left _ _) (half_lt_self εpos)
199
+ show edist y x ≤ ε, from le_trans (yball 0 ) (min_le_left _ _),
190
200
end
191
201
192
202
/-- Baire theorem: a countable intersection of dense open sets is dense. Formulated here with ⋂₀. -/
@@ -272,6 +282,35 @@ begin
272
282
apply dense_Inter_of_Gδ; simp [bool.forall_bool, *]
273
283
end
274
284
285
+ /-- A property holds on a residual (comeagre) set if and only if it holds on some dense `Gδ` set. -/
286
+ lemma eventually_residual {p : α → Prop } :
287
+ (∀ᶠ x in residual α, p x) ↔ ∃ (t : set α), is_Gδ t ∧ closure t = univ ∧ ∀ x ∈ t, p x :=
288
+ calc (∀ᶠ x in residual α, p x) ↔
289
+ ∀ᶠ x in ⨅ (t : set α) (ht : is_Gδ t ∧ closure t = univ), principal t, p x :
290
+ by simp only [residual, infi_and]
291
+ ... ↔ ∃ (t : set α) (ht : is_Gδ t ∧ closure t = univ), ∀ᶠ x in principal t, p x :
292
+ mem_binfi (λ t₁ h₁ t₂ h₂, ⟨t₁ ∩ t₂, ⟨h₁.1 .inter h₂.1 , dense_inter_of_Gδ h₁.1 h₂.1 h₁.2 h₂.2 ⟩,
293
+ by simp⟩) ⟨univ, is_Gδ_univ, closure_univ⟩
294
+ ... ↔ _ : by simp [and_assoc]
295
+
296
+ /-- A set is residual (comeagre) if and only if it includes a dense `Gδ` set. -/
297
+ lemma mem_residual {s : set α} :
298
+ s ∈ residual α ↔ ∃ t ⊆ s, is_Gδ t ∧ closure t = univ :=
299
+ (@eventually_residual α _ _ (λ x, x ∈ s)).trans $ exists_congr $
300
+ λ t, by rw [exists_prop, and_comm (t ⊆ s), subset_def, and_assoc]
301
+
302
+ instance : countable_Inter_filter (residual α) :=
303
+ ⟨begin
304
+ intros S hSc hS,
305
+ simp only [mem_residual] at *,
306
+ choose T hTs hT using hS,
307
+ refine ⟨⋂ s ∈ S, T s ‹_›, _, _, _⟩,
308
+ { rw [sInter_eq_bInter],
309
+ exact Inter_subset_Inter (λ s, Inter_subset_Inter $ hTs s) },
310
+ { exact is_Gδ_bInter hSc (λ s hs, (hT s hs).1 ) },
311
+ { exact dense_bInter_of_Gδ (λ s hs, (hT s hs).1 ) hSc (λ s hs, (hT s hs).2 ) }
312
+ end ⟩
313
+
275
314
/-- Baire theorem: if countably many closed sets cover the whole space, then their interiors
276
315
are dense. Formulated here with an index set which is a countable set in any type. -/
277
316
theorem dense_bUnion_interior_of_closed {S : set β} {f : β → set α} (hc : ∀s∈S, is_closed (f s))
@@ -319,18 +358,14 @@ end
319
358
/-- One of the most useful consequences of Baire theorem: if a countable union of closed sets
320
359
covers the space, then one of the sets has nonempty interior. -/
321
360
theorem nonempty_interior_of_Union_of_closed [nonempty α] [encodable β] {f : β → set α}
322
- (hc : ∀s, is_closed (f s)) (hU : (⋃s, f s) = univ) : ∃s x ε, 0 < ε ∧ ball x ε ⊆ f s :=
361
+ (hc : ∀s, is_closed (f s)) (hU : (⋃s, f s) = univ) :
362
+ ∃s, (interior $ f s).nonempty :=
323
363
begin
324
- have : ∃s, (interior (f s)).nonempty,
325
- { by_contradiction h,
326
- simp only [not_exists, not_nonempty_iff_eq_empty] at h,
327
- have := calc ∅ = closure (⋃s, interior (f s)) : by simp [h]
328
- ... = univ : dense_Union_interior_of_closed hc hU,
329
- exact univ_nonempty.ne_empty this.symm },
330
- rcases this with ⟨s, hs⟩,
331
- rcases hs with ⟨x, hx⟩,
332
- rcases mem_nhds_iff.1 (mem_interior_iff_mem_nhds.1 hx) with ⟨ε, εpos, hε⟩,
333
- exact ⟨s, x, ε, εpos, hε⟩,
364
+ by_contradiction h,
365
+ simp only [not_exists, not_nonempty_iff_eq_empty] at h,
366
+ have := calc ∅ = closure (⋃s, interior (f s)) : by simp [h]
367
+ ... = univ : dense_Union_interior_of_closed hc hU,
368
+ exact univ_nonempty.ne_empty this.symm
334
369
end
335
370
336
371
end Baire_theorem
0 commit comments