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.

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

Instances

    A strict ordered semiring is a nontrivial semiring with a partial order such that addition is strictly monotone and multiplication by a positive number is strictly monotone.

    Instances
      theorem IsOrderedRing.of_mul_nonneg {R : Type u} [Ring R] [PartialOrder R] [IsOrderedAddMonoid R] [ZeroLEOneClass R] (mul_nonneg : ∀ (a b : R), 0 a0 b0 a * b) :
      theorem IsStrictOrderedRing.of_mul_pos {R : Type u} [Ring R] [PartialOrder R] [IsOrderedAddMonoid R] [ZeroLEOneClass R] [Nontrivial R] (mul_pos : ∀ (a b : R), 0 < a0 < b0 < a * b) :
      @[instance 50]

      Turn an ordered domain into a strict ordered ring.

      This is not an instance, as it would loop with NeZero.charZero_one.

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

      theorem one_add_le_one_sub_mul_one_add {R : Type u} [Ring R] [PartialOrder R] [IsOrderedRing R] {a b c : R} (h : a + b + b * c c) :
      1 + a (1 - b) * (1 + c)
      theorem one_add_le_one_add_mul_one_sub {R : Type u} [Ring R] [PartialOrder R] [IsOrderedRing R] {a b c : R} (h : a + c + b * c b) :
      1 + a (1 + b) * (1 - c)
      theorem one_sub_le_one_sub_mul_one_add {R : Type u} [Ring R] [PartialOrder R] [IsOrderedRing R] {a b c : R} (h : b + b * c a + c) :
      1 - a (1 - b) * (1 + c)
      theorem one_sub_le_one_add_mul_one_sub {R : Type u} [Ring R] [PartialOrder R] [IsOrderedRing R] {a b c : R} (h : c + b * c a + b) :
      1 - a (1 + b) * (1 - c)