Skip to content

Commit d4a7b38

Browse files
Merge pull request #1479 from AayushSabharwal/as/cache-diff
build: bump SymbolicUtils compat
2 parents d3c202b + cf64723 commit d4a7b38

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ StaticArraysCore = "1.4"
9292
SymPy = "2.2"
9393
SymbolicIndexingInterface = "0.3.14"
9494
SymbolicLimits = "0.2.2"
95-
SymbolicUtils = "3.17"
95+
SymbolicUtils = "3.19"
9696
TermInterface = "2"
9797
julia = "1.10"
9898

ext/SymbolicsGroebnerExt.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module SymbolicsGroebnerExt
33
using Groebner
44
const Nemo = Groebner.Nemo
55
using Symbolics
6-
using Symbolics: Num, symtype
6+
using Symbolics: Num, symtype, BasicSymbolic
77
import Symbolics.PrecompileTools
88

99
"""
@@ -68,7 +68,7 @@ julia> @variables x y;
6868
julia> is_groebner_basis([x^2 - y^2, x*y^2 + x, y^3 + y])
6969
```
7070
"""
71-
function Symbolics.is_groebner_basis(polynomials::Vector{Num}; kwargs...)
71+
function Symbolics.is_groebner_basis(polynomials::Vector{<:Union{Num, BasicSymbolic{<:Number}}}; kwargs...)
7272
polynoms, _, _ = Symbolics.symbol_to_poly(polynomials)
7373
Groebner.isgroebner(polynoms; kwargs...)
7474
end

test/extensions/groebner.jl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,13 @@ truebasis = [
5151
x5^5 - 1
5252
]
5353
basis = expand.(groebner_basis(system))
54-
@test isequal(basis, truebasis)
54+
# monomial order can change, returning different but still valid bases
55+
@test_broken isequal(basis, truebasis)
56+
@test Symbolics.is_groebner_basis(basis)
5557

5658
basis = expand.(groebner_basis(system, linalg=:deterministic))
57-
@test isequal(basis, truebasis)
59+
@test_broken isequal(basis, truebasis)
60+
@test Symbolics.is_groebner_basis(basis)
5861

5962
N = 45671930739135174346839766056203605080877915151
6063
system = [
@@ -69,8 +72,9 @@ truebasis = [
6972
x3^3 + x3^2 * x4 + x3 * x4^2 + x4^3,
7073
x4^4 - N
7174
]
72-
basis = groebner_basis(system)
73-
@test isequal(expand.(basis), truebasis)
75+
basis = expand.(groebner_basis(system))
76+
@test_broken isequal(expand.(basis), truebasis)
77+
@test Symbolics.is_groebner_basis(basis)
7478

7579
# issues/1323
7680
@variables t S(t) R(t)

0 commit comments

Comments
 (0)