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.Topology.Manifold.Poincare.Final.Compatibility.SourceNames |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.Avoidance.FullAvoidance |
| 3 | |
| 4 | /-! |
| 5 | # Action avoidance of cap windows ending before a retained time |
| 6 | |
| 7 | The physical clock excludes the initial point. The actual cap-entry |
| 8 | and weighted-tail estimates then exclude the entire early inner trace, |
| 9 | including the birth slice. MT pp. 379-387; seed-retained-confinement.md. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | set_option backward.isDefEq.respectTransparency false |
| 14 | |
| 15 | open Set MeasureTheory |
| 16 | open scoped Manifold ContDiff Topology intervalIntegral |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.M47 |
| 21 | |
| 22 | open Proofs.M12 Proofs.M46 |
| 23 | |
| 24 | /-- A cap window ending before the retained initial time is avoided by |
| 25 | every path under the same full positive-action budget. -/ |
| 26 | theorem seedRetained_avoids_early_cap |
| 27 | {F : GeneralizedRicciFlowData.{u}} {G : FlowBoxRicciGeometry F} |
| 28 | {C : GeneralizedSliceCarrier.{u}} [CompactSpace C.carrier] |
| 29 | {gBirth : RiemannianMetric 3 C.carrier} {center : C.carrier} |
| 30 | {origin T A h c mu theta : ℝ} |
| 31 | (Q : CapBarrierWindow G C gBirth center origin T A h c mu theta) |
| 32 | (hM12 : GeneralizedRicciGaugeTheory.{u} 3) |
| 33 | (hmu : 0 < mu) (hA : 0 < A) (hh : 0 < h) (hc : 0 < c) (htheta : theta < 1) |
| 34 | {budget a tau : ℝ} (hbudget0 : 0 ≤ budget) (ha : 0 < a) |
| 35 | (hside : budget / Real.sqrt a < mu * A ^ 2 / 4) |
| 36 | (htop : budget / Real.sqrt a < -(c / 2) * (Real.log (1 - theta) + Real.log 2)) |
| 37 | (hclock : Q.top ≤ T - a) |
| 38 | {x y : G.toLGeometry.Point} (p : M14BackwardPath G.toLGeometry T 0 tau x y) |
| 39 | (hbudget : (∫ t in 0..tau, Real.sqrt t * pathPositiveDensity p t) ≤ budget) |
| 40 | {b : ℝ} (hb : b ∈ Icc 0 tau) |
| 41 | (w : (G.realization.timeIntervals.interval |
| 42 | (cylinderPhysicalInterval origin (h⁻¹ ^ 2) Q.cylinder.scale_pos Q.interval)).Point × |
| 43 | Q.source) |
| 44 | (hinner : w.2.val ∈ gBirth.ball center (A * h / 2)) |
| 45 | (hinnerTime : (w.1.val - origin) / h ^ 2 ≤ 1 / 2) : |
| 46 | p.curve b ≠ rawCylinderMap G.realization Q.cylinder w := by |
| 47 | have hout (s : ℝ) (hs : s ∈ Icc 0 tau) (hsa : s ≤ a) : |
| 48 | p.curve s ∉ range (rawCylinderMap G.realization Q.cylinder) := by |
| 49 | rintro ⟨z, hz⟩ |
| 50 | have hztime : z.1.val ∈ Ioo origin Q.top := Q.physical_eq ▸ z.1.property |
| 51 | have heq := congrArg G.realization.spacetime.timeFunction hz |
| 52 | rw [rawCylinderMap_time] at heq |
| 53 | have hp : G.realization.spacetime.timeFunction (p.curve s) = T - s := p.curve_time s hs |
| 54 | rw [hp] at heq |
| 55 | linarith only [hztime.2, hclock, hsa, heq] |
| 56 | intro heq |
| 57 | by_cases hba : b ≤ a |
| 58 | · exact hout b hb hba ⟨w, heq.symm⟩ |
| 59 | · have hab : a < b := lt_of_not_ge hba |
| 60 | have hwidth : Q.top - origin ≤ h ^ 2 := by |
| 61 | nlinarith [Q.top_le_model, sq_nonneg h] |
| 62 | obtain ⟨r, hr, hentry⟩ := exists_actualTruncatedCapEntry_action_gt G hM12 Q.cylinder |
| 63 | Q.time_subset gBirth Q.physical_eq hmu hA hh hc htheta hwidth hside htop |
| 64 | Q.metric_lower Q.scalar_lower center Q.source_eq p Q.top_kind ha hab hb.2 |
| 65 | (hout a ⟨ha.le, hab.le.trans hb.2⟩ le_rfl) w heq hinner hinnerTime |
| 66 | have hroot : budget / Real.sqrt r ≤ budget / Real.sqrt a := |
| 67 | div_le_div_of_nonneg_left hbudget0 (Real.sqrt_pos.mpr ha) (Real.sqrt_le_sqrt hr.1) |
| 68 | have hweighted := weightedAction_gt_of_tail (ha.trans_le hr.1) hr.2.le hb.2 |
| 69 | (pathPositiveDensity_nonneg p) (pathPositiveAction_integrable hM12 p) |
| 70 | (pathPositiveDensity_tail_integrable hM12 p (ha.trans_le hr.1) hr.2.le hb.2) |
| 71 | (hroot.trans_lt hentry) |
| 72 | exact (not_lt_of_ge hbudget) hweighted |
| 73 | |
| 74 | /-- The same time-separated window excludes the actual included birth |
| 75 | point through its genuine future neighborhood. -/ |
| 76 | theorem seedRetained_avoids_cap_birth |
| 77 | {F : SurgeryFlowData.{u}} {W : M33RegularHistoryWindow F} |
| 78 | (H : M33RegularHistoryData W) {G : FlowBoxRicciGeometry H.generalized} |
| 79 | {origin T A h c mu theta : ℝ} {center : (F.slice origin).carrier} |
| 80 | (Q : CapBarrierWindow G (F.slice origin) (F.metric origin) center |
| 81 | origin T A h c mu theta) |
| 82 | [CompactSpace (F.slice origin).carrier] |
| 83 | (D : CapBarrierOriginData H Q) (hM12 : GeneralizedRicciGaugeTheory.{u} 3) |
| 84 | (hmu : 0 < mu) (hA : 0 < A) (hh : 0 < h) (hc : 0 < c) (htheta : theta < 1) |
| 85 | {budget a tau : ℝ} (hbudget0 : 0 ≤ budget) (ha : 0 < a) |
| 86 | (hside : budget / Real.sqrt a < mu * A ^ 2 / 4) |
| 87 | (htop : budget / Real.sqrt a < -(c / 2) * (Real.log (1 - theta) + Real.log 2)) |
| 88 | (htopTime : Q.top ≤ T - a) |
| 89 | {x z : G.toLGeometry.Point} (p : M14BackwardPath G.toLGeometry T 0 tau x z) |
| 90 | (hbudget : (∫ t in 0..tau, Real.sqrt t * pathPositiveDensity p t) ≤ budget) |
| 91 | {b : ℝ} (hb : b ∈ Ioc 0 tau) (hclock : T - b = origin) |
| 92 | (horigin : origin ∈ H.generalized.interval) |
| 93 | (y : (H.generalized.slice origin).carrier) |
| 94 | (hy : H.history.forward origin horigin y ∈ (F.metric origin).ball center (A * h / 2)) : |
| 95 | p.curve b ≠ (⟨origin, y⟩ : H.generalized.point) := by |
| 96 | intro heq |
| 97 | obtain ⟨width, hwidth, hnear⟩ := D.birth_capture H Q hA hh horigin y hy |
| 98 | rw [← heq] at hnear |
| 99 | obtain ⟨r, hr, w, hinner, hearly, hw⟩ := backwardPath_reaches_future_neighborhood G p |
| 100 | le_rfl hb.1 hb.2 hwidth hclock hnear |
| 101 | exact seedRetained_avoids_early_cap Q hM12 hmu hA hh hc htheta hbudget0 ha |
| 102 | hside htop htopTime p hbudget ⟨hr.1.le, hr.2.le.trans hb.2⟩ w hinner hearly hw.symm |
| 103 | |
| 104 | end PoincareMT.M47 |