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.Coordinates.ChartCurveExtension |
| 2 | import PoincareLib.Geometry.RicciFlow.ReducedGeometry.ReducedLength.Coordinates.SquareChartPairing |
| 3 | |
| 4 | /-! |
| 5 | # Coordinate solutions satisfy the frozen regularized Euler equation |
| 6 | |
| 7 | The chart differential is surjective, so the proved coordinate pairing |
| 8 | tests every tangent vector in the geometric residual. |
| 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 | local notation "E" => EuclideanSpace ℝ (Fin n) |
| 24 | |
| 25 | set_option backward.isDefEq.respectTransparency false in |
| 26 | theorem chartCurve_regularized_equation {J : Set ℝ} (F : RicciFlow n M J) |
| 27 | (hM04 : RicciFlowCurvatureTheory.{u}) |
| 28 | (T b : ℝ) (hb : 0 < b) (hwindow : Set.Icc (T - b) T ⊆ J) |
| 29 | (p : M) (a v : ℝ → E) (U I : Set ℝ) (hU : IsOpen U) (hIU : I ⊆ U) |
| 30 | (hI : UniqueDiffOn ℝ I) (hv : ContDiffOn ℝ ∞ v U) |
| 31 | (ha : ∀ s ∈ I, HasDerivAt a (v s) s) |
| 32 | (hy : ∀ s ∈ I, a s ∈ (chartAt E p).target) |
| 33 | (htime : I ⊆ Set.Ioo (-Real.sqrt b) (Real.sqrt b)) |
| 34 | (hdv : ∀ s ∈ I, HasDerivAt v |
| 35 | (regularizedCoordinatePhase (squareChartMetric F T p) (squareChartScalar F T p) |
| 36 | (s, (a s, v s))).2 s) : |
| 37 | ∀ s ∈ I, regularizedLGeodesicEquation F T (fun r ↦ (chartAt E p).symm (a r)) I |
| 38 | (chartCurveVelocityExtension p a v U I hU hIU hI hv ha hy) s := by |
| 39 | intro s hs W |
| 40 | obtain ⟨w, rfl⟩ := (inverseChartDifferential_bijective p (a s) (hy s hs)).2 W |
| 41 | unfold regularizedEulerResidual |
| 42 | rw [chartCurveVelocityExtension_pullback F (fun r ↦ T - r ^ 2) p a v U I |
| 43 | hU hIU hI hv ha hy s hs _ (hdv s hs), |
| 44 | curveVelocityWithin_inverseChart p a I s (v s) (hI s hs) (ha s hs) (hy s hs)] |
| 45 | exact regularizedCoordinatePhase_geometric_pairing F hM04 T b hb hwindow p s |
| 46 | (htime hs) (a s) (v s) w (hy s hs) |
| 47 | |
| 48 | end PoincareMT.ReducedLength |