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.SpatialJetAlgebra |
| 7 | import PoincareLib.Analysis.Parabolic.WeakRegularity.Interior.Jets.WeakConvolution |
| 8 | import PoincareLib.Analysis.Parabolic.WeakRegularity.Interior.Jets.KernelBuffer |
| 9 | import PoincareLib.Analysis.Parabolic.WeakRegularity.Interior.Energy.MollifiedL2Energy |
| 10 | |
| 11 | /-! |
| 12 | # Mollified energy of actual finite spatial weak jets |
| 13 | |
| 14 | Recursive weak-convolution identities identify actual iterated derivatives |
| 15 | with convolutions of zero-extended L2 jet fields. Young's inequality then |
| 16 | provides a uniform energy bound for the entire finite derivative family. |
| 17 | |
| 18 | References: Evans, Sections 5.2.1 and 5.3.1, pp. 256-257 and 264-265; |
| 19 | Morgan--Tian, Proposition 9.20, pp. 207-208. |
| 20 | -/ |
| 21 | |
| 22 | open Set MeasureTheory Filter Metric |
| 23 | open Poincare.Analysis.Convolution |
| 24 | open scoped ContDiff Topology |
| 25 | |
| 26 | noncomputable section |
| 27 | |
| 28 | namespace Poincare.Analysis.Parabolic.WeakRegularity.Interior |
| 29 | |
| 30 | open Canonical |
| 31 | |
| 32 | theorem HasSpatialL2Jet.congr_ae |
| 33 | {n k : ℕ} {U : Set (Spacetime n)} {u v : Spacetime n → ℝ} |
| 34 | (hu : HasSpatialL2Jet U k u) (huv : u =ᵐ[volume.restrict U] v) : |
| 35 | HasSpatialL2Jet U k v := by |
| 36 | cases k with |
| 37 | | zero => exact MemLp.ae_eq huv hu |
| 38 | | succ k => |
| 39 | obtain ⟨hum, g, hg, hweak⟩ := hu |
| 40 | refine ⟨MemLp.ae_eq huv hum, g, hg, ?_⟩ |
| 41 | intro i φ hφ hφc hφU |
| 42 | rw [hweak i φ hφ hφc hφU] |
| 43 | congr 1 |
| 44 | exact integral_congr_ae (huv.mono fun y hy => |
| 45 | congrArg (fun a => spatialDeriv i φ y * a) hy) |
| 46 | |
| 47 | /-- Apply the first direction to the function, then recurse through the tail. -/ |
| 48 | def iteratedSpatialDeriv {n : ℕ} : |
| 49 | (k : ℕ) → (Fin k → Fin n) → (Spacetime n → ℝ) → Spacetime n → ℝ |
| 50 | | 0, _, u => u |
| 51 | | k + 1, p, u => iteratedSpatialDeriv k (Fin.tail p) (spatialDeriv (p 0) u) |
| 52 | |
| 53 | private theorem iteratedSpatialDeriv_congr |
| 54 | {n k : ℕ} {V : Set (Spacetime n)} {u w : Spacetime n → ℝ} |
| 55 | (hV : IsOpen V) (huw : EqOn u w V) : |
| 56 | ∀ p : Fin k → Fin n, EqOn (iteratedSpatialDeriv k p u) (iteratedSpatialDeriv k p w) V := by |
| 57 | induction k generalizing u w with |
| 58 | | zero => intro p; exact huw |
| 59 | | succ k ih => |
| 60 | intro p |
| 61 | apply ih |
| 62 | intro y hy |
| 63 | exact congrArg (fun A : Spacetime n →L[ℝ] ℝ => A (spatialDirection (p 0))) |
| 64 | (huw.eventuallyEq_of_mem (hV.mem_nhds hy)).fderiv_eq |
| 65 | |
| 66 | theorem HasSpatialL2Jet.exists_mollified_iterated_representatives |
| 67 | {n k : ℕ} {U : Set (Spacetime n)} {u : Spacetime n → ℝ} |
| 68 | (hu : HasSpatialL2Jet U k u) (hU : IsOpen U) : |
| 69 | ∃ G : (Fin k → Fin n) → Spacetime n → ℝ, |
| 70 | (∀ p, MemLp (G p) 2 (volume.restrict U)) ∧ |
| 71 | ∀ (η : Spacetime n → ℝ), ContDiff ℝ ∞ η → HasCompactSupport η → |
| 72 | ∀ (V : Set (Spacetime n)), IsOpen V → |
| 73 | (∀ x ∈ V, tsupport (translatedKernel η x) ⊆ U) → |
| 74 | ∀ p : Fin k → Fin n, |
| 75 | EqOn (iteratedSpatialDeriv k p (lebesgueConvolution η u)) |
| 76 | (lebesgueConvolution η (U.indicator (G p))) V := by |
| 77 | induction k generalizing u with |
| 78 | | zero => |
| 79 | refine ⟨fun _ => u, fun _ => hu, ?_⟩ |
| 80 | intro η hη hηc V hV hs p x hx |
| 81 | change (∫ y, η (x-y) * u y) = ∫ y, η (x-y) * U.indicator u y |
| 82 | apply integral_congr_ae |
| 83 | filter_upwards [] with y |
| 84 | by_cases hy : y ∈ U |
| 85 | · rw [indicator_of_mem hy] |
| 86 | · have hzero : η (x-y) = 0 := |
| 87 | image_eq_zero_of_notMem_tsupport (f := translatedKernel η x) |
| 88 | (fun h => hy (hs x hx h)) |
| 89 | rw [hzero, zero_mul, zero_mul] |
| 90 | | succ k ih => |
| 91 | obtain ⟨hum, g, hg, hweak⟩ := hu |
| 92 | have hrep (i : Fin n) := ih (hg i) |
| 93 | choose G hGm hGe using hrep |
| 94 | refine ⟨fun p => G (p 0) (Fin.tail p), fun p => hGm (p 0) (Fin.tail p), ?_⟩ |
| 95 | intro η hη hηc V hV hs p |
| 96 | have hfirst : EqOn (spatialDeriv (p 0) (lebesgueConvolution η u)) |
| 97 | (lebesgueConvolution η (g (p 0))) V := by |
| 98 | intro x hx |
| 99 | exact fderiv_lebesgueConvolution_eq_weakDerivative hU |
| 100 | (locallyIntegrableOn_of_locallyIntegrable_restrict (hum.locallyIntegrable (by norm_num))) |
| 101 | (hg (p 0)).locallyIntegrableOn (hweak (p 0)) hη hηc (hs x hx) |
| 102 | exact (iteratedSpatialDeriv_congr hV hfirst (Fin.tail p)).trans |
| 103 | (hGe (p 0) η hη hηc V hV hs (Fin.tail p)) |
| 104 | |
| 105 | theorem HasSpatialL2Jet.exists_uniform_mollified_spatial_energy |
| 106 | {n k : ℕ} {U : Set (Spacetime n)} {u : Spacetime n → ℝ} |
| 107 | (hu : HasSpatialL2Jet U k u) (hU : IsOpen U) |
| 108 | {z : Spacetime n} (hz : z ∈ U) |
| 109 | {ρ : Spacetime n → ℝ} (hρ : ContDiff ℝ ∞ ρ) (hρc : HasCompactSupport ρ) : |
| 110 | ∃ s : ℝ, 0 < s ∧ closedBall z s ⊆ U ∧ |
| 111 | ∃ ε B : ℝ, 0 < ε ∧ 0 < B ∧ ∀ r : ℝ, 0 < r → r ≤ ε → |
| 112 | (∫ y in ball z s, ∑ p : Fin k → Fin n, |
| 113 | (iteratedSpatialDeriv k p (mollifiedValue u ρ r) y) ^ 2) ≤ B := by |
| 114 | classical |
| 115 | obtain ⟨G, hGm, hGe⟩ := hu.exists_mollified_iterated_representatives hU |
| 116 | let G₀ (p : Fin k → Fin n) := U.indicator (G p) |
| 117 | have hG₀ (p : Fin k → Fin n) : MemLp (G₀ p) 2 volume := |
| 118 | (memLp_indicator_iff_restrict hU.measurableSet).mpr (hGm p) |
| 119 | obtain ⟨R, hR, hRU⟩ := Metric.mem_nhds_iff.mp (hU.mem_nhds hz) |
| 120 | let s := R / 2 |
| 121 | have hs : 0 < s := by dsimp only [s]; positivity |
| 122 | have hsU : closedBall z s ⊆ U := by |
| 123 | intro y hy |
| 124 | apply hRU |
| 125 | exact (mem_closedBall.mp hy).trans_lt (by dsimp only [s]; linarith) |
| 126 | obtain ⟨ε, hε, hsupport⟩ := exists_uniform_translated_rescaledKernel_support_subset |
| 127 | (isCompact_closedBall z s) hU hsU hρc |
| 128 | let A : ℝ := ∑ p : Fin k → Fin n, (∫ y, ‖ρ y‖) ^ 2 * (∫ y, G₀ p y ^ 2) |
| 129 | have hA : 0 ≤ A := Finset.sum_nonneg (fun p _ => |
| 130 | mul_nonneg (sq_nonneg _) (integral_nonneg (fun y => sq_nonneg _))) |
| 131 | refine ⟨s, hs, hsU, ε, A + 1, hε, by positivity, ?_⟩ |
| 132 | intro r hr hrε |
| 133 | have hscale : ContDiff ℝ ∞ (rescaledKernel ρ r) := |
| 134 | contDiff_const.mul (hρ.comp (contDiff_id.const_smul r⁻¹)) |
| 135 | have hcompact : HasCompactSupport (rescaledKernel ρ r) := |
| 136 | (hρc.comp_homeomorph |
| 137 | (Homeomorph.smul (Units.mk0 r⁻¹ (inv_ne_zero hr.ne')))).mul_left |
| 138 | have hderiv (p : Fin k → Fin n) {y : Spacetime n} (hy : y ∈ ball z s) : |
| 139 | iteratedSpatialDeriv k p (mollifiedValue u ρ r) y = mollifiedValue (G₀ p) ρ r y := |
| 140 | hGe (rescaledKernel ρ r) hscale hcompact (ball z s) isOpen_ball |
| 141 | (fun x hx => hsupport r hr hrε x (ball_subset_closedBall hx)) p hy |
| 142 | have hsq (p : Fin k → Fin n) : Integrable (fun y => mollifiedValue (G₀ p) ρ r y ^ 2) := |
| 143 | (memLp_lebesgueConvolution (hG₀ p) hscale.continuous hcompact).integrable_sq |
| 144 | calc |
| 145 | (∫ y in ball z s, ∑ p : Fin k → Fin n, |
| 146 | (iteratedSpatialDeriv k p (mollifiedValue u ρ r) y) ^ 2) = |
| 147 | ∫ y in ball z s, ∑ p : Fin k → Fin n, mollifiedValue (G₀ p) ρ r y ^ 2 := by |
| 148 | apply integral_congr_ae |
| 149 | filter_upwards [ae_restrict_mem measurableSet_ball] with y hy |
| 150 | simp_rw [hderiv _ hy] |
| 151 | _ ≤ ∫ y, ∑ p : Fin k → Fin n, mollifiedValue (G₀ p) ρ r y ^ 2 := |
| 152 | setIntegral_le_integral (integrable_finsetSum _ (fun p _ => hsq p)) |
| 153 | (Eventually.of_forall (fun y => Finset.sum_nonneg (fun p _ => sq_nonneg _))) |
| 154 | _ = ∑ p : Fin k → Fin n, ∫ y, mollifiedValue (G₀ p) ρ r y ^ 2 := |
| 155 | integral_finsetSum _ (fun p _ => hsq p) |
| 156 | _ ≤ A := Finset.sum_le_sum (fun p _ => |
| 157 | integral_mollifiedValue_sq_le (hG₀ p) hρ.continuous hρc hr) |
| 158 | _ ≤ A + 1 := by linarith |
| 159 | |
| 160 | end Poincare.Analysis.Parabolic.WeakRegularity.Interior |
| 161 |