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: B.<a,b,c> = BooleanPolynomialRing(); B
Boolean PolynomialRing in a, b, c
sage: (a+b).is_nilpotent()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-57-dbf2beaed57d> in <module>()
----> 1 (a+b).is_nilpotent()
src/sage/rings/polynomial/multi_polynomial.pyx in sage.rings.polynomial.multi_polynomial.MPolynomial.is_nilpotent (src/build/cythonized/sage/rings/polynomial/multi_polynomial.c:29775)()
2347 # This generalizes easily to the multivariate case, by considering
2348 # K[x,y,...] as K[x][y]...
-> 2349 d = self.dict()
2350 return all(c.is_nilpotent() for c in d.values())
2351
[...]
AttributeError: 'sage.rings.polynomial.pbori.BooleanPolynomial' object has no attribute 'dict'
The code looking for self.dict is from trac [ticket:22454], that implemented is_unit and is_nilpotent for multivariate polynomial rings. It looks like BooleanPolynomialRings inherit that method but do not implement the dictionary.
As only 0 is nilpotent in these rings it should be simple to fix.
Boolean polynomial elements inherit from MPolynomial, but do not implement the dict, exponents, or _derivative methods, so many other methods also break: coefficients, truncate, derivative, polynomial, gradient, jacobian_ideal, newton_polytope, content, map_coefficients, sylvester_matrix, denominator, numerator, weighted_degree, nth_root, and specialization.
The code looking for
self.dict
is from trac [ticket:22454], that implementedis_unit
andis_nilpotent
for multivariate polynomial rings. It looks like BooleanPolynomialRings inherit that method but do not implement the dictionary.As only 0 is nilpotent in these rings it should be simple to fix.
Component: algebra
Issue created by migration from https://trac.sagemath.org/ticket/23311
The text was updated successfully, but these errors were encountered: