Lexicographic order #
This file defines the lexicographic relation for pairs of orders, partial orders and linear orders.
Main declarations #
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.Pi.Lex: Lexicographic order onΠₗ i, α i.Order.PSigma: Lexicographic order onΣ' i, α i.Order.Sigma: Lexicographic order onΣ i, α i.
TODO #
Some lemmas could be automatically generated with to_dual.
See [https://github.com/leanprover-community/mathlib4/pull/37939#discussion_r3367855484]
A type synonym to equip a type with its lexicographic order.
Equations
- Prod.Lex.«term_×ₗ_» = Lean.ParserDescr.trailingNode `Prod.Lex.«term_×ₗ_» 35 0 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ×ₗ ") (Lean.ParserDescr.cat `term 34))
Instances For
instance Prod.Lex.instWellFoundedLTLex {α : Type u_1} {β : Type u_2} [LT α] [LT β] [WellFoundedLT α] [WellFoundedLT β] :
WellFoundedLT (Lex (α × β))
@[instance_reducible]
instance Prod.Lex.instWellFoundedRelationLexOfWellFoundedLT {α : Type u_1} {β : Type u_2} [LT α] [LT β] [WellFoundedLT α] [WellFoundedLT β] :
WellFoundedRelation (Lex (α × β))
@[instance_reducible]
Dictionary / lexicographic preorder for pairs.
Equations
- Prod.Lex.instPreorder α β = { toLE := Prod.Lex.instLE α β, toLT := Prod.Lex.instLT α β, le_refl := ⋯, le_trans := ⋯, lt_iff_le_not_ge := ⋯ }
@[instance_reducible]
instance Prod.Lex.instPartialOrder (α : Type u_3) (β : Type u_4) [PartialOrder α] [PartialOrder β] :
PartialOrder (Lex (α × β))
Dictionary / lexicographic partial order for pairs.
Equations
- Prod.Lex.instPartialOrder α β = { toPreorder := Prod.Lex.instPreorder α β, le_antisymm := ⋯ }
instance Prod.Lex.instOrientedOrdLex {α : Type u_1} {β : Type u_2} [Ord α] [Ord β] [Std.OrientedOrd α] [Std.OrientedOrd β] :
Std.OrientedOrd (Lex (α × β))
instance Prod.Lex.instTransOrdLex {α : Type u_1} {β : Type u_2} [Ord α] [Ord β] [Std.TransOrd α] [Std.TransOrd β] :
Std.TransOrd (Lex (α × β))
@[instance_reducible]
instance Prod.Lex.instLinearOrder (α : Type u_3) (β : Type u_4) [LinearOrder α] [LinearOrder β] :
LinearOrder (Lex (α × β))
Dictionary / lexicographic linear order for pairs.
Equations
- One or more equations did not get rendered due to their size.
@[instance_reducible]
instance Prod.Lex.boundedOrder {α : Type u_1} {β : Type u_2} [PartialOrder α] [Preorder β] [BoundedOrder α] [BoundedOrder β] :
BoundedOrder (Lex (α × β))
Equations
- Prod.Lex.boundedOrder = { toOrderTop := Prod.Lex.orderTop, toOrderBot := Prod.Lex.orderBot }
instance Prod.Lex.instDenselyOrderedLex {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [DenselyOrdered α] [DenselyOrdered β] :
DenselyOrdered (Lex (α × β))
instance Prod.Lex.instDenselyOrderedLexOfNoMinOrder {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [NoMinOrder β] [DenselyOrdered β] :
DenselyOrdered (Lex (α × β))
instance Prod.Lex.instDenselyOrderedLexOfNoMaxOrder {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [NoMaxOrder β] [DenselyOrdered β] :
DenselyOrdered (Lex (α × β))
instance Prod.Lex.noMaxOrder_of_left {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [NoMaxOrder α] :
NoMaxOrder (Lex (α × β))
instance Prod.Lex.noMinOrder_of_left {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [NoMinOrder α] :
NoMinOrder (Lex (α × β))
instance Prod.Lex.noMaxOrder_of_right {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [NoMaxOrder β] :
NoMaxOrder (Lex (α × β))
instance Prod.Lex.noMinOrder_of_right {α : Type u_1} {β : Type u_2} [Preorder α] [Preorder β] [NoMinOrder β] :
NoMinOrder (Lex (α × β))