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 Mathlib.Analysis.Calculus.ContDiff.FaaDiBruno |
| 2 | import Mathlib.Tactic |
| 3 | |
| 4 | /-! |
| 5 | # A factorial-square bound for the partitions in Faà di Bruno's formula |
| 6 | |
| 7 | The estimate is uniform in the order. Extending a partition either creates a |
| 8 | singleton or increases one old part, so the factorial-square weight grows by |
| 9 | at most `(n + 1)^2 * (x + 2)`. This avoids replacing every derivative in the |
| 10 | composition formula by the largest derivative bound. |
| 11 | -/ |
| 12 | |
| 13 | noncomputable section |
| 14 | |
| 15 | open scoped BigOperators |
| 16 | |
| 17 | namespace EulerGevreyComposition |
| 18 | |
| 19 | variable {n : ℕ} |
| 20 | |
| 21 | lemma sum_partSize (c : OrderedFinpartition n) : |
| 22 | ∑ i, c.partSize i = n := by |
| 23 | simpa only [Fintype.card_sigma, Fintype.card_fin] using |
| 24 | Fintype.card_congr c.equivSigma |
| 25 | |
| 26 | lemma sum_partSize_real (c : OrderedFinpartition n) : |
| 27 | ∑ i, (c.partSize i : ℝ) = n := by |
| 28 | exact_mod_cast sum_partSize c |
| 29 | |
| 30 | lemma sum_partSize_succ_sq_le (c : OrderedFinpartition n) : |
| 31 | ∑ i, ((c.partSize i : ℝ) + 1)^2 ≤ 2 * ((n : ℝ) + 1)^2 := by |
| 32 | have hl : (c.length : ℝ) ≤ n := by exact_mod_cast c.length_le |
| 33 | calc |
| 34 | _ ≤ ∑ i, ((n : ℝ) + 1) * ((c.partSize i : ℝ) + 1) := by |
| 35 | apply Finset.sum_le_sum |
| 36 | intro i _ |
| 37 | have hi : (c.partSize i : ℝ) ≤ n := by exact_mod_cast c.partSize_le i |
| 38 | nlinarith [mul_nonneg (sub_nonneg.mpr hi) (show 0 ≤ (c.partSize i : ℝ) + 1 by positivity)] |
| 39 | _ = ((n : ℝ) + 1) * ((n : ℝ) + c.length) := by |
| 40 | rw [← Finset.mul_sum, Finset.sum_add_distrib, sum_partSize_real] |
| 41 | simp |
| 42 | _ ≤ _ := by nlinarith |
| 43 | |
| 44 | def factorialProduct (c : OrderedFinpartition n) : ℝ := |
| 45 | ∏ i, ((c.partSize i).factorial : ℝ) |
| 46 | |
| 47 | def partitionWeight (x : ℝ) (c : OrderedFinpartition n) : ℝ := |
| 48 | x^c.length * ((c.length.factorial : ℝ) * factorialProduct c)^2 |
| 49 | |
| 50 | def partitionSum (n : ℕ) (x : ℝ) : ℝ := |
| 51 | ∑ c : OrderedFinpartition n, partitionWeight x c |
| 52 | |
| 53 | lemma partitionWeight_nonneg (x : ℝ) (hx : 0 ≤ x) (c : OrderedFinpartition n) : |
| 54 | 0 ≤ partitionWeight x c := by |
| 55 | unfold partitionWeight |
| 56 | positivity |
| 57 | |
| 58 | lemma factorialProduct_extendLeft (c : OrderedFinpartition n) : |
| 59 | factorialProduct c.extendLeft = factorialProduct c := by |
| 60 | change (∏ i : Fin (c.length+1), |
| 61 | (Nat.factorial (Fin.cons (α := fun _ => ℕ) 1 c.partSize i) : ℝ)) = |
| 62 | ∏ i : Fin c.length, ((c.partSize i).factorial : ℝ) |
| 63 | rw [Fin.prod_univ_succ] |
| 64 | simp |
| 65 | |
| 66 | lemma factorialProduct_extendMiddle (c : OrderedFinpartition n) (i : Fin c.length) : |
| 67 | factorialProduct (c.extendMiddle i) = |
| 68 | ((c.partSize i : ℝ) + 1) * factorialProduct c := by |
| 69 | change (∏ j : Fin c.length, |
| 70 | ((Function.update c.partSize i (c.partSize i+1) j).factorial : ℝ)) = |
| 71 | ((c.partSize i : ℝ) + 1) * ∏ j : Fin c.length, ((c.partSize j).factorial : ℝ) |
| 72 | have he : (fun j : Fin c.length => |
| 73 | ((Function.update c.partSize i (c.partSize i+1) j).factorial : ℝ)) = |
| 74 | fun j => (if j = i then (c.partSize i : ℝ) + 1 else 1) * |
| 75 | ((c.partSize j).factorial : ℝ) := by |
| 76 | funext j |
| 77 | by_cases h : j = i |
| 78 | · subst j |
| 79 | simp [Nat.factorial_succ] |
| 80 | · simp [h] |
| 81 | rw [he, Finset.prod_mul_distrib] |
| 82 | simp |
| 83 | |
| 84 | lemma partitionWeight_extendLeft (x : ℝ) (c : OrderedFinpartition n) : |
| 85 | partitionWeight x c.extendLeft = |
| 86 | (x * ((c.length : ℝ) + 1)^2) * partitionWeight x c := by |
| 87 | simp only [partitionWeight, OrderedFinpartition.extendLeft_length, |
| 88 | factorialProduct_extendLeft, Nat.factorial_succ, Nat.cast_mul, Nat.cast_add, |
| 89 | Nat.cast_one, pow_succ] |
| 90 | ring |
| 91 | |
| 92 | lemma partitionWeight_extendMiddle (x : ℝ) (c : OrderedFinpartition n) (i : Fin c.length) : |
| 93 | partitionWeight x (c.extendMiddle i) = |
| 94 | ((c.partSize i : ℝ) + 1)^2 * partitionWeight x c := by |
| 95 | simp only [partitionWeight, OrderedFinpartition.extendMiddle_length, |
| 96 | factorialProduct_extendMiddle] |
| 97 | ring |
| 98 | |
| 99 | lemma partitionSum_succ (n : ℕ) (x : ℝ) : |
| 100 | partitionSum (n+1) x = |
| 101 | ∑ c : OrderedFinpartition n, |
| 102 | (x * ((c.length : ℝ) + 1)^2 + ∑ i, ((c.partSize i : ℝ) + 1)^2) * |
| 103 | partitionWeight x c := by |
| 104 | unfold partitionSum |
| 105 | rw [← (OrderedFinpartition.extendEquiv n).sum_comp] |
| 106 | simp only [Fintype.sum_sigma, Fintype.sum_option, OrderedFinpartition.extendEquiv_apply, |
| 107 | OrderedFinpartition.extend_none, OrderedFinpartition.extend_some, |
| 108 | partitionWeight_extendLeft, partitionWeight_extendMiddle, ← Finset.sum_mul] |
| 109 | apply Finset.sum_congr rfl |
| 110 | intro c _ |
| 111 | ring |
| 112 | |
| 113 | lemma partitionSum_succ_le (n : ℕ) (x : ℝ) (hx : 0 ≤ x) : |
| 114 | partitionSum (n+1) x ≤ ((n : ℝ) + 1)^2 * (x+2) * partitionSum n x := by |
| 115 | rw [partitionSum_succ, partitionSum, Finset.mul_sum] |
| 116 | apply Finset.sum_le_sum |
| 117 | intro c _ |
| 118 | have hl : (c.length : ℝ) ≤ n := by exact_mod_cast c.length_le |
| 119 | have hs : ((c.length : ℝ) + 1)^2 ≤ ((n : ℝ) + 1)^2 := by gcongr |
| 120 | apply mul_le_mul_of_nonneg_right _ (partitionWeight_nonneg x hx c) |
| 121 | calc |
| 122 | _ ≤ x * ((n : ℝ) + 1)^2 + 2 * ((n : ℝ) + 1)^2 := |
| 123 | add_le_add (mul_le_mul_of_nonneg_left hs hx) (sum_partSize_succ_sq_le c) |
| 124 | _ = _ := by ring |
| 125 | |
| 126 | /-- The entire factorial-square Faà di Bruno partition sum has one fixed |
| 127 | exponential radius, independent of the differentiation order. -/ |
| 128 | theorem partitionSum_le (n : ℕ) (x : ℝ) (hx : 0 ≤ x) : |
| 129 | partitionSum n x ≤ (x+2)^n * (n.factorial : ℝ)^2 := by |
| 130 | induction n with |
| 131 | | zero => |
| 132 | simp [partitionSum, partitionWeight, factorialProduct, |
| 133 | OrderedFinpartition.default_eq] |
| 134 | | succ n ih => |
| 135 | calc |
| 136 | _ ≤ ((n : ℝ) + 1)^2 * (x+2) * partitionSum n x := |
| 137 | partitionSum_succ_le n x hx |
| 138 | _ ≤ ((n : ℝ) + 1)^2 * (x+2) * ((x+2)^n * (n.factorial : ℝ)^2) := by |
| 139 | gcongr |
| 140 | _ = _ := by |
| 141 | rw [Nat.factorial_succ, Nat.cast_mul, Nat.cast_add, Nat.cast_one, pow_succ] |
| 142 | ring |
| 143 | |
| 144 | end EulerGevreyComposition |