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 | Source: https://github.com/qinz1yang/differential-geometry |
| 4 | DifferentialGeometry/Analysis/Sobolev/Nirenberg/CrossTermBoundsNonSmooth/CrossBoundsNonSmoothFTerm.lean |
| 5 | Comparison revision: 1b535dd102b94cc42b107cca27059687888f08b3. |
| 6 | Changes: Imports, module paths, and namespaces were adapted to the subject-organized PoincareLib library. |
| 7 | License: Apache-2.0. Source licenses and notices are retained under |
| 8 | PoincareConjecture/provenance/2026-09-29/licenses/. |
| 9 | See PoincareConjecture/MODIFICATIONS.md for the reviewed source mapping. |
| 10 | -/ |
| 11 | |
| 12 | import PoincareLib.Analysis.Elliptic.Regularity.EnergyEstimate.Smooth.CrossTerms |
| 13 | import PoincareLib.Analysis.Elliptic.Regularity.EnergyEstimate.CrossTerms.Principal |
| 14 | import PoincareLib.Analysis.Elliptic.Regularity.EnergyEstimate.CrossTerms.Coefficient |
| 15 | import PoincareLib.Analysis.Elliptic.Regularity.EnergyEstimate.TestFunction.Weak |
| 16 | |
| 17 | |
| 18 | /-! |
| 19 | # Local elliptic energy estimates |
| 20 | |
| 21 | Adapted from Chow--Liao--Qin, `Analysis/Sobolev/Nirenberg/CrossTermBoundsNonSmooth/CrossBoundsNonSmoothFTerm.lean`, |
| 22 | revision `1b535dd102b94cc42b107cca27059687888f08b3`. |
| 23 | Copyright 2026 The DifferentialGeometry contributors. Apache-2.0. |
| 24 | The adaptation changes imports and namespaces and uses smooth cutoffs. |
| 25 | -/ |
| 26 | |
| 27 | noncomputable section |
| 28 | |
| 29 | open MeasureTheory Metric Filter Topology Set Function |
| 30 | open Poincare.Analysis.Sobolev |
| 31 | open Poincare.Analysis.Sobolev.NirenbergEuclidean |
| 32 | open Poincare.Analysis.Sobolev.NirenbergCrossBounds |
| 33 | open Poincare.Analysis.Sobolev.NirenbergCrossBoundsNonSmooth |
| 34 | open scoped ENNReal NNReal Convolution Pointwise BigOperators InnerProductSpace |
| 35 | |
| 36 | namespace Poincare.Analysis.Sobolev.NirenbergCrossBoundsNonSmooth |
| 37 | |
| 38 | variable {d : ℕ} [NeZero d] |
| 39 | |
| 40 | local notation "E" => EuclideanSpace ℝ (Fin d) |
| 41 | |
| 42 | private lemma two_abs_mul_le_eps_mul_sq_add_inv_eps_mul_sq (a b ε : ℝ) (hε : 0 < ε) : |
| 43 | 2 * |a| * |b| ≤ ε * a^2 + (1/ε) * b^2 := by |
| 44 | have hsqrt_pos : 0 < Real.sqrt ε := Real.sqrt_pos.mpr hε |
| 45 | have hsqrt_ne : Real.sqrt ε ≠ 0 := ne_of_gt hsqrt_pos |
| 46 | set u : ℝ := Real.sqrt ε * |a| |
| 47 | set v : ℝ := |b| / Real.sqrt ε |
| 48 | have huv : 2 * u * v = 2 * |a| * |b| := by |
| 49 | change 2 * (Real.sqrt ε * |a|) * (|b| / Real.sqrt ε) = 2 * |a| * |b| |
| 50 | field_simp |
| 51 | have hu_sq : u^2 = ε * a^2 := by |
| 52 | change (Real.sqrt ε * |a|) ^ 2 = ε * a^2 |
| 53 | rw [mul_pow, Real.sq_sqrt hε.le, sq_abs] |
| 54 | have hv_sq : v^2 = (1/ε) * b^2 := by |
| 55 | change (|b| / Real.sqrt ε) ^ 2 = (1/ε) * b^2 |
| 56 | rw [div_pow, Real.sq_sqrt hε.le, sq_abs] |
| 57 | field_simp |
| 58 | calc 2 * |a| * |b| = 2 * u * v := huv.symm |
| 59 | _ ≤ u^2 + v^2 := two_mul_le_add_sq u v |
| 60 | _ = ε * a^2 + (1/ε) * b^2 := by rw [hu_sq, hv_sq] |
| 61 | |
| 62 | omit [NeZero d] in |
| 63 | private lemma v_test_supported_in_Ω'_nonsmooth_fterm |
| 64 | {u : E → ℝ} |
| 65 | {η : E → ℝ} |
| 66 | {Ω' : Set E} |
| 67 | {R₀ : ℝ} |
| 68 | (hh_supp_in_Ω' : ∀ {h : ℝ}, |h| ≤ R₀ → |
| 69 | Metric.cthickening |h| (tsupport η) ⊆ Ω') |
| 70 | (k : Fin d) {h : ℝ} (hh_le : |h| ≤ R₀) : |
| 71 | tsupport |
| 72 | (Poincare.Analysis.Sobolev.NirenbergTestFunction.nirenbergTestFunction |
| 73 | k h η u) ⊆ Ω' := |
| 74 | (Poincare.Analysis.Sobolev.NirenbergTestFunction.tsupport_nirenbergTestFunction_subset |
| 75 | (d := d) η u k h).trans (hh_supp_in_Ω' hh_le) |
| 76 | |
| 77 | omit [NeZero d] in |
| 78 | private lemma hasCompactSupport_v_test_nonsmooth_fterm |
| 79 | {η : E → ℝ} (hη_supp : HasCompactSupport η) |
| 80 | {u : E → ℝ} (k : Fin d) (h : ℝ) : |
| 81 | HasCompactSupport |
| 82 | (Poincare.Analysis.Sobolev.NirenbergTestFunction.nirenbergTestFunction |
| 83 | k h η u) := |
| 84 | NirenbergTestFunction.hasCompactSupport_nirenbergTestFunction |
| 85 | hη_supp k h |
| 86 | |
| 87 | omit [NeZero d] in |
| 88 | private lemma memLp_eta_sq_diffQuot_u_fterm |
| 89 | {u : E → ℝ} (hu_l2 : MemLp u 2 (volume : Measure E)) |
| 90 | {η : E → ℝ} (hη : ContDiff ℝ (⊤ : ℕ∞) η) (hη_supp : HasCompactSupport η) |
| 91 | (k : Fin d) (h : ℝ) : |
| 92 | MemLp (fun x : E => (η x) ^ 2 * diffQuot k h u x) 2 |
| 93 | (volume : Measure E) := by |
| 94 | classical |
| 95 | have hη_sq_cont : Continuous (fun x : E => (η x) ^ 2) := hη.continuous.pow 2 |
| 96 | have hη_sq_supp : HasCompactSupport (fun x : E => (η x) ^ 2) := by |
| 97 | have heq : (fun y : E => η y ^ 2) = (fun y : E => η y * η y) := by |
| 98 | funext y; ring |
| 99 | rw [heq]; exact hη_supp.mul_right |
| 100 | obtain ⟨M, _, hM⟩ := |
| 101 | exists_bound_of_continuous_compactSupport hη_sq_cont hη_sq_supp |
| 102 | have h_dq_l2 : MemLp (diffQuot k h u) 2 (volume : Measure E) := |
| 103 | memLp_diffQuot_two k h hu_l2 |
| 104 | exact memLp_bounded_mul hη_sq_cont.aestronglyMeasurable hM h_dq_l2 |
| 105 | |
| 106 | omit [NeZero d] in |
| 107 | private lemma memLp_v_test_nonsmooth_fterm |
| 108 | {u : E → ℝ} (hu_l2 : MemLp u 2 (volume : Measure E)) |
| 109 | {η : E → ℝ} (hη : ContDiff ℝ (⊤ : ℕ∞) η) (hη_supp : HasCompactSupport η) |
| 110 | (k : Fin d) (h : ℝ) : |
| 111 | MemLp |
| 112 | (Poincare.Analysis.Sobolev.NirenbergTestFunction.nirenbergTestFunction |
| 113 | k h η u) 2 (volume : Measure E) := by |
| 114 | classical |
| 115 | have h_inner : MemLp (fun x : E => (η x) ^ 2 * diffQuot k h u x) 2 |
| 116 | (volume : Measure E) := |
| 117 | memLp_eta_sq_diffQuot_u_fterm (d := d) hu_l2 hη hη_supp k h |
| 118 | have h_eq : |
| 119 | Poincare.Analysis.Sobolev.NirenbergTestFunction.nirenbergTestFunction |
| 120 | k h η u = |
| 121 | diffQuot k (-h) (fun x : E => (η x) ^ 2 * diffQuot k h u x) := rfl |
| 122 | rw [h_eq] |
| 123 | exact memLp_diffQuot_two k (-h) h_inner |
| 124 | |
| 125 | omit [NeZero d] in |
| 126 | private lemma pointwise_young_f_v_test |
| 127 | (f : E → ℝ) (v_test : E → ℝ) {ε : ℝ} (hε : 0 < ε) (x : E) : |
| 128 | |f x * v_test x| ≤ (ε/2) * (v_test x) ^ 2 + (1/(2*ε)) * (f x) ^ 2 := by |
| 129 | have h_y := two_abs_mul_le_eps_mul_sq_add_inv_eps_mul_sq (v_test x) (f x) ε hε |
| 130 | have h_abs_eq : |f x * v_test x| = |v_test x| * |f x| := by |
| 131 | rw [show (f x * v_test x) = v_test x * f x from by ring, abs_mul] |
| 132 | rw [h_abs_eq] |
| 133 | have h_div_eq : (1 / ε) * (f x) ^ 2 = 2 * ((1 / (2 * ε)) * (f x) ^ 2) := by |
| 134 | have hε_ne : ε ≠ 0 := ne_of_gt hε |
| 135 | field_simp |
| 136 | have h_ε_eq : ε * (v_test x) ^ 2 = 2 * ((ε / 2) * (v_test x) ^ 2) := by ring |
| 137 | linarith [h_y, h_div_eq, h_ε_eq] |
| 138 | |
| 139 | omit [NeZero d] in |
| 140 | private lemma pointwise_half_sum_f_v_test |
| 141 | (f v_test : E → ℝ) (x : E) : |
| 142 | |f x * v_test x| ≤ (1/2) * ((f x) ^ 2 + (v_test x) ^ 2) := by |
| 143 | have h_y := two_abs_mul_le_eps_mul_sq_add_inv_eps_mul_sq (f x) (v_test x) 1 zero_lt_one |
| 144 | simp only [one_mul, div_one] at h_y |
| 145 | have h_abs : |f x * v_test x| = |f x| * |v_test x| := abs_mul _ _ |
| 146 | linarith |
| 147 | |
| 148 | |
| 149 | omit [NeZero d] in |
| 150 | theorem f_term_bound_nonsmooth_quantitative |
| 151 | {Ω : Set E} |
| 152 | {f : E → ℝ} (hf_l2_loc : ∀ {Ω' : Set E}, IsCompact (closure Ω') → |
| 153 | MemLp f 2 (volume.restrict Ω')) |
| 154 | {u : E → ℝ} |
| 155 | (hu_l2 : MemLp u 2 (volume : Measure E)) |
| 156 | {g : Fin d → E → ℝ} |
| 157 | {η : E → ℝ} (hη : ContDiff ℝ (⊤ : ℕ∞) η) (hη_supp : HasCompactSupport η) |
| 158 | {N : ℝ} |
| 159 | {Ω' : Set E} (hΩ'_closure : closure Ω' ⊆ Ω) |
| 160 | (hΩ'_compact : IsCompact (closure Ω')) |
| 161 | {R₀ : ℝ} |
| 162 | (hh_supp_in_Ω' : ∀ {h : ℝ}, |h| ≤ R₀ → |
| 163 | Metric.cthickening |h| (tsupport η) ⊆ Ω') |
| 164 | (k : Fin d) |
| 165 | (h_FK_diffQuot_u_bound : ∀ {h : ℝ}, h ≠ 0 → |h| ≤ R₀ → |
| 166 | ∫ x in tsupport η, |
| 167 | (Poincare.Analysis.Sobolev.diffQuot k h u x) ^ 2 |
| 168 | ∂(volume : Measure E) ≤ |
| 169 | ∫ x in Ω', ∑ i : Fin d, ((g i) x) ^ 2 ∂(volume : Measure E)) |
| 170 | (h_v_test_l2_bound : ∀ {h : ℝ}, h ≠ 0 → |h| ≤ R₀ → |
| 171 | ∫ x, (Poincare.Analysis.Sobolev.NirenbergTestFunction.nirenbergTestFunction |
| 172 | k h η u x) ^ 2 ∂(volume : Measure E) ≤ |
| 173 | 8 * N ^ 2 * |
| 174 | ∫ x in tsupport η, |
| 175 | (Poincare.Analysis.Sobolev.diffQuot k h u x) ^ 2 |
| 176 | ∂(volume : Measure E) + |
| 177 | 2 * ∫ x, (η x) ^ 2 * |
| 178 | ∑ i : Fin d, |
| 179 | (Poincare.Analysis.Sobolev.diffQuot k h (g i) x) ^ 2 |
| 180 | ∂(volume : Measure E)) |
| 181 | (ε : ℝ) (hε : 0 < ε) : |
| 182 | ∀ ⦃h : ℝ⦄, h ≠ 0 → |h| ≤ R₀ → |
| 183 | |∫ x in Ω, f x * |
| 184 | Poincare.Analysis.Sobolev.NirenbergTestFunction.nirenbergTestFunction |
| 185 | k h η u x| ≤ |
| 186 | ε * ∫ x, (η x) ^ 2 * |
| 187 | ∑ i : Fin d, |
| 188 | Poincare.Analysis.Sobolev.diffQuot k h (g i) x ^ 2 |
| 189 | ∂(volume : Measure E) + |
| 190 | (max (4 * ε * N ^ 2) (1 / (2 * ε))) * (∫ x in Ω', |
| 191 | ∑ i : Fin d, ((g i) x) ^ 2 |
| 192 | ∂(volume : Measure E) + |
| 193 | ∫ x in Ω', (f x) ^ 2 ∂(volume : Measure E)) := by |
| 194 | classical |
| 195 | set C : ℝ := max (4 * ε * N ^ 2) (1 / (2 * ε)) with hC_def |
| 196 | have hC_nn : 0 ≤ C := by |
| 197 | rw [hC_def] |
| 198 | refine le_max_of_le_left ?_ |
| 199 | refine mul_nonneg ?_ (sq_nonneg _) |
| 200 | exact mul_nonneg (by linarith) hε.le |
| 201 | intro h hh hh_le |
| 202 | have h_thick_in_Ω' : Metric.cthickening |h| (tsupport η) ⊆ Ω' := hh_supp_in_Ω' hh_le |
| 203 | set v_test : E → ℝ := |
| 204 | Poincare.Analysis.Sobolev.NirenbergTestFunction.nirenbergTestFunction |
| 205 | k h η u with hv_test_def |
| 206 | have h_v_test_supp : tsupport v_test ⊆ Ω' := |
| 207 | v_test_supported_in_Ω'_nonsmooth_fterm (d := d) hh_supp_in_Ω' k hh_le |
| 208 | have h_v_test_supp_cmp : HasCompactSupport v_test := |
| 209 | hasCompactSupport_v_test_nonsmooth_fterm (d := d) hη_supp k h |
| 210 | have h_v_test_memLp : MemLp v_test 2 (volume : Measure E) := |
| 211 | memLp_v_test_nonsmooth_fterm (d := d) hu_l2 hη hη_supp k h |
| 212 | have h_v_test_zero_outside : ∀ x ∉ Ω, v_test x = 0 := fun x hx => |
| 213 | image_eq_zero_of_notMem_tsupport |
| 214 | (fun hy => hx (hΩ'_closure (subset_closure (h_v_test_supp hy)))) |
| 215 | have h_v_test_zero_outside_Ω' : ∀ x ∉ Ω', v_test x = 0 := fun x hx => |
| 216 | image_eq_zero_of_notMem_tsupport (fun hy => hx (h_v_test_supp hy)) |
| 217 | have hf_memLp : MemLp f 2 (volume.restrict Ω') := hf_l2_loc hΩ'_compact |
| 218 | have hf_sq_int_Ω' : IntegrableOn (fun x : E => (f x) ^ 2) Ω' volume := |
| 219 | hf_memLp.integrable_sq |
| 220 | have h_int_E : ∫ x in Ω, f x * v_test x ∂(volume : Measure E) = |
| 221 | ∫ x in Ω', f x * v_test x ∂(volume : Measure E) := by |
| 222 | have h_eq_zero_Ω : ∀ x, x ∉ Ω → f x * v_test x = 0 := by |
| 223 | intro x hx; rw [h_v_test_zero_outside x hx]; ring |
| 224 | have h_eq_zero_Ω' : ∀ x, x ∉ Ω' → f x * v_test x = 0 := by |
| 225 | intro x hx; rw [h_v_test_zero_outside_Ω' x hx]; ring |
| 226 | rw [setIntegral_eq_integral_of_forall_compl_eq_zero h_eq_zero_Ω, |
| 227 | ← setIntegral_eq_integral_of_forall_compl_eq_zero h_eq_zero_Ω'] |
| 228 | rw [h_int_E] |
| 229 | have h_pointwise : ∀ x : E, |
| 230 | |f x * v_test x| ≤ (ε/2) * (v_test x) ^ 2 + (1/(2*ε)) * (f x) ^ 2 := |
| 231 | pointwise_young_f_v_test (d := d) f v_test hε |
| 232 | have h_v_test_sq_int_E : Integrable (fun x : E => (v_test x) ^ 2) |
| 233 | (volume : Measure E) := by |
| 234 | have h_norm_sq_int : Integrable |
| 235 | (fun x : E => ‖v_test x‖ ^ (2 : ℕ)) (volume : Measure E) := by |
| 236 | have hh' := h_v_test_memLp.integrable_norm_rpow |
| 237 | (by norm_num : (2 : ℝ≥0∞) ≠ 0) (by norm_num : (2 : ℝ≥0∞) ≠ ∞) |
| 238 | have h_pow_eq : (2 : ℝ≥0∞).toReal = 2 := by |
| 239 | show ENNReal.toReal 2 = 2; rfl |
| 240 | rw [h_pow_eq] at hh' |
| 241 | have heq : (fun x : E => ‖v_test x‖ ^ (2 : ℝ)) = |
| 242 | (fun x : E => ‖v_test x‖ ^ (2 : ℕ)) := by |
| 243 | funext x |
| 244 | rw [show (2 : ℝ) = ((2 : ℕ) : ℝ) by norm_cast, Real.rpow_natCast] |
| 245 | rw [heq] at hh' |
| 246 | exact hh' |
| 247 | have heq2 : (fun x : E => (v_test x) ^ 2) = |
| 248 | (fun x : E => ‖v_test x‖ ^ (2 : ℕ)) := by |
| 249 | funext x |
| 250 | rw [Real.norm_eq_abs, sq_abs] |
| 251 | rw [heq2] |
| 252 | exact h_norm_sq_int |
| 253 | have h_v_test_sq_int_Ω' : IntegrableOn (fun x : E => (v_test x) ^ 2) Ω' volume := |
| 254 | h_v_test_sq_int_E.integrableOn |
| 255 | have h_f_v_int_Ω' : IntegrableOn (fun x : E => f x * v_test x) Ω' volume := by |
| 256 | have h_pointwise_abs : ∀ x : E, |
| 257 | |f x * v_test x| ≤ (1/2) * ((f x) ^ 2 + (v_test x) ^ 2) := |
| 258 | pointwise_half_sum_f_v_test (d := d) f v_test |
| 259 | have h_rhs_int : IntegrableOn (fun x : E => (1/2) * ((f x) ^ 2 + (v_test x) ^ 2)) Ω' volume := |
| 260 | (hf_sq_int_Ω'.add h_v_test_sq_int_Ω').const_mul (1/2) |
| 261 | have h_f_AEStrong : AEStronglyMeasurable f (volume.restrict Ω') := |
| 262 | hf_memLp.aestronglyMeasurable |
| 263 | have h_v_AEStrong : AEStronglyMeasurable v_test (volume.restrict Ω') := |
| 264 | h_v_test_memLp.aestronglyMeasurable.restrict |
| 265 | have h_prod_AEStrong : AEStronglyMeasurable (fun x : E => f x * v_test x) |
| 266 | (volume.restrict Ω') := h_f_AEStrong.mul h_v_AEStrong |
| 267 | refine ⟨h_prod_AEStrong, ?_⟩ |
| 268 | refine HasFiniteIntegral.mono' h_rhs_int.hasFiniteIntegral ?_ |
| 269 | refine Filter.Eventually.of_forall ?_ |
| 270 | intro x |
| 271 | rw [Real.norm_eq_abs] |
| 272 | exact h_pointwise_abs x |
| 273 | have h_rhs_int_Ω' : IntegrableOn (fun x : E => |
| 274 | (ε/2) * (v_test x) ^ 2 + (1/(2*ε)) * (f x) ^ 2) Ω' volume := by |
| 275 | refine (h_v_test_sq_int_Ω'.const_mul (ε/2)).add (hf_sq_int_Ω'.const_mul (1/(2*ε))) |
| 276 | have h_step1 : |∫ x in Ω', f x * v_test x ∂(volume : Measure E)| ≤ |
| 277 | ∫ x in Ω', |f x * v_test x| ∂(volume : Measure E) := |
| 278 | abs_integral_le_integral_abs (μ := (volume : Measure E).restrict Ω') |
| 279 | have h_step2 : ∫ x in Ω', |f x * v_test x| ∂(volume : Measure E) ≤ |
| 280 | ∫ x in Ω', ((ε/2) * (v_test x) ^ 2 + (1/(2*ε)) * (f x) ^ 2) ∂(volume : Measure E) := by |
| 281 | refine integral_mono_ae h_f_v_int_Ω'.abs h_rhs_int_Ω' ?_ |
| 282 | refine Filter.Eventually.of_forall ?_ |
| 283 | intro x; exact h_pointwise x |
| 284 | refine (h_step1.trans h_step2).trans ?_ |
| 285 | rw [integral_add (h_v_test_sq_int_Ω'.const_mul (ε/2)) (hf_sq_int_Ω'.const_mul (1/(2*ε)))] |
| 286 | rw [integral_const_mul, integral_const_mul] |
| 287 | have h_v_test_sq_Ω'_le_E : |
| 288 | ∫ x in Ω', (v_test x) ^ 2 ∂(volume : Measure E) ≤ |
| 289 | ∫ x, (v_test x) ^ 2 ∂(volume : Measure E) := by |
| 290 | have h_v_test_sq_eq : ∫ x, (v_test x) ^ 2 ∂(volume : Measure E) = |
| 291 | ∫ x in Ω', (v_test x) ^ 2 ∂(volume : Measure E) := by |
| 292 | have h_eq_zero : ∀ x, x ∉ Ω' → (v_test x) ^ 2 = 0 := by |
| 293 | intro x hx |
| 294 | rw [h_v_test_zero_outside_Ω' x hx]; ring |
| 295 | exact (setIntegral_eq_integral_of_forall_compl_eq_zero h_eq_zero).symm |
| 296 | rw [h_v_test_sq_eq] |
| 297 | have h_v_test_bound := h_v_test_l2_bound hh hh_le |
| 298 | have h_v_sq_le_8N_2I : |
| 299 | ∫ x in Ω', (v_test x) ^ 2 ∂(volume : Measure E) ≤ |
| 300 | 8 * N ^ 2 * |
| 301 | ∫ x in tsupport η, (diffQuot k h u x) ^ 2 ∂(volume : Measure E) + |
| 302 | 2 * ∫ x, (η x) ^ 2 * |
| 303 | ∑ i : Fin d, (diffQuot k h (g i) x) ^ 2 |
| 304 | ∂(volume : Measure E) := |
| 305 | h_v_test_sq_Ω'_le_E.trans h_v_test_bound |
| 306 | have h_diff_bound : |
| 307 | ∫ x in tsupport η, (diffQuot k h u x) ^ 2 ∂(volume : Measure E) ≤ |
| 308 | ∫ x in Ω', ∑ i : Fin d, ((g i) x) ^ 2 |
| 309 | ∂(volume : Measure E) := |
| 310 | h_FK_diffQuot_u_bound hh hh_le |
| 311 | have h_gradL2_nn : 0 ≤ ∫ x in Ω', |
| 312 | ∑ i : Fin d, ((g i) x) ^ 2 |
| 313 | ∂(volume : Measure E) := |
| 314 | integral_nonneg (fun x => Finset.sum_nonneg (fun i _ => sq_nonneg _)) |
| 315 | have h_fL2_nn : 0 ≤ ∫ x in Ω', (f x) ^ 2 ∂(volume : Measure E) := |
| 316 | integral_nonneg (fun x => sq_nonneg _) |
| 317 | have h_v_full_bound : |
| 318 | (ε/2) * ∫ x in Ω', (v_test x) ^ 2 ∂(volume : Measure E) ≤ |
| 319 | 4 * ε * N ^ 2 * |
| 320 | ∫ x in Ω', ∑ i : Fin d, ((g i) x) ^ 2 |
| 321 | ∂(volume : Measure E) + |
| 322 | ε * ∫ x, (η x) ^ 2 * |
| 323 | ∑ i : Fin d, (diffQuot k h (g i) x) ^ 2 |
| 324 | ∂(volume : Measure E) := by |
| 325 | have h_step_a := mul_le_mul_of_nonneg_left h_v_sq_le_8N_2I (by linarith : 0 ≤ ε/2) |
| 326 | have h_step_b : (ε/2) * (8 * N ^ 2 * |
| 327 | ∫ x in tsupport η, (diffQuot k h u x) ^ 2 ∂(volume : Measure E) + |
| 328 | 2 * ∫ x, (η x) ^ 2 * |
| 329 | ∑ i : Fin d, (diffQuot k h (g i) x) ^ 2 |
| 330 | ∂(volume : Measure E)) ≤ |
| 331 | 4 * ε * N ^ 2 * |
| 332 | ∫ x in Ω', ∑ i : Fin d, ((g i) x) ^ 2 |
| 333 | ∂(volume : Measure E) + |
| 334 | ε * ∫ x, (η x) ^ 2 * |
| 335 | ∑ i : Fin d, (diffQuot k h (g i) x) ^ 2 |
| 336 | ∂(volume : Measure E) := by |
| 337 | have h1 : (ε/2) * (8 * N ^ 2 * |
| 338 | ∫ x in tsupport η, (diffQuot k h u x) ^ 2 ∂(volume : Measure E)) = |
| 339 | 4 * ε * N ^ 2 * |
| 340 | ∫ x in tsupport η, (diffQuot k h u x) ^ 2 ∂(volume : Measure E) := by ring |
| 341 | have h2 : (ε/2) * (2 * ∫ x, (η x) ^ 2 * |
| 342 | ∑ i : Fin d, (diffQuot k h (g i) x) ^ 2 |
| 343 | ∂(volume : Measure E)) = |
| 344 | ε * ∫ x, (η x) ^ 2 * |
| 345 | ∑ i : Fin d, (diffQuot k h (g i) x) ^ 2 |
| 346 | ∂(volume : Measure E) := by ring |
| 347 | have h_diff_pos : 0 ≤ 4 * ε * N ^ 2 := by |
| 348 | refine mul_nonneg ?_ (sq_nonneg _) |
| 349 | exact mul_nonneg (by linarith) hε.le |
| 350 | have h_step_c : 4 * ε * N ^ 2 * |
| 351 | ∫ x in tsupport η, (diffQuot k h u x) ^ 2 ∂(volume : Measure E) ≤ |
| 352 | 4 * ε * N ^ 2 * |
| 353 | ∫ x in Ω', ∑ i : Fin d, ((g i) x) ^ 2 |
| 354 | ∂(volume : Measure E) := |
| 355 | mul_le_mul_of_nonneg_left h_diff_bound h_diff_pos |
| 356 | linarith [h1, h2] |
| 357 | linarith |
| 358 | have h_C_grad_le : 4 * ε * N ^ 2 ≤ C := le_max_left _ _ |
| 359 | have h_C_fL2_le : 1 / (2 * ε) ≤ C := le_max_right _ _ |
| 360 | have h_combine : |
| 361 | 4 * ε * N ^ 2 * |
| 362 | ∫ x in Ω', ∑ i : Fin d, ((g i) x) ^ 2 |
| 363 | ∂(volume : Measure E) + |
| 364 | (1 / (2 * ε)) * ∫ x in Ω', (f x) ^ 2 ∂(volume : Measure E) ≤ |
| 365 | C * (∫ x in Ω', ∑ i : Fin d, ((g i) x) ^ 2 |
| 366 | ∂(volume : Measure E) + |
| 367 | ∫ x in Ω', (f x) ^ 2 ∂(volume : Measure E)) := by |
| 368 | have h_left_le := mul_le_mul_of_nonneg_right h_C_grad_le h_gradL2_nn |
| 369 | have h_right_le := mul_le_mul_of_nonneg_right h_C_fL2_le h_fL2_nn |
| 370 | have h_C_dist : C * (∫ x in Ω', ∑ i : Fin d, ((g i) x) ^ 2 |
| 371 | ∂(volume : Measure E) + |
| 372 | ∫ x in Ω', (f x) ^ 2 ∂(volume : Measure E)) = |
| 373 | C * (∫ x in Ω', ∑ i : Fin d, ((g i) x) ^ 2 |
| 374 | ∂(volume : Measure E)) + |
| 375 | C * ∫ x in Ω', (f x) ^ 2 ∂(volume : Measure E) := by ring |
| 376 | linarith |
| 377 | linarith |
| 378 | |
| 379 | |
| 380 | omit [NeZero d] in |
| 381 | theorem f_term_bound_nonsmooth |
| 382 | {Ω : Set E} |
| 383 | {f : E → ℝ} (hf_l2_loc : ∀ {Ω' : Set E}, IsCompact (closure Ω') → |
| 384 | MemLp f 2 (volume.restrict Ω')) |
| 385 | {u : E → ℝ} |
| 386 | (hu_l2 : MemLp u 2 (volume : Measure E)) |
| 387 | {g : Fin d → E → ℝ} |
| 388 | {η : E → ℝ} (hη : ContDiff ℝ (⊤ : ℕ∞) η) (hη_supp : HasCompactSupport η) |
| 389 | {N : ℝ} |
| 390 | {Ω' : Set E} (hΩ'_closure : closure Ω' ⊆ Ω) |
| 391 | (hΩ'_compact : IsCompact (closure Ω')) |
| 392 | {R₀ : ℝ} |
| 393 | (hh_supp_in_Ω' : ∀ {h : ℝ}, |h| ≤ R₀ → |
| 394 | Metric.cthickening |h| (tsupport η) ⊆ Ω') |
| 395 | (k : Fin d) |
| 396 | (h_FK_diffQuot_u_bound : ∀ {h : ℝ}, h ≠ 0 → |h| ≤ R₀ → |
| 397 | ∫ x in tsupport η, |
| 398 | (Poincare.Analysis.Sobolev.diffQuot k h u x) ^ 2 |
| 399 | ∂(volume : Measure E) ≤ |
| 400 | ∫ x in Ω', ∑ i : Fin d, ((g i) x) ^ 2 ∂(volume : Measure E)) |
| 401 | (h_v_test_l2_bound : ∀ {h : ℝ}, h ≠ 0 → |h| ≤ R₀ → |
| 402 | ∫ x, (Poincare.Analysis.Sobolev.NirenbergTestFunction.nirenbergTestFunction |
| 403 | k h η u x) ^ 2 ∂(volume : Measure E) ≤ |
| 404 | 8 * N ^ 2 * |
| 405 | ∫ x in tsupport η, |
| 406 | (Poincare.Analysis.Sobolev.diffQuot k h u x) ^ 2 |
| 407 | ∂(volume : Measure E) + |
| 408 | 2 * ∫ x, (η x) ^ 2 * |
| 409 | ∑ i : Fin d, |
| 410 | (Poincare.Analysis.Sobolev.diffQuot k h (g i) x) ^ 2 |
| 411 | ∂(volume : Measure E)) |
| 412 | (ε : ℝ) (hε : 0 < ε) : |
| 413 | ∃ C : ℝ, 0 ≤ C ∧ ∀ {h : ℝ}, h ≠ 0 → |h| ≤ R₀ → |
| 414 | |∫ x in Ω, f x * |
| 415 | Poincare.Analysis.Sobolev.NirenbergTestFunction.nirenbergTestFunction |
| 416 | k h η u x| ≤ |
| 417 | ε * ∫ x, (η x) ^ 2 * |
| 418 | ∑ i : Fin d, |
| 419 | Poincare.Analysis.Sobolev.diffQuot k h (g i) x ^ 2 |
| 420 | ∂(volume : Measure E) + |
| 421 | C * (∫ x in Ω', |
| 422 | ∑ i : Fin d, ((g i) x) ^ 2 |
| 423 | ∂(volume : Measure E) + |
| 424 | ∫ x in Ω', (f x) ^ 2 ∂(volume : Measure E)) := by |
| 425 | classical |
| 426 | refine ⟨max (4 * ε * N ^ 2) (1 / (2 * ε)), ?_, ?_⟩ |
| 427 | · refine le_max_of_le_left ?_ |
| 428 | refine mul_nonneg ?_ (sq_nonneg _) |
| 429 | exact mul_nonneg (by linarith) hε.le |
| 430 | · intro h hh hh_le |
| 431 | exact f_term_bound_nonsmooth_quantitative (d := d) hf_l2_loc hu_l2 |
| 432 | hη hη_supp hΩ'_closure hΩ'_compact hh_supp_in_Ω' k h_FK_diffQuot_u_bound |
| 433 | h_v_test_l2_bound ε hε hh hh_le |
| 434 | |
| 435 | end Poincare.Analysis.Sobolev.NirenbergCrossBoundsNonSmooth |