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.Construction.EventRebuild.Transport |
| 2 | |
| 3 | /-! |
| 4 | # Ordinary slabs under slice-family replacement |
| 5 | |
| 6 | Changing the family after a terminal time must preserve each old ordinary |
| 7 | slab and its chosen transports. Equality of the slice-metric pairs on the |
| 8 | closed slab gives this construction without extending that equality to later |
| 9 | times. Source: Morgan--Tian, Definition 15.8, p. 362. |
| 10 | -/ |
| 11 | |
| 12 | noncomputable section |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open scoped Manifold ContDiff Bundle Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.SurgeryRegularSlab |
| 21 | |
| 22 | open SurgeryEventRebuild |
| 23 | |
| 24 | variable {past future : ℝ → SliceMetric.{u}} {a b : ℝ} |
| 25 | (A : SurgeryRegularSlab (fun t => (past t).1) (fun t => (past t).2) a b) |
| 26 | (h : Set.EqOn past future (Set.Icc a b)) |
| 27 | |
| 28 | private theorem initial_pair (A : SurgeryRegularSlab |
| 29 | (fun t => (past t).1) (fun t => (past t).2) a b) |
| 30 | (h : Set.EqOn past future (Set.Icc a b)) : past a = future a := |
| 31 | h ⟨le_rfl, A.ordered.le⟩ |
| 32 | |
| 33 | /-- An ordinary slab on the new family, with the original time and flow. -/ |
| 34 | def copyFamily : SurgeryRegularSlab |
| 35 | (fun t => (future t).1) (fun t => (future t).2) a b where |
| 36 | ordered := A.ordered |
| 37 | flow := SurgeryEventRebuild.flow (initial_pair A h) A.flow |
| 38 | identify t := diffeomorph (initial_pair A h) (h t.property) (A.identify t) |
| 39 | initial_identify := by |
| 40 | intro x |
| 41 | obtain ⟨y, rfl⟩ := (SurgeryEventRebuild.identify |
| 42 | (past a) (future a) (initial_pair A h)).surjective x |
| 43 | exact (diffeomorph_apply (initial_pair A h) (initial_pair A h) |
| 44 | (A.identify ⟨a, le_rfl, A.ordered.le⟩) y).trans |
| 45 | (congrArg (SurgeryEventRebuild.identify (past a) (future a) (initial_pair A h)) |
| 46 | (A.initial_identify y)) |
| 47 | metric_pullback t x v w := |
| 48 | diffeomorph_flow_metric_pullback (initial_pair A h) (h t.property) |
| 49 | A.flow t (A.identify t) (A.metric_pullback t) x v w |
| 50 | |
| 51 | theorem copyFamily_flow_heq : HEq (A.copyFamily h).flow A.flow := |
| 52 | flow_heq (initial_pair A h) A.flow |
| 53 | |
| 54 | theorem copyFamily_identify_apply (t : Set.Icc a b) (x : (past a).1.carrier) : |
| 55 | (A.copyFamily h).identify t |
| 56 | (SurgeryEventRebuild.identify (past a) (future a) (initial_pair A h) x) = |
| 57 | SurgeryEventRebuild.identify (past t) (future t) (h t.property) (A.identify t x) := |
| 58 | diffeomorph_apply (initial_pair A h) (h t.property) (A.identify t) x |
| 59 | |
| 60 | /-- The chosen transports commute with the literal old-slice identifications. -/ |
| 61 | theorem copyFamily_transport (s t : Set.Icc a b) (x : (past s).1.carrier) : |
| 62 | (A.copyFamily h).transport s t |
| 63 | (SurgeryEventRebuild.identify (past s) (future s) (h s.property) x) = |
| 64 | SurgeryEventRebuild.identify (past t) (future t) (h t.property) (A.transport s t x) := by |
| 65 | have hs := A.copyFamily_identify_apply h s ((A.identify s).symm x) |
| 66 | simp only [Diffeomorph.apply_symm_apply] at hs |
| 67 | rw [← hs] |
| 68 | simp only [SurgeryRegularSlab.transport, Diffeomorph.symm_apply_apply] |
| 69 | exact A.copyFamily_identify_apply h t _ |
| 70 | |
| 71 | end PoincareMT.SurgeryRegularSlab |