Encodable
and Denumerable
instances for Multiset
#
If α
is encodable, then so is Multiset α
.
Equations
- Multiset.encodable = { encode := encodeMultiset, decode := decodeMultiset, encodek := ⋯ }
Outputs the list of differences of the input list, that is
lower [a₁, a₂, ...] n = [a₁ - n, a₂ - a₁, ...]
Equations
- Denumerable.lower [] x✝ = []
- Denumerable.lower (m :: l) x✝ = (m - x✝) :: Denumerable.lower l m
Instances For
theorem
Denumerable.raise_chain
(l : List ℕ)
(n : ℕ)
:
List.Chain (fun (x1 x2 : ℕ) => x1 ≤ x2) n (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 non-decreasing sequence.
If α
is denumerable, then so is Multiset α
. Warning: this is not the same encoding as used
in Multiset.encodable
.
Equations
- One or more equations did not get rendered due to their size.