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.Induction.EpochExtension.Spacetime.GeneralizedCylinderClock |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.Spacetime.Realization.SelectedIntervalLocality |
| 3 | |
| 4 | /-! |
| 5 | # Raw cylinder worldlines in the retained realization |
| 6 | |
| 7 | Raw vertical compatibility supplies a local original box for each worldline. |
| 8 | The physical clock and M11 interval locality transfer its actual derivative, |
| 9 | including at included endpoints. No spatially uniform lifetime is assumed. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set Function Filter |
| 16 | open scoped Manifold ContDiff Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.EpochExtension.Spacetime |
| 21 | |
| 22 | open Poincare.Spacetime.Realization |
| 23 | |
| 24 | variable {F : GeneralizedRicciFlowData.{u}} |
| 25 | (R : GeneralizedFlowCarrierConclusionWithInterval (flowBoxAtlas F)) |
| 26 | {C : GeneralizedSliceCarrier.{u}} {a q : ℝ} {J : SpacetimeInterval} |
| 27 | {U : TopologicalSpace.Opens C.carrier} |
| 28 | (e : GeneralizedFlowCylinder F C a q J.domain U) |
| 29 | |
| 30 | theorem rawCylinderMap_local_box |
| 31 | (t : (R.timeIntervals.interval (cylinderPhysicalInterval a q e.scale_pos J)).Point) |
| 32 | (x : U) : |
| 33 | ∃ L : SpacetimeInterval, |
| 34 | ∃ hK : L.domain ⊆ (cylinderPhysicalInterval a q e.scale_pos J).domain, |
| 35 | t.val ∈ L.domain ∧ |
| 36 | IsOpen {v : (cylinderPhysicalInterval a q e.scale_pos J).domain | v.val ∈ L.domain} ∧ |
| 37 | ∃ b : F.box_index, ∃ hb : L.domain ⊆ (boxInterval F b).domain, |
| 38 | ∃ y : (F.box b).carrier.carrier, |
| 39 | ∀ v : (R.timeIntervals.interval L).Point, |
| 40 | rawCylinderMap R e |
| 41 | (spacetimeIntervalInclusion (R.timeIntervals.interval L) |
| 42 | (R.timeIntervals.interval (cylinderPhysicalInterval a q e.scale_pos J)) hK v, |
| 43 | x) = |
| 44 | originalBoxMap F R b |
| 45 | (spacetimeIntervalInclusion (R.timeIntervals.interval L) |
| 46 | (R.timeIntervals.interval (boxInterval F b)) hb v, y) := by |
| 47 | let K := cylinderPhysicalInterval a q e.scale_pos J |
| 48 | let c := cylinderClockHomeomorph a q e.scale_pos J |
| 49 | obtain ⟨b, y, δ, hδ, hv⟩ := |
| 50 | e.vertical_compatibility (c t).val (c t).property x.val x.property |
| 51 | let V : Set K.domain := {v | |(c v).val - (c t).val| < δ} |
| 52 | have hV : V ∈ 𝓝 t := by |
| 53 | have hc : Continuous (fun v : K.domain => |(c v).val - (c t).val|) := by fun_prop |
| 54 | exact (isOpen_lt hc continuous_const).mem_nhds (by simpa using hδ) |
| 55 | obtain ⟨L, hK, htL, ho, hLV⟩ := interval_exists_open_small_neighborhood K t hV |
| 56 | have hbox : L.domain ⊆ (boxInterval F b).domain := by |
| 57 | intro v hvL |
| 58 | let w : K.domain := ⟨v, hK hvL⟩ |
| 59 | obtain ⟨hb, _⟩ := hv (c w).val (c w).property (hLV ⟨v, hvL⟩) |
| 60 | change parabolicTimeInv q a (parabolicTime q a v) ∈ (F.box b).interval at hb |
| 61 | change v ∈ (F.box b).interval |
| 62 | simpa only [parabolicTimeInv_parabolicTime q e.scale_pos] using hb |
| 63 | refine ⟨L, hK, htL, ho, b, hbox, y, ?_⟩ |
| 64 | intro v |
| 65 | let w : K.domain := ⟨v.val, hK v.property⟩ |
| 66 | obtain ⟨hb, heq⟩ := hv (c w).val (c w).property (hLV v) |
| 67 | have hp : e.pointMap (c w).val (c w).property x.val = |
| 68 | (⟨a + (c w).val / q, (F.box b).forward (a + (c w).val / q) hb y⟩ : F.point) := |
| 69 | congrArg (fun z => (⟨a + (c w).val / q, z⟩ : F.point)) heq |
| 70 | have ht : a + (c w).val / q = v.val := |
| 71 | parabolicTimeInv_parabolicTime q e.scale_pos a v.val |
| 72 | change e.pointMap (c w).val (c w).property x.val = |
| 73 | (⟨v.val, (F.box b).forward v.val (hbox v.property) y⟩ : F.point) |
| 74 | exact hp.trans (congrArg |
| 75 | (fun z : (boxInterval F b).domain => |
| 76 | (⟨z.val, (F.box b).forward z.val z.property y⟩ : F.point)) |
| 77 | (show (⟨a + (c w).val / q, hb⟩ : (boxInterval F b).domain) = |
| 78 | ⟨v.val, hbox v.property⟩ from Subtype.ext ht)) |
| 79 | |
| 80 | theorem rawCylinderMap_worldline_smooth (x : U) : |
| 81 | ContMDiff (𝓡∂ 1) (spacetimeModel 3) ∞ |
| 82 | (fun t => rawCylinderMap R e (t, x)) := by |
| 83 | intro t |
| 84 | obtain ⟨L, hK, htL, ho, b, hb, y, heq⟩ := rawCylinderMap_local_box R e t x |
| 85 | let tL : (R.timeIntervals.interval L).Point := ⟨t.val, htL⟩ |
| 86 | have hf : ContMDiff (𝓡∂ 1) (spacetimeModel 3) ∞ |
| 87 | (fun v : (R.timeIntervals.interval L).Point => rawCylinderMap R e |
| 88 | (spacetimeIntervalInclusion (R.timeIntervals.interval L) |
| 89 | (R.timeIntervals.interval (cylinderPhysicalInterval a q e.scale_pos J)) hK v, x)) := by |
| 90 | have hfun := funext heq |
| 91 | rw [hfun] |
| 92 | exact ((originalBoxCylinder F R b).worldline_smooth y).comp |
| 93 | (R.timeIntervals.inclusion_smooth L (boxInterval F b) hb) |
| 94 | exact selectedInterval_smoothAt_of_local R _ L hK ho tL |
| 95 | (fun s => rawCylinderMap R e (s, x)) (hf tL) |
| 96 | |
| 97 | theorem rawCylinderMap_worldline_derivative |
| 98 | (t : (R.timeIntervals.interval (cylinderPhysicalInterval a q e.scale_pos J)).Point) |
| 99 | (x : U) : |
| 100 | mfderiv (𝓡∂ 1) (spacetimeModel 3) (fun s => rawCylinderMap R e (s, x)) t |
| 101 | ((R.timeIntervals.interval (cylinderPhysicalInterval a q e.scale_pos J)).positiveTangent t) = |
| 102 | R.spacetime.timeVector (rawCylinderMap R e (t, x)) := by |
| 103 | obtain ⟨L, hK, htL, ho, b, hb, y, heq⟩ := rawCylinderMap_local_box R e t x |
| 104 | let tL : (R.timeIntervals.interval L).Point := ⟨t.val, htL⟩ |
| 105 | let j := spacetimeIntervalInclusion (R.timeIntervals.interval L) |
| 106 | (R.timeIntervals.interval (cylinderPhysicalInterval a q e.scale_pos J)) hK |
| 107 | let k := spacetimeIntervalInclusion (R.timeIntervals.interval L) |
| 108 | (R.timeIntervals.interval (boxInterval F b)) hb |
| 109 | let f := fun s => rawCylinderMap R e (s, x) |
| 110 | let g := fun s => originalBoxMap F R b (s, y) |
| 111 | have hj : MDifferentiableAt (𝓡∂ 1) (𝓡∂ 1) j tL := |
| 112 | (R.timeIntervals.inclusion_smooth L _ hK tL).mdifferentiableAt (by simp) |
| 113 | have hk : MDifferentiableAt (𝓡∂ 1) (𝓡∂ 1) k tL := |
| 114 | (R.timeIntervals.inclusion_smooth L _ hb tL).mdifferentiableAt (by simp) |
| 115 | have hf := (rawCylinderMap_worldline_smooth R e x (j tL)).mdifferentiableAt (by simp) |
| 116 | have hg := ((originalBoxCylinder F R b).worldline_smooth y (k tL)).mdifferentiableAt |
| 117 | (by simp) |
| 118 | have hleft := mfderiv_comp_apply tL hf hj ((R.timeIntervals.interval L).positiveTangent tL) |
| 119 | have hright := mfderiv_comp_apply tL hg hk ((R.timeIntervals.interval L).positiveTangent tL) |
| 120 | have hfun : f ∘ j = g ∘ k := funext heq |
| 121 | change mfderiv (𝓡∂ 1) (spacetimeModel 3) (f ∘ j) tL _ = _ at hleft |
| 122 | rw [R.timeIntervals.inclusion_derivative] at hleft hright |
| 123 | have hdiff := congrArg |
| 124 | (fun l : (R.timeIntervals.interval L).Point → R.spacetime.Point => |
| 125 | (mfderiv (𝓡∂ 1) (spacetimeModel 3) l tL |
| 126 | ((R.timeIntervals.interval L).positiveTangent tL) : |
| 127 | EuclideanSpace ℝ (Fin 1) × EuclideanSpace ℝ (Fin 3))) hfun |
| 128 | have hpoint : g (k tL) = f t := (heq tL).symm |
| 129 | exact hleft.symm.trans (hdiff.trans (hright.trans |
| 130 | (((originalBoxCylinder F R b).worldline_derivative (k tL) y).trans |
| 131 | (congrArg (fun p => (R.spacetime.timeVector p : |
| 132 | EuclideanSpace ℝ (Fin 1) × EuclideanSpace ℝ (Fin 3))) hpoint)))) |
| 133 | |
| 134 | noncomputable def rawCylinderWorldline |
| 135 | (hI : (cylinderPhysicalInterval a q e.scale_pos J).domain ⊆ F.interval) (x : U) : |
| 136 | SpacetimeWorldline R.spacetime |
| 137 | (R.timeIntervals.interval (cylinderPhysicalInterval a q e.scale_pos J)) where |
| 138 | interval_subset := hI |
| 139 | curve t := rawCylinderMap R e (t, x) |
| 140 | smooth := rawCylinderMap_worldline_smooth R e x |
| 141 | time_eq t := rawCylinderMap_time R e (t, x) |
| 142 | derivative_eq t := rawCylinderMap_worldline_derivative R e t x |
| 143 | |
| 144 | end PoincareMT.EpochExtension.Spacetime |