def _slow_vectorize(cls, n, tableaux, signs=None, check=True): dictionary = defaultdict(int) for tab in tableaux: dictionary[tab.weight(n)] += 1 if check: assert all(dictionary[Partition.sort(alpha)] == dictionary[alpha] for alpha in dictionary) return SymmetricPolynomial({ SymmetricMonomial(n, alpha): coeff * (signs if signs else 1)**sum(alpha) for alpha, coeff in dictionary.items() if Partition.is_partition(alpha) })
def fpf_involution_shape(self): assert self.is_fpf_involution() mu = Partition.sort(self.fpf_involution_code(), trim=True) return Partition.transpose(mu)
def shape(self): return Partition.sort(self.inverse().code(), trim=True)
def __init__(self, n, mu=()): assert len(mu) <= n self.n = n self.mu = Partition.sort(mu, trim=True)