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.LGeometry.CapEntry.TopAction |
| 2 | import PoincareLib.Geometry.RicciFlow.Surgery.Induction.Noncollapse.LGeometry.Avoidance.ActualPositiveAction |
| 3 | |
| 4 | /-! |
| 5 | # Top-entry action in the original physical parameter |
| 6 | |
| 7 | Proposition 16.13 and Lemma 16.15, pp. 377-381. The normalized cap |
| 8 | clock is affine and decreasing in backward time. Its physical scale |
| 9 | cancels from the scalar integral, including when the cylinder excludes |
| 10 | the normalized top endpoint. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set MeasureTheory |
| 16 | open scoped intervalIntegral |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace PoincareMT.Proofs.M46 |
| 21 | |
| 22 | /-- The inverse-square physical scalar factor cancels the affine |
| 23 | change from backward time to normalized cap time. Source: |
| 24 | Proposition 16.13, p. 377. -/ |
| 25 | theorem capPhysicalScalarIntegral_eq {c offset q a b : ℝ} (hq : q ≠ 0) : |
| 26 | (∫ t in a..b, c / (2 * (1 - (offset - t) / q) * q)) = |
| 27 | ∫ s in (offset - b) / q..(offset - a) / q, c / (2 * (1 - s)) := by |
| 28 | have hform : (fun t : ℝ => c / (2 * (1 - (offset - t) / q) * q)) = |
| 29 | fun t => (c / (2 * (1 - (offset / q - t / q)))) / q := by |
| 30 | funext t |
| 31 | rw [sub_div, div_mul_eq_div_div] |
| 32 | rw [hform, intervalIntegral.integral_div, |
| 33 | intervalIntegral.integral_comp_sub_div (fun s : ℝ => c / (2 * (1 - s))) hq] |
| 34 | simp only [smul_eq_mul, ← sub_div] |
| 35 | exact mul_div_cancel_left₀ _ hq |
| 36 | |
| 37 | /-- The scalar floor on the open tracked suffix gives the top-entry |
| 38 | action barrier without a value at the excluded cap top. Source: |
| 39 | Proposition 16.13, p. 377. -/ |
| 40 | theorem capPhysicalTopAction_gt {c ell theta offset q a b : ℝ} |
| 41 | (hc : 0 < c) (hthetaOne : theta < 1) |
| 42 | (hbudget : ell < -(c / 2) * (Real.log (1 - theta) + Real.log 2)) |
| 43 | (hq : 0 < q) (hab : a ≤ b) (htop : (offset - a) / q = theta) |
| 44 | (hinner : (offset - b) / q ≤ 1 / 2) |
| 45 | (density : ℝ → ℝ) (hint : IntervalIntegrable density volume a b) |
| 46 | (hscalar : ∀ t ∈ Ioo a b, |
| 47 | c / (2 * (1 - (offset - t) / q) * q) ≤ density t) : |
| 48 | ell < ∫ t in a..b, density t := by |
| 49 | have hbarrier : IntervalIntegrable |
| 50 | (fun t : ℝ => c / (2 * (1 - (offset - t) / q) * q)) volume a b := by |
| 51 | apply ContinuousOn.intervalIntegrable |
| 52 | rw [uIcc_of_le hab] |
| 53 | apply continuousOn_const.div |
| 54 | ((continuousOn_const.mul |
| 55 | (continuousOn_const.sub |
| 56 | ((continuousOn_const.sub continuousOn_id).div_const q))).mul continuousOn_const) |
| 57 | intro t ht |
| 58 | have hclock : (offset - t) / q ≤ theta := by |
| 59 | rw [← htop] |
| 60 | exact div_le_div_of_nonneg_right (by linarith [ht.1]) hq.le |
| 61 | have : 0 < 2 * (1 - (offset - t) / q) * q := by |
| 62 | exact mul_pos (mul_pos (by norm_num) (by linarith)) hq |
| 63 | exact this.ne' |
| 64 | have hnormalized := capScalarIntegral_lower hc.le hinner hthetaOne |
| 65 | have hphysical : ell < |
| 66 | ∫ t in a..b, c / (2 * (1 - (offset - t) / q) * q) := by |
| 67 | rw [capPhysicalScalarIntegral_eq hq.ne', htop] |
| 68 | exact hbudget.trans_le hnormalized |
| 69 | exact hphysical.trans_le |
| 70 | (intervalIntegral.integral_mono_on_of_le_Ioo hab hbarrier hint hscalar) |
| 71 | |
| 72 | /-- An actual backward path satisfying the cap scalar rate has the |
| 73 | unweighted top-entry positive-action barrier. Source: Proposition 16.13 |
| 74 | and Lemma 16.15, pp. 377 and 381. -/ |
| 75 | theorem actualCapTopEntry_action_gt |
| 76 | {X : Type u} [TopologicalSpace X] {time : X → ℝ} |
| 77 | {I : SpacetimeInterval} {G : GeneralizedLGeometryTransport 3 X time I} |
| 78 | (hM12 : GeneralizedRicciGaugeTheory.{u} 3) |
| 79 | {T tau a b c ell theta offset h : ℝ} {x y : G.Point} |
| 80 | (p : M14BackwardPath G T 0 tau x y) |
| 81 | (hc : 0 < c) (hthetaOne : theta < 1) |
| 82 | (hbudget : ell < -(c / 2) * (Real.log (1 - theta) + Real.log 2)) |
| 83 | (hh : 0 < h) (ha : 0 < a) (hab : a ≤ b) (hbtau : b ≤ tau) |
| 84 | (htop : (offset - a) / h ^ 2 = theta) |
| 85 | (hinner : (offset - b) / h ^ 2 ≤ 1 / 2) |
| 86 | (hscalar : ∀ t ∈ Ioo a b, |
| 87 | c / (2 * (1 - (offset - t) / h ^ 2) * h ^ 2) ≤ |
| 88 | horizontalScalarCurvature G.leafwise (p.curve t)) : |
| 89 | ell < ∫ t in a..b, pathPositiveDensity p t := by |
| 90 | apply capPhysicalTopAction_gt hc hthetaOne hbudget (sq_pos_of_pos hh) hab htop hinner |
| 91 | (pathPositiveDensity p) (pathPositiveDensity_tail_integrable hM12 p ha hab hbtau) |
| 92 | intro t ht |
| 93 | apply (hscalar t ht).trans |
| 94 | dsimp only [pathPositiveDensity] |
| 95 | apply (le_max_left _ _).trans (le_add_of_nonneg_right ?_) |
| 96 | by_cases hv : p.horizontal_velocity t = 0 |
| 97 | · simp only [hv, map_zero, le_refl] |
| 98 | · exact (G.spacetime.horizontalMetric.pos (p.curve t) (p.horizontal_velocity t) hv).le |
| 99 | |
| 100 | end PoincareMT.Proofs.M46 |