diff --git a/Project.toml b/Project.toml index 8e83f1202..32482902a 100644 --- a/Project.toml +++ b/Project.toml @@ -47,7 +47,7 @@ DiffRules = "1.4" Distributions = "0.23, 0.24, 0.25" DocStringExtensions = "0.7, 0.8, 0.9" DomainSets = "0.6" -Groebner = "0.3" +Groebner = "0.3, 0.4" IfElse = "0.1" LaTeXStrings = "1.3" Latexify = "0.11, 0.12, 0.13, 0.14, 0.15, 0.16" diff --git a/src/groebner_basis.jl b/src/groebner_basis.jl index df4d0ca46..fd8959673 100644 --- a/src/groebner_basis.jl +++ b/src/groebner_basis.jl @@ -3,9 +3,9 @@ DP = SymbolicUtils.DynamicPolynomials Bijections = SymbolicUtils.Bijections # extracting underlying polynomial and coefficient type from Polyforms -underlyingpoly(x::Number) = x +underlyingpoly(x::Number) = x underlyingpoly(pf::PolyForm) = pf.p -coefftype(x::Number) = typeof(x) +coefftype(x::Number) = typeof(x) coefftype(pf::PolyForm) = DP.coefficienttype(underlyingpoly(pf)) #= @@ -19,8 +19,8 @@ function symbol_to_poly(sympolys::AbstractArray) stdsympolys = map(unwrap, sympolys) sort!(stdsympolys, lt=(<ₑ)) - pvar2sym = Bijections.Bijection{Any,Any}() - sym2term = Dict{BasicSymbolic,Any}() + pvar2sym = Bijections.Bijection{Any,Any}() + sym2term = Dict{BasicSymbolic,Any}() polyforms = map(f -> PolyForm(f, pvar2sym, sym2term), stdsympolys) # Discover common coefficient type @@ -72,7 +72,7 @@ The algorithm is randomized, so the basis will be correct with high probability. function groebner_basis(polynomials) polynoms, pvar2sym, sym2term = symbol_to_poly(polynomials) - basis = groebner(polynoms, reduced=true) + basis = groebner(polynoms) # polynomials is nonemtpy T = symtype(first(polynomials))