def overlap(bigger, smaller): ans = 0 skew = Partition.shifted_shape(bigger, smaller) for (i, j) in skew: if (i + 1, j) in skew: ans += 1 return ans
def gq_pieri(mu, p): ans = {} shape = Partition.shifted_shape(mu) corners = {(i, j) for (i, j) in shape if (i + 1, j) not in shape and (i, j + 1) not in shape} nu = ((mu[0] if mu else 0) + p,) + mu outer = Partition.shifted_shape(nu, mu) for a in subsets(corners): for b in subsets(outer): c = a + b if any(i1 < i2 and j1 < j2 for (i1, j1) in c for (i2, j2) in c): continue lam = Partition.from_shape(shape | set(c)) if not Partition.is_strict_partition(lam): continue if (Partition.shifted_shape(lam) - shape) | set(a) != set(c): continue free = len([(i, j) for (i, j) in c if i != j and (i, j - 1) not in c and (i + 1, j) not in c]) if len(c) <= p <= len(c) + free: diff = p - len(c) bet = beta**(sum(mu) + p - sum(lam)) coeff = nchoosek(free, diff) * bet * 2**(free - diff) ans[lam] = ans.get(lam, 0) + coeff return ans
def cols(bigger, smaller): ans = Partition.shifted_shape(bigger) - Partition.shifted_shape(smaller) return (-1)**len({j for (i, j) in ans})