1 | initial version |
Like this:
sage: G = WeylCharacterRing(['A',2])
sage: p = G(1,0,0)*G(1,1,0)
sage: p.monomials()
[A2(2,1,0), A2(1,1,1)]
sage: p.coefficients()
[1, 1]
See also:
sage: list(p)
[((2, 1, 0), 1), ((1, 1, 1), 1)]
sage: dict(p)
{(2, 1, 0): 1, (1, 1, 1): 1}