The areas / V04. Order and lattices
Mathlib.Order.Sigma.Lex
21 declarations. Mathlib docs · Source
Lexicographic order on a sigma type
This defines the lexicographical order of two arbitrary relations on a sigma type and proves some
lemmas about PSigma.Lex, which is defined in core Lean.
Given a relation in the index type and a relation on each summand, the lexicographical order on the
sigma type relates a and b if their summands are related or they are in the same summand and
related by the summand's relation.
See also
Related files are:
Combinatorics.CoLex: Colexicographic order on finite sets.Data.List.Lex: Lexicographic order on lists.Order.Sigma: Lexicographic order onΣ i, α iper se.Order.PSigma: Lexicographic order onΣ' i, α i.Order.Prod.Lex.Basic: Lexicographic order onα × β. Can be thought of as the special case ofSigma.Lexwhere all summands are the same
PSigma
inductive Sigma.Lex E1 #
{ι : Type u_1} →
{α : ι → Type u_2} → (ι → ι → Prop) → ((i : ι) → α i → α i → Prop) → (i : ι) × α i → (i : ι) × α i → Prop
The lexicographical order on a sigma type. It takes in a relation on the index type and a
relation for each summand. a is related to b iff their summands are related or they are in the
same summand and are related through the summand's relation.
ctor Sigma.Lex.left E0 #
∀ {ι : Type u_1} {α : ι → Type u_2} {r : ι → ι → Prop} {s : (i : ι) → α i → α i → Prop} {i j : ι} (a : α i) (b : α j),
r i j → Sigma.Lex r s ⟨i, a⟩ ⟨j, b⟩
ctor Sigma.Lex.right E0 #
∀ {ι : Type u_1} {α : ι → Type u_2} {r : ι → ι → Prop} {s : (i : ι) → α i → α i → Prop} {i : ι} (a b : α i),
s i a b → Sigma.Lex r s ⟨i, a⟩ ⟨i, b⟩
theorem Sigma.lex_iff E0 #
∀ {ι : Type u_1} {α : ι → Type u_2} {r : ι → ι → Prop} {s : (i : ι) → α i → α i → Prop} {a b : (i : ι) × α i},
Sigma.Lex r s a b ↔ r a.fst b.fst ∨ ∃ (h : a.fst = b.fst), s b.fst (h ▸ a.snd) b.snd
instance Sigma.Lex.decidable E0 #
{ι : Type u_1} →
{α : ι → Type u_2} →
(r : ι → ι → Prop) →
(s : (i : ι) → α i → α i → Prop) →
[DecidableEq ι] → [DecidableRel r] → [(i : ι) → DecidableRel (s i)] → DecidableRel (Sigma.Lex r s)
theorem Sigma.Lex.mono E1 #
∀ {ι : Type u_1} {α : ι → Type u_2} {r₁ r₂ : ι → ι → Prop} {s₁ s₂ : (i : ι) → α i → α i → Prop},
(∀ (a b : ι), r₁ a b → r₂ a b) →
(∀ (i : ι) (a b : α i), s₁ i a b → s₂ i a b) → ∀ {a b : (i : ι) × α i}, Sigma.Lex r₁ s₁ a b → Sigma.Lex r₂ s₂ a b
theorem Sigma.Lex.mono_left E1 #
∀ {ι : Type u_1} {α : ι → Type u_2} {r₁ r₂ : ι → ι → Prop} {s : (i : ι) → α i → α i → Prop},
(∀ (a b : ι), r₁ a b → r₂ a b) → ∀ {a b : (i : ι) × α i}, Sigma.Lex r₁ s a b → Sigma.Lex r₂ s a b
theorem Sigma.Lex.mono_right E1 #
∀ {ι : Type u_1} {α : ι → Type u_2} {r : ι → ι → Prop} {s₁ s₂ : (i : ι) → α i → α i → Prop},
(∀ (i : ι) (a b : α i), s₁ i a b → s₂ i a b) → ∀ {a b : (i : ι) × α i}, Sigma.Lex r s₁ a b → Sigma.Lex r s₂ a b
theorem Sigma.lex_swap E1 #
∀ {ι : Type u_1} {α : ι → Type u_2} {r : ι → ι → Prop} {s : (i : ι) → α i → α i → Prop} {a b : (i : ι) × α i},
Sigma.Lex (Function.swap r) s a b ↔ Sigma.Lex r (fun i ↦ Function.swap (s i)) b a
instance Sigma.instReflLex E0 #
∀ {ι : Type u_1} {α : ι → Type u_2} {r : ι → ι → Prop} {s : (i : ι) → α i → α i → Prop} [∀ (i : ι), Std.Refl (s i)],
Std.Refl (Sigma.Lex r s)
instance Sigma.instIrreflLex E0 #
∀ {ι : Type u_1} {α : ι → Type u_2} {r : ι → ι → Prop} {s : (i : ι) → α i → α i → Prop} [Std.Irrefl r]
[∀ (i : ι), Std.Irrefl (s i)], Std.Irrefl (Sigma.Lex r s)
instance Sigma.instIsTransLex E0 #
∀ {ι : Type u_1} {α : ι → Type u_2} {r : ι → ι → Prop} {s : (i : ι) → α i → α i → Prop} [IsTrans ι r]
[∀ (i : ι), IsTrans (α i) (s i)], IsTrans ((i : ι) × α i) (Sigma.Lex r s)
instance Sigma.instSymmLex E0 #
∀ {ι : Type u_1} {α : ι → Type u_2} {r : ι → ι → Prop} {s : (i : ι) → α i → α i → Prop} [Std.Symm r]
[∀ (i : ι), Std.Symm (s i)], Std.Symm (Sigma.Lex r s)
instance Sigma.instAntisymmLexOfAsymm E0 #
∀ {ι : Type u_1} {α : ι → Type u_2} {r : ι → ι → Prop} {s : (i : ι) → α i → α i → Prop} [Std.Asymm r]
[∀ (i : ι), Std.Antisymm (s i)], Std.Antisymm (Sigma.Lex r s)
instance Sigma.instTotalLexOfTrichotomous E0 #
∀ {ι : Type u_1} {α : ι → Type u_2} {r : ι → ι → Prop} {s : (i : ι) → α i → α i → Prop} [Std.Trichotomous r]
[∀ (i : ι), Std.Total (s i)], Std.Total (Sigma.Lex r s)
instance Sigma.instTrichotomousLex E0 #
∀ {ι : Type u_1} {α : ι → Type u_2} {r : ι → ι → Prop} {s : (i : ι) → α i → α i → Prop} [Std.Trichotomous r]
[∀ (i : ι), Std.Trichotomous (s i)], Std.Trichotomous (Sigma.Lex r s)
theorem PSigma.lex_iff E0 #
∀ {ι : Sort u_1} {α : ι → Sort u_2} {r : ι → ι → Prop} {s : (i : ι) → α i → α i → Prop} {a b : (i : ι) ×' α i},
PSigma.Lex r s a b ↔ r a.fst b.fst ∨ ∃ (h : a.fst = b.fst), s b.fst (h ▸ a.snd) b.snd
instance PSigma.Lex.decidable E0 #
{ι : Sort u_1} →
{α : ι → Sort u_2} →
(r : ι → ι → Prop) →
(s : (i : ι) → α i → α i → Prop) →
[DecidableEq ι] → [DecidableRel r] → [(i : ι) → DecidableRel (s i)] → DecidableRel (PSigma.Lex r s)
theorem PSigma.Lex.mono E1 #
∀ {ι : Sort u_1} {α : ι → Sort u_2} {r₁ r₂ : ι → ι → Prop} {s₁ s₂ : (i : ι) → α i → α i → Prop},
(∀ (a b : ι), r₁ a b → r₂ a b) →
(∀ (i : ι) (a b : α i), s₁ i a b → s₂ i a b) → ∀ {a b : (i : ι) ×' α i}, PSigma.Lex r₁ s₁ a b → PSigma.Lex r₂ s₂ a b
theorem PSigma.Lex.mono_left E1 #
∀ {ι : Sort u_1} {α : ι → Sort u_2} {r₁ r₂ : ι → ι → Prop} {s : (i : ι) → α i → α i → Prop},
(∀ (a b : ι), r₁ a b → r₂ a b) → ∀ {a b : (i : ι) ×' α i}, PSigma.Lex r₁ s a b → PSigma.Lex r₂ s a b
theorem PSigma.Lex.mono_right E1 #
∀ {ι : Sort u_1} {α : ι → Sort u_2} {r : ι → ι → Prop} {s₁ s₂ : (i : ι) → α i → α i → Prop},
(∀ (i : ι) (a b : α i), s₁ i a b → s₂ i a b) → ∀ {a b : (i : ι) ×' α i}, PSigma.Lex r s₁ a b → PSigma.Lex r s₂ a b