Skip to content

Commit 09ecdea

Browse files
authored
Merge pull request #72 from ederc/new-release
Preparing v0.6.1
2 parents a47f995 + 279d71d commit 09ecdea

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "AlgebraicSolving"
22
uuid = "66b61cbe-0446-4d5d-9090-1ff510639f9d"
33
authors = ["ederc <[email protected]>", "Mohab Safey El Din <[email protected]", "Rafael Mohr <[email protected]>"]
4-
version = "0.6.0"
4+
version = "0.6.1"
55

66
[deps]
77
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

src/algorithms/groebner-bases.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ function _core_groebner_basis(
151151

152152
F = I.gens
153153
R = first(F).parent
154-
if F == [R(0)]
154+
155+
if F == repeat([R(0)], length(F))
156+
I.gb[eliminate] = F
155157
return F
156158
end
157159
nr_vars = nvars(R)
@@ -164,7 +166,6 @@ function _core_groebner_basis(
164166
error("Number of variables to be eliminated is bigger than number of variables in ring.")
165167
end
166168
reduce_gb = Int(complete_reduction)
167-
168169
# convert ideal to flattened arrays of ints
169170

170171
if !(field_char == 0)
@@ -176,6 +177,11 @@ function _core_groebner_basis(
176177
# nr_gens might change if F contains zero polynomials
177178
lens, cfs, exps, nr_gens = _convert_to_msolve(F)
178179

180+
# recheck if all input data is invalid
181+
if nr_gens == 0
182+
I.gb[eliminate] = F
183+
return I.gb[eliminate]
184+
end
179185
gb_ld = Ref(Cint(0))
180186
gb_len = Ref(Ptr{Cint}(0))
181187
gb_exp = Ref(Ptr{Cint}(0))

0 commit comments

Comments
 (0)