Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BooleanMonomial 1 is not equal to Integer(1) #27019

Open
rburing opened this issue Jan 4, 2019 · 4 comments
Open

BooleanMonomial 1 is not equal to Integer(1) #27019

rburing opened this issue Jan 4, 2019 · 4 comments

Comments

@rburing
Copy link
Contributor

rburing commented Jan 4, 2019

Demonstration:

sage: P.<x> = BooleanPolynomialRing()
sage: list(P(1))
[1]
sage: list(P(1))[0]
1
sage: list(P(1))[0] == 1
False
sage: type(list(P(1))[0])
<type 'sage.rings.polynomial.pbori.BooleanMonomial'>

Note that this behavior is inconsistent with the behavior for polynomial rings over finite fields:

sage: R.<y> = PolynomialRing(GF(2))
sage: list(R(1))[0] == 1
True

In the context of converting polynomials to lists, this has understandably caused confusion for at least one user on Ask SageMath.

Component: algebra

Keywords: BooleanMonomial, monomial, equality

Issue created by migration from https://trac.sagemath.org/ticket/27019

@rburing rburing added this to the sage-8.6 milestone Jan 4, 2019
@jdemeyer
Copy link

jdemeyer commented Jan 4, 2019

comment:1

Part of the problem is that BooleanMonomialMonoid is a monoid and not a ring.

So there cannot be a coercion from ZZ to the BooleanMonomialMonoid. There could be a coercion to the common parent P but that requires a pushout construction...

@embray
Copy link
Contributor

embray commented Jan 15, 2019

comment:2

Retarging tickets optimistically to the next milestone. If you are responsible for this ticket (either its reporter or owner) and don't believe you are likely to complete this ticket before the next release (8.7) please retarget this ticket's milestone to sage-pending or sage-wishlist.

@embray embray modified the milestones: sage-8.6, sage-8.7 Jan 15, 2019
@embray
Copy link
Contributor

embray commented Mar 25, 2019

comment:3

Ticket retargeted after milestone closed (if you don't believe this ticket is appropriate for the Sage 8.8 release please retarget manually)

@embray embray modified the milestones: sage-8.7, sage-8.8 Mar 25, 2019
@embray
Copy link
Contributor

embray commented Jun 14, 2019

comment:4

As the Sage-8.8 release milestone is pending, we should delete the sage-8.8 milestone for tickets that are not actively being worked on or that still require significant work to move forward. If you feel that this ticket should be included in the next Sage release at the soonest please set its milestone to the next release milestone (sage-8.9).

@embray embray removed this from the sage-8.8 milestone Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants