mathlib documentation

order.lexicographic

Lexicographic order #

This file defines the lexicographic relation for pairs and dependent pairs of orders, partial orders and linear orders.

Main declarations #

Notation #

See also #

Related files are:

def lex (α : Type u) :
Type u

A type synonym to equip a type with its lexicographic order.

Equations
def to_lex {α : Type u} :
α lex α

to_lex is the identity function to the lex of a type.

Equations
def of_lex {α : Type u} :
lex α α

of_lex is the identity function from the lex of a type.

Equations
@[simp]
theorem to_lex_symm_eq {α : Type u} :
@[simp]
theorem of_lex_symm_eq {α : Type u} :
@[simp]
theorem to_lex_of_lex {α : Type u} (a : lex α) :
@[simp]
theorem of_lex_to_lex {α : Type u} (a : α) :
@[simp]
theorem to_lex_inj {α : Type u} {a b : α} :
@[simp]
theorem of_lex_inj {α : Type u} {a b : lex α} :
@[protected]
def lex.rec {α : Type u} {β : lex αSort u_1} (h : Π (a : α), β (to_lex a)) (a : lex α) :
β a

A recursor for lex. Use as induction x using lex.rec.

Equations
@[protected, instance]
meta def prod.lex.lex.has_to_format {α : Type u} {β : Type v} [has_to_format α] [has_to_format β] :
@[protected, instance]
def prod.lex.decidable_eq (α : Type u_1) (β : Type u_2) [decidable_eq α] [decidable_eq β] :
Equations
@[protected, instance]
def prod.lex.inhabited (α : Type u_1) (β : Type u_2) [inhabited α] [inhabited β] :
Equations
@[protected, instance]
def prod.lex.has_le (α : Type u_1) (β : Type u_2) [has_lt α] [has_le β] :
has_le ×ₗ β)

Dictionary / lexicographic ordering on pairs.

Equations
@[protected, instance]
def prod.lex.has_lt (α : Type u_1) (β : Type u_2) [has_lt α] [has_lt β] :
has_lt ×ₗ β)
Equations
theorem prod.lex.le_iff {α : Type u} {β : Type v} [has_lt α] [has_le β] (a b : α × β) :
theorem prod.lex.lt_iff {α : Type u} {β : Type v} [has_lt α] [has_lt β] (a b : α × β) :
@[protected, instance]
def prod.lex.preorder (α : Type u_1) (β : Type u_2) [preorder α] [preorder β] :
preorder ×ₗ β)

Dictionary / lexicographic preorder for pairs.

Equations
@[protected, instance]
def prod.lex.partial_order (α : Type u_1) (β : Type u_2) [partial_order α] [partial_order β] :

Dictionary / lexicographic partial_order for pairs.

Equations
@[protected, instance]
def prod.lex.linear_order (α : Type u_1) (β : Type u_2) [linear_order α] [linear_order β] :

Dictionary / lexicographic linear_order for pairs.

Equations