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.GevreyCompositionPartitions |
| 2 | import Mathlib.Analysis.Calculus.IteratedDeriv.FaaDiBruno |
| 3 | import Mathlib.Analysis.Calculus.IteratedDeriv.Lemmas |
| 4 | import Mathlib.Analysis.Calculus.Deriv.Polynomial |
| 5 | import Mathlib.Analysis.Calculus.ContDiff.Polynomial |
| 6 | import Mathlib.Algebra.Polynomial.Eval.Degree |
| 7 | import Mathlib.Algebra.Order.Field.GeomSum |
| 8 | |
| 9 | /-! Finite polynomial majorants for factorial-square Taylor coefficients. |
| 10 | The polynomials below are auxiliary nonnegative scalar polynomials. Their |
| 11 | composition is the exact scalar Faà di Bruno sum, not an assumed majorant |
| 12 | for a flow or for a solution of a differential equation. -/ |
| 13 | |
| 14 | noncomputable section |
| 15 | |
| 16 | open scoped BigOperators ContDiff Polynomial |
| 17 | |
| 18 | namespace EulerGevreyGeneratingAlgebra |
| 19 | |
| 20 | open EulerGevreyComposition |
| 21 | |
| 22 | lemma factorialProduct_nonneg {n : ℕ} (c : OrderedFinpartition n) : |
| 23 | 0 ≤ factorialProduct c := |
| 24 | Finset.prod_nonneg fun _ _ => Nat.cast_nonneg _ |
| 25 | |
| 26 | /-- The factorial used by an ordered partition never exceeds the total |
| 27 | factorial. This is the extra factor available in Gevrey order two. -/ |
| 28 | theorem partition_factorial_le {n : ℕ} (c : OrderedFinpartition n) : |
| 29 | (c.length.factorial : ℝ) * factorialProduct c ≤ n.factorial := by |
| 30 | induction n with |
| 31 | | zero => |
| 32 | have hc : c = default := Subsingleton.elim _ _ |
| 33 | subst c |
| 34 | simp [OrderedFinpartition.default_eq, factorialProduct] |
| 35 | | succ n ih => |
| 36 | obtain ⟨⟨d,o⟩,rfl⟩ := (OrderedFinpartition.extendEquiv n).surjective c |
| 37 | cases o with |
| 38 | | none => |
| 39 | simp only [OrderedFinpartition.extendEquiv_apply, |
| 40 | OrderedFinpartition.extend_none, OrderedFinpartition.extendLeft_length, |
| 41 | factorialProduct_extendLeft] |
| 42 | have hl : (d.length : ℝ) + 1 ≤ (n : ℝ) + 1 := by |
| 43 | exact_mod_cast Nat.succ_le_succ d.length_le |
| 44 | calc |
| 45 | _ = ((d.length : ℝ)+1) * ((d.length.factorial : ℝ)*factorialProduct d) := by |
| 46 | simp only [Nat.factorial_succ, Nat.cast_mul, Nat.cast_add, Nat.cast_one] |
| 47 | ring |
| 48 | _ ≤ ((n : ℝ)+1) * (n.factorial : ℝ) := |
| 49 | mul_le_mul hl (ih d) |
| 50 | (mul_nonneg (Nat.cast_nonneg _) (factorialProduct_nonneg d)) (by positivity) |
| 51 | _ = _ := by simp [Nat.factorial_succ] |
| 52 | | some i => |
| 53 | simp only [OrderedFinpartition.extendEquiv_apply, |
| 54 | OrderedFinpartition.extend_some, OrderedFinpartition.extendMiddle_length, |
| 55 | factorialProduct_extendMiddle] |
| 56 | have hl : (d.partSize i : ℝ)+1 ≤ (n : ℝ)+1 := by |
| 57 | exact_mod_cast Nat.succ_le_succ (d.partSize_le i) |
| 58 | calc |
| 59 | _ = ((d.partSize i : ℝ)+1) * |
| 60 | ((d.length.factorial : ℝ)*factorialProduct d) := by ring |
| 61 | _ ≤ ((n : ℝ)+1) * (n.factorial : ℝ) := |
| 62 | mul_le_mul hl (ih d) |
| 63 | (mul_nonneg (Nat.cast_nonneg _) (factorialProduct_nonneg d)) (by positivity) |
| 64 | _ = _ := by simp [Nat.factorial_succ] |
| 65 | |
| 66 | theorem polynomial_iteratedDeriv (p : ℝ[X]) (n : ℕ) (x : ℝ) : |
| 67 | iteratedDeriv n (fun y => p.eval y) x = |
| 68 | (Polynomial.derivative^[n] p).eval x := by |
| 69 | induction n generalizing x with |
| 70 | | zero => simp |
| 71 | | succ n ih => |
| 72 | rw [iteratedDeriv_succ] |
| 73 | have he : iteratedDeriv n (fun y => p.eval y) = |
| 74 | fun y => (Polynomial.derivative^[n] p).eval y := funext ih |
| 75 | rw [he, Polynomial.deriv, Function.iterate_succ_apply'] |
| 76 | |
| 77 | theorem polynomial_iteratedDeriv_zero (p : ℝ[X]) (n : ℕ) : |
| 78 | iteratedDeriv n (fun y => p.eval y) 0 = (n.factorial : ℝ)*p.coeff n := by |
| 79 | rw [polynomial_iteratedDeriv, ← Polynomial.coeff_zero_eq_eval_zero, |
| 80 | Polynomial.coeff_iterate_derivative] |
| 81 | simp [Nat.descFactorial_self] |
| 82 | |
| 83 | theorem polynomial_contDiff (p : ℝ[X]) : |
| 84 | ContDiff ℝ ∞ (fun y : ℝ => p.eval y) := by |
| 85 | induction p using Polynomial.induction_on' with |
| 86 | | add p q hp hq => simpa only [Polynomial.eval_add] using hp.add hq |
| 87 | | monomial n a => |
| 88 | simpa only [Polynomial.eval_monomial] using |
| 89 | (contDiff_const.mul (contDiff_id.pow n) : ContDiff ℝ ∞ (fun y : ℝ => a*y^n)) |
| 90 | |
| 91 | /-- Exact coefficient version of scalar Faà di Bruno at zero. -/ |
| 92 | theorem comp_coefficient (p q : ℝ[X]) (hp : p.coeff 0 = 0) (n : ℕ) : |
| 93 | (n.factorial : ℝ)*(q.comp p).coeff n = |
| 94 | ∑ c : OrderedFinpartition n, |
| 95 | ((c.length.factorial : ℝ)*q.coeff c.length) * |
| 96 | ∏ i, ((c.partSize i).factorial : ℝ)*p.coeff (c.partSize i) := by |
| 97 | have hp0 : p.eval 0 = 0 := by rw [← Polynomial.coeff_zero_eq_eval_zero, hp] |
| 98 | have hc := iteratedDeriv_comp_eq_sum_orderedFinpartition |
| 99 | ((polynomial_contDiff q).contDiffAt (x := p.eval 0)) |
| 100 | ((polynomial_contDiff p).contDiffAt (x := 0)) (i := n) (by simp) |
| 101 | have he : (fun y => (q.comp p).eval y) = |
| 102 | (fun y => q.eval y) ∘ (fun y => p.eval y) := by |
| 103 | funext y |
| 104 | simp |
| 105 | rw [← he, hp0] at hc |
| 106 | simpa only [polynomial_iteratedDeriv_zero] using hc |
| 107 | |
| 108 | /-- A finite scalar polynomial whose constant coefficient is zero. -/ |
| 109 | def jetPolynomial (N : ℕ) (a : ℕ → ℝ) : ℝ[X] := |
| 110 | ∑ j ∈ Finset.Icc 1 N, Polynomial.monomial j (a j) |
| 111 | |
| 112 | theorem jetPolynomial_coeff (N : ℕ) (a : ℕ → ℝ) (j : ℕ) : |
| 113 | (jetPolynomial N a).coeff j = if j ∈ Finset.Icc 1 N then a j else 0 := by |
| 114 | simp [jetPolynomial, Polynomial.coeff_monomial] |
| 115 | |
| 116 | @[simp] theorem jetPolynomial_zero (N : ℕ) (a : ℕ → ℝ) : |
| 117 | (jetPolynomial N a).coeff 0 = 0 := by |
| 118 | simp [jetPolynomial_coeff] |
| 119 | |
| 120 | theorem jetPolynomial_coeff_of_mem (N : ℕ) (a : ℕ → ℝ) (j : ℕ) |
| 121 | (hj : j ∈ Finset.Icc 1 N) : (jetPolynomial N a).coeff j = a j := by |
| 122 | simp [jetPolynomial_coeff, hj] |
| 123 | |
| 124 | theorem jetPolynomial_eval (N : ℕ) (a : ℕ → ℝ) (x : ℝ) : |
| 125 | (jetPolynomial N a).eval x = ∑ j ∈ Finset.Icc 1 N, a j*x^j := by |
| 126 | simp only [jetPolynomial, Polynomial.eval_finsetSum, Polynomial.eval_monomial] |
| 127 | |
| 128 | def NonnegativeCoefficients (p : ℝ[X]) : Prop := ∀ n, 0 ≤ p.coeff n |
| 129 | |
| 130 | theorem jetPolynomial_nonnegative (N : ℕ) (a : ℕ → ℝ) |
| 131 | (ha : ∀ j ∈ Finset.Icc 1 N, 0 ≤ a j) : |
| 132 | NonnegativeCoefficients (jetPolynomial N a) := by |
| 133 | intro j |
| 134 | rw [jetPolynomial_coeff] |
| 135 | split_ifs with hj |
| 136 | · exact ha j hj |
| 137 | · exact le_rfl |
| 138 | |
| 139 | theorem nonnegative_mul {p q : ℝ[X]} (hp : NonnegativeCoefficients p) |
| 140 | (hq : NonnegativeCoefficients q) : NonnegativeCoefficients (p*q) := by |
| 141 | intro n |
| 142 | rw [Polynomial.coeff_mul] |
| 143 | exact Finset.sum_nonneg fun j _ => mul_nonneg (hp _) (hq _) |
| 144 | |
| 145 | theorem nonnegative_pow {p : ℝ[X]} (hp : NonnegativeCoefficients p) (n : ℕ) : |
| 146 | NonnegativeCoefficients (p^n) := by |
| 147 | induction n with |
| 148 | | zero => intro j; simp only [pow_zero, Polynomial.coeff_one]; split_ifs <;> norm_num |
| 149 | | succ n ih => simpa only [pow_succ] using nonnegative_mul ih hp |
| 150 | |
| 151 | theorem nonnegative_comp {p q : ℝ[X]} (hp : NonnegativeCoefficients p) |
| 152 | (hq : NonnegativeCoefficients q) : NonnegativeCoefficients (q.comp p) := by |
| 153 | intro n |
| 154 | rw [Polynomial.comp_eq_sum_left, Polynomial.sum_def, Polynomial.finsetSum_coeff] |
| 155 | exact Finset.sum_nonneg fun j _ => by |
| 156 | rw [Polynomial.coeff_C_mul] |
| 157 | exact mul_nonneg (hq _) (nonnegative_pow hp j n) |
| 158 | |
| 159 | /-- A partial sum of a nonnegative polynomial is bounded by its actual |
| 160 | evaluation. No bound on the degree of the composed polynomial is needed. -/ |
| 161 | theorem coefficient_sum_le_eval (p : ℝ[X]) (hp : NonnegativeCoefficients p) |
| 162 | (s : Finset ℕ) (x : ℝ) (hx : 0 ≤ x) : |
| 163 | ∑ j ∈ s, p.coeff j*x^j ≤ p.eval x := by |
| 164 | rw [Polynomial.eval_eq_sum, Polynomial.sum_def] |
| 165 | calc |
| 166 | _ ≤ ∑ j ∈ s ∪ p.support, p.coeff j*x^j := |
| 167 | Finset.sum_le_sum_of_subset_of_nonneg Finset.subset_union_left |
| 168 | (fun j _ _ => mul_nonneg (hp j) (pow_nonneg hx j)) |
| 169 | _ = _ := by |
| 170 | symm |
| 171 | apply Finset.sum_subset Finset.subset_union_right |
| 172 | intro j _ hj |
| 173 | have hz : p.coeff j = 0 := by |
| 174 | simpa only [Polynomial.mem_support_iff, not_not] using hj |
| 175 | rw [hz, zero_mul] |
| 176 | |
| 177 | end EulerGevreyGeneratingAlgebra |