Skip to content

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

@rburing

Description

@rburing

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions