Ordered monoids #
This file provides the definitions of ordered monoids.
An ordered (additive) commutative monoid is a commutative monoid with a partial order such that addition is monotone.
- add : α → α → α
- zero : α
- nsmul : ℕ → α → α
- nsmul_zero : ∀ (x : α), AddMonoid.nsmul 0 x = 0
- nsmul_succ : ∀ (n : ℕ) (x : α), AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
Instances
An ordered commutative monoid is a commutative monoid with a partial order such that multiplication is monotone.
- mul : α → α → α
- one : α
- npow : ℕ → α → α
- npow_zero : ∀ (x : α), Monoid.npow 0 x = 1
- npow_succ : ∀ (n : ℕ) (x : α), Monoid.npow (n + 1) x = Monoid.npow n x * x
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
Instances
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
An ordered cancellative additive commutative monoid is a partially ordered commutative additive monoid in which addition is cancellative and monotone.
- add : α → α → α
- zero : α
- nsmul : ℕ → α → α
- nsmul_zero : ∀ (x : α), AddMonoid.nsmul 0 x = 0
- nsmul_succ : ∀ (n : ℕ) (x : α), AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
Instances
An ordered cancellative commutative monoid is a partially ordered commutative monoid in which multiplication is cancellative and monotone.
- mul : α → α → α
- one : α
- npow : ℕ → α → α
- npow_zero : ∀ (x : α), Monoid.npow 0 x = 1
- npow_succ : ∀ (n : ℕ) (x : α), Monoid.npow (n + 1) x = Monoid.npow n x * x
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
Instances
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- OrderedCancelAddCommMonoid.toCancelAddCommMonoid = let __src := inst; AddCancelCommMonoid.mk ⋯
Equations
- OrderedCancelCommMonoid.toCancelCommMonoid = let __src := inst; CancelCommMonoid.mk ⋯
A linearly ordered additive commutative monoid.
- add : α → α → α
- zero : α
- nsmul : ℕ → α → α
- nsmul_zero : ∀ (x : α), AddMonoid.nsmul 0 x = 0
- nsmul_succ : ∀ (n : ℕ) (x : α), AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x
- 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 monoid.
- mul : α → α → α
- one : α
- npow : ℕ → α → α
- npow_zero : ∀ (x : α), Monoid.npow 0 x = 1
- npow_succ : ∀ (n : ℕ) (x : α), Monoid.npow (n + 1) x = Monoid.npow n x * x
- 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 cancellative additive commutative monoid is an additive commutative monoid with a decidable linear order in which addition is cancellative and monotone.
- add : α → α → α
- zero : α
- nsmul : ℕ → α → α
- nsmul_zero : ∀ (x : α), AddMonoid.nsmul 0 x = 0
- nsmul_succ : ∀ (n : ℕ) (x : α), AddMonoid.nsmul (n + 1) x = AddMonoid.nsmul n x + x
- 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 cancellative commutative monoid is a commutative monoid with a linear order in which multiplication is cancellative and monotone.
- mul : α → α → α
- one : α
- npow : ℕ → α → α
- npow_zero : ∀ (x : α), Monoid.npow 0 x = 1
- npow_succ : ∀ (n : ℕ) (x : α), Monoid.npow (n + 1) x = Monoid.npow n x * x
- 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 monoid 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 = AddMonoid.nsmul n x + 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 : α
In a
LinearOrderedAddCommMonoidWithTop
, the⊤
element is invariant under addition.