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 #573 from s2-ns-gaussian-1
Browse filesperf(NavierStokes/Gaussian): 2 files cheaper to elaborate (−6.3%, measured)
main s1-euler-angle-9 s1-ns-harmonic-11 s1-ns-particular-10 s1-ns-radial-9 s1-ns-wave-11 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-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
Checks
build Program · lake build and Comparator
Details
challenge Program · challenge files and build config
Details
+6 −6 NavierStokes/GaussianEnvelope.lean View file
| @@ -78,7 +78,7 @@ theorem integral_quadratic_bounds {D : Set ℝ} {rate : ℝ → ℝ} | ||
| 78 | 78 | intro x hx |
| 79 | 79 | have h := hhi x (hsub hx) midpoint hm hx.2 |
| 80 | 80 | rw [hzero] at h |
| 81 | - nlinarith | |
| 81 | + linarith | |
| 82 | 82 | have hu : (∫ x in time..midpoint, rate x) ≤ |
| 83 | 83 | ∫ x in time..midpoint, lower * (x - midpoint) := by |
| 84 | 84 | apply intervalIntegral.integral_mono_on htm hint |
| @@ -86,10 +86,10 @@ theorem integral_quadratic_bounds {D : Set ℝ} {rate : ℝ → ℝ} | ||
| 86 | 86 | intro x hx |
| 87 | 87 | have h := hlo x (hsub hx) midpoint hm hx.2 |
| 88 | 88 | rw [hzero] at h |
| 89 | - nlinarith | |
| 89 | + linarith | |
| 90 | 90 | rw [integral_centered_linear] at hl hu |
| 91 | 91 | rw [intervalIntegral.integral_symm time midpoint] |
| 92 | - constructor <;> nlinarith | |
| 92 | + constructor <;> linarith | |
| 93 | 93 | |
| 94 | 94 | /-- Gaussian upper and lower bounds with the manuscript's slot-length normalization. -/ |
| 95 | 95 | theorem gaussian_envelope_bounds {D : Set ℝ} {rate : ℝ → ℝ} |
| @@ -164,7 +164,7 @@ theorem referenceSlope_bounds {lam u s : ℝ} (hlam : 0 < lam) (hu : 0 < u) | ||
| 164 | 164 | referenceSlope lam u s ≤ -referenceMinSlope lam u := by |
| 165 | 165 | have hspos : 0 < s := by linarith [hs.1] |
| 166 | 166 | have hn : 0 ≤ lam * s := le_of_lt (mul_pos hlam hspos) |
| 167 | - have hS : 1 ≤ 1 + s ^ 2 := by nlinarith [sq_nonneg s] | |
| 167 | + have hS : 1 ≤ 1 + s ^ 2 := by linarith [sq_nonneg s] | |
| 168 | 168 | have hroot : 1 ≤ Real.sqrt (1 + s ^ 2) := Real.one_le_sqrt.2 hS |
| 169 | 169 | have hden : 1 ≤ (1 + s ^ 2) * Real.sqrt (1 + s ^ 2) := by |
| 170 | 170 | calc |
| @@ -173,14 +173,14 @@ theorem referenceSlope_bounds {lam u s : ℝ} (hlam : 0 < lam) (hu : 0 < u) | ||
| 173 | 173 | mul_le_mul hS hroot (by norm_num) (le_of_lt (PulseGrowth.one_add_sq_pos s)) |
| 174 | 174 | have hfirst : lam * s / ((1 + s ^ 2) * Real.sqrt (1 + s ^ 2)) ≤ lam * s := by |
| 175 | 175 | apply (div_le_iff₀ (PulseGrowth.dampingDenominator_pos s)).2 |
| 176 | - nlinarith [mul_le_mul_of_nonneg_left hden hn] | |
| 176 | + linarith [mul_le_mul_of_nonneg_left hden hn] | |
| 177 | 177 | have hfirst0 : 0 ≤ lam * s / ((1 + s ^ 2) * Real.sqrt (1 + s ^ 2)) := |
| 178 | 178 | div_nonneg hn (le_of_lt (PulseGrowth.dampingDenominator_pos s)) |
| 179 | 179 | have hfirstUpper : lam * s ≤ 3 * lam * u / 2 := by nlinarith [hs.2] |
| 180 | 180 | have hsecondUpper : 2 * lam * s / ((1 + u ^ 2) * Real.sqrt (1 + u ^ 2)) ≤ |
| 181 | 181 | 3 * lam * u / ((1 + u ^ 2) * Real.sqrt (1 + u ^ 2)) := by |
| 182 | 182 | apply (div_le_div_iff_of_pos_right (PulseGrowth.dampingDenominator_pos u)).2 |
| 183 | - nlinarith [hs.2] | |
| 183 | + linarith [hs.2] | |
| 184 | 184 | have hsecondLower : lam * u / ((1 + u ^ 2) * Real.sqrt (1 + u ^ 2)) ≤ |
| 185 | 185 | 2 * lam * s / ((1 + u ^ 2) * Real.sqrt (1 + u ^ 2)) := by |
| 186 | 186 | apply (div_le_div_iff_of_pos_right (PulseGrowth.dampingDenominator_pos u)).2 |
+5 −5 NavierStokes/GaussianTailFlat.lean View file
| @@ -54,7 +54,7 @@ theorem profile_eventually_zero {v : ℝ} (hv : 1 / 3 < |v - 1 / 2|) : | ||
| 54 | 54 | apply notMem_tsupport_iff_eventuallyEq.mp |
| 55 | 55 | change v ∉ tsupport (profileBump : ℝ → ℝ) |
| 56 | 56 | rw [profileBump.tsupport_eq] |
| 57 | - simpa [Metric.mem_closedBall, Real.dist_eq, profileBump] using (not_le.mpr hv) | |
| 57 | + simpa [Real.dist_eq, profileBump] using (not_le.mpr hv) | |
| 58 | 58 | |
| 59 | 59 | theorem profile_iteratedDeriv_compact (m : ℕ) : |
| 60 | 60 | HasCompactSupport (iteratedDeriv m profile) := by |
| @@ -175,12 +175,12 @@ theorem gaussian_beats_Q_power {c : ℝ} (hc : 0 < c) (p : ℕ) (N : ℝ) : | ||
| 175 | 175 | suffices A * (n : ℝ) - c / 2 * (n : ℝ) ^ 2 ≤ K by linarith |
| 176 | 176 | dsimp [K] |
| 177 | 177 | apply (le_div_iff₀ hc2).2 |
| 178 | - nlinarith | |
| 178 | + linarith | |
| 179 | 179 | have hexp : Real.exp (-c * ChartScales.S n) ≤ |
| 180 | 180 | Real.exp (-(c / 2) * ChartScales.S n) * Real.exp K * ChartScales.Q n ^ N := by |
| 181 | 181 | rw [Q_rpow_eq_exp, ← Real.exp_add, ← Real.exp_add] |
| 182 | 182 | apply Real.exp_le_exp.2 |
| 183 | - dsimp [ChartScales.S, A] at * | |
| 183 | + dsimp [ChartScales.S] at * | |
| 184 | 184 | linarith |
| 185 | 185 | calc |
| 186 | 186 | _ ≤ (1 + ChartScales.S n) ^ p * |
| @@ -197,7 +197,7 @@ theorem gaussian_beats_Q_power {c : ℝ} (hc : 0 < c) (p : ℕ) (N : ℝ) : | ||
| 197 | 197 | theorem gaussian_length_comparison {c κ L S : ℝ} (hc : 0 ≤ c) (hL : κ * S ≤ L) : |
| 198 | 198 | Real.exp (-(c / 25) * L) ≤ Real.exp (-(c * κ / 25) * S) := by |
| 199 | 199 | apply Real.exp_le_exp.2 |
| 200 | - nlinarith [mul_le_mul_of_nonneg_left hL hc] | |
| 200 | + linarith [mul_le_mul_of_nonneg_left hL hc] | |
| 201 | 201 | |
| 202 | 202 | /-- A fixed power loss consumes only half of a Gaussian tail. -/ |
| 203 | 203 | theorem fixed_power_gaussian_bound {c : ℝ} (hc : 0 < c) (r : ℝ) : |
| @@ -581,7 +581,7 @@ theorem native_slot_length_lower (r0 h : ℝ) (hr0 : 0 < r0) (hh : 0 ≤ h) : | ||
| 581 | 581 | have hS (n : ℕ) : 0 < 1 + ChartScales.S n := by unfold ChartScales.S; positivity |
| 582 | 582 | obtain ⟨i, hi, hmin⟩ := (Finset.range 4).exists_min_image |
| 583 | 583 | (fun n => ChartScales.slotLength r0 h n / (1 + ChartScales.S n)) |
| 584 | - (by exact ⟨0, by decide⟩) | |
| 584 | + (⟨0, by decide⟩) | |
| 585 | 585 | refine ⟨min r0 (ChartScales.slotLength r0 h i / (1 + ChartScales.S i)), |
| 586 | 586 | lt_min hr0 (div_pos (hL i) (hS i)), ?_⟩ |
| 587 | 587 | intro n |
+31 −0 routes/s2-ns-gaussian-1/README.md added View file
| @@ -0,0 +1,31 @@ | ||
| 1 | +--- | |
| 2 | +issue: 11 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s2-ns-gaussian-1 | |
| 6 | + | |
| 7 | +One unit of S-2 (find the slowest files and make one faster): the family | |
| 8 | +`NavierStokes/Gaussian*`, two files. | |
| 9 | + | |
| 10 | +The edits are proof-internal tactic rewrites carried from Treant's `speedup_trials` | |
| 11 | +stage (TitiSkywalker/NavierStokesAndEuler, run of 2026-12-03 at upstream `f9e8bc5`), | |
| 12 | +kept there only if the file got measurably cheaper. Carried onto main and counted | |
| 13 | +again at `d956c7c` (`lean -j1 -DElab.async=false`, instructions retired): | |
| 14 | + | |
| 15 | +| file | before | after | | |
| 16 | +|---|---|---| | |
| 17 | +| `NavierStokes/GaussianEnvelope.lean` | 19.35 G | 16.71 G (−13.6%) | | |
| 18 | +| `NavierStokes/GaussianTailFlat.lean` | 30.76 G | 30.26 G (−1.6%) | | |
| 19 | + | |
| 20 | +Both files are unchanged from `d956c7c` to main `d9adcf6`, so the counts stand. | |
| 21 | +The change is 11 lines out and 11 in: `nlinarith` steps that only need linear | |
| 22 | +reasoning become `linarith`; a `simpa`/`dsimp` argument list loses entries that | |
| 23 | +do not change the goal; one `by exact` wrapper goes. No statement, import line or | |
| 24 | +docstring changes, and no `maxHeartbeats`. Both proofs read the same or cleaner. | |
| 25 | + | |
| 26 | +## Next | |
| 27 | + | |
| 28 | +The pull request is open against main (branch `s2-ns-gaussian-1`). If `build` | |
| 29 | +reports that one of the rewritten tactic steps no longer closes its goal, put that | |
| 30 | +file's edits back, take its row out of the table and reopen with the other file | |
| 31 | +alone; otherwise nothing follows. | |