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.PacketInitializedInitial |
| 2 | import Euler.PacketInitializedParameterBounds |
| 3 | import Euler.PacketSourceUniformEnvelope |
| 4 | |
| 5 | /-! At each fixed Sobolev order, the two actual initial-increment costs |
| 6 | are fixed polynomials in the source primitives. Frequency and amplitude |
| 7 | are kept outside these polynomials. -/ |
| 8 | |
| 9 | noncomputable section |
| 10 | |
| 11 | namespace EulerPacketInitialCost |
| 12 | |
| 13 | open Finset EulerPhysicalL2Scaling EulerPacketTerminalDatum EulerPacketInitial |
| 14 | EulerPacketPhysicalCost EulerPacketFiveCost EulerPacketCorrectionOutput EulerPolynomialCost |
| 15 | |
| 16 | def jetPolynomialMap (R : Polynomial ℝ) (s : ℕ) : Polynomial ℝ := |
| 17 | ∑ n ∈ range (s+1), R^n*Polynomial.C ((n.factorial : ℝ)^2) |
| 18 | |
| 19 | theorem jetPolynomialMap_eval (R : Polynomial ℝ) (s : ℕ) (X : ℝ) : |
| 20 | (jetPolynomialMap R s).eval X=jetPolynomial (R.eval X) s := by |
| 21 | simp only [jetPolynomialMap,jetPolynomial,Polynomial.eval_finsetSum,Polynomial.eval_mul, |
| 22 | Polynomial.eval_pow,Polynomial.eval_C] |
| 23 | |
| 24 | def physicalPolynomial (R : Polynomial ℝ) (C : ℝ) (s : ℕ) : Polynomial ℝ := |
| 25 | ∑ n ∈ range (s+1), Polynomial.C ((4*C)^n*Real.sqrt (2/period+2*period))* |
| 26 | jetPolynomialMap R (n+1) |
| 27 | |
| 28 | theorem physicalPolynomial_eval (R : Polynomial ℝ) (C : ℝ) (s : ℕ) (X : ℝ) : |
| 29 | (physicalPolynomial R C s).eval X=physicalDerivativeCost period (R.eval X) C s := by |
| 30 | simp only [physicalPolynomial,physicalDerivativeCost,Polynomial.eval_finsetSum, |
| 31 | Polynomial.eval_mul,Polynomial.eval_C,jetPolynomialMap_eval] |
| 32 | |
| 33 | theorem jetPolynomial_mono {R S : ℝ} (hR : 0 ≤ R) (hRS : R ≤ S) (s : ℕ) : |
| 34 | jetPolynomial R s ≤ jetPolynomial S s := by |
| 35 | unfold jetPolynomial |
| 36 | apply sum_le_sum |
| 37 | intro n _ |
| 38 | exact mul_le_mul_of_nonneg_right (pow_le_pow_left₀ hR hRS n) (sq_nonneg _) |
| 39 | |
| 40 | theorem physicalDerivativeCost_mono {R S C D : ℝ} (hR : 0 ≤ R) (hC : 0 ≤ C) |
| 41 | (hRS : R ≤ S) (hCD : C ≤ D) (s : ℕ) : |
| 42 | physicalDerivativeCost period R C s ≤ physicalDerivativeCost period S D s := by |
| 43 | unfold physicalDerivativeCost |
| 44 | apply sum_le_sum |
| 45 | intro n _ |
| 46 | have hj := jetPolynomial_mono hR hRS (n+1) |
| 47 | have hj0 := jetPolynomial_nonneg R hR (n+1) |
| 48 | have hj1 := hj0.trans hj |
| 49 | have hD := hC.trans hCD |
| 50 | have hs := Real.sqrt_nonneg (2/period+2*period) |
| 51 | gcongr |
| 52 | |
| 53 | def envelope (s : ℕ) (X : ℝ) : ℝ := |
| 54 | 1+(highCost X X+meanCost X X)*physicalDerivativeCost period (4*X) (coordinateCost*2) s |
| 55 | |
| 56 | def polynomial (s : ℕ) : Polynomial ℝ := |
| 57 | 1+(gradePolynomial 1+2*gradePolynomial 2+3)* |
| 58 | physicalPolynomial (4*Polynomial.X) (coordinateCost*2) s |
| 59 | |
| 60 | theorem polynomial_eval (s : ℕ) (X : ℝ) : (polynomial s).eval X=envelope s X := by |
| 61 | unfold polynomial envelope highCost meanCost |
| 62 | simp only [Polynomial.eval_add,Polynomial.eval_mul, |
| 63 | Polynomial.eval_one,Polynomial.eval_ofNat,physicalPolynomial_eval, |
| 64 | Polynomial.eval_X,gradePolynomial_eval] |
| 65 | ring |
| 66 | |
| 67 | theorem costs_le_envelope (s : ℕ) (R H X : ℝ) (hR : 0 ≤ R) (hH : 0 ≤ H) |
| 68 | (hRX : R ≤ X) (hHX : H ≤ X) : |
| 69 | highCost R H*physicalDerivativeCost period (4*R) (coordinateCost*2) s ≤ envelope s X ∧ |
| 70 | meanCost R H*physicalDerivativeCost period (4*R) coordinateCost s ≤ envelope s X := by |
| 71 | have hX := hR.trans hRX |
| 72 | have hc : 0 ≤ coordinateCost := norm_nonneg _ |
| 73 | have h1 := gradeCost_mono R H X hR hH hRX hHX 1 |
| 74 | have h2 := gradeCost_mono R H X hR hH hRX hHX 2 |
| 75 | have hhigh : highCost R H ≤ highCost X X := by unfold highCost; linarith |
| 76 | have hmean : meanCost R H ≤ meanCost X X := by unfold meanCost; linarith |
| 77 | have hd1 := physicalDerivativeCost_mono (by positivity : 0 ≤ 4*R) |
| 78 | (by positivity : 0 ≤ coordinateCost*2) (by linarith : 4*R ≤ 4*X) le_rfl s |
| 79 | have hd2 := physicalDerivativeCost_mono (by positivity : 0 ≤ 4*R) |
| 80 | hc (by linarith : 4*R ≤ 4*X) (by linarith : coordinateCost ≤ coordinateCost*2) s |
| 81 | have hv := highCost_nonneg X X hX |
| 82 | have hm := meanCost_nonneg X X hX |
| 83 | have hd := physicalDerivativeCost_nonneg period (4*X) (coordinateCost*2) (by positivity) (by positivity) s |
| 84 | have hh := mul_le_mul hhigh hd1 |
| 85 | (physicalDerivativeCost_nonneg period (4*R) (coordinateCost*2) (by positivity) (by positivity) s) hv |
| 86 | have hm' := mul_le_mul hmean hd2 |
| 87 | (physicalDerivativeCost_nonneg period (4*R) coordinateCost (by positivity) hc s) hm |
| 88 | unfold envelope |
| 89 | constructor |
| 90 | · nlinarith only [hh,mul_nonneg hm hd] |
| 91 | · nlinarith only [hm',mul_nonneg hv hd] |
| 92 | |
| 93 | def sourcePolynomial (s : ℕ) : Polynomial ℝ := |
| 94 | (polynomial s).comp ((1+Polynomial.X+EulerPacketRadiusPolynomial.radiusPolynomial+ |
| 95 | EulerPacketCorrectionPrimitive.primitivePolynomial period).comp EulerPacketUniformSource.profilePolynomial) |
| 96 | |
| 97 | def sourceConstant (s : ℕ) : ℝ := coefficientCost (sourcePolynomial s) |
| 98 | def sourcePower (s : ℕ) : ℕ := (sourcePolynomial s).natDegree |
| 99 | |
| 100 | theorem sourceConstant_pos (s : ℕ) : 0 < sourceConstant s := coefficientCost_pos _ |
| 101 | |
| 102 | theorem sourcePolynomial_eval (s : ℕ) (X : ℝ) : |
| 103 | (sourcePolynomial s).eval X= |
| 104 | envelope s (EulerPacketInitializedCost.envelope (EulerPacketUniformSource.profileEnvelope X)) := by |
| 105 | simp only [sourcePolynomial,Polynomial.eval_comp,polynomial_eval,Polynomial.eval_add, |
| 106 | Polynomial.eval_one,Polynomial.eval_X,EulerPacketRadiusPolynomial.radiusPolynomial_eval, |
| 107 | EulerPacketCorrectionPrimitive.primitivePolynomial_eval, |
| 108 | EulerPacketUniformSource.profilePolynomial_eval,EulerPacketInitializedCost.envelope] |
| 109 | |
| 110 | theorem source_bound (s : ℕ) (X : ℝ) (hX : 1 ≤ X) : |
| 111 | envelope s (EulerPacketInitializedCost.envelope (EulerPacketUniformSource.profileEnvelope X)) ≤ |
| 112 | sourceConstant s*X^sourcePower s := by |
| 113 | rw [← sourcePolynomial_eval] |
| 114 | exact (le_abs_self _).trans (eval_bound (sourcePolynomial s) X hX) |
| 115 | |
| 116 | end EulerPacketInitialCost |