From 0003998ba0552a135df8be08af1c366cecd51bce Mon Sep 17 00:00:00 2001 From: Shashi Gowda Date: Wed, 6 Sep 2023 12:17:43 -0400 Subject: [PATCH 1/3] explicitly depend on DynamicPolynomials and Bijections for CompatHelper purposes --- Project.toml | 2 ++ src/groebner_basis.jl | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index 8c085d797..ac4e8ddf7 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" diff --git a/src/groebner_basis.jl b/src/groebner_basis.jl index fd8959673..865090dd7 100644 --- a/src/groebner_basis.jl +++ b/src/groebner_basis.jl @@ -1,6 +1,5 @@ - -DP = SymbolicUtils.DynamicPolynomials -Bijections = SymbolicUtils.Bijections +using DynamicPolynomials +using Bijections # extracting underlying polynomial and coefficient type from Polyforms underlyingpoly(x::Number) = x From bd16784f279791113c110c168f7adad804e5fc3e Mon Sep 17 00:00:00 2001 From: Shashi Gowda Date: Wed, 6 Sep 2023 13:04:51 -0400 Subject: [PATCH 2/3] Fix type of vector --- Project.toml | 1 + src/groebner_basis.jl | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index ac4e8ddf7..b8d82fa05 100644 --- a/Project.toml +++ b/Project.toml @@ -49,6 +49,7 @@ 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 865090dd7..d0b454a39 100644 --- a/src/groebner_basis.jl +++ b/src/groebner_basis.jl @@ -1,6 +1,7 @@ using DynamicPolynomials using Bijections +const DP = DynamicPolynomials # extracting underlying polynomial and coefficient type from Polyforms underlyingpoly(x::Number) = x underlyingpoly(pf::PolyForm) = pf.p @@ -29,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 From 81508f04888418c773ad3e0a33e442b71f264710 Mon Sep 17 00:00:00 2001 From: Shashi Gowda Date: Wed, 6 Sep 2023 13:06:44 -0400 Subject: [PATCH 3/3] upper bound Bijections --- Project.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Project.toml b/Project.toml index b8d82fa05..9f9980dbb 100644 --- a/Project.toml +++ b/Project.toml @@ -43,6 +43,7 @@ SymbolicsSymPyExt = "SymPy" [compat] ArrayInterface = "6, 7" +Bijections = "0.1" ConstructionBase = "1.1, 1.2" DataStructures = "0.18" DiffRules = "1.4"