Ordered rings and semirings #
This file develops the basics of ordered (semi)rings.
Each typeclass here comprises
- an algebraic class (
Semiring
,CommSemiring
,Ring
,CommRing
) - an order class (
PartialOrder
,LinearOrder
) - assumptions on how both interact ((strict) monotonicity, canonicity)
For short,
- "
+
respects≤
" means "monotonicity of addition" - "
+
respects<
" means "strict monotonicity of addition" - "
*
respects≤
" means "monotonicity of multiplication by a nonnegative number". - "
*
respects<
" means "strict monotonicity of multiplication by a positive number".
Typeclasses #
OrderedSemiring
: Semiring with a partial order such that+
and*
respect≤
.StrictOrderedSemiring
: Nontrivial semiring with a partial order such that+
and*
respects<
.OrderedCommSemiring
: Commutative semiring with a partial order such that+
and*
respect≤
.StrictOrderedCommSemiring
: Nontrivial commutative semiring with a partial order such that+
and*
respect<
.OrderedRing
: Ring with a partial order such that+
respects≤
and*
respects<
.OrderedCommRing
: Commutative ring with a partial order such that+
respects≤
and*
respects<
.LinearOrderedSemiring
: Nontrivial semiring with a linear order such that+
respects≤
and*
respects<
.LinearOrderedCommSemiring
: Nontrivial commutative semiring with a linear order such that+
respects≤
and*
respects<
.LinearOrderedRing
: Nontrivial ring with a linear order such that+
respects≤
and*
respects<
.LinearOrderedCommRing
: Nontrivial commutative ring with a linear order such that+
respects≤
and*
respects<
.CanonicallyOrderedCommSemiring
: Commutative semiring with a partial order such that+
respects≤
,*
respects<
, anda ≤ b ↔ ∃ c, b = a + c
.
Hierarchy #
The hardest part of proving order lemmas might be to figure out the correct generality and its corresponding typeclass. Here's an attempt at demystifying it. For each typeclass, we list its immediate predecessors and what conditions are added to each of them.
OrderedSemiring
OrderedAddCommMonoid
& multiplication &*
respects≤
Semiring
& partial order structure &+
respects≤
&*
respects≤
StrictOrderedSemiring
OrderedCancelAddCommMonoid
& multiplication &*
respects<
& nontrivialityOrderedSemiring
&+
respects<
&*
respects<
& nontriviality
OrderedCommSemiring
OrderedSemiring
& commutativity of multiplicationCommSemiring
& partial order structure &+
respects≤
&*
respects<
StrictOrderedCommSemiring
StrictOrderedSemiring
& commutativity of multiplicationOrderedCommSemiring
&+
respects<
&*
respects<
& nontriviality
OrderedRing
OrderedSemiring
& additive inversesOrderedAddCommGroup
& multiplication &*
respects<
Ring
& partial order structure &+
respects≤
&*
respects<
StrictOrderedRing
StrictOrderedSemiring
& additive inversesOrderedSemiring
&+
respects<
&*
respects<
& nontriviality
OrderedCommRing
OrderedRing
& commutativity of multiplicationOrderedCommSemiring
& additive inversesCommRing
& partial order structure &+
respects≤
&*
respects<
StrictOrderedCommRing
StrictOrderedCommSemiring
& additive inversesStrictOrderedRing
& commutativity of multiplicationOrderedCommRing
&+
respects<
&*
respects<
& nontriviality
LinearOrderedSemiring
StrictOrderedSemiring
& totality of the orderLinearOrderedAddCommMonoid
& multiplication & nontriviality &*
respects<
LinearOrderedCommSemiring
StrictOrderedCommSemiring
& totality of the orderLinearOrderedSemiring
& commutativity of multiplication
LinearOrderedRing
StrictOrderedRing
& totality of the orderLinearOrderedSemiring
& additive inversesLinearOrderedAddCommGroup
& multiplication &*
respects<
Ring
&IsDomain
& linear order structure
LinearOrderedCommRing
StrictOrderedCommRing
& totality of the orderLinearOrderedRing
& commutativity of multiplicationLinearOrderedCommSemiring
& additive inversesCommRing
&IsDomain
& linear order structure
Note that OrderDual
does not satisfy any of the ordered ring typeclasses due to the
zero_le_one
field.
An OrderedSemiring
is a semiring with a partial order such that addition is monotone and
multiplication by a nonnegative number 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
- mul : α → α → α
- one : α
- natCast : ℕ → α
- natCast_zero : NatCast.natCast 0 = 0
- natCast_succ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
- npow : ℕ → α → α
- npow_zero : ∀ (x : α), Semiring.npow 0 x = 1
- npow_succ : ∀ (n : ℕ) (x : α), Semiring.npow (n + 1) x = Semiring.npow n x * x
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- zero_le_one : 0 ≤ 1
0 ≤ 1
in any ordered semiring. In an ordered semiring, we can multiply an inequality
a ≤ b
on the left by a non-negative element0 ≤ c
to obtainc * a ≤ c * b
.In an ordered semiring, we can multiply an inequality
a ≤ b
on the right by a non-negative element0 ≤ c
to obtaina * c ≤ b * c
.
Instances
0 ≤ 1
in any ordered semiring.
In an ordered semiring, we can multiply an inequality a ≤ b
on the left
by a non-negative element 0 ≤ c
to obtain c * a ≤ c * b
.
In an ordered semiring, we can multiply an inequality a ≤ b
on the right
by a non-negative element 0 ≤ c
to obtain a * c ≤ b * c
.
An OrderedCommSemiring
is a commutative semiring with a partial order such that addition is
monotone and multiplication by a nonnegative number 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
- mul : α → α → α
- one : α
- natCast : ℕ → α
- natCast_zero : NatCast.natCast 0 = 0
- natCast_succ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
- npow : ℕ → α → α
- npow_zero : ∀ (x : α), Semiring.npow 0 x = 1
- npow_succ : ∀ (n : ℕ) (x : α), Semiring.npow (n + 1) x = Semiring.npow n x * x
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- zero_le_one : 0 ≤ 1
Multiplication is commutative in a commutative multiplicative magma.
Instances
An OrderedRing
is a ring with a partial order such that addition is monotone and
multiplication by a nonnegative number 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
- mul : α → α → α
- one : α
- natCast : ℕ → α
- natCast_zero : NatCast.natCast 0 = 0
- natCast_succ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
- npow : ℕ → α → α
- npow_zero : ∀ (x : α), Semiring.npow 0 x = 1
- npow_succ : ∀ (n : ℕ) (x : α), Semiring.npow (n + 1) x = Semiring.npow n x * x
- neg : α → α
- sub : α → α → α
- zsmul : ℤ → α → α
- zsmul_zero' : ∀ (a : α), Ring.zsmul 0 a = 0
- zsmul_succ' : ∀ (n : ℕ) (a : α), Ring.zsmul (Int.ofNat n.succ) a = Ring.zsmul (Int.ofNat n) a + a
- zsmul_neg' : ∀ (n : ℕ) (a : α), Ring.zsmul (Int.negSucc n) a = -Ring.zsmul (↑n.succ) a
- intCast : ℤ → α
- intCast_ofNat : ∀ (n : ℕ), IntCast.intCast ↑n = ↑n
- intCast_negSucc : ∀ (n : ℕ), IntCast.intCast (Int.negSucc n) = -↑(n + 1)
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
Addition is monotone in an ordered additive commutative group.
- zero_le_one : 0 ≤ 1
0 ≤ 1
in any ordered ring. The product of non-negative elements is non-negative.
Instances
0 ≤ 1
in any ordered ring.
The product of non-negative elements is non-negative.
An OrderedCommRing
is a commutative ring with a partial order such that addition is monotone
and multiplication by a nonnegative number 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
- mul : α → α → α
- one : α
- natCast : ℕ → α
- natCast_zero : NatCast.natCast 0 = 0
- natCast_succ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
- npow : ℕ → α → α
- npow_zero : ∀ (x : α), Semiring.npow 0 x = 1
- npow_succ : ∀ (n : ℕ) (x : α), Semiring.npow (n + 1) x = Semiring.npow n x * x
- neg : α → α
- sub : α → α → α
- zsmul : ℤ → α → α
- zsmul_zero' : ∀ (a : α), Ring.zsmul 0 a = 0
- zsmul_succ' : ∀ (n : ℕ) (a : α), Ring.zsmul (Int.ofNat n.succ) a = Ring.zsmul (Int.ofNat n) a + a
- zsmul_neg' : ∀ (n : ℕ) (a : α), Ring.zsmul (Int.negSucc n) a = -Ring.zsmul (↑n.succ) a
- intCast : ℤ → α
- intCast_ofNat : ∀ (n : ℕ), IntCast.intCast ↑n = ↑n
- intCast_negSucc : ∀ (n : ℕ), IntCast.intCast (Int.negSucc n) = -↑(n + 1)
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- zero_le_one : 0 ≤ 1
Multiplication is commutative in a commutative multiplicative magma.
Instances
A StrictOrderedSemiring
is a nontrivial semiring with a partial order such that addition is
strictly monotone and multiplication by a positive number is strictly 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
- mul : α → α → α
- one : α
- natCast : ℕ → α
- natCast_zero : NatCast.natCast 0 = 0
- natCast_succ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
- npow : ℕ → α → α
- npow_zero : ∀ (x : α), Semiring.npow 0 x = 1
- npow_succ : ∀ (n : ℕ) (x : α), Semiring.npow (n + 1) x = Semiring.npow n x * x
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- exists_pair_ne : ∃ (x : α), ∃ (y : α), x ≠ y
- zero_le_one : 0 ≤ 1
In a strict ordered semiring,
0 ≤ 1
. Left multiplication by a positive element is strictly monotone.
Right multiplication by a positive element is strictly monotone.
Instances
In a strict ordered semiring, 0 ≤ 1
.
Left multiplication by a positive element is strictly monotone.
Right multiplication by a positive element is strictly monotone.
A StrictOrderedCommSemiring
is a commutative semiring with a partial order such that
addition is strictly monotone and multiplication by a positive number is strictly 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
- mul : α → α → α
- one : α
- natCast : ℕ → α
- natCast_zero : NatCast.natCast 0 = 0
- natCast_succ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
- npow : ℕ → α → α
- npow_zero : ∀ (x : α), Semiring.npow 0 x = 1
- npow_succ : ∀ (n : ℕ) (x : α), Semiring.npow (n + 1) x = Semiring.npow n x * x
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- exists_pair_ne : ∃ (x : α), ∃ (y : α), x ≠ y
- zero_le_one : 0 ≤ 1
Multiplication is commutative in a commutative multiplicative magma.
Instances
A StrictOrderedRing
is a ring with a partial order such that addition is strictly monotone
and multiplication by a positive number is strictly 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
- mul : α → α → α
- one : α
- natCast : ℕ → α
- natCast_zero : NatCast.natCast 0 = 0
- natCast_succ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
- npow : ℕ → α → α
- npow_zero : ∀ (x : α), Semiring.npow 0 x = 1
- npow_succ : ∀ (n : ℕ) (x : α), Semiring.npow (n + 1) x = Semiring.npow n x * x
- neg : α → α
- sub : α → α → α
- zsmul : ℤ → α → α
- zsmul_zero' : ∀ (a : α), Ring.zsmul 0 a = 0
- zsmul_succ' : ∀ (n : ℕ) (a : α), Ring.zsmul (Int.ofNat n.succ) a = Ring.zsmul (Int.ofNat n) a + a
- zsmul_neg' : ∀ (n : ℕ) (a : α), Ring.zsmul (Int.negSucc n) a = -Ring.zsmul (↑n.succ) a
- intCast : ℤ → α
- intCast_ofNat : ∀ (n : ℕ), IntCast.intCast ↑n = ↑n
- intCast_negSucc : ∀ (n : ℕ), IntCast.intCast (Int.negSucc n) = -↑(n + 1)
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
Addition is monotone in an ordered additive commutative group.
- exists_pair_ne : ∃ (x : α), ∃ (y : α), x ≠ y
- zero_le_one : 0 ≤ 1
In a strict ordered ring,
0 ≤ 1
. The product of two positive elements is positive.
Instances
In a strict ordered ring, 0 ≤ 1
.
The product of two positive elements is positive.
A StrictOrderedCommRing
is a commutative ring with a partial order such that addition is
strictly monotone and multiplication by a positive number is strictly 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
- mul : α → α → α
- one : α
- natCast : ℕ → α
- natCast_zero : NatCast.natCast 0 = 0
- natCast_succ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
- npow : ℕ → α → α
- npow_zero : ∀ (x : α), Semiring.npow 0 x = 1
- npow_succ : ∀ (n : ℕ) (x : α), Semiring.npow (n + 1) x = Semiring.npow n x * x
- neg : α → α
- sub : α → α → α
- zsmul : ℤ → α → α
- zsmul_zero' : ∀ (a : α), Ring.zsmul 0 a = 0
- zsmul_succ' : ∀ (n : ℕ) (a : α), Ring.zsmul (Int.ofNat n.succ) a = Ring.zsmul (Int.ofNat n) a + a
- zsmul_neg' : ∀ (n : ℕ) (a : α), Ring.zsmul (Int.negSucc n) a = -Ring.zsmul (↑n.succ) a
- intCast : ℤ → α
- intCast_ofNat : ∀ (n : ℕ), IntCast.intCast ↑n = ↑n
- intCast_negSucc : ∀ (n : ℕ), IntCast.intCast (Int.negSucc n) = -↑(n + 1)
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- exists_pair_ne : ∃ (x : α), ∃ (y : α), x ≠ y
- zero_le_one : 0 ≤ 1
Multiplication is commutative in a commutative multiplicative magma.
Instances
A LinearOrderedSemiring
is a nontrivial semiring with a linear order such that
addition is monotone and multiplication by a positive number is strictly 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
- mul : α → α → α
- one : α
- natCast : ℕ → α
- natCast_zero : NatCast.natCast 0 = 0
- natCast_succ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
- npow : ℕ → α → α
- npow_zero : ∀ (x : α), Semiring.npow 0 x = 1
- npow_succ : ∀ (n : ℕ) (x : α), Semiring.npow (n + 1) x = Semiring.npow n x * x
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- exists_pair_ne : ∃ (x : α), ∃ (y : α), x ≠ y
- zero_le_one : 0 ≤ 1
- 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 LinearOrderedCommSemiring
is a nontrivial commutative semiring with a linear order such
that addition is monotone and multiplication by a positive number is strictly 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
- mul : α → α → α
- one : α
- natCast : ℕ → α
- natCast_zero : NatCast.natCast 0 = 0
- natCast_succ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
- npow : ℕ → α → α
- npow_zero : ∀ (x : α), Semiring.npow 0 x = 1
- npow_succ : ∀ (n : ℕ) (x : α), Semiring.npow (n + 1) x = Semiring.npow n x * x
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- exists_pair_ne : ∃ (x : α), ∃ (y : α), x ≠ y
- zero_le_one : 0 ≤ 1
- 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 LinearOrderedRing
is a ring with a linear order such that addition is monotone and
multiplication by a positive number is strictly 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
- mul : α → α → α
- one : α
- natCast : ℕ → α
- natCast_zero : NatCast.natCast 0 = 0
- natCast_succ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
- npow : ℕ → α → α
- npow_zero : ∀ (x : α), Semiring.npow 0 x = 1
- npow_succ : ∀ (n : ℕ) (x : α), Semiring.npow (n + 1) x = Semiring.npow n x * x
- neg : α → α
- sub : α → α → α
- zsmul : ℤ → α → α
- zsmul_zero' : ∀ (a : α), Ring.zsmul 0 a = 0
- zsmul_succ' : ∀ (n : ℕ) (a : α), Ring.zsmul (Int.ofNat n.succ) a = Ring.zsmul (Int.ofNat n) a + a
- zsmul_neg' : ∀ (n : ℕ) (a : α), Ring.zsmul (Int.negSucc n) a = -Ring.zsmul (↑n.succ) a
- intCast : ℤ → α
- intCast_ofNat : ∀ (n : ℕ), IntCast.intCast ↑n = ↑n
- intCast_negSucc : ∀ (n : ℕ), IntCast.intCast (Int.negSucc n) = -↑(n + 1)
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- exists_pair_ne : ∃ (x : α), ∃ (y : α), x ≠ y
- zero_le_one : 0 ≤ 1
- 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 LinearOrderedCommRing
is a commutative ring with a linear order such that addition is
monotone and multiplication by a positive number is strictly 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
- mul : α → α → α
- one : α
- natCast : ℕ → α
- natCast_zero : NatCast.natCast 0 = 0
- natCast_succ : ∀ (n : ℕ), NatCast.natCast (n + 1) = NatCast.natCast n + 1
- npow : ℕ → α → α
- npow_zero : ∀ (x : α), Semiring.npow 0 x = 1
- npow_succ : ∀ (n : ℕ) (x : α), Semiring.npow (n + 1) x = Semiring.npow n x * x
- neg : α → α
- sub : α → α → α
- zsmul : ℤ → α → α
- zsmul_zero' : ∀ (a : α), Ring.zsmul 0 a = 0
- zsmul_succ' : ∀ (n : ℕ) (a : α), Ring.zsmul (Int.ofNat n.succ) a = Ring.zsmul (Int.ofNat n) a + a
- zsmul_neg' : ∀ (n : ℕ) (a : α), Ring.zsmul (Int.negSucc n) a = -Ring.zsmul (↑n.succ) a
- intCast : ℤ → α
- intCast_ofNat : ∀ (n : ℕ), IntCast.intCast ↑n = ↑n
- intCast_negSucc : ∀ (n : ℕ), IntCast.intCast (Int.negSucc n) = -↑(n + 1)
- le : α → α → Prop
- lt : α → α → Prop
- le_refl : ∀ (a : α), a ≤ a
- exists_pair_ne : ∃ (x : α), ∃ (y : α), x ≠ y
- zero_le_one : 0 ≤ 1
- 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
Multiplication is commutative in a commutative multiplicative magma.
Instances
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Alias of one_lt_mul_of_le_of_lt
.
Variant of mul_le_of_le_one_left
for b
non-positive instead of non-negative.
Variant of le_mul_of_one_le_left
for b
non-positive instead of non-negative.
Variant of mul_le_of_le_one_right
for a
non-positive instead of non-negative.
Variant of le_mul_of_one_le_right
for a
non-positive instead of non-negative.
Equations
- OrderedRing.toOrderedSemiring = let __src := inst; let __src_1 := Ring.toSemiring; OrderedSemiring.mk ⋯ ⋯ ⋯ ⋯
Equations
- OrderedCommRing.toOrderedCommSemiring = let __src := OrderedRing.toOrderedSemiring; let __src_1 := inst; OrderedCommSemiring.mk ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
A choice-free version of StrictOrderedSemiring.toOrderedSemiring
to avoid using choice in
basic Nat
lemmas.
Equations
- StrictOrderedSemiring.toOrderedSemiring' = let __src := inst✝; OrderedSemiring.mk ⋯ ⋯ ⋯ ⋯
Instances For
Equations
- StrictOrderedSemiring.toOrderedSemiring = let __src := inst; OrderedSemiring.mk ⋯ ⋯ ⋯ ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Variant of mul_lt_of_lt_one_left
for b
negative instead of positive.
Variant of lt_mul_of_one_lt_left
for b
negative instead of positive.
Variant of mul_lt_of_lt_one_right
for a
negative instead of positive.
Variant of lt_mul_of_lt_one_right
for a
negative instead of positive.
Binary rearrangement inequality.
Binary rearrangement inequality.
Binary strict rearrangement inequality.
Binary rearrangement inequality.
A choice-free version of StrictOrderedCommSemiring.toOrderedCommSemiring'
to avoid using
choice in basic Nat
lemmas.
Equations
- StrictOrderedCommSemiring.toOrderedCommSemiring' = let __src := inst✝; let __src_1 := StrictOrderedSemiring.toOrderedSemiring'; OrderedCommSemiring.mk ⋯
Instances For
Equations
- StrictOrderedCommSemiring.toOrderedCommSemiring = let __src := inst; let __src_1 := StrictOrderedSemiring.toOrderedSemiring; OrderedCommSemiring.mk ⋯
Equations
- StrictOrderedRing.toStrictOrderedSemiring = let __src := inst; let __src_1 := Ring.toSemiring; StrictOrderedSemiring.mk ⋯ ⋯ ⋯ ⋯ ⋯
A choice-free version of StrictOrderedRing.toOrderedRing
to avoid using choice in basic
Int
lemmas.
Equations
- StrictOrderedRing.toOrderedRing' = let __src := inst✝; let __src_1 := Ring.toSemiring; OrderedRing.mk ⋯ ⋯ ⋯
Instances For
Equations
- StrictOrderedRing.toOrderedRing = let __spread.0 := inst; OrderedRing.mk ⋯ ⋯ ⋯
A choice-free version of StrictOrderedCommRing.toOrderedCommRing
to avoid using
choice in basic Int
lemmas.
Equations
- StrictOrderedCommRing.toOrderedCommRing' = let __src := inst✝; let __src_1 := StrictOrderedRing.toOrderedRing'; OrderedCommRing.mk ⋯
Instances For
Equations
- StrictOrderedCommRing.toStrictOrderedCommSemiring = let __src := inst; let __src_1 := StrictOrderedRing.toStrictOrderedSemiring; StrictOrderedCommSemiring.mk ⋯
Equations
- StrictOrderedCommRing.toOrderedCommRing = let __src := inst; let __src_1 := StrictOrderedRing.toOrderedRing; OrderedCommRing.mk ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Out of three elements of a LinearOrderedRing
, two must have the same sign.
Alias of sq_nonneg
.
The sum of two squares is zero iff both elements are zero.
Equations
- One or more equations did not get rendered due to their size.
Binary arithmetic mean-geometric mean inequality (aka AM-GM inequality) for linearly ordered commutative semirings.
Alias of two_mul_le_add_sq
.
Binary arithmetic mean-geometric mean inequality (aka AM-GM inequality) for linearly ordered commutative semirings.
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.
Equations
- LinearOrderedCommRing.toStrictOrderedCommRing = StrictOrderedCommRing.mk ⋯
Equations
- One or more equations did not get rendered due to their size.
Alias of mul_nonneg_iff_of_pos_left
.
Alias of mul_nonneg_iff_of_pos_right
.
Alias of mul_pos_iff_of_pos_left
.
Alias of mul_pos_iff_of_pos_right
.