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.GlobalGeometry |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.GlobalSchedule.Global.GlobalEventSlabs |
| 3 | |
| 4 | /-! |
| 5 | # The global raw changing-carrier flow |
| 6 | |
| 7 | Morgan--Tian Section 17.2, pp. 409-411, and global assembly contract steps |
| 8 | 4-7. Literal stage representatives, actual pulled-back slabs and copied |
| 9 | events assemble a flow on all nonnegative times. No global extension or |
| 10 | global admissibility certificate is assumed to construct this record. |
| 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 flow, retaining the input's entire parameter record. |
| 30 | Morgan--Tian Section 17.2, pp. 409-411. -/ |
| 31 | noncomputable def globalFlow : SurgeryFlowData.{u} where |
| 32 | standard_initial := F0.standard_initial |
| 33 | local_constants := F0.local_constants |
| 34 | parameters := F0.parameters |
| 35 | time_domain := Ici 0 |
| 36 | time_domain_interval := ordConnected_Ici |
| 37 | time_domain_nonnegative := fun _ ht => ht |
| 38 | zero_mem := show (0 : Real) ≤ 0 from le_rfl |
| 39 | slice := Q.globalSlice |
| 40 | metric := Q.globalMetric |
| 41 | connection := Q.globalConnection |
| 42 | slices_compact := Q.global_slices_compact |
| 43 | no_two_sided_projective_plane := Q.global_no_two_sided_projective_plane |
| 44 | initial_nonempty := Q.global_initial_nonempty |
| 45 | initial_normalized := Q.global_initial_normalized |
| 46 | surgery_times := Q.globalSurgeryTimes |
| 47 | surgery_times_subset := Q.globalSurgeryTimes_nonnegative |
| 48 | zero_not_surgery := Q.zero_not_globalSurgeryTimes |
| 49 | surgery_times_locally_finite := Q.globalSurgeryTimes_locally_finite |
| 50 | regular_slabs := Q.globalSlab |
| 51 | slab_transport_coherent := Q.globalSlab_coherent |
| 52 | event := Q.globalEvent |
| 53 | vanishing_event := Q.globalVanishingEvent m13 |
| 54 | event_slab_compatibility := Q.globalEvent_slab_compatibility |
| 55 | vanishing_slab_compatibility := Q.globalVanishingEvent_slab_compatibility m13 |
| 56 | maximal_intervals := Q.global_maximal_intervals m13 |
| 57 | extinction_permanent := Q.global_extinction_permanent |
| 58 | |
| 59 | /-- The union covers precisely all nonnegative times. |
| 60 | Morgan--Tian Section 17.2, pp. 409-411. -/ |
| 61 | theorem globalFlow_time_domain : (Q.globalFlow m13).time_domain = Ici 0 := rfl |
| 62 | |
| 63 | /-- The original total parameter record is retained, including negative times. |
| 64 | Morgan--Tian Section 17.2, pp. 409-411. -/ |
| 65 | theorem globalFlow_parameters : (Q.globalFlow m13).parameters = F0.parameters := rfl |
| 66 | |
| 67 | /-- Pinching holds literally in each selected finite-stage representative. |
| 68 | Morgan--Tian Section 17.2, pp. 409-411. -/ |
| 69 | theorem globalFlow_pinched : SurgeryFlowPinched (Q.globalFlow m13) := Q.global_pinched |
| 70 | |
| 71 | /-- The copied actual events retain the selected stages' whole-domain policy. |
| 72 | Morgan--Tian Section 17.2, pp. 409-411. -/ |
| 73 | theorem globalFlow_terminalPolicy : |
| 74 | SurgeryFlowTerminalPolicyOn (Q.globalFlow m13) (Q.globalFlow m13).time_domain where |
| 75 | nonempty := by |
| 76 | intro T _ hT hne |
| 77 | let : Nonempty (Q.globalSlice T).carrier := hne |
| 78 | exact Q.globalEvent_policy T hT |
| 79 | vanishing := by |
| 80 | intro T _ hT he |
| 81 | let : IsEmpty (Q.globalSlice T).carrier := he |
| 82 | exact Q.globalVanishingEvent_policy m13 T hT |
| 83 | |
| 84 | end PoincareMT.M51.CompletedStageChain |