def _test_shifted_p(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, strict=True):
                for lam2 in Partition.all(n, strict=True):
                    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)),
                                            strict=True):
                        a = SymmetricPolynomial.stable_grothendieck_p_doublebar(
                            v, mu, lam1).truncate(n).polynomial('x')
                        b = SymmetricPolynomial.dual_stable_grothendieck_q(
                            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 = kernel(n, v)
                    print('  ', '   :', f)
                    print()

                    t = Polynomial()
                    for kappa in Partition.subpartitions(lam2, strict=True):
                        a = SymmetricPolynomial.stable_grothendieck_p_doublebar(
                            v, lam2, kappa).truncate(n)
                        b = SymmetricPolynomial.dual_stable_grothendieck_q(
                            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
Example #2
0
def grothendieck_P_doublebar(num_variables,
                             mu,
                             nu=(),
                             degree_bound=None):  # noqa
    return SymmetricPolynomial.stable_grothendieck_p_doublebar(
        num_variables, mu, nu, degree_bound=degree_bound)