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
@[protected, instance]
Equations
- sym.has_coe α n = coe_subtype
@[simp]
@[protected, instance]
Equations
- sym.decidable_mem a s = multiset.decidable_mem a s.val
@[simp]
theorem
sym.erase_mk
{α : Type u_1}
{n : ℕ}
[decidable_eq α]
(m : multiset α)
(hc : ⇑multiset.card m = n + 1)
(a : α)
(h : a ∈ m) :
@[simp]
theorem
sym.cons_erase
{α : Type u_1}
{n : ℕ}
[decidable_eq α]
{s : sym α n.succ}
{a : α}
(h : a ∈ s) :
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.has_zero = {zero := ⟨0, _⟩}
@[protected, instance]
Equations
- sym.has_emptyc = {emptyc := 0}
@[protected, instance]
Equations
- sym.unique_zero = {to_inhabited := {default := sym.nil α}, uniq := _}
repeat a n
is the sym containing only a
with multiplicity n
.
Equations
- sym.repeat a n = ⟨multiset.repeat a n, _⟩
@[simp]
theorem
sym.eq_repeat_iff
{α : Type u_1}
{n : ℕ}
{s : sym α n}
{a : α} :
s = sym.repeat a n ↔ ∀ (b : α), b ∈ s → b = a
theorem
sym.eq_repeat
{α : Type u_1}
{a : α}
{n : ℕ}
{s : sym α n} :
s = sym.repeat a n ↔ ∀ (b : α), b ∈ s → b = a
theorem
sym.eq_repeat_of_subsingleton
{α : Type u_1}
[subsingleton α]
(a : α)
{n : ℕ}
(s : sym α n) :
s = sym.repeat a n
@[protected, instance]
@[protected, instance]
Equations
- sym.inhabited_sym n = {default := sym.repeat default n}
@[protected, instance]
Equations
- sym.inhabited_sym' n = {default := quotient.mk' (vector.repeat default n)}
@[protected, instance]
Equations
- sym.unique n = unique.mk' (sym α n)
theorem
sym.repeat_left_inj
{α : Type u_1}
{a b : α}
{n : ℕ}
(h : n ≠ 0) :
sym.repeat a n = sym.repeat b n ↔ a = b
theorem
sym.repeat_left_injective
{α : Type u_1}
{n : ℕ}
(h : n ≠ 0) :
function.injective (λ (x : α), sym.repeat x n)
@[protected, instance]
@[simp]
Note: sym.map_id
is not simp-normal, as simp ends up unfolding id
with sym.map_congr
@[simp]
theorem
sym.map_mk
{α : Type u_1}
{β : Type u_2}
{n : ℕ}
{f : α → β}
{m : multiset α}
{hc : ⇑multiset.card m = n} :
sym.map f (sym.mk m hc) = sym.mk (multiset.map f m) _
@[simp]
theorem
sym.coe_map
{α : Type u_1}
{β : Type u_2}
{n : ℕ}
(s : sym α n)
(f : α → β) :
↑(sym.map f s) = multiset.map f ↑s
theorem
sym.map_injective
{α : Type u_1}
{β : Type u_2}
{f : α → β}
(hf : function.injective f)
(n : ℕ) :
@[simp]
theorem
sym.equiv_congr_apply
{α : Type u_1}
{β : Type u_2}
{n : ℕ}
(e : α ≃ β)
(x : sym α n) :
⇑(sym.equiv_congr e) x = sym.map ⇑e x