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.WeakProduct |
| 7 | |
| 8 | /-! |
| 9 | # Algebra of actual finite spatial weak jets |
| 10 | |
| 11 | The recursive predicate records L2 functions and their actual compact-test |
| 12 | weak spatial derivatives. Product closure uses the proved weak product rule. |
| 13 | |
| 14 | References: Evans, Section 5.2.1, pp. 256-257; |
| 15 | Morgan--Tian, Proposition 9.20, pp. 207-208. |
| 16 | -/ |
| 17 | |
| 18 | open Set MeasureTheory |
| 19 | open scoped ContDiff |
| 20 | |
| 21 | noncomputable section |
| 22 | |
| 23 | namespace Poincare.Analysis.Parabolic.WeakRegularity.Interior |
| 24 | |
| 25 | open Canonical |
| 26 | |
| 27 | /-- Finite spatial L2 regularity through actual recursive weak derivatives. -/ |
| 28 | def HasSpatialL2Jet {n : ℕ} (U : Set (Spacetime n)) : ℕ → (Spacetime n → ℝ) → Prop |
| 29 | | 0, u => MemLp u 2 (volume.restrict U) |
| 30 | | k + 1, u => MemLp u 2 (volume.restrict U) ∧ |
| 31 | ∃ g : Fin n → Spacetime n → ℝ, |
| 32 | (∀ i, HasSpatialL2Jet U k (g i)) ∧ |
| 33 | ∀ i (φ : Spacetime n → ℝ), ContDiff ℝ ∞ φ → HasCompactSupport φ → |
| 34 | tsupport φ ⊆ U → |
| 35 | (∫ y in U, φ y * g i y) = -(∫ y in U, spatialDeriv i φ y * u y) |
| 36 | |
| 37 | theorem HasSpatialL2Jet.memLp |
| 38 | {n k : ℕ} {U : Set (Spacetime n)} {u : Spacetime n → ℝ} |
| 39 | (hu : HasSpatialL2Jet U k u) : MemLp u 2 (volume.restrict U) := by |
| 40 | cases k with |
| 41 | | zero => exact hu |
| 42 | | succ k => exact hu.1 |
| 43 | |
| 44 | theorem HasSpatialL2Jet.locallyIntegrableOn |
| 45 | {n k : ℕ} {U : Set (Spacetime n)} {u : Spacetime n → ℝ} |
| 46 | (hu : HasSpatialL2Jet U k u) : LocallyIntegrableOn u U volume := |
| 47 | locallyIntegrableOn_of_locallyIntegrable_restrict (hu.memLp.locallyIntegrable (by norm_num)) |
| 48 | |
| 49 | private theorem jet_test_integrable |
| 50 | {n : ℕ} {U : Set (Spacetime n)} {u φ : Spacetime n → ℝ} |
| 51 | (hu : MemLp u 2 (volume.restrict U)) (hφ : ContDiff ℝ ∞ φ) |
| 52 | (hφc : HasCompactSupport φ) (hφU : tsupport φ ⊆ U) : |
| 53 | Integrable (fun y => φ y * u y) (volume.restrict U) := by |
| 54 | have hul := locallyIntegrableOn_of_locallyIntegrable_restrict |
| 55 | (hu.locallyIntegrable (by norm_num)) |
| 56 | have hi : Integrable (fun y => φ y * u y) := by |
| 57 | apply (integrableOn_iff_integrable_of_support_subset |
| 58 | ((Function.support_mul_subset_left φ u).trans (subset_tsupport φ))).mp |
| 59 | exact (hul.integrableOn_compact_subset hφU hφc).continuousOn_mul |
| 60 | hφ.continuous.continuousOn hφc |
| 61 | exact hi.integrableOn |
| 62 | |
| 63 | theorem HasSpatialL2Jet.restrict |
| 64 | {n k : ℕ} {U V : Set (Spacetime n)} {u : Spacetime n → ℝ} |
| 65 | (hu : HasSpatialL2Jet U k u) (hVU : V ⊆ U) : HasSpatialL2Jet V k u := by |
| 66 | induction k generalizing u with |
| 67 | | zero => exact hu.mono_measure (Measure.restrict_mono hVU le_rfl) |
| 68 | | succ k ih => |
| 69 | obtain ⟨hum, g, hg, hweak⟩ := hu |
| 70 | refine ⟨hum.mono_measure (Measure.restrict_mono hVU le_rfl), g, fun i => ih (hg i), ?_⟩ |
| 71 | intro i φ hφ hφc hφV |
| 72 | have hpair {ψ : Spacetime n → ℝ} (hψ : tsupport ψ ⊆ V) |
| 73 | (a : Spacetime n → ℝ) : (∫ y in V, ψ y * a y) = ∫ y in U, ψ y * a y := by |
| 74 | calc |
| 75 | _ = ∫ y, ψ y * a y := setIntegral_eq_integral_of_forall_compl_eq_zero |
| 76 | (fun y hy => by rw [image_eq_zero_of_notMem_tsupport (fun h => hy (hψ h)), zero_mul]) |
| 77 | _ = _ := (setIntegral_eq_integral_of_forall_compl_eq_zero |
| 78 | (fun y hy => by |
| 79 | rw [image_eq_zero_of_notMem_tsupport (fun h => hy (hVU (hψ h))), zero_mul])).symm |
| 80 | rw [hpair hφV, hpair (ψ := spatialDeriv i φ) |
| 81 | ((tsupport_fderiv_apply_subset ℝ (spatialDirection i)).trans hφV)] |
| 82 | exact hweak i φ hφ hφc (hφV.trans hVU) |
| 83 | |
| 84 | theorem HasSpatialL2Jet.lower |
| 85 | {n k : ℕ} {U : Set (Spacetime n)} {u : Spacetime n → ℝ} |
| 86 | (hu : HasSpatialL2Jet U (k + 1) u) : HasSpatialL2Jet U k u := by |
| 87 | induction k generalizing u with |
| 88 | | zero => exact hu.1 |
| 89 | | succ k ih => |
| 90 | obtain ⟨hum, g, hg, hweak⟩ := hu |
| 91 | exact ⟨hum, g, fun i => ih (hg i), hweak⟩ |
| 92 | |
| 93 | theorem HasSpatialL2Jet.of_le |
| 94 | {n j k : ℕ} {U : Set (Spacetime n)} {u : Spacetime n → ℝ} |
| 95 | (hu : HasSpatialL2Jet U k u) (hjk : j ≤ k) : HasSpatialL2Jet U j u := by |
| 96 | induction k generalizing j u with |
| 97 | | zero => |
| 98 | have hj : j = 0 := Nat.eq_zero_of_le_zero hjk |
| 99 | subst j |
| 100 | exact hu |
| 101 | | succ k ih => |
| 102 | by_cases he : j = k + 1 |
| 103 | · simpa only [he] using hu |
| 104 | · exact ih hu.lower (by omega) |
| 105 | |
| 106 | theorem HasSpatialL2Jet.zero |
| 107 | {n : ℕ} (U : Set (Spacetime n)) (k : ℕ) : |
| 108 | HasSpatialL2Jet U k (fun _ => 0) := by |
| 109 | induction k with |
| 110 | | zero => exact MemLp.zero |
| 111 | | succ k ih => |
| 112 | refine ⟨MemLp.zero, fun _ _ => 0, fun _ => ih, ?_⟩ |
| 113 | intro i φ hφ hφc hφU |
| 114 | simp |
| 115 | |
| 116 | theorem HasSpatialL2Jet.add |
| 117 | {n k : ℕ} {U : Set (Spacetime n)} {u w : Spacetime n → ℝ} |
| 118 | (hu : HasSpatialL2Jet U k u) (hw : HasSpatialL2Jet U k w) : |
| 119 | HasSpatialL2Jet U k (fun y => u y + w y) := by |
| 120 | induction k generalizing u w with |
| 121 | | zero => exact MemLp.add hu hw |
| 122 | | succ k ih => |
| 123 | obtain ⟨hum, g, hg, hgw⟩ := hu |
| 124 | obtain ⟨hwm, d, hd, hdw⟩ := hw |
| 125 | refine ⟨hum.add hwm, fun i y => g i y + d i y, fun i => ih (hg i) (hd i), ?_⟩ |
| 126 | intro i φ hφ hφc hφU |
| 127 | have hDφ : ContDiff ℝ ∞ (spatialDeriv i φ) := |
| 128 | (hφ.fderiv_right (by simp)).clm_apply contDiff_const |
| 129 | have hDφc : HasCompactSupport (spatialDeriv i φ) := hφc.fderiv_apply ℝ _ |
| 130 | have hDφU : tsupport (spatialDeriv i φ) ⊆ U := |
| 131 | (tsupport_fderiv_apply_subset ℝ (spatialDirection i)).trans hφU |
| 132 | simp only [mul_add] |
| 133 | rw [integral_add (jet_test_integrable (hg i).memLp hφ hφc hφU) |
| 134 | (jet_test_integrable (hd i).memLp hφ hφc hφU), |
| 135 | integral_add (jet_test_integrable hum hDφ hDφc hDφU) |
| 136 | (jet_test_integrable hwm hDφ hDφc hDφU), |
| 137 | hgw i φ hφ hφc hφU, hdw i φ hφ hφc hφU] |
| 138 | ring |
| 139 | |
| 140 | theorem HasSpatialL2Jet.neg |
| 141 | {n k : ℕ} {U : Set (Spacetime n)} {u : Spacetime n → ℝ} |
| 142 | (hu : HasSpatialL2Jet U k u) : HasSpatialL2Jet U k (fun y => -u y) := by |
| 143 | induction k generalizing u with |
| 144 | | zero => exact MemLp.neg hu |
| 145 | | succ k ih => |
| 146 | obtain ⟨hum, g, hg, hweak⟩ := hu |
| 147 | refine ⟨hum.neg, fun i y => -g i y, fun i => ih (hg i), ?_⟩ |
| 148 | intro i φ hφ hφc hφU |
| 149 | simp only [mul_neg, integral_neg, neg_neg] |
| 150 | linarith only [hweak i φ hφ hφc hφU] |
| 151 | |
| 152 | theorem HasSpatialL2Jet.sub |
| 153 | {n k : ℕ} {U : Set (Spacetime n)} {u w : Spacetime n → ℝ} |
| 154 | (hu : HasSpatialL2Jet U k u) (hw : HasSpatialL2Jet U k w) : |
| 155 | HasSpatialL2Jet U k (fun y => u y - w y) := by |
| 156 | simpa only [sub_eq_add_neg] using hu.add hw.neg |
| 157 | |
| 158 | theorem HasSpatialL2Jet.sum |
| 159 | {n k : ℕ} {U : Set (Spacetime n)} {ι : Type*} (s : Finset ι) |
| 160 | {f : ι → Spacetime n → ℝ} (hf : ∀ i ∈ s, HasSpatialL2Jet U k (f i)) : |
| 161 | HasSpatialL2Jet U k (fun y => ∑ i ∈ s, f i y) := by |
| 162 | classical |
| 163 | induction s using Finset.induction_on with |
| 164 | | empty => simpa using HasSpatialL2Jet.zero U k |
| 165 | | @insert i s hi ih => |
| 166 | simpa only [Finset.sum_insert hi] using (hf i (Finset.mem_insert_self _ _)).add |
| 167 | (ih (fun j hj => hf j (Finset.mem_insert_of_mem hj))) |
| 168 | |
| 169 | theorem HasSpatialL2Jet.mul_smooth |
| 170 | {n k : ℕ} {U : Set (Spacetime n)} {u q : Spacetime n → ℝ} |
| 171 | (hu : HasSpatialL2Jet U k u) (hU : IsOpen U) |
| 172 | (hq : ContDiff ℝ ∞ q) (hqc : HasCompactSupport q) : |
| 173 | HasSpatialL2Jet U k (fun y => q y * u y) := by |
| 174 | induction k generalizing u q with |
| 175 | | zero => |
| 176 | exact hu.mul' (hq.continuous.memLp_top_of_hasCompactSupport hqc (volume.restrict U)) |
| 177 | | succ k ih => |
| 178 | have hulower := hu.lower |
| 179 | obtain ⟨hum, g, hg, hweak⟩ := hu |
| 180 | have hDq (i : Fin n) : ContDiff ℝ ∞ (spatialDeriv i q) := |
| 181 | (hq.fderiv_right (by simp)).clm_apply contDiff_const |
| 182 | have hDqc (i : Fin n) : HasCompactSupport (spatialDeriv i q) := hqc.fderiv_apply ℝ _ |
| 183 | refine ⟨hum.mul' (hq.continuous.memLp_top_of_hasCompactSupport hqc (volume.restrict U)), |
| 184 | fun i y => spatialDeriv i q y * u y + q y * g i y, |
| 185 | fun i => (ih hulower (hDq i) (hDqc i)).add (ih (hg i) hq hqc), ?_⟩ |
| 186 | intro i φ hφ hφc hφU |
| 187 | exact (weak_directional_derivative_mul_smooth hU hq (spatialDirection i) |
| 188 | (locallyIntegrableOn_of_locallyIntegrable_restrict (hum.locallyIntegrable (by norm_num))) |
| 189 | (hg i).locallyIntegrableOn (hweak i)).2.2 φ hφ hφc hφU |
| 190 | |
| 191 | end Poincare.Analysis.Parabolic.WeakRegularity.Interior |
| 192 |