Symmetric powers #
This file defines symmetric powers of a type. The nth symmetric power consists of homogeneous n-tuples modulo permutations by the symmetric group.
The special case of 2-tuples is called the symmetric square, which is
addressed in more detail in Data.Sym.Sym2.
TODO: This was created as supporting material for Sym2; it
needs a fleshed-out interface.
Tags #
symmetric powers
The nth symmetric power is n-tuples up to permutation. We define it
as a subtype of Multiset since these are well developed in the
library. We also give a definition Sym.sym' in terms of vectors, and we
show these are equivalent in Sym.symEquivSym'.
Instances For
The canonical map to Multiset α that forgets that s has length n
Instances For
This is the List.Perm setoid lifted to Vector.
See note [reducible non-instances].
Instances For
Inserts an element into the term of Sym α n, increasing the length by one.
Instances For
This is the quotient map that takes a list of n elements as an n-tuple and produces an nth symmetric power.
Instances For
This is the quotient map that takes a list of n elements as an n-tuple and produces an nth symmetric power.
α ∈ s means that a appears as one of the factors in s.
Multisets of cardinality n are equivalent to length-n vectors up to permutations.
Instances For
replicate n a is the sym containing only a with multiplicity n.
Instances For
Note: Sym.map_id is not simp-normal, as simp ends up unfolding id with Sym.map_congr
"Attach" a proof that a ∈ s to each element a in s to produce
an element of the symmetric power on {x // x ∈ s}.
Instances For
Append a pair of Sym terms.
Instances For
a ↦ {a} as an equivalence between α and Sym α 1.
Instances For
Combinatorial equivalences #
Function from the symmetric product over Option splitting on whether or not
it contains a none.
Instances For
Inverse of Sym_option_succ_equiv.decode.
Instances For
The symmetric product over Option is a disjoint union over simpler symmetric products.