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 Euler.PacketCorrectionConstants |
| 2 | import Mathlib.Analysis.Real.Sqrt |
| 3 | import Mathlib.Analysis.SpecialFunctions.Pow.Asymptotics |
| 4 | |
| 5 | /-! The literal source truncation floor(k^ϑ), ϑ=10⁻⁶, meets the packet |
| 6 | and correction guards from finitely many fixed-cost bounds. -/ |
| 7 | |
| 8 | /-! ## From `Euler/PacketCorrectionScalar.lean` |
| 9 | |
| 10 | The text of `Euler/PacketCorrectionScalar.lean`, folded into this file, which was its only importer. -/ |
| 11 | |
| 12 | section |
| 13 | |
| 14 | /-! Explicit scalar choices for the actual drift-aware correction budget. |
| 15 | The error target is exp(-sqrt X), with X=k^ϑ in the source construction. -/ |
| 16 | |
| 17 | noncomputable section |
| 18 | |
| 19 | namespace EulerPacketCorrectionScalar |
| 20 | |
| 21 | open Set |
| 22 | |
| 23 | def delta (X : ℝ) : ℝ := Real.exp (-Real.sqrt X) |
| 24 | |
| 25 | def residual (k X : ℝ) : ℝ := 2*Real.exp (-(7/10)*X*Real.log k) |
| 26 | |
| 27 | def initialRadius (R M Rc : ℝ) : ℝ := 1/(1+8*R+4*M*Rc+Rc) |
| 28 | |
| 29 | theorem delta_pos (X : ℝ) : 0 < delta X := Real.exp_pos _ |
| 30 | |
| 31 | theorem delta_le_one (X : ℝ) : delta X ≤ 1 := |
| 32 | Real.exp_le_one_iff.mpr (neg_nonpos.mpr (Real.sqrt_nonneg X)) |
| 33 | |
| 34 | /-- One polynomial inverse radius meets both packet-series and pressure- |
| 35 | inverse absorption requirements. -/ |
| 36 | theorem initialRadius_bounds (R M Rc : ℝ) (hR : 0 ≤ R) (hM : 0 ≤ M) (hRc : 0 ≤ Rc) : |
| 37 | 0 < initialRadius R M Rc ∧ initialRadius R M Rc*(4*R) ≤ 1/2 ∧ |
| 38 | 4*M*(initialRadius R M Rc*Rc) ≤ 1 ∧ initialRadius R M Rc*Rc ≤ 1 := by |
| 39 | have hd : 0 < 1+8*R+4*M*Rc+Rc := by positivity |
| 40 | have hmc : 0 ≤ M*Rc := mul_nonneg hM hRc |
| 41 | unfold initialRadius |
| 42 | refine ⟨one_div_pos.mpr hd, ?_, ?_, ?_⟩ |
| 43 | · rw [div_mul_eq_mul_div,one_mul,div_le_iff₀ hd] |
| 44 | linarith |
| 45 | · rw [show 4*M*(1/(1+8*R+4*M*Rc+Rc)*Rc) = |
| 46 | (4*M*Rc)/(1+8*R+4*M*Rc+Rc) by ring, div_le_iff₀ hd] |
| 47 | linarith |
| 48 | · rw [div_mul_eq_mul_div,one_mul,div_le_iff₀ hd] |
| 49 | linarith |
| 50 | |
| 51 | /-- The actual residual envelope wins over the Gronwall factor with an |
| 52 | explicit linear bound on the source growth cost. -/ |
| 53 | theorem residual_small (C T k X : ℝ) (hX : 64 ≤ X) (hk : 1 ≤ Real.log k) |
| 54 | (hgrowth : 3*C*T ≤ X/4) : |
| 55 | 2*residual k X*Real.exp (3*C*T) ≤ delta X/2 := by |
| 56 | have hX0 : 0 ≤ X := by linarith |
| 57 | have hs : Real.sqrt X ≤ X/8 := |
| 58 | (Real.sqrt_le_left (by linarith)).mpr (by nlinarith) |
| 59 | have hl : Real.log 8 ≤ X/8 := |
| 60 | (Real.log_le_sub_one_of_pos (by norm_num : (0 : ℝ) < 8)).trans (by linarith) |
| 61 | have hxlog : X ≤ X*Real.log k := le_mul_of_one_le_right hX0 hk |
| 62 | have he : Real.log 8 + (-(7/10)*X*Real.log k+3*C*T) ≤ -Real.sqrt X := by |
| 63 | linarith only [hX0,hs,hl,hxlog,hgrowth] |
| 64 | have hh := Real.exp_le_exp.mpr he |
| 65 | rw [Real.exp_add,Real.exp_log (by norm_num : (0 : ℝ) < 8),Real.exp_add] at hh |
| 66 | unfold residual delta |
| 67 | linarith only [hh] |
| 68 | |
| 69 | /-- The two elementary frequency guards control the radius loss caused |
| 70 | by the actual O(1/k) drift and the chosen error target. -/ |
| 71 | theorem radius_decay (C T D ρ0 k X : ℝ) (hk : 0 < k) |
| 72 | (hfrequency : 8*C*T*D ≤ ρ0*k) |
| 73 | (herror : 8*C*T ≤ ρ0*Real.exp (Real.sqrt X)) : |
| 74 | 2*C*(D/k+delta X)*T ≤ ρ0/2 := by |
| 75 | have hf : 8*C*T*(D/k) ≤ ρ0 := by |
| 76 | calc |
| 77 | _ = (8*C*T*D)/k := by ring |
| 78 | _ ≤ ρ0 := (div_le_iff₀ hk).mpr hfrequency |
| 79 | have he : 8*C*T*delta X ≤ ρ0 := by |
| 80 | rw [delta,Real.exp_neg,← div_eq_mul_inv] |
| 81 | exact (div_le_iff₀ (Real.exp_pos _)).mpr herror |
| 82 | linarith only [hf,he] |
| 83 | |
| 84 | def radius (T C D ρ0 k X : ℝ) : C(Icc (0 : ℝ) T,ℝ) := |
| 85 | ⟨fun t => ρ0-2*C*(D/k+delta X)*t.val, |
| 86 | continuous_const.sub (continuous_const.mul continuous_subtype_val)⟩ |
| 87 | |
| 88 | theorem radius_bounds (T C D ρ0 k X : ℝ) (hC : 0 ≤ C) (hD : 0 ≤ D) (hk : 0 < k) |
| 89 | (hdecay : 2*C*(D/k+delta X)*T ≤ ρ0/2) (t : Icc (0 : ℝ) T) : |
| 90 | ρ0/2 ≤ radius T C D ρ0 k X t ∧ radius T C D ρ0 k X t ≤ ρ0 := by |
| 91 | have hs : 0 ≤ 2*C*(D/k+delta X) := by |
| 92 | exact mul_nonneg (mul_nonneg (by norm_num) hC) |
| 93 | (add_nonneg (div_nonneg hD hk.le) (delta_pos X).le) |
| 94 | have hu := mul_nonneg hs t.property.1 |
| 95 | have hl := (mul_le_mul_of_nonneg_left t.property.2 hs).trans hdecay |
| 96 | change ρ0/2 ≤ ρ0-2*C*(D/k+delta X)*t.val ∧ ρ0-2*C*(D/k+delta X)*t.val ≤ ρ0 |
| 97 | constructor <;> linarith |
| 98 | |
| 99 | end EulerPacketCorrectionScalar |
| 100 | end |
| 101 | |
| 102 | end |
| 103 | |
| 104 | noncomputable section |
| 105 | |
| 106 | namespace EulerPacketSourceFrequency |
| 107 | |
| 108 | open Real Filter EulerPacketCoarseMajorant EulerPacketCorrectionScalar |
| 109 | |
| 110 | def theta : ℝ := 1/1000000 |
| 111 | def expansion (k : ℝ) : ℝ := k^theta |
| 112 | def truncation (k : ℝ) : ℕ := Nat.floor (expansion k) |
| 113 | def smallPower (k : ℝ) : ℝ := k^(theta/100) |
| 114 | |
| 115 | theorem expansion_pos (k : ℝ) (hk : 0 < k) : 0 < expansion k := |
| 116 | Real.rpow_pos_of_pos hk _ |
| 117 | |
| 118 | theorem truncation_bounds (k : ℝ) (hk : 1 ≤ k) : |
| 119 | 1 ≤ truncation k ∧ expansion k-1 ≤ (truncation k : ℝ) ∧ |
| 120 | (truncation k : ℝ) ≤ expansion k := by |
| 121 | have hx : 1 ≤ expansion k := Real.one_le_rpow hk (by norm_num [theta]) |
| 122 | exact ⟨(Nat.one_le_floor_iff _).mpr hx,(Nat.sub_one_lt_floor _).le, |
| 123 | Nat.floor_le (zero_le_one.trans hx)⟩ |
| 124 | |
| 125 | theorem smallPower_le_expansion (k : ℝ) (hk : 1 ≤ k) : smallPower k ≤ expansion k := |
| 126 | Real.rpow_le_rpow_of_exponent_le hk (by norm_num [theta]) |
| 127 | |
| 128 | theorem smallPower_le_frequency (k : ℝ) (hk : 1 ≤ k) : smallPower k ≤ k := by |
| 129 | simpa only [Real.rpow_one,smallPower] using |
| 130 | Real.rpow_le_rpow_of_exponent_le (x := k) hk (by norm_num [theta] : theta/100 ≤ 1) |
| 131 | |
| 132 | theorem smallPower_le_gradeCap (k : ℝ) (hk : 1 ≤ k) : smallPower k ≤ k^(1/100 : ℝ) := |
| 133 | Real.rpow_le_rpow_of_exponent_le hk (by norm_num [theta]) |
| 134 | |
| 135 | theorem tailBase_frequency (R H C k : ℝ) (hC : 0 ≤ C) (hk : 1 ≤ k) |
| 136 | (hc : tailPolynomialConstant R H C ≤ smallPower k) : |
| 137 | tailBase R H C (truncation k) ≤ k^(1/100 : ℝ) := by |
| 138 | have hk0 : 0 < k := zero_lt_one.trans_le hk |
| 139 | obtain ⟨hn,_,hnx⟩ := truncation_bounds k hk |
| 140 | calc |
| 141 | _ ≤ tailPolynomialConstant R H C*(truncation k : ℝ)^222 := |
| 142 | tailBase_polynomial_bound R H C hC _ hn |
| 143 | _ ≤ smallPower k*(expansion k)^222 := |
| 144 | mul_le_mul hc (pow_le_pow_left₀ (Nat.cast_nonneg _) hnx 222) |
| 145 | (by positivity) (Real.rpow_pos_of_pos hk0 _).le |
| 146 | _ = k^(theta/100+theta*222) := by |
| 147 | unfold smallPower expansion |
| 148 | rw [← Real.rpow_mul_natCast hk0.le,← Real.rpow_add hk0] |
| 149 | norm_num |
| 150 | _ ≤ k^(1/100 : ℝ) := Real.rpow_le_rpow_of_exponent_le hk (by norm_num [theta]) |
| 151 | |
| 152 | /-- The source's very small power is below the exponential margin in |
| 153 | the error target exp(-sqrt(k^ϑ)). -/ |
| 154 | theorem smallPower_le_exp_sqrt (k : ℝ) (hk : 0 < k) : |
| 155 | smallPower k ≤ Real.exp (Real.sqrt (expansion k)) := by |
| 156 | have hx : 0 ≤ expansion k := (expansion_pos k hk).le |
| 157 | have hl := Real.log_le_rpow_div hx (by norm_num : (0 : ℝ) < 1/2) |
| 158 | rw [← Real.sqrt_eq_rpow] at hl |
| 159 | have hlog : Real.log (expansion k)=theta*Real.log k := Real.log_rpow hk theta |
| 160 | have hs := Real.sqrt_nonneg (expansion k) |
| 161 | unfold smallPower |
| 162 | rw [Real.rpow_def_of_pos hk] |
| 163 | apply Real.exp_le_exp.mpr |
| 164 | rw [hlog] at hl |
| 165 | linarith only [hl,hs] |
| 166 | |
| 167 | theorem correction_guards (C T D ρ0 k : ℝ) (hk : 1 ≤ k) (hρ : 0 < ρ0) |
| 168 | (hX : 64 ≤ expansion k) (hlog : 1 ≤ Real.log k) |
| 169 | (hgrowth : 12*C*T ≤ smallPower k) |
| 170 | (hdrift : 8*C*T*D/ρ0 ≤ smallPower k) |
| 171 | (herror : 8*C*T/ρ0 ≤ smallPower k) : |
| 172 | 2*residual k (expansion k)*Real.exp (3*C*T) ≤ delta (expansion k)/2 ∧ |
| 173 | 2*C*(D/k+delta (expansion k))*T ≤ ρ0/2 := by |
| 174 | have hk0 : 0 < k := zero_lt_one.trans_le hk |
| 175 | constructor |
| 176 | · apply residual_small C T k (expansion k) hX hlog |
| 177 | have hh := hgrowth.trans (smallPower_le_expansion k hk) |
| 178 | linarith |
| 179 | · apply radius_decay C T D ρ0 k (expansion k) hk0 |
| 180 | · have hh := (div_le_iff₀ hρ).mp (hdrift.trans (smallPower_le_frequency k hk)) |
| 181 | linarith only [hh] |
| 182 | · have hh := (div_le_iff₀ hρ).mp (herror.trans (smallPower_le_exp_sqrt k hk0)) |
| 183 | linarith only [hh] |
| 184 | |
| 185 | /-- Every finite list of fixed source costs fits the required very small |
| 186 | power after one sufficiently large frequency choice. -/ |
| 187 | theorem fixed_costs_eventually (cost : Finset ℝ) : |
| 188 | ∀ᶠ k : ℝ in atTop, 4 ≤ k ∧ 64 ≤ expansion k ∧ 1 ≤ Real.log k ∧ |
| 189 | ∀ c ∈ cost, c ≤ smallPower k := by |
| 190 | have hpow := _root_.tendsto_rpow_atTop (by norm_num [theta] : 0 < theta/100) |
| 191 | have hcost : ∀ᶠ k : ℝ in atTop, ∀ c ∈ cost, c ≤ smallPower k := by |
| 192 | apply (Finset.eventually_all cost).mpr |
| 193 | intro c _ |
| 194 | exact hpow.eventually_ge_atTop c |
| 195 | filter_upwards [eventually_ge_atTop (4 : ℝ), |
| 196 | (_root_.tendsto_rpow_atTop (by norm_num [theta] : 0 < theta)).eventually_ge_atTop 64, |
| 197 | Real.tendsto_log_atTop.eventually_ge_atTop 1,hcost] with k hk hx hl hc |
| 198 | exact ⟨hk,hx,hl,hc⟩ |
| 199 | |
| 200 | end EulerPacketSourceFrequency |