Shortlex ordering of lists. #
Given a relation r on α, the shortlex order on List α is defined by L < M iff
L.length < M.lengthL.length = M.lengthandL < Munder the lexicographic ordering overron lists
Main results #
We show that if r is well-founded, so too is the shortlex order over r
See also #
Related files are:
Mathlib/Data/List/Lex.lean: Lexicographic order onList α.Mathlib/Data/DFinsupp/WellFounded.lean: Well-foundedness of lexicographic orders onDFinsuppandPi.
shortlex ordering #
Given a relation r on α, the shortlex order on List α, for which
[a0, ..., an] < [b0, ..., b_k] if n < k or n = k and [a0, ..., an] < [b0, ..., bk]
under the lexicographic order induced by r.
Instances For
If a list s is shorter than a list t, then s is smaller than t under any shortlex
order.
If two lists s and t have the same length, s is smaller than t under the shortlex order
over a relation r when s is smaller than t under the lexicographic order over r
If two lists s and t have the same length, s is smaller than t under the shortlex order
over a relation r exactly when s is smaller than t under the lexicographic order over r.
Alias of the forward direction of List.shortlex_cons_iff.
Alias of the reverse direction of List.shortlex_cons_iff.