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.Topology.Manifold.Poincare.Final.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Component.ComponentEstimateBackward |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Component.ComponentEstimateCylinder |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Component.ComponentHistory |
| 5 | |
| 6 | /-! |
| 7 | # Finite search for a whole component's birth |
| 8 | |
| 9 | Actual backward transport reaches the requested earlier time or a surgery |
| 10 | where the tracked whole component meets an inserted cap. Cap-free event |
| 11 | frontiers are retained by the raw event cover, so no frontier-retention |
| 12 | premise is supplied. Morgan--Tian, pp. 393-394 and 402-405. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | -- The actual cylinder maps retain their dependent physical slice types. |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set |
| 20 | open scoped Manifold ContDiff |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M47Positive |
| 25 | |
| 26 | /-- Every compact connected open terminal component has an actual based |
| 27 | backward history beginning at the prescribed earlier time or at an actual |
| 28 | cap-contact surgery. No positivity, policy, curvature, or frontier premise |
| 29 | is needed for this finite transport construction; MT pp. 393-394. -/ |
| 30 | theorem exists_component_birth_cylinder |
| 31 | (F : SurgeryFlowData.{u}) {origin a : ℝ} (ha : a ≤ 0) |
| 32 | (hJ : Icc (origin + a) origin ⊆ F.time_domain) |
| 33 | (U : Set (F.slice origin).carrier) (hU : IsOpen U) |
| 34 | (hcompact : IsCompact U) (hconnected : IsConnected U) : |
| 35 | ∃ (b : ℝ) (hb : b ∈ Icc a 0), |
| 36 | ∃ e : SurgeryFlowCylinder F (F.slice origin) origin 1 (Icc b 0) U, |
| 37 | (∀ h x, x ∈ U → HEq (e.forward 0 h x) x) ∧ |
| 38 | (b = a ∨ ∃ hT : origin + b / 1 ∈ F.surgery_times, |
| 39 | ∀ [Nonempty (F.slice (origin + b / 1)).carrier], |
| 40 | ∃ i : Fin (F.event (origin + b / 1) hT).cap_count, |
| 41 | (e.forward b ⟨le_rfl, hb.2⟩ '' U ∩ |
| 42 | ((F.event (origin + b / 1) hT).caps i).carrier).Nonempty) := by |
| 43 | classical |
| 44 | obtain ⟨x0, hx0⟩ := hconnected.nonempty |
| 45 | let Stop (b : ℝ) (hb : b ≤ 0) |
| 46 | (e : SurgeryFlowCylinder F (F.slice origin) origin 1 (Icc b 0) U) : Prop := |
| 47 | ∃ hT : origin + b / 1 ∈ F.surgery_times, |
| 48 | ∀ [Nonempty (F.slice (origin + b / 1)).carrier], |
| 49 | ∃ i : Fin (F.event (origin + b / 1) hT).cap_count, |
| 50 | (e.forward b ⟨le_rfl, hb⟩ '' U ∩ |
| 51 | ((F.event (origin + b / 1) hT).caps i).carrier).Nonempty |
| 52 | let Q (c : ℝ) : Prop := ∃ (b : ℝ) (hb : b ∈ Icc c 0), |
| 53 | ∃ e : SurgeryFlowCylinder F (F.slice origin) origin 1 (Icc b 0) U, |
| 54 | (∀ h x, x ∈ U → HEq (e.forward 0 h x) x) ∧ (b = c ∨ Stop b hb.2 e) |
| 55 | have horigin : origin ∈ F.time_domain := hJ ⟨by linarith, le_rfl⟩ |
| 56 | obtain ⟨initial, hinitial⟩ := M47.exists_component_singleton_cylinder F origin horigin U |
| 57 | have hQ0 : Q 0 := ⟨0, ⟨le_rfl, le_rfl⟩, initial, hinitial, Or.inl rfl⟩ |
| 58 | let events : Set ℝ := (fun s : ℝ => origin + s / 1) ⁻¹' F.surgery_times |
| 59 | have hclock : StrictMono (fun s : ℝ => origin + s / 1) := by |
| 60 | intro s t hst |
| 61 | simpa only [div_one, add_comm] using add_lt_add_left hst origin |
| 62 | have htime : Icc (origin + a / 1) (origin + 0 / 1) ⊆ F.time_domain := by |
| 63 | simpa only [div_one, add_zero] using hJ |
| 64 | have hfinite : (events ∩ Ioc a 0).Finite := by |
| 65 | have hf := F.surgery_times_finite_on_compact isCompact_Icc htime |
| 66 | apply (hf.preimage hclock.injective.injOn).subset |
| 67 | intro s hs |
| 68 | exact ⟨hs.1, hclock.monotone hs.2.1.le, hclock.monotone hs.2.2⟩ |
| 69 | have hord : ∀ s ∈ Icc a 0, ∀ t ∈ Icc a 0, s ≤ t → |
| 70 | Disjoint events (Ioc s t) → Q t → Q s := by |
| 71 | intro s hs t ht hst hfree hQt |
| 72 | obtain ⟨b, hb, e, he, hstop⟩ := hQt |
| 73 | rcases hstop with hstart | hstop |
| 74 | · subst b |
| 75 | rcases lt_or_eq_of_le hst with hst | heq |
| 76 | · have hsmall : Icc (origin + s / 1) (origin + t / 1) ⊆ F.time_domain := by |
| 77 | intro z hz |
| 78 | exact htime ⟨(hclock.monotone hs.1).trans hz.1, |
| 79 | hz.2.trans (hclock.monotone ht.2)⟩ |
| 80 | have hfree' : Disjoint F.surgery_times |
| 81 | (Ioc (origin + s / 1) (origin + t / 1)) := by |
| 82 | apply Set.disjoint_left.mpr |
| 83 | intro z hz hzI |
| 84 | have hze : z - origin ∈ events := by |
| 85 | simpa only [events, mem_preimage, div_one, add_sub_cancel] using hz |
| 86 | exact Set.disjoint_left.mp hfree hze |
| 87 | (by simp only [div_one] at hzI; constructor <;> linarith [hzI.1, hzI.2]) |
| 88 | obtain ⟨E, hE⟩ := Proofs.M46.exists_cylinder_backward_along_ordinary_slab e hU |
| 89 | ht.2 hst hsmall hfree' |
| 90 | refine ⟨s, ⟨le_rfl, hs.2⟩, E, ?_, Or.inl rfl⟩ |
| 91 | intro h x hx |
| 92 | rw [hE 0 ⟨ht.2, le_rfl⟩ h x] |
| 93 | exact he _ x hx |
| 94 | · subst s |
| 95 | exact ⟨t, ⟨le_rfl, ht.2⟩, e, he, Or.inl rfl⟩ |
| 96 | · exact ⟨b, ⟨hst.trans hb.1, hb.2⟩, e, he, Or.inr hstop⟩ |
| 97 | have hevent : ∀ c ∈ events ∩ Ioc a 0, Q c → |
| 98 | ∃ d ∈ Icc a c, d < c ∧ Q d := by |
| 99 | intro c hc hQc |
| 100 | obtain ⟨b, hb, e, he, hstop⟩ := hQc |
| 101 | have hcarry (hstop : Stop b hb.2 e) : ∃ d ∈ Icc a c, d < c ∧ Q d := by |
| 102 | obtain ⟨d, had, hdc⟩ := exists_between hc.2.1 |
| 103 | exact ⟨d, ⟨had.le, hdc.le⟩, hdc, b, ⟨hdc.le.trans hb.1, hb.2⟩, |
| 104 | e, he, Or.inr hstop⟩ |
| 105 | rcases hstop with hstart | hstop |
| 106 | · subst b |
| 107 | let : Nonempty (F.slice (origin + c / 1)).carrier := |
| 108 | ⟨e.forward c ⟨le_rfl, hc.2.2⟩ x0⟩ |
| 109 | have hT : origin + c / 1 ∈ F.surgery_times := hc.1 |
| 110 | let event := F.event (origin + c / 1) hT |
| 111 | by_cases hcontact : ∃ i : Fin event.cap_count, |
| 112 | (e.forward c ⟨le_rfl, hc.2.2⟩ '' U ∩ (event.caps i).carrier).Nonempty |
| 113 | · apply hcarry |
| 114 | exact ⟨hT, fun [_] => hcontact⟩ |
| 115 | · have himage := M47.component_cylinder_image_eq e hU hcompact hconnected |
| 116 | c ⟨le_rfl, hc.2.2⟩ hx0 |
| 117 | have hcapfree : ∀ i : Fin event.cap_count, |
| 118 | Disjoint (connectedComponent (e.forward c ⟨le_rfl, hc.2.2⟩ x0)) |
| 119 | (event.caps i).carrier := by |
| 120 | intro i |
| 121 | rw [← himage] |
| 122 | exact Set.disjoint_left.mpr fun z hz hzcap => hcontact ⟨i, z, hz, hzcap⟩ |
| 123 | have hret : e.forward c ⟨le_rfl, hc.2.2⟩ '' U ⊆ interior event.retained_post := by |
| 124 | rw [himage] |
| 125 | exact M47.capFree_post_component_subset_interior event hcapfree |
| 126 | let d := max a (event.tMinus - origin) |
| 127 | have had : a ≤ d := le_max_left _ _ |
| 128 | have hdc : d < c := by |
| 129 | apply max_lt hc.2.1 |
| 130 | have ht := event.tMinus_lt |
| 131 | simp only [div_one] at ht |
| 132 | linarith |
| 133 | have hd : event.tMinus ≤ origin + d / 1 := by |
| 134 | have h := le_max_right a (event.tMinus - origin) |
| 135 | dsimp only [d] |
| 136 | simp only [div_one] |
| 137 | linarith |
| 138 | obtain ⟨E, hE⟩ := M47.exists_component_cylinder_backward_across_retained_event e hU |
| 139 | hc.2.2 hdc hT hd hret |
| 140 | refine ⟨d, ⟨had, hdc.le⟩, hdc, d, ⟨le_rfl, hdc.le.trans hc.2.2⟩, E, |
| 141 | ?_, Or.inl rfl⟩ |
| 142 | intro h x hx |
| 143 | rw [hE 0 ⟨hc.2.2, le_rfl⟩ h x] |
| 144 | exact he _ x hx |
| 145 | · exact hcarry hstop |
| 146 | exact Proofs.M46.backward_cylinder_finite_event_induction ha hfinite Q hQ0 hord hevent |
| 147 | |
| 148 | end PoincareMT.M47Positive |