| @@ -80,7 +80,7 @@ theorem discriminant_pos (d : TailData) (c : ℝ → Coeff) (eta : ℝ) : 0 < di |
| 80 | 80 | unfold discriminant |
| 81 | 81 | have ha := PulseAmplitude.quadraticCoefficient_pos d.core |
| 82 | 82 | have hc := PulseAmplitude.negativeClamp_neg (constantTerm d c eta) |
| 83 | | - nlinarith [sq_nonneg (PulseAmplitude.linearTerm d.core eta), mul_neg_of_pos_of_neg ha hc] |
| 83 | + linarith [sq_nonneg (PulseAmplitude.linearTerm d.core eta), mul_neg_of_pos_of_neg ha hc] |
| 84 | 84 | |
| 85 | 85 | def amplitude (d : TailData) (c : ℝ → Coeff) (eta : ℝ) : ℝ := |
| 86 | 86 | (-PulseAmplitude.linearTerm d.core eta + Real.sqrt (discriminant d c eta)) / |
| @@ -153,7 +153,7 @@ theorem power29_le_lambda (d : TailData) : d.core.lam ^ (29 : ℕ) ≤ d.core.la |
| 153 | 153 | pow_le_one₀ d.core.lam_pos.le (by linarith [d.core.lam_lt]) |
| 154 | 154 | calc |
| 155 | 155 | _ = d.core.lam * d.core.lam ^ (28 : ℕ) := by ring |
| 156 | | - _ ≤ _ := by nlinarith [mul_le_mul_of_nonneg_left hpow d.core.lam_pos.le] |
| 156 | + _ ≤ _ := by linarith [mul_le_mul_of_nonneg_left hpow d.core.lam_pos.le] |
| 157 | 157 | |
| 158 | 158 | theorem energyShift_bounds {d : TailData} {K : ℝ} (w : ResetWitness d K) (hK : 0 < K) (eta : ℝ) |
| 159 | 159 | (heta : eta ^ 2 ≤ 1) : |
| @@ -176,10 +176,10 @@ theorem energyShift_bounds {d : TailData} {K : ℝ} (w : ResetWitness d K) (hK : |
| 176 | 176 | constructor |
| 177 | 177 | · unfold energyShift |
| 178 | 178 | rw [abs_div, abs_of_pos (by norm_num : (0 : ℝ) < 2)] |
| 179 | | - nlinarith [mul_nonneg hK.le (pow_nonneg d.core.lam_pos.le (29 : ℕ))] |
| 179 | + linarith [mul_nonneg hK.le (pow_nonneg d.core.lam_pos.le (29 : ℕ))] |
| 180 | 180 | · change |deriv (fun t => ResetEnergyBounds.normalizedResetEnergy d w.coefficients t / 2) eta| ≤ _ |
| 181 | 181 | rw [hd, abs_div, abs_of_pos (by norm_num : (0 : ℝ) < 2)] |
| 182 | | - nlinarith |
| 182 | + linarith |
| 183 | 183 | |
| 184 | 184 | theorem old_error_bounds (d : TailData) (K : ℝ) (hK : 0 < K) |
| 185 | 185 | (hsmall : d.core.lam ≤ 1 / 120) (hwait : d.core.wait = 60 * Real.log (1 / d.core.lam)) |
| @@ -210,7 +210,7 @@ theorem numerical_coefficient_bounds (d : TailData) (c : ℝ → Coeff) (eta e : |
| 210 | 210 | PulseAmplitude.etaPolynomial eta ^ 2 ≤ 8 * e := by |
| 211 | 211 | have hm := mul_le_mul (add_le_add h.correction_error h.prefix_axial_error) hq2 |
| 212 | 212 | (sq_nonneg (PulseAmplitude.etaPolynomial eta)) (by linarith [h.scale_nonneg]) |
| 213 | | - nlinarith |
| 213 | + linarith |
| 214 | 214 | have hD := RadialSchedule.pulse_energy_debt_bounds |
| 215 | 215 | obtain ⟨hsl, hsu⟩ := abs_le.mp hshift |
| 216 | 216 | refine ⟨ha, ha', hb, ?_, ?_⟩ |
| @@ -278,7 +278,7 @@ theorem amplitude_derivative_bound (d : TailData) {c : ℝ → Coeff} |
| 278 | 278 | PulseAmplitude.linearTerm d.core eta := by |
| 279 | 279 | have hm := mul_le_mul_of_nonneg_right ha (amplitude_pos d c eta).le |
| 280 | 280 | have hbl := (abs_le.mp hb).1 |
| 281 | | - nlinarith |
| 281 | + linarith |
| 282 | 282 | have hid := amplitude_derivative_identity d hc eta (by linarith) |
| 283 | 283 | have heq : (2 * PulseAmplitude.quadraticCoefficient d.core * amplitude d c eta + |
| 284 | 284 | PulseAmplitude.linearTerm d.core eta) * deriv (amplitude d c) eta = |
| @@ -301,7 +301,7 @@ theorem amplitude_derivative_bound (d : TailData) {c : ℝ → Coeff} |
| 301 | 301 | have hupper := mul_le_mul hdb hr'.le (amplitude_pos d c eta).le |
| 302 | 302 | (by linarith [h.scale_nonneg] : 0 ≤ 4 * e) |
| 303 | 303 | have hlower := mul_le_mul_of_nonneg_right hden (abs_nonneg (deriv (amplitude d c) eta)) |
| 304 | | - nlinarith [h.scale_nonneg] |
| 304 | + linarith [h.scale_nonneg] |
| 305 | 305 | |
| 306 | 306 | theorem energyPolynomial_strictMonoOn (d : TailData) (c : ℝ → Coeff) (eta e : ℝ) |
| 307 | 307 | (heta : eta ^ 2 ≤ 1) (h : PulseAmplitude.EnergyErrorBounds d eta e) |
| @@ -315,13 +315,13 @@ theorem energyPolynomial_strictMonoOn (d : TailData) (c : ℝ → Coeff) (eta e |
| 315 | 315 | PulseAmplitude.linearTerm d.core eta := by |
| 316 | 316 | have hbl := (abs_le.mp hb).1 |
| 317 | 317 | simp only [mem_Ici] at hA hB |
| 318 | | - nlinarith |
| 318 | + linarith |
| 319 | 319 | have hp := mul_pos (sub_pos.mpr hAB) hcoef |
| 320 | 320 | change PulseAmplitude.quadraticCoefficient d.core * A ^ 2 + |
| 321 | 321 | PulseAmplitude.linearTerm d.core eta * A + constantTerm d c eta < |
| 322 | 322 | PulseAmplitude.quadraticCoefficient d.core * B ^ 2 + |
| 323 | 323 | PulseAmplitude.linearTerm d.core eta * B + constantTerm d c eta |
| 324 | | - nlinarith only [hp] |
| 324 | + linarith only [hp] |
| 325 | 325 | |
| 326 | 326 | theorem amplitude_unique (d : TailData) (c : ℝ → Coeff) (eta e : ℝ) |
| 327 | 327 | (heta : eta ^ 2 ≤ 1) (h : PulseAmplitude.EnergyErrorBounds d eta e) |
| @@ -358,8 +358,7 @@ private theorem radialCoordinate_transform (d : TailData) (c : ℝ → Coeff) (a |
| 358 | 358 | funext y |
| 359 | 359 | have hlog : Real.log (XR * Real.exp y / XR) = y := by |
| 360 | 360 | rw [mul_comm XR, mul_div_cancel_right₀ _ hXR.ne', Real.log_exp] |
| 361 | | - simp only [radialEnergyIntegrand, hlog, abs_of_pos (mul_pos hXR (Real.exp_pos _)), smul_eq_mul, |
| 362 | | - energyIntegrand] |
| 361 | + simp only [radialEnergyIntegrand, hlog, abs_of_pos (mul_pos hXR (Real.exp_pos _)), energyIntegrand] |
| 363 | 362 | rw [PulseAmplitude.axial_eq_of_amplitude_eq d.core amp (fun _ => amp eta) eta y rfl] |
| 364 | 363 | ring |
| 365 | 364 | |