Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
3

Quotient of polynomial ring over integers not working

asked 4 years ago

Thrash gravatar image

updated 2 years ago

tmonteil gravatar image

I have a problem. I want Sage to calculate in Z[x]/4,2x,x2 but none of the relations are being calculated/recognized properly:

sage: R.<x> = ZZ[]
sage: I = R.ideal(4,2*x,x^2)
sage: S.<a> = R.quotient(I)
sage: a^2    # the output should be 0
a^2
sage: 2*a    # the output should be 0
2*a
sage: S(2)+S(2)    # the output should be 0
4

When I introduce a superfluous variable y and consider Z[x,y]/4,2x,x2,y instead, which is practically the same ring (i.e. isomorphic), then it seems to work:

sage: R.<x,y> = ZZ[]
sage: I = R.ideal(4,2*x,x^2,y)
sage: S.<a,b> = R.quotient(I)
sage: a^2
0
sage: 2*a
0
sage: S(2)+S(2)
0

But now look at this:

sage: S(2)+S(3)    # the output should be 1
5

How can I solve this problem?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 4 years ago

tmonteil gravatar image

updated 4 years ago

For the first issue, you can replace

sage: R.<x> = ZZ[]

with

sage: R.<x> = PolynomialRing(ZZ,1)

It looks stupid, but the univariate polynomial ring is not the same as the multivariate polynomial ring in one variable, the first one is implemented in Sage and the second relies on Singular, also they do not have the same methods available.

Reegarding the creation of ideals, in the first case, it seems that the method is inherited from a generic parent class, while the second has its own ideal method:

sage: R.<x> = ZZ[]
sage: R.ideal
<built-in method ideal of PolynomialRing_integral_domain_with_category object at 0x7f40f95402c8>
sage: R.<x> = PolynomialRing(ZZ,1)
sage: R.ideal
<built-in method ideal of sage.rings.polynomial.multi_polynomial_libsingular.MPolynomialRing_libsingular object at 0x7f40f4ecc4f8>

With this second implementation, you can check:

sage: R.<x> = PolynomialRing(ZZ,1)
sage: I = R.ideal(4,2*x,x^2)
sage: S.<a> = R.quotient(I)
sage: a^2
0
sage: 2*a
0
sage: S(2) + S(2)
0

So far, so good. Now, regarding your second issue, there is no problem that

sage: S(2) + S(3)
5

as this is correct. However, there seems to be a problem with the following:

sage: S(2) + S(3) == S(1)
False

Note that, however :

sage: S(2) + S(3) - S(1)
0

Perhaps should we investigate a bit further on where the problem is exactly and then report this as a bug. Meanwhile, i will add a confirmed_bug tag.

In any case, thanks for reporting !

Preview: (hide)
link

Comments

Thank you very much! This means that the first method implemented in Sage should be improved. Of course, S(2)+S(3) resulting in 5 is correct like a^2 resulting in a^2 (with the first method), but it's not elegant, or more precisely. impractical for further calculations. I would like to do something like (1+a).is_unit() for example, but I get the error "Lifting of multivariate polynomials over non-fields is not implemented."

Thrash gravatar imageThrash ( 4 years ago )

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 4 years ago

Seen: 1,607 times

Last updated: Apr 19 '21