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.Slab.SlabCoherence |
| 2 | |
| 3 | /-! |
| 4 | # Total representatives for an ordinary half-open slab |
| 5 | |
| 6 | Every representative is taken from an actual closed slab with the same |
| 7 | initial carrier. Only its values on the half-open domain enter the flow. |
| 8 | Coherence with every longer closed slab retains the actual identifications. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open scoped Manifold ContDiff |
| 14 | |
| 15 | universe u |
| 16 | |
| 17 | namespace PoincareMT.M51Slab |
| 18 | |
| 19 | noncomputable def cutoff (a H t : ℝ) : ℝ := |
| 20 | if t ∈ Set.Ico a H then (t + H) / 2 else (a + H) / 2 |
| 21 | |
| 22 | theorem cutoff_bounds {a H : ℝ} (haH : a < H) (t : ℝ) : |
| 23 | a < cutoff a H t ∧ cutoff a H t < H := by |
| 24 | classical |
| 25 | unfold cutoff |
| 26 | split_ifs with ht |
| 27 | · constructor <;> linarith [ht.1, ht.2] |
| 28 | · constructor <;> linarith |
| 29 | |
| 30 | theorem lt_cutoff {a H t : ℝ} (ht : t ∈ Set.Ico a H) : t < cutoff a H t := by |
| 31 | rw [cutoff, if_pos ht] |
| 32 | linarith [ht.2] |
| 33 | |
| 34 | variable (F : SurgeryFlowData.{u}) {a H : ℝ} (haH : a < H) |
| 35 | (hI : Set.Ico a H ⊆ F.time_domain) |
| 36 | (hS : Disjoint F.surgery_times (Set.Ioo a H)) |
| 37 | |
| 38 | noncomputable def slabAt (t : ℝ) : SurgeryRegularSlab F.slice F.metric a (cutoff a H t) := |
| 39 | closedSlab F hI hS (cutoff a H t) (cutoff_bounds haH t).1 (cutoff_bounds haH t).2 |
| 40 | |
| 41 | noncomputable def metric (t : ℝ) : RiemannianMetric 3 (F.slice a).carrier := |
| 42 | (slabAt F haH hI hS t).flow.metric t |
| 43 | |
| 44 | noncomputable def connection (t : ℝ) : LeviCivitaData (metric F haH hI hS t) := |
| 45 | (slabAt F haH hI hS t).flow.connection t |
| 46 | |
| 47 | noncomputable def identify (t : Set.Ico a H) : |
| 48 | Diffeomorph (𝓡 3) (𝓡 3) (F.slice a).carrier (F.slice t.1).carrier ∞ := |
| 49 | (slabAt F haH hI hS t).identify ⟨t.1, t.2.1, (lt_cutoff t.2).le⟩ |
| 50 | |
| 51 | theorem identify_eq_closed (t : Set.Ico a H) (b : ℝ) (hab : a < b) (hbH : b < H) |
| 52 | (htb : t.1 ≤ b) : |
| 53 | ⇑(identify F haH hI hS t) = |
| 54 | (closedSlab F hI hS b hab hbH).identify ⟨t.1, t.2.1, htb⟩ := |
| 55 | closedSlab_identify_eq F hI hS _ _ (cutoff_bounds haH t).1 (cutoff_bounds haH t).2 |
| 56 | hab hbH t ⟨t.2.1, (lt_cutoff t.2).le⟩ ⟨t.2.1, htb⟩ |
| 57 | |
| 58 | theorem metric_eq_closed (t : ℝ) (ht : t ∈ Set.Ico a H) |
| 59 | (b : ℝ) (hab : a < b) (hbH : b < H) (htb : t ≤ b) : |
| 60 | metric F haH hI hS t = (closedSlab F hI hS b hab hbH).flow.metric t := |
| 61 | closedSlab_metric_eq F hI hS _ _ (cutoff_bounds haH t).1 (cutoff_bounds haH t).2 |
| 62 | hab hbH t ⟨ht.1, (lt_cutoff ht).le⟩ ⟨ht.1, htb⟩ |
| 63 | |
| 64 | theorem initial_identify (x : (F.slice a).carrier) : |
| 65 | identify F haH hI hS ⟨a, le_rfl, haH⟩ x = x := |
| 66 | (slabAt F haH hI hS a).initial_identify x |
| 67 | |
| 68 | theorem metric_pullback (t : Set.Ico a H) (x : (F.slice a).carrier) |
| 69 | (v w : TangentSpace (𝓡 3) x) : |
| 70 | (F.metric t.1).inner (identify F haH hI hS t x) |
| 71 | (mfderiv (𝓡 3) (𝓡 3) (identify F haH hI hS t) x v) |
| 72 | (mfderiv (𝓡 3) (𝓡 3) (identify F haH hI hS t) x w) = |
| 73 | (metric F haH hI hS t).inner x v w := |
| 74 | (slabAt F haH hI hS t).metric_pullback ⟨t.1, t.2.1, (lt_cutoff t.2).le⟩ x v w |
| 75 | |
| 76 | /-- Compatibility is with every old slab, including those with another start. -/ |
| 77 | theorem transport_compatibility (b c : ℝ) (hbc : b < c) |
| 78 | (hJ : Set.Icc b c ⊆ F.time_domain) |
| 79 | (hfree : Disjoint F.surgery_times (Set.Ioc b c)) |
| 80 | (s t : ℝ) (hs : s ∈ Set.Icc b c) (ht : t ∈ Set.Icc b c) |
| 81 | (hs' : s ∈ Set.Ico a H) (ht' : t ∈ Set.Ico a H) (x : (F.slice a).carrier) : |
| 82 | (F.regular_slabs b c hbc hJ hfree).transport ⟨s, hs⟩ ⟨t, ht⟩ |
| 83 | (identify F haH hI hS ⟨s, hs'⟩ x) = identify F haH hI hS ⟨t, ht'⟩ x := by |
| 84 | obtain ⟨d, hd, hdH⟩ := exists_between (max_lt hs'.2 ht'.2) |
| 85 | have hsd : s < d := (le_max_left _ _).trans_lt hd |
| 86 | have htd : t < d := (le_max_right _ _).trans_lt hd |
| 87 | have had : a < d := hs'.1.trans_lt hsd |
| 88 | rw [identify_eq_closed F haH hI hS ⟨s, hs'⟩ d had hdH hsd.le, |
| 89 | identify_eq_closed F haH hI hS ⟨t, ht'⟩ d had hdH htd.le] |
| 90 | have hc := F.slab_transport_coherent b c a d hbc hJ hfree had |
| 91 | (fun _ hu => hI ⟨hu.1, hu.2.trans_lt hdH⟩) |
| 92 | (hS.mono_right (show Set.Ioc a d ⊆ Set.Ioo a H from |
| 93 | fun _ hu => ⟨hu.1, hu.2.trans_lt hdH⟩)) s t |
| 94 | hs ht ⟨hs'.1, hsd.le⟩ ⟨ht'.1, htd.le⟩ |
| 95 | ((closedSlab F hI hS d had hdH).identify ⟨s, hs'.1, hsd.le⟩ x) |
| 96 | simpa only [closedSlab, SurgeryRegularSlab.transport, |
| 97 | Diffeomorph.symm_apply_apply] using hc |
| 98 | |
| 99 | end PoincareMT.M51Slab |