Opened 2 years ago

Last modified 2 years ago

#27019 new defect

BooleanMonomial 1 is not equal to Integer(1)

Reported by: rburing Owned by:
Priority: major Milestone:
Component: algebra Keywords: BooleanMonomial, monomial, equality
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges



sage: P.<x> = BooleanPolynomialRing()
sage: list(P(1))
sage: list(P(1))[0]
sage: list(P(1))[0] == 1
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

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

Change History (4)

comment:1 Changed 2 years ago by jdemeyer

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...

comment:2 Changed 2 years ago by embray

  • Milestone changed from sage-8.6 to sage-8.7

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.

comment:3 Changed 2 years ago by embray

  • Milestone changed from sage-8.7 to sage-8.8

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

comment:4 Changed 2 years ago by embray

  • Milestone sage-8.8 deleted

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).

Note: See TracTickets for help on using tickets.