Documentation

Mathlib.Logic.Equiv.Multiset

Encodable and Denumerable instances for Multiset #

def encodeMultiset {α : Type u_1} [Encodable α] (s : Multiset α) :

Explicit encoding function for Multiset α

Equations
def decodeMultiset {α : Type u_1} [Encodable α] (n : ) :

Explicit decoding function for Multiset α

Equations
instance Multiset.encodable {α : Type u_1} [Encodable α] :

If α is encodable, then so is Multiset α.

Equations

Outputs the list of differences of the input list, that is lower [a₁, a₂, ...] n = [a₁ - n, a₂ - a₁, ...]

Equations

Outputs the list of partial sums of the input list, that is raise [a₁, a₂, ...] n = [n + a₁, n + a₁ + a₂, ...]

Equations
theorem Denumerable.lower_raise (l : List ) (n : ) :
lower (raise l n) n = l
theorem Denumerable.raise_lower {l : List } {n : } :
List.Sorted (fun (x1 x2 : ) => x1 x2) (n :: l)raise (lower l n) n = l
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.