File: Mathlib/Algebra/Order/Sub/Canonical.lean

full_name: add_tsub_cancel_of_le
code: @[simp]
theorem add_tsub_cancel_of_le (h : a ≤ b) : a + (b - a) = b 
goal: a + (b - a) = b

full_name: tsub_add_cancel_of_le
code: theorem tsub_add_cancel_of_le (h : a ≤ b) : b - a + a = b 
goal: b - a + a = b

full_name: add_le_of_le_tsub_right_of_le
code: theorem add_le_of_le_tsub_right_of_le (h : b ≤ c) (h2 : a ≤ c - b) : a + b ≤ c 
goal: a + b ≤ c

full_name: add_le_of_le_tsub_left_of_le
code: theorem add_le_of_le_tsub_left_of_le (h : a ≤ c) (h2 : b ≤ c - a) : a + b ≤ c 
goal: a + b ≤ c

full_name: tsub_le_tsub_iff_right
code: theorem tsub_le_tsub_iff_right (h : c ≤ b) : a - c ≤ b - c ↔ a ≤ b 
goal: a - c ≤ b - c ↔ a ≤ b

full_name: tsub_left_inj
code: theorem tsub_left_inj (h1 : c ≤ a) (h2 : c ≤ b) : a - c = b - c ↔ a = b 
goal: a - c = b - c ↔ a = b

full_name: tsub_inj_left
code: theorem tsub_inj_left (h₁ : a ≤ b) (h₂ : a ≤ c) : b - a = c - a → b = c 
goal: b - a = c - a → b = c

full_name: lt_of_tsub_lt_tsub_right_of_le
code: /-- See `lt_of_tsub_lt_tsub_right` for a stronger statement in a linear order. -/
theorem lt_of_tsub_lt_tsub_right_of_le (h : c ≤ b) (h2 : a - c < b - c) : a < b 
goal: a < b

full_name: tsub_add_tsub_cancel
code: theorem tsub_add_tsub_cancel (hab : b ≤ a) (hcb : c ≤ b) : a - b + (b - c) = a - c 
goal: a - b + (b - c) = a - c

full_name: tsub_tsub_tsub_cancel_right
code: theorem tsub_tsub_tsub_cancel_right (h : c ≤ b) : a - c - (b - c) = a - b 
goal: a - c - (b - c) = a - b

full_name: AddLECancellable.eq_tsub_iff_add_eq_of_le
code: protected theorem eq_tsub_iff_add_eq_of_le (hc : AddLECancellable c) (h : c ≤ b) :
    a = b - c ↔ a + c = b 
goal: a = b - c ↔ a + c = b

full_name: AddLECancellable.tsub_eq_iff_eq_add_of_le
code: protected theorem tsub_eq_iff_eq_add_of_le (hb : AddLECancellable b) (h : b ≤ a) :
    a - b = c ↔ a = c + b 
goal: a - b = c ↔ a = c + b

full_name: AddLECancellable.add_tsub_assoc_of_le
code: protected theorem add_tsub_assoc_of_le (hc : AddLECancellable c) (h : c ≤ b) (a : α) :
    a + b - c = a + (b - c) 
goal: a + b - c = a + (b - c)

full_name: AddLECancellable.tsub_add_eq_add_tsub
code: protected theorem tsub_add_eq_add_tsub (hb : AddLECancellable b) (h : b ≤ a) :
    a - b + c = a + c - b 
goal: a - b + c = a + c - b

full_name: AddLECancellable.tsub_tsub_assoc
code: protected theorem tsub_tsub_assoc (hbc : AddLECancellable (b - c)) (h₁ : b ≤ a) (h₂ : c ≤ b) :
    a - (b - c) = a - b + c 
goal: a - (b - c) = a - b + c

full_name: AddLECancellable.tsub_add_tsub_comm
code: protected theorem tsub_add_tsub_comm (hb : AddLECancellable b) (hd : AddLECancellable d)
    (hba : b ≤ a) (hdc : d ≤ c) : a - b + (c - d) = a + c - (b + d) 
goal: a - b + (c - d) = a + c - (b + d)

full_name: AddLECancellable.le_tsub_iff_left
code: protected theorem le_tsub_iff_left (ha : AddLECancellable a) (h : a ≤ c) : b ≤ c - a ↔ a + b ≤ c 
goal: b ≤ c - a ↔ a + b ≤ c

full_name: AddLECancellable.le_tsub_iff_right
code: protected theorem le_tsub_iff_right (ha : AddLECancellable a) (h : a ≤ c) :
    b ≤ c - a ↔ b + a ≤ c 
goal: b ≤ c - a ↔ b + a ≤ c

full_name: AddLECancellable.tsub_lt_iff_left
code: protected theorem tsub_lt_iff_left (hb : AddLECancellable b) (hba : b ≤ a) :
    a - b < c ↔ a < b + c 
goal: a - b < c ↔ a < b + c

full_name: AddLECancellable.tsub_lt_iff_right
code: protected theorem tsub_lt_iff_right (hb : AddLECancellable b) (hba : b ≤ a) :
    a - b < c ↔ a < c + b 
goal: a - b < c ↔ a < c + b

full_name: AddLECancellable.tsub_lt_iff_tsub_lt
code: protected theorem tsub_lt_iff_tsub_lt (hb : AddLECancellable b) (hc : AddLECancellable c)
    (h₁ : b ≤ a) (h₂ : c ≤ a) : a - b < c ↔ a - c < b 
goal: a - b < c ↔ a - c < b

full_name: AddLECancellable.le_tsub_iff_le_tsub
code: protected theorem le_tsub_iff_le_tsub (ha : AddLECancellable a) (hc : AddLECancellable c)
    (h₁ : a ≤ b) (h₂ : c ≤ b) : a ≤ b - c ↔ c ≤ b - a 
goal: a ≤ b - c ↔ c ≤ b - a

full_name: AddLECancellable.lt_tsub_iff_right_of_le
code: protected theorem lt_tsub_iff_right_of_le (hc : AddLECancellable c) (h : c ≤ b) :
    a < b - c ↔ a + c < b 
goal: a < b - c ↔ a + c < b

full_name: AddLECancellable.lt_tsub_iff_left_of_le
code: protected theorem lt_tsub_iff_left_of_le (hc : AddLECancellable c) (h : c ≤ b) :
    a < b - c ↔ c + a < b 
goal: a < b - c ↔ c + a < b

full_name: AddLECancellable.tsub_inj_right
code: protected theorem tsub_inj_right (hab : AddLECancellable (a - b)) (h₁ : b ≤ a) (h₂ : c ≤ a)
    (h₃ : a - b = a - c) : b = c 
goal: b = c

full_name: AddLECancellable.lt_of_tsub_lt_tsub_left_of_le
code: protected theorem lt_of_tsub_lt_tsub_left_of_le [ContravariantClass α α (· + ·) (· < ·)]
    (hb : AddLECancellable b) (hca : c ≤ a) (h : a - b < a - c) : c < b 
goal: c < b

full_name: AddLECancellable.tsub_lt_tsub_left_of_le
code: protected theorem tsub_lt_tsub_left_of_le (hab : AddLECancellable (a - b)) (h₁ : b ≤ a)
    (h : c < b) : a - b < a - c 
goal: a - b < a - c

full_name: AddLECancellable.tsub_lt_tsub_right_of_le
code: protected theorem tsub_lt_tsub_right_of_le (hc : AddLECancellable c) (h : c ≤ a) (h2 : a < b) :
    a - c < b - c 
goal: a - c < b - c

full_name: AddLECancellable.tsub_lt_tsub_iff_left_of_le_of_le
code: protected theorem tsub_lt_tsub_iff_left_of_le_of_le [ContravariantClass α α (· + ·) (· < ·)]
    (hb : AddLECancellable b) (hab : AddLECancellable (a - b)) (h₁ : b ≤ a) (h₂ : c ≤ a) :
    a - b < a - c ↔ c < b 
goal: a - b < a - c ↔ c < b

full_name: AddLECancellable.add_tsub_tsub_cancel
code: @[simp]
protected theorem add_tsub_tsub_cancel (hac : AddLECancellable (a - c)) (h : c ≤ a) :
    a + b - (a - c) = b + c 
goal: a + b - (a - c) = b + c

full_name: AddLECancellable.tsub_tsub_cancel_of_le
code: protected theorem tsub_tsub_cancel_of_le (hba : AddLECancellable (b - a)) (h : a ≤ b) :
    b - (b - a) = a 
goal: b - (b - a) = a

full_name: AddLECancellable.tsub_tsub_tsub_cancel_left
code: protected theorem tsub_tsub_tsub_cancel_left (hab : AddLECancellable (a - b)) (h : b ≤ a) :
    a - c - (a - b) = b - c 
goal: a - c - (a - b) = b - c

full_name: eq_tsub_iff_add_eq_of_le
code: theorem eq_tsub_iff_add_eq_of_le (h : c ≤ b) : a = b - c ↔ a + c = b 
goal: a = b - c ↔ a + c = b

full_name: tsub_eq_iff_eq_add_of_le
code: theorem tsub_eq_iff_eq_add_of_le (h : b ≤ a) : a - b = c ↔ a = c + b 
goal: a - b = c ↔ a = c + b

full_name: add_tsub_assoc_of_le
code: /-- See `add_tsub_le_assoc` for an inequality. -/
theorem add_tsub_assoc_of_le (h : c ≤ b) (a : α) : a + b - c = a + (b - c) 
goal: a + b - c = a + (b - c)

full_name: tsub_add_eq_add_tsub
code: theorem tsub_add_eq_add_tsub (h : b ≤ a) : a - b + c = a + c - b 
goal: a - b + c = a + c - b

full_name: tsub_tsub_assoc
code: theorem tsub_tsub_assoc (h₁ : b ≤ a) (h₂ : c ≤ b) : a - (b - c) = a - b + c 
goal: a - (b - c) = a - b + c

full_name: tsub_add_tsub_comm
code: theorem tsub_add_tsub_comm (hba : b ≤ a) (hdc : d ≤ c) : a - b + (c - d) = a + c - (b + d) 
goal: a - b + (c - d) = a + c - (b + d)

full_name: le_tsub_iff_left
code: theorem le_tsub_iff_left (h : a ≤ c) : b ≤ c - a ↔ a + b ≤ c 
goal: b ≤ c - a ↔ a + b ≤ c

full_name: le_tsub_iff_right
code: theorem le_tsub_iff_right (h : a ≤ c) : b ≤ c - a ↔ b + a ≤ c 
goal: b ≤ c - a ↔ b + a ≤ c

full_name: tsub_lt_iff_left
code: theorem tsub_lt_iff_left (hbc : b ≤ a) : a - b < c ↔ a < b + c 
goal: a - b < c ↔ a < b + c

full_name: tsub_lt_iff_right
code: theorem tsub_lt_iff_right (hbc : b ≤ a) : a - b < c ↔ a < c + b 
goal: a - b < c ↔ a < c + b

full_name: tsub_lt_iff_tsub_lt
code: theorem tsub_lt_iff_tsub_lt (h₁ : b ≤ a) (h₂ : c ≤ a) : a - b < c ↔ a - c < b 
goal: a - b < c ↔ a - c < b

full_name: le_tsub_iff_le_tsub
code: theorem le_tsub_iff_le_tsub (h₁ : a ≤ b) (h₂ : c ≤ b) : a ≤ b - c ↔ c ≤ b - a 
goal: a ≤ b - c ↔ c ≤ b - a

full_name: lt_tsub_iff_right_of_le
code: /-- See `lt_tsub_iff_right` for a stronger statement in a linear order. -/
theorem lt_tsub_iff_right_of_le (h : c ≤ b) : a < b - c ↔ a + c < b 
goal: a < b - c ↔ a + c < b

full_name: lt_tsub_iff_left_of_le
code: /-- See `lt_tsub_iff_left` for a stronger statement in a linear order. -/
theorem lt_tsub_iff_left_of_le (h : c ≤ b) : a < b - c ↔ c + a < b 
goal: a < b - c ↔ c + a < b

full_name: lt_of_tsub_lt_tsub_left_of_le
code: /-- See `lt_of_tsub_lt_tsub_left` for a stronger statement in a linear order. -/
theorem lt_of_tsub_lt_tsub_left_of_le [ContravariantClass α α (· + ·) (· < ·)] (hca : c ≤ a)
    (h : a - b < a - c) : c < b 
goal: c < b

full_name: tsub_lt_tsub_left_of_le
code: theorem tsub_lt_tsub_left_of_le : b ≤ a → c < b → a - b < a - c 
goal: b ≤ a → c < b → a - b < a - c

full_name: tsub_lt_tsub_right_of_le
code: theorem tsub_lt_tsub_right_of_le (h : c ≤ a) (h2 : a < b) : a - c < b - c 
goal: a - c < b - c

full_name: tsub_inj_right
code: theorem tsub_inj_right (h₁ : b ≤ a) (h₂ : c ≤ a) (h₃ : a - b = a - c) : b = c 
goal: b = c

full_name: tsub_lt_tsub_iff_left_of_le_of_le
code: /-- See `tsub_lt_tsub_iff_left_of_le` for a stronger statement in a linear order. -/
theorem tsub_lt_tsub_iff_left_of_le_of_le [ContravariantClass α α (· + ·) (· < ·)] (h₁ : b ≤ a)
    (h₂ : c ≤ a) : a - b < a - c ↔ c < b 
goal: a - b < a - c ↔ c < b

full_name: add_tsub_tsub_cancel
code: @[simp]
theorem add_tsub_tsub_cancel (h : c ≤ a) : a + b - (a - c) = b + c 
goal: a + b - (a - c) = b + c

full_name: tsub_tsub_cancel_of_le
code: /-- See `tsub_tsub_le` for an inequality. -/
theorem tsub_tsub_cancel_of_le (h : a ≤ b) : b - (b - a) = a 
goal: b - (b - a) = a

full_name: tsub_tsub_tsub_cancel_left
code: theorem tsub_tsub_tsub_cancel_left (h : b ≤ a) : a - c - (a - b) = b - c 
goal: a - c - (a - b) = b - c

full_name: tsub_tsub_eq_add_tsub_of_le
code: /-- The `tsub` version of `sub_sub_eq_add_sub`. -/
theorem tsub_tsub_eq_add_tsub_of_le [ContravariantClass α α HAdd.hAdd LE.le]
    (h : c ≤ b) : a - (b - c) = a + c - b 
goal: a - (b - c) = a + c - b

full_name: add_tsub_cancel_iff_le
code: theorem add_tsub_cancel_iff_le : a + (b - a) = b ↔ a ≤ b 
goal: a + (b - a) = b ↔ a ≤ b

full_name: tsub_add_cancel_iff_le
code: theorem tsub_add_cancel_iff_le : b - a + a = b ↔ a ≤ b 
goal: b - a + a = b ↔ a ≤ b

full_name: tsub_eq_zero_iff_le
code: theorem tsub_eq_zero_iff_le : a - b = 0 ↔ a ≤ b 
goal: a - b = 0 ↔ a ≤ b

full_name: tsub_self
code: theorem tsub_self (a : α) : a - a = 0 
goal: a - a = 0

full_name: tsub_le_self
code: theorem tsub_le_self : a - b ≤ a 
goal: a - b ≤ a

full_name: zero_tsub
code: theorem zero_tsub (a : α) : 0 - a = 0 
goal: 0 - a = 0

full_name: tsub_self_add
code: theorem tsub_self_add (a b : α) : a - (a + b) = 0 
goal: a - (a + b) = 0

full_name: tsub_pos_iff_not_le
code: theorem tsub_pos_iff_not_le : 0 < a - b ↔ ¬a ≤ b 
goal: 0 < a - b ↔ ¬a ≤ b

full_name: tsub_pos_of_lt
code: theorem tsub_pos_of_lt (h : a < b) : 0 < b - a 
goal: 0 < b - a

full_name: tsub_lt_of_lt
code: theorem tsub_lt_of_lt (h : a < b) : a - c < b 
goal: a - c < b

full_name: AddLECancellable.tsub_le_tsub_iff_left
code: protected theorem tsub_le_tsub_iff_left (ha : AddLECancellable a) (hc : AddLECancellable c)
    (h : c ≤ a) : a - b ≤ a - c ↔ c ≤ b 
goal: a - b ≤ a - c ↔ c ≤ b

full_name: AddLECancellable.tsub_right_inj
code: protected theorem tsub_right_inj (ha : AddLECancellable a) (hb : AddLECancellable b)
    (hc : AddLECancellable c) (hba : b ≤ a) (hca : c ≤ a) : a - b = a - c ↔ b = c 
goal: a - b = a - c ↔ b = c

full_name: tsub_le_tsub_iff_left
code: theorem tsub_le_tsub_iff_left (h : c ≤ a) : a - b ≤ a - c ↔ c ≤ b 
goal: a - b ≤ a - c ↔ c ≤ b

full_name: tsub_right_inj
code: theorem tsub_right_inj (hba : b ≤ a) (hca : c ≤ a) : a - b = a - c ↔ b = c 
goal: a - b = a - c ↔ b = c

full_name: CanonicallyOrderedAddCommMonoid.toAddCancelCommMonoid
code: /-- A `CanonicallyOrderedAddCommMonoid` with ordered subtraction and order-reflecting addition is
cancellative. This is not an instance as it would form a typeclass loop.

See note [reducible non-instances]. -/
abbrev CanonicallyOrderedAddCommMonoid.toAddCancelCommMonoid : AddCancelCommMonoid α 
goal: AddCancelCommMonoid α

full_name: tsub_pos_iff_lt
code: @[simp]
theorem tsub_pos_iff_lt : 0 < a - b ↔ b < a 
goal: 0 < a - b ↔ b < a

full_name: tsub_eq_tsub_min
code: theorem tsub_eq_tsub_min (a b : α) : a - b = a - min a b 
goal: a - b = a - min a b

full_name: AddLECancellable.lt_tsub_iff_right
code: protected theorem lt_tsub_iff_right (hc : AddLECancellable c) : a < b - c ↔ a + c < b 
goal: a < b - c ↔ a + c < b

full_name: AddLECancellable.lt_tsub_iff_left
code: protected theorem lt_tsub_iff_left (hc : AddLECancellable c) : a < b - c ↔ c + a < b 
goal: a < b - c ↔ c + a < b

full_name: AddLECancellable.tsub_lt_tsub_iff_right
code: protected theorem tsub_lt_tsub_iff_right (hc : AddLECancellable c) (h : c ≤ a) :
    a - c < b - c ↔ a < b 
goal: a - c < b - c ↔ a < b

full_name: AddLECancellable.tsub_lt_self
code: protected theorem tsub_lt_self (ha : AddLECancellable a) (h₁ : 0 < a) (h₂ : 0 < b) : a - b < a 
goal: a - b < a

full_name: AddLECancellable.tsub_lt_self_iff
code: protected theorem tsub_lt_self_iff (ha : AddLECancellable a) : a - b < a ↔ 0 < a ∧ 0 < b 
goal: a - b < a ↔ 0 < a ∧ 0 < b

full_name: AddLECancellable.tsub_lt_tsub_iff_left_of_le
code: /-- See `lt_tsub_iff_left_of_le_of_le` for a weaker statement in a partial order. -/
protected theorem tsub_lt_tsub_iff_left_of_le (ha : AddLECancellable a) (hb : AddLECancellable b)
    (h : b ≤ a) : a - b < a - c ↔ c < b 
goal: a - b < a - c ↔ c < b

full_name: tsub_lt_tsub_iff_right
code: /-- This lemma also holds for `ENNReal`, but we need a different proof for that. -/
theorem tsub_lt_tsub_iff_right (h : c ≤ a) : a - c < b - c ↔ a < b 
goal: a - c < b - c ↔ a < b

full_name: tsub_lt_self
code: theorem tsub_lt_self : 0 < a → 0 < b → a - b < a 
goal: 0 < a → 0 < b → a - b < a

full_name: tsub_lt_self_iff
code: @[simp] theorem tsub_lt_self_iff : a - b < a ↔ 0 < a ∧ 0 < b 
goal: a - b < a ↔ 0 < a ∧ 0 < b

full_name: tsub_lt_tsub_iff_left_of_le
code: /-- See `lt_tsub_iff_left_of_le_of_le` for a weaker statement in a partial order. -/
theorem tsub_lt_tsub_iff_left_of_le (h : b ≤ a) : a - b < a - c ↔ c < b 
goal: a - b < a - c ↔ c < b

full_name: tsub_tsub_eq_min
code: lemma tsub_tsub_eq_min (a b : α) : a - (a - b) = min a b 
goal: a - (a - b) = min a b

full_name: tsub_add_eq_max
code: theorem tsub_add_eq_max : a - b + b = max a b 
goal: a - b + b = max a b

full_name: add_tsub_eq_max
code: theorem add_tsub_eq_max : a + (b - a) = max a b 
goal: a + (b - a) = max a b

full_name: tsub_min
code: theorem tsub_min : a - min a b = a - b 
goal: a - min a b = a - b

full_name: tsub_add_min
code: theorem tsub_add_min : a - b + min a b = a 
goal: a - b + min a b = a

full_name: Even.tsub
code: lemma Even.tsub [CanonicallyLinearOrderedAddCommMonoid α] [Sub α] [OrderedSub α]
    [ContravariantClass α α (· + ·) (· ≤ ·)] {m n : α} (hm : Even m) (hn : Even n) :
    Even (m - n) 
goal: Even (m - n)