Navier–Stokes: the Lean blow-up proof, cleaned up together
OpenAI's 2026 Lean proofs of blowup for forced Navier–Stokes and Euler, rerun by others, not refereed, no ruling from Clay; cleaned up together: more readable, faster to build

| 1 | import NavierStokes.GenericJetRateAlgebra |
| 2 | |
| 3 | noncomputable section |
| 4 | |
| 5 | namespace NavierStokes.GenericDifferentialPolynomial |
| 6 | |
| 7 | open Set Filter DiagonalResidual |
| 8 | open scoped Topology ContDiff |
| 9 | |
| 10 | variable {D : Type*} [NormedAddCommGroup D] [NormedSpace ℝ D] |
| 11 | |
| 12 | /-- Quantitative approximation data. Constants may depend on the stage, while |
| 13 | the power losses and derivative thresholds are fixed functions of the jet order. -/ |
| 14 | structure ApproximationRates (l : Filter D) (q : D → ℝ) (gain : ℕ → ℝ) |
| 15 | (f : D → ℝ) (stage : ℕ → D → ℝ) where |
| 16 | growthLoss : ℕ → ℝ |
| 17 | tailLoss : ℕ → ℝ |
| 18 | threshold : ℕ → ℕ |
| 19 | stage_growth : ∀ J m, JetRate l q (stage J) m (-growthLoss m) |
| 20 | tail_rate : ∀ m J, threshold m ≤ J → |
| 21 | JetRate l q (fun x => f x - stage J x) m (gain J - tailLoss m) |
| 22 | |
| 23 | private def maxThreshold (M : ℕ → ℕ) (m : ℕ) : ℕ := |
| 24 | (Finset.range (m + 1)).sup M |
| 25 | |
| 26 | private theorem le_maxThreshold (M : ℕ → ℕ) {k m : ℕ} (hk : k ≤ m) : |
| 27 | M k ≤ maxThreshold M m := |
| 28 | Finset.le_sup (f := M) (Finset.mem_range.mpr (Nat.lt_succ_of_le hk)) |
| 29 | |
| 30 | variable {l : Filter D} {q : D → ℝ} {gain : ℕ → ℝ} {U : Set D} |
| 31 | variable {f g : D → ℝ} {fs gs : ℕ → D → ℝ} |
| 32 | |
| 33 | theorem ApproximationRates.full_growth |
| 34 | (h : ApproximationRates l q gain f fs) |
| 35 | (hU : IsOpen U) (hlU : ∀ᶠ x in l, x ∈ U) |
| 36 | (hq : ∀ᶠ x in l, 0 < q x ∧ q x ≤ 1) |
| 37 | (hf : ContDiffOn ℝ ∞ f U) (hfs : ∀ J, ContDiffOn ℝ ∞ (fs J) U) |
| 38 | (hg : Tendsto gain atTop atTop) (m : ℕ) : |
| 39 | JetRate l q f m (-max 0 (h.growthLoss m)) := by |
| 40 | obtain ⟨J₀, hJ₀⟩ := eventually_atTop.1 |
| 41 | (hg.eventually (eventually_ge_atTop (h.tailLoss m))) |
| 42 | let J := max (h.threshold m) J₀ |
| 43 | have htail := (h.tail_rate m J (le_max_left _ _)).weaken hq |
| 44 | (show -max 0 (h.growthLoss m) ≤ gain J - h.tailLoss m by |
| 45 | have := hJ₀ J (le_max_right _ _) |
| 46 | have := le_max_left 0 (h.growthLoss m) |
| 47 | linarith) |
| 48 | have hstage := (h.stage_growth J m).weaken hq |
| 49 | (neg_le_neg (le_max_right 0 (h.growthLoss m))) |
| 50 | exact (hstage.add htail hU hlU (hfs J) (hf.sub (hfs J))).congr_on hU hlU |
| 51 | (fun x _ => by dsimp; ring) |
| 52 | |
| 53 | theorem ApproximationRates.stage_finite_growth |
| 54 | (h : ApproximationRates l q gain f fs) |
| 55 | (hq : ∀ᶠ x in l, 0 < q x ∧ q x ≤ 1) (J m : ℕ) : |
| 56 | FiniteJetRate l q (fs J) m (-maxJetLoss h.growthLoss m) := by |
| 57 | apply finiteJetRate_of_jetRate (hq.mono fun _ hx => hx.1) |
| 58 | intro k hk |
| 59 | exact (h.stage_growth J k).weaken hq (neg_le_neg (le_maxJetLoss _ hk)) |
| 60 | |
| 61 | theorem ApproximationRates.full_finite_growth |
| 62 | (h : ApproximationRates l q gain f fs) |
| 63 | (hU : IsOpen U) (hlU : ∀ᶠ x in l, x ∈ U) |
| 64 | (hq : ∀ᶠ x in l, 0 < q x ∧ q x ≤ 1) |
| 65 | (hf : ContDiffOn ℝ ∞ f U) (hfs : ∀ J, ContDiffOn ℝ ∞ (fs J) U) |
| 66 | (hg : Tendsto gain atTop atTop) (m : ℕ) : |
| 67 | FiniteJetRate l q f m (-maxJetLoss h.growthLoss m) := by |
| 68 | apply finiteJetRate_of_jetRate (hq.mono fun _ hx => hx.1) |
| 69 | intro k hk |
| 70 | exact (h.full_growth hU hlU hq hf hfs hg k).weaken hq |
| 71 | (neg_le_neg (max_le (maxJetLoss_nonneg _ _) (le_maxJetLoss _ hk))) |
| 72 | |
| 73 | theorem ApproximationRates.tail_finite_rate |
| 74 | (h : ApproximationRates l q gain f fs) |
| 75 | (hq : ∀ᶠ x in l, 0 < q x ∧ q x ≤ 1) (m J : ℕ) |
| 76 | (hJ : maxThreshold h.threshold m ≤ J) : |
| 77 | FiniteJetRate l q (fun x => f x - fs J x) m |
| 78 | (gain J - maxJetLoss h.tailLoss m) := by |
| 79 | apply finiteJetRate_of_jetRate (hq.mono fun _ hx => hx.1) |
| 80 | intro k hk |
| 81 | exact (h.tail_rate k J ((le_maxThreshold _ hk).trans hJ)).weaken hq |
| 82 | (sub_le_sub_left (le_maxJetLoss _ hk) _) |
| 83 | |
| 84 | def ApproximationRates.add |
| 85 | (a : ApproximationRates l q gain f fs) (b : ApproximationRates l q gain g gs) |
| 86 | (hU : IsOpen U) (hlU : ∀ᶠ x in l, x ∈ U) |
| 87 | (hq : ∀ᶠ x in l, 0 < q x ∧ q x ≤ 1) |
| 88 | (hf : ContDiffOn ℝ ∞ f U) (hg : ContDiffOn ℝ ∞ g U) |
| 89 | (hfs : ∀ J, ContDiffOn ℝ ∞ (fs J) U) |
| 90 | (hgs : ∀ J, ContDiffOn ℝ ∞ (gs J) U) : |
| 91 | ApproximationRates l q gain (fun x => f x + g x) |
| 92 | (fun J x => fs J x + gs J x) where |
| 93 | growthLoss m := max (a.growthLoss m) (b.growthLoss m) |
| 94 | tailLoss m := max (a.tailLoss m) (b.tailLoss m) |
| 95 | threshold m := max (a.threshold m) (b.threshold m) |
| 96 | stage_growth J m := |
| 97 | ((a.stage_growth J m).weaken hq (neg_le_neg (le_max_left _ _))).add |
| 98 | ((b.stage_growth J m).weaken hq (neg_le_neg (le_max_right _ _))) |
| 99 | hU hlU (hfs J) (hgs J) |
| 100 | tail_rate m J hJ := by |
| 101 | have ha := (a.tail_rate m J ((le_max_left _ _).trans hJ)).weaken hq |
| 102 | (sub_le_sub_left (le_max_left (a.tailLoss m) (b.tailLoss m)) _) |
| 103 | have hb := (b.tail_rate m J ((le_max_right _ _).trans hJ)).weaken hq |
| 104 | (sub_le_sub_left (le_max_right (a.tailLoss m) (b.tailLoss m)) _) |
| 105 | exact (ha.add hb hU hlU (hf.sub (hfs J)) (hg.sub (hgs J))).congr_on hU hlU |
| 106 | (fun x _ => by dsimp; ring) |
| 107 | |
| 108 | def ApproximationRates.mul |
| 109 | (a : ApproximationRates l q gain f fs) (b : ApproximationRates l q gain g gs) |
| 110 | (hU : IsOpen U) (hlU : ∀ᶠ x in l, x ∈ U) |
| 111 | (hq : ∀ᶠ x in l, 0 < q x ∧ q x ≤ 1) |
| 112 | (hf : ContDiffOn ℝ ∞ f U) (hg : ContDiffOn ℝ ∞ g U) |
| 113 | (hfs : ∀ J, ContDiffOn ℝ ∞ (fs J) U) |
| 114 | (hgs : ∀ J, ContDiffOn ℝ ∞ (gs J) U) |
| 115 | (hgain : Tendsto gain atTop atTop) : |
| 116 | ApproximationRates l q gain (fun x => f x * g x) |
| 117 | (fun J x => fs J x * gs J x) where |
| 118 | growthLoss m := maxJetLoss a.growthLoss m + maxJetLoss b.growthLoss m |
| 119 | tailLoss m := max |
| 120 | (maxJetLoss a.tailLoss m + maxJetLoss b.growthLoss m) |
| 121 | (maxJetLoss b.tailLoss m + maxJetLoss a.growthLoss m) |
| 122 | threshold m := max (maxThreshold a.threshold m) (maxThreshold b.threshold m) |
| 123 | stage_growth J m := by |
| 124 | have h := rate_mul hU hlU hq (hfs J) (hgs J) |
| 125 | (a.stage_finite_growth hq J m) (b.stage_finite_growth hq J m) |
| 126 | simpa only [neg_add] using h |
| 127 | tail_rate m J hJ := by |
| 128 | have ha := rate_mul hU hlU hq (hf.sub (hfs J)) hg |
| 129 | (a.tail_finite_rate hq m J ((le_max_left _ _).trans hJ)) |
| 130 | (b.full_finite_growth hU hlU hq hg hgs hgain m) |
| 131 | have hb := rate_mul hU hlU hq (hfs J) (hg.sub (hgs J)) |
| 132 | (a.stage_finite_growth hq J m) |
| 133 | (b.tail_finite_rate hq m J ((le_max_right _ _).trans hJ)) |
| 134 | have ha' := ha.weaken hq |
| 135 | (show gain J - max |
| 136 | (maxJetLoss a.tailLoss m + maxJetLoss b.growthLoss m) |
| 137 | (maxJetLoss b.tailLoss m + maxJetLoss a.growthLoss m) ≤ |
| 138 | (gain J - maxJetLoss a.tailLoss m) + -maxJetLoss b.growthLoss m by |
| 139 | have := le_max_left |
| 140 | (maxJetLoss a.tailLoss m + maxJetLoss b.growthLoss m) |
| 141 | (maxJetLoss b.tailLoss m + maxJetLoss a.growthLoss m) |
| 142 | linarith) |
| 143 | have hb' := hb.weaken hq |
| 144 | (show gain J - max |
| 145 | (maxJetLoss a.tailLoss m + maxJetLoss b.growthLoss m) |
| 146 | (maxJetLoss b.tailLoss m + maxJetLoss a.growthLoss m) ≤ |
| 147 | -maxJetLoss a.growthLoss m + (gain J - maxJetLoss b.tailLoss m) by |
| 148 | have := le_max_right |
| 149 | (maxJetLoss a.tailLoss m + maxJetLoss b.growthLoss m) |
| 150 | (maxJetLoss b.tailLoss m + maxJetLoss a.growthLoss m) |
| 151 | linarith) |
| 152 | exact (ha'.add hb' hU hlU ((hf.sub (hfs J)).mul hg) |
| 153 | ((hfs J).mul (hg.sub (hgs J)))).congr_on hU hlU |
| 154 | (fun x _ => by dsimp; ring) |
| 155 | |
| 156 | def ApproximationRates.directional |
| 157 | (a : ApproximationRates l q gain f fs) |
| 158 | (hU : IsOpen U) (hlU : ∀ᶠ x in l, x ∈ U) |
| 159 | (hf : ContDiffOn ℝ ∞ f U) (hfs : ∀ J, ContDiffOn ℝ ∞ (fs J) U) (v : D) : |
| 160 | ApproximationRates l q gain (fun x => fderiv ℝ f x v) |
| 161 | (fun J x => fderiv ℝ (fs J) x v) where |
| 162 | growthLoss m := a.growthLoss (m + 1) |
| 163 | tailLoss m := a.tailLoss (m + 1) |
| 164 | threshold m := a.threshold (m + 1) |
| 165 | stage_growth J m := rate_directional hU hlU (hfs J) v (a.stage_growth J (m + 1)) |
| 166 | tail_rate m J hJ := by |
| 167 | have h := rate_directional hU hlU (hf.sub (hfs J)) v |
| 168 | (a.tail_rate (m + 1) J hJ) |
| 169 | exact h.congr_on hU hlU (directional_sub_eqOn hU hf (hfs J) v) |
| 170 | |
| 171 | def ApproximationRates.fixed {c : D → ℝ} {L : ℕ → ℝ} |
| 172 | (hc : ∀ m, JetRate l q c m (-L m)) : |
| 173 | ApproximationRates l q gain c (fun _ => c) where |
| 174 | growthLoss := L |
| 175 | tailLoss := 0 |
| 176 | threshold := 0 |
| 177 | stage_growth _ m := hc m |
| 178 | tail_rate m J _ := by |
| 179 | simpa only [sub_self] using (rate_zero (l := l) (q := q) (m := m) |
| 180 | (r := gain J - (0 : ℕ → ℝ) m)) |
| 181 | |
| 182 | /-- A finite differential expression in scalar components with fixed variable |
| 183 | coefficients. Products, sums, and arbitrary fixed directional derivatives are |
| 184 | allowed at every node; consequently the order and polynomial degree are finite. -/ |
| 185 | inductive Expression (D ι κ : Type*) where |
| 186 | | input : ι → Expression D ι κ |
| 187 | | coeff : κ → Expression D ι κ |
| 188 | | add : Expression D ι κ → Expression D ι κ → Expression D ι κ |
| 189 | | mul : Expression D ι κ → Expression D ι κ → Expression D ι κ |
| 190 | | directional : D → Expression D ι κ → Expression D ι κ |
| 191 | |
| 192 | namespace Expression |
| 193 | |
| 194 | variable {ι κ : Type*} |
| 195 | |
| 196 | /-- Evaluation uses actual Fréchet derivatives, including at derivative nodes. -/ |
| 197 | def eval (c : κ → D → ℝ) (u : ι → D → ℝ) : Expression D ι κ → D → ℝ |
| 198 | | .input i => u i |
| 199 | | .coeff i => c i |
| 200 | | .add a b => fun x => eval c u a x + eval c u b x |
| 201 | | .mul a b => fun x => eval c u a x * eval c u b x |
| 202 | | .directional v a => fun x => fderiv ℝ (eval c u a) x v |
| 203 | |
| 204 | theorem smooth_eval (e : Expression D ι κ) |
| 205 | {c : κ → D → ℝ} {u : ι → D → ℝ} (hU : IsOpen U) |
| 206 | (hc : ∀ i, ContDiffOn ℝ ∞ (c i) U) |
| 207 | (hu : ∀ i, ContDiffOn ℝ ∞ (u i) U) : ContDiffOn ℝ ∞ (eval c u e) U := by |
| 208 | induction e with |
| 209 | | input i => exact hu i |
| 210 | | coeff i => exact hc i |
| 211 | | add a b ha hb => exact ha.add hb |
| 212 | | mul a b ha hb => exact ha.mul hb |
| 213 | | directional v a ha => exact smooth_directional hU ha v |
| 214 | |
| 215 | /-- Stability of every finite differential polynomial, with explicitly |
| 216 | constructed losses independent of the approximation stage. -/ |
| 217 | def approximation_eval (e : Expression D ι κ) |
| 218 | {c : κ → D → ℝ} {u : ι → D → ℝ} {us : ℕ → ι → D → ℝ} |
| 219 | (hU : IsOpen U) (hlU : ∀ᶠ x in l, x ∈ U) |
| 220 | (hq : ∀ᶠ x in l, 0 < q x ∧ q x ≤ 1) |
| 221 | (hc : ∀ i, ContDiffOn ℝ ∞ (c i) U) |
| 222 | (hu : ∀ i, ContDiffOn ℝ ∞ (u i) U) |
| 223 | (hus : ∀ J i, ContDiffOn ℝ ∞ (us J i) U) |
| 224 | (hgain : Tendsto gain atTop atTop) |
| 225 | (Lc : κ → ℕ → ℝ) (hcg : ∀ i m, JetRate l q (c i) m (-Lc i m)) |
| 226 | (happrox : ∀ i, ApproximationRates l q gain (u i) (fun J => us J i)) : |
| 227 | ApproximationRates l q gain (eval c u e) (fun J => eval c (us J) e) := by |
| 228 | induction e with |
| 229 | | input i => exact happrox i |
| 230 | | coeff i => exact ApproximationRates.fixed (hcg i) |
| 231 | | add a b ha hb => |
| 232 | exact ha.add hb hU hlU hq (a.smooth_eval hU hc hu) (b.smooth_eval hU hc hu) |
| 233 | (fun J => a.smooth_eval hU hc (hus J)) (fun J => b.smooth_eval hU hc (hus J)) |
| 234 | | mul a b ha hb => |
| 235 | exact ha.mul hb hU hlU hq (a.smooth_eval hU hc hu) (b.smooth_eval hU hc hu) |
| 236 | (fun J => a.smooth_eval hU hc (hus J)) (fun J => b.smooth_eval hU hc (hus J)) hgain |
| 237 | | directional v a ha => |
| 238 | exact ha.directional hU hlU (a.smooth_eval hU hc hu) |
| 239 | (fun J => a.smooth_eval hU hc (hus J)) v |
| 240 | |
| 241 | end Expression |
| 242 | |
| 243 | /-- If the approximating residuals have unbounded order, so does the residual |
| 244 | of the realized field. This is a theorem about arbitrary finite differential |
| 245 | polynomials, proved from input jet estimates and the ordinary Leibniz rule. |
| 246 | It applies componentwise to any finite collection of output expressions. -/ |
| 247 | theorem polynomial_jetRate_of_stages {ι κ : Type*} |
| 248 | (e : Expression D ι κ) {c : κ → D → ℝ} {u : ι → D → ℝ} |
| 249 | {us : ℕ → ι → D → ℝ} {Lbg Ltail : ι → ℕ → ℝ} |
| 250 | {Lc : κ → ℕ → ℝ} {Lres : ℕ → ℝ} |
| 251 | (hU : IsOpen U) (hlU : ∀ᶠ x in l, x ∈ U) |
| 252 | (hq : ∀ᶠ x in l, 0 < q x ∧ q x ≤ 1) |
| 253 | (hc : ∀ i, ContDiffOn ℝ ∞ (c i) U) |
| 254 | (hu : ∀ i, ContDiffOn ℝ ∞ (u i) U) |
| 255 | (hus : ∀ J i, ContDiffOn ℝ ∞ (us J i) U) |
| 256 | (hgain : Tendsto gain atTop atTop) |
| 257 | (hcg : ∀ i m, JetRate l q (c i) m (-Lc i m)) |
| 258 | (hbg : ∀ J i m, JetRate l q (us J i) m (-Lbg i m)) |
| 259 | (htail : ∀ J i m, m ≤ J → |
| 260 | JetRate l q (fun x => u i x - us J i x) m (gain J - Ltail i m)) |
| 261 | (hres : ∀ J m, JetRate l q (e.eval c (us J)) m (gain J - Lres m)) |
| 262 | (m : ℕ) (n : ℝ) : JetRate l q (e.eval c u) m n := by |
| 263 | let a : ApproximationRates l q gain (e.eval c u) (fun J => e.eval c (us J)) := |
| 264 | e.approximation_eval hU hlU hq hc hu hus hgain Lc hcg |
| 265 | (fun i => ⟨Lbg i, Ltail i, id, fun J m => hbg J i m, |
| 266 | fun m J hJ => htail J i m hJ⟩) |
| 267 | obtain ⟨J₀, hJ₀⟩ := eventually_atTop.1 |
| 268 | (hgain.eventually (eventually_ge_atTop (max (n + a.tailLoss m) (n + Lres m)))) |
| 269 | let J := max (a.threshold m) J₀ |
| 270 | have hJgain := hJ₀ J (le_max_right _ _) |
| 271 | have htail := (a.tail_rate m J (le_max_left _ _)).weaken hq |
| 272 | (show n ≤ gain J - a.tailLoss m by |
| 273 | have := le_max_left (n + a.tailLoss m) (n + Lres m) |
| 274 | linarith) |
| 275 | have hstage := (hres J m).weaken hq |
| 276 | (show n ≤ gain J - Lres m by |
| 277 | have := le_max_right (n + a.tailLoss m) (n + Lres m) |
| 278 | linarith) |
| 279 | exact (hstage.add htail hU hlU (e.smooth_eval hU hc (hus J)) |
| 280 | ((e.smooth_eval hU hc hu).sub (e.smooth_eval hU hc (hus J)))).congr_on hU hlU |
| 281 | (fun x _ => by dsimp; ring) |
| 282 | |
| 283 | end NavierStokes.GenericDifferentialPolynomial |