The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V04. Order and lattices

Mathlib.Order.Sigma

31 declarations. Mathlib docs · Source

Orders on a sigma type

This file defines two orders on a sigma type:

  • The disjoint sum of orders. a is less b iff a and b are in the same summand and a is less than b there.
  • The lexicographical order. a is less than b if its summand is strictly less than the summand of b or they are in the same summand and a is less than b there.

We make the disjoint sum of orders the default set of instances. The lexicographic order goes on a type synonym.

Notation

  • _root_.Lex (Sigma α): Sigma type equipped with the lexicographic order. Type synonym of Σ i, α i.

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. Basically a twin of this file.
  • Order.Prod.Lex.Basic: Lexicographic order on α × β.

TODO

Upgrade Equiv.sigma_congr_left, Equiv.sigma_congr, Equiv.sigma_assoc, Equiv.sigma_prod_of_equiv, Equiv.sigma_equiv_prod, ... to order isomorphisms.

Disjoint sum of orders on Sigma

Lexicographical order on Sigma

inductive Sigma.LE E1 #

{ι : Type u_1} → {α : ι → Type u_2} → [(i : ι) → LE (α i)] → (i : ι) × α i → (i : ι) × α i → Prop

Disjoint sum of orders. ⟨i, a⟩ ≤ ⟨j, b⟩ iff i = j and a ≤ b.

ctor Sigma.LE.fiber E0 #

∀ {ι : Type u_1} {α : ι → Type u_2} [inst : (i : ι) → LE (α i)] (i : ι) (a b : α i), a ≤ b → ⟨i, a⟩.LE ⟨i, b⟩

inductive Sigma.LT E1 #

{ι : Type u_1} → {α : ι → Type u_2} → [(i : ι) → LT (α i)] → (i : ι) × α i → (i : ι) × α i → Prop

Disjoint sum of orders. ⟨i, a⟩ < ⟨j, b⟩ iff i = j and a < b.

ctor Sigma.LT.fiber E0 #

∀ {ι : Type u_1} {α : ι → Type u_2} [inst : (i : ι) → LT (α i)] (i : ι) (a b : α i), a < b → ⟨i, a⟩.LT ⟨i, b⟩

instance Sigma.instLE_mathlib E0 #

{ι : Type u_1} → {α : ι → Type u_2} → [(i : ι) → LE (α i)] → LE ((i : ι) × α i)

instance Sigma.instLT_mathlib E0 #

{ι : Type u_1} → {α : ι → Type u_2} → [(i : ι) → LT (α i)] → LT ((i : ι) × α i)

theorem Sigma.mk_le_mk_iff E0 #

∀ {ι : Type u_1} {α : ι → Type u_2} [inst : (i : ι) → LE (α i)] {i : ι} {a b : α i}, ⟨i, a⟩ ≤ ⟨i, b⟩ ↔ a ≤ b

theorem Sigma.mk_lt_mk_iff E0 #

∀ {ι : Type u_1} {α : ι → Type u_2} [inst : (i : ι) → LT (α i)] {i : ι} {a b : α i}, ⟨i, a⟩ < ⟨i, b⟩ ↔ a < b

theorem Sigma.le_def E0 #

∀ {ι : Type u_1} {α : ι → Type u_2} [inst : (i : ι) → LE (α i)] {a b : (i : ι) × α i},
  a ≤ b ↔ ∃ (h : a.fst = b.fst), h ▸ a.snd ≤ b.snd

theorem Sigma.lt_def E0 #

∀ {ι : Type u_1} {α : ι → Type u_2} [inst : (i : ι) → LT (α i)] {a b : (i : ι) × α i},
  a < b ↔ ∃ (h : a.fst = b.fst), h ▸ a.snd < b.snd

instance Sigma.preorder E0 #

{ι : Type u_1} → {α : ι → Type u_2} → [(i : ι) → Preorder (α i)] → Preorder ((i : ι) × α i)

instance Sigma.instPartialOrder E0 #

{ι : Type u_1} → {α : ι → Type u_2} → [(i : ι) → PartialOrder (α i)] → PartialOrder ((i : ι) × α i)

instance Sigma.instDenselyOrdered E0 #

∀ {ι : Type u_1} {α : ι → Type u_2} [inst : (i : ι) → Preorder (α i)] [∀ (i : ι), DenselyOrdered (α i)],
  DenselyOrdered ((i : ι) × α i)

def Sigma.Lex.«termΣₗ_,_» E1 #

Lean.ParserDescr

The notation Σₗ i, α i refers to a sigma type equipped with the lexicographic order.

instance Sigma.Lex.LE E0 #

{ι : Type u_1} → {α : ι → Type u_2} → [LT ι] → [(i : ι) → LE (α i)] → LE (Σₗ (i : ι), α i)

The lexicographical ≤ on a sigma type.

instance Sigma.Lex.LT E0 #

{ι : Type u_1} → {α : ι → Type u_2} → [LT ι] → [(i : ι) → LT (α i)] → LT (Σₗ (i : ι), α i)

The lexicographical < on a sigma type.

theorem Sigma.Lex.le_def E0 #

∀ {ι : Type u_1} {α : ι → Type u_2} [inst : LT ι] [inst_1 : (i : ι) → LE (α i)] {a b : Σₗ (i : ι), α i},
  a ≤ b ↔ a.fst < b.fst ∨ ∃ (h : a.fst = b.fst), h ▸ a.snd ≤ b.snd

theorem Sigma.Lex.lt_def E0 #

∀ {ι : Type u_1} {α : ι → Type u_2} [inst : LT ι] [inst_1 : (i : ι) → LT (α i)] {a b : Σₗ (i : ι), α i},
  a < b ↔ a.fst < b.fst ∨ ∃ (h : a.fst = b.fst), h ▸ a.snd < b.snd

instance Sigma.Lex.preorder E0 #

{ι : Type u_1} → {α : ι → Type u_2} → [Preorder ι] → [(i : ι) → Preorder (α i)] → Preorder (Σₗ (i : ι), α i)

The lexicographical preorder on a sigma type.

instance Sigma.Lex.partialOrder E0 #

{ι : Type u_1} → {α : ι → Type u_2} → [Preorder ι] → [(i : ι) → PartialOrder (α i)] → PartialOrder (Σₗ (i : ι), α i)

The lexicographical partial order on a sigma type.

instance Sigma.Lex.linearOrder E0 #

{ι : Type u_1} → {α : ι → Type u_2} → [LinearOrder ι] → [(i : ι) → LinearOrder (α i)] → LinearOrder (Σₗ (i : ι), α i)

The lexicographical linear order on a sigma type.

instance Sigma.Lex.orderBot E0 #

{ι : Type u_1} →
  {α : ι → Type u_2} →
    [inst : PartialOrder ι] →
      [inst_1 : OrderBot ι] → [inst_2 : (i : ι) → Preorder (α i)] → [OrderBot (α ⊥)] → OrderBot (Σₗ (i : ι), α i)

The lexicographical linear order on a sigma type.

instance Sigma.Lex.orderTop E0 #

{ι : Type u_1} →
  {α : ι → Type u_2} →
    [inst : PartialOrder ι] →
      [inst_1 : OrderTop ι] → [inst_2 : (i : ι) → Preorder (α i)] → [OrderTop (α ⊤)] → OrderTop (Σₗ (i : ι), α i)

The lexicographical linear order on a sigma type.

instance Sigma.Lex.boundedOrder E0 #

{ι : Type u_1} →
  {α : ι → Type u_2} →
    [inst : PartialOrder ι] →
      [inst_1 : BoundedOrder ι] →
        [inst_2 : (i : ι) → Preorder (α i)] → [OrderBot (α ⊥)] → [OrderTop (α ⊤)] → BoundedOrder (Σₗ (i : ι), α i)

The lexicographical linear order on a sigma type.

instance Sigma.Lex.denselyOrdered E0 #

∀ {ι : Type u_1} {α : ι → Type u_2} [inst : Preorder ι] [DenselyOrdered ι] [∀ (i : ι), Nonempty (α i)]
  [inst_3 : (i : ι) → Preorder (α i)] [∀ (i : ι), DenselyOrdered (α i)], DenselyOrdered (Σₗ (i : ι), α i)

instance Sigma.Lex.denselyOrdered_of_noMaxOrder E0 #

∀ {ι : Type u_1} {α : ι → Type u_2} [inst : Preorder ι] [inst_1 : (i : ι) → Preorder (α i)]
  [∀ (i : ι), DenselyOrdered (α i)] [∀ (i : ι), NoMaxOrder (α i)], DenselyOrdered (Σₗ (i : ι), α i)

instance Sigma.Lex.denselyOrdered_of_noMinOrder E0 #

∀ {ι : Type u_1} {α : ι → Type u_2} [inst : Preorder ι] [inst_1 : (i : ι) → Preorder (α i)]
  [∀ (i : ι), DenselyOrdered (α i)] [∀ (i : ι), NoMinOrder (α i)], DenselyOrdered (Σₗ (i : ι), α i)

instance Sigma.Lex.noMaxOrder_of_nonempty E0 #

∀ {ι : Type u_1} {α : ι → Type u_2} [inst : Preorder ι] [inst_1 : (i : ι) → Preorder (α i)] [NoMaxOrder ι]
  [∀ (i : ι), Nonempty (α i)], NoMaxOrder (Σₗ (i : ι), α i)

instance Sigma.Lex.noMinOrder_of_nonempty E0 #

∀ {ι : Type u_1} {α : ι → Type u_2} [inst : Preorder ι] [inst_1 : (i : ι) → Preorder (α i)] [NoMinOrder ι]
  [∀ (i : ι), Nonempty (α i)], NoMinOrder (Σₗ (i : ι), α i)

instance Sigma.Lex.noMaxOrder E0 #

∀ {ι : Type u_1} {α : ι → Type u_2} [inst : Preorder ι] [inst_1 : (i : ι) → Preorder (α i)]
  [∀ (i : ι), NoMaxOrder (α i)], NoMaxOrder (Σₗ (i : ι), α i)

instance Sigma.Lex.noMinOrder E0 #

∀ {ι : Type u_1} {α : ι → Type u_2} [inst : Preorder ι] [inst_1 : (i : ι) → Preorder (α i)]
  [∀ (i : ι), NoMinOrder (α i)], NoMinOrder (Σₗ (i : ι), α i)