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.Bochner.Set |
| 2 | |
| 3 | /-! |
| 4 | # An integral lower bound from a lower bound on measure |
| 5 | |
| 6 | The measure-theoretic step in Morgan-Tian equation (8.1), p. 170. Working |
| 7 | with the lower integral avoids assuming that the measurable region has finite |
| 8 | measure before integrability of the density has been used. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open scoped ENNReal |
| 14 | |
| 15 | namespace MeasureTheory |
| 16 | |
| 17 | /-- An integrable density bounded below by a nonnegative constant has integral |
| 18 | at least that constant times any real lower bound on the region's measure. |
| 19 | This is the abstract integral estimate used in Morgan-Tian equation (8.1), p. 170. -/ |
| 20 | theorem mul_le_setIntegral_of_measure_le {α : Type*} [MeasurableSpace α] |
| 21 | {μ : Measure α} {S : Set α} {f : α → ℝ} {c V : ℝ} |
| 22 | (hc : 0 ≤ c) (hf : IntegrableOn f S μ) (hμ : ENNReal.ofReal V ≤ μ S) |
| 23 | (hbound : ∀ᵐ q ∂μ.restrict S, c ≤ f q) : c * V ≤ ∫ q in S, f q ∂μ := by |
| 24 | have hf0 : 0 ≤ᵐ[μ.restrict S] f := hbound.mono (fun _ hq => hc.trans hq) |
| 25 | apply (ENNReal.ofReal_le_ofReal_iff (integral_nonneg_of_ae hf0)).mp |
| 26 | calc |
| 27 | ENNReal.ofReal (c * V) = ENNReal.ofReal c * ENNReal.ofReal V := |
| 28 | ENNReal.ofReal_mul hc |
| 29 | _ ≤ ENNReal.ofReal c * μ S := mul_le_mul_right hμ _ |
| 30 | _ = ∫⁻ _q in S, ENNReal.ofReal c ∂μ := by simp |
| 31 | _ ≤ ∫⁻ q in S, ENNReal.ofReal (f q) ∂μ := |
| 32 | lintegral_mono_ae (hbound.mono (fun _ hq => ENNReal.ofReal_le_ofReal hq)) |
| 33 | _ = ENNReal.ofReal (∫ q in S, f q ∂μ) := |
| 34 | (ofReal_integral_eq_lintegral_ofReal hf hf0).symm |
| 35 | |
| 36 | end MeasureTheory |