def cpi(self, p): """ Returns the centrally primitive idempotent for the symmetric group of order n for the irreducible corresponding indexed by the partition p. EXAMPLES:: sage: QS3 = SymmetricGroupAlgebra(QQ,3) sage: QS3.cpi([2,1]) 2/3*[1, 2, 3] - 1/3*[2, 3, 1] - 1/3*[3, 1, 2] sage: QS3.cpi([3]) 1/6*[1, 2, 3] + 1/6*[1, 3, 2] + 1/6*[2, 1, 3] + 1/6*[2, 3, 1] + 1/6*[3, 1, 2] + 1/6*[3, 2, 1] sage: QS3.cpi([1,1,1]) 1/6*[1, 2, 3] - 1/6*[1, 3, 2] - 1/6*[2, 1, 3] + 1/6*[2, 3, 1] + 1/6*[3, 1, 2] - 1/6*[3, 2, 1] """ if p not in partition.Partitions_n(self.n): raise TypeError, "p must be a partition of %s"%self.n character_table = eval(gap.eval("Display(Irr(SymmetricGroup(%d)));"%self.n)) cpi = self(0) np = partition.Partitions_n(self.n).list() np.reverse() p_index = np.index(p) big_coeff = character_table[p_index][0]/factorial(self.n) for g in permutation.StandardPermutations_n(self.n): cpi += big_coeff * character_table[p_index][np.index(g.inverse().cycle_type())] * self(g) return cpi
def cpi(self, p): """ Return the centrally primitive idempotent for the symmetric group of order `n` corresponding to the irreducible representation indexed by the partition ``p``. EXAMPLES:: sage: QS3 = SymmetricGroupAlgebra(QQ,3) sage: QS3.cpi([2,1]) 2/3*[1, 2, 3] - 1/3*[2, 3, 1] - 1/3*[3, 1, 2] sage: QS3.cpi([3]) 1/6*[1, 2, 3] + 1/6*[1, 3, 2] + 1/6*[2, 1, 3] + 1/6*[2, 3, 1] + 1/6*[3, 1, 2] + 1/6*[3, 2, 1] sage: QS3.cpi([1,1,1]) 1/6*[1, 2, 3] - 1/6*[1, 3, 2] - 1/6*[2, 1, 3] + 1/6*[2, 3, 1] + 1/6*[3, 1, 2] - 1/6*[3, 2, 1] sage: QS0 = SymmetricGroupAlgebra(QQ, 0) sage: QS0.cpi(Partition([])) [] TESTS:: sage: QS3.cpi([2,2]) Traceback (most recent call last): ... TypeError: p (= [2, 2]) must be a partition of n (= 3) """ if p not in partition.Partitions_n(self.n): raise TypeError( "p (= {p}) must be a partition of n (= {n})".format(p=p, n=self.n)) character_table = eval( gap.eval("Display(Irr(SymmetricGroup(%d)));" % self.n)) cpi = self.zero() np = partition.Partitions_n(self.n).list() np.reverse() p_index = np.index(p) big_coeff = character_table[p_index][0] / factorial(self.n) character_row = character_table[p_index] dct = { g: big_coeff * character_row[np.index(g.cycle_type())] for g in permutation.StandardPermutations_n(self.n) } return self._from_dict(dct)
def cpis(self): """ Returns a list of the centrally primitive idempotents. EXAMPLES:: sage: QS3 = SymmetricGroupAlgebra(QQ,3) sage: a = QS3.cpis() sage: a[0] # [3] 1/6*[1, 2, 3] + 1/6*[1, 3, 2] + 1/6*[2, 1, 3] + 1/6*[2, 3, 1] + 1/6*[3, 1, 2] + 1/6*[3, 2, 1] sage: a[1] # [2, 1] 2/3*[1, 2, 3] - 1/3*[2, 3, 1] - 1/3*[3, 1, 2] """ return [self.cpi(p) for p in partition.Partitions_n(self.n)]
def seminormal_test(n): """ Runs a variety of tests to verify that the construction of the seminormal basis works as desired. The numbers appearing are Theorems in James and Kerber's 'Representation Theory of the Symmetric Group'. EXAMPLES:: sage: from sage.combinat.symmetric_group_algebra import seminormal_test sage: seminormal_test(3) True """ for part in partition.Partitions_n(n): for tab in StandardTableaux(part): #3.1.10 if not e(tab) * (1 / kappa(part)) - e_hat(tab) == 0: raise ValueError, "3.1.10 - %s" % tab #3.2.12.2 value = e(tab) * epsilon(tab, 1) * e(tab) - e(tab) * (kappa(part)) if value != 0: print value raise ValueError, "3.2.12.2 - %s" % tab for tab2 in StandardTableaux(part): #3.2.8 1 if e_ik(tab, tab2) - e(tab) * pi_ik( tab, tab2) * e(tab2) * (1 / kappa(part)) != 0: raise ValueError, "3.2.8.1 - %s, %s" % (tab, tab2) #3.2.8.1 if e(tab) * e_ik(tab, tab2) - e_ik(tab, tab2) * (kappa(part)) != 0: raise ValueError, "3.2.8.2 - %s, %s" % (tab, tab2) if tab == tab2: continue if tab.last_letter_lequal(tab2): #3.1.20 if e(tab2) * e(tab) != 0: raise ValueError, "3.1.20 - %s, %s" % (tab, tab2) if e_hat(tab2) * e_hat(tab) != 0: raise ValueError, "3.1.20 - %s, %s" % (tab, tab2) return True
def seminormal_basis(self): """ Returns a list of the seminormal basis elements of self. EXAMPLES:: sage: QS3 = SymmetricGroupAlgebra(QQ,3) sage: QS3.seminormal_basis() [1/6*[1, 2, 3] + 1/6*[1, 3, 2] + 1/6*[2, 1, 3] + 1/6*[2, 3, 1] + 1/6*[3, 1, 2] + 1/6*[3, 2, 1], 1/3*[1, 2, 3] + 1/6*[1, 3, 2] - 1/3*[2, 1, 3] - 1/6*[2, 3, 1] - 1/6*[3, 1, 2] + 1/6*[3, 2, 1], 1/3*[1, 3, 2] + 1/3*[2, 3, 1] - 1/3*[3, 1, 2] - 1/3*[3, 2, 1], 1/4*[1, 3, 2] - 1/4*[2, 3, 1] + 1/4*[3, 1, 2] - 1/4*[3, 2, 1], 1/3*[1, 2, 3] - 1/6*[1, 3, 2] + 1/3*[2, 1, 3] - 1/6*[2, 3, 1] - 1/6*[3, 1, 2] - 1/6*[3, 2, 1], 1/6*[1, 2, 3] - 1/6*[1, 3, 2] - 1/6*[2, 1, 3] + 1/6*[2, 3, 1] + 1/6*[3, 1, 2] - 1/6*[3, 2, 1]] """ basis = [] for part in partition.Partitions_n(self.n): stp = StandardTableaux_partition(part) for t1 in stp: for t2 in stp: basis.append(self.epsilon_ik(t1,t2)) return basis