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
A related bug with the following Minimal Working Example
using DynamicPolynomials
@ncpolyvar x y z
bases =monomials([x,y,z],2)
@assert z^0*y*x^0*z in bases
A dirty fix is possible with calling the following function on monomials
using DynamicPolynomials: Monomial
functionremove_zero_degree(m::Monomial{C}) where {C}
isconstant(m) &&return m
returnprod([x[1]^x[2] for x infilter(!(iszero ∘ last), collect(zip(m.vars, m.z)))])
end@assertremove_zero_degree(z^0*y*x^0*z) in bases
If desirable, I would be happy to make a PR on related parts of the library.
Taking noncommuting variables to the zeroth power can lead to surprising results:
The text was updated successfully, but these errors were encountered: