Skip to content

Commit 1fd216a

Browse files
committed
adds test after conversion to msolve input format if all input is invalid
1 parent a48fb57 commit 1fd216a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/algorithms/groebner-bases.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ function _core_groebner_basis(
166166
error("Number of variables to be eliminated is bigger than number of variables in ring.")
167167
end
168168
reduce_gb = Int(complete_reduction)
169-
170169
# convert ideal to flattened arrays of ints
171170

172171
if !(field_char == 0)
@@ -178,6 +177,11 @@ function _core_groebner_basis(
178177
# nr_gens might change if F contains zero polynomials
179178
lens, cfs, exps, nr_gens = _convert_to_msolve(F)
180179

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
181185
gb_ld = Ref(Cint(0))
182186
gb_len = Ref(Ptr{Cint}(0))
183187
gb_exp = Ref(Ptr{Cint}(0))

0 commit comments

Comments
 (0)