1 | initial version |
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 report this as a bug.
2 | No.2 Revision |
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.
confirmed_bug
tag. In any case, thanks for reporting !