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/Loop): 2 files cheaper to elaborate (−5.8%, measured) #577
Open
+3 −5 NavierStokes/LoopMoments.lean View file
| @@ -43,14 +43,12 @@ def loopA (v t : ℝ) : ℝ := v / (1 + t ^ 2) | ||
| 43 | 43 | def loopC (v t : ℝ) : ℝ := v * t / (1 + t ^ 2) |
| 44 | 44 | |
| 45 | 45 | theorem one_add_sq_pos (t : ℝ) : 0 < 1 + t ^ 2 := by |
| 46 | - nlinarith [sq_nonneg t] | |
| 46 | + linarith [sq_nonneg t] | |
| 47 | 47 | |
| 48 | -theorem loopA_pos (v t : ℝ) (hv : 0 < v) : 0 < loopA v t := by | |
| 49 | - exact div_pos hv (one_add_sq_pos t) | |
| 48 | +theorem loopA_pos (v t : ℝ) (hv : 0 < v) : 0 < loopA v t := div_pos hv (one_add_sq_pos t) | |
| 50 | 49 | |
| 51 | 50 | theorem phaseDensity_pos (a v t : ℝ) (ha : 0 < a) (hv : 0 < v) : |
| 52 | - 0 < phaseDensity a v t := by | |
| 53 | - exact div_pos (mul_pos ha (one_add_sq_pos t)) hv | |
| 51 | + 0 < phaseDensity a v t := div_pos (mul_pos ha (one_add_sq_pos t)) hv | |
| 54 | 52 | |
| 55 | 53 | theorem loop_speed (v t : ℝ) : loopA v t * (1 + t ^ 2) = v := by |
| 56 | 54 | unfold loopA |
+4 −4 NavierStokes/LoopVariance.lean View file
| @@ -275,7 +275,7 @@ theorem quadraticFactor_identity (s : ℝ) : baseVariance s = s ^ 2 * quadraticF | ||
| 275 | 275 | have h₂ := sub_smul_dslope (dslope baseVariance 0) (0 : ℝ) s |
| 276 | 276 | simp only [sub_zero, smul_eq_mul, baseVariance_zero, dslope_same, baseVariance_deriv_zero] at h₁ h₂ |
| 277 | 277 | change baseVariance s = s ^ 2 * dslope (dslope baseVariance 0) 0 s |
| 278 | - nlinarith [congrArg (fun z : ℝ => s * z) h₂] | |
| 278 | + linarith [congrArg (fun z : ℝ => s * z) h₂] | |
| 279 | 279 | |
| 280 | 280 | theorem quadraticFactor_analyticAt (s : ℝ) : AnalyticAt ℝ quadraticFactor s := by |
| 281 | 281 | by_cases hs : s = 0 |
| @@ -424,7 +424,7 @@ theorem normalizer_double_square_lower (t : ℝ) (ht : 1 ≤ t) : | ||
| 424 | 424 | apply Real.exp_le_exp.mpr |
| 425 | 425 | have hc := Real.one_sub_sq_div_two_le_cos (x := x) |
| 426 | 426 | have hm := mul_le_mul_of_nonneg_left hc (show 0 ≤ 2 * t ^ 2 by positivity) |
| 427 | - nlinarith | |
| 427 | + linarith | |
| 428 | 428 | have hloc := intervalIntegral.integral_mono_on (μ := volume) hab |
| 429 | 429 | (continuous_const.intervalIntegrable _ _) (he.intervalIntegrable _ _) hbound |
| 430 | 430 | rw [intervalIntegral.integral_const] at hloc |
| @@ -558,7 +558,7 @@ theorem inverseRoot_deriv_zero : deriv inverseRoot 0 = 1 / Real.sqrt (1 / 2) := | ||
| 558 | 558 | have hprod := hcomp.unique (hasDerivAt_id 0) |
| 559 | 559 | have hroot : Real.sqrt (1 / 2) ≠ 0 := ne_of_gt (Real.sqrt_pos.mpr (by norm_num)) |
| 560 | 560 | apply (eq_div_iff hroot).mpr |
| 561 | - nlinarith | |
| 561 | + linarith | |
| 562 | 562 | |
| 563 | 563 | /-- An analytic divided difference of the actual inverse, which removes the |
| 564 | 564 | apparent `1/p` singularity in the parameter-dependent variance solve. -/ |
| @@ -741,7 +741,7 @@ theorem regularizedDensitySlope_identity (s θ : ℝ) : | ||
| 741 | 741 | have hnz := ne_of_gt (expNormalizer_pos s) |
| 742 | 742 | field_simp |
| 743 | 743 | dsimp [expDivided, normalizerDivided] |
| 744 | - nlinarith | |
| 744 | + linarith | |
| 745 | 745 | |
| 746 | 746 | theorem regularizedDensitySlope_joint_contDiff : |
| 747 | 747 | ContDiff ℝ ω (fun x : ℝ × ℝ => regularizedDensitySlope x.1 x.2) := by |
+17 −0 routes/s2-ns-loop-1/README.md added View file
| @@ -0,0 +1,17 @@ | ||
| 1 | +--- | |
| 2 | +issue: 11 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s2-ns-loop-1 | |
| 6 | + | |
| 7 | +One unit of #11 (S-2): two files of the family `NavierStokes/Loop*`, `NavierStokes/LoopMoments.lean` | |
| 8 | +and `NavierStokes/LoopVariance.lean`, made cheaper to elaborate. The edits are proof-only: three | |
| 9 | +`nlinarith` steps become `linarith` (`one_add_sq_pos`, and four steps in `LoopVariance.lean`), and two | |
| 10 | +proofs in `LoopMoments.lean` that were `by exact …` are written as the same term on the `:=` line. | |
| 11 | +No statement, import line or docstring changes, and no `maxHeartbeats`. The counts are in the pull | |
| 12 | +request, with how they were taken. | |
| 13 | + | |
| 14 | +## Next | |
| 15 | + | |
| 16 | +Push and let `challenge` and `build` judge. If the maintainer wants a single file per pull request, | |
| 17 | +`LoopMoments.lean` and `LoopVariance.lean` split cleanly along this family. | |