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.ReducedGeometry.ReducedLength.Minimum.Variation.Second.Trace |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Minimum.Variation.Frame.Orthonormal |
| 3 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Minimum.Variation.Minimizer |
| 4 | |
| 5 | /-! |
| 6 | # Curvature at a spatial reduced-length minimum |
| 7 | |
| 8 | The frame and all variations used in the surface index estimate are produced |
| 9 | from the smooth minimizing path. No index or minimum-bound service is assumed. |
| 10 | Morgan--Tian, Claim 7.11, pp. 155-156. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | noncomputable section |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff Bundle |
| 19 | |
| 20 | namespace PoincareMT.AncientKappaSolution |
| 21 | |
| 22 | open ReducedLengthMinimum.Variation.Frame |
| 23 | |
| 24 | variable {M : Type*} [TopologicalSpace M] |
| 25 | [ChartedSpace (EuclideanSpace ℝ (Fin 2)) M] [IsManifold (𝓡 2) ∞ M] |
| 26 | [MeasurableSpace M] [BorelSpace M] [T2Space M] [T3Space M] |
| 27 | [SecondCountableTopology M] [ConnectedSpace M] |
| 28 | |
| 29 | theorem curvature_add_minimum_le_two (K : AncientKappaSolution 2 M) |
| 30 | {τ m : ℝ} (hτ : 0 < τ) (q : BackwardTimePath K.flow 0 0 τ) |
| 31 | (S : SqrtRegularPath q) |
| 32 | (E : ParametricAlongCurveExtensionOn (Icc 0 (Real.sqrt τ)) S.curve |
| 33 | (curveVelocityWithin (n := 2) S.curve (Icc 0 (Real.sqrt τ)))) |
| 34 | (hmin : ∀ r : BackwardTimePath K.flow 0 0 τ, r.curve 0 = q.curve 0 → |
| 35 | backwardLLength K.flow 0 0 τ q.curve ≤ backwardLLength K.flow 0 0 τ r.curve) |
| 36 | (heuler : ∀ s ∈ Ioo 0 (Real.sqrt τ), |
| 37 | regularizedLGeodesicEquation K.flow 0 S.curve (Icc 0 (Real.sqrt τ)) E s) |
| 38 | (hterminal : curveVelocityWithin (n := 2) S.curve (Icc 0 (Real.sqrt τ)) (Real.sqrt τ) = 0) |
| 39 | (haction : backwardLLength K.flow 0 0 τ q.curve = 2 * Real.sqrt τ * m) : |
| 40 | τ * (K.flow.connection (-τ)).scalarCurvature (S.curve (Real.sqrt τ)) + m ≤ 2 := by |
| 41 | have hCS : Icc 0 (Real.sqrt τ) ⊆ S.domain := by |
| 42 | simpa only [sqrtParameterInterval, Real.sqrt_zero] using S.interval_subset |
| 43 | obtain ⟨U, P, hU, _, hCU, hUS, hP, horth⟩ := |
| 44 | exists_smooth_adapted_orthonormal_frame_surface K.flow S.curve S.domain |
| 45 | S.open_domain S.smooth (Real.sqrt τ) (Real.sqrt_nonneg τ) hCS |
| 46 | exact K.curvature_add_minimum_le_two_of_adapted_frame hτ q S E hmin heuler |
| 47 | hterminal haction U hU hCU (S.smooth.mono hUS) P hP |
| 48 | (fun s hs ↦ horth s (hCU hs)) |
| 49 | |
| 50 | end PoincareMT.AncientKappaSolution |