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.Variation.Jacobi.JacobiGlobalPair |
| 3 | import Mathlib.Topology.Connected.Clopen |
| 4 | |
| 5 | /-! |
| 6 | # Actual Jacobi phase uniqueness from any closed-interval point |
| 7 | |
| 8 | Morgan-Tian Lemmas 6.10 and 6.12, pp. 109-110, as used in |
| 9 | Proposition 6.30, pp. 118-119. Local gauge uniqueness propagates in |
| 10 | both directions by connectedness of the actual closed time interval. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter |
| 16 | open scoped Manifold ContDiff Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M14 |
| 21 | |
| 22 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 23 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 24 | {T a b : ℝ} {x y : G.Point} {p : M14BackwardPath G T a b x y} |
| 25 | |
| 26 | /-- Two actual Jacobi phase solutions agreeing at any point agree |
| 27 | on the entire closed square interval, Lemmas 6.10 and 6.12, |
| 28 | pp. 109-110, and Proposition 6.30, pp. 118-119. -/ |
| 29 | theorem horizontalJacobiPair_unique_at (R : M14SquareRootPath G p) |
| 30 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 31 | {f g : ∀ s, G.Horizontal (R.curve s) × G.Horizontal (R.curve s)} |
| 32 | (hf : IsHorizontalJacobiPairOn R (Real.sqrt a) (Real.sqrt b) f) |
| 33 | (hg : IsHorizontalJacobiPairOn R (Real.sqrt a) (Real.sqrt b) g) |
| 34 | {c : ℝ} (hc : c ∈ M14SqrtParameterInterval a b) (hinit : f c = g c) : |
| 35 | ∀ s ∈ M14SqrtParameterInterval a b, f s = g s := by |
| 36 | let C := M14SqrtParameterInterval a b |
| 37 | let P := fun s t : ℝ => f s = g s → f t = g t |
| 38 | have hCoordinates := hM12.coordinate_gauges X time I G.spacetime G.slices |
| 39 | G.timeIntervals G.gaugeCover G.leafwise |
| 40 | have hscalar := ((hM12.leafwise_calculus X time I G.spacetime G.slices |
| 41 | G.timeIntervals G.gaugeCover).2 G.leafwise).scalar_smooth |
| 42 | have hlocal : ∀ t ∈ C, ∀ᶠ s in 𝓝[C] t, P t s ∧ P s t := by |
| 43 | intro t ht |
| 44 | obtain ⟨j, N, β, hN, htN, hβ, hrec, hclock⟩ := exists_squareRoot_gauge_neighborhood R ht |
| 45 | obtain ⟨l, r, hal, hlr, hrb, hlt, htr, hsubN, hnear⟩ := |
| 46 | M08.exists_enlarged_closed_interval hf.ordered ht.1 le_rfl ht.2 hN |
| 47 | (fun s hs => (le_antisymm hs.2 hs.1) ▸ htN) |
| 48 | have hsub : Icc l r ⊆ C ∩ N := |
| 49 | fun _ hs => ⟨Icc_subset_Icc hal hrb hs, hsubN hs⟩ |
| 50 | let W := Classical.choice (ordinaryGaugeWitness_nonempty j hCoordinates) |
| 51 | have huniq {t₀ : ℝ} (ht₀ : t₀ ∈ Icc l r) (hfg : f t₀ = g t₀) : |
| 52 | ∀ s ∈ Icc l r, f s = g s := |
| 53 | gaugeHorizontalJacobiPair_unique j hCoordinates hscalar W hM04 (β t).2 |
| 54 | (hβ.mono hsub) (fun s hs => hrec s (hsub hs)) (fun s hs => hclock s (hsub hs)) |
| 55 | (hf.restrict hal hlr hrb) (hg.restrict hal hlr hrb) ht₀ hfg |
| 56 | filter_upwards [hnear t ⟨le_rfl, le_rfl⟩] with s hs |
| 57 | exact ⟨fun h => huniq ⟨hlt, htr⟩ h s hs, fun h => huniq hs h t ⟨hlt, htr⟩⟩ |
| 58 | intro s hs |
| 59 | have hprop := isPreconnected_Icc.induction₂' P hlocal |
| 60 | (fun _ _ _ _ _ _ hst htu => htu ∘ hst) hc hs |
| 61 | exact hprop hinit |
| 62 | |
| 63 | end PoincareMT.M14 |