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 PoincareLib.Analysis.Elliptic.Regularity.GradientCompactness.Strong |
| 2 | |
| 3 | /-! |
| 4 | # Strong gradient convergence from eventual elliptic bounds |
| 5 | |
| 6 | Finite initial segments do not affect convergence of the actual squared |
| 7 | coordinate-gradient differences. |
| 8 | -/ |
| 9 | |
| 10 | noncomputable section |
| 11 | set_option autoImplicit false |
| 12 | set_option backward.isDefEq.respectTransparency false |
| 13 | |
| 14 | open Set Filter MeasureTheory |
| 15 | open scoped Topology NNReal ENNReal ContDiff |
| 16 | |
| 17 | namespace Poincare.Analysis.Elliptic |
| 18 | |
| 19 | variable {d : ℕ} |
| 20 | local notation "E" => EuclideanSpace ℝ (Fin d) |
| 21 | |
| 22 | theorem tendsto_integral_partial_sub_sq_of_eventually_weak_divergence |
| 23 | {O U : Set E} (hO : IsOpen O) (hU : IsOpen U) |
| 24 | (hUc : IsCompact (closure U)) (hclUO : closure U ⊆ O) |
| 25 | [IsFiniteMeasure (volume.restrict O)] [IsFiniteMeasure (volume.restrict U)] |
| 26 | {u : ℕ → E → ℝ} {v : E → ℝ} |
| 27 | {F : ℕ → Fin d → E → ℝ} {f : ℕ → E → ℝ} |
| 28 | {A : ℕ → E → Fin d → Fin d → ℝ} {B : E → Fin d → Fin d → ℝ} |
| 29 | {L : ℝ≥0} {c C D : ℝ} |
| 30 | (hc : 0 < c) (hC : 0 ≤ C) (hD : 0 ≤ D) |
| 31 | (hlim : TendstoUniformlyOn u v atTop O) (hAlim : TendstoUniformlyOn A B atTop O) |
| 32 | (hdata : ∀ᶠ k in atTop, |
| 33 | LipschitzOnWith L (u k) O ∧ |
| 34 | (∀ i, MemLp (F k i) 2 (volume.restrict O)) ∧ |
| 35 | MemLp (f k) 2 (volume.restrict O) ∧ |
| 36 | (∀ x ∈ O, |f k x| ≤ C) ∧ (∀ i x, x ∈ O → |F k i x| ≤ C) ∧ |
| 37 | (∀ x ∈ O, ∀ w : Fin d → ℝ, |
| 38 | c * ∑ i, (w i) ^ 2 ≤ ∑ i, ∑ j, A k x i j * w j * w i) ∧ |
| 39 | (∀ x ∈ O, ∀ i, F k i x = |
| 40 | -(∑ j, A k x i j * fderiv ℝ (u k) x (EuclideanSpace.single j 1))) ∧ |
| 41 | (∀ (ψ : E → ℝ), ContDiff ℝ (⊤ : ℕ∞) ψ → HasCompactSupport ψ → |
| 42 | tsupport ψ ⊆ O → (∀ x, 0 ≤ ψ x) → |
| 43 | (∫ x in O, ∑ i, F k i x * fderiv ℝ ψ x (EuclideanSpace.single i 1)) ≤ |
| 44 | ∫ x in O, f k x * ψ x)) |
| 45 | {φ : E → ℝ} (hφ : ContDiff ℝ (⊤ : ℕ∞) φ) (hφc : HasCompactSupport φ) |
| 46 | (hφO : tsupport φ ⊆ O) (hφ0 : ∀ x, 0 ≤ φ x) (hφ1 : ∀ x, φ x ≤ 1) |
| 47 | (hφU : ∀ x ∈ U, φ x = 1) |
| 48 | (hdφ : ∀ i x, x ∈ O → |fderiv ℝ φ x (EuclideanSpace.single i 1)| ≤ D) |
| 49 | (i : Fin d) : |
| 50 | Tendsto (fun k => ∫ x in U, |
| 51 | (fderiv ℝ (u k) x (EuclideanSpace.single i 1) - |
| 52 | fderiv ℝ v x (EuclideanSpace.single i 1)) ^ 2) atTop (𝓝 0) := by |
| 53 | obtain ⟨N, hN⟩ := eventually_atTop.mp hdata |
| 54 | have htail (k : ℕ) := hN (k + N) (Nat.le_add_left N k) |
| 55 | have hlimN := hlim.seq_tendstoUniformlyOn (fun k => k + N) (tendsto_add_atTop_nat N) |
| 56 | have hAN := hAlim.seq_tendstoUniformlyOn (fun k => k + N) (tendsto_add_atTop_nat N) |
| 57 | have hu := fun k => (htail k).1 |
| 58 | have hv := lipschitzOnWith_of_tendstoUniformlyOn hu hlimN |
| 59 | have hstrong := tendsto_lipschitzPartialL2_of_weak_divergence |
| 60 | hO hU hUc hclUO hc hC hD hu hlimN hAN.uniformCauchySeqOn |
| 61 | (fun k => (htail k).2.1) (fun k => (htail k).2.2.1) |
| 62 | (fun k => (htail k).2.2.2.1) (fun k => (htail k).2.2.2.2.1) |
| 63 | (fun k => (htail k).2.2.2.2.2.1) (fun k => (htail k).2.2.2.2.2.2.1) |
| 64 | (fun k => (htail k).2.2.2.2.2.2.2) hφ hφc hφO hφ0 hφ1 hφU hdφ i |
| 65 | have hUO : U ⊆ O := subset_closure.trans hclUO |
| 66 | have hnorm := ((hstrong.sub (tendsto_const_nhds |
| 67 | (x := lipschitzPartialL2 hU (hv.mono hUO) i))).norm).pow 2 |
| 68 | apply (tendsto_add_atTop_iff_nat N).mp |
| 69 | convert hnorm using 1 |
| 70 | · funext k |
| 71 | exact (norm_toLp_sub_sq_eq_integral |
| 72 | ((Poincare.Analysis.Sobolev.Weak.memLp_top_fderiv_apply_of_lipschitzOn |
| 73 | hU ((hu k).mono hUO) (EuclideanSpace.single i 1)).mono_exponent le_top) |
| 74 | ((Poincare.Analysis.Sobolev.Weak.memLp_top_fderiv_apply_of_lipschitzOn |
| 75 | hU (hv.mono hUO) (EuclideanSpace.single i 1)).mono_exponent le_top)).symm |
| 76 | · simp |
| 77 | |
| 78 | end Poincare.Analysis.Elliptic |