|
| 1 | +/- |
| 2 | +Copyright (c) 202 Yury G. Kudryashov. All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Yury G. Kudryashov |
| 5 | +-/ |
| 6 | +import topology.metric_space.emetric_space |
| 7 | +import topology.paracompact |
| 8 | +import set_theory.ordinal |
| 9 | + |
| 10 | +/-! |
| 11 | +# (Extended) metric spaces are paracompact |
| 12 | +
|
| 13 | +In this file we provide two instances: |
| 14 | +
|
| 15 | +* `emetric.paracompact_space`: a `pseudo_emetric_space` is paracompact; formalization is based |
| 16 | + on [MR0236876]; |
| 17 | +* `emetric.normal_of_metric`: an `emetric_space` is a normal topological space. |
| 18 | +
|
| 19 | +## Tags |
| 20 | +
|
| 21 | +metric space, paracompact space, normal space |
| 22 | +-/ |
| 23 | + |
| 24 | +variable {α : Type*} |
| 25 | + |
| 26 | +open_locale ennreal topological_space |
| 27 | +open set |
| 28 | + |
| 29 | +namespace emetric |
| 30 | + |
| 31 | +/-- A `pseudo_emetric_space` is always a paracompact space. Formalization is based |
| 32 | +on [MR0236876]. -/ |
| 33 | +@[priority 100] -- See note [lower instance priority] |
| 34 | +instance [pseudo_emetric_space α] : paracompact_space α := |
| 35 | +begin |
| 36 | + classical, |
| 37 | + /- We start with trivial observations about `1 / 2 ^ k`. Here and below we use `1 / 2 ^ k` in |
| 38 | + the comments and `2⁻¹ ^ k` in the code. -/ |
| 39 | + have pow_pos : ∀ k : ℕ, (0 : ℝ≥0∞) < 2⁻¹ ^ k, |
| 40 | + from λ k, ennreal.pow_pos (ennreal.inv_pos.2 ennreal.two_ne_top) _, |
| 41 | + have hpow_le : ∀ {m n : ℕ}, m ≤ n → (2⁻¹ : ℝ≥0∞) ^ n ≤ 2⁻¹ ^ m, |
| 42 | + from λ m n h, ennreal.pow_le_pow_of_le_one (ennreal.inv_le_one.2 ennreal.one_lt_two.le) h, |
| 43 | + have h2pow : ∀ n : ℕ, 2 * (2⁻¹ : ℝ≥0∞) ^ (n + 1) = 2⁻¹ ^ n, |
| 44 | + by { intro n, simp [pow_succ, ← mul_assoc, ennreal.mul_inv_cancel] }, |
| 45 | + -- Consider an open covering `S : set (set α)` |
| 46 | + refine ⟨λ ι s ho hcov, _⟩, |
| 47 | + simp only [Union_eq_univ_iff] at hcov, |
| 48 | + -- choose a well founded order on `S` |
| 49 | + letI : linear_order ι := linear_order_of_STO' well_ordering_rel, |
| 50 | + have wf : well_founded ((<) : ι → ι → Prop) := @is_well_order.wf ι well_ordering_rel _, |
| 51 | + -- Let `ind x` be the minimal index `s : S` such that `x ∈ s`. |
| 52 | + set ind : α → ι := λ x, wf.min {i : ι | x ∈ s i} (hcov x), |
| 53 | + have mem_ind : ∀ x, x ∈ s (ind x), from λ x, wf.min_mem _ (hcov x), |
| 54 | + have nmem_of_lt_ind : ∀ {x i}, i < (ind x) → x ∉ s i, |
| 55 | + from λ x i hlt hxi, wf.not_lt_min _ (hcov x) hxi hlt, |
| 56 | + /- The refinement `D : ℕ → ι → set α` is defined recursively. For each `n` and `i`, `D n i` |
| 57 | + is the union of balls `ball x (1 / 2 ^ n)` over all points `x` such that |
| 58 | +
|
| 59 | + * `ind x = i`; |
| 60 | + * `x` does not belong to any `D m j`, `m < n`; |
| 61 | + * `ball x (3 / 2 ^ n) ⊆ s i`; |
| 62 | +
|
| 63 | + We define this sequence using `nat.strong_rec_on'`, then restate it as `Dn` and `memD`. |
| 64 | + -/ |
| 65 | + set D : ℕ → ι → set α := |
| 66 | + λ n, nat.strong_rec_on' n (λ n D' i, |
| 67 | + ⋃ (x : α) (hxs : ind x = i) (hb : ball x (3 * 2⁻¹ ^ n) ⊆ s i) |
| 68 | + (hlt : ∀ (m < n) (j : ι), x ∉ D' m ‹_› j), ball x (2⁻¹ ^ n)), |
| 69 | + have Dn : ∀ n i, D n i = ⋃ (x : α) (hxs : ind x = i) (hb : ball x (3 * 2⁻¹ ^ n) ⊆ s i) |
| 70 | + (hlt : ∀ (m < n) (j : ι), x ∉ D m j), ball x (2⁻¹ ^ n), |
| 71 | + from λ n s, by { simp only [D], rw nat.strong_rec_on_beta' }, |
| 72 | + have memD : ∀ {n i y}, y ∈ D n i ↔ ∃ x (hi : ind x = i) (hb : ball x (3 * 2⁻¹ ^ n) ⊆ s i) |
| 73 | + (hlt : ∀ (m < n) (j : ι), x ∉ D m j), edist y x < 2⁻¹ ^ n, |
| 74 | + { intros n i y, rw [Dn n i], simp only [mem_Union, mem_ball] }, |
| 75 | + -- The sets `D n i` cover the whole space. Indeed, for each `x` we can choose `n` such that |
| 76 | + -- `ball x (3 / 2 ^ n) ⊆ s (ind x)`, then either `x ∈ D n i`, or `x ∈ D m i` for some `m < n`. |
| 77 | + have Dcov : ∀ x, ∃ n i, x ∈ D n i, |
| 78 | + { intro x, |
| 79 | + obtain ⟨n, hn⟩ : ∃ n : ℕ, ball x (3 * 2⁻¹ ^ n) ⊆ s (ind x), |
| 80 | + { -- This proof takes 5 lines because we can't import `specific_limits` here |
| 81 | + rcases is_open_iff.1 (ho $ ind x) x (mem_ind x) with ⟨ε, ε0, hε⟩, |
| 82 | + have : 0 < ε / 3 := ennreal.div_pos_iff.2 ⟨ε0.lt.ne', ennreal.coe_ne_top⟩, |
| 83 | + rcases ennreal.exists_inv_two_pow_lt this.ne' with ⟨n, hn⟩, |
| 84 | + refine ⟨n, subset.trans (ball_subset_ball _) hε⟩, |
| 85 | + simpa only [div_eq_mul_inv, mul_comm] using (ennreal.mul_lt_of_lt_div hn).le }, |
| 86 | + by_contra h, push_neg at h, |
| 87 | + apply h n (ind x), |
| 88 | + exact memD.2 ⟨x, rfl, hn, λ _ _ _, h _ _, mem_ball_self (pow_pos _)⟩ }, |
| 89 | + -- Each `D n i` is a union of open balls, hence it is an open set |
| 90 | + have Dopen : ∀ n i, is_open (D n i), |
| 91 | + { intros n i, |
| 92 | + rw Dn, |
| 93 | + iterate 4 { refine is_open_Union (λ _, _) }, |
| 94 | + exact is_open_ball }, |
| 95 | + -- the covering `D n i` is a refinement of the original covering: `D n i ⊆ s i` |
| 96 | + have HDS : ∀ n i, D n i ⊆ s i, |
| 97 | + { intros n s x, |
| 98 | + rw memD, |
| 99 | + rintro ⟨y, rfl, hsub, -, hyx⟩, |
| 100 | + refine hsub (lt_of_lt_of_le hyx _), |
| 101 | + calc 2⁻¹ ^ n = 1 * 2⁻¹ ^ n : (one_mul _).symm |
| 102 | + ... ≤ 3 * 2⁻¹ ^ n : ennreal.mul_le_mul _ le_rfl, |
| 103 | + -- TODO: use `norm_num` |
| 104 | + have : ((1 : ℕ) : ℝ≥0∞) ≤ (3 : ℕ), from ennreal.coe_nat_le_coe_nat.2 (by norm_num1), |
| 105 | + exact_mod_cast this }, |
| 106 | + -- Let us show the rest of the properties. Since the definition expects a family indexed |
| 107 | + -- by a single parameter, we use `ℕ × ι` as the domain. |
| 108 | + refine ⟨ℕ × ι, λ ni, D ni.1 ni.2, λ _, Dopen _ _, _, _, λ ni, ⟨ni.2, HDS _ _⟩⟩, |
| 109 | + -- The sets `D n i` cover the whole space as we proved earlier |
| 110 | + { refine Union_eq_univ_iff.2 (λ x, _), |
| 111 | + rcases Dcov x with ⟨n, i, h⟩, |
| 112 | + exact ⟨⟨n, i⟩, h⟩ }, |
| 113 | + { /- Let us prove that the covering `D n i` is locally finite. Take a point `x` and choose |
| 114 | + `n`, `i` so that `x ∈ D n i`. Since `D n i` is an open set, we can choose `k` so that |
| 115 | + `B = ball x (1 / 2 ^ (n + k + 1)) ⊆ D n i`. -/ |
| 116 | + intro x, |
| 117 | + rcases Dcov x with ⟨n, i, hn⟩, |
| 118 | + have : D n i ∈ 𝓝 x, from is_open.mem_nhds (Dopen _ _) hn, |
| 119 | + rcases (nhds_basis_uniformity uniformity_basis_edist_inv_two_pow).mem_iff.1 this |
| 120 | + with ⟨k, -, hsub : ball x (2⁻¹ ^ k) ⊆ D n i⟩, |
| 121 | + set B := ball x (2⁻¹ ^ (n + k + 1)), |
| 122 | + refine ⟨B, ball_mem_nhds _ (pow_pos _), _⟩, |
| 123 | + -- The sets `D m i`, `m > n + k`, are disjoint with `B` |
| 124 | + have Hgt : ∀ (m ≥ n + k + 1) (i : ι), disjoint (D m i) B, |
| 125 | + { rintros m hm i y ⟨hym, hyx⟩, |
| 126 | + rcases memD.1 hym with ⟨z, rfl, hzi, H, hz⟩, |
| 127 | + have : z ∉ ball x (2⁻¹ ^ k), from λ hz, H n (by linarith) i (hsub hz), apply this, |
| 128 | + calc edist z x ≤ edist y z + edist y x : edist_triangle_left _ _ _ |
| 129 | + ... < (2⁻¹ ^ m) + (2⁻¹ ^ (n + k + 1)) : ennreal.add_lt_add hz hyx |
| 130 | + ... ≤ (2⁻¹ ^ (k + 1)) + (2⁻¹ ^ (k + 1)) : |
| 131 | + add_le_add (hpow_le $ by linarith) (hpow_le $ by linarith) |
| 132 | + ... = (2⁻¹ ^ k) : by rw [← two_mul, h2pow] }, |
| 133 | + -- For each `m ≤ n + k` there is at most one `j` such that `D m j ∩ B` is nonempty. |
| 134 | + have Hle : ∀ m ≤ n + k, set.subsingleton {j | (D m j ∩ B).nonempty}, |
| 135 | + { rintros m hm j₁ ⟨y, hyD, hyB⟩ j₂ ⟨z, hzD, hzB⟩, |
| 136 | + by_contra h, |
| 137 | + wlog h : j₁ < j₂ := ne.lt_or_lt h using [j₁ j₂ y z, j₂ j₁ z y], |
| 138 | + rcases memD.1 hyD with ⟨y', rfl, hsuby, -, hdisty⟩, |
| 139 | + rcases memD.1 hzD with ⟨z', rfl, -, -, hdistz⟩, |
| 140 | + suffices : edist z' y' < 3 * 2⁻¹ ^ m, from nmem_of_lt_ind h (hsuby this), |
| 141 | + calc edist z' y' ≤ edist z' x + edist x y' : edist_triangle _ _ _ |
| 142 | + ... ≤ (edist z z' + edist z x) + (edist y x + edist y y') : |
| 143 | + add_le_add (edist_triangle_left _ _ _) (edist_triangle_left _ _ _) |
| 144 | + ... < (2⁻¹ ^ m + 2⁻¹ ^ (n + k + 1)) + (2⁻¹ ^ (n + k + 1) + 2⁻¹ ^ m) : |
| 145 | + by apply_rules [ennreal.add_lt_add] |
| 146 | + ... = 2 * (2⁻¹ ^ m + 2⁻¹ ^ (n + k + 1)) : by simp only [two_mul, add_comm] |
| 147 | + ... ≤ 2 * (2⁻¹ ^ m + 2⁻¹ ^ (m + 1)) : |
| 148 | + ennreal.mul_le_mul le_rfl $ add_le_add le_rfl $ hpow_le (add_le_add hm le_rfl) |
| 149 | + ... = 3 * 2⁻¹ ^ m : by rw [mul_add, h2pow, bit1, add_mul, one_mul] }, |
| 150 | + -- Finally, we glue `Hgt` and `Hle` |
| 151 | + have : (⋃ (m ≤ n + k) (i ∈ {i : ι | (D m i ∩ B).nonempty}), {(m, i)}).finite, |
| 152 | + from (finite_le_nat _).bUnion (λ i hi, (Hle i hi).finite.bUnion (λ _ _, finite_singleton _)), |
| 153 | + refine this.subset (λ I hI, _), simp only [mem_Union], |
| 154 | + refine ⟨I.1, _, I.2, hI, prod.mk.eta.symm⟩, |
| 155 | + exact not_lt.1 (λ hlt, Hgt I.1 hlt I.2 hI.some_spec) } |
| 156 | +end |
| 157 | + |
| 158 | +@[priority 100] -- see Note [lower instance priority] |
| 159 | +instance normal_of_emetric [emetric_space α] : normal_space α := normal_of_paracompact_t2 |
| 160 | + |
| 161 | +end emetric |
0 commit comments