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.Avoidance.BirthApproach |
| 3 | |
| 4 | /-! |
| 5 | # Avoidance at the included birth of the actual persistent cap |
| 6 | |
| 7 | Lemma 16.15, pp. 379-382. The same physical persistence cylinder gives |
| 8 | a future neighborhood of every regular inner birth point. The actual |
| 9 | backward path enters that neighborhood before reaching birth, where |
| 10 | the already proved positive-time action barrier applies. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set Filter Function MeasureTheory |
| 17 | open scoped Manifold ContDiff Topology intervalIntegral |
| 18 | |
| 19 | universe u |
| 20 | |
| 21 | namespace PoincareMT.Proofs.M12 |
| 22 | end PoincareMT.Proofs.M12 |
| 23 | open PoincareMT.EpochExtension.Spacetime |
| 24 | |
| 25 | namespace PoincareMT.Proofs.M46 |
| 26 | |
| 27 | open PoincareMT.Proofs.M12 |
| 28 | |
| 29 | variable {F : SurgeryFlowData.{u}} {W : M33RegularHistoryWindow F} |
| 30 | (H : M33RegularHistoryData W) {G : FlowBoxRicciGeometry H.generalized} |
| 31 | {origin T A h c mu theta : ℝ} {center : (F.slice origin).carrier} |
| 32 | (Q : CapBarrierWindow G (F.slice origin) (F.metric origin) center |
| 33 | origin T A h c mu theta) |
| 34 | |
| 35 | /-- The actual inner, early portion of the persistent cap window. |
| 36 | Source: Lemma 16.15, p. 381. -/ |
| 37 | def CapBarrierWindow.earlyInnerTrace : Set G.toLGeometry.Point := |
| 38 | {v | ∃ w : (G.realization.timeIntervals.interval |
| 39 | (cylinderPhysicalInterval origin (h⁻¹ ^ 2) Q.cylinder.scale_pos Q.interval)).Point × |
| 40 | Q.source, |
| 41 | w.2.val ∈ (F.metric origin).ball center (A * h / 2) ∧ |
| 42 | (w.1.val - origin) / h ^ 2 ≤ 1 / 2 ∧ rawCylinderMap G.realization Q.cylinder w = v} |
| 43 | |
| 44 | /-- The early inner trace contains a future relative neighborhood of |
| 45 | each regular inner birth point, using the retained original cylinder. |
| 46 | Source: Lemma 16.15, pp. 379-382. -/ |
| 47 | theorem CapBarrierOriginData.birth_capture |
| 48 | (D : CapBarrierOriginData H Q) (hA : 0 < A) (hh : 0 < h) |
| 49 | (horigin : origin ∈ H.generalized.interval) |
| 50 | (y : (H.generalized.slice origin).carrier) |
| 51 | (hy : H.history.forward origin horigin y ∈ (F.metric origin).ball center (A * h / 2)) : |
| 52 | ∃ width > 0, Q.earlyInnerTrace ∈ |
| 53 | 𝓝[G.realization.spacetime.timeFunction ⁻¹' Ioc origin (origin + width)] |
| 54 | (⟨origin, y⟩ : H.generalized.point) := by |
| 55 | have hsq : 0 < h ^ 2 := sq_pos_of_pos hh |
| 56 | let b := (Q.top - origin) / h ^ 2 |
| 57 | have hb : 0 < b := div_pos (sub_pos.mpr Q.top_gt) hsq |
| 58 | let d := min (1 / 2) (b / 2) |
| 59 | have hd : 0 < d := lt_min (by norm_num) (half_pos hb) |
| 60 | have hdb : d < b := (min_le_right _ _).trans_lt (half_lt_self hb) |
| 61 | have hdhalf : d ≤ 1 / 2 := min_le_left _ _ |
| 62 | have hopen : IsOpen ((F.metric origin).ball center (A * h / 2)) := by |
| 63 | let : Bundle.RiemannianBundle |
| 64 | (TangentSpace (𝓡 3) : (F.slice origin).carrier → Type _) := |
| 65 | ⟨(F.metric origin).toRiemannianMetric⟩ |
| 66 | let : EMetricSpace (F.slice origin).carrier := |
| 67 | .ofRiemannianMetric (𝓡 3) (F.slice origin).carrier |
| 68 | change IsOpen {z | edist center z < ENNReal.ofReal (A * h / 2)} |
| 69 | exact isOpen_lt (continuous_const.edist continuous_id) continuous_const |
| 70 | let V : TopologicalSpace.Opens (F.slice origin).carrier := |
| 71 | ⟨(F.metric origin).ball center (A * h / 2), hopen⟩ |
| 72 | have hVU : (V : Set (F.slice origin).carrier) ⊆ Q.source := by |
| 73 | rw [Q.source_eq] |
| 74 | intro z hz |
| 75 | exact hz.trans_le (ENNReal.ofReal_le_ofReal (by nlinarith [mul_pos hA hh])) |
| 76 | have hsmall : Icc 0 d ⊆ Ico 0 ((D.originalTop - origin) / h ^ 2) := by |
| 77 | intro s hs |
| 78 | refine ⟨hs.1, (hs.2.trans_lt hdb).trans_le ?_⟩ |
| 79 | exact (div_le_div_iff_of_pos_right hsq).mpr (sub_le_sub_right D.top_le_original origin) |
| 80 | have hpositive : Ioc 0 d ⊆ Q.interval.domain := by |
| 81 | rw [D.interval_eq] |
| 82 | intro s hs |
| 83 | exact ⟨hs.1, hs.2.trans_lt hdb⟩ |
| 84 | have htime : ∀ s ∈ Icc 0 d, origin + s / (h⁻¹ ^ 2) ∈ H.generalized.interval := by |
| 85 | intro s hs |
| 86 | by_cases hz : s = 0 |
| 87 | · simpa only [hz, zero_div, add_zero] using horigin |
| 88 | · exact D.time_mem s (hpositive ⟨lt_of_le_of_ne hs.1 (Ne.symm hz), hs.2⟩) |
| 89 | have hnear := capBirth_positiveTrace_mem_nhdsWithin H G.realization D.original Q.cylinder |
| 90 | hd hVU hsmall hpositive D.interval_subset D.based htime D.time_mem D.forward horigin y hy |
| 91 | refine ⟨d / (h⁻¹ ^ 2), div_pos hd Q.cylinder.scale_pos, ?_⟩ |
| 92 | apply mem_of_superset hnear |
| 93 | rintro v ⟨s, hs, z, hz, rfl⟩ |
| 94 | let w : (G.realization.timeIntervals.interval |
| 95 | (cylinderPhysicalInterval origin (h⁻¹ ^ 2) Q.cylinder.scale_pos Q.interval)).Point × |
| 96 | Q.source := |
| 97 | ((cylinderClockHomeomorph origin (h⁻¹ ^ 2) Q.cylinder.scale_pos Q.interval).symm |
| 98 | ⟨s, hpositive hs⟩, ⟨z, hVU hz⟩) |
| 99 | refine ⟨w, hz, ?_, rawCylinderMap_at_parameter G.realization Q.cylinder _ _⟩ |
| 100 | have hclock : (w.1.val - origin) / h ^ 2 = s := by |
| 101 | change (parabolicTimeInv (h⁻¹ ^ 2) origin s - origin) / h ^ 2 = s |
| 102 | simp only [parabolicTimeInv, inv_pow, div_inv_eq_mul, add_sub_cancel_left] |
| 103 | exact mul_div_cancel_right₀ s hsq.ne' |
| 104 | rw [hclock] |
| 105 | exact hs.2.trans hdhalf |
| 106 | |
| 107 | /-- The actual weighted action barrier excludes a regular inner cap |
| 108 | birth reached after the initial safe parameter. Source: Lemma 16.15, |
| 109 | pp. 379-382. -/ |
| 110 | theorem CapBarrierOriginData.avoids_birth |
| 111 | [CompactSpace (F.slice origin).carrier] |
| 112 | (D : CapBarrierOriginData H Q) (hM12 : GeneralizedRicciGaugeTheory.{u} 3) |
| 113 | (hmu : 0 < mu) (hA : 0 < A) (hh : 0 < h) (hc : 0 < c) (htheta : theta < 1) |
| 114 | {budget a tau safeBound : ℝ} (hbudget0 : 0 ≤ budget) (ha : 0 < a) |
| 115 | (hside : budget / Real.sqrt a < mu * A ^ 2 / 4) |
| 116 | (htop : budget / Real.sqrt a < -(c / 2) * (Real.log (1 - theta) + Real.log 2)) |
| 117 | (hseparation : safeBound < c / (2 * h ^ 2)) |
| 118 | {x z : G.toLGeometry.Point} (p : M14BackwardPath G.toLGeometry T 0 tau x z) |
| 119 | (hscalar : horizontalScalarCurvature G.toLGeometry.leafwise (p.curve a) ≤ safeBound) |
| 120 | (hbudget : (∫ t in 0..tau, Real.sqrt t * pathPositiveDensity p t) ≤ budget) |
| 121 | {b : ℝ} (hb : b ∈ Ioc a tau) (hclock : T - b = origin) |
| 122 | (horigin : origin ∈ H.generalized.interval) |
| 123 | (y : (H.generalized.slice origin).carrier) |
| 124 | (hy : H.history.forward origin horigin y ∈ (F.metric origin).ball center (A * h / 2)) : |
| 125 | p.curve b ≠ (⟨origin, y⟩ : H.generalized.point) := by |
| 126 | intro heq |
| 127 | obtain ⟨width, hwidth, hnear⟩ := D.birth_capture H Q hA hh horigin y hy |
| 128 | rw [← heq] at hnear |
| 129 | obtain ⟨r, hr, w, hinner, hearly, hw⟩ := backwardPath_reaches_future_neighborhood G p |
| 130 | ha.le hb.1 hb.2 hwidth hclock hnear |
| 131 | exact Q.avoids_early_inner hM12 hmu hA hh hc htheta hbudget0 ha hside htop |
| 132 | hseparation p hscalar hbudget ⟨hr.1, hr.2.le.trans hb.2⟩ w hinner hearly hw.symm |
| 133 | |
| 134 | end PoincareMT.Proofs.M46 |