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: #660 perf(NavierStokes/Base): 6 files cheaper to elaborate (−30.4%, measured)
1 commit
+4 −4 NavierStokes/BaseContextAssembly.lean View file
| @@ -71,7 +71,7 @@ noncomputable def slowCoordinates : Point →L[ℝ] Slow where | ||
| 71 | 71 | theorem slowCoordinates_norm_le : ‖slowCoordinates‖ ≤ 1 := by |
| 72 | 72 | apply ContinuousLinearMap.opNorm_le_bound _ zero_le_one |
| 73 | 73 | intro x |
| 74 | - simp only [slowCoordinates_apply, one_mul, Prod.norm_def] | |
| 74 | + simp only [one_mul, Prod.norm_def] | |
| 75 | 75 | exact max_le_max le_rfl ((max_comm _ _).le.trans (le_max_left _ _)) |
| 76 | 76 | |
| 77 | 77 | noncomputable def physicalPoint (h : ℝ) (n : ℕ) (x : Point) : ProblemStatement.SpaceTime := |
| @@ -267,8 +267,8 @@ theorem nativeStrip_active (U : LocalSignedRequest.SlowRegion (2 * F.data.h)) | ||
| 267 | 267 | have heta := BaseChartJets.normalizedCoordinates_eta F.data.h_pos F.data.h_lt_half |
| 268 | 268 | (p := slowCoordinates x) hT |
| 269 | 269 | refine ⟨⟨?_, ?_⟩, ?_⟩ |
| 270 | - · nlinarith | |
| 271 | - · nlinarith | |
| 270 | + · linarith | |
| 271 | + · linarith | |
| 272 | 272 | · exact ⟨(abs_lt.mp heta).1.le, (abs_lt.mp heta).2.le⟩ |
| 273 | 273 | |
| 274 | 274 | theorem nativeStrip_weight (U : LocalSignedRequest.SlowRegion (2 * F.data.h)) |
| @@ -477,7 +477,7 @@ theorem angularBase_physical (n : ℕ) {x : Point} (hT : 0 < x.2.1.1) (hR : 0 < | ||
| 477 | 477 | change x.1 * BaseChartJets.frequency _ _ _ _ _ _ = _ |
| 478 | 478 | rw [he] |
| 479 | 479 | change x.1 * (_ / x.1) = _ |
| 480 | - simp only [FinalSlowBase.velocity, physicalPoint, slowCoordinates_apply] | |
| 480 | + simp only [FinalSlowBase.velocity, physicalPoint] | |
| 481 | 481 | field_simp |
| 482 | 482 | |
| 483 | 483 | theorem physicalComponent_smoothAt (n : ℕ) (i : Fin 3) {x : Point} (hT : 0 < x.2.1.1) : |
+3 −5 NavierStokes/BaseExterior.lean View file
| @@ -266,14 +266,13 @@ theorem exterior_velocity_eq_leading {a : ℕ → ℕ} (ha : StrictMono a) {h C | ||
| 266 | 266 | coordinateVector] |
| 267 | 267 | · change baseVelocity a h C d z 1 = _ |
| 268 | 268 | rw [show baseVelocity a h C d z 1 = _ from AxisymmetricFields.velocity_one _ _ _ _ hH hK] |
| 269 | - simp [hZ, hsw, AxisymmetricResidual.velocity, AxisymmetricResidual.componentX, | |
| 270 | - AxisymmetricResidual.componentY, AxisymmetricResidual.pack, AxisymmetricResidual.lift, | |
| 269 | + simp [hZ, hsw, AxisymmetricResidual.velocity, AxisymmetricResidual.componentY, AxisymmetricResidual.pack, AxisymmetricResidual.lift, | |
| 271 | 270 | coordinateVector] |
| 272 | 271 | · change baseVelocity a h C d z 2 = _ |
| 273 | 272 | rw [show baseVelocity a h C d z 2 = _ from AxisymmetricFields.velocity_two _ _ _ _ hH hK] |
| 274 | 273 | simp [h0, hS, AxisymmetricResidual.velocity, AxisymmetricResidual.componentX, |
| 275 | 274 | AxisymmetricResidual.componentY, AxisymmetricResidual.pack, AxisymmetricResidual.lift, |
| 276 | - coordinateVector, Fin.ext_iff] | |
| 275 | + coordinateVector] | |
| 277 | 276 | |
| 278 | 277 | theorem exterior_pressure_eq_leading {a : ℕ → ℕ} {h C R : ℝ} {d : Coefficients} |
| 279 | 278 | (hh : 0 < h) (hh1 : h < 1 / 2) (hd : ExteriorCoefficients d R) |
| @@ -595,8 +594,7 @@ theorem heatVelocity_eq_angularVector (C h : ℝ) (z : SpaceTime) : | ||
| 595 | 594 | ext i |
| 596 | 595 | fin_cases i <;> |
| 597 | 596 | simp [heatVelocity, AxisymmetricResidual.velocity, AxisymmetricResidual.componentX, |
| 598 | - AxisymmetricResidual.componentY, AxisymmetricResidual.lift, AxisymmetricResidual.pack, | |
| 599 | - BaseResidual.angularVector, coordinateVector, Fin.ext_iff] <;> ring | |
| 597 | + AxisymmetricResidual.componentY, AxisymmetricResidual.lift, BaseResidual.angularVector, coordinateVector, Fin.ext_iff] <;> ring | |
| 600 | 598 | |
| 601 | 599 | /-- The exact exterior solution is jointly smooth up to the terminal time |
| 602 | 600 | on every region of positive physical radius, in Cartesian coordinates. -/ |
+26 −26 NavierStokes/BasePhaseGeometry.lean View file
| @@ -95,7 +95,7 @@ theorem derivative_norm_of_error {F F0 : Slow → ℝ} {q : Slow} {M ε : ℝ} | ||
| 95 | 95 | have hnorm := norm_sub_le_norm_sub_add_norm_sub (fderiv ℝ F q) (fderiv ℝ F0 q) 0 |
| 96 | 96 | simp only [sub_zero] at hnorm |
| 97 | 97 | have he := mul_le_mul_of_nonneg_left hε hM |
| 98 | - nlinarith | |
| 98 | + linarith | |
| 99 | 99 | |
| 100 | 100 | /-- Primitive normalized-base C1 errors and fixed reference C2 bounds give |
| 101 | 101 | all local hypotheses used by the phase estimate. -/ |
| @@ -183,21 +183,21 @@ theorem frame_errors_of_normal_close | ||
| 183 | 183 | have hKerr : ‖PrimaryODE.localFrame n 0 - K‖ ≤ E := by |
| 184 | 184 | rw [h0] |
| 185 | 185 | exact (PhaseEstimates.normalDirection_close hB hK hsmall hn).trans |
| 186 | - ((scaled_div_mono hδ hb hbB (by norm_num : (0 : ℝ) ≤ 4) (by nlinarith)).trans hfac) | |
| 186 | + ((scaled_div_mono hδ hb hbB (by norm_num : (0 : ℝ) ≤ 4) (by linarith)).trans hfac) | |
| 187 | 187 | have hNerr : ‖PrimaryODE.localFrame n 1 - MovingFrameODE.quarterTurn K‖ ≤ E := by |
| 188 | 188 | rw [h1] |
| 189 | 189 | exact (PhaseEstimates.transverseDirection_close hB hK hsmall hn).trans |
| 190 | - ((scaled_div_mono hδ hb hbB (by norm_num : (0 : ℝ) ≤ 4) (by nlinarith)).trans hfac) | |
| 190 | + ((scaled_div_mono hδ hb hbB (by norm_num : (0 : ℝ) ≤ 4) (by linarith)).trans hfac) | |
| 191 | 191 | have hrerr : |MovingFrameODE.radialSlope n - s| ≤ E := |
| 192 | 192 | (PhaseEstimates.radialSlope_close hB hK hsmall hn).trans |
| 193 | - ((scaled_div_mono hδ hb hbB (by positivity) (by nlinarith [abs_nonneg s])).trans hfac) | |
| 193 | + ((scaled_div_mono hδ hb hbB (by positivity) (by linarith [abs_nonneg s])).trans hfac) | |
| 194 | 194 | have hrderr : |PhaseEstimates.slopeDerivative n nDot| ≤ E := |
| 195 | 195 | (PhaseEstimates.slopeDerivative_bound hB hlow hnd).trans |
| 196 | 196 | ((scaled_div_mono hδ hb hbB (by positivity) |
| 197 | - (by nlinarith [abs_nonneg (MovingFrameODE.radialSlope n)])).trans hfac) | |
| 197 | + (by linarith [abs_nonneg (MovingFrameODE.radialSlope n)])).trans hfac) | |
| 198 | 198 | have hωerr : |PhaseEstimates.angularVelocity n nDot| ≤ E := |
| 199 | 199 | (PhaseEstimates.angularVelocity_bound hB hlow hnd).trans |
| 200 | - ((scaled_div_mono hδ hb hbB (by norm_num : (0 : ℝ) ≤ 4) (by nlinarith)).trans hfac) | |
| 200 | + ((scaled_div_mono hδ hb hbB (by norm_num : (0 : ℝ) ≤ 4) (by linarith)).trans hfac) | |
| 201 | 201 | have h := MovingFrameODE.frame_coefficients_close |
| 202 | 202 | (B := PrimaryODE.localFrame n) (B0 := MovingFrameODE.frameOfUnit K hK) |
| 203 | 203 | (g := g) (g0 := g0) (F := F) (F0 := F0) (ρ := MovingFrameODE.radialSlope n) |
| @@ -248,7 +248,7 @@ theorem damping_error_of_normal_close | ||
| 248 | 248 | have hn' : ‖n‖ ≤ M * (A + 3) := by |
| 249 | 249 | have hh := norm_sub_le_norm_sub_add_norm_sub n r 0 |
| 250 | 250 | simp only [sub_zero] at hh |
| 251 | - nlinarith | |
| 251 | + linarith | |
| 252 | 252 | have hdiff : |‖n‖ - ‖r‖| ≤ δ := (abs_norm_sub_norm_le n r).trans hn |
| 253 | 253 | have hsq : |‖n‖ ^ 2 - ‖r‖ ^ 2| ≤ δ * (M * (2 * A + 5)) := by |
| 254 | 254 | calc |
| @@ -256,7 +256,7 @@ theorem damping_error_of_normal_close | ||
| 256 | 256 | rw [← abs_of_nonneg (add_nonneg (norm_nonneg n) (norm_nonneg r)), ← abs_mul] |
| 257 | 257 | congr 1 |
| 258 | 258 | ring |
| 259 | - _ ≤ δ * (M * (2 * A + 5)) := mul_le_mul hdiff (by nlinarith) | |
| 259 | + _ ≤ δ * (M * (2 * A + 5)) := mul_le_mul hdiff (by linarith) | |
| 260 | 260 | (add_nonneg (norm_nonneg n) (norm_nonneg r)) hδ |
| 261 | 261 | calc |
| 262 | 262 | _ = ν * |‖n‖ ^ 2 - ‖r‖ ^ 2| := by |
| @@ -305,21 +305,21 @@ theorem phase_errors_on_mesh | ||
| 305 | 305 | have hM2 : M ≤ 2 * M := by linarith |
| 306 | 306 | have hd : ‖q - q0‖ ≤ 1 / (S / 2) ^ 3 := hdiameter.trans (by |
| 307 | 307 | apply (div_le_div_iff₀ (pow_pos hS0 3) (pow_pos (half_pos hS0) 3)).2 |
| 308 | - nlinarith [pow_pos hS0 3]) | |
| 308 | + linarith [pow_pos hS0 3]) | |
| 309 | 309 | have hL' : 1 / |L| ≤ (2 * M) / (S / 2) := hL.trans (by |
| 310 | 310 | apply (div_le_div_iff₀ hS0 (half_pos hS0)).2 |
| 311 | 311 | nlinarith) |
| 312 | 312 | have he := PhaseEstimates.actual_phase_estimates |
| 313 | 313 | (v := v) (θ := θ) (localBase_mono hbase hM2) hq hq0 hd hR hR0 hg horth hfreq |
| 314 | 314 | (by linarith) (by linarith) hk hε (htarget.trans hM2) (hpz.trans hM2) (hB.trans hM2) |
| 315 | - hsigma (hu.trans hM2) (hgi.trans hM2) hL' (by nlinarith [hv]) | |
| 315 | + hsigma (hu.trans hM2) (hgi.trans hM2) hL' (by linarith [hv]) | |
| 316 | 316 | (hRi.trans hM2) (hR0i.trans hM2) |
| 317 | 317 | have hband := PhaseEstimates.phaseError_le_four_div (S := S / 2) (ε := ε) (k := k) |
| 318 | - (half_pos hS0) (by nlinarith [sq_nonneg (S * ε)]) | |
| 318 | + (half_pos hS0) (by linarith [sq_nonneg (S * ε)]) | |
| 319 | 319 | ((div_le_iff₀ hk0).2 (by |
| 320 | 320 | have h := (div_le_iff₀ hk0).1 hk2 |
| 321 | - nlinarith [sq_nonneg S])) | |
| 322 | - (by nlinarith [mul_nonneg hε.le (sq_nonneg S)]) | |
| 321 | + linarith [sq_nonneg S])) | |
| 322 | + (by linarith [mul_nonneg hε.le (sq_nonneg S)]) | |
| 323 | 323 | have hc : 0 ≤ PhaseEstimates.phaseConstant (2 * M) := by |
| 324 | 324 | unfold PhaseEstimates.phaseConstant |
| 325 | 325 | positivity |
| @@ -378,7 +378,7 @@ theorem reference_profile_rate_bound {u L v A M S : ℝ} | ||
| 378 | 378 | (hs : |PulseGrowth.slotMagnitude u L v| ≤ A) |
| 379 | 379 | (huL : |u / L| ≤ M / S) : |
| 380 | 380 | |PrimaryODE.referenceProfileRate u L v| ≤ A * M / S := by |
| 381 | - have hden : 1 ≤ 1 + PulseGrowth.slotMagnitude u L v ^ 2 := by nlinarith [sq_nonneg (PulseGrowth.slotMagnitude u L v)] | |
| 381 | + have hden : 1 ≤ 1 + PulseGrowth.slotMagnitude u L v ^ 2 := by linarith [sq_nonneg (PulseGrowth.slotMagnitude u L v)] | |
| 382 | 382 | have hdenpos : 0 < 1 + PulseGrowth.slotMagnitude u L v ^ 2 := by positivity |
| 383 | 383 | rw [PrimaryODE.referenceProfileRate, abs_div, abs_mul, abs_of_pos hdenpos] |
| 384 | 384 | calc |
| @@ -397,12 +397,12 @@ theorem frequencyBound_bounds {M : ℝ} (hM : 1 ≤ M) : | ||
| 397 | 397 | have hprod : 0 ≤ M * (M + M ^ 4) := mul_nonneg h0 (add_nonneg h0 h4) |
| 398 | 398 | unfold frequencyBound |
| 399 | 399 | constructor |
| 400 | - · nlinarith [sq_nonneg M] | |
| 400 | + · linarith [sq_nonneg M] | |
| 401 | 401 | constructor |
| 402 | - · nlinarith [sq_nonneg M] | |
| 402 | + · linarith [sq_nonneg M] | |
| 403 | 403 | constructor |
| 404 | - · nlinarith [sq_nonneg M] | |
| 405 | - constructor <;> nlinarith [sq_nonneg M] | |
| 404 | + · linarith [sq_nonneg M] | |
| 405 | + constructor <;> linarith [sq_nonneg M] | |
| 406 | 406 | |
| 407 | 407 | noncomputable def normalLower (M u : ℝ) : ℝ := |
| 408 | 408 | Real.sqrt ((1 / M) / (4 * dampingDenominator u)) |
| @@ -466,7 +466,7 @@ theorem exists_large_band (h M u T : ℝ) (hh : 0 < h) (hM : 1 ≤ M) (N0 : ℕ) | ||
| 466 | 466 | refine ⟨⟨hn4, hS2, hn.2.1, hn.2.2.1, hn.2.2.2, ?_⟩, (le_max_left _ _).trans hscale⟩ |
| 467 | 467 | apply (div_le_iff₀ hS0).2 |
| 468 | 468 | have ht := (div_le_iff₀ hb).1 hcut |
| 469 | - nlinarith | |
| 469 | + linarith | |
| 470 | 470 | obtain ⟨N, hN⟩ := eventually_atTop.1 hall |
| 471 | 471 | exact ⟨max N N0, le_max_right _ _, fun n hn => hN n ((le_max_left _ _).trans hn)⟩ |
| 472 | 472 | |
| @@ -480,7 +480,7 @@ theorem base_error_on_mesh {S ε M : ℝ} (hS : 1 ≤ S) (hM : 1 ≤ M) | ||
| 480 | 480 | apply (le_div_iff₀ hS0).2 |
| 481 | 481 | have hsq : S ≤ S ^ 2 := by nlinarith |
| 482 | 482 | have hm := mul_le_mul_of_nonneg_right hsq (sq_nonneg ε) |
| 483 | - nlinarith | |
| 483 | + linarith | |
| 484 | 484 | have hcube := (PhaseEstimates.inverse_cube_bounds hS).1 |
| 485 | 485 | have hsum : 3 / S ^ 3 + ε ^ 2 ≤ 4 / S := by |
| 486 | 486 | calc |
| @@ -631,7 +631,7 @@ theorem slot_bound (hh : 0 ≤ h) (hr : 0 < r0) (hslot : 4 * r0 * ChartScales.Tg | ||
| 631 | 631 | change a.length i ≤ 2 * r0 * ChartScales.Tg * D.scale i at hl |
| 632 | 632 | have hS : 0 ≤ D.scale i := (zero_lt_one.trans_le (D.one_le_scale i)).le |
| 633 | 633 | have hm := mul_le_mul_of_nonneg_right hslot hS |
| 634 | - nlinarith [a.slot_abs hr hv] | |
| 634 | + linarith [a.slot_abs hr hv] | |
| 635 | 635 | |
| 636 | 636 | theorem magnitude_bound (hr : 0 < r0) (hu : 0 ≤ u) (huM : u ≤ M) |
| 637 | 637 | {i : ι} {v : ℝ} (hv : v ∈ a.slot i) : |
| @@ -641,7 +641,7 @@ theorem magnitude_bound (hr : 0 < r0) (hu : 0 ≤ u) (huM : u ≤ M) | ||
| 641 | 641 | have hmul : |u * v / a.length i| ≤ 2 * u := by |
| 642 | 642 | rw [abs_div, abs_mul, abs_of_nonneg hu, abs_of_pos hL] |
| 643 | 643 | apply (div_le_iff₀ hL).2 |
| 644 | - nlinarith [mul_le_mul_of_nonneg_left hv' hu] | |
| 644 | + linarith [mul_le_mul_of_nonneg_left hv' hu] | |
| 645 | 645 | have ha := abs_add_le (u / 2) (u * v / a.length i) |
| 646 | 646 | rw [abs_div, abs_of_nonneg hu] at ha |
| 647 | 647 | norm_num at ha |
| @@ -699,7 +699,7 @@ theorem frozen_constants (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 ≤ M) | ||
| 699 | 699 | rw [abs_div, abs_mul, abs_mul, a.sign i, one_mul, abs_of_pos (a.B_pos hh hM i)] |
| 700 | 700 | norm_num |
| 701 | 701 | have hm := mul_le_mul (a.B_bounds hh hM i).2 hu (abs_nonneg u) (by linarith : 0 ≤ M) |
| 702 | - nlinarith [hb.2.2.2.1, sq_nonneg M] | |
| 702 | + linarith [hb.2.2.2.1, sq_nonneg M] | |
| 703 | 703 | |
| 704 | 704 | /-- Actual phase-normal and normal-motion estimates for every enlarged |
| 705 | 705 | slot point. These follow from the normalized base error and rounding. -/ |
| @@ -832,7 +832,7 @@ theorem modal_errors (hh : 0 ≤ h) (hr : 0 < r0) (hM : 1 ≤ M) | ||
| 832 | 832 | (sq_nonneg M) hS hmag (a.quotient_rate_bound hh hr hM |
| 833 | 833 | (by simpa only [abs_of_pos hu] using huM) hL i hn.four_le) |
| 834 | 834 | have hH : 0 ≤ eigenBound M := by unfold eigenBound; positivity |
| 835 | - have hH1 : M * (1 + 3 * M) ≤ eigenBound M := by unfold eigenBound; nlinarith | |
| 835 | + have hH1 : M * (1 + 3 * M) ≤ eigenBound M := by unfold eigenBound; linarith | |
| 836 | 836 | have hH2 : M ≤ eigenBound M := by unfold eigenBound; nlinarith |
| 837 | 837 | have hhi : |1 / PrimaryODE.referenceProfile (a.c0 i) u (a.length i) v| ≤ eigenBound M := by |
| 838 | 838 | simpa only [one_div_one_div] using hprof.2.trans (by simpa only [one_div_one_div] using hH2) |
| @@ -924,8 +924,8 @@ theorem outputBound_bounds (hM : 1 ≤ M) : | ||
| 924 | 924 | have hb := frequencyBound_bounds hM |
| 925 | 925 | have hM0 : 0 ≤ M := by linarith |
| 926 | 926 | unfold outputBound |
| 927 | - exact ⟨by nlinarith [sq_nonneg M], by nlinarith [sq_nonneg M], | |
| 928 | - by nlinarith, by nlinarith [sq_nonneg M], by nlinarith [sq_nonneg M]⟩ | |
| 927 | + exact ⟨by linarith [sq_nonneg M], by linarith [sq_nonneg M], | |
| 928 | + by linarith, by linarith [sq_nonneg M], by linarith [sq_nonneg M]⟩ | |
| 929 | 929 | |
| 930 | 930 | theorem outputLower_pos (hM : 1 ≤ M) : 0 < outputLower M u := |
| 931 | 931 | lt_min (half_pos (normalLower_pos hM)) (one_div_pos.mpr (zero_lt_one.trans_le hM)) |
+1 −1 NavierStokes/BasePrefixIdentity.lean View file
| @@ -347,7 +347,7 @@ theorem VelocityMatches.flux_contDiffAt {h : ℝ} (hh : 0 < h) (hh1 : h < 1 / 2) | ||
| 347 | 347 | have hs : w.2 ^ 2 ≤ 1 := by |
| 348 | 348 | have h1 := hw.2.1 |
| 349 | 349 | have h2 := hw.2.2 |
| 350 | - nlinarith [mul_nonneg (show 0 ≤ 1 - w.2 by linarith) (show 0 ≤ 1 + w.2 by linarith)] | |
| 350 | + linarith [mul_nonneg (show 0 ≤ 1 - w.2 by linarith) (show 0 ≤ 1 + w.2 by linarith)] | |
| 351 | 351 | have hL := (CoordinateAlgebra.L_pos hh.le hh1 hs).ne' |
| 352 | 352 | exact (SlowDivergence.radialFlux_smoothAt SlowBorelBase.globalRadialDomain |
| 353 | 353 | (hd.axial n).contDiffOn h (SlowExpansionResidual.slowOrder h n) (mem_univ _) hL).congr_of_eventuallyEq |
+2 −2 NavierStokes/BaseRankPatch.lean View file
| @@ -259,8 +259,8 @@ theorem rank_fields (upper : ℝ) (B : ℕ) (Q : ℝ) | ||
| 259 | 259 | W.controls.radius_pos .mean)).trans hR.1 |
| 260 | 260 | have hr : R / rankLength F.data.h s ∈ ReservedPatches.radialWindow F W.controls.radius .mean := by |
| 261 | 261 | apply ReservedPatches.radial_closedPatch_subset F W.controls.radius W.controls.radius_pos .mean |
| 262 | - exact ⟨(le_div_iff₀ hell).mpr (by nlinarith [hR.1]), | |
| 263 | - (div_le_iff₀ hell).mpr (by nlinarith [hR.2])⟩ | |
| 262 | + exact ⟨(le_div_iff₀ hell).mpr (by linarith [hR.1]), | |
| 263 | + (div_le_iff₀ hell).mpr (by linarith [hR.2])⟩ | |
| 264 | 264 | have hx := ReservedPatches.radial_mem_window F W.controls.radius W.controls.radius_pos .mean hr |
| 265 | 265 | rw [coordinates_radius_sq F.data.h_pos F.data.h_lt_half hs R] at hx |
| 266 | 266 | have heta := (normalizedCoordinates_eta F.data.h_pos F.data.h_lt_half |
+8 −9 NavierStokes/BaseResidual.lean View file
| @@ -1288,7 +1288,7 @@ theorem assembleComponents_eq_pack (R A Z : SpaceTime → ℝ) (z : SpaceTime) : | ||
| 1288 | 1288 | (z.2 1 * R z + z.2 0 * A z) (Z z) := by |
| 1289 | 1289 | ext i |
| 1290 | 1290 | fin_cases i <;> simp [assembleComponents, radialVector, angularVector, |
| 1291 | - AxisymmetricResidual.pack, coordinateVector] <;> ring | |
| 1291 | + coordinateVector] <;> ring | |
| 1292 | 1292 | |
| 1293 | 1293 | theorem assembleComponents_rate {l : Filter SpaceTime} {q : SpaceTime → ℝ} |
| 1294 | 1294 | {U B : Set SpaceTime} (hU : IsOpen U) (hlU : ∀ᶠ z in l, z ∈ U) |
| @@ -1802,8 +1802,7 @@ theorem activeZeta_edgeJets {a b c : ℝ} (hab : a < b) (hc : 0 < c) : | ||
| 1802 | 1802 | have hX := (Real.exp_pos a).trans hw.1.1 |
| 1803 | 1803 | have he : activeZeta c a b =ᶠ[𝓝 w] (radialPullback (logWeightProfile c a b) ∘ swapInner) := by |
| 1804 | 1804 | filter_upwards [continuousAt_fst.eventually (Ioi_mem_nhds hX)] with y hy |
| 1805 | - simp [activeZeta, radialWeight, hy, radialPullback, logChart, logWeightProfile, | |
| 1806 | - swapInner] | |
| 1805 | + simp [activeZeta, radialWeight, hy, radialPullback, logChart, logWeightProfile] | |
| 1807 | 1806 | rfl |
| 1808 | 1807 | rw [(SolenoidalDiagonal.iteratedFDeriv_eventuallyEq he m).self_of_nhds, |
| 1809 | 1808 | swapInner.norm_iteratedFDeriv_comp_right] |
| @@ -2031,11 +2030,11 @@ theorem eqOn_of_off_axis {V : Type} [NormedAddCommGroup V] [NormedSpace ℝ V] | ||
| 2031 | 2030 | have hx0 : z.2 0 = 0 := by |
| 2032 | 2031 | apply sq_eq_zero_iff.mp |
| 2033 | 2032 | unfold AxisymmetricFields.radialEnergy at hs0 |
| 2034 | - nlinarith [sq_nonneg (z.2 0), sq_nonneg (z.2 1)] | |
| 2033 | + linarith [sq_nonneg (z.2 0), sq_nonneg (z.2 1)] | |
| 2035 | 2034 | have hx1 : z.2 1 = 0 := by |
| 2036 | 2035 | apply sq_eq_zero_iff.mp |
| 2037 | 2036 | unfold AxisymmetricFields.radialEnergy at hs0 |
| 2038 | - nlinarith [sq_nonneg (z.2 0), sq_nonneg (z.2 1)] | |
| 2037 | + linarith [sq_nonneg (z.2 0), sq_nonneg (z.2 1)] | |
| 2039 | 2038 | let gamma : ℝ → SpaceTime := fun t => (z.1, z.2 + t • coordinateVector 0) |
| 2040 | 2039 | have hgamma : Continuous gamma := continuous_const.prodMk (continuous_const.add (continuous_id.smul continuous_const)) |
| 2041 | 2040 | have hg0 : gamma 0 = z := by simp [gamma] |
| @@ -2286,17 +2285,17 @@ theorem baseResidual_jetRate_axis {l : Filter SpaceTime} {a : ℕ → ℕ} {h C | ||
| 2286 | 2285 | (fun z => baseVelocity a h C d z - prefixVelocity J h C d z) (m + 2) (n + b) := by |
| 2287 | 2286 | apply finiteRate_weaken (velocity_prefix_rate hh hh1 A hd ha J (m + 2) (by omega)) hq |
| 2288 | 2287 | push_cast |
| 2289 | - nlinarith | |
| 2288 | + linarith | |
| 2290 | 2289 | have hpres : FiniteJetRate l (fun z => (cartesianChart h z).1) |
| 2291 | 2290 | (fun z => basePressure a h C d z - prefixPressure J h C d z) (m + 1) (n + b) := by |
| 2292 | 2291 | apply finiteRate_weaken (pressure_prefix_rate hh hh1 A hd ha J (m + 1) (by omega)) hq |
| 2293 | 2292 | push_cast |
| 2294 | - nlinarith | |
| 2293 | + linarith | |
| 2295 | 2294 | have hstress : JetRate l (fun z => (cartesianChart h z).1) |
| 2296 | 2295 | (fun z => baseStressForce a h C d z - prefixStressForce J h C d z) m n := by |
| 2297 | 2296 | apply (finiteRate_at (stress_prefix_rate_axis hh hh1 A hr hd hc ha J m (by omega)) le_rfl).weaken hq |
| 2298 | 2297 | dsimp [b] at hgain |
| 2299 | - nlinarith | |
| 2298 | + linarith | |
| 2300 | 2299 | let EJ : SpaceTime → Space := fun z => |
| 2301 | 2300 | navierStokesResidual (prefixVelocity J h C d) (prefixPressure J h C d) z.1 z.2 - |
| 2302 | 2301 | prefixStressForce J h C d z |
| @@ -2305,7 +2304,7 @@ theorem baseResidual_jetRate_axis {l : Filter SpaceTime} {a : ℕ → ℕ} {h C | ||
| 2305 | 2304 | (fun j _ => hp j) (fun j _ => hu j) (fun j _ => hb j) |
| 2306 | 2305 | (fun j _ => hv j) (fun j _ => heu j) (fun j _ => hep j) hL m) le_rfl).weaken hq |
| 2307 | 2306 | dsimp [b] at hgain |
| 2308 | - nlinarith | |
| 2307 | + linarith | |
| 2309 | 2308 | have hEJs : ContDiffOn ℝ ∞ EJ past := |
| 2310 | 2309 | (ResidualRegularity.contDiffOn_residual hU huJs hpJs).sub htJ |
| 2311 | 2310 | let Df := residualDifference (prefixVelocity J h C d) |
+30 −0 routes/s2-ns-base-1/README.md added View file
| @@ -0,0 +1,30 @@ | ||
| 1 | +--- | |
| 2 | +issue: 11 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s2-ns-base-1 | |
| 6 | + | |
| 7 | +One unit of S-2 (issue #11), family `NavierStokes/Base*`: six files are made cheaper to elaborate by edits inside | |
| 8 | +proofs only — `NavierStokes/BaseContextAssembly.lean`, `BaseExterior.lean`, `BasePhaseGeometry.lean`, | |
| 9 | +`BasePrefixIdentity.lean`, `BaseRankPatch.lean` and `BaseResidual.lean`. Most edits turn a `nlinarith` into a | |
| 10 | +`linarith`; four `simp`/`simp only` lists lose entries that do not change the goal. No statement, no import line, no | |
| 11 | +docstring and no `maxHeartbeats` changes; no other file is touched. | |
| 12 | + | |
| 13 | +The edits are those of Treant's `speedup_trials` stage (TitiSkywalker/NavierStokesAndEuler, the run of 2026-12-03 at | |
| 14 | +upstream `f9e8bc5`), carried onto this project's main at `df2f18f` and counted there file by file. The count is | |
| 15 | +instructions retired in user space by `lean` elaborating the one file alone, on one thread, with synchronous | |
| 16 | +elaboration (`lean -j1 -DElab.async=false` and the lakefile's options, under `perf stat -e instructions:u`), before and | |
| 17 | +after, on one machine. The six files are unchanged between `df2f18f` and the tip of `main` at `c6a56fb`, so the same | |
| 18 | +base applies here. Together the six go from 359.70 G to 250.41 G, −30.4%. | |
| 19 | + | |
| 20 | +Reading the diff as a reviewer: every changed line sits below the `:=` of its declaration, in a proof, and the | |
| 21 | +declarations' statements are untouched; the diff names only these six files; `git diff origin/main -- '*.lean'` has no | |
| 22 | +`import`, no docstring and no `maxHeartbeats` line. None of the edits makes its proof harder to read — each is a | |
| 23 | +weaker tactic or a shorter `simp` set — so no file is left out of the pull request. Two `simp` lines in | |
| 24 | +`BaseExterior.lean` are wrapped longer than before (139 and 136 characters, against the file's previous 110); the | |
| 25 | +lists themselves only lose an entry, so I kept the file. | |
| 26 | + | |
| 27 | +## Next | |
| 28 | + | |
| 29 | +The maintainer's review after `challenge` and `build`. The rest of the `NavierStokes/Base*` family follows in pull | |
| 30 | +requests of their own. | |