mathlib documentation

core.​init.​algebra.​order

core.​init.​algebra.​order

@[class]
structure preorder  :
Type uType u
  • le : α → α → Prop
  • lt : α → α → Prop
  • le_refl : ∀ (a : α), a a
  • le_trans : ∀ (a b c_1 : α), a bb c_1a c_1
  • lt_iff_le_not_le : (∀ (a b : α), a < b a b ¬b a) . "order_laws_tac"

A preorder is a reflexive, transitive relation with a < b defined in the obvious way.

Instances
@[instance]
def preorder.​to_has_lt (α : Type u) [s : preorder α] :

@[instance]
def preorder.​to_has_le (α : Type u) [s : preorder α] :

@[instance]
def partial_order.​to_preorder (α : Type u) [s : partial_order α] :

@[class]
structure partial_order  :
Type uType u
  • le : α → α → Prop
  • lt : α → α → Prop
  • le_refl : ∀ (a : α), a a
  • le_trans : ∀ (a b c_1 : α), a bb c_1a c_1
  • lt_iff_le_not_le : (∀ (a b : α), a < b a b ¬b a) . "order_laws_tac"
  • le_antisymm : ∀ (a b : α), a bb aa = b

A partial order is a reflexive, transitive, antisymmetric relation .

Instances
@[class]
structure linear_order  :
Type uType u
  • le : α → α → Prop
  • lt : α → α → Prop
  • le_refl : ∀ (a : α), a a
  • le_trans : ∀ (a b c_1 : α), a bb c_1a c_1
  • lt_iff_le_not_le : (∀ (a b : α), a < b a b ¬b a) . "order_laws_tac"
  • le_antisymm : ∀ (a b : α), a bb aa = b
  • le_total : ∀ (a b : α), a b b a

A linear order is reflexive, transitive, antisymmetric and total relation .

Instances
@[instance]

theorem le_refl {α : Type u} [preorder α] (a : α) :
a a

theorem le_trans {α : Type u} [preorder α] {a b c : α} :
a bb ca c

theorem lt_iff_le_not_le {α : Type u} [preorder α] {a b : α} :
a < b a b ¬b a

theorem lt_of_le_not_le {α : Type u} [preorder α] {a b : α} :
a b¬b aa < b

theorem le_not_le_of_lt {α : Type u} [preorder α] {a b : α} :
a < ba b ¬b a

theorem le_antisymm {α : Type u} [partial_order α] {a b : α} :
a bb aa = b

theorem le_of_eq {α : Type u} [preorder α] {a b : α} :
a = ba b

theorem le_antisymm_iff {α : Type u} [partial_order α] {a b : α} :
a = b a b b a

theorem ge_trans {α : Type u} [preorder α] {a b c : α} :
a bb ca c

theorem le_total {α : Type u} [linear_order α] (a b : α) :
a b b a

theorem le_of_not_ge {α : Type u} [linear_order α] {a b : α} :
¬a ba b

theorem le_of_not_le {α : Type u} [linear_order α] {a b : α} :
¬a bb a

theorem lt_irrefl {α : Type u} [preorder α] (a : α) :
¬a < a

theorem gt_irrefl {α : Type u} [preorder α] (a : α) :
¬a > a

theorem lt_trans {α : Type u} [preorder α] {a b c : α} :
a < bb < ca < c

def lt.​trans {α : Type u_1} [preorder α] {a b c : α} :
a < bb < ca < c

Equations
theorem gt_trans {α : Type u} [preorder α] {a b c : α} :
a > bb > ca > c

def gt.​trans {α : Type u_1} [preorder α] {a b c : α} :
a > bb > ca > c

Equations
theorem ne_of_lt {α : Type u} [preorder α] {a b : α} :
a < ba b

theorem ne_of_gt {α : Type u} [preorder α] {a b : α} :
a > ba b

theorem lt_asymm {α : Type u} [preorder α] {a b : α} :
a < b¬b < a

theorem not_lt_of_gt {α : Type u} [linear_order α] {a b : α} :
a > b¬a < b

theorem le_of_lt {α : Type u} [preorder α] {a b : α} :
a < ba b

theorem lt_of_lt_of_le {α : Type u} [preorder α] {a b c : α} :
a < bb ca < c

theorem lt_of_le_of_lt {α : Type u} [preorder α] {a b c : α} :
a bb < ca < c

theorem gt_of_gt_of_ge {α : Type u} [preorder α] {a b c : α} :
a > bb ca > c

theorem gt_of_ge_of_gt {α : Type u} [preorder α] {a b c : α} :
a bb > ca > c

theorem not_le_of_gt {α : Type u} [preorder α] {a b : α} :
a > b¬a b

theorem not_lt_of_ge {α : Type u} [preorder α] {a b : α} :
a b¬a < b

theorem lt_or_eq_of_le {α : Type u} [partial_order α] {a b : α} :
a ba < b a = b

theorem le_of_lt_or_eq {α : Type u} [preorder α] {a b : α} :
a < b a = ba b

theorem le_iff_lt_or_eq {α : Type u} [partial_order α] {a b : α} :
a b a < b a = b

theorem lt_of_le_of_ne {α : Type u} [partial_order α] {a b : α} :
a ba ba < b

theorem lt_trichotomy {α : Type u} [linear_order α] (a b : α) :
a < b a = b b < a

theorem le_of_not_gt {α : Type u} [linear_order α] {a b : α} :
¬a > ba b

theorem lt_of_not_ge {α : Type u} [linear_order α] {a b : α} :
¬a ba < b

theorem lt_or_ge {α : Type u} [linear_order α] (a b : α) :
a < b a b

theorem le_or_gt {α : Type u} [linear_order α] (a b : α) :
a b a > b

theorem lt_or_gt_of_ne {α : Type u} [linear_order α] {a b : α} :
a ba < b a > b

theorem le_of_eq_or_lt {α : Type u} [preorder α] {a b : α} :
a = b a < ba b

theorem ne_iff_lt_or_gt {α : Type u} [linear_order α] {a b : α} :
a b a < b a > b

theorem lt_iff_not_ge {α : Type u} [linear_order α] (x y : α) :
x < y ¬x y

@[instance]

Equations
@[instance]

Equations
@[class]
structure decidable_linear_order  :
Type uType u

Instances
@[instance]
def has_lt.​lt.​decidable {α : Type u} [decidable_linear_order α] (a b : α) :
decidable (a < b)

Equations
@[instance]
def has_le.​le.​decidable {α : Type u} [decidable_linear_order α] (a b : α) :

Equations
@[instance]
def eq.​decidable {α : Type u} [decidable_linear_order α] (a b : α) :
decidable (a = b)

Equations
theorem eq_or_lt_of_not_lt {α : Type u} [decidable_linear_order α] {a b : α} :
¬a < ba = b b < a