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

Commit 1bf831f

Browse files
rwbartonmergify[bot]
authored andcommitted
refactor(topology/dense_embedding): move dense embeddings to new file (#1515)
1 parent b3eb34d commit 1bf831f

File tree

3 files changed

+247
-210
lines changed

3 files changed

+247
-210
lines changed

src/topology/constructions.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Authors: Johannes Hölzl, Mario Carneiro, Patrick Massot
66
Constructions of new topological spaces from old ones: product, sum, subtype, quotient, list, vector
77
-/
88
import topology.maps topology.subset_properties topology.separation topology.bases
9+
import topology.dense_embedding
910
noncomputable theory
1011

1112
open set filter lattice

src/topology/dense_embedding.lean

Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
/-
2+
Copyright (c) 2019 Reid Barton. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Johannes Hölzl, Mario Carneiro, Patrick Massot
5+
-/
6+
import topology.maps topology.separation
7+
8+
/-!
9+
# Dense embeddings
10+
11+
This file defines three properties of functions:
12+
13+
`dense_range f` means `f` has dense image;
14+
`dense_inducing i` means `i` is also `inducing`;
15+
`dense_embedding e` means `e` is also an `embedding`.
16+
17+
The main theorem `continuous_extend` gives a criterion for a function
18+
`f : X → Z` to a regular (T₃) space Z to extend along a dense embedding
19+
`i : X → Y` to a continuous function `g : Y → Z`. Actually `i` only
20+
has to be `dense_inducing` (not necessarily injective).
21+
22+
-/
23+
24+
noncomputable theory
25+
26+
open set filter lattice
27+
open_locale classical
28+
29+
variables {α : Type*} {β : Type*} {γ : Type*} {δ : Type*}
30+
31+
section dense_range
32+
variables [topological_space β] [topological_space γ] (f : α → β) (g : β → γ)
33+
34+
/-- `f : α → β` has dense range if its range (image) is a dense subset of β. -/
35+
def dense_range := ∀ x, x ∈ closure (range f)
36+
37+
lemma dense_range_iff_closure_eq : dense_range f ↔ closure (range f) = univ :=
38+
eq_univ_iff_forall.symm
39+
40+
variables {f}
41+
42+
lemma dense_range.comp (hg : dense_range g) (hf : dense_range f) (cg : continuous g) :
43+
dense_range (g ∘ f) :=
44+
begin
45+
have : g '' (closure $ range f) ⊆ closure (g '' range f),
46+
from image_closure_subset_closure_image cg,
47+
have : closure (g '' closure (range f)) ⊆ closure (g '' range f),
48+
by simpa [closure_closure] using (closure_mono this),
49+
intro c,
50+
rw range_comp,
51+
apply this,
52+
rw [(dense_range_iff_closure_eq f).1 hf, image_univ],
53+
exact hg c
54+
end
55+
56+
/-- If `f : α → β` has dense range and `β` contains some element, then `α` must too. -/
57+
def dense_range.inhabited (df : dense_range f) (b : β) : inhabited α :=
58+
begin
59+
have := exists_mem_of_ne_empty (mem_closure_iff.1 (df b) _ is_open_univ trivial),
60+
simp only [mem_range, univ_inter] at this,
61+
exact classical.some (classical.some_spec this),
62+
end
63+
64+
lemma dense_range.nonempty (hf : dense_range f) : nonempty α ↔ nonempty β :=
65+
⟨nonempty.map f, λ ⟨b⟩, @nonempty_of_inhabited _ (hf.inhabited b)⟩
66+
end dense_range
67+
68+
/-- `i : α → β` is "dense inducing" if it has dense range and the topology on `α`
69+
is the one induced by `i` from the topology on `β`. -/
70+
structure dense_inducing [topological_space α] [topological_space β] (i : α → β)
71+
extends inducing i : Prop :=
72+
(dense : dense_range i)
73+
74+
namespace dense_inducing
75+
variables [topological_space α] [topological_space β]
76+
variables {i : α → β} (di : dense_inducing i)
77+
78+
lemma nhds_eq_comap (di : dense_inducing i) :
79+
∀ a : α, nhds a = comap i (nhds $ i a) :=
80+
di.to_inducing.nhds_eq_comap
81+
82+
protected lemma continuous (di : dense_inducing i) : continuous i :=
83+
di.to_inducing.continuous
84+
85+
lemma closure_range : closure (range i) = univ :=
86+
(dense_range_iff_closure_eq _).mp di.dense
87+
88+
lemma self_sub_closure_image_preimage_of_open {s : set β} (di : dense_inducing i) :
89+
is_open s → s ⊆ closure (i '' (i ⁻¹' s)) :=
90+
begin
91+
intros s_op b b_in_s,
92+
rw [image_preimage_eq_inter_range, mem_closure_iff],
93+
intros U U_op b_in,
94+
rw ←inter_assoc,
95+
have ne_e : U ∩ s ≠ ∅ := ne_empty_of_mem ⟨b_in, b_in_s⟩,
96+
exact (dense_iff_inter_open.1 di.closure_range) _ (is_open_inter U_op s_op) ne_e
97+
end
98+
99+
lemma closure_image_nhds_of_nhds {s : set α} {a : α} (di : dense_inducing i) :
100+
s ∈ nhds a → closure (i '' s) ∈ nhds (i a) :=
101+
begin
102+
rw [di.nhds_eq_comap a, mem_comap_sets],
103+
intro h,
104+
rcases h with ⟨t, t_nhd, sub⟩,
105+
rw mem_nhds_sets_iff at t_nhd,
106+
rcases t_nhd with ⟨U, U_sub, ⟨U_op, e_a_in_U⟩⟩,
107+
have := calc i ⁻¹' U ⊆ i⁻¹' t : preimage_mono U_sub
108+
... ⊆ s : sub,
109+
have := calc U ⊆ closure (i '' (i ⁻¹' U)) : self_sub_closure_image_preimage_of_open di U_op
110+
... ⊆ closure (i '' s) : closure_mono (image_subset i this),
111+
have U_nhd : U ∈ nhds (i a) := mem_nhds_sets U_op e_a_in_U,
112+
exact (nhds (i a)).sets_of_superset U_nhd this
113+
end
114+
115+
variables [topological_space δ] {f : γ → α} {g : γ → δ} {h : δ → β}
116+
/--
117+
γ -f→ α
118+
g↓ ↓e
119+
δ -h→ β
120+
-/
121+
lemma tendsto_comap_nhds_nhds {d : δ} {a : α} (di : dense_inducing i) (H : tendsto h (nhds d) (nhds (i a)))
122+
(comm : h ∘ g = i ∘ f) : tendsto f (comap g (nhds d)) (nhds a) :=
123+
begin
124+
have lim1 : map g (comap g (nhds d)) ≤ nhds d := map_comap_le,
125+
replace lim1 : map h (map g (comap g (nhds d))) ≤ map h (nhds d) := map_mono lim1,
126+
rw [filter.map_map, comm, ← filter.map_map, map_le_iff_le_comap] at lim1,
127+
have lim2 : comap i (map h (nhds d)) ≤ comap i (nhds (i a)) := comap_mono H,
128+
rw ← di.nhds_eq_comap at lim2,
129+
exact le_trans lim1 lim2,
130+
end
131+
132+
protected lemma nhds_inf_neq_bot (di : dense_inducing i) {b : β} : nhds b ⊓ principal (range i) ≠ ⊥ :=
133+
begin
134+
convert di.dense b,
135+
simp [closure_eq_nhds]
136+
end
137+
138+
lemma comap_nhds_neq_bot (di : dense_inducing i) {b : β} : comap i (nhds b) ≠ ⊥ :=
139+
forall_sets_neq_empty_iff_neq_bot.mp $
140+
assume s ⟨t, ht, (hs : i ⁻¹' t ⊆ s)⟩,
141+
have t ∩ range i ∈ nhds b ⊓ principal (range i),
142+
from inter_mem_inf_sets ht (subset.refl _),
143+
let ⟨_, ⟨hx₁, y, rfl⟩⟩ := inhabited_of_mem_sets di.nhds_inf_neq_bot this in
144+
subset_ne_empty hs $ ne_empty_of_mem hx₁
145+
146+
variables [topological_space γ]
147+
148+
/-- If `i : α → β` is a dense inducing, then any function `f : α → γ` "extends"
149+
to a function `g = extend di f : β → γ`. If `γ` is Hausdorff and `f` has a
150+
continuous extension, then `g` is the unique such extension. In general,
151+
`g` might not be continuous or even extend `f`. -/
152+
def extend (di : dense_inducing i) (f : α → γ) (b : β) : γ :=
153+
@lim _ _ ⟨f (dense_range.inhabited di.dense b).default⟩ (map f (comap i (nhds b)))
154+
155+
lemma extend_eq [t2_space γ] {b : β} {c : γ} {f : α → γ} (hf : map f (comap i (nhds b)) ≤ nhds c) :
156+
di.extend f b = c :=
157+
@lim_eq _ _ (id _) _ _ _ (by simp; exact comap_nhds_neq_bot di) hf
158+
159+
lemma extend_e_eq [t2_space γ] {f : α → γ} (a : α) (hf : continuous_at f a) :
160+
di.extend f (i a) = f a :=
161+
extend_eq _ $ di.nhds_eq_comap a ▸ hf
162+
163+
lemma extend_eq_of_cont [t2_space γ] {f : α → γ} (hf : continuous f) (a : α) :
164+
di.extend f (i a) = f a :=
165+
di.extend_e_eq a (continuous_iff_continuous_at.1 hf a)
166+
167+
lemma tendsto_extend [regular_space γ] {b : β} {f : α → γ} (di : dense_inducing i)
168+
(hf : {b | ∃c, tendsto f (comap i $ nhds b) (nhds c)} ∈ nhds b) :
169+
tendsto (di.extend f) (nhds b) (nhds (di.extend f b)) :=
170+
let φ := {b | tendsto f (comap i $ nhds b) (nhds $ di.extend f b)} in
171+
have hφ : φ ∈ nhds b,
172+
from (nhds b).sets_of_superset hf $ assume b ⟨c, hc⟩,
173+
show tendsto f (comap i (nhds b)) (nhds (di.extend f b)), from (di.extend_eq hc).symm ▸ hc,
174+
assume s hs,
175+
let ⟨s'', hs''₁, hs''₂, hs''₃⟩ := nhds_is_closed hs in
176+
let ⟨s', hs'₁, (hs'₂ : i ⁻¹' s' ⊆ f ⁻¹' s'')⟩ := mem_of_nhds hφ hs''₁ in
177+
let ⟨t, (ht₁ : t ⊆ φ ∩ s'), ht₂, ht₃⟩ := mem_nhds_sets_iff.mp $ inter_mem_sets hφ hs'₁ in
178+
have h₁ : closure (f '' (i ⁻¹' s')) ⊆ s'',
179+
by rw [closure_subset_iff_subset_of_is_closed hs''₃, image_subset_iff]; exact hs'₂,
180+
have h₂ : t ⊆ di.extend f ⁻¹' closure (f '' (i ⁻¹' t)), from
181+
assume b' hb',
182+
have nhds b' ≤ principal t, by simp; exact mem_nhds_sets ht₂ hb',
183+
have map f (comap i (nhds b')) ≤ nhds (di.extend f b') ⊓ principal (f '' (i ⁻¹' t)),
184+
from calc _ ≤ map f (comap i (nhds b' ⊓ principal t)) : map_mono $ comap_mono $ le_inf (le_refl _) this
185+
... ≤ map f (comap i (nhds b')) ⊓ map f (comap i (principal t)) :
186+
le_inf (map_mono $ comap_mono $ inf_le_left) (map_mono $ comap_mono $ inf_le_right)
187+
... ≤ map f (comap i (nhds b')) ⊓ principal (f '' (i ⁻¹' t)) : by simp [le_refl]
188+
... ≤ _ : inf_le_inf ((ht₁ hb').left) (le_refl _),
189+
show di.extend f b' ∈ closure (f '' (i ⁻¹' t)),
190+
begin
191+
rw [closure_eq_nhds],
192+
apply neq_bot_of_le_neq_bot _ this,
193+
simp,
194+
exact di.comap_nhds_neq_bot
195+
end,
196+
(nhds b).sets_of_superset
197+
(show t ∈ nhds b, from mem_nhds_sets ht₂ ht₃)
198+
(calc t ⊆ di.extend f ⁻¹' closure (f '' (i ⁻¹' t)) : h₂
199+
... ⊆ di.extend f ⁻¹' closure (f '' (i ⁻¹' s')) :
200+
preimage_mono $ closure_mono $ image_subset f $ preimage_mono $ subset.trans ht₁ $ inter_subset_right _ _
201+
... ⊆ di.extend f ⁻¹' s'' : preimage_mono h₁
202+
... ⊆ di.extend f ⁻¹' s : preimage_mono hs''₂)
203+
204+
lemma continuous_extend [regular_space γ] {f : α → γ} (di : dense_inducing i)
205+
(hf : ∀b, ∃c, tendsto f (comap i (nhds b)) (nhds c)) : continuous (di.extend f) :=
206+
continuous_iff_continuous_at.mpr $ assume b, di.tendsto_extend $ univ_mem_sets' hf
207+
208+
lemma mk'
209+
(i : α → β)
210+
(c : continuous i)
211+
(dense : ∀x, x ∈ closure (range i))
212+
(H : ∀ (a:α) s ∈ nhds a,
213+
∃t ∈ nhds (i a), ∀ b, i b ∈ t → b ∈ s) :
214+
dense_inducing i :=
215+
{ induced := (induced_iff_nhds_eq i).2 $
216+
λ a, le_antisymm (tendsto_iff_comap.1 $ c.tendsto _) (by simpa [le_def] using H a),
217+
dense := dense }
218+
end dense_inducing
219+
220+
/-- A dense embedding is an embedding with dense image. -/
221+
structure dense_embedding [topological_space α] [topological_space β] (e : α → β)
222+
extends dense_inducing e : Prop :=
223+
(inj : function.injective e)
224+
225+
theorem dense_embedding.mk'
226+
[topological_space α] [topological_space β] (e : α → β)
227+
(c : continuous e)
228+
(dense : ∀x, x ∈ closure (range e))
229+
(inj : function.injective e)
230+
(H : ∀ (a:α) s ∈ nhds a,
231+
∃t ∈ nhds (e a), ∀ b, e b ∈ t → b ∈ s) :
232+
dense_embedding e :=
233+
{ inj := inj,
234+
..dense_inducing.mk' e c dense H}
235+
236+
namespace dense_embedding
237+
variables [topological_space α] [topological_space β]
238+
variables {e : α → β} (de : dense_embedding e)
239+
240+
lemma inj_iff {x y} : e x = e y ↔ x = y := de.inj.eq_iff
241+
242+
lemma to_embedding : embedding e :=
243+
{ induced := de.induced,
244+
inj := de.inj }
245+
end dense_embedding

0 commit comments

Comments
 (0)