Documentation

Mathlib.Algebra.Order.Ring.Canonical

Canoncially ordered rings and semirings. #

TODO #

We're still missing some typeclasses, like

  • Zero is a left absorbing element for multiplication

    zero_mul : ∀ (a : α), 0 * a = 0
  • Zero is a right absorbing element for multiplication

    mul_zero : ∀ (a : α), a * 0 = 0
  • Multiplication is associative

    mul_assoc : ∀ (a b c : α), a * b * c = a * (b * c)
  • toOne : One α
  • One is a left neutral element for multiplication

    one_mul : ∀ (a : α), 1 * a = a
  • One is a right neutral element for multiplication

    mul_one : ∀ (a : α), a * 1 = a
  • toNatCast : NatCast α
  • The canonical map ℕ → R→ R sends 0 : ℕ to 0 : R.

    natCast_zero : autoParam (NatCast.natCast 0 = 0) _auto✝
  • The canonical map ℕ → R→ R is a homomorphism.

    natCast_succ : autoParam (∀ (n : ), NatCast.natCast (n + 1) = NatCast.natCast n + 1) _auto✝
  • Raising to the power of a natural number.

    npow : αα
  • Raising to the power (0 : ℕ) gives 1.

    npow_zero : autoParam (∀ (x : α), npow 0 x = 1) _auto✝
  • Raising to the power (n + 1 : ℕ) behaves as expected.

    npow_succ : autoParam (∀ (n : ) (x : α), npow (n + 1) x = x * npow n x) _auto✝
  • Multiplication is commutative in a commutative semigroup.

    mul_comm : ∀ (a b : α), a * b = b * a
  • No zero divisors.

    eq_zero_or_eq_zero_of_mul_eq_zero : ∀ {a b : α}, a * b = 0a = 0 b = 0

A canonically ordered commutative semiring is an ordered, commutative semiring in which a ≤ b≤ b iff there exists c with b = a + c. This is satisfied by the natural numbers, for example, but not the integers or other ordered groups.

Instances
    theorem mul_add_mul_le_mul_add_mul {α : Type u} [inst : StrictOrderedSemiring α] {a : α} {b : α} {c : α} {d : α} [inst : ExistsAddOfLE α] (hab : a b) (hcd : c d) :
    a * d + b * c a * c + b * d

    Binary rearrangement inequality.

    theorem mul_add_mul_le_mul_add_mul' {α : Type u} [inst : StrictOrderedSemiring α] {a : α} {b : α} {c : α} {d : α} [inst : ExistsAddOfLE α] (hba : b a) (hdc : d c) :
    a d + b c a c + b d

    Binary rearrangement inequality.

    theorem mul_add_mul_lt_mul_add_mul {α : Type u} [inst : StrictOrderedSemiring α] {a : α} {b : α} {c : α} {d : α} [inst : ExistsAddOfLE α] (hab : a < b) (hcd : c < d) :
    a * d + b * c < a * c + b * d

    Binary strict rearrangement inequality.

    theorem mul_add_mul_lt_mul_add_mul' {α : Type u} [inst : StrictOrderedSemiring α] {a : α} {b : α} {c : α} {d : α} [inst : ExistsAddOfLE α] (hba : b < a) (hdc : d < c) :
    a d + b c < a c + b d

    Binary rearrangement inequality.

    Equations
    Equations
    • CanonicallyOrderedCommSemiring.toOrderedCommSemiring = let src := inst; OrderedCommSemiring.mk (_ : ∀ (a b : α), a * b = b * a)
    @[simp]
    theorem CanonicallyOrderedCommSemiring.mul_pos {α : Type u} [inst : CanonicallyOrderedCommSemiring α] {a : α} {b : α} :
    0 < a * b 0 < a 0 < b
    theorem AddLECancellable.mul_tsub {α : Type u} [inst : CanonicallyOrderedCommSemiring α] {a : α} {b : α} {c : α} [inst : Sub α] [inst : OrderedSub α] [inst : IsTotal α fun x x_1 => x x_1] (h : AddLECancellable (a * c)) :
    a * (b - c) = a * b - a * c
    theorem AddLECancellable.tsub_mul {α : Type u} [inst : CanonicallyOrderedCommSemiring α] {a : α} {b : α} {c : α} [inst : Sub α] [inst : OrderedSub α] [inst : IsTotal α fun x x_1 => x x_1] (h : AddLECancellable (b * c)) :
    (a - b) * c = a * c - b * c
    theorem mul_tsub {α : Type u} [inst : CanonicallyOrderedCommSemiring α] [inst : Sub α] [inst : OrderedSub α] [inst : IsTotal α fun x x_1 => x x_1] [inst : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x x_1] (a : α) (b : α) (c : α) :
    a * (b - c) = a * b - a * c
    theorem tsub_mul {α : Type u} [inst : CanonicallyOrderedCommSemiring α] [inst : Sub α] [inst : OrderedSub α] [inst : IsTotal α fun x x_1 => x x_1] [inst : ContravariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x x_1] (a : α) (b : α) (c : α) :
    (a - b) * c = a * c - b * c