passagemath-singular 10.6.30__cp310-cp310-musllinux_1_2_aarch64.whl → 10.6.31rc2__cp310-cp310-musllinux_1_2_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of passagemath-singular might be problematic. Click here for more details.
- PySingular.cpython-310-aarch64-linux-gnu.so +0 -0
- {passagemath_singular-10.6.30.dist-info → passagemath_singular-10.6.31rc2.dist-info}/METADATA +7 -7
- {passagemath_singular-10.6.30.dist-info → passagemath_singular-10.6.31rc2.dist-info}/RECORD +70 -68
- passagemath_singular.libs/{libSingular-4-d894d219.4.1.so → libSingular-4-dfbeac15.4.1.so} +0 -0
- passagemath_singular.libs/libfactory-4-6907d06f.4.1.so +0 -0
- passagemath_singular.libs/libntl-d58d2536.so.44.0.1 +0 -0
- passagemath_singular.libs/{libomalloc-0-7768d27e.9.6.so → libomalloc-0-c68af0d6.9.6.so} +0 -0
- passagemath_singular.libs/{libpolys-4-2dcf33c7.4.1.so → libpolys-4-f587aa49.4.1.so} +0 -0
- passagemath_singular.libs/libreadline-3f6fb6b3.so.8.2 +0 -0
- passagemath_singular.libs/{libsingular_resources-4-21ad9234.4.1.so → libsingular_resources-4-c24151f0.4.1.so} +0 -0
- sage/algebras/fusion_rings/fast_parallel_fmats_methods.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/algebras/fusion_rings/poly_tup_engine.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/algebras/fusion_rings/shm_managers.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/algebras/letterplace/free_algebra_element_letterplace.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/algebras/letterplace/free_algebra_letterplace.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/algebras/letterplace/letterplace_ideal.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/algebras/quatalg/quaternion_algebra_cython.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/algebras/quatalg/quaternion_algebra_element.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/libs/singular/decl.pxd +1 -1
- sage/libs/singular/function.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/libs/singular/groebner_strategy.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/libs/singular/option.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/libs/singular/polynomial.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/libs/singular/ring.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/libs/singular/singular.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/matrix/matrix_mpolynomial_dense.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/function_field/element_polymod.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/polynomial/multi_polynomial_ideal_libsingular.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/polynomial/multi_polynomial_libsingular.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/rings/polynomial/plural.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/symbolic/expression.cpython-310-aarch64-linux-gnu.so +0 -0
- sage/symbolic/expression.pyx +1 -1
- sage_wheels/bin/ESingular +0 -0
- sage_wheels/bin/Singular +0 -0
- sage_wheels/bin/TSingular +0 -0
- sage_wheels/lib/singular/MOD/cohomo.so +0 -0
- sage_wheels/lib/singular/MOD/gfanlib.so +0 -0
- sage_wheels/lib/singular/MOD/gitfan.so +0 -0
- sage_wheels/lib/singular/MOD/interval.so +0 -0
- sage_wheels/lib/singular/MOD/subsets.so +0 -0
- sage_wheels/lib/singular/MOD/systhreads.so +0 -0
- sage_wheels/libexec/singular/MOD/change_cost +0 -0
- sage_wheels/libexec/singular/MOD/solve_IP +0 -0
- sage_wheels/libexec/singular/MOD/toric_ideal +0 -0
- sage_wheels/share/info/singular.info +8119 -3332
- sage_wheels/share/singular/LIB/assprimeszerodim.lib +21 -35
- sage_wheels/share/singular/LIB/gmspoly.lib +2 -2
- sage_wheels/share/singular/LIB/homolog.lib +41 -3
- sage_wheels/share/singular/LIB/modprimdec.lib +22 -2
- sage_wheels/share/singular/LIB/modstd.lib +1 -2
- sage_wheels/share/singular/LIB/modular.lib +124 -17
- sage_wheels/share/singular/LIB/modules.lib +15 -7
- sage_wheels/share/singular/LIB/ncpreim.lib +2 -2
- sage_wheels/share/singular/LIB/normal.lib +6 -6
- sage_wheels/share/singular/LIB/normaliz.lib +101 -15
- sage_wheels/share/singular/LIB/parallel.lib +28 -14
- sage_wheels/share/singular/LIB/primdec.lib +51 -68
- sage_wheels/share/singular/LIB/primdecint.lib +2 -2
- sage_wheels/share/singular/LIB/random.lib +2 -2
- sage_wheels/share/singular/LIB/resources.lib +7 -6
- sage_wheels/share/singular/LIB/sagbiNormaliz.lib +228 -104
- sage_wheels/share/singular/LIB/sagbiNormaliz0.lib +1498 -0
- sage_wheels/share/singular/LIB/sheafcoh.lib +2 -2
- sage_wheels/share/singular/LIB/sresext.lib +757 -0
- sage_wheels/share/singular/LIB/triang.lib +20 -18
- sage_wheels/share/singular/emacs/hlp-cmpl.el +8 -0
- sage_wheels/share/singular/singular.idx +1160 -1144
- passagemath_singular.libs/libfactory-4-e322c0c6.4.1.so +0 -0
- passagemath_singular.libs/libntl-f4409ed7.so.44.0.1 +0 -0
- passagemath_singular.libs/libreadline-78057fb4.so.8.2 +0 -0
- {passagemath_singular-10.6.30.dist-info → passagemath_singular-10.6.31rc2.dist-info}/WHEEL +0 -0
- {passagemath_singular-10.6.30.dist-info → passagemath_singular-10.6.31rc2.dist-info}/top_level.txt +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
//// Singular library normaliz.lib
|
|
2
|
-
version="version sagbiNormaliz.lib 4.4.
|
|
2
|
+
version="version sagbiNormaliz.lib 4.4.1.2 July_2025 "; // $Id: cda254052dc8f441ea599ecd6e6179207fe2b1a2 $
|
|
3
3
|
category="Commutative Algebra";
|
|
4
4
|
info="
|
|
5
5
|
LIBRARY: sagbiNormaliz.lib Provides an interface for the computation of Sagbi bases.
|
|
6
|
-
It uses normaliz
|
|
6
|
+
It uses normaliz (version 3.10.5 or higher) for combinatorial computations.
|
|
7
7
|
|
|
8
8
|
AUTHORS: Winfried Bruns, wbruns@uos.de
|
|
9
9
|
|
|
@@ -19,8 +19,15 @@ In addition to the Sagbi bases it can compute a defining ideal for the algebra A
|
|
|
19
19
|
respect to the given system of generators. (The computation of defining ideals cannot be
|
|
20
20
|
controlled by Hilbert series.)
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
See the papers
|
|
23
|
+
|
|
24
|
+
(1) W.Bruns and A. Conca, Sagbi combinatorics of maximal minors and a Sagbi algorithm.
|
|
25
|
+
J. Symb. Comput. 120 (2024), Article ID 102237, 14 p. (arXiv:2302.14345)
|
|
26
|
+
|
|
27
|
+
(2) W. Bruns, A. Conca and F.Lembo, Sagbi bases, defining ideals and algebras of minors.
|
|
28
|
+
|
|
29
|
+
Use of this library requires the program Normaliz, version n 3.10.5 or newer, to be
|
|
30
|
+
installed and the availability of normaliz.lib. You can download both from
|
|
24
31
|
@uref{https://github.com/Normaliz/Normaliz/releases}.
|
|
25
32
|
Please make sure that the executable is in the search path or use setNmzExecPath (defined
|
|
26
33
|
in normaliz.lib).
|
|
@@ -47,15 +54,16 @@ sagbiHilbControlled(ideal Q, intvec HS_num_algebra, intvec HS_denom_algebra, int
|
|
|
47
54
|
is checked again for completion.
|
|
48
55
|
|
|
49
56
|
sagbiDefIdealGeneral(ideal Q [, int sagbiMaxRounds, int sorting, int verb]) does the same as sagbiGeneral, but additionally
|
|
50
|
-
computes as much of a system of generators of the defining idael as it can get before being stopped.
|
|
57
|
+
computes as much of a system of generators of the defining idael as it can get before being stopped. Addutionally it returns the list of expressions of the Sagbi elements in terms of the original generators of the aubalgebra, calles the retract.
|
|
51
58
|
|
|
52
59
|
sagbiDefIdealByDegree(ideal Q, int Sagbi_degree_bound,[,int sorting, int verb]) does the same as sagbiByDegree,
|
|
53
60
|
but additionally computes the defining ideal up to the degree set by Sagbi_degree_bound.
|
|
61
|
+
Addutionally it returns the list of expressions of the Sagbi elements in terms of the original generators of the aubalgebra, calles the retract.
|
|
54
62
|
|
|
55
63
|
|
|
56
64
|
";
|
|
57
|
-
LIB "general.lib";
|
|
58
65
|
|
|
66
|
+
LIB "finvar.lib";
|
|
59
67
|
|
|
60
68
|
// ------------------------------------------------
|
|
61
69
|
// Helpers for ideal management
|
|
@@ -96,15 +104,15 @@ static proc aapplyLaedIdeal(ideal LC){
|
|
|
96
104
|
|
|
97
105
|
for(int i = 1; i <= ncols(LC); i++){
|
|
98
106
|
if(LC[i] == 0){
|
|
99
|
-
@DefIdeal = @DefIdeal, @
|
|
100
|
-
@
|
|
107
|
+
@DefIdeal = @DefIdeal, @Retract[i];
|
|
108
|
+
@Retract[i] = 0;
|
|
101
109
|
}
|
|
102
110
|
else{
|
|
103
|
-
@
|
|
111
|
+
@Retract[i] = @Retract[i]/LC[i];
|
|
104
112
|
}
|
|
105
113
|
}
|
|
106
114
|
@DefIdeal = simplify(@DefIdeal, 3);
|
|
107
|
-
@
|
|
115
|
+
@Retract = simplify(@Retract, 2);
|
|
108
116
|
}
|
|
109
117
|
|
|
110
118
|
|
|
@@ -131,14 +139,14 @@ static proc aapplyLaedIdeal(ideal LC){
|
|
|
131
139
|
|
|
132
140
|
for(int i = 1; i <= size(D); i++){
|
|
133
141
|
if(D[i] <= 0){ // constant
|
|
134
|
-
@DefIdeal = @DefIdeal, @
|
|
135
|
-
@
|
|
142
|
+
@DefIdeal = @DefIdeal, @Retract[i] - LC[i];
|
|
143
|
+
@Retract[i] = 0;
|
|
136
144
|
}
|
|
137
145
|
else{
|
|
138
|
-
@
|
|
146
|
+
@Retract[i] = @Retract[i]/LC[i];
|
|
139
147
|
}
|
|
140
148
|
}
|
|
141
|
-
@
|
|
149
|
+
@Retract = simplify(@Retract, 2);
|
|
142
150
|
}
|
|
143
151
|
|
|
144
152
|
// ------------------------------------------------
|
|
@@ -189,7 +197,7 @@ static proc selectNextDegree(intmat saveTete_a_tete, int startTete_tete, intvec
|
|
|
189
197
|
|
|
190
198
|
int endTete_atete = nrows(saveTete_a_tete);
|
|
191
199
|
if(startTete_tete > nrows(saveTete_a_tete))
|
|
192
|
-
{
|
|
200
|
+
{
|
|
193
201
|
intmat empty[0][ncols(saveTete_a_tete)];
|
|
194
202
|
return (empty, startTete_tete);
|
|
195
203
|
}
|
|
@@ -253,22 +261,24 @@ static proc polyProd(intvec F, bigintmat G, int max_degree){
|
|
|
253
261
|
return(Prod);
|
|
254
262
|
}
|
|
255
263
|
|
|
256
|
-
static proc cycloRatFunctionExpansion(
|
|
257
|
-
// Computes the expansion of a rational function with numerator represented by
|
|
264
|
+
static proc cycloRatFunctionExpansion(EnumData HS, int exp_degree){
|
|
265
|
+
// Computes the expansion of a rational function with numerator represented by HS.HilbertSeriesNum
|
|
258
266
|
// and denominator a product of terms 1 - t^g_i where zjhe g_i are the entries of den_vec
|
|
267
|
+
|
|
259
268
|
bigintmat E[1][exp_degree + 1];
|
|
260
|
-
int to_copy =
|
|
269
|
+
int to_copy = ncols(HS.HilbertSeriesNum);
|
|
261
270
|
if(to_copy > exp_degree + 1){
|
|
262
271
|
to_copy = exp_degree + 1;
|
|
263
272
|
}
|
|
264
273
|
int i, j, k;
|
|
265
274
|
for(i = 1; i <= to_copy; i++){
|
|
266
|
-
E[1, i] =
|
|
275
|
+
E[1, i] = HS.HilbertSeriesNum[1,i];
|
|
267
276
|
}
|
|
268
277
|
intvec fac;
|
|
269
278
|
for(i = 1; i <= exp_degree; i++){
|
|
270
279
|
fac = fac, 0;
|
|
271
280
|
}
|
|
281
|
+
intvec den_vec = HS.HilbertSeriesDenom;
|
|
272
282
|
for( k = 1; k<= size(den_vec); k++){
|
|
273
283
|
for(i = 1; i <= size(fac); i++){
|
|
274
284
|
fac[i] = 0;
|
|
@@ -281,11 +291,12 @@ static proc cycloRatFunctionExpansion(intvec num_vec, intvec den_vec, int exp_de
|
|
|
281
291
|
return(E);
|
|
282
292
|
}
|
|
283
293
|
|
|
284
|
-
|
|
294
|
+
|
|
295
|
+
static proc intvec2poly(bigintmat vec){
|
|
285
296
|
poly f = 0;
|
|
286
297
|
poly t = var(1);
|
|
287
|
-
for(int i = 1; i <=
|
|
288
|
-
f = f + vec[i]*t^(i-1);
|
|
298
|
+
for(int i = 1; i <= ncols(vec); i++){
|
|
299
|
+
f = f + vec[1,i]*t^(i-1);
|
|
289
300
|
}
|
|
290
301
|
return(f);
|
|
291
302
|
}
|
|
@@ -294,44 +305,67 @@ static proc expandDenom(intvec den){
|
|
|
294
305
|
poly g = 1;
|
|
295
306
|
poly t = var(1);
|
|
296
307
|
for(int i = 1; i <= size(den); i++){
|
|
297
|
-
|
|
308
|
+
g = g*(1-t^den[i]);
|
|
298
309
|
}
|
|
299
|
-
|
|
310
|
+
return(g);
|
|
300
311
|
}
|
|
301
312
|
|
|
302
|
-
static proc unifiedRepresentations(
|
|
313
|
+
static proc unifiedRepresentations(EnumData HS_1, EnumData HS_2){
|
|
303
314
|
|
|
304
315
|
ring T = 0,t,dp;
|
|
305
316
|
poly num_1, den_1, num_2, den_2;
|
|
306
|
-
num_1 = intvec2poly(
|
|
307
|
-
num_2 = intvec2poly(
|
|
308
|
-
den_1 = expandDenom(
|
|
309
|
-
den_2 = expandDenom(
|
|
317
|
+
num_1 = intvec2poly(HS_1.HilbertSeriesNum);
|
|
318
|
+
num_2 = intvec2poly(HS_2.HilbertSeriesNum);
|
|
319
|
+
den_1 = expandDenom(HS_1.HilbertSeriesDenom);
|
|
320
|
+
den_2 = expandDenom(HS_2.HilbertSeriesDenom);
|
|
310
321
|
if(num_1*den_2 == num_2*den_1){
|
|
311
322
|
return(1);
|
|
312
323
|
}
|
|
313
324
|
return(0);
|
|
314
325
|
}
|
|
315
326
|
|
|
316
|
-
static proc
|
|
327
|
+
static proc fullDenomCCycloRatFunction(EnumData HS){
|
|
328
|
+
// transfer HS from denominator of cyclotomic polynomials p(e)
|
|
329
|
+
// to denominator with denominator of factors (1-t^e)
|
|
330
|
+
|
|
331
|
+
ring T = 0,t,dp;
|
|
332
|
+
poly factor;
|
|
333
|
+
int expo;
|
|
334
|
+
poly num_poly = intvec2poly(HS.HilbertSeriesNum);
|
|
335
|
+
for(int i = 1; i <= size(HS.HilbertSeriesDenom); i++){
|
|
336
|
+
expo = HS.HilbertSeriesDenom[i];
|
|
337
|
+
factor = (1 -t^expo)/cyclotomic(expo);
|
|
338
|
+
num_poly = num_poly * factor;
|
|
339
|
+
}
|
|
340
|
+
matrix C = coeffs(num_poly,t);
|
|
341
|
+
bigintmat D[1][nrows(C)];
|
|
342
|
+
for(i = 1; i<= nrows(C); i++){
|
|
343
|
+
D[1,i] = bigint(C[i,1]);
|
|
344
|
+
}
|
|
345
|
+
HS.HilbertSeriesNum = D;
|
|
346
|
+
return(HS);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
static proc compareCCycloRatFunctions(EnumData HS_1, EnumData HS_2){
|
|
317
350
|
// Compares the expansions of rational functions as in cycloRatFunctionExpansion
|
|
318
351
|
// It must be made sure that the rational functions agree if and only they agree in
|
|
319
352
|
// numerator and denominator
|
|
320
353
|
|
|
321
|
-
if(
|
|
322
|
-
|
|
323
|
-
}
|
|
324
|
-
|
|
354
|
+
// if(HS_1.HilbertSeriesNum == HS_2.HilbertSeriesNum && HS_1.HilbertSeriesDenom == HS_2.HilbertSeriesDenom){
|
|
355
|
+
// return(-1,0);
|
|
356
|
+
// }
|
|
357
|
+
|
|
358
|
+
if(unifiedRepresentations(HS_1, HS_2) ){
|
|
325
359
|
return(-1,0);
|
|
326
360
|
}
|
|
327
361
|
|
|
328
|
-
int expansion_deg =
|
|
362
|
+
int expansion_deg = ncols(HS_1.HilbertSeriesNum);
|
|
329
363
|
bigintmat expansion_1, expansion_2;
|
|
330
364
|
int u;
|
|
331
365
|
while(1)
|
|
332
|
-
{
|
|
333
|
-
expansion_1 = cycloRatFunctionExpansion(
|
|
334
|
-
expansion_2 = cycloRatFunctionExpansion(
|
|
366
|
+
{
|
|
367
|
+
expansion_1 = cycloRatFunctionExpansion(HS_1, expansion_deg);
|
|
368
|
+
expansion_2 = cycloRatFunctionExpansion(HS_2, expansion_deg);
|
|
335
369
|
if(expansion_1 == expansion_2){
|
|
336
370
|
expansion_deg = 2*expansion_deg;
|
|
337
371
|
continue;
|
|
@@ -364,12 +398,44 @@ static proc HilbertSeriesMonoid(intmat U, int min_degree){
|
|
|
364
398
|
dbprint(our_printlevel,"Not normal");
|
|
365
399
|
swallow = setNmzOption("MRK",1);
|
|
366
400
|
}
|
|
401
|
+
int saveBigNumInvs = BigNumInvs;
|
|
402
|
+
BigNumInvs = 1;
|
|
367
403
|
swallow = setNmzOption("only_hvect",1);
|
|
404
|
+
if(Cyclotomic){
|
|
405
|
+
swallow = setNmzOption("cyclo", 1);
|
|
406
|
+
}
|
|
407
|
+
else{
|
|
408
|
+
swallow = setNmzOption("noquasi", 1);
|
|
409
|
+
}
|
|
410
|
+
// swallow = setNmzOption("verbose", 1);
|
|
368
411
|
V = normaliz(U, "monoid", min_degree, "gb_min_degree");
|
|
369
412
|
swallow = setNmzOption("only_hvect",0);
|
|
370
413
|
swallow = setNmzOption("MRK",0);
|
|
414
|
+
if(Cyclotomic){
|
|
415
|
+
swallow = setNmzOption("cyclo", 0);
|
|
416
|
+
}
|
|
417
|
+
else{
|
|
418
|
+
swallow = setNmzOption("noquasi", 0);
|
|
419
|
+
}
|
|
420
|
+
// swallow = setNmzOption("verbose", 0);
|
|
371
421
|
exportNuminvs();
|
|
372
|
-
|
|
422
|
+
BigNumInvs = saveBigNumInvs;
|
|
423
|
+
EnumData HSeries;
|
|
424
|
+
bigintmat Transfer;
|
|
425
|
+
if(Cyclotomic){
|
|
426
|
+
HSeries.HilbertSeriesDenom = nmz_hilbert_series_cyclo_denom;
|
|
427
|
+
Transfer = nmz_hilbert_series_cyclo_num;
|
|
428
|
+
}
|
|
429
|
+
else{
|
|
430
|
+
HSeries.HilbertSeriesDenom = nmz_hilbert_series_denom;
|
|
431
|
+
Transfer = nmz_hilbert_series_num;
|
|
432
|
+
}
|
|
433
|
+
HSeries.HilbertSeriesNum = Transfer;
|
|
434
|
+
if(Cyclotomic){
|
|
435
|
+
HSeries = fullDenomCCycloRatFunction(HSeries);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
return(HSeries, is_normal);
|
|
373
439
|
}
|
|
374
440
|
|
|
375
441
|
static proc HilbertSeriesMonAlgebra(ideal P, int min_degree)
|
|
@@ -399,13 +465,13 @@ static proc HilbertBasisMonAlgebra(ideal P){
|
|
|
399
465
|
// Subduction
|
|
400
466
|
// -----------------------------------------------
|
|
401
467
|
|
|
402
|
-
static proc Subduction(ideal
|
|
468
|
+
static proc Subduction(ideal P, bigint nr_generators_needed){
|
|
403
469
|
// nr_generators = -1: complete subduction
|
|
404
470
|
// szbduction in the sense of Robbiano-Sweedler.
|
|
405
471
|
// It is applied once to every polynomial whose
|
|
406
472
|
// initial is not in the minimal system of generators of the algebra
|
|
407
473
|
// generated by the initial monomials
|
|
408
|
-
ideal P = Pgiven;
|
|
474
|
+
// ideal P = Pgiven;
|
|
409
475
|
intvec test_num, test_den;
|
|
410
476
|
int i,j;
|
|
411
477
|
int swallow = setNmzOption("REP",1);
|
|
@@ -455,7 +521,7 @@ static proc Subduction(ideal Pgiven, bigint nr_generators_needed){
|
|
|
455
521
|
|
|
456
522
|
if(@do_def_ideal){
|
|
457
523
|
setring @S;
|
|
458
|
-
map g = S,@
|
|
524
|
+
map g = S,@Retract;
|
|
459
525
|
ideal Pre_modify = g(Bl);
|
|
460
526
|
ideal LCC = fetch(our_ring, LC);
|
|
461
527
|
for(i = 1; i <= nrows(V); i++){
|
|
@@ -464,18 +530,18 @@ static proc Subduction(ideal Pgiven, bigint nr_generators_needed){
|
|
|
464
530
|
break;
|
|
465
531
|
}
|
|
466
532
|
}
|
|
467
|
-
@
|
|
533
|
+
@Retract[j] = Pre_modify[i];
|
|
468
534
|
if(D[j] <= 0){
|
|
469
|
-
@DefIdeal = @DefIdeal, @
|
|
470
|
-
@
|
|
535
|
+
@DefIdeal = @DefIdeal, @Retract[j] - LCC[j];
|
|
536
|
+
@Retract[j] = 0;
|
|
471
537
|
}
|
|
472
538
|
else{
|
|
473
|
-
@
|
|
539
|
+
@Retract[j] = @Retract[j]/LCC[j];
|
|
474
540
|
}
|
|
475
541
|
}
|
|
476
|
-
@
|
|
477
|
-
if(check != ncols(@
|
|
478
|
-
"P ncols", check, " PreIm ncols ", ncols(@
|
|
542
|
+
@Retract = simplify(@Retract, 2); // removes 0, DON'T MAKE MONIC
|
|
543
|
+
if(check != ncols(@Retract)){
|
|
544
|
+
"P ncols", check, " PreIm ncols ", ncols(@Retract);
|
|
479
545
|
ERROR("Preimage doesn' fit. Inform the authors!");
|
|
480
546
|
}
|
|
481
547
|
}
|
|
@@ -519,7 +585,8 @@ static proc completeSubduction(ideal Q){
|
|
|
519
585
|
def our_ring = basering;
|
|
520
586
|
if(@do_def_ideal){
|
|
521
587
|
setring @S;
|
|
522
|
-
"Size defining ideal so far (not minimized)"
|
|
588
|
+
output = "Size defining ideal so far (not minimized) " + string(size(@DefIdeal));
|
|
589
|
+
dbprint(our_printlevel,output);
|
|
523
590
|
setring our_ring;
|
|
524
591
|
}
|
|
525
592
|
return(Q);
|
|
@@ -531,10 +598,10 @@ static proc completeSubduction(ideal Q){
|
|
|
531
598
|
// Tete-a-tete
|
|
532
599
|
// -----------------------------------------------
|
|
533
600
|
|
|
534
|
-
static proc Tete_A_TeteHilbControlled(ideal
|
|
535
|
-
// Computes the terte-a-
|
|
601
|
+
static proc Tete_A_TeteHilbControlled(ideal Q, int crit_degree, int is_normal)
|
|
602
|
+
// Computes the terte-a-tete of a system of polynomials (termonology of
|
|
536
603
|
// Robbiano-Sweedler). Control by Hilbert series: only the crit degree is
|
|
537
|
-
// evaluated and normalioty is exploited.
|
|
604
|
+
// evaluated and normalioty is exploited. General version below.
|
|
538
605
|
{
|
|
539
606
|
dbprint(our_printlevel,"Start Tete-a-tete ");
|
|
540
607
|
string output;
|
|
@@ -544,7 +611,7 @@ static proc Tete_A_TeteHilbControlled(ideal P, int crit_degree, int is_normal)
|
|
|
544
611
|
// int t = timer;
|
|
545
612
|
|
|
546
613
|
int i;
|
|
547
|
-
ideal Q = P;
|
|
614
|
+
// ideal Q = P;
|
|
548
615
|
Q = simplify(Q,3);
|
|
549
616
|
|
|
550
617
|
// First we reconstruct the grading of the binomials
|
|
@@ -553,6 +620,10 @@ static proc Tete_A_TeteHilbControlled(ideal P, int crit_degree, int is_normal)
|
|
|
553
620
|
intvec SGrad = gradVector(Q, GradingDenom);
|
|
554
621
|
intmat U = mons2intmat(Q);
|
|
555
622
|
|
|
623
|
+
// ideal Bla = lead(Q);
|
|
624
|
+
// Bla;
|
|
625
|
+
// mons2intmat(Bla);
|
|
626
|
+
|
|
556
627
|
def our_ring = basering;
|
|
557
628
|
int p = size(Q);
|
|
558
629
|
list baseringlist = ringlist(basering);
|
|
@@ -562,9 +633,11 @@ static proc Tete_A_TeteHilbControlled(ideal P, int crit_degree, int is_normal)
|
|
|
562
633
|
ideal B, Bfull;
|
|
563
634
|
if(is_normal){ // in the normal case we don't have the Markov basis yet
|
|
564
635
|
int swallow = setNmzOption("MRK",1);
|
|
636
|
+
// swallow = setNmzOption("verbose",1);
|
|
565
637
|
intmat Bl = normaliz(U, "monoid", crit_degree, "gb_min_degree", crit_degree, "gb_degree_bound");
|
|
566
638
|
exportNuminvs();
|
|
567
639
|
swallow = setNmzOption("MRK",0);
|
|
640
|
+
// swallow = setNmzOption("verbose",0);
|
|
568
641
|
V = readNmzData("mrk");
|
|
569
642
|
dbprint(our_printlevel,"Evaluating tete-a-tete");
|
|
570
643
|
output = "Computing " + string(nrows(V)) + " binomials";
|
|
@@ -580,6 +653,7 @@ static proc Tete_A_TeteHilbControlled(ideal P, int crit_degree, int is_normal)
|
|
|
580
653
|
int our_deg, u;
|
|
581
654
|
V = readNmzData("mrk");
|
|
582
655
|
dbprint(our_printlevel,"Evaluating tete-a-tete");
|
|
656
|
+
// V;
|
|
583
657
|
output = "Selecting from " + string(nrows(V)) + " binomials";
|
|
584
658
|
dbprint(our_printlevel,output);
|
|
585
659
|
Bfull = intmat2binomials(V);
|
|
@@ -591,7 +665,7 @@ static proc Tete_A_TeteHilbControlled(ideal P, int crit_degree, int is_normal)
|
|
|
591
665
|
dbprint(our_printlevel,"Binomials computed");
|
|
592
666
|
|
|
593
667
|
setring our_ring;
|
|
594
|
-
map f =S,
|
|
668
|
+
map f =S, Q;
|
|
595
669
|
Q = Q, f(B);
|
|
596
670
|
dbprint(our_printlevel,"Generators extended");
|
|
597
671
|
Q =simplify(Q,3);
|
|
@@ -599,24 +673,18 @@ static proc Tete_A_TeteHilbControlled(ideal P, int crit_degree, int is_normal)
|
|
|
599
673
|
return(Q);
|
|
600
674
|
}
|
|
601
675
|
|
|
602
|
-
static proc Tete_A_TeteGeneral(ideal
|
|
676
|
+
static proc Tete_A_TeteGeneral(ideal Q, int current_degree, int Sagbi_degree_bound, int degreeByDegree, int makeNewTete_a_tete)
|
|
603
677
|
{
|
|
604
678
|
|
|
605
679
|
int degree_tete_a_tete = -1;
|
|
606
680
|
string output;
|
|
607
|
-
// "Start Tete-a-tete ";
|
|
608
|
-
// "current_degree ", current_degree;
|
|
609
|
-
// "Sagbi_degree_bound ", Sagbi_degree_bound;
|
|
610
|
-
// "degreeByDegree ", degreeByDegree;
|
|
611
|
-
// "makeNewTete_a_tete ", makeNewTete_a_tete;
|
|
612
|
-
// "startTete_tete", startTete_tete;
|
|
613
681
|
if(makeNewTete_a_tete){
|
|
614
682
|
dbprint(our_printlevel,"Making new tete-a-tete");
|
|
615
683
|
}
|
|
616
684
|
else{
|
|
617
685
|
dbprint(our_printlevel,"Exploiting existing tete-a-tete");
|
|
618
686
|
}
|
|
619
|
-
ideal Q = P;
|
|
687
|
+
// ideal Q = P;
|
|
620
688
|
intvec SGrad;
|
|
621
689
|
if(degreeByDegree){
|
|
622
690
|
int GradingDenom = gradingDenominator(Q);
|
|
@@ -625,6 +693,9 @@ static proc Tete_A_TeteGeneral(ideal P, int current_degree, int Sagbi_degree_bou
|
|
|
625
693
|
|
|
626
694
|
intmat U = mons2intmat(Q);
|
|
627
695
|
|
|
696
|
+
// ideal Bla = lead(Q);
|
|
697
|
+
// Bla;
|
|
698
|
+
|
|
628
699
|
def our_ring = basering;
|
|
629
700
|
int p = size(Q);
|
|
630
701
|
list baseringlist = ringlist(basering);
|
|
@@ -641,9 +712,6 @@ static proc Tete_A_TeteGeneral(ideal P, int current_degree, int Sagbi_degree_bou
|
|
|
641
712
|
}
|
|
642
713
|
else{
|
|
643
714
|
if(makeNewTete_a_tete){
|
|
644
|
-
// U;
|
|
645
|
-
// "---------------";
|
|
646
|
-
// transpose(U);
|
|
647
715
|
Dummy = normaliz(U, "monoid", current_degree, "gb_min_degree");
|
|
648
716
|
// exportNuminvs();
|
|
649
717
|
// showNuminvs();
|
|
@@ -711,13 +779,13 @@ static proc Tete_A_TeteGeneral(ideal P, int current_degree, int Sagbi_degree_bou
|
|
|
711
779
|
|
|
712
780
|
if(@do_def_ideal){
|
|
713
781
|
setring @S;
|
|
714
|
-
map g = S,@
|
|
715
|
-
@
|
|
782
|
+
map g = S,@Retract;
|
|
783
|
+
@Retract = @Retract, g(B);
|
|
716
784
|
ideal LCC = fetch(our_ring, LC);
|
|
717
785
|
// aapplyLaedIdeal(LCC);
|
|
718
786
|
preparePreIm(D, LCC);
|
|
719
|
-
if(check != ncols(@
|
|
720
|
-
"Q ncols", check, " PreIm ncols ", ncols(@
|
|
787
|
+
if(check != ncols(@Retract)){
|
|
788
|
+
"Q ncols", check, " PreIm ncols ", ncols(@Retract);
|
|
721
789
|
ERROR("Preimage doesn'tfit. Inform the authors!");
|
|
722
790
|
}
|
|
723
791
|
}
|
|
@@ -733,15 +801,30 @@ static proc dosagbiHilbControlled(ideal Q, intvec HS_num_algebra, intvec HS_deno
|
|
|
733
801
|
int Sagbi_degree_bound, int finalCheck, int sorting){
|
|
734
802
|
// The code would allow Sagbi_degree_bound = -, meaning no bound
|
|
735
803
|
|
|
804
|
+
if(HS_denom_algebra[1] < 0){
|
|
805
|
+
Cyclotomic = 1;
|
|
806
|
+
HS_denom_algebra[1] = -HS_denom_algebra[1];
|
|
807
|
+
}
|
|
808
|
+
EnumData AlgebraHilbData;
|
|
809
|
+
AlgebraHilbData.HilbertSeriesDenom = HS_denom_algebra;
|
|
810
|
+
bigintmat Transfer[1][size(HS_num_algebra)];
|
|
811
|
+
for(int i = 1; i <= size(HS_num_algebra); i++){
|
|
812
|
+
Transfer[1,i] = HS_num_algebra[i];
|
|
813
|
+
}
|
|
814
|
+
AlgebraHilbData.HilbertSeriesNum = Transfer;
|
|
815
|
+
if(Cyclotomic){
|
|
816
|
+
AlgebraHilbData = fullDenomCCycloRatFunction(AlgebraHilbData);
|
|
817
|
+
}
|
|
818
|
+
|
|
736
819
|
int has_positive_degree = 0;
|
|
737
|
-
for(
|
|
820
|
+
for( i = 1; i <= ncols(Q); i++){
|
|
738
821
|
if(deg(Q[i]) >= 1){
|
|
739
822
|
has_positive_degree = 1;
|
|
740
823
|
break;
|
|
741
824
|
}
|
|
742
825
|
}
|
|
743
826
|
if(!has_positive_degree){
|
|
744
|
-
ERROR("At least one
|
|
827
|
+
ERROR("At least one generator must have positive degree");
|
|
745
828
|
}
|
|
746
829
|
string output;
|
|
747
830
|
|
|
@@ -752,9 +835,6 @@ static proc dosagbiHilbControlled(ideal Q, intvec HS_num_algebra, intvec HS_deno
|
|
|
752
835
|
int GradingDenom, standard_crit_degree;
|
|
753
836
|
intvec HilbertBasisKey;
|
|
754
837
|
|
|
755
|
-
int @do_def_ideal = 0;
|
|
756
|
-
export(@do_def_ideal);
|
|
757
|
-
|
|
758
838
|
ideal P = simplify(Q,15); // make inititial coeff 1, erase 0, duplicates and scalar multiples
|
|
759
839
|
P = completeSubduction(P);
|
|
760
840
|
dbprint(our_printlevel,"Initial subduction dione");
|
|
@@ -770,6 +850,8 @@ static proc dosagbiHilbControlled(ideal Q, intvec HS_num_algebra, intvec HS_deno
|
|
|
770
850
|
|
|
771
851
|
crit_degree = 0;
|
|
772
852
|
|
|
853
|
+
EnumData CandData;
|
|
854
|
+
|
|
773
855
|
|
|
774
856
|
while(1){
|
|
775
857
|
if(round > 0){
|
|
@@ -781,11 +863,17 @@ static proc dosagbiHilbControlled(ideal Q, intvec HS_num_algebra, intvec HS_deno
|
|
|
781
863
|
L = sort(P,"dp");
|
|
782
864
|
P = L[1];
|
|
783
865
|
}
|
|
866
|
+
(CandData, is_normal) = HilbertSeriesMonAlgebra(P, crit_degree+1);
|
|
867
|
+
|
|
868
|
+
// (HS_num_cand, HS_denom_cand, is_normal) = HilbertSeriesMonAlgebra(P, crit_degree+1);
|
|
869
|
+
|
|
870
|
+
(crit_degree, HF_difference) = compareCCycloRatFunctions(AlgebraHilbData, CandData);
|
|
871
|
+
|
|
784
872
|
|
|
785
|
-
(
|
|
873
|
+
//(crit_degree, HF_difference) = compareCCycloRatFunctions(HS_num_algebra, HS_denom_algebra,
|
|
874
|
+
// HS_num_cand, HS_denom_cand);
|
|
786
875
|
|
|
787
|
-
|
|
788
|
-
HS_num_cand, HS_denom_cand);
|
|
876
|
+
// quit;
|
|
789
877
|
|
|
790
878
|
if(crit_degree > Sagbi_degree_bound && Sagbi_degree_bound != -1){
|
|
791
879
|
output = "critical degree = " + string(crit_degree) + " > Sagbi_degree_bound = " + string(Sagbi_degree_bound);
|
|
@@ -852,11 +940,13 @@ static proc dosagbiHilbControlled(ideal Q, intvec HS_num_algebra, intvec HS_deno
|
|
|
852
940
|
P = P + Phigh;
|
|
853
941
|
P = completeSubduction(P);
|
|
854
942
|
}
|
|
943
|
+
|
|
944
|
+
// lead(P);
|
|
855
945
|
}
|
|
856
946
|
}
|
|
857
947
|
// ---------------------------------------------------------------
|
|
858
948
|
|
|
859
|
-
static proc doSagbiGeneral(ideal Q, int
|
|
949
|
+
static proc doSagbiGeneral(ideal Q, int defining_ideal, int Sagbi_degree_bound, int Sagbi_max_rounds, int sorting)
|
|
860
950
|
{
|
|
861
951
|
int i;
|
|
862
952
|
int has_positive_degree = 0;
|
|
@@ -867,7 +957,7 @@ static proc doSagbiGeneral(ideal Q, int dcefining_ideal, int Sagbi_degree_bound,
|
|
|
867
957
|
}
|
|
868
958
|
}
|
|
869
959
|
if(!has_positive_degree){
|
|
870
|
-
ERROR("At least one
|
|
960
|
+
ERROR("At least one generator must have positive degree");
|
|
871
961
|
}
|
|
872
962
|
|
|
873
963
|
|
|
@@ -878,12 +968,11 @@ static proc doSagbiGeneral(ideal Q, int dcefining_ideal, int Sagbi_degree_bound,
|
|
|
878
968
|
degreeByDegree = 1;
|
|
879
969
|
}
|
|
880
970
|
|
|
881
|
-
// if(degreeByDegree == 0 &&
|
|
971
|
+
// if(degreeByDegree == 0 && defining_ideal == 1){
|
|
882
972
|
// ERROR("Defining ideal only computed gegree by degree");
|
|
883
973
|
// }
|
|
884
974
|
|
|
885
|
-
|
|
886
|
-
export(@do_def_ideal);
|
|
975
|
+
@do_def_ideal = defining_ideal;
|
|
887
976
|
|
|
888
977
|
ideal P;
|
|
889
978
|
int GradingDenom;
|
|
@@ -912,19 +1001,19 @@ static proc doSagbiGeneral(ideal Q, int dcefining_ideal, int Sagbi_degree_bound,
|
|
|
912
1001
|
P = removeConstants(P); // PreIm will be gtaken care below
|
|
913
1002
|
P = simplify(P,1); // make monic
|
|
914
1003
|
ring @S = (baseringlist[1]),(y(1.. p)),wp(D);
|
|
915
|
-
ideal @
|
|
1004
|
+
ideal @Retract =(y(1..p));
|
|
916
1005
|
ideal @DefIdeal;
|
|
917
|
-
ideal @
|
|
918
|
-
ideal @
|
|
1006
|
+
ideal @Retract_low;
|
|
1007
|
+
ideal @Retract_high;
|
|
919
1008
|
export(@S);
|
|
920
|
-
export(@
|
|
1009
|
+
export(@Retract);
|
|
921
1010
|
export(@DefIdeal);
|
|
922
|
-
export(@
|
|
923
|
-
export(@
|
|
1011
|
+
export(@Retract_low);
|
|
1012
|
+
export(@Retract_high);
|
|
924
1013
|
ideal LCC = fetch(our_ring, LC);
|
|
925
1014
|
preparePreIm(D, LCC); // takes care of constants in P, makes moic
|
|
926
1015
|
// for(i = 1; i <= ncols(LCC); i++){
|
|
927
|
-
// @
|
|
1016
|
+
// @Retract[i] = @Retract[i]/LCC[i];
|
|
928
1017
|
// }
|
|
929
1018
|
setring our_ring;
|
|
930
1019
|
}
|
|
@@ -977,8 +1066,8 @@ static proc doSagbiGeneral(ideal Q, int dcefining_ideal, int Sagbi_degree_bound,
|
|
|
977
1066
|
|
|
978
1067
|
if(@do_def_ideal){
|
|
979
1068
|
setring @S;
|
|
980
|
-
@
|
|
981
|
-
@
|
|
1069
|
+
@Retract_high = 0;
|
|
1070
|
+
@Retract_low = 0;
|
|
982
1071
|
}
|
|
983
1072
|
|
|
984
1073
|
setring our_ring;
|
|
@@ -1005,16 +1094,16 @@ static proc doSagbiGeneral(ideal Q, int dcefining_ideal, int Sagbi_degree_bound,
|
|
|
1005
1094
|
setring @S;
|
|
1006
1095
|
for(i = 1; i <=size(D); i++){
|
|
1007
1096
|
if(D[i] <= uu * GradingDenom){
|
|
1008
|
-
@
|
|
1097
|
+
@Retract_low = @Retract_low + @Retract[i];
|
|
1009
1098
|
}
|
|
1010
1099
|
else{
|
|
1011
|
-
@
|
|
1100
|
+
@Retract_high = @Retract_high + @Retract[i];
|
|
1012
1101
|
}
|
|
1013
1102
|
}
|
|
1014
|
-
if(size(@
|
|
1015
|
-
"Problem ", size(@
|
|
1103
|
+
if(size(@Retract_low) != check_low || size(@Retract_high) != check_high){
|
|
1104
|
+
"Problem ", size(@Retract_low), check_low, size(@Retract_high), check_high;
|
|
1016
1105
|
}
|
|
1017
|
-
@
|
|
1106
|
+
@Retract = @Retract_low;
|
|
1018
1107
|
}
|
|
1019
1108
|
setring our_ring;
|
|
1020
1109
|
// 2 = strictly degree by degree
|
|
@@ -1138,7 +1227,7 @@ static proc doSagbiGeneral(ideal Q, int dcefining_ideal, int Sagbi_degree_bound,
|
|
|
1138
1227
|
our_ring = basering;
|
|
1139
1228
|
if(@do_def_ideal){
|
|
1140
1229
|
setring @S;
|
|
1141
|
-
@
|
|
1230
|
+
@Retract = @Retract + @Retract_high;
|
|
1142
1231
|
}
|
|
1143
1232
|
|
|
1144
1233
|
setring our_ring;
|
|
@@ -1163,6 +1252,11 @@ RETURN: An ideal whose generators form the Sagbi basis of the algebra generate
|
|
|
1163
1252
|
The return value has a second integer component. Its possible values are: 0, if the full Sagbi basis has
|
|
1164
1253
|
not been reached, 1 if this is unknown, and 2 if the full Sagbi basis has been computed.
|
|
1165
1254
|
|
|
1255
|
+
In the non-standard graded situation it may be useful to restrict the exchange of data between Singular
|
|
1256
|
+
and normaliz to the Hilbert series as a rational function with cyclotomic polynomials in the
|
|
1257
|
+
denominator. Of course, HS_num_algebra and HS_denom_algebra must have been computed for this
|
|
1258
|
+
representation of the Hilbert series. This choice is communicated to the function by replacing the first
|
|
1259
|
+
component of HS_denom_algebra by its negative.
|
|
1166
1260
|
EXAMPLE: example sagbiHilbControlled; shows an example
|
|
1167
1261
|
"
|
|
1168
1262
|
{
|
|
@@ -1329,7 +1423,7 @@ proc sagbiDefIdealByDegree(ideal Q, int Sagbi_degree_bound, list #)
|
|
|
1329
1423
|
"USAGE: defIdealByDegree(ideal Q, int sagbiDegreeBound [,int sorting, int verb]);
|
|
1330
1424
|
RETURN: An instance of
|
|
1331
1425
|
|
|
1332
|
-
newstruct("sagbiResult","int success, ideal sagbiBasis, ideal defIdeal");
|
|
1426
|
+
newstruct("sagbiResult","int success, ideal sagbiBasis, ideal defIdeal,, ideal retract");
|
|
1333
1427
|
|
|
1334
1428
|
success has the value 0, if the full Sagbi basis has not been reached,
|
|
1335
1429
|
1 if this is unknown, and 2 if the full Sagbi basis has been computed.
|
|
@@ -1337,7 +1431,7 @@ RETURN: An instance of
|
|
|
1337
1431
|
sagbiBasis is the Sagbi basis encodeed as an ideal in the polynomial ring that was
|
|
1338
1432
|
active when sagbiDefIdealByDegree was called.
|
|
1339
1433
|
|
|
1340
|
-
defIdeal contains the defining ideal (as far as computed).
|
|
1434
|
+
defIdeal contains the defining ideal and the retract (as far as computed). They live in the ring
|
|
1341
1435
|
(name of the result).r_defIdeal; See example for the activation of this ring.
|
|
1342
1436
|
The defining ideal has been minimized.
|
|
1343
1437
|
|
|
@@ -1392,6 +1486,7 @@ EXAMPLE: example sagbiDefIdealByDegree; shows an example
|
|
|
1392
1486
|
def our_ring = basering;
|
|
1393
1487
|
setring @S;
|
|
1394
1488
|
res.defIdeal = minbase(@DefIdeal);
|
|
1489
|
+
res.retract = @Retract;
|
|
1395
1490
|
setring our_ring;
|
|
1396
1491
|
return(res);
|
|
1397
1492
|
}
|
|
@@ -1410,13 +1505,16 @@ example
|
|
|
1410
1505
|
setring motherRing;
|
|
1411
1506
|
"defining ideal";
|
|
1412
1507
|
Result.defIdeal;
|
|
1508
|
+
"retract";
|
|
1509
|
+
if(defined(Result.r_retract)){ def s=Result.r_retract;setring s;}
|
|
1510
|
+
Result.retract;
|
|
1413
1511
|
}
|
|
1414
1512
|
|
|
1415
1513
|
proc sagbiDefIdealGeneral(ideal Q, list #)
|
|
1416
1514
|
"USAGE: defIdealGeneral(ideal Q [, int sagbiMaxRounds, int sorting, int verb]));
|
|
1417
1515
|
RETURN: An instance of
|
|
1418
1516
|
|
|
1419
|
-
newstruct("sagbiResult","int success, ideal sagbiBasis, ideal defIdeal");
|
|
1517
|
+
newstruct("sagbiResult","int success, ideal sagbiBasis, ideal defIdeal, ideal retract");
|
|
1420
1518
|
|
|
1421
1519
|
success has the value 0, if the full Sagbi basis has not been reached,
|
|
1422
1520
|
1 if this is unknown, and 2 if the full Sagbi basis has been computed.
|
|
@@ -1424,8 +1522,9 @@ RETURN: An instance of
|
|
|
1424
1522
|
sagbiBasis is the Sagbi basis encodeed as an ideal in the polynomial ring that was
|
|
1425
1523
|
active when sagbiDefIdealByDegree was called.
|
|
1426
1524
|
|
|
1427
|
-
defIdeal contains the defining ideal (as far as computed).
|
|
1525
|
+
defIdeal contains the defining ideal and the retract (as far as computed). They live in the ring
|
|
1428
1526
|
(name of the result).r_defIdeal; See example for the activation of this ring.
|
|
1527
|
+
The defining ideal has been minimized.
|
|
1429
1528
|
|
|
1430
1529
|
Note: sorting, if set at all, must be 0.
|
|
1431
1530
|
|
|
@@ -1457,6 +1556,7 @@ EXAMPLE: example sagbiDefIdealGeneral; shows an example
|
|
|
1457
1556
|
def our_ring = basering;
|
|
1458
1557
|
setring @S;
|
|
1459
1558
|
res.defIdeal = @DefIdeal;
|
|
1559
|
+
res.retract = @Retract;
|
|
1460
1560
|
setring our_ring;
|
|
1461
1561
|
return(res);
|
|
1462
1562
|
}
|
|
@@ -1472,6 +1572,9 @@ example
|
|
|
1472
1572
|
setring motherRing;
|
|
1473
1573
|
"defining ideal";
|
|
1474
1574
|
Result.defIdeal;
|
|
1575
|
+
"retract";
|
|
1576
|
+
if(defined(Result.r_retract)) {def s=Result.r_retract;setring s;}
|
|
1577
|
+
Result.retract;
|
|
1475
1578
|
}
|
|
1476
1579
|
// ------------------------------------------------
|
|
1477
1580
|
// Initialization
|
|
@@ -1479,14 +1582,20 @@ example
|
|
|
1479
1582
|
|
|
1480
1583
|
static proc mod_init()
|
|
1481
1584
|
{
|
|
1482
|
-
|
|
1585
|
+
if(size(system("executable","normaliz"))>0)
|
|
1586
|
+
{string @ver=read("|: normaliz --version");}
|
|
1587
|
+
if(!defined(Normaliz)) { LIB "normaliz.lib";}
|
|
1483
1588
|
int swallow;
|
|
1484
1589
|
addNmzOption("MRK","MarkovBasis");
|
|
1485
1590
|
addNmzOption("REP","Representations");
|
|
1486
1591
|
addNmzOption("BPK","BinomialsPacked");
|
|
1592
|
+
addNmzOption("cyclo","OnlyCyclotomicHilbSer");
|
|
1593
|
+
addNmzOption("noquasi","NoQuasiPolynomial");
|
|
1487
1594
|
swallow = setNmzOption("BPK", 1);
|
|
1488
1595
|
swallow = setNmzOption("MRK",0);
|
|
1489
1596
|
swallow =setNmzOption("REP",0);
|
|
1597
|
+
swallow =setNmzOption("cyclo",0);
|
|
1598
|
+
swallow =setNmzOption("noquasi",0);
|
|
1490
1599
|
setNmzFilename("NmzSagbiExchange");
|
|
1491
1600
|
intmat saveTete_a_tete;
|
|
1492
1601
|
int startTete_tete;
|
|
@@ -1494,5 +1603,20 @@ static proc mod_init()
|
|
|
1494
1603
|
export(startTete_tete);
|
|
1495
1604
|
int our_printlevel = 1;
|
|
1496
1605
|
export(our_printlevel);
|
|
1497
|
-
|
|
1606
|
+
int @do_def_ideal = 0;
|
|
1607
|
+
export(@do_def_ideal);
|
|
1608
|
+
newstruct("EnumData", "bigintmat HilbertSeriesNum, intvec HilbertSeriesDenom, bigint MultiplicityNum, bigint NultiplicityDenom");
|
|
1609
|
+
newstruct("GradingData", "int GradingDenom, intvec GradingVec");
|
|
1610
|
+
newstruct("sagbiResult","int success, ideal sagbiBasis, ideal defIdeal, ideal retract");
|
|
1611
|
+
int Cyclotomic = 0;
|
|
1612
|
+
export(Cyclotomic);
|
|
1613
|
+
if(defined(@ver))
|
|
1614
|
+
{
|
|
1615
|
+
if (@ver<"Normaliz 3.10.5")
|
|
1616
|
+
{ option(noredefine);LIB"sagbiNormaliz0.lib";option(redefine);
|
|
1617
|
+
"***** normaliz 3.10.5 or newer required";
|
|
1618
|
+
"***** loading sagbiNormaliz0.lib instead";
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1498
1621
|
}
|
|
1622
|
+
|