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.PacketNestedHorizons |
| 2 | import Euler.PacketSourceParameterScales |
| 3 | import Euler.ParentPacketNeighborPolynomial |
| 4 | import Euler.PacketSourceScaleActual |
| 5 | |
| 6 | /-! Fixed coefficient thresholds for the literal neighboring-label guard. |
| 7 | The history reciprocal is derived from the initial geometric step, and |
| 8 | the only parent size input is the already constructed parent's label bound. -/ |
| 9 | |
| 10 | /-! ## From `Euler/ParentHistoryFrequencyGuard.lean` |
| 11 | |
| 12 | The text of `Euler/ParentHistoryFrequencyGuard.lean`, folded into this file, which was its only importer. -/ |
| 13 | |
| 14 | section |
| 15 | |
| 16 | /-! Reciprocal history times fit the literal previous-frequency budget. |
| 17 | Only the first geometric step needs coupling and tilt bounds. All later |
| 18 | step lengths are nonnegative independently of any future frame invariant. -/ |
| 19 | |
| 20 | noncomputable section |
| 21 | |
| 22 | namespace EulerParentHistoryFrequency |
| 23 | |
| 24 | open Real EulerPacketSourceScaleChoice EulerPacketSourceScaleSequence |
| 25 | EulerPacketSourceParameterScales EulerPacketSourceScaleActual |
| 26 | EulerPacketNestedHorizons EulerPacketBaseGuardScales |
| 27 | |
| 28 | theorem frequency_monotone (J : ℕ) (hJ : 2 ≤ J) (X : ℝ) (hX : 0 ≤ X) : |
| 29 | Monotone (frequency J X) := by |
| 30 | apply monotone_nat_of_le_succ |
| 31 | intro n |
| 32 | let j : ℝ := (J+n : ℕ) |
| 33 | have hj2 : (2 : ℝ) ≤ j := by |
| 34 | dsimp [j] |
| 35 | exact_mod_cast (show 2 ≤ J+n by omega) |
| 36 | have hj0 : 0 < j := by linarith only [hj2] |
| 37 | have hx : 0 ≤ scaleSequence J X n := |
| 38 | hX.trans (sequence_initial_le J (by omega) X hX n) |
| 39 | have hadd : ((J+(n+1) : ℕ) : ℝ)=j+1 := by |
| 40 | dsimp [j] |
| 41 | push_cast |
| 42 | ring |
| 43 | have hstep : j+1 ≤ j^2 := by linarith only [hj2,sq_nonneg (j-2)] |
| 44 | have hsq : (j+1)^2 ≤ (j^2)^2 := pow_le_pow_left₀ (by positivity) hstep 2 |
| 45 | apply exp_le_exp.mpr |
| 46 | change scaleSequence J X n/j^2 ≤ scaleSequence J X (n+1)/((J+(n+1) : ℕ) : ℝ)^2 |
| 47 | rw [scaleSequence_succ,hadd] |
| 48 | apply (div_le_div_iff₀ (sq_pos_of_pos hj0) (sq_pos_of_pos (by positivity))).2 |
| 49 | calc |
| 50 | scaleSequence J X n*(j+1)^2 ≤ scaleSequence J X n*(j^2)^2 := |
| 51 | mul_le_mul_of_nonneg_left hsq hx |
| 52 | _ = (j^2*scaleSequence J X n)*j^2 := by ring |
| 53 | |
| 54 | theorem initial_frequency_le_first (J D : ℕ) (hJ : 3 ≤ J) (X : ℝ) (hX : 0 ≤ X) |
| 55 | (hbase : X^D ≤ exp (X/((J-1 : ℕ) : ℝ)^4)) : |
| 56 | X^D ≤ frequency J X 0 := by |
| 57 | let j : ℝ := (J-1 : ℕ) |
| 58 | have hj2 : (2 : ℝ) ≤ j := by |
| 59 | dsimp [j] |
| 60 | exact_mod_cast (show 2 ≤ J-1 by omega) |
| 61 | have hJ0 : (0 : ℝ) < J := by exact_mod_cast (show 0 < J by omega) |
| 62 | have hadd : (J : ℝ)=j+1 := by |
| 63 | dsimp [j] |
| 64 | exact_mod_cast (show J=J-1+1 by omega) |
| 65 | have hstep : j+1 ≤ j^2 := by linarith only [hj2,sq_nonneg (j-2)] |
| 66 | have hsq : (J : ℝ)^2 ≤ j^4 := by |
| 67 | rw [hadd] |
| 68 | simpa only [← pow_mul] using pow_le_pow_left₀ (by positivity) hstep 2 |
| 69 | apply hbase.trans |
| 70 | change exp (X/j^4) ≤ exp (X/(J : ℝ)^2) |
| 71 | exact exp_le_exp.mpr (div_le_div_of_nonneg_left hX (sq_pos_of_pos hJ0) hsq) |
| 72 | |
| 73 | theorem initial_frequency_le_previous (J D : ℕ) (hJ : 3 ≤ J) (X : ℝ) (hX : 0 ≤ X) |
| 74 | (hbase : X^D ≤ exp (X/((J-1 : ℕ) : ℝ)^4)) (n : ℕ) : |
| 75 | X^D ≤ previousFrequency J D X n := by |
| 76 | cases n with |
| 77 | | zero => exact le_rfl |
| 78 | | succ n => |
| 79 | exact (initial_frequency_le_first J D hJ X hX hbase).trans |
| 80 | (frequency_monotone J (by omega) X hX (Nat.zero_le n)) |
| 81 | |
| 82 | theorem previousFrequency_one_le (J D : ℕ) (hJ : 3 ≤ J) (X : ℝ) (hX : 1 ≤ X) |
| 83 | (hbase : X^D ≤ exp (X/((J-1 : ℕ) : ℝ)^4)) (n : ℕ) : |
| 84 | 1 ≤ previousFrequency J D X n := |
| 85 | (one_le_pow₀ hX).trans |
| 86 | (initial_frequency_le_previous J D hJ X (zero_le_one.trans hX) hbase n) |
| 87 | |
| 88 | theorem base_inverse_le_initial_frequency (J D : ℕ) (hJ : 1 ≤ J) (hD : 2000 ≤ D) |
| 89 | (X : ℝ) (hX : 2 ≤ X) : 12/baseHorizon J X ≤ X^D := by |
| 90 | have hx1 : 1 ≤ X := by linarith only [hX] |
| 91 | have hx0 : 0 ≤ X := zero_le_one.trans hx1 |
| 92 | have hxpow : 2 ≤ X^1000 := hX.trans (by |
| 93 | simpa only [pow_one] using pow_le_pow_right₀ hx1 (by decide : 1 ≤ 1000)) |
| 94 | calc |
| 95 | 12/baseHorizon J X ≤ 2*X^1000 := base_inverse_time_le J hJ X hx1 |
| 96 | _ ≤ X^1000*X^1000 := mul_le_mul_of_nonneg_right hxpow (pow_nonneg hx0 1000) |
| 97 | _ = X^2000 := by rw [← pow_add] |
| 98 | _ ≤ X^D := pow_le_pow_right₀ hx1 hD |
| 99 | |
| 100 | theorem base_inverse_le_previous_frequency (J D : ℕ) (hJ : 3 ≤ J) (hD : 2000 ≤ D) |
| 101 | (X : ℝ) (hX : 2 ≤ X) |
| 102 | (hbase : X^D ≤ exp (X/((J-1 : ℕ) : ℝ)^4)) (n : ℕ) : |
| 103 | 12/baseHorizon J X ≤ previousFrequency J D X n := |
| 104 | (base_inverse_le_initial_frequency J D (by omega) hD X hX).trans |
| 105 | (initial_frequency_le_previous J D hJ X (by linarith only [hX]) hbase n) |
| 106 | |
| 107 | theorem base_inverse_le_previous_frequency_pow80 (J D : ℕ) (hJ : 3 ≤ J) (hD : 2000 ≤ D) |
| 108 | (X : ℝ) (hX : 2 ≤ X) |
| 109 | (hbase : X^D ≤ exp (X/((J-1 : ℕ) : ℝ)^4)) (n : ℕ) : |
| 110 | 12/baseHorizon J X ≤ previousFrequency J D X n^80 := by |
| 111 | have hk := previousFrequency_one_le J D hJ X (by linarith only [hX]) hbase n |
| 112 | exact (base_inverse_le_previous_frequency J D hJ hD X hX hbase n).trans (by |
| 113 | simpa only [pow_one] using pow_le_pow_right₀ hk (by decide : 1 ≤ 80)) |
| 114 | |
| 115 | end EulerParentHistoryFrequency |
| 116 | end |
| 117 | |
| 118 | end |
| 119 | |
| 120 | /-! ## From `Euler/ParentPacketNeighborScaleGuard.lean` |
| 121 | |
| 122 | The text of `Euler/ParentPacketNeighborScaleGuard.lean`, folded into this file, which was its only importer. -/ |
| 123 | |
| 124 | section |
| 125 | |
| 126 | /-! The computed neighboring-label cost fits the source's monomial |
| 127 | majorant under fixed degree and constant guards. Thus the small support |
| 128 | scale discharges the literal neighbor comparison in the geometry step. -/ |
| 129 | |
| 130 | noncomputable section |
| 131 | |
| 132 | namespace EulerParentNeighborCost |
| 133 | |
| 134 | theorem polynomial_le_monomial (A K Ti H k h : ℝ) (n q c : ℕ) |
| 135 | (hA : 0 ≤ A) (hK : 0 ≤ K) (hTi : 0 ≤ Ti) (hH : 0 ≤ H) |
| 136 | (hk : 1 ≤ k) (hh : 1 ≤ h) (hKk : K ≤ k^q) (hTik : Ti ≤ k^q) (hHh : H ≤ h) |
| 137 | (hcost : A*4^n ≤ k) (hc : q*n+1 ≤ c) (hn : n ≤ c) : |
| 138 | A*(1+K+Ti+H)^n ≤ k^c*h^c := by |
| 139 | have hk0 : 0 ≤ k := zero_le_one.trans hk |
| 140 | have hh0 : 0 ≤ h := zero_le_one.trans hh |
| 141 | have hkq : 1 ≤ k^q := one_le_pow₀ hk |
| 142 | have hkq0 : 0 ≤ k^q := zero_le_one.trans hkq |
| 143 | have hkh : 1 ≤ k^q*h := one_le_mul_of_one_le_of_one_le hkq hh |
| 144 | have hkk : k^q ≤ k^q*h := le_mul_of_one_le_right hkq0 hh |
| 145 | have hhh : h ≤ k^q*h := le_mul_of_one_le_left hh0 hkq |
| 146 | have hb : 1+K+Ti+H ≤ 4*k^q*h := by |
| 147 | linarith only [hkh,hKk.trans hkk,hTik.trans hkk,hHh.trans hhh] |
| 148 | calc |
| 149 | _ ≤ A*(4*k^q*h)^n := mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (by positivity) hb n) hA |
| 150 | _ = (A*4^n)*(k^(q*n)*h^n) := by simp only [mul_pow]; ring |
| 151 | _ ≤ k*(k^(q*n)*h^n) := mul_le_mul_of_nonneg_right hcost (by positivity) |
| 152 | _ = k^(q*n+1)*h^n := by rw [pow_succ]; ring |
| 153 | _ ≤ k^c*h^c := mul_le_mul (pow_le_pow_right₀ hk hc) (pow_le_pow_right₀ hh hn) |
| 154 | (pow_nonneg hh0 n) (pow_nonneg hk0 c) |
| 155 | |
| 156 | end EulerParentNeighborCost |
| 157 | |
| 158 | namespace EulerParentPacketFrames.LabelData |
| 159 | |
| 160 | open Set EulerSmoothLimit EulerTransverseFrameCoordinates EulerTransversePacketProvider |
| 161 | EulerPacketSourceGeometry EulerParentNeighborCost EulerPacketSourceScaleSequence |
| 162 | EulerPacketSourceScaleActual |
| 163 | |
| 164 | variable {G : Parent} (L : LabelData G) |
| 165 | {U : Type} [NormedAddCommGroup U] [InnerProductSpace ℝ U] |
| 166 | (m : Space) (hm : ‖m‖=1) (R : U ≃ₗᵢ[ℝ] referencePlane m) |
| 167 | (S : Set Space) (hS : IsCompact S) (H : LowBounds G) |
| 168 | (τ : ℝ) (hτ : 0 < τ) (hτT : τ < G.T) |
| 169 | (P : ParentFrame (G.transverseData m hm R S hS) τ) |
| 170 | (Ti CM CH : ℝ) (hτ1 : τ ≤ 1) (hTi : τ⁻¹ ≤ Ti) |
| 171 | (hCM : 0 ≤ CM) (hCH : 0 ≤ CH) (ha : 1/2 ≤ P.a) (hH : 1 ≤ P.shear) |
| 172 | |
| 173 | include hτ1 hTi hCM hCH ha hH in |
| 174 | theorem neighborScaleCost_monomial (k : ℝ) (q c : ℕ) |
| 175 | (hk : 1 ≤ k) (hKk : L.K ≤ k^q) (hTik : Ti ≤ k^q) |
| 176 | (hcost : (EulerParentNeighborCost.constant*(2*(1+CM+CH))^degree)*4^degree ≤ k) |
| 177 | (hc : q*degree+1 ≤ c) (hn : degree ≤ c) : |
| 178 | L.neighborScaleCost m hm R S hS H τ hτ hτT P CM CH ≤ k^c*P.shear^c := by |
| 179 | have hconst := EulerParentNeighborCost.constant_pos |
| 180 | exact (L.neighborScaleCost_low_polynomial m hm R S hS H τ hτ hτT P Ti CM CH |
| 181 | hτ1 hTi hCM hCH ha hH).trans |
| 182 | (polynomial_le_monomial |
| 183 | (EulerParentNeighborCost.constant*(2*(1+CM+CH))^degree) |
| 184 | L.K Ti P.shear k P.shear degree q c (by positivity) |
| 185 | (zero_le_one.trans L.K_one) ((inv_pos.mpr hτ).le.trans hTi) |
| 186 | (zero_le_one.trans hH) hk hH hKk hTik le_rfl hcost hc hn) |
| 187 | |
| 188 | include hτ1 hTi hCM hCH ha hH in |
| 189 | theorem neighbor_error_of_source_scales (J D : ℕ) (X ρ : ℝ) (j q c : ℕ) |
| 190 | (hρ : 0 ≤ ρ) (hρ1 : ρ ≤ 1) |
| 191 | (hshear : P.shear=previousShear J X j) |
| 192 | (hk : 1 ≤ previousFrequency J D X j) |
| 193 | (hKk : L.K ≤ previousFrequency J D X j^q) (hTik : Ti ≤ previousFrequency J D X j^q) |
| 194 | (hcost : (EulerParentNeighborCost.constant*(2*(1+CM+CH))^degree)*4^degree ≤ |
| 195 | previousFrequency J D X j) |
| 196 | (hc : q*degree+1 ≤ c) (hn : degree ≤ c) |
| 197 | (hscale : G.ell ≤ supportScale J X j) : |
| 198 | L.neighborScaleCost m hm R S hS H τ hτ hτT P CM CH*G.ell*ρ ≤ |
| 199 | neighborError J D X (c : ℝ) j := by |
| 200 | have hbound := L.neighborScaleCost_monomial m hm R S hS H τ hτ hτT P Ti CM CH |
| 201 | hτ1 hTi hCM hCH ha hH (previousFrequency J D X j) q c hk hKk hTik hcost hc hn |
| 202 | have hmono : 0 ≤ previousFrequency J D X j^c*P.shear^c := |
| 203 | mul_nonneg (pow_nonneg (zero_le_one.trans hk) c) (pow_nonneg (zero_le_one.trans hH) c) |
| 204 | calc |
| 205 | _ ≤ (previousFrequency J D X j^c*P.shear^c)*G.ell*ρ := |
| 206 | mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hbound G.ell_pos.le) hρ |
| 207 | _ ≤ (previousFrequency J D X j^c*P.shear^c)*G.ell := by |
| 208 | simpa only [mul_one] using mul_le_mul_of_nonneg_left hρ1 (mul_nonneg hmono G.ell_pos.le) |
| 209 | _ ≤ (previousFrequency J D X j^c*P.shear^c)*supportScale J X j := |
| 210 | mul_le_mul_of_nonneg_left hscale hmono |
| 211 | _ = neighborError J D X (c : ℝ) j := by |
| 212 | simp only [neighborError,Real.rpow_natCast,hshear] |
| 213 | ring |
| 214 | |
| 215 | end EulerParentPacketFrames.LabelData |
| 216 | end |
| 217 | |
| 218 | end |
| 219 | |
| 220 | noncomputable section |
| 221 | |
| 222 | namespace EulerParentNeighborThreshold |
| 223 | |
| 224 | open Real EulerParentNeighborCost EulerPacketSourceScaleSequence |
| 225 | EulerParentHistoryFrequency |
| 226 | |
| 227 | def forwardThreshold : ℝ := constant*4^degree |
| 228 | |
| 229 | def joinedThreshold (CM CH : ℝ) : ℝ := |
| 230 | (constant*(2*(1+CM+CH))^degree)*4^degree |
| 231 | |
| 232 | def commonThreshold (CM CH : ℝ) : ℝ := |
| 233 | max forwardThreshold (joinedThreshold CM CH) |
| 234 | |
| 235 | def requiredExponent : ℕ := 80*degree+1 |
| 236 | |
| 237 | theorem degree_le_requiredExponent : degree ≤ requiredExponent := by |
| 238 | unfold requiredExponent |
| 239 | omega |
| 240 | |
| 241 | theorem forwardThreshold_le_common (CM CH : ℝ) : |
| 242 | forwardThreshold ≤ commonThreshold CM CH := le_max_left _ _ |
| 243 | |
| 244 | theorem joinedThreshold_le_common (CM CH : ℝ) : |
| 245 | joinedThreshold CM CH ≤ commonThreshold CM CH := le_max_right _ _ |
| 246 | |
| 247 | end EulerParentNeighborThreshold |
| 248 | |
| 249 | namespace EulerParentPacketFrames.LabelData |
| 250 | |
| 251 | open Set Real EulerSmoothLimit EulerTransverseFrameCoordinates EulerTransversePacketProvider |
| 252 | EulerPacketSourceGeometry EulerParentNeighborCost EulerPacketSourceScaleSequence |
| 253 | EulerPacketSourceScaleActual EulerParentNeighborThreshold EulerParentHistoryFrequency |
| 254 | EulerPacketNestedHorizons EulerPacketBaseGuardScales |
| 255 | |
| 256 | variable {G : Parent} (L : LabelData G) |
| 257 | |
| 258 | theorem strainDifferenceCost_power : |
| 259 | L.strainDifferenceCost ≤ constant*(1+L.K)^degree := by |
| 260 | simpa only [envelope,formula,strainDifferenceCost,mul_zero,add_zero] using |
| 261 | envelope_power L.K 0 0 0 0 0 (zero_le_one.trans L.K_one) |
| 262 | le_rfl le_rfl le_rfl le_rfl le_rfl |
| 263 | |
| 264 | theorem strainDifferenceCost_monomial (k : ℝ) (c : ℕ) |
| 265 | (hk : 1 ≤ k) (hKk : L.K ≤ k^80) |
| 266 | (hcost : forwardThreshold ≤ k) (hc : requiredExponent ≤ c) : |
| 267 | L.strainDifferenceCost ≤ k^c := by |
| 268 | have hconst := constant_pos |
| 269 | have hn : degree ≤ c := degree_le_requiredExponent.trans hc |
| 270 | have he : 80*degree+1 ≤ c := hc |
| 271 | have hb := polynomial_le_monomial constant L.K 0 0 k 1 degree 80 c |
| 272 | hconst.le (zero_le_one.trans L.K_one) le_rfl le_rfl hk le_rfl hKk |
| 273 | (pow_nonneg (zero_le_one.trans hk) 80) zero_le_one hcost he hn |
| 274 | exact L.strainDifferenceCost_power.trans (by |
| 275 | simpa only [add_zero,one_pow,mul_one] using hb) |
| 276 | |
| 277 | theorem forward_neighbor_error_of_source_scales (J D : ℕ) (hJ : 3 ≤ J) |
| 278 | (X ρ : ℝ) (hX : 1 ≤ X) |
| 279 | (hbase : X^D ≤ exp (X/((J-1 : ℕ) : ℝ)^4)) (n c : ℕ) |
| 280 | (hρ : 0 ≤ ρ) (hρ1 : ρ ≤ 1) |
| 281 | (hKk : L.K ≤ previousFrequency J D X n^80) |
| 282 | (hcost : forwardThreshold ≤ previousFrequency J D X n) |
| 283 | (hc : requiredExponent ≤ c) (hscale : G.ell ≤ supportScale J X n) : |
| 284 | L.strainDifferenceCost*G.ell*ρ ≤ neighborError J D X (c : ℝ) n := by |
| 285 | have hk := previousFrequency_one_le J D hJ X hX hbase n |
| 286 | have hh : 1 ≤ previousShear J X n := by |
| 287 | cases n with |
| 288 | | zero => exact one_le_pow₀ hX |
| 289 | | succ n => |
| 290 | apply one_le_exp |
| 291 | exact div_nonneg |
| 292 | ((zero_le_one.trans hX).trans |
| 293 | (EulerPacketSourceParameterScales.sequence_initial_le J (by omega) X |
| 294 | (zero_le_one.trans hX) n)) (by positivity) |
| 295 | have hb := L.strainDifferenceCost_monomial (previousFrequency J D X n) c hk hKk hcost hc |
| 296 | have hkn : 0 ≤ previousFrequency J D X n^c := pow_nonneg (zero_le_one.trans hk) c |
| 297 | have hhn : 0 ≤ previousShear J X n^c := pow_nonneg (zero_le_one.trans hh) c |
| 298 | have hb' : L.strainDifferenceCost ≤ previousFrequency J D X n^c*previousShear J X n^c := |
| 299 | hb.trans (le_mul_of_one_le_right hkn (one_le_pow₀ hh)) |
| 300 | have hprod : 0 ≤ previousFrequency J D X n^c*previousShear J X n^c := mul_nonneg hkn hhn |
| 301 | calc |
| 302 | _ ≤ (previousFrequency J D X n^c*previousShear J X n^c)*G.ell*ρ := |
| 303 | mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hb' G.ell_pos.le) hρ |
| 304 | _ ≤ (previousFrequency J D X n^c*previousShear J X n^c)*G.ell := by |
| 305 | simpa only [mul_one] using mul_le_mul_of_nonneg_left hρ1 |
| 306 | (mul_nonneg hprod G.ell_pos.le) |
| 307 | _ ≤ (previousFrequency J D X n^c*previousShear J X n^c)*supportScale J X n := |
| 308 | mul_le_mul_of_nonneg_left hscale hprod |
| 309 | _ = neighborError J D X (c : ℝ) n := by |
| 310 | simp only [neighborError,rpow_natCast] |
| 311 | ring |
| 312 | |
| 313 | variable {U : Type} [NormedAddCommGroup U] [InnerProductSpace ℝ U] |
| 314 | (m : Space) (hm : ‖m‖=1) (R : U ≃ₗᵢ[ℝ] referencePlane m) |
| 315 | (S : Set Space) (hS : IsCompact S) (H : LowBounds G) |
| 316 | (τ : ℝ) (hτ : 0 < τ) (hτT : τ < G.T) |
| 317 | (P : ParentFrame (G.transverseData m hm R S hS) τ) |
| 318 | |
| 319 | end EulerParentPacketFrames.LabelData |