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.Riemannian.MinimalSurface.Sphere.Analysis.ChartedDenseComplement |
| 2 | import PoincareLib.Geometry.Riemannian.MinimalSurface.Sphere.Analysis.ScalarGradientSquare |
| 3 | import PoincareLib.Geometry.RicciFlow.Area.MinimalSphere.Round.Metric |
| 4 | |
| 5 | /-! |
| 6 | # Extending the regular-locus inequality to the omitted pole |
| 7 | |
| 8 | Morgan-Tian Claim 18.12, printed pp. 426-427, coordinate curvature |
| 9 | derivation. Near a point where the conformal factor is positive, every |
| 10 | term is continuous. The sphere has no isolated points, so the estimate |
| 11 | away from the stereographic pole extends to a regular pole as well. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set Filter |
| 18 | open scoped Manifold ContDiff Topology |
| 19 | |
| 20 | namespace PoincareMT |
| 21 | |
| 22 | /-- A regular-locus differential inequality off the fixed pole extends |
| 23 | to every positive-factor point. Source: MT Claim 18.12, pp. 426-427. -/ |
| 24 | theorem m60RoundSphere_extend_regular_inequality |
| 25 | (D : LeviCivitaData m60RoundSphereMetric) {q k : UnitTwoSphere → ℝ} |
| 26 | (hq : ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) ∞ q) (hk : Continuous k) |
| 27 | (hreg : ∀ p, p ≠ m60SpherePole → 0 < q p → |
| 28 | M04.scalarGradientSq m60RoundSphereMetric q p / q p + 2 * q p - |
| 29 | 2 * q p * k p ≤ D.laplacian q p) : |
| 30 | ∀ p, 0 < q p → |
| 31 | M04.scalarGradientSq m60RoundSphereMetric q p / q p + 2 * q p - |
| 32 | 2 * q p * k p ≤ D.laplacian q p := by |
| 33 | intro p hp |
| 34 | by_cases heq : p = m60SpherePole |
| 35 | · subst p |
| 36 | have hd : Dense ({m60SpherePole}ᶜ : Set UnitTwoSphere) := |
| 37 | M60.dense_compl_singleton_of_charted (H := LoopPlane) m60SpherePole |
| 38 | let : NeBot (𝓝[≠] m60SpherePole) := |
| 39 | mem_closure_iff_nhdsWithin_neBot.mp (hd m60SpherePole) |
| 40 | have hleft : ContinuousAt (fun p => |
| 41 | M04.scalarGradientSq m60RoundSphereMetric q p / q p + 2 * q p - |
| 42 | 2 * q p * k p) m60SpherePole := |
| 43 | (((M60.contMDiff_scalarGradientSq D hq).continuous.continuousAt.div |
| 44 | hq.continuous.continuousAt hp.ne').add |
| 45 | (continuousAt_const.mul hq.continuous.continuousAt)).sub |
| 46 | ((continuousAt_const.mul hq.continuous.continuousAt).mul hk.continuousAt) |
| 47 | have hpos : ∀ᶠ y in 𝓝 m60SpherePole, 0 < q y := |
| 48 | hq.continuous.continuousAt.eventually (lt_mem_nhds hp) |
| 49 | apply le_of_tendsto_of_tendsto (b := 𝓝[≠] m60SpherePole) |
| 50 | (hleft.tendsto.mono_left nhdsWithin_le_nhds) |
| 51 | ((D.continuous_laplacian hq).continuousAt.tendsto.mono_left nhdsWithin_le_nhds) |
| 52 | filter_upwards [self_mem_nhdsWithin, hpos.filter_mono nhdsWithin_le_nhds] with y hy hqy |
| 53 | exact hreg y hy hqy |
| 54 | · exact hreg p heq hp |
| 55 | |
| 56 | end PoincareMT |