3
3
4
4
using Groebner
5
5
using AbstractAlgebra
6
+ import Nemo
6
7
7
8
suite = []
8
9
@@ -17,69 +18,138 @@ function compute_gb(system)
17
18
minimum (times)
18
19
end
19
20
20
- # Compute Groebner bases over
21
+ # Compute Groebner bases over integers modulo a large prime
22
+ problem = (
23
+ problem_name= " groebner, AA, GF(2^31-1), katsura 5" ,
24
+ result= compute_gb (Groebner. katsuran (5 , ordering= :degrevlex , ground= GF (2 ^ 31 - 1 )))
25
+ )
26
+ push! (suite, problem)
21
27
push! (
22
28
suite,
23
29
(
24
- problem_name= " groebner, GF(2^31-1), katsura 5" ,
30
+ problem_name= " groebner, AA, GF(2^31-1), katsura 5" ,
25
31
result= compute_gb (Groebner. katsuran (5 , ordering= :degrevlex , ground= GF (2 ^ 31 - 1 )))
26
32
)
27
33
)
28
34
push! (
29
35
suite,
30
36
(
31
- problem_name= " groebner, GF(2^31-1), katsura 6" ,
37
+ problem_name= " groebner, AA, GF(2^31-1), katsura 6" ,
32
38
result= compute_gb (Groebner. katsuran (6 , ordering= :degrevlex , ground= GF (2 ^ 31 - 1 )))
33
39
)
34
40
)
35
41
push! (
36
42
suite,
37
43
(
38
- problem_name= " groebner, GF(2^31-1), katsura 8" ,
44
+ problem_name= " groebner, AA, GF(2^31-1), katsura 8" ,
39
45
result= compute_gb (Groebner. katsuran (8 , ordering= :degrevlex , ground= GF (2 ^ 31 - 1 )))
40
46
)
41
47
)
42
48
push! (
43
49
suite,
44
50
(
45
- problem_name= " groebner, GF(2^31-1), katsura 10" ,
51
+ problem_name= " groebner, AA, GF(2^31-1), katsura 10" ,
46
52
result= compute_gb (Groebner. katsuran (10 , ordering= :degrevlex , ground= GF (2 ^ 31 - 1 )))
47
53
)
48
54
)
49
55
push! (
50
56
suite,
51
57
(
52
- problem_name= " groebner, GF(2^31-1), cyclic 8" ,
58
+ problem_name= " groebner, AA, GF(2^31-1), cyclic 8" ,
53
59
result= compute_gb (Groebner. cyclicn (8 , ordering= :degrevlex , ground= GF (2 ^ 31 - 1 )))
54
60
)
55
61
)
56
62
push! (
57
63
suite,
58
64
(
59
- problem_name= " groebner, QQ, katsura 8" ,
65
+ problem_name= " groebner, Nemo, GF(2^31-1), cyclic 8" ,
66
+ result= compute_gb (
67
+ Groebner. cyclicn (8 , ordering= :degrevlex , ground= Nemo. GF (2 ^ 31 - 1 ), np= Nemo)
68
+ )
69
+ )
70
+ )
71
+
72
+ # Compute Groebner bases over the rationals
73
+ push! (
74
+ suite,
75
+ (
76
+ problem_name= " groebner, AA, QQ, katsura 8" ,
60
77
result= compute_gb (Groebner. katsuran (8 , ordering= :degrevlex , ground= QQ))
61
78
)
62
79
)
63
80
push! (
64
81
suite,
65
82
(
66
- problem_name= " groebner, QQ, eco 10" ,
83
+ problem_name= " groebner, Nemo, QQ, katsura 8" ,
84
+ result= compute_gb (
85
+ Groebner. katsuran (8 , ordering= :degrevlex , ground= Nemo. QQ, np= Nemo)
86
+ )
87
+ )
88
+ )
89
+ push! (
90
+ suite,
91
+ (
92
+ problem_name= " groebner, AA, QQ, eco 10" ,
67
93
result= compute_gb (Groebner. eco10 (ordering= :degrevlex , ground= QQ))
68
94
)
69
95
)
70
96
push! (
71
97
suite,
72
98
(
73
- problem_name= " groebner, QQ, cyclic 7" ,
99
+ problem_name= " groebner, AA, QQ, cyclic 7" ,
74
100
result= compute_gb (Groebner. cyclicn (7 , ordering= :degrevlex , ground= QQ))
75
101
)
76
102
)
77
103
104
+ function compute_normalforms (system)
105
+ R = parent (system[1 ])
106
+ gb = Groebner. groebner (system)
107
+ times = []
108
+ trials = 7
109
+ for _ in 1 : trials
110
+ GC. gc ()
111
+ time = @elapsed begin
112
+ n1 = normalform (gb, system)
113
+ n2 = normalform (gb, gb)
114
+ end
115
+ push! (times, time)
116
+ end
117
+ minimum (times)
118
+ end
119
+
120
+ # Compute normal forms over integers modulo a prime
78
121
push! (
79
122
suite,
80
123
(
81
- problem_name= " groebner, QQ, cyclic 7" ,
82
- result= compute_gb (Groebner. cyclicn (7 , ordering= :degrevlex , ground= QQ))
124
+ problem_name= " normalform, AA, GF(2^31-1), cyclic 7" ,
125
+ result= compute_normalforms (
126
+ Groebner. cyclicn (7 , ordering= :degrevlex , ground= GF (2 ^ 31 - 1 ))
127
+ )
128
+ )
129
+ )
130
+ push! (
131
+ suite,
132
+ (
133
+ problem_name= " normalform, AA, GF(103), cyclic 8" ,
134
+ result= compute_normalforms (
135
+ Groebner. cyclicn (8 , ordering= :degrevlex , ground= GF (103 ))
136
+ )
137
+ )
138
+ )
139
+ push! (
140
+ suite,
141
+ (
142
+ problem_name= " normalform, Nemo, GF(103), cyclic 8" ,
143
+ result= compute_normalforms (
144
+ Groebner. cyclicn (8 , ordering= :degrevlex , ground= Nemo. GF (103 ), np= Nemo)
145
+ )
146
+ )
147
+ )
148
+ push! (
149
+ suite,
150
+ (
151
+ problem_name= " normalform, AA, QQ, katsura 9" ,
152
+ result= compute_normalforms (Groebner. katsuran (9 , ordering= :degrevlex , ground= QQ))
83
153
)
84
154
)
85
155
0 commit comments