Ask Your Question

How to call a constant polynomial with lift()?

asked 2020-12-12 12:33:48 -0600

updated 2020-12-12 14:52:35 -0600

I am trying to call a constant polynomial with lift(), but I get an error. The following is a minimal example of my input that produces an error:

sage: A.<x, y> = PolynomialRing(CC, 2, order='degrevlex')
sage: I = A.ideal([x + y, x + y + 1])
sage: A(1).lift(I)

When I input a non-constant polynomial (say, f = (x+y)^2), Sage executes lift(I) as expected. I only get an error for constant polynomials like A(1).

edit retag flag offensive close merge delete


Note that CC is Complex Field with 53 bits of precision, so this "field" consisting of floating point approximations is generally unsuitable for exact algebraic applications like Gröbner bases and the division algorithm (which are used here). Often you can reduce your problem to a computation over a number field and/or over $\mathbb{Q}$.

rburing gravatar imagerburing ( 2020-12-12 15:16:59 -0600 )edit

1 answer

Sort by » oldest newest most voted

answered 2020-12-12 14:54:48 -0600

rburing gravatar image

updated 2020-12-12 14:59:49 -0600

Since 1 does not belong to the ideal, it is not possible to express 1 as a linear combination (with polynomial coefficients) of the generators of the ideal (which is what lift tries to do).

So lift correctly gives an error; it even provides the reason.

Edit (after the generators were changed): you should work over a field with exact arithmetic, such as the smallest field that contains the coefficients of your polynomials; in this case you can work over QQ:

sage: A.<x, y> = PolynomialRing(QQ, 2, order='degrevlex')
sage: I = A.ideal([x + y, x + y + 1])
sage: A(1).lift(I)
[-1, 1]

This result implies the result over $\mathbb{C}$.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools


Asked: 2020-12-12 12:33:48 -0600

Seen: 50 times

Last updated: Dec 12 '20