Theorem: LO.FirstOrder.Arith.Model.sq_len_le_three_mul (Arithmetization/ISigmaZero/Exponential/Log.lean)

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
⊢ ‖a‖ ^ 2 ≤ 3 * a
Tactic:
induction a using hierarchy_polynomial_induction_oRing_sigma₀
State after:
case hP
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
⊢ 𝚺₀-Predicate fun a => ‖a‖ ^ 2 ≤ 3 * a

case zero
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
⊢ ‖0‖ ^ 2 ≤ 3 * 0

case even
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
x✝ : M
a✝¹ : x✝ > 0
a✝ : ‖x✝‖ ^ 2 ≤ 3 * x✝
⊢ ‖2 * x✝‖ ^ 2 ≤ 3 * (2 * x✝)

case odd
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
x✝ : M
a✝ : ‖x✝‖ ^ 2 ≤ 3 * x✝
⊢ ‖2 * x✝ + 1‖ ^ 2 ≤ 3 * (2 * x✝ + 1)

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
⊢ ‖0‖ ^ 2 ≤ 3 * 0
Tactic:
case zero => simp
State after:
no goals

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
pos : a > 0
IH : ‖a‖ ^ 2 ≤ 3 * a
⊢ ‖2 * a‖ ^ 2 ≤ 3 * (2 * a)
Tactic:
case even a pos IH =>
  calc
    ‖2 * a‖ ^ 2 = (‖a‖ + 1) ^ 2         := by rw [length_two_mul_of_pos pos]
    _           = ‖a‖ ^ 2 + 2 * ‖a‖ + 1 := by simp [sq, add_mul_self_eq]
    _           ≤ 3 * a + 2 * ‖a‖ + 1   := by simpa using IH
    _           ≤ 3 * a + 2 * a + 1     := by simp
    _           ≤ 3 * a + 2 * a + a     := by simp [←pos_iff_one_le, pos]
    _           = 3 * (2 * a)           := by simp_all only [←two_add_one_eq_three, two_mul, add_mul, add_assoc, one_mul]
State after:
no goals

State before:
case hP
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
⊢ 𝚺₀-Predicate fun a => ‖a‖ ^ 2 ≤ 3 * a
Tactic:
definability
State after:
no goals

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
⊢ ‖0‖ ^ 2 ≤ 3 * 0
Tactic:
simp
State after:
no goals

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
pos : a > 0
IH : ‖a‖ ^ 2 ≤ 3 * a
⊢ ‖2 * a‖ ^ 2 ≤ 3 * (2 * a)
Tactic:
calc
  ‖2 * a‖ ^ 2 = (‖a‖ + 1) ^ 2         := by rw [length_two_mul_of_pos pos]
  _           = ‖a‖ ^ 2 + 2 * ‖a‖ + 1 := by simp [sq, add_mul_self_eq]
  _           ≤ 3 * a + 2 * ‖a‖ + 1   := by simpa using IH
  _           ≤ 3 * a + 2 * a + 1     := by simp
  _           ≤ 3 * a + 2 * a + a     := by simp [←pos_iff_one_le, pos]
  _           = 3 * (2 * a)           := by simp_all only [←two_add_one_eq_three, two_mul, add_mul, add_assoc, one_mul]
State after:
no goals

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
pos : a > 0
IH : ‖a‖ ^ 2 ≤ 3 * a
⊢ ‖2 * a‖ ^ 2 = (‖a‖ + 1) ^ 2
Tactic:
rw [length_two_mul_of_pos pos]
State after:
no goals

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
pos : a > 0
IH : ‖a‖ ^ 2 ≤ 3 * a
⊢ (‖a‖ + 1) ^ 2 = ‖a‖ ^ 2 + 2 * ‖a‖ + 1
Tactic:
simp [sq, add_mul_self_eq]
State after:
no goals

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
pos : a > 0
IH : ‖a‖ ^ 2 ≤ 3 * a
⊢ ‖a‖ ^ 2 + 2 * ‖a‖ + 1 ≤ 3 * a + 2 * ‖a‖ + 1
Tactic:
simpa using IH
State after:
no goals

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
pos : a > 0
IH : ‖a‖ ^ 2 ≤ 3 * a
⊢ 3 * a + 2 * ‖a‖ + 1 ≤ 3 * a + 2 * a + 1
Tactic:
simp
State after:
no goals

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
pos : a > 0
IH : ‖a‖ ^ 2 ≤ 3 * a
⊢ 3 * a + 2 * a + 1 ≤ 3 * a + 2 * a + a
Tactic:
simp [←pos_iff_one_le, pos]
State after:
no goals

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
pos : a > 0
IH : ‖a‖ ^ 2 ≤ 3 * a
⊢ 3 * a + 2 * a + a = 3 * (2 * a)
Tactic:
simp_all only [←two_add_one_eq_three, two_mul, add_mul, add_assoc, one_mul]
State after:
no goals

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
IH : ‖a‖ ^ 2 ≤ 3 * a
⊢ ‖2 * a + 1‖ ^ 2 ≤ 3 * (2 * a + 1)
Tactic:
rcases zero_le a with (rfl | pos)
State after:
case inl
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
IH : ‖0‖ ^ 2 ≤ 3 * 0
⊢ ‖2 * 0 + 1‖ ^ 2 ≤ 3 * (2 * 0 + 1)

case inr
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
IH : ‖a‖ ^ 2 ≤ 3 * a
pos : 0 < a
⊢ ‖2 * a + 1‖ ^ 2 ≤ 3 * (2 * a + 1)

State before:
case inr
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
IH : ‖a‖ ^ 2 ≤ 3 * a
pos : 0 < a
⊢ ‖2 * a + 1‖ ^ 2 ≤ 3 * (2 * a + 1)
Tactic:
calc
  ‖2 * a + 1‖ ^ 2 = (‖a‖ + 1) ^ 2         := by rw [length_two_mul_add_one a]
  _               = ‖a‖ ^ 2 + 2 * ‖a‖ + 1 := by simp [sq, add_mul_self_eq]
  _               ≤ 3 * a + 2 * ‖a‖ + 1   := by simpa using IH
  _               ≤ 3 * a + 2 * a + 1     := by simp
  _               ≤ 3 * a + 2 * a + a     := by simp [←pos_iff_one_le, pos]
  _               = 3 * (2 * a)           := by simp_all only [←two_add_one_eq_three, two_mul, add_mul, add_assoc, one_mul]
  _               ≤ 3 * (2 * a + 1)       := by simp
State after:
no goals

State before:
case inl
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
IH : ‖0‖ ^ 2 ≤ 3 * 0
⊢ ‖2 * 0 + 1‖ ^ 2 ≤ 3 * (2 * 0 + 1)
Tactic:
simp [←two_add_one_eq_three]
State after:
no goals

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
IH : ‖a‖ ^ 2 ≤ 3 * a
pos : 0 < a
⊢ ‖2 * a + 1‖ ^ 2 = (‖a‖ + 1) ^ 2
Tactic:
rw [length_two_mul_add_one a]
State after:
no goals

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
IH : ‖a‖ ^ 2 ≤ 3 * a
pos : 0 < a
⊢ (‖a‖ + 1) ^ 2 = ‖a‖ ^ 2 + 2 * ‖a‖ + 1
Tactic:
simp [sq, add_mul_self_eq]
State after:
no goals

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
IH : ‖a‖ ^ 2 ≤ 3 * a
pos : 0 < a
⊢ ‖a‖ ^ 2 + 2 * ‖a‖ + 1 ≤ 3 * a + 2 * ‖a‖ + 1
Tactic:
simpa using IH
State after:
no goals

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
IH : ‖a‖ ^ 2 ≤ 3 * a
pos : 0 < a
⊢ 3 * a + 2 * ‖a‖ + 1 ≤ 3 * a + 2 * a + 1
Tactic:
simp
State after:
no goals

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
IH : ‖a‖ ^ 2 ≤ 3 * a
pos : 0 < a
⊢ 3 * a + 2 * a + 1 ≤ 3 * a + 2 * a + a
Tactic:
simp [←pos_iff_one_le, pos]
State after:
no goals

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
IH : ‖a‖ ^ 2 ≤ 3 * a
pos : 0 < a
⊢ 3 * a + 2 * a + a = 3 * (2 * a)
Tactic:
simp_all only [←two_add_one_eq_three, two_mul, add_mul, add_assoc, one_mul]
State after:
no goals

State before:
M : Type u_1
inst✝⁵ : Zero M
inst✝⁴ : One M
inst✝³ : Add M
inst✝² : Mul M
inst✝¹ : LT M
inst✝ : M ⊧ₘ* 𝐈𝚫₀
a : M
IH : ‖a‖ ^ 2 ≤ 3 * a
pos : 0 < a
⊢ 3 * (2 * a) ≤ 3 * (2 * a + 1)
Tactic:
simp
State after:
no goals