The areas / V04. Order and lattices
Mathlib.Order.Lex
40 declarations. Mathlib docs · Source
Type synonyms
This file provides two type synonyms for order theory:
Lex α: Type synonym ofαto equip it with its lexicographic order. The precise meaning depends on the type we take the lex of. Examples includeProd,Sigma,List,Finset.Colex α: Type synonym ofαto equip it with its colexicographic order. The precise meaning depends on the type we take the colex of. Examples includeFinset,DFinsupp,Finsupp.
Notation
The general rule for notation of Lex types is to append ₗ to the usual notation.
Implementation notes
One should not abuse definitional equality between α and αᵒᵈ/Lex α. Instead, explicit
coercions should be inserted:
Lex:toLex : α → Lex αandofLex : Lex α → α.Colex:toColex : α → Colex αandofColex : Colex α → α.
See also
This file is similar to Mathlib.Algebra.Group.TypeTags.Basic.
Lexicographic order
Colexicographic order
def Lex E1 #
Type u_2 → Type u_2
A type synonym to equip a type with its lexicographic order.
def toLex E1 #
{α : Type u_1} → α ≃ Lex α
toLex is the identity function to the Lex of a type.
def ofLex E1 #
{α : Type u_1} → Lex α ≃ α
ofLex is the identity function from the Lex of a type.
theorem toLex_symm_eq E0 #
∀ {α : Type u_1}, toLex.symm = ofLex
theorem ofLex_symm_eq E0 #
∀ {α : Type u_1}, ofLex.symm = toLex
theorem toLex_ofLex E0 #
∀ {α : Type u_1} (a : Lex α), toLex (ofLex a) = a
theorem ofLex_toLex E0 #
∀ {α : Type u_1} (a : α), ofLex (toLex a) = a
theorem toLex_inj E1 #
∀ {α : Type u_1} {a b : α}, toLex a = toLex b ↔ a = b
theorem ofLex_inj E1 #
∀ {α : Type u_1} {a b : Lex α}, ofLex a = ofLex b ↔ a = b
instance instBEqLex E0 #
(α : Type u_2) → [BEq α] → BEq (Lex α)
instance instLawfulBEqLex E0 #
∀ (α : Type u_2) [inst : BEq α] [LawfulBEq α], LawfulBEq (Lex α)
instance instDecidableEqLex E0 #
(α : Type u_2) → [DecidableEq α] → DecidableEq (Lex α)
instance instInhabitedLex E0 #
(α : Type u_2) → [Inhabited α] → Inhabited (Lex α)
instance instNonemptyLex E0 #
∀ (α : Type u_2) [Nonempty α], Nonempty (Lex α)
instance instNontrivialLex E0 #
∀ (α : Type u_2) [Nontrivial α], Nontrivial (Lex α)
instance instUniqueLex E0 #
(α : Type u_2) → [Unique α] → Unique (Lex α)
instance instCoeFunLex E0 #
{α : Type u_2} → {γ : α → Sort u_3} → [H : CoeFun α γ] → CoeFun (Lex α) γ
def Lex.rec E1 #
{α : Type u_1} → {β : Lex α → Sort u_2} → ((a : α) → β (toLex a)) → (a : Lex α) → β a
A recursor for Lex. Use as induction x.
theorem Lex.forall E0 #
∀ {α : Type u_1} {p : Lex α → Prop}, (∀ (a : Lex α), p a) ↔ ∀ (a : α), p (toLex a)
theorem Lex.exists E0 #
∀ {α : Type u_1} {p : Lex α → Prop}, (∃ a, p a) ↔ ∃ a, p (toLex a)
def Colex E1 #
Type u_2 → Type u_2
A type synonym to equip a type with its lexicographic order.
def toColex E1 #
{α : Type u_1} → α ≃ Colex α
toColex is the identity function to the Colex of a type.
def ofColex E1 #
{α : Type u_1} → Colex α ≃ α
ofColex is the identity function from the Colex of a type.
theorem toColex_symm_eq E0 #
∀ {α : Type u_1}, toColex.symm = ofColex
theorem ofColex_symm_eq E0 #
∀ {α : Type u_1}, ofColex.symm = toColex
theorem toColex_ofColex E0 #
∀ {α : Type u_1} (a : Colex α), toColex (ofColex a) = a
theorem ofColex_toColex E0 #
∀ {α : Type u_1} (a : α), ofColex (toColex a) = a
theorem toColex_inj E1 #
∀ {α : Type u_1} {a b : α}, toColex a = toColex b ↔ a = b
theorem ofColex_inj E1 #
∀ {α : Type u_1} {a b : Colex α}, ofColex a = ofColex b ↔ a = b
instance instBEqColex E0 #
(α : Type u_2) → [BEq α] → BEq (Colex α)
instance instLawfulBEqColex E0 #
∀ (α : Type u_2) [inst : BEq α] [LawfulBEq α], LawfulBEq (Colex α)
instance instDecidableEqColex E0 #
(α : Type u_2) → [DecidableEq α] → DecidableEq (Colex α)
instance instInhabitedColex E0 #
(α : Type u_2) → [Inhabited α] → Inhabited (Colex α)
instance instNonemptyColex E0 #
∀ (α : Type u_2) [Nonempty α], Nonempty (Colex α)
instance instNontrivialColex E0 #
∀ (α : Type u_2) [Nontrivial α], Nontrivial (Colex α)
instance instUniqueColex E0 #
(α : Type u_2) → [Unique α] → Unique (Colex α)
instance instCoeFunColex E0 #
{α : Type u_2} → {γ : α → Sort u_3} → [H : CoeFun α γ] → CoeFun (Colex α) γ
def Colex.rec E1 #
{α : Type u_1} → {β : Colex α → Sort u_2} → ((a : α) → β (toColex a)) → (a : Colex α) → β a
A recursor for Colex. Use as induction x.
theorem Colex.forall E0 #
∀ {α : Type u_1} {p : Colex α → Prop}, (∀ (a : Colex α), p a) ↔ ∀ (a : α), p (toColex a)
theorem Colex.exists E0 #
∀ {α : Type u_1} {p : Colex α → Prop}, (∃ a, p a) ↔ ∃ a, p (toColex a)