You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sage: BooleanPolynomialRing?
Signature: BooleanPolynomialRing(n=None, names=None, order='lex')
Docstring:
Construct a boolean polynomial ring with the following parameters:
INPUT:
* "n" -- number of variables (an integer > 1)
* "names" -- names of ring variables, may be a string or
list/tuple of strings
* "order" -- term order (default: lex)
So we need n > 1. And the error message for n=0 agrees:
sage: B = BooleanPolynomialRing(0)
[...]
ValueError: Number of variables must be greater than 1.
However, the implementation allows n=1:
sage: B = BooleanPolynomialRing(1)
sage: B
Boolean PolynomialRing in None
and even negative n:
sage: B = BooleanPolynomialRing(-2)
sage: B
Boolean PolynomialRing in None
The n=1 case appears to work fine, so I do not know why it is called out in the documentation. The 'n<0' cases must be a missing error check in the code.
So we need
n > 1
. And the error message forn=0
agrees:However, the implementation allows
n=1
:and even negative
n
:The
n=1
case appears to work fine, so I do not know why it is called out in the documentation. The 'n<0' cases must be a missing error check in the code.Component: algebra
Issue created by migration from https://trac.sagemath.org/ticket/23312
The text was updated successfully, but these errors were encountered: