Basic definitions about ≤ and <
Definitions
Predicates on functions
- monotone f: a function between two types equipped with- ≤is monotone if- a ≤ bimplies- f a ≤ f b.
- strict_mono f: a function between two types equipped with- <is strictly monotone if- a < bimplies- f a < f b.
- order_dual α: a type tag reversing the meaning of all inequalities.
Transfering orders
- order.preimage,- preorder.lift: transfer a (pre)order on- βto an order on- αusing a function- f : α → β.
- partial_order.lift,- linear_order.lift,- decidable_linear_order.lift: transfer a partial (resp., linear, decidable linear) order on- βto a partial (resp., linear, decidable linear) order on- αusing an injective function- f.
Extra classes
- no_top_order,- no_bot_order: an order without a maximal/minimal element.
- densely_ordered: an order with no gaps, i.e. for any two elements- a<bthere exists- c,- a<c<b.
Main theorems
- monotone_of_monotone_nat: if- f : ℕ → αand- f n ≤ f (n + 1)for all- n, then- fis monotone;
- strict_mono.nat: if- f : ℕ → αand- f n < f (n + 1)for all- n, then f is strictly monotone.
TODO
- expand module docs
- automatic construction of dual definitions / theorems
See also
- algebra.orderfor basic lemmas about orders, and projection notation for orders
Tags
preorder, order, partial order, linear order, monotone, strictly monotone
Given a relation R on β and a function f : α → β,
 the preimage relation on α is defined by x ≤ y ↔ f x ≤ f y.
 It is the unique relation on α making f a rel_embedding
 (assuming f is injective).
The preimage of a decidable order is decidable.
Equations
- order.preimage.decidable f s = λ (x y : α), H (f x) (f y)
A function f is strictly monotone if a < b implies f a < f b.
Equations
- strict_mono f = ∀ ⦃a b : α⦄, a < b → f a < f b
Type tag for a set with dual order: ≤ means ≥ and < means >.
Equations
- order_dual α = α
Equations
- _ = h
Equations
- order_dual.has_le α = {le := λ (x y : α), y ≤ x}
Equations
- order_dual.has_lt α = {lt := λ (x y : α), y < x}
Equations
- order_dual.preorder α = {le := has_le.le (order_dual.has_le α), lt := has_lt.lt (order_dual.has_lt α), le_refl := _, le_trans := _, lt_iff_le_not_le := _}
Equations
- order_dual.partial_order α = {le := preorder.le (order_dual.preorder α), lt := preorder.lt (order_dual.preorder α), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _}
Equations
- order_dual.linear_order α = {le := partial_order.le (order_dual.partial_order α), lt := partial_order.lt (order_dual.partial_order α), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_total := _}
Equations
- order_dual.decidable_linear_order α = {le := linear_order.le (order_dual.linear_order α), lt := linear_order.lt (order_dual.linear_order α), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_total := _, decidable_le := (λ (this : decidable_rel (λ (a b : α), b ≤ a)), this) (λ (a b : α), has_le.le.decidable b a), decidable_eq := decidable_eq_of_decidable_le ((λ (this : decidable_rel (λ (a b : α), b ≤ a)), this) (λ (a b : α), has_le.le.decidable b a)), decidable_lt := (λ (this : decidable_rel (λ (a b : α), b < a)), this) (λ (a b : α), has_lt.lt.decidable b a)}
Equations
Equations
- pi.partial_order = {le := preorder.le pi.preorder, lt := preorder.lt pi.preorder, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _}
Transfer a partial_order on β to a partial_order on α using an injective
function f : α → β.
Equations
- partial_order.lift f inj = {le := preorder.le (preorder.lift f), lt := preorder.lt (preorder.lift f), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _}
Transfer a linear_order on β to a linear_order on α using an injective
function f : α → β.
Equations
- linear_order.lift f inj = {le := partial_order.le (partial_order.lift f inj), lt := partial_order.lt (partial_order.lift f inj), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_total := _}
Transfer a decidable_linear_order on β to a decidable_linear_order on α using
an injective function f : α → β.
Equations
- decidable_linear_order.lift f inj = {le := linear_order.le (linear_order.lift f inj), lt := linear_order.lt (linear_order.lift f inj), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_total := _, decidable_le := λ (x y : α), show decidable (f x ≤ f y), from has_le.le.decidable (f x) (f y), decidable_eq := λ (x y : α), decidable_of_iff (f x = f y) _, decidable_lt := λ (x y : α), show decidable (f x < f y), from has_lt.lt.decidable (f x) (f y)}
Equations
The pointwise partial order on a product.
   (The lexicographic ordering is defined in order/lexicographic.lean, and the instances are
   available via the type synonym lex α β = α × β.)
Equations
- prod.partial_order α β = {le := preorder.le (prod.preorder α β), lt := preorder.lt (prod.preorder α β), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _}
Additional order classes
- no_top : ∀ (a : α), ∃ (a' : α), a < a'
order without a top element; somtimes called cofinal
Equations
- _ = _
- no_bot : ∀ (a : α), ∃ (a' : α), a' < a
order without a bottom element; somtimes called coinitial or dense
Equations
- _ = _
Equations
- _ = _
Equations
- _ = _
An order is dense if there is an element between any pair of distinct elements.
Equations
- _ = _
Any linear_order is a noncomputable decidable_linear_order. This is not marked
as an instance to avoid a loop.
Equations
- classical.DLO α = {le := linear_order.le LO, lt := linear_order.lt LO, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_total := _, decidable_le := classical.dec_rel has_le.le, decidable_eq := decidable_eq_of_decidable_le (classical.dec_rel has_le.le), decidable_lt := decidable_lt_of_decidable_le (classical.dec_rel has_le.le)}