Unordered tuples of elements of a list #
Defines List.sym
and the specialized List.sym2
for computing lists of all unordered n-tuples
from a given list. These are list versions of Nat.multichoose
.
Main declarations #
List.sym
:xs.sym n
is a list of all unordered n-tuples of elements fromxs
, with multiplicity. The list's values are inSym α n
.List.sym2
:xs.sym2
is a list of all unordered pairs of elements fromxs
, with multiplicity. The list's values are inSym2 α
.
TODO #
theorem
List.map_mk_disjoint_sym2
{α : Type u_1}
(x : α)
(xs : List α)
(h : x ∉ xs)
:
(List.map (fun (y : α) => s(x, y)) xs).Disjoint xs.sym2
theorem
List.Sublist.sym2
{α : Type u_1}
{xs ys : List α}
(h : xs.Sublist ys)
:
xs.sym2.Sublist ys.sym2
theorem
List.Subperm.sym2
{α : Type u_1}
{xs ys : List α}
(h : xs.Subperm ys)
:
xs.sym2.Subperm ys.sym2
@[irreducible]
xs.sym n
is all unordered n
-tuples from the list xs
in some order.
Equations
Instances For
theorem
List.sym2_eq_sym_two
{α : Type u_1}
{xs : List α}
:
List.map (⇑(Sym2.equivSym α)) xs.sym2 = List.sym 2 xs