Unordered tuples of elements of a multiset #
Defines Multiset.sym
and the specialized Multiset.sym2
for computing multisets of all
unordered n-tuples from a given multiset. These are multiset versions of Nat.multichoose
.
Main declarations #
Multiset.sym2
:xs.sym2
is the multiset of all unordered pairs of elements fromxs
, with multiplicity. The multiset's values are inSym2 α
.
TODO #
Once
List.Perm.sym
is defined, defineprotected def sym (n : Nat) (m : Multiset α) : Multiset (Sym α n) := m.liftOn (fun xs => xs.sym n) (List.perm.sym n)
and then use this to remove the
DecidableEq
assumption fromFinset.sym
.theorem injective_sym2 : Function.Injective (Multiset.sym2 : Multiset α → _)
theorem strictMono_sym2 : StrictMono (Multiset.sym2 : Multiset α → _)