Encodable and Denumerable instances for Finset #
@[implicit_reducible]
If α is encodable, then so is Finset α.
The elements of a Fintype as a sorted list.
Instances For
@[simp]
@[simp]
theorem
Encodable.length_sortedUniv
(α : Type u_1)
[Fintype α]
[Encodable α]
:
(sortedUniv α).length = Fintype.card α
@[simp]
@[simp]
theorem
Encodable.sortedUniv_toFinset
(α : Type u_1)
[Fintype α]
[Encodable α]
[DecidableEq α]
:
(sortedUniv α).toFinset = Finset.univ
An encodable Fintype is equivalent to the same size Fin.
Instances For
Outputs the list of differences minus one of the input list, that is
lower' [a₁, a₂, a₃, ...] n = [a₁ - n, a₂ - a₁ - 1, a₃ - a₂ - 1, ...].
Instances For
Outputs the list of partial sums plus one of the input list, that is
raise [a₁, a₂, a₃, ...] n = [n + a₁, n + a₁ + a₂ + 1, n + a₁ + a₂ + a₃ + 2, ...]. Adding one each
time ensures the elements are distinct.
Instances For
raise' l n is a strictly increasing sequence.
Makes raise' l n into a finset. Elements are distinct thanks to raise'_sorted.
Instances For
@[implicit_reducible]
If α is denumerable, then so is Finset α. Warning: this is not the same encoding as used
in Finset.encodable.