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.Exponential.Stability.StablePrefix |
| 2 | |
| 3 | /-! |
| 4 | # The exact strict-prefix stability and joint-domain clause |
| 5 | |
| 6 | Morgan-Tian Proposition 6.30, pp. 118-119. A full stable carrier |
| 7 | times the open interval of strict positive prefix times lies in the |
| 8 | actual stable graph. This supplies the required relative joint interior |
| 9 | and the full frozen stable-set record at every earlier positive time. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | |
| 16 | universe u |
| 17 | |
| 18 | namespace PoincareMT.M14 |
| 19 | |
| 20 | variable {n : ℕ} {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 21 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport n X time I} |
| 22 | {T τ₀ τ : ℝ} {x : G.Point} |
| 23 | |
| 24 | /-- A branch in a later stable carrier lies in the exact joint |
| 25 | domain at every strict positive prefix time, Proposition 6.30, |
| 26 | pp. 118-119. The open rectangle lies in the actual stable graph. -/ |
| 27 | theorem mem_jointDomain_of_stable_extension |
| 28 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 29 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 30 | (E : M14ExponentialFamily G T x) (H₀ : M14StableSet G T τ₀ x E) |
| 31 | {Z : G.Horizontal x} (hZ : Z ∈ H₀.carrier) {c : ℝ} (hc : c ∈ Ioo 0 (Real.sqrt τ₀)) : |
| 32 | (Z, c) ∈ M14JointDomain G E := by |
| 33 | let U := H₀.carrier ×ˢ Ioo 0 (Real.sqrt τ₀) |
| 34 | have hU : IsOpen U := H₀.carrier_open.prod isOpen_Ioo |
| 35 | have hgraph : U ⊆ M14StableGraph G E := by |
| 36 | rintro ⟨W, s⟩ ⟨hW, hs⟩ |
| 37 | have hτs : 0 < s ^ 2 := sq_pos_of_pos hs.1 |
| 38 | have hlt : s ^ 2 < τ₀ := by |
| 39 | have h := (sq_lt_sq₀ hs.1.le (Real.sqrt_nonneg τ₀)).mpr hs.2 |
| 40 | simpa only [Real.sq_sqrt H₀.tau_pos.le] using h |
| 41 | have hstable := stableInitialVector_prefix hCoordinates hM04 hM12 E hτs hlt |
| 42 | ((H₀.carrier_exact W).mp hW) |
| 43 | obtain ⟨H⟩ := stableSet_nonempty E hτs ⟨W, hstable.choose⟩ |
| 44 | exact ⟨s ^ 2, H, hτs, (H.carrier_exact W).mpr hstable, (Real.sqrt_sq hs.1.le).symm⟩ |
| 45 | exact ⟨hgraph ⟨hZ, hc⟩, U, hU, ⟨hZ, hc⟩, fun _ hz => hgraph hz.1⟩ |
| 46 | |
| 47 | /-- The exact frozen strict-prefix clause: every branch in a later |
| 48 | stable set belongs to a full earlier stable set and to the qualified |
| 49 | joint domain, Proposition 6.30, pp. 118-119. -/ |
| 50 | theorem strictPrefix |
| 51 | (hCoordinates : M12MetricPredecessors.{0} n) |
| 52 | (hM04 : RicciFlowCurvatureTheory.{0}) (hM12 : GeneralizedRicciGaugeTheory.{u} n) |
| 53 | (E : M14ExponentialFamily G T x) (H₀ : M14StableSet G T τ₀ x E) |
| 54 | (hτ : 0 < τ) (hlt : τ < τ₀) (_hallowed : T - τ ∈ I.domain) |
| 55 | (Z : G.Horizontal x) (hZ : Z ∈ H₀.carrier) : |
| 56 | ∃ H : M14StableSet G T τ x E, |
| 57 | Z ∈ H.carrier ∧ (Z, Real.sqrt τ) ∈ M14JointDomain G E := by |
| 58 | have hstable := stableInitialVector_prefix hCoordinates hM04 hM12 E hτ hlt |
| 59 | ((H₀.carrier_exact Z).mp hZ) |
| 60 | obtain ⟨H⟩ := stableSet_nonempty E hτ ⟨Z, hstable.choose⟩ |
| 61 | exact ⟨H, (H.carrier_exact Z).mpr hstable, |
| 62 | mem_jointDomain_of_stable_extension hCoordinates hM04 hM12 E H₀ hZ |
| 63 | ⟨Real.sqrt_pos.mpr hτ, Real.sqrt_lt_sqrt hτ.le hlt⟩⟩ |
| 64 | |
| 65 | end PoincareMT.M14 |