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 | |
| 3 | /-! |
| 4 | # A shifted partition estimate for a differential equation |
| 5 | |
| 6 | For the relation `DY = A ∘ Y`, the useful induction controls the order-`j` |
| 7 | derivative of `Y` by `(j-1)!²`. With those inner weights the normalized |
| 8 | Faà di Bruno partition sum stays bounded at every positive order, provided |
| 9 | its scalar argument is at most one half. |
| 10 | -/ |
| 11 | |
| 12 | noncomputable section |
| 13 | |
| 14 | open scoped BigOperators |
| 15 | |
| 16 | namespace EulerGevreyComposition |
| 17 | |
| 18 | variable {n : ℕ} |
| 19 | |
| 20 | lemma partSize_add_length_le (c : OrderedFinpartition n) (i : Fin c.length) : |
| 21 | c.partSize i + c.length ≤ n + 1 := by |
| 22 | have hs : (∑ j : Fin c.length, (c.partSize j - 1)) + c.length = n := by |
| 23 | have h : ∑ j : Fin c.length, (c.partSize j - 1 + 1) = n := by |
| 24 | simpa only [Nat.sub_add_cancel (c.partSize_pos _)] using sum_partSize c |
| 25 | simpa only [Finset.sum_add_distrib, Finset.sum_const, Finset.card_univ, |
| 26 | Fintype.card_fin, smul_eq_mul, mul_one] using h |
| 27 | have hi : c.partSize i - 1 ≤ ∑ j : Fin c.length, (c.partSize j - 1) := |
| 28 | Finset.single_le_sum (fun j _ => Nat.zero_le (c.partSize j - 1)) (Finset.mem_univ i) |
| 29 | have hp := c.partSize_pos i |
| 30 | omega |
| 31 | |
| 32 | lemma sum_partSize_sq_le (c : OrderedFinpartition n) : |
| 33 | ∑ i, (c.partSize i : ℝ)^2 ≤ ((n : ℝ) - c.length + 1) * n := by |
| 34 | calc |
| 35 | _ ≤ ∑ i, ((n : ℝ) - c.length + 1) * (c.partSize i : ℝ) := by |
| 36 | apply Finset.sum_le_sum |
| 37 | intro i _ |
| 38 | have h : (c.partSize i : ℝ) + c.length ≤ (n : ℝ) + 1 := by |
| 39 | exact_mod_cast partSize_add_length_le c i |
| 40 | have hmul := mul_le_mul_of_nonneg_right |
| 41 | (show (c.partSize i : ℝ) ≤ (n : ℝ) - c.length + 1 by linarith) |
| 42 | (show 0 ≤ (c.partSize i : ℝ) by positivity) |
| 43 | nlinarith |
| 44 | _ = _ := by rw [← Finset.mul_sum, sum_partSize_real] |
| 45 | |
| 46 | def predecessorFactorialProduct (c : OrderedFinpartition n) : ℝ := |
| 47 | ∏ i, ((c.partSize i - 1).factorial : ℝ) |
| 48 | |
| 49 | def predecessorPartitionWeight (x : ℝ) (c : OrderedFinpartition n) : ℝ := |
| 50 | x^c.length * ((c.length.factorial : ℝ) * predecessorFactorialProduct c)^2 |
| 51 | |
| 52 | def predecessorPartitionSum (n : ℕ) (x : ℝ) : ℝ := |
| 53 | ∑ c : OrderedFinpartition n, predecessorPartitionWeight x c |
| 54 | |
| 55 | lemma predecessorPartitionWeight_nonneg (x : ℝ) (hx : 0 ≤ x) |
| 56 | (c : OrderedFinpartition n) : 0 ≤ predecessorPartitionWeight x c := by |
| 57 | unfold predecessorPartitionWeight |
| 58 | positivity |
| 59 | |
| 60 | lemma predecessorFactorialProduct_extendLeft (c : OrderedFinpartition n) : |
| 61 | predecessorFactorialProduct c.extendLeft = predecessorFactorialProduct c := by |
| 62 | change (∏ i : Fin (c.length+1), |
| 63 | (Nat.factorial (Fin.cons (α := fun _ => ℕ) 1 c.partSize i - 1) : ℝ)) = |
| 64 | ∏ i : Fin c.length, ((c.partSize i - 1).factorial : ℝ) |
| 65 | rw [Fin.prod_univ_succ] |
| 66 | simp |
| 67 | |
| 68 | lemma predecessorFactorialProduct_extendMiddle (c : OrderedFinpartition n) |
| 69 | (i : Fin c.length) : |
| 70 | predecessorFactorialProduct (c.extendMiddle i) = |
| 71 | (c.partSize i : ℝ) * predecessorFactorialProduct c := by |
| 72 | change (∏ j : Fin c.length, |
| 73 | ((Function.update c.partSize i (c.partSize i+1) j - 1).factorial : ℝ)) = |
| 74 | (c.partSize i : ℝ) * ∏ j : Fin c.length, ((c.partSize j - 1).factorial : ℝ) |
| 75 | have he : (fun j : Fin c.length => |
| 76 | ((Function.update c.partSize i (c.partSize i+1) j - 1).factorial : ℝ)) = |
| 77 | fun j => (if j = i then (c.partSize i : ℝ) else 1) * |
| 78 | ((c.partSize j - 1).factorial : ℝ) := by |
| 79 | funext j |
| 80 | by_cases h : j = i |
| 81 | · subst j |
| 82 | simp only [Function.update_self, Nat.add_sub_cancel, ite_true] |
| 83 | exact_mod_cast (Nat.mul_factorial_pred (c.partSize_pos i).ne').symm |
| 84 | · simp [h] |
| 85 | rw [he, Finset.prod_mul_distrib] |
| 86 | simp |
| 87 | |
| 88 | lemma predecessorPartitionWeight_extendLeft (x : ℝ) (c : OrderedFinpartition n) : |
| 89 | predecessorPartitionWeight x c.extendLeft = |
| 90 | (x * ((c.length : ℝ) + 1)^2) * predecessorPartitionWeight x c := by |
| 91 | simp only [predecessorPartitionWeight, OrderedFinpartition.extendLeft_length, |
| 92 | predecessorFactorialProduct_extendLeft, Nat.factorial_succ, Nat.cast_mul, |
| 93 | Nat.cast_add, Nat.cast_one, pow_succ] |
| 94 | ring |
| 95 | |
| 96 | lemma predecessorPartitionWeight_extendMiddle (x : ℝ) (c : OrderedFinpartition n) |
| 97 | (i : Fin c.length) : |
| 98 | predecessorPartitionWeight x (c.extendMiddle i) = |
| 99 | (c.partSize i : ℝ)^2 * predecessorPartitionWeight x c := by |
| 100 | simp only [predecessorPartitionWeight, OrderedFinpartition.extendMiddle_length, |
| 101 | predecessorFactorialProduct_extendMiddle] |
| 102 | ring |
| 103 | |
| 104 | lemma predecessorPartitionSum_succ (n : ℕ) (x : ℝ) : |
| 105 | predecessorPartitionSum (n+1) x = |
| 106 | ∑ c : OrderedFinpartition n, |
| 107 | (x * ((c.length : ℝ) + 1)^2 + ∑ i, (c.partSize i : ℝ)^2) * |
| 108 | predecessorPartitionWeight x c := by |
| 109 | unfold predecessorPartitionSum |
| 110 | rw [← (OrderedFinpartition.extendEquiv n).sum_comp] |
| 111 | simp only [Fintype.sum_sigma, Fintype.sum_option, OrderedFinpartition.extendEquiv_apply, |
| 112 | OrderedFinpartition.extend_none, OrderedFinpartition.extend_some, |
| 113 | predecessorPartitionWeight_extendLeft, predecessorPartitionWeight_extendMiddle, |
| 114 | ← Finset.sum_mul] |
| 115 | apply Finset.sum_congr rfl |
| 116 | intro c _ |
| 117 | ring |
| 118 | |
| 119 | lemma predecessorPartitionSum_succ_le (n : ℕ) (hn : 0 < n) |
| 120 | (x : ℝ) (hx : 0 ≤ x) (hxhalf : x ≤ 1/2) : |
| 121 | predecessorPartitionSum (n+1) x ≤ |
| 122 | ((n : ℝ) + 1)^2 * predecessorPartitionSum n x := by |
| 123 | rw [predecessorPartitionSum_succ, predecessorPartitionSum, Finset.mul_sum] |
| 124 | apply Finset.sum_le_sum |
| 125 | intro c _ |
| 126 | apply mul_le_mul_of_nonneg_right _ (predecessorPartitionWeight_nonneg x hx c) |
| 127 | have hl : (c.length : ℝ) ≤ n := by exact_mod_cast c.length_le |
| 128 | have hn1 : (1 : ℝ) ≤ n := by exact_mod_cast hn |
| 129 | have hprod := mul_le_mul_of_nonneg_right |
| 130 | (show (c.length : ℝ)+1 ≤ 2*n by linarith) |
| 131 | (show 0 ≤ (c.length : ℝ)+1 by positivity) |
| 132 | have hscalar := mul_le_mul_of_nonneg_right hxhalf (sq_nonneg ((c.length : ℝ)+1)) |
| 133 | have hs := sum_partSize_sq_le c |
| 134 | nlinarith |
| 135 | |
| 136 | /-- Unlike the unshifted weights, these weights have a uniformly bounded |
| 137 | normalized sum on the scalar interval `[0, 1/2]`. -/ |
| 138 | theorem predecessorPartitionSum_le (n : ℕ) (hn : 0 < n) |
| 139 | (x : ℝ) (hx : 0 ≤ x) (hxhalf : x ≤ 1/2) : |
| 140 | predecessorPartitionSum n x ≤ x * (n.factorial : ℝ)^2 := by |
| 141 | obtain ⟨m, rfl⟩ := Nat.exists_eq_succ_of_ne_zero hn.ne' |
| 142 | induction m with |
| 143 | | zero => |
| 144 | simp [predecessorPartitionSum, predecessorPartitionWeight, |
| 145 | predecessorFactorialProduct, OrderedFinpartition.default_eq] |
| 146 | | succ m ih => |
| 147 | calc |
| 148 | _ ≤ ((m+1 : ℕ) + 1 : ℝ)^2 * predecessorPartitionSum (m+1) x := |
| 149 | predecessorPartitionSum_succ_le (m+1) (by omega) x hx hxhalf |
| 150 | _ ≤ ((m+1 : ℕ) + 1 : ℝ)^2 * (x * ((m+1).factorial : ℝ)^2) := by |
| 151 | exact mul_le_mul_of_nonneg_left (ih (by omega)) (sq_nonneg _) |
| 152 | _ = _ := by |
| 153 | change ((m+1 : ℕ) + 1 : ℝ)^2 * (x * ((m+1).factorial : ℝ)^2) = |
| 154 | x * (((m+1)+1).factorial : ℝ)^2 |
| 155 | rw [Nat.factorial_succ (m+1), Nat.cast_mul] |
| 156 | push_cast |
| 157 | ring |
| 158 | |
| 159 | end EulerGevreyComposition |