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 | /- |
| 2 | Adapted from AxelWorkspace revision f1cdb30cabdc8781d2d3dec86d3d99ab1820f30e. |
| 3 | Source and SHA-256: references/analysis/axel-workspace/weak-parabolic-regularity-sources.json. |
| 4 | Apache-2.0; see the license in that source directory. |
| 5 | -/ |
| 6 | import PoincareLib.Analysis.Sobolev.WeakCompactness.DerivativeLimit |
| 7 | import Mathlib.Topology.UniformSpace.UniformConvergence |
| 8 | |
| 9 | /-! |
| 10 | # Uniform convergence identifies a weak L2 limit |
| 11 | |
| 12 | On a fixed finite-measure domain uniform convergence bounds the L2 distance |
| 13 | by the uniform error times the square root of the volume. Continuous linear |
| 14 | functionals then identify a pre-existing weak limit with this strong limit. |
| 15 | This is the local common-limit step toward Morgan--Tian, Chapter 18, |
| 16 | Lemma 18.10; it asserts no intrinsic regularized-energy lower semicontinuity. |
| 17 | -/ |
| 18 | |
| 19 | noncomputable section |
| 20 | |
| 21 | open Set Filter MeasureTheory |
| 22 | open scoped Topology ENNReal |
| 23 | |
| 24 | namespace Poincare.Analysis.Sobolev.WeakCompactness |
| 25 | |
| 26 | /-- **Math.** Uniform convergence on a finite-measure set gives strong L2 |
| 27 | convergence of the same measurable representatives. -/ |
| 28 | theorem tendsto_toLp_of_uniformlyOn |
| 29 | {X E : Type*} [MeasurableSpace X] [NormedAddCommGroup E] |
| 30 | {mu : Measure X} {s : Set X} (hs : MeasurableSet s) |
| 31 | [IsFiniteMeasure (mu.restrict s)] {f : ℕ → X → E} {v : X → E} |
| 32 | (hf : ∀ n, MemLp (f n) 2 (mu.restrict s)) |
| 33 | (hv : MemLp v 2 (mu.restrict s)) (hlim : TendstoUniformlyOn f v atTop s) : |
| 34 | Tendsto (fun n => (hf n).toLp (f n)) atTop (𝓝 (hv.toLp v)) := by |
| 35 | let a : ℝ := (measureUnivNNReal (mu.restrict s) : ℝ) ^ (2 : ℝ≥0∞).toReal⁻¹ |
| 36 | have ha : 0 ≤ a := Real.rpow_nonneg (by positivity) _ |
| 37 | rw [Metric.tendsto_atTop] |
| 38 | intro eps heps |
| 39 | have hd : 0 < eps / (a + 1) := div_pos heps (by linarith) |
| 40 | have he := (Metric.tendstoUniformlyOn_iff.mp hlim) (eps / (a + 1)) hd |
| 41 | obtain ⟨N, hN⟩ := eventually_atTop.mp he |
| 42 | refine ⟨N, fun n hn => ?_⟩ |
| 43 | rw [dist_eq_norm] |
| 44 | have hb : ∀ᵐ x ∂mu.restrict s, |
| 45 | ‖((hf n).toLp (f n) - hv.toLp v) x‖ ≤ eps / (a + 1) := by |
| 46 | filter_upwards [ae_restrict_mem hs, Lp.coeFn_sub ((hf n).toLp (f n)) (hv.toLp v), |
| 47 | (hf n).coeFn_toLp, hv.coeFn_toLp] with x hx hsub hfn hvx |
| 48 | rw [hsub, Pi.sub_apply, hfn, hvx] |
| 49 | simpa only [dist_eq_norm, norm_sub_rev] using (hN n hn x hx).le |
| 50 | calc |
| 51 | _ ≤ a * (eps / (a + 1)) := Lp.norm_le_of_ae_bound hd.le hb |
| 52 | _ < eps := by |
| 53 | rw [← mul_div_assoc, div_lt_iff₀ (by linarith : 0 < a + 1)] |
| 54 | nlinarith |
| 55 | |
| 56 | /-- **Math.** A strong limit and a weak limit of one Hilbert-space sequence |
| 57 | coincide, by uniqueness of limits of scalar continuous linear observations. -/ |
| 58 | theorem eq_of_strong_and_weak_limit |
| 59 | {F : Type*} [NormedAddCommGroup F] [InnerProductSpace ℝ F] |
| 60 | {f : ℕ → F} {u v : F} (hs : Tendsto f atTop (𝓝 v)) |
| 61 | (hw : WeakConverges f u) : u = v := by |
| 62 | apply ext_inner_left ℝ |
| 63 | intro z |
| 64 | exact tendsto_nhds_unique (hw (innerSL ℝ z)) |
| 65 | ((innerSL ℝ z).continuous.tendsto v |>.comp hs) |
| 66 | |
| 67 | end Poincare.Analysis.Sobolev.WeakCompactness |