|   | 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
 Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.