Re: [sage-devel] LaurentPolynomialRing thinks 1 isn't constant

2019-01-16 Thread Travis Scrimshaw
This seems to be caused by having different ETuples. Contrast: sage: explain_pickle(dumps(z)) ... pg_LaurentPolynomialRing_mpair(si2)(pg_unpickle_MPolynomial_libsingular(si2, {pg_make_ETuple({0r:1r}, 2r):pg_make_rational('1')}), pg_make_ETuple({0r:-1r }, 2r)) sage: explain_pickle(dumps(R.one()))

Re: [sage-devel] LaurentPolynomialRing thinks 1 isn't constant

2019-01-16 Thread Vincent Delecroix
Indeed this is a bug, and the following version is even funnier sage: z.is_one() True sage: z.is_constant() False Vincent Le 16/01/2019 à 06:07, Henry Liu a écrit : Hi all, LaurentPolynomialRing does not handle constants correctly. Here is an example: sage: R. = LaurentPolynomialRing(

[sage-devel] LaurentPolynomialRing thinks 1 isn't constant

2019-01-16 Thread Henry Liu
Hi all, LaurentPolynomialRing does not handle constants correctly. Here is an example: sage: R. = LaurentPolynomialRing(QQ) sage: z = x / x; z 1 sage: z.is_constant() False sage: z in ZZ False sage: z == R.one() True sage: z.parent() Multivariate Laur