| @@ -288,14 +288,14 @@ theorem lower_comparison_preserves {X a L b q : ℝ} |
| 288 | 288 | have hX : 0 < X := ha.trans_le haX |
| 289 | 289 | have hfac : 0 ≤ q * (X + a) - 2 * b * L := by |
| 290 | 290 | have hm := mul_le_mul_of_nonneg_left haX hq |
| 291 | | - nlinarith |
| 291 | + linarith |
| 292 | 292 | have hprod := mul_nonneg (sub_nonneg.mpr haX) hfac |
| 293 | 293 | have heq : b * a / X + q / (2 * L) * (X - a ^ 2 / X) = |
| 294 | 294 | (2 * L * b * a + q * (X ^ 2 - a ^ 2)) / (2 * L * X) := by |
| 295 | 295 | field_simp |
| 296 | 296 | rw [heq] |
| 297 | 297 | apply (le_div_iff₀ (by positivity : 0 < 2 * L * X)).mpr |
| 298 | | - nlinarith |
| 298 | + linarith |
| 299 | 299 | |
| 300 | 300 | theorem p1_preserves_lower {p : Point} (hp : p ∈ D.carrier) (hX : 0 < p.1) |
| 301 | 301 | (h : ℝ) (hL : 0 < NaturalAxisData.L h p.2) {a b q : ℝ} |
| @@ -318,7 +318,7 @@ theorem p1_at_hundred_gt_three {η h : ℝ} (hp : (100, η) ∈ D.carrier) |
| 318 | 318 | (by norm_num : (0 : ℝ) ≤ 12 / 5) hf hmono hsource |
| 319 | 319 | have hn : (3 : ℝ) < (12 / 5) * 100 / (2 * NaturalAxisData.L h η) := by |
| 320 | 320 | apply (lt_div_iff₀ (mul_pos (by norm_num) hL)).mpr |
| 321 | | - nlinarith |
| 321 | + linarith |
| 322 | 322 | exact hn.trans_le hb |
| 323 | 323 | |
| 324 | 324 | theorem p2_large_of_small_f {p : Point} (hX : 0 < p.1) (hX110 : p.1 ≤ 110) |
| @@ -328,7 +328,7 @@ theorem p2_large_of_small_f {p : Point} (hX : 0 < p.1) (hX110 : p.1 ≤ 110) |
| 328 | 328 | (hn : ν ≤ |ns P h p|) (hlarge : 18 * K / (a * ν) < C) : |
| 329 | 329 | (6 / 5 : ℝ) < |p2 P h p| := by |
| 330 | 330 | have hs : Real.sqrt (2 * p.1) ≤ 15 := |
| 331 | | - (Real.sqrt_le_iff).mpr ⟨by norm_num, by nlinarith⟩ |
| 331 | + (Real.sqrt_le_iff).mpr ⟨by norm_num, by linarith⟩ |
| 332 | 332 | have hE : 0 < P.E p := mul_pos (Real.sqrt_pos.mpr (by positivity)) hf |
| 333 | 333 | have hEb : P.E p ≤ 15 * K / C := by |
| 334 | 334 | change Real.sqrt (2 * p.1) * P.f p ≤ _ |
| @@ -338,7 +338,7 @@ theorem p2_large_of_small_f {p : Point} (hX : 0 < p.1) (hX110 : p.1 ≤ 110) |
| 338 | 338 | have hc : 18 * K / C < a * ν := by |
| 339 | 339 | apply (div_lt_iff₀ hC).mpr |
| 340 | 340 | have hh := (div_lt_iff₀ (mul_pos ha hν)).mp hlarge |
| 341 | | - nlinarith |
| 341 | + linarith |
| 342 | 342 | have hnprod : a * ν ≤ p.1 * |ns P h p| := |
| 343 | 343 | mul_le_mul haX hn hν.le hX.le |
| 344 | 344 | rw [p2, abs_div, abs_mul, abs_of_pos hX, abs_of_pos hE] |
| @@ -358,7 +358,7 @@ theorem cone_margin_of_dichotomy {a b : ℝ} (ha : 0 < a) |
| 358 | 358 | have habs := sq_lt_sq₀ (by norm_num : (0 : ℝ) ≤ 6 / 5) (abs_nonneg b) |>.mpr hsecond |
| 359 | 359 | simpa only [sq_abs] using habs |
| 360 | 360 | have hm : (12 / 5 : ℝ) * a < a ^ 2 + b ^ 2 := by |
| 361 | | - nlinarith [sq_nonneg (a - 6 / 5)] |
| 361 | + linarith [sq_nonneg (a - 6 / 5)] |
| 362 | 362 | have hd : (12 / 5 : ℝ) < a + b ^ 2 / a := by |
| 363 | 363 | calc |
| 364 | 364 | (12 / 5 : ℝ) < (a ^ 2 + b ^ 2) / a := (lt_div_iff₀ ha).mpr hm |
| @@ -483,15 +483,15 @@ theorem qModel_uniform_lower {h j σ : ℝ} {P0 : ℝ → ℝ} |
| 483 | 483 | have hmul := (div_lt_iff₀ hδ).mp hΛ' |
| 484 | 484 | have ht : |1 / Λ| < δ := by |
| 485 | 485 | rw [abs_of_pos (one_div_pos.mpr hΛ0), div_lt_iff₀ hΛ0] |
| 486 | | - nlinarith |
| 486 | + linarith |
| 487 | 487 | have he' : |e| < δ := he.trans_lt (by |
| 488 | 488 | apply (div_lt_iff₀ hΛ0).mpr |
| 489 | | - nlinarith) |
| 489 | + linarith) |
| 490 | 490 | have hnorm : ‖((1 / Λ), e)‖ < δ := by |
| 491 | 491 | simpa only [Prod.norm_def, Real.norm_eq_abs, max_lt_iff] using And.intro ht he' |
| 492 | 492 | have herror := (abs_lt.mp (hpert p ((1 / Λ), e) hnorm)).1 |
| 493 | 493 | have hb := hmain Λ ((le_max_left _ _).trans hΛ) p |
| 494 | | - nlinarith |
| 494 | + linarith |
| 495 | 495 | |
| 496 | 496 | abbrev AxialSourceParameter (B : ℝ) := Icc (-1 : ℝ) 1 × BoundedJets B |
| 497 | 497 | |
| @@ -595,7 +595,7 @@ theorem sourceQ_model (h j σ : ℝ) {Λ φ Y θ r : ℝ} (hΛ : Λ ≠ 0) |
| 595 | 595 | qRemainder h j σ (Y, p.2) θ (qJets P j σ h Λ φ p) (1 / Λ) r := by |
| 596 | 596 | have hg := NaturalProfile.gradient_identity h j σ p.2 |
| 597 | 597 | simp only [qRemainder, qJets, Matrix.cons_val_zero, Matrix.cons_val_one, |
| 598 | | - Matrix.cons_val, Fin.isValue, max_eq_right hφ] |
| 598 | + Matrix.cons_val, max_eq_right hφ] |
| 599 | 599 | rw [← hrad] |
| 600 | 600 | unfold sourceQ logSlope Profiles.W |
| 601 | 601 | unfold NaturalAxisData.W NaturalAxisData.H at hg ⊢ |
| @@ -792,7 +792,7 @@ theorem reference_p1_natural {δ : ℝ} (hδ : 0 < δ) (hδT : 2 * δ < rampLimi |
| 792 | 792 | p1 (referenceProfiles F hΛ hδ hδT hP0) h p = NaturalEntrance.p1 F.family.f p := by |
| 793 | 793 | let N := Input.ofNatural hΛ F.family |
| 794 | 794 | let P := referenceProfiles F hΛ hδ hδT hP0 |
| 795 | | - have hY : Λ * p.1 ≤ 4 := by nlinarith [(le_div_iff₀ hΛ).mp ha] |
| 795 | + have hY : Λ * p.1 ≤ 4 := by linarith [(le_div_iff₀ hΛ).mp ha] |
| 796 | 796 | have hpoint : rescalePoint Λ p ∈ NaturalEntrance.entranceSet := |
| 797 | 797 | ⟨⟨mul_nonneg hΛ.le hX.le, by change Λ * p.1 ≤ 41 / 10; linarith⟩, hη⟩ |
| 798 | 798 | have hp := NaturalEntrance.entrance_mem_strip hpoint |
| @@ -951,7 +951,7 @@ theorem pressureJets_small {p : Point} (hp : p ∈ D.carrier) |
| 951 | 951 | have hinv : |1 / Λ| < ε := by |
| 952 | 952 | rw [abs_of_pos (one_div_pos.mpr hΛ0), div_lt_iff₀ hΛ0] |
| 953 | 953 | have hmul := (div_lt_iff₀ hε).mp (show 1 / ε < Λ by linarith) |
| 954 | | - nlinarith |
| 954 | + linarith |
| 955 | 955 | have hsize : 220 * K ^ 2 / C ^ 2 < ε := by |
| 956 | 956 | apply (div_lt_iff₀ (sq_pos_of_pos hC0)).mpr |
| 957 | 957 | have hb := (div_lt_iff₀ hε).mp (show 220 * K ^ 2 / ε < C by linarith) |
| @@ -1224,7 +1224,7 @@ theorem exists_reference_bounds {h j σ ν : ℝ} {P0 : ℝ → ℝ} |
| 1224 | 1224 | (47 / 50 : ℝ) * NaturalAxisData.L h p.2 * Λ * NaturalAxisData.chi h j σ p.2 + 12 / 5 < |
| 1225 | 1225 | sourceQ P h p := by |
| 1226 | 1226 | by_cases hnat : p.1 ≤ 4 / Λ |
| 1227 | | - · have hY : Λ * p.1 ≤ 4 := by nlinarith [(le_div_iff₀ hΛ).mp hnat] |
| 1227 | + · have hY : Λ * p.1 ≤ 4 := by linarith [(le_div_iff₀ hΛ).mp hnat] |
| 1228 | 1228 | have hpoint : NaturalProfile.rescalePoint Λ p ∈ NaturalEntrance.entranceSet := |
| 1229 | 1229 | ⟨⟨mul_nonneg hΛ.le hp.1.1, by change Λ * p.1 ≤ 41 / 10; linarith⟩, hp.2⟩ |
| 1230 | 1230 | have he := reference_sourceQ_natural E.profile hΛ hδ hc.length_bound hP0 |
| @@ -1235,7 +1235,7 @@ theorem exists_reference_bounds {h j σ ν : ℝ} {P0 : ℝ → ℝ} |
| 1235 | 1235 | have hnonneg : 0 ≤ NaturalAxisData.L h p.2 * Λ * NaturalAxisData.chi h j σ p.2 := |
| 1236 | 1236 | mul_nonneg (mul_nonneg (NaturalAxisData.L_pos hsmall hp.2).le hΛ.le) |
| 1237 | 1237 | (NaturalAxisData.chi_bounds h j hσ p.2).1 |
| 1238 | | - nlinarith |
| 1238 | + linarith |
| 1239 | 1239 | · obtain ⟨s⟩ := hsamples p hp (le_of_lt (lt_of_not_ge hnat)) |
| 1240 | 1240 | exact hqmodel Λ hscaleq P p s.Y s.theta s.phi s.error s.point_mem s.theta_mem |
| 1241 | 1241 | s.phi_lower s.phi_upper s.error_bound (hJ.axial_value p hp) |