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

Comparing changes
Choose two branches to see what changed, then open a pull request to bring the work across.
Able to merge. These branches can be merged automatically.
A pull request is already open: #612 perf(NavierStokes/Transition): 1 file cheaper to elaborate (−11.2%, measured)
1 commit
+10 −10 NavierStokes/TransitionRamp.lean View file
| @@ -492,7 +492,7 @@ theorem damped_integral_bound {F : ℝ → ℝ} (hF : Continuous F) {T κ y M : | ||
| 492 | 492 | by_cases hyt : y ≤ T |
| 493 | 493 | · have hi : |∫ t in (0 : ℝ)..y, F t| ≤ M * y := by |
| 494 | 494 | simpa only [sub_zero] using integral_norm_bound hy hbM |
| 495 | - exact hi.trans (mul_le_mul_of_nonneg_left (by nlinarith [mul_nonneg hκ.1 hy]) hM) | |
| 495 | + exact hi.trans (mul_le_mul_of_nonneg_left (by linarith [mul_nonneg hκ.1 hy]) hM) | |
| 496 | 496 | · have hTy : T ≤ y := (lt_of_not_ge hyt).le |
| 497 | 497 | have hsplit := intervalIntegral.integral_add_adjacent_intervals (μ := volume) |
| 498 | 498 | (hF.intervalIntegrable 0 T) (hF.intervalIntegrable T y) |
| @@ -507,7 +507,7 @@ theorem damped_integral_bound {F : ℝ → ℝ} (hF : Continuous F) {T κ y M : | ||
| 507 | 507 | calc |
| 508 | 508 | _ ≤ |∫ t in (0 : ℝ)..T, F t| + |∫ t in T..y, F t| := abs_add_le _ _ |
| 509 | 509 | _ ≤ M * T + (κ * M) * (y - T) := add_le_add hfirst hlast |
| 510 | - _ ≤ M * (T + κ * y) := by nlinarith [mul_nonneg (mul_nonneg hκ.1 hM) hT.le] | |
| 510 | + _ ≤ M * (T + κ * y) := by linarith [mul_nonneg (mul_nonneg hκ.1 hM) hT.le] | |
| 511 | 511 | |
| 512 | 512 | theorem jet_slice_continuous {J : Set ℝ} (hJ : IsOpen J) {F : Field} |
| 513 | 513 | (hF : ContDiffOn ℝ ∞ F (logDomain J hJ).carrier) (n : ℕ) {η : ℝ} (hη : η ∈ J) : |
| @@ -552,7 +552,7 @@ theorem controlled_product_bound {a d z M : ℝ} (ha : a ∈ Icc (0 : ℝ) 1) | ||
| 552 | 552 | rw [abs_of_pos (by norm_num : (0 : ℝ) < 2)] |
| 553 | 553 | have hza : a * |z| ≤ M := |
| 554 | 554 | (mul_le_mul_of_nonneg_left hz ha.1).trans (mul_le_of_le_one_left hM ha.2) |
| 555 | - nlinarith [mul_le_mul_of_nonneg_left hza hd, mul_nonneg hd hM] | |
| 555 | + linarith [mul_le_mul_of_nonneg_left hza hd, mul_nonneg hd hM] | |
| 556 | 556 | |
| 557 | 557 | theorem axialField_jet_error_bound {J : Set ℝ} (hJ : IsOpen J) {stock : Field} |
| 558 | 558 | (hs : ContDiffOn ℝ ∞ stock (logDomain J hJ).carrier) (initial : ℝ → ℝ) |
| @@ -611,7 +611,7 @@ theorem logField_value_error_bound {J : Set ℝ} (hJ : IsOpen J) {stock : Field} | ||
| 611 | 611 | dsimp [B] |
| 612 | 612 | rw [abs_mul, abs_of_nonneg (step_mem (b + w₁) w₂ t).1, |
| 613 | 613 | abs_of_pos (by norm_num : (0 : ℝ) < 2 / 5)] |
| 614 | - nlinarith [(step_mem (b + w₁) w₂ t).2] | |
| 614 | + linarith [(step_mem (b + w₁) w₂ t).2] | |
| 615 | 615 | · intro t ht |
| 616 | 616 | dsimp [B] |
| 617 | 617 | rw [step_zero hw₂ (show t ≤ b + w₁ by linarith [ht.2]), mul_zero] |
| @@ -691,7 +691,7 @@ theorem L_pos_parameterInterval {h j η : ℝ} (hs : NaturalAxisData.SmallParame | ||
| 691 | 691 | (show 0 ≤ 11 / 10 - η by linarith [hη'.2])] |
| 692 | 692 | have hm := mul_le_mul hs.h_le hsquare (sq_nonneg η) (by norm_num : (0 : ℝ) ≤ 1 / 1000) |
| 693 | 693 | unfold NaturalAxisData.L |
| 694 | - nlinarith | |
| 694 | + linarith | |
| 695 | 695 | |
| 696 | 696 | /-- No stock or differential equation is postulated in this constructor: |
| 697 | 697 | the underlying profiles and all five histories are the completed REF path. -/ |
| @@ -1256,7 +1256,7 @@ theorem exists_small_log_control (hJ : IsOpen J) {K : Set ℝ} (hK : IsCompact K | ||
| 1256 | 1256 | linarith [hw₁.2, hw₂.2] |
| 1257 | 1257 | have hcontrol (y : ℝ) (hy : y ∈ Icc (0 : ℝ) R.finalTime) : M * (T + κ * y) < ε / 4 := by |
| 1258 | 1258 | have hky : κ * y ≤ s * R.finalTime := mul_le_mul hκs.le hy.2 hy.1 hs.le |
| 1259 | - have hsum : T + κ * y < s * (1 + R.finalTime) := by nlinarith | |
| 1259 | + have hsum : T + κ * y < s * (1 + R.finalTime) := by linarith | |
| 1260 | 1260 | have hm := mul_lt_mul_of_pos_left hsum hM |
| 1261 | 1261 | have he : M * (s * (1 + R.finalTime)) = ε / 4 := by |
| 1262 | 1262 | dsimp [s] |
| @@ -1278,7 +1278,7 @@ theorem exists_small_log_control (hJ : IsOpen J) {K : Set ℝ} (hK : IsCompact K | ||
| 1278 | 1278 | have hv := logField_value_error_bound hJ (R.angularStock_smooth hJ) R.initialLog |
| 1279 | 1279 | hT.1 hκ1 hb hw₁.1.le hw₂.1 hy.1 hy.2 (hKJ hη) hM.le |
| 1280 | 1280 | (fun t ht => (ha 0 (Nat.zero_le N) t ⟨ht.1, ht.2.trans hyf.2⟩ η hη).trans haM) |
| 1281 | - exact hv.trans_lt (by nlinarith [hcontrol y hyf]) | |
| 1281 | + exact hv.trans_lt (by linarith [hcontrol y hyf]) | |
| 1282 | 1282 | |
| 1283 | 1283 | /-- The same estimates stated directly for the actual physical fields. -/ |
| 1284 | 1284 | structure SmallPhysicalControl (K : Set ℝ) (N : ℕ) (ε T κ w₁ w₂ : ℝ) : Prop where |
| @@ -1585,7 +1585,7 @@ theorem exists_normalized_natural_jets (hΛ : 0 < Λ) (hσ : 0 < σ) | ||
| 1585 | 1585 | obtain ⟨A, hA, ha⟩ := compact_scalar_jets parameterInterval_open isCompact_Icc |
| 1586 | 1586 | original_interval_interior (phase_smooth d) N |
| 1587 | 1587 | obtain ⟨L, hL, hl⟩ := exists_uniform_logPhi_jets d hσ hscale N |
| 1588 | - refine ⟨1 + Λ * A + L, by nlinarith [mul_nonneg hΛ.le hA], ?_⟩ | |
| 1588 | + refine ⟨1 + Λ * A + L, by linarith [mul_nonneg hΛ.le hA], ?_⟩ | |
| 1589 | 1589 | intro C E Y hY n hn η hη |
| 1590 | 1590 | have hηJ := original_interval_interior hη |
| 1591 | 1591 | have hphase := ((phase_smooth d).contDiffAt (parameterInterval_open.mem_nhds hηJ)).of_le (nat_le_infty n) |
| @@ -1793,7 +1793,7 @@ theorem endpointLog_jets_of_control (hJ : IsOpen J) {K : Set ℝ} (hKJ : K ⊆ J | ||
| 1793 | 1793 | ring |
| 1794 | 1794 | rw [heq, iteratedDeriv_const_add hnpos] |
| 1795 | 1795 | exact ((hbound R.finalTime (ha0.trans ha) η hη).2 n hn hnpos).trans |
| 1796 | - (by nlinarith [abs_nonneg (Real.log 220 / 2)]) | |
| 1796 | + (by linarith [abs_nonneg (Real.log 220 / 2)]) | |
| 1797 | 1797 | |
| 1798 | 1798 | theorem SmallLogControl.mono_tolerance {K : Set ℝ} {N : ℕ} {ε ε' T κ w₁ w₂ : ℝ} |
| 1799 | 1799 | (hc : R.SmallLogControl K N ε T κ w₁ w₂) (hε : ε ≤ ε') : |
| @@ -2056,7 +2056,7 @@ theorem ordered_seed_bounds (hΛ : 0 < Λ) (hsmall : NaturalAxisData.SmallParame | ||
| 2056 | 2056 | have hBJ : 1 ≤ BJ := by |
| 2057 | 2057 | dsimp [BJ] |
| 2058 | 2058 | have hg : 0 < Real.log (11 / 10 : ℝ) := Real.log_pos (by norm_num) |
| 2059 | - nlinarith [abs_nonneg (Real.log 220 / 2)] | |
| 2059 | + linarith [abs_nonneg (Real.log 220 / 2)] | |
| 2060 | 2060 | refine ⟨U + 1, by linarith, K, hK, BJ, hBJ, ?_⟩ |
| 2061 | 2061 | intro C hC E δ hδ hδT R T κ w₁ w₂ hb hw₁ hw₂ hc |
| 2062 | 2062 | let A := Input.ofNatural hΛ E.family |
+17 −0 routes/s2-ns-transition-1/README.md added View file
| @@ -0,0 +1,17 @@ | ||
| 1 | +--- | |
| 2 | +issue: 11 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s2-ns-transition-1 | |
| 6 | + | |
| 7 | +S-2, unit `s2-ns-transition-1`: the family `NavierStokes/Transition*`, one file, | |
| 8 | +`NavierStokes/TransitionRamp.lean`. Ten `nlinarith` calls whose goals are linear in the atoms | |
| 9 | +their hypotheses already bound become `linarith`; every edit is inside a proof, below the `:=` | |
| 10 | +of its declaration, and no statement, import line or docstring changes. There is no | |
| 11 | +`maxHeartbeats`. The file is measured cheaper to elaborate (68.28 G → 60.64 G instructions | |
| 12 | +retired in user space, −11.2%); the pull request gives the numbers and how they were taken. | |
| 13 | + | |
| 14 | +## Next | |
| 15 | + | |
| 16 | +Push, let `challenge` and `build` report on the pull request, and reply to the maintainer's | |
| 17 | +review. Nothing else is planned on this branch. | |