Ask Your Question

Find polynomial in terms of ideal

Hi,

I have been reading the tutorials and experimenting with the polynomial ring code but I have not been able to find out how to express a given polynomial in terms of the generators of an ideal. For instance, if I define a few polynomial generators of an ideal, say 'f=xyz-y^2' and 'g=x^3 + z', and have a polynomial p, I would like to express p as 'p = uf + vg', where I need to find the polynomials u,v. I tried a bunch of solve([],u,v) commands and such but I haven't found the magic solution. Thanks.

edit retag close merge delete

2 Answers

Sort by ยป oldest newest most voted

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]

more

I have a hunch that you need to specify the needed polynomials u, v better. Surely there's an infinity of solutions for them? Or am I missing something? I would be very surprised if a solve() algorithm could handle this infinity of solutions. In the case of polynomials with a single variable these coefficients are usually found with the help of Bezout's theorem. I guess the multivariate case is handled analogously.

more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Stats

Asked: 2011-09-27 02:24:55 +0200

Seen: 901 times

Last updated: Sep 27 '11