Lexicographic order on finitely supported functions #
This file defines the lexicographic order on Finsupp
.
Finsupp.Lex r s
is the lexicographic relation on α →₀ N
, where α
is ordered by r
,
and N
is ordered by s
.
The type synonym Lex (α →₀ N)
has an order given by Finsupp.Lex (· < ·) (· < ·)
.
Equations
- Finsupp.Lex r s x y = Pi.Lex r (fun {i : α} => s) ⇑x ⇑y
Instances For
Equations
- ⋯ = ⋯
The partial order on Finsupp
s obtained by the lexicographic ordering.
See Finsupp.Lex.linearOrder
for a proof that this partial order is in fact linear.
Equations
- Finsupp.Lex.partialOrder = PartialOrder.mk ⋯
The linear order on Finsupp
s obtained by the lexicographic ordering.
Equations
- Finsupp.Lex.linearOrder = LinearOrder.mk ⋯ LinearOrder.decidableLE LinearOrder.decidableEq LinearOrder.decidableLT ⋯ ⋯ ⋯
We are about to sneak in a hypothesis that might appear to be too strong.
We assume AddLeftStrictMono
(covariant with strict inequality <
) also when proving the one
with the weak inequality ≤
. This is actually necessary: addition on Lex (α →₀ N)
may fail to
be monotone, when it is "just" monotone on N
.
See Counterexamples/ZeroDivisorsInAddMonoidAlgebras.lean
for a counterexample.
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- ⋯ = ⋯
Equations
- Finsupp.Lex.orderBot = OrderBot.mk ⋯
Equations
- Finsupp.Lex.orderedAddCancelCommMonoid = OrderedCancelAddCommMonoid.mk ⋯
Equations
- Finsupp.Lex.orderedAddCommGroup = OrderedAddCommGroup.mk ⋯
Equations
- Finsupp.Lex.linearOrderedCancelAddCommMonoid = LinearOrderedCancelAddCommMonoid.mk ⋯ LinearOrder.decidableLE LinearOrder.decidableEq LinearOrder.decidableLT ⋯ ⋯ ⋯
Equations
- Finsupp.Lex.linearOrderedAddCommGroup = LinearOrderedAddCommGroup.mk ⋯ LinearOrder.decidableLE LinearOrder.decidableEq LinearOrder.decidableLT ⋯ ⋯ ⋯