Closed S17A05 closed 1 week ago
Documentation preview for this PR (built with commit ded51e1852e3ec9dd2ef2df67b2b8357d7854c09; changes) is ready! :tada: This preview will update shortly after each push to this PR.
In case you are interested in the boolean polynomial ring, maybe you want to resurrect #26929.
When iterating over a
pbori.BooleanPolynomial
, the iterator generates just the monomials, whereas iterating over aMPolynomial_libsingular
defined overGF(2)
yields a tuple of the monomial together with its coefficient $1$. This causes issues in the method.coefficients_monomials()
ofPolynomialSequence_gf2
; we fix said issue by checkingwhether the iteration yields tuples, in which case we simply replace the tuple by its second element (the actual monomial) in each iteration.which type of polynomial ring we are working in before iterating.Fixes #37837 (but there might be a more elegant solution).