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: #658 perf(NavierStokes/Variable): 1 file cheaper to elaborate (−35.3%, measured)
1 commit
+17 −18 NavierStokes/VariableGaugeMean.lean View file
| @@ -256,8 +256,7 @@ theorem physicalPast_fiberLocal (d c M : ℝ) (v : PressureStream.Plane) : | ||
| 256 | 256 | theorem physicalTotal_fiberLocal (d c M : ℝ) (v : PressureStream.Plane) : |
| 257 | 257 | PhysicalMeanDomain.FiberLocal (PressureStream.physicalTotal d c M ((0 : S), v)) := by |
| 258 | 258 | intro f g s he r Y |
| 259 | - simp [PressureStream.physicalTotal, TransportPrimitive.totalIntegral, TransportPrimitive.shift, | |
| 260 | - RadialPullback.normalizeSource, RadialPullback.liftChart, he] | |
| 259 | + simp [PressureStream.physicalTotal, TransportPrimitive.totalIntegral, RadialPullback.normalizeSource, RadialPullback.liftChart, he] | |
| 261 | 260 | |
| 262 | 261 | theorem freezeSlow_contDiff {U : Set S} (hU : IsOpen U) {s : S} (hs : s ∈ U) |
| 263 | 262 | {f : PressureStream.Lift S → ℝ} (hf : ContDiffOn ℝ ∞ f (PhysicalMeanDomain.slowDomain U)) : |
| @@ -946,10 +945,10 @@ theorem normalizeSource_gauge_finiteJets {c e a b d : ℝ} | ||
| 946 | 945 | have hlp := Real.rpow_pos_of_pos hl d |
| 947 | 946 | have hlaz : (l * a) ^ d < z.1 := by |
| 948 | 947 | rw [Real.mul_rpow hl.le ha.le] |
| 949 | - nlinarith [(lt_div_iff₀ hlp).mp hz.1] | |
| 948 | + linarith [(lt_div_iff₀ hlp).mp hz.1] | |
| 950 | 949 | have hlbz : z.1 < (l * b) ^ d := by |
| 951 | 950 | rw [Real.mul_rpow hl.le (ha.trans hab).le] |
| 952 | - nlinarith [(div_lt_iff₀ hlp).mp hz.2] | |
| 951 | + linarith [(div_lt_iff₀ hlp).mp hz.2] | |
| 953 | 952 | have hzce : z.1 ∈ Ioo (c ^ d) (e ^ d) := |
| 954 | 953 | ⟨(Real.rpow_le_rpow hc.le hca hd.le).trans_lt hlaz, |
| 955 | 954 | hlbz.trans_le (Real.rpow_le_rpow (mul_pos hl (ha.trans hab)).le hbe hd.le)⟩ |
| @@ -961,7 +960,7 @@ theorem normalizeSource_gauge_finiteJets {c e a b d : ℝ} | ||
| 961 | 960 | have hrb : inverseChart d c z.1 < l * b := |
| 962 | 961 | (Real.rpow_lt_rpow_iff hrp.le (mul_pos hl (ha.trans hab)).le hd).mp (by simpa only [hrpow] using hlbz) |
| 963 | 962 | have hr : inverseChart d c z.1 / l ∈ Ioo a b := |
| 964 | - ⟨(lt_div_iff₀ hl).mpr (by nlinarith), (div_lt_iff₀ hl).mpr (by nlinarith)⟩ | |
| 963 | + ⟨(lt_div_iff₀ hl).mpr (by linarith), (div_lt_iff₀ hl).mpr (by linarith)⟩ | |
| 965 | 964 | have hratio : (inverseChart d c z.1 / l) ^ d = z.1 / l ^ d := by |
| 966 | 965 | rw [Real.div_rpow hrp.le hl.le, hrpow] |
| 967 | 966 | have hw : 0 ≤ logWeight cL cR a b p (inverseChart d c z.1 / l) := |
| @@ -1110,8 +1109,8 @@ theorem transportGauge_finiteJets {c e a b cL cR L : ℝ} (hce : c < e) | ||
| 1110 | 1109 | (mul_le_mul_of_nonneg_left (hweight _ (logPosition_mem ha hp)) hA) |
| 1111 | 1110 | · have hp' : R ∉ Ioo (ell z.2.1 * a) (ell z.2.1 * b) := by |
| 1112 | 1111 | intro h |
| 1113 | - exact hp ⟨(lt_div_iff₀ (hl _ hz)).mpr (by nlinarith [h.1]), | |
| 1114 | - (div_lt_iff₀ (hl _ hz)).mpr (by nlinarith [h.2])⟩ | |
| 1112 | + exact hp ⟨(lt_div_iff₀ (hl _ hz)).mpr (by linarith [h.1]), | |
| 1113 | + (div_lt_iff₀ (hl _ hz)).mpr (by linarith [h.2])⟩ | |
| 1115 | 1114 | rw [iteratedFDeriv_zero_outsideGauge (z := (R, (z.2.1, Y))) |
| 1116 | 1115 | hU hell.continuousOn hf hsg hz hp' i, norm_zero] |
| 1117 | 1116 | exact mul_nonneg hA hW |
| @@ -1177,9 +1176,9 @@ theorem transportGauge_finiteJets {c e a b cL cR L : ℝ} (hce : c < e) | ||
| 1177 | 1176 | have hmid : massK * A + (2 : ℝ) ^ m * B * (massK * A) ≤ midK * (1 + B) * A * δ := by |
| 1178 | 1177 | dsimp [midK] |
| 1179 | 1178 | have hpow : 0 ≤ (2 : ℝ) ^ m := by positivity |
| 1180 | - have : 1 + (2 : ℝ) ^ m * B ≤ (1 + (2 : ℝ) ^ m) * (1 + B) := by nlinarith | |
| 1179 | + have : 1 + (2 : ℝ) ^ m * B ≤ (1 + (2 : ℝ) ^ m) * (1 + B) := by linarith | |
| 1181 | 1180 | field_simp [hδ.ne'] |
| 1182 | - nlinarith [mul_nonneg (mul_nonneg hmassK hA) (sub_nonneg.mpr this)] | |
| 1181 | + linarith [mul_nonneg (mul_nonneg hmassK hA) (sub_nonneg.mpr this)] | |
| 1183 | 1182 | exact (hb.trans hmid).trans ((mul_le_mul_of_nonneg_left hw |
| 1184 | 1183 | (mul_nonneg (mul_nonneg hmidK (by positivity)) hA)).trans |
| 1185 | 1184 | (mul_le_mul_of_nonneg_right |
| @@ -1220,7 +1219,7 @@ theorem cutoff_eq_normalizedCutoff {c a b d : ℝ} (hc : 0 < c) (ha : 0 < a) | ||
| 1220 | 1219 | (hleft : c ≤ ell z.2.1 * a) (hR : z.1 / ell z.2.1 ∈ Ioo a b) : |
| 1221 | 1220 | cutoff d a b ell z = normalizedCutoff (a ^ d) (b ^ d) (fun s => ell s ^ d) |
| 1222 | 1221 | (liftChart (powerChart d c) z) := by |
| 1223 | - have hr : c < z.1 := hleft.trans_lt (by nlinarith [(lt_div_iff₀ hl).mp hR.1]) | |
| 1222 | + have hr : c < z.1 := hleft.trans_lt (by linarith [(lt_div_iff₀ hl).mp hR.1]) | |
| 1224 | 1223 | have hratio : 0 < z.1 / ell z.2.1 := ha.trans hR.1 |
| 1225 | 1224 | simp only [cutoff, radialRatio, physicalCutoff, normalizedCutoff, liftChart] |
| 1226 | 1225 | rw [powerChart_eq ha (by linarith [hR.1]) d, powerChart_eq hc (by linarith) d, |
| @@ -1361,9 +1360,9 @@ theorem compactPrimitive_q_finiteJets_global {coord a b c e d cL cR L : ℝ} | ||
| 1361 | 1360 | have hQ : 0 ≤ Q := (inv_pos.mpr (pow_pos (lt_min zero_lt_one hd) p)).le |
| 1362 | 1361 | refine ⟨KP * KT * (1 + B) * KN * Q, by positivity, ?_⟩ |
| 1363 | 1362 | intro M v f hf hs hsg A hA z hz hR hin j hj |
| 1364 | - have hrleft : c < z.1 := (hleft _ hz).trans_lt (by nlinarith [(lt_div_iff₀ (hl _ hz)).mp hR.1]) | |
| 1363 | + have hrleft : c < z.1 := (hleft _ hz).trans_lt (by linarith [(lt_div_iff₀ (hl _ hz)).mp hR.1]) | |
| 1365 | 1364 | have hrright : z.1 < e := (show z.1 < qLength coord z.2.1 * b by |
| 1366 | - nlinarith [(div_lt_iff₀ (hl _ hz)).mp hR.2]).trans_le (hright _ hz) | |
| 1365 | + linarith [(div_lt_iff₀ (hl _ hz)).mp hR.2]).trans_le (hright _ hz) | |
| 1367 | 1366 | have hrpow : powerChart d c z.1 = z.1 ^ d := powerChart_eq hc (by linarith) d |
| 1368 | 1367 | let zU := liftChart (powerChart d c) z |
| 1369 | 1368 | have hzU : zU.1 ∈ Icc (c ^ d) (e ^ d) := by |
| @@ -1541,7 +1540,7 @@ theorem meanClass_moving_localBandJets {α : ℝ} {f : ℕ → Point → ℝ} | ||
| 1541 | 1540 | exact (h.trans (mul_le_mul_of_nonneg_left (hweight _ (logPosition_mem ha hR)) hA)).trans_eq (by ring) |
| 1542 | 1541 | · have hR' : z.1 ∉ Ioo (qLength coord z.2.1 * a) (qLength coord z.2.1 * b) := by |
| 1543 | 1542 | intro h |
| 1544 | - exact hR ⟨(lt_div_iff₀ hp).mpr (by nlinarith [h.1]), (div_lt_iff₀ hp).mpr (by nlinarith [h.2])⟩ | |
| 1543 | + exact hR ⟨(lt_div_iff₀ hp).mpr (by linarith [h.1]), (div_lt_iff₀ hp).mpr (by linarith [h.2])⟩ | |
| 1545 | 1544 | have hell : ContinuousOn (qLength coord) U.carrier := |
| 1546 | 1545 | ((qLength_contDiffOn U.coord_pos U.coord_lt_one).mono (fun s hs => U.time_pos s hs)).continuousOn |
| 1547 | 1546 | rw [iteratedFDeriv_zero_outsideGauge_on U.isOpen hell (hf n) (hs n) hz hR' j, norm_zero] |
| @@ -1776,8 +1775,8 @@ theorem localBandJets_meanClass_of_gaugeInteriorSupport {c e α : ℝ} | ||
| 1776 | 1775 | _ = _ := rfl |
| 1777 | 1776 | · have hr : z.1 ∉ Ioo (qLength coord z.2.1 * c) (qLength coord z.2.1 * e) := by |
| 1778 | 1777 | intro h |
| 1779 | - exact hpi ⟨((lt_div_iff₀ hEll).mpr (by nlinarith [h.1])).le, | |
| 1780 | - ((div_lt_iff₀ hEll).mpr (by nlinarith [h.2])).le⟩ | |
| 1778 | + exact hpi ⟨((lt_div_iff₀ hEll).mpr (by linarith [h.1])).le, | |
| 1779 | + ((div_lt_iff₀ hEll).mpr (by linarith [h.2])).le⟩ | |
| 1781 | 1780 | rw [iteratedFDeriv_zero_outsideGauge_on U.isOpen |
| 1782 | 1781 | ((qLength_contDiffOn U.coord_pos U.coord_lt_one).mono (fun s hs => U.time_pos s hs)).continuousOn |
| 1783 | 1782 | (hf n) (hs n) hzs hr j, norm_zero] |
| @@ -2059,7 +2058,7 @@ theorem compactAlias_reference {c a b d M : ℝ} (hc : 0 < c) (ha : 0 < a) | ||
| 2059 | 2058 | physicalTotal_fiberLocal d (ell z.2.1 * a) M v g f z.2.1 (fun _ _ => rfl) z.1 z.2.2] at h |
| 2060 | 2059 | exact congrArg (fun t : ℝ => cutoffRadialDerivative d a b ell z * t) h.symm |
| 2061 | 2060 | · have hsmall : z.1 / ell z.2.1 < a := |
| 2062 | - (div_lt_iff₀ (hl _ hz)).mpr (by nlinarith [lt_of_not_ge hR]) | |
| 2061 | + (div_lt_iff₀ (hl _ hz)).mpr (by linarith [lt_of_not_ge hR]) | |
| 2063 | 2062 | have he : cutoffRadialDerivative d a b ell z = 0 := by |
| 2064 | 2063 | simp only [cutoffRadialDerivative, radialRatio, deriv_physicalCutoff_zero_left ha hab hd hsmall, mul_zero] |
| 2065 | 2064 | simp only [he, zero_mul] |
| @@ -2127,8 +2126,8 @@ theorem cutoffRadialDerivative_interior_support {a b d : ℝ} (ha : 0 < a) (hab | ||
| 2127 | 2126 | apply hn |
| 2128 | 2127 | dsimp only [cutoffRadialDerivative, radialRatio] |
| 2129 | 2128 | rw [hzeroRight _ hlt, mul_zero] |
| 2130 | - exact ⟨by nlinarith [(le_div_iff₀ (hl _ hz)).mp hprofile.1], | |
| 2131 | - by nlinarith [(div_le_iff₀ (hl _ hz)).mp hprofile.2]⟩ | |
| 2129 | + exact ⟨by linarith [(le_div_iff₀ (hl _ hz)).mp hprofile.1], | |
| 2130 | + by linarith [(div_le_iff₀ (hl _ hz)).mp hprofile.2]⟩ | |
| 2132 | 2131 | |
| 2133 | 2132 | theorem compactAlias_interior_support {a b d : ℝ} (ha : 0 < a) (hab : a < b) (hd : 0 < d) : |
| 2134 | 2133 | ∃ c e : ℝ, a < c ∧ c < e ∧ e < b ∧ ∀ (ell : S → ℝ) (U : Set S), |
+19 −0 routes/s2-ns-variable-1/README.md added View file
| @@ -0,0 +1,19 @@ | ||
| 1 | +--- | |
| 2 | +issue: 11 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s2-ns-variable-1 | |
| 6 | + | |
| 7 | +One unit of S-2: `NavierStokes/VariableGaugeMean.lean`, the only file of the family `NavierStokes/Variable*`, made | |
| 8 | +cheaper to elaborate by edits inside proofs only. Eighteen `nlinarith` calls become `linarith`; in | |
| 9 | +`physicalTotal_fiberLocal` the unused `TransportPrimitive.shift` leaves a `simp` set and the list is joined onto one | |
| 10 | +line (18 lines out, 17 in). No statement, import line or docstring changes, and no `maxHeartbeats`. | |
| 11 | + | |
| 12 | +The edit comes from Treant's `speedup_trials` stage (TitiSkywalker/NavierStokesAndEuler, 2026-12-03 at upstream | |
| 13 | +`f9e8bc5`), carried onto main at `df2f18f` and counted there: 157.06 G → 101.65 G instructions retired (−35.3%), | |
| 14 | +per the measurement described in the pull request. | |
| 15 | + | |
| 16 | +## Next | |
| 17 | + | |
| 18 | +Push and wait for `challenge` and `build`; the maintainer agent reviews the pull request. Nothing further is planned | |
| 19 | +for this unit. | |