def _test(n_max, v_max): for n in range(n_max + 1): for v in range(1, v_max + 1): for lam1 in Partition.all(n): for lam2 in Partition.all(n): print() print() print('* v =', v, ', n =', n, ', mu =', lam1, ', nu =', lam2) print() print('Computing LHS . . .') print() s = Polynomial() for mu in Partition.all(n + max(sum(lam1), sum(lam2))): a = SymmetricPolynomial.stable_grothendieck_doublebar( v, mu, lam1).truncate(n).polynomial('x') b = SymmetricPolynomial.dual_stable_grothendieck( v, mu, lam2).truncate(n).polynomial('y') s += (a * b).truncate(n) print(' ', mu, ':', s, '|', a, '|', b) print() print('LHS =', s) print() print() print('Computing RHS . . .') print() f = Polynomial.one() x = Polynomial.x y = Polynomial.y for i in range(1, v + 1): for j in range(1, v + 1): a = x(i) * y(j) term = Polynomial.one() for e in range(1, n + 1): term += a**e f = (f * term).truncate(n) print(' ', ' :', f) print() t = Polynomial() for kappa in Partition.subpartitions(lam2): a = SymmetricPolynomial.stable_grothendieck_doublebar( v, lam2, kappa).truncate(n) b = SymmetricPolynomial.dual_stable_grothendieck( v, lam1, kappa).truncate(n) t += (f * a.polynomial('x') * b.polynomial('y')).truncate(n) print(' ', kappa, ':', t) print() print('RHS =', t) print() print() print('diff =', s - t) print() assert s == t
def grothendieck_doublebar(num_variables, mu, nu=(), degree_bound=None): # noqa return SymmetricPolynomial.stable_grothendieck_doublebar( num_variables, mu, nu, degree_bound=degree_bound)