Skip to content

Commit aed7bb9

Browse files
adds sgb tests
1 parent 7278134 commit aed7bb9

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

src/siggb/linear_algebra.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ function echelonize!(matrix::MacaulayMatrix,
100100
if !iszero(arit_ops)
101101
@info "$(arit_ops) submul's"
102102
end
103-
@assert is_triangular(matrix)
104103
end
105104

106105
# subtract mult

test/algorithms/groebner-bases.jl

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,32 @@
2626
@test L == H
2727
@test I.gb[2] == H
2828
end
29+
30+
@testset "Algorithms -> Sig Gröbner bases" begin
31+
R, (x,y,z) = polynomial_ring(QQ,["x","y","z"], ordering=:degrevlex)
32+
F = [x^2+1-3, x*y-z, x*z^2-3*y^2]
33+
#= not a finite field =#
34+
@test_throws ErrorException sig_groebner_basis(F)
35+
R, (x,y,z) = polynomial_ring(GF(17),["x","y","z"], ordering=:degrevlex)
36+
F = [x^2+1-3, x*y-z, x*z^2-3*y^2]
37+
#= not homogeneous =#
38+
@test_throws ErrorException sig_groebner_basis(F)
39+
40+
#= GB test 1 =#
41+
Fhom = AlgebraicSolving._homogenize(F)
42+
sgb = sig_groebner_basis(Fhom)
43+
@test AlgebraicSolving._is_gb(sgb)
44+
45+
#= GB test 2 =#
46+
R, (x,y,z,w) = polynomial_ring(GF(65521),["x","y","z","w"], ordering=:degrevlex)
47+
F = cyclic(R).gens
48+
Fhom = AlgebraicSolving._homogenize(F)
49+
sgb = sig_groebner_basis(Fhom)
50+
@test AlgebraicSolving._is_gb(sgb)
51+
52+
#= GB test 3 =#
53+
F = katsura(R).gens
54+
Fhom = AlgebraicSolving._homogenize(F)
55+
sgb = sig_groebner_basis(Fhom)
56+
@test AlgebraicSolving._is_gb(sgb)
57+
end

0 commit comments

Comments
 (0)