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

Commit f55a284

Browse files
committed
feat(topology): normal topological space with second countable topology is metrizable (#10402)
Also prove that a regular topological space with second countable topology is a normal space.
1 parent ee71ddf commit f55a284

File tree

9 files changed

+303
-27
lines changed

9 files changed

+303
-27
lines changed

src/logic/is_empty.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,9 @@ lemma is_empty_or_nonempty : is_empty α ∨ nonempty α :=
120120

121121
@[simp] lemma not_is_empty_of_nonempty [h : nonempty α] : ¬ is_empty α :=
122122
not_is_empty_iff.mpr h
123+
124+
variable {α}
125+
126+
lemma function.extend_of_empty [is_empty α] (f : α → β) (g : α → γ) (h : β → γ) :
127+
function.extend f g h = h :=
128+
funext $ λ x, function.extend_apply' _ _ _ $ λ ⟨a, h⟩, is_empty_elim a

src/topology/bases.lean

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ protected lemma is_topological_basis.is_open {s : set α} {b : set (set α)}
130130
(hb : is_topological_basis b) (hs : s ∈ b) : is_open s :=
131131
by { rw hb.eq_generate_from, exact generate_open.basic s hs }
132132

133+
protected lemma is_topological_basis.mem_nhds {a : α} {s : set α} {b : set (set α)}
134+
(hb : is_topological_basis b) (hs : s ∈ b) (ha : a ∈ s) : s ∈ 𝓝 a :=
135+
(hb.is_open hs).mem_nhds ha
136+
133137
lemma is_topological_basis.exists_subset_of_mem_open {b : set (set α)}
134138
(hb : is_topological_basis b) {a:α} {u : set α} (au : a ∈ u)
135139
(ou : is_open u) : ∃v ∈ b, a ∈ v ∧ v ⊆ u :=

src/topology/continuous_function/bounded.lean

Lines changed: 75 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ the uniform distance.
1717
noncomputable theory
1818
open_locale topological_space classical nnreal
1919

20-
open set filter metric
20+
open set filter metric function
2121

2222
universes u v w
2323
variables {α : Type u} {β : Type v} {γ : Type w}
@@ -55,9 +55,14 @@ by { cases f, cases g, congr, ext, exact H x, }
5555
lemma ext_iff : f = g ↔ ∀ x, f x = g x :=
5656
⟨λ h, λ x, h ▸ rfl, ext⟩
5757

58-
lemma bounded_range : bounded (range f) :=
58+
lemma coe_injective : @injective (α →ᵇ β) (α → β) coe_fn := λ f g h, ext $ congr_fun h
59+
60+
lemma bounded_range (f : α →ᵇ β) : bounded (range f) :=
5961
bounded_range_iff.2 f.bounded
6062

63+
lemma bounded_image (f : α →ᵇ β) (s : set α) : bounded (f '' s) :=
64+
f.bounded_range.mono $ image_subset_range _ _
65+
6166
lemma eq_of_empty [is_empty α] (f g : α →ᵇ β) : f = g :=
6267
ext $ is_empty.elim ‹_›
6368

@@ -103,16 +108,9 @@ lemma dist_eq : dist f g = Inf {C | 0 ≤ C ∧ ∀ x : α, dist (f x) (g x) ≤
103108

104109
lemma dist_set_exists : ∃ C, 0 ≤ C ∧ ∀ x : α, dist (f x) (g x) ≤ C :=
105110
begin
106-
refine if h : nonempty α then _ else0, le_refl _, λ x, h.elim ⟨x⟩⟩,
107-
cases h with x,
108-
rcases f.bounded with ⟨Cf, hCf : ∀ x y, dist (f x) (f y) ≤ Cf⟩,
109-
rcases g.bounded with ⟨Cg, hCg : ∀ x y, dist (g x) (g y) ≤ Cg⟩,
110-
let C := max 0 (dist (f x) (g x) + (Cf + Cg)),
111-
refine ⟨C, le_max_left _ _, λ y, _⟩,
112-
calc dist (f y) (g y) ≤ dist (f x) (g x) + (dist (f x) (f y) + dist (g x) (g y)) :
113-
dist_triangle4_left _ _ _ _
114-
... ≤ dist (f x) (g x) + (Cf + Cg) : by mono*
115-
... ≤ C : le_max_right _ _
111+
rcases f.bounded_range.union g.bounded_range with ⟨C, hC⟩,
112+
refine ⟨max 0 C, le_max_left _ _, λ x, (hC _ _ _ _).trans (le_max_right _ _)⟩;
113+
[left, right]; apply mem_range_self
116114
end
117115

118116
/-- The pointwise distance is controlled by the distance between functions, by definition. -/
@@ -177,6 +175,13 @@ instance : metric_space (α →ᵇ β) :=
177175
lemma dist_zero_of_empty [is_empty α] : dist f g = 0 :=
178176
dist_eq_zero.2 (eq_of_empty f g)
179177

178+
lemma dist_eq_supr : dist f g = ⨆ x : α, dist (f x) (g x) :=
179+
begin
180+
casesI is_empty_or_nonempty α, { rw [supr_of_empty', real.Sup_empty, dist_zero_of_empty] },
181+
refine (dist_le_iff_of_nonempty.mpr $ le_csupr _).antisymm (csupr_le dist_coe_le_dist),
182+
exact dist_set_exists.imp (λ C hC, forall_range_iff.2 hC.2)
183+
end
184+
180185
variables (α) {β}
181186

182187
/-- Constant as a continuous bounded function. -/
@@ -294,6 +299,64 @@ lemma continuous_comp {G : β → γ} {C : ℝ≥0} (H : lipschitz_with C G) :
294299
def cod_restrict (s : set β) (f : α →ᵇ β) (H : ∀x, f x ∈ s) : α →ᵇ s :=
295300
⟨⟨s.cod_restrict f H, continuous_subtype_mk _ f.continuous⟩, f.bounded⟩
296301

302+
section extend
303+
304+
variables {δ : Type*} [topological_space δ] [discrete_topology δ]
305+
306+
/-- A version of `function.extend` for bounded continuous maps. We assume that the domain has
307+
discrete topology, so we only need to verify boundedness. -/
308+
def extend (f : α ↪ δ) (g : α →ᵇ β) (h : δ →ᵇ β) : δ →ᵇ β :=
309+
{ to_fun := extend f g h,
310+
continuous_to_fun := continuous_of_discrete_topology,
311+
bounded' :=
312+
begin
313+
rw [← bounded_range_iff, range_extend f.injective, metric.bounded_union],
314+
exact ⟨g.bounded_range, h.bounded_image _⟩
315+
end }
316+
317+
@[simp] lemma extend_apply (f : α ↪ δ) (g : α →ᵇ β) (h : δ →ᵇ β) (x : α) :
318+
extend f g h (f x) = g x :=
319+
extend_apply f.injective _ _ _
320+
321+
@[simp] lemma extend_comp (f : α ↪ δ) (g : α →ᵇ β) (h : δ →ᵇ β) : extend f g h ∘ f = g :=
322+
extend_comp f.injective _ _
323+
324+
lemma extend_apply' {f : α ↪ δ} {x : δ} (hx : x ∉ range f) (g : α →ᵇ β) (h : δ →ᵇ β) :
325+
extend f g h x = h x :=
326+
extend_apply' _ _ _ hx
327+
328+
lemma extend_of_empty [is_empty α] (f : α ↪ δ) (g : α →ᵇ β) (h : δ →ᵇ β) :
329+
extend f g h = h :=
330+
coe_injective $ function.extend_of_empty f g h
331+
332+
@[simp] lemma dist_extend_extend (f : α ↪ δ) (g₁ g₂ : α →ᵇ β) (h₁ h₂ : δ →ᵇ β) :
333+
dist (g₁.extend f h₁) (g₂.extend f h₂) =
334+
max (dist g₁ g₂) (dist (h₁.restrict (range f)ᶜ) (h₂.restrict (range f)ᶜ)) :=
335+
begin
336+
refine le_antisymm ((dist_le $ le_max_iff.2 $ or.inl dist_nonneg).2 $ λ x, _) (max_le _ _),
337+
{ rcases em (∃ y, f y = x) with (⟨x, rfl⟩|hx),
338+
{ simp only [extend_apply],
339+
exact (dist_coe_le_dist x).trans (le_max_left _ _) },
340+
{ simp only [extend_apply' hx],
341+
lift x to ((range f)ᶜ : set δ) using hx,
342+
calc dist (h₁ x) (h₂ x) = dist (h₁.restrict (range f)ᶜ x) (h₂.restrict (range f)ᶜ x) : rfl
343+
... ≤ dist (h₁.restrict (range f)ᶜ) (h₂.restrict (range f)ᶜ) : dist_coe_le_dist x
344+
... ≤ _ : le_max_right _ _ } },
345+
{ refine (dist_le dist_nonneg).2 (λ x, _),
346+
rw [← extend_apply f g₁ h₁, ← extend_apply f g₂ h₂],
347+
exact dist_coe_le_dist _ },
348+
{ refine (dist_le dist_nonneg).2 (λ x, _),
349+
calc dist (h₁ x) (h₂ x) = dist (extend f g₁ h₁ x) (extend f g₂ h₂ x) :
350+
by rw [extend_apply' x.coe_prop, extend_apply' x.coe_prop]
351+
... ≤ _ : dist_coe_le_dist _ }
352+
end
353+
354+
lemma isometry_extend (f : α ↪ δ) (h : δ →ᵇ β) :
355+
isometry (λ g : α →ᵇ β, extend f g h) :=
356+
isometry_emetric_iff_metric.2 $ λ g₁ g₂, by simp [dist_nonneg]
357+
358+
end extend
359+
297360
end basics
298361

299362
section arzela_ascoli

src/topology/metric_space/basic.lean

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1700,19 +1700,20 @@ alias bounded_closure_of_bounded ← metric.bounded.closure
17001700
@[simp] lemma bounded_closure_iff : bounded (closure s) ↔ bounded s :=
17011701
⟨λ h, h.mono subset_closure, λ h, h.closure⟩
17021702

1703-
/-- The union of two bounded sets is bounded iff each of the sets is bounded -/
1704-
@[simp] lemma bounded_union :
1705-
bounded (s ∪ t) ↔ bounded s ∧ bounded t :=
1706-
⟨λh, ⟨h.mono (by simp), h.mono (by simp)⟩,
1703+
/-- The union of two bounded sets is bounded. -/
1704+
lemma bounded.union (hs : bounded s) (ht : bounded t) : bounded (s ∪ t) :=
17071705
begin
1708-
rintro ⟨hs, ht⟩,
17091706
refine bounded_iff_mem_bounded.2 (λ x _, _),
17101707
rw bounded_iff_subset_ball x at hs ht ⊢,
17111708
rcases hs with ⟨Cs, hCs⟩, rcases ht with ⟨Ct, hCt⟩,
17121709
exact ⟨max Cs Ct, union_subset
17131710
(subset.trans hCs $ closed_ball_subset_closed_ball $ le_max_left _ _)
17141711
(subset.trans hCt $ closed_ball_subset_closed_ball $ le_max_right _ _)⟩,
1715-
end
1712+
end
1713+
1714+
/-- The union of two sets is bounded iff each of the sets is bounded. -/
1715+
@[simp] lemma bounded_union : bounded (s ∪ t) ↔ bounded s ∧ bounded t :=
1716+
⟨λ h, ⟨h.mono (by simp), h.mono (by simp)⟩, λ h, h.1.union h.2
17161717

17171718
/-- A finite union of bounded sets is bounded -/
17181719
lemma bounded_bUnion {I : set β} {s : β → set α} (H : finite I) :

src/topology/metric_space/gromov_hausdorff_realized.lean

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,13 @@ technical lemmas -/
286286

287287
lemma HD_below_aux1 {f : Cb X Y} (C : ℝ) {x : X} :
288288
bdd_below (range (λ (y : Y), f (inl x, inr y) + C)) :=
289-
let ⟨cf, hcf⟩ := (real.bounded_iff_bdd_below_bdd_above.1 bounded_range).1 in
289+
let ⟨cf, hcf⟩ := (real.bounded_iff_bdd_below_bdd_above.1 f.bounded_range).1 in
290290
⟨cf + C, forall_range_iff.2 (λi, add_le_add_right ((λx, hcf (mem_range_self x)) _) _)⟩
291291

292292
private lemma HD_bound_aux1 (f : Cb X Y) (C : ℝ) :
293293
bdd_above (range (λ (x : X), ⨅ y, f (inl x, inr y) + C)) :=
294294
begin
295-
rcases (real.bounded_iff_bdd_below_bdd_above.1 bounded_range).2 with ⟨Cf, hCf⟩,
295+
rcases (real.bounded_iff_bdd_below_bdd_above.1 f.bounded_range).2 with ⟨Cf, hCf⟩,
296296
refine ⟨Cf + C, forall_range_iff.2 (λx, _)⟩,
297297
calc (⨅ y, f (inl x, inr y) + C) ≤ f (inl x, inr (default Y)) + C :
298298
cinfi_le (HD_below_aux1 C) (default Y)
@@ -301,13 +301,13 @@ end
301301

302302
lemma HD_below_aux2 {f : Cb X Y} (C : ℝ) {y : Y} :
303303
bdd_below (range (λ (x : X), f (inl x, inr y) + C)) :=
304-
let ⟨cf, hcf⟩ := (real.bounded_iff_bdd_below_bdd_above.1 bounded_range).1 in
304+
let ⟨cf, hcf⟩ := (real.bounded_iff_bdd_below_bdd_above.1 f.bounded_range).1 in
305305
⟨cf + C, forall_range_iff.2 (λi, add_le_add_right ((λx, hcf (mem_range_self x)) _) _)⟩
306306

307307
private lemma HD_bound_aux2 (f : Cb X Y) (C : ℝ) :
308308
bdd_above (range (λ (y : Y), ⨅ x, f (inl x, inr y) + C)) :=
309309
begin
310-
rcases (real.bounded_iff_bdd_below_bdd_above.1 bounded_range).2 with ⟨Cf, hCf⟩,
310+
rcases (real.bounded_iff_bdd_below_bdd_above.1 f.bounded_range).2 with ⟨Cf, hCf⟩,
311311
refine ⟨Cf + C, forall_range_iff.2 (λy, _)⟩,
312312
calc (⨅ x, f (inl x, inr y) + C) ≤ f (inl (default X), inr y) + C :
313313
cinfi_le (HD_below_aux2 C) (default X)
@@ -355,9 +355,9 @@ prove separately inequalities controlling the two terms (relying too heavily on
355355
private lemma HD_lipschitz_aux1 (f g : Cb X Y) :
356356
(⨆ x, ⨅ y, f (inl x, inr y)) ≤ (⨆ x, ⨅ y, g (inl x, inr y)) + dist f g :=
357357
begin
358-
rcases (real.bounded_iff_bdd_below_bdd_above.1 bounded_range).1 with ⟨cg, hcg⟩,
358+
rcases (real.bounded_iff_bdd_below_bdd_above.1 g.bounded_range).1 with ⟨cg, hcg⟩,
359359
have Hcg : ∀ x, cg ≤ g x := λx, hcg (mem_range_self x),
360-
rcases (real.bounded_iff_bdd_below_bdd_above.1 bounded_range).1 with ⟨cf, hcf⟩,
360+
rcases (real.bounded_iff_bdd_below_bdd_above.1 f.bounded_range).1 with ⟨cf, hcf⟩,
361361
have Hcf : ∀ x, cf ≤ f x := λx, hcf (mem_range_self x),
362362

363363
-- prove the inequality but with `dist f g` inside, by using inequalities comparing
@@ -384,9 +384,9 @@ end
384384
private lemma HD_lipschitz_aux2 (f g : Cb X Y) :
385385
(⨆ y, ⨅ x, f (inl x, inr y)) ≤ (⨆ y, ⨅ x, g (inl x, inr y)) + dist f g :=
386386
begin
387-
rcases (real.bounded_iff_bdd_below_bdd_above.1 bounded_range).1 with ⟨cg, hcg⟩,
387+
rcases (real.bounded_iff_bdd_below_bdd_above.1 g.bounded_range).1 with ⟨cg, hcg⟩,
388388
have Hcg : ∀ x, cg ≤ g x := λx, hcg (mem_range_self x),
389-
rcases (real.bounded_iff_bdd_below_bdd_above.1 bounded_range).1 with ⟨cf, hcf⟩,
389+
rcases (real.bounded_iff_bdd_below_bdd_above.1 f.bounded_range).1 with ⟨cf, hcf⟩,
390390
have Hcf : ∀ x, cf ≤ f x := λx, hcf (mem_range_self x),
391391

392392
-- prove the inequality but with `dist f g` inside, by using inequalities comparing

src/topology/metric_space/isometry.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,11 @@ theorem isometry.uniform_embedding [pseudo_emetric_space β] {f : α → β} (hf
123123
uniform_embedding f :=
124124
hf.antilipschitz.uniform_embedding hf.lipschitz.uniform_continuous
125125

126+
/-- An isometry from a metric space is an embedding -/
127+
theorem isometry.embedding [pseudo_emetric_space β] {f : α → β} (hf : isometry f) :
128+
embedding f :=
129+
hf.uniform_embedding.embedding
130+
126131
/-- An isometry from a complete emetric space is a closed embedding -/
127132
theorem isometry.closed_embedding [complete_space α] [emetric_space β]
128133
{f : α → β} (hf : isometry f) : closed_embedding f :=
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
/-
2+
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Yury Kudryashov
5+
-/
6+
import topology.urysohns_lemma
7+
import topology.continuous_function.bounded
8+
9+
/-!
10+
# Metrizability of a normal topological space with second countable topology
11+
12+
In this file we show that a normal topological space with second countable topology `X` is
13+
metrizable: there exists a metric space structure that generates the same topology.
14+
15+
First we prove that `X` can be embedded into `l^∞`, then use this embedding to pull back the metric
16+
space structure.
17+
-/
18+
19+
open set filter metric
20+
open_locale bounded_continuous_function filter topological_space
21+
22+
namespace topological_space
23+
24+
variables (X : Type*) [topological_space X] [normal_space X] [second_countable_topology X]
25+
26+
/-- A normal topological space with second countable topology can be embedded into `l^∞ = ℕ →ᵇ ℝ`.
27+
-/
28+
lemma exists_embedding_l_infty : ∃ f : X → (ℕ →ᵇ ℝ), embedding f :=
29+
begin
30+
-- Choose a countable basis, and consider the set `s` of pairs of set `(U, V)` such that `U ∈ B`,
31+
-- `V ∈ B`, and `closure U ⊆ V`.
32+
rcases exists_countable_basis X with ⟨B, hBc, -, hB⟩,
33+
set s : set (set X × set X) := {UV ∈ B.prod B| closure UV.1 ⊆ UV.2},
34+
-- `s` is a countable set.
35+
haveI : encodable s := ((hBc.prod hBc).mono (inter_subset_left _ _)).to_encodable,
36+
-- We don't have the space of bounded (possibly discontinuous) functions, so we equip `s`
37+
-- with the discrete topology and deal with `s →ᵇ ℝ` instead.
38+
letI : topological_space s := ⊥, haveI : discrete_topology s := ⟨rfl⟩,
39+
suffices : ∃ f : X → (s →ᵇ ℝ), embedding f,
40+
{ rcases this with ⟨f, hf⟩,
41+
exact ⟨λ x, (f x).extend (encodable.encode' s) 0, (bounded_continuous_function.isometry_extend
42+
(encodable.encode' s) (0 : ℕ →ᵇ ℝ)).embedding.comp hf⟩ },
43+
have hd : ∀ UV : s, disjoint (closure UV.1.1) (UV.1.2ᶜ) :=
44+
λ UV, disjoint_compl_right.mono_right (compl_subset_compl.2 UV.2.2),
45+
-- Choose a sequence of `εₙ > 0`, `n : s`, that is bounded above by `1` and tends to zero
46+
-- along the `cofinite` filter.
47+
obtain ⟨ε, ε01, hε⟩ : ∃ ε : s → ℝ, (∀ UV, ε UV ∈ Ioc (0 : ℝ) 1) ∧ tendsto ε cofinite (𝓝 0),
48+
{ rcases pos_sum_of_encodable zero_lt_one s with ⟨ε, ε0, c, hεc, hc1⟩,
49+
refine ⟨ε, λ UV, ⟨ε0 UV, _⟩, hεc.summable.tendsto_cofinite_zero⟩,
50+
exact (le_has_sum hεc UV $ λ _ _, (ε0 _).le).trans hc1 },
51+
/- For each `UV = (U, V) ∈ s` we use Urysohn's lemma to choose a function `f UV` that is equal to
52+
zero on `U` and is equal to `ε UV` on the complement to `V`. -/
53+
have : ∀ UV : s, ∃ f : C(X, ℝ), eq_on f 0 UV.1.1 ∧ eq_on f (λ _, ε UV) UV.1.2ᶜ ∧
54+
∀ x, f x ∈ Icc 0 (ε UV),
55+
{ intro UV,
56+
rcases exists_continuous_zero_one_of_closed is_closed_closure
57+
(hB.is_open UV.2.1.2).is_closed_compl (hd UV) with ⟨f, hf₀, hf₁, hf01⟩,
58+
exact ⟨ε UV • f, λ x hx, by simp [hf₀ (subset_closure hx)], λ x hx, by simp [hf₁ hx],
59+
λ x, ⟨mul_nonneg (ε01 _).1.le (hf01 _).1, mul_le_of_le_one_right (ε01 _).1.le (hf01 _).2⟩⟩ },
60+
choose f hf0 hfε hf0ε,
61+
have hf01 : ∀ UV x, f UV x ∈ Icc (0 : ℝ) 1,
62+
from λ UV x, Icc_subset_Icc_right (ε01 _).2 (hf0ε _ _),
63+
/- The embedding is given by `F x UV = f UV x`. -/
64+
set F : X → s →ᵇ ℝ := λ x, ⟨⟨λ UV, f UV x, continuous_of_discrete_topology⟩, 1, λ UV₁ UV₂,
65+
real.dist_le_of_mem_Icc_01 (hf01 _ _) (hf01 _ _)⟩,
66+
have hF : ∀ x UV, F x UV = f UV x := λ _ _, rfl,
67+
refine ⟨F, embedding.mk' _ (λ x y hxy, _) (λ x, le_antisymm _ _)⟩,
68+
{ /- First we prove that `F` is injective. Indeed, if `F x = F y` and `x ≠ y`, then we can find
69+
`(U, V) ∈ s` such that `x ∈ U` and `y ∉ V`, hence `F x UV = 0 ≠ ε UV = F y UV`. -/
70+
refine not_not.1 (λ Hne, _), -- `by_contra Hne` timeouts
71+
rcases hB.mem_nhds_iff.1 (is_open_ne.mem_nhds Hne) with ⟨V, hVB, hxV, hVy⟩,
72+
rcases hB.exists_closure_subset (hB.mem_nhds hVB hxV) with ⟨U, hUB, hxU, hUV⟩,
73+
set UV : ↥s := ⟨(U, V), ⟨hUB, hVB⟩, hUV⟩,
74+
apply (ε01 UV).1.ne,
75+
calc (0 : ℝ) = F x UV : (hf0 UV hxU).symm
76+
... = F y UV : by rw hxy
77+
... = ε UV : hfε UV (λ h : y ∈ V, hVy h rfl) },
78+
{ /- Now we prove that each neighborhood `V` of `x : X` include a preimage of a neighborhood of
79+
`F x` under `F`. Without loss of generality, `V` belongs to `B`. Choose `U ∈ B` such that
80+
`x ∈ V` and `closure V ⊆ U`. Then the preimage of the `(ε (U, V))`-neighborhood of `F x`
81+
is included by `V`. -/
82+
refine ((nhds_basis_ball.comap _).le_basis_iff hB.nhds_has_basis).2 _,
83+
rintro V ⟨hVB, hxV⟩,
84+
rcases hB.exists_closure_subset (hB.mem_nhds hVB hxV) with ⟨U, hUB, hxU, hUV⟩,
85+
set UV : ↥s := ⟨(U, V), ⟨hUB, hVB⟩, hUV⟩,
86+
refine ⟨ε UV, (ε01 UV).1, λ y (hy : dist (F y) (F x) < ε UV), _⟩,
87+
replace hy : dist (F y UV) (F x UV) < ε UV,
88+
from (bounded_continuous_function.dist_coe_le_dist _).trans_lt hy,
89+
contrapose! hy,
90+
rw [hF, hF, hfε UV hy, hf0 UV hxU, pi.zero_apply, dist_zero_right],
91+
exact le_abs_self _ },
92+
{ /- Finally, we prove that `F` is continuous. Given `δ > 0`, consider the set `T` of `(U, V) ∈ s`
93+
such that `ε (U, V) ≥ δ`. Since `ε` tends to zero, `T` is finite. Since each `f` is continuous,
94+
we can choose a neighborhood such that `dist (F y (U, V)) (F x (U, V)) ≤ δ` for any
95+
`(U, V) ∈ T`. For `(U, V) ∉ T`, the same inequality is true because both `F y (U, V)` and
96+
`F x (U, V)` belong to the interval `[0, ε (U, V)]`. -/
97+
refine (nhds_basis_closed_ball.comap _).ge_iff.2 (λ δ δ0, _),
98+
have h_fin : finite {UV : s | δ ≤ ε UV}, by simpa only [← not_lt] using hε (gt_mem_nhds δ0),
99+
have : ∀ᶠ y in 𝓝 x, ∀ UV, δ ≤ ε UV → dist (F y UV) (F x UV) ≤ δ,
100+
{ refine (eventually_all_finite h_fin).2 (λ UV hUV, _),
101+
exact (f UV).continuous.tendsto x (closed_ball_mem_nhds _ δ0) },
102+
refine this.mono (λ y hy, (bounded_continuous_function.dist_le δ0.le).2 $ λ UV, _),
103+
cases le_total δ (ε UV) with hle hle,
104+
exacts [hy _ hle, (real.dist_le_of_mem_Icc (hf0ε _ _) (hf0ε _ _)).trans (by rwa sub_zero)] }
105+
end
106+
107+
/-- A normal topological space with second countable topology `X` is metrizable: there exists a
108+
metric space structure that generates the same topology. This definition provides a `metric_space`
109+
instance such that the corresponding `topological_space X` instance is definitionally equal
110+
to the original one. -/
111+
@[reducible] noncomputable def to_metric_space : metric_space X :=
112+
@metric_space.replace_uniformity X
113+
((uniform_space.comap (exists_embedding_l_infty X).some infer_instance).replace_topology
114+
(exists_embedding_l_infty X).some_spec.induced)
115+
(metric_space.induced (exists_embedding_l_infty X).some
116+
(exists_embedding_l_infty X).some_spec.inj infer_instance)
117+
rfl
118+
119+
end topological_space

0 commit comments

Comments
 (0)