Documentation

Mathlib.Algebra.Order.Ring.Canonical

Canonically ordered rings and semirings. #

@[deprecated "Use `[OrderedCommSemiring α] [CanonicallyOrderedAdd α] [NoZeroDivisors α]` instead." (since := "2025-01-13")]

A canonically ordered commutative semiring is an ordered, commutative semiring in which a ≤ 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 For
    theorem Odd.pos {α : Type u} [Semiring α] [PartialOrder α] [CanonicallyOrderedAdd α] [Nontrivial α] {a : α} :
    Odd a0 < a
    @[simp]
    theorem CanonicallyOrderedAdd.mul_pos {α : Type u} [CommSemiring α] [PartialOrder α] [CanonicallyOrderedAdd α] [NoZeroDivisors α] {a b : α} :
    0 < a * b 0 < a 0 < b
    theorem CanonicallyOrderedAdd.pow_pos {α : Type u} [CommSemiring α] [PartialOrder α] [CanonicallyOrderedAdd α] [NoZeroDivisors α] {a : α} (ha : 0 < a) (n : ) :
    0 < a ^ n
    theorem CanonicallyOrderedAdd.mul_lt_mul_of_lt_of_lt {α : Type u} [CommSemiring α] [PartialOrder α] [CanonicallyOrderedAdd α] [PosMulStrictMono α] {a b c d : α} (hab : a < b) (hcd : c < d) :
    a * c < b * d
    theorem AddLECancellable.mul_tsub {α : Type u} [NonUnitalNonAssocSemiring α] [PartialOrder α] [CanonicallyOrderedAdd α] [Sub α] [OrderedSub α] [IsTotal α fun (x1 x2 : α) => x1 x2] {a b c : α} (h : AddLECancellable (a * c)) :
    a * (b - c) = a * b - a * c
    theorem AddLECancellable.tsub_mul {α : Type u} [NonUnitalNonAssocSemiring α] [PartialOrder α] [CanonicallyOrderedAdd α] [Sub α] [OrderedSub α] [IsTotal α fun (x1 x2 : α) => x1 x2] [MulRightMono α] {a b c : α} (h : AddLECancellable (b * c)) :
    (a - b) * c = a * c - b * c
    theorem mul_tsub {α : Type u} [NonUnitalNonAssocSemiring α] [PartialOrder α] [CanonicallyOrderedAdd α] [Sub α] [OrderedSub α] [IsTotal α fun (x1 x2 : α) => x1 x2] [AddLeftReflectLE α] (a b c : α) :
    a * (b - c) = a * b - a * c
    theorem tsub_mul {α : Type u} [NonUnitalNonAssocSemiring α] [PartialOrder α] [CanonicallyOrderedAdd α] [Sub α] [OrderedSub α] [IsTotal α fun (x1 x2 : α) => x1 x2] [AddLeftReflectLE α] [MulRightMono α] (a b c : α) :
    (a - b) * c = a * c - b * c
    theorem mul_tsub_one {α : Type u} [NonAssocSemiring α] [PartialOrder α] [CanonicallyOrderedAdd α] [Sub α] [OrderedSub α] [IsTotal α fun (x1 x2 : α) => x1 x2] [AddLeftReflectLE α] (a b : α) :
    a * (b - 1) = a * b - a
    theorem tsub_one_mul {α : Type u} [NonAssocSemiring α] [PartialOrder α] [CanonicallyOrderedAdd α] [Sub α] [OrderedSub α] [IsTotal α fun (x1 x2 : α) => x1 x2] [MulRightMono α] [AddLeftReflectLE α] (a b : α) :
    (a - 1) * b = a * b - b
    theorem mul_self_tsub_mul_self {α : Type u} [CommSemiring α] [PartialOrder α] [CanonicallyOrderedAdd α] [Sub α] [OrderedSub α] [IsTotal α fun (x1 x2 : α) => x1 x2] [AddLeftReflectLE α] (a b : α) :
    a * a - b * b = (a + b) * (a - b)

    The tsub version of mul_self_sub_mul_self. Notably, this holds for Nat and NNReal.

    theorem sq_tsub_sq {α : Type u} [CommSemiring α] [PartialOrder α] [CanonicallyOrderedAdd α] [Sub α] [OrderedSub α] [IsTotal α fun (x1 x2 : α) => x1 x2] [AddLeftReflectLE α] (a b : α) :
    a ^ 2 - b ^ 2 = (a + b) * (a - b)

    The tsub version of sq_sub_sq. Notably, this holds for Nat and NNReal.

    theorem mul_self_tsub_one {α : Type u} [CommSemiring α] [PartialOrder α] [CanonicallyOrderedAdd α] [Sub α] [OrderedSub α] [IsTotal α fun (x1 x2 : α) => x1 x2] [AddLeftReflectLE α] (a : α) :
    a * a - 1 = (a + 1) * (a - 1)