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.Interior.Kernel.CenteredEstimate |
| 2 | |
| 3 | /-! |
| 4 | # Hessian heat potentials with separated sources |
| 5 | |
| 6 | Spatial cutoff errors vanish near the evaluation point; time cutoff errors |
| 7 | vanish near the evaluation time. These two separation properties yield bounds |
| 8 | without any Holder seminorm of the source. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open MeasureTheory Set |
| 14 | open scoped NNReal |
| 15 | |
| 16 | namespace Poincare.Parabolic.Interior.Kernel |
| 17 | |
| 18 | variable {V F : Type*} |
| 19 | [NormedAddCommGroup V] [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] |
| 20 | [MeasurableSpace V] [BorelSpace V] [Nontrivial V] |
| 21 | [NormedAddCommGroup F] [NormedSpace ℝ F] |
| 22 | |
| 23 | omit [InnerProductSpace ℝ V] [FiniteDimensional ℝ V] [MeasurableSpace V] [BorelSpace V] |
| 24 | [Nontrivial V] [NormedSpace ℝ F] in |
| 25 | /-- A bounded source vanishing on a ball satisfies a centered power bound. -/ |
| 26 | theorem centered_bound_of_vanishes_on_ball |
| 27 | {α Q r : ℝ} (hα : 0 ≤ α) (hQ : 0 ≤ Q) (hr : 0 < r) |
| 28 | {f : V → F} (hb : ∀ y, ‖f y‖ ≤ Q) |
| 29 | (hz : ∀ y, ‖y‖ < r → f y = 0) (y : V) : |
| 30 | ‖f y‖ ≤ (Q / r ^ α) * ‖y‖ ^ α := by |
| 31 | by_cases hy : ‖y‖ < r |
| 32 | · rw [hz y hy, norm_zero] |
| 33 | positivity |
| 34 | · have hp : 0 < r ^ α := Real.rpow_pos_of_pos hr _ |
| 35 | have hm : r ^ α ≤ ‖y‖ ^ α := Real.rpow_le_rpow hr.le (le_of_not_gt hy) hα |
| 36 | calc |
| 37 | ‖f y‖ ≤ Q := hb y |
| 38 | _ = (Q / r ^ α) * r ^ α := (div_mul_cancel₀ Q hp.ne').symm |
| 39 | _ ≤ _ := mul_le_mul_of_nonneg_left hm (div_nonneg hQ hp.le) |
| 40 | |
| 41 | /-- A bounded source has the usual `t⁻¹` spatial Hessian estimate. -/ |
| 42 | theorem norm_integral_heatD2_smul_le_of_bound |
| 43 | {Q t : ℝ} (hQ : 0 ≤ Q) (ht : 0 < t) {f : V → F} |
| 44 | (hf : ∀ y, ‖f y‖ ≤ Q) (v w : V) : |
| 45 | ‖∫ y, heatD2 t v w y • f y‖ ≤ ‖v‖ * ‖w‖ * Q * t⁻¹ * heatC2 V := by |
| 46 | calc |
| 47 | _ ≤ ∫ y, ‖heatD2 t v w y‖ * Q := by |
| 48 | apply norm_integral_le_of_norm_le ((heatD2_int ht v w).norm.mul_const Q) |
| 49 | exact Filter.Eventually.of_forall fun y => by |
| 50 | rw [norm_smul] |
| 51 | exact mul_le_mul_of_nonneg_left (hf y) (norm_nonneg _) |
| 52 | _ = (∫ y, ‖heatD2 t v w y‖) * Q := integral_mul_const Q _ |
| 53 | _ ≤ (‖v‖ * ‖w‖ * t⁻¹ * heatC2 V) * Q := |
| 54 | mul_le_mul_of_nonneg_right (integral_norm_D2 ht v w) hQ |
| 55 | _ = _ := by ring |
| 56 | |
| 57 | /-- A positive time gap removes the Hessian kernel singularity. -/ |
| 58 | theorem norm_hessian_potential_le_of_time_gap |
| 59 | {Q δ t : ℝ} (hQ : 0 ≤ Q) (hδ : 0 < δ) (ht : 0 < t) |
| 60 | {f : ℝ → V → F} |
| 61 | (hf : ∀ s ∈ Ioo (0 : ℝ) t, ∀ y, ‖f s y‖ ≤ Q) |
| 62 | (hz : ∀ s ∈ Ioo (0 : ℝ) t, t - δ < s → ∀ y, f s y = 0) |
| 63 | (v w : V) : |
| 64 | ‖∫ s in 0..t, ∫ y, heatD2 (t - s) v w y • f s y‖ ≤ |
| 65 | (‖v‖ * ‖w‖ * Q * δ⁻¹ * heatC2 V) * t := by |
| 66 | have hC : 0 ≤ ‖v‖ * ‖w‖ * Q * δ⁻¹ * heatC2 V := by |
| 67 | exact mul_nonneg (by positivity) (heatC2_nonneg (V := V)) |
| 68 | have hb : ∀ s ∈ Ioo (0 : ℝ) t, |
| 69 | ‖∫ y, heatD2 (t - s) v w y • f s y‖ ≤ |
| 70 | ‖v‖ * ‖w‖ * Q * δ⁻¹ * heatC2 V := by |
| 71 | intro s hs |
| 72 | by_cases hg : t - δ < s |
| 73 | · simpa only [hz s hs hg, smul_zero, integral_zero, norm_zero] using hC |
| 74 | · refine (norm_integral_heatD2_smul_le_of_bound hQ (sub_pos.mpr hs.2) |
| 75 | (hf s hs) v w).trans ?_ |
| 76 | have hgap : δ ≤ t - s := by linarith |
| 77 | gcongr |
| 78 | exact heatC2_nonneg (V := V) |
| 79 | calc |
| 80 | _ ≤ ∫ _s in 0..t, ‖v‖ * ‖w‖ * Q * δ⁻¹ * heatC2 V := by |
| 81 | refine intervalIntegral.norm_integral_le_of_norm_le ht.le ?_ intervalIntegrable_const |
| 82 | have hne : ∀ᵐ s ∂(volume : Measure ℝ), s ≠ t := by |
| 83 | simp [ae_iff, measure_singleton] |
| 84 | filter_upwards [hne] with s hst hs |
| 85 | exact hb s ⟨hs.1, lt_of_le_of_ne hs.2 hst⟩ |
| 86 | _ = _ := by rw [intervalIntegral.integral_const]; simp [smul_eq_mul, mul_comm] |
| 87 | |
| 88 | /-- A centered part and a bounded part may be estimated in the same integral, |
| 89 | without requiring either part to be a separately defined source. -/ |
| 90 | theorem norm_integral_heatD2_smul_le_of_centered_add_bound |
| 91 | {α : ℝ≥0} (hα : α ≤ 1) {K Q t : ℝ} (hK : 0 ≤ K) (hQ : 0 ≤ Q) |
| 92 | (ht : 0 < t) {f : V → F} |
| 93 | (hf : ∀ y, ‖f y‖ ≤ K * ‖y‖ ^ (α : ℝ) + Q) (v w : V) : |
| 94 | ‖∫ y, heatD2 t v w y • f y‖ ≤ |
| 95 | ‖v‖ * ‖w‖ * K * holderHeatScale α t * heatC2Holder (V := V) α + |
| 96 | ‖v‖ * ‖w‖ * Q * t⁻¹ * heatC2 V := by |
| 97 | have h₁ := (heatD2Holder_int (V := V) hα ht).const_mul (‖v‖ * ‖w‖ * K) |
| 98 | have h₂ := (heatD2_int ht v w).norm.mul_const Q |
| 99 | calc |
| 100 | _ ≤ ∫ y, (‖v‖ * ‖w‖ * K) * heatD2Holder α t y + ‖heatD2 t v w y‖ * Q := by |
| 101 | apply norm_integral_le_of_norm_le (h₁.add h₂) |
| 102 | apply Filter.Eventually.of_forall |
| 103 | intro y |
| 104 | calc |
| 105 | _ = ‖heatD2 t v w y‖ * ‖f y‖ := norm_smul _ _ |
| 106 | _ ≤ ‖heatD2 t v w y‖ * (K * ‖y‖ ^ (α : ℝ) + Q) := by gcongr; exact hf y |
| 107 | _ = K * (‖heatD2 t v w y‖ * ‖y‖ ^ (α : ℝ)) + ‖heatD2 t v w y‖ * Q := by ring |
| 108 | _ ≤ K * (‖v‖ * ‖w‖ * heatD2Holder α t y) + ‖heatD2 t v w y‖ * Q := by |
| 109 | exact add_le_add (mul_le_mul_of_nonneg_left |
| 110 | (heatD2_holder_bound α ht v w y) hK) le_rfl |
| 111 | _ = _ := by simp only [Pi.add_apply]; ring |
| 112 | _ = (‖v‖ * ‖w‖ * K) * (∫ y : V, heatD2Holder α t y) + |
| 113 | (∫ y, ‖heatD2 t v w y‖) * Q := by |
| 114 | rw [integral_add h₁ h₂, integral_const_mul, integral_mul_const] |
| 115 | _ ≤ ‖v‖ * ‖w‖ * K * holderHeatScale α t * heatC2Holder (V := V) α + |
| 116 | ‖v‖ * ‖w‖ * Q * t⁻¹ * heatC2 V := by |
| 117 | rw [integral_heatD2Holder α ht, holderHeatScale_eq α ht] |
| 118 | have := mul_le_mul_of_nonneg_right (integral_norm_D2 ht v w) hQ |
| 119 | nlinarith |
| 120 | |
| 121 | /-- A residual may combine a centered defect with an early-time bounded |
| 122 | error. The latter costs only the inverse time gap. -/ |
| 123 | theorem norm_hessian_potential_le_of_centered_add_time_gap |
| 124 | {α : ℝ≥0} (hα0 : 0 < α) (hα1 : α ≤ 1) {K Q δ t : ℝ} |
| 125 | (hK : 0 ≤ K) (hQ : 0 ≤ Q) (hδ : 0 < δ) (ht : 0 < t) |
| 126 | {f : ℝ → V → F} |
| 127 | (hf : ∀ s ∈ Ioo (0 : ℝ) t, ∀ y, ‖f s y‖ ≤ K * ‖y‖ ^ (α : ℝ) + Q) |
| 128 | (hlate : ∀ s ∈ Ioo (0 : ℝ) t, t - δ < s → ∀ y, |
| 129 | ‖f s y‖ ≤ K * ‖y‖ ^ (α : ℝ)) (v w : V) : |
| 130 | ‖∫ s in 0..t, ∫ y, heatD2 (t - s) v w y • f s y‖ ≤ |
| 131 | (‖v‖ * ‖w‖ * K * heatC2Holder (V := V) α) * |
| 132 | ((2 / (α : ℝ)) * t ^ ((α : ℝ) / 2)) + |
| 133 | (‖v‖ * ‖w‖ * Q * δ⁻¹ * heatC2 V) * t := by |
| 134 | let A := ‖v‖ * ‖w‖ * K * heatC2Holder (V := V) α |
| 135 | let D := ‖v‖ * ‖w‖ * Q * δ⁻¹ * heatC2 V |
| 136 | have hD : 0 ≤ D := mul_nonneg (by positivity) (heatC2_nonneg (V := V)) |
| 137 | have hb : ∀ s ∈ Ioo (0 : ℝ) t, |
| 138 | ‖∫ y, heatD2 (t - s) v w y • f s y‖ ≤ A * holderHeatScale α (t - s) + D := by |
| 139 | intro s hs |
| 140 | by_cases hg : t - δ < s |
| 141 | · have h := norm_integral_heatD2_smul_le_of_centered_bound hα1 |
| 142 | (sub_pos.mpr hs.2) (hlate s hs hg) v w |
| 143 | dsimp [A] |
| 144 | nlinarith |
| 145 | · have h := norm_integral_heatD2_smul_le_of_centered_add_bound hα1 hK hQ |
| 146 | (sub_pos.mpr hs.2) (hf s hs) v w |
| 147 | have hgap : δ ≤ t - s := by linarith |
| 148 | have hle : ‖v‖ * ‖w‖ * Q * (t - s)⁻¹ * heatC2 V ≤ D := by |
| 149 | dsimp [D] |
| 150 | gcongr |
| 151 | exact heatC2_nonneg (V := V) |
| 152 | dsimp [A] |
| 153 | nlinarith |
| 154 | have hmajor := (holderHeatScale_intble hα0 (t := t)).const_mul A |
| 155 | calc |
| 156 | _ ≤ ∫ s in 0..t, A * holderHeatScale α (t - s) + D := by |
| 157 | refine intervalIntegral.norm_integral_le_of_norm_le ht.le ?_ |
| 158 | (hmajor.add intervalIntegrable_const) |
| 159 | have hne : ∀ᵐ s ∂(volume : Measure ℝ), s ≠ t := by |
| 160 | simp [ae_iff, measure_singleton] |
| 161 | filter_upwards [hne] with s hst hs |
| 162 | exact hb s ⟨hs.1, lt_of_le_of_ne hs.2 hst⟩ |
| 163 | _ = _ := by |
| 164 | rw [intervalIntegral.integral_add hmajor intervalIntegrable_const, |
| 165 | intervalIntegral.integral_const_mul, timeHolderHeatScale_int hα0, |
| 166 | intervalIntegral.integral_const] |
| 167 | simp only [sub_zero, smul_eq_mul, A, D] |
| 168 | ring |
| 169 | |
| 170 | end Poincare.Parabolic.Interior.Kernel |