| 1 | initial version |
You can do this with the lift method of p, passing the ideal I as the argument:
sage: R.<x,y> = QQ[]
sage: I = R.ideal([x-1,y-1])
sage: p = x^2 - y^2 - 2*x + 2*y
sage: c = p.lift(I); c
[x - 1, -y + 1]
sage: sum(c_k*p_k for (c_k,p_k) in zip(c,I.gens()))
x^2 - y^2 - 2*x + 2*y
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.