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/Slow): 3 files cheaper to elaborate (−1.4%, measured) #649
Merged
+3 −3 NavierStokes/SlowBorelBase.lean View file
| @@ -100,7 +100,7 @@ theorem template_jet_bound_by_joint {f : Inner → V} (hf : ContDiff ℝ ∞ f) | ||
| 100 | 100 | have hG : ContDiff ℝ ∞ G := (jointTemplate_smooth hf b).comp (contDiff_id.add contDiff_const) |
| 101 | 101 | have he : template c b f = G ∘ L := by |
| 102 | 102 | funext z |
| 103 | - simp [G, L, jointTemplate, template] | |
| 103 | + simp [G, L, jointTemplate] | |
| 104 | 104 | rw [he, L.iteratedFDeriv_comp_right hG y |
| 105 | 105 | (ENat.natCast_le_of_coe_top_le_withTop le_rfl m)] |
| 106 | 106 | have hshift : iteratedFDeriv ℝ m G (L y) = |
| @@ -329,7 +329,7 @@ theorem exists_admissibleScales {f : ℕ → Inner → V} | ||
| 329 | 329 | rw [slowStage_eq (by omega)] |
| 330 | 330 | by_cases hactive : (a j : ℝ) * q ≤ 1 |
| 331 | 331 | · have hac : (0 : ℝ) < a j := by exact_mod_cast hapos j |
| 332 | - have hqa : q ≤ 1 / (a j : ℝ) := (le_div_iff₀ hac).2 (by nlinarith) | |
| 332 | + have hqa : q ≤ 1 / (a j : ℝ) := (le_div_iff₀ hac).2 (by linarith) | |
| 333 | 333 | have ht := hC j m ((a j : ℝ) * q) ⟨mul_nonneg hac.le hq.le, hactive⟩ w hw |
| 334 | 334 | refine (powerStage_jet_bound (hf j) (a j) (2 * h * j) hq hq1 |
| 335 | 335 | (hCpos j m).le w m ht).trans ?_ |
| @@ -344,7 +344,7 @@ theorem exists_admissibleScales {f : ℕ → Inner → V} | ||
| 344 | 344 | rw [slowStage_eq (by omega)] |
| 345 | 345 | by_cases hactive : (a j : ℝ) * q ≤ 1 |
| 346 | 346 | · have hac : (0 : ℝ) < a j := by exact_mod_cast hapos j |
| 347 | - have hqa : q ≤ 1 / (a j : ℝ) := (le_div_iff₀ hac).2 (by nlinarith) | |
| 347 | + have hqa : q ≤ 1 / (a j : ℝ) := (le_div_iff₀ hac).2 (by linarith) | |
| 348 | 348 | have ht := hC j m ((a j : ℝ) * q) ⟨mul_nonneg hac.le hq.le, hactive⟩ w hw |
| 349 | 349 | refine (powerStage_blown_bound (hf j) (a j) (2 * h * j) hq w m ht).trans ?_ |
| 350 | 350 | have he : 2 * h * (j : ℝ) = h * j + h * j := by ring |
+1 −1 NavierStokes/SlowFirstOrderEdge.lean View file
| @@ -402,7 +402,7 @@ theorem physicalChi_hasDerivAt_z (d : TailData) {p : PhysicalPoint} (ht : p.1 < | ||
| 402 | 402 | _ = q d.h p ^ (-CoordinateAlgebra.D d.h - CoordinateAlgebra.D d.h) * |
| 403 | 403 | CoordinateAlgebra.axialCoeff (-CoordinateAlgebra.D d.h) d.h (eta d.h p) |
| 404 | 404 | 0 (profileChi d (eta d.h p)) 0 (deriv (profileChi d) (eta d.h p)) := by |
| 405 | - simpa only [Function.comp_apply, Prod.eta, mul_comm, mul_left_comm, mul_assoc] using he | |
| 405 | + simpa only [Function.comp_apply, Prod.eta, mul_left_comm, mul_assoc] using he | |
| 406 | 406 | _ = _ := by |
| 407 | 407 | rw [show -CoordinateAlgebra.D d.h - CoordinateAlgebra.D d.h = |
| 408 | 408 | -2 * CoordinateAlgebra.D d.h by ring] |
+6 −6 NavierStokes/SlowRecursion.lean View file
| @@ -136,7 +136,7 @@ theorem im_iteratedDeriv_zero {S : Set ℝ} (hS : IsOpen S) {f : ℝ → ℂ} | ||
| 136 | 136 | have hv := congrArg (fun L : ℝ [×n]→L[ℝ] ℝ => L (fun _ => 1)) hc.symm |
| 137 | 137 | have hm : (iteratedDeriv n f x).im = iteratedDeriv n (fun t => (f t).im) x := by |
| 138 | 138 | simp only [iteratedFDerivWithin_of_isOpen n hS hx, |
| 139 | - ContinuousLinearMap.compContinuousMultilinearMap_coe, Complex.imCLM_apply, Function.comp_def] at hv | |
| 139 | + ContinuousLinearMap.compContinuousMultilinearMap_coe, Function.comp_def] at hv | |
| 140 | 140 | exact hv |
| 141 | 141 | have he : (fun t => (f t).im) =ᶠ[𝓝 x] (fun _ => (0 : ℝ)) := by |
| 142 | 142 | filter_upwards [hS.mem_nhds hx] with t ht |
| @@ -228,7 +228,7 @@ theorem hasDerivAt_conjugate {f : ℂ → ℂ} {d z : ℂ} | ||
| 228 | 228 | change HasFDerivAt _ ((1 : ℂ →L[ℂ] ℂ).smulRight (starRingEnd ℂ d)) z |
| 229 | 229 | apply hasFDerivAt_of_restrictScalars ℝ hh |
| 230 | 230 | ext v |
| 231 | - simp [J, map_mul] | |
| 231 | + simp [J] | |
| 232 | 232 | |
| 233 | 233 | /-- Reflection gives a holomorphic extension of the actual real trace. -/ |
| 234 | 234 | noncomputable def realSymmetrization (F : Raw) (p : ℝ × ℂ) : ℂ := |
| @@ -378,7 +378,7 @@ noncomputable def denominatorFunction (R : ℝ) (U : Set ℂ) (h : ℝ) : AxisFu | ||
| 378 | 378 | |
| 379 | 379 | theorem denominatorFunction_apply (R : ℝ) (U : Set ℂ) (h : ℝ) (p : ℝ × ℂ) : |
| 380 | 380 | denominatorFunction R U h p = PositiveAxisSystem.ell (h : ℂ) p.2 := by |
| 381 | - simp [denominatorFunction, parameter, realConstant, PositiveAxisSystem.ell] | |
| 381 | + simp [denominatorFunction, parameter, PositiveAxisSystem.ell] | |
| 382 | 382 | |
| 383 | 383 | noncomputable def inverseDenominator {R : ℝ} {U : Set ℂ} {h : ℝ} (c : Domain R U h) : |
| 384 | 384 | AxisFunction R U := |
| @@ -439,7 +439,7 @@ theorem timeOperator_value {R : ℝ} {U : Set ℂ} {h : ℝ} (c : Domain R U h) | ||
| 439 | 439 | parameterDerivative_value c.positive c.open_set F hX heta, |
| 440 | 440 | SimilarityProfile.T, CoordinateAlgebra.timeCoeff, CoordinateAlgebra.L, |
| 441 | 441 | PositiveAxisSystem.ell, Complex.ofReal_add, Complex.ofReal_sub, |
| 442 | - Complex.ofReal_mul, Complex.ofReal_neg, Complex.ofReal_one, div_eq_mul_inv] | |
| 442 | + Complex.ofReal_mul, Complex.ofReal_neg, div_eq_mul_inv] | |
| 443 | 443 | norm_num [CoordinateAlgebra.D] |
| 444 | 444 | |
| 445 | 445 | theorem axialOperator_value {R : ℝ} {U : Set ℂ} {h : ℝ} (c : Domain R U h) |
| @@ -537,7 +537,7 @@ theorem radialSource_value {R : ℝ} {U : Set ℂ} {h : ℝ} (c : Domain R U h) | ||
| 537 | 537 | axialOperator_value c _ _ hX heta, shiftedBetaDiffusion_value c _ _ hX heta, |
| 538 | 538 | radialDerivative_value c.positive c.open_set _ hX heta, |
| 539 | 539 | Complex.ofReal_add, Complex.ofReal_sub, Complex.ofReal_mul, Complex.ofReal_sum, |
| 540 | - Complex.ofReal_div, Complex.ofReal_one, Complex.ofReal_ofNat] | |
| 540 | + Complex.ofReal_div, Complex.ofReal_one] | |
| 541 | 541 | simp only [complexProfile_real c.positive _ ⟨hX.1.le, hX.2⟩ heta] |
| 542 | 542 | congr 3 |
| 543 | 543 | · apply Finset.sum_congr rfl |
| @@ -620,7 +620,7 @@ theorem sourceData_real {R : ℝ} {U : Set ℂ} {h : ℝ} (c : Domain R U h) | ||
| 620 | 620 | have hd (F : AxisFunction R U) := radialDerivative_value c.positive c.open_set F hX heta |
| 621 | 621 | have he (F : AxisFunction R U) := parameterDerivative_value c.positive c.open_set F hX heta |
| 622 | 622 | fin_cases i <;> |
| 623 | - simp only [sourceData, sourceFunctions, PositiveAxisExistence.lowerHistoryData] | |
| 623 | + simp only [sourceData, PositiveAxisExistence.lowerHistoryData] | |
| 624 | 624 | · exact hv _ |
| 625 | 625 | · exact hd _ |
| 626 | 626 | · exact he _ |
+23 −0 routes/s2-ns-slow-1/README.md added View file
| @@ -0,0 +1,23 @@ | ||
| 1 | +--- | |
| 2 | +issue: 11 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s2-ns-slow-1 | |
| 6 | + | |
| 7 | +One unit of S-2 ("Find the slowest files and make one faster"), on the family | |
| 8 | +`NavierStokes/Slow*`. The three files `SlowBorelBase.lean`, `SlowFirstOrderEdge.lean` and | |
| 9 | +`SlowRecursion.lean` are made cheaper to elaborate by edits inside proofs only: `nlinarith` | |
| 10 | +becomes `linarith`, a handful of `simp`/`simp only` argument lists lose entries that do not | |
| 11 | +change the goal, and one `simpa` list loses `mul_comm` (10 lines out, 10 in). No statement, | |
| 12 | +import line or docstring changes, and no `maxHeartbeats`. | |
| 13 | + | |
| 14 | +The edits come from Treant's `speedup_trials` stage (TitiSkywalker/NavierStokesAndEuler, the | |
| 15 | +run of 2026-12-03 at upstream `f9e8bc5`), carried onto main at `df2f18f` and counted there. | |
| 16 | +Instructions retired per file, one file at a time: `SlowBorelBase` 65.30 G → 64.52 G (−1.2%), | |
| 17 | +`SlowFirstOrderEdge` 25.65 G → 25.48 G (−0.7%), `SlowRecursion` 39.40 G → 38.49 G (−2.3%); | |
| 18 | +together 130.34 G → 128.48 G (−1.4%). How the counts were taken is in the pull request. | |
| 19 | + | |
| 20 | +## Next | |
| 21 | + | |
| 22 | +Push `s2-ns-slow-1` and open the pull request; wait for `challenge` and `build`. If the | |
| 23 | +maintainer asks for a change, keep each edit to a proof and leave the numbers as measured. | |