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.Blowup.Construction.LongTime.GeneralizedLimit.GeneralizedSpatialSlices |
| 2 | import Mathlib.Geometry.Manifold.LocalDiffeomorph |
| 3 | |
| 4 | /-! |
| 5 | # Literal terminal maps for a retained generalized cylinder |
| 6 | |
| 7 | Normalize the zero-time target once, together with its source and point |
| 8 | identity, before pulling back a buffered source flow. This keeps all |
| 9 | subsequent maps on the actual terminal slice. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff Topology |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.M30 |
| 20 | |
| 21 | attribute [local instance] FlowCarrier.topologicalSpace FlowCarrier.chartedSpace |
| 22 | FlowCarrier.isManifold |
| 23 | |
| 24 | /-- The terminal spatial cylinder is an actual partial diffeomorphism |
| 25 | into the unshifted source slice, with its literal point identity. -/ |
| 26 | theorem exists_generalized_terminal_partialDiffeomorph |
| 27 | {S : GeneralizedBlowupSequence.{u}} {J : Set ℝ} |
| 28 | (G : GeneralizedBlowupConvergence S J) (k : ℕ) : |
| 29 | ∃ d : PartialDiffeomorph (𝓡 3) (𝓡 3) G.limit.carrier.carrier |
| 30 | ((S.flow (G.subsequence k)).slice (S.base (G.subsequence k)).1).carrier ∞, |
| 31 | d.source = G.exhaustion.space k ∧ |
| 32 | ∀ (h0 : (0 : ℝ) ∈ Icc (-G.exhaustion.time k) 0) (x : G.limit.carrier.carrier), |
| 33 | (G.embedding k).pointMap 0 h0 x = |
| 34 | Sigma.mk (S.base (G.subsequence k)).1 (d x) := by |
| 35 | have hzero : (0 : ℝ) ∈ Icc (-G.exhaustion.time k) 0 := |
| 36 | ⟨neg_nonpos.mpr (G.exhaustion.time_pos k).le, le_rfl⟩ |
| 37 | let e := generalizedSliceHomeomorph G k 0 hzero |
| 38 | let d : PartialDiffeomorph (𝓡 3) (𝓡 3) G.limit.carrier.carrier |
| 39 | ((S.flow (G.subsequence k)).slice |
| 40 | ((S.base (G.subsequence k)).1 + 0 / S.scale (G.subsequence k))).carrier ∞ := { |
| 41 | toPartialEquiv := e.toPartialEquiv |
| 42 | open_source := e.open_source |
| 43 | open_target := e.open_target |
| 44 | contMDiffOn_toFun := fun x hx => |
| 45 | (generalizedSliceHomeomorph_contMDiffAt G k 0 hzero hx).contMDiffWithinAt |
| 46 | contMDiffOn_invFun := fun y hy => |
| 47 | (generalizedSliceHomeomorph_symm_contMDiffAt G k 0 hzero hy).contMDiffWithinAt } |
| 48 | have h : ∃ d' : PartialDiffeomorph (𝓡 3) (𝓡 3) G.limit.carrier.carrier |
| 49 | ((S.flow (G.subsequence k)).slice |
| 50 | ((S.base (G.subsequence k)).1 + 0 / S.scale (G.subsequence k))).carrier ∞, |
| 51 | d'.source = G.exhaustion.space k ∧ |
| 52 | ∀ (h0 : (0 : ℝ) ∈ Icc (-G.exhaustion.time k) 0) (x : G.limit.carrier.carrier), |
| 53 | (G.embedding k).pointMap 0 h0 x = |
| 54 | Sigma.mk ((S.base (G.subsequence k)).1 + 0 / S.scale (G.subsequence k)) |
| 55 | (d' x) := by |
| 56 | exact ⟨d, rfl, fun _ _ => rfl⟩ |
| 57 | rw [show (S.base (G.subsequence k)).1 + 0 / S.scale (G.subsequence k) = |
| 58 | (S.base (G.subsequence k)).1 by simp] at h |
| 59 | exact h |
| 60 | |
| 61 | end PoincareMT.M30 |