Ordered groups #
This file develops the basics of ordered groups.
Implementation details #
Unfortunately, the number of '
appended to lemmas in this file
may differ between the multiplicative and the additive version of a lemma.
The reason is that we did not want to change existing names in the library.
An ordered additive commutative group is an additive commutative group with a partial order in which addition is strictly monotone.
- add : α → α → α
- zero : α
- nsmul : ℕ → α → α
- nsmul_zero : ∀ (x : α), AddMonoid.nsmul 0 x = 0
- nsmul_succ : ∀ (n : ℕ) (x : α), AddMonoid.nsmul (n + 1) x = x + AddMonoid.nsmul n x
- neg : α → α
- sub : α → α → α
- zsmul : ℤ → α → α
- zsmul_zero' : ∀ (a : α), SubNegMonoid.zsmul 0 a = 0
- zsmul_succ' : ∀ (n : ℕ) (a : α), SubNegMonoid.zsmul (Int.ofNat (Nat.succ n)) a = a + SubNegMonoid.zsmul (Int.ofNat n) a
- zsmul_neg' : ∀ (n : ℕ) (a : α), SubNegMonoid.zsmul (Int.negSucc n) a = -SubNegMonoid.zsmul (↑(Nat.succ n)) a
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
Addition is monotone in an ordered additive commutative group.
Instances
An ordered commutative group is a commutative group with a partial order in which multiplication is strictly monotone.
- mul : α → α → α
- one : α
- npow : ℕ → α → α
- npow_zero : ∀ (x : α), Monoid.npow 0 x = 1
- npow_succ : ∀ (n : ℕ) (x : α), Monoid.npow (n + 1) x = x * Monoid.npow n x
- inv : α → α
- div : α → α → α
- zpow : ℤ → α → α
- zpow_zero' : ∀ (a : α), DivInvMonoid.zpow 0 a = 1
- zpow_succ' : ∀ (n : ℕ) (a : α), DivInvMonoid.zpow (Int.ofNat (Nat.succ n)) a = a * DivInvMonoid.zpow (Int.ofNat n) a
- zpow_neg' : ∀ (n : ℕ) (a : α), DivInvMonoid.zpow (Int.negSucc n) a = (DivInvMonoid.zpow (↑(Nat.succ n)) a)⁻¹
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
Multiplication is monotone in an ordered commutative group.
Instances
Equations
- (_ : CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x ≤ x_1) = (_ : CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x ≤ x_1)
Equations
- (_ : CovariantClass α α (fun (x x_1 : α) => x * x_1) fun (x x_1 : α) => x ≤ x_1) = (_ : CovariantClass α α (fun (x x_1 : α) => x * x_1) fun (x x_1 : α) => x ≤ x_1)
A choice-free shortcut instance.
A choice-free shortcut instance.
A choice-free shortcut instance.
A choice-free shortcut instance.
Uses right
co(ntra)variant.
Uses right
co(ntra)variant.
Uses right
co(ntra)variant.
Uses right
co(ntra)variant.
Uses right
co(ntra)variant.
Uses right
co(ntra)variant.
Uses right
co(ntra)variant.
Uses right
co(ntra)variant.
Alias of the forward direction of neg_le_neg_iff
.
Alias of the reverse direction of sub_le_self_iff
.
Alias of the forward direction of lt_inv'
.
Alias of the forward direction of inv_lt'
.
Alias of the reverse direction of sub_lt_self_iff
.
Alias of Left.neg_le_self
.
Alias of Left.neg_lt_self
.
Alias of the forward direction of Left.inv_le_one_iff
.
Uses left
co(ntra)variant.
Alias of the forward direction of Left.one_le_inv_iff
.
Uses left
co(ntra)variant.
Alias of the forward direction of inv_lt_inv_iff
.
Alias of the forward direction of Left.inv_lt_one_iff
.
Uses left
co(ntra)variant.
Alias of Left.inv_lt_one_iff
.
Uses left
co(ntra)variant.
Alias of Left.inv_lt_one_iff
.
Uses left
co(ntra)variant.
Alias of the forward direction of Left.one_lt_inv_iff
.
Uses left
co(ntra)variant.
Alias of the reverse direction of Left.one_lt_inv_iff
.
Uses left
co(ntra)variant.
Alias of the forward direction of le_inv_mul_iff_mul_le
.
Alias of the reverse direction of le_inv_mul_iff_mul_le
.
Alias of the reverse direction of inv_mul_le_iff_le_mul
.
Alias of the forward direction of lt_inv_mul_iff_mul_lt
.
Alias of the reverse direction of lt_inv_mul_iff_mul_lt
.
Alias of the forward direction of inv_mul_lt_iff_lt_mul
.
Alias of the reverse direction of inv_mul_lt_iff_lt_mul
.
Alias of the forward direction of inv_mul_lt_iff_lt_mul
.
Alias of the forward direction of inv_mul_lt_iff_lt_mul
.
Alias of Left.inv_le_one_iff
.
Uses left
co(ntra)variant.
Alias of Left.one_le_inv_iff
.
Uses left
co(ntra)variant.
Alias of Left.one_lt_inv_iff
.
Uses left
co(ntra)variant.
Alias of mul_lt_mul_left'
.
Alias of le_of_mul_le_mul_left'
.
Alias of lt_of_mul_lt_mul_left'
.
Alias of the forward direction of sub_nonneg
.
Alias of the reverse direction of sub_nonneg
.
Alias of the forward direction of sub_nonpos
.
Alias of the reverse direction of sub_nonpos
.
Alias of the reverse direction of le_sub_iff_add_le
.
Alias of the forward direction of le_sub_iff_add_le
.
Equations
- (_ : OrderedSub α) = (_ : OrderedSub α)
Alias of the reverse direction of le_sub_iff_add_le'
.
Alias of the forward direction of le_sub_iff_add_le'
.
Alias of the reverse direction of sub_le_iff_le_add'
.
Alias of the forward direction of sub_le_iff_le_add'
.
Alias of the reverse direction of sub_pos
.
Alias of the forward direction of sub_pos
.
For a - -b = a + b
, see sub_neg_eq_add
.
Alias of the forward direction of sub_neg
.
For a - -b = a + b
, see sub_neg_eq_add
.
Alias of the reverse direction of sub_neg
.
For a - -b = a + b
, see sub_neg_eq_add
.
Alias of sub_neg
.
For a - -b = a + b
, see sub_neg_eq_add
.
Alias of the reverse direction of lt_sub_iff_add_lt
.
Alias of the forward direction of lt_sub_iff_add_lt
.
Alias of the reverse direction of sub_lt_iff_lt_add
.
Alias of the forward direction of sub_lt_iff_lt_add
.
Alias of the reverse direction of lt_sub_iff_add_lt'
.
Alias of the forward direction of lt_sub_iff_add_lt'
.
Alias of the reverse direction of sub_lt_iff_lt_add'
.
Alias of the forward direction of sub_lt_iff_lt_add'
.
Linearly ordered commutative groups #
A linearly ordered additive commutative group is an additive commutative group with a linear order in which addition is monotone.
- add : α → α → α
- zero : α
- nsmul : ℕ → α → α
- nsmul_zero : ∀ (x : α), AddMonoid.nsmul 0 x = 0
- nsmul_succ : ∀ (n : ℕ) (x : α), AddMonoid.nsmul (n + 1) x = x + AddMonoid.nsmul n x
- neg : α → α
- sub : α → α → α
- zsmul : ℤ → α → α
- zsmul_zero' : ∀ (a : α), SubNegMonoid.zsmul 0 a = 0
- zsmul_succ' : ∀ (n : ℕ) (a : α), SubNegMonoid.zsmul (Int.ofNat (Nat.succ n)) a = a + SubNegMonoid.zsmul (Int.ofNat n) a
- zsmul_neg' : ∀ (n : ℕ) (a : α), SubNegMonoid.zsmul (Int.negSucc n) a = -SubNegMonoid.zsmul (↑(Nat.succ n)) a
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- min : α → α → α
- max : α → α → α
- compare : α → α → Ordering
A linear order is total.
- decidableLE : DecidableRel fun (x x_1 : α) => x ≤ x_1
In a linearly ordered type, we assume the order relations are all decidable.
- decidableEq : DecidableEq α
In a linearly ordered type, we assume the order relations are all decidable.
- decidableLT : DecidableRel fun (x x_1 : α) => x < x_1
In a linearly ordered type, we assume the order relations are all decidable.
The minimum function is equivalent to the one you get from
minOfLe
.The minimum function is equivalent to the one you get from
maxOfLe
.- compare_eq_compareOfLessAndEq : ∀ (a b : α), compare a b = compareOfLessAndEq a b
Comparison via
compare
is equal to the canonical comparison given decidable<
and=
.
Instances
A linearly ordered commutative group with an additively absorbing ⊤
element.
Instances should include number systems with an infinite element adjoined.
- add : α → α → α
- zero : α
- nsmul : ℕ → α → α
- nsmul_zero : ∀ (x : α), AddMonoid.nsmul 0 x = 0
- nsmul_succ : ∀ (n : ℕ) (x : α), AddMonoid.nsmul (n + 1) x = x + AddMonoid.nsmul n x
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- min : α → α → α
- max : α → α → α
- compare : α → α → Ordering
- decidableLE : DecidableRel fun (x x_1 : α) => x ≤ x_1
- decidableEq : DecidableEq α
- decidableLT : DecidableRel fun (x x_1 : α) => x < x_1
- compare_eq_compareOfLessAndEq : ∀ (a b : α), compare a b = compareOfLessAndEq a b
- top : α
- neg : α → α
- sub : α → α → α
- zsmul : ℤ → α → α
- zsmul_zero' : ∀ (a : α), LinearOrderedAddCommGroupWithTop.zsmul 0 a = 0
- zsmul_succ' : ∀ (n : ℕ) (a : α), LinearOrderedAddCommGroupWithTop.zsmul (Int.ofNat (Nat.succ n)) a = a + LinearOrderedAddCommGroupWithTop.zsmul (Int.ofNat n) a
- zsmul_neg' : ∀ (n : ℕ) (a : α), LinearOrderedAddCommGroupWithTop.zsmul (Int.negSucc n) a = -LinearOrderedAddCommGroupWithTop.zsmul (↑(Nat.succ n)) a
- exists_pair_ne : ∃ (x : α), ∃ (y : α), x ≠ y
Instances
A linearly ordered commutative group is a commutative group with a linear order in which multiplication is monotone.
- mul : α → α → α
- one : α
- npow : ℕ → α → α
- npow_zero : ∀ (x : α), Monoid.npow 0 x = 1
- npow_succ : ∀ (n : ℕ) (x : α), Monoid.npow (n + 1) x = x * Monoid.npow n x
- inv : α → α
- div : α → α → α
- zpow : ℤ → α → α
- zpow_zero' : ∀ (a : α), DivInvMonoid.zpow 0 a = 1
- zpow_succ' : ∀ (n : ℕ) (a : α), DivInvMonoid.zpow (Int.ofNat (Nat.succ n)) a = a * DivInvMonoid.zpow (Int.ofNat n) a
- zpow_neg' : ∀ (n : ℕ) (a : α), DivInvMonoid.zpow (Int.negSucc n) a = (DivInvMonoid.zpow (↑(Nat.succ n)) a)⁻¹
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- min : α → α → α
- max : α → α → α
- compare : α → α → Ordering
A linear order is total.
- decidableLE : DecidableRel fun (x x_1 : α) => x ≤ x_1
In a linearly ordered type, we assume the order relations are all decidable.
- decidableEq : DecidableEq α
In a linearly ordered type, we assume the order relations are all decidable.
- decidableLT : DecidableRel fun (x x_1 : α) => x < x_1
In a linearly ordered type, we assume the order relations are all decidable.
The minimum function is equivalent to the one you get from
minOfLe
.The minimum function is equivalent to the one you get from
maxOfLe
.- compare_eq_compareOfLessAndEq : ∀ (a b : α), compare a b = compareOfLessAndEq a b
Comparison via
compare
is equal to the canonical comparison given decidable<
and=
.
Instances
Equations
- (_ : motive x) = (_ : motive x)
Instances For
Equations
- (_ : NoMaxOrder α) = (_ : NoMaxOrder α)
Equations
- (_ : NoMaxOrder α) = (_ : NoMaxOrder α)
Equations
- (_ : NoMinOrder α) = (_ : NoMinOrder α)
Equations
- (_ : NoMinOrder α) = (_ : NoMinOrder α)
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
A collection of elements in an AddCommGroup
designated as "non-negative".
This is useful for constructing an OrderedAddCommGroup
by choosing a positive cone in an existing AddCommGroup
.
- nonneg : α → Prop
The characteristic predicate of a positive cone.
nonneg a
means that0 ≤ a
according to the cone. - pos : α → Prop
The characteristic predicate of a positive cone.
pos a
means that0 < a
according to the cone. - zero_nonneg : self.nonneg 0
- add_nonneg : ∀ {a b : α}, self.nonneg a → self.nonneg b → self.nonneg (a + b)
Instances For
A positive cone in an AddCommGroup
induces a linear order if
for every a
, either a
or -a
is non-negative.
- nonneg : α → Prop
- pos : α → Prop
- zero_nonneg : self.toPositiveCone.nonneg 0
- add_nonneg : ∀ {a b : α}, self.toPositiveCone.nonneg a → self.toPositiveCone.nonneg b → self.toPositiveCone.nonneg (a + b)
- nonnegDecidable : DecidablePred self.nonneg
For any
a
the propositionnonneg a
is decidable Either
a
or-a
isnonneg
Instances For
Construct an OrderedAddCommGroup
by
designating a positive cone in an existing AddCommGroup
.
Equations
- OrderedAddCommGroup.mkOfPositiveCone C = let src := inst; OrderedAddCommGroup.mk (_ : ∀ (a b : α), a ≤ b → ∀ (c : α), c + a ≤ c + b)
Instances For
Construct a LinearOrderedAddCommGroup
by
designating a positive cone in an existing AddCommGroup
such that for every a
, either a
or -a
is non-negative.
Equations
- One or more equations did not get rendered due to their size.