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 | import PoincareLib.Geometry.RicciFlow.Splitting.MaximumPrinciple.MetricBump |
| 2 | |
| 3 | /-! |
| 4 | # A multidimensional intrinsic moving subsolution |
| 5 | |
| 6 | The full coefficient estimate applies to the actual chart inverse metric. |
| 7 | Radial drift and center velocity are included in its bounded trace term. |
| 8 | The estimate holds across the zero-extension boundary and requires no lower |
| 9 | bound on the distance to that boundary. Compact coefficient extraction and |
| 10 | construction of connected-domain tube chains are separate obligations. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | open Set |
| 15 | open scoped ContDiff Manifold Topology InnerProductSpace |
| 16 | |
| 17 | namespace PoincareMT.RicciFlow.Splitting.MaximumPrinciple |
| 18 | |
| 19 | open Barrier |
| 20 | |
| 21 | variable {n : ℕ} {M : Type*} [TopologicalSpace M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 23 | |
| 24 | /-- **Math.** Uniform radial ellipticity and an upper bound for the actual trace, |
| 25 | drift and velocity imply the intrinsic heat subsolution inequality everywhere |
| 26 | in the chart, including the moving support boundary. -/ |
| 27 | theorem chartBump_subsolution {g : ℝ → RiemannianMetric n M} |
| 28 | (conn : ∀ t, LeviCivitaData (g t)) (α : M) |
| 29 | {rho lam Lam H₀ : ℝ} (a : ℝ) |
| 30 | (hrho : 0 < rho) (hlam : 0 < lam) (hLam : lam ≤ Lam) (hH₀ : 0 ≤ H₀) |
| 31 | {gamma : ℝ → EuclideanSpace ℝ (Fin n)} {t : ℝ} {velocity : EuclideanSpace ℝ (Fin n)} |
| 32 | (hg : HasDerivAt gamma velocity t) {x : M} |
| 33 | (hx : x ∈ (chartAt (EuclideanSpace ℝ (Fin n)) α).source) |
| 34 | (hbounds : 0 < ballGap rho (gamma t) (extChartAt (𝓡 n) α x) → |
| 35 | lam * ‖extChartAt (𝓡 n) α x - gamma t‖ ^ 2 ≤ |
| 36 | radialQuadratic (g t) α (extChartAt (𝓡 n) α x) (extChartAt (𝓡 n) α x - gamma t) ∧ |
| 37 | radialQuadratic (g t) α (extChartAt (𝓡 n) α x) (extChartAt (𝓡 n) α x - gamma t) ≤ |
| 38 | Lam * ‖extChartAt (𝓡 n) α x - gamma t‖ ^ 2 ∧ |
| 39 | radialTrace (g t) α (extChartAt (𝓡 n) α x) + |
| 40 | radialDrift (g t) α (extChartAt (𝓡 n) α x) (extChartAt (𝓡 n) α x - gamma t) + |
| 41 | ⟪extChartAt (𝓡 n) α x - gamma t, velocity⟫_ℝ ≤ H₀) : |
| 42 | deriv (chartBump α rho (dampingConstant rho lam Lam H₀) a gamma x) t ≤ |
| 43 | (conn t).laplacian |
| 44 | (fun z => chartBump α rho (dampingConstant rho lam Lam H₀) a gamma z t) |
| 45 | x := by |
| 46 | apply sub_nonneg.mp |
| 47 | rw [chart_heat_residual conn α rho (dampingConstant rho lam Lam H₀) a hg hx] |
| 48 | apply mul_nonneg (Real.exp_pos _).le |
| 49 | let s := ballGap rho (gamma t) (extChartAt (𝓡 n) α x) |
| 50 | let Q := radialQuadratic (g t) α (extChartAt (𝓡 n) α x) (extChartAt (𝓡 n) α x - gamma t) |
| 51 | let J := radialTrace (g t) α (extChartAt (𝓡 n) α x) + |
| 52 | radialDrift (g t) α (extChartAt (𝓡 n) α x) (extChartAt (𝓡 n) α x - gamma t) + |
| 53 | ⟪extChartAt (𝓡 n) α x - gamma t, velocity⟫_ℝ |
| 54 | change 0 ≤ dampingConstant rho lam Lam H₀ * expNegInvGlue s + |
| 55 | 4 * profileSecond s * Q - 2 * profileFirst s * J |
| 56 | by_cases hs : 0 < s |
| 57 | · obtain ⟨hlo, hhi, hJ⟩ := hbounds hs |
| 58 | have hsrho : s ≤ rho ^ 2 := by dsimp [s, ballGap]; nlinarith [sq_nonneg ‖extChartAt (𝓡 n) α x - gamma t‖] |
| 59 | have hr2 : ‖extChartAt (𝓡 n) α x - gamma t‖ ^ 2 = rho ^ 2 - s := by |
| 60 | dsimp [s, ballGap] |
| 61 | ring |
| 62 | have hcoef := radial_coefficient_nonneg_of_radius_sq hrho hlam hLam hH₀ |
| 63 | hs hsrho hr2 hlo hhi hJ |
| 64 | have hcoef' : 0 ≤ dampingConstant rho lam Lam H₀ + |
| 65 | 4 * Q * s⁻¹ ^ 4 - 8 * Q * s⁻¹ ^ 3 - 2 * J * s⁻¹ ^ 2 := by |
| 66 | simpa only [div_eq_mul_inv, inv_pow] using hcoef |
| 67 | have hid : dampingConstant rho lam Lam H₀ * expNegInvGlue s + |
| 68 | 4 * profileSecond s * Q - 2 * profileFirst s * J = |
| 69 | (dampingConstant rho lam Lam H₀ + |
| 70 | 4 * Q * s⁻¹ ^ 4 - 8 * Q * s⁻¹ ^ 3 - 2 * J * s⁻¹ ^ 2) * |
| 71 | expNegInvGlue s := by |
| 72 | unfold profileFirst profileSecond |
| 73 | ring |
| 74 | rw [hid] |
| 75 | exact mul_nonneg hcoef' (expNegInvGlue.nonneg _) |
| 76 | · have hz := expNegInvGlue.zero_of_nonpos (le_of_not_gt hs) |
| 77 | simp [profileFirst, profileSecond, hz] |
| 78 | |
| 79 | end PoincareMT.RicciFlow.Splitting.MaximumPrinciple |
| 80 |