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.Surgery.Flow.Basic |
| 2 | |
| 3 | /-! |
| 4 | # The actual full regular-limit identification |
| 5 | |
| 6 | If an event's regular-limit domain is the entire pre-carrier, its retained |
| 7 | limit maps are a global smooth diffeomorphism. This is the map used when |
| 8 | testing the full-limit case against maximality, not a newly selected map. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open scoped Manifold ContDiff |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | namespace PoincareMT.SurgeryEventData |
| 18 | |
| 19 | variable {g₀ : StandardInitialMetric} {K : MetricSurgeryConstants} |
| 20 | {P : SurgeryParameters} {slice : ℝ → GeneralizedSliceCarrier.{u}} |
| 21 | {metric : ∀ t, RiemannianMetric 3 (slice t).carrier} {T : ℝ} |
| 22 | |
| 23 | /-- The actual regular-limit maps, when their domain is all of the pre-slice. -/ |
| 24 | def limitDiffeomorph (E : SurgeryEventData g₀ K P slice metric T) |
| 25 | (hfull : E.regular_limit = Set.univ) : |
| 26 | Diffeomorph (𝓡 3) (𝓡 3) (slice E.tMinus).carrier E.terminal.carrier ∞ where |
| 27 | toFun := E.limit_identify.map |
| 28 | invFun := E.limit_identify.inverse |
| 29 | left_inv x := E.limit_identify.left_inverse (by rw [hfull]; trivial) |
| 30 | right_inv x := E.limit_identify.right_inverse (Set.mem_univ x) |
| 31 | contMDiff_toFun := by |
| 32 | apply contMDiffOn_univ.mp |
| 33 | change ContMDiffOn (𝓡 3) (𝓡 3) ∞ E.limit_identify.map Set.univ |
| 34 | rw [← hfull] |
| 35 | exact E.limit_identify.map_smooth |
| 36 | contMDiff_invFun := contMDiffOn_univ.mp E.limit_identify.inverse_smooth |
| 37 | |
| 38 | @[simp] theorem limitDiffeomorph_apply |
| 39 | (E : SurgeryEventData g₀ K P slice metric T) |
| 40 | (hfull : E.regular_limit = Set.univ) (x : (slice E.tMinus).carrier) : |
| 41 | E.limitDiffeomorph hfull x = E.limit_identify.map x := rfl |
| 42 | |
| 43 | @[simp] theorem limitDiffeomorph_symm_apply |
| 44 | (E : SurgeryEventData g₀ K P slice metric T) |
| 45 | (hfull : E.regular_limit = Set.univ) (x : E.terminal.carrier) : |
| 46 | (E.limitDiffeomorph hfull).symm x = E.limit_identify.inverse x := rfl |
| 47 | |
| 48 | end PoincareMT.SurgeryEventData |