Lexicographic order on Pi types #
This file defines the lexicographic order for Pi types. a
is less than b
if a i = b i
for all
i
up to some point k
, and a k < b k
.
Notation #
Πₗ i, α i
: Pi type equipped with the lexicographic order. Type synonym ofΠ i, α i
.
See also #
Related files are:
The notation Πₗ i, α i
refers to a pi type equipped with the lexicographic order.
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[simp]
theorem
Pi.toLex_apply
{ι : Type u_1}
{β : ι → Type u_2}
(x : (i : ι) → β i)
(i : ι)
:
↑toLex x i = x i
theorem
Pi.lex_lt_of_lt
{ι : Type u_1}
{β : ι → Type u_2}
[(i : ι) → PartialOrder (β i)]
{r : ι → ι → Prop}
(hwf : WellFounded r)
{x : (i : ι) → β i}
{y : (i : ι) → β i}
(hlt : x < y)
:
theorem
Pi.isTrichotomous_lex
{ι : Type u_1}
{β : ι → Type u_2}
(r : ι → ι → Prop)
(s : {i : ι} → β i → β i → Prop)
[∀ (i : ι), IsTrichotomous (β i) (s i)]
(wf : WellFounded r)
:
IsTrichotomous ((i : ι) → β i) (Pi.Lex r s)
instance
Pi.Lex.isStrictOrder
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[(a : ι) → PartialOrder (β a)]
:
IsStrictOrder (Lex ((i : ι) → β i)) fun x x_1 => x < x_1
instance
Pi.instPartialOrderLexForAll
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[(a : ι) → PartialOrder (β a)]
:
PartialOrder (Lex ((i : ι) → β i))
Equations
- Pi.instPartialOrderLexForAll = partialOrderOfSO fun x x_1 => x < x_1
noncomputable instance
Pi.instLinearOrderLexForAll
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(a : ι) → LinearOrder (β a)]
:
LinearOrder (Lex ((i : ι) → β i))
Πₗ i, α i
is a linear order if the original order is well-founded.
Equations
- Pi.instLinearOrderLexForAll = linearOrderOfSTO fun x x_1 => x < x_1
theorem
Pi.toLex_monotone
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → PartialOrder (β i)]
:
Monotone ↑toLex
theorem
Pi.toLex_strictMono
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → PartialOrder (β i)]
:
StrictMono ↑toLex
@[simp]
theorem
Pi.lt_toLex_update_self_iff
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → PartialOrder (β i)]
{x : (i : ι) → β i}
{i : ι}
{a : β i}
:
↑toLex x < ↑toLex (Function.update x i a) ↔ x i < a
@[simp]
theorem
Pi.toLex_update_lt_self_iff
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → PartialOrder (β i)]
{x : (i : ι) → β i}
{i : ι}
{a : β i}
:
↑toLex (Function.update x i a) < ↑toLex x ↔ a < x i
@[simp]
theorem
Pi.le_toLex_update_self_iff
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → PartialOrder (β i)]
{x : (i : ι) → β i}
{i : ι}
{a : β i}
:
↑toLex x ≤ ↑toLex (Function.update x i a) ↔ x i ≤ a
@[simp]
theorem
Pi.toLex_update_le_self_iff
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → PartialOrder (β i)]
{x : (i : ι) → β i}
{i : ι}
{a : β i}
:
↑toLex (Function.update x i a) ≤ ↑toLex x ↔ a ≤ x i
instance
Pi.instOrderBotLexForAllToLEToPreorderInstPartialOrderLexForAll
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(a : ι) → PartialOrder (β a)]
[(a : ι) → OrderBot (β a)]
:
Equations
- Pi.instOrderBotLexForAllToLEToPreorderInstPartialOrderLexForAll = OrderBot.mk (_ : ∀ (x : Lex ((a : ι) → β a)), ↑toLex ⊥ ≤ ↑toLex x)
instance
Pi.instOrderTopLexForAllToLEToPreorderInstPartialOrderLexForAll
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(a : ι) → PartialOrder (β a)]
[(a : ι) → OrderTop (β a)]
:
Equations
- Pi.instOrderTopLexForAllToLEToPreorderInstPartialOrderLexForAll = OrderTop.mk (_ : ∀ (x : Lex ((a : ι) → β a)), ↑toLex x ≤ ↑toLex ⊤)
instance
Pi.instBoundedOrderLexForAllToLEToPreorderInstPartialOrderLexForAll
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(a : ι) → PartialOrder (β a)]
[(a : ι) → BoundedOrder (β a)]
:
BoundedOrder (Lex ((a : ι) → β a))
Equations
- Pi.instBoundedOrderLexForAllToLEToPreorderInstPartialOrderLexForAll = BoundedOrder.mk
instance
Pi.instDenselyOrderedLexForAllInstLTLexForAllToLT
{ι : Type u_1}
{β : ι → Type u_2}
[Preorder ι]
[(i : ι) → LT (β i)]
[∀ (i : ι), DenselyOrdered (β i)]
:
DenselyOrdered (Lex ((i : ι) → β i))
theorem
Pi.Lex.noMaxOrder'
{ι : Type u_1}
{β : ι → Type u_2}
[Preorder ι]
[(i : ι) → LT (β i)]
(i : ι)
[NoMaxOrder (β i)]
:
NoMaxOrder (Lex ((i : ι) → β i))
instance
Pi.instNoMaxOrderLexForAllInstLTLexForAllToLTToPreorderToPartialOrderToSemilatticeInfToLatticeInstDistribLatticeToLTToPreorder
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[Nonempty ι]
[(i : ι) → PartialOrder (β i)]
[∀ (i : ι), NoMaxOrder (β i)]
:
NoMaxOrder (Lex ((i : ι) → β i))
Equations
- One or more equations did not get rendered due to their size.
instance
Pi.instNoMinOrderLexForAllInstLTLexForAllToLTToPreorderToPartialOrderToSemilatticeInfToLatticeInstDistribLatticeToLTToPreorder
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[Nonempty ι]
[(i : ι) → PartialOrder (β i)]
[∀ (i : ι), NoMinOrder (β i)]
:
NoMinOrder (Lex ((i : ι) → β i))
Equations
- One or more equations did not get rendered due to their size.
instance
Pi.Lex.orderedAddCancelCommMonoid
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[(i : ι) → OrderedCancelAddCommMonoid (β i)]
:
OrderedCancelAddCommMonoid (Lex ((i : ι) → β i))
Equations
- One or more equations did not get rendered due to their size.
abbrev
Pi.Lex.orderedAddCancelCommMonoid.match_1
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[(i : ι) → OrderedCancelAddCommMonoid (β i)]
:
(x x_1 : Lex ((i : ι) → β i)) →
(motive : x < x_1 → Prop) →
∀ (x_2 : x < x_1),
(∀ (i : ι) (hi : (∀ (j : ι), j < i → x j = x_1 j) ∧ (fun x x_3 x_4 => x_3 < x_4) i (x i) (x_1 i)),
motive (_ : ∃ i, (∀ (j : ι), j < i → x j = x_1 j) ∧ (fun x x_3 x_4 => x_3 < x_4) i (x i) (x_1 i))) →
motive x_2
Equations
- Pi.Lex.orderedAddCancelCommMonoid.match_1 x x motive x h_1 = Exists.casesOn x fun w h => h_1 w h
Instances For
theorem
Pi.Lex.orderedAddCancelCommMonoid.proof_2
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[(i : ι) → OrderedCancelAddCommMonoid (β i)]
:
abbrev
Pi.Lex.orderedAddCancelCommMonoid.match_2
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[(i : ι) → OrderedCancelAddCommMonoid (β i)]
:
(x x_1 x_2 : Lex ((i : ι) → β i)) →
(motive : x + x_1 < x + x_2 → Prop) →
∀ (x_3 : x + x_1 < x + x_2),
(∀ (i : ι)
(hi :
(∀ (j : ι),
j < i →
(Lex ((i : ι) → β i) + Lex ((i : ι) → β i)) (Lex ((i : ι) → β i)) instHAdd x x_1 j = (Lex ((i : ι) → β i) + Lex ((i : ι) → β i)) (Lex ((i : ι) → β i)) instHAdd x x_2 j) ∧ (fun x x_4 x_5 => x_4 < x_5) i
((Lex ((i : ι) → β i) + Lex ((i : ι) → β i)) (Lex ((i : ι) → β i)) instHAdd x x_1 i)
((Lex ((i : ι) → β i) + Lex ((i : ι) → β i)) (Lex ((i : ι) → β i)) instHAdd x x_2 i)),
motive
(_ :
∃ i,
(∀ (j : ι),
j < i →
(Lex ((i : ι) → β i) + Lex ((i : ι) → β i)) (Lex ((i : ι) → β i)) instHAdd x x_1 j = (Lex ((i : ι) → β i) + Lex ((i : ι) → β i)) (Lex ((i : ι) → β i)) instHAdd x x_2 j) ∧ (fun x x_4 x_5 => x_4 < x_5) i
((Lex ((i : ι) → β i) + Lex ((i : ι) → β i)) (Lex ((i : ι) → β i)) instHAdd x x_1 i)
((Lex ((i : ι) → β i) + Lex ((i : ι) → β i)) (Lex ((i : ι) → β i)) instHAdd x x_2 i))) →
motive x_3
Equations
- Pi.Lex.orderedAddCancelCommMonoid.match_2 x x x motive x h_1 = Exists.casesOn x fun w h => h_1 w h
Instances For
theorem
Pi.Lex.orderedAddCancelCommMonoid.proof_1
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[(i : ι) → OrderedCancelAddCommMonoid (β i)]
:
instance
Pi.Lex.orderedCancelCommMonoid
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[(i : ι) → OrderedCancelCommMonoid (β i)]
:
OrderedCancelCommMonoid (Lex ((i : ι) → β i))
Equations
- One or more equations did not get rendered due to their size.
theorem
Pi.Lex.orderedAddCommGroup.proof_1
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[(i : ι) → OrderedAddCommGroup (β i)]
:
instance
Pi.Lex.orderedAddCommGroup
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[(i : ι) → OrderedAddCommGroup (β i)]
:
OrderedAddCommGroup (Lex ((i : ι) → β i))
instance
Pi.Lex.orderedCommGroup
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[(i : ι) → OrderedCommGroup (β i)]
:
OrderedCommGroup (Lex ((i : ι) → β i))
theorem
Pi.Lex.linearOrderedAddCancelCommMonoid.proof_5
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → LinearOrderedCancelAddCommMonoid (β i)]
(a : Lex ((i : ι) → β i))
(b : Lex ((i : ι) → β i))
:
theorem
Pi.Lex.linearOrderedAddCancelCommMonoid.proof_4
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → LinearOrderedCancelAddCommMonoid (β i)]
(a : Lex ((i : ι) → β i))
(b : Lex ((i : ι) → β i))
:
theorem
Pi.Lex.linearOrderedAddCancelCommMonoid.proof_6
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → LinearOrderedCancelAddCommMonoid (β i)]
(a : Lex ((i : ι) → β i))
(b : Lex ((i : ι) → β i))
:
compare a b = compareOfLessAndEq a b
theorem
Pi.Lex.linearOrderedAddCancelCommMonoid.proof_2
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[(i : ι) → LinearOrderedCancelAddCommMonoid (β i)]
(a : Lex ((i : ι) → β i))
(b : Lex ((i : ι) → β i))
(c : Lex ((i : ι) → β i))
:
theorem
Pi.Lex.linearOrderedAddCancelCommMonoid.proof_1
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[(i : ι) → LinearOrderedCancelAddCommMonoid (β i)]
(a : Lex ((i : ι) → β i))
(b : Lex ((i : ι) → β i))
:
theorem
Pi.Lex.linearOrderedAddCancelCommMonoid.proof_3
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → LinearOrderedCancelAddCommMonoid (β i)]
(a : Lex ((i : ι) → β i))
(b : Lex ((i : ι) → β i))
:
noncomputable instance
Pi.Lex.linearOrderedAddCancelCommMonoid
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → LinearOrderedCancelAddCommMonoid (β i)]
:
LinearOrderedCancelAddCommMonoid (Lex ((i : ι) → β i))
Equations
- One or more equations did not get rendered due to their size.
noncomputable instance
Pi.Lex.linearOrderedCancelCommMonoid
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → LinearOrderedCancelCommMonoid (β i)]
:
LinearOrderedCancelCommMonoid (Lex ((i : ι) → β i))
Equations
- One or more equations did not get rendered due to their size.
theorem
Pi.Lex.linearOrderedAddCommGroup.proof_1
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → LinearOrderedAddCommGroup (β i)]
:
theorem
Pi.Lex.linearOrderedAddCommGroup.proof_3
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → LinearOrderedAddCommGroup (β i)]
(a : Lex ((i : ι) → β i))
(b : Lex ((i : ι) → β i))
:
theorem
Pi.Lex.linearOrderedAddCommGroup.proof_4
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → LinearOrderedAddCommGroup (β i)]
(a : Lex ((i : ι) → β i))
(b : Lex ((i : ι) → β i))
:
noncomputable instance
Pi.Lex.linearOrderedAddCommGroup
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → LinearOrderedAddCommGroup (β i)]
:
LinearOrderedAddCommGroup (Lex ((i : ι) → β i))
Equations
- One or more equations did not get rendered due to their size.
theorem
Pi.Lex.linearOrderedAddCommGroup.proof_5
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → LinearOrderedAddCommGroup (β i)]
(a : Lex ((i : ι) → β i))
(b : Lex ((i : ι) → β i))
:
compare a b = compareOfLessAndEq a b
theorem
Pi.Lex.linearOrderedAddCommGroup.proof_2
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → LinearOrderedAddCommGroup (β i)]
(a : Lex ((i : ι) → β i))
(b : Lex ((i : ι) → β i))
:
noncomputable instance
Pi.Lex.linearOrderedCommGroup
{ι : Type u_1}
{β : ι → Type u_2}
[LinearOrder ι]
[IsWellOrder ι fun x x_1 => x < x_1]
[(i : ι) → LinearOrderedCommGroup (β i)]
:
LinearOrderedCommGroup (Lex ((i : ι) → β i))
Equations
- One or more equations did not get rendered due to their size.
theorem
Pi.lex_desc
{ι : Type u_1}
{α : Type u_3}
[Preorder ι]
[DecidableEq ι]
[Preorder α]
{f : ι → α}
{i : ι}
{j : ι}
(h₁ : i ≤ j)
(h₂ : f j < f i)
:
↑toLex (f ∘ ↑(Equiv.swap i j)) < ↑toLex f
If we swap two strictly decreasing values in a function, then the result is lexicographically smaller than the original function.