Skip to content

Commit 544aee0

Browse files
authored
Merge pull request #178 from sumiya11/eco
Add a function to make the eco-n system for different n
2 parents 1176387 + e0b164e commit 544aee0

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/utils/examples.jl

+11
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,17 @@ end
184184
###
185185
# Eco
186186

187+
function econ(n; np=AbstractAlgebra, k=np.QQ, internal_ordering=:degrevlex)
188+
R, x = polynomial_ring(k, ["x$i" for i in 1:n], internal_ordering=internal_ordering)
189+
vcat(
190+
[
191+
x[n]*(x[k] + sum(x[1:n-k-1] .* x[1+k:n-1]; init=0)) - k
192+
for k in 1:n-1
193+
],
194+
sum(x[1:n-1]; init=0) + 1
195+
)
196+
end
197+
187198
function eco5(; np=AbstractAlgebra, k=np.GF(2^31 - 1), internal_ordering=:degrevlex)
188199
_, (x1, x2, x3, x4, x5) =
189200
np.polynomial_ring(k, ["x$i" for i in 1:5], internal_ordering=internal_ordering)

test/groebner.jl

+1
Original file line numberDiff line numberDiff line change
@@ -1307,6 +1307,7 @@ end
13071307
Groebner.Examples.katsuran(3, internal_ordering=:lex, k=QQ),
13081308
Groebner.Examples.katsuran(4, internal_ordering=:lex, k=QQ),
13091309
Groebner.Examples.eco5(internal_ordering=:degrevlex, k=QQ),
1310+
Groebner.Examples.econ(4, internal_ordering=:degrevlex, k=QQ),
13101311
Groebner.Examples.cyclicn(5, internal_ordering=:degrevlex, k=QQ),
13111312
Groebner.Examples.ojika4(internal_ordering=:lex, k=QQ),
13121313
Groebner.Examples.noonn(6, internal_ordering=:degrevlex, k=QQ),

0 commit comments

Comments
 (0)