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.CurveShortening.Ramp.LocalFlow.Positive.CenteredInterval |
| 2 | |
| 3 | /-! |
| 4 | # A prescribed centered radius and strict forcing margin |
| 5 | |
| 6 | The actual initial and source energies give a positive interval at any |
| 7 | prescribed radius cap. Every forcing fixed point then lies strictly in |
| 8 | the half-radius ball. MT2007 Claim 19.1, p. 437; contract review block 8 |
| 9 | and `2026-09-21-strict-centered-interval.md`, statements 1-2. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Set Filter MeasureTheory |
| 15 | open scoped Topology ENNReal |
| 16 | |
| 17 | namespace PoincareMT.M63.CenteredSpectralResidual |
| 18 | |
| 19 | open SpectralHeatNative |
| 20 | |
| 21 | variable {iota : Type*} [Countable iota] |
| 22 | [MeasurableSpace (State iota)] |
| 23 | {lambda : iota → NNReal} {w : State iota} {T0 T : ℝ} |
| 24 | |
| 25 | /-- A prescribed positive radius cap admits a strict half-radius source |
| 26 | margin on a positive interval, without smallness of the initial state. |
| 27 | MT2007 Claim 19.1, p. 437; strict centered interval derivation, item 1. -/ |
| 28 | theorem exists_strict_positive_interval (N : CenteredSpectralResidual lambda w T0) |
| 29 | (hT0 : 0 < T0) (heps : (N.perturbationConstant : ℝ) < 1 / 2) |
| 30 | {r0 : ℝ} (hr0 : 0 < r0) : |
| 31 | ∃ r : ℝ, 0 < r ∧ r ≤ r0 ∧ ∃ T : ℝ, ∃ hT : 0 < T, ∃ hTT0 : T ≤ T0, |
| 32 | T ≤ 1 ∧ |
| 33 | let P := (initialHeatHigh_memLp_energy lambda w hT.le).1.toLp (initialHeatHigh lambda w) |
| 34 | 2 * N.perturbationConstant + 8 * N.principalConstant * r + |
| 35 | 2 * N.principalConstant * ‖P‖ + 2 * N.lowerConstant * Real.sqrt T < 1 ∧ |
| 36 | ‖(N.restrict hTT0).zero_memLp.toLp (fun t => N.toFun t 0)‖ < |
| 37 | (1 - (2 * N.perturbationConstant + 8 * N.principalConstant * r + |
| 38 | 2 * N.principalConstant * ‖P‖ + 2 * N.lowerConstant * Real.sqrt T)) * r / 2 := by |
| 39 | let d : ℝ := 1 - 2 * N.perturbationConstant |
| 40 | have hd : 0 < d := by dsimp [d]; linarith only [heps] |
| 41 | let r : ℝ := min r0 (d / (32 * (N.principalConstant + 1))) |
| 42 | have hr : 0 < r := by dsimp [r]; exact lt_min hr0 (by positivity) |
| 43 | have hrr0 : r ≤ r0 := min_le_left _ _ |
| 44 | have hrbound : r * (32 * (N.principalConstant + 1)) ≤ d := |
| 45 | (le_div_iff₀ (by positivity)).mp (min_le_right _ _) |
| 46 | have hprincipal : 8 * N.principalConstant * r ≤ d / 4 := by |
| 47 | nlinarith only [hrbound, hr.le] |
| 48 | let q : ℝ := d / (16 * (N.lowerConstant + 1)) |
| 49 | have hq : 0 < q := by dsimp [q]; positivity |
| 50 | have hqEq : q * (16 * (N.lowerConstant + 1)) = d := |
| 51 | div_mul_cancel₀ d (by positivity) |
| 52 | have hlower : 2 * N.lowerConstant * q ≤ d / 8 := by |
| 53 | nlinarith only [hqEq, hq.le] |
| 54 | let a : ℝ := d / (16 * (N.principalConstant + 1)) |
| 55 | let b : ℝ := d * r / 4 |
| 56 | have ha : 0 < a := by dsimp [a]; positivity |
| 57 | have hb : 0 < b := by dsimp [b]; positivity |
| 58 | let Q : ℝ → ℝ := fun t => ‖initialHeatHigh lambda w t‖ ^ 2 + ‖N.toFun t 0‖ ^ 2 |
| 59 | have hP0 := (initialHeatHigh_memLp_energy lambda w hT0.le).1 |
| 60 | have hQ : IntervalIntegrable Q volume 0 T0 := |
| 61 | (intervalIntegrable_iff_integrableOn_Ioc_of_le hT0.le).mpr |
| 62 | (((memLp_two_iff_integrable_sq_norm hP0.aestronglyMeasurable).mp hP0).add |
| 63 | ((memLp_two_iff_integrable_sq_norm N.zero_memLp.aestronglyMeasurable).mp N.zero_memLp)) |
| 64 | have hcont : ContinuousOn (fun t => ∫ s in (0 : ℝ)..t, Q s) (Icc 0 T0) := by |
| 65 | simpa only [uIcc_of_le hT0.le] using |
| 66 | intervalIntegral.continuousOn_primitive_interval' hQ (left_mem_uIcc : 0 ∈ uIcc 0 T0) |
| 67 | obtain ⟨eta, heta, hnear⟩ := Metric.continuousWithinAt_iff.mp |
| 68 | (hcont 0 ⟨le_rfl, hT0.le⟩) (min (a ^ 2) (b ^ 2)) |
| 69 | (lt_min (sq_pos_of_pos ha) (sq_pos_of_pos hb)) |
| 70 | let t : ℝ := min T0 (min 1 (min (q ^ 2) (eta / 2))) |
| 71 | have ht : 0 < t := by |
| 72 | dsimp [t] |
| 73 | exact lt_min hT0 (lt_min zero_lt_one (lt_min (sq_pos_of_pos hq) (by positivity))) |
| 74 | have htT0 : t ≤ T0 := min_le_left _ _ |
| 75 | have ht1 : t ≤ 1 := (min_le_right _ _).trans (min_le_left _ _) |
| 76 | have htq : t ≤ q ^ 2 := |
| 77 | (min_le_right _ _).trans ((min_le_right _ _).trans (min_le_left _ _)) |
| 78 | have hteta : t < eta := by |
| 79 | have hle : t ≤ eta / 2 := |
| 80 | (min_le_right _ _).trans ((min_le_right _ _).trans (min_le_right _ _)) |
| 81 | linarith only [hle, heta] |
| 82 | have hsqrt : Real.sqrt t ≤ q := by |
| 83 | nlinarith only [htq, hq.le, Real.sq_sqrt ht.le, Real.sqrt_nonneg t] |
| 84 | have htrace : 2 * N.lowerConstant * Real.sqrt t ≤ d / 8 := |
| 85 | (mul_le_mul_of_nonneg_left hsqrt (by positivity)).trans hlower |
| 86 | have hintegral : (∫ s in (0 : ℝ)..t, Q s) < min (a ^ 2) (b ^ 2) := by |
| 87 | have hdist := hnear ⟨ht.le, htT0⟩ |
| 88 | (by simpa [Real.dist_eq, abs_of_nonneg ht.le] using hteta) |
| 89 | simp only [intervalIntegral.integral_same, dist_zero_right, Real.norm_eq_abs] at hdist |
| 90 | exact (le_abs_self (∫ s in (0 : ℝ)..t, Q s)).trans_lt hdist |
| 91 | let P := (initialHeatHigh_memLp_energy lambda w ht.le).1.toLp (initialHeatHigh lambda w) |
| 92 | let Z := (N.restrict htT0).zero_memLp.toLp (fun s => N.toFun s 0) |
| 93 | have hPnormsq : ‖P‖ ^ 2 = ∫ s, ‖initialHeatHigh lambda w s‖ ^ 2 ∂timeMeasure t := |
| 94 | norm_toLp_sq (initialHeatHigh_memLp_energy lambda w ht.le).1 |
| 95 | have hZnormsq : ‖Z‖ ^ 2 = ∫ s, ‖N.toFun s 0‖ ^ 2 ∂timeMeasure t := |
| 96 | norm_toLp_sq (N.restrict htT0).zero_memLp |
| 97 | have hparts : (∫ s, ‖initialHeatHigh lambda w s‖ ^ 2 ∂timeMeasure t) + |
| 98 | (∫ s, ‖N.toFun s 0‖ ^ 2 ∂timeMeasure t) = ∫ s in (0 : ℝ)..t, Q s := by |
| 99 | have hp := (initialHeatHigh_memLp_energy lambda w ht.le).1 |
| 100 | have hz := (N.restrict htT0).zero_memLp |
| 101 | rw [intervalIntegral.integral_of_le ht.le] |
| 102 | exact (integral_add ((memLp_two_iff_integrable_sq_norm hp.aestronglyMeasurable).mp hp) |
| 103 | ((memLp_two_iff_integrable_sq_norm hz.aestronglyMeasurable).mp hz)).symm |
| 104 | have hnorms : ‖P‖ ^ 2 + ‖Z‖ ^ 2 < min (a ^ 2) (b ^ 2) := by |
| 105 | rw [hPnormsq, hZnormsq, hparts] |
| 106 | exact hintegral |
| 107 | have hPa : ‖P‖ ≤ a := |
| 108 | (sq_le_sq₀ (norm_nonneg P) ha.le).mp |
| 109 | ((le_add_of_nonneg_right (sq_nonneg ‖Z‖)).trans (lt_min_iff.mp hnorms).1.le) |
| 110 | have hZb : ‖Z‖ < b := |
| 111 | (sq_lt_sq₀ (norm_nonneg Z) hb.le).mp |
| 112 | ((le_add_of_nonneg_left (sq_nonneg ‖P‖)).trans_lt (lt_min_iff.mp hnorms).2) |
| 113 | have hPsmall : 2 * N.principalConstant * ‖P‖ ≤ d / 8 := by |
| 114 | have heq : a * (16 * (N.principalConstant + 1)) = d := div_mul_cancel₀ d (by positivity) |
| 115 | have hp := mul_le_mul_of_nonneg_left hPa N.principalConstant.coe_nonneg |
| 116 | nlinarith only [heq, hp, hPa, norm_nonneg P] |
| 117 | have hkappa : 2 * N.perturbationConstant + 8 * N.principalConstant * r + |
| 118 | 2 * N.principalConstant * ‖P‖ + 2 * N.lowerConstant * Real.sqrt t ≤ 1 - d / 2 := by |
| 119 | have hdEq : d = 1 - 2 * N.perturbationConstant := rfl |
| 120 | linarith only [hdEq, hprincipal, hPsmall, htrace] |
| 121 | refine ⟨r, hr, hrr0, t, ht, htT0, ht1, by linarith only [hkappa, hd], ?_⟩ |
| 122 | change ‖Z‖ < _ |
| 123 | dsimp only [b] at hZb |
| 124 | nlinarith only [hZb, hkappa, hr.le] |
| 125 | |
| 126 | /-- Every actual forcing fixed point in the closed radius ball has the |
| 127 | strict half-radius margin. MT2007 Claim 19.1, p. 437; strict centered |
| 128 | interval derivation, item 2. -/ |
| 129 | theorem norm_fixedPoint_lt_half [BorelSpace (State iota)] |
| 130 | (N : CenteredSpectralResidual lambda w T) (hT : 0 ≤ T) (hT1 : T ≤ 1) |
| 131 | {r : ℝ} (hr : 0 < r) |
| 132 | (hkappa : 2 * N.perturbationConstant + 8 * N.principalConstant * r + |
| 133 | 2 * N.principalConstant * |
| 134 | ‖(initialHeatHigh_memLp_energy lambda w hT).1.toLp (initialHeatHigh lambda w)‖ + |
| 135 | 2 * N.lowerConstant * Real.sqrt T < 1) |
| 136 | (hzero : ‖N.zero_memLp.toLp (fun t => N.toFun t 0)‖ < |
| 137 | (1 - (2 * N.perturbationConstant + 8 * N.principalConstant * r + |
| 138 | 2 * N.principalConstant * |
| 139 | ‖(initialHeatHigh_memLp_energy lambda w hT).1.toLp (initialHeatHigh lambda w)‖ + |
| 140 | 2 * N.lowerConstant * Real.sqrt T)) * r / 2) |
| 141 | (F : ForcingSpace iota T) (hF : ‖F‖ ≤ r) (hfixed : N.forcingResidual hT F = F) : |
| 142 | ‖F‖ < r / 2 := by |
| 143 | have hdiff := N.norm_forcingResidual_sub_le hT hT1 hr.le F 0 hF |
| 144 | (by simpa only [norm_zero] using hr.le) |
| 145 | dsimp only at hdiff |
| 146 | rw [hfixed, N.forcingResidual_zero hT, sub_zero] at hdiff |
| 147 | have htri := norm_le_norm_sub_add F (N.zero_memLp.toLp (fun t => N.toFun t 0)) |
| 148 | nlinarith only [hdiff, htri, hzero, hkappa] |
| 149 | |
| 150 | end PoincareMT.M63.CenteredSpectralResidual |