Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 49b7f94

Browse files
feat(topology/perfect): Schemes, embedding of the Cantor space (#18248)
Add to `topology.perfect` the following theorem: In a complete metric space, any nonempty perfect set admits a continuous embedding of the Cantor space. The proof uses an object which in descriptive set theory is sometimes called a "scheme". Some attempt was made to include in `topology.metric_space.cantor_scheme` a general theory of these schemes, since they should be useful down the line in other results as well. We also define `pi_nat.res` in `topology.metric_space.pi_nat`.
1 parent 13bf761 commit 49b7f94

3 files changed

Lines changed: 370 additions & 5 deletions

File tree

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
/-
2+
Copyright (c) 2023 Felix Weilacher. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Felix Weilacher
5+
-/
6+
import topology.metric_space.pi_nat
7+
8+
/-!
9+
# (Topological) Schemes and their induced maps
10+
11+
In topology, and especially descriptive set theory, one often constructs functions `(ℕ → β) → α`,
12+
where α is some topological space and β is a discrete space, as an appropriate limit of some map
13+
`list β → set α`. We call the latter type of map a "`β`-scheme on `α`".
14+
15+
This file develops the basic, abstract theory of these schemes and the functions they induce.
16+
17+
## Main Definitions
18+
19+
* `cantor_scheme.induced_map A` : The aforementioned "limit" of a scheme `A : list β → set α`.
20+
This is a partial function from `ℕ → β` to `a`,
21+
implemented here as an object of type `Σ s : set (ℕ → β), s → α`.
22+
That is, `(induced_map A).1` is the domain and `(induced_map A).2` is the function.
23+
24+
## Implementation Notes
25+
26+
We consider end-appending to be the fundamental way to build lists (say on `β`) inductively,
27+
as this interacts better with the topology on `ℕ → β`.
28+
As a result, functions like `list.nth` or `stream.take` do not have their intended meaning
29+
in this file. See instead `pi_nat.res`.
30+
31+
## References
32+
33+
* [kechris1995] (Chapters 6-7)
34+
35+
## Tags
36+
37+
scheme, cantor scheme, lusin scheme, approximation.
38+
39+
-/
40+
41+
namespace cantor_scheme
42+
43+
open list function filter set pi_nat
44+
open_locale classical topology
45+
46+
variables {β α : Type*} (A : list β → set α)
47+
48+
/-- From a `β`-scheme on `α` `A`, we define a partial function from `(ℕ → β)` to `α`
49+
which sends each infinite sequence `x` to an element of the intersection along the
50+
branch corresponding to `x`, if it exists.
51+
We call this the map induced by the scheme. -/
52+
noncomputable def induced_map : Σ s : set (ℕ → β), s → α :=
53+
⟨λ x, set.nonempty ⋂ n : ℕ, A (res x n), λ x, x.property.some⟩
54+
55+
section topology
56+
57+
/-- A scheme is antitone if each set contains its children. -/
58+
protected def antitone : Prop := ∀ l : list β, ∀ a : β, A (a :: l) ⊆ A l
59+
60+
/-- A useful strengthening of being antitone is to require that each set contains
61+
the closure of each of its children. -/
62+
def closure_antitone [topological_space α] : Prop :=
63+
∀ l : list β, ∀ a : β, closure (A (a :: l)) ⊆ A l
64+
65+
/-- A scheme is disjoint if the children of each set of pairwise disjoint. -/
66+
protected def disjoint : Prop :=
67+
∀ l : list β, _root_.pairwise $ λ a b, disjoint (A (a :: l)) (A (b :: l))
68+
69+
variable {A}
70+
71+
/-- If `x` is in the domain of the induced map of a scheme `A`,
72+
its image under this map is in each set along the corresponding branch. -/
73+
lemma map_mem (x : (induced_map A).1) (n : ℕ) :
74+
(induced_map A).2 x ∈ A (res x n) :=
75+
begin
76+
have := x.property.some_mem,
77+
rw mem_Inter at this,
78+
exact this n,
79+
end
80+
81+
protected lemma closure_antitone.antitone [topological_space α] (hA : closure_antitone A) :
82+
cantor_scheme.antitone A :=
83+
λ l a, subset_closure.trans (hA l a)
84+
85+
protected lemma antitone.closure_antitone [topological_space α] (hanti : cantor_scheme.antitone A)
86+
(hclosed : ∀ l, is_closed (A l)) : closure_antitone A :=
87+
λ l a, (hclosed _).closure_eq.subset.trans (hanti _ _)
88+
89+
/-- A scheme where the children of each set are pairwise disjoint induces an injective map. -/
90+
theorem disjoint.map_injective (hA : cantor_scheme.disjoint A) : injective (induced_map A).2 :=
91+
begin
92+
rintros ⟨x, hx⟩ ⟨y, hy⟩ hxy,
93+
refine subtype.coe_injective (res_injective _),
94+
dsimp,
95+
ext n : 1,
96+
induction n with n ih, { simp },
97+
simp only [res_succ],
98+
refine ⟨_, ih⟩,
99+
contrapose hA,
100+
simp only [cantor_scheme.disjoint, _root_.pairwise, ne.def, not_forall, exists_prop],
101+
refine ⟨res x n, _, _, hA, _⟩,
102+
rw not_disjoint_iff,
103+
refine ⟨(induced_map A).2 ⟨x, hx⟩, _, _⟩,
104+
{ rw ← res_succ,
105+
apply map_mem, },
106+
rw [hxy, ih, ← res_succ],
107+
apply map_mem,
108+
end
109+
110+
end topology
111+
112+
section metric
113+
114+
variable [pseudo_metric_space α]
115+
116+
variable (A)
117+
118+
/-- A scheme on a metric space has vanishing diameter if diameter approaches 0 along each branch. -/
119+
def vanishing_diam : Prop :=
120+
∀ x : ℕ → β, tendsto (λ n : ℕ, emetric.diam (A (res x n))) at_top (𝓝 0)
121+
122+
variable {A}
123+
124+
lemma vanishing_diam.dist_lt (hA : vanishing_diam A) (ε : ℝ) (ε_pos : 0 < ε) (x : ℕ → β) :
125+
∃ n : ℕ, ∀ y z ∈ A (res x n), dist y z < ε :=
126+
begin
127+
specialize hA x,
128+
rw ennreal.tendsto_at_top_zero at hA,
129+
cases hA (ennreal.of_real (ε / 2))
130+
(by { simp only [gt_iff_lt, ennreal.of_real_pos], linarith }) with n hn,
131+
use n,
132+
intros y hy z hz,
133+
rw [← ennreal.of_real_lt_of_real_iff ε_pos, ← edist_dist],
134+
apply lt_of_le_of_lt (emetric.edist_le_diam_of_mem hy hz),
135+
apply lt_of_le_of_lt (hn _ (le_refl _)),
136+
rw ennreal.of_real_lt_of_real_iff ε_pos,
137+
linarith,
138+
end
139+
140+
/-- A scheme with vanishing diameter along each branch induces a continuous map. -/
141+
theorem vanishing_diam.map_continuous [topological_space β] [discrete_topology β]
142+
(hA : vanishing_diam A) : continuous (induced_map A).2 :=
143+
begin
144+
rw metric.continuous_iff',
145+
rintros ⟨x, hx⟩ ε ε_pos,
146+
cases hA.dist_lt _ ε_pos x with n hn,
147+
rw _root_.eventually_nhds_iff,
148+
refine ⟨coe ⁻¹' cylinder x n, _, _, by simp⟩,
149+
{ rintros ⟨y, hy⟩ hyx,
150+
rw [mem_preimage, subtype.coe_mk, cylinder_eq_res, mem_set_of] at hyx,
151+
apply hn,
152+
{ rw ← hyx,
153+
apply map_mem, },
154+
apply map_mem, },
155+
apply continuous_subtype_coe.is_open_preimage,
156+
apply is_open_cylinder,
157+
end
158+
159+
/-- A scheme on a complete space with vanishing diameter
160+
such that each set contains the closure of its children
161+
induces a total map. -/
162+
theorem closure_antitone.map_of_vanishing_diam [complete_space α]
163+
(hdiam : vanishing_diam A) (hanti : closure_antitone A) (hnonempty : ∀ l, (A l).nonempty) :
164+
(induced_map A).1 = univ :=
165+
begin
166+
rw eq_univ_iff_forall,
167+
intro x,
168+
choose u hu using λ n, hnonempty (res x n),
169+
have umem : ∀ n m : ℕ, n ≤ m → u m ∈ A (res x n),
170+
{ have : antitone (λ n : ℕ, A (res x n)),
171+
{ refine antitone_nat_of_succ_le _,
172+
intro n,
173+
apply hanti.antitone, },
174+
intros n m hnm,
175+
exact this hnm (hu _), },
176+
have : cauchy_seq u,
177+
{ rw metric.cauchy_seq_iff,
178+
intros ε ε_pos,
179+
cases hdiam.dist_lt _ ε_pos x with n hn,
180+
use n,
181+
intros m₀ hm₀ m₁ hm₁,
182+
apply hn; apply umem; assumption, },
183+
cases cauchy_seq_tendsto_of_complete this with y hy,
184+
use y,
185+
rw mem_Inter,
186+
intro n,
187+
apply hanti _ (x n),
188+
apply mem_closure_of_tendsto hy,
189+
rw eventually_at_top,
190+
exact ⟨n.succ, umem _⟩,
191+
end
192+
193+
end metric
194+
195+
end cantor_scheme

src/topology/metric_space/pi_nat.lean

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,60 @@ lemma update_mem_cylinder (x : Π n, E n) (n : ℕ) (y : E n) :
196196
update x n y ∈ cylinder x n :=
197197
mem_cylinder_iff.2 (λ i hi, by simp [hi.ne])
198198

199+
section res
200+
201+
variable {α : Type*}
202+
open list
203+
204+
/-- In the case where `E` has constant value `α`,
205+
the cylinder `cylinder x n` can be identified with the element of `list α`
206+
consisting of the first `n` entries of `x`. See `cylinder_eq_res`.
207+
We call this list `res x n`, the restriction of `x` to `n`.-/
208+
def res (x : ℕ → α) : ℕ → list α
209+
| 0 := nil
210+
| (nat.succ n) := x n :: res n
211+
212+
@[simp] lemma res_zero (x : ℕ → α) : res x 0 = @nil α := rfl
213+
@[simp] lemma res_succ (x : ℕ → α) (n : ℕ) : res x n.succ = x n :: res x n := rfl
214+
215+
@[simp] lemma res_length (x : ℕ → α) (n : ℕ) : (res x n).length = n :=
216+
by induction n; simp [*]
217+
218+
/-- The restrictions of `x` and `y` to `n` are equal if and only if `x m = y m` for all `m < n`.-/
219+
lemma res_eq_res {x y : ℕ → α} {n : ℕ} : res x n = res y n ↔ ∀ ⦃m⦄, m < n → x m = y m :=
220+
begin
221+
split; intro h; induction n with n ih, { simp },
222+
{ intros m hm,
223+
rw nat.lt_succ_iff_lt_or_eq at hm,
224+
simp only [res_succ] at h,
225+
cases hm with hm hm,
226+
{ exact ih h.2 hm },
227+
rw hm,
228+
exact h.1, },
229+
{ simp },
230+
simp only [res_succ],
231+
refine ⟨h (nat.lt_succ_self _), ih (λ m hm, _)⟩,
232+
exact h (hm.trans (nat.lt_succ_self _)),
233+
end
234+
235+
lemma res_injective : injective (@res α) :=
236+
begin
237+
intros x y h,
238+
ext n,
239+
apply (res_eq_res).mp _ (nat.lt_succ_self _),
240+
rw h,
241+
end
242+
243+
/-- `cylinder x n` is equal to the set of sequences `y` with the same restriction to `n` as `x`.-/
244+
theorem cylinder_eq_res (x : ℕ → α) (n : ℕ) : cylinder x n = {y | res y n = res x n} :=
245+
begin
246+
ext y,
247+
dsimp [cylinder],
248+
rw res_eq_res,
249+
end
250+
251+
end res
252+
199253
/-!
200254
### A distance function on `Π n, E n`
201255
@@ -305,13 +359,18 @@ end
305359

306360
variables (E) [∀ n, topological_space (E n)] [∀ n, discrete_topology (E n)]
307361

308-
lemma is_topological_basis_cylinders :
362+
lemma is_open_cylinder (x : Π n, E n) (n : ℕ) : is_open (cylinder x n) :=
363+
begin
364+
rw pi_nat.cylinder_eq_pi,
365+
exact is_open_set_pi (finset.range n).finite_to_set (λ a ha, is_open_discrete _),
366+
end
367+
368+
lemma is_topological_basis_cylinders :
309369
is_topological_basis {s : set (Π n, E n) | ∃ (x : Π n, E n) (n : ℕ), s = cylinder x n} :=
310370
begin
311371
apply is_topological_basis_of_open_of_nhds,
312372
{ rintros u ⟨x, n, rfl⟩,
313-
rw cylinder_eq_pi,
314-
exact is_open_set_pi (finset.range n).finite_to_set (λ a ha, is_open_discrete _) },
373+
apply is_open_cylinder, },
315374
{ assume x u hx u_open,
316375
obtain ⟨v, ⟨U, F, hUF, rfl⟩, xU, Uu⟩ : ∃ (v : set (Π (i : ℕ), E i))
317376
(H : v ∈ {S : set (Π (i : ℕ), E i) | ∃ (U : Π (i : ℕ), set (E i)) (F : finset ℕ),

0 commit comments

Comments
 (0)