Documentation

Mathlib.Algebra.Order.Ring.Unbundled.Basic

Basic facts for ordered rings and semirings #

This file develops the basics of ordered (semi)rings in an unbundled fashion for later use with the bundled classes from Algebra.Order.Ring.Defs.

The set of typeclass variables here comprises

For short,

Typeclasses found in Algebra.Order.Ring.Defs #

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.

Generality #

Each section is labelled with a corresponding bundled ordered ring typeclass in mind. Mixin's for relating the order structures and ring structures are added as needed.

TODO: the mixin assumptiosn can be relaxed in most cases

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

theorem add_one_le_two_mul {α : Type u} [LE α] [Semiring α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] {a : α} (a1 : 1 a) :
a + 1 2 * a
theorem add_le_mul_two_add {α : Type u} [Semiring α] [Preorder α] {a : α} {b : α} [ZeroLEOneClass α] [MulPosMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (a2 : 2 a) (b0 : 0 b) :
a + (2 + b) a * (2 + b)
theorem mul_le_mul_of_nonpos_left {α : Type u} [Semiring α] [Preorder α] {a : α} {b : α} {c : α} [ExistsAddOfLE α] [PosMulMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (h : b a) (hc : c 0) :
c * a c * b
theorem mul_le_mul_of_nonpos_right {α : Type u} [Semiring α] [Preorder α] {a : α} {b : α} {c : α} [ExistsAddOfLE α] [MulPosMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (h : b a) (hc : c 0) :
a * c b * c
theorem mul_nonneg_of_nonpos_of_nonpos {α : Type u} [Semiring α] [Preorder α] {a : α} {b : α} [ExistsAddOfLE α] [MulPosMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (ha : a 0) (hb : b 0) :
0 a * b
theorem mul_le_mul_of_nonneg_of_nonpos {α : Type u} [Semiring α] [Preorder α] {a : α} {b : α} {c : α} {d : α} [ExistsAddOfLE α] [MulPosMono α] [PosMulMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (hca : c a) (hbd : b d) (hc : 0 c) (hb : b 0) :
a * b c * d
theorem mul_le_mul_of_nonneg_of_nonpos' {α : Type u} [Semiring α] [Preorder α] {a : α} {b : α} {c : α} {d : α} [ExistsAddOfLE α] [PosMulMono α] [MulPosMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (hca : c a) (hbd : b d) (ha : 0 a) (hd : d 0) :
a * b c * d
theorem mul_le_mul_of_nonpos_of_nonneg {α : Type u} [Semiring α] [Preorder α] {a : α} {b : α} {c : α} {d : α} [ExistsAddOfLE α] [MulPosMono α] [PosMulMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (hac : a c) (hdb : d b) (hc : c 0) (hb : 0 b) :
a * b c * d
theorem mul_le_mul_of_nonpos_of_nonneg' {α : Type u} [Semiring α] [Preorder α] {a : α} {b : α} {c : α} {d : α} [ExistsAddOfLE α] [PosMulMono α] [MulPosMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (hca : c a) (hbd : b d) (ha : 0 a) (hd : d 0) :
a * b c * d
theorem mul_le_mul_of_nonpos_of_nonpos {α : Type u} [Semiring α] [Preorder α] {a : α} {b : α} {c : α} {d : α} [ExistsAddOfLE α] [MulPosMono α] [PosMulMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (hca : c a) (hdb : d b) (hc : c 0) (hb : b 0) :
a * b c * d
theorem mul_le_mul_of_nonpos_of_nonpos' {α : Type u} [Semiring α] [Preorder α] {a : α} {b : α} {c : α} {d : α} [ExistsAddOfLE α] [PosMulMono α] [MulPosMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (hca : c a) (hdb : d b) (ha : a 0) (hd : d 0) :
a * b c * d
theorem le_mul_of_le_one_left {α : Type u} [Semiring α] [Preorder α] {a : α} {b : α} [ExistsAddOfLE α] [MulPosMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (hb : b 0) (h : a 1) :
b a * b

Variant of mul_le_of_le_one_left for b non-positive instead of non-negative.

theorem mul_le_of_one_le_left {α : Type u} [Semiring α] [Preorder α] {a : α} {b : α} [ExistsAddOfLE α] [MulPosMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (hb : b 0) (h : 1 a) :
a * b b

Variant of le_mul_of_one_le_left for b non-positive instead of non-negative.

theorem le_mul_of_le_one_right {α : Type u} [Semiring α] [Preorder α] {a : α} {b : α} [ExistsAddOfLE α] [PosMulMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (ha : a 0) (h : b 1) :
a a * b

Variant of mul_le_of_le_one_right for a non-positive instead of non-negative.

theorem mul_le_of_one_le_right {α : Type u} [Semiring α] [Preorder α] {a : α} {b : α} [ExistsAddOfLE α] [PosMulMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (ha : a 0) (h : 1 b) :
a * b a

Variant of le_mul_of_one_le_right for a non-positive instead of non-negative.

theorem antitone_mul_left {α : Type u} [Semiring α] [Preorder α] [ExistsAddOfLE α] [PosMulMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] {a : α} (ha : a 0) :
Antitone fun (x : α) => a * x
theorem antitone_mul_right {α : Type u} [Semiring α] [Preorder α] [ExistsAddOfLE α] [MulPosMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] {a : α} (ha : a 0) :
Antitone fun (x : α) => x * a
theorem Monotone.const_mul_of_nonpos {α : Type u} {β : Type u_1} [Semiring α] [Preorder α] {a : α} [Preorder β] {f : βα} [ExistsAddOfLE α] [PosMulMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (hf : Monotone f) (ha : a 0) :
Antitone fun (x : β) => a * f x
theorem Monotone.mul_const_of_nonpos {α : Type u} {β : Type u_1} [Semiring α] [Preorder α] {a : α} [Preorder β] {f : βα} [ExistsAddOfLE α] [MulPosMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (hf : Monotone f) (ha : a 0) :
Antitone fun (x : β) => f x * a
theorem Antitone.const_mul_of_nonpos {α : Type u} {β : Type u_1} [Semiring α] [Preorder α] {a : α} [Preorder β] {f : βα} [ExistsAddOfLE α] [PosMulMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (hf : Antitone f) (ha : a 0) :
Monotone fun (x : β) => a * f x
theorem Antitone.mul_const_of_nonpos {α : Type u} {β : Type u_1} [Semiring α] [Preorder α] {a : α} [Preorder β] {f : βα} [ExistsAddOfLE α] [MulPosMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (hf : Antitone f) (ha : a 0) :
Monotone fun (x : β) => f x * a
theorem Antitone.mul_monotone {α : Type u} {β : Type u_1} [Semiring α] [Preorder α] [Preorder β] {f : βα} {g : βα} [ExistsAddOfLE α] [PosMulMono α] [MulPosMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (hf : Antitone f) (hg : Monotone g) (hf₀ : ∀ (x : β), f x 0) (hg₀ : ∀ (x : β), 0 g x) :
Antitone (f * g)
theorem Monotone.mul_antitone {α : Type u} {β : Type u_1} [Semiring α] [Preorder α] [Preorder β] {f : βα} {g : βα} [ExistsAddOfLE α] [PosMulMono α] [MulPosMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (hf : Monotone f) (hg : Antitone g) (hf₀ : ∀ (x : β), 0 f x) (hg₀ : ∀ (x : β), g x 0) :
Antitone (f * g)
theorem Antitone.mul {α : Type u} {β : Type u_1} [Semiring α] [Preorder α] [Preorder β] {f : βα} {g : βα} [ExistsAddOfLE α] [PosMulMono α] [MulPosMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (hf : Antitone f) (hg : Antitone g) (hf₀ : ∀ (x : β), f x 0) (hg₀ : ∀ (x : β), g x 0) :
Monotone (f * g)
theorem lt_two_mul_self {α : Type u} [Semiring α] [PartialOrder α] {a : α} [ZeroLEOneClass α] [MulPosStrictMono α] [NeZero 1] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] (ha : 0 < a) :
a < 2 * a
theorem mul_lt_mul_of_neg_left {α : Type u} [Semiring α] [PartialOrder α] {a : α} {b : α} {c : α} [ExistsAddOfLE α] [PosMulStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] (h : b < a) (hc : c < 0) :
c * a < c * b
theorem mul_lt_mul_of_neg_right {α : Type u} [Semiring α] [PartialOrder α] {a : α} {b : α} {c : α} [ExistsAddOfLE α] [MulPosStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] (h : b < a) (hc : c < 0) :
a * c < b * c
theorem mul_pos_of_neg_of_neg {α : Type u} [Semiring α] [PartialOrder α] [ExistsAddOfLE α] [MulPosStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] {a : α} {b : α} (ha : a < 0) (hb : b < 0) :
0 < a * b
theorem lt_mul_of_lt_one_left {α : Type u} [Semiring α] [PartialOrder α] {a : α} {b : α} [ExistsAddOfLE α] [MulPosStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] (hb : b < 0) (h : a < 1) :
b < a * b

Variant of mul_lt_of_lt_one_left for b negative instead of positive.

theorem mul_lt_of_one_lt_left {α : Type u} [Semiring α] [PartialOrder α] {a : α} {b : α} [ExistsAddOfLE α] [MulPosStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] (hb : b < 0) (h : 1 < a) :
a * b < b

Variant of lt_mul_of_one_lt_left for b negative instead of positive.

theorem lt_mul_of_lt_one_right {α : Type u} [Semiring α] [PartialOrder α] {a : α} {b : α} [ExistsAddOfLE α] [PosMulStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] (ha : a < 0) (h : b < 1) :
a < a * b

Variant of mul_lt_of_lt_one_right for a negative instead of positive.

theorem mul_lt_of_one_lt_right {α : Type u} [Semiring α] [PartialOrder α] {a : α} {b : α} [ExistsAddOfLE α] [PosMulStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] (ha : a < 0) (h : 1 < b) :
a * b < a

Variant of lt_mul_of_lt_one_right for a negative instead of positive.

theorem strictAnti_mul_left {α : Type u} [Semiring α] [PartialOrder α] [ExistsAddOfLE α] [PosMulStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] {a : α} (ha : a < 0) :
StrictAnti fun (x : α) => a * x
theorem strictAnti_mul_right {α : Type u} [Semiring α] [PartialOrder α] [ExistsAddOfLE α] [MulPosStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] {a : α} (ha : a < 0) :
StrictAnti fun (x : α) => x * a
theorem StrictMono.const_mul_of_neg {α : Type u} {β : Type u_1} [Semiring α] [PartialOrder α] {a : α} [Preorder β] {f : βα} [ExistsAddOfLE α] [PosMulStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] (hf : StrictMono f) (ha : a < 0) :
StrictAnti fun (x : β) => a * f x
theorem StrictMono.mul_const_of_neg {α : Type u} {β : Type u_1} [Semiring α] [PartialOrder α] {a : α} [Preorder β] {f : βα} [ExistsAddOfLE α] [MulPosStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] (hf : StrictMono f) (ha : a < 0) :
StrictAnti fun (x : β) => f x * a
theorem StrictAnti.const_mul_of_neg {α : Type u} {β : Type u_1} [Semiring α] [PartialOrder α] {a : α} [Preorder β] {f : βα} [ExistsAddOfLE α] [PosMulStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] (hf : StrictAnti f) (ha : a < 0) :
StrictMono fun (x : β) => a * f x
theorem StrictAnti.mul_const_of_neg {α : Type u} {β : Type u_1} [Semiring α] [PartialOrder α] {a : α} [Preorder β] {f : βα} [ExistsAddOfLE α] [MulPosStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] (hf : StrictAnti f) (ha : a < 0) :
StrictMono fun (x : β) => f x * a
theorem mul_add_mul_le_mul_add_mul {α : Type u} [Semiring α] [PartialOrder α] {a : α} {b : α} {c : α} {d : α} [ExistsAddOfLE α] [MulPosMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (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} [Semiring α] [PartialOrder α] {a : α} {b : α} {c : α} {d : α} [ExistsAddOfLE α] [MulPosMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (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} [Semiring α] [PartialOrder α] {a : α} {b : α} {c : α} {d : α} [ContravariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ExistsAddOfLE α] [MulPosStrictMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] (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} [Semiring α] [PartialOrder α] {a : α} {b : α} {c : α} {d : α} [ContravariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ExistsAddOfLE α] [MulPosStrictMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] (hba : b < a) (hdc : d < c) :
a * d + b * c < a * c + b * d

Binary rearrangement inequality.

theorem nonneg_and_nonneg_or_nonpos_and_nonpos_of_mul_nonneg {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [MulPosStrictMono α] [PosMulStrictMono α] (hab : 0 a * b) :
0 a 0 b a 0 b 0
theorem nonneg_of_mul_nonneg_left {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [MulPosStrictMono α] (h : 0 a * b) (hb : 0 < b) :
0 a
theorem nonneg_of_mul_nonneg_right {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [PosMulStrictMono α] (h : 0 a * b) (ha : 0 < a) :
0 b
theorem nonpos_of_mul_nonpos_left {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [PosMulStrictMono α] (h : a * b 0) (hb : 0 < b) :
a 0
theorem nonpos_of_mul_nonpos_right {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [PosMulStrictMono α] (h : a * b 0) (ha : 0 < a) :
b 0
@[simp]
theorem mul_nonneg_iff_of_pos_left {α : Type u} [Semiring α] [LinearOrder α] {b : α} {c : α} [PosMulStrictMono α] (h : 0 < c) :
0 c * b 0 b
@[simp]
theorem mul_nonneg_iff_of_pos_right {α : Type u} [Semiring α] [LinearOrder α] {b : α} {c : α} [MulPosStrictMono α] (h : 0 < c) :
0 b * c 0 b
theorem add_le_mul_of_left_le_right {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [ZeroLEOneClass α] [NeZero 1] [MulPosStrictMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (a2 : 2 a) (ab : a b) :
a + b a * b
theorem add_le_mul_of_right_le_left {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [ZeroLEOneClass α] [NeZero 1] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [PosMulStrictMono α] (b2 : 2 b) (ba : b a) :
a + b a * b
theorem add_le_mul {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [ZeroLEOneClass α] [NeZero 1] [MulPosStrictMono α] [PosMulStrictMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (a2 : 2 a) (b2 : 2 b) :
a + b a * b
theorem add_le_mul' {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [ZeroLEOneClass α] [NeZero 1] [MulPosStrictMono α] [PosMulStrictMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (a2 : 2 a) (b2 : 2 b) :
a + b b * a
theorem mul_nonneg_iff_right_nonneg_of_pos {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [PosMulStrictMono α] (ha : 0 < a) :
0 a * b 0 b
theorem mul_nonneg_iff_left_nonneg_of_pos {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [PosMulStrictMono α] [MulPosStrictMono α] (hb : 0 < b) :
0 a * b 0 a
theorem nonpos_of_mul_nonneg_left {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [PosMulStrictMono α] (h : 0 a * b) (hb : b < 0) :
a 0
theorem nonpos_of_mul_nonneg_right {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [MulPosStrictMono α] (h : 0 a * b) (ha : a < 0) :
b 0
@[simp]
theorem Units.inv_pos {α : Type u} [Semiring α] [LinearOrder α] [ZeroLEOneClass α] [NeZero 1] [PosMulStrictMono α] {u : αˣ} :
0 < u⁻¹ 0 < u
@[simp]
theorem Units.inv_neg {α : Type u} [Semiring α] [LinearOrder α] [ZeroLEOneClass α] [NeZero 1] [MulPosMono α] [PosMulMono α] {u : αˣ} :
u⁻¹ < 0 u < 0
theorem cmp_mul_pos_left {α : Type u} [Semiring α] [LinearOrder α] {a : α} [PosMulStrictMono α] (ha : 0 < a) (b : α) (c : α) :
cmp (a * b) (a * c) = cmp b c
theorem cmp_mul_pos_right {α : Type u} [Semiring α] [LinearOrder α] {a : α} [MulPosStrictMono α] (ha : 0 < a) (b : α) (c : α) :
cmp (b * a) (c * a) = cmp b c
theorem mul_max_of_nonneg {α : Type u} [Semiring α] [LinearOrder α] {a : α} [PosMulMono α] (b : α) (c : α) (ha : 0 a) :
a * max b c = max (a * b) (a * c)
theorem mul_min_of_nonneg {α : Type u} [Semiring α] [LinearOrder α] {a : α} [PosMulMono α] (b : α) (c : α) (ha : 0 a) :
a * min b c = min (a * b) (a * c)
theorem max_mul_of_nonneg {α : Type u} [Semiring α] [LinearOrder α] {c : α} [MulPosMono α] (a : α) (b : α) (hc : 0 c) :
max a b * c = max (a * c) (b * c)
theorem min_mul_of_nonneg {α : Type u} [Semiring α] [LinearOrder α] {c : α} [MulPosMono α] (a : α) (b : α) (hc : 0 c) :
min a b * c = min (a * c) (b * c)
theorem le_of_mul_le_of_one_le {α : Type u} [Semiring α] [LinearOrder α] [ZeroLEOneClass α] [NeZero 1] [MulPosStrictMono α] [PosMulMono α] {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} [Semiring α] [LinearOrder α] [PosMulStrictMono α] [MulPosMono α] {a : α} {b : α} (hb : 0 b) (h : a * a b * b) :
a b
theorem mul_self_le_mul_self_iff {α : Type u} [Semiring α] [LinearOrder α] [PosMulStrictMono α] [MulPosMono α] {a : α} {b : α} (h1 : 0 a) (h2 : 0 b) :
a b a * a b * b
theorem mul_self_lt_mul_self_iff {α : Type u} [Semiring α] [LinearOrder α] [PosMulStrictMono α] [MulPosMono α] {a : α} {b : α} (h1 : 0 a) (h2 : 0 b) :
a < b a * a < b * b
theorem mul_self_inj {α : Type u} [Semiring α] [LinearOrder α] [PosMulStrictMono α] [MulPosMono α] {a : α} {b : α} (h1 : 0 a) (h2 : 0 b) :
a * a = b * b a = b
theorem sign_cases_of_C_mul_pow_nonneg {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [PosMulStrictMono α] (h : ∀ (n : ), 0 a * b ^ n) :
a = 0 0 < a 0 b
theorem mul_pos_iff {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [ExistsAddOfLE α] [PosMulStrictMono α] [MulPosStrictMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ContravariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] :
0 < a * b 0 < a 0 < b a < 0 b < 0
theorem mul_nonneg_iff {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [ExistsAddOfLE α] [MulPosStrictMono α] [PosMulStrictMono α] [ContravariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] :
0 a * b 0 a 0 b a 0 b 0
theorem mul_nonneg_of_three {α : Type u} [Semiring α] [LinearOrder α] [ExistsAddOfLE α] [MulPosStrictMono α] [PosMulStrictMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (a : α) (b : α) (c : α) :
0 a * b 0 b * c 0 c * a

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

theorem mul_nonneg_iff_pos_imp_nonneg {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [ExistsAddOfLE α] [PosMulStrictMono α] [MulPosStrictMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] :
0 a * b (0 < a0 b) (0 < b0 a)
@[simp]
theorem mul_le_mul_left_of_neg {α : Type u} [Semiring α] [LinearOrder α] [ExistsAddOfLE α] [PosMulStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] {a : α} {b : α} {c : α} (h : c < 0) :
c * a c * b b a
@[simp]
theorem mul_le_mul_right_of_neg {α : Type u} [Semiring α] [LinearOrder α] [ExistsAddOfLE α] [MulPosStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] {a : α} {b : α} {c : α} (h : c < 0) :
a * c b * c b a
@[simp]
theorem mul_lt_mul_left_of_neg {α : Type u} [Semiring α] [LinearOrder α] [ExistsAddOfLE α] [PosMulStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] {a : α} {b : α} {c : α} (h : c < 0) :
c * a < c * b b < a
@[simp]
theorem mul_lt_mul_right_of_neg {α : Type u} [Semiring α] [LinearOrder α] [ExistsAddOfLE α] [MulPosStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] {a : α} {b : α} {c : α} (h : c < 0) :
a * c < b * c b < a
theorem lt_of_mul_lt_mul_of_nonpos_left {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} {c : α} [ExistsAddOfLE α] [PosMulMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (h : c * a < c * b) (hc : c 0) :
b < a
theorem lt_of_mul_lt_mul_of_nonpos_right {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} {c : α} [ExistsAddOfLE α] [MulPosMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (h : a * c < b * c) (hc : c 0) :
b < a
theorem cmp_mul_neg_left {α : Type u} [Semiring α] [LinearOrder α] [ExistsAddOfLE α] [PosMulStrictMono α] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] {a : α} (ha : a < 0) (b : α) (c : α) :
cmp (a * b) (a * c) = cmp c b
theorem cmp_mul_neg_right {α : Type u} [Semiring α] [LinearOrder α] [ExistsAddOfLE α] [MulPosStrictMono α] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] {a : α} (ha : a < 0) (b : α) (c : α) :
cmp (b * a) (c * a) = cmp c b
@[simp]
theorem mul_self_pos {α : Type u} [Semiring α] [LinearOrder α] [ExistsAddOfLE α] [PosMulStrictMono α] [MulPosStrictMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [ContravariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] {a : α} :
0 < a * a a 0
theorem nonneg_of_mul_nonpos_left {α : Type u} [Semiring α] [LinearOrder α] [ExistsAddOfLE α] [MulPosStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] {a : α} {b : α} (h : a * b 0) (hb : b < 0) :
0 a
theorem nonneg_of_mul_nonpos_right {α : Type u} [Semiring α] [LinearOrder α] [ExistsAddOfLE α] [MulPosStrictMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] {a : α} {b : α} (h : a * b 0) (ha : a < 0) :
0 b
theorem pos_of_mul_neg_left {α : Type u} [Semiring α] [LinearOrder α] [ExistsAddOfLE α] [MulPosMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] {a : α} {b : α} (h : a * b < 0) (hb : b 0) :
0 < a
theorem pos_of_mul_neg_right {α : Type u} [Semiring α] [LinearOrder α] [ExistsAddOfLE α] [MulPosMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] {a : α} {b : α} (h : a * b < 0) (ha : a 0) :
0 < b
theorem neg_iff_pos_of_mul_neg {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [ExistsAddOfLE α] [PosMulMono α] [MulPosMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (hab : a * b < 0) :
a < 0 0 < b
theorem pos_iff_neg_of_mul_neg {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [ExistsAddOfLE α] [PosMulMono α] [MulPosMono α] [CovariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (Function.swap fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (hab : a * b < 0) :
0 < a b < 0
theorem sq_nonneg {α : Type u} [Semiring α] [LinearOrder α] [IsRightCancelAdd α] [ZeroLEOneClass α] [ExistsAddOfLE α] [PosMulMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] (a : α) :
0 a ^ 2
theorem pow_two_nonneg {α : Type u} [Semiring α] [LinearOrder α] [IsRightCancelAdd α] [ZeroLEOneClass α] [ExistsAddOfLE α] [PosMulMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] (a : α) :
0 a ^ 2

Alias of sq_nonneg.

theorem mul_self_nonneg {α : Type u} [Semiring α] [LinearOrder α] [IsRightCancelAdd α] [ZeroLEOneClass α] [ExistsAddOfLE α] [PosMulMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] (a : α) :
0 a * a
theorem mul_self_add_mul_self_eq_zero {α : Type u} [Semiring α] [LinearOrder α] {a : α} {b : α} [IsRightCancelAdd α] [NoZeroDivisors α] [ZeroLEOneClass α] [ExistsAddOfLE α] [PosMulMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] :
a * a + b * b = 0 a = 0 b = 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} [Semiring α] [LinearOrder α] {a : α} {b : α} [IsRightCancelAdd α] [NoZeroDivisors α] [ZeroLEOneClass α] [ExistsAddOfLE α] [PosMulMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] (h : a * a + b * b = 0) :
a = 0
theorem max_mul_mul_le_max_mul_max {α : Type u} [CommSemiring α] [LinearOrder α] {a : α} {d : α} [PosMulMono α] [MulPosMono α] (b : α) (c : α) (ha : 0 a) (hd : 0 d) :
max (a * b) (d * c) max a c * max d b
theorem two_mul_le_add_sq {α : Type u} [CommSemiring α] [LinearOrder α] [ExistsAddOfLE α] [MulPosStrictMono α] [ContravariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (a : α) (b : α) :
2 * a * b a ^ 2 + b ^ 2

Binary arithmetic mean-geometric mean inequality (aka AM-GM inequality) for linearly ordered commutative semirings.

theorem two_mul_le_add_pow_two {α : Type u} [CommSemiring α] [LinearOrder α] [ExistsAddOfLE α] [MulPosStrictMono α] [ContravariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (a : α) (b : α) :
2 * a * b a ^ 2 + b ^ 2

Alias of two_mul_le_add_sq.


Binary arithmetic mean-geometric mean inequality (aka AM-GM inequality) for linearly ordered commutative semirings.

theorem mul_neg_iff {α : Type u} [Ring α] [LinearOrder α] {a : α} {b : α} [PosMulStrictMono α] [MulPosStrictMono α] [ContravariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] :
a * b < 0 0 < a b < 0 a < 0 0 < b
theorem mul_nonpos_iff {α : Type u} [Ring α] [LinearOrder α] {a : α} {b : α} [MulPosStrictMono α] [PosMulStrictMono α] [ContravariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] :
a * b 0 0 a b 0 a 0 0 b
theorem mul_nonneg_iff_neg_imp_nonpos {α : Type u} [Ring α] [LinearOrder α] {a : α} {b : α} [PosMulStrictMono α] [MulPosStrictMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] :
0 a * b (a < 0b 0) (b < 0a 0)
theorem mul_nonpos_iff_pos_imp_nonpos {α : Type u} [Ring α] [LinearOrder α] {a : α} {b : α} [PosMulStrictMono α] [MulPosStrictMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] :
a * b 0 (0 < ab 0) (b < 00 a)
theorem mul_nonpos_iff_neg_imp_nonneg {α : Type u} [Ring α] [LinearOrder α] {a : α} {b : α} [PosMulStrictMono α] [MulPosStrictMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] [ContravariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] :
a * b 0 (a < 00 b) (0 < ba 0)
theorem neg_one_lt_zero {α : Type u} [Ring α] [LinearOrder α] [ZeroLEOneClass α] [NeZero 1] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] :
-1 < 0
theorem sub_one_lt {α : Type u} [Ring α] [LinearOrder α] [ZeroLEOneClass α] [NeZero 1] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x < x_1] (a : α) :
a - 1 < a
theorem mul_self_le_mul_self_of_le_of_neg_le {α : Type u} [Ring α] [LinearOrder α] {a : α} {b : α} [MulPosMono α] [PosMulMono α] [CovariantClass α α (fun (x x_1 : α) => x + x_1) fun (x x_1 : α) => x x_1] (h₁ : a b) (h₂ : -a b) :
a * a b * b
@[deprecated mul_nonneg_iff_of_pos_left]
theorem zero_le_mul_left {α : Type u} [Semiring α] [LinearOrder α] {b : α} {c : α} [PosMulStrictMono α] (h : 0 < c) :
0 c * b 0 b

Alias of mul_nonneg_iff_of_pos_left.

@[deprecated mul_nonneg_iff_of_pos_right]
theorem zero_le_mul_right {α : Type u} [Semiring α] [LinearOrder α] {b : α} {c : α} [MulPosStrictMono α] (h : 0 < c) :
0 b * c 0 b

Alias of mul_nonneg_iff_of_pos_right.

@[deprecated mul_pos_iff_of_pos_left]
theorem zero_lt_mul_left {α : Type u_3} {a : α} {b : α} [MulZeroClass α] [Preorder α] [PosMulStrictMono α] [PosMulReflectLT α] (h : 0 < a) :
0 < a * b 0 < b

Alias of mul_pos_iff_of_pos_left.

@[deprecated mul_pos_iff_of_pos_right]
theorem zero_lt_mul_right {α : Type u_3} {a : α} {b : α} [MulZeroClass α] [Preorder α] [MulPosStrictMono α] [MulPosReflectLT α] (h : 0 < b) :
0 < a * b 0 < a

Alias of mul_pos_iff_of_pos_right.