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.Centered.SpectralResponse |
| 2 | |
| 3 | /-! |
| 4 | # The actual closed trace of the initial spectral response |
| 5 | |
| 6 | M03's continuous shifted trace adds to the initial heat path in the |
| 7 | trace space itself. MT2007 Claim 19.1, p. 437; contract review block 8 |
| 8 | and `2026-09-21-uncut-centered-response.md`, statements 1-2. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open Set Filter MeasureTheory |
| 14 | |
| 15 | namespace PoincareMT.M63 |
| 16 | |
| 17 | open SpectralHeatNative QuasilinearDeTurckNative |
| 18 | |
| 19 | variable {iota : Type*} [Countable iota] (lambda : iota → NNReal) |
| 20 | (w : State iota) {T : ℝ} |
| 21 | |
| 22 | /-- The initial heat path plus the actual continuous response trace, |
| 23 | defined on the entire closed time interval. MT2007 Claim 19.1, p. 437; |
| 24 | uncut centered response derivation, item 1. -/ |
| 25 | noncomputable def initialResponseTrace (hT : 0 ≤ T) (F : ForcingSpace iota T) : |
| 26 | ResponsePath iota T where |
| 27 | toFun t := heat lambda (t : ℝ).toNNReal w + shiftedTracePath hT lambda F t |
| 28 | continuous_toFun := |
| 29 | ((continuous_heat_apply lambda w).comp |
| 30 | (continuous_real_toNNReal.comp continuous_subtype_val)).add |
| 31 | (shiftedTracePath hT lambda F).continuous |
| 32 | |
| 33 | /-- The closed trace retains the exact initial data, base response, |
| 34 | uniform deviation bound and common-a.e. high-state identity. MT2007 |
| 35 | Claim 19.1, p. 437; uncut centered response derivation, item 2. -/ |
| 36 | theorem initialResponseTrace_spec (hT : 0 ≤ T) (F : ForcingSpace iota T) : |
| 37 | initialResponseTrace lambda w hT F ⟨0, le_rfl, hT⟩ = w ∧ |
| 38 | (∀ t : Icc (0 : ℝ) T, |
| 39 | shiftedBaseMultiplier lambda (initialResponseTrace lambda w hT F t) = |
| 40 | heat lambda (t : ℝ).toNNReal (shiftedBaseMultiplier lambda w) + |
| 41 | responseState lambda F t) ∧ |
| 42 | (∀ t : Icc (0 : ℝ) T, |
| 43 | ‖initialResponseTrace lambda w hT F t - heat lambda (t : ℝ).toNNReal w‖ ≤ |
| 44 | (Real.sqrt T + 1) * ‖F‖) ∧ |
| 45 | ∀ᵐ t ∂timeMeasure T, ∀ ht : t ∈ Icc (0 : ℝ) T, |
| 46 | shiftedBaseMultiplier lambda |
| 47 | (initialHeatHigh lambda w t + shiftedHighOperator hT lambda F t) = |
| 48 | initialResponseTrace lambda w hT F ⟨t, ht⟩ := by |
| 49 | have hzero : shiftedTracePath hT lambda F ⟨0, le_rfl, hT⟩ = 0 := by |
| 50 | apply lp.ext |
| 51 | funext i |
| 52 | rw [shiftedTracePath_coeff] |
| 53 | simp only [responseState_zero, lp.coeFn_zero, Pi.zero_apply, mul_zero] |
| 54 | have hcomm (t : NNReal) : |
| 55 | shiftedBaseMultiplier lambda (heat lambda t w) = |
| 56 | heat lambda t (shiftedBaseMultiplier lambda w) := by |
| 57 | apply lp.ext |
| 58 | funext i |
| 59 | simp only [shiftedBaseMultiplier, multiplier_apply, heat_apply] |
| 60 | ring |
| 61 | have htrace (t : Icc (0 : ℝ) T) : |
| 62 | shiftedBaseMultiplier lambda (shiftedTracePath hT lambda F t) = |
| 63 | responseState lambda F t := by |
| 64 | apply lp.ext |
| 65 | funext i |
| 66 | change 1 / Real.sqrt (1 + (lambda i : ℝ)) * shiftedTracePath hT lambda F t i = _ |
| 67 | rw [shiftedTracePath_coeff, one_div, ← mul_assoc, |
| 68 | inv_mul_cancel₀ (Real.sqrt_pos.mpr (by positivity : 0 < 1 + (lambda i : ℝ))).ne', one_mul] |
| 69 | refine ⟨?_, ?_, ?_, ?_⟩ |
| 70 | · change heat lambda (0 : ℝ).toNNReal w + shiftedTracePath hT lambda F ⟨0, le_rfl, hT⟩ = w |
| 71 | simp only [hzero, Real.toNNReal_zero, heat_zero, ContinuousLinearMap.id_apply, add_zero] |
| 72 | · intro t |
| 73 | change shiftedBaseMultiplier lambda |
| 74 | (heat lambda (t : ℝ).toNNReal w + shiftedTracePath hT lambda F t) = _ |
| 75 | rw [map_add, hcomm, htrace] |
| 76 | · intro t |
| 77 | change ‖heat lambda (t : ℝ).toNNReal w + shiftedTracePath hT lambda F t - |
| 78 | heat lambda (t : ℝ).toNNReal w‖ ≤ _ |
| 79 | rw [add_sub_cancel_left] |
| 80 | exact ((shiftedTracePath hT lambda F).norm_coe_le_norm t).trans |
| 81 | (norm_shiftedTracePath_le hT lambda F) |
| 82 | · filter_upwards [intermediate_high_eq_trace hT lambda F, |
| 83 | ae_restrict_mem measurableSet_Ioc] with t ht hmem |
| 84 | intro htmem |
| 85 | change shiftedBaseMultiplier lambda |
| 86 | (initialHeatHigh lambda w t + shiftedHighOperator hT lambda F t) = |
| 87 | heat lambda t.toNNReal w + shiftedTracePath hT lambda F ⟨t, htmem⟩ |
| 88 | rw [map_add, (initialHeatHigh_trace lambda w hmem.1).1, ht htmem] |
| 89 | |
| 90 | end PoincareMT.M63 |