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.Continuation.Geometry |
| 2 | |
| 3 | /-! |
| 4 | # Old cylinder worldlines in an extended ordinary slab |
| 5 | |
| 6 | The tested extended slab may pass the old horizon. Restrict its comparison |
| 7 | to the two actual old clock values before applying extension compatibility. |
| 8 | Source: Morgan--Tian Definition 3.38, p. 61, and the unchanged old spacetime |
| 9 | in the construction of Definition 15.8, p. 362. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set |
| 15 | open scoped Manifold ContDiff |
| 16 | |
| 17 | universe u |
| 18 | |
| 19 | namespace PoincareMT.SurgeryFlowExtension |
| 20 | |
| 21 | variable {F : SurgeryFlowData.{u}} (E : SurgeryFlowExtension F) |
| 22 | {C : GeneralizedSliceCarrier.{u}} {a q : ℝ} {J : Set ℝ} {U : Set C.carrier} |
| 23 | |
| 24 | /-- The pushed old cylinder follows any extended slab containing the two |
| 25 | tested clock values, including slabs extending beyond the old domain. -/ |
| 26 | theorem cylinder_slab_compatibility (d : SurgeryFlowCylinder F C a q J U) |
| 27 | (l r : ℝ) (hlr : l < r) (hJ : Icc l r ⊆ E.extended.time_domain) |
| 28 | (hfree : Disjoint E.extended.surgery_times (Ioc l r)) |
| 29 | (s : ℝ) (hs : s ∈ J) (t : ℝ) (ht : t ∈ J) |
| 30 | (hs' : a + s / q ∈ Icc l r) (ht' : a + t / q ∈ Icc l r) |
| 31 | (x : C.carrier) (hx : x ∈ U) : |
| 32 | (E.extended.regular_slabs l r hlr hJ hfree).transport |
| 33 | ⟨a + s / q, hs'⟩ ⟨a + t / q, ht'⟩ |
| 34 | (E.identify (a + s / q) (d.time_subset ⟨s, hs, rfl⟩) (d.forward s hs x)) = |
| 35 | E.identify (a + t / q) (d.time_subset ⟨t, ht, rfl⟩) (d.forward t ht x) := by |
| 36 | by_cases hclock : a + s / q = a + t / q |
| 37 | · have hst : s = t := by |
| 38 | have hdiv : s / q = t / q := add_left_cancel hclock |
| 39 | simpa only [div_mul_cancel₀ _ d.scale_pos.ne'] using |
| 40 | congrArg (fun z : ℝ => z * q) hdiv |
| 41 | subst t |
| 42 | simp [SurgeryRegularSlab.transport] |
| 43 | · let b := min (a + s / q) (a + t / q) |
| 44 | let c := max (a + s / q) (a + t / q) |
| 45 | have hbc : b < c := min_lt_max.mpr hclock |
| 46 | have hold : Icc b c ⊆ F.time_domain := |
| 47 | F.time_domain_interval.uIcc_subset (d.time_subset ⟨s, hs, rfl⟩) |
| 48 | (d.time_subset ⟨t, ht, rfl⟩) |
| 49 | have hin : Ioc b c ⊆ Ioc l r := by |
| 50 | intro z hz |
| 51 | exact ⟨lt_of_le_of_lt (le_min hs'.1 ht'.1) hz.1, |
| 52 | hz.2.trans (max_le hs'.2 ht'.2)⟩ |
| 53 | have hnewfree : Disjoint E.extended.surgery_times (Ioc b c) := |
| 54 | hfree.mono_right hin |
| 55 | have holdfree : Disjoint F.surgery_times (Ioc b c) := by |
| 56 | rw [Set.disjoint_left] |
| 57 | intro z hz hzi |
| 58 | exact Set.disjoint_left.mp hnewfree |
| 59 | ((E.old_surgery_times z (hold ⟨hzi.1.le, hzi.2⟩)).mpr hz) hzi |
| 60 | have hsb : a + s / q ∈ Icc b c := ⟨min_le_left _ _, le_max_left _ _⟩ |
| 61 | have htb : a + t / q ∈ Icc b c := ⟨min_le_right _ _, le_max_right _ _⟩ |
| 62 | rw [E.extended.slab_transport_coherent l r b c hlr hJ hfree hbc |
| 63 | (hold.trans E.old_times) hnewfree _ _ hs' ht' hsb htb] |
| 64 | rw [E.ordinary_compatibility b c hbc hold holdfree (hold.trans E.old_times) |
| 65 | hnewfree ⟨_, hsb⟩ ⟨_, htb⟩] |
| 66 | rw [d.slab_compatibility b c hbc hold holdfree s hs t ht hsb htb x hx] |
| 67 | |
| 68 | end PoincareMT.SurgeryFlowExtension |