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.Initial.SpectralTrace |
| 2 | import PoincareLib.Geometry.CurveShortening.Ramp.LocalFlow.Time.DependentSpectralResidual |
| 3 | |
| 4 | /-! |
| 5 | # Actual sources centered at the initial heat path |
| 6 | |
| 7 | The mixed estimate uses deviations in its first trace factor and the |
| 8 | actual full high state in its second. This avoids a fixed initial-norm |
| 9 | smallness condition. MT2007 Claim 19.1, p. 437; contract review block 8 |
| 10 | and `2026-09-21-centered-spectral-residual.md`, statements 1-7. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter MeasureTheory |
| 16 | open scoped Topology ENNReal |
| 17 | |
| 18 | namespace PoincareMT.M63 |
| 19 | |
| 20 | open SpectralHeatNative QuasilinearDeTurckNative |
| 21 | |
| 22 | variable {iota : Type*} [Countable iota] |
| 23 | [MeasurableSpace (State iota)] [BorelSpace (State iota)] |
| 24 | |
| 25 | /-- An actual source evaluated at deviations from the fixed initial |
| 26 | heat path, with a common all-pairs mixed estimate. MT2007 Claim 19.1, |
| 27 | p. 437; centered spectral-residual derivation, statement 1. The stronger |
| 28 | centered estimate is an explicit supplier obligation. -/ |
| 29 | structure CenteredSpectralResidual (lambda : iota → NNReal) (w : State iota) (T : ℝ) where |
| 30 | /-- The actual source at high-state deviation x. -/ |
| 31 | toFun : ℝ → State iota → State iota |
| 32 | /-- Joint measurability in the actual state Borel topology. -/ |
| 33 | measurable : Measurable (Function.uncurry toFun) |
| 34 | /-- The actual centered source at zero is time square integrable. -/ |
| 35 | zero_memLp : MemLp (fun t => toFun t 0) 2 (timeMeasure T) |
| 36 | /-- Size of the fixed principal perturbation. -/ |
| 37 | perturbationConstant : NNReal |
| 38 | /-- Constant for variation of the principal coefficient. -/ |
| 39 | principalConstant : NNReal |
| 40 | /-- Constant for the lower trace term. -/ |
| 41 | lowerConstant : NNReal |
| 42 | /-- One full-measure time set controls every pair of deviations. -/ |
| 43 | mixed : ∀ᵐ t ∂timeMeasure T, ∀ x y, |
| 44 | ‖toFun t x - toFun t y‖ ≤ (perturbationConstant : ℝ) * ‖x - y‖ + |
| 45 | (principalConstant : ℝ) * |
| 46 | (max ‖shiftedBaseMultiplier lambda x‖ ‖shiftedBaseMultiplier lambda y‖ * ‖x - y‖ + |
| 47 | ‖shiftedBaseMultiplier lambda (x - y)‖ * ‖initialHeatHigh lambda w t + y‖) + |
| 48 | (lowerConstant : ℝ) * ‖shiftedBaseMultiplier lambda (x - y)‖ |
| 49 | |
| 50 | namespace CenteredSpectralResidual |
| 51 | |
| 52 | variable {lambda : iota → NNReal} {w : State iota} {T : ℝ} |
| 53 | (N : CenteredSpectralResidual lambda w T) |
| 54 | |
| 55 | omit [BorelSpace (State iota)] in |
| 56 | /-- The actual centered growth bound retains the initial high path |
| 57 | only in an integrable term. MT2007 Claim 19.1, p. 437; centered |
| 58 | spectral-residual derivation, statement 2. -/ |
| 59 | theorem ae_norm_le : ∀ᵐ t ∂timeMeasure T, ∀ x, |
| 60 | ‖N.toFun t x‖ ≤ |
| 61 | ((N.perturbationConstant : ℝ) + N.principalConstant * ‖shiftedBaseMultiplier lambda x‖ + |
| 62 | N.lowerConstant) * ‖x‖ + |
| 63 | (N.principalConstant : ℝ) * ‖shiftedBaseMultiplier lambda x‖ * |
| 64 | ‖initialHeatHigh lambda w t‖ + ‖N.toFun t 0‖ := by |
| 65 | filter_upwards [N.mixed] with t ht |
| 66 | intro x |
| 67 | have h := ht x 0 |
| 68 | simp only [map_zero, norm_zero, max_eq_left (norm_nonneg _), sub_zero, add_zero] at h |
| 69 | have hJ := mul_le_mul_of_nonneg_left (norm_shiftedBaseMultiplier_le lambda x) |
| 70 | N.lowerConstant.coe_nonneg |
| 71 | calc |
| 72 | _ ≤ ‖N.toFun t x - N.toFun t 0‖ + ‖N.toFun t 0‖ := norm_le_norm_sub_add _ _ |
| 73 | _ ≤ _ := by nlinarith |
| 74 | |
| 75 | /-- Evaluating the centered source on M03's actual high response is |
| 76 | time square integrable for every forcing. MT2007 Claim 19.1, p. 437; |
| 77 | centered spectral-residual derivation, statement 3. -/ |
| 78 | theorem memLp_response_source (hT : 0 ≤ T) (F : ForcingSpace iota T) : |
| 79 | MemLp (fun t => N.toFun t (shiftedHighOperator hT lambda F t)) 2 (timeMeasure T) := by |
| 80 | let H := shiftedHighOperator hT lambda F |
| 81 | let K : ℝ := (Real.sqrt T + 1) * ‖F‖ |
| 82 | let C : ℝ := N.perturbationConstant + N.principalConstant * K + N.lowerConstant |
| 83 | have hK : 0 ≤ K := by dsimp [K]; positivity |
| 84 | have hC : 0 ≤ C := by dsimp [C]; positivity |
| 85 | have hmeas : AEMeasurable (fun t => N.toFun t (H t)) (timeMeasure T) := |
| 86 | N.measurable.comp_aemeasurable |
| 87 | (measurable_id.aemeasurable.prodMk (Lp.memLp H).aestronglyMeasurable.aemeasurable) |
| 88 | have hcoords (i : iota) : |
| 89 | AEStronglyMeasurable (fun t => N.toFun t (H t) i) (timeMeasure T) := |
| 90 | ((lp.evalCLM ℝ (fun _ : iota => ℝ) 2 i).continuous.measurable.comp_aemeasurable |
| 91 | hmeas).aestronglyMeasurable |
| 92 | have hsm := aestronglyMeasurable_stateOfCoeffs hcoords |
| 93 | (Eventually.of_forall (fun t => lp.memℓp (N.toFun t (H t)))) |
| 94 | have heq : (fun t => stateOfCoeffs (fun i => N.toFun t (H t) i)) = |
| 95 | (fun t => N.toFun t (H t)) := by |
| 96 | funext t |
| 97 | apply lp.ext |
| 98 | funext i |
| 99 | exact stateOfCoeffs_apply (lp.memℓp (N.toFun t (H t))) i |
| 100 | rw [heq] at hsm |
| 101 | have hmajor : MemLp (fun t => C * ‖H t‖ + |
| 102 | (N.principalConstant : ℝ) * K * ‖initialHeatHigh lambda w t‖ + ‖N.toFun t 0‖) |
| 103 | 2 (timeMeasure T) := |
| 104 | (((Lp.memLp H).norm.const_mul C).add |
| 105 | ((initialHeatHigh_memLp_energy lambda w hT).1.norm.const_mul |
| 106 | ((N.principalConstant : ℝ) * K))).add N.zero_memLp.norm |
| 107 | apply hmajor.of_le hsm |
| 108 | filter_upwards [N.ae_norm_le, intermediate_high_bound_general hT lambda F] with t hN ht |
| 109 | rw [Real.norm_eq_abs, abs_of_nonneg (by positivity)] |
| 110 | apply (hN (H t)).trans |
| 111 | apply add_le_add _ le_rfl |
| 112 | apply add_le_add |
| 113 | · apply mul_le_mul_of_nonneg_right _ (norm_nonneg _) |
| 114 | exact add_le_add (add_le_add le_rfl |
| 115 | (mul_le_mul_of_nonneg_left ht N.principalConstant.coe_nonneg)) le_rfl |
| 116 | · exact mul_le_mul_of_nonneg_right |
| 117 | (mul_le_mul_of_nonneg_left ht N.principalConstant.coe_nonneg) (norm_nonneg _) |
| 118 | |
| 119 | /-- The forcing operator is the actual centered source evaluated at |
| 120 | the actual high response. MT2007 Claim 19.1, p. 437; centered |
| 121 | spectral-residual derivation, statement 4. -/ |
| 122 | noncomputable def forcingResidual (hT : 0 ≤ T) (F : ForcingSpace iota T) : |
| 123 | ForcingSpace iota T := |
| 124 | (N.memLp_response_source hT F).toLp (fun t => N.toFun t (shiftedHighOperator hT lambda F t)) |
| 125 | |
| 126 | /-- The centered forcing operator retains its exact a.e. source. |
| 127 | MT2007 Claim 19.1, p. 437; centered spectral-residual derivation, statement 5. -/ |
| 128 | theorem forcingResidual_coe (hT : 0 ≤ T) (F : ForcingSpace iota T) : |
| 129 | N.forcingResidual hT F =ᵐ[timeMeasure T] |
| 130 | fun t => N.toFun t (shiftedHighOperator hT lambda F t) := |
| 131 | (N.memLp_response_source hT F).coeFn_toLp |
| 132 | |
| 133 | /-- Zero forcing gives exactly the actual centered zero source. |
| 134 | MT2007 Claim 19.1, p. 437; centered spectral-residual derivation, statement 6. -/ |
| 135 | theorem forcingResidual_zero (hT : 0 ≤ T) : |
| 136 | N.forcingResidual hT 0 = N.zero_memLp.toLp (fun t => N.toFun t 0) := by |
| 137 | apply Lp.ext |
| 138 | have h := N.forcingResidual_coe hT 0 |
| 139 | simp only [map_zero] at h |
| 140 | filter_upwards [h, N.zero_memLp.coeFn_toLp, |
| 141 | Lp.coeFn_zero (State iota) 2 (timeMeasure T)] with t ht hzero hz |
| 142 | simp only [ht, hzero, hz, Pi.zero_apply] |
| 143 | |
| 144 | /-- The centered forcing estimate uses the initial path's shrinking |
| 145 | time-L2 norm, with no fixed initial-norm term. MT2007 Claim 19.1, |
| 146 | p. 437; centered spectral-residual derivation, statement 7. -/ |
| 147 | theorem norm_forcingResidual_sub_le (hT : 0 ≤ T) (hT1 : T ≤ 1) |
| 148 | {r : ℝ} (hr : 0 ≤ r) (F G : ForcingSpace iota T) |
| 149 | (hF : ‖F‖ ≤ r) (hG : ‖G‖ ≤ r) : |
| 150 | let P := (initialHeatHigh_memLp_energy lambda w hT).1.toLp (initialHeatHigh lambda w) |
| 151 | ‖N.forcingResidual hT F - N.forcingResidual hT G‖ ≤ |
| 152 | (2 * N.perturbationConstant + 8 * N.principalConstant * r + |
| 153 | 2 * N.principalConstant * ‖P‖ + 2 * N.lowerConstant * Real.sqrt T) * ‖F - G‖ := by |
| 154 | let P := (initialHeatHigh_memLp_energy lambda w hT).1.toLp (initialHeatHigh lambda w) |
| 155 | let H := shiftedHighOperator hT lambda |
| 156 | let J := (shiftedBaseMultiplier lambda).compLpL 2 (timeMeasure T) |
| 157 | have hb (U : ForcingSpace iota T) (hU : ‖U‖ ≤ r) : |
| 158 | ∀ᵐ t ∂timeMeasure T, ‖shiftedBaseMultiplier lambda (H U t)‖ ≤ 2 * r := |
| 159 | (intermediate_high_bound hT hT1 lambda U).mono |
| 160 | (fun _ ht => ht.trans (mul_le_mul_of_nonneg_left hU (by norm_num))) |
| 161 | have hmain : ‖N.forcingResidual hT F - N.forcingResidual hT G‖ ≤ |
| 162 | ((N.perturbationConstant : ℝ) + N.principalConstant * (2 * r)) * ‖H (F - G)‖ + |
| 163 | (N.principalConstant : ℝ) * (2 * ‖F - G‖) * ‖P + H G‖ + |
| 164 | (N.lowerConstant : ℝ) * ‖J (H (F - G))‖ := by |
| 165 | apply norm_le_mixed _ _ _ _ (by positivity) (by positivity) N.lowerConstant.coe_nonneg |
| 166 | filter_upwards [N.forcingResidual_coe hT F, N.forcingResidual_coe hT G, |
| 167 | Lp.coeFn_sub (N.forcingResidual hT F) (N.forcingResidual hT G), |
| 168 | Lp.coeFn_sub (H F) (H G), (shiftedBaseMultiplier lambda).coeFn_compLpL (H (F - G)), |
| 169 | hb F hF, hb G hG, intermediate_high_bound hT hT1 lambda (F - G), N.mixed, |
| 170 | (initialHeatHigh_memLp_energy lambda w hT).1.coeFn_toLp, Lp.coeFn_add P (H G)] |
| 171 | with t hNF hNG hsubN hsubH hJ hFt hGt hdiff hN hP hadd |
| 172 | have hHt : H (F - G) t = H F t - H G t := by rw [map_sub, hsubH, Pi.sub_apply] |
| 173 | have hPGt : (P + H G) t = initialHeatHigh lambda w t + H G t := by |
| 174 | rw [hadd, Pi.add_apply, hP] |
| 175 | rw [hsubN, Pi.sub_apply, hNF, hNG] |
| 176 | change ‖N.toFun t (H F t) - N.toFun t (H G t)‖ ≤ _ |
| 177 | have h := hN (H F t) (H G t) |
| 178 | rw [hHt] at hdiff |
| 179 | have htop := mul_le_mul_of_nonneg_right (max_le hFt hGt) (norm_nonneg (H F t - H G t)) |
| 180 | have hcross := mul_le_mul_of_nonneg_right hdiff |
| 181 | (norm_nonneg (initialHeatHigh lambda w t + H G t)) |
| 182 | apply h.trans |
| 183 | change _ ≤ _ + (N.principalConstant : ℝ) * (2 * ‖F - G‖) * ‖(P + H G) t‖ + |
| 184 | (N.lowerConstant : ℝ) * ‖J (H (F - G)) t‖ |
| 185 | rw [hPGt, hJ, hHt] |
| 186 | nlinarith [mul_le_mul_of_nonneg_left (add_le_add htop hcross) |
| 187 | N.principalConstant.coe_nonneg] |
| 188 | have hhigh : ‖H (F - G)‖ ≤ 2 * ‖F - G‖ := |
| 189 | (H.le_opNorm _).trans |
| 190 | (mul_le_mul_of_nonneg_right ((norm_shiftedHighOperator_le hT lambda).trans |
| 191 | (by linarith)) (norm_nonneg _)) |
| 192 | have hGhigh : ‖P + H G‖ ≤ ‖P‖ + 2 * r := by |
| 193 | apply (norm_add_le _ _).trans |
| 194 | apply add_le_add le_rfl |
| 195 | exact ((H.le_opNorm G).trans (mul_le_mul_of_nonneg_right |
| 196 | ((norm_shiftedHighOperator_le hT lambda).trans (by linarith)) (norm_nonneg _))).trans |
| 197 | (mul_le_mul_of_nonneg_left hG (by norm_num)) |
| 198 | calc |
| 199 | _ ≤ ((N.perturbationConstant : ℝ) + N.principalConstant * (2 * r)) * ‖H (F - G)‖ + |
| 200 | (N.principalConstant : ℝ) * (2 * ‖F - G‖) * ‖P + H G‖ + |
| 201 | (N.lowerConstant : ℝ) * ‖J (H (F - G))‖ := hmain |
| 202 | _ ≤ ((N.perturbationConstant : ℝ) + N.principalConstant * (2 * r)) * |
| 203 | (2 * ‖F - G‖) + |
| 204 | (N.principalConstant : ℝ) * (2 * ‖F - G‖) * (‖P‖ + 2 * r) + |
| 205 | (N.lowerConstant : ℝ) * (2 * Real.sqrt T * ‖F - G‖) := |
| 206 | add_le_add (add_le_add (mul_le_mul_of_nonneg_left hhigh (by positivity)) |
| 207 | (mul_le_mul_of_nonneg_left hGhigh (by positivity))) |
| 208 | (mul_le_mul_of_nonneg_left (norm_intermediate_high_le hT hT1 lambda (F - G)) |
| 209 | N.lowerConstant.coe_nonneg) |
| 210 | _ = _ := by ring |
| 211 | |
| 212 | end CenteredSpectralResidual |
| 213 | end PoincareMT.M63 |