diff --git a/Project.toml b/Project.toml index 8c085d797..9f9980dbb 100644 --- a/Project.toml +++ b/Project.toml @@ -5,12 +5,14 @@ version = "5.5.1" [deps] ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" +Bijections = "e2ed5e7c-b2de-5872-ae92-c73ca462fb04" ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" DiffRules = "b552c78f-8df3-52c6-915a-8e097449b14b" Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" DomainSets = "5b8099bc-c8ec-5219-889f-1d9e522a28bf" +DynamicPolynomials = "7c1d4256-1411-5781-91ec-d7bc3513ac07" Groebner = "0b43b601-686d-58a3-8a1c-6623616c7cd4" IfElse = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" @@ -41,12 +43,14 @@ SymbolicsSymPyExt = "SymPy" [compat] ArrayInterface = "6, 7" +Bijections = "0.1" ConstructionBase = "1.1, 1.2" DataStructures = "0.18" DiffRules = "1.4" Distributions = "0.23, 0.24, 0.25" DocStringExtensions = "0.7, 0.8, 0.9" DomainSets = "0.6" +DynamicPolynomials = "0.5" Groebner = "0.3, 0.4" IfElse = "0.1" LaTeXStrings = "1.3" diff --git a/src/groebner_basis.jl b/src/groebner_basis.jl index fd8959673..d0b454a39 100644 --- a/src/groebner_basis.jl +++ b/src/groebner_basis.jl @@ -1,7 +1,7 @@ +using DynamicPolynomials +using Bijections -DP = SymbolicUtils.DynamicPolynomials -Bijections = SymbolicUtils.Bijections - +const DP = DynamicPolynomials # extracting underlying polynomial and coefficient type from Polyforms underlyingpoly(x::Number) = x underlyingpoly(pf::PolyForm) = pf.p @@ -30,7 +30,7 @@ function symbol_to_poly(sympolys::AbstractArray) # Convert all to DP.Polynomial, so that coefficients are of same type, # and constants are treated as polynomials # We also need this because Groebner does not support abstract types as input - polynoms = Vector{DP.Polynomial{true,commontype}}(undef, length(sympolys)) + polynoms = Vector{DP.Polynomial{DP.Commutative{DP.CreationOrder}, Graded{LexOrder}, commontype}}(undef, length(sympolys)) for (i, pf) in enumerate(polyforms) polynoms[i] = underlyingpoly(pf) end