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.StableSet.Seed.SeedLift |
| 3 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.StableSet.Seed.SeedComparison |
| 4 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.StableSet.Seed.SpatialPath |
| 5 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.StableSet.Seed.RealizedSeed |
| 6 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.StableSet.Seed.OldSeedVolume |
| 7 | |
| 8 | /-! |
| 9 | # Actual comparisons to every point of the seed closure |
| 10 | |
| 11 | Morgan--Tian Claim 16.27, pp. 391-393. The compact seed is the image |
| 12 | of the old ball through the actual retained cylinder. Every point in |
| 13 | its closure has an actual spatial source path. Transporting this path |
| 14 | and joining it to the minimizing prefix gives the admissible comparison |
| 15 | used by the same realized stable exponential family. |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | set_option backward.isDefEq.respectTransparency false |
| 20 | |
| 21 | open Set MeasureTheory |
| 22 | open scoped Manifold ContDiff Bundle ENNReal |
| 23 | |
| 24 | universe u |
| 25 | |
| 26 | namespace PoincareMT.Proofs.M12 |
| 27 | end PoincareMT.Proofs.M12 |
| 28 | open PoincareMT.EpochExtension.Spacetime |
| 29 | namespace PoincareMT.M04 |
| 30 | export PoincareMT.RicciFlowAnalysis (initial_ball_isOpen) |
| 31 | end PoincareMT.M04 |
| 32 | namespace PoincareMT.M04 |
| 33 | export PoincareMT.RicciFlowAnalysis (initial_half_ball_closure_subset_initial_ball) |
| 34 | end PoincareMT.M04 |
| 35 | |
| 36 | namespace PoincareMT.Proofs.M46 |
| 37 | |
| 38 | open PoincareMT.Proofs.M12 |
| 39 | |
| 40 | variable {F : SurgeryFlowData.{u}} {window : M33RegularHistoryWindow F} |
| 41 | |
| 42 | /-- Equality at one physical time determines the actual history point, |
| 43 | including the dependent slice labels carried by a cylinder endpoint. -/ |
| 44 | theorem history_point_eq_of_physical_heq (R : M46RegularSpacetimeData window) |
| 45 | {s t : ℝ} (hs : s ∈ R.history.generalized.interval) |
| 46 | (ht : t ∈ R.history.generalized.interval) |
| 47 | (z : (R.history.generalized.slice s).carrier) |
| 48 | (w : (R.history.generalized.slice t).carrier) (hst : s = t) |
| 49 | (himage : HEq (R.history.history.forward s hs z) (R.history.history.forward t ht w)) : |
| 50 | (⟨s, z⟩ : R.history.generalized.point) = ⟨t, w⟩ := by |
| 51 | subst t |
| 52 | have hz := (R.history.history.forward_openEmbedding s hs).injective (eq_of_heq himage) |
| 53 | rw [hz] |
| 54 | |
| 55 | /-- The physical history embedding is injective on the actual realized |
| 56 | slice, so equality of physical images identifies the spacetime point. -/ |
| 57 | theorem realized_seed_point_eq (R : M46RegularSpacetimeData window) |
| 58 | {t : ℝ} (ht : t ∈ R.history.generalized.interval) |
| 59 | (q : (R.geometry.toLGeometry.slices t).Point) |
| 60 | (z : (R.history.generalized.slice t).carrier) |
| 61 | (himage : R.history.history.forward t ht z = R.history.history.forward t ht |
| 62 | ((R.geometry.sliceIdentification t).identification.symm q)) : |
| 63 | (⟨t, z⟩ : R.geometry.toLGeometry.Point) = q.val := by |
| 64 | have hz := (R.history.history.forward_openEmbedding t ht).injective himage |
| 65 | rw [hz] |
| 66 | have hpoint : |
| 67 | ((R.geometry.sliceIdentification t).identification |
| 68 | ((R.geometry.sliceIdentification t).identification.symm q)).val = |
| 69 | (⟨t, (R.geometry.sliceIdentification t).identification.symm q⟩ : |
| 70 | R.geometry.toLGeometry.Point) := |
| 71 | (R.geometry.sliceIdentification t).identification_eq _ |
| 72 | exact hpoint.symm.trans (congrArg Subtype.val |
| 73 | ((R.geometry.sliceIdentification t).identification.apply_symm_apply q)) |
| 74 | |
| 75 | /-- The actual controlled old cylinder produces the volume seed and |
| 76 | literal admissible comparisons on its whole compact closure. -/ |
| 77 | theorem seed_image_comparisons |
| 78 | (P : M46Predecessors.{u}) (P44 : M44CapPersistencePredecessors.{u}) |
| 79 | {K : MetricSurgeryConstants} (p : SurgeryParameterPrefix K) |
| 80 | {O : SurgeryObservation F} (old : SurgeryPrefixControls p F O) |
| 81 | (hpinch : SurgeryFlowPinched F) (R : M46RegularSpacetimeData window) |
| 82 | {B T S tau : ℝ} (hB : 1 ≤ B) {x endpoint : R.geometry.toLGeometry.Point} |
| 83 | (path : M14BackwardPath R.geometry.toLGeometry T 0 S x endpoint) |
| 84 | (hmin : M14IsMinimizing path) (htau : 0 < tau) (htauS : tau ≤ S) |
| 85 | (hS : S ≤ surgeryEpochStart (p.i + 1)) |
| 86 | (htotal : tau + seedImageDelay B (p.r (Fin.last p.i)) ≤ surgeryEpochStart (p.i + 1)) |
| 87 | (hfloor : ∀ s ∈ Icc 0 S, |
| 88 | -6 ≤ horizontalScalarCurvature R.geometry.toLGeometry.leafwise (path.curve s)) |
| 89 | (hshort : M14BackwardLAction R.geometry.toLGeometry path ≤ 3 * Real.sqrt S) |
| 90 | (htold : T - tau ∈ surgeryObservationInterval O ∩ surgeryEpochEntry p.i) |
| 91 | (htime : ∀ s ∈ Icc (-seedImageDelay B (p.r (Fin.last p.i))) 0, |
| 92 | (T - tau) + s / 1 ∈ R.history.generalized.interval) |
| 93 | (htime0 : T - tau ∈ R.history.generalized.interval) |
| 94 | (y0 : (R.history.generalized.slice (T - tau)).carrier) |
| 95 | (x0 : (F.slice (T - tau)).carrier) |
| 96 | (hx0 : R.history.history.forward (T - tau) htime0 y0 = x0) |
| 97 | (hpoint : path.curve tau = (⟨T - tau, y0⟩ : R.geometry.toLGeometry.Point)) |
| 98 | (hpositive : ¬ SurgeryPositiveComponentAt F (T - tau) x0) |
| 99 | (e : SurgeryFlowCylinder F (F.slice (T - tau)) (T - tau) 1 |
| 100 | (Icc (-seedCylinderDuration B (p.r (Fin.last p.i))) 0) |
| 101 | ((F.metric (T - tau)).ball x0 (p.r (Fin.last p.i) / (8 * B)))) |
| 102 | (hbase : ∀ h y, y ∈ (F.metric (T - tau)).ball x0 (p.r (Fin.last p.i) / (8 * B)) → |
| 103 | HEq (e.forward 0 h y) y) |
| 104 | (hscalar : ∀ s hs y, |
| 105 | y ∈ (F.metric (T - tau)).ball x0 (p.r (Fin.last p.i) / (8 * B)) → |
| 106 | (F.connection ((T - tau) + s / 1)).scalarCurvature (e.forward s hs y) ≤ |
| 107 | 4 * (p.r (Fin.last p.i))⁻¹ ^ 2) |
| 108 | (hRm : ∀ s hs y, |
| 109 | y ∈ (F.metric (T - tau)).ball x0 (p.r (Fin.last p.i) / (8 * B)) → |
| 110 | (F.connection ((T - tau) + s / 1)).curvatureTensorNorm (e.forward s hs y) ≤ |
| 111 | 52 * (p.r (Fin.last p.i))⁻¹ ^ 2) : |
| 112 | ∃ A : Set (R.geometry.toLGeometry.slices |
| 113 | (T - (tau + seedImageDelay B (p.r (Fin.last p.i))))).Point, |
| 114 | IsOpen A ∧ A.Nonempty ∧ |
| 115 | ENNReal.ofReal (p.kappa (Fin.last p.i) * |
| 116 | seedImageRadius B (p.r (Fin.last p.i)) ^ 3 / 8) ≤ |
| 117 | calibratedMetricVolume (R.geometry.toLGeometry.slices |
| 118 | (T - (tau + seedImageDelay B (p.r (Fin.last p.i))))).metricOnPoints A ∧ |
| 119 | ∀ q ∈ closure A, ∃ comparison : M14BackwardPath R.geometry.toLGeometry T 0 |
| 120 | (tau + seedImageDelay B (p.r (Fin.last p.i))) x q.val, |
| 121 | M14BackwardLAction R.geometry.toLGeometry comparison < actionBudget p / 2 := by |
| 122 | let r := p.r (Fin.last p.i) |
| 123 | let d := seedImageDelay B r |
| 124 | let rho := seedImageRadius B r |
| 125 | let duration := seedCylinderDuration B r |
| 126 | let U : TopologicalSpace.Opens (F.slice (T - tau)).carrier := |
| 127 | ⟨(F.metric (T - tau)).ball x0 (r / (8 * B)), M04.initial_ball_isOpen _ _ _⟩ |
| 128 | have hr : 0 < r := p.r_pos _ |
| 129 | have hd : 0 < d := seedImageDelay_pos hB hr |
| 130 | have hrho : 0 < rho := seedImageRadius_pos hB hr |
| 131 | have hduration : d < duration := seedImageDelay_lt_duration hB hr |
| 132 | let J : SpacetimeInterval := ⟨Icc (-d) 0, ordConnected_Icc, |
| 133 | ⟨-d, ⟨le_rfl, by linarith⟩, 0, ⟨by linarith, le_rfl⟩, by linarith⟩⟩ |
| 134 | have hJ : J.domain = Icc (-d) 0 := rfl |
| 135 | have hzero : 0 ∈ J.domain := ⟨by linarith, le_rfl⟩ |
| 136 | have hleft : -d ∈ J.domain := ⟨le_rfl, by linarith⟩ |
| 137 | have hsub : J.domain ⊆ Icc (-duration) 0 := Icc_subset_Icc_left (by linarith) |
| 138 | obtain ⟨lifted, hforward, hpullback⟩ := |
| 139 | exists_realized_seed_cylinder R hd hduration hJ (U := U) e htime |
| 140 | have hI : (cylinderPhysicalInterval (T - tau) 1 lifted.scale_pos J).domain ⊆ |
| 141 | R.history.generalized.interval := by |
| 142 | rintro _ ⟨s, hs, rfl⟩ |
| 143 | exact htime s hs |
| 144 | have hmetric (s : ℝ) (hs : s ∈ J.domain) (z : U) |
| 145 | (v : TangentSpace (𝓡 3) z.val) : |
| 146 | lifted.pullbackInner s hs z.val v v ≤ 2 * (F.metric (T - tau)).inner z.val v v := by |
| 147 | rw [hpullback s hs z.val z.property v v] |
| 148 | have hsmall : 6 * (52 * r⁻¹ ^ 2) * (-s) ≤ 1 / 2 := by |
| 149 | apply le_trans _ (seedImageDelay_metric_short hB hr) |
| 150 | exact mul_le_mul_of_nonneg_left (by linarith [hs.1]) (by positivity) |
| 151 | simpa only [SurgeryFlowCylinder.pullbackInner, one_mul] using |
| 152 | (based_cylinder_metric_comparison_two P44 hpinch e U.isOpen hbase z.property v |
| 153 | (hsub hs) hsmall (fun t ht => hRm t ht z.val z.property)).2 |
| 154 | have hscalarLift (s : ℝ) (hs : s ∈ J.domain) (z : U) : |
| 155 | horizontalScalarCurvature R.geometry.toLGeometry.leafwise |
| 156 | (lifted.pointMap s hs z.val) ≤ 4 * r⁻¹ ^ 2 := by |
| 157 | rw [realized_seed_cylinder_scalar P R lifted s hs (htime s hs) z, |
| 158 | hforward s hs z.val z.property] |
| 159 | exact hscalar s (hsub hs) z.val z.property |
| 160 | obtain ⟨hleftFull, hAopen, hAcompact, hAregular, hAvolume⟩ := |
| 161 | old_seed_image_volume P44 p old hpinch htold x0 hpositive hB e hbase hRm |
| 162 | let Aphysical := e.forward (-d) hleftFull '' (F.metric (T - tau)).ball x0 rho |
| 163 | obtain ⟨A, hA, _, _, hclosure, hvolume⟩ := |
| 164 | realized_seed_of_regular_image P R (htime (-d) hleft) hAopen hAcompact hAregular |
| 165 | have hvolumeA : ENNReal.ofReal (p.kappa (Fin.last p.i) * rho ^ 3 / 8) ≤ |
| 166 | calibratedMetricVolume (R.geometry.toLGeometry.slices ((T - tau) + -d / 1)).metricOnPoints |
| 167 | A := by |
| 168 | rw [hvolume] |
| 169 | exact hAvolume |
| 170 | have hne : A.Nonempty := by |
| 171 | by_contra hn |
| 172 | have hempty : A = ∅ := not_nonempty_iff_eq_empty.mp hn |
| 173 | rw [hempty, measure_empty] at hvolumeA |
| 174 | have hkappa := p.kappa_pos (Fin.last p.i) |
| 175 | have hpos : 0 < ENNReal.ofReal (p.kappa (Fin.last p.i) * rho ^ 3 / 8) := |
| 176 | ENNReal.ofReal_pos.mpr (by positivity) |
| 177 | exact (not_le_of_gt hpos) hvolumeA |
| 178 | have hbuffer : closure ((F.metric (T - tau)).ball x0 rho) ⊆ U := by |
| 179 | have hhalf := M04.initial_half_ball_closure_subset_initial_ball (F.metric (T - tau)) x0 |
| 180 | (by positivity : 0 < 2 * rho) |
| 181 | rw [show 2 * rho / 2 = rho by ring] at hhalf |
| 182 | intro z hz |
| 183 | exact (hhalf hz).trans_le |
| 184 | (ENNReal.ofReal_le_ofReal (twice_seedImageRadius_lt_ball_radius hB hr).le) |
| 185 | have hsourceCompact : IsCompact (closure ((F.metric (T - tau)).ball x0 rho)) := |
| 186 | (F.slices_compact (T - tau) (O.interval_subset htold.1)).of_isClosed_subset |
| 187 | isClosed_closure (subset_univ _) |
| 188 | let chart := M44.cylinderSliceChart e U.isOpen (-d) hleftFull |
| 189 | have hphysicalClosure := chart.toOpenPartialHomeomorph.image_closure_of_compact_buffer |
| 190 | hsourceCompact hbuffer |
| 191 | change e.forward (-d) hleftFull '' closure ((F.metric (T - tau)).ball x0 rho) = |
| 192 | closure Aphysical at hphysicalClosure |
| 193 | have htEq : T - (tau + d) = (T - tau) + -d / 1 := by ring |
| 194 | change ∃ A : Set (R.geometry.toLGeometry.slices (T - (tau + d))).Point, _ |
| 195 | rw [htEq] |
| 196 | refine ⟨A, hA, hne, hvolumeA, ?_⟩ |
| 197 | intro q hq |
| 198 | have hqImage := mem_image_of_mem |
| 199 | (R.history.history.forward ((T - tau) + -d / 1) (htime (-d) hleft) ∘ |
| 200 | (R.geometry.sliceIdentification ((T - tau) + -d / 1)).identification.symm) hq |
| 201 | rw [hclosure, ← hphysicalClosure] at hqImage |
| 202 | obtain ⟨z, hz, hzImage⟩ := hqImage |
| 203 | obtain ⟨alpha, halpha0, halpha1, halpha, halphaSource, halphaSpeed⟩ := |
| 204 | exists_seed_spatial_path (F.metric (T - tau)) x0 hrho hz |
| 205 | have hsource : MapsTo alpha (Icc (0 : ℝ) 1) U := by |
| 206 | intro s hs |
| 207 | exact (halphaSource hs).trans_le |
| 208 | (ENNReal.ofReal_le_ofReal (twice_seedImageRadius_lt_ball_radius hB hr).le) |
| 209 | obtain ⟨beta, hbeta, hbetaClock, hbeta0, hbeta1, hbetaDensity⟩ := |
| 210 | exists_seed_cylinder_tail R.geometry htau hd hrho.le hJ lifted hI |
| 211 | (F.metric (T - tau)) hmetric hscalarLift alpha halpha hsource halphaSpeed |
| 212 | have hx0U : x0 ∈ U := halpha0 ▸ hsource ⟨le_rfl, zero_le_one⟩ |
| 213 | have hjoin : beta (Real.sqrt tau) = path.curve tau := by |
| 214 | rw [hbeta0 hzero, halpha0, hpoint] |
| 215 | have himage0 := hforward 0 hzero x0 hx0U |
| 216 | have hphysical0 : HEq |
| 217 | (R.history.history.forward ((T - tau) + 0 / 1) (htime 0 hzero) |
| 218 | (lifted.forward 0 hzero x0)) x0 := |
| 219 | himage0.heq.trans (hbase (hsub hzero) x0 hx0U) |
| 220 | change (⟨(T - tau) + 0 / 1, lifted.forward 0 hzero x0⟩ : |
| 221 | R.history.generalized.point) = ⟨T - tau, y0⟩ |
| 222 | exact history_point_eq_of_physical_heq R (htime 0 hzero) htime0 |
| 223 | (lifted.forward 0 hzero x0) y0 (by ring) (hphysical0.trans hx0.symm.heq) |
| 224 | have hend : beta (Real.sqrt (tau + d)) = q.val := by |
| 225 | rw [hbeta1 hleft, halpha1] |
| 226 | apply realized_seed_point_eq R (htime (-d) hleft) q |
| 227 | exact (hforward (-d) hleft z (hbuffer hz)).trans hzImage |
| 228 | obtain ⟨LG⟩ := P.m14.conclusion _ _ _ R.geometry.toLGeometry |
| 229 | have hcomparison := admissible_seed_comparison_of_square_tail P.m12 LG p hB path hmin |
| 230 | htau htauS hS htotal hfloor hshort beta hbeta hbetaClock hjoin hbetaDensity |
| 231 | rw [hend] at hcomparison |
| 232 | exact hcomparison |
| 233 | |
| 234 | end PoincareMT.Proofs.M46 |