Linear ordered (semi)fields #
A linear ordered (semi)field is a (semi)field equipped with a linear order such that
- addition respects the order:
a ≤ b → c + a ≤ c + b
; - multiplication of positives is positive:
0 < a → 0 < b → 0 < a * b
; 0 < 1
.
Main Definitions #
LinearOrderedSemifield
: Typeclass for linear order semifields.LinearOrderedField
: Typeclass for linear ordered fields.
A linear ordered semifield is a field with a linear order respecting the operations.
- 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
- 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
- inv : α → α
- div : α → α → α
a / b := a * b⁻¹
- zpow : ℤ → α → α
The power operation:
a ^ n = a * ··· * a
;a ^ (-n) = a⁻¹ * ··· a⁻¹
(n
times) - zpow_zero' : ∀ (a : α), LinearOrderedSemifield.zpow 0 a = 1
a ^ 0 = 1
- zpow_succ' : ∀ (n : ℕ) (a : α), LinearOrderedSemifield.zpow (Int.ofNat (Nat.succ n)) a = LinearOrderedSemifield.zpow (Int.ofNat n) a * a
a ^ (n + 1) = a ^ n * a
- zpow_neg' : ∀ (n : ℕ) (a : α), LinearOrderedSemifield.zpow (Int.negSucc n) a = (LinearOrderedSemifield.zpow (↑(Nat.succ n)) a)⁻¹
a ^ -(n + 1) = (a ^ (n + 1))⁻¹
The inverse of
0
in a group with zero is0
.Every nonzero element of a group with zero is invertible.
Instances
A linear ordered field is a field with a linear order respecting the operations.
- 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 (Nat.succ n)) a = Ring.zsmul (Int.ofNat n) a + a
- zsmul_neg' : ∀ (n : ℕ) (a : α), Ring.zsmul (Int.negSucc n) a = -Ring.zsmul (↑(Nat.succ n)) 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
- inv : α → α
- div : α → α → α
a / b := a * b⁻¹
- zpow : ℤ → α → α
The power operation:
a ^ n = a * ··· * a
;a ^ (-n) = a⁻¹ * ··· a⁻¹
(n
times) - zpow_zero' : ∀ (a : α), LinearOrderedField.zpow 0 a = 1
a ^ 0 = 1
- zpow_succ' : ∀ (n : ℕ) (a : α), LinearOrderedField.zpow (Int.ofNat (Nat.succ n)) a = LinearOrderedField.zpow (Int.ofNat n) a * a
a ^ (n + 1) = a ^ n * a
- zpow_neg' : ∀ (n : ℕ) (a : α), LinearOrderedField.zpow (Int.negSucc n) a = (LinearOrderedField.zpow (↑(Nat.succ n)) a)⁻¹
a ^ -(n + 1) = (a ^ (n + 1))⁻¹
- ratCast : ℚ → α
For a nonzero
a
,a⁻¹
is a right multiplicative inverse.The inverse of
0
is0
by convention.- ratCast_mk : ∀ (a : ℤ) (b : ℕ) (h1 : b ≠ 0) (h2 : Nat.Coprime (Int.natAbs a) b), ↑{ num := a, den := b, den_nz := h1, reduced := h2 } = ↑a * (↑b)⁻¹
However
Rat.cast
is defined, it must be propositionally equal toa * b⁻¹
.Do not use this lemma directly. Use
Rat.cast_def
instead. - qsmul : ℚ → α → α
Scalar multiplication by a rational number.
Set this to
qsmulRec _
unless there is a risk of aModule ℚ _
instance diamond.Do not use directly. Instead use the
•
notation. - qsmul_eq_mul' : ∀ (a : ℚ) (x : α), LinearOrderedField.qsmul a x = ↑a * x
However
qsmul
is defined, it must be propositionally equal to multiplication byRat.cast
.Do not use this lemma directly. Use
Rat.cast_def
instead.
Instances
Equations
- LinearOrderedField.toLinearOrderedSemifield = let __src := LinearOrderedRing.toLinearOrderedSemiring; let __src_1 := inst; LinearOrderedSemifield.mk ⋯ LinearOrderedField.zpow ⋯ ⋯ ⋯ ⋯ ⋯
Alias of the reverse direction of inv_pos
.
Alias of the reverse direction of inv_nonneg
.