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.InteriorEstimates.Sobolev.HigherOrder |
| 2 | import PoincareLib.Analysis.Elliptic.Regularity.InteriorEstimates.Operators.LowerOrder |
| 3 | import PoincareLib.Analysis.Elliptic.Regularity.InteriorEstimates.Sobolev.H1Profile |
| 4 | |
| 5 | /-! |
| 6 | # Interior derivative estimates from elliptic powers |
| 7 | |
| 8 | Strong induction on the derivative order combines the drift energy estimate, |
| 9 | the higher-order principal estimate, and fixed intermediate neighborhoods. |
| 10 | The right-hand side contains actual iterates of the fixed elliptic operator. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | |
| 15 | open Set MeasureTheory Filter Topology |
| 16 | open scoped ENNReal ContDiff |
| 17 | open Poincare.Analysis.Sobolev.NirenbergEuclidean |
| 18 | open Poincare.Analysis.Elliptic.Iteration |
| 19 | |
| 20 | namespace Poincare.Analysis.Elliptic.InteriorEstimates |
| 21 | |
| 22 | variable {d : ℕ} |
| 23 | local notation "E" => EuclideanSpace ℝ (Fin d) |
| 24 | |
| 25 | /-- The finite sum of the local L2 norms of actual elliptic operator powers. -/ |
| 26 | def ellipticPowerProfile (a : E → Matrix (Fin d) (Fin d) ℝ) |
| 27 | (b : Fin d → E → ℝ) (V : Set E) (n : ℕ) (u : E → ℝ) : ℝ≥0∞ := |
| 28 | ∑ j ∈ Finset.range (n + 1), derivativeProfile 2 V 0 ((secondOrderOperator a b)^[j] u) |
| 29 | |
| 30 | theorem ellipticPowerProfile_mono_order |
| 31 | (a : E → Matrix (Fin d) (Fin d) ℝ) (b : Fin d → E → ℝ) |
| 32 | (V : Set E) {r s : ℕ} (hrs : r ≤ s) (u : E → ℝ) : |
| 33 | ellipticPowerProfile a b V r u ≤ ellipticPowerProfile a b V s u := by |
| 34 | exact Finset.sum_le_sum_of_subset_of_nonneg |
| 35 | (Finset.range_mono (Nat.add_le_add_right hrs 1)) (fun _ _ _ => zero_le) |
| 36 | |
| 37 | theorem ellipticPowerProfile_operator_le |
| 38 | (a : E → Matrix (Fin d) (Fin d) ℝ) (b : Fin d → E → ℝ) |
| 39 | (V : Set E) (r : ℕ) (u : E → ℝ) : |
| 40 | ellipticPowerProfile a b V r (secondOrderOperator a b u) ≤ |
| 41 | ellipticPowerProfile a b V (r + 1) u := by |
| 42 | unfold ellipticPowerProfile |
| 43 | rw [Finset.sum_range_succ' (n := r + 1)] |
| 44 | simp only [Function.iterate_succ_apply] |
| 45 | exact le_self_add |
| 46 | |
| 47 | theorem derivativeProfile_zero_le_ellipticPowerProfile |
| 48 | (a : E → Matrix (Fin d) (Fin d) ℝ) (b : Fin d → E → ℝ) |
| 49 | (V : Set E) (n : ℕ) (u : E → ℝ) : |
| 50 | derivativeProfile 2 V 0 u ≤ ellipticPowerProfile a b V n u := by |
| 51 | have h := ellipticPowerProfile_mono_order a b V (Nat.zero_le n) u |
| 52 | simpa [ellipticPowerProfile] using h |
| 53 | |
| 54 | theorem contDiff_iterate_secondOrderOperator |
| 55 | {a : E → Matrix (Fin d) (Fin d) ℝ} {b : Fin d → E → ℝ} |
| 56 | (ha : ∀ i j, ContDiff ℝ ∞ (fun x => a x i j)) |
| 57 | (hb : ∀ i, ContDiff ℝ ∞ (b i)) {u : E → ℝ} (hu : ContDiff ℝ ∞ u) (n : ℕ) : |
| 58 | ContDiff ℝ ∞ ((secondOrderOperator a b)^[n] u) := by |
| 59 | induction n with |
| 60 | | zero => simpa using hu |
| 61 | | succ n ih => |
| 62 | rw [Function.iterate_succ_apply'] |
| 63 | exact contDiff_secondOrderOperator ha hb ih |
| 64 | |
| 65 | theorem ellipticPowerProfile_ne_top |
| 66 | {a : E → Matrix (Fin d) (Fin d) ℝ} {b : Fin d → E → ℝ} |
| 67 | (ha : ∀ i j, ContDiff ℝ ∞ (fun x => a x i j)) |
| 68 | (hb : ∀ i, ContDiff ℝ ∞ (b i)) {V : Set E} (hVc : IsCompact (closure V)) |
| 69 | {u : E → ℝ} (hu : ContDiff ℝ ∞ u) (n : ℕ) : |
| 70 | ellipticPowerProfile a b V n u ≠ ⊤ := by |
| 71 | apply ENNReal.sum_ne_top.mpr |
| 72 | intro j hj |
| 73 | rw [derivativeProfile_zero] |
| 74 | exact ((continuous_memLp_on_compact |
| 75 | (contDiff_iterate_secondOrderOperator ha hb hu j).continuous hVc).mono_measure |
| 76 | (Measure.restrict_mono subset_closure le_rfl)).eLpNorm_ne_top |
| 77 | |
| 78 | /-- On fixed nested precompact open sets, finitely many L2 elliptic powers |
| 79 | control every classical derivative up to the prescribed order. -/ |
| 80 | theorem exists_derivativeProfile_le_ellipticPowerProfile [NeZero d] |
| 81 | {Ω : Set E} (B : SmoothEllipticBilinearForm d Ω) |
| 82 | (b : Fin d → E → ℝ) (hb : ∀ i, ContDiff ℝ ∞ (b i)) (n : ℕ) |
| 83 | {V W : Set E} (hV : IsOpen V) (hVc : IsCompact (closure V)) (hVΩ : closure V ⊆ Ω) |
| 84 | (hW : IsOpen W) (hWc : IsCompact (closure W)) (hWV : closure W ⊆ V) : |
| 85 | ∃ C : ℝ, 0 ≤ C ∧ ∀ {u : E → ℝ}, ContDiff ℝ ∞ u → |
| 86 | derivativeProfile 2 W n u ≤ ENNReal.ofReal C * ellipticPowerProfile B.a b V n u := by |
| 87 | induction n using Nat.strong_induction_on generalizing V W with |
| 88 | | h n ih => |
| 89 | cases n with |
| 90 | | zero => |
| 91 | refine ⟨1, zero_le_one, ?_⟩ |
| 92 | intro u hu |
| 93 | simpa [ellipticPowerProfile] using |
| 94 | derivativeProfile_mono_set (subset_closure.trans hWV) 2 0 u |
| 95 | | succ n => |
| 96 | cases n with |
| 97 | | zero => |
| 98 | obtain ⟨C, hC, hbound⟩ := exists_derivativeProfile_one_le_with_drift B |
| 99 | hV hVc (subset_closure.trans hVΩ) hW hWc hWV (driftCorrection B.a b) |
| 100 | (contDiff_driftCorrection B.smooth_a hb) |
| 101 | refine ⟨C, hC, ?_⟩ |
| 102 | intro u hu |
| 103 | have hLu := contDiff_secondOrderOperator B.smooth_a hb hu |
| 104 | have hmem := (continuous_memLp_on_compact hLu.neg.continuous hVc).mono_measure |
| 105 | (Measure.restrict_mono subset_closure le_rfl) |
| 106 | have heq : ∀ φ : E → ℝ, ContDiff ℝ ∞ φ → HasCompactSupport φ → tsupport φ ⊆ V → |
| 107 | (∫ x in V, B.principalIntegrand u φ x) = |
| 108 | ∫ x in V, (-secondOrderOperator B.a b u x + |
| 109 | ∑ i, driftCorrection B.a b i x * partialDeriv i u x) * φ x := by |
| 110 | intro φ hφ hφc hφV |
| 111 | rw [principal_equation_of_smooth B hV hu φ hφ hφc hφV] |
| 112 | apply integral_congr_ae |
| 113 | exact Eventually.of_forall fun x => by |
| 114 | change principalSource B.a u x * φ x = |
| 115 | (-secondOrderOperator B.a b u x + |
| 116 | ∑ i, driftCorrection B.a b i x * partialDeriv i u x) * φ x |
| 117 | exact congrArg (fun z : ℝ => z * φ x) |
| 118 | (principalSource_eq_secondOrderOperator b B.smooth_a hu x) |
| 119 | have h := hbound hu hmem heq |
| 120 | simpa [ellipticPowerProfile, Finset.sum_range_succ, derivativeProfile_neg] using h |
| 121 | | succ r => |
| 122 | obtain ⟨U, hU, hWU, hUV⟩ := |
| 123 | hWc.exists_isOpen_closure_subset (hV.mem_nhdsSet.mpr hWV) |
| 124 | have hUc : IsCompact (closure U) := |
| 125 | hVc.of_isClosed_subset isClosed_closure (hUV.trans subset_closure) |
| 126 | have hUΩ : closure U ⊆ Ω := hUV.trans (subset_closure.trans hVΩ) |
| 127 | obtain ⟨H, hH, hprincipal⟩ := |
| 128 | exists_derivativeProfile_add_two_le_source B r hU hUc hUΩ hW hWc hWU |
| 129 | obtain ⟨D, hD, hsource⟩ := |
| 130 | exists_principalSource_profile_le hU hUc B.a b B.smooth_a hb r |
| 131 | obtain ⟨A, hA, hoperator⟩ := ih r (by omega) hV hVc hVΩ hU hUc hUV |
| 132 | obtain ⟨F, hF, hlower⟩ := ih (r + 1) (by omega) hV hVc hVΩ hU hUc hUV |
| 133 | refine ⟨H * (1 + D * (A + F)), by positivity, ?_⟩ |
| 134 | intro u hu |
| 135 | let P := ellipticPowerProfile B.a b V (r + 2) u |
| 136 | have hzero : derivativeProfile 2 U 0 u ≤ P := |
| 137 | (derivativeProfile_mono_set (subset_closure.trans hUV) 2 0 u).trans |
| 138 | (derivativeProfile_zero_le_ellipticPowerProfile B.a b V (r + 2) u) |
| 139 | have hop : derivativeProfile 2 U r (secondOrderOperator B.a b u) ≤ |
| 140 | ENNReal.ofReal A * P := by |
| 141 | apply (hoperator (contDiff_secondOrderOperator B.smooth_a hb hu)).trans |
| 142 | apply mul_le_mul_of_nonneg_left _ zero_le |
| 143 | exact (ellipticPowerProfile_operator_le B.a b V r u).trans |
| 144 | (ellipticPowerProfile_mono_order B.a b V (by omega) u) |
| 145 | have huLower : derivativeProfile 2 U (r + 1) u ≤ ENNReal.ofReal F * P := by |
| 146 | apply (hlower hu).trans |
| 147 | apply mul_le_mul_of_nonneg_left _ zero_le |
| 148 | exact ellipticPowerProfile_mono_order B.a b V (by omega) u |
| 149 | have hs : derivativeProfile 2 U r (principalSource B.a u) ≤ |
| 150 | ENNReal.ofReal (D * (A + F)) * P := by |
| 151 | apply (hsource hu).trans |
| 152 | calc |
| 153 | _ ≤ ENNReal.ofReal D * (ENNReal.ofReal A * P + ENNReal.ofReal F * P) := |
| 154 | mul_le_mul_of_nonneg_left (add_le_add hop huLower) zero_le |
| 155 | _ = _ := by |
| 156 | rw [ENNReal.ofReal_mul hD, ENNReal.ofReal_add hA hF] |
| 157 | ring |
| 158 | have h := hprincipal hu (contDiff_principalSource B.smooth_a hu) |
| 159 | (weakEquation_principalSource hU B.smooth_a hu) |
| 160 | apply h.trans |
| 161 | calc |
| 162 | _ ≤ ENNReal.ofReal H * (P + ENNReal.ofReal (D * (A + F)) * P) := |
| 163 | mul_le_mul_of_nonneg_left (add_le_add hzero hs) zero_le |
| 164 | _ = _ := by |
| 165 | rw [ENNReal.ofReal_mul hH, |
| 166 | ENNReal.ofReal_add zero_le_one (mul_nonneg hD (add_nonneg hA hF)), |
| 167 | ENNReal.ofReal_one] |
| 168 | ring |
| 169 | |
| 170 | end Poincare.Analysis.Elliptic.InteriorEstimates |