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

perf(Euler/Packet): 94 files cheaper to elaborate (−12.3%, measured) #643
Open
+1 −1 Euler/PacketActualFrameEstimates.lean View file
| @@ -52,7 +52,7 @@ theorem physical_frame_renewal_order40 (M : Space →L[ℝ] Space) (m v r w : | ||
| 52 | 52 | let R := scaledRay m v r s₀ t₀ a ε (y⁻¹/σ) |
| 53 | 53 | let V := scaledVelocity m v w t₀ a ε (y⁻¹/σ) |
| 54 | 54 | have hp := scaled_power_le hΘ hK he (by decide : 5 ≤ 40) |
| 55 | - have hρ : 800*e*Θ^5 ≤ 1/2 := by nlinarith only [hsmall, hp] | |
| 55 | + have hρ : 800*e*Θ^5 ≤ 1/2 := by linarith only [hsmall, hp] | |
| 56 | 56 | have hNne : R 2 ≠ 0 := by |
| 57 | 57 | have hh := (abs_le.mp hN).1 |
| 58 | 58 | change -(800*e*Θ^5) ≤ R 2-1 at hh |
+3 −3 Euler/PacketAmplitudeBounds.lean View file
| @@ -56,9 +56,9 @@ theorem primaryAmplitude_profile_bound (r w : ℝ → Space) | ||
| 56 | 56 | have hl : s₀*A*idealPrimarySize σ Z T ≤ 4*δ*hchild := by |
| 57 | 57 | have hb := mul_le_mul_of_nonneg_left hlower hA |
| 58 | 58 | rw [hid] at hb |
| 59 | - nlinarith only [hb] | |
| 59 | + linarith only [hb] | |
| 60 | 60 | intro τ hτ |
| 61 | - have hroot : 1 ≤ sqrt (1+(σ^2*τ^2)^2) := one_le_sqrt.mpr (by nlinarith [sq_nonneg (σ^2*τ^2)]) | |
| 61 | + have hroot : 1 ≤ sqrt (1+(σ^2*τ^2)^2) := one_le_sqrt.mpr (by linarith [sq_nonneg (σ^2*τ^2)]) | |
| 62 | 62 | have hz : Z τ ≤ idealPrimarySize σ Z τ := by |
| 63 | 63 | have hb := mul_le_mul_of_nonneg_right hroot (hZpos τ hτ.1).le |
| 64 | 64 | simpa only [one_mul, idealPrimarySize] using hb |
| @@ -68,6 +68,6 @@ theorem primaryAmplitude_profile_bound (r w : ℝ → Space) | ||
| 68 | 68 | have h2 := mul_le_mul_of_nonneg_left hl (show 0 ≤ 2*exp (6:ℝ) by positivity) |
| 69 | 69 | apply (le_div_iff₀ hs₀).mpr |
| 70 | 70 | change A*Z τ*s₀ ≤ 8*exp 6*δ*hchild |
| 71 | - nlinarith only [h1, h2] | |
| 71 | + linarith only [h1, h2] | |
| 72 | 72 | |
| 73 | 73 | end EulerPacketMovingFrame |
+3 −3 Euler/PacketBeforeTargetSize.lean View file
| @@ -44,7 +44,7 @@ theorem physical_ideal_size_comparison_order40 (m v r w : ℝ → Space) | ||
| 44 | 44 | rw [abs_mul, abs_mul, abs_of_nonneg (sq_nonneg σ), abs_of_nonneg hτ0] |
| 45 | 45 | norm_num only [abs_neg, abs_of_nonneg (by norm_num : (0:ℝ) ≤ 2)] |
| 46 | 46 | have hh := mul_le_mul_of_nonneg_right hσ2 hτ0 |
| 47 | - nlinarith only [hh, hτΘ, sq_nonneg (Θ-1), hΘ] | |
| 47 | + linarith only [hh, hτΘ, sq_nonneg (Θ-1), hΘ] | |
| 48 | 48 | have hzpos := equation30_global_positive hσ hσsmall hZ hfluxZ hZ0 hZ₁0 τ hτ0 |
| 49 | 49 | have hslope := equation30_primary_logderivative_bound hσ hσsmall hZ hfluxZ hZ0 hZ₁0 τ hτ |
| 50 | 50 | have hr₀ : |-Z₁ τ/Z τ| ≤ 4 := by simpa only [neg_div, abs_neg] using hslope |
| @@ -52,7 +52,7 @@ theorem physical_ideal_size_comparison_order40 (m v r w : ℝ → Space) | ||
| 52 | 52 | ≤ 10*(K*e*Θ^29) := by simpa only [neg_div, sub_neg_eq_add] using hratio |
| 53 | 53 | obtain ⟨hl, hu⟩ := physical_size_comparison_order40 m v r w hs₀ hε hm hv hmv hrw |
| 54 | 54 | hΘ hK he hεe hsmall hP₀ hQ₀ hr₀ hzpos hP hQ hN hVrel hr' |
| 55 | - constructor <;> dsimp only [idealPrimarySize] <;> nlinarith only [hl, hu] | |
| 55 | + constructor <;> dsimp only [idealPrimarySize] <;> linarith only [hl, hu] | |
| 56 | 56 | |
| 57 | 57 | /-- Every controlled neighboring primary before target is bounded by a |
| 58 | 58 | fixed multiple of the center's actual target size. All comparisons use |
| @@ -97,6 +97,6 @@ theorem physical_before_target_size_bound {α : Type*} (center : α) | ||
| 97 | 97 | have hideal := equation30_ideal_size_comparison hσ hσsmall hZ hfluxZ hZ0 hZ₁0 |
| 98 | 98 | (by linarith only [hτ.1] : 0 ≤ τ) hτ.2 |
| 99 | 99 | have hh := mul_le_mul_of_nonneg_left hideal hs₀.le |
| 100 | - nlinarith only [htarget, hcurrent, hh] | |
| 100 | + linarith only [htarget, hcurrent, hh] | |
| 101 | 101 | |
| 102 | 102 | end EulerPacketMovingFrame |
+6 −6 Euler/PacketChildLowBounds.lean View file
| @@ -204,16 +204,16 @@ theorem exactPacket_whole_horizon_low_bounds | ||
| 204 | 204 | · obtain ⟨hv,hp,hq⟩ := E.exactPacket_good_low_bounds m hm J support hSupport B residual k hk |
| 205 | 205 | G hball hs hδ hδ1 ev ep CM CH Kupper herr t ht x (hCM t x) (hCH t x) (hupper t x) |
| 206 | 206 | refine ⟨hv.trans ?_,hp.trans ?_,fun z => (hq z).trans ?_⟩ |
| 207 | - · nlinarith only [mul_nonneg hchild hbad] | |
| 208 | - · nlinarith only [mul_nonneg (mul_nonneg hCM0 hchild) hbad] | |
| 207 | + · linarith only [mul_nonneg hchild hbad] | |
| 208 | + · linarith only [mul_nonneg (mul_nonneg hCM0 hchild) hbad] | |
| 209 | 209 | · apply mul_le_mul_of_nonneg_right _ (sq_nonneg _) |
| 210 | - nlinarith only [mul_nonneg (mul_nonneg hCM0 hchild) hbad] | |
| 210 | + linarith only [mul_nonneg (mul_nonneg hCM0 hchild) hbad] | |
| 211 | 211 | · obtain ⟨hv,hp,hq⟩ := E.exactPacket_bad_low_bounds m hm J support hSupport B residual k hk |
| 212 | 212 | G hball hs hδ hδ1 ev ep CM CH Kupper herr t (le_of_not_ge ht) x (hCM t x) (hCH t x) (hupper t x) |
| 213 | 213 | refine ⟨hv.trans ?_,hp.trans ?_,fun z => (hq z).trans ?_⟩ |
| 214 | - · nlinarith only [mul_nonneg hchild hgood] | |
| 215 | - · nlinarith only [mul_nonneg (mul_nonneg hCM0 hchild) hgood] | |
| 214 | + · linarith only [mul_nonneg hchild hgood] | |
| 215 | + · linarith only [mul_nonneg (mul_nonneg hCM0 hchild) hgood] | |
| 216 | 216 | · apply mul_le_mul_of_nonneg_right _ (sq_nonneg _) |
| 217 | - nlinarith only [mul_nonneg (mul_nonneg (mul_nonneg hCM0 hchild) G.delta_nonneg) hgood] | |
| 217 | + linarith only [mul_nonneg (mul_nonneg (mul_nonneg hCM0 hchild) G.delta_nonneg) hgood] | |
| 218 | 218 | |
| 219 | 219 | end EulerParentPacketFrames.Evolution |
+2 −2 Euler/PacketCofactorGevrey.lean View file
| @@ -34,7 +34,7 @@ theorem adjugate_bound (F : P → EndSpace) (hF : ContDiff ℝ ∞ F) | ||
| 34 | 34 | (fun k => by simpa only [abs_norm] using hFb k x) n |
| 35 | 35 | have hs : (∑ i ∈ Finset.range (n+1), (n.choose i : ℝ)* |
| 36 | 36 | ‖iteratedFDeriv ℝ i F x‖*‖iteratedFDeriv ℝ (n-i) F x‖) ≤ |
| 37 | - (3*C*C)*majorant R 0 n := (le_abs_self _).trans (by simpa only [zero_add] using hp) | |
| 37 | + (3*C*C)*majorant R 0 n := (le_abs_self _).trans (by simpa only using hp) | |
| 38 | 38 | calc |
| 39 | 39 | _ ≤ ‖cofactorBilinear‖*(∑ i ∈ Finset.range (n+1), (n.choose i : ℝ)* |
| 40 | 40 | ‖iteratedFDeriv ℝ i F x‖*‖iteratedFDeriv ℝ (n-i) F x‖) := |
| @@ -110,7 +110,7 @@ theorem curvature_bound (F F₂ H : P → EndSpace) | ||
| 110 | 110 | rw [recovered_curvature_eq F F₂ H hdet h₂] |
| 111 | 111 | have h := neg_bound (fun y => (F₂ y).comp (adjugate (F y))) R (3*C₂*(9*C^2)) 0 |
| 112 | 112 | (fun n x => by |
| 113 | - simpa only [zero_add] using clm_comp_bound F₂ (fun y => adjugate (F y)) | |
| 113 | + simpa only using clm_comp_bound F₂ (fun y => adjugate (F y)) | |
| 114 | 114 | hF₂ (adjugate_contDiff F hF) R C₂ (9*C^2) hR hC₂ (by positivity) 0 0 hF₂b |
| 115 | 115 | (adjugate_bound F hF R C hR hC hFb) n x) n x |
| 116 | 116 | exact h.trans_eq (by ring) |
+2 −2 Euler/PacketCofactorOperator.lean View file
| @@ -96,7 +96,7 @@ theorem cofactorValue_norm (A B : EndSpace) : ‖cofactorValue A B‖ ≤ 3*‖A | ||
| 96 | 96 | ‖rowOperator 0 (crossOperator (A (basis 1)) (B (basis 2)))‖+ |
| 97 | 97 | ‖rowOperator 1 (crossOperator (A (basis 2)) (B (basis 0)))‖+ |
| 98 | 98 | ‖rowOperator 2 (crossOperator (A (basis 0)) (B (basis 1)))‖ := norm_add₃_le |
| 99 | - _ ≤ 3*‖A‖*‖B‖ := by nlinarith [h 0 1 2,h 1 2 0,h 2 0 1] | |
| 99 | + _ ≤ 3*‖A‖*‖B‖ := by linarith [h 0 1 2,h 1 2 0,h 2 0 1] | |
| 100 | 100 | |
| 101 | 101 | def cofactorBilinear : EndSpace →L[ℝ] EndSpace →L[ℝ] EndSpace := |
| 102 | 102 | cofactorLinear.mkContinuous₂ 3 cofactorValue_norm |
| @@ -118,7 +118,7 @@ theorem operatorMatrix_adjugate (A : EndSpace) : | ||
| 118 | 118 | fin_cases i <;> fin_cases j <;> |
| 119 | 119 | simp [operatorMatrix,adjugate,cofactorValue,rowOperator_apply, |
| 120 | 120 | crossLeft_apply,cross,basis,EuclideanSpace.inner_single_right, |
| 121 | - cross_apply,Matrix.adjugate_fin_three,Matrix.cons_val_two] <;> ring | |
| 121 | + cross_apply,Matrix.adjugate_fin_three] <;> ring | |
| 122 | 122 | |
| 123 | 123 | theorem operatorMatrix_injective : Function.Injective operatorMatrix := by |
| 124 | 124 | intro A B h |
+1 −1 Euler/PacketCommonScaleChoice.lean View file
| @@ -45,7 +45,7 @@ theorem exists_common_guards {ι : Type*} [Fintype ι] (s : ι → CostSpec) | ||
| 45 | 45 | have hδK : 1000000*K*δ ≤ 1 := by |
| 46 | 46 | have hh : δ ≤ 1/(1000000*K) := (min_le_right _ _).trans (min_le_right _ _) |
| 47 | 47 | have hm := (le_div_iff₀ (show 0 < 1000000*K by positivity)).mp hh |
| 48 | - nlinarith only [hm] | |
| 48 | + linarith only [hm] | |
| 49 | 49 | obtain ⟨Y,hY,hbounds⟩ := hchoice (δ/96) (by positivity) |
| 50 | 50 | obtain ⟨Z,hZ⟩ := eventually_atTop.mp |
| 51 | 51 | ((baseErrorCost_tendsto_zero J D (by omega) hD C hC1).eventually_le_const |
+2 −2 Euler/PacketControlledPropagator.lean View file
| @@ -50,7 +50,7 @@ theorem controlled_velocity_propagator_within | ||
| 50 | 50 | have hΘ0 : 0 ≤ Θ := by linarith only [hΘ] |
| 51 | 51 | have hgeom : 10000*e*Θ^5 ≤ 1 := by |
| 52 | 52 | have hh := mul_le_mul_of_nonneg_left (pow_le_pow_right₀ hΘ (by decide : 5 ≤ 21)) he |
| 53 | - nlinarith only [hsmall, hh, mul_nonneg he (pow_nonneg hΘ0 21)] | |
| 53 | + linarith only [hsmall, hh, mul_nonneg he (pow_nonneg hΘ0 21)] | |
| 54 | 54 | have hcontrol := ray_controlled_velocity_error_within (sq_nonneg σ) hσ2 hΘ hT0 hT |
| 55 | 55 | he hε hεe hgeom hRc hP hQ hN hRclose hAclose hCclose hrayInitial |
| 56 | 56 | have hPc : ContinuousOn P (Icc 0 T) := fun t ht => (hP t ht).continuousWithinAt |
| @@ -62,7 +62,7 @@ theorem controlled_velocity_propagator_within | ||
| 62 | 62 | intro t ht |
| 63 | 63 | linarith only [(hcontrol t ht).1.2] |
| 64 | 64 | obtain ⟨hU₁c, hV₁c⟩ := continuousOn_velocity_rhs (ε := ε) hAc hCc hPc hQc hNc hUc hVc hNne |
| 65 | - have hs : 40*(200000*e)*Θ^21 ≤ 1 := by nlinarith only [hsmall] | |
| 65 | + have hs : 40*(200000*e)*Θ^21 ≤ 1 := by linarith only [hsmall] | |
| 66 | 66 | have hprop := velocity_propagator_bound_within hσ hσsmall hΘ hT0 hT |
| 67 | 67 | (show 0 ≤ 200000*e by positivity) hs (fun t _ => hF t) (fun t _ => hG t) |
| 68 | 68 | (fun t _ => hfluxF t) (fun t _ => hfluxG t) hF0 hF₁0 hG₁0 hU hV hU₁c hV₁c |
+3 −3 Euler/PacketCoordinateResidual.lean View file
| @@ -68,7 +68,7 @@ theorem normalized_pressure (k : ℝ) (p : ScalarField) (z : Domain) : | ||
| 68 | 68 | k • ((pressureJet p z).2 angleDirection • (rawInverse D z).adjoint D.m₀)) = |
| 69 | 69 | rawInverse D z ((rawInverse D z).adjoint |
| 70 | 70 | (k • pressureGradient p z + k^2 • ((pressureJet p z).2 angleDirection • D.m₀))) |
| 71 | - simp only [map_add,map_smul,smul_add,smul_smul,pow_two] | |
| 71 | + simp only [map_add,map_smul,smul_add,pow_two] | |
| 72 | 72 | module |
| 73 | 73 | |
| 74 | 74 | section Fields |
| @@ -90,7 +90,7 @@ theorem normalized_linear (k : ℝ) (hW : TimeDerivative D.T_pos.le G Gt) | ||
| 90 | 90 | D.strain (t,(x,θ)) (W (t,(x,θ)))) = _ |
| 91 | 91 | rw [G.slicedJet_temporal D.T_pos Gt hW,coordinateTime_formula] |
| 92 | 92 | simp only [rawInverse,rawLinear,rawFrameTime,coordinate,Data.strain,Data.clamp_coe, |
| 93 | - smul_apply,comp_apply,map_smul,hf,map_add,smul_add,smul_smul,smul_sub] | |
| 93 | + smul_apply,comp_apply,map_smul,hf,map_add,smul_smul,smul_sub] | |
| 94 | 94 | module |
| 95 | 95 | |
| 96 | 96 | include G in |
| @@ -157,7 +157,7 @@ theorem normalized_residual (k : ℝ) (hk : k ≠ 0) (hW : TimeDerivative D.T_po | ||
| 157 | 157 | have hl := normalized_linear D G Gt k hW t x θ |
| 158 | 158 | have hn := normalized_nonlinear D G k hk t x θ |
| 159 | 159 | have hp := normalized_pressure D k p (t,(x,θ)) |
| 160 | - simp only [map_add,smul_add] at hl hn hp | |
| 160 | + simp only [map_add] at hl hn hp | |
| 161 | 161 | simp only [slicedMomentumResidual,inv_inv,map_add,smul_add] |
| 162 | 162 | rw [hl] |
| 163 | 163 | linear_combination (norm := module) hn + hp |
+1 −1 Euler/PacketCorrectionCoefficientBudget.lean View file
| @@ -70,7 +70,7 @@ private theorem series_radius_small (ρ Rc M B : ℝ) (hρ : 0 ≤ ρ) (hB : 0 | ||
| 70 | 70 | have hp : 0 ≤ ρ*Rc := mul_nonneg hρ hR |
| 71 | 71 | have hm := mul_le_mul_of_nonneg_right hM hp |
| 72 | 72 | have hb := mul_le_mul_of_nonneg_left hBR hρ |
| 73 | - nlinarith | |
| 73 | + linarith | |
| 74 | 74 | |
| 75 | 75 | variable (D : EulerTransversePacketProvider.Data U) (P : ℝ) [Fact (0 < P)] |
| 76 | 76 | (R C0 C1 CI : ℝ) (hR : 0 ≤ R) (hC0 : 0 ≤ C0) (hC1 : 0 ≤ C1) (hCI : 0 ≤ CI) |
+1 −1 Euler/PacketCorrectionOutputPolynomial.lean View file
| @@ -94,7 +94,7 @@ theorem correction_output_bound (R H C X : ℝ) (hR : 0 ≤ R) (hH : 0 ≤ H) (h | ||
| 94 | 94 | simp only [initialRadius,one_div,inv_inv] |
| 95 | 95 | unfold inverseRadiusEnvelope |
| 96 | 96 | have hp := mul_le_mul hM hRc Kc.Rc_nonneg hX |
| 97 | - nlinarith | |
| 97 | + linarith | |
| 98 | 98 | have hiX : 0 ≤ inverseRadiusEnvelope X := by unfold inverseRadiusEnvelope; positivity |
| 99 | 99 | have hder : 12*velocity R H C*(4*R) ≤ 48*velocity X X X*X := by |
| 100 | 100 | calc |
+1 −1 Euler/PacketCorrectionPrimitiveBounds.lean View file
| @@ -42,7 +42,7 @@ theorem correction_envelopes (c R C0 C1 CI X : ℝ) | ||
| 42 | 42 | have hr : sobolevCoefficientRadius (Fin 4) (4*R) ≤ 64*X := by |
| 43 | 43 | simp only [sobolevCoefficientRadius,Fintype.card_fin,Nat.cast_ofNat, |
| 44 | 44 | max_eq_right (by norm_num : (1 : ℝ) ≤ 4)] |
| 45 | - nlinarith | |
| 45 | + linarith | |
| 46 | 46 | have hr0 : 0 ≤ sobolevCoefficientRadius (Fin 4) (4*R) := |
| 47 | 47 | sobolevCoefficientRadius_nonneg (4*R) (by positivity) |
| 48 | 48 | have hn : normalizedCoefficientRadius 6 (4*R) (3*CI*CI) ≤ |
+6 −6 Euler/PacketCorrectionScalar.lean View file
| @@ -31,12 +31,12 @@ theorem initialRadius_bounds (R M Rc : ℝ) (hR : 0 ≤ R) (hM : 0 ≤ M) (hRc : | ||
| 31 | 31 | unfold initialRadius |
| 32 | 32 | refine ⟨one_div_pos.mpr hd, ?_, ?_, ?_⟩ |
| 33 | 33 | · rw [div_mul_eq_mul_div,one_mul,div_le_iff₀ hd] |
| 34 | - nlinarith | |
| 34 | + linarith | |
| 35 | 35 | · rw [show 4*M*(1/(1+8*R+4*M*Rc+Rc)*Rc) = |
| 36 | 36 | (4*M*Rc)/(1+8*R+4*M*Rc+Rc) by ring, div_le_iff₀ hd] |
| 37 | - nlinarith | |
| 37 | + linarith | |
| 38 | 38 | · rw [div_mul_eq_mul_div,one_mul,div_le_iff₀ hd] |
| 39 | - nlinarith | |
| 39 | + linarith | |
| 40 | 40 | |
| 41 | 41 | /-- The actual residual envelope wins over the Gronwall factor with an |
| 42 | 42 | explicit linear bound on the source growth cost. -/ |
| @@ -50,11 +50,11 @@ theorem residual_small (C T k X : ℝ) (hX : 64 ≤ X) (hk : 1 ≤ Real.log k) | ||
| 50 | 50 | (Real.log_le_sub_one_of_pos (by norm_num : (0 : ℝ) < 8)).trans (by linarith) |
| 51 | 51 | have hxlog : X ≤ X*Real.log k := le_mul_of_one_le_right hX0 hk |
| 52 | 52 | have he : Real.log 8 + (-(7/10)*X*Real.log k+3*C*T) ≤ -Real.sqrt X := by |
| 53 | - nlinarith only [hX0,hs,hl,hxlog,hgrowth] | |
| 53 | + linarith only [hX0,hs,hl,hxlog,hgrowth] | |
| 54 | 54 | have hh := Real.exp_le_exp.mpr he |
| 55 | 55 | rw [Real.exp_add,Real.exp_log (by norm_num : (0 : ℝ) < 8),Real.exp_add] at hh |
| 56 | 56 | unfold residual delta |
| 57 | - nlinarith only [hh] | |
| 57 | + linarith only [hh] | |
| 58 | 58 | |
| 59 | 59 | /-- The two elementary frequency guards control the radius loss caused |
| 60 | 60 | by the actual O(1/k) drift and the chosen error target. -/ |
| @@ -69,7 +69,7 @@ theorem radius_decay (C T D ρ0 k X : ℝ) (hk : 0 < k) | ||
| 69 | 69 | have he : 8*C*T*delta X ≤ ρ0 := by |
| 70 | 70 | rw [delta,Real.exp_neg,← div_eq_mul_inv] |
| 71 | 71 | exact (div_le_iff₀ (Real.exp_pos _)).mpr herror |
| 72 | - nlinarith only [hf,he] | |
| 72 | + linarith only [hf,he] | |
| 73 | 73 | |
| 74 | 74 | def radius (T C D ρ0 k X : ℝ) : C(Icc (0 : ℝ) T,ℝ) := |
| 75 | 75 | ⟨fun t => ρ0-2*C*(D/k+delta X)*t.val, |
+3 −3 Euler/PacketEarlyPhysical.lean View file
| @@ -102,12 +102,12 @@ theorem early_physical_size_suppression {α : Type*} (center : α) | ||
| 102 | 102 | have hP₀ : |σ^2*τ^2| ≤ Θ^2 := by |
| 103 | 103 | rw [abs_of_nonneg (by positivity : 0 ≤ σ^2*τ^2)] |
| 104 | 104 | have hh := mul_le_mul hσ2 hτ2 (sq_nonneg τ) (by norm_num : (0:ℝ) ≤ 1) |
| 105 | - nlinarith only [hh, hΘ2] | |
| 105 | + linarith only [hh, hΘ2] | |
| 106 | 106 | have hQ₀ : |-2*σ^2*τ| ≤ 2*Θ^2 := by |
| 107 | 107 | rw [abs_mul, abs_mul, abs_of_nonneg (sq_nonneg σ), abs_of_nonneg hτ.1] |
| 108 | 108 | norm_num only [abs_neg, abs_of_nonneg (by norm_num : (0:ℝ) ≤ 2)] |
| 109 | 109 | have hh := mul_le_mul hσ2 hτ.2 hτ.1 (by norm_num : (0:ℝ) ≤ 1) |
| 110 | - nlinarith only [hh, hΘ2] | |
| 110 | + linarith only [hh, hΘ2] | |
| 111 | 111 | have hupper := physical_size_le_scaled_state m v (r ξ) (w ξ) hs₀ hε hε1 |
| 112 | 112 | (hm τ hτT) (hv τ hτT) (hmv τ hτT) (hrw ξ τ hτT) hΘ hρ0 hρ hP₀ hQ₀ |
| 113 | 113 | (hP ξ τ hτT) (hQ ξ τ hτT) (hN ξ τ hτT) |
| @@ -116,6 +116,6 @@ theorem early_physical_size_suppression {α : Type*} (center : α) | ||
| 116 | 116 | have ht := mul_le_mul_of_nonneg_left htarget |
| 117 | 117 | (show 0 ≤ 8232*exp 9*Θ^5*exp (-(1/(4*σ))) by positivity) |
| 118 | 118 | apply (div_le_iff₀ htargetpos).mpr |
| 119 | - nlinarith only [hupper, hs, ht] | |
| 119 | + linarith only [hupper, hs, ht] | |
| 120 | 120 | |
| 121 | 121 | end EulerPacketMovingFrame |
+1 −1 Euler/PacketExactGlobalShear.lean View file
| @@ -53,7 +53,7 @@ theorem initializedPrimary_global_bound : | ||
| 53 | 53 | simp only [mul_one] at hb |
| 54 | 54 | have ha : S.H0^2 ≤ 3*S.H0^(2*1) := by |
| 55 | 55 | norm_num only [Nat.mul_one] |
| 56 | - nlinarith [sq_nonneg S.H0] | |
| 56 | + linarith [sq_nonneg S.H0] | |
| 57 | 57 | have hc := (hb.mono_amplitude (zero_le_one.trans L.radius_bounds.1) ha).fixed_velocity_grade |
| 58 | 58 | (n := 1) (zero_le_one.trans L.radius_bounds.1) S.H0_pos.le |
| 59 | 59 | exact (hc.changeTime hTime).of_raw_eq _ |
+1 −1 Euler/PacketFiniteAssemblyBounds.lean View file
| @@ -41,6 +41,6 @@ theorem wordBound_assembleFamily (M : ℕ) (f c : ℕ → VectorField) | ||
| 41 | 41 | have hp : A^(2*n) ≤ A^(2*(n+1)) := pow_le_pow_right₀ hA (by omega) |
| 42 | 42 | have hnext := (hh n).mono_shift hR (pow_nonneg hA0 _) hshift |
| 43 | 43 | have hs := (hg (n+1)).add hnext |
| 44 | - exact hs.mono_amplitude (zero_le_one.trans hR) (by nlinarith) | |
| 44 | + exact hs.mono_amplitude (zero_le_one.trans hR) (by linarith) | |
| 45 | 45 | |
| 46 | 46 | end EulerPacketCylinderField.Field |
+1 −1 Euler/PacketFiniteFrequencyBounds.lean View file
| @@ -29,7 +29,7 @@ theorem remainder_low_high_le (k B C₂ : ℝ) (hk : 0 < k) (hB4 : B^4 ≤ k) : | ||
| 29 | 29 | (k⁻¹)^2*C₂+2*B*(k⁻¹*B)^3 ≤ (C₂+2)/k^2 := by |
| 30 | 30 | have he : (k⁻¹)^2*C₂+2*B*(k⁻¹*B)^3 = (C₂+2*B^4/k)/k^2 := by |
| 31 | 31 | field_simp |
| 32 | - have ht : 2*B^4/k ≤ 2 := (div_le_iff₀ hk).mpr (by nlinarith) | |
| 32 | + have ht : 2*B^4/k ≤ 2 := (div_le_iff₀ hk).mpr (by linarith) | |
| 33 | 33 | rw [he] |
| 34 | 34 | exact div_le_div_of_nonneg_right (by linarith) (sq_nonneg k) |
| 35 | 35 | |
+1 −1 Euler/PacketFiveCostGuards.lean View file
| @@ -72,7 +72,7 @@ theorem five_costs_bound : | ||
| 72 | 72 | simp only [initialRadius,one_div,inv_inv] |
| 73 | 73 | unfold inverseRadiusEnvelope |
| 74 | 74 | have hprod := mul_le_mul hM hRc Kc.Rc_nonneg hX0 |
| 75 | - nlinarith | |
| 75 | + linarith | |
| 76 | 76 | have hp := fiveEnvelope_power P X hX |
| 77 | 77 | obtain ⟨hc₁,hc₂,hc₃,hc₄,hc₅⟩ := fiveEnvelope_components P X hX0 |
| 78 | 78 | refine ⟨?_,hCX.trans (hc₂.trans hp),?_,?_,?_⟩ |
+6 −6 Euler/PacketForwardChildLowBounds.lean View file
| @@ -162,16 +162,16 @@ theorem exactForwardPacket_whole_horizon_low_bounds | ||
| 162 | 162 | · obtain ⟨hv,hp,hq⟩ := E.exactForwardPacket_good_low_bounds m hm J support hSupport B residual k hk |
| 163 | 163 | G hball hδ hδ1 ev ep CM CH Kupper herr t ht x (hCM t x) (hCH t x) (hupper t x) |
| 164 | 164 | refine ⟨hv.trans ?_,hp.trans ?_,fun z => (hq z).trans ?_⟩ |
| 165 | - · nlinarith only [mul_nonneg hchild hbad] | |
| 166 | - · nlinarith only [mul_nonneg (mul_nonneg hCM0 hchild) hbad] | |
| 165 | + · linarith only [mul_nonneg hchild hbad] | |
| 166 | + · linarith only [mul_nonneg (mul_nonneg hCM0 hchild) hbad] | |
| 167 | 167 | · apply mul_le_mul_of_nonneg_right _ (sq_nonneg _) |
| 168 | - nlinarith only [mul_nonneg (mul_nonneg hCM0 hchild) hbad] | |
| 168 | + linarith only [mul_nonneg (mul_nonneg hCM0 hchild) hbad] | |
| 169 | 169 | · obtain ⟨hv,hp,hq⟩ := E.exactForwardPacket_early_low_bounds m hm J support hSupport B residual k hk |
| 170 | 170 | G hball hδ hδ1 ev ep CM CH Kupper herr t (le_of_not_ge ht) x (hCM t x) (hCH t x) (hupper t x) |
| 171 | 171 | refine ⟨hv.trans ?_,hp.trans ?_,fun z => (hq z).trans ?_⟩ |
| 172 | - · nlinarith only [mul_nonneg hchild hgood] | |
| 173 | - · nlinarith only [mul_nonneg (mul_nonneg hCM0 hchild) hgood] | |
| 172 | + · linarith only [mul_nonneg hchild hgood] | |
| 173 | + · linarith only [mul_nonneg (mul_nonneg hCM0 hchild) hgood] | |
| 174 | 174 | · apply mul_le_mul_of_nonneg_right _ (sq_nonneg _) |
| 175 | - nlinarith only [mul_nonneg (mul_nonneg (mul_nonneg hCM0 hchild) G.delta_nonneg) hgood] | |
| 175 | + linarith only [mul_nonneg (mul_nonneg (mul_nonneg hCM0 hchild) G.delta_nonneg) hgood] | |
| 176 | 176 | |
| 177 | 177 | end EulerParentPacketFrames.Evolution |
+1 −1 Euler/PacketForwardGlobalShear.lean View file
| @@ -52,7 +52,7 @@ theorem forwardInitializedPrimary_global_bound : | ||
| 52 | 52 | simp only [mul_one] at hb |
| 53 | 53 | have ha : S.H0^2 ≤ 3*S.H0^(2*1) := by |
| 54 | 54 | norm_num only [Nat.mul_one] |
| 55 | - nlinarith [sq_nonneg S.H0] | |
| 55 | + linarith [sq_nonneg S.H0] | |
| 56 | 56 | have hc := (hb.mono_amplitude (zero_le_one.trans L.radius_one) ha).fixed_velocity_grade |
| 57 | 57 | (n := 1) (zero_le_one.trans L.radius_one) S.H0_pos.le |
| 58 | 58 | exact (hc.changeTime hTime).of_raw_eq _ |
+2 −2 Euler/PacketForwardOutputCosts.lean View file
| @@ -66,14 +66,14 @@ theorem forward_output_costs (W H0 : ℝ) (hδ : 0 < δ) | ||
| 66 | 66 | have hm : Kc.M ≤ Z := hK.pressure |
| 67 | 67 | have hr : Kc.Rc ≤ Z := hK.radius |
| 68 | 68 | have hp := mul_le_mul hm hr Kc.Rc_nonneg hZ |
| 69 | - nlinarith only [hp,hRZ,hr] | |
| 69 | + linarith only [hp,hRZ,hr] | |
| 70 | 70 | have hρinv : ρ⁻¹ ≤ 4*inverseRadiusEnvelope Z := by |
| 71 | 71 | change (initialRadius R Kc.M Kc.Rc/4)⁻¹ ≤ _ |
| 72 | 72 | rw [inv_div,div_eq_mul_inv] |
| 73 | 73 | gcongr |
| 74 | 74 | have hiZ : 0 ≤ inverseRadiusEnvelope Z := by unfold inverseRadiusEnvelope; positivity |
| 75 | 75 | have hrf : physicalInputRadius (4*R) (4*R) ρ ≤ radiusEnvelope Z := by |
| 76 | - simp only [physicalInputRadius,max_self,liftedInputRadius] | |
| 76 | + simp only [physicalInputRadius,max_self] | |
| 77 | 77 | change 1+coordinateCost*(4*R+ρ⁻¹) ≤ 1+coordinateCost*(4*Z+4*inverseRadiusEnvelope Z) |
| 78 | 78 | have hc : 0 ≤ coordinateCost := norm_nonneg _ |
| 79 | 79 | gcongr |
+1 −1 Euler/PacketForwardPressureBudgets.lean View file
| @@ -166,7 +166,7 @@ theorem forwardInitializedPressureBudget_exists (p : ℕ) : | ||
| 166 | 166 | intro n |
| 167 | 167 | have hh := initialData_common_radius D δ hδ (α • ξ) hs standardDirection |
| 168 | 168 | (fun i => by cases i using Fin.cases <;> simp [Prod.norm_def]) 6 hδ1 L.R hR n |
| 169 | - simpa only [norm_smul,Real.norm_eq_abs,abs_of_pos hα,mul_assoc,mul_left_comm,mul_comm] using hh | |
| 169 | + simpa only [norm_smul,Real.norm_eq_abs,abs_of_pos hα,mul_assoc,mul_comm] using hh | |
| 170 | 170 | have hb := (L.primary_scalar_and_angular_grade_bound NB _ WP |
| 171 | 171 | (initialData D δ hδ (α • ξ) hs) α hα hYb).2 |
| 172 | 172 | have hb' := hb.normalized_changeTime D.T_pos.le (α • L.g) |
+1 −1 Euler/PacketForwardPressureRemainder.lean View file
| @@ -122,7 +122,7 @@ theorem forwardInitializedAngularPressure_bound : | ||
| 122 | 122 | simp only [mul_one] at hb |
| 123 | 123 | have ha : S.H0^2 ≤ 3*S.H0^(2*1) := by |
| 124 | 124 | norm_num only [Nat.mul_one] |
| 125 | - nlinarith [sq_nonneg S.H0] | |
| 125 | + linarith [sq_nonneg S.H0] | |
| 126 | 126 | have hc := (hb.mono_amplitude (zero_le_one.trans L.radius_one) ha).fixed_velocity_grade |
| 127 | 127 | (n := 1) (zero_le_one.trans L.radius_one) S.H0_pos.le |
| 128 | 128 | exact (hc.changeTime hTime).of_raw_eq _ |
+2 −2 Euler/PacketForwardPrimaryBounds.lean View file
| @@ -89,7 +89,7 @@ theorem forwardPrimary_profile_budget (O : Operators) (hcorrector : O.curlCorrec | ||
| 89 | 89 | apply L.primary_profile_budget N _ W (initialData D δ hδ (α • ξ) hs) α hα _ O hcorrector S hgrowth |
| 90 | 90 | intro n |
| 91 | 91 | have hh := initialData_common_radius D δ hδ (α • ξ) hs standardDirection |
| 92 | - (fun i => by cases i using Fin.cases <;> simp [Prod.norm_def]) 6 hδ1 L.R hR n | |
| 93 | - simpa only [norm_smul,Real.norm_eq_abs,abs_of_pos hα,mul_assoc,mul_left_comm,mul_comm] using hh | |
| 92 | + (fun i => by cases i using Fin.cases <;> simp) 6 hδ1 L.R hR n | |
| 93 | + simpa only [norm_smul,Real.norm_eq_abs,abs_of_pos hα,mul_assoc,mul_comm] using hh | |
| 94 | 94 | |
| 95 | 95 | end EulerPacketTerminalDatum |
+3 −3 Euler/PacketForwardRadiusPolynomial.lean View file
| @@ -55,7 +55,7 @@ theorem source_radius_le (T R C C1 Cp W : ℝ) (hW : 1 ≤ W) | ||
| 55 | 55 | _ ≤ 1+16*V+16*(4*V)+2*forwardEnvelope V*(16*(4*V)+1) := by gcongr |
| 56 | 56 | _ ≤ sourceRadiusEnvelope W := by |
| 57 | 57 | change _ ≤ 1+V+6*weakEnvelope V*(16*V+1)+64*V+2*forwardEnvelope V*(64*V+1) |
| 58 | - nlinarith only [hV0,mul_nonneg (sub_nonneg.mpr hw1) (by positivity : 0 ≤ 16*V+1)] | |
| 58 | + linarith only [hV0,mul_nonneg (sub_nonneg.mpr hw1) (by positivity : 0 ≤ 16*V+1)] | |
| 59 | 59 | |
| 60 | 60 | variable {U : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [CompleteSpace U] |
| 61 | 61 | {D : Data U} (L : EulerTransversePacketForward.Budget D (Fin 4) 6) |
| @@ -78,7 +78,7 @@ theorem common_le (W : ℝ) (hW : 0 ≤ W) (hR : L.Rc ≤ W) | ||
| 78 | 78 | _ ≤ 3*coeff W W+physicalEnvelope W := add_le_add (by gcongr) hp |
| 79 | 79 | _ ≤ commonEnvelope W := by |
| 80 | 80 | unfold commonEnvelope |
| 81 | - nlinarith only [ha,mul_nonneg ha (by positivity : 0 ≤ 2*W+2)] | |
| 81 | + linarith only [ha,mul_nonneg ha (by positivity : 0 ≤ 2*W+2)] | |
| 82 | 82 | |
| 83 | 83 | theorem grade_sum_le (N : EulerTransversePacketJoin.NormalBudget D 6 L.R) |
| 84 | 84 | (W : ℝ) (hW : 0 ≤ W) (hNR : N.Rc ≤ W) (hNC : N.C ≤ W) (hNI : N.Ri ≤ W) |
| @@ -183,6 +183,6 @@ theorem canonicalRadius_le_envelope (W : ℝ) (hδ : 0 < δ) | ||
| 183 | 183 | rw [coefficientRadius_eq] |
| 184 | 184 | have hb : 16*BC.Rc ≤ 16*W := by gcongr; exact H.coefficient_radius |
| 185 | 185 | unfold radiusEnvelope |
| 186 | - nlinarith only [H.original_mean,H.original_forward,H.coefficient_cost,hb,hm,hg1,hgT,hextra,hreq,hjW] | |
| 186 | + linarith only [H.original_mean,H.original_forward,H.coefficient_cost,hb,hm,hg1,hgT,hextra,hreq,hjW] | |
| 187 | 187 | |
| 188 | 188 | end EulerPacketForwardRadius |
+2 −2 Euler/PacketForwardScalarPressureGrade.lean View file
| @@ -49,7 +49,7 @@ theorem scalar_grade_bound_pred (C : ℝ) (W : GradeGuards (P := P) L N C) | ||
| 49 | 49 | 6 L.R ((L.pressureAmplitude (P := P) N*C)*c) (d+1) := by |
| 50 | 50 | apply scalarEmbeddingField_normalized_bound _ _ _ _ D.T_pos.le L.g L.positive |
| 51 | 51 | intro n |
| 52 | - simpa only [mul_assoc,mul_left_comm,mul_comm] using | |
| 52 | + simpa only [mul_assoc,mul_left_comm] using | |
| 53 | 53 | L.pressure_bound N G I (c*C) (mul_nonneg hc.le W.data_nonneg) d hforce hinitial n |
| 54 | 54 | have hnonneg := mul_nonneg (L.pressureAmplitude_nonneg (P := P) N) W.data_nonneg |
| 55 | 55 | have hcost : L.pressureAmplitude (P := P) N*C ≤ L.R := by |
| @@ -70,7 +70,7 @@ theorem angular_grade_bound (C : ℝ) (W : GradeGuards (P := P) L N C) | ||
| 70 | 70 | (c • L.g) (smul_profile_pos L.g L.positive c hc) |
| 71 | 71 | D.m₀ D.m₀_unit.le (zero_le_one.trans L.radius_one) zero_le_one |
| 72 | 72 | (L.scalar_grade_bound_pred N C W G I c hc d e hroom hforce hinitial) |
| 73 | - simpa only [angularField,Field.WordBound,Field.normalized_path, | |
| 73 | + simpa only [angularField,Field.normalized_path, | |
| 74 | 74 | show e-1+1=e by omega] using hh |
| 75 | 75 | |
| 76 | 76 | theorem scalar_grade_bound (C : ℝ) (W : GradeGuards (P := P) L N C) |
+1 −1 Euler/PacketFrameCoefficients.lean View file
| @@ -117,7 +117,7 @@ theorem frameMatrixRate_abs_le (B B₁ : Space →L[ℝ] Space) (p q : Space) | ||
| 117 | 117 | have h5 := abs_add_le ⟪frameRate B p q i,B (frame p q j)⟫_ℝ |
| 118 | 118 | ⟪frame p q i,B₁ (frame p q j)+B (frameRate B p q j)⟫_ℝ |
| 119 | 119 | unfold frameMatrixRate |
| 120 | - nlinarith only [h1, h2, h3, h4, h5, hB₁j, hBr] | |
| 120 | + linarith only [h1, h2, h3, h4, h5, hB₁j, hBr] | |
| 121 | 121 | |
| 122 | 122 | def primaryShear (c : ℝ) (m v : ℝ → Space) (t : ℝ) : ℝ := c*(‖m t‖*‖v t‖) |
| 123 | 123 | |
+1 −1 Euler/PacketGeometryAssembly.lean View file
| @@ -200,7 +200,7 @@ theorem PhysicalGeometryData.exists_geometry {α : Type*} (D : PhysicalGeometryD | ||
| 200 | 200 | (hτ.2.trans D.horizon_le_Theta) D.small (fun t _ => hZ t) (fun t _ => hfluxZ t) hZ0 hZ₁pos |
| 201 | 201 | hp.1 hp.2.1 hp.2.2 hv.2.2 (D.action_error ξ (hsub hτ))).2 |
| 202 | 202 | · have hn := add_le_add (D.B_bound _ htframes) (D.E_bound D.center _ htframes) |
| 203 | - exact hcomp.1.trans (by nlinarith only [hn]) | |
| 203 | + exact hcomp.1.trans (by linarith only [hn]) | |
| 204 | 204 | · apply csSup_le |
| 205 | 205 | · exact ⟨D.amplitude*Z 0, 0, ⟨le_rfl, D.horizon_pos.le⟩, rfl⟩ |
| 206 | 206 | · rintro _ ⟨τ, hτ, rfl⟩ |
+13 −13 Euler/PacketGeometryGuards.lean View file
| @@ -34,14 +34,14 @@ theorem target_le_Theta : D.target ≤ D.Θ := D.target_le_horizon.trans D.horiz | ||
| 34 | 34 | |
| 35 | 35 | theorem sigma_Theta : 1 ≤ D.σ*D.Θ := by |
| 36 | 36 | have h := (div_le_iff₀ D.sigma_pos).mp (D.target_from_sigma.trans D.target_le_Theta) |
| 37 | - nlinarith only [h] | |
| 37 | + linarith only [h] | |
| 38 | 38 | |
| 39 | 39 | theorem target_scale : 1 ≤ D.σ^2*D.target^2 := by |
| 40 | 40 | have h : 1 ≤ D.σ*D.target := by |
| 41 | 41 | have hh := (div_le_iff₀ D.sigma_pos).mp D.target_from_sigma |
| 42 | - nlinarith only [hh] | |
| 42 | + linarith only [hh] | |
| 43 | 43 | have hh := mul_le_mul h h (by norm_num : (0:ℝ) ≤ 1) (by positivity : 0 ≤ D.σ*D.target) |
| 44 | - nlinarith only [hh] | |
| 44 | + linarith only [hh] | |
| 45 | 45 | |
| 46 | 46 | theorem time_mem {τ : ℝ} (hτ : τ ∈ Icc 0 D.H) : D.time τ ∈ D.S := |
| 47 | 47 | D.time_maps ⟨hτ.1, hτ.2.trans D.horizon_le_Theta⟩ |
| @@ -56,18 +56,18 @@ theorem error_le_half : D.error ≤ 1/2 := by | ||
| 56 | 56 | have hs := D.small |
| 57 | 57 | change 1000000*neighborStabilityConstant*D.error*D.Θ^40 ≤ 1 at hs |
| 58 | 58 | norm_num only [pow_zero, mul_one] at hp |
| 59 | - nlinarith only [hp, hs] | |
| 59 | + linarith only [hp, hs] | |
| 60 | 60 | |
| 61 | 61 | theorem error_le_one : D.error ≤ 1 := D.error_le_half.trans (by norm_num) |
| 62 | 62 | |
| 63 | 63 | theorem epsilon_le_error : D.ε ≤ D.error := by |
| 64 | - have hg : 1 ≤ (4*D.G)^2 := by nlinarith only [D.G_lower, sq_nonneg (D.G-1)] | |
| 64 | + have hg : 1 ≤ (4*D.G)^2 := by linarith only [D.G_lower, sq_nonneg (D.G-1)] | |
| 65 | 65 | have hc : 1 ≤ D.Θ*(4*D.G)^2 := by |
| 66 | 66 | simpa only [one_mul] using mul_le_mul D.Theta_lower hg |
| 67 | 67 | (by norm_num : (0:ℝ) ≤ 1) D.Theta_pos.le |
| 68 | 68 | have hh := mul_le_mul_of_nonneg_left hc D.epsilon_pos.le |
| 69 | 69 | unfold error |
| 70 | - nlinarith only [hh, D.d_nonneg, D.epsilon_pos] | |
| 70 | + linarith only [hh, D.d_nonneg, D.epsilon_pos] | |
| 71 | 71 | |
| 72 | 72 | theorem epsilon_le_one : D.ε ≤ 1 := D.epsilon_le_error.trans D.error_le_one |
| 73 | 73 | |
| @@ -77,7 +77,7 @@ theorem ray_error_small : 800*D.error*D.Θ^5 ≤ 1/2 := by | ||
| 77 | 77 | (by decide : 5 ≤ 40) |
| 78 | 78 | have hs := D.small |
| 79 | 79 | change 1000000*neighborStabilityConstant*D.error*D.Θ^40 ≤ 1 at hs |
| 80 | - nlinarith only [hp, hs] | |
| 80 | + linarith only [hp, hs] | |
| 81 | 81 | |
| 82 | 82 | theorem relative_error_small : neighborStabilityConstant*D.error*D.Θ^29 ≤ 1/2 := by |
| 83 | 83 | have hK : 0 ≤ neighborStabilityConstant := (by norm_num : (0:ℝ) ≤ 1000000000).trans neighborStabilityConstant_ge |
| @@ -85,7 +85,7 @@ theorem relative_error_small : neighborStabilityConstant*D.error*D.Θ^29 ≤ 1/2 | ||
| 85 | 85 | (mul_nonneg hK D.error_nonneg) |
| 86 | 86 | have hs := D.small |
| 87 | 87 | change 1000000*neighborStabilityConstant*D.error*D.Θ^40 ≤ 1 at hs |
| 88 | - nlinarith only [hp, hs] | |
| 88 | + linarith only [hp, hs] | |
| 89 | 89 | |
| 90 | 90 | theorem scalar_error_small : 4*exp 6*(400000000*D.error*D.Θ^29) ≤ 1 := by |
| 91 | 91 | have hr := D.relative_error_small |
| @@ -96,7 +96,7 @@ theorem scalar_error_small : 4*exp 6*(400000000*D.error*D.Θ^29) ≤ 1 := by | ||
| 96 | 96 | have hs := D.small |
| 97 | 97 | change 1000000*neighborStabilityConstant*D.error*D.Θ^40 ≤ 1 at hs |
| 98 | 98 | unfold neighborStabilityConstant at hp hs hr |
| 99 | - nlinarith only [hp, hs, hr] | |
| 99 | + linarith only [hp, hs, hr] | |
| 100 | 100 | |
| 101 | 101 | theorem propagator_small : 8000000*D.error*D.Θ^21 ≤ 1 := by |
| 102 | 102 | have hp := mul_le_mul_of_nonneg_left (pow_le_pow_right₀ D.Theta_lower (by decide : 21 ≤ 40)) D.error_nonneg |
| @@ -104,7 +104,7 @@ theorem propagator_small : 8000000*D.error*D.Θ^21 ≤ 1 := by | ||
| 104 | 104 | have hmul := mul_nonneg hk (mul_nonneg D.error_nonneg (pow_nonneg D.Theta_pos.le 40)) |
| 105 | 105 | have hs := D.small |
| 106 | 106 | change 1000000*neighborStabilityConstant*D.error*D.Θ^40 ≤ 1 at hs |
| 107 | - nlinarith only [hp, hmul, hs] | |
| 107 | + linarith only [hp, hmul, hs] | |
| 108 | 108 | |
| 109 | 109 | theorem action_error (ξ : α) {τ : ℝ} (hτ : τ ∈ Icc 0 D.H) : |
| 110 | 110 | ∀ i j, |scaledAction (D.M ξ (D.time τ)) D.m D.v D.a D.ε (D.time τ) i j- |
| @@ -126,7 +126,7 @@ theorem target_shear_lower : D.a/(2*D.ε^2) ≤ D.targetShear := by | ||
| 126 | 126 | linarith only [hb, D.error_le_half] |
| 127 | 127 | have hmul := (le_div_iff₀ D.a_pos).mp hratio |
| 128 | 128 | apply (div_le_iff₀ (show 0 < 2*D.ε^2 by positivity [D.epsilon_pos])).mpr |
| 129 | - nlinarith only [hmul] | |
| 129 | + linarith only [hmul] | |
| 130 | 130 | |
| 131 | 131 | theorem target_shear_pos : 0 < D.targetShear := |
| 132 | 132 | lt_of_lt_of_le (by positivity [D.a_pos, D.epsilon_pos]) D.target_shear_lower |
| @@ -140,11 +140,11 @@ theorem compression_domination : | ||
| 140 | 140 | field_simp [ne_of_gt D.epsilon_pos] |
| 141 | 141 | rw [heq] at hlower |
| 142 | 142 | have hsmall : 30*(D.G+D.d)*D.target < D.a/(2*D.ε) := |
| 143 | - (lt_div_iff₀ (show 0 < 2*D.ε by positivity [D.epsilon_pos])).mpr (by nlinarith only [hguard]) | |
| 143 | + (lt_div_iff₀ (show 0 < 2*D.ε by positivity [D.epsilon_pos])).mpr (by linarith only [hguard]) | |
| 144 | 144 | have hnorm := add_le_add (D.B_bound _ D.target_time_mem) (D.E_bound D.center _ D.target_time_mem) |
| 145 | 145 | have hm := mul_le_mul_of_nonneg_right hnorm (show 0 ≤ 30*D.target by positivity [D.target_pos]) |
| 146 | 146 | have hfirst : 30*(‖D.B D.targetTime‖+‖D.E D.center D.targetTime‖)*D.target ≤ |
| 147 | - 30*(D.G+D.d)*D.target := by nlinarith only [hm] | |
| 147 | + 30*(D.G+D.d)*D.target := by linarith only [hm] | |
| 148 | 148 | exact hfirst.trans_lt (hsmall.trans_le hlower) |
| 149 | 149 | |
| 150 | 150 | end EulerPacketMovingFrame.PhysicalGeometryData |
+1 −1 Euler/PacketGeometryInitialAmplitude.lean View file
| @@ -30,7 +30,7 @@ theorem horizon_le_cost (H ε : ℝ) (hH : 1 ≤ H) (hε : 0 < ε) (hε1 : ε | ||
| 30 | 30 | have hp : H ≤ H^10 := by simpa only [pow_one] using pow_le_pow_right₀ hH (by norm_num : 1 ≤ 10) |
| 31 | 31 | apply (le_div_iff₀ hε).mpr |
| 32 | 32 | have hm : H*ε ≤ H := (mul_le_mul_of_nonneg_left hε1 (zero_le_one.trans hH)).trans_eq (mul_one _) |
| 33 | - nlinarith only [hp,hm,pow_nonneg (zero_le_one.trans hH) 10] | |
| 33 | + linarith only [hp,hm,pow_nonneg (zero_le_one.trans hH) 10] | |
| 34 | 34 | |
| 35 | 35 | end EulerPacketInitialAmplitude |
| 36 | 36 | |
+2 −2 Euler/PacketGeometryPressureCosts.lean View file
| @@ -38,7 +38,7 @@ theorem joined_bad_pressure_cost_bound : | ||
| 38 | 38 | have hx := quadratic_growth_one_le J (by omega) (scaleSequence J X) hX (scaleSequence_succ J X) |
| 39 | 39 | have hs : 1 ≤ P.shear := by |
| 40 | 40 | have hh := mul_le_mul_of_nonneg_left hτ1 A.shear_pos.le |
| 41 | - nlinarith only [hh,A.history_layer] | |
| 41 | + linarith only [hh,A.history_layer] | |
| 42 | 42 | have hi : P.shear⁻¹ ≤ 1 := (inv_le_one₀ A.shear_pos).2 hs |
| 43 | 43 | have hQ := parameters_le_source_exponential J D hJ X c hX hc hbaseH hbaseK n |
| 44 | 44 | L.K Ti P.shear⁻¹ A.CM A.CH CMn CHn hK hTib hi hCMb hCHb hCMn hCHn |
| @@ -107,7 +107,7 @@ theorem bad_pressure_cost_bound : | ||
| 107 | 107 | have hz : 0 ≤ c*(scaleSequence J X n/((J-1+n : ℕ) : ℝ)^4) := by positivity [hx n] |
| 108 | 108 | have he := one_le_exp hz |
| 109 | 109 | have hQ : 1 ≤ (4+CMn+CHn)*exp (c*(scaleSequence J X n/((J-1+n : ℕ) : ℝ)^4)) := by |
| 110 | - nlinarith only [he,mul_nonneg hCMn (zero_le_one.trans he),mul_nonneg hCHn (zero_le_one.trans he)] | |
| 110 | + linarith only [he,mul_nonneg hCMn (zero_le_one.trans he),mul_nonneg hCHn (zero_le_one.trans he)] | |
| 111 | 111 | have hM' := hMb.trans (mul_le_mul_of_nonneg_left |
| 112 | 112 | (previousShear_le_normal J (by omega) X hbaseH n) hCM) |
| 113 | 113 | exact badCost_bound J hJ Cθ CM CMn CHn c hCθ hCM hCMn hCHn (scaleSequence J X) hx n |
+4 −4 Euler/PacketGraphFlowExplicitBounds.lean View file
| @@ -108,14 +108,14 @@ theorem data_sup_bounds_explicit (G : Data P T) (k : ℝ) | ||
| 108 | 108 | have hg0 := graphFactor_nonneg k m |
| 109 | 109 | have hdisp : G.B*T ≤ k^(-(1/4 : ℝ)) := by |
| 110 | 110 | apply (show G.B*T ≤ T*G.B*(1+flowRadius G.B G.R T G.R) by |
| 111 | - nlinarith [mul_nonneg (mul_nonneg hB0 hT0) hf0]).trans | |
| 111 | + linarith [mul_nonneg (mul_nonneg hB0 hT0) hf0]).trans | |
| 112 | 112 | simpa only [one_mul] using hn.1 |
| 113 | 113 | have hvel : G.B ≤ k^(-(1/4 : ℝ)) := by |
| 114 | - apply (show G.B ≤ G.B*(1+flowRadius G.B G.R T G.R) by nlinarith [mul_nonneg hB0 hf0]).trans | |
| 114 | + apply (show G.B ≤ G.B*(1+flowRadius G.B G.R T G.R) by linarith [mul_nonneg hB0 hf0]).trans | |
| 115 | 115 | simpa only [one_mul] using hn.2.1 |
| 116 | 116 | have hRflow : G.R ≤ flowRadius G.B G.R T G.R := by |
| 117 | 117 | have hleft : (1 : ℝ) ≤ 4*G.R+1 := by linarith |
| 118 | - have hright : G.R ≤ (1+G.B*T)*G.R+2 := by nlinarith [mul_nonneg (mul_nonneg hB0 hT0) hR0] | |
| 118 | + have hright : G.R ≤ (1+G.B*T)*G.R+2 := by linarith [mul_nonneg (mul_nonneg hB0 hT0) hR0] | |
| 119 | 119 | have h := mul_le_mul hleft hright hR0 (by positivity : 0 ≤ 4*G.R+1) |
| 120 | 120 | simpa only [one_mul,flowRadius] using h |
| 121 | 121 | constructor |
| @@ -127,6 +127,6 @@ theorem data_sup_bounds_explicit (G : Data P T) (k : ℝ) | ||
| 127 | 127 | rw [hgf] |
| 128 | 128 | apply le_trans _ hrad |
| 129 | 129 | gcongr |
| 130 | - nlinarith | |
| 130 | + linarith | |
| 131 | 131 | |
| 132 | 132 | end EulerPhysicalGraphFlowBounds |
+8 −8 Euler/PacketGraphFlowFrequency.lean View file
| @@ -20,19 +20,19 @@ private theorem flow_radius_polynomial (B R T w : ℝ) | ||
| 20 | 20 | have hleft : 4*R+1 ≤ 5*w := by linarith |
| 21 | 21 | have hright : (1+B*T)*(6*R)+2 ≤ 14*w := by |
| 22 | 22 | have h := mul_le_mul_of_nonneg_right (show 1+B*T ≤ 2 by linarith) (by positivity : 0 ≤ 6*R) |
| 23 | - nlinarith | |
| 23 | + linarith | |
| 24 | 24 | have hlarge : flowRadius B R T (6*R) ≤ 70*w^2 := by |
| 25 | 25 | have h := mul_le_mul hleft hright (by positivity : 0 ≤ (1+B*T)*(6*R)+2) (by positivity : 0 ≤ 5*w) |
| 26 | 26 | simpa only [flowRadius] using h.trans_eq (by ring) |
| 27 | 27 | have hsmallR : flowRadius B R T R ≤ flowRadius B R T (6*R) := by |
| 28 | 28 | unfold flowRadius |
| 29 | 29 | gcongr |
| 30 | - nlinarith | |
| 30 | + linarith | |
| 31 | 31 | have hsq : 1 ≤ w^2 := by nlinarith |
| 32 | 32 | have h71 : 71*w^2 ≤ w^3 := by |
| 33 | 33 | have h := mul_le_mul_of_nonneg_right hw (sq_nonneg w) |
| 34 | - nlinarith | |
| 35 | - have hb : 1+flowRadius B R T (6*R) ≤ w^3 := by nlinarith | |
| 34 | + linarith | |
| 35 | + have hb : 1+flowRadius B R T (6*R) ≤ w^3 := by linarith | |
| 36 | 36 | exact ⟨(add_le_add le_rfl hsmallR).trans hb,hb⟩ |
| 37 | 37 | |
| 38 | 38 | private theorem physical_polynomial_bounds (K B R T C1 k ell w : ℝ) |
| @@ -48,7 +48,7 @@ private theorem physical_polynomial_bounds (K B R T C1 k ell w : ℝ) | ||
| 48 | 48 | have hw0 : 0 ≤ w := by linarith |
| 49 | 49 | have hB1 : B ≤ 1 := by |
| 50 | 50 | have h := mul_le_mul_of_nonneg_left (show 1 ≤ w by linarith) hB |
| 51 | - nlinarith | |
| 51 | + linarith | |
| 52 | 52 | have hBT : 0 ≤ T*B := mul_nonneg hT hB |
| 53 | 53 | obtain ⟨hv,ha⟩ := flow_radius_polynomial B R T w hB hR hT hw hRw hTw hsmall |
| 54 | 54 | have hVr : 0 ≤ flowRadius B R T R := by unfold flowRadius; positivity |
| @@ -65,7 +65,7 @@ private theorem physical_polynomial_bounds (K B R T C1 k ell w : ℝ) | ||
| 65 | 65 | have hb2 : B^2 ≤ 1 := by nlinarith |
| 66 | 66 | have hac : C1+3*B^2*R ≤ 4*w := by |
| 67 | 67 | have h := mul_le_mul_of_nonneg_right hb2 hR |
| 68 | - nlinarith | |
| 68 | + linarith | |
| 69 | 69 | have hab : K*(C1+3*B^2*R)*(1+flowRadius B R T (6*R)) ≤ w^6 := by |
| 70 | 70 | calc |
| 71 | 71 | _ ≤ w*(4*w)*w^3 := by gcongr |
| @@ -112,7 +112,7 @@ theorem physical_bounds_of_power (ε η K k B R T C1 ell : ℝ) | ||
| 112 | 112 | hK hB hR hT hC1 hk hell hw hKw hRw hTw hCw hBw |
| 113 | 113 | have h6 : (k^η)^6 ≤ k^ε := by |
| 114 | 114 | rw [← Real.rpow_mul_natCast hk0.le] |
| 115 | - exact Real.rpow_le_rpow_of_exponent_le hk (by norm_num; nlinarith) | |
| 115 | + exact Real.rpow_le_rpow_of_exponent_le hk (by norm_num; linarith) | |
| 116 | 116 | have hdisp : B*(k^η)^5 ≤ k^(-(1/2 : ℝ)+ε) := by |
| 117 | 117 | calc |
| 118 | 118 | _ ≤ (2*k^(-(1/2 : ℝ)))*(k^η)^5 := |
| @@ -124,7 +124,7 @@ theorem physical_bounds_of_power (ε η K k B R T C1 ell : ℝ) | ||
| 124 | 124 | have hrad : ell⁻¹*k*(k^η)^4 ≤ ell⁻¹*k^(1+ε) := by |
| 125 | 125 | have h4 : (k^η)^4 ≤ k^ε := by |
| 126 | 126 | rw [← Real.rpow_mul_natCast hk0.le] |
| 127 | - exact Real.rpow_le_rpow_of_exponent_le hk (by norm_num; nlinarith) | |
| 127 | + exact Real.rpow_le_rpow_of_exponent_le hk (by norm_num; linarith) | |
| 128 | 128 | calc |
| 129 | 129 | _ ≤ ell⁻¹*k*k^ε := mul_le_mul_of_nonneg_left h4 (by positivity) |
| 130 | 130 | _ = ell⁻¹*(k^(1 : ℝ)*k^ε) := by rw [Real.rpow_one]; ring |
+1 −1 Euler/PacketGraphFlowSupBounds.lean View file
| @@ -15,7 +15,7 @@ open Set Filter EulerLiftedGradientSpace EulerSmoothFlowGevrey | ||
| 15 | 15 | private theorem radius_le_flowRadius (B R T : ℝ) (hB : 0 ≤ B) (hR : 0 ≤ R) (hT : 0 ≤ T) : |
| 16 | 16 | R ≤ flowRadius B R T R := by |
| 17 | 17 | have h₁ : (1 : ℝ) ≤ 4*R+1 := by linarith |
| 18 | - have h₂ : R ≤ (1+B*T)*R+2 := by nlinarith [mul_nonneg (mul_nonneg hB hT) hR] | |
| 18 | + have h₂ : R ≤ (1+B*T)*R+2 := by linarith [mul_nonneg (mul_nonneg hB hT) hR] | |
| 19 | 19 | have h := mul_le_mul h₁ h₂ hR (by positivity : 0 ≤ 4*R+1) |
| 20 | 20 | simpa only [one_mul,flowRadius] using h |
| 21 | 21 | |
+6 −6 Euler/PacketHorizonSize.lean View file
| @@ -25,7 +25,7 @@ theorem equation30_short_size_comparison {σ s t : ℝ} {Z Z₁ : ℝ → ℝ} | ||
| 25 | 25 | have hzpos := equation30_global_positive hσ hσsmall hZ hfluxZ hZ0 hZ₁0 |
| 26 | 26 | have hW (x : ℝ) (hx : 0 ≤ x) : HasDerivAt W (W₁ x) x := by |
| 27 | 27 | convert! (((((hasDerivAt_id x).pow 2).const_mul (σ^2)).const_add 1).mul (hZ x hx)) using 1 |
| 28 | - dsimp [W₁] | |
| 28 | + dsimp | |
| 29 | 29 | ring |
| 30 | 30 | have hWpos (x : ℝ) (hx : 0 ≤ x) : 0 < W x := mul_pos (by positivity) (hzpos x hx) |
| 31 | 31 | have hderivBound (x : ℝ) (hx : 1 ≤ x) : |W₁ x| ≤ 6*W x := by |
| @@ -39,8 +39,8 @@ theorem equation30_short_size_comparison {σ s t : ℝ} {Z Z₁ : ℝ → ℝ} | ||
| 39 | 39 | have hh := mul_le_mul_of_nonneg_left hlog (show 0 ≤ 1+σ^2*x^2 by positivity) |
| 40 | 40 | have hx2 : x ≤ x^2 := by nlinarith only [hx] |
| 41 | 41 | have hcoef := mul_le_mul_of_nonneg_right hx2 (show 0 ≤ 2*σ^2*Z x by positivity) |
| 42 | - dsimp [W₁, W] | |
| 43 | - nlinarith only [ht, hh, hcoef, hzx] | |
| 42 | + dsimp [W] | |
| 43 | + linarith only [ht, hh, hcoef, hzx] | |
| 44 | 44 | have hcont : ContinuousOn W (Icc s t) := fun x hx => |
| 45 | 45 | (hW x (by linarith only [hs, hx.1])).continuousAt.continuousWithinAt |
| 46 | 46 | have hright : ∀ x ∈ Ico s t, HasDerivWithinAt W (W₁ x) (Ici x) x := |
| @@ -64,7 +64,7 @@ theorem equation30_short_size_comparison {σ s t : ℝ} {Z Z₁ : ℝ → ℝ} | ||
| 64 | 64 | have hrightExp := mul_le_mul_of_nonneg_right hright' (exp_pos (6:ℝ)).le |
| 65 | 65 | dsimp [W] at hgrowth |
| 66 | 66 | dsimp [idealPrimarySize] |
| 67 | - nlinarith only [hleft, hgrowth, hrightExp] | |
| 67 | + linarith only [hleft, hgrowth, hrightExp] | |
| 68 | 68 | |
| 69 | 69 | theorem equation30_horizon_size_comparison {σ T H τ : ℝ} {Z Z₁ : ℝ → ℝ} |
| 70 | 70 | (hσ : 0 < σ) (hσsmall : σ ≤ 1/4) |
| @@ -80,7 +80,7 @@ theorem equation30_horizon_size_comparison {σ T H τ : ℝ} {Z Z₁ : ℝ → | ||
| 80 | 80 | (equation30_global_positive hσ hσsmall hZ hfluxZ hZ0 hZ₁0 T (by linarith only [hT])).le |
| 81 | 81 | have he : 1 ≤ exp (6:ℝ) := one_le_exp_iff.mpr (by norm_num) |
| 82 | 82 | have hh := mul_le_mul_of_nonneg_right he hpos |
| 83 | - nlinarith only [hbound, hh] | |
| 83 | + linarith only [hbound, hh] | |
| 84 | 84 | · exact equation30_short_size_comparison hσ hσsmall hZ hfluxZ hZ0 hZ₁0 hT |
| 85 | 85 | (le_of_not_ge hpre) (by linarith only [hshort, hτH]) |
| 86 | 86 | |
| @@ -126,6 +126,6 @@ theorem physical_horizon_size_bound {α : Type*} (center : α) | ||
| 126 | 126 | (by linarith only [hτ.1] : 0 ≤ τ) hτ.2 |
| 127 | 127 | have hh := mul_le_mul_of_nonneg_left hideal hs₀.le |
| 128 | 128 | have ht := mul_le_mul_of_nonneg_left htarget (exp_pos (6:ℝ)).le |
| 129 | - nlinarith only [ht, hcurrent, hh] | |
| 129 | + linarith only [ht, hcurrent, hh] | |
| 130 | 130 | |
| 131 | 131 | end EulerPacketMovingFrame |
+9 −9 Euler/PacketIdealSize.lean View file
| @@ -18,8 +18,8 @@ def idealPrimarySize (σ : ℝ) (Z : ℝ → ℝ) (t : ℝ) : ℝ := | ||
| 18 | 18 | theorem quadratic_weight_sqrt {p : ℝ} (hp : 0 ≤ p) : |
| 19 | 19 | Real.sqrt (1+p^2) ≤ 1+p ∧ 1+p ≤ 2*Real.sqrt (1+p^2) := by |
| 20 | 20 | constructor |
| 21 | - · exact Real.sqrt_le_iff.mpr ⟨by positivity, by nlinarith only [hp]⟩ | |
| 22 | - · have h1 : 1 ≤ Real.sqrt (1+p^2) := Real.one_le_sqrt.mpr (by nlinarith [sq_nonneg p]) | |
| 21 | + · exact Real.sqrt_le_iff.mpr ⟨by positivity, by linarith only [hp]⟩ | |
| 22 | + · have h1 : 1 ≤ Real.sqrt (1+p^2) := Real.one_le_sqrt.mpr (by linarith [sq_nonneg p]) | |
| 23 | 23 | have hp' : p ≤ Real.sqrt (1+p^2) := Real.le_sqrt_of_sq_le (by linarith) |
| 24 | 24 | linarith only [h1, hp'] |
| 25 | 25 | |
| @@ -40,7 +40,7 @@ theorem equation30_polynomial_size_monotone {σ : ℝ} {Z Z₁ : ℝ → ℝ} | ||
| 40 | 40 | have hz := hpre ⟨hs, hst.trans ht⟩ ⟨ht0, ht⟩ hst |
| 41 | 41 | have hpow : s^2 ≤ t^2 := (sq_le_sq₀ hs ht0).mpr hst |
| 42 | 42 | have hcoef : 1+σ^2*s^2 ≤ 1+σ^2*t^2 := by |
| 43 | - nlinarith only [mul_le_mul_of_nonneg_left hpow (sq_nonneg σ)] | |
| 43 | + linarith only [mul_le_mul_of_nonneg_left hpow (sq_nonneg σ)] | |
| 44 | 44 | exact (mul_le_mul_of_nonneg_left hz (by positivity)).trans |
| 45 | 45 | (mul_le_mul_of_nonneg_right hcoef (hpos t ht0).le) |
| 46 | 46 | have hpostW : ∀ s t, 1/σ ≤ s → s ≤ t → (1+σ^2*s^2)*Z s ≤ (1+σ^2*t^2)*Z t := by |
| @@ -49,17 +49,17 @@ theorem equation30_polynomial_size_monotone {σ : ℝ} {Z Z₁ : ℝ → ℝ} | ||
| 49 | 49 | have ht := hs.trans hst |
| 50 | 50 | have ht0 := hs0.le.trans hst |
| 51 | 51 | have hz := hpost hs ht hst |
| 52 | - have hss : 1 ≤ σ*s := by have hh := (div_le_iff₀ hσ).mp hs; nlinarith only [hh] | |
| 53 | - have hst' : 1 ≤ σ*t := by have hh := (div_le_iff₀ hσ).mp ht; nlinarith only [hh] | |
| 52 | + have hss : 1 ≤ σ*s := by have hh := (div_le_iff₀ hσ).mp hs; linarith only [hh] | |
| 53 | + have hst' : 1 ≤ σ*t := by have hh := (div_le_iff₀ hσ).mp ht; linarith only [hh] | |
| 54 | 54 | have hproduct : 1 ≤ (σ*s)*(σ*t) := by |
| 55 | 55 | simpa only [one_mul] using mul_le_mul hss hst' zero_le_one (le_trans zero_le_one hss) |
| 56 | 56 | have hpositive : 0 ≤ (t-s)*(σ^2*s*t-1) := |
| 57 | - mul_nonneg (sub_nonneg.mpr hst) (by nlinarith only [hproduct]) | |
| 58 | - have hcoef : t*(1+σ^2*s^2) ≤ s*(1+σ^2*t^2) := by nlinarith only [hpositive] | |
| 57 | + mul_nonneg (sub_nonneg.mpr hst) (by linarith only [hproduct]) | |
| 58 | + have hcoef : t*(1+σ^2*s^2) ≤ s*(1+σ^2*t^2) := by linarith only [hpositive] | |
| 59 | 59 | have h1 := mul_le_mul_of_nonneg_left hz (show 0 ≤ 1+σ^2*s^2 by positivity) |
| 60 | 60 | have h2 := mul_le_mul_of_nonneg_right hcoef (hpos t ht0).le |
| 61 | 61 | apply (mul_le_mul_iff_right₀ hs0).mp |
| 62 | - nlinarith only [h1, h2] | |
| 62 | + linarith only [h1, h2] | |
| 63 | 63 | intro s hs t _ht hst |
| 64 | 64 | by_cases htpre : t ≤ 1/σ |
| 65 | 65 | · exact hpreW s t hs hst htpre |
| @@ -84,6 +84,6 @@ theorem equation30_ideal_size_comparison {σ s t : ℝ} {Z Z₁ : ℝ → ℝ} | ||
| 84 | 84 | have h1 := mul_le_mul_of_nonneg_right hws (hpos s hs).le |
| 85 | 85 | have h2 := mul_le_mul_of_nonneg_right hwt (hpos t (hs.trans hst)).le |
| 86 | 86 | unfold idealPrimarySize |
| 87 | - nlinarith only [h1, hmono, h2] | |
| 87 | + linarith only [h1, hmono, h2] | |
| 88 | 88 | |
| 89 | 89 | end EulerPacketMovingFrame |
+1 −1 Euler/PacketInductionScaleBounds.lean View file
| @@ -70,7 +70,7 @@ theorem olderShear_le (n : ℕ) : olderShear S.J S.X n ≤ previousShear S.J S.X | ||
| 70 | 70 | have hp := S.previousShear_one n |
| 71 | 71 | have hs := S.shear_separation n |
| 72 | 72 | change previousShear S.J S.X n ≤ shear S.J S.X n |
| 73 | - nlinarith only [hp,hs,sq_nonneg (previousShear S.J S.X n-1)] | |
| 73 | + linarith only [hp,hs,sq_nonneg (previousShear S.J S.X n-1)] | |
| 74 | 74 | |
| 75 | 75 | theorem frequency_cost (n : ℕ) : |
| 76 | 76 | (EulerNormalPacketParameters.frequencySpec 4).cost S.J (scaleSequence S.J S.X) n ≤ 1 := |
+2 −2 Euler/PacketInductionScales.lean View file
| @@ -141,12 +141,12 @@ theorem exists_scales (c B : ℝ) (hc : 0 ≤ c) : Nonempty (Scales c B) := by | ||
| 141 | 141 | have hδgeometry : 1000000*geometryConstant*δ ≤ 1 := by |
| 142 | 142 | have hg : 0 < 1000000*geometryConstant := by positivity [geometryConstant_one] |
| 143 | 143 | have hh := (le_div_iff₀ hg).mp (hδη.trans hηgeom) |
| 144 | - nlinarith only [hh] | |
| 144 | + linarith only [hh] | |
| 145 | 145 | have hδrenew : 2*(1+errorConstant frameConstant)*δ ≤ 1/4 := by |
| 146 | 146 | have hg : 0 < 8*(1+errorConstant frameConstant) := by |
| 147 | 147 | positivity [errorConstant_nonneg frameConstant] |
| 148 | 148 | have hh := (le_div_iff₀ hg).mp (hδη.trans hηrenew) |
| 149 | - nlinarith only [hh] | |
| 149 | + linarith only [hh] | |
| 150 | 150 | have hevent : ∀ᶠ X : ℝ in atTop, |
| 151 | 151 | X₀ ≤ X ∧ 48000 ≤ X ∧ FirstScaleGuards J D X ∧ |
| 152 | 152 | (∀ n, UniversalFrequency (frequency J X n)) ∧ |
+1 −1 Euler/PacketInductionStage.lean View file
| @@ -110,7 +110,7 @@ theorem normalized_sigma : P.frame.sigma*scaleSequence S.J S.X n ≤ 2 := by | ||
| 110 | 110 | have h := P.tilt_upper |
| 111 | 111 | have hx := S.sequence_one n |
| 112 | 112 | have hp := mul_nonneg P.sigma_nonneg (zero_le_one.trans hx) |
| 113 | - nlinarith only [h,hp,sq_nonneg (P.frame.sigma*scaleSequence S.J S.X n-1)] | |
| 113 | + linarith only [h,hp,sq_nonneg (P.frame.sigma*scaleSequence S.J S.X n-1)] | |
| 114 | 114 | |
| 115 | 115 | theorem strain_bound (t : Icc (0 : ℝ) P.parent.T) (x : Space) : |
| 116 | 116 | ‖P.parent.strain.field t x‖ ≤ gradientConstant*previousShear S.J S.X n := by |
+2 −2 Euler/PacketInitialBounds.lean View file
| @@ -108,7 +108,7 @@ theorem highGrade_bound (n : ℕ) : | ||
| 108 | 108 | have hp := mul_le_mul_of_nonneg_left (pow_le_pow_right₀ S.H0_one_le (by omega : 2*n ≤ 2*(n+1))) hγ |
| 109 | 109 | exact ((hf' (n+1)).add hh).mono_amplitude (zero_le_one.trans hR) (by |
| 110 | 110 | have := mul_nonneg hγ (pow_nonneg hH (2*(n+1))) |
| 111 | - nlinarith) | |
| 111 | + linarith) | |
| 112 | 112 | |
| 113 | 113 | theorem meanGrade_bound (n : ℕ) : |
| 114 | 114 | (meanGradeField G t n).WordBound 6 R (3*S.H0^(2*n)) (highShift n) := by |
| @@ -124,7 +124,7 @@ theorem meanGrade_bound (n : ℕ) : | ||
| 124 | 124 | apply h.mono_amplitude (zero_le_one.trans hR) |
| 125 | 125 | have hp := S.mean_le_coarse i t |
| 126 | 126 | have hH := pow_nonneg S.H0_pos.le (2*i) |
| 127 | - nlinarith | |
| 127 | + linarith | |
| 128 | 128 | |
| 129 | 129 | theorem high_bound (hN : 1 ≤ N) (C κ : ℝ) (hC : 1 ≤ C) (hκ : 0 ≤ κ) |
| 130 | 130 | (hsmall : κ*tailBase R S.H0 C N ≤ 1/2) : |
+2 −2 Euler/PacketInitialCostPolynomial.lean View file
| @@ -87,8 +87,8 @@ theorem costs_le_envelope (s : ℕ) (R H X : ℝ) (hR : 0 ≤ R) (hH : 0 ≤ H) | ||
| 87 | 87 | (physicalDerivativeCost_nonneg period (4*R) coordinateCost (by positivity) hc s) hm |
| 88 | 88 | unfold envelope |
| 89 | 89 | constructor |
| 90 | - · nlinarith only [hh,mul_nonneg hm hd] | |
| 91 | - · nlinarith only [hm',mul_nonneg hv hd] | |
| 90 | + · linarith only [hh,mul_nonneg hm hd] | |
| 91 | + · linarith only [hm',mul_nonneg hv hd] | |
| 92 | 92 | |
| 93 | 93 | def sourcePolynomial (s : ℕ) : Polynomial ℝ := |
| 94 | 94 | (polynomial s).comp ((1+Polynomial.X+EulerPacketRadiusPolynomial.radiusPolynomial+ |
+2 −2 Euler/PacketInitialScaleSummability.lean View file
| @@ -81,7 +81,7 @@ theorem high_summable (J : ℕ) (hJ : 2 ≤ J) (C c K : ℝ) | ||
| 81 | 81 | div_le_div_of_nonneg_left hx (by positivity) (pow_le_pow_right₀ hp (by decide)) |
| 82 | 82 | apply mul_le_mul_of_nonneg_left ?_ (by positivity) |
| 83 | 83 | apply exp_le_exp.mpr |
| 84 | - simp only [rpow_zero,div_one] | |
| 84 | + simp only [rpow_zero] | |
| 85 | 85 | nlinarith only [mul_le_mul_of_nonneg_left h1 (Nat.cast_nonneg m), |
| 86 | 86 | mul_le_mul_of_nonneg_left h2 (Nat.cast_nonneg m), |
| 87 | 87 | mul_le_mul_of_nonneg_left h3 (mul_nonneg (Nat.cast_nonneg N) hc)] |
| @@ -106,6 +106,6 @@ theorem mean_summable (J : ℕ) (hJ : 2 ≤ J) (C c K : ℝ) | ||
| 106 | 106 | apply mul_le_mul_of_nonneg_left ?_ (by positivity) |
| 107 | 107 | apply exp_le_exp.mpr |
| 108 | 108 | norm_num only [rpow_ofNat] |
| 109 | - nlinarith only [mul_le_mul_of_nonneg_left h1 (Nat.cast_nonneg m)] | |
| 109 | + linarith only [mul_le_mul_of_nonneg_left h1 (Nat.cast_nonneg m)] | |
| 110 | 110 | |
| 111 | 111 | end EulerPacketInitialScale |
+2 −2 Euler/PacketInitializedOutputCosts.lean View file
| @@ -103,14 +103,14 @@ theorem actual_output_costs (W H0 : ℝ) (hδ : 0 < δ) | ||
| 103 | 103 | have hm : Kc.M ≤ Z := hK.pressure |
| 104 | 104 | have hr : Kc.Rc ≤ Z := hK.radius |
| 105 | 105 | have hp := mul_le_mul hm hr Kc.Rc_nonneg hZ |
| 106 | - nlinarith only [hp,hRZ,hr] | |
| 106 | + linarith only [hp,hRZ,hr] | |
| 107 | 107 | have hρinv : ρ⁻¹ ≤ 4*inverseRadiusEnvelope Z := by |
| 108 | 108 | change (initialRadius R Kc.M Kc.Rc/4)⁻¹ ≤ _ |
| 109 | 109 | rw [inv_div,div_eq_mul_inv] |
| 110 | 110 | gcongr |
| 111 | 111 | have hiZ : 0 ≤ inverseRadiusEnvelope Z := by unfold inverseRadiusEnvelope; positivity |
| 112 | 112 | have hrf : physicalInputRadius (4*R) (4*R) ρ ≤ radiusEnvelope Z := by |
| 113 | - simp only [physicalInputRadius,max_self,liftedInputRadius] | |
| 113 | + simp only [physicalInputRadius,max_self] | |
| 114 | 114 | change 1+coordinateCost*(4*R+ρ⁻¹) ≤ 1+coordinateCost*(4*Z+4*inverseRadiusEnvelope Z) |
| 115 | 115 | have hc : 0 ≤ coordinateCost := norm_nonneg _ |
| 116 | 116 | gcongr |
+1 −1 Euler/PacketInitializedPressureRemainder.lean View file
| @@ -124,7 +124,7 @@ theorem initializedAngularPressure_bound : | ||
| 124 | 124 | simp only [mul_one] at hb |
| 125 | 125 | have ha : S.H0^2 ≤ 3*S.H0^(2*1) := by |
| 126 | 126 | norm_num only [Nat.mul_one] |
| 127 | - nlinarith [sq_nonneg S.H0] | |
| 127 | + linarith [sq_nonneg S.H0] | |
| 128 | 128 | have hc := (hb.mono_amplitude (zero_le_one.trans L.radius_bounds.1) ha).fixed_velocity_grade |
| 129 | 129 | (n := 1) (zero_le_one.trans L.radius_bounds.1) S.H0_pos.le |
| 130 | 130 | exact (hc.changeTime hTime).of_raw_eq _ |
+3 −3 Euler/PacketInitializedRadiusPolynomial.lean View file
| @@ -217,7 +217,7 @@ theorem requiredEnvelope_bounds (W : ℝ) (hW : 0 ≤ W) : | ||
| 217 | 217 | have hps : 0 ≤ strongEnvelope W*(16*W+1) := mul_nonneg hs (by positivity) |
| 218 | 218 | have hpf : 0 ≤ forwardEnvelope W*(64*W+1) := mul_nonneg hf (by positivity) |
| 219 | 219 | unfold requiredEnvelope |
| 220 | - exact ⟨by nlinarith,by nlinarith,by nlinarith,by nlinarith,by nlinarith⟩ | |
| 220 | + exact ⟨by linarith,by linarith,by linarith,by linarith,by linarith⟩ | |
| 221 | 221 | |
| 222 | 222 | theorem jetRadius_le (δ W : ℝ) (hδ : 0 < δ) (hi : δ⁻¹ ≤ W) : jetRadius δ ≤ jetEnvelope W := by |
| 223 | 223 | have hi0 := (inv_pos.mpr hδ).le |
| @@ -614,9 +614,9 @@ theorem initializedRadius_le_envelope (W : ℝ) (hδ : 0 < δ) | ||
| 614 | 614 | apply max_le |
| 615 | 615 | · apply hcommon.trans |
| 616 | 616 | unfold radiusEnvelope |
| 617 | - nlinarith only [hreq0,mul_nonneg hgrade0 hterminal0] | |
| 617 | + linarith only [hreq0,mul_nonneg hgrade0 hterminal0] | |
| 618 | 618 | · apply hgrade.trans |
| 619 | 619 | unfold radiusEnvelope |
| 620 | - nlinarith only [hW0,hreq0,hmean0,hgrade0] | |
| 620 | + linarith only [hW0,hreq0,hmean0,hgrade0] | |
| 621 | 621 | |
| 622 | 622 | end EulerPacketRadiusPolynomial |
+1 −1 Euler/PacketKnownPieces.lean View file
| @@ -63,7 +63,7 @@ theorem knownJets_eq_pieces (O : Operators) (p : ℕ) (hp : 2 ≤ p) | ||
| 63 | 63 | by_cases hi1 : i = 1 |
| 64 | 64 | · subst i |
| 65 | 65 | simp [knownJets, history, velocityJet, KnownPiece.jet, KnownPiece.raw, |
| 66 | - KnownPiece.active, slicedJet_zero', show 1 < p by omega, hc, hb] | |
| 66 | + KnownPiece.active, show 1 < p by omega, hc, hb] | |
| 67 | 67 | have hi2 : 2 ≤ i := by omega |
| 68 | 68 | by_cases hip : i < p |
| 69 | 69 | · simp [knownJets, history, velocityJet, KnownPiece.jet, KnownPiece.raw, |
+2 −2 Euler/PacketLiftedCoefficientBounds.lean View file
| @@ -42,13 +42,13 @@ theorem liftedInputRadius_packet (R ρ : ℝ) (_hR : 0 ≤ R) (hρ : 0 < ρ) : | ||
| 42 | 42 | ‖coordinateEquiv.symm.toContinuousLinearMap‖ * R ≤ liftedInputRadius R ρ := by |
| 43 | 43 | have h := mul_nonneg (norm_nonneg coordinateEquiv.symm.toContinuousLinearMap) (inv_nonneg.mpr hρ.le) |
| 44 | 44 | dsimp [liftedInputRadius] |
| 45 | - nlinarith | |
| 45 | + linarith | |
| 46 | 46 | |
| 47 | 47 | theorem liftedInputRadius_error (R ρ : ℝ) (hR : 0 ≤ R) : |
| 48 | 48 | ‖coordinateEquiv.symm.toContinuousLinearMap‖ * ρ⁻¹ ≤ liftedInputRadius R ρ := by |
| 49 | 49 | have h := mul_nonneg (norm_nonneg coordinateEquiv.symm.toContinuousLinearMap) hR |
| 50 | 50 | dsimp [liftedInputRadius] |
| 51 | - nlinarith | |
| 51 | + linarith | |
| 52 | 52 | |
| 53 | 53 | private theorem jet_envelope_mono {C D R S : ℝ} (hD : 0 ≤ D) (hR : 0 ≤ R) |
| 54 | 54 | (hCD : C ≤ D) (hRS : R ≤ S) (n : ℕ) : |
+3 −3 Euler/PacketLowBoundPropagation.lean View file
| @@ -15,11 +15,11 @@ theorem gradient_bound (CM hprev hchild g b e : ℝ) | ||
| 15 | 15 | (hbad : hchild*b+e ≤ 1) : |
| 16 | 16 | CM*hprev+hchild*(g+b)+e ≤ CM*hchild := by |
| 17 | 17 | have hCM0 : 0 ≤ CM := by linarith only [hCM] |
| 18 | - have hh : hprev ≤ hchild/4 := by nlinarith only [hp,hscale,sq_nonneg (hprev-1)] | |
| 18 | + have hh : hprev ≤ hchild/4 := by linarith only [hp,hscale,sq_nonneg (hprev-1)] | |
| 19 | 19 | have ho := mul_le_mul_of_nonneg_left hh hCM0 |
| 20 | 20 | have hgood := mul_le_mul_of_nonneg_right hg (zero_le_one.trans hc) |
| 21 | 21 | have hproduct : 4 ≤ CM*hchild := by nlinarith only [hCM,hc] |
| 22 | - nlinarith only [ho,hgood,hbad,hproduct] | |
| 22 | + linarith only [ho,hgood,hbad,hproduct] | |
| 23 | 23 | |
| 24 | 24 | theorem hessian_bound (CM CH hprev hold hchild g b e : ℝ) |
| 25 | 25 | (hCH : 4 ≤ CH) (hp : 1 ≤ hprev) (hc : 1 ≤ hchild) |
| @@ -36,7 +36,7 @@ theorem hessian_bound (CM CH hprev hold hchild g b e : ℝ) | ||
| 36 | 36 | have hgood := mul_le_mul_of_nonneg_right hg hprod0 |
| 37 | 37 | have hmon := mul_le_mul_of_nonneg_left hp (mul_nonneg hCH0 hc0) |
| 38 | 38 | have hproduct : 4 ≤ CH*(hchild*hprev) := by nlinarith only [hCH,hprod] |
| 39 | - nlinarith only [hh,hs,hgood,hmon,hbad,hproduct] | |
| 39 | + linarith only [hh,hs,hgood,hmon,hbad,hproduct] | |
| 40 | 40 | |
| 41 | 41 | theorem localized_cost_le (J : ℕ) (X K Be Bc Kcap Becap CM Cboundary T : ℝ) |
| 42 | 42 | (hK : 0 ≤ K) (hBe : 0 ≤ Be) (hBc : 0 ≤ Bc) (hT : 0 ≤ T) |
+2 −2 Euler/PacketLowConstants.lean View file
| @@ -38,7 +38,7 @@ theorem hessian_properties : 4 ≤ hessianConstant ∧ | ||
| 38 | 38 | have hff := mul_nonneg h0M h1.le |
| 39 | 39 | have hfg := mul_nonneg h0M h2.le |
| 40 | 40 | unfold hessianConstant |
| 41 | - exact ⟨by nlinarith,by nlinarith,by nlinarith⟩ | |
| 41 | + exact ⟨by linarith,by linarith,by linarith⟩ | |
| 42 | 42 | |
| 43 | 43 | theorem hessian_nonneg : 0 ≤ hessianConstant := (by norm_num : (0 : ℝ) ≤ 4).trans hessian_properties.1 |
| 44 | 44 | |
| @@ -56,6 +56,6 @@ theorem initial_bounds (h e : ℝ) (hh : 1 ≤ h) (he : e ≤ 1) : | ||
| 56 | 56 | have hc := mul_le_mul_of_nonneg_left hh h0 |
| 57 | 57 | have hm := mul_le_mul_of_nonneg_right gradient_properties.2.1 (zero_le_one.trans hh) |
| 58 | 58 | have hH := mul_le_mul_of_nonneg_right hessian_properties.2.1 (zero_le_one.trans hh) |
| 59 | - constructor <;> nlinarith only [hc,hm,hH,hh,he] | |
| 59 | + constructor <;> linarith only [hc,hm,hH,hh,he] | |
| 60 | 60 | |
| 61 | 61 | end EulerPacketLowConstants |
+2 −2 Euler/PacketMajorantShift.lean View file
| @@ -8,7 +8,7 @@ namespace EulerGevrey | ||
| 8 | 8 | theorem majorant_succ_identity (R : ℝ) (d n : ℕ) : |
| 9 | 9 | majorant R (d+1) n=R*((n+d+1 : ℕ) : ℝ)^2*majorant R d n := by |
| 10 | 10 | simp only [majorant, show n+(d+1)=n+d+1 by omega, Nat.factorial_succ, |
| 11 | - Nat.cast_mul, pow_succ] | |
| 11 | + Nat.cast_mul] | |
| 12 | 12 | ring |
| 13 | 13 | |
| 14 | 14 | theorem majorant_mono_shift (R : ℝ) (hR : 1 ≤ R) (d D n : ℕ) (h : d ≤ D) : |
| @@ -44,7 +44,7 @@ theorem majorant_coarse_split (R : ℝ) (hR : 0 ≤ R) (d n : ℕ) : | ||
| 44 | 44 | simp only [mul_pow, hpow] |
| 45 | 45 | ring |
| 46 | 46 | _ = _ := by |
| 47 | - simp only [majorant, Nat.add_zero, pow_add] | |
| 47 | + simp only [majorant, Nat.add_zero] | |
| 48 | 48 | ring |
| 49 | 49 | |
| 50 | 50 | end EulerGevrey |
+1 −1 Euler/PacketMatrixNormalization.lean View file
| @@ -35,6 +35,6 @@ theorem normalized_approximation_bound (Rc C : ℝ) (hRc : 0 ≤ Rc) (hC : 0 ≤ | ||
| 35 | 35 | mul_nonneg (by norm_num) (sobolevCoefficientAmplitude_nonneg 6 Rc C hRc hC) |
| 36 | 36 | have hb4 := fourth_power_le_frequency k B (by linarith) hB0 hB |
| 37 | 37 | have hs := mul_le_mul_of_nonneg_left (normalized_low_high_le k B C₁ C₂ (by linarith) hC₂ hb4) hc |
| 38 | - exact h.mono_amplitude hR (by simpa only [mul_assoc,mul_left_comm,mul_comm] using hs) | |
| 38 | + exact h.mono_amplitude hR (by simpa only [mul_assoc,mul_left_comm] using hs) | |
| 39 | 39 | |
| 40 | 40 | end EulerPacketCylinderField.MatrixCoefficient |
+2 −2 Euler/PacketMovingFrame.lean View file
| @@ -47,7 +47,7 @@ theorem inner_cross_second (p q : Space) : ⟪q,cross p q⟫_ℝ = 0 := by | ||
| 47 | 47 | |
| 48 | 48 | theorem inner_cross_cross (p q r s : Space) : |
| 49 | 49 | ⟪cross p q,cross r s⟫_ℝ = ⟪p,r⟫_ℝ*⟪q,s⟫_ℝ - ⟪p,s⟫_ℝ*⟪q,r⟫_ℝ := by |
| 50 | - simp only [← dot_eq_inner, cross] | |
| 50 | + simp only [← dot_eq_inner] | |
| 51 | 51 | exact cross_dot_cross (ofLp p) (ofLp q) (ofLp r) (ofLp s) |
| 52 | 52 | |
| 53 | 53 | theorem inner_cross_exchange_first (p q r : Space) : |
| @@ -151,7 +151,7 @@ theorem frameRate_skew (B : Space →L[ℝ] Space) (p q : Space) | ||
| 151 | 151 | ring |
| 152 | 152 | intro i j |
| 153 | 153 | fin_cases i <;> fin_cases j <;> |
| 154 | - dsimp [frame, frameRate, frameMatrix, EulerPacketRay.frameSkew] | |
| 154 | + dsimp [frame, frameRate, frameMatrix] | |
| 155 | 155 | · exact hpp |
| 156 | 156 | · exact hpq' |
| 157 | 157 | · exact hpn' |
+1 −1 Euler/PacketMovingVelocity.lean View file
| @@ -11,7 +11,7 @@ open EulerSmoothLimit EulerPacketNormalizedPrimary EulerPacketRay InnerProductSp | ||
| 11 | 11 | |
| 12 | 12 | theorem frameSkew_antisymm (B : Fin 3 → Fin 3 → ℝ) (i j : Fin 3) : |
| 13 | 13 | frameSkew B j i = -frameSkew B i j := by |
| 14 | - fin_cases i <;> fin_cases j <;> simp [frameSkew, Fin.ext_iff] | |
| 14 | + fin_cases i <;> fin_cases j <;> simp [frameSkew] | |
| 15 | 15 | |
| 16 | 16 | theorem frameMatrix_adjoint (B : Space →L[ℝ] Space) (p q : Space) (i j : Fin 3) : |
| 17 | 17 | frameMatrix B.adjoint p q i j = frameMatrix B p q j i := by |
+11 −11 Euler/PacketNeighborControlled.lean View file
| @@ -40,14 +40,14 @@ theorem ray_controlled_velocity_error_within | ||
| 40 | 40 | |velocitySecondRhs (A t) (C t) ε (P t) (Q t) (N t) U V+U| ≤ |
| 41 | 41 | 200000*e*Θ^12*(|U|+|V|) := by |
| 42 | 42 | have hΘ0 : 0 ≤ Θ := by linarith only [hΘ] |
| 43 | - have hs : 400*(4*e)*Θ^5 ≤ 1 := by nlinarith only [hsmall, mul_nonneg he (pow_nonneg hΘ0 5)] | |
| 43 | + have hs : 400*(4*e)*Θ^5 ≤ 1 := by linarith only [hsmall, mul_nonneg he (pow_nonneg hΘ0 5)] | |
| 44 | 44 | have hi : norm3 (P 0) (Q 0) (N 0-1) ≤ 4*e := hinitial.trans (by linarith only [he]) |
| 45 | 45 | have hnear := ray_closeness_within hβ hβupper hΘ hT0 hT |
| 46 | 46 | (show 0 ≤ 4*e by positivity) hs hRc hP hQ hN hRclose hi |
| 47 | 47 | intro t ht |
| 48 | 48 | obtain ⟨herr, hn⟩ := hnear t ht |
| 49 | 49 | have herr' : norm3 (P t-β*t^2) (Q t+2*β*t) (N t-1) ≤ 800*e*Θ^5 := by |
| 50 | - nlinarith only [herr] | |
| 50 | + linarith only [herr] | |
| 51 | 51 | refine ⟨⟨herr', hn⟩, ?_⟩ |
| 52 | 52 | intro U V |
| 53 | 53 | have herrorP : |P t-β*t^2| ≤ 800*e*Θ^5 := by |
| @@ -65,11 +65,11 @@ theorem ray_controlled_velocity_error_within | ||
| 65 | 65 | have ht2 : t^2 ≤ Θ^2 := (sq_le_sq₀ ht.1 hΘ0).mpr htΘ |
| 66 | 66 | have hP₀ : |β*t^2| ≤ Θ^2 := by |
| 67 | 67 | rw [abs_of_nonneg (mul_nonneg hβ (sq_nonneg t))] |
| 68 | - nlinarith only [mul_le_mul_of_nonneg_right hβupper (sq_nonneg t), ht2] | |
| 68 | + linarith only [mul_le_mul_of_nonneg_right hβupper (sq_nonneg t), ht2] | |
| 69 | 69 | have hQ₀ : |-2*β*t| ≤ 2*Θ^2 := by |
| 70 | 70 | rw [abs_mul, abs_mul, abs_of_nonneg hβ, abs_of_nonneg ht.1] |
| 71 | 71 | norm_num only [abs_neg, abs_of_nonneg (by norm_num : (0:ℝ) ≤ 2)] |
| 72 | - nlinarith only [mul_le_mul_of_nonneg_right hβupper ht.1, htΘ, hΘ, sq_nonneg (Θ-1)] | |
| 72 | + linarith only [mul_le_mul_of_nonneg_right hβupper ht.1, htΘ, hΘ, sq_nonneg (Θ-1)] | |
| 73 | 73 | have hb : |β| ≤ 1 := by rwa [abs_of_nonneg hβ] |
| 74 | 74 | exact velocity_rhs_error_firstTwo hΘ he hε hεe hsmall hb (hAclose t ht) |
| 75 | 75 | (hCclose t ht) hP₀ hQ₀ herrorP herrorQ herrorN |
| @@ -117,10 +117,10 @@ theorem controlled_neighbor_relative_error_within | ||
| 117 | 117 | have hσ2 : σ^2 ≤ 1 := by nlinarith only [hσ, hσsmall] |
| 118 | 118 | have hgeom : 10000*e*Θ^5 ≤ 1 := by |
| 119 | 119 | have hh := mul_le_mul_of_nonneg_left (pow_le_pow_right₀ hΘ (by decide : 5 ≤ 21)) he |
| 120 | - nlinarith only [hsmall, hh, mul_nonneg he (pow_nonneg hΘ0 21)] | |
| 120 | + linarith only [hsmall, hh, mul_nonneg he (pow_nonneg hΘ0 21)] | |
| 121 | 121 | have he1 : e ≤ 1 := by |
| 122 | 122 | have hh := mul_le_mul_of_nonneg_left (one_le_pow₀ hΘ : 1 ≤ Θ^21) he |
| 123 | - nlinarith only [hsmall, hh, he] | |
| 123 | + linarith only [hsmall, hh, he] | |
| 124 | 124 | have hcontrol := ray_controlled_velocity_error_within (sq_nonneg σ) hσ2 hΘ hT0 hT |
| 125 | 125 | he hε hεe hgeom hRc hP hQ hN hRclose hAclose hCclose hrayInitial |
| 126 | 126 | have hPc : ContinuousOn P (Icc 0 T) := fun t ht => (hP t ht).continuousWithinAt |
| @@ -132,7 +132,7 @@ theorem controlled_neighbor_relative_error_within | ||
| 132 | 132 | intro t ht |
| 133 | 133 | linarith only [(hcontrol t ht).1.2] |
| 134 | 134 | obtain ⟨hU₁c, hV₁c⟩ := continuousOn_velocity_rhs (ε := ε) hAc hCc hPc hQc hNc hUc hVc hNne |
| 135 | - have hs : 40*(200000*e)*Θ^21 ≤ 1 := by nlinarith only [hsmall] | |
| 135 | + have hs : 40*(200000*e)*Θ^21 ≤ 1 := by linarith only [hsmall] | |
| 136 | 136 | have herror := velocity_difference_bound_within hσ hσsmall hΘ hT0 hT |
| 137 | 137 | (show 0 ≤ 200000*e by positivity) hs hF hG hfluxF hfluxG hF0 hF₁0 hG₁0 |
| 138 | 138 | hU hV hU₁c hV₁c hZ hfluxZ (fun t ht => (hcontrol t ht).2 (U t) (V t)) |
| @@ -203,7 +203,7 @@ theorem controlled_neighbor_stage_references_within | ||
| 203 | 203 | have hm := mul_le_mul_of_nonneg_left (pow_le_pow_right₀ hΘ (by decide : 21 ≤ 40)) he |
| 204 | 204 | have hprod := mul_nonneg (show 0 ≤ neighborStabilityConstant-8 by linarith only [hK]) |
| 205 | 205 | (mul_nonneg he (pow_nonneg hΘ0 40)) |
| 206 | - nlinarith only [hsmall, hm, hprod] | |
| 206 | + linarith only [hsmall, hm, hprod] | |
| 207 | 207 | have herror := controlled_neighbor_relative_error_within hσ hσsmall hΘ hT0 hT he hε hεe |
| 208 | 208 | hlam hsmallODE (fun t _ => hF t) (fun t _ => hG t) (fun t _ => hfluxF t) (fun t _ => hfluxG t) |
| 209 | 209 | hF0 hF₁0 hG₁0 hRc hAc hCc hP hQ hN hU hV hRclose hAclose hCclose |
| @@ -218,7 +218,7 @@ theorem controlled_neighbor_stage_references_within | ||
| 218 | 218 | have hn : 0 ≤ neighborStabilityConstant*e*Θ^40 := by positivity [neighborStabilityConstant] |
| 219 | 219 | dsimp [δ] |
| 220 | 220 | unfold neighborStabilityConstant at hm hn hsmall |
| 221 | - nlinarith only [hm, hn, hsmall] | |
| 221 | + linarith only [hm, hn, hsmall] | |
| 222 | 222 | have herror' : |V t-Z t|+|U t+Z₁ t| ≤ δ*(1+lam)*F t := |
| 223 | 223 | herror t ⟨by linarith only [ht.1], ht.2⟩ |
| 224 | 224 | have hc := equation30_relative_state_consequences hσ hσsmall hlam ht.1 hδ hs |
| @@ -227,9 +227,9 @@ theorem controlled_neighbor_stage_references_within | ||
| 227 | 227 | refine ⟨hc.1, ?_, ?_⟩ |
| 228 | 228 | · dsimp [δ] at hc |
| 229 | 229 | unfold neighborStabilityConstant |
| 230 | - nlinarith only [hc.2.1, mul_nonneg (mul_nonneg (exp_pos (6:ℝ)).le he) (pow_nonneg hΘ0 29)] | |
| 230 | + linarith only [hc.2.1, mul_nonneg (mul_nonneg (exp_pos (6:ℝ)).le he) (pow_nonneg hΘ0 29)] | |
| 231 | 231 | · dsimp [δ] at hc |
| 232 | 232 | unfold neighborStabilityConstant |
| 233 | - nlinarith only [hc.2.2, mul_nonneg (mul_nonneg (exp_pos (6:ℝ)).le he) (pow_nonneg hΘ0 29)] | |
| 233 | + linarith only [hc.2.2, mul_nonneg (mul_nonneg (exp_pos (6:ℝ)).le he) (pow_nonneg hΘ0 29)] | |
| 234 | 234 | |
| 235 | 235 | end EulerPacketMovingFrame |
+2 −2 Euler/PacketNeighborStability.lean View file
| @@ -60,7 +60,7 @@ theorem velocity_difference_bound | ||
| 60 | 60 | have hδ : 0 ≤ e*Θ^12 := by positivity |
| 61 | 61 | have hs : 20*Θ^8*(e*Θ^12)*(T-0) ≤ 1/2 := by |
| 62 | 62 | have hm := mul_le_mul_of_nonneg_left hT (show 0 ≤ 20*e*Θ^20 by positivity) |
| 63 | - nlinarith only [hsmall, hm] | |
| 63 | + linarith only [hsmall, hm] | |
| 64 | 64 | have hh := equation30_perturbed_difference_bound hσ hσsmall hΘ (by norm_num : (0:ℝ) ≤ 0) |
| 65 | 65 | hT0 hT hδ hs hF hG hfluxF hfluxG hF0 hF₁0 hG₁0 hY hfluxY hZ hfluxZ hfc hgc hforcing |
| 66 | 66 | have habs (x y : ℝ) : |-x-y| = |x+y| := by rw [show -x-y = -(x+y) by ring, abs_neg] |
| @@ -119,6 +119,6 @@ theorem neighbor_initial_error_bound | ||
| 119 | 119 | have hnorm : |v₀|+|u₀| ≤ 1+lam+η := by linarith only [hv, hu, hi] |
| 120 | 120 | have h1 := mul_le_mul_of_nonneg_left hi (show 0 ≤ 20*Θ^8*Ft by positivity) |
| 121 | 121 | have h2 := mul_le_mul_of_nonneg_left hnorm (show 0 ≤ 800*e*Θ^29*Ft by positivity) |
| 122 | - nlinarith only [hb, h1, h2] | |
| 122 | + linarith only [hb, h1, h2] | |
| 123 | 123 | |
| 124 | 124 | end EulerPacketMovingFrame |
+3 −3 Euler/PacketNormalizedPrimary.lean View file
| @@ -52,7 +52,7 @@ theorem unit_hasDerivWithinAt {f : ℝ → E} {f' : E} {t : ℝ} {S : Set ℝ} | ||
| 52 | 52 | change HasDerivWithinAt (fun s => unit (f s)) |
| 53 | 53 | (‖f t‖⁻¹ • f' + (-(⟪f t,f'⟫_ℝ / ‖f t‖) / ‖f t‖^2) • f t) S t at h |
| 54 | 54 | rw [he] at h |
| 55 | - simpa only [neg_smul, sub_eq_add_neg, add_comm] using h | |
| 55 | + simpa only [neg_smul, sub_eq_add_neg] using h | |
| 56 | 56 | |
| 57 | 57 | variable [CompleteSpace E] |
| 58 | 58 | |
| @@ -69,7 +69,7 @@ theorem normalized_ray_hasDerivWithinAt (B : E →L[ℝ] E) {m : ℝ → E} {t : | ||
| 69 | 69 | unfold rayRate unit |
| 70 | 70 | rw [inner_neg_right, adjoint_inner_right, real_inner_comm (m t) (B (m t))] |
| 71 | 71 | simp only [map_smul, real_inner_smul_left, real_inner_smul_right, smul_smul, |
| 72 | - div_eq_mul_inv, neg_mul, neg_smul, smul_neg] | |
| 72 | + div_eq_mul_inv, neg_mul, smul_neg] | |
| 73 | 73 | module |
| 74 | 74 | |
| 75 | 75 | omit [CompleteSpace E] in |
| @@ -83,7 +83,7 @@ theorem normalized_velocity_hasDerivWithinAt (B : E →L[ℝ] E) | ||
| 83 | 83 | convert h using 1 |
| 84 | 84 | unfold velocityRate unit |
| 85 | 85 | simp only [inner_add_right, inner_neg_right, real_inner_smul_right, hvm, mul_zero, |
| 86 | - add_zero, map_smul, real_inner_smul_left, smul_smul, smul_add, div_eq_mul_inv, | |
| 86 | + add_zero, map_smul, real_inner_smul_left, smul_add, div_eq_mul_inv, | |
| 87 | 87 | neg_mul, neg_smul, smul_neg] |
| 88 | 88 | module |
| 89 | 89 | |
+3 −3 Euler/PacketParameterEnvelope.lean View file
| @@ -68,7 +68,7 @@ theorem source_size_le (J D : ℕ) (hJ : 2 ≤ J) (X : ℝ) (hX : 1 ≤ X) | ||
| 68 | 68 | apply (pow_le_pow_left₀ hK0 hKd R).trans |
| 69 | 69 | rw [← exp_nat_mul] |
| 70 | 70 | apply exp_le_exp.mpr |
| 71 | - nlinarith only [mul_le_mul_of_nonneg_right hRc hz] | |
| 71 | + linarith only [mul_le_mul_of_nonneg_right hRc hz] | |
| 72 | 72 | have hξF : ξ ≤ Cξ*(F*E) := hξE.trans (mul_le_mul_of_nonneg_left hEE hξC) |
| 73 | 73 | have hDF : (spike J X n)⁻¹ ≤ F*E := |
| 74 | 74 | (spike_inverse_le_exponential J hJ X hX n).trans (hExp.trans hEE) |
| @@ -87,7 +87,7 @@ theorem source_size_le (J D : ℕ) (hJ : 2 ≤ J) (X : ℝ) (hX : 1 ≤ X) | ||
| 87 | 87 | apply hCp.trans |
| 88 | 88 | gcongr |
| 89 | 89 | _ = (1120*(2*Cθ)^10)*(((J+n : ℕ) : ℝ)^20*(scaleSequence J X n)^20)*exp z := by |
| 90 | - simp only [mul_pow,← pow_mul] | |
| 90 | + simp only [mul_pow] | |
| 91 | 91 | ring |
| 92 | 92 | _ ≤ (1120*(2*Cθ)^10)*F*E := by |
| 93 | 93 | gcongr |
| @@ -95,7 +95,7 @@ theorem source_size_le (J D : ℕ) (hJ : 2 ≤ J) (X : ℝ) (hX : 1 ≤ X) | ||
| 95 | 95 | have hsum : parameterSize K Ti TiTotal Cp B (spike J X n) ξ+shear J X n ≤ |
| 96 | 96 | constant Cθ CB Cξ*(F*E) := by |
| 97 | 97 | unfold parameterSize constant |
| 98 | - nlinarith only [hFE,hKF,hTiF,hTiTotalF,hBF,hξF,hDF,hhF,hCpF] | |
| 98 | + linarith only [hFE,hKF,hTiF,hTiTotalF,hBF,hξF,hDF,hhF,hCpF] | |
| 99 | 99 | apply hsum.trans_eq |
| 100 | 100 | dsimp [F,E,z,parameterEnvelope,polynomialFactor,predecessorExponent] |
| 101 | 101 | ring |
+3 −3 Euler/PacketParentForwardBudget.lean View file
| @@ -34,10 +34,10 @@ theorem radius_guards (q : ℕ) (T R C C₁ Cp : ℝ) | ||
| 34 | 34 | have hfr := mul_nonneg hf (add_nonneg hi zero_le_one) |
| 35 | 35 | unfold radius |
| 36 | 36 | constructor |
| 37 | - · nlinarith | |
| 37 | + · linarith | |
| 38 | 38 | constructor |
| 39 | - · nlinarith | |
| 40 | - constructor <;> nlinarith | |
| 39 | + · linarith | |
| 40 | + constructor <;> linarith | |
| 41 | 41 | |
| 42 | 42 | variable {U : Type*} [NormedAddCommGroup U] [InnerProductSpace ℝ U] [CompleteSpace U] |
| 43 | 43 | |
+2 −2 Euler/PacketParentMeanBudget.lean View file
| @@ -85,8 +85,8 @@ theorem radius_guards (q : ℕ) (T Ti R C C₁ C₂ L : ℝ) | ||
| 85 | 85 | have hgc' := mul_nonneg hgc hr |
| 86 | 86 | unfold radius |
| 87 | 87 | constructor |
| 88 | - · nlinarith | |
| 89 | - constructor <;> nlinarith | |
| 88 | + · linarith | |
| 89 | + constructor <;> linarith | |
| 90 | 90 | |
| 91 | 91 | variable (D : EulerMeanPacketProvider.Data) (q : ℕ) (Ti R C C₁ C₂ : ℝ) |
| 92 | 92 | (hT : D.T ≤ 1) (hTi : D.T⁻¹ ≤ Ti) (hR : 1024 ≤ R) |
+5 −5 Euler/PacketParentTransverseCosts.lean View file
| @@ -131,7 +131,7 @@ theorem traceCost_le (T Ti : ℝ) (hT : 0 < T) (hT1 : T ≤ 1) (hi : T⁻¹ ≤ | ||
| 131 | 131 | have hs : Real.sqrt T ≤ 1 := by nlinarith [Real.sqrt_nonneg T,Real.sq_sqrt hT.le] |
| 132 | 132 | have hm := mul_le_mul hi hs (Real.sqrt_nonneg T) hTi |
| 133 | 133 | unfold traceCost |
| 134 | - nlinarith | |
| 134 | + linarith | |
| 135 | 135 | |
| 136 | 136 | theorem forwardCost_bound (q : ℕ) (S Ti R C C₁ Cp V : ℝ) |
| 137 | 137 | (hS : 0 ≤ S) (hR : 0 ≤ R) (hC : 0 ≤ C) (hC₁ : 0 ≤ C₁) (hCp : 0 ≤ Cp) |
| @@ -168,11 +168,11 @@ theorem radius_guards (q : ℕ) (T S Ti R C C₁ C₂ Cp : ℝ) | ||
| 168 | 168 | have hfr := mul_nonneg hf (add_nonneg hi zero_le_one) |
| 169 | 169 | unfold radius |
| 170 | 170 | constructor |
| 171 | - · nlinarith | |
| 171 | + · linarith | |
| 172 | 172 | constructor |
| 173 | - · nlinarith | |
| 173 | + · linarith | |
| 174 | 174 | constructor |
| 175 | - · nlinarith | |
| 176 | - constructor <;> nlinarith | |
| 175 | + · linarith | |
| 176 | + constructor <;> linarith | |
| 177 | 177 | |
| 178 | 178 | end EulerPacketParentTransverseCosts |
+3 −3 Euler/PacketPhysicalCoefficients.lean View file
| @@ -68,7 +68,7 @@ theorem physical_matrix_errors | ||
| 68 | 68 | have hG0 : 0 ≤ G := by linarith |
| 69 | 69 | have hscale : |ε/a| ≤ 2*ε := by |
| 70 | 70 | rw [abs_div, abs_of_pos hε, abs_of_pos ha0, div_le_iff₀ ha0] |
| 71 | - nlinarith only [mul_nonneg hε.le (sub_nonneg.mpr ha)] | |
| 71 | + linarith only [mul_nonneg hε.le (sub_nonneg.mpr ha)] | |
| 72 | 72 | have hBF : ∀ τ ∈ Icc 0 Θ, ∀ i j, |Bf τ i j| ≤ 4*G := by |
| 73 | 73 | intro τ hτ i j |
| 74 | 74 | have ht := hmap hτ |
| @@ -102,7 +102,7 @@ theorem physical_matrix_errors | ||
| 102 | 102 | rw [abs_mul] |
| 103 | 103 | calc |
| 104 | 104 | _ ≤ (13*G^2)*(2*ε) := mul_le_mul hrate' hscale (abs_nonneg _) (by positivity) |
| 105 | - _ ≤ 2*ε*(4*G)^2 := by nlinarith only [mul_nonneg hε.le (sq_nonneg G)] | |
| 105 | + _ ≤ 2*ε*(4*G)^2 := by linarith only [mul_nonneg hε.le (sq_nonneg G)] | |
| 106 | 106 | have hHF : ∀ τ ∈ Icc 0 Θ, HasDerivWithinAt Hf (H₁f τ) (Icc 0 Θ) τ := by |
| 107 | 107 | intro τ hτ |
| 108 | 108 | have ht := hmap hτ |
| @@ -122,7 +122,7 @@ theorem physical_matrix_errors | ||
| 122 | 122 | calc |
| 123 | 123 | _ ≤ (2*G*|Hf τ|)*(2*ε) := mul_le_mul hrate' hscale (abs_nonneg _) (by positivity) |
| 124 | 124 | _ ≤ (4*ε*(4*G))*|Hf τ| := by |
| 125 | - nlinarith only [mul_nonneg (mul_nonneg hε.le hG0) (abs_nonneg (Hf τ))] | |
| 125 | + linarith only [mul_nonneg (mul_nonneg hε.le hG0) (abs_nonneg (Hf τ))] | |
| 126 | 126 | have herr := normalized_motion_errors_within ha hε hΘ (show 1 ≤ 4*G by linarith) |
| 127 | 127 | hd hsmall hBF hEF (fun τ hτ => hDF τ hτ 0 1) (fun τ hτ => hDF τ hτ 2 1) |
| 128 | 128 | (fun τ hτ => hDFbound τ hτ 0 1) (fun τ hτ => hDFbound τ hτ 2 1) |
+1 −1 Euler/PacketPhysicalCompression.lean View file
| @@ -88,7 +88,7 @@ theorem physical_target_compression (B M E : Space →L[ℝ] Space) (h : ℝ) (m | ||
| 88 | 88 | refine ⟨hbound, ?_⟩ |
| 89 | 89 | intro hdom |
| 90 | 90 | have hd : 3*(‖B‖+‖E‖) < h*ε/(10*τ) := |
| 91 | - (lt_div_iff₀ (by positivity : 0 < 10*τ)).mpr (by nlinarith only [hdom]) | |
| 91 | + (lt_div_iff₀ (by positivity : 0 < 10*τ)).mpr (by linarith only [hdom]) | |
| 92 | 92 | rw [neg_div] at hbound |
| 93 | 93 | linarith only [hbound, hd] |
| 94 | 94 | |
+2 −2 Euler/PacketPhysicalFamily.lean View file
| @@ -108,13 +108,13 @@ theorem physical_family_amplification_and_size {α : Type*} (center : α) | ||
| 108 | 108 | (fun ξ => (hcommon ξ).1), (fun ξ => (hcommon ξ).2.1), (fun ξ => (hcommon ξ).2.2), ?_⟩ |
| 109 | 109 | have he : 0 ≤ e := by dsimp [e]; positivity |
| 110 | 110 | have hεe : ε ≤ e := by |
| 111 | - have hg : 1 ≤ (4*G)^2 := by nlinarith only [hG, sq_nonneg (G-1)] | |
| 111 | + have hg : 1 ≤ (4*G)^2 := by linarith only [hG, sq_nonneg (G-1)] | |
| 112 | 112 | have hc : 1 ≤ Θ*(4*G)^2 := by |
| 113 | 113 | simpa only [one_mul] using mul_le_mul hΘ hg |
| 114 | 114 | (by norm_num : (0:ℝ) ≤ 1) (by linarith only [hΘ] : 0 ≤ Θ) |
| 115 | 115 | have hh := mul_le_mul_of_nonneg_left hc hε.le |
| 116 | 116 | dsimp [e] |
| 117 | - nlinarith only [hh, hd, hε] | |
| 117 | + linarith only [hh, hd, hε] | |
| 118 | 118 | have hK : 1 ≤ neighborStabilityConstant := (by norm_num : (1:ℝ) ≤ 1000000000).trans neighborStabilityConstant_ge |
| 119 | 119 | have hsub : Icc (1:ℝ) T ⊆ Icc 0 T := fun _ ht => ⟨by linarith only [ht.1], ht.2⟩ |
| 120 | 120 | have htime {τ : ℝ} (hτ : τ ∈ Icc 1 T) : physicalTime t₀ a ε τ ∈ S := |
+3 −3 Euler/PacketPhysicalLowBounds.lean View file
| @@ -85,14 +85,14 @@ theorem normal_projection_quadratic_le (r z : Space) : | ||
| 85 | 85 | have h := norm_inner_le_norm (𝕜 := ℝ) r z |
| 86 | 86 | have hsq := pow_le_pow_left₀ (norm_nonneg ⟪r,z⟫_ℝ) h 2 |
| 87 | 87 | rw [Real.norm_eq_abs,sq_abs] at hsq |
| 88 | - exact (div_le_iff₀ hn).2 (by nlinarith only [hsq]) | |
| 88 | + exact (div_le_iff₀ hn).2 (by linarith only [hsq]) | |
| 89 | 89 | |
| 90 | 90 | theorem pressureTerm_upper_flux (amp slope : ℝ) (M : Matrix) (r w z : Space) |
| 91 | 91 | (hamp : 0 ≤ amp) (hslope : -1 ≤ slope) (hflux : 0 ≤ ⟪r,M w⟫_ℝ) : |
| 92 | 92 | ⟪pressureTerm amp slope M r w z,z⟫_ℝ ≤ 2*amp*⟪r,M w⟫_ℝ*‖z‖^2 := by |
| 93 | 93 | have hc : 0 ≤ 2*amp*⟪r,M w⟫_ℝ := by positivity |
| 94 | 94 | have hs : -2*amp*⟪r,M w⟫_ℝ*slope ≤ 2*amp*⟪r,M w⟫_ℝ := by |
| 95 | - nlinarith only [mul_le_mul_of_nonneg_left hslope hc] | |
| 95 | + linarith only [mul_le_mul_of_nonneg_left hslope hc] | |
| 96 | 96 | rw [pressureTerm_quadratic] |
| 97 | 97 | exact (mul_le_mul_of_nonneg_right hs (div_nonneg (sq_nonneg _) (sq_nonneg _))).trans |
| 98 | 98 | (mul_le_mul_of_nonneg_left (normal_projection_quadratic_le r z) hc) |
| @@ -177,7 +177,7 @@ theorem absolute_step_bounds (A B H J M : Matrix) (r w : Space) | ||
| 177 | 177 | have hV : 0 ≤ V := (norm_nonneg _).trans hM |
| 178 | 178 | have hv : ‖shearTerm amp (deriv (profile δ) θ) r w‖ ≤ size := |
| 179 | 179 | (shearTerm_norm_le amp _ δ r w hamp hslope).trans |
| 180 | - ((div_le_iff₀ hδ).2 (by nlinarith only [hsize])) | |
| 180 | + ((div_le_iff₀ hδ).2 (by linarith only [hsize])) | |
| 181 | 181 | have hp : ‖pressureTerm amp (deriv (profile δ) θ) M r w‖ ≤ 2*V*size := |
| 182 | 182 | (pressureTerm_norm_le amp _ δ M r w hamp hslope).trans |
| 183 | 183 | ((div_le_iff₀ hδ).2 (by nlinarith only [ |
+4 −4 Euler/PacketPhysicalNeighbor.lean View file
| @@ -79,14 +79,14 @@ theorem physical_neighbor_stage_references | ||
| 79 | 79 | have hbase : 1000000*e*Θ^40 ≤ 1 := by |
| 80 | 80 | have hnonneg := mul_nonneg (sub_nonneg.mpr hK) (mul_nonneg he (pow_nonneg hΘ0 40)) |
| 81 | 81 | change 1000000*neighborStabilityConstant*e*Θ^40 ≤ 1 at hsmall |
| 82 | - nlinarith only [hsmall, hnonneg] | |
| 82 | + linarith only [hsmall, hnonneg] | |
| 83 | 83 | have heΘ : e ≤ e*Θ^40 := by |
| 84 | 84 | simpa only [mul_one] using mul_le_mul_of_nonneg_left (one_le_pow₀ hΘ : 1 ≤ Θ^40) he |
| 85 | - have heSmall : e ≤ 1 := by nlinarith only [hbase, heΘ, he] | |
| 85 | + have heSmall : e ≤ 1 := by linarith only [hbase, heΘ, he] | |
| 86 | 86 | have hpow : e*Θ^5 ≤ e*Θ^40 := |
| 87 | 87 | mul_le_mul_of_nonneg_left (pow_le_pow_right₀ hΘ (by decide : 5 ≤ 40)) he |
| 88 | 88 | have hsmallRay : 400*(4*e)*Θ^5 ≤ 1 := by |
| 89 | - nlinarith only [hbase, hpow, mul_nonneg he (pow_nonneg hΘ0 5)] | |
| 89 | + linarith only [hbase, hpow, mul_nonneg he (pow_nonneg hΘ0 5)] | |
| 90 | 90 | have ha0 : 0 < a := by linarith |
| 91 | 91 | have hσsq : σ^2 ≤ 1 := by nlinarith only [hσ, hσsmall] |
| 92 | 92 | have herr := physical_matrix_errors ha hε hΘ hG hd heSmall hmap hBd hmd hvd hm0 hv0 hmv |
| @@ -150,7 +150,7 @@ theorem physical_neighbor_stage_references | ||
| 150 | 150 | refine ⟨?_, ?_⟩ |
| 151 | 151 | · intro τ hτ |
| 152 | 152 | refine ⟨?_, (hnear τ hτ).2, hpair τ hτ⟩ |
| 153 | - nlinarith only [(hnear τ hτ).1] | |
| 153 | + linarith only [(hnear τ hτ).1] | |
| 154 | 154 | · exact controlled_neighbor_stage_references_within hσ hσsmall hΘ hT0 hT he hε.le herr.1 hlam hsmall |
| 155 | 155 | hRmc hAmc hCmc hP hQ hN (fun τ hτ => (hUV τ hτ).1) (fun τ hτ => (hUV τ hτ).2) |
| 156 | 156 | hRclose (fun τ hτ => (herr.2 τ (hsub hτ)).2.1) (fun τ hτ => (herr.2 τ (hsub hτ)).2.2) |
+7 −7 Euler/PacketPhysicalNormBounds.lean View file
| @@ -46,7 +46,7 @@ theorem scaledRay_norm_le_norm3 (m v r : ℝ → Space) {s₀ t₀ a ε τ : ℝ | ||
| 46 | 46 | dsimp [norm3] |
| 47 | 47 | have hbound := mul_le_mul_of_nonneg_left hε1 |
| 48 | 48 | (show 0 ≤ s₀*|scaledRay m v r s₀ t₀ a ε τ 1| by positivity) |
| 49 | - nlinarith only [hh, hbound] | |
| 49 | + linarith only [hh, hbound] | |
| 50 | 50 | |
| 51 | 51 | theorem scaledVelocity_norm_le_norm3 (m v w : ℝ → Space) {t₀ a ε τ : ℝ} |
| 52 | 52 | (hε : 0 < ε) (hε1 : ε ≤ 1) |
| @@ -66,7 +66,7 @@ theorem scaledVelocity_norm_le_norm3 (m v w : ℝ → Space) {t₀ a ε τ : ℝ | ||
| 66 | 66 | dsimp [norm3] |
| 67 | 67 | have h0 := mul_le_mul_of_nonneg_right hε1 (abs_nonneg (scaledVelocity m v w t₀ a ε τ 0)) |
| 68 | 68 | have h2 := mul_le_mul_of_nonneg_right hε1 (abs_nonneg (scaledVelocity m v w t₀ a ε τ 2)) |
| 69 | - nlinarith only [hh, h0, h2] | |
| 69 | + linarith only [hh, h0, h2] | |
| 70 | 70 | |
| 71 | 71 | theorem physical_size_ge_second (m v r w : ℝ → Space) {s₀ t₀ a ε τ : ℝ} |
| 72 | 72 | (hs₀ : 0 < s₀) (hε : ε ≠ 0) |
| @@ -85,7 +85,7 @@ theorem physical_size_ge_second (m v r w : ℝ → Space) {s₀ t₀ a ε τ : | ||
| 85 | 85 | have hnpos : 0 ≤ scaledRay m v r s₀ t₀ a ε τ 2 := by linarith only [hN] |
| 86 | 86 | rw [abs_of_pos hs₀, abs_of_nonneg hnpos] at hn |
| 87 | 87 | have hr : s₀/2 ≤ ‖r (physicalTime t₀ a ε τ)‖ := by |
| 88 | - nlinarith only [hn, mul_le_mul_of_nonneg_left hN hs₀.le] | |
| 88 | + linarith only [hn, mul_le_mul_of_nonneg_left hN hs₀.le] | |
| 89 | 89 | have hw := frame_coordinate_abs_le_norm (unit (m (physicalTime t₀ a ε τ))) |
| 90 | 90 | (unit (v (physicalTime t₀ a ε τ))) (w (physicalTime t₀ a ε τ)) |
| 91 | 91 | (unit_inner_self hm) (unit_inner_self hv) (unit_inner_zero hmv) 1 |
| @@ -94,7 +94,7 @@ theorem physical_size_ge_second (m v r w : ℝ → Space) {s₀ t₀ a ε τ : | ||
| 94 | 94 | norm_num [velocityScale, Fin.ext_iff] at hw |
| 95 | 95 | rw [abs_of_nonneg hV] at hw |
| 96 | 96 | have hp := mul_le_mul hr hw hV (norm_nonneg _) |
| 97 | - nlinarith only [hp] | |
| 97 | + linarith only [hp] | |
| 98 | 98 | |
| 99 | 99 | theorem physical_size_le_scaled_state (m v r w : ℝ → Space) |
| 100 | 100 | {s₀ t₀ a ε τ Θ ρ P₀ Q₀ : ℝ} |
| @@ -124,13 +124,13 @@ theorem physical_size_le_scaled_state (m v r w : ℝ → Space) | ||
| 124 | 124 | have hV : norm3 (V 0) (V 1) (V 2) ≤ 7*Θ^2*(|V 0|+|V 1|) := by |
| 125 | 125 | dsimp [norm3] |
| 126 | 126 | have ht := mul_le_mul_of_nonneg_right hΘ2 (add_nonneg (abs_nonneg (V 0)) (abs_nonneg (V 1))) |
| 127 | - nlinarith only [hw, ht] | |
| 127 | + linarith only [hw, ht] | |
| 128 | 128 | have hrn := scaledRay_norm_le_norm3 m v r hs₀ hε hε1 hm hv hmv |
| 129 | 129 | have hwn := scaledVelocity_norm_le_norm3 m v w hε hε1 hm hv hmv |
| 130 | 130 | have hr' : ‖r (physicalTime t₀ a ε τ)‖ ≤ 7*s₀*Θ^2 := by |
| 131 | - nlinarith only [hrn, mul_le_mul_of_nonneg_left hR hs₀.le] | |
| 131 | + linarith only [hrn, mul_le_mul_of_nonneg_left hR hs₀.le] | |
| 132 | 132 | have hw' := hwn.trans hV |
| 133 | 133 | have hb := mul_le_mul hr' hw' (norm_nonneg _) (show 0 ≤ 7*s₀*Θ^2 by positivity) |
| 134 | - nlinarith only [hb] | |
| 134 | + linarith only [hb] | |
| 135 | 135 | |
| 136 | 136 | end EulerPacketMovingFrame |
+6 −6 Euler/PacketPhysicalPropagator.lean View file
| @@ -66,11 +66,11 @@ theorem physical_tangent_propagator | ||
| 66 | 66 | change 8000000*e*Θ^21 ≤ 1 at hsmall |
| 67 | 67 | have heΘ : e ≤ e*Θ^21 := by |
| 68 | 68 | simpa only [mul_one] using mul_le_mul_of_nonneg_left (one_le_pow₀ hΘ : 1 ≤ Θ^21) he |
| 69 | - have heSmall : e ≤ 1 := by nlinarith only [hsmall, heΘ, he] | |
| 69 | + have heSmall : e ≤ 1 := by linarith only [hsmall, heΘ, he] | |
| 70 | 70 | have hpow : e*Θ^5 ≤ e*Θ^21 := |
| 71 | 71 | mul_le_mul_of_nonneg_left (pow_le_pow_right₀ hΘ (by decide : 5 ≤ 21)) he |
| 72 | 72 | have hsmallRay : 400*(4*e)*Θ^5 ≤ 1 := by |
| 73 | - nlinarith only [hsmall, hpow, mul_nonneg he (pow_nonneg hΘ0 5)] | |
| 73 | + linarith only [hsmall, hpow, mul_nonneg he (pow_nonneg hΘ0 5)] | |
| 74 | 74 | have ha0 : 0 < a := by linarith |
| 75 | 75 | have hσsq : σ^2 ≤ 1 := by nlinarith only [hσ, hσsmall] |
| 76 | 76 | have herr := physical_matrix_errors ha hε hΘ hG hd heSmall hmap hBd hmd hvd hm0 hv0 hmv |
| @@ -146,9 +146,9 @@ theorem physical_tangent_propagator | ||
| 146 | 146 | have hε1 : ε ≤ 1 := herr.1.trans heSmall |
| 147 | 147 | have hρ0 : 0 ≤ 800*e*Θ^5 := by positivity |
| 148 | 148 | have hρ : 800*e*Θ^5 ≤ 1/2 := by |
| 149 | - nlinarith only [hsmall, hpow, mul_nonneg he (pow_nonneg hΘ0 5)] | |
| 149 | + linarith only [hsmall, hpow, mul_nonneg he (pow_nonneg hΘ0 5)] | |
| 150 | 150 | have hrt : norm3 (Rp t 0-σ^2*t^2) (Rp t 1+2*σ^2*t) (Rp t 2-1) ≤ 800*e*Θ^5 := by |
| 151 | - nlinarith only [(hnear t htT).1] | |
| 151 | + linarith only [(hnear t htT).1] | |
| 152 | 152 | have hPt : |Rp t 0-σ^2*t^2| ≤ 800*e*Θ^5 := by |
| 153 | 153 | dsimp [norm3] at hrt |
| 154 | 154 | linarith only [hrt, abs_nonneg (Rp t 1+2*σ^2*t), abs_nonneg (Rp t 2-1)] |
| @@ -163,11 +163,11 @@ theorem physical_tangent_propagator | ||
| 163 | 163 | have ht2 : t^2 ≤ Θ^2 := (sq_le_sq₀ htT.1 hΘ0).mpr htΘ |
| 164 | 164 | have hP₀ : |σ^2*t^2| ≤ Θ^2 := by |
| 165 | 165 | rw [abs_of_nonneg (by positivity : 0 ≤ σ^2*t^2)] |
| 166 | - nlinarith only [mul_le_mul_of_nonneg_right hσsq (sq_nonneg t), ht2] | |
| 166 | + linarith only [mul_le_mul_of_nonneg_right hσsq (sq_nonneg t), ht2] | |
| 167 | 167 | have hQ₀ : |-2*σ^2*t| ≤ 2*Θ^2 := by |
| 168 | 168 | rw [abs_mul, abs_mul, abs_of_nonneg (sq_nonneg σ), abs_of_nonneg htT.1] |
| 169 | 169 | norm_num only [abs_neg, abs_of_nonneg (by norm_num : (0:ℝ) ≤ 2)] |
| 170 | - nlinarith only [mul_le_mul_of_nonneg_right hσsq htT.1, htΘ, hΘ, sq_nonneg (Θ-1)] | |
| 170 | + linarith only [mul_le_mul_of_nonneg_right hσsq htT.1, htΘ, hΘ, sq_nonneg (Θ-1)] | |
| 171 | 171 | have hfinish := physical_velocity_le_scaled_state m v r w hs₀ hε hε1 |
| 172 | 172 | (hm0 _ htimeT) (hv0 _ htimeT) (hmv _ htimeT) (hpair t htT) hΘ hρ0 hρ hP₀ hQ₀ hPt hQt hNt |
| 173 | 173 | have hstart := scaled_pair_le_physical_norm m v w hε hε1 (hm0 _ htimeS) (hv0 _ htimeS) (hmv _ htimeS) |
+12 −12 Euler/PacketPhysicalSign.lean View file
| @@ -42,20 +42,20 @@ theorem controlled_pressure_ratio_lower | ||
| 42 | 42 | have hρ : ρ ≤ 1/2 := by |
| 43 | 43 | have hp := scaled_power_le hΘ hK he (by decide : 5 ≤ 40) |
| 44 | 44 | dsimp [ρ] |
| 45 | - nlinarith only [hp, hsmall] | |
| 45 | + linarith only [hp, hsmall] | |
| 46 | 46 | have hη : η ≤ 1/2 := by |
| 47 | 47 | have hp := mul_le_mul_of_nonneg_left (pow_le_pow_right₀ hΘ (by decide : 29 ≤ 40)) |
| 48 | 48 | (mul_nonneg hK0 he) |
| 49 | 49 | dsimp [η] |
| 50 | - nlinarith only [hp, hsmall] | |
| 50 | + linarith only [hp, hsmall] | |
| 51 | 51 | have ht2 : τ^2 ≤ Θ^2 := (sq_le_sq₀ hτ0 hΘ0).mpr hτΘ |
| 52 | 52 | have hP₀ : |σ^2*τ^2| ≤ Θ^2 := by |
| 53 | 53 | rw [abs_of_nonneg (mul_nonneg (sq_nonneg σ) (sq_nonneg τ))] |
| 54 | - nlinarith only [mul_le_mul_of_nonneg_right hσ2 (sq_nonneg τ), ht2] | |
| 54 | + linarith only [mul_le_mul_of_nonneg_right hσ2 (sq_nonneg τ), ht2] | |
| 55 | 55 | have hQ₀ : |-2*σ^2*τ| ≤ 2*Θ^2 := by |
| 56 | 56 | rw [abs_mul, abs_mul, abs_of_nonneg (sq_nonneg σ), abs_of_nonneg hτ0] |
| 57 | 57 | norm_num only [abs_neg, abs_of_nonneg (by norm_num : (0:ℝ) ≤ 2)] |
| 58 | - nlinarith only [mul_le_mul_of_nonneg_right hσ2 hτ0, hτΘ, hΘ, sq_nonneg (Θ-1)] | |
| 58 | + linarith only [mul_le_mul_of_nonneg_right hσ2 hτ0, hτΘ, hΘ, sq_nonneg (Θ-1)] | |
| 59 | 59 | obtain ⟨_, hp, hq, hn, hw, _, _⟩ := ray_geometric_bounds (ε := 0) (U := r) (V := 1) |
| 60 | 60 | hΘ hρ0 hρ hP₀ hQ₀ hP hQ hN |
| 61 | 61 | have hβ : |σ^2| ≤ 1 := by simpa only [abs_of_nonneg (sq_nonneg σ)] using hσ2 |
| @@ -63,8 +63,8 @@ theorem controlled_pressure_ratio_lower | ||
| 63 | 63 | ((σ^2*τ^2+σ^2)*1+(-2*σ^2*τ)*r)| ≤ j*(|r|+|1|) := by |
| 64 | 64 | have hh := velocity_numerator_error hΘ hρ0 (show 0 ≤ 3*e by positivity) |
| 65 | 65 | hβ hA hp hq hn hP hQ hN hw |
| 66 | - dsimp [j, ρ] at * | |
| 67 | - nlinarith only [hh] | |
| 66 | + dsimp [ρ] at * | |
| 67 | + linarith only [hh] | |
| 68 | 68 | have hslope := equation30_primary_logderivative_bound hσ hσsmall hZ hfluxZ hZ0 hZ₁0 τ hτ |
| 69 | 69 | have hr₀ : |-Z₁ τ/Z τ| ≤ 4 := by simpa only [neg_div, abs_neg] using hslope |
| 70 | 70 | have hr' : |r/1-(-Z₁ τ/Z τ)| ≤ 10*η := by |
| @@ -77,13 +77,13 @@ theorem controlled_pressure_ratio_lower | ||
| 77 | 77 | have hp33 := mul_le_mul_of_nonneg_left (pow_le_pow_right₀ hΘ (by decide : 33 ≤ 40)) |
| 78 | 78 | (mul_nonneg hK0 he) |
| 79 | 79 | have hs : (10*j+20*Θ^2*η)*Θ^2 ≤ 1/2 := by |
| 80 | - dsimp [j, η] | |
| 81 | - nlinarith only [hp6, hp7, hp33, hsmall] | |
| 80 | + dsimp [η] | |
| 81 | + linarith only [hp6, hp7, hp33, hsmall] | |
| 82 | 82 | have hστ : 1 ≤ σ^2*Θ^2 := by |
| 83 | 83 | have hh := mul_le_mul hσΘ hσΘ (by norm_num : (0:ℝ) ≤ 1) (by positivity : 0 ≤ σ*Θ) |
| 84 | - nlinarith only [hh] | |
| 84 | + linarith only [hh] | |
| 85 | 85 | apply (mul_le_mul_iff_right₀ (sq_pos_of_pos hΘpos)).mp |
| 86 | - nlinarith only [hs, hστ] | |
| 86 | + linarith only [hs, hστ] | |
| 87 | 87 | have hZpos := equation30_global_positive hσ hσsmall hZ hfluxZ hZ0 hZ₁0 τ hτ0 |
| 88 | 88 | have hnum := equation30_ideal_numerator_positive hσ hσsmall hZ hfluxZ hZ0 hZ₁0 τ hτ0 |
| 89 | 89 | have hideal : σ^2 ≤ σ^2*τ^2+σ^2+(-2*σ^2*τ)*(-Z₁ τ/Z τ) := by |
| @@ -91,7 +91,7 @@ theorem controlled_pressure_ratio_lower | ||
| 91 | 91 | have hz : Z τ ≠ 0 := ne_of_gt hZpos |
| 92 | 92 | have hid : (σ^2*τ^2+σ^2+(-2*σ^2*τ)*(-Z₁ τ/Z τ))*Z τ = |
| 93 | 93 | (σ^2*τ^2+σ^2)*Z τ+2*σ^2*τ*Z₁ τ := by field_simp |
| 94 | - nlinarith only [hid, hnum] | |
| 94 | + linarith only [hid, hnum] | |
| 95 | 95 | linarith only [(abs_le.mp herr).1, herrorSmall, hideal] |
| 96 | 96 | |
| 97 | 97 | /-- Source (33), stated for the actual physical ray and velocity. -/ |
| @@ -121,7 +121,7 @@ theorem physical_pressure_positive_order40 (M : Space →L[ℝ] Space) (m v r w | ||
| 121 | 121 | let R := scaledRay m v r s₀ t₀ a ε τ |
| 122 | 122 | let V := scaledVelocity m v w t₀ a ε τ |
| 123 | 123 | have hp := scaled_power_le hΘ hK he (by decide : 5 ≤ 40) |
| 124 | - have hρ : 800*e*Θ^5 ≤ 1/2 := by nlinarith only [hp, hsmall] | |
| 124 | + have hρ : 800*e*Θ^5 ≤ 1/2 := by linarith only [hp, hsmall] | |
| 125 | 125 | have hNne : R 2 ≠ 0 := by |
| 126 | 126 | have hh := (abs_le.mp hN).1 |
| 127 | 127 | change -(800*e*Θ^5) ≤ R 2-1 at hh |
+2 −2 Euler/PacketPhysicalSize.lean View file
| @@ -29,7 +29,7 @@ def normalizedTilt (M : Space →L[ℝ] Space) (r w : Space) : ℝ := | ||
| 29 | 29 | theorem normalizedCoupling_eq (M : Space →L[ℝ] Space) (r w : Space) : |
| 30 | 30 | normalizedCoupling M r w = ⟪r,M w⟫_ℝ/(‖r‖*‖w‖) := by |
| 31 | 31 | simp only [normalizedCoupling, unit, map_smul, real_inner_smul_left, |
| 32 | - real_inner_smul_right, div_eq_mul_inv, mul_inv_rev] | |
| 32 | + real_inner_smul_right, div_eq_mul_inv] | |
| 33 | 33 | ring |
| 34 | 34 | |
| 35 | 35 | theorem cross_smul_smul (a b : ℝ) (r w : Space) : |
| @@ -79,7 +79,7 @@ theorem scaledVelocity_norm_sq (m v w : ℝ → Space) {t₀ a ε τ : ℝ} | ||
| 79 | 79 | change (∑ j : Fin 3, (movingVelocity m v w (physicalTime t₀ a ε τ) j)^2) = _ at h |
| 80 | 80 | simp_rw [← scaledVelocity_restore m v w hε] at h |
| 81 | 81 | norm_num [Fin.sum_univ_three, velocityScale, Fin.ext_iff] at h |
| 82 | - nlinarith only [h] | |
| 82 | + linarith only [h] | |
| 83 | 83 | |
| 84 | 84 | theorem scaledVelocity_norm_ratio_sq (m v w : ℝ → Space) {t₀ a ε τ : ℝ} |
| 85 | 85 | (hε : ε ≠ 0) (hm : m (physicalTime t₀ a ε τ) ≠ 0) (hv : v (physicalTime t₀ a ε τ) ≠ 0) |
+4 −4 Euler/PacketPressureScaleCosts.lean View file
| @@ -46,7 +46,7 @@ def badCostSpec (Cθ CM CMn CHn c : ℝ) (hθ : 0 ≤ Cθ) | ||
| 46 | 46 | |
| 47 | 47 | theorem sigma_exponential_bound (σ x : ℝ) (hσ : 0 < σ) (hσx : σ*x ≤ 2) : |
| 48 | 48 | exp (-(1/(4*σ))) ≤ exp (-x/8) := by |
| 49 | - have hdiv : x/8 ≤ 1/(4*σ) := (le_div_iff₀ (by positivity : 0 < 4*σ)).2 (by nlinarith) | |
| 49 | + have hdiv : x/8 ≤ 1/(4*σ) := (le_div_iff₀ (by positivity : 0 < 4*σ)).2 (by linarith) | |
| 50 | 50 | apply exp_le_exp.mpr |
| 51 | 51 | linarith only [hdiv] |
| 52 | 52 | |
| @@ -110,7 +110,7 @@ theorem badCost_bound (J : ℕ) (hJ : 3 ≤ J) (Cθ CM CMn CHn c : ℝ) | ||
| 110 | 110 | (badConstant*((4+CMn+CHn)*exp (c*z))^degree*(2*Cθ*j^2*(x n)^2)^5*exp (-x n/8)) := hfirst |
| 111 | 111 | _ = B*j^10*(x n)^10*((exp z)^2*(exp (c*z))^degree*exp (-x n/8)) := by |
| 112 | 112 | dsimp [B] |
| 113 | - simp only [mul_pow,← pow_mul] | |
| 113 | + simp only [mul_pow] | |
| 114 | 114 | ring |
| 115 | 115 | _ = B*j^10*(x n)^10*exp (-(1/8)*(x n/j^0)+((degree : ℝ)*c+2)*z) := by rw [hexp] |
| 116 | 116 | _ ≤ badCoefficient Cθ CM CMn CHn*j^10*(x n)^10* |
| @@ -119,7 +119,7 @@ theorem badCost_bound (J : ℕ) (hJ : 3 ≤ J) (Cθ CM CMn CHn c : ℝ) | ||
| 119 | 119 | change B ≤ 1+B |
| 120 | 120 | linarith |
| 121 | 121 | _ = badCost J Cθ CM CMn CHn c x n := by |
| 122 | - simp only [badCost,monomialCost,j,z,p,rpow_zero,pow_zero,div_one] | |
| 122 | + simp only [badCost,monomialCost,j,z,p,rpow_zero,pow_zero] | |
| 123 | 123 | |
| 124 | 124 | theorem goodCost_bound (J : ℕ) (hJ : 1 ≤ J) (X CM M δ hchild : ℝ) |
| 125 | 125 | (hM : 0 ≤ CM) (hδ : 0 ≤ δ) (hh : 0 ≤ hchild) |
| @@ -166,7 +166,7 @@ theorem parameters_le_source_exponential (J D : ℕ) (hJ : 3 ≤ J) (X c : ℝ) | ||
| 166 | 166 | calc |
| 167 | 167 | _ ≤ z := div_le_div_of_nonneg_left hxp.le (by positivity) |
| 168 | 168 | (pow_le_pow_right₀ hp (by decide : 4 ≤ 7)) |
| 169 | - _ ≤ c*z := by nlinarith only [mul_le_mul_of_nonneg_right hc hz] | |
| 169 | + _ ≤ c*z := by linarith only [mul_le_mul_of_nonneg_right hc hz] | |
| 170 | 170 | exact parameter_sum_le K Ti Hi cm ch CMn CHn (exp (c*z)) |
| 171 | 171 | (one_le_exp (mul_nonneg (zero_le_one.trans hc) hz)) hK' hTi' hHi hcm hch hMn hHn |
| 172 | 172 | |
+6 −6 Euler/PacketPrimaryGradeBounds.lean View file
| @@ -54,23 +54,23 @@ theorem grade_fields : | ||
| 54 | 54 | have hv : ((vectorField τ hτ hτT B Y).normalized D.T_pos.le L.fullProfile |
| 55 | 55 | L.fullProfile_pos).WordBound 6 L.R ((H.commonCost*C)*α) 3 := by |
| 56 | 56 | intro n |
| 57 | - simpa only [Field.normalized_path,vectorField,Nat.zero_add,mul_assoc,mul_left_comm,mul_comm] using H.velocity_common_bound Y _ ha 0 hYb n | |
| 57 | + simpa only [Field.normalized_path,vectorField,Nat.zero_add,mul_assoc,mul_left_comm] using H.velocity_common_bound Y _ ha 0 hYb n | |
| 58 | 58 | have ht : ((vectorDerivativeField τ hτ hτT B Y).normalized D.T_pos.le L.fullProfile |
| 59 | 59 | L.fullProfile_pos).WordBound 6 L.R ((H.commonCost*C)*α) 3 := by |
| 60 | 60 | intro n |
| 61 | - simpa only [Field.normalized_path,vectorDerivativeField,Nat.zero_add,mul_assoc,mul_left_comm,mul_comm] using H.derivative_common_bound Y _ ha 0 hYb n | |
| 61 | + simpa only [Field.normalized_path,vectorDerivativeField,Nat.zero_add,mul_assoc,mul_left_comm] using H.derivative_common_bound Y _ ha 0 hYb n | |
| 62 | 62 | have hc : ((correctorField τ hτ hτT B Y).normalized D.T_pos.le L.fullProfile |
| 63 | 63 | L.fullProfile_pos).WordBound 6 L.R ((H.correctorAmplitude (P := P) N*C)*α) 4 := by |
| 64 | 64 | intro n |
| 65 | - simpa only [Field.normalized_path,correctorField,Nat.zero_add,mul_assoc,mul_left_comm,mul_comm] using H.corrector_bound N Y _ ha 0 hYb n | |
| 65 | + simpa only [Field.normalized_path,correctorField,Nat.zero_add,mul_assoc,mul_left_comm] using H.corrector_bound N Y _ ha 0 hYb n | |
| 66 | 66 | have hct : ((correctorDerivativeField τ hτ hτT B Y).normalized D.T_pos.le L.fullProfile |
| 67 | 67 | L.fullProfile_pos).WordBound 6 L.R ((H.correctorTimeAmplitude (P := P) N*C)*α) 4 := by |
| 68 | 68 | intro n |
| 69 | - simpa only [Field.normalized_path,correctorDerivativeField,Nat.zero_add,mul_assoc,mul_left_comm,mul_comm] using H.corrector_time_bound N Y _ ha 0 hYb n | |
| 69 | + simpa only [Field.normalized_path,correctorDerivativeField,Nat.zero_add,mul_assoc,mul_left_comm] using H.corrector_time_bound N Y _ ha 0 hYb n | |
| 70 | 70 | have hp : ((scalarGradientField τ hτ hτT B Y).normalized D.T_pos.le L.fullProfile |
| 71 | 71 | L.fullProfile_pos).WordBound 6 L.R ((3*H.pressureAmplitude (P := P) N*C)*α) 4 := by |
| 72 | 72 | intro n |
| 73 | - simpa only [Field.normalized_path,Nat.zero_add,mul_assoc,mul_left_comm,mul_comm] using H.pressure_gradient_bound N Y _ ha 0 hYb n | |
| 73 | + simpa only [Field.normalized_path,Nat.zero_add,mul_assoc,mul_left_comm] using H.pressure_gradient_bound N Y _ ha 0 hYb n | |
| 74 | 74 | refine ⟨?_,?_,?_,?_,?_⟩ |
| 75 | 75 | · exact (hv.scale_profile D.T_pos.le L.fullProfile L.fullProfile_pos α hα).absorb_amplitude_to |
| 76 | 76 | L.radius_bounds.1 (mul_nonneg H.commonCost_nonneg W.terminal_nonneg) W.common (by norm_num [highShift]) |
| @@ -143,7 +143,7 @@ theorem scaled_initialData_bound (n : ℕ) : | ||
| 143 | 143 | (α*(wordCost (Fin 4) 6 δ*‖ξ‖))*majorant L.R 0 n := by |
| 144 | 144 | have hh := initialData_common_radius D δ hδ (α • ξ) hs standardDirection |
| 145 | 145 | (fun i => by cases i using Fin.cases <;> simp [Prod.norm_def]) 6 hδ1 L.R hR n |
| 146 | - simpa only [norm_smul,Real.norm_eq_abs,abs_of_pos hα,mul_assoc,mul_left_comm,mul_comm] using hh | |
| 146 | + simpa only [norm_smul,Real.norm_eq_abs,abs_of_pos hα,mul_assoc,mul_comm] using hh | |
| 147 | 147 | |
| 148 | 148 | include W in |
| 149 | 149 | /-- The literal α χ₁ fδ ξT terminal datum supplies the required primary |
+1 −1 Euler/PacketRadiusCostPolynomial.lean View file
| @@ -131,7 +131,7 @@ def radiusPolynomial : Polynomial ℝ := | ||
| 131 | 131 | |
| 132 | 132 | theorem radiusPolynomial_eval (W : ℝ) : radiusPolynomial.eval W=radiusEnvelope W := by |
| 133 | 133 | simp only [radiusPolynomial,radiusEnvelope,requiredEnvelope,weakEnvelope,strongEnvelope, |
| 134 | - inverseEnvelope,formEnvelope,endpointEnvelope,forwardEnvelope,jetEnvelope,meanEnvelope, | |
| 134 | + formEnvelope,endpointEnvelope,forwardEnvelope,jetEnvelope,meanEnvelope, | |
| 135 | 135 | gradeEnvelope,commonEnvelope,physicalEnvelope,normalEnvelope,pressureEnvelope,terminalEnvelope, |
| 136 | 136 | coeffPoly,Polynomial.eval_add,Polynomial.eval_mul,Polynomial.eval_pow,Polynomial.eval_ofNat, |
| 137 | 137 | Polynomial.eval_one,Polynomial.eval_X,Polynomial.eval_C,inversePolynomial_eval, |
+1 −1 Euler/PacketReferenceRatio.lean View file
| @@ -45,6 +45,6 @@ theorem equation30_slope_ratio_dominates | ||
| 45 | 45 | have hr := hmono ⟨hs, hst⟩ ⟨ht, le_rfl⟩ hst |
| 46 | 46 | have hp := (div_le_div_iff₀ (hFp s hs) (hFp t ht)).mp hr |
| 47 | 47 | apply (div_le_div_iff₀ (hFp s hs) (hZp s hs)).mpr |
| 48 | - nlinarith only [hp] | |
| 48 | + linarith only [hp] | |
| 49 | 49 | |
| 50 | 50 | end EulerPacketMovingFrame |
+3 −4 Euler/PacketScalarPressureGrade.lean View file
| @@ -49,8 +49,7 @@ theorem angularGradientField_normalized_bound (hT : 0 ≤ T) | ||
| 49 | 49 | ((EulerPacketPressure.angularGradientField P raw p hp he m).normalized hT g hg).WordBound |
| 50 | 50 | q R A (d+1) := by |
| 51 | 51 | let L := (toSpanSingleton ℝ m).comp scalarProject |
| 52 | - have hL : ‖L‖ ≤ 1 := by | |
| 53 | - exact (opNorm_comp_le _ _).trans (by simpa only [norm_toSpanSingleton,scalarProject_norm,mul_one]) | |
| 52 | + have hL : ‖L‖ ≤ 1 := (opNorm_comp_le _ _).trans (by simpa only [norm_toSpanSingleton,scalarProject_norm,mul_one]) | |
| 54 | 53 | have hh := (hb.normalized_derivative hT 0).map L |
| 55 | 54 | have hh' := hh.mono_amplitude hR (by simpa only [one_mul] using mul_le_mul_of_nonneg_right hL hA) |
| 56 | 55 | apply hh'.of_path_eq |
| @@ -129,7 +128,7 @@ theorem Budget.angular_grade_bound (L : Budget D τ hτ hτT B (Fin 4) 6) | ||
| 129 | 128 | (c • L.fullProfile) (smul_profile_pos L.fullProfile L.fullProfile_pos c hc) |
| 130 | 129 | D.m₀ D.m₀_unit.le (zero_le_one.trans L.radius_bounds.1) zero_le_one |
| 131 | 130 | (L.scalar_grade_bound_pred N W G F c hc p hp hforce) |
| 132 | - simpa only [angularField,Field.WordBound,Field.normalized_path, | |
| 131 | + simpa only [angularField,Field.normalized_path, | |
| 133 | 132 | show highShift p-1+1=highShift p by unfold highShift; omega] using hh |
| 134 | 133 | |
| 135 | 134 | end EulerTransversePacketJoin |
| @@ -166,7 +165,7 @@ theorem Budget.scalar_grade_bound_pred | ||
| 166 | 165 | L.fullProfile_pos).WordBound 6 L.R ((H.pressureAmplitude (P := P) N*C)*α) 3 := by |
| 167 | 166 | apply scalarEmbeddingField_normalized_bound _ _ _ _ D.T_pos.le L.fullProfile L.fullProfile_pos |
| 168 | 167 | intro n |
| 169 | - simpa only [Nat.zero_add,mul_assoc,mul_left_comm,mul_comm] using | |
| 168 | + simpa only [Nat.zero_add,mul_assoc,mul_left_comm] using | |
| 170 | 169 | H.pressure_bound N Y (α*C) (mul_nonneg hα.le W.terminal_nonneg) 0 hYb n |
| 171 | 170 | have hnonneg := mul_nonneg (H.pressureAmplitude_nonneg (P := P) N) W.terminal_nonneg |
| 172 | 171 | have hcost : H.pressureAmplitude (P := P) N*C ≤ L.R := by |
+3 −3 Euler/PacketShearMotion.lean View file
| @@ -41,7 +41,7 @@ theorem physical_shear_motion_bound | ||
| 41 | 41 | have hG0 : 0 ≤ G := by linarith |
| 42 | 42 | have hscale : |ε/a| ≤ 2*ε := by |
| 43 | 43 | rw [abs_div, abs_of_pos hε, abs_of_pos ha0, div_le_iff₀ ha0] |
| 44 | - nlinarith only [mul_nonneg hε.le (sub_nonneg.mpr ha)] | |
| 44 | + linarith only [mul_nonneg hε.le (sub_nonneg.mpr ha)] | |
| 45 | 45 | have hBF : ∀ τ ∈ Icc 0 Θ, ∀ i j, |Bf τ i j| ≤ 4*G := by |
| 46 | 46 | intro τ hτ i j |
| 47 | 47 | have ht := hmap hτ |
| @@ -75,7 +75,7 @@ theorem physical_shear_motion_bound | ||
| 75 | 75 | rw [abs_mul] |
| 76 | 76 | calc |
| 77 | 77 | _ ≤ (13*G^2)*(2*ε) := mul_le_mul hrate' hscale (abs_nonneg _) (by positivity) |
| 78 | - _ ≤ 2*ε*(4*G)^2 := by nlinarith only [mul_nonneg hε.le (sq_nonneg G)] | |
| 78 | + _ ≤ 2*ε*(4*G)^2 := by linarith only [mul_nonneg hε.le (sq_nonneg G)] | |
| 79 | 79 | have hHF : ∀ τ ∈ Icc 0 Θ, HasDerivWithinAt Hf (H₁f τ) (Icc 0 Θ) τ := by |
| 80 | 80 | intro τ hτ |
| 81 | 81 | have ht := hmap hτ |
| @@ -95,7 +95,7 @@ theorem physical_shear_motion_bound | ||
| 95 | 95 | calc |
| 96 | 96 | _ ≤ (2*G*|Hf τ|)*(2*ε) := mul_le_mul hrate' hscale (abs_nonneg _) (by positivity) |
| 97 | 97 | _ ≤ (4*ε*(4*G))*|Hf τ| := by |
| 98 | - nlinarith only [mul_nonneg (mul_nonneg hε.le hG0) (abs_nonneg (Hf τ))] | |
| 98 | + linarith only [mul_nonneg (mul_nonneg hε.le hG0) (abs_nonneg (Hf τ))] | |
| 99 | 99 | have herr := normalized_motion_errors_within ha hε hΘ (show 1 ≤ 4*G by linarith) |
| 100 | 100 | hd hsmall hBF hEF (fun τ hτ => hDF τ hτ 0 1) (fun τ hτ => hDF τ hτ 2 1) |
| 101 | 101 | (fun τ hτ => hDFbound τ hτ 0 1) (fun τ hτ => hDFbound τ hτ 2 1) |
+7 −7 Euler/PacketSizeComparison.lean View file
| @@ -25,10 +25,10 @@ theorem scalar_size_comparison {s₀ D D₀ E V Z : ℝ} | ||
| 25 | 25 | have hVp : 0 ≤ V := by linarith only [hVlo, hZ] |
| 26 | 26 | have hrootD : Real.sqrt D₀/2 ≤ Real.sqrt D := by |
| 27 | 27 | have hh : Real.sqrt D₀ ≤ 2*Real.sqrt D := Real.sqrt_le_iff.mpr |
| 28 | - ⟨by positivity, by nlinarith only [Real.sq_sqrt hDp.le, hd.1, hD₀]⟩ | |
| 28 | + ⟨by positivity, by linarith only [Real.sq_sqrt hDp.le, hd.1, hD₀]⟩ | |
| 29 | 29 | linarith only [hh] |
| 30 | 30 | have hrootD' : Real.sqrt D ≤ 2*Real.sqrt D₀ := Real.sqrt_le_iff.mpr |
| 31 | - ⟨by positivity, by nlinarith only [Real.sq_sqrt hD₀p, hd.2, hD₀]⟩ | |
| 31 | + ⟨by positivity, by linarith only [Real.sq_sqrt hD₀p, hd.2, hD₀]⟩ | |
| 32 | 32 | have hrootE : 1 ≤ Real.sqrt E := Real.one_le_sqrt.mpr hElo |
| 33 | 33 | have hrootE' : Real.sqrt E ≤ 2 := Real.sqrt_le_iff.mpr ⟨by norm_num, by linarith only [hEup]⟩ |
| 34 | 34 | have hlower := mul_le_mul |
| @@ -37,7 +37,7 @@ theorem scalar_size_comparison {s₀ D D₀ E V Z : ℝ} | ||
| 37 | 37 | have hupper := mul_le_mul |
| 38 | 38 | (mul_le_mul (mul_le_mul_of_nonneg_left hrootD' hs₀) hVup hVp (by positivity)) |
| 39 | 39 | hrootE' (Real.sqrt_nonneg E) (by positivity) |
| 40 | - constructor <;> nlinarith only [hlower, hupper] | |
| 40 | + constructor <;> linarith only [hlower, hupper] | |
| 41 | 41 | |
| 42 | 42 | /-- The actual primary size lies between fixed multiples of its ideal |
| 43 | 43 | size under the same quantitative ray and relative-state estimates already |
| @@ -72,7 +72,7 @@ theorem physical_size_comparison_order40 (m v r w : ℝ → Space) | ||
| 72 | 72 | exact mul_le_mul_of_nonneg_left (pow_le_pow_right₀ hΘ (by decide : 29 ≤ 40)) |
| 73 | 73 | (mul_nonneg hK0 he) |
| 74 | 74 | have hρ0 : 0 ≤ ρ := by dsimp [ρ]; positivity |
| 75 | - have hρ : ρ ≤ 1/2 := by have hh := hp 5 (by decide); dsimp [ρ]; nlinarith only [hh, hA] | |
| 75 | + have hρ : ρ ≤ 1/2 := by have hh := hp 5 (by decide); dsimp [ρ]; linarith only [hh, hA] | |
| 76 | 76 | have hη0 : 0 ≤ η := by dsimp [η]; positivity |
| 77 | 77 | have hη : η ≤ 1/2 := by linarith only [hηA, hA] |
| 78 | 78 | have he1 : e ≤ 1 := by have hh := hp 0 (by decide); norm_num at hh; linarith only [hh, hA] |
| @@ -97,14 +97,14 @@ theorem physical_size_comparison_order40 (m v r w : ℝ → Space) | ||
| 97 | 97 | rw [← hthird] at hwabs |
| 98 | 98 | have hE := velocity_direction_norm_bound (ε := ε) hΘ hrabs hwabs |
| 99 | 99 | have hEup : velocityDirectionNormSq ε (V 0/V 1) (V 2/V 1) ≤ 2 := by |
| 100 | - nlinarith only [hE.2, hε4, hA] | |
| 100 | + linarith only [hE.2, hε4, hA] | |
| 101 | 101 | obtain ⟨_, _, _, _, _, _, hDD⟩ := ray_geometric_bounds (ε := ε) (U := V 0/V 1) (V := 1) |
| 102 | 102 | hΘ hρ0 hρ hP₀ hQ₀ hP hQ hN |
| 103 | 103 | have hDsmall : |rayDenominator ε (R 0) (R 1) (R 2)-(1+P₀^2)| ≤ 1/2 := by |
| 104 | 104 | have hp7 := hp 7 (by decide) |
| 105 | 105 | dsimp [ρ] at hDD |
| 106 | - nlinarith only [hDD, hp7, hε4, hA] | |
| 107 | - have hb := scalar_size_comparison hs₀.le (show 1 ≤ 1+P₀^2 by nlinarith [sq_nonneg P₀]) | |
| 106 | + linarith only [hDD, hp7, hε4, hA] | |
| 107 | + have hb := scalar_size_comparison hs₀.le (show 1 ≤ 1+P₀^2 by linarith [sq_nonneg P₀]) | |
| 108 | 108 | hDsmall hE.1 hEup hZ hVdiff |
| 109 | 109 | have hid := physical_primary_size m v r w hs₀ (ne_of_gt hε) hm hv hmv hVp |
| 110 | 110 | rw [hid] |
+3 −3 Euler/PacketSourceFrequency.lean View file
| @@ -65,7 +65,7 @@ theorem smallPower_le_exp_sqrt (k : ℝ) (hk : 0 < k) : | ||
| 65 | 65 | rw [Real.rpow_def_of_pos hk] |
| 66 | 66 | apply Real.exp_le_exp.mpr |
| 67 | 67 | rw [hlog] at hl |
| 68 | - nlinarith only [hl,hs] | |
| 68 | + linarith only [hl,hs] | |
| 69 | 69 | |
| 70 | 70 | theorem correction_guards (C T D ρ0 k : ℝ) (hk : 1 ≤ k) (hρ : 0 < ρ0) |
| 71 | 71 | (hX : 64 ≤ expansion k) (hlog : 1 ≤ Real.log k) |
| @@ -81,9 +81,9 @@ theorem correction_guards (C T D ρ0 k : ℝ) (hk : 1 ≤ k) (hρ : 0 < ρ0) | ||
| 81 | 81 | linarith |
| 82 | 82 | · apply radius_decay C T D ρ0 k (expansion k) hk0 |
| 83 | 83 | · have hh := (div_le_iff₀ hρ).mp (hdrift.trans (smallPower_le_frequency k hk)) |
| 84 | - nlinarith only [hh] | |
| 84 | + linarith only [hh] | |
| 85 | 85 | · have hh := (div_le_iff₀ hρ).mp (herror.trans (smallPower_le_exp_sqrt k hk0)) |
| 86 | - nlinarith only [hh] | |
| 86 | + linarith only [hh] | |
| 87 | 87 | |
| 88 | 88 | /-- Every finite list of fixed source costs fits the required very small |
| 89 | 89 | power after one sufficiently large frequency choice. -/ |
+12 −12 Euler/PacketSourceRadiusPolynomial.lean View file
| @@ -45,7 +45,7 @@ theorem primitiveLift_bounds (W : ℝ) (hW : 0 ≤ W) : | ||
| 45 | 45 | have hop : 0 ≤ operatorEnvelope W := by unfold operatorEnvelope; positivity |
| 46 | 46 | have hp : 0 ≤ projectedEnvelope W := by unfold projectedEnvelope; positivity |
| 47 | 47 | unfold primitiveLift |
| 48 | - exact ⟨by nlinarith,by nlinarith,by nlinarith,by nlinarith,by nlinarith,by nlinarith,by nlinarith,by nlinarith⟩ | |
| 48 | + exact ⟨by nlinarith,by nlinarith,by nlinarith,by nlinarith,by linarith,by nlinarith,by nlinarith,by nlinarith⟩ | |
| 49 | 49 | |
| 50 | 50 | theorem coeff_self_lower (W : ℝ) (hW : 0 ≤ W) : W ≤ coeff W W := by |
| 51 | 51 | have hr : 0 ≤ sobolevCoefficientRadius (Fin 4) W := sobolevCoefficientRadius_nonneg W hW |
| @@ -57,7 +57,7 @@ theorem coeff_self_lower (W : ℝ) (hW : 0 ≤ W) : W ≤ coeff W W := by | ||
| 57 | 57 | change W ≤ (2 : ℝ)^6*W*(∑ k ∈ Finset.range (6+1), sobolevCoefficientRadius (Fin 4) W^k*(k.factorial : ℝ)^2) |
| 58 | 58 | have hm := mul_le_mul_of_nonneg_left hs (by positivity : 0 ≤ (2 : ℝ)^6*W) |
| 59 | 59 | norm_num only [mul_one,pow_succ,pow_zero] at hm ⊢ |
| 60 | - nlinarith | |
| 60 | + linarith | |
| 61 | 61 | |
| 62 | 62 | theorem weakEnvelope_lower_inputs (V : ℝ) (hV : 1 ≤ V) : |
| 63 | 63 | V ≤ EulerPacketRadiusPolynomial.inverseEnvelope V ∧ V ≤ formEnvelope V ∧ |
| @@ -65,21 +65,21 @@ theorem weakEnvelope_lower_inputs (V : ℝ) (hV : 1 ≤ V) : | ||
| 65 | 65 | have hv0 := zero_le_one.trans hV |
| 66 | 66 | have hv2 : V ≤ V^2 := by nlinarith |
| 67 | 67 | have hv5 : 0 ≤ V^5 := pow_nonneg hv0 5 |
| 68 | - have hinner : V ≤ 1+2*V^5+2*V^2 := by nlinarith | |
| 69 | - have hinner1 : 1 ≤ 1+2*V^5+2*V^2 := by nlinarith only [hv5,sq_nonneg V] | |
| 68 | + have hinner : V ≤ 1+2*V^5+2*V^2 := by linarith | |
| 69 | + have hinner1 : 1 ≤ 1+2*V^5+2*V^2 := by linarith only [hv5,sq_nonneg V] | |
| 70 | 70 | have hi2 : 1+2*V^5+2*V^2 ≤ (1+2*V^5+2*V^2)^2 := by nlinarith |
| 71 | 71 | have ha := coeff_self_lower V hv0 |
| 72 | 72 | have hb : coeff V V ≤ coeff V (2*V) := sobolevCoefficientAmplitude_mono_all 6 hv0 hv0 le_rfl (by linarith) |
| 73 | 73 | have he : V ≤ endpointEnvelope V := by |
| 74 | 74 | unfold endpointEnvelope |
| 75 | 75 | nlinarith only [mul_le_mul_of_nonneg_right ha hv0,hv2] |
| 76 | - refine ⟨by unfold EulerPacketRadiusPolynomial.inverseEnvelope; nlinarith,?_,?_⟩ | |
| 76 | + refine ⟨by unfold EulerPacketRadiusPolynomial.inverseEnvelope; linarith,?_,?_⟩ | |
| 77 | 77 | · unfold formEnvelope |
| 78 | 78 | nlinarith only [mul_nonneg (sq_nonneg V) hv0,hv2] |
| 79 | 79 | · have hprod := mul_le_mul_of_nonneg_right (ha.trans hb) (show 0 ≤ endpointEnvelope V by |
| 80 | 80 | unfold endpointEnvelope |
| 81 | - exact mul_nonneg (by nlinarith : 0 ≤ 6*coeff V V) hv0) | |
| 82 | - nlinarith only [hprod,mul_nonneg (sub_nonneg.mpr hV) (by nlinarith only [he,hv0] : 0 ≤ endpointEnvelope V),he] | |
| 81 | + exact mul_nonneg (by linarith : 0 ≤ 6*coeff V V) hv0) | |
| 82 | + nlinarith only [hprod,mul_nonneg (sub_nonneg.mpr hV) (by linarith only [he,hv0] : 0 ≤ endpointEnvelope V),he] | |
| 83 | 83 | |
| 84 | 84 | theorem block_le_weak (V : ℝ) (hV : 1 ≤ V) (I R C D : ℝ) |
| 85 | 85 | (hI0 : 0 ≤ I) (hR0 : 0 ≤ R) (hC0 : 0 ≤ C) (hD0 : 0 ≤ D) |
| @@ -164,7 +164,7 @@ theorem forward_scalar_le (T C A D CB R V : ℝ) | ||
| 164 | 164 | have hc : C*A+C*T*D ≤ V*(2*V+2) := by |
| 165 | 165 | calc |
| 166 | 166 | _ ≤ V*V+V*1*V := by gcongr |
| 167 | - _ ≤ _ := by nlinarith | |
| 167 | + _ ≤ _ := by linarith | |
| 168 | 168 | unfold forwardSobolevCost forwardEnvelope |
| 169 | 169 | apply add_le_add le_rfl |
| 170 | 170 | apply mul_le_mul hsi _ (by positivity) hsiV |
| @@ -207,7 +207,7 @@ theorem joined_radius_le (T S Ti R C C1 C2 Cp W : ℝ) (hW : 1 ≤ W) | ||
| 207 | 207 | apply block_le_weak V hV _ _ _ _ (by unfold gramInverseEnvelope; positivity) hR0 |
| 208 | 208 | (by positivity) (accelerationBlockAmplitude_nonneg 6 R C C1 1 v hR0 hC0 hC10 zero_le_one hv0) |
| 209 | 209 | (hGram.trans hWV) (hR.trans hWV) |
| 210 | - · exact (by nlinarith only [pow_le_pow_left₀ hC0 hC 2] : 3*C^2 ≤ 3*W^2).trans hb.2.2.2.2.1 | |
| 210 | + · exact (by linarith only [pow_le_pow_left₀ hC0 hC 2] : 3*C^2 ≤ 3*W^2).trans hb.2.2.2.2.1 | |
| 211 | 211 | · exact (acceleration_scalar_le R C C1 v W hR0 hC0 hC10 hv0 hW0 hR hC hC1 hv).trans hb.2.2.2.2.2.1 |
| 212 | 212 | have ha1 := hacc 1 zero_le_one (by linarith) |
| 213 | 213 | have ha2 := hacc (Ti+2) (by positivity) (by linarith) |
| @@ -239,7 +239,7 @@ theorem joined_radius_le (T S Ti R C C1 C2 Cp W : ℝ) (hW : 1 ≤ W) | ||
| 239 | 239 | 16*(4*V)+2*forwardEnvelope V*(16*(4*V)+1) := by gcongr |
| 240 | 240 | _ ≤ sourceRadiusEnvelope W := by |
| 241 | 241 | change _ ≤ 1+V+6*weakEnvelope V*(16*V+1)+64*V+2*forwardEnvelope V*(64*V+1) |
| 242 | - nlinarith only [hV0] | |
| 242 | + linarith only [hV0] | |
| 243 | 243 | |
| 244 | 244 | theorem mean_radius_le (T Ti R C C1 C2 L W : ℝ) (hW : 1 ≤ W) |
| 245 | 245 | (hT0 : 0 ≤ T) (hT : T ≤ 1) |
| @@ -280,7 +280,7 @@ theorem mean_radius_le (T Ti R C C1 C2 L W : ℝ) (hW : 1 ≤ W) | ||
| 280 | 280 | apply block_le_weak V hV _ _ _ _ (by unfold gramInverseEnvelope; positivity) hR0 |
| 281 | 281 | (by positivity) (accelerationBlockAmplitude_nonneg 6 R C C1 1 v hR0 hC0 hC10 zero_le_one hv0) |
| 282 | 282 | (hGram.trans hWV) hRV |
| 283 | - · exact (by nlinarith only [pow_le_pow_left₀ hC0 hC 2] : 3*C^2 ≤ 3*W^2).trans hb.2.2.2.2.1 | |
| 283 | + · exact (by linarith only [pow_le_pow_left₀ hC0 hC 2] : 3*C^2 ≤ 3*W^2).trans hb.2.2.2.2.1 | |
| 284 | 284 | · exact (acceleration_scalar_le R C C1 v W hR0 hC0 hC10 hv0 hW0 hR hC hC1 hv).trans hb.2.2.2.2.2.1 |
| 285 | 285 | have ha1 := hgram 1 zero_le_one (by linarith) |
| 286 | 286 | have ha2 := hgram (Ti+2) (by positivity) (by linarith) |
| @@ -295,7 +295,7 @@ theorem mean_radius_le (T Ti R C C1 C2 L W : ℝ) (hW : 1 ≤ W) | ||
| 295 | 295 | _ ≤ 1+2*(weakEnvelope V+weakEnvelope V+weakEnvelope V)*(16*V+1) := by gcongr |
| 296 | 296 | _ ≤ sourceRadiusEnvelope W := by |
| 297 | 297 | change _ ≤ 1+V+6*weakEnvelope V*(16*V+1)+64*V+2*forwardEnvelope V*(64*V+1) |
| 298 | - nlinarith only [hV0,mul_nonneg hfw (by positivity : 0 ≤ 64*V+1)] | |
| 298 | + linarith only [hV0,mul_nonneg hfw (by positivity : 0 ≤ 64*V+1)] | |
| 299 | 299 | |
| 300 | 300 | theorem le_sourceRadiusEnvelope (W : ℝ) (hW : 0 ≤ W) : W ≤ sourceRadiusEnvelope W := by |
| 301 | 301 | have hv := (primitiveLift_bounds W hW).1 |
+4 −4 Euler/PacketSourceScaleActual.lean View file
| @@ -123,7 +123,7 @@ theorem geometryError_succ_le (J D : ℕ) (hJ : 3 ≤ J) (C c X : ℝ) (hC : 1 | ||
| 123 | 123 | have hn₀ : 0 ≤ sourceNeighborError J c (scaleSequence J X) (n+1) := (exp_pos _).le |
| 124 | 124 | unfold geometryError sourceCoefficientError |
| 125 | 125 | rw [priorError_succ_eq J D hJ1 X n] |
| 126 | - nlinarith only [hprod, hn, hp₀, hn₀] | |
| 126 | + linarith only [hprod, hn, hp₀, hn₀] | |
| 127 | 127 | |
| 128 | 128 | theorem geometryError_zero_le (J D : ℕ) (hJ : 3 ≤ J) (C c X : ℝ) (hC : 1 ≤ C) |
| 129 | 129 | (hX : 1 ≤ X) (hc : 0 ≤ c) (a : ℕ → ℝ) (ha : 0 ≤ a 0) (ha₂ : a 0 ≤ 2) |
| @@ -147,7 +147,7 @@ theorem geometryError_zero_le (J D : ℕ) (hJ : 3 ≤ J) (C c X : ℝ) (hC : 1 | ||
| 147 | 147 | unfold geometryError sourceCoefficientError |
| 148 | 148 | rw [priorError_zero_eq J D hXp] |
| 149 | 149 | norm_num only [olderShear] |
| 150 | - nlinarith only [he, hn, hp₀, hs₀] | |
| 150 | + linarith only [he, hn, hp₀, hs₀] | |
| 151 | 151 | |
| 152 | 152 | theorem geometryErrorCost_bound (J D : ℕ) (hJ : 3 ≤ J) (C c X : ℝ) (hC : 1 ≤ C) |
| 153 | 153 | (hX : 1 ≤ X) (hc : 0 ≤ c) (a : ℕ → ℝ) (ha : ∀ n, 0 ≤ a n) (ha₂ : ∀ n, a n ≤ 2) |
| @@ -169,7 +169,7 @@ theorem geometryErrorCost_bound (J D : ℕ) (hJ : 3 ≤ J) (C c X : ℝ) (hC : 1 | ||
| 169 | 169 | have hc₀ := mul_nonneg he₀ (pow_nonneg hθ 60) |
| 170 | 170 | simp only [ite_true] |
| 171 | 171 | unfold geometryErrorCost coefficientCost baseErrorCost |
| 172 | - nlinarith only [hh, hc₀] | |
| 172 | + linarith only [hh, hc₀] | |
| 173 | 173 | | succ n => |
| 174 | 174 | have hh := mul_le_mul_of_nonneg_right |
| 175 | 175 | (geometryError_succ_le J D hJ C c X hC hX hc a ha ha₂ hbaseH hbaseK n) |
| @@ -208,7 +208,7 @@ theorem baseErrorCost_tendsto_zero (J D : ℕ) (hJ : 1 ≤ J) (hD : 1000 ≤ D) | ||
| 208 | 208 | have hθ₀ : 0 ≤ sourceTheta J C (scaleSequence J X) 0 := |
| 209 | 209 | le_trans zero_le_one (sourceTheta_bounds hJ hC hx1 0).1 |
| 210 | 210 | have hθ : sourceTheta J C (scaleSequence J X) 0 ≤ T*X^2 := by |
| 211 | - simpa only [T, Nat.add_zero, scaleSequence_zero] using (sourceTheta_bounds hJ hC hx1 0).2 | |
| 211 | + simpa only [Nat.add_zero, scaleSequence_zero] using (sourceTheta_bounds hJ hC hx1 0).2 | |
| 212 | 212 | have hinner : 16*(128*X^(-500 : ℝ)*sourceTheta J C (scaleSequence J X) 0+X^(-(D:ℝ)/4)) ≤ |
| 213 | 213 | 16*(128*X^(-500 : ℝ)*(T*X^2)+X^(-(D:ℝ)/4)) := by |
| 214 | 214 | gcongr |
+6 −6 Euler/PacketSourceScaleBounds.lean View file
| @@ -44,7 +44,7 @@ theorem theta_weighted_monomial_bound | ||
| 44 | 44 | have hh := mul_le_mul_of_nonneg_left hθ |
| 45 | 45 | (monomialCost_nonneg J d B a b c D p q x n hD (le_trans zero_le_one (hx n))) |
| 46 | 46 | convert! hh using 1 |
| 47 | - simp only [monomialCost, mul_pow, pow_add, ← pow_mul] | |
| 47 | + simp only [monomialCost, mul_pow, ← pow_mul] | |
| 48 | 48 | ring |
| 49 | 49 | |
| 50 | 50 | theorem sourcePriorError_bound (J : ℕ) (hJ : 3 ≤ J) (x : ℕ → ℝ) (n : ℕ) |
| @@ -71,7 +71,7 @@ theorem sourceNeighborError_bound (J : ℕ) (hJ : 3 ≤ J) (c : ℝ) (hc : 0 ≤ | ||
| 71 | 71 | unfold sourceNeighborError |
| 72 | 72 | apply exp_le_exp.mpr |
| 73 | 73 | simp only [div_eq_mul_inv] at hd ⊢ |
| 74 | - nlinarith only [hd] | |
| 74 | + linarith only [hd] | |
| 75 | 75 | |
| 76 | 76 | /-- The complete coefficient error is controlled by three explicit costs, |
| 77 | 77 | with exactly the preceding-stage powers and the real support exponent 7/2. -/ |
| @@ -93,7 +93,7 @@ theorem sourceCoefficientError_bound (J : ℕ) (hJ : 3 ≤ J) (C c : ℝ) | ||
| 93 | 93 | sourceTheta J C x n^A ≤ |
| 94 | 94 | monomialCost J 2 9 7 (1/2) 2 (128*(2*C)^(A+1)) (2*(A+1)) (2*(A+1)) x n := by |
| 95 | 95 | apply le_trans _ (by simpa only [Nat.zero_add] using hsm) |
| 96 | - convert! hs16 using 1 <;> simp only [monomialCost, rpow_ofNat, pow_zero, mul_one, pow_succ] <;> ring | |
| 96 | + convert! hs16 using 1 <;> simp only [monomialCost, rpow_ofNat, pow_zero, pow_succ] <;> ring | |
| 97 | 97 | have hp := mul_le_mul_of_nonneg_right |
| 98 | 98 | (sourcePriorError_bound J hJ x n (hxp n)) (pow_nonneg hθ A) |
| 99 | 99 | have hp16 := mul_le_mul_of_nonneg_left hp (by norm_num : (0:ℝ) ≤ 16) |
| @@ -149,7 +149,7 @@ theorem sourceParentSquareRatio_eq (J : ℕ) (x : ℕ → ℝ) (n : ℕ) : | ||
| 149 | 149 | exp (2*x n/((J-1+n : ℕ) : ℝ)^7)/exp (x n/((J+n : ℕ) : ℝ)^5) = |
| 150 | 150 | monomialCost J 1 7 5 1 2 1 0 0 x n := by |
| 151 | 151 | rw [← exp_sub] |
| 152 | - simp only [monomialCost, pow_zero, mul_one, one_mul, neg_one_mul, rpow_ofNat] | |
| 152 | + simp only [monomialCost, pow_zero, mul_one, one_mul, rpow_ofNat] | |
| 153 | 153 | congr 1 |
| 154 | 154 | ring |
| 155 | 155 | |
| @@ -163,9 +163,9 @@ theorem sourceGoodCost_bound (J : ℕ) (hJ : 3 ≤ J) (x : ℕ → ℝ) (n : ℕ | ||
| 163 | 163 | have hd₂ := div_le_div_of_nonneg_left hx (by positivity : 0 < ((J-1+n : ℕ) : ℝ)^5) |
| 164 | 164 | (pow_le_pow_right₀ hp (by decide : 5 ≤ 7)) |
| 165 | 165 | rw [← exp_add, ← exp_add] |
| 166 | - simp only [monomialCost, pow_zero, mul_one, one_mul, neg_one_mul, rpow_ofNat] | |
| 166 | + simp only [monomialCost, pow_zero, one_mul, neg_one_mul, rpow_ofNat] | |
| 167 | 167 | apply exp_le_exp.mpr |
| 168 | 168 | simp only [div_eq_mul_inv] at hd₁ hd₂ ⊢ |
| 169 | - nlinarith only [hd₁, hd₂] | |
| 169 | + linarith only [hd₁, hd₂] | |
| 170 | 170 | |
| 171 | 171 | end EulerPacketSourceScaleBounds |
+1 −1 Euler/PacketSourceScaleFromCosts.lean View file
| @@ -80,7 +80,7 @@ theorem actualBounds_of_uniform (J D : ℕ) (hJ : 3 ≤ J) (C c X δ : ℝ) | ||
| 80 | 80 | hn.coefficient.summable.mul_left 16,?_⟩ |
| 81 | 81 | change (∑' n,16*coefficientCost J C c 60 (scaleSequence J X) n) ≤ δ/2 |
| 82 | 82 | rw [tsum_mul_left] |
| 83 | - nlinarith only [hn.coefficient.total_le] | |
| 83 | + linarith only [hn.coefficient.total_le] | |
| 84 | 84 | have hz : SmallSeries z (δ/2) := by |
| 85 | 85 | refine ⟨?_,(hasSum_ite_eq 0 (baseErrorCost J D C X)).summable,?_⟩ |
| 86 | 86 | · intro n |
+10 −10 Euler/PacketSourceScaleGuards.lean View file
| @@ -72,7 +72,7 @@ theorem actualWidths_contract (J D : ℕ) (hJ : 3 ≤ J) (C c X δ : ℝ) | ||
| 72 | 72 | have hh := (actualTimeRatio_le J (by omega) X (by linarith only [hX]) hb.initial_shear n).trans |
| 73 | 73 | ((hb.normal.width.term_le n).trans hδ) |
| 74 | 74 | have hmul := (div_le_iff₀ (timeWidth_pos J (by omega) (by linarith only [hX]) n)).mp hh |
| 75 | - nlinarith only [hmul] | |
| 75 | + linarith only [hmul] | |
| 76 | 76 | |
| 77 | 77 | theorem coefficient_small (J D : ℕ) (hJ : 3 ≤ J) (C c X δ : ℝ) |
| 78 | 78 | (hC : 1 ≤ C) (hX : 8 ≤ X) (hb : ActualBounds J D C c X δ) |
| @@ -93,13 +93,13 @@ theorem compression_of_error_small {a ε Θ target G d : ℝ} | ||
| 93 | 93 | (hG : 1 ≤ G) (hd : 0 ≤ d) |
| 94 | 94 | (herr : 16*(ε*Θ*(4*G)^2+d) ≤ 1) : 60*(G+d)*target*ε < a := by |
| 95 | 95 | have hprod : 0 ≤ ε*Θ*G^2 := mul_nonneg (mul_nonneg hε hΘ) (sq_nonneg G) |
| 96 | - have hd1 : d ≤ 1 := by nlinarith only [herr, hprod] | |
| 96 | + have hd1 : d ≤ 1 := by linarith only [herr, hprod] | |
| 97 | 97 | have hG₀ : 0 ≤ G := le_trans zero_le_one hG |
| 98 | - have hGsq : G+d ≤ 2*G^2 := by nlinarith only [hG, hd1, sq_nonneg (G-1)] | |
| 98 | + have hGsq : G+d ≤ 2*G^2 := by linarith only [hG, hd1, sq_nonneg (G-1)] | |
| 99 | 99 | have htargetmul := mul_le_mul_of_nonneg_right htarget hε |
| 100 | 100 | have hfull := mul_le_mul_of_nonneg_left htargetmul (show 0 ≤ 60*(G+d) by positivity) |
| 101 | 101 | have hscale := mul_le_mul_of_nonneg_right hGsq (mul_nonneg hΘ hε) |
| 102 | - nlinarith only [herr, hd, hfull, hscale, ha] | |
| 102 | + linarith only [herr, hd, hfull, hscale, ha] | |
| 103 | 103 | |
| 104 | 104 | theorem scaleSequence_ge_initial (J : ℕ) (hJ : 1 ≤ J) (X : ℝ) (hX : 0 ≤ X) (n : ℕ) : |
| 105 | 105 | X ≤ scaleSequence J X n := by |
| @@ -158,7 +158,7 @@ theorem stage_guards (J D : ℕ) (hJ : 3 ≤ J) (C c X K δ : ℝ) | ||
| 158 | 158 | have hextra := actualExtraTime_small J D hJ C c X δ hC1 hX hb n (a n) (ha₀ n) (ha₂ n) |
| 159 | 159 | have hextra1 : actualExtraTime J X (a n) n ≤ 1 := by |
| 160 | 160 | have hh := mul_le_mul_of_nonneg_left (one_le_pow₀ hθ : 1 ≤ sourceTheta J C (scaleSequence J X) n^60) hextra₀ |
| 161 | - nlinarith only [hh, hextra, hδ] | |
| 161 | + linarith only [hh, hextra, hδ] | |
| 162 | 162 | have hpow : 0 < sourceTheta J C (scaleSequence J X) n^60 := pow_pos hθp 60 |
| 163 | 163 | have hextraSharp : actualExtraTime J X (a n) n ≤ 1/sourceTheta J C (scaleSequence J X) n^60 := |
| 164 | 164 | (le_div_iff₀ hpow).mpr (hextra.trans (by linarith only [hδ])) |
| @@ -178,17 +178,17 @@ theorem stage_guards (J D : ℕ) (hJ : 3 ≤ J) (C c X K δ : ℝ) | ||
| 178 | 178 | norm_num only [pow_zero, mul_one] at hh |
| 179 | 179 | linarith only [hh, hδ] |
| 180 | 180 | have heps1 : epsilon J X (a n) n ≤ 1 := by |
| 181 | - have hG : 1 ≤ (4*(1+olderShear J X n))^2 := by nlinarith only [hg, sq_nonneg (1+olderShear J X n-1)] | |
| 181 | + have hG : 1 ≤ (4*(1+olderShear J X n))^2 := by linarith only [hg, sq_nonneg (1+olderShear J X n-1)] | |
| 182 | 182 | have htG : 1 ≤ sourceTheta J C (scaleSequence J X) n*(4*(1+olderShear J X n))^2 := |
| 183 | 183 | one_le_mul_of_one_le_of_one_le hθ hG |
| 184 | 184 | have hh := mul_le_mul_of_nonneg_left htG heps.le |
| 185 | 185 | unfold geometryError at he0 |
| 186 | - nlinarith only [he0, hh, hd] | |
| 186 | + linarith only [he0, hh, hd] | |
| 187 | 187 | have htθ : targetTime J X (β n) n ≤ sourceTheta J C (scaleSequence J X) n := by |
| 188 | 188 | have hnonneg : 0 ≤ ((J+n:ℕ):ℝ)^2*scaleSequence J X n^2 := by positivity |
| 189 | 189 | have hm := mul_le_mul_of_nonneg_right hC (by linarith only [hnonneg] : 0 ≤ 1+((J+n:ℕ):ℝ)^2*scaleSequence J X n^2) |
| 190 | 190 | unfold sourceTheta |
| 191 | - nlinarith only [hm, hnonneg, ht] | |
| 191 | + linarith only [hm, hnonneg, ht] | |
| 192 | 192 | refine ⟨heps, heps1, hact.2.2.1, hact.2.2.2.1, ?_, ?_, ?_, ?_, ?_, ?_, |
| 193 | 193 | actualWidths_contract J D hJ C c X δ hX hb hδ n, ?_, ?_⟩ |
| 194 | 194 | · simpa only [one_div, scaleSequence_succ] using hact.2.2.2.2.2.2.1 |
| @@ -198,12 +198,12 @@ theorem stage_guards (J D : ℕ) (hJ : 3 ≤ J) (C c X K δ : ℝ) | ||
| 198 | 198 | · have hnonneg : 0 ≤ ((J+n:ℕ):ℝ)^2*scaleSequence J X n^2 := by positivity |
| 199 | 199 | have hm := mul_le_mul_of_nonneg_right hC (by linarith only [hnonneg] : 0 ≤ 1+((J+n:ℕ):ℝ)^2*scaleSequence J X n^2) |
| 200 | 200 | unfold horizon sourceTheta |
| 201 | - nlinarith only [hm, hnonneg, ht, hextra1] | |
| 201 | + linarith only [hm, hnonneg, ht, hextra1] | |
| 202 | 202 | · simpa only [horizon, add_sub_cancel_left] using hextraSharp |
| 203 | 203 | · have hh := mul_le_mul_of_nonneg_left |
| 204 | 204 | (coefficient_small J D hJ C c X δ hC1 hX hb a ha₀ ha₂ 40 (by omega) n) |
| 205 | 205 | (show 0 ≤ 1000000*K by positivity) |
| 206 | - nlinarith only [hh, hδK] | |
| 206 | + linarith only [hh, hδK] | |
| 207 | 207 | · exact compression_of_error_small (ha n) heps.le hθp.le htθ hg hd |
| 208 | 208 | (by simpa only [geometryError, add_assoc] using he0) |
| 209 | 209 | |
+4 −4 Euler/PacketStageEstimates.lean View file
| @@ -51,11 +51,11 @@ theorem joined_initial_cost : | ||
| 51 | 51 | have hb := P.joined_bad_cost hn hq hB |
| 52 | 52 | have hm : 1 ≤ 2*(gradientConstant*previousShear S.J S.X n) := by |
| 53 | 53 | have h := mul_le_mul_of_nonneg_left (S.previousShear_one n) gradient_nonneg |
| 54 | - nlinarith only [gradient_properties.1,h] | |
| 54 | + linarith only [gradient_properties.1,h] | |
| 55 | 55 | have hn0 := mul_nonneg (G).child_nonneg (G).badRatio_nonneg |
| 56 | 56 | have hh := mul_le_mul_of_nonneg_right hm hn0 |
| 57 | 57 | unfold initialIncrement |
| 58 | - nlinarith only [hb,hh] | |
| 58 | + linarith only [hb,hh] | |
| 59 | 59 | |
| 60 | 60 | theorem joined_pressure_cost : |
| 61 | 61 | 2*(gradientConstant*previousShear S.J S.X n)*(G).hchild*((G).δ*goodRatio+(G).badRatio)+ |
| @@ -113,11 +113,11 @@ theorem forward_initial_cost : | ||
| 113 | 113 | have hb := P.forward_bad_cost hq hB |
| 114 | 114 | have hm : 1 ≤ 2*(gradientConstant*previousShear S.J S.X 0) := by |
| 115 | 115 | have h := mul_le_mul_of_nonneg_left (S.previousShear_one 0) gradient_nonneg |
| 116 | - nlinarith only [gradient_properties.1,h] | |
| 116 | + linarith only [gradient_properties.1,h] | |
| 117 | 117 | have hn0 := mul_nonneg (G).child_nonneg (G).earlyRatio_nonneg |
| 118 | 118 | have hh := mul_le_mul_of_nonneg_right hm hn0 |
| 119 | 119 | unfold initialIncrement |
| 120 | - nlinarith only [hb,hh] | |
| 120 | + linarith only [hb,hh] | |
| 121 | 121 | |
| 122 | 122 | theorem forward_pressure_cost : |
| 123 | 123 | 2*(gradientConstant*previousShear S.J S.X 0)*(G).hchild*((G).δ*goodRatio+(G).earlyRatio)+ |
+3 −3 Euler/PacketStageGeometry.lean View file
| @@ -64,7 +64,7 @@ theorem previousShear_monotone : Monotone (previousShear S.J S.X) := by | ||
| 64 | 64 | have hp := S.previousShear_one n |
| 65 | 65 | have hs := S.shear_separation n |
| 66 | 66 | change previousShear S.J S.X n ≤ shear S.J S.X n |
| 67 | - nlinarith only [hp,hs,sq_nonneg (previousShear S.J S.X n-1)] | |
| 67 | + linarith only [hp,hs,sq_nonneg (previousShear S.J S.X n-1)] | |
| 68 | 68 | |
| 69 | 69 | theorem previousShear_double_base {n : ℕ} (hn : n ≠ 0) : |
| 70 | 70 | 2*S.X^1000 ≤ previousShear S.J S.X n := by |
| @@ -74,7 +74,7 @@ theorem previousShear_double_base {n : ℕ} (hn : n ≠ 0) : | ||
| 74 | 74 | change shear S.J S.X 0 ≤ previousShear S.J S.X n at hm |
| 75 | 75 | change (S.X^1000)^2 ≤ shear S.J S.X 0/4 at hs |
| 76 | 76 | change 1 ≤ S.X^1000 at hp |
| 77 | - nlinarith only [hm,hs,hp,sq_nonneg (S.X^1000-1)] | |
| 77 | + linarith only [hm,hs,hp,sq_nonneg (S.X^1000-1)] | |
| 78 | 78 | |
| 79 | 79 | end EulerPacketInductionScales.Scales |
| 80 | 80 | |
| @@ -157,7 +157,7 @@ theorem joined_history_hessian (hn : n ≠ 0) : | ||
| 157 | 157 | (initialInclusion P.restrictedParent.T P.time P.time_lt_nextHorizon.le t) 0 |
| 158 | 158 | have hm := mul_le_mul_of_nonneg_left (S.olderShear_le n) |
| 159 | 159 | (mul_nonneg hessian_nonneg (zero_le_one.trans (S.previousShear_one n))) |
| 160 | - exact hp.trans (by nlinarith only [hm]) | |
| 160 | + exact hp.trans (by linarith only [hm]) | |
| 161 | 161 | |
| 162 | 162 | end General |
| 163 | 163 | |
+3 −4 Euler/PacketStageGrowth.lean View file
| @@ -31,7 +31,7 @@ theorem previousShear_ge_index {c B : ℝ} (S : Scales c B) (n : ℕ) : | ||
| 31 | 31 | have hp := S.previousShear_one n |
| 32 | 32 | change ((n+1 : ℕ) : ℝ)+1 ≤ shear S.J S.X n |
| 33 | 33 | push_cast |
| 34 | - nlinarith only [ih,h,hp,sq_nonneg (previousShear S.J S.X n-1)] | |
| 34 | + linarith only [ih,h,hp,sq_nonneg (previousShear S.J S.X n-1)] | |
| 35 | 35 | |
| 36 | 36 | end Scales |
| 37 | 37 | end EulerPacketInductionScales |
| @@ -74,9 +74,8 @@ theorem gradient_lower (hn : n ≠ 0) : previousShear S.J S.X n/2 ≤ P.activati | ||
| 74 | 74 | have he : P.frame.G+P.frame.error ≤ previousShear S.J S.X n/2 := by |
| 75 | 75 | have hc := (add_le_add P.frame_bound P.frame_error).trans (S.activation_small hn) |
| 76 | 76 | have hh := mul_le_mul_of_nonneg_right activationMargin_le_half (zero_le_one.trans hs) |
| 77 | - nlinarith only [hc,hh] | |
| 78 | - have heq : ‖M‖=P.activationGradient := by | |
| 79 | - exact congrArg norm (P.state.evolution.strain_origin P.state.odd t) | |
| 77 | + linarith only [hc,hh] | |
| 78 | + have heq : ‖M‖=P.activationGradient := congrArg norm (P.state.evolution.strain_origin P.state.odd t) | |
| 80 | 79 | rw [heq] at hM |
| 81 | 80 | linarith only [hM,he] |
| 82 | 81 | |
+3 −3 Euler/PacketStageLowPropagation.lean View file
| @@ -63,11 +63,11 @@ theorem ratio_absorption (r : ℝ) (hr : 0 ≤ r) | ||
| 63 | 63 | exact h.trans (by linarith only [S.delta_small]) |
| 64 | 64 | have hM : 1 ≤ 2*gradientConstant*previousShear S.J S.X n := by |
| 65 | 65 | have h := mul_le_mul_of_nonneg_left (S.previousShear_one n) gradient_nonneg |
| 66 | - nlinarith only [gradient_properties.1,h] | |
| 66 | + linarith only [gradient_properties.1,h] | |
| 67 | 67 | have hgrad : shear S.J S.X n*r ≤ |
| 68 | 68 | 2*gradientConstant*previousShear S.J S.X n*shear S.J S.X n*r := by |
| 69 | 69 | have h := mul_le_mul_of_nonneg_right hM (mul_nonneg (zero_le_one.trans (S.shear_one n)) hr) |
| 70 | - nlinarith only [h] | |
| 70 | + linarith only [h] | |
| 71 | 71 | have hg : shear S.J S.X n*r+(frequency S.J S.X n)^(-(1/4 : ℝ)) ≤ 1 := by |
| 72 | 72 | linarith only [hgrad,hbad,hsum] |
| 73 | 73 | have hh : 2*gradientConstant*previousShear S.J S.X n*shear S.J S.X n*r+ |
| @@ -97,7 +97,7 @@ theorem next_frame_bounds : | ||
| 97 | 97 | have h2 := mul_le_mul_of_nonneg_right hCH (sq_nonneg (previousShear S.J S.X n)) |
| 98 | 98 | have h3 := mul_nonneg (sq_nonneg frameConstant) |
| 99 | 99 | (show 0 ≤ 1+2*previousShear S.J S.X n by positivity) |
| 100 | - nlinarith only [h1,h2,h3] | |
| 100 | + linarith only [h1,h2,h3] | |
| 101 | 101 | |
| 102 | 102 | theorem coupling_step (a : ℝ) |
| 103 | 103 | (h : |a/P.frame.a-1| ≤ renewalCost S.J S.D 4 c frameConstant S.X n) : |
+3 −3 Euler/PacketTailBase.lean View file
| @@ -26,7 +26,7 @@ theorem tailBase_absorption (R H C : ℝ) (hC : 0 ≤ C) (N n : ℕ) : | ||
| 26 | 26 | linarith only [h] |
| 27 | 27 | have hf : (1+18*((N+2 : ℕ) : ℝ)^2)*C ≤ A^(n+1) := by |
| 28 | 28 | calc |
| 29 | - _ ≤ A := by dsimp [A]; nlinarith | |
| 29 | + _ ≤ A := by dsimp [A]; linarith | |
| 30 | 30 | _ ≤ A*A^n := le_mul_of_one_le_right (le_trans zero_le_one hA) (one_le_pow₀ hA) |
| 31 | 31 | _ = A^(n+1) := (pow_succ' A n).symm |
| 32 | 32 | have hH : H^(2*n+2) = (H^2)^(n+1) := by |
| @@ -67,10 +67,10 @@ theorem tailBase_polynomial_bound (R H C : ℝ) (hC : 0 ≤ C) (N : ℕ) (hN : 1 | ||
| 67 | 67 | have hp := pow_le_pow_left₀ (show (0 : ℝ) ≤ (N : ℝ)+2 by positivity) hnplus 2 |
| 68 | 68 | have hf : (1 : ℝ)+18*((N+2 : ℕ) : ℝ)^2 ≤ 163*(N : ℝ)^2 := by |
| 69 | 69 | push_cast |
| 70 | - nlinarith only [hp, hn2] | |
| 70 | + linarith only [hp, hn2] | |
| 71 | 71 | have hm := mul_le_mul_of_nonneg_left hf hC |
| 72 | 72 | have hfactor : (1 : ℝ)+C*(1+18*((N+2 : ℕ) : ℝ)^2) ≤ |
| 73 | - (1+163*C)*(N : ℝ)^2 := by nlinarith only [hm, hn2] | |
| 73 | + (1+163*C)*(N : ℝ)^2 := by linarith only [hm, hn2] | |
| 74 | 74 | calc |
| 75 | 75 | _ ≤ ((1+163*C)*(N : ℝ)^2)*H^2*gradeBase R N := |
| 76 | 76 | mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_right hfactor (sq_nonneg H)) |
+2 −2 Euler/PacketTangentNorm.lean View file
| @@ -31,7 +31,7 @@ theorem scaled_pair_le_physical_norm (m v w : ℝ → Space) {t₀ a ε τ : ℝ | ||
| 31 | 31 | have hh : |scaledVelocity m v w t₀ a ε τ 0|+|scaledVelocity m v w t₀ a ε τ 1| ≤ |
| 32 | 32 | (2*‖w (physicalTime t₀ a ε τ)‖)/ε := by |
| 33 | 33 | apply (le_div_iff₀ hε).mpr |
| 34 | - nlinarith only [hU, hεV, hεnorm] | |
| 34 | + linarith only [hU, hεV, hεnorm] | |
| 35 | 35 | convert! hh using 1 |
| 36 | 36 | ring |
| 37 | 37 | |
| @@ -60,7 +60,7 @@ theorem physical_velocity_le_scaled_state (m v r w : ℝ → Space) | ||
| 60 | 60 | have hV : norm3 (V 0) (V 1) (V 2) ≤ 7*Θ^2*(|V 0|+|V 1|) := by |
| 61 | 61 | dsimp [norm3] |
| 62 | 62 | have ht := mul_le_mul_of_nonneg_right hΘ2 (add_nonneg (abs_nonneg (V 0)) (abs_nonneg (V 1))) |
| 63 | - nlinarith only [hw, ht] | |
| 63 | + linarith only [hw, ht] | |
| 64 | 64 | exact (scaledVelocity_norm_le_norm3 m v w hε hε1 hm hv hmv).trans hV |
| 65 | 65 | |
| 66 | 66 | end EulerPacketMovingFrame |
+5 −5 Euler/PacketTargetAmplification.lean View file
| @@ -22,7 +22,7 @@ theorem equation30_target_exp_le {σ T Θ : ℝ} {Z Z₁ : ℝ → ℝ} | ||
| 22 | 22 | have hTpos : 0 < T := lt_of_lt_of_le (by positivity : 0 < 1/σ) hTtarget |
| 23 | 23 | have hx : 1 ≤ σ*T := by |
| 24 | 24 | have hh := (div_le_iff₀ hσ).mp hTtarget |
| 25 | - nlinarith only [hh] | |
| 25 | + linarith only [hh] | |
| 26 | 26 | have hxpos : 0 < σ*T := by positivity |
| 27 | 27 | have hgrowth := equation30_endpoint_exponential (sq_pos_of_pos hσ) |
| 28 | 28 | (by nlinarith only [hσ, hσsmall] : σ^2 ≤ 1/16) |
| @@ -32,10 +32,10 @@ theorem equation30_target_exp_le {σ T Θ : ℝ} {Z Z₁ : ℝ → ℝ} | ||
| 32 | 32 | rw [mul_div_cancel_left₀ T (ne_of_gt hσ)] at hpost |
| 33 | 33 | have hraw : exp (1/(4*σ)) ≤ (σ*T)*Z T := by |
| 34 | 34 | have hh := (div_le_iff₀ hxpos).mp hpost.1 |
| 35 | - nlinarith only [hgrowth, hh] | |
| 35 | + linarith only [hgrowth, hh] | |
| 36 | 36 | have hcoeff : σ*T ≤ Θ := by |
| 37 | 37 | have hh := mul_le_mul_of_nonneg_right (show σ ≤ 1 by linarith only [hσsmall]) hTpos.le |
| 38 | - nlinarith only [hh, hTΘ] | |
| 38 | + linarith only [hh, hTΘ] | |
| 39 | 39 | exact hraw.trans (mul_le_mul_of_nonneg_right hcoeff hpost.2.le) |
| 40 | 40 | |
| 41 | 41 | theorem physical_target_exponential_lower (m v r w : ℝ → Space) |
| @@ -59,7 +59,7 @@ theorem physical_target_exponential_lower (m v r w : ℝ → Space) | ||
| 59 | 59 | have hh := (abs_le.mp hV).1 |
| 60 | 60 | have hr : 1/2 ≤ scaledVelocity m v w t₀ a ε T 1/Z T := by linarith only [hh] |
| 61 | 61 | have hb := (le_div_iff₀ hZpos).mp hr |
| 62 | - nlinarith only [hb] | |
| 62 | + linarith only [hb] | |
| 63 | 63 | have hVpos : 0 < scaledVelocity m v w t₀ a ε T 1 := by linarith only [hVlower, hZpos] |
| 64 | 64 | have hsize := physical_size_ge_second m v r w hs₀ hε hm hv hmv hN hVpos.le |
| 65 | 65 | have hsizepos : 0 < ‖r (physicalTime t₀ a ε T)‖*‖w (physicalTime t₀ a ε T)‖ := |
| @@ -68,7 +68,7 @@ theorem physical_target_exponential_lower (m v r w : ℝ → Space) | ||
| 68 | 68 | have h1 := mul_le_mul_of_nonneg_left hexp hs₀.le |
| 69 | 69 | have h2 := mul_le_mul_of_nonneg_left hVlower (show 0 ≤ 2*s₀*Θ by positivity) |
| 70 | 70 | have h3 := mul_le_mul_of_nonneg_left hsize (show 0 ≤ 4*Θ by positivity) |
| 71 | - exact ⟨hsizepos, by nlinarith only [h1, h2, h3]⟩ | |
| 71 | + exact ⟨hsizepos, by linarith only [h1, h2, h3]⟩ | |
| 72 | 72 | |
| 73 | 73 | /-- A bounded physical history size, or the numerator used to choose a |
| 74 | 74 | packet amplitude, gains the actual target's exponential factor. -/ |
+1 −1 Euler/PacketTimeProfileArithmetic.lean View file
| @@ -53,7 +53,7 @@ theorem slow_high_high_high (γ H : ℝ) (hγ : 0 ≤ γ) (hγH : γ ≤ H) (hH | ||
| 53 | 53 | highScale γ H i*highScale γ H j ≤ highScale γ H p := by |
| 54 | 54 | have hH0 : 0 ≤ H := le_trans zero_le_one hH |
| 55 | 55 | have hh : H ≤ H^2 := by nlinarith |
| 56 | - have hγ2 : γ^2 ≤ γ*H^2 := by nlinarith [mul_nonneg hγ (sub_nonneg.mpr (hγH.trans hh))] | |
| 56 | + have hγ2 : γ^2 ≤ γ*H^2 := by linarith [mul_nonneg hγ (sub_nonneg.mpr (hγH.trans hh))] | |
| 57 | 57 | calc |
| 58 | 58 | _ = γ^2*(meanScale H i*meanScale H j) := by unfold highScale; ring |
| 59 | 59 | _ ≤ (γ*H^2)*(meanScale H i*meanScale H j) := |
+2 −2 Euler/PacketUniformFrequencyScales.lean View file
| @@ -67,7 +67,7 @@ theorem frequency_monotone (J : ℕ) (hJ : 2 ≤ J) (X : ℝ) (hX : 0 ≤ X) : | ||
| 67 | 67 | rw [scaleSequence_succ] |
| 68 | 68 | exact mul_nonneg (sq_nonneg _) ih |
| 69 | 69 | have hbase : ((J+n : ℕ) : ℝ)+1 ≤ ((J+n : ℕ) : ℝ)^2 := by |
| 70 | - nlinarith only [hj,sq_nonneg (((J+n : ℕ) : ℝ)-2)] | |
| 70 | + linarith only [hj,sq_nonneg (((J+n : ℕ) : ℝ)-2)] | |
| 71 | 71 | have hp := pow_le_pow_left₀ (show 0 ≤ ((J+n : ℕ) : ℝ)+1 by positivity) hbase 2 |
| 72 | 72 | have hm := mul_le_mul_of_nonneg_left hp (hxall n) |
| 73 | 73 | unfold frequency |
| @@ -76,7 +76,7 @@ theorem frequency_monotone (J : ℕ) (hJ : 2 ≤ J) (X : ℝ) (hX : 0 ≤ X) : | ||
| 76 | 76 | have hcast : ((J+(n+1) : ℕ) : ℝ)=((J+n : ℕ) : ℝ)+1 := by push_cast; ring |
| 77 | 77 | rw [hcast] |
| 78 | 78 | apply (div_le_div_iff₀ (pow_pos hjp 2) (by positivity)).mpr |
| 79 | - nlinarith only [hm] | |
| 79 | + linarith only [hm] | |
| 80 | 80 | |
| 81 | 81 | theorem frequency_zero_tendsto_atTop (J : ℕ) (hJ : 1 ≤ J) : |
| 82 | 82 | Tendsto (fun X : ℝ => frequency J X 0) atTop atTop := by |
+1 −1 Euler/PacketVelocityPropagator.lean View file
| @@ -78,7 +78,7 @@ theorem velocity_propagator_bound_within | ||
| 78 | 78 | have hspan : t-s ≤ Θ := by linarith only [ht, hT, hs] |
| 79 | 79 | have hsmall' : 20*Θ^8*(e*Θ^12)*(t-s) ≤ 1/2 := by |
| 80 | 80 | have hh := mul_le_mul_of_nonneg_left hspan (show 0 ≤ 20*e*Θ^20 by positivity) |
| 81 | - nlinarith only [hh, hsmall] | |
| 81 | + linarith only [hh, hsmall] | |
| 82 | 82 | have he' : ∀ x ∈ Icc s t, |
| 83 | 83 | |U₁ x-idealVelocityFirst (σ^2) x (U' x) (V' x)|+|V₁ x+U' x| ≤ |
| 84 | 84 | (e*Θ^12)*(|U' x|+|V' x|) := by |
+3 −3 Euler/PacketVolumeDivergence.lean View file
| @@ -18,7 +18,7 @@ private local instance : NormedSpace ℝ (Space →L[ℝ] Space) := inferInstanc | ||
| 18 | 18 | theorem coordinateTrace_eq_matrix (A : Space →L[ℝ] Space) : |
| 19 | 19 | coordinateTrace A = (operatorMatrix A).trace := by |
| 20 | 20 | simp only [coordinateTrace,operatorMatrix,Matrix.trace,Matrix.diag, |
| 21 | - sum_apply,comp_apply,apply_apply] | |
| 21 | + sum_apply,comp_apply] | |
| 22 | 22 | rfl |
| 23 | 23 | |
| 24 | 24 | theorem operatorMatrix_det (A : Space →L[ℝ] Space) : |
| @@ -55,10 +55,10 @@ theorem determinant_derivative_trace_zero (F : Space → Space →L[ℝ] Space) | ||
| 55 | 55 | simpa only [zero_smul,add_zero] using hF.hasFDerivAt |
| 56 | 56 | have h := hF'.comp_hasDerivAt (0 : ℝ) |
| 57 | 57 | ((hasDerivAt_const (0 : ℝ) x).add ((hasDerivAt_id (0 : ℝ)).smul_const v)) |
| 58 | - simpa only [Function.comp_def,Pi.add_apply,Pi.smul_apply,id_eq, | |
| 58 | + simpa only [Function.comp_def,Pi.add_apply,id_eq, | |
| 59 | 59 | zero_smul,add_zero,one_smul,zero_add] using h |
| 60 | 60 | have hmat : M*L 0 = operatorMatrix (fderiv ℝ F x v) := by |
| 61 | - dsimp only [M,L] | |
| 61 | + dsimp only [L] | |
| 62 | 62 | rw [zero_smul,add_zero,← operatorMatrix_comp] |
| 63 | 63 | congr 1 |
| 64 | 64 | ext u |
+2 −2 Euler/PacketWeightedPhysicalErrors.lean View file
| @@ -77,13 +77,13 @@ theorem Budget.physical_gradient_hessian_of_weighted (k ρ Cw d : ℝ) | ||
| 77 | 77 | let H := (1+9*CF)*physicalFixedCost D R CF ρ⁻¹ 1 |
| 78 | 78 | have hc := physicalFixedCost_nonneg D R CF ρ⁻¹ 1 hR hCF (inv_nonneg.mpr hρ.le) |
| 79 | 79 | have hcv : physicalFixedCost D R CF ρ⁻¹ 1 ≤ H := by dsimp [H]; nlinarith |
| 80 | - have hcp : 9*CF*physicalFixedCost D R CF ρ⁻¹ 1 ≤ H := by dsimp [H]; nlinarith | |
| 80 | + have hcp : 9*CF*physicalFixedCost D R CF ρ⁻¹ 1 ≤ H := by dsimp [H]; linarith | |
| 81 | 81 | have absorb (v c : ℝ) (hvc : v ≤ c*(Cpt*d)*k) (hcH : c ≤ H) : |
| 82 | 82 | v ≤ weightedPhysicalGradientCost D P R CF ρ Cw*k*d := by |
| 83 | 83 | apply hvc.trans |
| 84 | 84 | apply (mul_le_mul_of_nonneg_right |
| 85 | 85 | (mul_le_mul_of_nonneg_right hcH (mul_nonneg hCpt hd)) hk0.le).trans_eq |
| 86 | - dsimp [weightedPhysicalGradientCost,H,Cpt] | |
| 86 | + dsimp [weightedPhysicalGradientCost,Cpt] | |
| 87 | 87 | ring |
| 88 | 88 | constructor |
| 89 | 89 | · apply absorb _ _ _ hcv |
+19 −0 routes/s2-euler-packet-1/README.md added View file
| @@ -0,0 +1,19 @@ | ||
| 1 | +--- | |
| 2 | +issue: 11 | |
| 3 | +status: working | |
| 4 | +--- | |
| 5 | +# s2-euler-packet-1 | |
| 6 | + | |
| 7 | +The family `Euler/Packet*`: 94 files, made cheaper to elaborate by edits inside proofs only | |
| 8 | +(`nlinarith` to `linarith`, `simp` lists with the entries that do not change the goal removed, | |
| 9 | +other small rewrites of a tactic step). The edits are Treant's `speedup_trials` stage, carried onto | |
| 10 | +`main` at `df2f18f`, and counted there file by file; they total −12.3% instructions retired across | |
| 11 | +the 94 files (1,697.33 G to 1,488.61 G, `lean -j1 -DElab.async=false` under `perf stat -e | |
| 12 | +instructions:u`, before and after). No statement, import line or docstring changes, and there is no | |
| 13 | +`maxHeartbeats`. | |
| 14 | + | |
| 15 | +## Next | |
| 16 | + | |
| 17 | +Pull request open for #11; `build` is what says whether it compiles. If the maintainer asks for a | |
| 18 | +narrower change, drop the files whose edits are not plainly readability-neutral and recount the | |
| 19 | +table over the rest. | |