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.ODE.LocalRegularizedEquation |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Calculus.CompactVelocityExtension |
| 3 | |
| 4 | /-! |
| 5 | # Compact realization of a local regularized curve |
| 6 | |
| 7 | The compact velocity extension and the local chart equation together supply |
| 8 | an actual frozen extension satisfying the geometric equation everywhere. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open scoped Manifold ContDiff Bundle |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | namespace PoincareMT.ReducedLength |
| 18 | |
| 19 | variable {n : ℕ} {M : Type u} [TopologicalSpace M] |
| 20 | [ChartedSpace (EuclideanSpace ℝ (Fin n)) M] |
| 21 | [IsManifold (𝓡 n) ∞ M] |
| 22 | |
| 23 | theorem exists_regularizedExtensionOn_compact {J : Set ℝ} (F : RicciFlow n M J) |
| 24 | (hM04 : RicciFlowCurvatureTheory.{u}) (T b : ℝ) (hb : 0 < b) |
| 25 | (hwindow : Set.Icc (T - b) T ⊆ J) (γ : ℝ → M) |
| 26 | (U K : Set ℝ) (hU : IsOpen U) (hKU : K ⊆ U) (hK : IsCompact K) |
| 27 | (hKd : UniqueDiffOn ℝ K) (htime : K ⊆ Set.Ioo (-Real.sqrt b) (Real.sqrt b)) |
| 28 | (hγ : ContMDiffOn (𝓘(ℝ, ℝ)) (𝓡 n) ∞ γ U) |
| 29 | (heq : ∀ s ∈ K, LocalRegularizedEquation F T γ s) : |
| 30 | ∃ E : ParametricAlongCurveExtensionOn (n := n) K γ (curveVelocityWithin (n := n) γ K), |
| 31 | ∀ s ∈ K, regularizedLGeodesicEquation F T γ K E s := by |
| 32 | obtain ⟨E⟩ := nonempty_velocityExtensionOn_compact γ U K hU hKU hK hKd hγ |
| 33 | exact ⟨E, fun s hs ↦ (regularizedEquation_iff_local F hM04 T b hb hwindow γ |
| 34 | U K hU hKU hKd hγ E s hs (htime hs)).mpr (heq s hs)⟩ |
| 35 | |
| 36 | end PoincareMT.ReducedLength |