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

Merge pull request #568 from s2-ns-growing-1
Browse filesperf(NavierStokes/Growing): 1 file cheaper to elaborate (−47.8%, measured)
main maintainer-statement p1-ns-physical s1-euler-angle-9 s1-ns-harmonic-11 s1-ns-particular-10 s1-ns-radial-9 s1-ns-wave-11 s1-ns-weighted-10 s1-ns-weighted-12 s2-euler-correction-1 s2-euler-cylinder-1 s2-euler-dirichlet-1 s2-euler-euler-1 s2-euler-finite-1 s2-euler-mean-1 s2-euler-ordinary-2 s2-euler-packet-1 s2-euler-transverse-1 s2-instances-1 s2-ns-actual-1 s2-ns-annular-1 s2-ns-base-1 s2-ns-common-1 s2-ns-correction-1 s2-ns-current-1 s2-ns-five-1 s2-ns-flat-1 s2-ns-global-1 s2-ns-heat-1 s2-ns-mean-1 s2-ns-modulated-1 s2-ns-moment-1 s2-ns-outgoing-2 s2-ns-periodic-1 s2-ns-periodized-1 s2-ns-physical-1 s2-ns-positive-1 s2-ns-pressure-1 s2-ns-primary-1 s2-ns-reserved-1 s2-ns-residual-1 s2-ns-scaled-2 s2-ns-signed-1 s2-ns-slow-1 s2-ns-smooth-1 s2-ns-temporal-1 s2-ns-uniform-1 s2-ns-variable-1 s2-ns-viscous-1 s2-ns-volterra-2 s5-cap-1 s5-euler-all-1 s5-euler-base-1 s5-euler-bounded-1 s5-euler-canonical-1 s5-euler-coefficient-1 s5-euler-compact-1 s5-euler-continuous-1 s5-euler-correction-1 s5-euler-cylinder-1 s5-euler-drift-1 s5-euler-duhamel-1 s5-euler-elapsed-1 s5-euler-elapsed-2 s5-euler-euler-1 s5-euler-external-1 s5-euler-field-1 s5-euler-fixed-1 s5-euler-gained-1 s5-euler-gaussian-1 s5-euler-gevrey-1 s5-euler-graph-1 s5-euler-h5-1 s5-euler-h6-1 s5-euler-heat-1 s5-euler-inviscid-1 s5-euler-lifted-1 s5-euler-linear-1 s5-euler-lp-1 s5-euler-mean-1 s5-euler-mixed-1 s5-euler-ordinary-1 s5-euler-packet-1 s5-euler-parameter-1 s5-euler-parent-1 s5-euler-physical-1 s5-euler-projected-1 s5-euler-quadratic-1 s5-euler-regularized-1 s5-euler-small-1 s5-euler-smooth-1 s5-euler-sobolev-1 s5-euler-source-1 s5-euler-stage-1 s5-euler-static-1 s5-euler-terminal-1 s5-euler-time-1 s5-euler-top-1 s5-euler-transverse-1 s5-euler-weighted-1 s5-euler-whole-1 s5-ns-actual-1 s5-ns-axis-1 s5-ns-generic-1 s5-ns-label-1 s5-ns-local-1 s5-ns-mean-1 s5-ns-moment-1 s5-ns-particular-1 s5-ns-periodic-1 s5-ns-periodize-1 s5-ns-positive-1 s5-ns-r3-folder-1 s5-ns-reference-1 s5-ns-sharp-1 s5-ns-smooth-1 s5-ns-torus-1 s5-ns-valid-1 s5-ns-whole-1 s5-ns-within-1
Checks
build Program · lake build and Comparator
Details
challenge Program · challenge files and build config
Details
+12 −12 NavierStokes/GrowingMode.lean View file
| @@ -78,9 +78,9 @@ theorem upper_edge_factor_negative | ||
| 78 | 78 | mul_le_mul_of_nonneg_left (by linarith [(abs_le.mp he11).1, (abs_le.mp he22).2]) hr.le |
| 79 | 79 | have hquad : -(r ^ 2 * e12) ≤ r ^ 2 * eps := by |
| 80 | 80 | have h := mul_le_mul_of_nonneg_left (abs_le.mp he12).1 (sq_nonneg r) |
| 81 | - nlinarith | |
| 81 | + linarith | |
| 82 | 82 | have hrate : lamMin * r ≤ lam * r := mul_le_mul_of_nonneg_right hlam hr.le |
| 83 | - nlinarith [(abs_le.mp he21).2] | |
| 83 | + linarith [(abs_le.mp he21).2] | |
| 84 | 84 | |
| 85 | 85 | /-- The inward algebra at the lower edge follows by reversing the off-diagonal signs. -/ |
| 86 | 86 | theorem lower_edge_factor_negative |
| @@ -93,7 +93,7 @@ theorem lower_edge_factor_negative | ||
| 93 | 93 | have h := upper_edge_factor_negative (e12 := -e12) (e21 := -e21) |
| 94 | 94 | hr hlam he11 (by simpa only [abs_neg] using he12) |
| 95 | 95 | (by simpa only [abs_neg] using he21) he22 hgap |
| 96 | - nlinarith | |
| 96 | + linarith | |
| 97 | 97 | |
| 98 | 98 | /-- The quadratic cone boundary has strictly negative derivative at every |
| 99 | 99 | nonzero boundary point. Scalar damping cancels from this computation. -/ |
| @@ -106,17 +106,17 @@ theorem cone_boundary_derivative_negative | ||
| 106 | 106 | (hgap : eps * (1 + r) ^ 2 < 2 * lamMin * r) : |
| 107 | 107 | 2 * q * (e21 * p + (-lam - damping + e22) * q) - |
| 108 | 108 | r ^ 2 * (2 * p * ((lam - damping + e11) * p + e12 * q)) < 0 := by |
| 109 | - have hsq : q ^ 2 = (r * p) ^ 2 := by nlinarith [hboundary] | |
| 109 | + have hsq : q ^ 2 = (r * p) ^ 2 := by linarith [hboundary] | |
| 110 | 110 | have hpos : 0 < 2 * r * p ^ 2 := mul_pos (by linarith) (sq_pos_of_ne_zero hp) |
| 111 | 111 | rcases sq_eq_sq_iff_eq_or_eq_neg.mp hsq with hq | hq |
| 112 | 112 | · rw [hq] |
| 113 | 113 | have h := mul_neg_of_pos_of_neg hpos |
| 114 | 114 | (upper_edge_factor_negative hr hlam he11 he12 he21 he22 hgap) |
| 115 | - nlinarith [h] | |
| 115 | + linarith [h] | |
| 116 | 116 | · rw [hq] |
| 117 | 117 | have h := mul_neg_of_pos_of_neg hpos |
| 118 | 118 | (lower_edge_factor_negative hr hlam he11 he12 he21 he22 hgap) |
| 119 | - nlinarith [h] | |
| 119 | + linarith [h] | |
| 120 | 120 | |
| 121 | 121 | theorem hasDerivAt_coordinate {z : ℝ → State} {z' : State} {t : ℝ} |
| 122 | 122 | (hz : HasDerivAt z z' t) (i : Fin 2) : |
| @@ -163,7 +163,7 @@ theorem positive_invariant_cone | ||
| 163 | 163 | (B := fun _ => (0 : ℝ)) (B' := fun _ => (0 : ℝ)) |
| 164 | 164 | · dsimp [barrier] |
| 165 | 165 | rw [hminus] |
| 166 | - nlinarith [mul_nonneg (sq_nonneg r) (sq_nonneg (z a 0))] | |
| 166 | + linarith [mul_nonneg (sq_nonneg r) (sq_nonneg (z a 0))] | |
| 167 | 167 | · exact continuousOn_const |
| 168 | 168 | · exact fun t _ => (hasDerivAt_const t (0 : ℝ)).hasDerivWithinAt |
| 169 | 169 | · intro t ht heq |
| @@ -201,7 +201,7 @@ theorem positive_invariant_cone | ||
| 201 | 201 | refine ⟨hppos, abs_le_of_sq_le_sq ?_ (mul_nonneg hr.le hppos.le)⟩ |
| 202 | 202 | have hb := hbarrier t ht |
| 203 | 203 | dsimp [barrier] at hb |
| 204 | - nlinarith | |
| 204 | + linarith | |
| 205 | 205 | |
| 206 | 206 | /-- A fixed constant for the manuscript's `O(1/S)` cone width. The added one |
| 207 | 207 | allows the same statement when the perturbation bound is zero. -/ |
| @@ -235,7 +235,7 @@ theorem scaled_cone_conditions {lamMin C S : ℝ} | ||
| 235 | 235 | convert! h using 1 |
| 236 | 236 | ring |
| 237 | 237 | refine ⟨hr, hrhalf, ?_⟩ |
| 238 | - nlinarith [mul_pos hlamMin hr] | |
| 238 | + linarith [mul_pos hlamMin hr] | |
| 239 | 239 | |
| 240 | 240 | /-- The fixed-width result in the exact `K/S` form used in (28). -/ |
| 241 | 241 | theorem scaled_positive_invariant_cone |
| @@ -392,7 +392,7 @@ theorem scaled_growing_mode_bounds | ||
| 392 | 392 | simpa only [mul_one] using h |
| 393 | 393 | calc |
| 394 | 394 | D / S + (C / S) * (1 + coneConstant lamMin C / S) ≤ D / S + 2 * (C / S) := by |
| 395 | - nlinarith | |
| 395 | + linarith | |
| 396 | 396 | _ = (D + 2 * C) / S := by ring |
| 397 | 397 | let p' : ℝ → ℝ := fun t => (lam t - damping t + e11 t) * z t 0 + e12 t * z t 1 |
| 398 | 398 | have hp (t : ℝ) (ht : t ∈ Icc a b) : HasDerivAt (fun s => z s 0) (p' t) t := |
| @@ -415,7 +415,7 @@ theorem scaled_growing_mode_bounds | ||
| 415 | 415 | have hlo : Real.exp (-(D + 2 * C) * L) ≤ |
| 416 | 416 | Real.exp (-((D + 2 * C) / S) * (t - a)) := by |
| 417 | 417 | apply Real.exp_le_exp.mpr |
| 418 | - nlinarith | |
| 418 | + linarith | |
| 419 | 419 | have hhi : Real.exp (((D + 2 * C) / S) * (t - a)) ≤ |
| 420 | 420 | Real.exp ((D + 2 * C) * L) := Real.exp_le_exp.mpr hexponent |
| 421 | 421 | have hratio : 0 ≤ z a 0 / P a := div_nonneg hplus.le (hPpos a ⟨le_rfl, hab⟩).le |
| @@ -447,6 +447,6 @@ theorem original_coordinate_bounds {p q h r : ℝ} | ||
| 447 | 447 | mul_le_mul_of_nonneg_left hxlower (by positivity) |
| 448 | 448 | simp only [abs_mul, abs_neg] |
| 449 | 449 | rw [abs_of_pos (show (0 : ℝ) < 2 by norm_num)] |
| 450 | - nlinarith | |
| 450 | + linarith | |
| 451 | 451 | |
| 452 | 452 | end NavierStokes.GrowingMode |
+21 −0 routes/s2-ns-growing-1/README.md added View file
| @@ -0,0 +1,21 @@ | ||
| 1 | +--- | |
| 2 | +issue: 11 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s2-ns-growing-1 | |
| 6 | + | |
| 7 | +S-2, the family `NavierStokes/Growing*`: one file, `NavierStokes/GrowingMode.lean`, made | |
| 8 | +cheaper to elaborate. Inside proofs only, 12 lines out and 12 in: `nlinarith` becomes | |
| 9 | +`linarith`. No statement, import line, docstring or `maxHeartbeats` changes. | |
| 10 | + | |
| 11 | +The file's cost, as instructions retired in user space by `lean` elaborating it alone at | |
| 12 | +`d956c7c` (before) and at the same commit with these edits (after), one thread, | |
| 13 | +`-DElab.async=false`, under `perf stat -e instructions:u`: 46,560,836,672 before, | |
| 14 | +24,300,156,971 after (−47.8%). The measurement is the unit's, taken as `PR.md` says; I did | |
| 15 | +not measure anything myself. | |
| 16 | + | |
| 17 | +## Next | |
| 18 | + | |
| 19 | +#557-class review: this branch is pushed and a pull request is open; `challenge` passes. | |
| 20 | +`build` is the check that says whether the edited proofs compile. If the maintainer asks | |
| 21 | +for changes, answer on the pull request; nothing further is planned. | |