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
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
The linear order on Finsupp
s obtained by the lexicographic ordering.
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.