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 | # Upper integral comparison by truncation |
| 5 | |
| 6 | The upper truncations max(b,a_k) have an integrable absolute bound and |
| 7 | converge to b. Dominated convergence supplies the upper integral limit |
| 8 | used in the reconstruction of Morgan-Tian Claim 7.22, without requiring |
| 9 | integrability of the pointwise limit of a_k. |
| 10 | -/ |
| 11 | |
| 12 | set_option autoImplicit false |
| 13 | |
| 14 | open Filter MeasureTheory |
| 15 | open scoped Topology |
| 16 | |
| 17 | namespace PoincareMT.ReducedVolume |
| 18 | |
| 19 | /-- An integrable upper bound and an almost-everywhere upper limit bound control integral limits. -/ |
| 20 | theorem integral_limit_le_of_ae_upper_bound {X : Type*} [MeasurableSpace X] |
| 21 | {μ : Measure X} {a : ℕ → X → ℝ} {b c : X → ℝ} {I : ℝ} |
| 22 | (ha : ∀ k, Integrable (a k) μ) (hb : Integrable b μ) (hc : Integrable c μ) |
| 23 | (hupper : ∀ k, a k ≤ᵐ[μ] c) |
| 24 | (hlim : ∀ᵐ x ∂μ, ∃ r : ℝ, Tendsto (fun k ↦ a k x) atTop (𝓝 r) ∧ r ≤ b x) |
| 25 | (hint : Tendsto (fun k ↦ ∫ x, a k x ∂μ) atTop (𝓝 I)) : |
| 26 | I ≤ ∫ x, b x ∂μ := by |
| 27 | let G := fun k x ↦ max (b x) (a k x) |
| 28 | have hGi (k : ℕ) : Integrable (G k) μ := hb.sup (ha k) |
| 29 | have hbound (k : ℕ) : ∀ᵐ x ∂μ, ‖G k x‖ ≤ |b x| + |c x| := by |
| 30 | filter_upwards [hupper k] with x hx |
| 31 | rw [Real.norm_eq_abs] |
| 32 | apply abs_le.mpr |
| 33 | constructor |
| 34 | · calc |
| 35 | -(|b x| + |c x|) ≤ -|b x| := by linarith [abs_nonneg (c x)] |
| 36 | _ ≤ b x := neg_abs_le _ |
| 37 | _ ≤ G k x := le_max_left _ _ |
| 38 | · apply max_le |
| 39 | · linarith [le_abs_self (b x), abs_nonneg (c x)] |
| 40 | · linarith [hx, le_abs_self (c x), abs_nonneg (b x)] |
| 41 | have hGl : ∀ᵐ x ∂μ, Tendsto (fun k ↦ G k x) atTop (𝓝 (b x)) := by |
| 42 | filter_upwards [hlim] with x hx |
| 43 | obtain ⟨r, hr, hrb⟩ := hx |
| 44 | have h := (tendsto_const_nhds (x := b x)).max hr |
| 45 | simpa only [G, max_eq_left hrb] using h |
| 46 | have hGint := tendsto_integral_of_dominated_convergence |
| 47 | (fun x ↦ |b x| + |c x|) (fun k ↦ (hGi k).aestronglyMeasurable) |
| 48 | (hb.abs.add hc.abs) hbound hGl |
| 49 | apply le_of_tendsto_of_tendsto hint hGint |
| 50 | exact Eventually.of_forall (fun k ↦ integral_mono_ae (ha k) (hGi k) |
| 51 | (Eventually.of_forall (fun x ↦ le_max_right (b x) (a k x)))) |
| 52 | |
| 53 | end PoincareMT.ReducedVolume |