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

perf(NavierStokes/Covariance): 1 file cheaper to elaborate (−3.6%, measured) #571
Merged
+4 −5 NavierStokes/Covariance.lean View file
| @@ -41,7 +41,7 @@ def coefficients (a b scaleMinus scalePlus m t : ℝ) : Fin 2 → ℝ := | ||
| 41 | 41 | theorem determinant_formula (a b scaleMinus scalePlus : ℝ) : |
| 42 | 42 | (signedMatrix a b scaleMinus scalePlus).det = |
| 43 | 43 | -(2 * a * b * scaleMinus * scalePlus) := by |
| 44 | - simp [signedMatrix, Matrix.det_fin_two] | |
| 44 | + simp [signedMatrix] | |
| 45 | 45 | ring |
| 46 | 46 | |
| 47 | 47 | theorem determinant_neg {a b scaleMinus scalePlus : ℝ} |
| @@ -66,8 +66,7 @@ theorem reconstruct {a b scaleMinus scalePlus : ℝ} (m t : ℝ) | ||
| 66 | 66 | (coefficients a b scaleMinus scalePlus m t) = target m t := by |
| 67 | 67 | ext i |
| 68 | 68 | fin_cases i <;> |
| 69 | - simp [signedMatrix, coefficients, target, Matrix.mulVec, dotProduct, | |
| 70 | - Fin.sum_univ_two] <;> | |
| 69 | + simp [signedMatrix, coefficients, target, Matrix.mulVec, dotProduct] <;> | |
| 71 | 70 | field_simp <;> ring |
| 72 | 71 | |
| 73 | 72 | /-- Thus the explicit formula is the matrix inverse applied to the stress. -/ |
| @@ -150,14 +149,14 @@ def normalMagnitude (c u : ℝ) : ℝ := -c * Real.sqrt (1 + u ^ 2) | ||
| 150 | 149 | |
| 151 | 150 | theorem normalMagnitude_pos {c u : ℝ} (hc : c < 0) : 0 < normalMagnitude c u := by |
| 152 | 151 | unfold normalMagnitude |
| 153 | - exact mul_pos (neg_pos.mpr hc) (Real.sqrt_pos.mpr (by nlinarith [sq_nonneg u])) | |
| 152 | + exact mul_pos (neg_pos.mpr hc) (Real.sqrt_pos.mpr (by linarith [sq_nonneg u])) | |
| 154 | 153 | |
| 155 | 154 | /-- The manuscript's strict ratio choice for `u_*` implies the exact cone test. -/ |
| 156 | 155 | theorem cone_of_ratio {c u m t : ℝ} (hm : 0 < m) |
| 157 | 156 | (hratio : |c * t / m| < u / Real.sqrt (1 + u ^ 2)) : |
| 158 | 157 | |normalMagnitude c u * t| < u * m := by |
| 159 | 158 | have hs : 0 < Real.sqrt (1 + u ^ 2) := |
| 160 | - Real.sqrt_pos.mpr (by nlinarith [sq_nonneg u]) | |
| 159 | + Real.sqrt_pos.mpr (by linarith [sq_nonneg u]) | |
| 161 | 160 | have hr : |c * t| / m < u / Real.sqrt (1 + u ^ 2) := by |
| 162 | 161 | simpa only [abs_div, abs_of_pos hm] using hratio |
| 163 | 162 | have hcross : |c * t| * Real.sqrt (1 + u ^ 2) < u * m := |
+26 −0 routes/s2-ns-covariance-1/README.md added View file
| @@ -0,0 +1,26 @@ | ||
| 1 | +--- | |
| 2 | +issue: 11 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s2-ns-covariance-1 | |
| 6 | + | |
| 7 | +One unit of #11 (S-2), in the family `NavierStokes/Covariance*`: make | |
| 8 | +`NavierStokes/Covariance.lean` cheaper to elaborate. | |
| 9 | + | |
| 10 | +The edits are those of Treant's `speedup_trials` stage | |
| 11 | +(TitiSkywalker/NavierStokesAndEuler, the run of 2026-12-03), carried onto main | |
| 12 | +at `d956c7c` and counted there. They sit inside proofs only: a `simp` argument | |
| 13 | +list loses the entries that do not change the goal; `nlinarith` becomes | |
| 14 | +`linarith`; other small rewrites of a tactic step. No statement, no import line | |
| 15 | +and no docstring changes, and there is no `maxHeartbeats`. | |
| 16 | + | |
| 17 | +The count: `lean -j1 -DElab.async=false` under `perf stat -e instructions:u`, | |
| 18 | +one file elaborated alone against the compiled tree of main `d956c7c` (before) | |
| 19 | +and against the same commit with the edits (after), on one machine. It is | |
| 20 | +instructions retired in user space, not time. `NavierStokes/Covariance.lean` | |
| 21 | +went from 7.98 G to 7.69 G instructions, −3.6%. | |
| 22 | + | |
| 23 | +## Next | |
| 24 | + | |
| 25 | +Push, open the pull request into `main`, and let `challenge` and `build` report; | |
| 26 | +then answer the maintainer's review. | |