def test_tableaux(): # generate tableaux and reverse plane partitions from tableaux import Tableau mu = (4, 2, 1) a = Tableau.semistandard(3, mu) b = Tableau.semistandard_setvalued(3, mu) c = Tableau.semistandard_shifted(3, mu, diagonal_primes=True) d = Tableau.semistandard_shifted_setvalued(4, mu, diagonal_primes=False) e = Tableau.semistandard_rpp(3, mu) f = Tableau.semistandard_shifted_rpp(3, mu, diagonal_nonprimes=False) # serialize to change a Tableau into a dictionary s = [t.serialize() for t in c]
def test_slow_dual_stable_grothendieck(): n = 3 mu = (1, ) g = SymmetricPolynomial._slow_dual_stable_grothendieck(n, mu) print(g) assert g == SymmetricMonomial(n, (1, )) n = 3 mu = (2, ) g = SymmetricPolynomial._slow_dual_stable_grothendieck(n, mu) print(g) assert g == SymmetricMonomial(n, (1, 1)) + SymmetricMonomial(n, (2, )) n = 3 mu = (2, 1) for t in Tableau.semistandard_rpp(n, mu): print(t) g = SymmetricPolynomial._slow_dual_stable_grothendieck(n, mu) print(g) assert g == -BETA * SymmetricMonomial( n, (1, 1)) - BETA * SymmetricMonomial(n, (2, )) + 2 * SymmetricMonomial( n, (1, 1, 1)) + SymmetricMonomial(n, (2, 1))
def _slow_dual_stable_grothendieck(cls, num_variables, mu, nu=()): return (-BETA)**(sum(mu) - sum(nu)) * cls._slow_vectorize( num_variables, Tableau.semistandard_rpp(num_variables, mu, nu), -BETA**-1)