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.GlobalSchedule.Global.GlobalRawFlow |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.GlobalSchedule.Global.GlobalEventLedger |
| 3 | |
| 4 | /-! |
| 5 | # Every completed stage extends into the global flow |
| 6 | |
| 7 | Morgan--Tian Section 17.2, pp. 409-411, and global assembly contract steps |
| 8 | 3-7. The representative maps preserve the whole old domain, actual ordinary |
| 9 | transports, and the full retained-region ledger. Composing the retained |
| 10 | initial extension then extends the original input flow itself. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set |
| 16 | open scoped Manifold ContDiff |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M51.CompletedStageChain |
| 21 | |
| 22 | variable {S : RepairedControlledSchedulesData.{u}} |
| 23 | {N : RepairedNoncollapseInductionData S} |
| 24 | {C : RepairedCanonicalInductionData S N} |
| 25 | {F0 : SurgeryFlowData.{u}} {k : Nat} |
| 26 | (Q : CompletedStageChain S N C F0 k) |
| 27 | (m13 : GeneralizedParabolicRescalingTheory.{u} 3) |
| 28 | |
| 29 | /-- The actual global extension of each completed finite stage. |
| 30 | Morgan--Tian Section 17.2, pp. 409-411. -/ |
| 31 | noncomputable def globalExtension (n : Nat) : SurgeryFlowExtension (Q.flow n) where |
| 32 | extended := Q.globalFlow m13 |
| 33 | old_times := (Q.flow n).time_domain_nonnegative |
| 34 | standard_initial_eq := (Q.standard_initial_eq n).symm |
| 35 | local_constants_eq := (Q.local_constants_eq n).symm |
| 36 | parameters_eq := (Q.parameters_eq n).symm |
| 37 | identify := Q.globalIdentify n |
| 38 | metric_pullback := Q.globalIdentify_metric n |
| 39 | old_surgery_times := Q.global_surgery_iff n |
| 40 | ordinary_compatibility := by |
| 41 | intro a b hab hJ hfree hJ' hfree' s t x |
| 42 | exact Q.globalSlab_compare a b hab hJ' hfree' n a b hab hJ hfree |
| 43 | s.1 t.1 s.2 t.2 s.2 t.2 x |
| 44 | old_event_reference := by |
| 45 | intro T hT _ hne hT' |
| 46 | let : Nonempty (Q.globalSlice T).carrier := hne |
| 47 | exact Q.globalEvent_old_reference n T hT hT' |
| 48 | old_retained_post := by |
| 49 | intro T hT hT' _ hne |
| 50 | let : Nonempty (Q.globalSlice T).carrier := hne |
| 51 | exact Q.globalEvent_old_retained_post n T hT hT' |
| 52 | old_retained_pre := by |
| 53 | intro T hT hT' _ hne t ht ht' |
| 54 | let : Nonempty (Q.globalSlice T).carrier := hne |
| 55 | exact Q.globalEvent_old_retained_pre n T hT hT' t ht ht' |
| 56 | old_retention := by |
| 57 | intro T hT hT' _ hne t ht ht' x hx |
| 58 | let : Nonempty (Q.globalSlice T).carrier := hne |
| 59 | exact Q.globalEvent_old_retention n T hT hT' t ht ht' x hx |
| 60 | old_vanishing_reference := by |
| 61 | intro T hT _ he hT' |
| 62 | let : IsEmpty (Q.globalSlice T).carrier := he |
| 63 | exact Q.globalVanishingEvent_old_reference m13 n T hT hT' |
| 64 | |
| 65 | /-- Every stage extension has the same literal global target. |
| 66 | Morgan--Tian Section 17.2, pp. 409-411. -/ |
| 67 | theorem globalExtension_extended (n : Nat) : |
| 68 | (Q.globalExtension m13 n).extended = Q.globalFlow m13 := rfl |
| 69 | |
| 70 | /-- Its old-slice maps are precisely the representative maps already checked. |
| 71 | Morgan--Tian Section 17.2, pp. 409-411. -/ |
| 72 | theorem globalExtension_identify (n : Nat) (t : Real) |
| 73 | (ht : t ∈ (Q.flow n).time_domain) : |
| 74 | (Q.globalExtension m13 n).identify t ht = Q.globalIdentify n t ht := rfl |
| 75 | |
| 76 | /-- Extend the original input through its retained initial extension. |
| 77 | Morgan--Tian Section 17.2, pp. 409-411. -/ |
| 78 | noncomputable def inputExtension : SurgeryFlowExtension F0 := |
| 79 | ComposedExtension.append Q.initial Q.initial_eq (Q.globalExtension m13 0) |
| 80 | |
| 81 | /-- The input extension reaches the very same constructed global flow. |
| 82 | Morgan--Tian Section 17.2, pp. 409-411. -/ |
| 83 | theorem inputExtension_extended : (Q.inputExtension m13).extended = Q.globalFlow m13 := |
| 84 | ComposedExtension.append_extended Q.initial Q.initial_eq (Q.globalExtension m13 0) |
| 85 | |
| 86 | end PoincareMT.M51.CompletedStageChain |