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.Generalized.ReducedGeometry.SourceNames.LGeometry |
| 2 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.SourceNames.ReducedLength |
| 3 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Variation.Coordinates.GaugeVelocityPhase |
| 4 | import PoincareLib.Geometry.RicciFlow.Generalized.ReducedGeometry.Exponential.Domain.MaximalCoherence |
| 5 | |
| 6 | /-! |
| 7 | # The selected actual family solves the gauge velocity phase |
| 8 | |
| 9 | Morgan-Tian Lemma 6.19 and Claim 6.20, p. 114. Every surviving |
| 10 | selected curve agrees with an actual normalized Euler path on its |
| 11 | whole prefix. Thus its genuine gauge coordinates solve the actual |
| 12 | velocity phase on every strict interior of a gauge window. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M14 |
| 23 | |
| 24 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 25 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 26 | {T : ℝ} {x : G.Point} {Z : G.Horizontal x} |
| 27 | |
| 28 | /-- Actual selected initial-value coordinates satisfy the genuine |
| 29 | velocity-phase ODE on every strict interior gauge window, by actual |
| 30 | IVP coherence, Lemma 6.19 and Claim 6.20, p. 114. -/ |
| 31 | theorem initialValueCurve_gauge_velocityPhase |
| 32 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 33 | {S : ℝ} (hS : 0 < S) (hsurv : (Z, S) ∈ initialValueDomain G T x) |
| 34 | (b : G.gaugeCover.index) |
| 35 | (W : OrdinaryGaugeWitness G.leafwise (G.gaugeCover.cylinder b) (G.gaugeCover.metric b)) |
| 36 | (x₀ : G.gaugeCover.spatial b) {a c : ℝ} (hac : a < c) |
| 37 | (hsub : Icc a c ⊆ Icc 0 S) |
| 38 | {β : ℝ → (G.timeIntervals.interval (G.gaugeCover.interval b)).Point × |
| 39 | G.gaugeCover.spatial b} |
| 40 | (hβ : ContMDiffOn (𝓘(ℝ, ℝ)) (spacetimeModel n) ∞ β (Icc a c)) |
| 41 | (hrec : ∀ r ∈ Icc a c, |
| 42 | (G.gaugeCover.cylinder b).toSpacetime (β r) = initialValueCurve G T x Z r) |
| 43 | (hclock : ∀ r ∈ Icc a c, (β r).1.val = T - r ^ 2) |
| 44 | {s : ℝ} (hs : s ∈ Ioo a c) : |
| 45 | let q := fun r => (β r).2.val |
| 46 | HasDerivAt (fun r => (q r, deriv q r)) |
| 47 | (Proofs.M09.regularizedCoordinatePhase |
| 48 | (M08.chartActionMetric W.flow T x₀) (chartActionScalar W.flow T x₀) |
| 49 | (s, (q s, deriv q s))) s := by |
| 50 | obtain ⟨y, ⟨P⟩⟩ := (initialValueDomain_positive_iff hS).mp hsurv |
| 51 | have hC : M14SqrtParameterInterval 0 (S ^ 2) = Icc 0 S := by |
| 52 | simp only [M14SqrtParameterInterval, Real.sqrt_zero, Real.sqrt_sq hS.le] |
| 53 | have hsub' : Icc a c ⊆ M14SqrtParameterInterval 0 (S ^ 2) := by |
| 54 | rwa [hC] |
| 55 | have hCoordinates := hM12.coordinate_gauges X time I G.spacetime G.slices |
| 56 | G.timeIntervals G.gaugeCover G.leafwise |
| 57 | have hscalar := ((hM12.leafwise_calculus X time I G.spacetime G.slices |
| 58 | G.timeIntervals G.gaugeCover).2 G.leafwise).scalar_smooth |
| 59 | exact squareRootEuler_gauge_velocityPhase P.square_path b hCoordinates hscalar W hM04 x₀ |
| 60 | hac hsub' hβ |
| 61 | (fun r hr => (hrec r hr).trans (initialValueCurve_eqOn_square hM04 hM12 P (hsub' hr))) |
| 62 | hclock P.extension hs (P.euler s (hsub' ⟨hs.1.le, hs.2.le⟩)) |
| 63 | |
| 64 | end PoincareMT.M14 |