def e_ik(itab, ktab, star=0): """ EXAMPLES:: sage: from sage.combinat.symmetric_group_algebra import e_ik sage: e_ik([[1,2,3]], [[1,2,3]]) [1, 2, 3] + [1, 3, 2] + [2, 1, 3] + [2, 3, 1] + [3, 1, 2] + [3, 2, 1] sage: e_ik([[1,2,3]], [[1,2,3]], star=1) [1, 2] + [2, 1] """ it = Tableau(itab) kt = Tableau(ktab) if star: it = it.restrict(it.size() - star) kt = kt.restrict(kt.size() - star) if it.shape() != kt.shape(): raise ValueError, "the two tableaux must be of the same shape" mult = permutation_options['mult'] permutation_options['mult'] = 'l2r' if kt == it: res = e(it) elif (it, kt) in e_ik_cache: res = e_ik_cache[(it,kt)] else: pi = pi_ik(it,kt) e_ik_cache[(it,kt)] = e(it)*pi res = e_ik_cache[(it,kt)] permutation_options['mult'] = mult return res
def epsilon(tab, star=0): """ EXAMPLES:: sage: from sage.combinat.symmetric_group_algebra import epsilon sage: epsilon([[1,2]]) 1/2*[1, 2] + 1/2*[2, 1] sage: epsilon([[1],[2]]) 1/2*[1, 2] - 1/2*[2, 1] """ t = Tableau(tab) if star: t = t.restrict(t.size() - star) mult = permutation_options['mult'] permutation_options['mult'] = 'l2r' if t in epsilon_cache: res = epsilon_cache[t] else: if t.size() == 2: epsilon_cache[t] = e(t)*(1/kappa(t.shape())) res = epsilon_cache[t] elif t == Tableau([[1]]): epsilon_cache[t] = e(t) res = epsilon_cache[t] else: epsilon_cache[t] = epsilon(t, 1)*e(t)*epsilon(t,1)*( 1 / kappa(t.shape())) res = epsilon_cache[t] permutation_options['mult'] = mult return res
def epsilon_ik(itab, ktab, star=0): """ EXAMPLES:: sage: from sage.combinat.symmetric_group_algebra import epsilon_ik sage: epsilon_ik([[1,2],[3]], [[1,3],[2]]) 1/4*[1, 3, 2] - 1/4*[2, 3, 1] + 1/4*[3, 1, 2] - 1/4*[3, 2, 1] sage: epsilon_ik([[1,2],[3]], [[1,3],[2]], star=1) Traceback (most recent call last): ... ValueError: the two tableaux must be of the same shape """ it = Tableau(itab) kt = Tableau(ktab) if star: it = it.restrict(it.size() - star) kt = kt.restrict(kt.size() - star) if it.shape() != kt.shape(): raise ValueError, "the two tableaux must be of the same shape" mult = permutation_options['mult'] permutation_options['mult'] = 'l2r' if kt == it: res = epsilon(itab) elif (it, kt) in epsilon_ik_cache: res = epsilon_ik_cache[(it,kt)] else: epsilon_ik_cache[(it,kt)] = epsilon(it, star+1)*e_ik(it,kt,star)*epsilon(kt, star+1) * (1/kappa(it.shape())) res = epsilon_ik_cache[(it,kt)] permutation_options['mult'] = mult return res
def e_hat(tab, star=0): """ The Young projection operator, an idempotent in the rational group algebra. EXAMPLES:: sage: from sage.combinat.symmetric_group_algebra import e_hat sage: e_hat([[1,2,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: e_hat([[1],[2]]) 1/2*[1, 2] - 1/2*[2, 1] There are differing conventions for the order of the symmetrizers and antisymmetrizers. This example illustrates our conventions:: sage: e_hat([[1,2],[3]]) 1/3*[1, 2, 3] + 1/3*[2, 1, 3] - 1/3*[3, 1, 2] - 1/3*[3, 2, 1] """ t = Tableau(tab) if star: t = t.restrict(t.size()-star) if t in ehat_cache: res = ehat_cache[t] else: res = (1/kappa(t.shape()))*e(t) return res
def e_hat(tab, star=0): """ The Young projection operator corresponding to the Young tableau ``tab`` (which is supposed to contain every integer from `1` to its size precisely once, but may and may not be standard). This is an idempotent in the rational group algebra. EXAMPLES:: sage: from sage.combinat.symmetric_group_algebra import e_hat sage: e_hat([[1,2,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: e_hat([[1],[2]]) 1/2*[1, 2] - 1/2*[2, 1] There are differing conventions for the order of the symmetrizers and antisymmetrizers. This example illustrates our conventions:: sage: e_hat([[1,2],[3]]) 1/3*[1, 2, 3] + 1/3*[2, 1, 3] - 1/3*[3, 1, 2] - 1/3*[3, 2, 1] """ t = Tableau(tab) if star: t = t.restrict(t.size() - star) if t in ehat_cache: res = ehat_cache[t] else: res = (1 / kappa(t.shape())) * e(t) return res
def e_hat(tab, star=0): """ The Young projection operator corresponding to the Young tableau ``tab`` (which is supposed to contain every integer from `1` to its size precisely once, but may and may not be standard). This is an idempotent in the rational group algebra. EXAMPLES:: sage: from sage.combinat.symmetric_group_algebra import e_hat sage: e_hat([[1,2,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: e_hat([[1],[2]]) 1/2*[1, 2] - 1/2*[2, 1] There are differing conventions for the order of the symmetrizers and antisymmetrizers. This example illustrates our conventions:: sage: e_hat([[1,2],[3]]) 1/3*[1, 2, 3] + 1/3*[2, 1, 3] - 1/3*[3, 1, 2] - 1/3*[3, 2, 1] """ t = Tableau(tab) if star: t = t.restrict(t.size()-star) if t in ehat_cache: res = ehat_cache[t] else: res = (1/kappa(t.shape()))*e(t) return res
def epsilon_ik(self, itab, ktab, star=0): """ Return the seminormal basis element of ``self`` corresponding to the pair of tableaux ``itab`` and ``ktab``. EXAMPLES:: sage: QS3 = SymmetricGroupAlgebra(QQ, 3) sage: a = QS3.epsilon_ik([[1,2,3]], [[1,2,3]]); a 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.dft()*vector(a) (1, 0, 0, 0, 0, 0) sage: a = QS3.epsilon_ik([[1,2],[3]], [[1,2],[3]]); a 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] sage: QS3.dft()*vector(a) (0, 0, 0, 0, 1, 0) """ it = Tableau(itab) kt = Tableau(ktab) stn = StandardTableaux_size(self.n) if it not in stn: raise TypeError("it must be a standard tableau of size %s" % self.n) if kt not in stn: raise TypeError("kt must be a standard tableau of size %s" % self.n) if it.shape() != kt.shape(): raise ValueError("it and kt must be of the same shape") BR = self.base_ring() z_elts = {} epik = epsilon_ik(it, kt, star=star) for m, c in epik._monomial_coefficients.iteritems(): z_elts[m] = BR(c) z = self._from_dict(z_elts) if permutation_options['mult'] == 'l2r': return z else: return z.map_support(lambda x: x.inverse())
def epsilon_ik(self, itab, ktab, star=0): """ Returns the seminormal basis element of self corresponding to the pair of tableaux itab and ktab. EXAMPLES:: sage: QS3 = SymmetricGroupAlgebra(QQ, 3) sage: a = QS3.epsilon_ik([[1,2,3]], [[1,2,3]]); a 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.dft()*vector(a) (1, 0, 0, 0, 0, 0) sage: a = QS3.epsilon_ik([[1,2],[3]], [[1,2],[3]]); a 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] sage: QS3.dft()*vector(a) (0, 0, 0, 0, 1, 0) """ it = Tableau(itab) kt = Tableau(ktab) stn = StandardTableaux_n(self.n) if it not in stn: raise TypeError, "it must be a standard tableaux of size %s"%self.n if kt not in stn: raise TypeError, "kt must be a standard tableaux of size %s"%self.n if it.shape() != kt.shape(): raise ValueError, "it and kt must be of the same shape" BR = self.base_ring() z_elts = {} epik = epsilon_ik(it, kt, star=star) for m,c in epik._monomial_coefficients.iteritems(): z_elts[m] = BR(c) z = self._from_dict(z_elts) if permutation.PermutationOptions()['mult'] == 'l2r': return z else: return z.map_support(lambda x: x.inverse())