mathlib documentation

algebra.order.ring

Ordered rings and semirings #

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

Each typeclass here comprises

For short,

Typeclasses #

and some typeclasses to define ordered rings by specifying their nonegative elements:

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.

TODO #

We're still missing some typeclasses, like

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

theorem add_one_le_two_mul {α : Type u} [has_le α] [semiring α] [covariant_class α α has_add.add has_le.le] {a : α} (a1 : 1 a) :
a + 1 2 * a
@[instance]
def ordered_semiring.to_semiring (α : Type u) [self : ordered_semiring α] :
@[class]
structure ordered_semiring (α : Type u) :
Type u
  • add : α → α → α
  • add_assoc : ∀ (a b c : α), a + b + c = a + (b + c)
  • zero : α
  • zero_add : ∀ (a : α), 0 + a = a
  • add_zero : ∀ (a : α), a + 0 = a
  • nsmul : α → α
  • nsmul_zero' : (∀ (x : α), ordered_semiring.nsmul 0 x = 0) . "try_refl_tac"
  • nsmul_succ' : (∀ (n : ) (x : α), ordered_semiring.nsmul n.succ x = x + ordered_semiring.nsmul n x) . "try_refl_tac"
  • add_comm : ∀ (a b : α), a + b = b + a
  • mul : α → α → α
  • left_distrib : ∀ (a b c : α), a * (b + c) = a * b + a * c
  • right_distrib : ∀ (a b c : α), (a + b) * c = a * c + b * c
  • zero_mul : ∀ (a : α), 0 * a = 0
  • mul_zero : ∀ (a : α), a * 0 = 0
  • mul_assoc : ∀ (a b c : α), a * b * c = a * (b * c)
  • one : α
  • one_mul : ∀ (a : α), 1 * a = a
  • mul_one : ∀ (a : α), a * 1 = a
  • nat_cast : → α
  • nat_cast_zero : ordered_semiring.nat_cast 0 = 0 . "control_laws_tac"
  • nat_cast_succ : (∀ (n : ), ordered_semiring.nat_cast (n + 1) = ordered_semiring.nat_cast n + 1) . "control_laws_tac"
  • npow : α → α
  • npow_zero' : (∀ (x : α), ordered_semiring.npow 0 x = 1) . "try_refl_tac"
  • npow_succ' : (∀ (n : ) (x : α), ordered_semiring.npow n.succ x = x * ordered_semiring.npow n x) . "try_refl_tac"
  • le : α → α → Prop
  • lt : α → α → Prop
  • le_refl : ∀ (a : α), a a
  • le_trans : ∀ (a b c : α), a bb ca c
  • lt_iff_le_not_le : (∀ (a b : α), a < b a b ¬b a) . "order_laws_tac"
  • le_antisymm : ∀ (a b : α), a bb aa = b
  • add_le_add_left : ∀ (a b : α), a b∀ (c : α), c + a c + b
  • le_of_add_le_add_left : ∀ (a b c : α), a + b a + cb c
  • zero_le_one : 0 1
  • mul_lt_mul_of_pos_left : ∀ (a b c : α), a < b0 < cc * a < c * b
  • mul_lt_mul_of_pos_right : ∀ (a b c : α), a < b0 < ca * c < b * c

An ordered_semiring α is a semiring α with a partial order such that addition is monotone and multiplication by a positive number is strictly monotone.

Instances of this typeclass
Instances of other typeclasses for ordered_semiring
  • ordered_semiring.has_sizeof_inst
@[protected, instance]
@[protected, instance]
@[simp]
theorem zero_lt_one {α : Type u} [ordered_semiring α] [nontrivial α] :
0 < 1
theorem zero_lt_two {α : Type u} [ordered_semiring α] [nontrivial α] :
0 < 2
theorem two_ne_zero {α : Type u} [ordered_semiring α] [nontrivial α] :
2 0
theorem one_lt_two {α : Type u} [ordered_semiring α] [nontrivial α] :
1 < 2
theorem zero_lt_three {α : Type u} [ordered_semiring α] [nontrivial α] :
0 < 3
theorem three_ne_zero {α : Type u} [ordered_semiring α] [nontrivial α] :
3 0
theorem zero_lt_four {α : Type u} [ordered_semiring α] [nontrivial α] :
0 < 4
theorem four_ne_zero {α : Type u} [ordered_semiring α] [nontrivial α] :
4 0
theorem one_pos {α : Type u} [ordered_semiring α] [nontrivial α] :
0 < 1

Alias of zero_lt_one.

theorem two_pos {α : Type u} [ordered_semiring α] [nontrivial α] :
0 < 2

Alias of zero_lt_two.

theorem three_pos {α : Type u} [ordered_semiring α] [nontrivial α] :
0 < 3

Alias of zero_lt_three.

theorem four_pos {α : Type u} [ordered_semiring α] [nontrivial α] :
0 < 4

Alias of zero_lt_four.

@[protected, instance]
@[protected]
theorem decidable.mul_le_mul_of_nonneg_left {α : Type u} [ordered_semiring α] {a b c : α} [decidable_rel has_le.le] (h₁ : a b) (h₂ : 0 c) :
c * a c * b
@[protected]
theorem decidable.mul_le_mul_of_nonneg_right {α : Type u} [ordered_semiring α] {a b c : α} [decidable_rel has_le.le] (h₁ : a b) (h₂ : 0 c) :
a * c b * c
@[protected]
theorem decidable.mul_le_mul {α : Type u} [ordered_semiring α] {a b c d : α} [decidable_rel has_le.le] (hac : a c) (hbd : b d) (nn_b : 0 b) (nn_c : 0 c) :
a * b c * d
@[protected]
theorem decidable.mul_nonneg_le_one_le {α : Type u_1} [ordered_semiring α] [decidable_rel has_le.le] {a b c : α} (h₁ : 0 c) (h₂ : a c) (h₃ : 0 b) (h₄ : b 1) :
a * b c
@[protected]
theorem decidable.mul_nonneg {α : Type u} [ordered_semiring α] {a b : α} [decidable_rel has_le.le] (ha : 0 a) (hb : 0 b) :
0 a * b
@[simp]
theorem pow_nonneg {α : Type u} [ordered_semiring α] {a : α} (H : 0 a) (n : ) :
0 a ^ n
@[protected]
theorem decidable.mul_nonpos_of_nonneg_of_nonpos {α : Type u} [ordered_semiring α] {a b : α} [decidable_rel has_le.le] (ha : 0 a) (hb : b 0) :
a * b 0
@[protected]
theorem decidable.mul_nonpos_of_nonpos_of_nonneg {α : Type u} [ordered_semiring α] {a b : α} [decidable_rel has_le.le] (ha : a 0) (hb : 0 b) :
a * b 0
@[protected]
theorem decidable.mul_lt_mul {α : Type u} [ordered_semiring α] {a b c d : α} [decidable_rel has_le.le] (hac : a < c) (hbd : b d) (pos_b : 0 < b) (nn_c : 0 c) :
a * b < c * d
theorem mul_lt_mul {α : Type u} [ordered_semiring α] {a b c d : α} :
a < cb d0 < b0 ca * b < c * d
@[protected]
theorem decidable.mul_lt_mul' {α : Type u} [ordered_semiring α] {a b c d : α} [decidable_rel has_le.le] (h1 : a c) (h2 : b < d) (h3 : 0 b) (h4 : 0 < c) :
a * b < c * d
theorem mul_lt_mul' {α : Type u} [ordered_semiring α] {a b c d : α} :
a cb < d0 b0 < ca * b < c * d
@[simp]
theorem pow_pos {α : Type u} [ordered_semiring α] {a : α} (H : 0 < a) (n : ) :
0 < a ^ n
@[protected]
theorem decidable.mul_self_lt_mul_self {α : Type u} [ordered_semiring α] {a b : α} [decidable_rel has_le.le] (h1 : 0 a) (h2 : a < b) :
a * a < b * b
theorem mul_self_lt_mul_self {α : Type u} [ordered_semiring α] {a b : α} (h1 : 0 a) (h2 : a < b) :
a * a < b * b
@[protected]
theorem decidable.strict_mono_on_mul_self {α : Type u} [ordered_semiring α] [decidable_rel has_le.le] :
strict_mono_on (λ (x : α), x * x) (set.Ici 0)
theorem strict_mono_on_mul_self {α : Type u} [ordered_semiring α] :
strict_mono_on (λ (x : α), x * x) (set.Ici 0)
@[protected]
theorem decidable.mul_self_le_mul_self {α : Type u} [ordered_semiring α] {a b : α} [decidable_rel has_le.le] (h1 : 0 a) (h2 : a b) :
a * a b * b
theorem mul_self_le_mul_self {α : Type u} [ordered_semiring α] {a b : α} (h1 : 0 a) (h2 : a b) :
a * a b * b
@[protected]
theorem decidable.mul_lt_mul'' {α : Type u} [ordered_semiring α] {a b c d : α} [decidable_rel has_le.le] (h1 : a < c) (h2 : b < d) (h3 : 0 a) (h4 : 0 b) :
a * b < c * d
theorem mul_lt_mul'' {α : Type u} [ordered_semiring α] {a b c d : α} :
a < cb < d0 a0 ba * b < c * d
@[protected]
theorem decidable.le_mul_of_one_le_right {α : Type u} [ordered_semiring α] {a b : α} [decidable_rel has_le.le] (hb : 0 b) (h : 1 a) :
b b * a
@[protected]
theorem decidable.le_mul_of_one_le_left {α : Type u} [ordered_semiring α] {a b : α} [decidable_rel has_le.le] (hb : 0 b) (h : 1 a) :
b a * b
@[protected]
theorem decidable.lt_mul_of_one_lt_right {α : Type u} [ordered_semiring α] {a b : α} [decidable_rel has_le.le] (hb : 0 < b) (h : 1 < a) :
b < b * a
@[protected]
theorem decidable.lt_mul_of_one_lt_left {α : Type u} [ordered_semiring α] {a b : α} [decidable_rel has_le.le] (hb : 0 < b) (h : 1 < a) :
b < a * b
theorem lt_two_mul_self {α : Type u} [ordered_semiring α] {a : α} (ha : 0 < a) :
a < 2 * a
theorem lt_mul_self {α : Type u} [ordered_semiring α] {a : α} (hn : 1 < a) :
a < a * a
@[protected]
theorem decidable.add_le_mul_two_add {α : Type u} [ordered_semiring α] [decidable_rel has_le.le] {a b : α} (a2 : 2 a) (b0 : 0 b) :
a + (2 + b) a * (2 + b)
theorem add_le_mul_two_add {α : Type u} [ordered_semiring α] {a b : α} :
2 a0 ba + (2 + b) a * (2 + b)
@[protected]
theorem decidable.one_le_mul_of_one_le_of_one_le {α : Type u} [ordered_semiring α] [decidable_rel has_le.le] {a b : α} (a1 : 1 a) (b1 : 1 b) :
1 a * b
theorem one_le_mul_of_one_le_of_one_le {α : Type u} [ordered_semiring α] {a b : α} :
1 a1 b1 a * b
theorem decidable.monotone_mul_left_of_nonneg {α : Type u} [ordered_semiring α] {a : α} [decidable_rel has_le.le] (ha : 0 a) :
monotone (λ (x : α), a * x)
theorem decidable.monotone_mul_right_of_nonneg {α : Type u} [ordered_semiring α] {a : α} [decidable_rel has_le.le] (ha : 0 a) :
monotone (λ (x : α), x * a)
theorem decidable.monotone_mul {α : Type u} [ordered_semiring α] [decidable_rel has_le.le] {β : Type u_1} [preorder β] {f g : β → α} (hf : monotone f) (hg : monotone g) (hf0 : ∀ (x : β), 0 f x) (hg0 : ∀ (x : β), 0 g x) :
monotone (λ (x : β), f x * g x)
theorem decidable.strict_mono_mul_monotone {α : Type u} [ordered_semiring α] {β : Type u_1} [decidable_rel has_le.le] [preorder β] {f g : β → α} (hf : strict_mono f) (hg : monotone g) (hf0 : ∀ (x : β), 0 f x) (hg0 : ∀ (x : β), 0 < g x) :
strict_mono (λ (x : β), f x * g x)
theorem decidable.monotone_mul_strict_mono {α : Type u} [ordered_semiring α] {β : Type u_1} [decidable_rel has_le.le] [preorder β] {f g : β → α} (hf : monotone f) (hg : strict_mono g) (hf0 : ∀ (x : β), 0 < f x) (hg0 : ∀ (x : β), 0 g x) :
strict_mono (λ (x : β), f x * g x)
theorem decidable.strict_mono_mul {α : Type u} [ordered_semiring α] {β : Type u_1} [decidable_rel has_le.le] [preorder β] {f g : β → α} (hf : strict_mono f) (hg : strict_mono g) (hf0 : ∀ (x : β), 0 f x) (hg0 : ∀ (x : β), 0 g x) :
strict_mono (λ (x : β), f x * g x)
theorem monotone_mul_left_of_nonneg {α : Type u} [ordered_semiring α] {a : α} (ha : 0 a) :
monotone (λ (x : α), a * x)
theorem monotone_mul_right_of_nonneg {α : Type u} [ordered_semiring α] {a : α} (ha : 0 a) :
monotone (λ (x : α), x * a)
theorem monotone.mul_const {α : Type u} [ordered_semiring α] {a : α} {β : Type u_1} [preorder β] {f : β → α} (hf : monotone f) (ha : 0 a) :
monotone (λ (x : β), f x * a)
theorem monotone.const_mul {α : Type u} [ordered_semiring α] {a : α} {β : Type u_1} [preorder β] {f : β → α} (hf : monotone f) (ha : 0 a) :
monotone (λ (x : β), a * f x)
theorem monotone.mul {α : Type u} [ordered_semiring α] {β : Type u_1} [preorder β] {f g : β → α} (hf : monotone f) (hg : monotone g) (hf0 : ∀ (x : β), 0 f x) (hg0 : ∀ (x : β), 0 g x) :
monotone (λ (x : β), f x * g x)
theorem strict_mono_mul_left_of_pos {α : Type u} [ordered_semiring α] {a : α} (ha : 0 < a) :
strict_mono (λ (x : α), a * x)
theorem strict_mono_mul_right_of_pos {α : Type u} [ordered_semiring α] {a : α} (ha : 0 < a) :
strict_mono (λ (x : α), x * a)
theorem strict_mono.mul_const {α : Type u} [ordered_semiring α] {a : α} {β : Type u_1} [preorder β] {f : β → α} (hf : strict_mono f) (ha : 0 < a) :
strict_mono (λ (x : β), f x * a)
theorem strict_mono.const_mul {α : Type u} [ordered_semiring α] {a : α} {β : Type u_1} [preorder β] {f : β → α} (hf : strict_mono f) (ha : 0 < a) :
strict_mono (λ (x : β), a * f x)
theorem strict_mono.mul_monotone {α : Type u} [ordered_semiring α] {β : Type u_1} [preorder β] {f g : β → α} (hf : strict_mono f) (hg : monotone g) (hf0 : ∀ (x : β), 0 f x) (hg0 : ∀ (x : β), 0 < g x) :
strict_mono (λ (x : β), f x * g x)
theorem monotone.mul_strict_mono {α : Type u} [ordered_semiring α] {β : Type u_1} [preorder β] {f g : β → α} (hf : monotone f) (hg : strict_mono g) (hf0 : ∀ (x : β), 0 < f x) (hg0 : ∀ (x : β), 0 g x) :
strict_mono (λ (x : β), f x * g x)
theorem strict_mono.mul {α : Type u} [ordered_semiring α] {β : Type u_1} [preorder β] {f g : β → α} (hf : strict_mono f) (hg : strict_mono g) (hf0 : ∀ (x : β), 0 f x) (hg0 : ∀ (x : β), 0 g x) :
strict_mono (λ (x : β), f x * g x)
@[reducible]
def function.injective.ordered_semiring {α : Type u} [ordered_semiring α] {β : Type u_1} [has_zero β] [has_one β] [has_add β] [has_mul β] [has_pow β ] [has_smul β] [has_nat_cast β] (f : β → α) (hf : function.injective f) (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ (x y : β), f (x + y) = f x + f y) (mul : ∀ (x y : β), f (x * y) = f x * f y) (nsmul : ∀ (x : β) (n : ), f (n x) = n f x) (npow : ∀ (x : β) (n : ), f (x ^ n) = f x ^ n) (nat_cast : ∀ (n : ), f n = n) :

Pullback an ordered_semiring under an injective map. See note [reducible non-instances].

Equations
theorem bit1_pos {α : Type u} [ordered_semiring α] {a : α} [nontrivial α] (h : 0 a) :
0 < bit1 a
theorem lt_add_one {α : Type u} [ordered_semiring α] [nontrivial α] (a : α) :
a < a + 1
theorem lt_one_add {α : Type u} [ordered_semiring α] [nontrivial α] (a : α) :
a < 1 + a
theorem bit1_pos' {α : Type u} [ordered_semiring α] {a : α} (h : 0 < a) :
0 < bit1 a
@[protected]
theorem decidable.one_lt_mul {α : Type u} [ordered_semiring α] {a b : α} [decidable_rel has_le.le] (ha : 1 a) (hb : 1 < b) :
1 < a * b
theorem one_lt_mul {α : Type u} [ordered_semiring α] {a b : α} :
1 a1 < b1 < a * b
@[protected]
theorem decidable.mul_le_one {α : Type u} [ordered_semiring α] {a b : α} [decidable_rel has_le.le] (ha : a 1) (hb' : 0 b) (hb : b 1) :
a * b 1
theorem mul_le_one {α : Type u} [ordered_semiring α] {a b : α} :
a 10 bb 1a * b 1
@[protected]
theorem decidable.one_lt_mul_of_le_of_lt {α : Type u} [ordered_semiring α] {a b : α} [decidable_rel has_le.le] (ha : 1 a) (hb : 1 < b) :
1 < a * b
theorem one_lt_mul_of_le_of_lt {α : Type u} [ordered_semiring α] {a b : α} :
1 a1 < b1 < a * b
@[protected]
theorem decidable.one_lt_mul_of_lt_of_le {α : Type u} [ordered_semiring α] {a b : α} [decidable_rel has_le.le] (ha : 1 < a) (hb : 1 b) :
1 < a * b
theorem one_lt_mul_of_lt_of_le {α : Type u} [ordered_semiring α] {a b : α} :
1 < a1 b1 < a * b
@[protected]
theorem decidable.mul_le_of_le_one_right {α : Type u} [ordered_semiring α] {a b : α} [decidable_rel has_le.le] (ha : 0 a) (hb1 : b 1) :
a * b a
@[protected]
theorem decidable.mul_le_of_le_one_left {α : Type u} [ordered_semiring α] {a b : α} [decidable_rel has_le.le] (hb : 0 b) (ha1 : a 1) :
a * b b
@[protected]
theorem decidable.mul_lt_one_of_nonneg_of_lt_one_left {α : Type u} [ordered_semiring α] {a b : α} [decidable_rel has_le.le] (ha0 : 0 a) (ha : a < 1) (hb : b 1) :
a * b < 1
theorem mul_lt_one_of_nonneg_of_lt_one_left {α : Type u} [ordered_semiring α] {a b : α} :
0 aa < 1b 1a * b < 1
@[protected]
theorem decidable.mul_lt_one_of_nonneg_of_lt_one_right {α : Type u} [ordered_semiring α] {a b : α} [decidable_rel has_le.le] (ha : a 1) (hb0 : 0 b) (hb : b < 1) :
a * b < 1
theorem mul_lt_one_of_nonneg_of_lt_one_right {α : Type u} [ordered_semiring α] {a b : α} :
a 10 bb < 1a * b < 1
theorem ordered_semiring.to_char_zero {α : Type u} [ordered_semiring α] [nontrivial α] :

Note this is not an instance as char_zero implies nontrivial, and this would risk forming a loop.

theorem mul_add_mul_le_mul_add_mul {α : Type u} [ordered_semiring α] {a b c d : α} [has_exists_add_of_le α] (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} [ordered_semiring α] {a b c d : α} [has_exists_add_of_le α] (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} [ordered_semiring α] {a b c d : α} [has_exists_add_of_le α] (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} [ordered_semiring α] {a b c d : α} [has_exists_add_of_le α] (hba : b < a) (hdc : d < c) :
a d + b c < a c + b d

Binary rearrangement inequality.

@[instance]
@[class]
structure ordered_comm_semiring (α : Type u) :
Type u

An ordered_comm_semiring α is a commutative semiring α with a partial order such that addition is monotone and multiplication by a positive number is strictly monotone.

Instances of this typeclass
Instances of other typeclasses for ordered_comm_semiring
  • ordered_comm_semiring.has_sizeof_inst
@[reducible]
def function.injective.ordered_comm_semiring {α : Type u} [ordered_comm_semiring α] {β : Type u_1} [has_zero β] [has_one β] [has_add β] [has_mul β] [has_pow β ] [has_smul β] [has_nat_cast β] (f : β → α) (hf : function.injective f) (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ (x y : β), f (x + y) = f x + f y) (mul : ∀ (x y : β), f (x * y) = f x * f y) (nsmul : ∀ (x : β) (n : ), f (n x) = n f x) (npow : ∀ (x : β) (n : ), f (x ^ n) = f x ^ n) (nat_cast : ∀ (n : ), f n = n) :

Pullback an ordered_comm_semiring under an injective map. See note [reducible non-instances].

Equations
@[class]
structure linear_ordered_semiring (α : Type u) :
Type u

A linear_ordered_semiring α is a nontrivial semiring α with a linear order such that addition is monotone and multiplication by a positive number is strictly monotone.

Instances of this typeclass
Instances of other typeclasses for linear_ordered_semiring
  • linear_ordered_semiring.has_sizeof_inst
@[instance]
theorem zero_lt_one' {α : Type u} [linear_ordered_semiring α] :
0 < 1
theorem nonneg_and_nonneg_or_nonpos_and_nonpos_of_mul_nnonneg {α : Type u} [linear_ordered_semiring α] {a b : α} (hab : 0 a * b) :
0 a 0 b a 0 b 0
theorem nonneg_of_mul_nonneg_left {α : Type u} [linear_ordered_semiring α] {a b : α} (h : 0 a * b) (hb : 0 < b) :
0 a
theorem nonneg_of_mul_nonneg_right {α : Type u} [linear_ordered_semiring α] {a b : α} (h : 0 a * b) (ha : 0 < a) :
0 b
theorem neg_of_mul_neg_left {α : Type u} [linear_ordered_semiring α] {a b : α} (h : a * b < 0) (hb : 0 b) :
a < 0
theorem neg_of_mul_neg_right {α : Type u} [linear_ordered_semiring α] {a b : α} (h : a * b < 0) (ha : 0 a) :
b < 0
theorem nonpos_of_mul_nonpos_left {α : Type u} [linear_ordered_semiring α] {a b : α} (h : a * b 0) (hb : 0 < b) :
a 0
theorem nonpos_of_mul_nonpos_right {α : Type u} [linear_ordered_semiring α] {a b : α} (h : a * b 0) (ha : 0 < a) :
b 0
@[simp]
theorem zero_le_mul_left {α : Type u} [linear_ordered_semiring α] {b c : α} (h : 0 < c) :
0 c * b 0 b
@[simp]
theorem zero_le_mul_right {α : Type u} [linear_ordered_semiring α] {b c : α} (h : 0 < c) :
0 b * c 0 b
theorem add_le_mul_of_left_le_right {α : Type u} [linear_ordered_semiring α] {a b : α} (a2 : 2 a) (ab : a b) :
a + b a * b
theorem add_le_mul_of_right_le_left {α : Type u} [linear_ordered_semiring α] {a b : α} (b2 : 2 b) (ba : b a) :
a + b a * b
theorem add_le_mul {α : Type u} [linear_ordered_semiring α] {a b : α} (a2 : 2 a) (b2 : 2 b) :
a + b a * b
theorem add_le_mul' {α : Type u} [linear_ordered_semiring α] {a b : α} (a2 : 2 a) (b2 : 2 b) :
a + b b * a
@[simp]
theorem bit0_le_bit0 {α : Type u} [linear_ordered_semiring α] {a b : α} :
bit0 a bit0 b a b
@[simp]
theorem bit0_lt_bit0 {α : Type u} [linear_ordered_semiring α] {a b : α} :
bit0 a < bit0 b a < b
@[simp]
theorem bit1_le_bit1 {α : Type u} [linear_ordered_semiring α] {a b : α} :
bit1 a bit1 b a b
@[simp]
theorem bit1_lt_bit1 {α : Type u} [linear_ordered_semiring α] {a b : α} :
bit1 a < bit1 b a < b
@[simp]
theorem one_le_bit1 {α : Type u} [linear_ordered_semiring α] {a : α} :
1 bit1 a 0 a
@[simp]
theorem one_lt_bit1 {α : Type u} [linear_ordered_semiring α] {a : α} :
1 < bit1 a 0 < a
@[simp]
theorem zero_le_bit0 {α : Type u} [linear_ordered_semiring α] {a : α} :
0 bit0 a 0 a
@[simp]
theorem zero_lt_bit0 {α : Type u} [linear_ordered_semiring α] {a : α} :
0 < bit0 a 0 < a
theorem mul_nonneg_iff_right_nonneg_of_pos {α : Type u} [linear_ordered_semiring α] {a b : α} (ha : 0 < a) :
0 a * b 0 b
theorem mul_nonneg_iff_left_nonneg_of_pos {α : Type u} [linear_ordered_semiring α] {a b : α} (hb : 0 < b) :
0 a * b 0 a
theorem nonpos_of_mul_nonneg_left {α : Type u} [linear_ordered_semiring α] {a b : α} (h : 0 a * b) (hb : b < 0) :
a 0
theorem nonpos_of_mul_nonneg_right {α : Type u} [linear_ordered_semiring α] {a b : α} (h : 0 a * b) (ha : a < 0) :
b 0
@[reducible]
def function.injective.linear_ordered_semiring {α : Type u} [linear_ordered_semiring α] {β : Type u_1} [has_zero β] [has_one β] [has_add β] [has_mul β] [has_pow β ] [has_smul β] [has_nat_cast β] [has_sup β] [has_inf β] (f : β → α) (hf : function.injective f) (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ (x y : β), f (x + y) = f x + f y) (mul : ∀ (x y : β), f (x * y) = f x * f y) (nsmul : ∀ (x : β) (n : ), f (n x) = n f x) (npow : ∀ (x : β) (n : ), f (x ^ n) = f x ^ n) (nat_cast : ∀ (n : ), f n = n) (hsup : ∀ (x y : β), f (x y) = linear_order.max (f x) (f y)) (hinf : ∀ (x y : β), f (x y) = linear_order.min (f x) (f y)) :

Pullback a linear_ordered_semiring under an injective map. See note [reducible non-instances].

Equations
@[simp]
theorem units.inv_pos {α : Type u} [linear_ordered_semiring α] {u : αˣ} :
@[simp]
theorem units.inv_neg {α : Type u} [linear_ordered_semiring α] {u : αˣ} :
@[protected, instance]
theorem cmp_mul_pos_left {α : Type u} [linear_ordered_semiring α] {a : α} (ha : 0 < a) (b c : α) :
cmp (a * b) (a * c) = cmp b c
theorem cmp_mul_pos_right {α : Type u} [linear_ordered_semiring α] {a : α} (ha : 0 < a) (b c : α) :
cmp (b * a) (c * a) = cmp b c
theorem mul_max_of_nonneg {α : Type u} [linear_ordered_semiring α] {a : α} (b c : α) (ha : 0 a) :
theorem mul_min_of_nonneg {α : Type u} [linear_ordered_semiring α] {a : α} (b c : α) (ha : 0 a) :
theorem max_mul_of_nonneg {α : Type u} [linear_ordered_semiring α] {c : α} (a b : α) (hc : 0 c) :
theorem min_mul_of_nonneg {α : Type u} [linear_ordered_semiring α] {c : α} (a b : α) (hc : 0 c) :
@[class]
structure linear_ordered_comm_semiring (α : Type u_1) :
Type u_1

A linear_ordered_comm_semiring is a nontrivial commutative semiring with a linear order such that addition is monotone and multiplication by a positive number is strictly monotone.

Instances of this typeclass
Instances of other typeclasses for linear_ordered_comm_semiring
  • linear_ordered_comm_semiring.has_sizeof_inst
@[reducible]
def function.injective.linear_ordered_comm_semiring {α : Type u} [linear_ordered_comm_semiring α] {β : Type u_1} [has_zero β] [has_one β] [has_add β] [has_mul β] [has_pow β ] [has_smul β] [has_nat_cast β] [has_sup β] [has_inf β] (f : β → α) (hf : function.injective f) (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ (x y : β), f (x + y) = f x + f y) (mul : ∀ (x y : β), f (x * y) = f x * f y) (nsmul : ∀ (x : β) (n : ), f (n x) = n f x) (npow : ∀ (x : β) (n : ), f (x ^ n) = f x ^ n) (nat_cast : ∀ (n : ), f n = n) (hsup : ∀ (x y : β), f (x y) = linear_order.max (f x) (f y)) (hinf : ∀ (x y : β), f (x y) = linear_order.min (f x) (f y)) :

Pullback a linear_ordered_semiring under an injective map. See note [reducible non-instances].

Equations
@[instance]
@[class]
structure ordered_ring (α : Type u) :
Type u

An ordered_ring α is a ring α with a partial order such that addition is monotone and multiplication by a positive number is strictly monotone.

Instances of this typeclass
Instances of other typeclasses for ordered_ring
  • ordered_ring.has_sizeof_inst
@[instance]
def ordered_ring.to_ring (α : Type u) [self : ordered_ring α] :
ring α
@[protected]
theorem decidable.ordered_ring.mul_nonneg {α : Type u} [ordered_ring α] [decidable_rel has_le.le] {a b : α} (h₁ : 0 a) (h₂ : 0 b) :
0 a * b
theorem ordered_ring.mul_nonneg {α : Type u} [ordered_ring α] {a b : α} :
0 a0 b0 a * b
@[protected]
theorem decidable.ordered_ring.mul_le_mul_of_nonneg_left {α : Type u} [ordered_ring α] {a b c : α} [decidable_rel has_le.le] (h₁ : a b) (h₂ : 0 c) :
c * a c * b
theorem ordered_ring.mul_le_mul_of_nonneg_left {α : Type u} [ordered_ring α] {a b c : α} :
a b0 cc * a c * b
@[protected]
theorem decidable.ordered_ring.mul_le_mul_of_nonneg_right {α : Type u} [ordered_ring α] {a b c : α} [decidable_rel has_le.le] (h₁ : a b) (h₂ : 0 c) :
a * c b * c
theorem ordered_ring.mul_le_mul_of_nonneg_right {α : Type u} [ordered_ring α] {a b c : α} :
a b0 ca * c b * c
theorem ordered_ring.mul_lt_mul_of_pos_left {α : Type u} [ordered_ring α] {a b c : α} (h₁ : a < b) (h₂ : 0 < c) :
c * a < c * b
theorem ordered_ring.mul_lt_mul_of_pos_right {α : Type u} [ordered_ring α] {a b c : α} (h₁ : a < b) (h₂ : 0 < c) :
a * c < b * c
@[protected]
theorem decidable.mul_le_mul_of_nonpos_left {α : Type u} [ordered_ring α] [decidable_rel has_le.le] {a b c : α} (h : b a) (hc : c 0) :
c * a c * b
theorem mul_le_mul_of_nonpos_left {α : Type u} [ordered_ring α] {a b c : α} :
b ac 0c * a c * b
@[protected]
theorem decidable.mul_le_mul_of_nonpos_right {α : Type u} [ordered_ring α] [decidable_rel has_le.le] {a b c : α} (h : b a) (hc : c 0) :
a * c b * c
theorem mul_le_mul_of_nonpos_right {α : Type u} [ordered_ring α] {a b c : α} :
b ac 0a * c b * c
@[protected]
theorem decidable.mul_nonneg_of_nonpos_of_nonpos {α : Type u} [ordered_ring α] [decidable_rel has_le.le] {a b : α} (ha : a 0) (hb : b 0) :
0 a * b
theorem mul_nonneg_of_nonpos_of_nonpos {α : Type u} [ordered_ring α] {a b : α} :
a 0b 00 a * b
theorem mul_lt_mul_of_neg_left {α : Type u} [ordered_ring α] {a b c : α} (h : b < a) (hc : c < 0) :
c * a < c * b
theorem mul_lt_mul_of_neg_right {α : Type u} [ordered_ring α] {a b c : α} (h : b < a) (hc : c < 0) :
a * c < b * c
theorem mul_pos_of_neg_of_neg {α : Type u} [ordered_ring α] {a b : α} (ha : a < 0) (hb : b < 0) :
0 < a * b
theorem decidable.antitone_mul_left {α : Type u} [ordered_ring α] [decidable_rel has_le.le] {a : α} (ha : a 0) :
theorem antitone_mul_left {α : Type u} [ordered_ring α] {a : α} (ha : a 0) :
theorem decidable.antitone_mul_right {α : Type u} [ordered_ring α] [decidable_rel has_le.le] {a : α} (ha : a 0) :
antitone (λ (x : α), x * a)
theorem antitone_mul_right {α : Type u} [ordered_ring α] {a : α} (ha : a 0) :
antitone (λ (x : α), x * a)
theorem strict_anti_mul_left {α : Type u} [ordered_ring α] {a : α} (ha : a < 0) :
theorem strict_anti_mul_right {α : Type u} [ordered_ring α] {a : α} (ha : a < 0) :
strict_anti (λ (x : α), x * a)
@[reducible]
def function.injective.ordered_ring {α : Type u} [ordered_ring α] {β : Type u_1} [has_zero β] [has_one β] [has_add β] [has_mul β] [has_neg β] [has_sub β] [has_smul β] [has_smul β] [has_pow β ] [has_nat_cast β] [has_int_cast β] (f : β → α) (hf : function.injective f) (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ (x y : β), f (x + y) = f x + f y) (mul : ∀ (x y : β), f (x * y) = f x * f y) (neg : ∀ (x : β), f (-x) = -f x) (sub : ∀ (x y : β), f (x - y) = f x - f y) (nsmul : ∀ (x : β) (n : ), f (n x) = n f x) (zsmul : ∀ (x : β) (n : ), f (n x) = n f x) (npow : ∀ (x : β) (n : ), f (x ^ n) = f x ^ n) (nat_cast : ∀ (n : ), f n = n) (int_cast : ∀ (n : ), f n = n) :

Pullback an ordered_ring under an injective map. See note [reducible non-instances].

Equations
theorem le_iff_exists_nonneg_add {α : Type u} [ordered_ring α] (a b : α) :
a b ∃ (c : α) (H : c 0), b = a + c
@[instance]
def ordered_comm_ring.to_comm_ring (α : Type u) [self : ordered_comm_ring α] :
@[instance]
@[class]
structure ordered_comm_ring (α : Type u) :
Type u

An ordered_comm_ring α is a commutative ring α with a partial order such that addition is monotone and multiplication by a positive number is strictly monotone.

Instances of this typeclass
Instances of other typeclasses for ordered_comm_ring
  • ordered_comm_ring.has_sizeof_inst
@[reducible]
def function.injective.ordered_comm_ring {α : Type u} [ordered_comm_ring α] {β : Type u_1} [has_zero β] [has_one β] [has_add β] [has_mul β] [has_neg β] [has_sub β] [has_pow β ] [has_smul β] [has_smul β] [has_nat_cast β] [has_int_cast β] (f : β → α) (hf : function.injective f) (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ (x y : β), f (x + y) = f x + f y) (mul : ∀ (x y : β), f (x * y) = f x * f y) (neg : ∀ (x : β), f (-x) = -f x) (sub : ∀ (x y : β), f (x - y) = f x - f y) (nsmul : ∀ (x : β) (n : ), f (n x) = n f x) (zsmul : ∀ (x : β) (n : ), f (n x) = n f x) (npow : ∀ (x : β) (n : ), f (x ^ n) = f x ^ n) (nat_cast : ∀ (n : ), f n = n) (int_cast : ∀ (n : ), f n = n) :

Pullback an ordered_comm_ring under an injective map. See note [reducible non-instances].

Equations
@[instance]
@[instance]
@[class]
structure linear_ordered_ring (α : Type u) :
Type u

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

Instances of this typeclass
Instances of other typeclasses for linear_ordered_ring
  • linear_ordered_ring.has_sizeof_inst
@[instance]
theorem le_of_mul_le_of_one_le {α : Type u} [linear_ordered_semiring α] {a b c : α} (h : a * c b) (hb : 0 b) (hc : 1 c) :
a b
theorem nonneg_le_nonneg_of_sq_le_sq {α : Type u} [linear_ordered_semiring α] {a b : α} (hb : 0 b) (h : a * a b * b) :
a b
theorem mul_self_le_mul_self_iff {α : Type u} [linear_ordered_semiring α] {a b : α} (h1 : 0 a) (h2 : 0 b) :
a b a * a b * b
theorem mul_self_lt_mul_self_iff {α : Type u} [linear_ordered_semiring α] {a b : α} (h1 : 0 a) (h2 : 0 b) :
a < b a * a < b * b
theorem mul_self_inj {α : Type u} [linear_ordered_semiring α] {a b : α} (h1 : 0 a) (h2 : 0 b) :
a * a = b * b a = b
@[protected, instance]
@[simp]
theorem abs_one {α : Type u} [linear_ordered_ring α] :
|1| = 1
@[simp]
theorem abs_two {α : Type u} [linear_ordered_ring α] :
|2| = 2
theorem abs_mul {α : Type u} [linear_ordered_ring α] (a b : α) :
|a * b| = |a| * |b|
def abs_hom {α : Type u} [linear_ordered_ring α] :
α →*₀ α

abs as a monoid_with_zero_hom.

Equations
@[simp]
theorem abs_mul_abs_self {α : Type u} [linear_ordered_ring α] (a : α) :
|a| * |a| = a * a
@[simp]
theorem abs_mul_self {α : Type u} [linear_ordered_ring α] (a : α) :
|a * a| = a * a
theorem mul_pos_iff {α : Type u} [linear_ordered_ring α] {a b : α} :
0 < a * b 0 < a 0 < b a < 0 b < 0
theorem mul_neg_iff {α : Type u} [linear_ordered_ring α] {a b : α} :
a * b < 0 0 < a b < 0 a < 0 0 < b
theorem mul_nonneg_iff {α : Type u} [linear_ordered_ring α] {a b : α} :
0 a * b 0 a 0 b a 0 b 0
theorem mul_nonneg_of_three {α : Type u} [linear_ordered_ring α] (a b c : α) :
0 a * b 0 b * c 0 c * a

Out of three elements of a linear_ordered_ring, two must have the same sign.

theorem mul_nonpos_iff {α : Type u} [linear_ordered_ring α] {a b : α} :
a * b 0 0 a b 0 a 0 0 b
theorem mul_self_nonneg {α : Type u} [linear_ordered_ring α] (a : α) :
0 a * a
@[simp]
theorem neg_le_self_iff {α : Type u} [linear_ordered_ring α] {a : α} :
-a a 0 a
@[simp]
theorem neg_lt_self_iff {α : Type u} [linear_ordered_ring α] {a : α} :
-a < a 0 < a
@[simp]
theorem le_neg_self_iff {α : Type u} [linear_ordered_ring α] {a : α} :
a -a a 0
@[simp]
theorem lt_neg_self_iff {α : Type u} [linear_ordered_ring α] {a : α} :
a < -a a < 0
@[simp]
theorem abs_eq_self {α : Type u} [linear_ordered_ring α] {a : α} :
|a| = a 0 a
@[simp]
theorem abs_eq_neg_self {α : Type u} [linear_ordered_ring α] {a : α} :
|a| = -a a 0
theorem abs_cases {α : Type u} [linear_ordered_ring α] (a : α) :
|a| = a 0 a |a| = -a a < 0

For an element a of a linear ordered ring, either abs a = a and 0 ≤ a, or abs a = -a and a < 0. Use cases on this lemma to automate linarith in inequalities

@[simp]
theorem gt_of_mul_lt_mul_neg_left {α : Type u} [linear_ordered_ring α] {a b c : α} (h : c * a < c * b) (hc : c 0) :
b < a
theorem neg_one_lt_zero {α : Type u} [linear_ordered_ring α] :
-1 < 0
@[simp]
theorem mul_le_mul_left_of_neg {α : Type u} [linear_ordered_ring α] {a b c : α} (h : c < 0) :
c * a c * b b a
@[simp]
theorem mul_le_mul_right_of_neg {α : Type u} [linear_ordered_ring α] {a b c : α} (h : c < 0) :
a * c b * c b a
@[simp]
theorem mul_lt_mul_left_of_neg {α : Type u} [linear_ordered_ring α] {a b c : α} (h : c < 0) :
c * a < c * b b < a
@[simp]
theorem mul_lt_mul_right_of_neg {α : Type u} [linear_ordered_ring α] {a b c : α} (h : c < 0) :
a * c < b * c b < a
theorem lt_of_mul_lt_mul_of_nonpos_left {α : Type u} [linear_ordered_ring α] {a b c : α} (h : c * a < c * b) (hc : c 0) :
b < a
theorem lt_of_mul_lt_mul_of_nonpos_right {α : Type u} [linear_ordered_ring α] {a b c : α} (h : a * c < b * c) (hc : c 0) :
b < a
theorem cmp_mul_neg_left {α : Type u} [linear_ordered_ring α] {a : α} (ha : a < 0) (b c : α) :
cmp (a * b) (a * c) = cmp c b
theorem cmp_mul_neg_right {α : Type u} [linear_ordered_ring α] {a : α} (ha : a < 0) (b c : α) :
cmp (b * a) (c * a) = cmp c b
theorem sub_one_lt {α : Type u} [linear_ordered_ring α] (a : α) :
a - 1 < a
@[simp]
theorem mul_self_pos {α : Type u} [linear_ordered_ring α] {a : α} :
0 < a * a a 0
theorem mul_self_le_mul_self_of_le_of_neg_le {α : Type u} [linear_ordered_ring α] {x y : α} (h₁ : x y) (h₂ : -x y) :
x * x y * y
theorem nonneg_of_mul_nonpos_left {α : Type u} [linear_ordered_ring α] {a b : α} (h : a * b 0) (hb : b < 0) :
0 a
theorem nonneg_of_mul_nonpos_right {α : Type u} [linear_ordered_ring α] {a b : α} (h : a * b 0) (ha : a < 0) :
0 b
theorem pos_of_mul_neg_left {α : Type u} [linear_ordered_ring α] {a b : α} (h : a * b < 0) (hb : b 0) :
0 < a
theorem pos_of_mul_neg_right {α : Type u} [linear_ordered_ring α] {a b : α} (h : a * b < 0) (ha : a 0) :
0 < b
theorem neg_iff_pos_of_mul_neg {α : Type u} [linear_ordered_ring α] {a b : α} (hab : a * b < 0) :
a < 0 0 < b
theorem pos_iff_neg_of_mul_neg {α : Type u} [linear_ordered_ring α] {a b : α} (hab : a * b < 0) :
0 < a b < 0
theorem mul_self_add_mul_self_eq_zero {α : Type u} [linear_ordered_ring α] {x y : α} :
x * x + y * y = 0 x = 0 y = 0

The sum of two squares is zero iff both elements are zero.

theorem eq_zero_of_mul_self_add_mul_self_eq_zero {α : Type u} [linear_ordered_ring α] {a b : α} (h : a * a + b * b = 0) :
a = 0
theorem abs_eq_iff_mul_self_eq {α : Type u} [linear_ordered_ring α] {a b : α} :
|a| = |b| a * a = b * b
theorem abs_lt_iff_mul_self_lt {α : Type u} [linear_ordered_ring α] {a b : α} :
|a| < |b| a * a < b * b
theorem abs_le_iff_mul_self_le {α : Type u} [linear_ordered_ring α] {a b : α} :
|a| |b| a * a b * b
theorem abs_le_one_iff_mul_self_le_one {α : Type u} [linear_ordered_ring α] {a : α} :
|a| 1 a * a 1
@[reducible]
def function.injective.linear_ordered_ring {α : Type u} [linear_ordered_ring α] {β : Type u_1} [has_zero β] [has_one β] [has_add β] [has_mul β] [has_neg β] [has_sub β] [has_smul β] [has_smul β] [has_pow β ] [has_nat_cast β] [has_int_cast β] [has_sup β] [has_inf β] (f : β → α) (hf : function.injective f) (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ (x y : β), f (x + y) = f x + f y) (mul : ∀ (x y : β), f (x * y) = f x * f y) (neg : ∀ (x : β), f (-x) = -f x) (sub : ∀ (x y : β), f (x - y) = f x - f y) (nsmul : ∀ (x : β) (n : ), f (n x) = n f x) (zsmul : ∀ (x : β) (n : ), f (n x) = n f x) (npow : ∀ (x : β) (n : ), f (x ^ n) = f x ^ n) (nat_cast : ∀ (n : ), f n = n) (int_cast : ∀ (n : ), f n = n) (hsup : ∀ (x y : β), f (x y) = linear_order.max (f x) (f y)) (hinf : ∀ (x y : β), f (x y) = linear_order.min (f x) (f y)) :

Pullback a linear_ordered_ring under an injective map. See note [reducible non-instances].

Equations
@[class]
structure linear_ordered_comm_ring (α : Type u) :
Type u

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

Instances of this typeclass
Instances of other typeclasses for linear_ordered_comm_ring
  • linear_ordered_comm_ring.has_sizeof_inst
theorem max_mul_mul_le_max_mul_max {α : Type u} [linear_ordered_comm_ring α] {a d : α} (b c : α) (ha : 0 a) (hd : 0 d) :
theorem abs_sub_sq {α : Type u} [linear_ordered_comm_ring α] (a b : α) :
|a - b| * |a - b| = a * a + b * b - (1 + 1) * a * b
@[simp]
theorem abs_dvd {α : Type u} [ring α] [linear_order α] (a b : α) :
|a| b a b
theorem abs_dvd_self {α : Type u} [ring α] [linear_order α] (a : α) :
|a| a
@[simp]
theorem dvd_abs {α : Type u} [ring α] [linear_order α] (a b : α) :
a |b| a b
theorem self_dvd_abs {α : Type u} [ring α] [linear_order α] (a : α) :
a |a|
theorem abs_dvd_abs {α : Type u} [ring α] [linear_order α] (a b : α) :
|a| |b| a b
@[reducible]
def function.injective.linear_ordered_comm_ring {α : Type u} [linear_ordered_comm_ring α] {β : Type u_1} [has_zero β] [has_one β] [has_add β] [has_mul β] [has_neg β] [has_sub β] [has_pow β ] [has_smul β] [has_smul β] [has_nat_cast β] [has_int_cast β] [has_sup β] [has_inf β] (f : β → α) (hf : function.injective f) (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ (x y : β), f (x + y) = f x + f y) (mul : ∀ (x y : β), f (x * y) = f x * f y) (neg : ∀ (x : β), f (-x) = -f x) (sub : ∀ (x y : β), f (x - y) = f x - f y) (nsmul : ∀ (x : β) (n : ), f (n x) = n f x) (zsmul : ∀ (x : β) (n : ), f (n x) = n f x) (npow : ∀ (x : β) (n : ), f (x ^ n) = f x ^ n) (nat_cast : ∀ (n : ), f n = n) (int_cast : ∀ (n : ), f n = n) (hsup : ∀ (x y : β), f (x y) = linear_order.max (f x) (f y)) (hinf : ∀ (x y : β), f (x y) = linear_order.min (f x) (f y)) :

Pullback a linear_ordered_comm_ring under an injective map. See note [reducible non-instances].

Equations

Forget that a positive cone in a ring respects the multiplicative structure.

@[nolint]
structure ring.positive_cone (α : Type u_1) [ring α] :
Type u_1
  • nonneg : α → Prop
  • pos : α → Prop
  • pos_iff : (∀ (a : α), self.pos a self.nonneg a ¬self.nonneg (-a)) . "order_laws_tac"
  • zero_nonneg : self.nonneg 0
  • add_nonneg : ∀ {a b : α}, self.nonneg aself.nonneg bself.nonneg (a + b)
  • nonneg_antisymm : ∀ {a : α}, self.nonneg aself.nonneg (-a)a = 0
  • one_nonneg : self.nonneg 1
  • mul_pos : ∀ (a b : α), self.pos aself.pos bself.pos (a * b)

A positive cone in a ring consists of a positive cone in underlying add_comm_group, which contains 1 and such that the positive elements are closed under multiplication.

Instances for ring.positive_cone
  • ring.positive_cone.has_sizeof_inst
@[nolint]
structure ring.total_positive_cone (α : Type u_1) [ring α] :
Type u_1

A positive cone in a ring induces a linear order if 1 is a positive element.

Instances for ring.total_positive_cone
  • ring.total_positive_cone.has_sizeof_inst

Forget that a total_positive_cone in a ring respects the multiplicative structure.

Forget that a total_positive_cone in a ring is total.

Construct a linear_ordered_ring by designating a positive cone in an existing ring.

Equations