1 | initial version |
One way is to use a polynomial ring and to reduce modulo an ideal.
Define a polynomial ring:
sage: R.<w, x, y, z> = QQ[]
Define an ideal:
sage: I = R.ideal([x*y + y*z - x*w])
Define a polynomial:
sage: P = 3*x*w+x*y
Reduce the polynomial modulo the ideal:
sage: P.reduce(I)
4*x*y + 3*y*z