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

full_name: OrderedSub
code: /-- `OrderedSub α` means that `α` has a subtraction characterized by `a - b ≤ c ↔ a ≤ c + b`.
In other words, `a - b` is the least `c` such that `a ≤ b + c`.

This is satisfied both by the subtraction in additive ordered groups and by truncated subtraction
in canonically ordered monoids on many specific types.
-/
class OrderedSub (α : Type*) [LE α] [Add α] [Sub α] : Prop where
  /-- `a - b` provides a lower bound on `c` such that `a ≤ c + b`. -/
  tsub_le_iff_right : ∀ a b c : α, a - b ≤ c ↔ a ≤ c + b
goal: Prop

full_name: OrderedSub.tsub_le_iff_right
code: /-- `OrderedSub α` means that `α` has a subtraction characterized by `a - b ≤ c ↔ a ≤ c + b`.
In other words, `a - b` is the least `c` such that `a ≤ b + c`.

This is satisfied both by the subtraction in additive ordered groups and by truncated subtraction
in canonically ordered monoids on many specific types.
-/
class OrderedSub (α : Type*) [LE α] [Add α] [Sub α] : Prop where
  /-- `a - b` provides a lower bound on `c` such that `a ≤ c + b`. -/
  tsub_le_iff_right : ∀ a b c : α, a - b ≤ c ↔ a ≤ c + b
goal: a - b ≤ c ↔ a ≤ c + b

full_name: tsub_le_iff_right
code: @[simp]
theorem tsub_le_iff_right [LE α] [Add α] [Sub α] [OrderedSub α] {a b c : α} :
    a - b ≤ c ↔ a ≤ c + b 
goal: a - b ≤ c ↔ a ≤ c + b

full_name: add_tsub_le_right
code: /-- See `add_tsub_cancel_right` for the equality if `ContravariantClass α α (+) (≤)`. -/
theorem add_tsub_le_right : a + b - b ≤ a 
goal: a + b - b ≤ a

full_name: le_tsub_add
code: theorem le_tsub_add : b ≤ b - a + a 
goal: b ≤ b - a + a

full_name: tsub_le_iff_left
code: theorem tsub_le_iff_left : a - b ≤ c ↔ a ≤ b + c 
goal: a - b ≤ c ↔ a ≤ b + c

full_name: le_add_tsub
code: theorem le_add_tsub : a ≤ b + (a - b) 
goal: a ≤ b + (a - b)

full_name: add_tsub_le_left
code: /-- See `add_tsub_cancel_left` for the equality if `ContravariantClass α α (+) (≤)`. -/
theorem add_tsub_le_left : a + b - a ≤ b 
goal: a + b - a ≤ b

full_name: tsub_le_tsub_right
code: @[gcongr] theorem tsub_le_tsub_right (h : a ≤ b) (c : α) : a - c ≤ b - c 
goal: a - c ≤ b - c

full_name: tsub_le_iff_tsub_le
code: theorem tsub_le_iff_tsub_le : a - b ≤ c ↔ a - c ≤ b 
goal: a - b ≤ c ↔ a - c ≤ b

full_name: tsub_tsub_le
code: /-- See `tsub_tsub_cancel_of_le` for the equality. -/
theorem tsub_tsub_le : b - (b - a) ≤ a 
goal: b - (b - a) ≤ a

full_name: tsub_le_tsub_left
code: @[gcongr] theorem tsub_le_tsub_left (h : a ≤ b) (c : α) : c - b ≤ c - a 
goal: c - b ≤ c - a

full_name: tsub_le_tsub
code: @[gcongr] theorem tsub_le_tsub (hab : a ≤ b) (hcd : c ≤ d) : a - d ≤ b - c 
goal: a - d ≤ b - c

full_name: antitone_const_tsub
code: theorem antitone_const_tsub : Antitone fun x => c - x 
goal: Antitone fun x => c - x

full_name: add_tsub_le_assoc
code: /-- See `add_tsub_assoc_of_le` for the equality. -/
theorem add_tsub_le_assoc : a + b - c ≤ a + (b - c) 
goal: a + b - c ≤ a + (b - c)

full_name: add_tsub_le_tsub_add
code: /-- See `tsub_add_eq_add_tsub` for the equality. -/
theorem add_tsub_le_tsub_add : a + b - c ≤ a - c + b 
goal: a + b - c ≤ a - c + b

full_name: add_le_add_add_tsub
code: theorem add_le_add_add_tsub : a + b ≤ a + c + (b - c) 
goal: a + b ≤ a + c + (b - c)

full_name: le_tsub_add_add
code: theorem le_tsub_add_add : a + b ≤ a - c + (b + c) 
goal: a + b ≤ a - c + (b + c)

full_name: tsub_le_tsub_add_tsub
code: theorem tsub_le_tsub_add_tsub : a - c ≤ a - b + (b - c) 
goal: a - c ≤ a - b + (b - c)

full_name: tsub_tsub_tsub_le_tsub
code: theorem tsub_tsub_tsub_le_tsub : c - a - (c - b) ≤ b - a 
goal: c - a - (c - b) ≤ b - a

full_name: tsub_tsub_le_tsub_add
code: theorem tsub_tsub_le_tsub_add {a b c : α} : a - (b - c) ≤ a - b + c 
goal: a - (b - c) ≤ a - b + c

full_name: add_tsub_add_le_tsub_add_tsub
code: /-- See `tsub_add_tsub_comm` for the equality. -/
theorem add_tsub_add_le_tsub_add_tsub : a + b - (c + d) ≤ a - c + (b - d) 
goal: a + b - (c + d) ≤ a - c + (b - d)

full_name: add_tsub_add_le_tsub_left
code: /-- See `add_tsub_add_eq_tsub_left` for the equality. -/
theorem add_tsub_add_le_tsub_left : a + b - (a + c) ≤ b - c 
goal: a + b - (a + c) ≤ b - c

full_name: add_tsub_add_le_tsub_right
code: /-- See `add_tsub_add_eq_tsub_right` for the equality. -/
theorem add_tsub_add_le_tsub_right : a + c - (b + c) ≤ a - b 
goal: a + c - (b + c) ≤ a - b

full_name: AddLECancellable.le_add_tsub_swap
code: protected theorem le_add_tsub_swap (hb : AddLECancellable b) : a ≤ b + a - b 
goal: a ≤ b + a - b

full_name: AddLECancellable.le_add_tsub
code: protected theorem le_add_tsub (hb : AddLECancellable b) : a ≤ a + b - b 
goal: a ≤ a + b - b

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

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

full_name: le_add_tsub_swap
code: theorem le_add_tsub_swap : a ≤ b + a - b 
goal: a ≤ b + a - b

full_name: le_add_tsub'
code: theorem le_add_tsub' : a ≤ a + b - b 
goal: a ≤ a + b - b

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

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

full_name: tsub_nonpos
code: theorem tsub_nonpos : a - b ≤ 0 ↔ a ≤ b 
goal: a - b ≤ 0 ↔ a ≤ b

full_name: tsub_tsub
code: theorem tsub_tsub (b a c : α) : b - a - c = b - (a + c) 
goal: b - a - c = b - (a + c)

full_name: tsub_add_eq_tsub_tsub
code: theorem tsub_add_eq_tsub_tsub (a b c : α) : a - (b + c) = a - b - c 
goal: a - (b + c) = a - b - c

full_name: tsub_add_eq_tsub_tsub_swap
code: theorem tsub_add_eq_tsub_tsub_swap (a b c : α) : a - (b + c) = a - c - b 
goal: a - (b + c) = a - c - b

full_name: tsub_right_comm
code: theorem tsub_right_comm : a - b - c = a - c - b 
goal: a - b - c = a - c - b

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

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

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

full_name: AddLECancellable.add_tsub_cancel_right
code: @[simp]
protected theorem add_tsub_cancel_right (hb : AddLECancellable b) : a + b - b = a 
goal: a + b - b = a

full_name: AddLECancellable.add_tsub_cancel_left
code: @[simp]
protected theorem add_tsub_cancel_left (ha : AddLECancellable a) : a + b - a = b 
goal: a + b - a = b

full_name: AddLECancellable.lt_add_of_tsub_lt_left
code: protected theorem lt_add_of_tsub_lt_left (hb : AddLECancellable b) (h : a - b < c) : a < b + c 
goal: a < b + c

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

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

full_name: AddLECancellable.lt_tsub_of_add_lt_left
code: protected theorem lt_tsub_of_add_lt_left (ha : AddLECancellable a) (h : a + c < b) : c < b - a 
goal: c < b - a

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

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

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

full_name: add_tsub_cancel_right
code: @[simp]
theorem add_tsub_cancel_right (a b : α) : a + b - b = a 
goal: a + b - b = a

full_name: add_tsub_cancel_left
code: @[simp]
theorem add_tsub_cancel_left (a b : α) : a + b - a = b 
goal: a + b - a = b

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

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

full_name: lt_tsub_of_add_lt_left
code: /-- This lemma (and some of its corollaries) also holds for `ENNReal`, but this proof doesn't work
for it. Maybe we should add this lemma as field to `OrderedSub`? -/
theorem lt_tsub_of_add_lt_left : a + c < b → c < b - a 
goal: a + c < b → c < b - a

full_name: lt_tsub_of_add_lt_right
code: theorem lt_tsub_of_add_lt_right : a + c < b → a < b - c 
goal: a + c < b → a < b - c

full_name: add_tsub_add_eq_tsub_right
code: theorem add_tsub_add_eq_tsub_right (a c b : α) : a + c - (b + c) = a - b 
goal: a + c - (b + c) = a - b

full_name: add_tsub_add_eq_tsub_left
code: theorem add_tsub_add_eq_tsub_left (a b c : α) : a + b - (a + c) = b - c 
goal: a + b - (a + c) = b - c

full_name: lt_of_tsub_lt_tsub_right
code: /-- See `lt_of_tsub_lt_tsub_right_of_le` for a weaker statement in a partial order. -/
theorem lt_of_tsub_lt_tsub_right (h : a - c < b - c) : a < b 
goal: a < b

full_name: lt_tsub_iff_right
code: /-- See `lt_tsub_iff_right_of_le` for a weaker statement in a partial order. -/
theorem lt_tsub_iff_right : a < b - c ↔ a + c < b 
goal: a < b - c ↔ a + c < b

full_name: lt_tsub_iff_left
code: /-- See `lt_tsub_iff_left_of_le` for a weaker statement in a partial order. -/
theorem lt_tsub_iff_left : a < b - c ↔ c + a < b 
goal: a < b - c ↔ c + a < b

full_name: lt_tsub_comm
code: theorem lt_tsub_comm : a < b - c ↔ c < b - a 
goal: a < b - c ↔ c < b - a

full_name: lt_of_tsub_lt_tsub_left
code: /-- See `lt_of_tsub_lt_tsub_left_of_le` for a weaker statement in a partial order. -/
theorem lt_of_tsub_lt_tsub_left (h : a - b < a - c) : c < b 
goal: c < b

full_name: tsub_zero
code: @[simp]
theorem tsub_zero (a : α) : a - 0 = a 
goal: a - 0 = a