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 | Adapted from AxelWorkspace revision f1cdb30cabdc8781d2d3dec86d3d99ab1820f30e. |
| 3 | Source and SHA-256: references/analysis/axel-workspace/weak-parabolic-regularity-sources.json. |
| 4 | Apache-2.0; see the license in that source directory. |
| 5 | -/ |
| 6 | import PoincareLib.Analysis.Parabolic.WeakRegularity.Interior.VariableEnergy |
| 7 | import Mathlib.Analysis.Calculus.BumpFunction.FiniteDimension |
| 8 | |
| 9 | /-! |
| 10 | # Local parabolic Hessian coercivity |
| 11 | |
| 12 | Smooth coefficients near an interior point admit a ball on which the frozen |
| 13 | energy estimate applies to every compactly supported smooth test function. |
| 14 | The coefficient extension and its small oscillation are constructed here. |
| 15 | |
| 16 | Auxiliary argument for Morgan--Tian, Proposition 9.20, Section 9.2.6, p. 208. |
| 17 | -/ |
| 18 | |
| 19 | open Set Metric Filter MeasureTheory |
| 20 | open scoped ContDiff Topology |
| 21 | |
| 22 | noncomputable section |
| 23 | |
| 24 | namespace Poincare.Analysis.Parabolic.WeakRegularity.Canonical |
| 25 | |
| 26 | variable {n : ℕ} |
| 27 | |
| 28 | private theorem localized_coefficient_smooth |
| 29 | {U : Set (Spacetime n)} (hU : IsOpen U) |
| 30 | {q : Spacetime n → ℝ} (hq : ContDiffOn ℝ ∞ q U) |
| 31 | {z : Spacetime n} (χ : ContDiffBump z) (hχU : tsupport χ ⊆ U) : |
| 32 | ContDiff ℝ ∞ (fun y => χ y * q y) := by |
| 33 | rw [contDiff_iff_contDiffAt] |
| 34 | intro y |
| 35 | by_cases hy : y ∈ tsupport (fun w => χ w * q w) |
| 36 | · have hyU := hχU (tsupport_mul_subset_left hy) |
| 37 | exact χ.contDiff.contDiffAt.mul ((hq y hyU).contDiffAt (hU.mem_nhds hyU)) |
| 38 | · exact contDiffAt_const.congr_of_eventuallyEq (notMem_tsupport_iff_eventuallyEq.mp hy) |
| 39 | |
| 40 | /-- **Math.** Pointwise ellipticity at an interior point and local smoothness |
| 41 | construct a neighborhood with a parabolic Hessian estimate. -/ |
| 42 | theorem exists_local_principal_parabolic_coercivity |
| 43 | {U : Set (Spacetime n)} (hU : IsOpen U) |
| 44 | {a : Fin n → Fin n → Spacetime n → ℝ} |
| 45 | (ha : ∀ i j, ContDiffOn ℝ ∞ (a i j) U) |
| 46 | {z : Spacetime n} (hz : z ∈ U) {κ : ℝ} (hκ : 0 < κ) |
| 47 | (hEll : ∀ ξ : Euclid n, κ * ‖ξ‖ ^ 2 ≤ |
| 48 | ∑ i, ∑ j, a i j z * ξ i * ξ j) : |
| 49 | ∃ r : ℝ, 0 < r ∧ closedBall z r ⊆ U ∧ |
| 50 | ∀ (v : Spacetime n → ℝ), ContDiff ℝ ∞ v → HasCompactSupport v → |
| 51 | tsupport v ⊆ ball z r → |
| 52 | (∫ y, (timeDeriv v y) ^ 2) + (κ ^ 2 / 2) * |
| 53 | (∫ y, ∑ i, ∑ j, (spatialSecond i j v y) ^ 2) ≤ |
| 54 | 2 * (∫ y, (timeDeriv v y - ∑ i, ∑ j, a i j y * spatialSecond i j v y) ^ 2) := by |
| 55 | let osc : Spacetime n → ℝ := fun y => ∑ i, ∑ j, (a i j y - a i j z) ^ 2 |
| 56 | have hc : ContinuousAt osc z := by |
| 57 | have hcOn : ContinuousOn osc U := by |
| 58 | apply continuousOn_finsetSum |
| 59 | intro i hi |
| 60 | apply continuousOn_finsetSum |
| 61 | intro j hj |
| 62 | exact ((ha i j).continuousOn.sub continuousOn_const).pow 2 |
| 63 | exact hcOn.continuousAt (hU.mem_nhds hz) |
| 64 | have ho : osc z = 0 := by simp [osc] |
| 65 | have hsmall : ∀ᶠ y in 𝓝 z, osc y < (κ / 2) ^ 2 := by |
| 66 | exact hc.eventually (gt_mem_nhds (by rw [ho]; positivity)) |
| 67 | obtain ⟨δ, hδ, hδall⟩ := Metric.mem_nhds_iff.mp |
| 68 | (Filter.inter_mem (hU.mem_nhds hz) hsmall) |
| 69 | let χ : ContDiffBump z := |
| 70 | { rIn := δ / 4 |
| 71 | rOut := δ / 2 |
| 72 | rIn_pos := by positivity |
| 73 | rIn_lt_rOut := by linarith } |
| 74 | have hχU : tsupport χ ⊆ U := by |
| 75 | rw [χ.tsupport_eq] |
| 76 | intro y hy |
| 77 | exact (hδall ((mem_closedBall.mp hy).trans_lt (by change δ / 2 < δ; linarith))).1 |
| 78 | let a' : Fin n → Fin n → Spacetime n → ℝ := fun i j y => χ y * a i j y |
| 79 | have ha' (i j : Fin n) : Continuous (a' i j) := |
| 80 | (localized_coefficient_smooth hU (ha i j) χ hχU).continuous |
| 81 | have heq (i j : Fin n) {y : Spacetime n} (hy : y ∈ ball z (δ / 4)) : |
| 82 | a' i j y = a i j y := by |
| 83 | change χ y * a i j y = a i j y |
| 84 | rw [χ.one_of_mem_closedBall (ball_subset_closedBall hy), one_mul] |
| 85 | refine ⟨δ / 4, by positivity, ?_, ?_⟩ |
| 86 | · intro y hy |
| 87 | exact (hδall ((mem_closedBall.mp hy).trans_lt (by linarith))).1 |
| 88 | intro v hv hvc hvs |
| 89 | have hosc : ∀ y ∈ tsupport v, |
| 90 | (∑ i, ∑ j, (a' i j y - a i j z) ^ 2) ≤ (κ / 2) ^ 2 := by |
| 91 | intro y hy |
| 92 | simp_rw [heq _ _ (hvs hy)] |
| 93 | exact le_of_lt (hδall ((mem_ball.mp (hvs hy)).trans (by linarith))).2 |
| 94 | have hbound := variable_principal_parabolic_coercivity hκ |
| 95 | (show 2 * (κ / 2) ^ 2 < κ ^ 2 by nlinarith [sq_pos_of_pos hκ]) |
| 96 | hEll ha' hv hvc hosc |
| 97 | have hweight : κ ^ 2 - 2 * (κ / 2) ^ 2 = κ ^ 2 / 2 := by ring |
| 98 | rw [hweight] at hbound |
| 99 | convert hbound using 1 |
| 100 | congr 2 |
| 101 | funext y |
| 102 | by_cases hy : y ∈ tsupport v |
| 103 | · simp_rw [heq _ _ (hvs hy)] |
| 104 | · have hzero (i j : Fin n) : spatialSecond i j v y = 0 := by |
| 105 | apply image_eq_zero_of_notMem_tsupport |
| 106 | intro h |
| 107 | exact hy (((tsupport_fderiv_apply_subset ℝ (spatialDirection i)).trans |
| 108 | (tsupport_fderiv_apply_subset ℝ (spatialDirection j))) h) |
| 109 | simp only [hzero, mul_zero, Finset.sum_const_zero] |
| 110 | |
| 111 | end Poincare.Analysis.Parabolic.WeakRegularity.Canonical |
| 112 |