Theorem: ADEInequality.lt_three
File: Mathlib/NumberTheory/ADEInequality.lean

tactic: have h3 : (0 : ℚ) < 3 := by norm_num
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
H : 1 < sumInv {p, q, r}
⊢ p < 3

tactic: contrapose! H
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
H : 1 < sumInv {p, q, r}
h3 : 0 < 3
⊢ p < 3

tactic: rw [sumInv_pqr]
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
H : ¬p < 3
⊢ sumInv {p, q, r} ≤ 1

tactic: have h3q := (not_lt.mp H).trans hpq
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
H : ¬p < 3
⊢ (↑↑p)⁻¹ + (↑↑q)⁻¹ + (↑↑r)⁻¹ ≤ 1

tactic: have h3r := h3q.trans hqr
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
H : ¬p < 3
h3q : 3 ≤ q
⊢ (↑↑p)⁻¹ + (↑↑q)⁻¹ + (↑↑r)⁻¹ ≤ 1

tactic: simp at H
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
H : ¬p < 3
h3q : 3 ≤ q
h3r : 3 ≤ r
⊢ (↑↑p)⁻¹ + (↑↑q)⁻¹ + (↑↑r)⁻¹ ≤ 1

tactic: have hp: (p : ℚ)⁻¹ ≤ 3⁻¹ := by
  rw [inv_le_inv _ h3]
  assumption_mod_cast
  norm_num
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
h3q : 3 ≤ q
h3r : 3 ≤ r
H : 3 ≤ p
⊢ (↑↑p)⁻¹ + (↑↑q)⁻¹ + (↑↑r)⁻¹ ≤ 1

tactic: have hq: (q : ℚ)⁻¹ ≤ 3⁻¹ := by
  rw [inv_le_inv _ h3]
  assumption_mod_cast
  norm_num
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
h3q : 3 ≤ q
h3r : 3 ≤ r
H : 3 ≤ p
hp : (↑↑p)⁻¹ ≤ 3⁻¹
⊢ (↑↑p)⁻¹ + (↑↑q)⁻¹ + (↑↑r)⁻¹ ≤ 1

tactic: have hr: (r : ℚ)⁻¹ ≤ 3⁻¹ := by
  rw [inv_le_inv _ h3]
  assumption_mod_cast
  norm_num
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
h3q : 3 ≤ q
h3r : 3 ≤ r
H : 3 ≤ p
hp : (↑↑p)⁻¹ ≤ 3⁻¹
hq : (↑↑q)⁻¹ ≤ 3⁻¹
⊢ (↑↑p)⁻¹ + (↑↑q)⁻¹ + (↑↑r)⁻¹ ≤ 1

tactic: calc
  (p : ℚ)⁻¹ + (q : ℚ)⁻¹ + (r : ℚ)⁻¹ ≤ 3⁻¹ + 3⁻¹ + 3⁻¹ := add_le_add (add_le_add hp hq) hr
  _ = 1 := by norm_num
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
h3q : 3 ≤ q
h3r : 3 ≤ r
H : 3 ≤ p
hp : (↑↑p)⁻¹ ≤ 3⁻¹
hq : (↑↑q)⁻¹ ≤ 3⁻¹
hr : (↑↑r)⁻¹ ≤ 3⁻¹
⊢ (↑↑p)⁻¹ + (↑↑q)⁻¹ + (↑↑r)⁻¹ ≤ 1

tactic: norm_num
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
H : 1 < sumInv {p, q, r}
⊢ 0 < 3

tactic: rw [inv_le_inv _ h3]
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
h3q : 3 ≤ q
h3r : 3 ≤ r
H : 3 ≤ p
⊢ (↑↑p)⁻¹ ≤ 3⁻¹

tactic: assumption_mod_cast
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
h3q : 3 ≤ q
h3r : 3 ≤ r
H : 3 ≤ p
⊢ 3 ≤ ↑↑p

p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
h3q : 3 ≤ q
h3r : 3 ≤ r
H : 3 ≤ p
⊢ 0 < ↑↑p

tactic: norm_num
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
h3q : 3 ≤ q
h3r : 3 ≤ r
H : 3 ≤ p
⊢ 0 < ↑↑p

tactic: rw [inv_le_inv _ h3]
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
h3q : 3 ≤ q
h3r : 3 ≤ r
H : 3 ≤ p
hp : (↑↑p)⁻¹ ≤ 3⁻¹
⊢ (↑↑q)⁻¹ ≤ 3⁻¹

tactic: assumption_mod_cast
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
h3q : 3 ≤ q
h3r : 3 ≤ r
H : 3 ≤ p
hp : (↑↑p)⁻¹ ≤ 3⁻¹
⊢ 3 ≤ ↑↑q

p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
h3q : 3 ≤ q
h3r : 3 ≤ r
H : 3 ≤ p
hp : (↑↑p)⁻¹ ≤ 3⁻¹
⊢ 0 < ↑↑q

tactic: norm_num
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
h3q : 3 ≤ q
h3r : 3 ≤ r
H : 3 ≤ p
hp : (↑↑p)⁻¹ ≤ 3⁻¹
⊢ 0 < ↑↑q

tactic: rw [inv_le_inv _ h3]
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
h3q : 3 ≤ q
h3r : 3 ≤ r
H : 3 ≤ p
hp : (↑↑p)⁻¹ ≤ 3⁻¹
hq : (↑↑q)⁻¹ ≤ 3⁻¹
⊢ (↑↑r)⁻¹ ≤ 3⁻¹

tactic: assumption_mod_cast
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
h3q : 3 ≤ q
h3r : 3 ≤ r
H : 3 ≤ p
hp : (↑↑p)⁻¹ ≤ 3⁻¹
hq : (↑↑q)⁻¹ ≤ 3⁻¹
⊢ 3 ≤ ↑↑r

p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
h3q : 3 ≤ q
h3r : 3 ≤ r
H : 3 ≤ p
hp : (↑↑p)⁻¹ ≤ 3⁻¹
hq : (↑↑q)⁻¹ ≤ 3⁻¹
⊢ 0 < ↑↑r

tactic: norm_num
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
h3q : 3 ≤ q
h3r : 3 ≤ r
H : 3 ≤ p
hp : (↑↑p)⁻¹ ≤ 3⁻¹
hq : (↑↑q)⁻¹ ≤ 3⁻¹
⊢ 0 < ↑↑r

tactic: norm_num
state_before: p q r : ℕ+
hpq : p ≤ q
hqr : q ≤ r
h3 : 0 < 3
h3q : 3 ≤ q
h3r : 3 ≤ r
H : 3 ≤ p
hp : (↑↑p)⁻¹ ≤ 3⁻¹
hq : (↑↑q)⁻¹ ≤ 3⁻¹
hr : (↑↑r)⁻¹ ≤ 3⁻¹
⊢ 3⁻¹ + 3⁻¹ + 3⁻¹ = 1