| @@ -28,7 +28,7 @@ namespace NavierStokes.TailCone |
| 28 | 28 | theorem initialLag_ge_half_lambda (d : TailData) : d.core.lam / 2 ≤ initialLag d := by |
| 29 | 29 | have hd : 0 < 1 - d.core.lam := by linarith [d.core.lam_lt] |
| 30 | 30 | apply (le_div_iff₀ hd).mpr |
| 31 | | - nlinarith [d.h_small, sq_nonneg d.core.lam] |
| 31 | + linarith [d.h_small, sq_nonneg d.core.lam] |
| 32 | 32 | |
| 33 | 33 | theorem release_rate_integral_bound_all (d : TailData) {t : ℝ} |
| 34 | 34 | (_ht : 0 ≤ t) (ht' : t ≤ d.rampEnd) : primitive (releaseRate d) t ≤ 2 := by |
| @@ -55,13 +55,13 @@ theorem releaseLag_lower_all (d : TailData) {t : ℝ} |
| 55 | 55 | unfold releaseLag linearLag |
| 56 | 56 | have h1 := mul_le_mul_of_nonneg_right he hq0 |
| 57 | 57 | have h2 := mul_le_mul_of_nonneg_left hq (Real.exp_pos (-2)).le |
| 58 | | - nlinarith [mul_nonneg (Real.exp_pos (-primitive (releaseRate d) t)).le hsource] |
| 58 | + linarith [mul_nonneg (Real.exp_pos (-primitive (releaseRate d) t)).le hsource] |
| 59 | 59 | |
| 60 | 60 | theorem tailDebt_ge_coefficient (d : TailData) : tailCoefficient * d.h ≤ tailDebt d := by |
| 61 | 61 | have hd : 0 < 1 - d.rho := by linarith [d.rho_lt_half] |
| 62 | 62 | have h : d.rho ≤ d.rho / (1 - d.rho) := by |
| 63 | 63 | apply (le_div_iff₀ hd).mpr |
| 64 | | - nlinarith [sq_nonneg d.rho] |
| 64 | + linarith [sq_nonneg d.rho] |
| 65 | 65 | exact h.trans (tailDebt_bounds d).1 |
| 66 | 66 | |
| 67 | 67 | theorem holdLag_lower (d : TailData) {t : ℝ} (ht : t ≤ decayHold d) : |
| @@ -97,7 +97,7 @@ theorem tailLag_first_half_lower (d : TailData) {t : ℝ} (ht : 0 ≤ t) (ht' : |
| 97 | 97 | have he : Real.exp (-1) ≤ Real.exp (-(1 - d.h) * t) := |
| 98 | 98 | Real.exp_le_exp.mpr (by nlinarith [d.h_pos]) |
| 99 | 99 | have h := mul_le_mul (tailDebt_ge_coefficient d) he (Real.exp_pos (-1)).le (tailDebt_pos d).le |
| 100 | | - nlinarith |
| 100 | + linarith |
| 101 | 101 | |
| 102 | 102 | noncomputable def releaseLowerConstant : ℝ := min (Real.exp (-2)) (Real.exp (-1) * tailCoefficient) |
| 103 | 103 | |
| @@ -118,7 +118,7 @@ theorem normalizedLag_lower {d : TailData} {K : ℝ} (w : ResetWitness d K) |
| 118 | 118 | · have h := normalizedLag_release_lower w eta hy h1 |
| 119 | 119 | have hc : releaseLowerConstant ≤ Real.exp (-2) := min_le_left _ _ |
| 120 | 120 | have hmul := mul_le_mul_of_nonneg_right hc d.h_pos.le |
| 121 | | - nlinarith [mul_le_mul_of_nonneg_left d.h_small.le (Real.exp_pos (-2)).le] |
| 121 | + linarith [mul_le_mul_of_nonneg_left d.h_small.le (Real.exp_pos (-2)).le] |
| 122 | 122 | · by_cases h2 : y ≤ tailStart d |
| 123 | 123 | · rw [ReleaseMoments.ResetWitness.normalizedLag_hold w eta (le_of_not_ge h1) h2] |
| 124 | 124 | have ht : y - (d.releaseStart + d.rampEnd) ≤ decayHold d := by |
| @@ -185,14 +185,14 @@ theorem finalAngular_suppressed (d : TailData) (eta : ℝ) {y : ℝ} |
| 185 | 185 | d.h ^ 4 := by |
| 186 | 186 | rw [← plateau_amplitude_suppression] |
| 187 | 187 | apply Real.exp_le_exp.mpr |
| 188 | | - nlinarith [mul_nonneg d.h_pos.le (sub_nonneg.mpr ht)] |
| 188 | + linarith [mul_nonneg d.h_pos.le (sub_nonneg.mpr ht)] |
| 189 | 189 | have hratio0 : 0 ≤ tailShape d (y - tailStart d) / (1 - d.rho) := |
| 190 | 190 | div_nonneg (tailShape_pos d _).le (by linarith [d.rho_lt_half]) |
| 191 | 191 | rw [finalAngular_release_formula d eta (by linarith)] |
| 192 | 192 | have h := mul_le_mul hex (tailShape_ratio_le_two d (y - tailStart d)) hratio0 |
| 193 | 193 | (pow_nonneg d.h_pos.le 4) |
| 194 | 194 | have h' := mul_le_mul_of_nonneg_left h (finalAngular_pos d (d.releaseStart, eta)).le |
| 195 | | - nlinarith |
| 195 | + linarith |
| 196 | 196 | |
| 197 | 197 | theorem profileSlope_bounds (d : TailData) (y : ℝ) : |
| 198 | 198 | -1 ≤ profileSlope d y ∧ profileSlope d y ≤ -(3 * d.h / 4) := by |
| @@ -280,7 +280,7 @@ theorem weighted_square_release_integral_le (d : TailData) (eta : ℝ) {y : ℝ} |
| 280 | 280 | have heq : d.h * (finalAngular d (y, eta) ^ 2 * (1 / (3 * d.h / 2))) = |
| 281 | 281 | (2 / 3) * finalAngular d (y, eta) ^ 2 := by field_simp [d.h_pos.ne'] |
| 282 | 282 | rw [heq] at h |
| 283 | | - nlinarith [sq_nonneg (finalAngular d (y, eta))] |
| 283 | + linarith [sq_nonneg (finalAngular d (y, eta))] |
| 284 | 284 | |
| 285 | 285 | noncomputable def releaseFutureEnergy (d : TailData) (y : ℝ) : ℝ := |
| 286 | 286 | ∫ t in Ioi y, Real.exp (t - y) * finalAngular d (t, 0) ^ 2 |
| @@ -319,12 +319,12 @@ theorem releaseNumerator_abs_le (d : TailData) {eta y : ℝ} |
| 319 | 319 | have h := abs_sub_le (d.h * releaseFutureEnergy d y) 0 ((1 / 2 + d.h) * releaseFutureMass d y) |
| 320 | 320 | simp only [sub_zero, zero_sub, abs_neg, abs_of_nonneg (mul_nonneg d.h_pos.le he0), |
| 321 | 321 | abs_of_nonneg (mul_nonneg hA hm0)] at h |
| 322 | | - nlinarith |
| 322 | + linarith |
| 323 | 323 | dsimp [releaseNumerator, numeratorConstant] |
| 324 | 324 | rw [abs_mul, abs_mul, abs_of_pos (by norm_num : (0 : ℝ) < 2)] |
| 325 | 325 | have h := mul_le_mul (mul_le_mul_of_nonneg_left heta (by norm_num : (0 : ℝ) ≤ 2)) hs |
| 326 | 326 | (abs_nonneg _) (by norm_num : (0 : ℝ) ≤ 2 * 1) |
| 327 | | - nlinarith |
| 327 | + linarith |
| 328 | 328 | |
| 329 | 329 | /-! ## Uniform smallness after dividing by the actual controller -/ |
| 330 | 330 | |
| @@ -468,12 +468,12 @@ theorem releaseVelocityRatio_uniform {d : TailData} {K : ℝ} (w : ResetWitness |
| 468 | 468 | dsimp [releaseConeConstant] |
| 469 | 469 | by_cases h1 : y ≤ d.releaseStart + d.rampEnd |
| 470 | 470 | · have h := releaseVelocityRatio_early w hwait heta hy h1 |
| 471 | | - nlinarith [mul_nonneg lateRatioConstant_pos.le hP] |
| 471 | + linarith [mul_nonneg lateRatioConstant_pos.le hP] |
| 472 | 472 | · have hb : d.releaseStart + d.secondRampStart ≤ y := by |
| 473 | 473 | dsimp [TailData.rampEnd] at h1 |
| 474 | 474 | linarith |
| 475 | 475 | have h := releaseVelocityRatio_late w hwait heta hb hy' |
| 476 | | - nlinarith [mul_nonneg earlyRatioConstant_pos.le hP] |
| 476 | + linarith [mul_nonneg earlyRatioConstant_pos.le hP] |
| 477 | 477 | |
| 478 | 478 | /-! ## Actual slopes and the finite stress cone -/ |
| 479 | 479 | |
| @@ -505,13 +505,13 @@ theorem cone_of_zero_bs {a r p : ℝ} (ha : 2 < a) (ha' : a ≤ 4) |
| 505 | 505 | have h := abs_le.mp hr |
| 506 | 506 | nlinarith |
| 507 | 507 | have hmargin : 3 / 2 ≤ 2 - (a - 2) * r ^ 2 := by |
| 508 | | - nlinarith [mul_nonneg (sub_nonneg.mpr ha') (sq_nonneg r)] |
| 508 | + linarith [mul_nonneg (sub_nonneg.mpr ha') (sq_nonneg r)] |
| 509 | 509 | refine ⟨by linarith, ha, ?_⟩ |
| 510 | 510 | have h := ConeAlgebra.finite_amplitude_cone (c := 1) (j := r) (v := a) (p := p) |
| 511 | | - (by linarith) (by nlinarith) (by nlinarith) ?_ |
| 511 | + (by linarith) (by linarith) (by linarith) ?_ |
| 512 | 512 | · simpa using h |
| 513 | 513 | · have hmul := mul_le_mul_of_nonneg_left hmargin (show 0 ≤ p by linarith) |
| 514 | | - nlinarith |
| 514 | + linarith |
| 515 | 515 | |
| 516 | 516 | noncomputable def releaseP1 (d : TailData) (c : ℝ → Coeff) (XR eta y : ℝ) : ℝ := |
| 517 | 517 | XR * Real.exp y * ReleaseMoments.normalizedLag d c eta y / CoordinateAlgebra.L d.h eta |
| @@ -529,7 +529,7 @@ theorem releaseP1_large {d : TailData} {K : ℝ} (w : ResetWitness d K) {XR eta |
| 529 | 529 | have hL := CoordinateAlgebra.L_pos d.h_pos.le d.h_lt_half heta |
| 530 | 530 | have hL1 : CoordinateAlgebra.L d.h eta ≤ 1 := by |
| 531 | 531 | dsimp [CoordinateAlgebra.L] |
| 532 | | - nlinarith [mul_nonneg d.h_pos.le (sq_nonneg eta)] |
| 532 | + linarith [mul_nonneg d.h_pos.le (sq_nonneg eta)] |
| 533 | 533 | have hXR0 := (releaseRadiusThreshold_pos d).trans hXR |
| 534 | 534 | have hscale : 16 < XR * (Real.exp d.releaseStart * (releaseLowerConstant * d.h)) := by |
| 535 | 535 | exact (div_lt_iff₀ (mul_pos (Real.exp_pos _) (mul_pos releaseLowerConstant_pos d.h_pos))).mp hXR |
| @@ -539,7 +539,7 @@ theorem releaseP1_large {d : TailData} {K : ℝ} (w : ResetWitness d K) {XR eta |
| 539 | 539 | have hprod' := mul_le_mul_of_nonneg_left hprod hXR0.le |
| 540 | 540 | unfold releaseP1 |
| 541 | 541 | apply (lt_div_iff₀ hL).mpr |
| 542 | | - nlinarith |
| 542 | + linarith |
| 543 | 543 | |
| 544 | 544 | theorem exists_release_cone_threshold (P m : ℝ) (hP : 0 < P) : |
| 545 | 545 | ∃ lam0 : ℝ, 0 < lam0 ∧ ∀ d : TailData, d.core.P = P → d.core.m = m → |
| @@ -557,7 +557,7 @@ theorem exists_release_cone_threshold (P m : ℝ) (hP : 0 < P) : |
| 557 | 557 | _ = _ := mul_one _ |
| 558 | 558 | have hsmall := (lt_div_iff₀ hC).mp hd |
| 559 | 559 | have h := mul_le_mul_of_nonneg_left hp hC.le |
| 560 | | - nlinarith |
| 560 | + linarith |
| 561 | 561 | |
| 562 | 562 | /-! ## Identification with the actual global histories -/ |
| 563 | 563 | |
| @@ -838,7 +838,7 @@ theorem reset_radial_ratio_bound {d : TailData} {K : ℝ} (w : ResetWitness d K) |
| 838 | 838 | have hprod := mul_le_mul_of_nonneg_left (resetFactor_ge_half w eta y) |
| 839 | 839 | (mul_nonneg (mul_nonneg (by norm_num : (0 : ℝ) ≤ 2) resetJetConstant_pos.le) |
| 840 | 840 | (ResetEnergyBounds.coefficient_scale_nonneg w)) |
| 841 | | - nlinarith |
| 841 | + linarith |
| 842 | 842 | |
| 843 | 843 | theorem reset_eta_ratio_bound {d : TailData} {K : ℝ} (w : ResetWitness d K) (eta y : ℝ) : |
| 844 | 844 | |resetEtaDerivative w eta y / (1 + resetRelative w eta y)| ≤ 4 * (K * d.core.lam ^ (28 : ℕ)) := by |
| @@ -849,7 +849,7 @@ theorem reset_eta_ratio_bound {d : TailData} {K : ℝ} (w : ResetWitness d K) (e |
| 849 | 849 | apply (div_le_iff₀ hden).mpr |
| 850 | 850 | have hprod := mul_le_mul_of_nonneg_left (resetFactor_ge_half w eta y) |
| 851 | 851 | (mul_nonneg (by norm_num : (0 : ℝ) ≤ 4) (ResetEnergyBounds.coefficient_scale_nonneg w)) |
| 852 | | - nlinarith |
| 852 | + linarith |
| 853 | 853 | |
| 854 | 854 | theorem eta_times_etaRate_nonpos (d : TailData) (eta y : ℝ) : eta * etaRate d eta y ≤ 0 := by |
| 855 | 855 | have hp : 0 ≤ 2 * eta ^ 2 / (1 + eta ^ 2) := by positivity |
| @@ -867,7 +867,7 @@ theorem correctedFlatSlope_bounds {d : TailData} {K : ℝ} (w : ResetWitness d K |
| 867 | 867 | have hr := abs_le.mp (reset_radial_ratio_bound w eta y) |
| 868 | 868 | have hs := ResetEnergyBounds.coefficient_scale_nonneg w |
| 869 | 869 | dsimp [correctedFlatSlope, resetSourceError] |
| 870 | | - constructor <;> nlinarith |
| 870 | + constructor <;> linarith |
| 871 | 871 | |
| 872 | 872 | theorem correctedFlat_source_lower {d : TailData} {K : ℝ} (w : ResetWitness d K) |
| 873 | 873 | {Amp : ℝ → ℝ} (ha : ContDiff ℝ ∞ Amp) (eta : ℝ) (heta : |eta| ≤ 1) {y : ℝ} |
| @@ -885,13 +885,13 @@ theorem correctedFlat_source_lower {d : TailData} {K : ℝ} (w : ResetWitness d |
| 885 | 885 | have hbase := mul_nonpos_of_nonneg_of_nonpos hD (eta_times_etaRate_nonpos d eta y) |
| 886 | 886 | have hDEta : |StressAlgebra.axialExponent d.h * eta| ≤ 1 / 2 := by |
| 887 | 887 | rw [abs_mul, abs_of_nonneg hD] |
| 888 | | - nlinarith [mul_le_mul_of_nonneg_left heta hD] |
| 888 | + linarith [mul_le_mul_of_nonneg_left heta hD] |
| 889 | 889 | have he := mul_le_mul hDEta (reset_eta_ratio_bound w eta y) (abs_nonneg _) (by norm_num : (0 : ℝ) ≤ 1 / 2) |
| 890 | 890 | rw [← abs_mul] at he |
| 891 | 891 | have he' := (le_abs_self _).trans he |
| 892 | 892 | rw [correctedFlat_Sq w ha eta hy hy'] |
| 893 | 893 | dsimp [correctedFlatSlope, correctedEtaSlope, resetSourceError] |
| 894 | | - nlinarith [d.h_small] |
| 894 | + linarith [d.h_small] |
| 895 | 895 | |
| 896 | 896 | theorem correctedFlat_geometry {d : TailData} {K : ℝ} (w : ResetWitness d K) |
| 897 | 897 | (hsmall : resetSourceError d K ≤ d.core.lam / 4) (eta y : ℝ) (heta : eta ^ 2 ≤ 1) : |
| @@ -961,7 +961,7 @@ theorem flatten_Qs_lower_of_endpoint {d : TailData} {K : ℝ} (w : ResetWitness |
| 961 | 961 | have hrate := (correctedFlat_geometry w hsmall eta t heta2).2.2 |
| 962 | 962 | have hsource := correctedFlat_source_lower w ha eta heta ht.1.le htR |
| 963 | 963 | have hm := mul_le_mul_of_nonneg_right hrate (div_nonneg d.core.lam_pos.le (by norm_num : (0 : ℝ) ≤ 4)) |
| 964 | | - nlinarith |
| 964 | + linarith |
| 965 | 965 | |
| 966 | 966 | theorem corrected_flatten_Qs_lower {d : TailData} {K : ℝ} (w : ResetWitness d K) |
| 967 | 967 | (hK : 0 < K) (hwait : d.core.wait = 60 * Real.log (1 / d.core.lam)) |
| @@ -991,7 +991,7 @@ theorem corrected_density_prefix_le {d : TailData} {K : ℝ} (w : ResetWitness d |
| 991 | 991 | change Real.exp y * (finalAngular d (y, eta) * |
| 992 | 992 | (1 + relative (w.coefficients eta) (y - correctionCenter d))) ^ 2 ≤ _ |
| 993 | 993 | dsimp [energyDensity] at h he ⊢ |
| 994 | | - nlinarith |
| 994 | + linarith |
| 995 | 995 | |
| 996 | 996 | theorem corrected_square_prefix_le {d : TailData} {K : ℝ} (w : ResetWitness d K) |
| 997 | 997 | (eta : ℝ) (heta : eta ^ 2 ≤ 1) {y : ℝ} (hy : d.core.endpoint ≤ y) |
| @@ -1009,7 +1009,7 @@ theorem correctedEtaSlope_abs_le {d : TailData} {K : ℝ} (w : ResetWitness d K) |
| 1009 | 1009 | exact (abs_add_le _ _).trans (by |
| 1010 | 1010 | have h1 := etaRate_bound d eta y |
| 1011 | 1011 | have h2 := reset_eta_ratio_bound w eta y |
| 1012 | | - nlinarith) |
| 1012 | + linarith) |
| 1013 | 1013 | |
| 1014 | 1014 | theorem actualS_endpoint {d : TailData} {K : ℝ} (w : ResetWitness d K) |
| 1015 | 1015 | {Amp : ℝ → ℝ} (ha : ContDiff ℝ ∞ Amp) (eta : ℝ) |
| @@ -1092,27 +1092,27 @@ theorem actualS_finite_bounds {d : TailData} {K : ℝ} (w : ResetWitness d K) |
| 1092 | 1092 | rw [abs_of_nonneg (postPulseEnergy_nonneg d eta)] at hsum |
| 1093 | 1093 | have hR := ResetEnergyBounds.resetEnergy_abs_le w eta heta |
| 1094 | 1094 | have hs := mul_le_mul_of_nonneg_right hsmall hD |
| 1095 | | - nlinarith [postPulseEnergy_le_length d eta heta] |
| 1095 | + linarith [postPulseEnergy_le_length d eta heta] |
| 1096 | 1096 | have hSEI : |OutgoingHistories.dEta (OutgoingHistories.S w Amp) (d.core.endpoint, eta)| ≤ |
| 1097 | 1097 | (flattenLength + 12) * energyDensity d eta d.core.endpoint := by |
| 1098 | 1098 | rw [actualS_eta_endpoint w ha eta hz, abs_mul, abs_of_pos (by norm_num : (0 : ℝ) < 1 / 2)] |
| 1099 | 1099 | have hsum := abs_add_le (deriv (postPulseEnergy d) eta) |
| 1100 | 1100 | (deriv (ResetEnergyBounds.resetEnergy d w.coefficients) eta) |
| 1101 | 1101 | have hs := mul_le_mul_of_nonneg_right hsmall hD |
| 1102 | | - nlinarith [abs_deriv_postPulseEnergy_le d eta heta, ResetEnergyBounds.resetEnergy_deriv_abs_le w eta heta] |
| 1102 | + linarith [abs_deriv_postPulseEnergy_le d eta heta, ResetEnergyBounds.resetEnergy_deriv_abs_le w eta heta] |
| 1103 | 1103 | have hSD := abs_increment_le hy (fun t ht => actualS_after_hasDerivAt w ha eta ht.1) |
| 1104 | 1104 | (C := 2 * energyDensity d eta d.core.endpoint) (fun t ht => by |
| 1105 | 1105 | rw [abs_div, abs_neg, abs_of_nonneg (mul_nonneg (Real.exp_pos _).le (sq_nonneg _))] |
| 1106 | 1106 | norm_num |
| 1107 | 1107 | have hd := corrected_density_prefix_le w eta heta ht.1 (ht.2.trans hy') |
| 1108 | | - nlinarith) |
| 1108 | + linarith) |
| 1109 | 1109 | have hSED := abs_increment_le hy (fun t ht => actualS_eta_after_hasDerivAt w ha eta ht.1) |
| 1110 | 1110 | (C := 12 * energyDensity d eta d.core.endpoint) (fun t ht => by |
| 1111 | 1111 | rw [abs_mul, abs_neg, abs_of_nonneg (mul_nonneg (Real.exp_pos _).le (sq_nonneg _))] |
| 1112 | 1112 | have hd := corrected_density_prefix_le w eta heta ht.1 (ht.2.trans hy') |
| 1113 | 1113 | have hs := mul_le_mul_of_nonneg_left (correctedEtaSlope_abs_le w hsmall eta t) |
| 1114 | 1114 | (mul_nonneg (Real.exp_pos t).le (sq_nonneg (OutgoingHistories.E w (t, eta)))) |
| 1115 | | - nlinarith) |
| 1115 | + linarith) |
| 1116 | 1116 | have hlen := mul_le_mul_of_nonneg_right (show y - d.core.endpoint ≤ d.releaseStart - d.core.endpoint by linarith) hD |
| 1117 | 1117 | have hS := abs_sub_le (OutgoingHistories.S w Amp (y, eta)) |
| 1118 | 1118 | (OutgoingHistories.S w Amp (d.core.endpoint, eta)) 0 |
| @@ -1144,7 +1144,7 @@ theorem actualNs_finite_bound {d : TailData} {K : ℝ} (w : ResetWitness d K) |
| 1144 | 1144 | apply (div_le_iff₀ (Real.exp_pos y)).mpr |
| 1145 | 1145 | have hm := mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr hy) (mul_nonneg hB hF) |
| 1146 | 1146 | dsimp [energyDensity] at hz |
| 1147 | | - nlinarith |
| 1147 | + linarith |
| 1148 | 1148 | have hs0 := hdiv _ hS.1 |
| 1149 | 1149 | have hs1 := hdiv _ hS.2 |
| 1150 | 1150 | have hP := CorrectedPressureBounds.corrected_bounds_of_small w hsmall |
| @@ -1165,11 +1165,11 @@ theorem actualNs_finite_bound {d : TailData} {K : ℝ} (w : ResetWitness d K) |
| 1165 | 1165 | have hd : |StressAlgebra.coordinateFactor eta| ≤ 1 := by |
| 1166 | 1166 | dsimp [StressAlgebra.coordinateFactor] |
| 1167 | 1167 | rw [abs_of_nonneg (by linarith : 0 ≤ 1 - eta ^ 2)] |
| 1168 | | - nlinarith [sq_nonneg eta] |
| 1168 | + linarith [sq_nonneg eta] |
| 1169 | 1169 | have hh : |4 * d.h * eta| ≤ 2 := by |
| 1170 | 1170 | rw [abs_mul, abs_mul, abs_of_pos (by norm_num : (0 : ℝ) < 4), abs_of_pos d.h_pos] |
| 1171 | 1171 | have hm := mul_le_mul_of_nonneg_left heta (show 0 ≤ 4 * d.h by linarith [d.h_pos]) |
| 1172 | | - nlinarith [d.h_lt_half] |
| 1172 | + linarith [d.h_lt_half] |
| 1173 | 1173 | have ha0 : 0 ≤ StressAlgebra.velocityExponent d.h := by |
| 1174 | 1174 | dsimp [StressAlgebra.velocityExponent]; linarith [d.h_pos] |
| 1175 | 1175 | have ha1 : StressAlgebra.velocityExponent d.h ≤ 1 := by |
| @@ -1177,7 +1177,7 @@ theorem actualNs_finite_bound {d : TailData} {K : ℝ} (w : ResetWitness d K) |
| 1177 | 1177 | have hav : |4 * StressAlgebra.velocityExponent d.h * eta| ≤ 4 := by |
| 1178 | 1178 | rw [abs_mul, abs_mul, abs_of_pos (by norm_num : (0 : ℝ) < 4), abs_of_nonneg ha0] |
| 1179 | 1179 | have hm := mul_le_mul_of_nonneg_left heta (show 0 ≤ 4 * StressAlgebra.velocityExponent d.h by positivity) |
| 1180 | | - nlinarith |
| 1180 | + linarith |
| 1181 | 1181 | have h1 := mul_le_mul hh hs0 (abs_nonneg _) (by norm_num : (0 : ℝ) ≤ 2) |
| 1182 | 1182 | have h2 := mul_le_mul hd hs1 (abs_nonneg _) (by norm_num : (0 : ℝ) ≤ 1) |
| 1183 | 1183 | have h3 := mul_le_mul hav (hP0.trans hE) (abs_nonneg _) (by norm_num : (0 : ℝ) ≤ 4) |
| @@ -1203,7 +1203,7 @@ theorem actualNs_finite_bound {d : TailData} {K : ℝ} (w : ResetWitness d K) |
| 1203 | 1203 | (StressAlgebra.coordinateFactor eta * OutgoingHistories.dEta (OutgoingHistories.Pi w) (y, eta)) |
| 1204 | 1204 | simp only [sub_zero, zero_sub, abs_neg] at ht1 ht3 |
| 1205 | 1205 | dsimp [finiteNumeratorBudget] |
| 1206 | | - nlinarith [mul_nonneg hB hF, mul_nonneg CorrectedPressureBounds.correctedConstant_pos.le hF] |
| 1206 | + linarith [mul_nonneg hB hF, mul_nonneg CorrectedPressureBounds.correctedConstant_pos.le hF] |
| 1207 | 1207 | |
| 1208 | 1208 | theorem lambda_log_bound (d : TailData) : d.core.lam * Real.log (1 / d.core.lam) ≤ 1 := by |
| 1209 | 1209 | have h := Real.log_le_sub_one_of_pos (one_div_pos.mpr d.core.lam_pos) |
| @@ -1218,7 +1218,7 @@ theorem lambda_finite_length_bound (d : TailData) : |
| 1218 | 1218 | have hf := mul_le_mul_of_nonneg_right (show d.core.lam ≤ 1 by linarith [d.core.lam_lt]) flattenLength_pos.le |
| 1219 | 1219 | have hl := lambda_log_bound d |
| 1220 | 1220 | dsimp [TailData.releaseStart, TailData.flattenEnd, TailData.uniformWait] |
| 1221 | | - nlinarith |
| 1221 | + linarith |
| 1222 | 1222 | |
| 1223 | 1223 | noncomputable def finiteNumeratorConstant : ℝ := |
| 1224 | 1224 | 5 * (flattenLength + releaseConstant + 40 + 20 * (flattenLength + 30)) + |
| @@ -1239,7 +1239,7 @@ theorem finiteNumeratorBudget_bound (d : TailData) : |
| 1239 | 1239 | have hP := mul_le_mul_of_nonneg_right hl CorrectedPressureBounds.correctedConstant_pos.le |
| 1240 | 1240 | have hlen := lambda_finite_length_bound d |
| 1241 | 1241 | dsimp [finiteNumeratorBudget, finiteEnergyBudget, finiteNumeratorConstant] |
| 1242 | | - nlinarith |
| 1242 | + linarith |
| 1243 | 1243 | |
| 1244 | 1244 | /-! ## A lower amplitude bound up to release |
| 1245 | 1245 | |
| @@ -1248,12 +1248,12 @@ earlier scheduled wait has already supplied thirty powers. |
| 1248 | 1248 | -/ |
| 1249 | 1249 | |
| 1250 | 1250 | theorem flattenFactor_ge_half (d : TailData) (eta y : ℝ) : 1 / 2 ≤ flattenFactor d (y, eta) := by |
| 1251 | | - have hJ : 0 ≤ logShape eta := Real.log_nonneg (by nlinarith [sq_nonneg eta]) |
| 1251 | + have hJ : 0 ≤ logShape eta := Real.log_nonneg (by linarith [sq_nonneg eta]) |
| 1252 | 1252 | have hlog : 0 ≤ Real.log (2 : ℝ) := Real.log_nonneg (by norm_num) |
| 1253 | 1253 | have hm := mul_le_mul_of_nonneg_right (sigma_le_one ((y - d.core.endpoint) / flattenLength)) hlog |
| 1254 | 1254 | have hp := mul_nonneg (sigma_nonneg ((y - d.core.endpoint) / flattenLength)) hJ |
| 1255 | 1255 | have hh : -Real.log 2 ≤ sigma ((y - d.core.endpoint) / flattenLength) * (logShape eta - Real.log 2) := by |
| 1256 | | - nlinarith |
| 1256 | + linarith |
| 1257 | 1257 | have he := Real.exp_le_exp.mpr hh |
| 1258 | 1258 | simp only [Real.exp_neg, Real.exp_log (by norm_num : (0 : ℝ) < 2), inv_eq_one_div] at he |
| 1259 | 1259 | exact he |
| @@ -1302,7 +1302,7 @@ theorem corrected_amplitude_finite_lower {d : TailData} {K : ℝ} (w : ResetWitn |
| 1302 | 1302 | dsimp only [flattened] |
| 1303 | 1303 | rw [hang] |
| 1304 | 1304 | dsimp [finiteAmplitudeConstant] |
| 1305 | | - nlinarith |
| 1305 | + linarith |
| 1306 | 1306 | |
| 1307 | 1307 | theorem endpointAmplitude_le_pulse (d : TailData) (eta : ℝ) : |
| 1308 | 1308 | finalAngular d (d.core.endpoint, eta) ≤ pulseAmplitude d.core := by |
| @@ -1322,10 +1322,10 @@ theorem endpointAmplitude_le_pulse (d : TailData) (eta : ℝ) : |
| 1322 | 1322 | dsimp [shape] |
| 1323 | 1323 | rw [← one_div] |
| 1324 | 1324 | apply (div_le_one (by positivity)).mpr |
| 1325 | | - nlinarith [sq_nonneg eta] |
| 1325 | + linarith [sq_nonneg eta] |
| 1326 | 1326 | have hm := mul_le_mul he hs (shape_pos eta).le (by norm_num : (0 : ℝ) ≤ 1) |
| 1327 | 1327 | have hp := mul_le_mul_of_nonneg_left hm (pulseAmplitude_pos d.core).le |
| 1328 | | - nlinarith |
| 1328 | + linarith |
| 1329 | 1329 | |
| 1330 | 1330 | noncomputable def finiteConeConstant (P m : ℝ) : ℝ := |
| 1331 | 1331 | (4 * finiteNumeratorConstant / finiteAmplitudeConstant) * (P * Real.exp (Real.exp m + 12)) |
| @@ -1350,7 +1350,7 @@ theorem actual_finite_ratio_bound {d : TailData} {K : ℝ} (w : ResetWitness d K |
| 1350 | 1350 | have hden := mul_pos (OutgoingHistories.E_pos w (y, eta)) hq |
| 1351 | 1351 | have hnum := actualNs_finite_bound w ha hsmall eta heta hz hy hy' |
| 1352 | 1352 | have hbud : finiteNumeratorBudget d ≤ finiteNumeratorConstant / d.core.lam := |
| 1353 | | - (le_div_iff₀ d.core.lam_pos).mpr (by nlinarith [finiteNumeratorBudget_bound d]) |
| 1353 | + (le_div_iff₀ d.core.lam_pos).mpr (by linarith [finiteNumeratorBudget_bound d]) |
| 1354 | 1354 | have hend := (endpointAmplitude_le_pulse d eta).trans (OutgoingPulseBounds.pulseAmplitude_small d.core hwait) |
| 1355 | 1355 | have hE := finalAngular_pos d (d.core.endpoint, eta) |
| 1356 | 1356 | have he0 : 0 < finiteAmplitudeConstant * finalAngular d (d.core.endpoint, eta) * d.core.lam ^ (18 : ℕ) := |
| @@ -1442,7 +1442,7 @@ theorem actualP1_finite_large {d : TailData} {K : ℝ} (w : ResetWitness d K) |
| 1442 | 1442 | have hL := CoordinateAlgebra.L_pos d.h_pos.le d.h_lt_half heta |
| 1443 | 1443 | have hL1 : CoordinateAlgebra.L d.h eta ≤ 1 := by |
| 1444 | 1444 | dsimp [CoordinateAlgebra.L] |
| 1445 | | - nlinarith [mul_nonneg d.h_pos.le (sq_nonneg eta)] |
| 1445 | + linarith [mul_nonneg d.h_pos.le (sq_nonneg eta)] |
| 1446 | 1446 | have hXR0 := (finiteRadiusThreshold_pos d).trans hXR |
| 1447 | 1447 | have hscale : 16 < XR * (Real.exp d.core.endpoint * (d.core.lam / 4)) := |
| 1448 | 1448 | (div_lt_iff₀ (mul_pos (Real.exp_pos _) (div_pos d.core.lam_pos (by norm_num)))).mp hXR |
| @@ -1451,7 +1451,7 @@ theorem actualP1_finite_large {d : TailData} {K : ℝ} (w : ResetWitness d K) |
| 1451 | 1451 | have hp := mul_le_mul_of_nonneg_left hprod hXR0.le |
| 1452 | 1452 | change 16 < XR * Real.exp y * OutgoingHistories.Qs w Amp (y, eta) / CoordinateAlgebra.L d.h eta |
| 1453 | 1453 | apply (lt_div_iff₀ hL).mpr |
| 1454 | | - nlinarith |
| 1454 | + linarith |
| 1455 | 1455 | |
| 1456 | 1456 | theorem corrected_amplitude_energy_zero_germ {d : TailData} {K : ℝ} (w : ResetWitness d K) |
| 1457 | 1457 | (hK : 0 < K) (hwait : d.core.wait = 60 * Real.log (1 / d.core.lam)) |
| @@ -1471,7 +1471,7 @@ theorem reset_scale_le_one {d : TailData} {K : ℝ} (w : ResetWitness d K) |
| 1471 | 1471 | have h0 := ResetEnergyBounds.coefficient_scale_nonneg w |
| 1472 | 1472 | have hp := mul_nonneg resetJetConstant_pos.le h0 |
| 1473 | 1473 | dsimp [resetSourceError] at hreset |
| 1474 | | - nlinarith [d.core.lam_lt] |
| 1474 | + linarith [d.core.lam_lt] |
| 1475 | 1475 | |
| 1476 | 1476 | noncomputable def tailRadiusThreshold (d : TailData) : ℝ := |
| 1477 | 1477 | max (finiteRadiusThreshold d) (releaseRadiusThreshold d) |
| @@ -1565,7 +1565,7 @@ theorem exists_reset_source_threshold (K : ℝ) (hK : 0 < K) : |
| 1565 | 1565 | have hpow : d.core.lam ^ (27 : ℕ) ≤ d.core.lam := lambda_power_le_self d 26 |
| 1566 | 1566 | have hc := (lt_div_iff₀ hC).mp hlam |
| 1567 | 1567 | have hp := mul_le_mul_of_nonneg_left hpow hC.le |
| 1568 | | - have hb : C * d.core.lam ^ (27 : ℕ) ≤ 1 / 4 := by nlinarith |
| 1568 | + have hb : C * d.core.lam ^ (27 : ℕ) ≤ 1 / 4 := by linarith |
| 1569 | 1569 | calc |
| 1570 | 1570 | resetSourceError d K = d.core.lam * (C * d.core.lam ^ (27 : ℕ)) := by |
| 1571 | 1571 | dsimp [resetSourceError, C]; ring |
| @@ -1607,7 +1607,7 @@ theorem exists_tail_smallness_threshold (P m K : ℝ) (hP : 0 < P) (hK : 0 < K) |
| 1607 | 1607 | (lt_div_iff₀ (PulseCone.sourceConstant_pos hP m)).mp hlsource |
| 1608 | 1608 | have hp : d.core.lam ^ (29 : ℕ) ≤ d.core.lam := lambda_power_le_self d 28 |
| 1609 | 1609 | have hm := mul_le_mul_of_nonneg_left hp (PulseCone.sourceConstant_pos hP m).le |
| 1610 | | - nlinarith |
| 1610 | + linarith |
| 1611 | 1611 | · linarith [d.h_small] |
| 1612 | 1612 | · have hhold : d.core.holdStart = Real.exp m + 12 := by |
| 1613 | 1613 | dsimp [OutgoingSchedule.Parameters.holdStart, OutgoingSchedule.Parameters.dropLength] |