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.Noncollapse.Compat.GeneralizedEquation |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.CapEntry.BoxSpatialInverse |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.CapEntry.CylinderSpatialInverse |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.EpochExtension.Spacetime.GeneralizedCylinderFactor |
| 5 | |
| 6 | /-! |
| 7 | # The actual inverse-cylinder spatial coordinate |
| 8 | |
| 9 | Proposition 16.13, pp. 377-378. The local product factorization of the |
| 10 | raw cylinder is combined with its supplied fixed-time inverse. This |
| 11 | constructs a smooth ambient local inverse for the physical birth |
| 12 | coordinate, including relative physical time endpoints. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | -- The original and normalized clocks retain their dependent slice fibers. |
| 17 | set_option backward.isDefEq.respectTransparency false |
| 18 | |
| 19 | open Set Filter Function |
| 20 | open scoped Manifold ContDiff Topology |
| 21 | |
| 22 | universe u |
| 23 | |
| 24 | namespace PoincareMT.Proofs.M12 |
| 25 | end PoincareMT.Proofs.M12 |
| 26 | open PoincareMT.EpochExtension.Spacetime |
| 27 | local notation "GeneralizedFlowCarrierConclusion" => PoincareMT.GeneralizedFlowCarrierConclusionWithInterval |
| 28 | |
| 29 | namespace PoincareMT.Proofs.M46 |
| 30 | |
| 31 | open PoincareMT.Proofs.M12 |
| 32 | |
| 33 | variable {F : GeneralizedRicciFlowData.{u}} |
| 34 | (R : GeneralizedFlowCarrierConclusion (flowBoxAtlas F)) |
| 35 | {C : GeneralizedSliceCarrier.{u}} {a q : ℝ} {J : SpacetimeInterval} |
| 36 | {U : TopologicalSpace.Opens C.carrier} |
| 37 | (e : GeneralizedFlowCylinder F C a q J.domain U) |
| 38 | |
| 39 | private theorem originalBox_point_transport (b : F.box_index) |
| 40 | {t t' : ℝ} (h : t = t') (ht : t ∈ (F.box b).interval) |
| 41 | (ht' : t' ∈ (F.box b).interval) (y : (F.box b).carrier.carrier) : |
| 42 | (⟨t, (F.box b).forward t ht y⟩ : F.point) = |
| 43 | (⟨t', (F.box b).forward t' ht' y⟩ : F.point) := by |
| 44 | subst t' |
| 45 | rfl |
| 46 | |
| 47 | /-- The fixed-time supplied inverse recovers the actual birth coordinate |
| 48 | from the factorization's spatial map. Source: Definition 3.38 and |
| 49 | Proposition 16.13, pp. 61 and 377-378. -/ |
| 50 | theorem rawCylinder_factor_spatial_inverse |
| 51 | (p : (R.timeIntervals.interval (cylinderPhysicalInterval a q e.scale_pos J)).Point × U) |
| 52 | (D : RawCylinderLocalFactor R e p) : |
| 53 | ∃ psi : (F.box D.box).carrier.carrier → C.carrier, |
| 54 | ContMDiffAt (𝓡 3) (𝓡 3) ∞ psi (D.spatial p.2) ∧ |
| 55 | (fun z => psi (D.spatial z)) =ᶠ[𝓝 p.2] Subtype.val := by |
| 56 | let s := cylinderClockHomeomorph a q e.scale_pos J p.1 |
| 57 | let T := a + s.val / q |
| 58 | have hT : T = p.1.val := parabolicTimeInv_parabolicTime q e.scale_pos a p.1.val |
| 59 | have ht : T ∈ (F.box D.box).interval := hT.symm ▸ D.box_subset D.center_mem |
| 60 | have hfixed : (fun z : U => rawCylinderMap R e (p.1, z)) =ᶠ[𝓝 p.2] |
| 61 | (fun z => originalBoxMap F R D.box |
| 62 | (⟨p.1.val, D.box_subset D.center_mem⟩, D.spatial z)) := |
| 63 | D.local_eq.comp_tendsto (continuous_const.prodMk continuous_id).continuousAt.tendsto |
| 64 | have hspatial {z : U} (hz : rawCylinderMap R e (p.1, z) = |
| 65 | originalBoxMap F R D.box (⟨p.1.val, D.box_subset D.center_mem⟩, D.spatial z)) : |
| 66 | e.forward s.val s.property z.val = (F.box D.box).forward T ht (D.spatial z) := by |
| 67 | have hbox := originalBox_point_transport D.box hT ht |
| 68 | (D.box_subset D.center_mem) (D.spatial z) |
| 69 | have hpoint := hz.trans hbox.symm |
| 70 | change (⟨T, e.forward s.val s.property z.val⟩ : F.point) = |
| 71 | (⟨T, (F.box D.box).forward T ht (D.spatial z)⟩ : F.point) at hpoint |
| 72 | exact eq_of_heq (Sigma.mk.inj_iff.mp hpoint).2 |
| 73 | let psi : (F.box D.box).carrier.carrier → C.carrier := |
| 74 | e.inverse s.val s.property ∘ (F.box D.box).forward T ht |
| 75 | have hbase := hspatial hfixed.eq_of_nhds |
| 76 | have hinv : ContMDiffAt (𝓡 3) (𝓡 3) ∞ (e.inverse s.val s.property) |
| 77 | ((F.box D.box).forward T ht (D.spatial p.2)) := by |
| 78 | rw [← hbase] |
| 79 | exact rawCylinder_inverse_contMDiffAt e s p.2 |
| 80 | refine ⟨psi, hinv.comp _ ((F.box D.box).forward_smooth T ht _), ?_⟩ |
| 81 | filter_upwards [hfixed] with z hz |
| 82 | change e.inverse s.val s.property ((F.box D.box).forward T ht (D.spatial z)) = z.val |
| 83 | rw [← hspatial hz] |
| 84 | exact e.left_inverse s.val s.property z.property |
| 85 | |
| 86 | /-- A smooth ambient function locally recovers the physical source |
| 87 | coordinate of the actual raw cylinder. Source: Proposition 16.13, |
| 88 | pp. 377-378. -/ |
| 89 | theorem rawCylinder_spatial_local_inverse |
| 90 | (hI : (cylinderPhysicalInterval a q e.scale_pos J).domain ⊆ F.interval) |
| 91 | (p : (R.timeIntervals.interval (cylinderPhysicalInterval a q e.scale_pos J)).Point × U) : |
| 92 | ∃ phi : R.spacetime.Point → C.carrier, |
| 93 | ContMDiffAt (spacetimeModel 3) (𝓡 3) ∞ phi (rawCylinderMap R e p) ∧ |
| 94 | (fun z => phi (rawCylinderMap R e z)) =ᶠ[𝓝 p] (fun z => z.2.val) := by |
| 95 | obtain ⟨D⟩ := rawCylinderLocalFactor_exists R e hI p |
| 96 | let pL : (R.timeIntervals.interval D.interval).Point × U := |
| 97 | (⟨p.1.val, D.center_mem⟩, p.2) |
| 98 | let pB : (R.timeIntervals.interval (boxInterval F D.box)).Point × |
| 99 | (F.box D.box).carrier.carrier := |
| 100 | (⟨p.1.val, D.box_subset D.center_mem⟩, D.spatial p.2) |
| 101 | let inc := spacetimeIntervalInclusion (R.timeIntervals.interval D.interval) |
| 102 | (R.timeIntervals.interval (cylinderPhysicalInterval a q e.scale_pos J)) D.subset |
| 103 | let intoBox : (R.timeIntervals.interval D.interval).Point × U → |
| 104 | (R.timeIntervals.interval (boxInterval F D.box)).Point × |
| 105 | (F.box D.box).carrier.carrier := fun z => |
| 106 | (spacetimeIntervalInclusion (R.timeIntervals.interval D.interval) |
| 107 | (R.timeIntervals.interval (boxInterval F D.box)) D.box_subset z.1, D.spatial z.2) |
| 108 | obtain ⟨phiB, hphiB, hphiBeq⟩ := originalBox_spatial_local_inverse R D.box pB |
| 109 | obtain ⟨psi, hpsi, hpsieq⟩ := rawCylinder_factor_spatial_inverse R e p D |
| 110 | have hpoint : rawCylinderMap R e p = originalBoxMap F R D.box pB := |
| 111 | D.local_eq.eq_of_nhds |
| 112 | have hphiBpoint : phiB (originalBoxMap F R D.box pB) = D.spatial p.2 := |
| 113 | hphiBeq.eq_of_nhds |
| 114 | have hphi : ContMDiffAt (spacetimeModel 3) (𝓡 3) ∞ (psi ∘ phiB) |
| 115 | (rawCylinderMap R e p) := by |
| 116 | rw [hpoint] |
| 117 | exact (hphiBpoint.symm ▸ hpsi).comp _ hphiB |
| 118 | have htime := R.timeIntervals.inclusion_smooth D.interval (boxInterval F D.box) |
| 119 | D.box_subset |
| 120 | have hsnd : ContinuousAt |
| 121 | (Prod.snd : (R.timeIntervals.interval D.interval).Point × U → U) pL := |
| 122 | continuous_snd.continuousAt |
| 123 | have hinto : ContinuousAt intoBox pL := |
| 124 | (htime.continuous.continuousAt.comp continuous_fst.continuousAt).prodMk |
| 125 | (D.spatial_smooth.continuousAt.comp (x := pL) (f := Prod.snd) hsnd) |
| 126 | have hlocal : (fun z => (psi ∘ phiB) (rawCylinderMap R e (Prod.map inc id z))) |
| 127 | =ᶠ[𝓝 pL] (fun z => z.2.val) := by |
| 128 | filter_upwards [D.local_eq, hinto.tendsto.eventually hphiBeq, |
| 129 | continuous_snd.continuousAt.tendsto.eventually hpsieq] with z hz hzb hzs |
| 130 | change psi (phiB (rawCylinderMap R e (Prod.map inc id z))) = z.2.val |
| 131 | change rawCylinderMap R e (Prod.map inc id z) = |
| 132 | originalBoxMap F R D.box (intoBox z) at hz |
| 133 | rw [hz, hzb] |
| 134 | exact hzs |
| 135 | have hinc : IsLocalDiffeomorph (𝓡∂ 1) (𝓡∂ 1) ∞ inc := |
| 136 | R.interval_localDiffeomorph _ _ D.subset D.relatively_open |
| 137 | have hmap : map (Prod.map inc (id : U → U)) (𝓝 pL) = 𝓝 p := by |
| 138 | exact (hinc.isOpenMap.prodMap IsOpenMap.id).map_nhds_eq |
| 139 | (hinc.contMDiff.continuous.prodMap continuous_id).continuousAt |
| 140 | refine ⟨psi ∘ phiB, hphi, ?_⟩ |
| 141 | rw [← hmap] |
| 142 | exact hlocal |
| 143 | |
| 144 | /-- A continuous lift of an actual C1 path into the tracked cylinder |
| 145 | has the actual C1 birth-coordinate curve. Source: Proposition 16.13, |
| 146 | pp. 377-378. -/ |
| 147 | theorem rawCylinder_lift_spatial_contMDiffWithinAt |
| 148 | (hI : (cylinderPhysicalInterval a q e.scale_pos J).domain ⊆ F.interval) |
| 149 | {gamma : ℝ → R.spacetime.Point} |
| 150 | {beta : ℝ → (R.timeIntervals.interval |
| 151 | (cylinderPhysicalInterval a q e.scale_pos J)).Point × U} |
| 152 | {B : Set ℝ} {r : ℝ} (hr : r ∈ B) |
| 153 | (hgamma : ContMDiffWithinAt 𝓘(ℝ, ℝ) (spacetimeModel 3) 1 gamma B r) |
| 154 | (hbeta : ContinuousWithinAt beta B r) |
| 155 | (heq : EqOn (rawCylinderMap R e ∘ beta) gamma B) : |
| 156 | ContMDiffWithinAt 𝓘(ℝ, ℝ) (𝓡 3) 1 (fun t => (beta t).2.val) B r := by |
| 157 | obtain ⟨phi, hphi, hleft⟩ := rawCylinder_spatial_local_inverse R e hI (beta r) |
| 158 | have hpoint : rawCylinderMap R e (beta r) = gamma r := heq hr |
| 159 | have hcomp : ContMDiffWithinAt 𝓘(ℝ, ℝ) (𝓡 3) 1 (phi ∘ gamma) B r := |
| 160 | ((hpoint ▸ hphi).of_le (by simp)).comp_contMDiffWithinAt r hgamma |
| 161 | refine hcomp.congr_of_eventuallyEq ?_ ?_ |
| 162 | · filter_upwards [hbeta.tendsto.eventually hleft, self_mem_nhdsWithin] with t ht hBt |
| 163 | change (beta t).2.val = phi (gamma t) |
| 164 | rw [← heq hBt] |
| 165 | exact ht.symm |
| 166 | · change (beta r).2.val = phi (gamma r) |
| 167 | rw [← hpoint] |
| 168 | exact hleft.eq_of_nhds.symm |
| 169 | |
| 170 | /-- Every actual C1 path in the tracked image has its continuous |
| 171 | inverse-cylinder lift with a C1 physical spatial coordinate. Source: |
| 172 | Proposition 16.13, pp. 377-378. -/ |
| 173 | theorem exists_rawCylinder_lift |
| 174 | (hI : (cylinderPhysicalInterval a q e.scale_pos J).domain ⊆ F.interval) |
| 175 | {gamma : ℝ → R.spacetime.Point} {B : Set ℝ} (hB : B.Nonempty) |
| 176 | (hgamma : ContMDiffOn 𝓘(ℝ, ℝ) (spacetimeModel 3) 1 gamma B) |
| 177 | (himage : MapsTo gamma B (range (rawCylinderMap R e))) : |
| 178 | ∃ beta : ℝ → (R.timeIntervals.interval |
| 179 | (cylinderPhysicalInterval a q e.scale_pos J)).Point × U, |
| 180 | EqOn (rawCylinderMap R e ∘ beta) gamma B ∧ ContinuousOn beta B ∧ |
| 181 | ContMDiffOn 𝓘(ℝ, ℝ) (𝓡 3) 1 (fun t => (beta t).2.val) B ∧ |
| 182 | ∀ t ∈ B, (beta t).1.val = R.spacetime.timeFunction (gamma t) := by |
| 183 | classical |
| 184 | obtain ⟨r, hr⟩ := hB |
| 185 | obtain ⟨p, hp⟩ := himage hr |
| 186 | let : Nonempty ((R.timeIntervals.interval |
| 187 | (cylinderPhysicalInterval a q e.scale_pos J)).Point × U) := ⟨p⟩ |
| 188 | let beta := Function.invFun (rawCylinderMap R e) ∘ gamma |
| 189 | have heq : EqOn (rawCylinderMap R e ∘ beta) gamma B := by |
| 190 | intro t ht |
| 191 | exact Function.invFun_eq (himage ht) |
| 192 | have hcomp : ContinuousOn (rawCylinderMap R e ∘ beta) B := |
| 193 | hgamma.continuousOn.congr (fun t ht => heq ht) |
| 194 | have hbeta : ContinuousOn beta B := |
| 195 | (rawCylinderMap_embedding R e).isInducing.continuousOn_iff.mpr hcomp |
| 196 | refine ⟨beta, heq, hbeta, ?_, ?_⟩ |
| 197 | · intro t ht |
| 198 | exact rawCylinder_lift_spatial_contMDiffWithinAt R e hI ht (hgamma t ht) |
| 199 | (hbeta t ht) heq |
| 200 | · intro t ht |
| 201 | rw [← rawCylinderMap_time R e (beta t)] |
| 202 | exact congrArg R.spacetime.timeFunction (heq ht) |
| 203 | |
| 204 | end PoincareMT.Proofs.M46 |