Lexicographic order #
This file defines the lexicographic relation for pairs and dependent pairs of orders, partial orders and linear orders.
Main declarations #
lex α
: A type synonym ofα
to equip it with its lexicographic order.prod.lex.<pre/partial_/linear_>order
: Instances lifting the orders onα
andβ
toα ×ₗ β
.
Notation #
α ×ₗ β
:α × β
equipped with the lexicographic order
See also #
Related files are:
data.finset.colex
: Colexicographic order on finite sets.data.list.lex
: Lexicographic order on lists.data.psigma.order
: Lexicographic order onΣ' i, α i
.data.sigma.order
: Lexicographic order onΣ i, α i
.
@[protected, instance]
def
prod.lex.decidable_eq
(α : Type u_1)
(β : Type u_2)
[decidable_eq α]
[decidable_eq β] :
decidable_eq (α ×ₗ β)
Equations
@[protected, instance]
Equations
@[protected, instance]
Dictionary / lexicographic preorder for pairs.
Equations
- prod.lex.preorder α β = {le := has_le.le (prod.lex.has_le α β), lt := has_lt.lt (prod.lex.has_lt α β), le_refl := _, le_trans := _, lt_iff_le_not_le := _}
@[protected, instance]
def
prod.lex.partial_order
(α : Type u_1)
(β : Type u_2)
[partial_order α]
[partial_order β] :
partial_order (α ×ₗ β)
Dictionary / lexicographic partial_order for pairs.
Equations
- prod.lex.partial_order α β = {le := preorder.le (prod.lex.preorder α β), lt := preorder.lt (prod.lex.preorder α β), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _}
@[protected, instance]
def
prod.lex.linear_order
(α : Type u_1)
(β : Type u_2)
[linear_order α]
[linear_order β] :
linear_order (α ×ₗ β)
Dictionary / lexicographic linear_order for pairs.
Equations
- prod.lex.linear_order α β = {le := partial_order.le (prod.lex.partial_order α β), lt := partial_order.lt (prod.lex.partial_order α β), le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_total := _, decidable_le := prod.lex.decidable has_lt.lt has_le.le (λ (a b : β), has_le.le.decidable a b), decidable_eq := prod.lex.decidable_eq α β (λ (a b : β), eq.decidable a b), decidable_lt := prod.lex.decidable has_lt.lt has_lt.lt (λ (a b : β), has_lt.lt.decidable a b), max := max_default (λ (a b : α ×ₗ β), prod.lex.decidable has_lt.lt has_le.le a b), max_def := _, min := min_default (λ (a b : α ×ₗ β), prod.lex.decidable has_lt.lt has_le.le a b), min_def := _}