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.Geometry.CurveShortening.Comparison.AnnularEvolution.Plateau.Hilbert.Extraction |
| 2 | import PoincareLib.Geometry.CurveShortening.Comparison.AnnularEvolution.Plateau.Weak.DerivativeClosure |
| 3 | |
| 4 | /-! |
| 5 | # Weak columns of a fixed continuous cone limit |
| 6 | |
| 7 | Bounded pointwise convergence gives strong observed values. Hilbert |
| 8 | extraction gives one subsequence for both actual derivative columns, and |
| 9 | the distribution equations survive on any open plane domain. |
| 10 | |
| 11 | Morgan--Tian context: Lemma 19.15 and its annular area-to-energy construction, printed pp. |
| 12 | 447-449. |
| 13 | -/ |
| 14 | |
| 15 | set_option autoImplicit false |
| 16 | |
| 17 | noncomputable section |
| 18 | |
| 19 | open Set Filter MeasureTheory |
| 20 | open scoped Topology ENNReal |
| 21 | |
| 22 | namespace PoincareMT |
| 23 | |
| 24 | open Poincare.Analysis.Sobolev.Weak Poincare.Analysis.Sobolev.WeakCompactness |
| 25 | |
| 26 | /-- Uniformly bounded almost-everywhere pointwise convergence on a finite measure space |
| 27 | gives strong L2 convergence. Proof expansion for Morgan-Tian (2007), Lemma 19.15, pp. |
| 28 | 447-449. -/ |
| 29 | theorem m64Bounded_pointwise_l2_tendsto |
| 30 | {X E : Type*} [MeasurableSpace X] [NormedAddCommGroup E] |
| 31 | [InnerProductSpace ℝ E] {mu : Measure X} [IsFiniteMeasure mu] |
| 32 | (f : ℕ → X → E) (u : X → E) (hf : ∀ j, MemLp (f j) 2 mu) (hu : MemLp u 2 mu) |
| 33 | {R : ℝ} (hR : 0 ≤ R) (hb : ∀ j x, ‖f j x‖ ≤ R) |
| 34 | (hlim : ∀ᵐ x ∂mu, Tendsto (fun j => f j x) atTop (𝓝 (u x))) : |
| 35 | Tendsto (fun j => (hf j).toLp (f j)) atTop (𝓝 (hu.toLp u)) := by |
| 36 | have hub : ∀ᵐ x ∂mu, ‖u x‖ ≤ R := hlim.mono fun x hx => |
| 37 | le_of_tendsto hx.norm (Eventually.of_forall fun j => hb j x) |
| 38 | have hdom (j : ℕ) : ∀ᵐ x ∂mu, ‖‖f j x - u x‖ ^ 2‖ ≤ (2 * R) ^ 2 := by |
| 39 | filter_upwards [hub] with x hx |
| 40 | rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)] |
| 41 | apply (sq_le_sq₀ (norm_nonneg _) (by positivity)).mpr |
| 42 | exact (norm_sub_le _ _).trans (by linarith [hb j x]) |
| 43 | have hpoint : ∀ᵐ x ∂mu, Tendsto (fun j => ‖f j x - u x‖ ^ 2) atTop (𝓝 (0 : ℝ)) := by |
| 44 | filter_upwards [hlim] with x hx |
| 45 | simpa only [sub_self, norm_zero, zero_pow (by decide : 2 ≠ 0)] using |
| 46 | (hx.sub_const (u x)).norm.pow 2 |
| 47 | have hDCT := tendsto_integral_of_dominated_convergence (fun _ : X => (2 * R) ^ 2) |
| 48 | (fun j => ((hf j).aestronglyMeasurable.sub hu.aestronglyMeasurable).norm.pow 2) |
| 49 | (integrable_const _) hdom hpoint |
| 50 | have heq (j : ℕ) : ‖(hf j).toLp (f j) - hu.toLp u‖ ^ 2 = |
| 51 | ∫ x, ‖f j x - u x‖ ^ 2 ∂mu := by |
| 52 | rw [← real_inner_self_eq_norm_sq, L2.inner_def] |
| 53 | simp only [real_inner_self_eq_norm_sq] |
| 54 | apply integral_congr_ae |
| 55 | filter_upwards [Lp.coeFn_sub ((hf j).toLp (f j)) (hu.toLp u), |
| 56 | (hf j).coeFn_toLp, hu.coeFn_toLp] with x hx hfx hux |
| 57 | simp only [hx, Pi.sub_apply, hfx, hux] |
| 58 | have hsq : Tendsto (fun j => ‖(hf j).toLp (f j) - hu.toLp u‖ ^ 2) atTop (𝓝 (0 : ℝ)) := by |
| 59 | simpa only [heq, integral_zero, Pi.pow_apply, Pi.sub_apply] using hDCT |
| 60 | apply tendsto_iff_norm_sub_tendsto_zero.mpr |
| 61 | simpa only [Real.sqrt_sq_eq_abs, abs_norm, Real.sqrt_zero] using hsq.sqrt |
| 62 | |
| 63 | /-- A weak Hilbert limit retains a convergent upper bound for the squared norms. Proof |
| 64 | expansion for Morgan-Tian (2007), Lemma 19.15, pp. 447-449. -/ |
| 65 | theorem m64Weak_limit_norm_sq_le |
| 66 | {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℝ H] |
| 67 | {u : ℕ → H} {v : H} (hu : WeakConverges u v) |
| 68 | {b : ℕ → ℝ} {B : ℝ} (hb : Tendsto b atTop (𝓝 B)) (hbound : ∀ j, ‖u j‖ ^ 2 ≤ b j) : |
| 69 | ‖v‖ ^ 2 ≤ B := by |
| 70 | have hl := (hu ((innerSL ℝ) v)).const_mul 2 |>.sub_const (‖v‖ ^ 2) |
| 71 | have hlim : Tendsto (fun j => 2 * inner ℝ v (u j) - ‖v‖ ^ 2) atTop (𝓝 (‖v‖ ^ 2)) := by |
| 72 | simpa only [innerSL_apply_apply, real_inner_self_eq_norm_sq, two_mul, |
| 73 | add_sub_cancel_right] using hl |
| 74 | apply le_of_tendsto_of_tendsto hlim hb |
| 75 | exact Eventually.of_forall fun j => (show 2 * inner ℝ v (u j) - ‖v‖ ^ 2 ≤ ‖u j‖ ^ 2 by |
| 76 | nlinarith [real_inner_le_norm v (u j), sq_nonneg (‖u j‖ - ‖v‖)]).trans (hbound j) |
| 77 | |
| 78 | variable {m : ℕ} |
| 79 | |
| 80 | local notation "E" => EuclideanSpace ℝ (Fin m) |
| 81 | |
| 82 | /-- Extract a single weakly convergent subsequence for both actual planar L2 columns. Proof |
| 83 | expansion for Morgan-Tian (2007), Lemma 19.15, pp. 447-449. -/ |
| 84 | theorem m64Plane_two_columns_subsequence |
| 85 | {S : Set LoopPlane} (V : ℕ → Fin 2 → LoopPlane → E) |
| 86 | (hV : ∀ j i, MemLp (V j i) 2 (volume.restrict S)) |
| 87 | {C : ℝ} (hC : ∀ j i, (∫ p in S, ‖V j i p‖ ^ 2) ≤ C) : |
| 88 | ∃ (k : ℕ → ℕ) (W : Fin 2 → Lp E 2 (volume.restrict S)), StrictMono k ∧ |
| 89 | ∀ i, WeakConverges (fun j => (hV (k j) i).toLp (V (k j) i)) (W i) := by |
| 90 | let : Fact ((2 : ℝ≥0∞) ≠ ⊤) := ⟨by norm_num⟩ |
| 91 | have hnorm (j : ℕ) (i : Fin 2) : |
| 92 | ‖(hV j i).toLp (V j i)‖ ≤ Real.sqrt (max C 0) := by |
| 93 | apply Real.le_sqrt_of_sq_le |
| 94 | rw [← real_inner_self_eq_norm_sq, L2.inner_def] |
| 95 | simp only [real_inner_self_eq_norm_sq] |
| 96 | calc |
| 97 | _ = ∫ p in S, ‖V j i p‖ ^ 2 := integral_congr_ae |
| 98 | ((hV j i).coeFn_toLp.mono fun p hp => congrArg (fun v : E => ‖v‖ ^ 2) hp) |
| 99 | _ ≤ C := hC j i |
| 100 | _ ≤ max C 0 := le_max_left _ _ |
| 101 | obtain ⟨w0, k0, hk0, hw0⟩ := m64SeparableHilbert_weak_subsequence |
| 102 | (fun j => (hV j 0).toLp (V j 0)) (fun j => hnorm j 0) |
| 103 | obtain ⟨w1, k1, hk1, hw1⟩ := m64SeparableHilbert_weak_subsequence |
| 104 | (fun j => (hV (k0 j) 1).toLp (V (k0 j) 1)) (fun j => hnorm (k0 j) 1) |
| 105 | refine ⟨k0 ∘ k1, ![w0, w1], hk0.comp hk1, ?_⟩ |
| 106 | intro i |
| 107 | fin_cases i |
| 108 | · exact fun L => (hw0 L).comp hk1.tendsto_atTop |
| 109 | · exact hw1 |
| 110 | |
| 111 | private theorem coordinate_test_apply |
| 112 | {S : Set LoopPlane} (phi : LoopPlane → ℝ) (hp : MemLp phi 2 (volume.restrict S)) |
| 113 | (b : Fin m) (u : Lp E 2 (volume.restrict S)) : |
| 114 | testIntegral phi hp (LpFiniteCoordinatesNative.coordinateLp (volume.restrict S) b u) = |
| 115 | ∫ p in S, phi p * u p b := by |
| 116 | rw [testIntegral_apply] |
| 117 | apply integral_congr_ae |
| 118 | filter_upwards [LpFiniteCoordinatesNative.coordinateLp_coe (volume.restrict S) b u] |
| 119 | with p hp |
| 120 | simp only [hp, smul_eq_mul] |
| 121 | |
| 122 | /-- Weak L2 limits of values and columns preserve the actual distributional partial |
| 123 | derivative. Proof expansion for Morgan-Tian (2007), Lemma 19.15, pp. 447-449. -/ |
| 124 | theorem m64Plane_weak_partial_closed |
| 125 | {S : Set LoopPlane} {u v : ℕ → Lp E 2 (volume.restrict S)} |
| 126 | {U V : Lp E 2 (volume.restrict S)} |
| 127 | (hu : WeakConverges u U) (hv : WeakConverges v V) (i : Fin 2) (b : Fin m) |
| 128 | (hw : ∀ j, HasWeakPartialDeriv i (fun p => v j p b) (fun p => u j p b) S) : |
| 129 | HasWeakPartialDeriv i (fun p => V p b) (fun p => U p b) S := by |
| 130 | intro phi hphi hc hs |
| 131 | let dphi : LoopPlane → ℝ := fun p => fderiv ℝ phi p (EuclideanSpace.single i 1) |
| 132 | have hp : MemLp phi 2 (volume.restrict S) := |
| 133 | (hphi.continuous.memLp_of_hasCompactSupport hc).mono_measure Measure.restrict_le_self |
| 134 | have hdp : MemLp dphi 2 (volume.restrict S) := |
| 135 | (((hphi.continuous_fderiv (by simp)).clm_apply continuous_const).memLp_of_hasCompactSupport |
| 136 | (hc.fderiv_apply ℝ _)).mono_measure Measure.restrict_le_self |
| 137 | let P := LpFiniteCoordinatesNative.coordinateLp (volume.restrict S) b |
| 138 | have hup : WeakConverges (fun j => P (u j)) (P U) := fun L => hu (L.comp P) |
| 139 | have hvp : WeakConverges (fun j => P (v j)) (P V) := fun L => hv (L.comp P) |
| 140 | have hlim := weak_limit_linear_identity hvp hup |
| 141 | (testIntegral (F := ℝ) dphi hdp) (testIntegral phi hp) (fun j => by |
| 142 | rw [coordinate_test_apply, coordinate_test_apply] |
| 143 | simpa only [dphi, mul_comm] using hw j phi hphi hc hs) |
| 144 | rw [coordinate_test_apply, coordinate_test_apply] at hlim |
| 145 | simpa only [dphi, mul_comm] using hlim |
| 146 | |
| 147 | /-- The actual derivative column of a C1 Euclidean map is its weak partial derivative on an |
| 148 | open domain. Proof expansion for Morgan-Tian (2007), Lemma 19.15, pp. 447-449. -/ |
| 149 | theorem m64Plane_c1_weak_partial |
| 150 | {S : Set LoopPlane} (hS : IsOpen S) {f : LoopPlane → E} (hf : ContDiff ℝ 1 f) |
| 151 | (i : Fin 2) (b : Fin m) : HasWeakPartialDeriv i |
| 152 | (fun p => (fderiv ℝ f p (EuclideanSpace.single i 1)) b) (fun p => f p b) S := by |
| 153 | let P := PiLp.proj (𝕜 := ℝ) 2 (fun _ : Fin m => ℝ) b |
| 154 | have hb : ContDiff ℝ 1 (fun p => f p b) := P.contDiff.comp hf |
| 155 | have hweak := HasWeakPartialDeriv.of_contDiff (Ω := S) hS (i := i) hb |
| 156 | have hd : (fun p => fderiv ℝ (fun q => f q b) p (EuclideanSpace.single i 1)) = |
| 157 | fun p => (fderiv ℝ f p (EuclideanSpace.single i 1)) b := by |
| 158 | funext p |
| 159 | have hh := (P.hasFDerivAt.comp p (hf.differentiable (by simp) p).hasFDerivAt).fderiv |
| 160 | exact congrArg (fun L => L (EuclideanSpace.single i 1)) hh |
| 161 | rwa [hd] at hweak |
| 162 | |
| 163 | end PoincareMT |