Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You'll want to use the lift method on the polynomial p. For example,

sage: R.<x,y,z> = QQ[]
sage: f = x*y*z-y^2
sage: g = x^3 + z
sage: I = R.ideal([f,g])
sage: p = 3*f-x*g
sage: p.lift(I)
[3, -x]

That gives you the coefficients in front of each of the generators of the ideal. You'll want to make sure that p is actually in the ideal first; otherwise, you might get something like:

sage: x in I
False
sage: x.lift(I)
[0, 0]