The following code used to work, but I’m having an issue with it now:
using DynamicPolynomials
@polyvar var1 var2
v = randn(3);
_mons = monomials([var1, var2], length(v) - 1);
p = sum(_mons .* v)
p + p
ERROR: AssertionError: issorted(Z, lt = grlex)
Stacktrace:
[1] MonomialVector{true}(vars::Vector{PolyVar{true}}, Z::Vector{Vector{Int64}})
@ DynamicPolynomials ~/.julia/packages/DynamicPolynomials/jOoxo/src/monovec.jl:11
[2] plusorminus(p::Polynomial{true, Float64}, q::Polynomial{true, Float64}, op::Function)
@ DynamicPolynomials ~/.julia/packages/DynamicPolynomials/jOoxo/src/operators.jl:53
[3] +(x::Polynomial{true, Float64}, y::Polynomial{true, Float64})
@ DynamicPolynomials ~/.julia/packages/DynamicPolynomials/jOoxo/src/operators.jl:130
[4] top-level scope
@ REPL[33]:1