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.Elliptic.Regularity.GradientCompactness.Quadratic |
| 2 | |
| 3 | /-! # Testing strong integral convergence against bounded functions -/ |
| 4 | |
| 5 | noncomputable section |
| 6 | set_option autoImplicit false |
| 7 | |
| 8 | open Set Filter MeasureTheory |
| 9 | open scoped Topology ENNReal |
| 10 | |
| 11 | namespace Poincare.Analysis.Elliptic |
| 12 | |
| 13 | variable {X : Type*} [MeasurableSpace X] {μ : Measure X} |
| 14 | |
| 15 | theorem tendsto_integral_of_integral_abs_sub |
| 16 | {f : ℕ → X → ℝ} {g : X → ℝ} |
| 17 | (hf : ∀ᶠ k in atTop, Integrable (f k) μ) (hg : Integrable g μ) |
| 18 | (hfg : Tendsto (fun k => ∫ x, |f k x - g x| ∂μ) atTop (𝓝 0)) : |
| 19 | Tendsto (fun k => ∫ x, f k x ∂μ) atTop (𝓝 (∫ x, g x ∂μ)) := by |
| 20 | rw [tendsto_iff_norm_sub_tendsto_zero] |
| 21 | apply squeeze_zero' (Eventually.of_forall fun _ => norm_nonneg _) _ hfg |
| 22 | filter_upwards [hf] with k hk |
| 23 | rw [← integral_sub hk hg] |
| 24 | exact norm_integral_le_integral_norm _ |
| 25 | |
| 26 | theorem tendsto_integral_test_mul_of_integral_abs_sub |
| 27 | {f : ℕ → X → ℝ} {g φ : X → ℝ} {C : ℝ} |
| 28 | (hf : ∀ᶠ k in atTop, Integrable (f k) μ) (hg : Integrable g μ) |
| 29 | (hφ : AEStronglyMeasurable φ μ) (hφb : ∀ᵐ x ∂μ, |φ x| ≤ C) |
| 30 | (hfg : Tendsto (fun k => ∫ x, |f k x - g x| ∂μ) atTop (𝓝 0)) : |
| 31 | Tendsto (fun k => ∫ x, φ x * f k x ∂μ) atTop (𝓝 (∫ x, φ x * g x ∂μ)) := by |
| 32 | apply tendsto_integral_of_integral_abs_sub |
| 33 | (hf.mono fun _ hk => hk.bdd_mul hφ hφb) (hg.bdd_mul hφ hφb) |
| 34 | exact tendsto_integral_abs_coefficient_mul_sub |
| 35 | (Eventually.of_forall fun _ => hφ) hφ |
| 36 | (Eventually.of_forall fun _ => hφb) hφb |
| 37 | (Eventually.of_forall fun _ => tendsto_const_nhds) hf hg hfg |
| 38 | |
| 39 | end Poincare.Analysis.Elliptic |