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.CapBarrierWindow |
| 3 | |
| 4 | /-! |
| 5 | # Positive-action avoidance of the actual persistent cap window |
| 6 | |
| 7 | Lemma 16.15, pp. 379-382. The scalar separation excludes the initial |
| 8 | safe point from the actual cap image. The physical entry theorem then |
| 9 | forces a later suffix above the unweighted budget, contradicting the |
| 10 | same path's full weighted positive action. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | set_option backward.isDefEq.respectTransparency false |
| 15 | |
| 16 | open Set MeasureTheory |
| 17 | open scoped Manifold ContDiff Topology ENNReal 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 : GeneralizedRicciFlowData.{u}} {G : FlowBoxRicciGeometry F} |
| 30 | {C : GeneralizedSliceCarrier.{u}} {gBirth : RiemannianMetric 3 C.carrier} |
| 31 | {center : C.carrier} {origin T A h c mu theta : ℝ} |
| 32 | |
| 33 | /-- Every actual point of the compared cap window has the physical |
| 34 | birth-scale scalar floor. Source: Lemma 16.15, p. 381. -/ |
| 35 | theorem CapBarrierWindow.scalar_birth_lower |
| 36 | (Q : CapBarrierWindow G C gBirth center origin T A h c mu theta) |
| 37 | (hh : 0 < h) (hc : 0 < c) (htheta : theta < 1) |
| 38 | (w : (G.realization.timeIntervals.interval |
| 39 | (cylinderPhysicalInterval origin (h⁻¹ ^ 2) Q.cylinder.scale_pos Q.interval)).Point × |
| 40 | Q.source) : |
| 41 | c / (2 * h ^ 2) ≤ horizontalScalarCurvature G.toLGeometry.leafwise |
| 42 | (rawCylinderMap G.realization Q.cylinder w) := by |
| 43 | have ht : w.1.val ∈ Ioo origin Q.top := Q.physical_eq ▸ w.1.property |
| 44 | have hsq : 0 < h ^ 2 := sq_pos_of_pos hh |
| 45 | have hs0 : 0 ≤ (w.1.val - origin) / h ^ 2 := div_nonneg (by linarith [ht.1]) hsq.le |
| 46 | have hs1 : (w.1.val - origin) / h ^ 2 < 1 := by |
| 47 | apply (div_lt_iff₀ hsq).mpr |
| 48 | nlinarith [ht.2, Q.top_le_model] |
| 49 | have hden : 0 < 2 * (1 - (w.1.val - origin) / h ^ 2) * h ^ 2 := by positivity |
| 50 | apply (div_le_div_of_nonneg_left hc.le hden ?_).trans (Q.scalar_lower w) |
| 51 | nlinarith [mul_nonneg hs0 hsq.le] |
| 52 | |
| 53 | /-- The actual low-scalar initial point excludes every later early |
| 54 | inner point of this window under the selected positive-action budget. |
| 55 | Source: Lemma 16.15 and equations (16.2)-(16.3), pp. 379-382. -/ |
| 56 | theorem CapBarrierWindow.avoids_early_inner |
| 57 | [CompactSpace C.carrier] |
| 58 | (Q : CapBarrierWindow G C gBirth center origin T A h c mu theta) |
| 59 | (hM12 : GeneralizedRicciGaugeTheory.{u} 3) |
| 60 | (hmu : 0 < mu) (hA : 0 < A) (hh : 0 < h) (hc : 0 < c) (htheta : theta < 1) |
| 61 | {budget a tau safeBound : ℝ} (hbudget0 : 0 ≤ budget) (ha : 0 < a) |
| 62 | (hside : budget / Real.sqrt a < mu * A ^ 2 / 4) |
| 63 | (htop : budget / Real.sqrt a < -(c / 2) * (Real.log (1 - theta) + Real.log 2)) |
| 64 | (hseparation : safeBound < c / (2 * h ^ 2)) |
| 65 | {x y : G.toLGeometry.Point} (p : M14BackwardPath G.toLGeometry T 0 tau x y) |
| 66 | (hscalar : horizontalScalarCurvature G.toLGeometry.leafwise (p.curve a) ≤ safeBound) |
| 67 | (hbudget : (∫ t in 0..tau, Real.sqrt t * pathPositiveDensity p t) ≤ budget) |
| 68 | {b : ℝ} (hb : b ∈ Ioc a tau) |
| 69 | (w : (G.realization.timeIntervals.interval |
| 70 | (cylinderPhysicalInterval origin (h⁻¹ ^ 2) Q.cylinder.scale_pos Q.interval)).Point × |
| 71 | Q.source) |
| 72 | (hinner : w.2.val ∈ gBirth.ball center (A * h / 2)) |
| 73 | (hinnerTime : (w.1.val - origin) / h ^ 2 ≤ 1 / 2) : |
| 74 | p.curve b ≠ rawCylinderMap G.realization Q.cylinder w := by |
| 75 | intro heq |
| 76 | have hout : p.curve a ∉ Set.range (rawCylinderMap G.realization Q.cylinder) := by |
| 77 | rintro ⟨z, hz⟩ |
| 78 | have hlow := Q.scalar_birth_lower hh hc htheta z |
| 79 | rw [hz] at hlow |
| 80 | exact (not_lt_of_ge (hlow.trans hscalar)) hseparation |
| 81 | have hwidth : Q.top - origin ≤ h ^ 2 := by |
| 82 | nlinarith [Q.top_le_model, sq_nonneg h] |
| 83 | obtain ⟨r, hr, hentry⟩ := exists_actualTruncatedCapEntry_action_gt G hM12 Q.cylinder |
| 84 | Q.time_subset gBirth Q.physical_eq hmu hA hh hc htheta hwidth hside htop |
| 85 | Q.metric_lower Q.scalar_lower center Q.source_eq p Q.top_kind ha hb.1 hb.2 hout |
| 86 | w heq hinner hinnerTime |
| 87 | have hroot : budget / Real.sqrt r ≤ budget / Real.sqrt a := |
| 88 | div_le_div_of_nonneg_left hbudget0 (Real.sqrt_pos.mpr ha) (Real.sqrt_le_sqrt hr.1) |
| 89 | have hweighted := weightedAction_gt_of_tail (ha.trans_le hr.1) hr.2.le hb.2 |
| 90 | (pathPositiveDensity_nonneg p) (pathPositiveAction_integrable hM12 p) |
| 91 | (pathPositiveDensity_tail_integrable hM12 p (ha.trans_le hr.1) hr.2.le hb.2) |
| 92 | (hroot.trans_lt hentry) |
| 93 | exact (not_lt_of_ge hbudget) hweighted |
| 94 | |
| 95 | end PoincareMT.Proofs.M46 |