Poincaré conjecture: the Lean proof, cleaned up together
The 2026 Lean proof of the Poincaré conjecture after Morgan and Tian, 3 million lines, cleaned up together: smaller, faster to build, more readable, the theorems unchanged

| 1 | /- |
| 2 | Provenance and modification notice (recorded 2026-09-29). |
| 3 | Notices for the adapted source: |
| 4 | Copyright 2026 The DifferentialGeometry contributors |
| 5 | Source: https://github.com/qinz1yang/differential-geometry |
| 6 | DifferentialGeometry/Analysis/Sobolev/Euclidean/Embedding/IteratedSobolevEmbedding.lean |
| 7 | Comparison revision: 1b535dd102b94cc42b107cca27059687888f08b3. |
| 8 | Changes: Imports, module paths, and namespaces were adapted to the subject-organized PoincareLib library. The local file extracts a subset of the upstream development. |
| 9 | License: Apache-2.0. Source licenses and notices are retained under |
| 10 | PoincareConjecture/provenance/2026-09-29/licenses/. |
| 11 | See PoincareConjecture/MODIFICATIONS.md for the reviewed source mapping. |
| 12 | -/ |
| 13 | |
| 14 | import PoincareLib.Analysis.Elliptic.Regularity.Sobolev.Embedding.MorreyHigherOrder |
| 15 | import PoincareLib.Analysis.Elliptic.Regularity.Sobolev.Iterated.Multiply |
| 16 | import PoincareLib.Analysis.Elliptic.Regularity.Sobolev.Embedding.ExponentIteration |
| 17 | import PoincareLib.Analysis.Elliptic.Regularity.Representative |
| 18 | |
| 19 | /-! |
| 20 | Adapted from Chow--Liao--Qin, revision `1b535dd102b94cc42b107cca27059687888f08b3`, |
| 21 | `DifferentialGeometry/Analysis/Sobolev/Euclidean/Embedding/IteratedSobolevEmbedding.lean`. |
| 22 | Apache-2.0; see `PoincareConjecture/provenance/2026-09-29/licenses/DifferentialGeometry/LICENSE`. |
| 23 | -/ |
| 24 | |
| 25 | |
| 26 | |
| 27 | noncomputable section |
| 28 | |
| 29 | open MeasureTheory Set Filter Topology Metric Function |
| 30 | open scoped ENNReal NNReal ContDiff |
| 31 | |
| 32 | namespace Poincare |
| 33 | namespace Analysis |
| 34 | namespace Sobolev |
| 35 | namespace EuclideanIteratedEmbedding |
| 36 | |
| 37 | open Poincare.Analysis.Sobolev.Euclidean |
| 38 | open Poincare.Analysis.Sobolev.EuclideanEmbedding |
| 39 | |
| 40 | variable {d : ℕ} [NeZero d] |
| 41 | |
| 42 | local notation "EuN" => EuclideanSpace ℝ (Fin d) |
| 43 | |
| 44 | omit [NeZero d] in |
| 45 | private theorem exists_cutoff_ball |
| 46 | {x₀ : EuN} {R : ℝ} (hR : 0 < R) : |
| 47 | ∃ χ : EuN → ℝ, |
| 48 | ContDiff ℝ (⊤ : ℕ∞) χ ∧ |
| 49 | HasCompactSupport χ ∧ |
| 50 | Set.range χ ⊆ Set.Icc (0 : ℝ) 1 ∧ |
| 51 | (∀ x ∈ Metric.closedBall x₀ R, χ x = 1) ∧ |
| 52 | tsupport χ ⊆ Metric.closedBall x₀ (3 * R / 2) := by |
| 53 | classical |
| 54 | have hδ_pos : (0 : ℝ) < R / 4 := by linarith |
| 55 | have hclosed : IsClosed (Metric.closedBall x₀ R) := Metric.isClosed_closedBall |
| 56 | have hopen_thick : |
| 57 | IsOpen (Metric.thickening (R / 4) (Metric.closedBall x₀ R)) := |
| 58 | isOpen_thickening |
| 59 | have hsub : Metric.closedBall x₀ R ⊆ |
| 60 | Metric.thickening (R / 4) (Metric.closedBall x₀ R) := |
| 61 | Metric.self_subset_thickening hδ_pos _ |
| 62 | rcases exists_contMDiff_support_eq_eq_one_iff |
| 63 | (I := modelWithCornersSelf ℝ EuN) |
| 64 | (s := Metric.thickening (R / 4) (Metric.closedBall x₀ R)) |
| 65 | (t := Metric.closedBall x₀ R) |
| 66 | hopen_thick hclosed hsub with |
| 67 | ⟨χ, hχ_smooth, hχ_range, hχ_support, hχ_one_iff⟩ |
| 68 | have h_supp_in_closedBall : |
| 69 | tsupport χ ⊆ Metric.closedBall x₀ (3 * R / 2) := by |
| 70 | have h_closed : IsClosed (Metric.closedBall x₀ (3 * R / 2)) := |
| 71 | Metric.isClosed_closedBall |
| 72 | rw [tsupport, hχ_support] |
| 73 | refine closure_minimal ?_ h_closed |
| 74 | intro y hy |
| 75 | rw [Metric.mem_thickening_iff] at hy |
| 76 | rcases hy with ⟨z, hz_mem, hyz⟩ |
| 77 | rw [Metric.mem_closedBall] at hz_mem ⊢ |
| 78 | calc dist y x₀ ≤ dist y z + dist z x₀ := dist_triangle _ _ _ |
| 79 | _ ≤ R / 4 + R := by |
| 80 | have hyz_le : dist y z ≤ R / 4 := le_of_lt hyz |
| 81 | linarith |
| 82 | _ ≤ 3 * R / 2 := by linarith |
| 83 | refine ⟨χ, contMDiff_iff_contDiff.mp hχ_smooth, ?_, hχ_range, ?_, |
| 84 | h_supp_in_closedBall⟩ |
| 85 | · refine HasCompactSupport.of_support_subset_isCompact |
| 86 | (isCompact_closedBall (x := x₀) (3 * R / 2)) ?_ |
| 87 | exact (subset_tsupport _).trans h_supp_in_closedBall |
| 88 | · intro x hx |
| 89 | exact (hχ_one_iff x).1 hx |
| 90 | |
| 91 | omit [NeZero d] in |
| 92 | private lemma exists_uniform_iteratedFDeriv_bound |
| 93 | {χ : EuN → ℝ} (hχ : ContDiff ℝ (⊤ : ℕ∞) χ) (hχ_compact : HasCompactSupport χ) |
| 94 | (m : ℕ) : |
| 95 | ∃ C : ℝ, 0 ≤ C ∧ ∀ j ≤ m, ∀ x : EuN, ‖iteratedFDeriv ℝ j χ x‖ ≤ C := by |
| 96 | classical |
| 97 | have h_per_j : ∀ j, ∃ Cj : ℝ, 0 ≤ Cj ∧ |
| 98 | ∀ x : EuN, ‖iteratedFDeriv ℝ j χ x‖ ≤ Cj := by |
| 99 | intro j |
| 100 | have h_cont : Continuous (fun x : EuN => iteratedFDeriv ℝ j χ x) := |
| 101 | hχ.continuous_iteratedFDeriv (by exact_mod_cast le_top) |
| 102 | have h_supp : HasCompactSupport (fun x : EuN => iteratedFDeriv ℝ j χ x) := |
| 103 | hχ_compact.iteratedFDeriv (𝕜 := ℝ) j |
| 104 | obtain ⟨Mj, hMj⟩ := h_supp.exists_bound_of_continuous h_cont |
| 105 | exact ⟨max 0 Mj, le_max_left _ _, fun x => (hMj x).trans (le_max_right _ _)⟩ |
| 106 | let Cj : ℕ → ℝ := fun j => Classical.choose (h_per_j j) |
| 107 | have hCj_nn : ∀ j, 0 ≤ Cj j := fun j => (Classical.choose_spec (h_per_j j)).1 |
| 108 | have hCj_bound : ∀ j, ∀ x : EuN, ‖iteratedFDeriv ℝ j χ x‖ ≤ Cj j := fun j => |
| 109 | (Classical.choose_spec (h_per_j j)).2 |
| 110 | have h_nonempty : (Finset.range (m + 1)).Nonempty := |
| 111 | ⟨0, Finset.mem_range.mpr (Nat.zero_lt_succ _)⟩ |
| 112 | let C : ℝ := (Finset.range (m + 1)).sup' h_nonempty Cj |
| 113 | have hC_ge : ∀ j ∈ Finset.range (m + 1), Cj j ≤ C := fun j hj => |
| 114 | Finset.le_sup' Cj hj |
| 115 | refine ⟨C, le_trans (hCj_nn 0) |
| 116 | (hC_ge 0 (Finset.mem_range.mpr (Nat.zero_lt_succ _))), ?_⟩ |
| 117 | intro j hj x |
| 118 | exact le_trans (hCj_bound j x) |
| 119 | (hC_ge j (Finset.mem_range.mpr (Nat.lt_succ_of_le hj))) |
| 120 | |
| 121 | omit [NeZero d] in |
| 122 | private lemma cutoff_memWkp_two |
| 123 | {x₀ : EuN} {R : ℝ} (hR : 0 < R) |
| 124 | {χ : EuN → ℝ} (hχ : ContDiff ℝ (⊤ : ℕ∞) χ) (hχ_compact : HasCompactSupport χ) |
| 125 | {u : EuN → ℝ} {Ω : Set EuN} |
| 126 | (hball : Metric.ball x₀ (2 * R) ⊆ Ω) |
| 127 | {k : ℕ} (hu : MemWkp (d := d) k 2 u Ω) : |
| 128 | MemWkp (d := d) k 2 (fun x => χ x * u x) (Metric.ball x₀ (2 * R)) := by |
| 129 | have h2R_pos : (0 : ℝ) < 2 * R := by linarith |
| 130 | have hball_open : IsOpen (Metric.ball x₀ (2 * R)) := Metric.isOpen_ball |
| 131 | have hp_one : (1 : ℝ≥0∞) ≤ 2 := by norm_num |
| 132 | have hu_ball : MemWkp (d := d) k 2 u (Metric.ball x₀ (2 * R)) := |
| 133 | MemWkp.mono_set (d := d) hp_one hball_open hball hu |
| 134 | obtain ⟨C, _hC_nn, hC_bound⟩ := |
| 135 | exists_uniform_iteratedFDeriv_bound (d := d) hχ hχ_compact k |
| 136 | have hχ_bound : ∀ j ≤ k, ∀ x ∈ Metric.ball x₀ (2 * R), |
| 137 | ‖iteratedFDeriv ℝ j χ x‖ ≤ C := fun j hj x _ => hC_bound j hj x |
| 138 | exact MemWkp.smul_smooth_bounded (d := d) k hp_one hball_open hχ hχ_bound hu_ball |
| 139 | |
| 140 | private theorem tower_to_supercritical |
| 141 | {Ω : Set EuN} (hΩ_open : IsOpen Ω) (m : ℕ) : |
| 142 | ∀ (s : ℕ) {p : ℝ}, 1 ≤ p → |
| 143 | RegularExponent.IsRegular (d : ℝ) p (s + 1) → |
| 144 | (d : ℝ) < ((s + 1 : ℕ) : ℝ) * p → |
| 145 | ∀ {f : EuN → ℝ}, HasCompactSupport f → tsupport f ⊆ Ω → |
| 146 | MemWkp (d := d) (m + 1 + s) (ENNReal.ofReal p) f Ω → |
| 147 | ∃ q : ℝ, 1 ≤ q ∧ (d : ℝ) < q ∧ |
| 148 | MemWkp (d := d) (m + 1) (ENNReal.ofReal q) f Ω := by |
| 149 | intro s |
| 150 | induction s with |
| 151 | | zero => |
| 152 | intro p hp_one _hreg hkp f _hf_cpt _hf_supp hf |
| 153 | have hp_dim : (d : ℝ) < p := by |
| 154 | have : ((0 + 1 : ℕ) : ℝ) = 1 := by norm_num |
| 155 | rw [this, one_mul] at hkp |
| 156 | exact hkp |
| 157 | exact ⟨p, hp_one, hp_dim, by simpa using hf⟩ |
| 158 | | succ s ih => |
| 159 | intro p hp_one hreg hkp f hf_cpt hf_supp hf |
| 160 | have hp_ne_d : p ≠ (d : ℝ) := hreg.p_ne_n_of_one_le (by omega) |
| 161 | rcases lt_or_gt_of_ne hp_ne_d with hp_lt | hp_gt |
| 162 | · have hp_pos : 0 < p := by linarith |
| 163 | have hf' : MemWkp (d := d) ((m + 1 + s) + 1) (ENNReal.ofReal p) f Ω := by |
| 164 | have h_idx : m + 1 + (s + 1) = (m + 1 + s) + 1 := by ring |
| 165 | rw [h_idx] at hf |
| 166 | exact hf |
| 167 | obtain ⟨h_mem_p1, _h_norm_p1⟩ := |
| 168 | TowerStep.MemWkp_subcritical_iterated (d := d) (m + 1 + s) |
| 169 | hp_one hp_lt hΩ_open hf_cpt hf_supp hf' |
| 170 | set p_1 : ℝ := (d : ℝ) * p / ((d : ℝ) - p) with hp_1_def |
| 171 | have hd_pos : 0 < (d : ℝ) := by exact_mod_cast NeZero.pos d |
| 172 | have hd_p_pos : 0 < (d : ℝ) - p := by linarith |
| 173 | have hp_1_ge_p : p ≤ p_1 := by |
| 174 | rw [hp_1_def, le_div_iff₀ hd_p_pos] |
| 175 | nlinarith [hp_pos] |
| 176 | have hp_1_one : 1 ≤ p_1 := le_trans hp_one hp_1_ge_p |
| 177 | have hkp_next : (d : ℝ) < ((s + 1 : ℕ) : ℝ) * p_1 := by |
| 178 | have h_form : (d : ℝ) < ((s + 1 : ℕ) + 1 : ℝ) * p := by |
| 179 | have hkp_cast : ((s + 1 + 1 : ℕ) : ℝ) * p = |
| 180 | ((s + 1 : ℕ) + 1 : ℝ) * p := by push_cast; ring |
| 181 | rw [hkp_cast] at hkp |
| 182 | exact hkp |
| 183 | have h_id := |
| 184 | IterationCalc.kp1_real_gt_d_of_kp1p_gt_d d (s + 1) p hp_pos hp_lt h_form |
| 185 | rw [hp_1_def] |
| 186 | exact h_id |
| 187 | have hreg_p_1 : RegularExponent.IsRegular (d : ℝ) p_1 (s + 1) := by |
| 188 | rw [hp_1_def] |
| 189 | exact hreg.tower_step hp_one hp_lt |
| 190 | have h_mem_p1' : MemWkp (d := d) (m + 1 + s) (ENNReal.ofReal p_1) f Ω := by |
| 191 | rw [hp_1_def]; exact h_mem_p1 |
| 192 | exact ih hp_1_one hreg_p_1 hkp_next hf_cpt hf_supp h_mem_p1' |
| 193 | · exact ⟨p, hp_one, hp_gt, MemWkp.le_of_le (by omega) hf⟩ |
| 194 | |
| 195 | private theorem exists_contDiff_m_rep_ball |
| 196 | {x₀ : EuN} {R : ℝ} (hR : 0 < R) |
| 197 | {u : EuN → ℝ} {Ω : Set EuN} |
| 198 | (hball : Metric.ball x₀ (2 * R) ⊆ Ω) |
| 199 | (m : ℕ) (hu : MemWkp (d := d) (m + 1 + d) 2 u Ω) : |
| 200 | ∃ f : EuN → ℝ, |
| 201 | ContDiff ℝ m f ∧ |
| 202 | u =ᵐ[volume.restrict (Metric.ball x₀ (R / 2))] f := by |
| 203 | classical |
| 204 | have h2R_pos : (0 : ℝ) < 2 * R := by linarith |
| 205 | have hball_open : IsOpen (Metric.ball x₀ (2 * R)) := Metric.isOpen_ball |
| 206 | have hd_pos : 0 < d := NeZero.pos d |
| 207 | have hd_real_pos : (0 : ℝ) < (d : ℝ) := by exact_mod_cast hd_pos |
| 208 | obtain ⟨χ, hχ_smooth, hχ_cpt, _hχ_range, hχ_one, hχ_supp⟩ := |
| 209 | exists_cutoff_ball (d := d) hR |
| 210 | set v : EuN → ℝ := fun x => χ x * u x with hv_def |
| 211 | have hv_memWkp : MemWkp (d := d) (m + 1 + d) 2 v (Metric.ball x₀ (2 * R)) := |
| 212 | cutoff_memWkp_two (d := d) hR hχ_smooth hχ_cpt hball hu |
| 213 | have h_supp_subset : Function.support v ⊆ Function.support χ := by |
| 214 | intro x hx |
| 215 | have hvx : v x ≠ 0 := hx |
| 216 | intro hχx |
| 217 | exact hvx (by simp [hv_def, hχx]) |
| 218 | have hv_supp_subset_χ : tsupport v ⊆ tsupport χ := closure_mono h_supp_subset |
| 219 | have hv_supp_closed : tsupport v ⊆ Metric.closedBall x₀ (3 * R / 2) := |
| 220 | hv_supp_subset_χ.trans hχ_supp |
| 221 | have hcball_subset_ball : |
| 222 | Metric.closedBall x₀ (3 * R / 2) ⊆ Metric.ball x₀ (2 * R) := by |
| 223 | intro y hy |
| 224 | rw [Metric.mem_closedBall] at hy |
| 225 | rw [Metric.mem_ball] |
| 226 | linarith |
| 227 | have hv_supp_ball : tsupport v ⊆ Metric.ball x₀ (2 * R) := |
| 228 | hv_supp_closed.trans hcball_subset_ball |
| 229 | have hv_cpt : HasCompactSupport v := |
| 230 | HasCompactSupport.of_support_subset_isCompact |
| 231 | (isCompact_closedBall (x := x₀) (3 * R / 2)) |
| 232 | ((subset_tsupport _).trans hv_supp_closed) |
| 233 | have hs_max_succ_pos : 1 ≤ d + 1 := by omega |
| 234 | have hp_2_strict : (1 : ℝ) < 2 := by norm_num |
| 235 | have h_d_lt_kp_2 : (d : ℝ) < ((d + 1 : ℕ) : ℝ) * 2 := by |
| 236 | have heq : ((d + 1 : ℕ) : ℝ) * 2 = (2 * (d + 1) : ℕ) := by |
| 237 | push_cast; ring |
| 238 | rw [heq] |
| 239 | have : (d : ℝ) < (2 * (d + 1) : ℕ) := by |
| 240 | push_cast; linarith [show (0 : ℝ) ≤ (d : ℝ) from Nat.cast_nonneg d] |
| 241 | exact this |
| 242 | obtain ⟨p₀, hp₀_one, hp₀_lt, h_d_lt_kp₀, hp₀_reg⟩ := |
| 243 | RegularExponent.exists_regular_exponent_below |
| 244 | (d : ℝ) (d + 1) hs_max_succ_pos hp_2_strict h_d_lt_kp_2 |
| 245 | have hv_mem_two : MemWkp (d := d) (m + 1 + d) 2 v |
| 246 | (Metric.ball x₀ (2 * R)) := hv_memWkp |
| 247 | have hp₀_le_two_enn : ENNReal.ofReal p₀ ≤ (2 : ℝ≥0∞) := by |
| 248 | rw [show (2 : ℝ≥0∞) = ENNReal.ofReal 2 from by |
| 249 | rw [show (2 : ℝ) = ((2 : ℕ) : ℝ) from by norm_num, ENNReal.ofReal_natCast]; rfl] |
| 250 | exact ENNReal.ofReal_le_ofReal hp₀_lt.le |
| 251 | have hp₀_one_enn : (1 : ℝ≥0∞) ≤ ENNReal.ofReal p₀ := by |
| 252 | rw [show (1 : ℝ≥0∞) = ENNReal.ofReal 1 from by simp] |
| 253 | exact ENNReal.ofReal_le_ofReal hp₀_one |
| 254 | have hv_mem_p₀ : MemWkp (d := d) (m + 1 + d) (ENNReal.ofReal p₀) v |
| 255 | (Metric.ball x₀ (2 * R)) := |
| 256 | EuclideanIteratedMonoExp.memWkp_mono_exponent_of_tsupport_subset (d := d) |
| 257 | (m + 1 + d) hball_open Metric.isClosed_closedBall |
| 258 | ((measure_closedBall_lt_top (x := x₀) (r := 3 * R / 2)).ne) |
| 259 | hp₀_one_enn hp₀_le_two_enn hv_supp_closed hv_mem_two |
| 260 | obtain ⟨q, _hq_one, hq_dim, hv_mem_q⟩ := |
| 261 | tower_to_supercritical (d := d) hball_open m d hp₀_one hp₀_reg |
| 262 | h_d_lt_kp₀ hv_cpt hv_supp_ball hv_mem_p₀ |
| 263 | obtain ⟨f, hf_cdiff, hf_ae⟩ := |
| 264 | EuclideanMorrey.morrey_iteratedFDeriv_representative (d := d) (p := q) |
| 265 | (x₀ := x₀) (R := 2 * R) (u := v) hq_dim h2R_pos m hv_mem_q |
| 266 | refine ⟨f, hf_cdiff, ?_⟩ |
| 267 | have h_ball_eq : Metric.ball x₀ (2 * R / 4) = Metric.ball x₀ (R / 2) := by |
| 268 | congr 1; ring |
| 269 | have hu_eq_v : u =ᵐ[volume.restrict (Metric.ball x₀ (R / 2))] v := by |
| 270 | refine (ae_restrict_iff' (Metric.isOpen_ball.measurableSet)).mpr ?_ |
| 271 | refine Filter.Eventually.of_forall (fun x hx => ?_) |
| 272 | have hx_closed : x ∈ Metric.closedBall x₀ R := by |
| 273 | rw [Metric.mem_ball] at hx |
| 274 | rw [Metric.mem_closedBall] |
| 275 | linarith |
| 276 | simp only [hv_def, hχ_one x hx_closed, one_mul] |
| 277 | have hv_eq_f : v =ᵐ[volume.restrict (Metric.ball x₀ (R / 2))] f := by |
| 278 | rw [← h_ball_eq] |
| 279 | exact hf_ae |
| 280 | exact hu_eq_v.trans hv_eq_f |
| 281 | |
| 282 | private theorem exists_contDiffOn_top_rep_ball |
| 283 | {x₀ : EuN} {R : ℝ} (hR : 0 < R) |
| 284 | {u : EuN → ℝ} {Ω : Set EuN} |
| 285 | (hball : Metric.ball x₀ (2 * R) ⊆ Ω) |
| 286 | (hu : ∀ k : ℕ, MemWkp (d := d) k 2 u Ω) : |
| 287 | ∃ f : EuN → ℝ, |
| 288 | ContDiffOn ℝ (∞ : WithTop ℕ∞) f (Metric.ball x₀ (R / 2)) ∧ |
| 289 | u =ᵐ[volume.restrict (Metric.ball x₀ (R / 2))] f := by |
| 290 | classical |
| 291 | have hR2_pos : (0 : ℝ) < R / 2 := by linarith |
| 292 | have h_ball_open : IsOpen (Metric.ball x₀ (R / 2)) := Metric.isOpen_ball |
| 293 | obtain ⟨f₀, hf₀_cdiff, hf₀_ae⟩ := |
| 294 | exists_contDiff_m_rep_ball (d := d) hR hball 0 (hu _) |
| 295 | refine ⟨f₀, ?_, hf₀_ae⟩ |
| 296 | rw [contDiffOn_infty] |
| 297 | intro m |
| 298 | obtain ⟨fₘ, hfₘ_cdiff, hfₘ_ae⟩ := |
| 299 | exists_contDiff_m_rep_ball (d := d) hR hball m (hu _) |
| 300 | have h_ae_eq : f₀ =ᵐ[volume.restrict (Metric.ball x₀ (R / 2))] fₘ := |
| 301 | (hf₀_ae.symm).trans hfₘ_ae |
| 302 | have h_eqOn : Set.EqOn f₀ fₘ (Metric.ball x₀ (R / 2)) := |
| 303 | MeasureTheory.Measure.eqOn_open_of_ae_eq h_ae_eq h_ball_open |
| 304 | hf₀_cdiff.continuous.continuousOn hfₘ_cdiff.continuous.continuousOn |
| 305 | refine (hfₘ_cdiff.contDiffOn (s := Metric.ball x₀ (R / 2))).congr ?_ |
| 306 | intro x hx |
| 307 | exact h_eqOn hx |
| 308 | |
| 309 | private theorem exists_contDiffOn_top_rep_nhd |
| 310 | {u : EuN → ℝ} {Ω : Set EuN} (hΩ : IsOpen Ω) |
| 311 | (hu : ∀ k : ℕ, MemWkp (d := d) k 2 u Ω) {x : EuN} (hx : x ∈ Ω) : |
| 312 | ∃ r : ℝ, 0 < r ∧ Metric.ball x r ⊆ Ω ∧ |
| 313 | ∃ f : EuN → ℝ, |
| 314 | ContDiffOn ℝ (∞ : WithTop ℕ∞) f (Metric.ball x r) ∧ |
| 315 | u =ᵐ[volume.restrict (Metric.ball x r)] f := by |
| 316 | classical |
| 317 | obtain ⟨ρ, hρ_pos, hρ_subset⟩ := Metric.isOpen_iff.mp hΩ x hx |
| 318 | set R : ℝ := ρ / 4 with hR_def |
| 319 | have hR_pos : 0 < R := by rw [hR_def]; linarith |
| 320 | have hball_subset : Metric.ball x (2 * R) ⊆ Ω := by |
| 321 | intro y hy |
| 322 | refine hρ_subset ?_ |
| 323 | rw [Metric.mem_ball] at hy ⊢ |
| 324 | have h2R : 2 * R ≤ ρ := by rw [hR_def]; linarith |
| 325 | exact lt_of_lt_of_le hy h2R |
| 326 | obtain ⟨f, hf_cdiff, hf_ae⟩ := |
| 327 | exists_contDiffOn_top_rep_ball (d := d) hR_pos hball_subset hu |
| 328 | exact ⟨R / 2, by linarith, fun y hy => hball_subset (by |
| 329 | rw [Metric.mem_ball] at hy ⊢; linarith), f, hf_cdiff, hf_ae⟩ |
| 330 | |
| 331 | theorem contDiffOn_of_forall_memWkp_two |
| 332 | {u : EuN → ℝ} {Ω : Set EuN} (hΩ : IsOpen Ω) |
| 333 | (hu : ∀ k : ℕ, MemWkp (d := d) k 2 u Ω) : |
| 334 | ∃ u_smooth : EuN → ℝ, |
| 335 | ContDiffOn ℝ (∞ : WithTop ℕ∞) u_smooth Ω ∧ |
| 336 | u =ᵐ[volume.restrict Ω] u_smooth := by |
| 337 | suffices h : ∃ U : EuN → ℝ, ContDiffOn ℝ ∞ U Ω ∧ |
| 338 | U =ᵐ[volume.restrict Ω] u from |
| 339 | h.imp fun U hU => ⟨hU.1, hU.2.symm⟩ |
| 340 | apply Poincare.Analysis.Elliptic.exists_smooth_representative_of_local |
| 341 | intro x hx |
| 342 | obtain ⟨r, hr, hball, f, hf, hfu⟩ := exists_contDiffOn_top_rep_nhd hΩ hu hx |
| 343 | exact ⟨Metric.ball x r, Metric.isOpen_ball, Metric.mem_ball_self hr, |
| 344 | hball, f, hf, hfu.symm⟩ |
| 345 | |
| 346 | /-- Local Sobolev derivatives of every order produce a smooth representative. -/ |
| 347 | theorem exists_smooth_representative_of_local_memWkp |
| 348 | {u : EuN → ℝ} {Ω : Set EuN} |
| 349 | (hu : ∀ x ∈ Ω, ∃ V : Set EuN, |
| 350 | IsOpen V ∧ x ∈ V ∧ V ⊆ Ω ∧ ∀ k : ℕ, MemWkp k 2 u V) : |
| 351 | ∃ U : EuN → ℝ, ContDiffOn ℝ ∞ U Ω ∧ U =ᵐ[volume.restrict Ω] u := by |
| 352 | apply Poincare.Analysis.Elliptic.exists_smooth_representative_of_local |
| 353 | intro x hx |
| 354 | obtain ⟨V, hV, hxV, hVΩ, huV⟩ := hu x hx |
| 355 | obtain ⟨f, hf, hfu⟩ := contDiffOn_of_forall_memWkp_two hV huV |
| 356 | exact ⟨V, hV, hxV, hVΩ, f, hf, hfu.symm⟩ |
| 357 | |
| 358 | /-- The neighborhoods in local Sobolev regularity may depend on the derivative order. -/ |
| 359 | theorem exists_smooth_representative_of_memWkp_locally |
| 360 | {u : EuN → ℝ} {Ω : Set EuN} |
| 361 | (hu : ∀ x ∈ Ω, ∀ k : ℕ, ∃ V : Set EuN, |
| 362 | IsOpen V ∧ x ∈ V ∧ V ⊆ Ω ∧ MemWkp k 2 u V) : |
| 363 | ∃ U : EuN → ℝ, ContDiffOn ℝ ∞ U Ω ∧ U =ᵐ[volume.restrict Ω] u := by |
| 364 | have hrep : ∀ x ∈ Ω, ∀ m : ℕ, ∃ V : Set EuN, |
| 365 | IsOpen V ∧ x ∈ V ∧ V ⊆ Ω ∧ ∃ f : EuN → ℝ, |
| 366 | ContDiff ℝ m f ∧ f =ᵐ[volume.restrict V] u := by |
| 367 | intro x hx m |
| 368 | obtain ⟨V, hV, hxV, hVΩ, huV⟩ := hu x hx (m + 1 + d) |
| 369 | obtain ⟨ρ, hρ, hρV⟩ := Metric.isOpen_iff.mp hV x hxV |
| 370 | have hR : 0 < ρ / 4 := by positivity |
| 371 | have hball : Metric.ball x (2 * (ρ / 4)) ⊆ V := by |
| 372 | apply Set.Subset.trans (Metric.ball_subset_ball (by linarith)) hρV |
| 373 | obtain ⟨f, hf, hfu⟩ := exists_contDiff_m_rep_ball hR hball m huV |
| 374 | refine ⟨Metric.ball x (ρ / 4 / 2), Metric.isOpen_ball, |
| 375 | Metric.mem_ball_self (by positivity), ?_, f, hf, hfu.symm⟩ |
| 376 | exact ((Metric.ball_subset_ball (by linarith)).trans hball).trans hVΩ |
| 377 | apply Poincare.Analysis.Elliptic.exists_smooth_representative_of_local |
| 378 | intro x hx |
| 379 | obtain ⟨V, hV, hxV, hVΩ, f, hf, hfu⟩ := hrep x hx 0 |
| 380 | refine ⟨V, hV, hxV, hVΩ, f, ?_, hfu⟩ |
| 381 | rw [contDiffOn_infty] |
| 382 | intro m |
| 383 | apply contDiffOn_of_locally_contDiffOn |
| 384 | intro y hy |
| 385 | obtain ⟨W, hW, hyW, _, g, hg, hgu⟩ := hrep y (hVΩ hy) m |
| 386 | refine ⟨W, hW, hyW, ?_⟩ |
| 387 | have heq : Set.EqOn f g (V ∩ W) := |
| 388 | Poincare.Analysis.Elliptic.eqOn_inter_of_ae_eq hV hW |
| 389 | hf.continuous.continuousOn hg.continuous.continuousOn hfu hgu |
| 390 | exact hg.contDiffOn.congr heq |
| 391 | |
| 392 | end EuclideanIteratedEmbedding |
| 393 | end Sobolev |
| 394 | end Analysis |
| 395 | end Poincare |