Commit 2026-10-16 19:45 2f3c7c8a
View on Github →feat(Data/Fin/Tuple/Sort): add descending sort Tuple.sortDesc (#43741)
Add Tuple.sortDesc, the permutation sorting a tuple f : Fin n → α into decreasing order, as the antitone counterpart of Tuple.sort. Along with it:
Tuple.antitone_sortDesc:f ∘ Tuple.sortDesc fisAntitone(mirrorsTuple.monotone_sort);Tuple.comp_perm_comp_sortDesc_eq_comp_sortDesc: the descending sorts offand of any permutation offagree (mirrorscomp_perm_comp_sort_eq_comp_sort). Split out of #41898 (majorization), which needs the decreasing rearrangement of a tuple; these are general-purpose additions to the tuple-sorting API and belong next toTuple.sort.