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.MeasureTheory.Integral.DominatedConvergence |
| 2 | |
| 3 | /-! |
| 4 | # Uniform approximation under an integrable supported factor |
| 5 | |
| 6 | An eventual unit error gives the integrable majorant |uv|+|v|. |
| 7 | The estimate is required only where the fixed factor is nonzero. |
| 8 | -/ |
| 9 | |
| 10 | set_option autoImplicit false |
| 11 | |
| 12 | open Set Filter MeasureTheory |
| 13 | open scoped Topology |
| 14 | |
| 15 | namespace PoincareMT.ReducedVolume |
| 16 | |
| 17 | /-- Uniform scalar error on the support of an integrable factor gives convergence of products. -/ |
| 18 | theorem tendsto_integral_mul_of_uniform_error {X : Type*} [MeasurableSpace X] |
| 19 | {μ : Measure X} {f : ℕ → X → ℝ} {u v : X → ℝ} {ε : ℕ → ℝ} |
| 20 | (hv : Integrable v μ) (huv : Integrable (fun x ↦ u x * v x) μ) |
| 21 | (hfv : ∀ j, Integrable (fun x ↦ f j x * v x) μ) |
| 22 | (hε : Tendsto ε atTop (𝓝 0)) |
| 23 | (herr : ∀ j, ∀ x ∈ Function.support v, |f j x - u x| ≤ ε j) : |
| 24 | Tendsto (fun j ↦ ∫ x, f j x * v x ∂μ) atTop (𝓝 (∫ x, u x * v x ∂μ)) := by |
| 25 | apply tendsto_integral_filter_of_dominated_convergence (fun x ↦ |u x * v x| + |v x|) |
| 26 | (Eventually.of_forall (fun j ↦ (hfv j).aestronglyMeasurable)) |
| 27 | · filter_upwards [hε (eventually_lt_nhds (by norm_num : (0 : ℝ) < 1))] with j hj |
| 28 | exact Eventually.of_forall (fun x ↦ by |
| 29 | rw [Real.norm_eq_abs] |
| 30 | by_cases hx : v x = 0 |
| 31 | · simp only [hx, mul_zero, abs_zero, add_zero, le_refl] |
| 32 | · have he := (herr j x hx).trans hj.le |
| 33 | calc |
| 34 | |f j x * v x| = |u x * v x + (f j x - u x) * v x| := by congr 1; ring |
| 35 | _ ≤ |u x * v x| + |(f j x - u x) * v x| := abs_add_le _ _ |
| 36 | _ ≤ |u x * v x| + |v x| := by |
| 37 | simp only [abs_mul] |
| 38 | nlinarith [abs_nonneg (v x)]) |
| 39 | · exact huv.abs.add hv.abs |
| 40 | · exact Eventually.of_forall (fun x ↦ by |
| 41 | by_cases hx : v x = 0 |
| 42 | · simpa only [hx, mul_zero] using (tendsto_const_nhds (x := (0 : ℝ))) |
| 43 | · have he : Tendsto (fun j ↦ f j x - u x) atTop (𝓝 0) := |
| 44 | squeeze_zero_norm (fun j ↦ by simpa only [Real.norm_eq_abs] using herr j x hx) hε |
| 45 | have hf : Tendsto (fun j ↦ f j x) atTop (𝓝 (u x)) := by |
| 46 | simpa only [sub_add_cancel, zero_add] using he.add (tendsto_const_nhds (x := u x)) |
| 47 | exact hf.mul tendsto_const_nhds) |
| 48 | |
| 49 | end PoincareMT.ReducedVolume |