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.Analysis.Parabolic.Dirichlet.SpectralSmoothing |
| 2 | import Mathlib.Analysis.Analytic.Basic |
| 3 | import Mathlib.Analysis.SpecialFunctions.Exponential |
| 4 | |
| 5 | /-! |
| 6 | # Analyticity of the spectral heat operator |
| 7 | |
| 8 | The factorial heat-power estimate constructs an operator-valued power series |
| 9 | on a ball of radius at least the positive center time. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | noncomputable section |
| 15 | |
| 16 | namespace Poincare.Analysis.Dirichlet.Spectral |
| 17 | |
| 18 | open Set |
| 19 | open scoped Topology InnerProductSpace NNReal |
| 20 | |
| 21 | variable {ι H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℝ H] |
| 22 | [CompleteSpace H] |
| 23 | |
| 24 | private def heatSeries (b : HilbertBasis ι ℝ H) (lam : ι → ℝ≥0) (t : ℝ) : |
| 25 | FormalMultilinearSeries ℝ ℝ (H →L[ℝ] H) := |
| 26 | fun k => ContinuousMultilinearMap.mkPiRing ℝ (Fin k) |
| 27 | (((-1 : ℝ) ^ k / (k.factorial : ℝ)) • heatPower b lam k t) |
| 28 | |
| 29 | private theorem heatSeries_radius (b : HilbertBasis ι ℝ H) (lam : ι → ℝ≥0) |
| 30 | {t : ℝ} (ht : 0 < t) : |
| 31 | ENNReal.ofReal t ≤ (heatSeries b lam t).radius := by |
| 32 | let r : NNReal := ⟨t, ht.le⟩ |
| 33 | have hr : (r : ENNReal) ≤ (heatSeries b lam t).radius := by |
| 34 | apply FormalMultilinearSeries.le_radius_of_bound _ 1 |
| 35 | intro k |
| 36 | have hf : (0 : ℝ) < k.factorial := by positivity |
| 37 | have hp : 0 < t ^ k := pow_pos ht k |
| 38 | simp only [heatSeries, ContinuousMultilinearMap.norm_mkPiRing, norm_smul, |
| 39 | norm_div, norm_pow, norm_neg, norm_one, one_pow, Real.norm_of_nonneg hf.le, |
| 40 | NNReal.coe_mk] |
| 41 | calc |
| 42 | (1 / (k.factorial : ℝ) * ‖heatPower b lam k t‖) * t ^ k ≤ |
| 43 | (1 / (k.factorial : ℝ) * ((k.factorial : ℝ) / t ^ k)) * t ^ k := by |
| 44 | gcongr |
| 45 | exact norm_heatPower_le b lam k ht |
| 46 | _ = 1 := by field_simp |
| 47 | calc |
| 48 | ENNReal.ofReal t = (r : ENNReal) := by |
| 49 | rw [ENNReal.coe_nnreal_eq] |
| 50 | rfl |
| 51 | _ ≤ (heatSeries b lam t).radius := hr |
| 52 | |
| 53 | private theorem heatSeries_sum (b : HilbertBasis ι ℝ H) (lam : ι → ℝ≥0) |
| 54 | {t h : ℝ} (ht : 0 < t) (hh : ‖h‖ < t) : |
| 55 | (heatSeries b lam t).sum h = heatPower b lam 0 (t + h) := by |
| 56 | have hth : 0 < t + h := by |
| 57 | have hh' : -t < h := by |
| 58 | have hh'' : |h| < t := by simpa [Real.norm_eq_abs] using hh |
| 59 | exact (abs_lt.mp hh'').1 |
| 60 | linarith |
| 61 | have hmem : h ∈ Metric.eball 0 (heatSeries b lam t).radius := by |
| 62 | rw [Metric.mem_eball, edist_dist, dist_zero_right] |
| 63 | calc |
| 64 | ENNReal.ofReal ‖h‖ < ENNReal.ofReal t := |
| 65 | (ENNReal.ofReal_lt_ofReal_iff ht).mpr hh |
| 66 | _ = ENNReal.ofNNReal (⟨t, ht.le⟩ : NNReal) := by |
| 67 | symm |
| 68 | exact ENNReal.coe_nnreal_eq _ |
| 69 | _ ≤ (heatSeries b lam t).radius := by |
| 70 | have hr := heatSeries_radius b lam ht |
| 71 | exact (ENNReal.coe_nnreal_eq (⟨t, ht.le⟩ : NNReal)).symm ▸ hr |
| 72 | have hs := (heatSeries b lam t).hasSum hmem |
| 73 | ext u |
| 74 | apply b.repr.injective |
| 75 | ext i |
| 76 | let L : (H →L[ℝ] H) →L[ℝ] ℝ := |
| 77 | (innerSL ℝ (b i)).comp ((ContinuousLinearMap.apply ℝ H) u) |
| 78 | have hcoord := L.hasSum hs |
| 79 | have hexp := (NormedSpace.expSeries_div_hasSum_exp (-(lam i : ℝ) * h)).mul_right |
| 80 | (Real.exp (-(lam i : ℝ) * t) * b.repr u i) |
| 81 | rw [← Real.exp_eq_exp_ℝ] at hexp |
| 82 | have hterms : (fun k => L ((heatSeries b lam t k) (fun _ => h))) = |
| 83 | (fun k => (-(lam i : ℝ) * h) ^ k / (k.factorial : ℝ) * |
| 84 | (Real.exp (-(lam i : ℝ) * t) * b.repr u i)) := by |
| 85 | funext k |
| 86 | simp only [heatSeries, ContinuousMultilinearMap.mkPiRing_apply, |
| 87 | Finset.prod_const, Finset.card_univ, Fintype.card_fin, map_smul, |
| 88 | smul_eq_mul] |
| 89 | change h ^ k * ((-1 : ℝ) ^ k / (k.factorial : ℝ) * |
| 90 | inner ℝ (b i) (heatPower b lam k t u)) = _ |
| 91 | rw [← b.repr_apply_apply, heatPower_repr b lam k ht] |
| 92 | rw [show -(lam i : ℝ) * h = (-1 : ℝ) * (lam i : ℝ) * h by ring, |
| 93 | mul_pow, mul_pow] |
| 94 | ring |
| 95 | rw [hterms] at hcoord |
| 96 | have heq := hcoord.unique hexp |
| 97 | change inner ℝ (b i) ((heatSeries b lam t).sum h u) = _ at heq |
| 98 | rw [← b.repr_apply_apply] at heq |
| 99 | rw [heq, heatPower_repr b lam 0 hth, pow_zero, one_mul] |
| 100 | rw [show -(lam i : ℝ) * (t + h) = -(lam i : ℝ) * h + -(lam i : ℝ) * t by ring, |
| 101 | Real.exp_add] |
| 102 | ring |
| 103 | |
| 104 | /-- Positive-time heat is analytic in operator norm for arbitrary nonnegative rates. -/ |
| 105 | theorem analyticOnNhd_heatPower_zero (b : HilbertBasis ι ℝ H) |
| 106 | (lam : ι → ℝ≥0) : |
| 107 | AnalyticOnNhd ℝ (fun t : ℝ => heatPower b lam 0 t) (Ioi 0) := by |
| 108 | intro t ht |
| 109 | have ht' : 0 < t := ht |
| 110 | have hp : HasFPowerSeriesOnBall (fun s => heatPower b lam 0 s) |
| 111 | (heatSeries b lam t) t (ENNReal.ofReal t) := by |
| 112 | refine ⟨by simpa using heatSeries_radius b lam ht', ENNReal.ofReal_pos.mpr ht', ?_⟩ |
| 113 | intro h hh |
| 114 | have hh' : ‖h‖ < t := by |
| 115 | rw [Metric.mem_eball, edist_dist, dist_zero_right] at hh |
| 116 | exact (ENNReal.ofReal_lt_ofReal_iff ht').mp (by simpa using hh) |
| 117 | rw [← heatSeries_sum b lam ht hh'] |
| 118 | exact (heatSeries b lam t).hasSum |
| 119 | (show h ∈ Metric.eball 0 (heatSeries b lam t).radius from by |
| 120 | rw [Metric.mem_eball, edist_dist, dist_zero_right] |
| 121 | exact lt_of_lt_of_le ((ENNReal.ofReal_lt_ofReal_iff ht').mpr hh') |
| 122 | (heatSeries_radius b lam ht')) |
| 123 | exact hp.analyticAt |
| 124 | |
| 125 | theorem heat_injective (b : HilbertBasis ι ℝ H) (lam : ι → ℝ≥0) (t : ℝ≥0) : |
| 126 | Function.Injective (heat b lam t) := by |
| 127 | intro u v huv |
| 128 | apply b.repr.injective |
| 129 | ext i |
| 130 | have hi := congrArg (fun z => b.repr z i) huv |
| 131 | rw [heat_repr, heat_repr] at hi |
| 132 | exact (mul_left_cancel₀ (ne_of_gt (coefficient_pos lam t i)) hi) |
| 133 | |
| 134 | end Poincare.Analysis.Dirichlet.Spectral |