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.StandardCap.Persistence.Cylinder.CylinderChart |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Component.ComponentEstimateIntervals |
| 3 | |
| 4 | /-! |
| 5 | # Backward continuation of a whole retained cylinder region |
| 6 | |
| 7 | Morgan--Tian Lemma 11.2, pp. 268-269, used in Claim 16.27 on p. 393. |
| 8 | The actual inverse retention chart extends every point of the tracked |
| 9 | open region through one surgery. All ordinary and event compatibility |
| 10 | fields are retained. The surgery-free preterminal interval is derived |
| 11 | from full-curvature continuity, without a global pinching premise. |
| 12 | See `proof-work/tasks/M47/derivations/component-estimate.md`, Stage E1. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | set_option backward.isDefEq.respectTransparency false |
| 17 | |
| 18 | open Set |
| 19 | open scoped Manifold ContDiff |
| 20 | |
| 21 | universe u |
| 22 | |
| 23 | namespace PoincareMT.M47 |
| 24 | |
| 25 | /-- A whole-region retained image gives an actual backward cylinder |
| 26 | through that surgery, with unchanged later maps. Source: Lemma 11.2 |
| 27 | and the seed construction on pp. 392-393. -/ |
| 28 | theorem exists_component_cylinder_backward_across_retained_event |
| 29 | {F : SurgeryFlowData.{u}} |
| 30 | {C : GeneralizedSliceCarrier.{u}} {origin scale c d : ℝ} {U : Set C.carrier} |
| 31 | (e : SurgeryFlowCylinder F C origin scale (Icc c 0) U) |
| 32 | (hU : IsOpen U) (hc : c ≤ 0) (_hdc : d < c) |
| 33 | (hT : origin + c / scale ∈ F.surgery_times) |
| 34 | [Nonempty (F.slice (origin + c / scale)).carrier] |
| 35 | (hd : (F.event (origin + c / scale) hT).tMinus ≤ origin + d / scale) |
| 36 | (hret : e.forward c ⟨le_rfl, hc⟩ '' U ⊆ |
| 37 | interior (F.event (origin + c / scale) hT).retained_post) : |
| 38 | ∃ E : SurgeryFlowCylinder F C origin scale (Icc d 0) U, |
| 39 | ∀ s (hs : s ∈ Icc c 0) (hs' : s ∈ Icc d 0) x, |
| 40 | E.forward s hs' x = e.forward s hs x := by |
| 41 | classical |
| 42 | let event := F.event (origin + c / scale) hT |
| 43 | let retention := M44.regionEquivalenceInteriorChart event.retention |
| 44 | let bridge := (M44.cylinderSliceChart e hU c ⟨le_rfl, hc⟩).trans retention.symm |
| 45 | have hbridge : bridge.source = U := by |
| 46 | change U ∩ (e.forward c ⟨le_rfl, hc⟩) ⁻¹' interior event.retained_post = U |
| 47 | exact inter_eq_left.mpr (fun x hx => hret (mem_image_of_mem _ hx)) |
| 48 | have hbridge_retained (x : C.carrier) (hx : x ∈ U) : |
| 49 | bridge x ∈ interior event.retained_pre := |
| 50 | retention.map_target (hret (mem_image_of_mem _ hx)) |
| 51 | have hbridge_right (x : C.carrier) (hx : x ∈ U) : |
| 52 | event.retention.map (bridge x) = e.forward c ⟨le_rfl, hc⟩ x := |
| 53 | retention.right_inv (hret (mem_image_of_mem _ hx)) |
| 54 | have hclock : StrictMono (fun s : ℝ => origin + s / scale) := by |
| 55 | intro s t hst |
| 56 | simpa only [add_comm] using |
| 57 | add_lt_add_left ((div_lt_div_iff_of_pos_right e.scale_pos).mpr hst) origin |
| 58 | have hpreTime (s : ℝ) (hds : d ≤ s) (hsc : s < c) : |
| 59 | origin + s / scale ∈ Ico event.tMinus (origin + c / scale) := |
| 60 | ⟨hd.trans (hclock.monotone hds), hclock hsc⟩ |
| 61 | let chart (s : ℝ) (hs : s ∈ Icc d 0) : |
| 62 | PartialDiffeomorph (𝓡 3) (𝓡 3) C.carrier |
| 63 | (F.slice (origin + s / scale)).carrier ∞ := |
| 64 | if hcs : c ≤ s then M44.cylinderSliceChart e hU s ⟨hcs, hs.2⟩ |
| 65 | else bridge.trans (event.pre_identify |
| 66 | ⟨origin + s / scale, hpreTime s hs.1 (lt_of_not_ge hcs)⟩).toPartialDiffeomorph |
| 67 | have hsource (s : ℝ) (hs : s ∈ Icc d 0) : (chart s hs).source = U := by |
| 68 | dsimp only [chart] |
| 69 | split_ifs |
| 70 | · rfl |
| 71 | · change bridge.source ∩ bridge ⁻¹' (univ : Set (F.slice event.tMinus).carrier) = U |
| 72 | simp only [preimage_univ, inter_univ, hbridge] |
| 73 | have hold (s : ℝ) (hs : s ∈ Icc d 0) (hcs : c ≤ s) (x : C.carrier) : |
| 74 | chart s hs x = e.forward s ⟨hcs, hs.2⟩ x := by |
| 75 | dsimp only [chart] |
| 76 | rw [dif_pos hcs] |
| 77 | rfl |
| 78 | have hnew (s : ℝ) (hs : s ∈ Icc d 0) (hsc : s < c) (x : C.carrier) : |
| 79 | chart s hs x = event.pre_identify |
| 80 | ⟨origin + s / scale, hpreTime s hs.1 hsc⟩ (bridge x) := by |
| 81 | dsimp only [chart] |
| 82 | rw [dif_neg (not_le_of_gt hsc)] |
| 83 | rfl |
| 84 | have hfirst_event (s : ℝ) (hs : s ∈ Icc d 0) (hsc : s < c) |
| 85 | (hS : origin + s / scale ∈ F.surgery_times) : s = d := by |
| 86 | apply le_antisymm _ hs.1 |
| 87 | by_contra hsd |
| 88 | exact Set.disjoint_left.mp (component_event_preterminal_surgery_free F hT) hS |
| 89 | ⟨hd.trans_lt (hclock (lt_of_not_ge hsd)), hclock hsc⟩ |
| 90 | have hno_cross (s : ℝ) (hcs : c < s) |
| 91 | (hS : origin + s / scale ∈ F.surgery_times) |
| 92 | [Nonempty (F.slice (origin + s / scale)).carrier] |
| 93 | (t : ℝ) (htc : t < c) |
| 94 | (ht' : origin + t / scale ∈ Ico |
| 95 | (F.event (origin + s / scale) hS).tMinus (origin + s / scale)) : False := |
| 96 | Set.disjoint_left.mp (component_event_preterminal_surgery_free F hS) hT |
| 97 | ⟨ht'.1.trans_lt (hclock htc), hclock hcs⟩ |
| 98 | have hprefix : Icc 0 (origin + c / scale) ⊆ F.time_domain := |
| 99 | F.time_domain_interval.out F.zero_mem (F.surgery_times_subset hT) |
| 100 | let E : SurgeryFlowCylinder F C origin scale (Icc d 0) U := { |
| 101 | scale_pos := e.scale_pos |
| 102 | interval_connected := ordConnected_Icc |
| 103 | time_subset := by |
| 104 | rintro _ ⟨s, hs, rfl⟩ |
| 105 | by_cases hcs : c ≤ s |
| 106 | · exact e.time_subset (mem_image_of_mem _ ⟨hcs, hs.2⟩) |
| 107 | · have ht := hpreTime s hs.1 (lt_of_not_ge hcs) |
| 108 | exact hprefix ⟨event.tMinus_nonnegative.trans ht.1, ht.2.le⟩ |
| 109 | forward := fun s hs => chart s hs |
| 110 | inverse := fun s hs => (chart s hs).symm |
| 111 | forward_smooth := by |
| 112 | intro s hs |
| 113 | simpa only [hsource] using (chart s hs).contMDiffOn |
| 114 | inverse_smooth := by |
| 115 | intro s hs |
| 116 | have himage : chart s hs '' U = (chart s hs).target := by |
| 117 | rw [← hsource s hs] |
| 118 | exact (chart s hs).toPartialEquiv.image_source_eq_target |
| 119 | rw [himage] |
| 120 | exact (chart s hs).contMDiffOn_invFun |
| 121 | left_inverse := by |
| 122 | intro s hs x hx |
| 123 | exact (chart s hs).left_inv (hsource s hs ▸ hx) |
| 124 | right_inverse := by |
| 125 | intro s hs y hy |
| 126 | obtain ⟨x, hx, rfl⟩ := hy |
| 127 | exact (chart s hs).right_inv ((chart s hs).map_source (hsource s hs ▸ hx)) |
| 128 | slab_compatibility := by |
| 129 | intro a b hab hJ hfree s hs t ht hs' ht' x hx |
| 130 | by_cases hcs : c ≤ s |
| 131 | · by_cases hct : c ≤ t |
| 132 | · rw [hold s hs hcs x, hold t ht hct x] |
| 133 | exact e.slab_compatibility a b hab hJ hfree |
| 134 | s ⟨hcs, hs.2⟩ t ⟨hct, ht.2⟩ hs' ht' x hx |
| 135 | · exact (Set.disjoint_left.mp hfree hT |
| 136 | ⟨ht'.1.trans_lt (hclock (lt_of_not_ge hct)), |
| 137 | (hclock.monotone hcs).trans hs'.2⟩).elim |
| 138 | · by_cases hct : c ≤ t |
| 139 | · exact (Set.disjoint_left.mp hfree hT |
| 140 | ⟨hs'.1.trans_lt (hclock (lt_of_not_ge hcs)), |
| 141 | (hclock.monotone hct).trans ht'.2⟩).elim |
| 142 | · rw [hnew s hs (lt_of_not_ge hcs) x, hnew t ht (lt_of_not_ge hct) x] |
| 143 | exact F.event_slab_compatibility _ hT a b hab hJ hfree |
| 144 | _ _ hs' ht' (hpreTime s hs.1 (lt_of_not_ge hcs)) |
| 145 | (hpreTime t ht.1 (lt_of_not_ge hct)) (bridge x) |
| 146 | retained_at_surgery := by |
| 147 | intro s hs hS _ hearlier |
| 148 | by_cases hcs : c ≤ s |
| 149 | · rintro _ ⟨x, hx, rfl⟩ |
| 150 | rw [hold s hs hcs x] |
| 151 | rcases eq_or_lt_of_le hcs with heq | hlt |
| 152 | · subst s |
| 153 | exact hret (mem_image_of_mem _ hx) |
| 154 | · exact e.retained_at_surgery s ⟨hcs, hs.2⟩ hS |
| 155 | ⟨c, ⟨le_rfl, hc⟩, hlt⟩ (mem_image_of_mem _ hx) |
| 156 | · have hsd := hfirst_event s hs (lt_of_not_ge hcs) hS |
| 157 | obtain ⟨t, ht, hts⟩ := hearlier |
| 158 | exact (not_lt_of_ge ht.1 (hsd ▸ hts)).elim |
| 159 | pre_retained_at_surgery := by |
| 160 | intro s hs hS _ t ht ht' x hx |
| 161 | have hts : t < s := hclock.lt_iff_lt.mp ht'.2 |
| 162 | by_cases hcs : c ≤ s |
| 163 | · rcases eq_or_lt_of_le hcs with heq | hlt |
| 164 | · subst s |
| 165 | rw [hnew t ht hts x, Diffeomorph.symm_apply_apply] |
| 166 | exact hbridge_retained x hx |
| 167 | · by_cases hct : c ≤ t |
| 168 | · rw [hold t ht hct x] |
| 169 | exact e.pre_retained_at_surgery s ⟨hcs, hs.2⟩ hS |
| 170 | t ⟨hct, ht.2⟩ ht' x hx |
| 171 | · exact (hno_cross s hlt hS t (lt_of_not_ge hct) ht').elim |
| 172 | · have hsd := hfirst_event s hs (lt_of_not_ge hcs) hS |
| 173 | exact (not_lt_of_ge ht.1 (hsd ▸ hts)).elim |
| 174 | surgery_compatibility := by |
| 175 | intro s hs hS _ t ht ht' x hx |
| 176 | have hts : t < s := hclock.lt_iff_lt.mp ht'.2 |
| 177 | by_cases hcs : c ≤ s |
| 178 | · rcases eq_or_lt_of_le hcs with heq | hlt |
| 179 | · subst s |
| 180 | rw [hnew t ht hts x, Diffeomorph.symm_apply_apply, hold c hs le_rfl x] |
| 181 | exact hbridge_right x hx |
| 182 | · by_cases hct : c ≤ t |
| 183 | · rw [hold t ht hct x, hold s hs hcs x] |
| 184 | exact e.surgery_compatibility s ⟨hcs, hs.2⟩ hS |
| 185 | t ⟨hct, ht.2⟩ ht' x hx |
| 186 | · exact (hno_cross s hlt hS t (lt_of_not_ge hct) ht').elim |
| 187 | · have hsd := hfirst_event s hs (lt_of_not_ge hcs) hS |
| 188 | exact (not_lt_of_ge ht.1 (hsd ▸ hts)).elim |
| 189 | } |
| 190 | exact ⟨E, fun s hs hs' x => hold s hs' hs.1 x⟩ |
| 191 | |
| 192 | end PoincareMT.M47 |