Theorem: add_pow_le
File: Mathlib/Algebra/Order/Ring/Basic.lean

tactic: simp
state_before: α : Type u_1
M : Type u_2
R : Type u_3
inst✝¹ : LinearOrderedSemiring R
a b : R
m n : ℕ
inst✝ : ExistsAddOfLE R
ha : 0 ≤ a
hb : 0 ≤ b
⊢ (a + b) ^ 0 ≤ 2 ^ (0 - 1) * (a ^ 0 + b ^ 0)
state_after: no goals

tactic: simp
state_before: α : Type u_1
M : Type u_2
R : Type u_3
inst✝¹ : LinearOrderedSemiring R
a b : R
m n : ℕ
inst✝ : ExistsAddOfLE R
ha : 0 ≤ a
hb : 0 ≤ b
⊢ (a + b) ^ 1 ≤ 2 ^ (1 - 1) * (a ^ 1 + b ^ 1)
state_after: no goals

tactic: rw [pow_succ]
state_before: α : Type u_1
M : Type u_2
R : Type u_3
inst✝¹ : LinearOrderedSemiring R
a b : R
m n✝ : ℕ
inst✝ : ExistsAddOfLE R
ha : 0 ≤ a
hb : 0 ≤ b
n : ℕ
⊢ (a + b) ^ (n + 2) ≤ 2 ^ (n + 2 - 1) * (a ^ (n + 2) + b ^ (n + 2))
state_after: α : Type u_1
M : Type u_2
R : Type u_3
inst✝¹ : LinearOrderedSemiring R
a b : R
m n✝ : ℕ
inst✝ : ExistsAddOfLE R
ha : 0 ≤ a
hb : 0 ≤ b
n : ℕ
⊢ (a + b) ^ (n + 1) * (a + b) ≤ 2 ^ (n + 2 - 1) * (a ^ (n + 2) + b ^ (n + 2))

tactic: calc
  _ ≤ 2 ^ n * (a ^ (n + 1) + b ^ (n + 1)) * (a + b) :=
      mul_le_mul_of_nonneg_right (add_pow_le ha hb (n + 1)) $ add_nonneg ha hb
  _ = 2 ^ n * (a ^ (n + 2) + b ^ (n + 2) + (a ^ (n + 1) * b + b ^ (n + 1) * a)) := by
      rw [mul_assoc, mul_add, add_mul, add_mul, ← pow_succ, ← pow_succ, add_comm _ (b ^ _),
        add_add_add_comm, add_comm (_ * a)]
  _ ≤ 2 ^ n * (a ^ (n + 2) + b ^ (n + 2) + (a ^ (n + 1) * a + b ^ (n + 1) * b)) :=
      mul_le_mul_of_nonneg_left (add_le_add_left ?_ _) $ pow_nonneg (zero_le_two (α := R)) _
  _ = _ := by simp only [← pow_succ, ← two_mul, ← mul_assoc]; rfl
state_before: α : Type u_1
M : Type u_2
R : Type u_3
inst✝¹ : LinearOrderedSemiring R
a b : R
m n✝ : ℕ
inst✝ : ExistsAddOfLE R
ha : 0 ≤ a
hb : 0 ≤ b
n : ℕ
⊢ (a + b) ^ (n + 1) * (a + b) ≤ 2 ^ (n + 2 - 1) * (a ^ (n + 2) + b ^ (n + 2))
state_after: α : Type u_1
M : Type u_2
R : Type u_3
inst✝¹ : LinearOrderedSemiring R
a b : R
m n✝ : ℕ
inst✝ : ExistsAddOfLE R
ha : 0 ≤ a
hb : 0 ≤ b
n : ℕ
⊢ a ^ (n + 1) * b + b ^ (n + 1) * a ≤ a ^ (n + 1) * a + b ^ (n + 1) * b

tactic: rw [mul_assoc, mul_add, add_mul, add_mul, ← pow_succ, ← pow_succ, add_comm _ (b ^ _),
  add_add_add_comm, add_comm (_ * a)]
state_before: α : Type u_1
M : Type u_2
R : Type u_3
inst✝¹ : LinearOrderedSemiring R
a b : R
m n✝ : ℕ
inst✝ : ExistsAddOfLE R
ha : 0 ≤ a
hb : 0 ≤ b
n : ℕ
⊢ 2 ^ n * (a ^ (n + 1) + b ^ (n + 1)) * (a + b) =
    2 ^ n * (a ^ (n + 2) + b ^ (n + 2) + (a ^ (n + 1) * b + b ^ (n + 1) * a))
state_after: no goals

tactic: simp only [← pow_succ, ← two_mul, ← mul_assoc]
state_before: α : Type u_1
M : Type u_2
R : Type u_3
inst✝¹ : LinearOrderedSemiring R
a b : R
m n✝ : ℕ
inst✝ : ExistsAddOfLE R
ha : 0 ≤ a
hb : 0 ≤ b
n : ℕ
⊢ 2 ^ n * (a ^ (n + 2) + b ^ (n + 2) + (a ^ (n + 1) * a + b ^ (n + 1) * b)) =
    2 ^ (n + 2 - 1) * (a ^ (n + 2) + b ^ (n + 2))
state_after: α : Type u_1
M : Type u_2
R : Type u_3
inst✝¹ : LinearOrderedSemiring R
a b : R
m n✝ : ℕ
inst✝ : ExistsAddOfLE R
ha : 0 ≤ a
hb : 0 ≤ b
n : ℕ
⊢ 2 ^ (n + 1) * (a ^ (n + 2) + b ^ (n + 2)) = 2 ^ (n + 2 - 1) * (a ^ (n + 2) + b ^ (n + 2))

tactic: rfl
state_before: α : Type u_1
M : Type u_2
R : Type u_3
inst✝¹ : LinearOrderedSemiring R
a b : R
m n✝ : ℕ
inst✝ : ExistsAddOfLE R
ha : 0 ≤ a
hb : 0 ≤ b
n : ℕ
⊢ 2 ^ (n + 1) * (a ^ (n + 2) + b ^ (n + 2)) = 2 ^ (n + 2 - 1) * (a ^ (n + 2) + b ^ (n + 2))
state_after: no goals

tactic: obtain hab | hba := le_total a b
state_before: α : Type u_1
M : Type u_2
R : Type u_3
inst✝¹ : LinearOrderedSemiring R
a b : R
m n✝ : ℕ
inst✝ : ExistsAddOfLE R
ha : 0 ≤ a
hb : 0 ≤ b
n : ℕ
⊢ a ^ (n + 1) * b + b ^ (n + 1) * a ≤ a ^ (n + 1) * a + b ^ (n + 1) * b
state_after: case inl
α : Type u_1
M : Type u_2
R : Type u_3
inst✝¹ : LinearOrderedSemiring R
a b : R
m n✝ : ℕ
inst✝ : ExistsAddOfLE R
ha : 0 ≤ a
hb : 0 ≤ b
n : ℕ
hab : a ≤ b
⊢ a ^ (n + 1) * b + b ^ (n + 1) * a ≤ a ^ (n + 1) * a + b ^ (n + 1) * b

case inr
α : Type u_1
M : Type u_2
R : Type u_3
inst✝¹ : LinearOrderedSemiring R
a b : R
m n✝ : ℕ
inst✝ : ExistsAddOfLE R
ha : 0 ≤ a
hb : 0 ≤ b
n : ℕ
hba : b ≤ a
⊢ a ^ (n + 1) * b + b ^ (n + 1) * a ≤ a ^ (n + 1) * a + b ^ (n + 1) * b

tactic: exact mul_add_mul_le_mul_add_mul (pow_le_pow_left ha hab _) hab
state_before: case inl
α : Type u_1
M : Type u_2
R : Type u_3
inst✝¹ : LinearOrderedSemiring R
a b : R
m n✝ : ℕ
inst✝ : ExistsAddOfLE R
ha : 0 ≤ a
hb : 0 ≤ b
n : ℕ
hab : a ≤ b
⊢ a ^ (n + 1) * b + b ^ (n + 1) * a ≤ a ^ (n + 1) * a + b ^ (n + 1) * b
state_after: no goals

tactic: exact mul_add_mul_le_mul_add_mul' (pow_le_pow_left hb hba _) hba
state_before: case inr
α : Type u_1
M : Type u_2
R : Type u_3
inst✝¹ : LinearOrderedSemiring R
a b : R
m n✝ : ℕ
inst✝ : ExistsAddOfLE R
ha : 0 ≤ a
hb : 0 ≤ b
n : ℕ
hba : b ≤ a
⊢ a ^ (n + 1) * b + b ^ (n + 1) * a ≤ a ^ (n + 1) * a + b ^ (n + 1) * b
state_after: no goals