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.Lebesgue.Countable |
| 2 | |
| 3 | /-! |
| 4 | Adapted from Mapher `PoincareMT/Proofs/M49/Mathlib/FatouSum.lean` at |
| 5 | revision `f927d9e1f0810042766d3b5f64d3f4da02ee93cc`. |
| 6 | |
| 7 | # Fatou's inequality for a family of nonnegative summands |
| 8 | |
| 9 | The chart-cover volume argument for Morgan-Tian Lemma 17.12, p. 410, |
| 10 | uses Fatou first inside each chart and then across the chart family. |
| 11 | Counting measure gives the second inequality without finiteness premises. |
| 12 | -/ |
| 13 | |
| 14 | set_option autoImplicit false |
| 15 | |
| 16 | open Filter MeasureTheory |
| 17 | open scoped ENNReal |
| 18 | |
| 19 | namespace ENNReal |
| 20 | |
| 21 | /-- Fatou for a family of summands, used to assemble chart volumes in |
| 22 | MT Lemma 17.12, p. 410; see the stage-6 regular-limit derivation. -/ |
| 23 | theorem tsum_liminf_le {ι κ : Type*} {l : Filter ι} [IsCountablyGenerated l] |
| 24 | (f : ι → κ → ℝ≥0∞) : |
| 25 | (∑' k, liminf (fun t => f t k) l) ≤ liminf (fun t => ∑' k, f t k) l := by |
| 26 | let : MeasurableSpace κ := ⊤ |
| 27 | simpa only [lintegral_count] using |
| 28 | (lintegral_liminf_le (μ := Measure.count) (f := f) (u := l) |
| 29 | (fun _ => measurable_from_top)) |
| 30 | |
| 31 | end ENNReal |