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 Mathlib.Analysis.InnerProductSpace.l2Space |
| 2 | import Mathlib.Analysis.InnerProductSpace.Adjoint |
| 3 | import Mathlib.Analysis.SpecialFunctions.Exp |
| 4 | import Mathlib.Analysis.Normed.Group.Tannery |
| 5 | |
| 6 | /-! |
| 7 | # Heat semigroups in Hilbert coordinates |
| 8 | |
| 9 | Multiplication by the bounded coefficients `exp (-lam * t)` constructs the |
| 10 | semigroup. Dominated convergence for squared coordinates proves strong |
| 11 | continuity, including at zero. The index type need not be countable. |
| 12 | |
| 13 | The construction follows Chow--Liao--Qin, |
| 14 | `Analysis/Heat/Semigroup/Defs.lean`, revision |
| 15 | `1b535dd102b94cc42b107cca27059687888f08b3` (Apache-2.0). |
| 16 | -/ |
| 17 | |
| 18 | set_option autoImplicit false |
| 19 | |
| 20 | noncomputable section |
| 21 | |
| 22 | namespace Poincare.Analysis.Dirichlet.Spectral |
| 23 | |
| 24 | open Filter |
| 25 | open scoped Topology InnerProductSpace NNReal |
| 26 | |
| 27 | variable {ι H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℝ H] |
| 28 | |
| 29 | def coefficient (lam : ι → ℝ≥0) (t : ℝ≥0) (i : ι) : ℝ := |
| 30 | Real.exp (-(lam i : ℝ) * (t : ℝ)) |
| 31 | |
| 32 | theorem coefficient_pos (lam : ι → ℝ≥0) (t : ℝ≥0) (i : ι) : |
| 33 | 0 < coefficient lam t i := Real.exp_pos _ |
| 34 | |
| 35 | theorem coefficient_le_one (lam : ι → ℝ≥0) (t : ℝ≥0) (i : ι) : |
| 36 | coefficient lam t i ≤ 1 := by |
| 37 | apply Real.exp_le_one_iff.mpr |
| 38 | exact mul_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr (lam i).coe_nonneg) t.coe_nonneg |
| 39 | |
| 40 | theorem norm_coefficient_mul_le (lam : ι → ℝ≥0) (t : ℝ≥0) (i : ι) (r : ℝ) : |
| 41 | ‖coefficient lam t i * r‖ ≤ ‖r‖ := by |
| 42 | rw [norm_mul, Real.norm_of_nonneg (coefficient_pos lam t i).le] |
| 43 | exact mul_le_of_le_one_left (norm_nonneg _) (coefficient_le_one lam t i) |
| 44 | |
| 45 | /-- The diagonal heat multiplier on square-summable coefficient families. -/ |
| 46 | def multiplier (lam : ι → ℝ≥0) (t : ℝ≥0) : |
| 47 | lp (fun _ : ι => ℝ) 2 →L[ℝ] lp (fun _ : ι => ℝ) 2 := |
| 48 | LinearMap.mkContinuous |
| 49 | { toFun := fun x => ⟨fun i => coefficient lam t i * x i, |
| 50 | x.property.mono' (fun i => norm_coefficient_mul_le lam t i (x i))⟩ |
| 51 | map_add' := by |
| 52 | intro x y |
| 53 | ext i |
| 54 | change coefficient lam t i * (x i + y i) = |
| 55 | coefficient lam t i * x i + coefficient lam t i * y i |
| 56 | ring |
| 57 | map_smul' := by |
| 58 | intro r x |
| 59 | ext i |
| 60 | change coefficient lam t i * (r * x i) = r * (coefficient lam t i * x i) |
| 61 | ring } |
| 62 | 1 (fun x => by |
| 63 | simpa using lp.norm_mono (p := 2) (by norm_num) |
| 64 | (fun i => norm_coefficient_mul_le lam t i (x i))) |
| 65 | |
| 66 | @[simp] theorem multiplier_apply (lam : ι → ℝ≥0) (t : ℝ≥0) |
| 67 | (x : lp (fun _ : ι => ℝ) 2) (i : ι) : |
| 68 | multiplier lam t x i = coefficient lam t i * x i := rfl |
| 69 | |
| 70 | /-- Conjugate the heat multiplier by the Hilbert coordinate isometry. -/ |
| 71 | def heat (b : HilbertBasis ι ℝ H) (lam : ι → ℝ≥0) (t : ℝ≥0) : H →L[ℝ] H := |
| 72 | b.repr.symm.toContinuousLinearEquiv.toContinuousLinearMap.comp |
| 73 | ((multiplier lam t).comp b.repr.toContinuousLinearEquiv.toContinuousLinearMap) |
| 74 | |
| 75 | theorem heat_repr (b : HilbertBasis ι ℝ H) (lam : ι → ℝ≥0) (t : ℝ≥0) |
| 76 | (u : H) (i : ι) : |
| 77 | b.repr (heat b lam t u) i = Real.exp (-(lam i : ℝ) * (t : ℝ)) * b.repr u i := by |
| 78 | change b.repr (b.repr.symm (multiplier lam t (b.repr u))) i = _ |
| 79 | rw [b.repr.apply_symm_apply] |
| 80 | rfl |
| 81 | |
| 82 | theorem heat_hasSum (b : HilbertBasis ι ℝ H) (lam : ι → ℝ≥0) (t : ℝ≥0) (u : H) : |
| 83 | HasSum (fun i => (Real.exp (-(lam i : ℝ) * (t : ℝ)) * b.repr u i) • b i) |
| 84 | (heat b lam t u) := by |
| 85 | simpa only [heat_repr] using b.hasSum_repr (heat b lam t u) |
| 86 | |
| 87 | theorem norm_heat_apply_le (b : HilbertBasis ι ℝ H) (lam : ι → ℝ≥0) (t : ℝ≥0) |
| 88 | (u : H) : ‖heat b lam t u‖ ≤ ‖u‖ := by |
| 89 | rw [← b.repr.norm_map (heat b lam t u), ← b.repr.norm_map u] |
| 90 | apply lp.norm_mono (by norm_num) |
| 91 | intro i |
| 92 | rw [heat_repr] |
| 93 | exact norm_coefficient_mul_le lam t i _ |
| 94 | |
| 95 | theorem norm_heat_le (b : HilbertBasis ι ℝ H) (lam : ι → ℝ≥0) (t : ℝ≥0) : |
| 96 | ‖heat b lam t‖ ≤ 1 := |
| 97 | (heat b lam t).opNorm_le_bound zero_le_one (fun u => by |
| 98 | simpa using norm_heat_apply_le b lam t u) |
| 99 | |
| 100 | @[simp] theorem heat_zero (b : HilbertBasis ι ℝ H) (lam : ι → ℝ≥0) : |
| 101 | heat b lam 0 = ContinuousLinearMap.id ℝ H := by |
| 102 | ext u |
| 103 | apply b.repr.injective |
| 104 | ext i |
| 105 | simp [heat_repr] |
| 106 | |
| 107 | theorem heat_add (b : HilbertBasis ι ℝ H) (lam : ι → ℝ≥0) (s t : ℝ≥0) : |
| 108 | heat b lam (s + t) = (heat b lam s).comp (heat b lam t) := by |
| 109 | ext u |
| 110 | apply b.repr.injective |
| 111 | ext i |
| 112 | simp only [ContinuousLinearMap.comp_apply, heat_repr, NNReal.coe_add, |
| 113 | mul_add, Real.exp_add, mul_assoc] |
| 114 | |
| 115 | theorem heat_isSelfAdjoint [CompleteSpace H] |
| 116 | (b : HilbertBasis ι ℝ H) (lam : ι → ℝ≥0) (t : ℝ≥0) : |
| 117 | IsSelfAdjoint (heat b lam t) := by |
| 118 | rw [ContinuousLinearMap.isSelfAdjoint_iff_isSymmetric] |
| 119 | intro u v |
| 120 | change ⟪heat b lam t u, v⟫_ℝ = ⟪u, heat b lam t v⟫_ℝ |
| 121 | rw [← b.repr.inner_map_map (heat b lam t u) v, |
| 122 | ← b.repr.inner_map_map u (heat b lam t v), lp.inner_eq_tsum, lp.inner_eq_tsum] |
| 123 | apply tsum_congr |
| 124 | intro i |
| 125 | simp only [heat_repr, RCLike.inner_apply, conj_trivial] |
| 126 | ring |
| 127 | |
| 128 | theorem norm_sq_eq_tsum (b : HilbertBasis ι ℝ H) (u : H) : |
| 129 | ‖u‖ ^ 2 = ∑' i, (b.repr u i) ^ 2 := by |
| 130 | rw [← real_inner_self_eq_norm_sq, ← b.repr.inner_map_map u u, lp.inner_eq_tsum] |
| 131 | apply tsum_congr |
| 132 | intro i |
| 133 | simp [pow_two] |
| 134 | |
| 135 | theorem summable_repr_sq (b : HilbertBasis ι ℝ H) (u : H) : |
| 136 | Summable (fun i => (b.repr u i) ^ 2) := by |
| 137 | simpa [pow_two] using (lp.hasSum_inner (𝕜 := ℝ) (b.repr u) (b.repr u)).summable |
| 138 | |
| 139 | private theorem coefficient_sub_sq_le (lam : ι → ℝ≥0) (s t : ℝ≥0) (i : ι) : |
| 140 | (coefficient lam s i - coefficient lam t i) ^ 2 ≤ 1 := by |
| 141 | have hs := coefficient_pos lam s i |
| 142 | have ht := coefficient_pos lam t i |
| 143 | have hs' := coefficient_le_one lam s i |
| 144 | have ht' := coefficient_le_one lam t i |
| 145 | nlinarith [sq_nonneg (coefficient lam s i), sq_nonneg (coefficient lam t i)] |
| 146 | |
| 147 | theorem continuous_heat (b : HilbertBasis ι ℝ H) (lam : ι → ℝ≥0) (u : H) : |
| 148 | Continuous (fun t : ℝ≥0 => heat b lam t u) := by |
| 149 | apply continuous_iff_continuousAt.mpr |
| 150 | intro t |
| 151 | have hsum : Tendsto |
| 152 | (fun s : ℝ≥0 => ∑' i, |
| 153 | ((coefficient lam s i - coefficient lam t i) * b.repr u i) ^ 2) |
| 154 | (𝓝 t) (𝓝 0) := by |
| 155 | have h := tendsto_tsum_of_dominated_convergence |
| 156 | (summable_repr_sq b u) (𝓕 := 𝓝 t) |
| 157 | (f := fun s i => ((coefficient lam s i - coefficient lam t i) * b.repr u i) ^ 2) |
| 158 | (g := fun _ : ι => (0 : ℝ)) ?_ ?_ |
| 159 | · simpa using h |
| 160 | · intro i |
| 161 | have hc : Continuous (fun s : ℝ≥0 => coefficient lam s i) := by |
| 162 | unfold coefficient |
| 163 | fun_prop |
| 164 | convert (((hc.continuousAt.tendsto.sub_const (coefficient lam t i)).mul_const |
| 165 | (b.repr u i)).pow 2) using 1 |
| 166 | simp |
| 167 | · exact Filter.Eventually.of_forall fun s i => by |
| 168 | rw [Real.norm_of_nonneg (sq_nonneg _), mul_pow] |
| 169 | simpa using mul_le_mul_of_nonneg_right |
| 170 | (coefficient_sub_sq_le lam s t i) (sq_nonneg (b.repr u i)) |
| 171 | have hnorm : Tendsto (fun s : ℝ≥0 => ‖heat b lam s u - heat b lam t u‖ ^ 2) |
| 172 | (𝓝 t) (𝓝 0) := by |
| 173 | convert hsum using 1 |
| 174 | funext s |
| 175 | rw [norm_sq_eq_tsum b] |
| 176 | apply tsum_congr |
| 177 | intro i |
| 178 | simp only [map_sub, lp.coeFn_sub, Pi.sub_apply, heat_repr, coefficient] |
| 179 | ring |
| 180 | have hroot := Real.continuous_sqrt.continuousAt.tendsto.comp hnorm |
| 181 | apply tendsto_iff_dist_tendsto_zero.mpr |
| 182 | simpa only [Function.comp_def, Real.sqrt_sq (norm_nonneg _), Real.sqrt_zero, |
| 183 | dist_eq_norm] using hroot |
| 184 | |
| 185 | end Poincare.Analysis.Dirichlet.Spectral |