The areas / V04. Order and lattices
Mathlib.Order.Hom.Lex
32 declarations. Mathlib docs · Source
Lexicographic order and order isomorphisms
Main declarations
OrderIso.sumLexIioIciandOrderIso.sumLexIicIoi: ifαis a linear order andx : α, thenαis order isomorphic to bothIio x ⊕ₗ Ici xandIic x ⊕ₗ Ioi x.Prod.Lex.prodUniqueandProd.Lex.uniqueProd:α ×ₗ βis order isomorphic to one side if the other side isUnique.
Relation isomorphism
Order isomorphism
Degenerate products
def RelIso.sumLexComplLeft E1 #
{α : Type u_1} →
(r : α → α → Prop) →
(x : α) →
[IsTrans α r] →
[Std.Trichotomous r] →
[DecidableRel r] → Sum.Lex (Subrel r fun x_1 ↦ r x_1 x) (Subrel r fun x_1 ↦ ¬r x_1 x) ≃r r
A relation is isomorphic to the lexicographic sum of elements less than x and elements not
less than x.
theorem RelIso.sumLexComplLeft_apply E0 #
∀ {α : Type u_1} {r : α → α → Prop} {x : α} [inst : IsTrans α r] [inst_1 : Std.Trichotomous r] [inst_2 : DecidableRel r]
(a : { x_1 // r x_1 x } ⊕ { x_1 // ¬r x_1 x }), (RelIso.sumLexComplLeft r x) a = (Equiv.sumCompl fun x_1 ↦ r x_1 x) a
theorem RelIso.sumLexComplLeft_symm_apply E0 #
∀ {α : Type u_1} {r : α → α → Prop} {x : α} [inst : IsTrans α r] [inst_1 : Std.Trichotomous r] [inst_2 : DecidableRel r]
(a : { x_1 // r x_1 x } ⊕ { x_1 // ¬r x_1 x }), (RelIso.sumLexComplLeft r x) a = (Equiv.sumCompl fun x_1 ↦ r x_1 x) a
def RelIso.sumLexComplRight E1 #
{α : Type u_1} →
(r : α → α → Prop) →
(x : α) →
[IsTrans α r] →
[Std.Trichotomous r] → [DecidableRel r] → Sum.Lex (Subrel r fun x_1 ↦ ¬r x x_1) (Subrel r (r x)) ≃r r
A relation is isomorphic to the lexicographic sum of elements not greater than x and elements
greater than x.
theorem RelIso.sumLexComplRight_apply E0 #
∀ {α : Type u_1} {r : α → α → Prop} {x : α} [inst : IsTrans α r] [inst_1 : Std.Trichotomous r] [inst_2 : DecidableRel r]
(a : { x_1 // ¬r x x_1 } ⊕ Subtype (r x)), (RelIso.sumLexComplRight r x) a = (Equiv.sumCompl (r x)) a.swap
theorem RelIso.sumLexComplRight_symm_apply E0 #
∀ {α : Type u_1} {r : α → α → Prop} {x : α} [inst : IsTrans α r] [inst_1 : Std.Trichotomous r] [inst_2 : DecidableRel r]
(a : { x_1 // ¬r x x_1 } ⊕ Subtype (r x)), (RelIso.sumLexComplRight r x) a = (Equiv.sumCompl (r x)) a.swap
def OrderIso.sumLexIioIci E3 #
{α : Type u_1} → [inst : LinearOrder α] → (x : α) → ↑(Set.Iio x) ⊕ₗ ↑(Set.Ici x) ≃o α
A linear order is isomorphic to the lexicographic sum of elements less than x and elements
greater or equal to x.
theorem OrderIso.sumLexIioIci_apply_inl E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {x : α} (a : ↑(Set.Iio x)), (OrderIso.sumLexIioIci x) (toLex (Sum.inl a)) = ↑a
theorem OrderIso.sumLexIioIci_apply_inr E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {x : α} (a : ↑(Set.Ici x)), (OrderIso.sumLexIioIci x) (toLex (Sum.inr a)) = ↑a
theorem OrderIso.sumLexIioIci_symm_apply_of_lt E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {x y : α} (h : y < x), (OrderIso.sumLexIioIci x).symm y = toLex (Sum.inl ⟨y, h⟩)
theorem OrderIso.sumLexIioIci_symm_apply_of_ge E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {x y : α} (h : x ≤ y), (OrderIso.sumLexIioIci x).symm y = toLex (Sum.inr ⟨y, h⟩)
theorem OrderIso.sumLexIioIci_symm_apply_Iio E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {x : α} (a : ↑(Set.Iio x)),
(OrderIso.sumLexIioIci x).symm ↑a = toLex (Sum.inl a)
theorem OrderIso.sumLexIioIci_symm_apply_Ici E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {x : α} (a : ↑(Set.Ici x)),
(OrderIso.sumLexIioIci x).symm ↑a = toLex (Sum.inr a)
def OrderIso.sumLexIicIoi E3 #
{α : Type u_1} → [inst : LinearOrder α] → (x : α) → ↑(Set.Iic x) ⊕ₗ ↑(Set.Ioi x) ≃o α
A linear order is isomorphic to the lexicographic sum of elements less or equal to x and
elements greater than x.
theorem OrderIso.sumLexIicIoi_apply_inl E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {x : α} (a : ↑(Set.Iic x)), (OrderIso.sumLexIicIoi x) (toLex (Sum.inl a)) = ↑a
theorem OrderIso.sumLexIicIoi_apply_inr E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {x : α} (a : ↑(Set.Ioi x)), (OrderIso.sumLexIicIoi x) (toLex (Sum.inr a)) = ↑a
theorem OrderIso.sumLexIicIoi_symm_apply_of_le E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {x y : α} (h : y ≤ x), (OrderIso.sumLexIicIoi x).symm y = toLex (Sum.inl ⟨y, h⟩)
theorem OrderIso.sumLexIicIoi_symm_apply_of_lt E1 #
∀ {α : Type u_1} [inst : LinearOrder α] {x y : α} (h : x < y), (OrderIso.sumLexIicIoi x).symm y = toLex (Sum.inr ⟨y, h⟩)
theorem OrderIso.sumLexIicIoi_symm_apply_Iic E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {x : α} (a : ↑(Set.Iic x)), (OrderIso.sumLexIicIoi x).symm ↑a = Sum.inl a
theorem OrderIso.sumLexIicIoi_symm_apply_Ioi E0 #
∀ {α : Type u_1} [inst : LinearOrder α] {x : α} (a : ↑(Set.Ioi x)), (OrderIso.sumLexIicIoi x).symm ↑a = Sum.inr a
def Prod.Lex.prodUnique E3 #
(α : Type u_2) → (β : Type u_3) → [inst : PartialOrder α] → [inst_1 : Preorder β] → [Unique β] → Lex (α × β) ≃o α
Lexicographic product type with Unique type on the right is OrderIso to the left.
theorem Prod.Lex.prodUnique_apply E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : PartialOrder α] [inst_1 : Preorder β] [inst_2 : Unique β] (x : Lex (α × β)),
(Prod.Lex.prodUnique α β) x = (ofLex x).1
def Prod.Lex.uniqueProd E3 #
(α : Type u_2) → (β : Type u_3) → [inst : Preorder α] → [Unique α] → [inst_2 : LE β] → Lex (α × β) ≃o β
Lexicographic product type with Unique type on the left is OrderIso to the right.
theorem Prod.Lex.uniqueProd_apply E0 #
∀ {α : Type u_2} {β : Type u_3} [inst : Preorder α] [inst_1 : Unique α] [inst_2 : LE β] (x : Lex (α × β)),
(Prod.Lex.uniqueProd α β) x = (ofLex x).2
def Prod.Lex.prodLexAssoc E1 #
(α : Type u_4) →
(β : Type u_5) →
(γ : Type u_6) →
[inst : Preorder α] →
[inst_1 : Preorder β] → [inst_2 : Preorder γ] → Lex (Lex (α × β) × γ) ≃o Lex (α × Lex (β × γ))
Equiv.prodAssoc promoted to an order isomorphism of lexicographic products.
theorem Prod.Lex.prodLexAssoc_symm_apply E0 #
∀ (α : Type u_4) (β : Type u_5) (γ : Type u_6) [inst : Preorder α] [inst_1 : Preorder β] [inst_2 : Preorder γ]
(a : Lex (α × Lex (β × γ))),
(RelIso.symm (Prod.Lex.prodLexAssoc α β γ)) a =
toLex (toLex ((ofLex a).1, (ofLex (ofLex a).2).1), (ofLex (ofLex a).2).2)
theorem Prod.Lex.prodLexAssoc_apply E0 #
∀ (α : Type u_4) (β : Type u_5) (γ : Type u_6) [inst : Preorder α] [inst_1 : Preorder β] [inst_2 : Preorder γ]
(a : Lex (Lex (α × β) × γ)),
(Prod.Lex.prodLexAssoc α β γ) a = toLex ((ofLex (ofLex a).1).1, toLex ((ofLex (ofLex a).1).2, (ofLex a).2))
def Prod.Lex.sumLexProdLexDistrib E1 #
(α : Type u_4) →
(β : Type u_5) →
(γ : Type u_6) →
[inst : Preorder α] →
[inst_1 : Preorder β] → [inst_2 : Preorder γ] → Lex ((α ⊕ₗ β) × γ) ≃o Lex (α × γ) ⊕ₗ Lex (β × γ)
Equiv.sumProdDistrib promoted to an order isomorphism of lexicographic products.
Right distributivity doesn't hold. A counterexample is ℕ ×ₗ (Unit ⊕ₗ Unit) ≃o ℕ
which is not isomorphic to ℕ ×ₗ Unit ⊕ₗ ℕ ×ₗ Unit ≃o ℕ ⊕ₗ ℕ.
theorem Prod.Lex.sumLexProdLexDistrib_symm_apply E0 #
∀ (α : Type u_4) (β : Type u_5) (γ : Type u_6) [inst : Preorder α] [inst_1 : Preorder β] [inst_2 : Preorder γ]
(a : Lex (α × γ) ⊕ₗ Lex (β × γ)),
(RelIso.symm (Prod.Lex.sumLexProdLexDistrib α β γ)) a =
toLex (Prod.map (⇑toLex) id ((Equiv.sumProdDistrib α β γ).symm (Sum.map (⇑ofLex) (⇑ofLex) (ofLex a))))
theorem Prod.Lex.sumLexProdLexDistrib_apply E0 #
∀ (α : Type u_4) (β : Type u_5) (γ : Type u_6) [inst : Preorder α] [inst_1 : Preorder β] [inst_2 : Preorder γ]
(a : Lex ((α ⊕ₗ β) × γ)),
(Prod.Lex.sumLexProdLexDistrib α β γ) a =
toLex (Sum.map (⇑toLex) (⇑toLex) ((Equiv.sumProdDistrib α β γ) (Prod.map (⇑ofLex) id (ofLex a))))
def Prod.Lex.prodLexCongr E1 #
{α : Type u_4} →
{β : Type u_5} →
{γ : Type u_6} →
{δ : Type u_7} →
[inst : Preorder α] →
[inst_1 : Preorder β] →
[inst_2 : Preorder γ] → [inst_3 : Preorder δ] → α ≃o β → γ ≃o δ → Lex (α × γ) ≃o Lex (β × δ)
Equiv.prodCongr promoted to an order isomorphism between lexicographic products.
theorem Prod.Lex.prodLexCongr_apply E0 #
∀ {α : Type u_4} {β : Type u_5} {γ : Type u_6} {δ : Type u_7} [inst : Preorder α] [inst_1 : Preorder β]
[inst_2 : Preorder γ] [inst_3 : Preorder δ] (ea : α ≃o β) (eb : γ ≃o δ) (a : Lex (α × γ)),
(Prod.Lex.prodLexCongr ea eb) a = toLex (Prod.map (⇑ea) (⇑eb) (ofLex a))