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 | import Mathlib.Topology.MetricSpace.Pseudo.Basic |
| 3 | |
| 4 | /-! |
| 5 | # Uniform convergence of dominated Banach primitives |
| 6 | |
| 7 | This is the integral convergence step for the closed initial-time trace |
| 8 | in MT2007 Claim 19.1, p. 437. The actual normal-speed integral follows |
| 9 | MT2015Correction Lemma 0.1, p. 3. See the independently reviewed |
| 10 | `proof-work/tasks/M63/derivations/2026-09-22-dominated-primitive-convergence.md`. |
| 11 | -/ |
| 12 | |
| 13 | set_option autoImplicit false |
| 14 | |
| 15 | open Set Filter MeasureTheory |
| 16 | open scoped Topology |
| 17 | |
| 18 | universe u |
| 19 | |
| 20 | namespace intervalIntegral |
| 21 | |
| 22 | variable {E : Type u} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 23 | {μ : Measure ℝ} [NullSingletonClass μ] |
| 24 | {a b : ℝ} {fn : ℕ → ℝ → E} {f : ℝ → E} {bound : ℝ → ℝ} |
| 25 | |
| 26 | /-- Dominated almost-everywhere convergence gives uniform convergence of |
| 27 | the interval primitives, including both endpoints. This supplies the |
| 28 | integral passage for MT2007 Claim 19.1, p. 437; see the module derivation. -/ |
| 29 | theorem tendstoUniformlyOn_primitive_of_dominated |
| 30 | [CompleteSpace E] |
| 31 | (hab : a ≤ b) |
| 32 | (hmeas : ∀ j, AEStronglyMeasurable (fn j) (μ.restrict (Icc a b))) |
| 33 | (hint : IntegrableOn bound (Icc a b) μ) |
| 34 | (hbound : ∀ j, ∀ᵐ t ∂μ.restrict (Icc a b), ‖fn j t‖ ≤ bound t) |
| 35 | (hlim : ∀ᵐ t ∂μ.restrict (Icc a b), |
| 36 | Tendsto (fun j => fn j t) atTop (𝓝 (f t))) : |
| 37 | (∀ j, IntervalIntegrable (fn j) μ a b) ∧ |
| 38 | IntervalIntegrable f μ a b ∧ |
| 39 | ContinuousOn (fun t => ∫ s in a..t, f s ∂μ) (Icc a b) ∧ |
| 40 | TendstoUniformlyOn (fun j t => ∫ s in a..t, fn j s ∂μ) |
| 41 | (fun t => ∫ s in a..t, f s ∂μ) atTop (Icc a b) := by |
| 42 | have hfm : AEStronglyMeasurable f (μ.restrict (Icc a b)) := |
| 43 | aestronglyMeasurable_of_tendsto_ae atTop hmeas hlim |
| 44 | have hfb : ∀ᵐ t ∂μ.restrict (Icc a b), ‖f t‖ ≤ bound t := by |
| 45 | filter_upwards [hlim, ae_all_iff.mpr hbound] with t ht hb |
| 46 | exact le_of_tendsto ht.norm (Eventually.of_forall hb) |
| 47 | have hfi : IntegrableOn f (Icc a b) μ := hint.mono' hfm hfb |
| 48 | have hfni (j : ℕ) : IntegrableOn (fn j) (Icc a b) μ := |
| 49 | hint.mono' (hmeas j) (hbound j) |
| 50 | have hfint : IntervalIntegrable f μ a b := |
| 51 | (intervalIntegrable_iff_integrableOn_Icc_of_le hab).mpr hfi |
| 52 | have hfnint (j : ℕ) : IntervalIntegrable (fn j) μ a b := |
| 53 | (intervalIntegrable_iff_integrableOn_Icc_of_le hab).mpr (hfni j) |
| 54 | have herr : Tendsto |
| 55 | (fun j => ∫ t in Icc a b, ‖fn j t - f t‖ ∂μ) atTop (𝓝 0) := by |
| 56 | have hdom := tendsto_integral_of_dominated_convergence |
| 57 | (μ := μ.restrict (Icc a b)) |
| 58 | (F := fun j t => ‖fn j t - f t‖) (f := (0 : ℝ → ℝ)) |
| 59 | (fun t => 2 * bound t) |
| 60 | (fun j => ((hmeas j).sub hfm).norm) (hint.const_mul 2) ?_ ?_ |
| 61 | · simpa only [Pi.zero_apply, MeasureTheory.integral_zero] using hdom |
| 62 | · intro j |
| 63 | filter_upwards [hbound j, hfb] with t hj ht |
| 64 | rw [norm_norm] |
| 65 | calc |
| 66 | ‖fn j t - f t‖ ≤ ‖fn j t‖ + ‖f t‖ := norm_sub_le _ _ |
| 67 | _ ≤ bound t + bound t := add_le_add hj ht |
| 68 | _ = 2 * bound t := (two_mul _).symm |
| 69 | · filter_upwards [hlim] with t ht |
| 70 | change Tendsto (fun j => ‖fn j t - f t‖) atTop (𝓝 (0 : ℝ)) |
| 71 | simpa only [sub_self, norm_zero] using |
| 72 | (ht.sub (tendsto_const_nhds (x := f t))).norm |
| 73 | have herr' : Tendsto |
| 74 | (fun j => ∫ t in a..b, ‖fn j t - f t‖ ∂μ) atTop (𝓝 0) := by |
| 75 | simpa only [integral_of_le hab, integral_Icc_eq_integral_Ioc] using herr |
| 76 | refine ⟨hfnint, hfint, ?_, Metric.tendstoUniformlyOn_iff.mpr ?_⟩ |
| 77 | · simpa only [uIcc_of_le hab] using |
| 78 | continuousOn_primitive_interval (a := a) (b := b) (μ := μ) (f := f) |
| 79 | (by simpa only [uIcc_of_le hab] using hfi) |
| 80 | · intro ε hε |
| 81 | filter_upwards [herr'.eventually (gt_mem_nhds hε)] with j hj |
| 82 | intro t ht |
| 83 | have hsub : uIcc a t ⊆ uIcc a b := by |
| 84 | rw [uIcc_of_le ht.1, uIcc_of_le hab] |
| 85 | exact Icc_subset_Icc le_rfl ht.2 |
| 86 | calc |
| 87 | dist (∫ s in a..t, f s ∂μ) (∫ s in a..t, fn j s ∂μ) = |
| 88 | ‖∫ s in a..t, fn j s - f s ∂μ‖ := by |
| 89 | rw [dist_comm, dist_eq_norm, |
| 90 | integral_sub ((hfnint j).mono_set hsub) (hfint.mono_set hsub)] |
| 91 | _ ≤ ∫ s in a..t, ‖fn j s - f s‖ ∂μ := |
| 92 | norm_integral_le_integral_norm ht.1 |
| 93 | _ ≤ ∫ s in a..b, ‖fn j s - f s‖ ∂μ := |
| 94 | integral_mono_interval le_rfl ht.1 ht.2 |
| 95 | (Eventually.of_forall fun s => norm_nonneg (fn j s - f s)) |
| 96 | ((hfnint j).sub hfint).norm |
| 97 | _ < ε := hj |
| 98 | |
| 99 | end intervalIntegral |