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.<x,y> = 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 Laurent Polynomial Ring in x, y over Rational Field
     sage: R.one() in ZZ
     True
     sage: version()
     'SageMath version 8.5, Release Date: 2018-12-22'

Can someone confirm this is a bug?

Thanks,

Henry


--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to