The areas / V04. Order and lattices
Mathlib.Algebra.Order.Sub.Basic
36 declarations. Mathlib docs · Source
Lemmas about subtraction in unbundled canonically ordered monoids
Lemmas where addition is order-reflecting.
Lemmas in a linearly canonically ordered monoid.
Lemmas about max and min.
Sub structure in linearly canonically ordered monoid using choice.
theorem add_tsub_cancel_iff_le E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : PartialOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b : α}, a + (b - a) = b ↔ a ≤ b
theorem tsub_add_cancel_iff_le E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : PartialOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b : α}, b - a + a = b ↔ a ≤ b
theorem tsub_eq_zero_iff_le E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : PartialOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b : α}, a - b = 0 ↔ a ≤ b
theorem tsub_eq_zero_of_le E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : PartialOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b : α}, a ≤ b → a - b = 0
Alias of the reverse direction of tsub_eq_zero_iff_le.
theorem tsub_self E0 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : PartialOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] (a : α), a - a = 0
theorem tsub_le_self E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : PartialOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b : α}, a - b ≤ a
theorem zero_tsub E0 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : PartialOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] (a : α), 0 - a = 0
theorem tsub_self_add E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : PartialOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] (a b : α), a - (a + b) = 0
theorem tsub_pos_iff_not_le E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : PartialOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b : α}, 0 < a - b ↔ ¬a ≤ b
theorem tsub_pos_of_lt E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : PartialOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b : α}, a < b → 0 < b - a
theorem tsub_lt_of_lt E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : PartialOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b c : α}, a < b → a - c < b
theorem AddLECancellable.tsub_le_tsub_iff_left E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : PartialOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b c : α}, AddLECancellable a → AddLECancellable c → c ≤ a → (a - b ≤ a - c ↔ c ≤ b)
theorem AddLECancellable.tsub_right_inj E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : PartialOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b c : α},
AddLECancellable a → AddLECancellable b → AddLECancellable c → b ≤ a → c ≤ a → (a - b = a - c ↔ b = c)
theorem tsub_le_tsub_iff_left E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : PartialOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b c : α} [AddLeftReflectLE α], c ≤ a → (a - b ≤ a - c ↔ c ≤ b)
theorem tsub_right_inj E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : PartialOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b c : α} [AddLeftReflectLE α], b ≤ a → c ≤ a → (a - b = a - c ↔ b = c)
abbrev CanonicallyOrderedAddCommMonoid.toAddCancelCommMonoid E1 #
(α : Type u_1) →
[inst : AddCommMonoid α] →
[inst_1 : PartialOrder α] → [inst_2 : Sub α] → [OrderedSub α] → [AddLeftReflectLE α] → AddCancelCommMonoid α
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].
theorem tsub_pos_iff_lt E0 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b : α}, 0 < a - b ↔ b < a
theorem tsub_eq_tsub_min E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] (a b : α), a - b = a - min a b
theorem AddLECancellable.lt_tsub_iff_right E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [inst_2 : Sub α] [OrderedSub α] {a b c : α},
AddLECancellable c → (a < b - c ↔ a + c < b)
theorem AddLECancellable.lt_tsub_iff_left E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [inst_2 : Sub α] [OrderedSub α] {a b c : α},
AddLECancellable c → (a < b - c ↔ c + a < b)
theorem AddLECancellable.tsub_lt_tsub_iff_right E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b c : α}, AddLECancellable c → c ≤ a → (a - c < b - c ↔ a < b)
theorem AddLECancellable.tsub_lt_self E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b : α}, AddLECancellable a → 0 < a → 0 < b → a - b < a
theorem AddLECancellable.tsub_lt_self_iff E0 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b : α}, AddLECancellable a → (a - b < a ↔ 0 < a ∧ 0 < b)
theorem AddLECancellable.tsub_lt_tsub_iff_left_of_le E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b c : α}, AddLECancellable a → AddLECancellable b → b ≤ a → (a - b < a - c ↔ c < b)
See lt_tsub_iff_left_of_le_of_le for a weaker statement in a partial order.
theorem tsub_lt_tsub_iff_right E2 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b c : α} [AddLeftReflectLE α], c ≤ a → (a - c < b - c ↔ a < b)
This lemma also holds for ENNReal, but we need a different proof for that.
theorem tsub_lt_self E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b : α} [AddLeftReflectLE α], 0 < a → 0 < b → a - b < a
theorem tsub_lt_self_iff E0 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b : α} [AddLeftReflectLE α], a - b < a ↔ 0 < a ∧ 0 < b
theorem tsub_lt_tsub_iff_left_of_le E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b c : α} [AddLeftReflectLE α], b ≤ a → (a - b < a - c ↔ c < b)
See lt_tsub_iff_left_of_le_of_le for a weaker statement in a partial order.
theorem tsub_tsub_eq_min E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] [AddLeftReflectLE α] (a b : α), a - (a - b) = min a b
theorem tsub_add_eq_max E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b : α}, a - b + b = max a b
theorem add_tsub_eq_max E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b : α}, a + (b - a) = max a b
theorem tsub_min E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b : α}, a - min a b = a - b
theorem tsub_add_min E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] {a b : α}, a - b + min a b = a
theorem Even.tsub E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [CanonicallyOrderedAdd α] [inst_3 : Sub α]
[OrderedSub α] [AddLeftReflectLE α] {m n : α}, Even m → Even n → Even (m - n)
abbrev CanonicallyOrderedAdd.toSub E1 #
{α : Type u_1} → [inst : AddCommMonoid α] → [inst_1 : LinearOrder α] → [CanonicallyOrderedAdd α] → Sub α
Sub structure in linearly canonically ordered monoid using choice.
theorem CanonicallyOrderedAdd.toOrderedSub E1 #
∀ {α : Type u_1} [inst : AddCommMonoid α] [inst_1 : LinearOrder α] [inst_2 : CanonicallyOrderedAdd α]
[AddRightReflectLE α], OrderedSub α
The Sub structure using choice satisfies OrderedSub.