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.Induction.Noncollapse.StableSet.Cylinders.BackwardFiniteEvents |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.StableSet.Cylinders.BackwardOrdinaryCylinder |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.CanonicalInduction.Component.ComponentEstimateRetained |
| 5 | |
| 6 | /-! |
| 7 | # Actual backward cylinder from retained frontiers |
| 8 | |
| 9 | Morgan--Tian component-history induction, pp. 402-405. |
| 10 | See `proof-work/tasks/M47/derivations/component-estimate.md`, Stage E3. |
| 11 | Finite-event induction combines actual ordinary identifications and |
| 12 | actual inverse retention charts. The later maps, in particular the |
| 13 | terminal identity, remain unchanged at every extension. |
| 14 | -/ |
| 15 | |
| 16 | set_option autoImplicit false |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set |
| 20 | open scoped Manifold ContDiff |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.M47 |
| 25 | |
| 26 | /-- Once the whole frontier of every based partial cylinder is retained |
| 27 | at a surgery, actual transport constructs the full backward cylinder. |
| 28 | The component scalar and cap estimates discharge this local frontier |
| 29 | condition in the induction on pp. 402-405. -/ |
| 30 | theorem exists_component_backward_cylinder_of_retained_frontiers |
| 31 | {F : SurgeryFlowData.{u}} |
| 32 | {origin a : ℝ} (ha : a ≤ 0) |
| 33 | (hJ : Icc (origin + a) origin ⊆ F.time_domain) |
| 34 | (U : Set (F.slice origin).carrier) (hU : IsOpen U) (hne : U.Nonempty) |
| 35 | (initial : SurgeryFlowCylinder F (F.slice origin) origin 1 (Icc 0 0) U) |
| 36 | (hinitial : ∀ h x, x ∈ U → HEq (initial.forward 0 h x) x) |
| 37 | (hfrontier : ∀ c (hc : c ∈ Ioc a 0) |
| 38 | (e : SurgeryFlowCylinder F (F.slice origin) origin 1 (Icc c 0) U), |
| 39 | (∀ h x, x ∈ U → HEq (e.forward 0 h x) x) → |
| 40 | ∀ (hT : origin + c / 1 ∈ F.surgery_times) |
| 41 | [Nonempty (F.slice (origin + c / 1)).carrier], |
| 42 | e.forward c ⟨le_rfl, hc.2⟩ '' U ⊆ |
| 43 | interior (F.event (origin + c / 1) hT).retained_post) : |
| 44 | ∃ e : SurgeryFlowCylinder F (F.slice origin) origin 1 (Icc a 0) U, |
| 45 | ∀ h x, x ∈ U → HEq (e.forward 0 h x) x := by |
| 46 | classical |
| 47 | let events : Set ℝ := (fun s : ℝ => origin + s / 1) ⁻¹' F.surgery_times |
| 48 | let Q : ℝ → Prop := fun c => |
| 49 | ∃ e : SurgeryFlowCylinder F (F.slice origin) origin 1 (Icc c 0) U, |
| 50 | ∀ h x, x ∈ U → HEq (e.forward 0 h x) x |
| 51 | have htime : Icc (origin + a / 1) (origin + 0 / 1) ⊆ F.time_domain := by |
| 52 | simpa only [div_one, add_zero] using hJ |
| 53 | have hclock : StrictMono (fun s : ℝ => origin + s / 1) := by |
| 54 | intro s t hst |
| 55 | simpa only [div_one, add_comm] using add_lt_add_left hst origin |
| 56 | have hfinite : (events ∩ Ioc a 0).Finite := by |
| 57 | have hf := F.surgery_times_finite_on_compact isCompact_Icc htime |
| 58 | apply (hf.preimage hclock.injective.injOn).subset |
| 59 | intro s hs |
| 60 | exact ⟨hs.1, hclock.monotone hs.2.1.le, hclock.monotone hs.2.2⟩ |
| 61 | apply Proofs.M46.backward_cylinder_finite_event_induction ha hfinite Q ⟨initial, hinitial⟩ |
| 62 | · intro s hs t ht hst hfree hQt |
| 63 | rcases lt_or_eq_of_le hst with hst | rfl |
| 64 | · obtain ⟨e, he⟩ := hQt |
| 65 | have hsmall : Icc (origin + s / 1) (origin + t / 1) ⊆ F.time_domain := by |
| 66 | intro z hz |
| 67 | exact htime ⟨(hclock.monotone hs.1).trans hz.1, |
| 68 | hz.2.trans (hclock.monotone ht.2)⟩ |
| 69 | have hfree' : Disjoint F.surgery_times |
| 70 | (Ioc (origin + s / 1) (origin + t / 1)) := by |
| 71 | apply Set.disjoint_left.mpr |
| 72 | intro z hz hzI |
| 73 | have hze : z - origin ∈ events := by |
| 74 | simpa only [events, mem_preimage, div_one, add_sub_cancel] using hz |
| 75 | exact Set.disjoint_left.mp hfree hze |
| 76 | (by simp only [div_one] at hzI; constructor <;> linarith [hzI.1, hzI.2]) |
| 77 | obtain ⟨E, hE⟩ := Proofs.M46.exists_cylinder_backward_along_ordinary_slab e hU ht.2 |
| 78 | hst hsmall hfree' |
| 79 | refine ⟨E, ?_⟩ |
| 80 | intro h x hx |
| 81 | rw [hE 0 ⟨ht.2, le_rfl⟩ h x] |
| 82 | exact he _ x hx |
| 83 | · exact hQt |
| 84 | · intro c hc hQc |
| 85 | obtain ⟨e, he⟩ := hQc |
| 86 | obtain ⟨x, hx⟩ := hne |
| 87 | let : Nonempty (F.slice (origin + c / 1)).carrier := |
| 88 | ⟨e.forward c ⟨le_rfl, hc.2.2⟩ x⟩ |
| 89 | have hT : origin + c / 1 ∈ F.surgery_times := hc.1 |
| 90 | let event := F.event (origin + c / 1) hT |
| 91 | let d := max a (event.tMinus - origin) |
| 92 | have had : a ≤ d := le_max_left _ _ |
| 93 | have hdc : d < c := by |
| 94 | apply max_lt hc.2.1 |
| 95 | have ht := event.tMinus_lt |
| 96 | simp only [div_one] at ht |
| 97 | linarith |
| 98 | have hd : event.tMinus ≤ origin + d / 1 := by |
| 99 | have h := le_max_right a (event.tMinus - origin) |
| 100 | dsimp only [d] |
| 101 | simpa only [div_one] using (show event.tMinus ≤ origin + |
| 102 | max a (event.tMinus - origin) by linarith) |
| 103 | obtain ⟨E, hE⟩ := exists_component_cylinder_backward_across_retained_event e hU |
| 104 | hc.2.2 hdc hT hd (hfrontier c hc.2 e he hT) |
| 105 | refine ⟨d, ⟨had, hdc.le⟩, hdc, E, ?_⟩ |
| 106 | intro h y hy |
| 107 | rw [hE 0 ⟨hc.2.2, le_rfl⟩ h y] |
| 108 | exact he _ y hy |
| 109 | |
| 110 | end PoincareMT.M47 |