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/Periodic): 2 files cheaper to elaborate (−2.3%, measured)
Browse filesPart of #11. Edits inside proofs only: three nlinarith calls become linarith; a simpa using becomes exact; dsimp [G, G'] becomes dsimp [G]; and four simp/simp only lists lose entries that do not change the goal. No statement, import line, docstring or maxHeartbeats changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checks
build Program · lake build and Comparator
Details
challenge Program · challenge files and build config
Details
ci/docs
Details
+2 −2 NavierStokes/PeriodicSobolev.lean View file
| @@ -125,7 +125,7 @@ private theorem curve_energy_bound {f f' : ℝ → Space} | ||
| 125 | 125 | have hcross (s : ℝ) : |2 * ⟪f s, f' s⟫_ℝ| ≤ ‖f s‖ ^ 2 + ‖f' s‖ ^ 2 := by |
| 126 | 126 | rw [abs_mul, abs_of_nonneg (by norm_num : (0 : ℝ) ≤ 2)] |
| 127 | 127 | have hinner := abs_real_inner_le_norm (f s) (f' s) |
| 128 | - nlinarith [sq_nonneg (‖f s‖ - ‖f' s‖)] | |
| 128 | + linarith [sq_nonneg (‖f s‖ - ‖f' s‖)] | |
| 129 | 129 | have hh := scalar_le_average_add_average_bound (hf.norm.fun_pow 2) |
| 130 | 130 | (continuous_const.mul (hf.inner hf')) ((hf.norm.fun_pow 2).fun_add (hf'.norm.fun_pow 2)) |
| 131 | 131 | (fun s => (hd s).norm_sq) hcross hx |
| @@ -317,7 +317,7 @@ theorem norm_le_three_derivativeH3Norm {f : Space → Space} | ||
| 317 | 317 | have hsqrt := Real.sq_sqrt hnonneg |
| 318 | 318 | have hs : ‖f x‖ ^ 2 ≤ (3 * derivativeH3Norm f) ^ 2 := by |
| 319 | 319 | unfold derivativeH3Norm |
| 320 | - nlinarith | |
| 320 | + linarith | |
| 321 | 321 | exact (sq_le_sq₀ (norm_nonneg _) (mul_nonneg (by norm_num) (derivativeH3Norm_nonneg f))).mp hs |
| 322 | 322 | |
| 323 | 323 | def DerivativeH3UnboundedAtOne (u : VelocityField) : Prop := |
+8 −8 NavierStokes/PeriodicUniqueness.lean View file
| @@ -65,7 +65,7 @@ theorem advection_difference {u v : VelocityField} {t : ℝ} | ||
| 65 | 65 | advection u t x - advection v t x = |
| 66 | 66 | spatialDerivative u t x ((u - v) (t, x)) + |
| 67 | 67 | spatialDerivative (u - v) t x (v (t, x)) := by |
| 68 | - simp only [advection, spatialDerivative_sub hu hv, Pi.sub_apply, | |
| 68 | + simp only [spatialDerivative_sub hu hv, Pi.sub_apply, | |
| 69 | 69 | map_sub, _root_.sub_apply] |
| 70 | 70 | abel |
| 71 | 71 | |
| @@ -164,7 +164,7 @@ theorem gronwall_zero {a b K : ℝ} {E E' : ℝ → ℝ} (hab : a ≤ b) | ||
| 164 | 164 | have hgderiv (t : ℝ) (ht : t ∈ Ioo a b) : HasDerivAt G (G' t) t := by |
| 165 | 165 | have hexp := ((hasDerivAt_id t).const_mul (-K)).exp |
| 166 | 166 | convert! hexp.mul (hderiv t ht) using 1 |
| 167 | - dsimp [G, G'] | |
| 167 | + dsimp [G] | |
| 168 | 168 | ring |
| 169 | 169 | have hG : AntitoneOn G (Icc a b) := by |
| 170 | 170 | apply antitoneOn_of_hasDerivWithinAt_nonpos (convex_Icc a b) hgcont |
| @@ -237,10 +237,10 @@ theorem periodic_lattice {W : Type*} {f : Space → W} | ||
| 237 | 237 | (n : Fin 3 → ℤ) : Function.Periodic f (∑ i : Fin 3, n i • coordinateVector i) := by |
| 238 | 238 | have hsum (s : Finset (Fin 3)) : Function.Periodic f (∑ i ∈ s, n i • coordinateVector i) := by |
| 239 | 239 | induction s using Finset.induction_on with |
| 240 | - | empty => simp [Function.Periodic] | |
| 240 | + | empty => simp | |
| 241 | 241 | | @insert i s his ih => |
| 242 | 242 | simpa only [Finset.sum_insert his] using ((hf i).zsmul (n i)).add_period ih |
| 243 | - simpa using hsum Finset.univ | |
| 243 | + exact hsum Finset.univ | |
| 244 | 244 | |
| 245 | 245 | /-- Each point has a representative in the unit cube with the same value |
| 246 | 246 | under every function having the three unit coordinate periods. -/ |
| @@ -256,7 +256,7 @@ theorem exists_cube_representative {W : Type*} {f : Space → W} | ||
| 256 | 256 | ext j |
| 257 | 257 | change x j = (EuclideanSpace.proj j) (y + ∑ i : Fin 3, (⌊x i⌋ : ℤ) • coordinateVector i) |
| 258 | 258 | simp only [map_add, map_sum, map_zsmul] |
| 259 | - simp [y, coordinateVector, Int.fract_add_floor] | |
| 259 | + simp [y, coordinateVector] | |
| 260 | 260 | have hp := periodic_lattice hf (fun i => ⌊x i⌋) |
| 261 | 261 | rw [hxy] |
| 262 | 262 | exact (hp y).symm |
| @@ -308,7 +308,7 @@ theorem inner_pressureGradient (p : PressureField) (t : ℝ) (x w : Space) : | ||
| 308 | 308 | ⟪w, pressureGradient p t x⟫_ℝ = fderiv ℝ (fun y => p (t, y)) x w := by |
| 309 | 309 | rw [fderiv_apply_eq_sum] |
| 310 | 310 | simp only [pressureGradient, inner_sum, inner_smul_right, coordinateVector, |
| 311 | - EuclideanSpace.inner_single_right, RCLike.conj_to_real, one_mul] | |
| 311 | + EuclideanSpace.inner_single_right, RCLike.conj_to_real] | |
| 312 | 312 | apply Finset.sum_congr rfl |
| 313 | 313 | intro i _ |
| 314 | 314 | ring |
| @@ -531,7 +531,7 @@ theorem energy_balance {u v : VelocityField} {p q : PressureField} {t : ℝ} | ||
| 531 | 531 | cubeIntegral_sub hL hN, cubeIntegral_laplacian_energy hw hpw, |
| 532 | 532 | cubeIntegral_transport_energy_zero hw hv hpw hpv hdv, |
| 533 | 533 | cubeIntegral_pressure_energy_zero hw (hp.sub hq) hpw (unitPeriods_sub hpp hpq) hdw] |
| 534 | - simp only [sub_zero, dissipation, coupling, spatialDerivative] | |
| 534 | + simp only [dissipation, coupling, spatialDerivative] | |
| 535 | 535 | ring |
| 536 | 536 | |
| 537 | 537 | /-- Integrating the pointwise nonlinear bound only needs a gradient bound |
| @@ -569,7 +569,7 @@ theorem energy_rate_le {u v : VelocityField} {p q : PressureField} {t B : ℝ} | ||
| 569 | 569 | rw [energy_balance hu hv hp hq hpu hpv hpp hpq hdu hdv htu htv hNS] |
| 570 | 570 | have hc := neg_coupling_le_energy hu hv hB |
| 571 | 571 | have hd := dissipation_nonneg (u - v) t |
| 572 | - nlinarith | |
| 572 | + linarith | |
| 573 | 573 | |
| 574 | 574 | theorem time_differentiable_at_interior {V : Type*} [NormedAddCommGroup V] [NormedSpace ℝ V] |
| 575 | 575 | {a b t : ℝ} {u : SpaceTime → V} (hu : ContDiffOn ℝ ∞ u (slab a b)) |
+26 −0 routes/s2-ns-periodic-1/README.md added View file
| @@ -0,0 +1,26 @@ | ||
| 1 | +--- | |
| 2 | +issue: 11 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s2-ns-periodic-1 | |
| 6 | + | |
| 7 | +One unit of S-2 (issue #11), family `NavierStokes/Periodic*`: `NavierStokes/PeriodicSobolev.lean` and | |
| 8 | +`NavierStokes/PeriodicUniqueness.lean` are made cheaper to elaborate by edits inside proofs only (10 lines out, 10 in). | |
| 9 | +Three `nlinarith` calls become `linarith` (two in `PeriodicSobolev.lean`, one in `PeriodicUniqueness.lean`); a | |
| 10 | +`simpa using` becomes `exact`; `dsimp [G, G']` becomes `dsimp [G]`; and four `simp`/`simp only` lists lose entries that | |
| 11 | +do not change the goal (`advection`, `Function.Periodic`, `Int.fract_add_floor`, `one_mul`, `sub_zero`). No statement, | |
| 12 | +no import line, no docstring and no `maxHeartbeats` changes; no other file is touched. | |
| 13 | + | |
| 14 | +The edits are those of Treant's `speedup_trials` stage (TitiSkywalker/NavierStokesAndEuler, the run of 2026-12-03 at | |
| 15 | +upstream `f9e8bc5`), carried onto this project's main at `df2f18f` and counted there file by file. The count is | |
| 16 | +instructions retired in user space by `lean` elaborating the one file alone, on one thread, with synchronous | |
| 17 | +elaboration (`lean -j1 -DElab.async=false`, under `perf stat -e instructions:u`), before and after, on one machine: | |
| 18 | +`PeriodicSobolev.lean` 15.22 G before, 14.62 G after (−3.9%); `PeriodicUniqueness.lean` 31.60 G before, 31.11 G after | |
| 19 | +(−1.5%); the two together 46.81 G before, 45.74 G after (−2.3%). Reading the diff as a reviewer, every hunk sits below | |
| 20 | +the `:=` of its declaration with the statement untouched, and none makes its proof harder to read, so neither file is | |
| 21 | +left out of the pull request. | |
| 22 | + | |
| 23 | +## Next | |
| 24 | + | |
| 25 | +The maintainer's review after `challenge` and `build`. The rest of the `NavierStokes/Periodic*` family follows in pull | |
| 26 | +requests of their own. | |