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/Manifold/EmbeddingSubcritical.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.Density |
| 15 | |
| 16 | /-! |
| 17 | Adapted from Chow--Liao--Qin, revision `1b535dd102b94cc42b107cca27059687888f08b3`, |
| 18 | `DifferentialGeometry/Analysis/Sobolev/Manifold/EmbeddingSubcritical.lean`. |
| 19 | Apache-2.0; see `PoincareConjecture/provenance/2026-09-29/licenses/DifferentialGeometry/LICENSE`. |
| 20 | -/ |
| 21 | |
| 22 | noncomputable section |
| 23 | |
| 24 | open MeasureTheory Set Filter Topology Metric Function |
| 25 | open scoped ENNReal NNReal ContDiff |
| 26 | |
| 27 | namespace Poincare.Analysis.Sobolev.EuclideanEmbedding |
| 28 | |
| 29 | namespace EuclideanSubcritical |
| 30 | |
| 31 | variable {d : ℕ} [NeZero d] |
| 32 | |
| 33 | local notation "EuN" => EuclideanSpace ℝ (Fin d) |
| 34 | |
| 35 | omit [NeZero d] in |
| 36 | private lemma eq_zero_off_of_tsupport_subset |
| 37 | {f : EuN → ℝ} {Ω : Set EuN} (hf_supp : tsupport f ⊆ Ω) |
| 38 | {x : EuN} (hx : x ∉ Ω) : f x = 0 := by |
| 39 | have hx_notsupp : x ∉ tsupport f := fun h => hx (hf_supp h) |
| 40 | exact image_eq_zero_of_notMem_tsupport hx_notsupp |
| 41 | |
| 42 | omit [NeZero d] in |
| 43 | private lemma fderiv_eq_zero_off_of_tsupport_subset |
| 44 | {f : EuN → ℝ} {Ω : Set EuN} |
| 45 | (hf_supp : tsupport f ⊆ Ω) |
| 46 | {x : EuN} (hx : x ∉ Ω) : fderiv ℝ f x = 0 := by |
| 47 | have hx_notsupp : x ∉ tsupport f := fun h => hx (hf_supp h) |
| 48 | have h_nhds : (tsupport f)ᶜ ∈ 𝓝 x := |
| 49 | (isClosed_tsupport f).isOpen_compl.mem_nhds hx_notsupp |
| 50 | have hf_zero : f =ᶠ[𝓝 x] (fun _ : EuN => (0 : ℝ)) := by |
| 51 | refine Filter.eventuallyEq_of_mem h_nhds ?_ |
| 52 | intro y hy |
| 53 | exact image_eq_zero_of_notMem_tsupport hy |
| 54 | rw [Filter.EventuallyEq.fderiv_eq hf_zero] |
| 55 | simp |
| 56 | |
| 57 | omit [NeZero d] in |
| 58 | private lemma eLpNorm_eq_eLpNorm_restrict_of_tsupport_subset |
| 59 | {f : EuN → ℝ} {Ω : Set EuN} (hΩ_meas : MeasurableSet Ω) |
| 60 | (hf_supp : tsupport f ⊆ Ω) (p : ℝ≥0∞) : |
| 61 | eLpNorm f p volume = eLpNorm f p (volume.restrict Ω) := by |
| 62 | have h_eq : f = Ω.indicator f := by |
| 63 | funext x |
| 64 | by_cases hx : x ∈ Ω |
| 65 | · rw [Set.indicator_of_mem hx] |
| 66 | · rw [Set.indicator_of_notMem hx] |
| 67 | exact eq_zero_off_of_tsupport_subset hf_supp hx |
| 68 | calc eLpNorm f p volume |
| 69 | = eLpNorm (Ω.indicator f) p volume := by rw [← h_eq] |
| 70 | _ = eLpNorm f p (volume.restrict Ω) := |
| 71 | eLpNorm_indicator_eq_eLpNorm_restrict hΩ_meas |
| 72 | |
| 73 | omit [NeZero d] in |
| 74 | private lemma eLpNorm_fderiv_eq_eLpNorm_fderiv_restrict_of_tsupport_subset |
| 75 | {f : EuN → ℝ} {Ω : Set EuN} |
| 76 | (hΩ_meas : MeasurableSet Ω) (hf_supp : tsupport f ⊆ Ω) (p : ℝ≥0∞) : |
| 77 | eLpNorm (fderiv ℝ f) p volume = eLpNorm (fderiv ℝ f) p (volume.restrict Ω) := by |
| 78 | have h_eq : fderiv ℝ f = Ω.indicator (fderiv ℝ f) := by |
| 79 | funext x |
| 80 | by_cases hx : x ∈ Ω |
| 81 | · rw [Set.indicator_of_mem hx] |
| 82 | · rw [Set.indicator_of_notMem hx] |
| 83 | exact fderiv_eq_zero_off_of_tsupport_subset hf_supp hx |
| 84 | calc eLpNorm (fderiv ℝ f) p volume |
| 85 | = eLpNorm (Ω.indicator (fderiv ℝ f)) p volume := by rw [← h_eq] |
| 86 | _ = eLpNorm (fderiv ℝ f) p (volume.restrict Ω) := |
| 87 | eLpNorm_indicator_eq_eLpNorm_restrict |
| 88 | (μ := volume) (p := p) (f := fderiv ℝ f) (s := Ω) hΩ_meas |
| 89 | |
| 90 | omit [NeZero d] in |
| 91 | private lemma classical_partial_ae_eq_chosenWeakPartial_of_smooth |
| 92 | {p : ℝ≥0∞} (hp_one : 1 ≤ p) {Ω : Set EuN} (hΩ_open : IsOpen Ω) |
| 93 | {f : EuN → ℝ} (hf_smooth : ContDiff ℝ (⊤ : ℕ∞) f) |
| 94 | (hf_compact : HasCompactSupport f) (hf_supp : tsupport f ⊆ Ω) (i : Fin d) : |
| 95 | (fun x => (fderiv ℝ f x) (EuclideanSpace.single i 1)) |
| 96 | =ᵐ[volume.restrict Ω] |
| 97 | Poincare.Analysis.Sobolev.Euclidean.chosenWeakPartial' p i f Ω := by |
| 98 | have hf_mem : Poincare.Analysis.Sobolev.Euclidean.MemWkp (d := d) 1 p f Ω := |
| 99 | Poincare.Analysis.Sobolev.Euclidean.MemWkp_of_smooth_compactSupport |
| 100 | (d := d) hΩ_open hf_smooth hf_compact hf_supp hp_one 1 |
| 101 | have hf_W1p : Poincare.Analysis.Sobolev.Weak.MemW1p (d := d) p f Ω := |
| 102 | Poincare.Analysis.Sobolev.Euclidean.MemWkp.one_iff_memW1p.mp hf_mem |
| 103 | have h_classical_isWeak : |
| 104 | Poincare.Analysis.Sobolev.Weak.HasWeakPartialDeriv (d := d) i |
| 105 | (fun x => (fderiv ℝ f x) (EuclideanSpace.single i 1)) f Ω := |
| 106 | Poincare.Analysis.Sobolev.Weak.HasWeakPartialDeriv.of_contDiff (Ω := Ω) (i := i) (f := f) |
| 107 | hΩ_open (hf_smooth.of_le (by norm_cast)) |
| 108 | have h_chosen_isWeak : |
| 109 | Poincare.Analysis.Sobolev.Weak.HasWeakPartialDeriv (d := d) i |
| 110 | (Poincare.Analysis.Sobolev.Euclidean.chosenWeakPartial' p i f Ω) f Ω := |
| 111 | Poincare.Analysis.Sobolev.Euclidean.chosenWeakPartial'_isWeakPartial_of_mem |
| 112 | hf_W1p i |
| 113 | have h_classical_loc : LocallyIntegrable |
| 114 | (fun x : EuN => (fderiv ℝ f x) (EuclideanSpace.single i 1)) |
| 115 | (volume.restrict Ω) := by |
| 116 | have h_cont : Continuous (fun x : EuN => (fderiv ℝ f x) (EuclideanSpace.single i 1)) := |
| 117 | ((hf_smooth.continuous_fderiv (by simp)).clm_apply continuous_const) |
| 118 | exact h_cont.locallyIntegrable.mono_measure Measure.restrict_le_self |
| 119 | have h_chosen_loc : LocallyIntegrable |
| 120 | (Poincare.Analysis.Sobolev.Euclidean.chosenWeakPartial' p i f Ω) |
| 121 | (volume.restrict Ω) := |
| 122 | (Poincare.Analysis.Sobolev.Euclidean.chosenWeakPartial'_memLp_of_mem |
| 123 | hf_W1p i).locallyIntegrable hp_one |
| 124 | exact Poincare.Analysis.Sobolev.Weak.HasWeakPartialDeriv.ae_eq (Ω := Ω) hΩ_open |
| 125 | h_classical_isWeak h_chosen_isWeak h_classical_loc h_chosen_loc |
| 126 | |
| 127 | omit [NeZero d] in |
| 128 | private lemma norm_fderiv_le_sum_norm_partials |
| 129 | (f : EuN → ℝ) (x : EuN) : |
| 130 | ‖fderiv ℝ f x‖ ≤ ∑ i : Fin d, ‖(fderiv ℝ f x) (EuclideanSpace.single i 1)‖ := by |
| 131 | classical |
| 132 | set v : EuN := (InnerProductSpace.toDual ℝ EuN).symm (fderiv ℝ f x) with hv_def |
| 133 | have hv_map : (InnerProductSpace.toDual ℝ EuN) v = fderiv ℝ f x := by simp [v] |
| 134 | have h_fderiv_norm_eq_v : ‖fderiv ℝ f x‖ = ‖v‖ := by simp [v] |
| 135 | have h_v_eq_components : v = |
| 136 | WithLp.toLp 2 (fun i : Fin d => (fderiv ℝ f x) (EuclideanSpace.single i 1)) := by |
| 137 | ext i |
| 138 | calc |
| 139 | v i = inner ℝ v (EuclideanSpace.single i (1 : ℝ)) := by |
| 140 | simpa using |
| 141 | (EuclideanSpace.inner_single_right (i := i) (a := (1 : ℝ)) v).symm |
| 142 | _ = ((InnerProductSpace.toDual ℝ EuN) v) (EuclideanSpace.single i (1 : ℝ)) := by |
| 143 | rw [InnerProductSpace.toDual_apply_apply] |
| 144 | _ = (fderiv ℝ f x) (EuclideanSpace.single i (1 : ℝ)) := by rw [hv_map] |
| 145 | _ = (WithLp.toLp 2 |
| 146 | (fun j : Fin d => (fderiv ℝ f x) (EuclideanSpace.single j 1))) i := by simp |
| 147 | have h_v_sum : |
| 148 | v = ∑ i : Fin d, EuclideanSpace.single i ((fderiv ℝ f x) (EuclideanSpace.single i 1)) := by |
| 149 | ext j |
| 150 | rw [h_v_eq_components] |
| 151 | simp [Finset.sum_apply] |
| 152 | rw [h_fderiv_norm_eq_v, h_v_sum] |
| 153 | refine (norm_sum_le _ _).trans ?_ |
| 154 | apply Finset.sum_le_sum |
| 155 | intro i _ |
| 156 | simp |
| 157 | |
| 158 | omit [NeZero d] in |
| 159 | private lemma eLpNorm_fderiv_le_sum_eLpNorm_partials |
| 160 | {p : ℝ≥0∞} (hp_one : 1 ≤ p) {μ : Measure EuN} |
| 161 | {f : EuN → ℝ} (hf_smooth : ContDiff ℝ (⊤ : ℕ∞) f) : |
| 162 | eLpNorm (fderiv ℝ f) p μ ≤ |
| 163 | ∑ i : Fin d, |
| 164 | eLpNorm (fun x => (fderiv ℝ f x) (EuclideanSpace.single i 1)) p μ := by |
| 165 | classical |
| 166 | have h_aesm_comp : ∀ i : Fin d, |
| 167 | AEStronglyMeasurable |
| 168 | (fun x : EuN => (fderiv ℝ f x) (EuclideanSpace.single i 1)) μ := by |
| 169 | intro i |
| 170 | have h_cont : Continuous (fun x : EuN => (fderiv ℝ f x) (EuclideanSpace.single i 1)) := |
| 171 | ((hf_smooth.continuous_fderiv (by simp)).clm_apply continuous_const) |
| 172 | exact h_cont.aestronglyMeasurable |
| 173 | have h_pt : ∀ x : EuN, |
| 174 | ‖fderiv ℝ f x‖ ≤ ∑ i : Fin d, ‖(fderiv ℝ f x) (EuclideanSpace.single i 1)‖ := |
| 175 | fun x => norm_fderiv_le_sum_norm_partials (d := d) f x |
| 176 | have h_step1 : eLpNorm (fderiv ℝ f) p μ |
| 177 | = eLpNorm (fun x => ‖fderiv ℝ f x‖) p μ := (eLpNorm_norm _).symm |
| 178 | rw [h_step1] |
| 179 | have h_step2 : eLpNorm (fun x : EuN => ‖fderiv ℝ f x‖) p μ ≤ |
| 180 | eLpNorm |
| 181 | (fun x : EuN => ∑ i : Fin d, ‖(fderiv ℝ f x) (EuclideanSpace.single i 1)‖) p μ := by |
| 182 | apply eLpNorm_mono_real |
| 183 | intro x |
| 184 | have h := h_pt x |
| 185 | have h_norm : ‖‖fderiv ℝ f x‖‖ = ‖fderiv ℝ f x‖ := |
| 186 | Real.norm_of_nonneg (norm_nonneg _) |
| 187 | rw [h_norm] |
| 188 | exact h |
| 189 | refine h_step2.trans ?_ |
| 190 | have h_sum_le := eLpNorm_sum_le (μ := μ) (p := p) |
| 191 | (s := (Finset.univ : Finset (Fin d))) |
| 192 | (f := fun i => fun x : EuN => ‖(fderiv ℝ f x) (EuclideanSpace.single i 1)‖) |
| 193 | (fun i _ => (h_aesm_comp i).norm) hp_one |
| 194 | have h_lhs_eq : |
| 195 | (fun x : EuN => ∑ i : Fin d, ‖(fderiv ℝ f x) (EuclideanSpace.single i 1)‖) = |
| 196 | ∑ i : Fin d, fun x : EuN => ‖(fderiv ℝ f x) (EuclideanSpace.single i 1)‖ := by |
| 197 | funext x |
| 198 | simp [Finset.sum_apply] |
| 199 | rw [h_lhs_eq] |
| 200 | refine h_sum_le.trans ?_ |
| 201 | apply Finset.sum_le_sum |
| 202 | intro i _ |
| 203 | rw [eLpNorm_norm] |
| 204 | |
| 205 | omit [NeZero d] in |
| 206 | private lemma eLpNorm_classical_partial_eq_chosen |
| 207 | {p : ℝ≥0∞} (hp_one : 1 ≤ p) {Ω : Set EuN} (hΩ_open : IsOpen Ω) |
| 208 | {f : EuN → ℝ} (hf_smooth : ContDiff ℝ (⊤ : ℕ∞) f) |
| 209 | (hf_compact : HasCompactSupport f) (hf_supp : tsupport f ⊆ Ω) (i : Fin d) : |
| 210 | eLpNorm (fun x => (fderiv ℝ f x) (EuclideanSpace.single i 1)) p (volume.restrict Ω) |
| 211 | = eLpNorm |
| 212 | (Poincare.Analysis.Sobolev.Euclidean.chosenWeakPartial' p i f Ω) |
| 213 | p (volume.restrict Ω) := |
| 214 | eLpNorm_congr_ae |
| 215 | (classical_partial_ae_eq_chosenWeakPartial_of_smooth |
| 216 | (d := d) hp_one hΩ_open hf_smooth hf_compact hf_supp i) |
| 217 | |
| 218 | private lemma eLpNorm_fderiv_smooth_le_d_mul_wkpNorm |
| 219 | {p : ℝ≥0∞} (hp_one : 1 ≤ p) {Ω : Set EuN} (hΩ_open : IsOpen Ω) |
| 220 | {f : EuN → ℝ} (hf_smooth : ContDiff ℝ (⊤ : ℕ∞) f) |
| 221 | (hf_compact : HasCompactSupport f) (hf_supp : tsupport f ⊆ Ω) : |
| 222 | eLpNorm (fderiv ℝ f) p (volume.restrict Ω) ≤ |
| 223 | (d : ℝ≥0∞) * |
| 224 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm (d := d) 1 p f |
| 225 | Ω := by |
| 226 | classical |
| 227 | have h_grad_le := eLpNorm_fderiv_le_sum_eLpNorm_partials (d := d) hp_one |
| 228 | (μ := volume.restrict Ω) hf_smooth |
| 229 | refine h_grad_le.trans ?_ |
| 230 | have h_each_eq : ∀ i : Fin d, |
| 231 | eLpNorm (fun x => (fderiv ℝ f x) (EuclideanSpace.single i 1)) p (volume.restrict Ω) |
| 232 | = eLpNorm |
| 233 | (Poincare.Analysis.Sobolev.Euclidean.chosenWeakPartial' p i f Ω) |
| 234 | p (volume.restrict Ω) := fun i => |
| 235 | eLpNorm_classical_partial_eq_chosen (d := d) hp_one hΩ_open hf_smooth hf_compact hf_supp i |
| 236 | have h_step1 : |
| 237 | ∑ i : Fin d, |
| 238 | eLpNorm (fun x => (fderiv ℝ f x) (EuclideanSpace.single i 1)) p (volume.restrict Ω) |
| 239 | = ∑ i : Fin d, |
| 240 | eLpNorm |
| 241 | (Poincare.Analysis.Sobolev.Euclidean.chosenWeakPartial' p i f Ω) |
| 242 | p (volume.restrict Ω) := |
| 243 | Finset.sum_congr rfl (fun i _ => h_each_eq i) |
| 244 | rw [h_step1] |
| 245 | have hWkpEq : |
| 246 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm (d := d) 1 p f Ω = |
| 247 | ∑ j ∈ Finset.range 2, |
| 248 | ∑ β : Fin j → Fin d, |
| 249 | eLpNorm |
| 250 | (Poincare.Analysis.Sobolev.Euclidean.iterWeakPartial |
| 251 | (d := d) p j β f Ω) |
| 252 | p (volume.restrict Ω) := |
| 253 | Poincare.Analysis.Sobolev.Euclidean.wkpNorm_eq_sum 1 p f Ω |
| 254 | have h_j1_term : |
| 255 | (∑ β : Fin 1 → Fin d, |
| 256 | eLpNorm |
| 257 | (Poincare.Analysis.Sobolev.Euclidean.iterWeakPartial |
| 258 | (d := d) p 1 β f Ω) p (volume.restrict Ω)) = |
| 259 | ∑ i : Fin d, |
| 260 | eLpNorm |
| 261 | (Poincare.Analysis.Sobolev.Euclidean.chosenWeakPartial' p i f Ω) |
| 262 | p (volume.restrict Ω) := by |
| 263 | have h_unfold : ∀ β : Fin 1 → Fin d, |
| 264 | eLpNorm |
| 265 | (Poincare.Analysis.Sobolev.Euclidean.iterWeakPartial |
| 266 | (d := d) p 1 β f Ω) p (volume.restrict Ω) = |
| 267 | eLpNorm |
| 268 | (Poincare.Analysis.Sobolev.Euclidean.chosenWeakPartial' p (β 0) f Ω) |
| 269 | p (volume.restrict Ω) := by |
| 270 | intro β |
| 271 | have hit : |
| 272 | Poincare.Analysis.Sobolev.Euclidean.iterWeakPartial |
| 273 | (d := d) p 1 β f Ω = |
| 274 | Poincare.Analysis.Sobolev.Euclidean.chosenWeakPartial' p (β 0) f Ω := by |
| 275 | rw [Poincare.Analysis.Sobolev.Euclidean.iterWeakPartial_succ] |
| 276 | simp [Poincare.Analysis.Sobolev.Euclidean.iterWeakPartial_zero] |
| 277 | rw [hit] |
| 278 | rw [Finset.sum_congr rfl (fun β _ => h_unfold β)] |
| 279 | let e : (Fin 1 → Fin d) ≃ Fin d := |
| 280 | { toFun := fun β => β 0 |
| 281 | invFun := fun i _ => i |
| 282 | left_inv := fun β => by |
| 283 | funext j |
| 284 | have hj : j = 0 := Subsingleton.elim _ _ |
| 285 | rw [hj] |
| 286 | right_inv := fun _ => rfl } |
| 287 | exact Fintype.sum_equiv e |
| 288 | (fun β => |
| 289 | eLpNorm |
| 290 | (Poincare.Analysis.Sobolev.Euclidean.chosenWeakPartial' p (β 0) f Ω) |
| 291 | p (volume.restrict Ω)) |
| 292 | (fun i => |
| 293 | eLpNorm |
| 294 | (Poincare.Analysis.Sobolev.Euclidean.chosenWeakPartial' p i f Ω) |
| 295 | p (volume.restrict Ω)) |
| 296 | (fun _ => rfl) |
| 297 | have h_le_wkp : |
| 298 | (∑ i : Fin d, |
| 299 | eLpNorm |
| 300 | (Poincare.Analysis.Sobolev.Euclidean.chosenWeakPartial' p i f Ω) |
| 301 | p (volume.restrict Ω)) ≤ |
| 302 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm (d := d) 1 p f |
| 303 | Ω := by |
| 304 | rw [hWkpEq, Finset.sum_range_succ, Finset.sum_range_one, ← h_j1_term] |
| 305 | refine le_add_of_nonneg_left ?_ |
| 306 | exact zero_le |
| 307 | refine h_le_wkp.trans ?_ |
| 308 | have hd_pos : 0 < d := NeZero.pos d |
| 309 | have hd_one_le : (1 : ℝ≥0∞) ≤ (d : ℝ≥0∞) := by exact_mod_cast hd_pos |
| 310 | conv_lhs => rw [show Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 311 | (d := d) 1 p f Ω = 1 * |
| 312 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm (d := d) 1 p f Ω from |
| 313 | (one_mul _).symm] |
| 314 | gcongr |
| 315 | |
| 316 | private lemma sobolev_smooth_compactSupport_in_Ω |
| 317 | {p : ℝ} (hp_one : 1 ≤ p) (hp_dim : p < (d : ℝ)) {Ω : Set EuN} (hΩ_open : IsOpen Ω) |
| 318 | {φ : EuN → ℝ} (hφ_smooth : ContDiff ℝ (⊤ : ℕ∞) φ) |
| 319 | (hφ_compact : HasCompactSupport φ) (hφ_supp : tsupport φ ⊆ Ω) : |
| 320 | eLpNorm φ |
| 321 | (ENNReal.ofReal ((d : ℝ) * p / ((d : ℝ) - p))) (volume.restrict Ω) ≤ |
| 322 | ENNReal.ofReal (Poincare.Analysis.Sobolev.Weak.CGns d p) * |
| 323 | eLpNorm (fderiv ℝ φ) (ENNReal.ofReal p) (volume.restrict Ω) := by |
| 324 | have h_lhs_eq : |
| 325 | eLpNorm φ |
| 326 | (ENNReal.ofReal ((d : ℝ) * p / ((d : ℝ) - p))) volume = |
| 327 | eLpNorm φ |
| 328 | (ENNReal.ofReal ((d : ℝ) * p / ((d : ℝ) - p))) (volume.restrict Ω) := |
| 329 | eLpNorm_eq_eLpNorm_restrict_of_tsupport_subset (d := d) |
| 330 | hΩ_open.measurableSet hφ_supp _ |
| 331 | have h_rhs_eq : |
| 332 | eLpNorm (fderiv ℝ φ) (ENNReal.ofReal p) volume = |
| 333 | eLpNorm (fderiv ℝ φ) (ENNReal.ofReal p) (volume.restrict Ω) := |
| 334 | eLpNorm_fderiv_eq_eLpNorm_fderiv_restrict_of_tsupport_subset (d := d) |
| 335 | hΩ_open.measurableSet hφ_supp _ |
| 336 | have h_smooth_sob := Poincare.Analysis.Sobolev.Weak.sobolev_smooth (d := d) hp_one hp_dim |
| 337 | (hφ_smooth.of_le (by norm_cast)) hφ_compact |
| 338 | rw [← h_lhs_eq, ← h_rhs_eq] |
| 339 | exact h_smooth_sob |
| 340 | |
| 341 | theorem eLpNorm_p_star_le_const_mul_wkpNorm_of_memWkp |
| 342 | {p : ℝ} (hp_one : 1 ≤ p) (hp_dim : p < (d : ℝ)) {Ω : Set EuN} (hΩ_open : IsOpen Ω) |
| 343 | {f : EuN → ℝ} |
| 344 | (hf : Poincare.Analysis.Sobolev.Euclidean.MemWkp (d := d) |
| 345 | 1 (ENNReal.ofReal p) f Ω) |
| 346 | (hf_compact : HasCompactSupport f) (hf_supp : tsupport f ⊆ Ω) : |
| 347 | eLpNorm f |
| 348 | (ENNReal.ofReal ((d : ℝ) * p / ((d : ℝ) - p))) (volume.restrict Ω) ≤ |
| 349 | ENNReal.ofReal (Poincare.Analysis.Sobolev.Weak.CGns d p) * (d : ℝ≥0∞) * |
| 350 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm (d := d) |
| 351 | 1 (ENNReal.ofReal p) f Ω := by |
| 352 | classical |
| 353 | set p_enn : ℝ≥0∞ := ENNReal.ofReal p with hp_enn_def |
| 354 | set p_star_real : ℝ := (d : ℝ) * p / ((d : ℝ) - p) with hp_star_real_def |
| 355 | set p_star : ℝ≥0∞ := ENNReal.ofReal p_star_real with hp_star_def |
| 356 | have hp_pos : 0 < p := by linarith |
| 357 | have hp_enn_one : (1 : ℝ≥0∞) ≤ p_enn := by |
| 358 | rw [hp_enn_def, ← ENNReal.ofReal_one]; exact ENNReal.ofReal_le_ofReal hp_one |
| 359 | have hp_enn_top : p_enn ≠ ⊤ := by rw [hp_enn_def]; exact ENNReal.ofReal_ne_top |
| 360 | have hp_star_pos : 0 < p_star_real := by |
| 361 | rw [hp_star_real_def] |
| 362 | apply div_pos |
| 363 | · exact mul_pos (by exact_mod_cast (NeZero.pos d)) hp_pos |
| 364 | · linarith |
| 365 | have hp_enn_ne_zero : p_enn ≠ 0 := by |
| 366 | rw [hp_enn_def]; exact ENNReal.ofReal_ne_zero_iff.mpr hp_pos |
| 367 | have h_pick : ∀ n : ℕ, ∃ φ : EuN → ℝ, |
| 368 | ContDiff ℝ (⊤ : ℕ∞) φ ∧ HasCompactSupport φ ∧ tsupport φ ⊆ Ω ∧ |
| 369 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 370 | (d := d) 1 p_enn (fun x => f x - φ x) Ω ≤ ENNReal.ofReal (1 / (n + 1 : ℝ)) := by |
| 371 | intro n |
| 372 | have h_eps_pos : (0 : ℝ) < 1 / (n + 1 : ℝ) := by |
| 373 | apply div_pos one_pos |
| 374 | exact_mod_cast Nat.succ_pos n |
| 375 | exact Poincare.Analysis.Sobolev.Euclidean.MemWkp.exists_smooth_compactSupport_approx |
| 376 | (d := d) hΩ_open 1 p_enn hp_enn_one hp_enn_top hf hf_compact hf_supp |
| 377 | (1 / (n + 1 : ℝ)) h_eps_pos |
| 378 | set φ : ℕ → EuN → ℝ := fun n => (h_pick n).choose with hφ_def |
| 379 | have hφ_smooth : ∀ n, ContDiff ℝ (⊤ : ℕ∞) (φ n) := fun n => (h_pick n).choose_spec.1 |
| 380 | have hφ_compact : ∀ n, HasCompactSupport (φ n) := fun n => (h_pick n).choose_spec.2.1 |
| 381 | have hφ_supp : ∀ n, tsupport (φ n) ⊆ Ω := fun n => (h_pick n).choose_spec.2.2.1 |
| 382 | have hφ_close : ∀ n, |
| 383 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 384 | (d := d) 1 p_enn (fun x => f x - φ n x) Ω ≤ ENNReal.ofReal (1 / (n + 1 : ℝ)) := |
| 385 | fun n => (h_pick n).choose_spec.2.2.2 |
| 386 | have h_smooth_sob : ∀ n, |
| 387 | eLpNorm (φ n) p_star (volume.restrict Ω) ≤ |
| 388 | ENNReal.ofReal (Poincare.Analysis.Sobolev.Weak.CGns d p) * |
| 389 | eLpNorm (fderiv ℝ (φ n)) p_enn (volume.restrict Ω) := fun n => |
| 390 | sobolev_smooth_compactSupport_in_Ω (d := d) hp_one hp_dim hΩ_open |
| 391 | (hφ_smooth n) (hφ_compact n) (hφ_supp n) |
| 392 | have h_grad_bound : ∀ n, |
| 393 | eLpNorm (fderiv ℝ (φ n)) p_enn (volume.restrict Ω) ≤ |
| 394 | (d : ℝ≥0∞) * |
| 395 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 396 | (d := d) 1 p_enn (φ n) Ω := |
| 397 | fun n => eLpNorm_fderiv_smooth_le_d_mul_wkpNorm |
| 398 | (d := d) (p := p_enn) hp_enn_one hΩ_open (hφ_smooth n) (hφ_compact n) (hφ_supp n) |
| 399 | have h_φn_mem : ∀ n, |
| 400 | Poincare.Analysis.Sobolev.Euclidean.MemWkp (d := d) |
| 401 | 1 p_enn (φ n) Ω := fun n => |
| 402 | Poincare.Analysis.Sobolev.Euclidean.MemWkp_of_smooth_compactSupport |
| 403 | (d := d) hΩ_open (hφ_smooth n) (hφ_compact n) (hφ_supp n) hp_enn_one 1 |
| 404 | have h_diff_mem : ∀ n, |
| 405 | Poincare.Analysis.Sobolev.Euclidean.MemWkp (d := d) |
| 406 | 1 p_enn (fun x => f x - φ n x) Ω := fun n => |
| 407 | Poincare.Analysis.Sobolev.Euclidean.MemWkp.sub |
| 408 | (d := d) hp_enn_one hΩ_open hf (h_φn_mem n) |
| 409 | have h_wkp_φn_le : ∀ n, |
| 410 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm (d := d) 1 p_enn (φ n) |
| 411 | Ω ≤ |
| 412 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 413 | (d := d) 1 p_enn f Ω + |
| 414 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 415 | (d := d) 1 p_enn (fun x => f x - φ n x) Ω := by |
| 416 | intro n |
| 417 | have h_φn_decomp : (φ n) = (fun x => (φ n x - f x) + f x) := by funext x; ring |
| 418 | rw [h_φn_decomp] |
| 419 | have h_v_mem : |
| 420 | Poincare.Analysis.Sobolev.Euclidean.MemWkp (d := d) |
| 421 | 1 p_enn (fun x => φ n x - f x) Ω := |
| 422 | Poincare.Analysis.Sobolev.Euclidean.MemWkp.sub |
| 423 | (d := d) hp_enn_one hΩ_open (h_φn_mem n) hf |
| 424 | have h_tri := Poincare.Analysis.Sobolev.Euclidean.wkpNorm_add_le |
| 425 | (d := d) hp_enn_one hΩ_open h_v_mem hf |
| 426 | refine h_tri.trans ?_ |
| 427 | have h_neg_eq : |
| 428 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm (d := d) 1 p_enn |
| 429 | (fun x => φ n x - f x) Ω = |
| 430 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm (d := d) 1 p_enn |
| 431 | (fun x => f x - φ n x) Ω := by |
| 432 | have h_eq : (fun x : EuN => φ n x - f x) = (fun x : EuN => -(f x - φ n x)) := by |
| 433 | funext x; ring |
| 434 | rw [h_eq] |
| 435 | have h_smul := Poincare.Analysis.Sobolev.Euclidean.wkpNorm_const_smul |
| 436 | (d := d) hp_enn_one hΩ_open (h_diff_mem n) (-1) |
| 437 | have h_smul_eq : |
| 438 | (fun x : EuN => (-1 : ℝ) * (f x - φ n x)) = (fun x : EuN => -(f x - φ n x)) := by |
| 439 | funext x; ring |
| 440 | rw [h_smul_eq] at h_smul |
| 441 | rw [h_smul] |
| 442 | simp |
| 443 | rw [h_neg_eq, add_comm] |
| 444 | have h_simplify : (fun x : EuN => f x - (φ n x - f x + f x)) = (fun x => f x - φ n x) := by |
| 445 | funext x; ring |
| 446 | rw [h_simplify] |
| 447 | have h_eLpNorm_diff_le_wkp : ∀ n, |
| 448 | eLpNorm (fun x => f x - φ n x) p_enn (volume.restrict Ω) ≤ |
| 449 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 450 | (d := d) 1 p_enn (fun x => f x - φ n x) Ω := |
| 451 | fun n => by |
| 452 | simpa only [Poincare.Analysis.Sobolev.Euclidean.wkpNorm_zero] using |
| 453 | Poincare.Analysis.Sobolev.Euclidean.wkpNorm_mono_order |
| 454 | (Nat.zero_le 1) (fun x => f x - φ n x) Ω (p := p_enn) |
| 455 | have h_decay_to_zero : Tendsto (fun n : ℕ => ENNReal.ofReal (1 / (n + 1 : ℝ))) |
| 456 | atTop (nhds 0) := by |
| 457 | have hReal : Tendsto (fun n : ℕ => 1 / (n + 1 : ℝ)) atTop (nhds 0) := by |
| 458 | have h1 : Tendsto (fun n : ℕ => (n + 1 : ℝ)) atTop atTop := by |
| 459 | have h2 : Tendsto (fun n : ℕ => (n : ℝ)) atTop atTop := |
| 460 | tendsto_natCast_atTop_atTop |
| 461 | exact h2.atTop_add tendsto_const_nhds |
| 462 | simpa using (tendsto_const_nhds (x := (1 : ℝ))).div_atTop h1 |
| 463 | simpa [ENNReal.ofReal_zero] using ENNReal.tendsto_ofReal hReal |
| 464 | have h_eLpNorm_diff_to_zero : Tendsto (fun n => eLpNorm |
| 465 | (fun x => f x - φ n x) p_enn (volume.restrict Ω)) atTop (nhds 0) := by |
| 466 | have h_total_le : ∀ n, |
| 467 | eLpNorm (fun x => f x - φ n x) p_enn (volume.restrict Ω) ≤ |
| 468 | ENNReal.ofReal (1 / (n + 1 : ℝ)) := fun n => |
| 469 | (h_eLpNorm_diff_le_wkp n).trans (hφ_close n) |
| 470 | refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds h_decay_to_zero |
| 471 | (Filter.Eventually.of_forall (fun _ => zero_le)) |
| 472 | (Filter.Eventually.of_forall h_total_le) |
| 473 | have hf_aesm : AEStronglyMeasurable f (volume.restrict Ω) := hf.memLp.aestronglyMeasurable |
| 474 | have hφ_aesm : ∀ n, AEStronglyMeasurable (φ n) (volume.restrict Ω) := |
| 475 | fun n => (hφ_smooth n).continuous.aestronglyMeasurable |
| 476 | have h_tim : TendstoInMeasure (volume.restrict Ω) φ atTop f := by |
| 477 | refine tendstoInMeasure_of_tendsto_eLpNorm hp_enn_ne_zero hφ_aesm hf_aesm ?_ |
| 478 | have h_neg_eq : ∀ n, |
| 479 | eLpNorm (fun x => φ n x - f x) p_enn (volume.restrict Ω) = |
| 480 | eLpNorm (fun x => f x - φ n x) p_enn (volume.restrict Ω) := by |
| 481 | intro n |
| 482 | have h_eq : (fun x : EuN => φ n x - f x) = (fun x : EuN => -(f x - φ n x)) := by |
| 483 | funext x; ring |
| 484 | rw [h_eq] |
| 485 | have h_neg_apply : (fun x : EuN => -(f x - φ n x)) = -(fun x : EuN => f x - φ n x) := by |
| 486 | funext x; rfl |
| 487 | rw [h_neg_apply, eLpNorm_neg] |
| 488 | refine (Filter.tendsto_congr h_neg_eq).mpr h_eLpNorm_diff_to_zero |
| 489 | obtain ⟨σ, hσ_mono, hσ_ae⟩ := h_tim.exists_seq_tendsto_ae |
| 490 | have h_aesm_subseq : ∀ n, AEStronglyMeasurable (φ (σ n)) (volume.restrict Ω) := |
| 491 | fun n => hφ_aesm (σ n) |
| 492 | have h_fatou : eLpNorm f p_star (volume.restrict Ω) ≤ |
| 493 | atTop.liminf (fun n => eLpNorm (φ (σ n)) p_star (volume.restrict Ω)) := |
| 494 | MeasureTheory.Lp.eLpNorm_lim_le_liminf_eLpNorm h_aesm_subseq f hσ_ae |
| 495 | set C : ℝ≥0∞ := ENNReal.ofReal (Poincare.Analysis.Sobolev.Weak.CGns d p) * (d : ℝ≥0∞) with hC_def |
| 496 | set N : ℝ≥0∞ := Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 497 | (d := d) 1 p_enn f Ω with hN_def |
| 498 | have h_per_n : ∀ n, |
| 499 | eLpNorm (φ (σ n)) p_star (volume.restrict Ω) ≤ |
| 500 | C * |
| 501 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 502 | (d := d) 1 p_enn (φ (σ n)) Ω := by |
| 503 | intro n |
| 504 | have h1 := h_smooth_sob (σ n) |
| 505 | have h2 := h_grad_bound (σ n) |
| 506 | calc eLpNorm (φ (σ n)) p_star (volume.restrict Ω) |
| 507 | ≤ ENNReal.ofReal (Poincare.Analysis.Sobolev.Weak.CGns d p) * |
| 508 | eLpNorm (fderiv ℝ (φ (σ n))) p_enn (volume.restrict Ω) := h1 |
| 509 | _ ≤ ENNReal.ofReal (Poincare.Analysis.Sobolev.Weak.CGns d p) * |
| 510 | ((d : ℝ≥0∞) * |
| 511 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 512 | (d := d) 1 p_enn (φ (σ n)) Ω) := by gcongr |
| 513 | _ = C * |
| 514 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 515 | (d := d) 1 p_enn (φ (σ n)) Ω := by rw [hC_def]; ring |
| 516 | have h_wkp_subseq : ∀ n, |
| 517 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 518 | (d := d) 1 p_enn (φ (σ n)) Ω ≤ N + |
| 519 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 520 | (d := d) 1 p_enn (fun x => f x - φ (σ n) x) Ω := |
| 521 | fun n => h_wkp_φn_le (σ n) |
| 522 | have h_per_n_v2 : ∀ n, |
| 523 | eLpNorm (φ (σ n)) p_star (volume.restrict Ω) ≤ |
| 524 | C * (N + |
| 525 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 526 | (d := d) 1 p_enn (fun x => f x - φ (σ n) x) Ω) := fun n => |
| 527 | (h_per_n n).trans (by gcongr; exact h_wkp_subseq n) |
| 528 | have h_liminf_le_C_lim : |
| 529 | atTop.liminf (fun n => eLpNorm (φ (σ n)) p_star (volume.restrict Ω)) |
| 530 | ≤ atTop.liminf (fun n => C * (N + |
| 531 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 532 | (d := d) 1 p_enn (fun x => f x - φ (σ n) x) Ω)) := by |
| 533 | refine Filter.liminf_le_liminf (Filter.Eventually.of_forall h_per_n_v2) ?_ ?_ |
| 534 | · exact isBoundedUnder_of_eventually_ge (a := 0) |
| 535 | (Filter.Eventually.of_forall (fun _ => zero_le)) |
| 536 | · exact isCoboundedUnder_ge_of_eventually_le atTop |
| 537 | (Filter.Eventually.of_forall (fun _ => le_top)) |
| 538 | have h_wkp_diff_decay : Tendsto (fun n => |
| 539 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 540 | (d := d) 1 p_enn (fun x => f x - φ n x) Ω) atTop (nhds 0) := by |
| 541 | refine tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds h_decay_to_zero |
| 542 | (Filter.Eventually.of_forall (fun _ => zero_le)) |
| 543 | (Filter.Eventually.of_forall hφ_close) |
| 544 | have h_wkp_diff_subseq_decay : Tendsto (fun n => |
| 545 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 546 | (d := d) 1 p_enn (fun x => f x - φ (σ n) x) Ω) atTop (nhds 0) := |
| 547 | h_wkp_diff_decay.comp hσ_mono.tendsto_atTop |
| 548 | have hC_ne_top : C ≠ ⊤ := by |
| 549 | rw [hC_def] |
| 550 | exact ENNReal.mul_ne_top ENNReal.ofReal_ne_top (ENNReal.natCast_ne_top _) |
| 551 | have h_C_diff_decay : Tendsto (fun n => C * |
| 552 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 553 | (d := d) 1 p_enn (fun x => f x - φ (σ n) x) Ω) atTop (nhds 0) := by |
| 554 | simpa using |
| 555 | (ENNReal.Tendsto.const_mul h_wkp_diff_subseq_decay (Or.inr hC_ne_top)) |
| 556 | have h_alg : (fun n => C * (N + |
| 557 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 558 | (d := d) 1 p_enn (fun x => f x - φ (σ n) x) Ω)) = |
| 559 | (fun n => C * N + C * |
| 560 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 561 | (d := d) 1 p_enn (fun x => f x - φ (σ n) x) Ω) := by |
| 562 | funext n |
| 563 | rw [mul_add] |
| 564 | rw [h_alg] at h_liminf_le_C_lim |
| 565 | have h_liminf_const_add : |
| 566 | atTop.liminf (fun n => C * N + C * |
| 567 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 568 | (d := d) 1 p_enn (fun x => f x - φ (σ n) x) Ω) |
| 569 | = C * N := by |
| 570 | rw [show (fun n => C * N + C * |
| 571 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 572 | (d := d) 1 p_enn (fun x => f x - φ (σ n) x) Ω) = |
| 573 | (fun _ => C * N) + (fun n => C * |
| 574 | Poincare.Analysis.Sobolev.Euclidean.iteratedWeakSobolevNorm |
| 575 | (d := d) 1 p_enn (fun x => f x - φ (σ n) x) Ω) by rfl] |
| 576 | rw [ENNReal.liminf_add_of_right_tendsto_zero h_C_diff_decay] |
| 577 | simp |
| 578 | rw [h_liminf_const_add] at h_liminf_le_C_lim |
| 579 | exact h_fatou.trans h_liminf_le_C_lim |
| 580 | |
| 581 | end EuclideanSubcritical |
| 582 | |
| 583 | end Poincare.Analysis.Sobolev.EuclideanEmbedding |