1 | initial version |
Here is a more direct way to compute this.
sage: P.<x,y,z> = PolynomialRing(QQ, order=TermOrder('wdegrevlex', (1, 2, 3)))
sage: I = P.ideal(x*y^2 + x^5, z*y + x^3*y)
sage: M9 = [P.monomial(*e) for e in WeightedIntegerVectors(9, (1, 2, 3))]
sage: [m for m in M9 if m.reduce(I) == m]
[z^3, x*y*z^2, x^3*z^2, x^2*y^2*z]
2 | No.2 Revision |
Here is a more direct way to compute this.
sage: P.<x,y,z> = PolynomialRing(QQ, order=TermOrder('wdegrevlex', (1, 2, 3)))
sage: I = P.ideal(x*y^2 + x^5, z*y + x^3*y)
sage: M9 = [P.monomial(*e) for e in WeightedIntegerVectors(9, (1, 2, 3))]
sage: [m for m in M9 if m.reduce(I) == m]
[z^3, x*y*z^2, x^3*z^2, x^2*y^2*z]
Edit: As of Sage 9.1, it is best to use:
sage: I.normal_basis(9)
[x^2*y^2*z, x^3*z^2, x*y*z^2, z^3]