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: #646 perf(NavierStokes/Physical): 5 files cheaper to elaborate (−2.0%, measured)
1 commit
+1 −1 NavierStokes/PhysicalCoordinateBounds.lean View file
| @@ -170,7 +170,7 @@ theorem normalized_slope_pos {a lo hi : ℝ} (ha : 0 < a) (ha1 : a < 1) | ||
| 170 | 170 | have hz : y.2.2 ^ 2 ≤ 1 := by nlinarith [hy.2.2.1, hy.2.2.2] |
| 171 | 171 | have haz := mul_le_mul_of_nonneg_left hz ha.le |
| 172 | 172 | simp only [scalarSlope, hy1, Real.one_rpow, mul_one] |
| 173 | - nlinarith | |
| 173 | + linarith | |
| 174 | 174 | |
| 175 | 175 | theorem exists_normalized_jet_bound {a : ℝ} (ha : 0 < a) (ha1 : a < 1) |
| 176 | 176 | {g : Point → ℝ} (hg : ContDiffOn ℝ ∞ g positiveTime) (lo hi : ℝ) (n : ℕ) : |
+6 −6 NavierStokes/PhysicalGraphBounds.lean View file
| @@ -37,12 +37,12 @@ noncomputable def timeDirection : Plane := (Real.sqrt 2 - 1, 1) | ||
| 37 | 37 | theorem cover_radialDirection : |
| 38 | 38 | SlotGeometry.cover radialDirection = ChartScales.Lambda • radialDirection := by |
| 39 | 39 | ext <;> simp [SlotGeometry.cover_apply, radialDirection, ChartScales.Lambda] <;> |
| 40 | - nlinarith [Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2)] | |
| 40 | + linarith [Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2)] | |
| 41 | 41 | |
| 42 | 42 | theorem cover_timeDirection : |
| 43 | 43 | SlotGeometry.cover timeDirection = ChartScales.Tg • timeDirection := by |
| 44 | 44 | ext <;> simp [SlotGeometry.cover_apply, timeDirection, ChartScales.Tg, SlotColoring.coverGrowth] <;> |
| 45 | - nlinarith [Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2)] | |
| 45 | + linarith [Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2)] | |
| 46 | 46 | |
| 47 | 47 | theorem cover_pow_radialDirection (i : ℕ) : |
| 48 | 48 | (SlotGeometry.cover ^ i) radialDirection = ChartScales.Lambda ^ i • radialDirection := by |
| @@ -726,7 +726,7 @@ theorem carrier_graph_jet_bound {h a b : ℝ} (hh : 0 ≤ h) (hh1 : h ≤ 1 / 2) | ||
| 726 | 726 | rw [abs_mul, abs_of_nonneg (Nat.cast_nonneg _)] |
| 727 | 727 | have he := mul_le_mul (carrier_upper hh n) hH (abs_nonneg _) |
| 728 | 728 | (mul_nonneg (by norm_num) (Real.rpow_nonneg hq.le _)) |
| 729 | - exact he.trans (by dsimp [M]; nlinarith) | |
| 729 | + exact he.trans (by dsimp [M]; linarith) | |
| 730 | 730 | have hw := character_comp_jet_bound hΦ (physicalLift h n p) m hB hM hc hΦb |
| 731 | 731 | have hwsm := (character_smooth ((ChartScales.carrier h n : ℝ) * (j : ℝ))).comp hΦ |
| 732 | 732 | have hb : 0 ≤ (2 : ℝ) ^ m * P * ((m.factorial : ℝ) * M ^ m * B ^ m) := by positivity |
| @@ -1021,7 +1021,7 @@ noncomputable def embedPolar : Plane →L[ℝ] Slot := | ||
| 1021 | 1021 | theorem norm_embedPolar_le : ‖embedPolar‖ ≤ 1 := by |
| 1022 | 1022 | refine ContinuousLinearMap.opNorm_le_bound _ zero_le_one ?_ |
| 1023 | 1023 | intro y |
| 1024 | - simp [embedPolar, Prod.norm_def, Real.norm_eq_abs, abs_nonneg] | |
| 1024 | + simp [embedPolar, Prod.norm_def, abs_nonneg] | |
| 1025 | 1025 | |
| 1026 | 1026 | noncomputable def slotLinear (ci : ℝ) : LiftPoint →L[ℝ] Slot := |
| 1027 | 1027 | ((0 : LiftPoint →L[ℝ] ℝ).prod liftZT).prod |
| @@ -1040,7 +1040,7 @@ theorem slotMap_formula (κ : Plane → Plane) (ci : ℝ) (center : Plane) (r0 : | ||
| 1040 | 1040 | (((κ (liftXY y)).1, (y.1.2.2.2, y.1.1)), |
| 1041 | 1041 | ((κ (liftXY y)).2, (etaCoordinate (y.2 - center) + r0) / ci)) := by |
| 1042 | 1042 | simp only [slotMap, embedPolar, slotLinear, slotConstant] |
| 1043 | - ext <;> simp [liftZT, map_sub, div_eq_mul_inv] | |
| 1043 | + ext <;> simp [map_sub, div_eq_mul_inv] | |
| 1044 | 1044 | ring |
| 1045 | 1045 | |
| 1046 | 1046 | theorem slotMap_smooth {κ : Plane → Plane} (hκ : ContDiff ℝ ∞ κ) |
| @@ -1065,7 +1065,7 @@ theorem norm_slotLinear_le (ci : ℝ) : ‖slotLinear ci‖ ≤ 1 + |ci⁻¹| * | ||
| 1065 | 1065 | rw [max_eq_right (norm_nonneg (liftZT y)), max_eq_right (abs_nonneg (ci⁻¹ * etaCoordinate y.2))] |
| 1066 | 1066 | apply max_le |
| 1067 | 1067 | · exact hzt.trans (by nlinarith [norm_nonneg y]) |
| 1068 | - · exact he.trans (by nlinarith [norm_nonneg y]) | |
| 1068 | + · exact he.trans (by linarith [norm_nonneg y]) | |
| 1069 | 1069 | |
| 1070 | 1070 | theorem positive_jet_affine_bound {E F : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] |
| 1071 | 1071 | [NormedAddCommGroup F] [NormedSpace ℝ F] (L : E →L[ℝ] F) (c : F) |
+3 −3 NavierStokes/PhysicalMeanJetBounds.lean View file
| @@ -96,7 +96,7 @@ theorem exists_comparable_band (N : ℕ) {q : ℝ} (hq : 0 < q) (hsmall : q ≤ | ||
| 96 | 96 | · have hh := (lt_div_iff₀ hQN).mp hlo |
| 97 | 97 | rw [pow_succ] at hh |
| 98 | 98 | rw [Q_add, Q_eq_half_pow k] |
| 99 | - nlinarith | |
| 99 | + linarith | |
| 100 | 100 | |
| 101 | 101 | /-! ## The local, nonoscillatory graph estimate -/ |
| 102 | 102 | |
| @@ -278,10 +278,10 @@ theorem graph_length_bounds {h : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) (n d : ℕ) | ||
| 278 | 278 | have hq := physicalQ_pos hh hh1 hw |
| 279 | 279 | have hlow : (1 / 4 : ℝ) ≤ physicalQ h w / ChartScales.Q n := by |
| 280 | 280 | apply (le_div_iff₀ hQ).mpr |
| 281 | - nlinarith | |
| 281 | + linarith | |
| 282 | 282 | have hhigh : physicalQ h w / ChartScales.Q n ≤ (4 : ℝ) := by |
| 283 | 283 | apply (div_le_iff₀ hQ).mpr |
| 284 | - nlinarith | |
| 284 | + linarith | |
| 285 | 285 | change 1 / 2 ≤ Real.sqrt (SimilarityCoordinates.coordinateQ (2 * h) (graph h n d w).2.1) ∧ _ |
| 286 | 286 | rw [graph_q_eq hh hh1 n d hw] |
| 287 | 287 | constructor |
+4 −5 NavierStokes/PhysicalResidualBridge.lean View file
| @@ -121,7 +121,7 @@ theorem graphResidual_scaled_pull {Ω : Set E} {U : Set F} {Γ : E → F} | ||
| 121 | 121 | simp [graphResidual, LinearWaveResidual.realTransport, |
| 122 | 122 | LinearWaveResidual.realFrameLaplacian, LinearWaveResidual.realAngularGenerator, |
| 123 | 123 | cylindricalLaplacian, Matrix.cons_val_zero, Matrix.cons_val_one, |
| 124 | - Matrix.cons_val_two, hAr, hAθ, hAz, hAt, hArr, hAθθ, hAzz, hPr, hPθ, hPz, | |
| 124 | + hAr, hAθ, hAz, hAt, hArr, hAθθ, hAzz, hPr, hPθ, hPz, | |
| 125 | 125 | smul_eq_mul, G.radius x hx] <;> |
| 126 | 126 | field_simp [hl, hr] <;> rw [hε] <;> ring |
| 127 | 127 | |
| @@ -255,7 +255,7 @@ theorem fderiv_map_apply (G : ScaledGraph) {p : SpaceTime} | ||
| 255 | 255 | (hY.add hT))).prodMk (hP 1) |
| 256 | 256 | change HasFDerivAt G.map _ p at hd |
| 257 | 257 | rw [hd.fderiv] |
| 258 | - ext <;> simp [ContinuousLinearMap.fst, GraphCalculus.radialSpeed, | |
| 258 | + ext <;> simp [GraphCalculus.radialSpeed, | |
| 259 | 259 | smul_eq_mul] <;> ring_nf <;> simp |
| 260 | 260 | |
| 261 | 261 | theorem map_radial (G : ScaledGraph) {p : SpaceTime} |
| @@ -576,7 +576,7 @@ theorem graphResidual_add {U : Set E} (hU : IsOpen U) (ε : ℝ) (R : E → ℝ) | ||
| 576 | 576 | simp [graphResidual, LinearWaveResidual.realComponentLinearResidual, |
| 577 | 577 | LinearWaveResidual.realTransport, LinearWaveResidual.realFrameLaplacian, |
| 578 | 578 | LinearWaveResidual.realAngularGenerator, Matrix.cons_val_zero, Matrix.cons_val_one, |
| 579 | - Matrix.cons_val_two, hfirst, hLap, hP] <;> ring | |
| 579 | + hfirst, hLap, hP] <;> ring | |
| 580 | 580 | |
| 581 | 581 | theorem transport_realLift (R : E → ℝ) (Vr Vθ Vz : E → E) |
| 582 | 582 | {a : E → Fin 3 → ℝ} {x : E} |
| @@ -676,8 +676,7 @@ theorem MatchesAt.radialDirection {c : CorrectionState.Context Lift} {G : Scaled | ||
| 676 | 676 | (H : MatchesAt c.operators G n) : LiftedMeanResidual.radialDirection c n = G.radial := by |
| 677 | 677 | funext x |
| 678 | 678 | simp [LiftedMeanResidual.radialDirection, LiftedMeanResidual.liftDirection, |
| 679 | - LiftedMeanResidual.radialVector, H.eR, H.frequency, H.profile, H.vR, | |
| 680 | - ScaledGraph.radial] | |
| 679 | + LiftedMeanResidual.radialVector, H.eR, H.frequency, H.profile, H.vR] | |
| 681 | 680 | rfl |
| 682 | 681 | |
| 683 | 682 | theorem MatchesAt.axialDirection {c : CorrectionState.Context Lift} {G : ScaledGraph} {n : ℕ} |
+4 −4 NavierStokes/PhysicalWaveSum.lean View file
| @@ -65,7 +65,7 @@ theorem norm_downLift_le {d Δ : ℕ} (hd : d ≤ Δ) : ‖downLift d‖ ≤ cov | ||
| 65 | 65 | ContinuousLinearMap.le_opNorm _ _ |
| 66 | 66 | _ ≤ CommonCoverSolve.coveringBound Δ * ‖y‖ := |
| 67 | 67 | mul_le_mul hc (norm_snd_le y) (norm_nonneg _) (CommonCoverSolve.coveringBound_pos Δ).le |
| 68 | - _ ≤ _ := by unfold coverBound; nlinarith [norm_nonneg y] | |
| 68 | + _ ≤ _ := by unfold coverBound; linarith [norm_nonneg y] | |
| 69 | 69 | |
| 70 | 70 | noncomputable def commonLift (h : ℝ) (n d : ℕ) : SpaceTime → LiftPoint := |
| 71 | 71 | downLift d ∘ PhysicalGraphBounds.physicalLift h n |
| @@ -253,9 +253,9 @@ theorem logCoordinate_in_band {q : ℝ} (hq : 0 < q) {n : ℕ} | ||
| 253 | 253 | change (n : ℝ) - 1 ≤ -Real.log q / Real.log 2 ∧ -Real.log q / Real.log 2 ≤ (n : ℝ) + 1 |
| 254 | 254 | constructor |
| 255 | 255 | · apply (le_div_iff₀ h2).mpr |
| 256 | - nlinarith | |
| 256 | + linarith | |
| 257 | 257 | · apply (div_le_iff₀ h2).mpr |
| 258 | - nlinarith | |
| 258 | + linarith | |
| 259 | 259 | |
| 260 | 260 | theorem labelRegion_adjacency {D : ℝ} {L M : Label} {z : ℝ × Position} |
| 261 | 261 | (hq : 0 < z.1) (hL : 1 ≤ L.1) (hM : 1 ≤ M.1) (hne : L ≠ M) |
| @@ -625,7 +625,7 @@ theorem physicalSlowPair_eq (h : ℝ) (n : ℕ) (w : SpaceTime) : | ||
| 625 | 625 | (ChartScales.Q n ^ (-CoordinateAlgebra.D h) * w.2 2, (1 - w.1) / ChartScales.Q n) := by |
| 626 | 626 | simp only [PhysicalGraphBounds.liftZT_apply, PhysicalGraphBounds.physicalLift, |
| 627 | 627 | PhysicalGraphBounds.physicalChart, PhysicalGraphBounds.chartLinear_apply] |
| 628 | - ext <;> simp [Real.rpow_neg_one, div_eq_mul_inv] | |
| 628 | + ext <;> simp [Real.rpow_neg_one] | |
| 629 | 629 | ring |
| 630 | 630 | |
| 631 | 631 | theorem physicalSlowPair_continuous (h : ℝ) (n : ℕ) : |
+53 −0 routes/s2-ns-physical-1/README.md added View file
| @@ -0,0 +1,53 @@ | ||
| 1 | +--- | |
| 2 | +issue: 11 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s2-ns-physical-1 | |
| 6 | + | |
| 7 | +One unit of S-2 (#11): make five files of the family `NavierStokes/Physical*` | |
| 8 | +cheaper to elaborate, with proof-only edits and no statement change | |
| 9 | +(19 lines out, 18 in): | |
| 10 | + | |
| 11 | +- `PhysicalCoordinateBounds.lean`: in `normalized_slope_pos`, the closing | |
| 12 | + `nlinarith` becomes `linarith`. | |
| 13 | +- `PhysicalGraphBounds.lean`: `nlinarith` becomes `linarith` in | |
| 14 | + `cover_radialDirection`, `cover_timeDirection`, one step of | |
| 15 | + `carrier_graph_jet_bound` and in `norm_slotLinear_le`; the `simp` lists in | |
| 16 | + `norm_embedPolar_le` and `slotMap_formula` lose the entries that do not | |
| 17 | + change the goal (`Real.norm_eq_abs`, `liftZT`). | |
| 18 | +- `PhysicalMeanJetBounds.lean`: `nlinarith` becomes `linarith` in | |
| 19 | + `exists_comparable_band` and in the two estimates of `graph_length_bounds`. | |
| 20 | +- `PhysicalResidualBridge.lean`: the `simp` lists in | |
| 21 | + `graphResidual_scaled_pull`, `fderiv_map_apply`, `graphResidual_add` and | |
| 22 | + `MatchesAt.radialDirection` lose `Matrix.cons_val_two`, | |
| 23 | + `ContinuousLinearMap.fst` and `ScaledGraph.radial`. | |
| 24 | +- `PhysicalWaveSum.lean`: `nlinarith` becomes `linarith` in `norm_downLift_le`, | |
| 25 | + in the two halves of `logCoordinate_in_band`, and `physicalSlowPair_eq` | |
| 26 | + drops `div_eq_mul_inv` from its `simp` list. | |
| 27 | + | |
| 28 | +No statement, no import line and no docstring changes, and there is no | |
| 29 | +`maxHeartbeats`. | |
| 30 | + | |
| 31 | +The edits are Treant's `speedup_trials` stage (TitiSkywalker/NavierStokesAndEuler, | |
| 32 | +the run of 2026-12-03 at upstream `f9e8bc5`), carried onto this project's main | |
| 33 | +and counted there file by file. The counts are the unit's, not taken again | |
| 34 | +here: instructions retired in user space by `lean` elaborating the one file | |
| 35 | +alone (`lean -j1 -DElab.async=false` under `perf stat -e instructions:u`), | |
| 36 | +against the compiled tree of main at `df2f18f` before and the same tree with | |
| 37 | +the edits after, one machine, one run after the other. | |
| 38 | + | |
| 39 | +| file | before | after | change | | |
| 40 | +|---|---|---|---| | |
| 41 | +| `NavierStokes/PhysicalCoordinateBounds.lean` | 33.51 G | 33.26 G | −0.8% | | |
| 42 | +| `NavierStokes/PhysicalGraphBounds.lean` | 113.24 G | 110.76 G | −2.2% | | |
| 43 | +| `NavierStokes/PhysicalMeanJetBounds.lean` | 35.81 G | 34.84 G | −2.7% | | |
| 44 | +| `NavierStokes/PhysicalResidualBridge.lean` | 47.20 G | 46.90 G | −0.6% | | |
| 45 | +| `NavierStokes/PhysicalWaveSum.lean` | 28.39 G | 27.13 G | −4.5% | | |
| 46 | +| **these 5 files** | **258.15 G** | **252.88 G** | **−2.0%** | | |
| 47 | + | |
| 48 | +## Next | |
| 49 | + | |
| 50 | +Push, open the pull request into `main`, let `challenge` and `build` report, | |
| 51 | +and reply to the maintainer's review. If `build` rejects one file's edits, drop | |
| 52 | +that whole file from the pull request and take its row out of the table (a | |
| 53 | +file's numbers are for all of its edits together). | |