Theorem: Lean4Axiomatic.Rational.le_diff_lower (Lean4Axiomatic/Rational/Order.lean)

State before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
ε p q : ℚ
⊢ -ε ≤ q - p ↔ p - ε ≤ q
Tactic:
apply Iff.intro
State after:
case mp
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
ε p q : ℚ
⊢ -ε ≤ q - p → p - ε ≤ q

case mpr
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
ε p q : ℚ
⊢ p - ε ≤ q → -ε ≤ q - p

State before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
ε p q : ℚ
⊢ -ε ≤ q - p → p - ε ≤ q
Tactic:
case mp =>
  intro (_ : -ε ≤ q - p)
  show p - ε ≤ q
  calc
    _ ≃ p - ε          := eqv_refl
    _ ≃ p + (-ε)       := sub_add_neg
    _ ≤ p + (q - p)    := le_substR_add ‹-ε ≤ q - p›
    _ ≃ p + (q + (-p)) := add_substR sub_add_neg
    _ ≃ p + ((-p) + q) := add_substR add_comm
    _ ≃ (p + (-p)) + q := eqv_symm add_assoc
    _ ≃ 0 + q          := add_substL add_inverseR
    _ ≃ q              := add_identL
State after:
no goals

State before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
ε p q : ℚ
⊢ p - ε ≤ q → -ε ≤ q - p
Tactic:
case mpr =>
  intro (_ : p - ε ≤ q)
  show -ε ≤ q - p
  calc
    _ ≃ -ε              := eqv_refl
    _ ≃ 0 + (-ε)        := eqv_symm add_identL
    _ ≃ (-p + p) + (-ε) := add_substL (eqv_symm add_inverseL)
    _ ≃ -p + (p + (-ε)) := add_assoc
    _ ≃ -p + (p - ε)    := add_substR (eqv_symm sub_add_neg)
    _ ≤ -p + q          := le_substR_add ‹p-ε ≤ q›
    _ ≃ q + (-p)        := add_comm
    _ ≃ q - p           := eqv_symm sub_add_neg
State after:
no goals

State before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
ε p q : ℚ
⊢ -ε ≤ q - p → p - ε ≤ q
Tactic:
intro (_ : -ε ≤ q - p)
State after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
ε p q : ℚ
x✝ : -ε ≤ q - p
⊢ p - ε ≤ q

State before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
ε p q : ℚ
x✝ : -ε ≤ q - p
⊢ p - ε ≤ q
Tactic:
calc
  _ ≃ p - ε          := eqv_refl
  _ ≃ p + (-ε)       := sub_add_neg
  _ ≤ p + (q - p)    := le_substR_add ‹-ε ≤ q - p›
  _ ≃ p + (q + (-p)) := add_substR sub_add_neg
  _ ≃ p + ((-p) + q) := add_substR add_comm
  _ ≃ (p + (-p)) + q := eqv_symm add_assoc
  _ ≃ 0 + q          := add_substL add_inverseR
  _ ≃ q              := add_identL
State after:
no goals

State before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
ε p q : ℚ
⊢ p - ε ≤ q → -ε ≤ q - p
Tactic:
intro (_ : p - ε ≤ q)
State after:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
ε p q : ℚ
x✝ : p - ε ≤ q
⊢ -ε ≤ q - p

State before:
ℕ ℤ ℚ : Type
inst✝¹⁰ : Natural ℕ
inst✝⁹ : Integer ℤ
inst✝⁸ : Core ℚ
inst✝⁷ : Addition ℚ
inst✝⁶ : Multiplication ℚ
inst✝⁵ : Negation ℚ
inst✝⁴ : Sign ℚ
inst✝³ : Subtraction ℚ
inst✝² : Reciprocation ℚ
inst✝¹ : Division ℚ
inst✝ : Order ℚ
ε p q : ℚ
x✝ : p - ε ≤ q
⊢ -ε ≤ q - p
Tactic:
calc
  _ ≃ -ε              := eqv_refl
  _ ≃ 0 + (-ε)        := eqv_symm add_identL
  _ ≃ (-p + p) + (-ε) := add_substL (eqv_symm add_inverseL)
  _ ≃ -p + (p + (-ε)) := add_assoc
  _ ≃ -p + (p - ε)    := add_substR (eqv_symm sub_add_neg)
  _ ≤ -p + q          := le_substR_add ‹p-ε ≤ q›
  _ ≃ q + (-p)        := add_comm
  _ ≃ q - p           := eqv_symm sub_add_neg
State after:
no goals