Theorem: Lean4Axiomatic.Rational.neg_abs_le_self (Lean4Axiomatic/Rational/Metric.lean)

State before:
ℕ ℤ ℚ : Type
inst✝¹² : Natural ℕ
inst✝¹¹ : Integer ℤ
inst✝¹⁰ : Core ℚ
inst✝⁹ : Addition ℚ
inst✝⁸ : Negation ℚ
inst✝⁷ : Subtraction ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Reciprocation ℚ
inst✝⁴ : Division ℚ
inst✝³ : Sign ℚ
inst✝² : Order ℚ
inst✝¹ : MinMax ℚ
inst✝ : Metric ℚ
p : ℚ
⊢ -abs p ≤ p
Tactic:
have : (sgn (-1 : ℚ) : ℚ) ≃ -1 := calc
  _ ≃ (sgn (-1 : ℚ) : ℚ) := eqv_refl
  _ ≃ ((-1 : ℤ) : ℚ)     := from_integer_subst sgn_neg_one
  _ ≃ (-1)               := neg_compat_from_integer
State after:
ℕ ℤ ℚ : Type
inst✝¹² : Natural ℕ
inst✝¹¹ : Integer ℤ
inst✝¹⁰ : Core ℚ
inst✝⁹ : Addition ℚ
inst✝⁸ : Negation ℚ
inst✝⁷ : Subtraction ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Reciprocation ℚ
inst✝⁴ : Division ℚ
inst✝³ : Sign ℚ
inst✝² : Order ℚ
inst✝¹ : MinMax ℚ
inst✝ : Metric ℚ
p : ℚ
this : from_integer (sgn (-1)) ≃ -1
⊢ -abs p ≤ p

State before:
ℕ ℤ ℚ : Type
inst✝¹² : Natural ℕ
inst✝¹¹ : Integer ℤ
inst✝¹⁰ : Core ℚ
inst✝⁹ : Addition ℚ
inst✝⁸ : Negation ℚ
inst✝⁷ : Subtraction ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Reciprocation ℚ
inst✝⁴ : Division ℚ
inst✝³ : Sign ℚ
inst✝² : Order ℚ
inst✝¹ : MinMax ℚ
inst✝ : Metric ℚ
p : ℚ
this : from_integer (sgn (-1)) ≃ -1
⊢ -abs p ≤ p
Tactic:
have : -p ≤ abs p := calc
  _ ≃ -p               := eqv_refl
  _ ≃ (-1) * p         := eqv_symm mul_neg_one
  _ ≃ p * (-1)         := mul_comm
  _ ≃ p * sgn (-1 : ℚ) := mul_substR (eqv_symm this)
  _ ≤ p * sgn p        := mul_sgn_self_max
  _ ≃ abs p            := eqv_symm abs_sgn
State after:
ℕ ℤ ℚ : Type
inst✝¹² : Natural ℕ
inst✝¹¹ : Integer ℤ
inst✝¹⁰ : Core ℚ
inst✝⁹ : Addition ℚ
inst✝⁸ : Negation ℚ
inst✝⁷ : Subtraction ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Reciprocation ℚ
inst✝⁴ : Division ℚ
inst✝³ : Sign ℚ
inst✝² : Order ℚ
inst✝¹ : MinMax ℚ
inst✝ : Metric ℚ
p : ℚ
this✝ : from_integer (sgn (-1)) ≃ -1
this : -p ≤ abs p
⊢ -abs p ≤ p

State before:
ℕ ℤ ℚ : Type
inst✝¹² : Natural ℕ
inst✝¹¹ : Integer ℤ
inst✝¹⁰ : Core ℚ
inst✝⁹ : Addition ℚ
inst✝⁸ : Negation ℚ
inst✝⁷ : Subtraction ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Reciprocation ℚ
inst✝⁴ : Division ℚ
inst✝³ : Sign ℚ
inst✝² : Order ℚ
inst✝¹ : MinMax ℚ
inst✝ : Metric ℚ
p : ℚ
this✝ : from_integer (sgn (-1)) ≃ -1
this : -p ≤ abs p
⊢ -abs p ≤ p
Tactic:
have : -abs p ≤ p := calc
  _ ≃ -abs p := eqv_refl
  _ ≤ -(-p)  := le_subst_neg ‹-p ≤ abs p›
  _ ≃ p      := neg_involutive
State after:
ℕ ℤ ℚ : Type
inst✝¹² : Natural ℕ
inst✝¹¹ : Integer ℤ
inst✝¹⁰ : Core ℚ
inst✝⁹ : Addition ℚ
inst✝⁸ : Negation ℚ
inst✝⁷ : Subtraction ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Reciprocation ℚ
inst✝⁴ : Division ℚ
inst✝³ : Sign ℚ
inst✝² : Order ℚ
inst✝¹ : MinMax ℚ
inst✝ : Metric ℚ
p : ℚ
this✝¹ : from_integer (sgn (-1)) ≃ -1
this✝ : -p ≤ abs p
this : -abs p ≤ p
⊢ -abs p ≤ p

State before:
ℕ ℤ ℚ : Type
inst✝¹² : Natural ℕ
inst✝¹¹ : Integer ℤ
inst✝¹⁰ : Core ℚ
inst✝⁹ : Addition ℚ
inst✝⁸ : Negation ℚ
inst✝⁷ : Subtraction ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Reciprocation ℚ
inst✝⁴ : Division ℚ
inst✝³ : Sign ℚ
inst✝² : Order ℚ
inst✝¹ : MinMax ℚ
inst✝ : Metric ℚ
p : ℚ
this✝¹ : from_integer (sgn (-1)) ≃ -1
this✝ : -p ≤ abs p
this : -abs p ≤ p
⊢ -abs p ≤ p
Tactic:
exact this
State after:
no goals