Lexicographic order on finitely supported dependent functions #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file defines the lexicographic order on dfinsupp
.
dfinsupp.lex r s
is the lexicographic relation on Π₀ i, α i
, where ι
is ordered by r
,
and α i
is ordered by s i
.
The type synonym lex (Π₀ i, α i)
has an order given by dfinsupp.lex (<) (λ i, (<))
.
Equations
- dfinsupp.lex r s x y = pi.lex r s ⇑x ⇑y
The partial order on dfinsupp
s obtained by the lexicographic ordering.
See dfinsupp.lex.linear_order
for a proof that this partial order is in fact linear.
The linear order on dfinsupp
s obtained by the lexicographic ordering.
Equations
- dfinsupp.lex.linear_order = {le := partial_order.le dfinsupp.lex.partial_order, lt := partial_order.lt dfinsupp.lex.partial_order, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, le_total := _, decidable_le := λ (a b : lex (Π₀ (i : ι), α i)), dfinsupp.lex.decidable_le a b, decidable_eq := λ (a b : lex (Π₀ (i : ι), α i)), dfinsupp.decidable_eq a b, decidable_lt := λ (a b : lex (Π₀ (i : ι), α i)), dfinsupp.lex.decidable_lt a b, max := max_default (λ (a b : lex (Π₀ (i : ι), α i)), dfinsupp.lex.decidable_le a b), max_def := _, min := min_default (λ (a b : lex (Π₀ (i : ι), α i)), dfinsupp.lex.decidable_le a b), min_def := _}
We are about to sneak in a hypothesis that might appear to be too strong.
We assume covariant_class
with strict inequality <
also when proving the one with the
weak inequality ≤
. This is actually necessary: addition on lex (Π₀ i, α i)
may fail to be
monotone, when it is "just" monotone on α i
.