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.Soliton.TwoDimensional.Compact.Conservation |
| 2 | import PoincareLib.Geometry.RicciFlow.Soliton.TwoDimensional.ScalarBounds |
| 3 | import PoincareLib.Geometry.Riemannian.Comparison.Myers.Compact |
| 4 | |
| 5 | /-! |
| 6 | # Compactness of complete shrinking surfaces |
| 7 | |
| 8 | The scalar conservation laws give a uniform positive Ricci lower bound, so |
| 9 | Bonnet--Myers implies compactness. The argument allows any positive soliton |
| 10 | scale and needs neither a curvature upper bound nor volume noncollapse. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open scoped Manifold ContDiff Bundle |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT |
| 20 | |
| 21 | variable {M : Type u} [TopologicalSpace M] [T3Space M] |
| 22 | [ChartedSpace (EuclideanSpace ℝ (Fin 2)) M] [IsManifold (𝓡 2) ∞ M] |
| 23 | |
| 24 | namespace LeviCivitaData |
| 25 | |
| 26 | variable [PreconnectedSpace M] {g : RiemannianMetric 2 M} |
| 27 | |
| 28 | /-- Every complete nonflat nonnegatively curved shrinking surface is compact. -/ |
| 29 | theorem compactSpace_of_surface_shrinker (D : LeviCivitaData g) |
| 30 | (hc : MetricComplete g) {f : M → ℝ} {lambda : ℝ} |
| 31 | (hf : ContMDiff (𝓡 2) 𝓘(ℝ, ℝ) 2 f) (hlambda : 0 < lambda) |
| 32 | (hsol : ∀ x, ∀ v w : TangentSpace (𝓡 2) x, |
| 33 | D.ricci x v w + D.hessian f x v w = lambda * g.inner x v w) |
| 34 | (hoperator : ∀ x : M, D.NonnegativeCurvatureOperator x) |
| 35 | (hnonflat : ∃ x : M, D.curvatureTensorNorm x ≠ 0) : |
| 36 | CompactSpace M := by |
| 37 | obtain ⟨A, C, hA, hC⟩ := D.exists_conservation_constants_of_surface_soliton hf hsol |
| 38 | obtain ⟨k, hk, hRic⟩ := D.ricci_lower_bound_of_surface_conservation f (2 * lambda) |
| 39 | (mul_pos (by norm_num) hlambda) hoperator hnonflat A C hA hC |
| 40 | exact g.compactSpace_of_positive_ricci D hc hk hRic |
| 41 | |
| 42 | end LeviCivitaData |
| 43 | |
| 44 | namespace GradientShrinkingSolitonData |
| 45 | |
| 46 | variable [MeasurableSpace M] [BorelSpace M] [T2Space M] |
| 47 | [SecondCountableTopology M] [ConnectedSpace M] |
| 48 | |
| 49 | /-- Compactness for the frozen two-dimensional shrinking-soliton datum. -/ |
| 50 | theorem compactSpace (S : GradientShrinkingSolitonData 2 M) : CompactSpace M := by |
| 51 | exact S.connection.compactSpace_of_surface_shrinker S.complete S.potential_C2 |
| 52 | (by norm_num : (0 : ℝ) < 1 / 2) S.soliton_equation S.nonnegative_curvature S.nonflat |
| 53 | |
| 54 | end GradientShrinkingSolitonData |
| 55 | |
| 56 | end PoincareMT |