mathlib documentation

data.sym.basic

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

def sym (α : Type u) (n : ) :
Type u

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.sym_equiv_sym'.

Equations
@[protected, instance]
def sym.has_coe (α : Type u_1) (n : ) :
has_coe (sym α n) (multiset α)
Equations
def vector.perm.is_setoid (α : Type u) (n : ) :
setoid (vector α n)

This is the list.perm setoid lifted to vector.

See note [reducible non-instances].

Equations
def sym.nil {α : Type u} :
sym α 0

The unique element in sym α 0.

Equations
def sym.cons {α : Type u} {n : } (a : α) (s : sym α n) :
sym α n.succ

Inserts an element into the term of sym α n, increasing the length by one.

Equations
@[simp]
theorem sym.cons_inj_right {α : Type u} {n : } (a : α) (s s' : sym α n) :
a::s = a::s' s = s'
@[simp]
theorem sym.cons_inj_left {α : Type u} {n : } (a a' : α) (s : sym α n) :
a::s = a'::s a = a'
theorem sym.cons_swap {α : Type u} {n : } (a b : α) (s : sym α n) :
a::b::s = b::a::s
@[protected, instance]
def sym.has_lift {α : Type u} {n : } :
has_lift (vector α n) (sym α n)

This is the quotient map that takes a list of n elements as an n-tuple and produces an nth symmetric power.

Equations
@[simp]
theorem sym.of_vector_nil {α : Type u} :
@[simp]
theorem sym.of_vector_cons {α : Type u} {n : } (a : α) (v : vector α n) :
@[protected, instance]
def sym.has_mem {α : Type u} {n : } :
has_mem α (sym α n)

α ∈ s means that a appears as one of the factors in s.

Equations
@[protected, instance]
def sym.decidable_mem {α : Type u} {n : } [decidable_eq α] (a : α) (s : sym α n) :
Equations
@[simp]
theorem sym.mem_cons {α : Type u} {n : } {a b : α} {s : sym α n} :
a b::s a = b a s
theorem sym.mem_cons_of_mem {α : Type u} {n : } {a b : α} {s : sym α n} (h : a s) :
a b::s
@[simp]
theorem sym.mem_cons_self {α : Type u} {n : } (a : α) (s : sym α n) :
a a::s
theorem sym.cons_of_coe_eq {α : Type u} {n : } (a : α) (v : vector α n) :
theorem sym.sound {α : Type u} {n : } {a b : vector α n} (h : a.val ~ b.val) :
def sym.erase {α : Type u} {n : } [decidable_eq α] (s : sym α (n + 1)) (a : α) (h : a s) :
sym α n

erase s a h is the sym that subtracts 1 from the multiplicity of a if a is present in the sym.

Equations
@[simp]
theorem sym.cons_erase {α : Type u} {n : } [decidable_eq α] (s : sym α (n + 1)) (a : α) (h : a s) :
a::s.erase a h = s
def sym.sym' (α : Type u) (n : ) :
Type u

Another definition of the nth symmetric power, using vectors modulo permutations. (See sym.)

Equations
def sym.cons' {α : Type u} {n : } :
α → sym.sym' α nsym.sym' α n.succ

This is cons but for the alternative sym' definition.

Equations
def sym.sym_equiv_sym' {α : Type u} {n : } :
sym α n sym.sym' α n

Multisets of cardinality n are equivalent to length-n vectors up to permutations.

Equations
theorem sym.cons_equiv_eq_equiv_cons (α : Type u) (n : ) (a : α) (s : sym α n) :
@[protected, instance]
def sym.has_zero {α : Type u} :
has_zero (sym α 0)
Equations
@[protected, instance]
def sym.has_emptyc {α : Type u} :
Equations
theorem sym.eq_nil_of_card_zero {α : Type u} (s : sym α 0) :
@[protected, instance]
def sym.unique_zero {α : Type u} :
unique (sym α 0)
Equations
def sym.repeat {α : Type u} (a : α) (n : ) :
sym α n

repeat a n is the sym containing only a with multiplicity n.

Equations
theorem sym.repeat_succ {α : Type u} {a : α} {n : } :
theorem sym.coe_repeat {α : Type u} {n : } {a : α} :
@[simp]
theorem sym.mem_repeat {α : Type u} {n : } {a b : α} :
b sym.repeat a n n 0 b = a
theorem sym.eq_repeat_iff {α : Type u} {n : } {s : sym α n} {a : α} :
s = sym.repeat a n ∀ (b : α), b sb = a
theorem sym.exists_mem {α : Type u} {n : } (s : sym α n.succ) :
∃ (a : α), a s
theorem sym.exists_eq_cons_of_succ {α : Type u} {n : } (s : sym α n.succ) :
∃ (a : α) (s' : sym α n), s = a::s'
theorem sym.eq_repeat {α : Type u} {a : α} {n : } {s : sym α n} :
s = sym.repeat a n ∀ (b : α), b sb = a
theorem sym.eq_repeat_of_subsingleton {α : Type u} [subsingleton α] (a : α) {n : } (s : sym α n) :
@[protected, instance]
def sym.subsingleton {α : Type u} [subsingleton α] (n : ) :
@[protected, instance]
def sym.inhabited_sym {α : Type u} [inhabited α] (n : ) :
inhabited (sym α n)
Equations
@[protected, instance]
def sym.inhabited_sym' {α : Type u} [inhabited α] (n : ) :
Equations
@[protected, instance]
def sym.is_empty {α : Type u} (n : ) [is_empty α] :
@[protected, instance]
def sym.unique {α : Type u} (n : ) [unique α] :
unique (sym α n)
Equations
theorem sym.repeat_left_inj {α : Type u} {a b : α} {n : } (h : n 0) :
theorem sym.repeat_left_injective {α : Type u} {n : } (h : n 0) :
function.injective (λ (x : α), sym.repeat x n)
@[protected, instance]
def sym.nontrivial {α : Type u} (n : ) [nontrivial α] :
nontrivial (sym α (n + 1))
def sym.map {α : Type u_1} {β : Type u_2} {n : } (f : α → β) (x : sym α n) :
sym β n

A function α → β induces a function sym α n → sym β n by applying it to every element of the underlying n-tuple.

Equations
@[simp]
theorem sym.mem_map {α : Type u_1} {β : Type u_2} {n : } {f : α → β} {b : β} {l : sym α n} :
b sym.map f l ∃ (a : α), a l f a = b
@[simp]
theorem sym.map_id {α : Type u_1} {n : } (s : sym α n) :
@[simp]
theorem sym.map_map {α : Type u_1} {β : Type u_2} {γ : Type u_3} {n : } (g : β → γ) (f : α → β) (s : sym α n) :
sym.map g (sym.map f s) = sym.map (g f) s
@[simp]
theorem sym.map_zero {α : Type u_1} {β : Type u_2} (f : α → β) :
sym.map f 0 = 0
@[simp]
theorem sym.map_cons {α : Type u_1} {β : Type u_2} {n : } (f : α → β) (a : α) (s : sym α n) :
sym.map f (a::s) = f a::sym.map f s
def sym.equiv_congr {α : Type u} {n : } {β : Type u} (e : α β) :
sym α n sym β n

Mapping an equivalence α ≃ β using sym.map gives an equivalence between sym α n and sym β n.

Equations
@[simp]
theorem sym.equiv_congr_apply {α : Type u} {n : } {β : Type u} (e : α β) (x : sym α n) :
@[simp]
theorem sym.equiv_congr_symm_apply {α : Type u} {n : } {β : Type u} (e : α β) (x : sym β n) :