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.Parabolic.WeakRegularity.Interior.Jets.SpatialJetMollification |
| 7 | import PoincareLib.Analysis.Parabolic.WeakRegularity.Interior.Jets.WeakCommutation |
| 8 | |
| 9 | /-! |
| 10 | # Mixed time and spatial weak jets |
| 11 | |
| 12 | The recursive predicate records spatial L2 jets of successive actual weak |
| 13 | time derivatives. Spatial differentiation preserves the available time order |
| 14 | by commuting weak derivatives on compact smooth tests. |
| 15 | |
| 16 | References: Evans, Section 5.2.1, pp. 256-257; |
| 17 | Morgan--Tian, Proposition 9.20, pp. 207-208. |
| 18 | -/ |
| 19 | |
| 20 | open Set MeasureTheory |
| 21 | open scoped ContDiff |
| 22 | |
| 23 | noncomputable section |
| 24 | |
| 25 | namespace Poincare.Analysis.Parabolic.WeakRegularity.Interior |
| 26 | |
| 27 | open Canonical |
| 28 | |
| 29 | /-- Spatial L2 jets through order `k` for successive weak time derivatives |
| 30 | through order `m`, with every derivative identified by compact test pairings. -/ |
| 31 | def HasTimeSpatialL2Jet {n : ℕ} (U : Set (Spacetime n)) : |
| 32 | ℕ → ℕ → (Spacetime n → ℝ) → Prop |
| 33 | | 0, k, u => HasSpatialL2Jet U k u |
| 34 | | m + 1, k, u => HasSpatialL2Jet U k u ∧ |
| 35 | ∃ T : Spacetime n → ℝ, HasTimeSpatialL2Jet U m k T ∧ |
| 36 | ∀ φ : Spacetime n → ℝ, ContDiff ℝ ∞ φ → HasCompactSupport φ → |
| 37 | tsupport φ ⊆ U → |
| 38 | (∫ y in U, φ y * T y) = -(∫ y in U, timeDeriv φ y * u y) |
| 39 | |
| 40 | /-- Mixed weak regularity contains its zeroth time level. -/ |
| 41 | theorem HasTimeSpatialL2Jet.spatial |
| 42 | {n m k : ℕ} {U : Set (Spacetime n)} {u : Spacetime n → ℝ} |
| 43 | (hu : HasTimeSpatialL2Jet U m k u) : HasSpatialL2Jet U k u := by |
| 44 | cases m with |
| 45 | | zero => exact hu |
| 46 | | succ m => exact hu.1 |
| 47 | |
| 48 | /-- Every mixed weak jet has a square-integrable value. -/ |
| 49 | theorem HasTimeSpatialL2Jet.memLp |
| 50 | {n m k : ℕ} {U : Set (Spacetime n)} {u : Spacetime n → ℝ} |
| 51 | (hu : HasTimeSpatialL2Jet U m k u) : MemLp u 2 (volume.restrict U) := |
| 52 | hu.spatial.memLp |
| 53 | |
| 54 | /-- Every mixed weak jet is locally integrable on its domain. -/ |
| 55 | theorem HasTimeSpatialL2Jet.locallyIntegrableOn |
| 56 | {n m k : ℕ} {U : Set (Spacetime n)} {u : Spacetime n → ℝ} |
| 57 | (hu : HasTimeSpatialL2Jet U m k u) : LocallyIntegrableOn u U volume := |
| 58 | hu.spatial.locallyIntegrableOn |
| 59 | |
| 60 | /-- Mixed weak jets are invariant under almost-everywhere equality. -/ |
| 61 | theorem HasTimeSpatialL2Jet.congr_ae |
| 62 | {n m k : ℕ} {U : Set (Spacetime n)} {u v : Spacetime n → ℝ} |
| 63 | (hu : HasTimeSpatialL2Jet U m k u) (huv : u =ᵐ[volume.restrict U] v) : |
| 64 | HasTimeSpatialL2Jet U m k v := by |
| 65 | cases m with |
| 66 | | zero => exact HasSpatialL2Jet.congr_ae hu huv |
| 67 | | succ m => |
| 68 | obtain ⟨hus, T, hT, hTw⟩ := hu |
| 69 | refine ⟨hus.congr_ae huv, T, hT, ?_⟩ |
| 70 | intro φ hφ hφc hφU |
| 71 | rw [hTw φ hφ hφc hφU] |
| 72 | congr 1 |
| 73 | exact integral_congr_ae (huv.mono fun y hy => |
| 74 | congrArg (fun a => timeDeriv φ y * a) hy) |
| 75 | |
| 76 | /-- Restrict all mixed weak jets to a smaller domain. -/ |
| 77 | theorem HasTimeSpatialL2Jet.restrict |
| 78 | {n m k : ℕ} {U V : Set (Spacetime n)} {u : Spacetime n → ℝ} |
| 79 | (hu : HasTimeSpatialL2Jet U m k u) (hVU : V ⊆ U) : |
| 80 | HasTimeSpatialL2Jet V m k u := by |
| 81 | induction m generalizing u with |
| 82 | | zero => exact HasSpatialL2Jet.restrict hu hVU |
| 83 | | succ m ih => |
| 84 | obtain ⟨hus, T, hT, hTw⟩ := hu |
| 85 | refine ⟨hus.restrict hVU, T, ih hT, ?_⟩ |
| 86 | intro φ hφ hφc hφV |
| 87 | have hpair {ψ : Spacetime n → ℝ} (hψ : tsupport ψ ⊆ V) |
| 88 | (a : Spacetime n → ℝ) : (∫ y in V, ψ y * a y) = ∫ y in U, ψ y * a y := by |
| 89 | calc |
| 90 | _ = ∫ y, ψ y * a y := setIntegral_eq_integral_of_forall_compl_eq_zero |
| 91 | (fun y hy => by rw [image_eq_zero_of_notMem_tsupport (fun h => hy (hψ h)), zero_mul]) |
| 92 | _ = _ := (setIntegral_eq_integral_of_forall_compl_eq_zero |
| 93 | (fun y hy => by |
| 94 | rw [image_eq_zero_of_notMem_tsupport (fun h => hy (hVU (hψ h))), zero_mul])).symm |
| 95 | rw [hpair hφV, hpair (ψ := timeDeriv φ) |
| 96 | ((tsupport_fderiv_apply_subset ℝ (0, 1)).trans hφV)] |
| 97 | exact hTw φ hφ hφc (hφV.trans hVU) |
| 98 | |
| 99 | /-- Forget one spatial derivative at every time level. -/ |
| 100 | theorem HasTimeSpatialL2Jet.lower_spatial |
| 101 | {n m k : ℕ} {U : Set (Spacetime n)} {u : Spacetime n → ℝ} |
| 102 | (hu : HasTimeSpatialL2Jet U m (k + 1) u) : HasTimeSpatialL2Jet U m k u := by |
| 103 | induction m generalizing u with |
| 104 | | zero => exact hu.lower |
| 105 | | succ m ih => |
| 106 | obtain ⟨hus, T, hT, hTw⟩ := hu |
| 107 | exact ⟨hus.lower, T, ih hT, hTw⟩ |
| 108 | |
| 109 | /-- Forget spatial derivatives above a smaller chosen order. -/ |
| 110 | theorem HasTimeSpatialL2Jet.of_spatial_le |
| 111 | {n m j k : ℕ} {U : Set (Spacetime n)} {u : Spacetime n → ℝ} |
| 112 | (hu : HasTimeSpatialL2Jet U m k u) (hjk : j ≤ k) : |
| 113 | HasTimeSpatialL2Jet U m j u := by |
| 114 | induction m generalizing u with |
| 115 | | zero => exact hu.of_le hjk |
| 116 | | succ m ih => |
| 117 | obtain ⟨hus, T, hT, hTw⟩ := hu |
| 118 | exact ⟨hus.of_le hjk, T, ih hT, hTw⟩ |
| 119 | |
| 120 | /-- Forget the highest time derivative. -/ |
| 121 | theorem HasTimeSpatialL2Jet.lower_time |
| 122 | {n m k : ℕ} {U : Set (Spacetime n)} {u : Spacetime n → ℝ} |
| 123 | (hu : HasTimeSpatialL2Jet U (m + 1) k u) : HasTimeSpatialL2Jet U m k u := by |
| 124 | induction m generalizing u with |
| 125 | | zero => exact hu.1 |
| 126 | | succ m ih => |
| 127 | obtain ⟨hus, T, hT, hTw⟩ := hu |
| 128 | exact ⟨hus, T, ih hT, hTw⟩ |
| 129 | |
| 130 | /-- Forget time derivatives above a smaller chosen order. -/ |
| 131 | theorem HasTimeSpatialL2Jet.of_time_le |
| 132 | {n j m k : ℕ} {U : Set (Spacetime n)} {u : Spacetime n → ℝ} |
| 133 | (hu : HasTimeSpatialL2Jet U m k u) (hjm : j ≤ m) : |
| 134 | HasTimeSpatialL2Jet U j k u := by |
| 135 | induction m generalizing j u with |
| 136 | | zero => |
| 137 | have hj : j = 0 := Nat.eq_zero_of_le_zero hjm |
| 138 | subst j |
| 139 | exact hu |
| 140 | | succ m ih => |
| 141 | by_cases hj : j = m + 1 |
| 142 | · simpa only [hj] using hu |
| 143 | · exact ih hu.lower_time (by omega) |
| 144 | |
| 145 | private theorem time_jet_test_integrable |
| 146 | {n : ℕ} {U : Set (Spacetime n)} {u φ : Spacetime n → ℝ} |
| 147 | (hu : MemLp u 2 (volume.restrict U)) (hφ : ContDiff ℝ ∞ φ) |
| 148 | (hφc : HasCompactSupport φ) (hφU : tsupport φ ⊆ U) : |
| 149 | Integrable (fun y => φ y * u y) (volume.restrict U) := by |
| 150 | have hul := locallyIntegrableOn_of_locallyIntegrable_restrict |
| 151 | (hu.locallyIntegrable (by norm_num)) |
| 152 | have hi : Integrable (fun y => φ y * u y) := by |
| 153 | apply (integrableOn_iff_integrable_of_support_subset |
| 154 | ((Function.support_mul_subset_left φ u).trans (subset_tsupport φ))).mp |
| 155 | exact (hul.integrableOn_compact_subset hφU hφc).continuousOn_mul |
| 156 | hφ.continuous.continuousOn hφc |
| 157 | exact hi.integrableOn |
| 158 | |
| 159 | /-- Zero has mixed weak jets of every finite order. -/ |
| 160 | theorem HasTimeSpatialL2Jet.zero |
| 161 | {n : ℕ} (U : Set (Spacetime n)) (m k : ℕ) : |
| 162 | HasTimeSpatialL2Jet U m k (fun _ => 0) := by |
| 163 | induction m with |
| 164 | | zero => exact HasSpatialL2Jet.zero U k |
| 165 | | succ m ih => |
| 166 | refine ⟨HasSpatialL2Jet.zero U k, fun _ => 0, ih, ?_⟩ |
| 167 | intro φ hφ hφc hφU |
| 168 | simp |
| 169 | |
| 170 | /-- Addition preserves the available mixed weak derivatives. -/ |
| 171 | theorem HasTimeSpatialL2Jet.add |
| 172 | {n m k : ℕ} {U : Set (Spacetime n)} {u w : Spacetime n → ℝ} |
| 173 | (hu : HasTimeSpatialL2Jet U m k u) (hw : HasTimeSpatialL2Jet U m k w) : |
| 174 | HasTimeSpatialL2Jet U m k (fun y => u y + w y) := by |
| 175 | induction m generalizing u w with |
| 176 | | zero => exact HasSpatialL2Jet.add hu hw |
| 177 | | succ m ih => |
| 178 | obtain ⟨hus, T, hT, hTw⟩ := hu |
| 179 | obtain ⟨hws, S, hS, hSw⟩ := hw |
| 180 | refine ⟨hus.add hws, fun y => T y + S y, ih hT hS, ?_⟩ |
| 181 | intro φ hφ hφc hφU |
| 182 | have hDφ : ContDiff ℝ ∞ (timeDeriv φ) := |
| 183 | (hφ.fderiv_right (by simp)).clm_apply contDiff_const |
| 184 | have hDφc : HasCompactSupport (timeDeriv φ) := hφc.fderiv_apply ℝ _ |
| 185 | have hDφU : tsupport (timeDeriv φ) ⊆ U := |
| 186 | (tsupport_fderiv_apply_subset ℝ (0, 1)).trans hφU |
| 187 | simp only [mul_add] |
| 188 | rw [integral_add (time_jet_test_integrable hT.memLp hφ hφc hφU) |
| 189 | (time_jet_test_integrable hS.memLp hφ hφc hφU), |
| 190 | integral_add (time_jet_test_integrable hus.memLp hDφ hDφc hDφU) |
| 191 | (time_jet_test_integrable hws.memLp hDφ hDφc hDφU), |
| 192 | hTw φ hφ hφc hφU, hSw φ hφ hφc hφU] |
| 193 | ring |
| 194 | |
| 195 | /-- Negation preserves mixed weak jets. -/ |
| 196 | theorem HasTimeSpatialL2Jet.neg |
| 197 | {n m k : ℕ} {U : Set (Spacetime n)} {u : Spacetime n → ℝ} |
| 198 | (hu : HasTimeSpatialL2Jet U m k u) : HasTimeSpatialL2Jet U m k (fun y => -u y) := by |
| 199 | induction m generalizing u with |
| 200 | | zero => exact HasSpatialL2Jet.neg hu |
| 201 | | succ m ih => |
| 202 | obtain ⟨hus, T, hT, hTw⟩ := hu |
| 203 | refine ⟨hus.neg, fun y => -T y, ih hT, ?_⟩ |
| 204 | intro φ hφ hφc hφU |
| 205 | simp only [mul_neg, integral_neg, neg_neg] |
| 206 | linarith only [hTw φ hφ hφc hφU] |
| 207 | |
| 208 | /-- Subtraction preserves mixed weak jets. -/ |
| 209 | theorem HasTimeSpatialL2Jet.sub |
| 210 | {n m k : ℕ} {U : Set (Spacetime n)} {u w : Spacetime n → ℝ} |
| 211 | (hu : HasTimeSpatialL2Jet U m k u) (hw : HasTimeSpatialL2Jet U m k w) : |
| 212 | HasTimeSpatialL2Jet U m k (fun y => u y - w y) := by |
| 213 | simpa only [sub_eq_add_neg] using hu.add hw.neg |
| 214 | |
| 215 | /-- A finite sum retains common mixed weak orders. -/ |
| 216 | theorem HasTimeSpatialL2Jet.sum |
| 217 | {n m k : ℕ} {U : Set (Spacetime n)} {ι : Type*} (s : Finset ι) |
| 218 | {f : ι → Spacetime n → ℝ} (hf : ∀ i ∈ s, HasTimeSpatialL2Jet U m k (f i)) : |
| 219 | HasTimeSpatialL2Jet U m k (fun y => ∑ i ∈ s, f i y) := by |
| 220 | classical |
| 221 | induction s using Finset.induction_on with |
| 222 | | empty => simpa using HasTimeSpatialL2Jet.zero U m k |
| 223 | | @insert i s hi ih => |
| 224 | simpa only [Finset.sum_insert hi] using (hf i (Finset.mem_insert_self _ _)).add |
| 225 | (ih (fun j hj => hf j (Finset.mem_insert_of_mem hj))) |
| 226 | |
| 227 | /-- Multiplication by a smooth compact coefficient preserves mixed weak jets. -/ |
| 228 | theorem HasTimeSpatialL2Jet.mul_smooth |
| 229 | {n m k : ℕ} {U : Set (Spacetime n)} {u q : Spacetime n → ℝ} |
| 230 | (hu : HasTimeSpatialL2Jet U m k u) (hU : IsOpen U) |
| 231 | (hq : ContDiff ℝ ∞ q) (hqc : HasCompactSupport q) : |
| 232 | HasTimeSpatialL2Jet U m k (fun y => q y * u y) := by |
| 233 | induction m generalizing u q with |
| 234 | | zero => exact HasSpatialL2Jet.mul_smooth hu hU hq hqc |
| 235 | | succ m ih => |
| 236 | have hulower := hu.lower_time |
| 237 | obtain ⟨hus, T, hT, hTw⟩ := hu |
| 238 | have hDq : ContDiff ℝ ∞ (timeDeriv q) := |
| 239 | (hq.fderiv_right (by simp)).clm_apply contDiff_const |
| 240 | have hDqc : HasCompactSupport (timeDeriv q) := hqc.fderiv_apply ℝ _ |
| 241 | refine ⟨hus.mul_smooth hU hq hqc, |
| 242 | fun y => timeDeriv q y * u y + q y * T y, |
| 243 | (ih hulower hDq hDqc).add (ih hT hq hqc), ?_⟩ |
| 244 | intro φ hφ hφc hφU |
| 245 | exact (weak_directional_derivative_mul_smooth hU hq (0, 1) |
| 246 | hus.locallyIntegrableOn hT.locallyIntegrableOn hTw).2.2 φ hφ hφc hφU |
| 247 | |
| 248 | /-- Spatial differentiation lowers the spatial order by one and retains every |
| 249 | available weak time derivative. -/ |
| 250 | theorem HasTimeSpatialL2Jet.exists_spatial_derivatives |
| 251 | {n m k : ℕ} {U : Set (Spacetime n)} {u : Spacetime n → ℝ} |
| 252 | (hu : HasTimeSpatialL2Jet U m (k + 1) u) (hU : IsOpen U) : |
| 253 | ∃ g : Fin n → Spacetime n → ℝ, |
| 254 | (∀ i, HasTimeSpatialL2Jet U m k (g i)) ∧ |
| 255 | ∀ i (φ : Spacetime n → ℝ), ContDiff ℝ ∞ φ → HasCompactSupport φ → |
| 256 | tsupport φ ⊆ U → |
| 257 | (∫ y in U, φ y * g i y) = -(∫ y in U, spatialDeriv i φ y * u y) := by |
| 258 | induction m generalizing u with |
| 259 | | zero => exact hu.2 |
| 260 | | succ m ih => |
| 261 | obtain ⟨hus, T, hT, hTw⟩ := hu |
| 262 | obtain ⟨hum, g, hg, hgw⟩ := hus |
| 263 | obtain ⟨d, hd, hdw⟩ := ih hT |
| 264 | refine ⟨g, ?_, hgw⟩ |
| 265 | intro i |
| 266 | refine ⟨hg i, d i, hd i, ?_⟩ |
| 267 | intro φ hφ hφc hφU |
| 268 | exact weak_directional_derivative_comm hU (0, 1) (spatialDirection i) |
| 269 | (locallyIntegrableOn_of_locallyIntegrable_restrict (hum.locallyIntegrable (by norm_num))) |
| 270 | hT.locallyIntegrableOn (hg i).locallyIntegrableOn (hd i).locallyIntegrableOn |
| 271 | hTw (hgw i) (hdw i) hφ hφc hφU |
| 272 | |
| 273 | end Poincare.Analysis.Parabolic.WeakRegularity.Interior |
| 274 |