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.GlobalVanishingEvents |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.GlobalSchedule.Global.GlobalSlabs |
| 3 | |
| 4 | /-! |
| 5 | # Compatibility of chosen events with global ordinary slabs |
| 6 | |
| 7 | Only the interval between the two tested times is needed in the event's |
| 8 | source stage. Its ordinary transport is compared with the global slab |
| 9 | through a common later stage, regardless of the two whole intervals. |
| 10 | This establishes the ordinary/event compatibility in Morgan--Tian |
| 11 | Definition 15.8, pp. 361-362, for Section 17.2, pp. 409-411. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | set_option backward.isDefEq.respectTransparency false |
| 16 | |
| 17 | open Set |
| 18 | open scoped Manifold ContDiff |
| 19 | |
| 20 | universe u |
| 21 | |
| 22 | namespace PoincareMT.M51.CompletedStageChain |
| 23 | |
| 24 | variable {S : RepairedControlledSchedulesData.{u}} |
| 25 | {N : RepairedNoncollapseInductionData S} |
| 26 | {C : RepairedCanonicalInductionData S N} |
| 27 | {F0 : SurgeryFlowData.{u}} {k : ℕ} |
| 28 | (Q : CompletedStageChain S N C F0 k) |
| 29 | |
| 30 | private theorem globalSlab_preidentify_compatible |
| 31 | (n : ℕ) (r T : ℝ) (hpre : Ico r T ⊆ (Q.flow n).time_domain) |
| 32 | (J : ∀ t : Ico r T, ((Q.flow n).slice r).carrier → |
| 33 | ((Q.flow n).slice t.1).carrier) |
| 34 | (hcompat : ∀ a b hab hK hfree, |
| 35 | ∀ s t : ℝ, ∀ hs : s ∈ Icc a b, ∀ ht : t ∈ Icc a b, |
| 36 | ∀ hs' : s ∈ Ico r T, ∀ ht' : t ∈ Ico r T, ∀ x, |
| 37 | ((Q.flow n).regular_slabs a b hab hK hfree).transport ⟨s, hs⟩ ⟨t, ht⟩ |
| 38 | (J ⟨s, hs'⟩ x) = J ⟨t, ht'⟩ x) |
| 39 | (a b : ℝ) (hab : a < b) (hK : Icc a b ⊆ Ici 0) |
| 40 | (hfree : Disjoint Q.globalSurgeryTimes (Ioc a b)) |
| 41 | (s t : ℝ) (hs : s ∈ Icc a b) (ht : t ∈ Icc a b) |
| 42 | (hs' : s ∈ Ico r T) (ht' : t ∈ Ico r T) |
| 43 | (x : ((Q.flow n).slice r).carrier) : |
| 44 | (Q.globalSlab a b hab hK hfree).transport ⟨s, hs⟩ ⟨t, ht⟩ |
| 45 | (Q.globalIdentify n s (hpre hs') (J ⟨s, hs'⟩ x)) = |
| 46 | Q.globalIdentify n t (hpre ht') (J ⟨t, ht'⟩ x) := by |
| 47 | by_cases hst : s = t |
| 48 | · subst t |
| 49 | simp only [SurgeryRegularSlab.transport, Diffeomorph.apply_symm_apply] |
| 50 | · have hcd : min s t < max s t := by |
| 51 | rcases lt_or_gt_of_ne hst with h | h |
| 52 | · simpa only [min_eq_left h.le, max_eq_right h.le] using h |
| 53 | · simpa only [min_eq_right h.le, max_eq_left h.le] using h |
| 54 | have hsK : s ∈ Icc (min s t) (max s t) := ⟨min_le_left _ _, le_max_left _ _⟩ |
| 55 | have htK : t ∈ Icc (min s t) (max s t) := ⟨min_le_right _ _, le_max_right _ _⟩ |
| 56 | have hKsource : Icc (min s t) (max s t) ⊆ (Q.flow n).time_domain := by |
| 57 | intro u hu |
| 58 | exact hpre ⟨(le_min hs'.1 ht'.1).trans hu.1, |
| 59 | hu.2.trans_lt (max_lt_iff.mpr ⟨hs'.2, ht'.2⟩)⟩ |
| 60 | have hsub : Ioc (min s t) (max s t) ⊆ Ioc a b := by |
| 61 | intro u hu |
| 62 | exact ⟨(le_min hs.1 ht.1).trans_lt hu.1, hu.2.trans (max_le hs.2 ht.2)⟩ |
| 63 | have hfreeSmall : Disjoint Q.globalSurgeryTimes (Ioc (min s t) (max s t)) := |
| 64 | hfree.mono_right hsub |
| 65 | have hfreeSource := Q.stage_surgeryFree_of_global n hfreeSmall |
| 66 | calc |
| 67 | _ = Q.globalIdentify n t (hKsource htK) |
| 68 | (((Q.flow n).regular_slabs (min s t) (max s t) hcd hKsource |
| 69 | hfreeSource).transport ⟨s, hsK⟩ ⟨t, htK⟩ (J ⟨s, hs'⟩ x)) := |
| 70 | Q.globalSlab_compare a b hab hK hfree n (min s t) (max s t) hcd |
| 71 | hKsource hfreeSource s t hs ht hsK htK (J ⟨s, hs'⟩ x) |
| 72 | _ = _ := congrArg (Q.globalIdentify n t (hKsource htK)) |
| 73 | (hcompat (min s t) (max s t) hcd hKsource hfreeSource s t hsK htK hs' ht' x) |
| 74 | |
| 75 | /-- The chosen nonempty event agrees with every global slab on overlaps; |
| 76 | Definition 15.8, pp. 361-362; Section 17.2, pp. 409-411. -/ |
| 77 | theorem globalEvent_slab_compatibility |
| 78 | (T : ℝ) (hT : T ∈ Q.globalSurgeryTimes) [Nonempty (Q.globalSlice T).carrier] |
| 79 | (a b : ℝ) (hab : a < b) (hK : Icc a b ⊆ Ici 0) |
| 80 | (hfree : Disjoint Q.globalSurgeryTimes (Ioc a b)) |
| 81 | (s t : ℝ) (hs : s ∈ Icc a b) (ht : t ∈ Icc a b) |
| 82 | (hs' : s ∈ Ico (Q.globalEvent T hT).tMinus T) |
| 83 | (ht' : t ∈ Ico (Q.globalEvent T hT).tMinus T) |
| 84 | (x : (Q.globalSlice (Q.globalEvent T hT).tMinus).carrier) : |
| 85 | (Q.globalSlab a b hab hK hfree).transport ⟨s, hs⟩ ⟨t, ht⟩ |
| 86 | ((Q.globalEvent T hT).pre_identify ⟨s, hs'⟩ x) = |
| 87 | (Q.globalEvent T hT).pre_identify ⟨t, ht'⟩ x := by |
| 88 | rw [Q.globalEvent_pre_identify, Q.globalEvent_pre_identify] |
| 89 | let := Q.eventStageNonempty T hT |
| 90 | exact Q.globalSlab_preidentify_compatible (Q.representativeIndex T) |
| 91 | (Q.globalEventSource T hT).tMinus T |
| 92 | (fun u hu => Q.globalEventPreTime T hT ⟨u, hu⟩) |
| 93 | (fun t => (Q.globalEventSource T hT).pre_identify t) |
| 94 | ((Q.flow (Q.representativeIndex T)).event_slab_compatibility T |
| 95 | (Q.eventStageSurgery T hT)) |
| 96 | a b hab hK hfree s t hs ht hs' ht' ((Q.globalEventInitialMap T hT).symm x) |
| 97 | |
| 98 | /-- The chosen vanishing event agrees with every global slab on overlaps; |
| 99 | Definition 15.8, pp. 361-362; Section 17.2, pp. 409-411. -/ |
| 100 | theorem globalVanishingEvent_slab_compatibility |
| 101 | (m13 : GeneralizedParabolicRescalingTheory.{u} 3) |
| 102 | (T : ℝ) (hT : T ∈ Q.globalSurgeryTimes) [IsEmpty (Q.globalSlice T).carrier] |
| 103 | (a b : ℝ) (hab : a < b) (hK : Icc a b ⊆ Ici 0) |
| 104 | (hfree : Disjoint Q.globalSurgeryTimes (Ioc a b)) |
| 105 | (s t : ℝ) (hs : s ∈ Icc a b) (ht : t ∈ Icc a b) |
| 106 | (hs' : s ∈ Ico (Q.globalVanishingEvent m13 T hT).tMinus T) |
| 107 | (ht' : t ∈ Ico (Q.globalVanishingEvent m13 T hT).tMinus T) |
| 108 | (x : (Q.globalSlice (Q.globalVanishingEvent m13 T hT).tMinus).carrier) : |
| 109 | (Q.globalSlab a b hab hK hfree).transport ⟨s, hs⟩ ⟨t, ht⟩ |
| 110 | ((Q.globalVanishingEvent m13 T hT).pre_identify ⟨s, hs'⟩ x) = |
| 111 | (Q.globalVanishingEvent m13 T hT).pre_identify ⟨t, ht'⟩ x := by |
| 112 | rw [Q.globalVanishingEvent_pre_identify, Q.globalVanishingEvent_pre_identify] |
| 113 | let := Q.eventStageIsEmpty T hT |
| 114 | exact Q.globalSlab_preidentify_compatible (Q.representativeIndex T) |
| 115 | (Q.globalVanishingSource T hT).tMinus T |
| 116 | (fun u hu => Q.globalVanishingPreTime T hT ⟨u, hu⟩) |
| 117 | (fun t => (Q.globalVanishingSource T hT).pre_identify t) |
| 118 | ((Q.flow (Q.representativeIndex T)).vanishing_slab_compatibility T |
| 119 | (Q.eventStageSurgery T hT)) |
| 120 | a b hab hK hfree s t hs ht hs' ht' ((Q.globalVanishingInitialMap T hT).symm x) |
| 121 | |
| 122 | end PoincareMT.M51.CompletedStageChain |