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.Variational.Recovery.Finite |
| 2 | |
| 3 | /-! |
| 4 | # Local coordinate action |
| 5 | |
| 6 | The action uses the actual metric and scalar potential. Adapted from Mapher |
| 7 | `Proofs/M08/LocalMinimality.lean`, commit |
| 8 | `49331b7d7ecad38f53e4300c3b35d6a84b2cc648`. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open MeasureTheory Set |
| 14 | open scoped Manifold ContDiff Bundle intervalIntegral |
| 15 | |
| 16 | namespace PoincareMT.ReducedLengthMinimum.Variational |
| 17 | |
| 18 | variable {n : ℕ} {M : Type*} [MetricSpace M] |
| 19 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] [IsManifold (𝓡 n) ∞ M] |
| 20 | |
| 21 | noncomputable def chartH1Action {J : Set ℝ} (F : RicciFlow n M J) (T : ℝ) |
| 22 | (x : M) (a b : ℝ) (γ : ℝ → M) (w : IntervalL2 (EuclideanSpace ℝ (Fin n)) a b) : ℝ := |
| 23 | (∫ s in a..b, regularizedChartMetric F T x (s, γ s) (w s) (w s)) + |
| 24 | ∫ s in a..b, 2 * s ^ 2 * (F.connection (T - s ^ 2)).scalarCurvature (γ s) |
| 25 | |
| 26 | end PoincareMT.ReducedLengthMinimum.Variational |