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 #579 from s2-ns-moving-1
Browse filesperf(NavierStokes/Moving): 1 file cheaper to elaborate (−4.4%, measured)
Checks
build Program · lake build and Comparator
Details
challenge Program · challenge files and build config
Details
+15 −16 NavierStokes/MovingFrameODE.lean View file
| @@ -55,7 +55,7 @@ theorem inner_pack (a b : ℝ) (u v : Plane) : | ||
| 55 | 55 | |
| 56 | 56 | theorem inner_pack_left (a : ℝ) (u : Plane) (v : Space) : |
| 57 | 57 | ⟪pack a u, v⟫_ℝ = a * v 0 + ⟪u, tail v⟫_ℝ := by |
| 58 | - simp [pack, tail, PiLp.inner_apply, Fin.sum_univ_three, Fin.sum_univ_two] | |
| 58 | + simp [tail, PiLp.inner_apply, Fin.sum_univ_three, Fin.sum_univ_two] | |
| 59 | 59 | ring |
| 60 | 60 | |
| 61 | 61 | @[simp] theorem inner_unitTheta (w : Plane) : ⟪w, unitTheta⟫_ℝ = w 0 := by |
| @@ -274,7 +274,7 @@ theorem hasDerivAt_normal {β ρ : ℝ → ℝ} {B : ℝ → Frame} | ||
| 274 | 274 | (normalMotion (β v) β' (ρ v) ρ' rot (B v)) v := by |
| 275 | 275 | convert! hasDerivAt_pack (hβ.mul hρ) (hβ.smul hK) using 1 |
| 276 | 276 | ext i |
| 277 | - fin_cases i <;> simp [normalMotion, pack] <;> ring | |
| 277 | + fin_cases i <;> simp [normalMotion] <;> ring | |
| 278 | 278 | |
| 279 | 279 | /-- Differentiation of the actual tangent parametrization. -/ |
| 280 | 280 | theorem hasDerivAt_tangent {ρ x y : ℝ → ℝ} {B : ℝ → Frame} |
| @@ -286,7 +286,7 @@ theorem hasDerivAt_tangent {ρ x y : ℝ → ℝ} {B : ℝ → Frame} | ||
| 286 | 286 | (tangentMotion (ρ v) ρ' rot (B v) (x v) (y v) x' y') v := by |
| 287 | 287 | convert! hasDerivAt_pack hx (((hρ.neg.mul hx).smul hK).add (hy.smul hN)) using 1 |
| 288 | 288 | ext i |
| 289 | - fin_cases i <;> simp [tangentMotion, pack] <;> ring | |
| 289 | + fin_cases i <;> simp [tangentMotion] <;> ring | |
| 290 | 290 | |
| 291 | 291 | /-- The ambient ODE is equivalent to the two explicit coordinate ODEs, using |
| 292 | 292 | actual derivatives of the curve and the moving frame. -/ |
| @@ -405,8 +405,7 @@ variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] | ||
| 405 | 405 | variable {m : WithTop ℕ∞} {n : E → Space} {q : E} |
| 406 | 406 | |
| 407 | 407 | theorem contDiffAt_normalScale (hn : ContDiffAt ℝ m n q) (hne : tail (n q) ≠ 0) : |
| 408 | - ContDiffAt ℝ m (fun p => normalScale (n p)) q := by | |
| 409 | - exact (tailCLM.contDiff.contDiffAt.comp q hn).norm ℝ hne | |
| 408 | + ContDiffAt ℝ m (fun p => normalScale (n p)) q := (tailCLM.contDiff.contDiffAt.comp q hn).norm ℝ hne | |
| 410 | 409 | |
| 411 | 410 | theorem contDiffAt_radialSlope (hn : ContDiffAt ℝ m n q) (hne : tail (n q) ≠ 0) : |
| 412 | 411 | ContDiffAt ℝ m (fun p => radialSlope (n p)) q := by |
| @@ -463,7 +462,7 @@ theorem reciprocal_quadratic_difference (r s : ℝ) : | ||
| 463 | 462 | calc |
| 464 | 463 | |(s - r) * (s + r) / ((1 + r ^ 2) * (1 + s ^ 2))| ≤ |(s - r) * (s + r)| := |
| 465 | 464 | abs_div_le_of_one_le _ _ (by |
| 466 | - nlinarith only [sq_nonneg r, sq_nonneg s, mul_nonneg (sq_nonneg r) (sq_nonneg s)]) | |
| 465 | + linarith only [sq_nonneg r, sq_nonneg s, mul_nonneg (sq_nonneg r) (sq_nonneg s)]) | |
| 467 | 466 | _ ≤ |r - s| * (|r| + |s|) := by |
| 468 | 467 | rw [abs_mul, abs_sub_comm s r] |
| 469 | 468 | exact mul_le_mul_of_nonneg_left (by linarith [abs_add_le s r]) (abs_nonneg _) |
| @@ -530,13 +529,13 @@ theorem scalar_coefficients_close | ||
| 530 | 529 | _ = _ := mul_one _ |
| 531 | 530 | constructor |
| 532 | 531 | · calc |
| 533 | - |coeff11 ρ ρ' gK| ≤ |ρ * (gK - ρ')| := abs_div_le_of_one_le _ _ (by nlinarith only [sq_nonneg ρ]) | |
| 532 | + |coeff11 ρ ρ' gK| ≤ |ρ * (gK - ρ')| := abs_div_le_of_one_le _ _ (by linarith only [sq_nonneg ρ]) | |
| 534 | 533 | _ = |ρ| * |gK - ρ'| := abs_mul _ _ |
| 535 | 534 | _ ≤ M * (η + η) := mul_le_mul hρ ((abs_sub _ _).trans (add_le_add hgK hρ')) |
| 536 | 535 | (abs_nonneg _) hM0 |
| 537 | 536 | _ ≤ 16 * M ^ 2 * η := by |
| 538 | - have h := mul_le_mul_of_nonneg_right (show 2 * M ≤ 16 * M ^ 2 by nlinarith only [hM, sq_nonneg (M - 1)]) hη | |
| 539 | - nlinarith only [h] | |
| 537 | + have h := mul_le_mul_of_nonneg_right (show 2 * M ≤ 16 * M ^ 2 by linarith only [hM, sq_nonneg (M - 1)]) hη | |
| 538 | + linarith only [h] | |
| 540 | 539 | constructor |
| 541 | 540 | · have hρden : 1 + ρ ^ 2 ≠ 0 := by positivity |
| 542 | 541 | have hsden : 1 + s ^ 2 ≠ 0 := by positivity |
| @@ -550,12 +549,12 @@ theorem scalar_coefficients_close | ||
| 550 | 549 | _ ≤ |(2 * F * N - ρ * rot - 2 * F0 * N0) / (1 + ρ ^ 2)| + |
| 551 | 550 | |(2 * F0 * N0) * (1 / (1 + ρ ^ 2) - 1 / (1 + s ^ 2))| := abs_add_le _ _ |
| 552 | 551 | _ ≤ (2 + 3 * M) * η + (2 * M) * (2 * M * η) := add_le_add |
| 553 | - ((abs_div_le_of_one_le _ _ (by nlinarith only [sq_nonneg ρ])).trans hnum) | |
| 552 | + ((abs_div_le_of_one_le _ _ (by linarith only [sq_nonneg ρ])).trans hnum) | |
| 554 | 553 | (by rw [abs_mul]; exact mul_le_mul hreference hinv (abs_nonneg _) (by positivity)) |
| 555 | 554 | _ ≤ 16 * M ^ 2 * η := by |
| 556 | 555 | have h := mul_le_mul_of_nonneg_right |
| 557 | - (show 2 + 3 * M + 4 * M ^ 2 ≤ 16 * M ^ 2 by nlinarith only [hM, sq_nonneg (M - 1)]) hη | |
| 558 | - nlinarith only [h] | |
| 556 | + (show 2 + 3 * M + 4 * M ^ 2 ≤ 16 * M ^ 2 by linarith only [hM, sq_nonneg (M - 1)]) hη | |
| 557 | + linarith only [h] | |
| 559 | 558 | · calc |
| 560 | 559 | |coeff21 F N gN ρ rot - (-(2 * F0 * N0 + g0))| = |
| 561 | 560 | |-(2 * F * N - 2 * F0 * N0) - (gN - g0) + ρ * rot| := by |
| @@ -568,8 +567,8 @@ theorem scalar_coefficients_close | ||
| 568 | 567 | simpa only [abs_neg] using abs_sub (-(2 * F * N - 2 * F0 * N0)) (gN - g0)) _ |
| 569 | 568 | _ ≤ (2 * (1 + M) * η + η) + M * η := add_le_add (add_le_add htwoprod hgN) hrotation |
| 570 | 569 | _ ≤ 16 * M ^ 2 * η := by |
| 571 | - have h := mul_le_mul_of_nonneg_right (show 3 + 3 * M ≤ 16 * M ^ 2 by nlinarith only [hM, sq_nonneg (M - 1)]) hη | |
| 572 | - nlinarith only [h] | |
| 570 | + have h := mul_le_mul_of_nonneg_right (show 3 + 3 * M ≤ 16 * M ^ 2 by linarith only [hM, sq_nonneg (M - 1)]) hη | |
| 571 | + linarith only [h] | |
| 573 | 572 | |
| 574 | 573 | theorem inner_perturbation_le {K K0 g g0 : Plane} {M η : ℝ} |
| 575 | 574 | (hK : ‖K‖ ≤ 1) (hg0 : ‖g0‖ ≤ M) |
| @@ -614,7 +613,7 @@ theorem frame_coefficients_close {B B0 : Frame} {g g0 : Plane} | ||
| 614 | 613 | |coeff21 F ((B 1) 0) ⟪B 1, g⟫_ℝ ρ rot - (-(2 * F0 * ((B0 1) 0) + ⟪B0 1, g0⟫_ℝ))| ≤ |
| 615 | 614 | (16 * M ^ 2 * (1 + M)) * η := by |
| 616 | 615 | have hM0 : 0 ≤ M := le_trans zero_le_one hM |
| 617 | - have henlarge : η ≤ (1 + M) * η := by nlinarith only [mul_nonneg hM0 hη] | |
| 616 | + have henlarge : η ≤ (1 + M) * η := by linarith only [mul_nonneg hM0 hη] | |
| 618 | 617 | have hgK := inner_perturbation_le (le_of_eq (B.norm_eq_one 0)) hg0 hK hg |
| 619 | 618 | rw [horth, sub_zero] at hgK |
| 620 | 619 | have hgN := inner_perturbation_le (le_of_eq (B.norm_eq_one 1)) hg0 hN hg |
| @@ -712,7 +711,7 @@ theorem modalOperator_eq_coefficient (lam damping e11 e12 e21 e22 : ℝ) : | ||
| 712 | 711 | ViscousPropagator.coefficient lam damping |
| 713 | 712 | (GrowingMode.modalOperator 0 0 e11 e12 e21 e22) := by |
| 714 | 713 | ext z i |
| 715 | - fin_cases i <;> simp [GrowingMode.modalOperator, ViscousPropagator.coefficient, | |
| 714 | + fin_cases i <;> simp [ViscousPropagator.coefficient, | |
| 716 | 715 | ViscousPropagator.diagonal, ViscousPropagator.reflection] <;> ring |
| 717 | 716 | |
| 718 | 717 | theorem plane_norm_le_coordinate_sum (z : Plane) : ‖z‖ ≤ |z 0| + |z 1| := by |
+16 −0 routes/s2-ns-moving-1/README.md added View file
| @@ -0,0 +1,16 @@ | ||
| 1 | +--- | |
| 2 | +issue: 11 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s2-ns-moving-1 | |
| 6 | + | |
| 7 | +S-2, unit 1 of the `NavierStokes/Moving*` family: `NavierStokes/MovingFrameODE.lean` only, made cheaper to | |
| 8 | +elaborate by edits inside proofs — `simp` argument lists lose entries that do not change the goal, `nlinarith only` | |
| 9 | +becomes `linarith only`, one one-line proof moves from `:= by exact …` to `:= …`. No statement, import line or | |
| 10 | +docstring changes, and no `maxHeartbeats`. Instructions retired (user space, `lean -j1 -DElab.async=false`) fall from | |
| 11 | +48.68 G to 46.52 G, −4.4%; unit.json gives the count and PR.md how it was taken. | |
| 12 | + | |
| 13 | +## Next | |
| 14 | + | |
| 15 | +Push, open the pull request against `main`, and leave it to `challenge` and `build`; the unit is one unit of #11 and | |
| 16 | +needs no further edit. | |