Encodable
and Denumerable
instances for Finset
#
The elements of a Fintype
as a sorted list.
Equations
- Encodable.sortedUniv α = Finset.sort (⇑(Encodable.encode' α) ⁻¹'o fun (x1 x2 : ℕ) => x1 ≤ x2) Finset.univ
Instances For
@[simp]
@[simp]
@[simp]
@[simp]
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, ...]
.
Equations
- Denumerable.lower' [] x✝ = []
- Denumerable.lower' (m :: l) x✝ = (m - x✝) :: Denumerable.lower' l (m + 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.
Equations
- Denumerable.raise' [] x✝ = []
- Denumerable.raise' (m :: l) x✝ = (m + x✝) :: Denumerable.raise' l (m + x✝ + 1)
Instances For
theorem
Denumerable.raise'_chain
(l : List ℕ)
{m n : ℕ}
:
m < n → List.Chain (fun (x1 x2 : ℕ) => x1 < x2) m (raise' l n)
theorem
Denumerable.raise'_sorted
(l : List ℕ)
(n : ℕ)
:
List.Sorted (fun (x1 x2 : ℕ) => x1 < x2) (raise' l n)
raise' l n
is a strictly increasing sequence.
Makes raise' l n
into a finset. Elements are distinct thanks to raise'_sorted
.
Equations
- Denumerable.raise'Finset l n = { val := ↑(Denumerable.raise' l n), nodup := ⋯ }
Instances For
If α
is denumerable, then so is Finset α
. Warning: this is not the same encoding as used
in Finset.encodable
.
Equations
- One or more equations did not get rendered due to their size.