Documentation

Mathlib.Algebra.Order.Ring.Defs

Ordered rings and semirings #

This file develops the basics of ordered (semi)rings.

Each typeclass here comprises

For short,

Typeclasses #

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.

Note that OrderDual does not satisfy any of the ordered ring typeclasses due to the zero_le_one field.

class OrderedSemiring (α : Type u) extends Semiring α, OrderedAddCommMonoid α :

An OrderedSemiring is a semiring with a partial order such that addition is monotone and multiplication by a nonnegative number is monotone.

Instances
    class OrderedCommSemiring (α : Type u) extends OrderedSemiring α, CommSemiring α :

    An OrderedCommSemiring is a commutative semiring with a partial order such that addition is monotone and multiplication by a nonnegative number is monotone.

    Instances
      class OrderedRing (α : Type u) extends Ring α, OrderedAddCommGroup α :

      An OrderedRing is a ring with a partial order such that addition is monotone and multiplication by a nonnegative number is monotone.

      Instances
        class OrderedCommRing (α : Type u) extends OrderedRing α, CommRing α :

        An OrderedCommRing is a commutative ring with a partial order such that addition is monotone and multiplication by a nonnegative number is monotone.

        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.

          Instances

            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.

            Instances
              class StrictOrderedRing (α : Type u) extends Ring α, OrderedAddCommGroup α, Nontrivial α :

              A StrictOrderedRing is a ring with a partial order such that addition is strictly monotone and multiplication by a positive number is strictly monotone.

              Instances
                class StrictOrderedCommRing (α : Type u_1) extends StrictOrderedRing α, CommRing α :
                Type u_1

                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.

                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.

                  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.

                    Instances
                      class LinearOrderedRing (α : Type u) extends StrictOrderedRing α, LinearOrder α :

                      A LinearOrderedRing is a ring with a linear order such that addition is monotone and multiplication by a positive number is strictly monotone.

                      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.

                        Instances
                          @[instance 100]
                          Equations
                          • =
                          @[instance 200]
                          Equations
                          • =
                          @[instance 200]
                          Equations
                          • =
                          @[instance 100]
                          Equations
                          theorem one_add_le_one_sub_mul_one_add {α : Type u} [OrderedRing α] {a b c : α} (h : a + b + b * c c) :
                          1 + a (1 - b) * (1 + c)
                          theorem one_add_le_one_add_mul_one_sub {α : Type u} [OrderedRing α] {a b c : α} (h : a + c + b * c b) :
                          1 + a (1 + b) * (1 - c)
                          theorem one_sub_le_one_sub_mul_one_add {α : Type u} [OrderedRing α] {a b c : α} (h : b + b * c a + c) :
                          1 - a (1 - b) * (1 + c)
                          theorem one_sub_le_one_add_mul_one_sub {α : Type u} [OrderedRing α] {a b c : α} (h : c + b * c a + b) :
                          1 - a (1 + b) * (1 - c)
                          @[instance 100]
                          Equations
                          @[instance 200]
                          Equations
                          • =
                          @[instance 200]
                          Equations
                          • =
                          @[reducible, inline]

                          A choice-free version of StrictOrderedSemiring.toOrderedSemiring to avoid using choice in basic Nat lemmas.

                          Equations
                          Instances For
                            @[instance 100]
                            Equations
                            @[instance 100]
                            Equations
                            • =
                            @[instance 100]
                            Equations
                            • =
                            @[reducible, inline]

                            A choice-free version of StrictOrderedCommSemiring.toOrderedCommSemiring' to avoid using choice in basic Nat lemmas.

                            Equations
                            Instances For
                              @[instance 100]
                              Equations
                              @[instance 100]
                              Equations
                              @[reducible, inline]
                              abbrev StrictOrderedRing.toOrderedRing' {α : Type u} [StrictOrderedRing α] [DecidableRel fun (x1 x2 : α) => x1 x2] :

                              A choice-free version of StrictOrderedRing.toOrderedRing to avoid using choice in basic Int lemmas.

                              Equations
                              Instances For
                                @[instance 100]
                                Equations
                                @[reducible, inline]

                                A choice-free version of StrictOrderedCommRing.toOrderedCommRing to avoid using choice in basic Int lemmas.

                                Equations
                                Instances For
                                  @[instance 100]
                                  Equations
                                  @[instance 100]
                                  Equations
                                  @[instance 200]
                                  Equations
                                  • =
                                  @[instance 200]
                                  Equations
                                  • =
                                  @[instance 100]
                                  Equations
                                  • =
                                  @[instance 100]
                                  Equations
                                  • =
                                  @[instance 100]
                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  @[instance 100]
                                  Equations
                                  • LinearOrderedRing.toLinearOrderedSemiring = LinearOrderedSemiring.mk LinearOrderedRing.decidableLE LinearOrderedRing.decidableEq LinearOrderedRing.decidableLT
                                  @[instance 100]
                                  Equations
                                  • LinearOrderedRing.toLinearOrderedAddCommGroup = LinearOrderedAddCommGroup.mk LinearOrderedRing.decidableLE LinearOrderedRing.decidableEq LinearOrderedRing.decidableLT
                                  @[instance 100]
                                  Equations
                                  @[instance 100]
                                  Equations
                                  • LinearOrderedCommRing.toLinearOrderedCommSemiring = LinearOrderedCommSemiring.mk LinearOrderedRing.decidableLE LinearOrderedRing.decidableEq LinearOrderedRing.decidableLT