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 | # Parameter integrals on a restricted parameter domain |
| 5 | |
| 6 | A domain-restricted version of Mathlib's continuity theorem for a |
| 7 | parametric interval integral. It supplies endpoint continuity in the |
| 8 | 2015 Morgan--Tian correction, Lemma 0.4, pp. 7-8. |
| 9 | -/ |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | |
| 13 | open MeasureTheory Set |
| 14 | open scoped intervalIntegral |
| 15 | |
| 16 | /-- Continuity of an integrand on the full integration axis times a parameter |
| 17 | set gives continuity of its fixed interval integral on that set. |
| 18 | Used for corrected Lemma 0.4, pp. 7-8, without extending endpoint data. -/ |
| 19 | theorem ContinuousOn.intervalIntegral_prod_left |
| 20 | {X E : Type*} [TopologicalSpace X] [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 21 | {μ : Measure ℝ} [NullSingletonClass μ] [IsLocallyFiniteMeasure μ] |
| 22 | {s : Set X} {f : ℝ × X → E} (hf : ContinuousOn f (univ ×ˢ s)) (l r : ℝ) : |
| 23 | ContinuousOn (fun t ↦ ∫ x in l..r, f (x, t) ∂μ) s := by |
| 24 | rw [continuousOn_iff_continuous_domRestrict] |
| 25 | exact intervalIntegral.continuous_parametric_intervalIntegral_of_continuous' |
| 26 | (f := fun (t : s) x ↦ f (x, t)) |
| 27 | (hf.comp_continuous |
| 28 | (continuous_snd.prodMk (continuous_subtype_val.comp continuous_fst)) |
| 29 | (fun z ↦ ⟨mem_univ _, z.1.property⟩)) l r |