English
The elements of a finite type α can be listed as a sorted list when α is encodable and finite.
Русский
Элементы конечного типа α можно упорядочить в отсортированный список, если αCode-ируем.
LaTeX
$$$\\text{sortedUniv}(\\alpha) \\text{ is a sorted list of } \\alpha \\text{ under encoding}$$$
Lean4
/-- The elements of a `Fintype` as a sorted list. -/
def sortedUniv (α) [Fintype α] [Encodable α] : List α :=
Finset.univ.sort (Encodable.encode' α ⁻¹'o (· ≤ ·))