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
This is the quotient map that takes a list of n elements as an n-tuple and produces an nth symmetric power.
Equations
- sym.of_vector x = ⟨↑(x.val), _⟩
@[protected, instance]
Equations
- sym.has_lift = {lift := sym.of_vector n}
@[protected, instance]
Equations
- sym.has_mem = {mem := sym.mem n}
@[protected, instance]
Equations
- sym.decidable_mem a s = subtype.cases_on s (λ (s_val : multiset α) (s_property : ⇑multiset.card s_val = n), id (multiset.decidable_mem a s_val))
This is cons
but for the alternative sym'
definition.
Equations
- sym.cons' = λ (a : α), quotient.map (vector.cons a) _
Multisets of cardinality n are equivalent to length-n vectors up to permutations.
Equations
- sym.sym_equiv_sym' = equiv.subtype_quotient_equiv_quotient_subtype (λ (l : list α), l.length = n) (λ (s : multiset α), ⇑multiset.card s = n) sym.sym_equiv_sym'._proof_1 sym.sym_equiv_sym'._proof_2
@[protected, instance]
Equations
- sym.inhabited_sym n = {default := ⟨multiset.repeat (default α) n, _⟩}
@[protected, instance]
Equations
- sym.inhabited_sym' n = {default := quotient.mk' (vector.repeat (default α) n)}