18 #define PLURAL_INTERNAL_DECLARATIONS 1
37 #define SBA_INTERRED_START 0
38 #define SBA_TAIL_RED 1
39 #define SBA_PRODUCT_CRITERION 0
40 #define SBA_PRINT_ZERO_REDUCTIONS 0
41 #define SBA_PRINT_REDUCTION_STEPS 0
42 #define SBA_PRINT_OPERATIONS 0
43 #define SBA_PRINT_SIZE_G 0
44 #define SBA_PRINT_SIZE_SYZ 0
45 #define SBA_PRINT_PRODUCT_CRITERION 0
48 #if SBA_PRINT_REDUCTION_STEPS
49 VAR long sba_reduction_steps;
50 VAR long sba_interreduction_steps;
52 #if SBA_PRINT_OPERATIONS
53 VAR long sba_operations;
54 VAR long sba_interreduction_operations;
86 unsigned long not_sev = ~L->sev;
91 const unsigned long* sevT=strat->
sevT;
103 if (
j > strat->
tl)
return o;
124 if (
j > strat->
tl)
return o;
145 unsigned long not_sev = ~L->sev;
146 const unsigned long sevT0 = strat->
sevT[0];
147 number rest, orest,
mult;
150 const poly T0p = strat->
T[0].p;
157 #if defined(PDEBUG) || defined(PDIV_DEBUG)
179 const poly T0p = strat->
T[0].t_p;
181 const poly
p = L->t_p;
183 #if defined(PDEBUG) || defined(PDIV_DEBUG)
209 unsigned long not_sev = ~L->sev;
214 const unsigned long* sevT=strat->
sevT;
215 number rest, orest,
mult;
226 if (
j > strat->
tl)
return o;
227 #if defined(PDEBUG) || defined(PDIV_DEBUG)
258 if (
j > strat->
tl)
return o;
259 #if defined(PDEBUG) || defined(PDIV_DEBUG)
290 unsigned long not_sev = ~L->sev;
294 const unsigned long* sevT=strat->
sevT;
307 if (
j > strat->
tl)
return -1;
308 #if defined(PDEBUG) || defined(PDIV_DEBUG)
315 if (!(sevT[
j] & not_sev) &&
329 if (
j > strat->
tl)
return -1;
330 #if defined(PDEBUG) || defined(PDIV_DEBUG)
336 if (!(sevT[
j] & not_sev) &&
354 if (
j > strat->
tl)
return -1;
355 #if defined(PDEBUG) || defined(PDIV_DEBUG)
363 if (!(sevT[
j] & not_sev) &&
377 if (
j > strat->
tl)
return -1;
378 #if defined(PDEBUG) || defined(PDIV_DEBUG)
385 if (!(sevT[
j] & not_sev) &&
400 unsigned long not_sev = ~L->sev;
401 poly
p = L->GetLmCurrRing();
415 ende=
posInS(strat,*max_ind,
p,0)+1;
416 if (ende>(*max_ind)) ende=(*max_ind);
425 if (
j > ende)
return -1;
426 #if defined(PDEBUG) || defined(PDIV_DEBUG)
434 if ( !(strat->
sevS[
j] & not_sev) &&
448 if (
j > ende)
return -1;
449 #if defined(PDEBUG) || defined(PDIV_DEBUG)
456 if ( !(strat->
sevS[
j] & not_sev) &&
469 unsigned long not_sev = ~L->sev;
470 poly
p = L->GetLmCurrRing();
483 if (
j > ende)
return -1;
484 #if defined(PDEBUG) || defined(PDIV_DEBUG)
492 if ( !(strat->
sevS[
j] & not_sev) &&
506 if (
j > ende)
return -1;
507 #if defined(PDEBUG) || defined(PDIV_DEBUG)
514 if ( !(strat->
sevS[
j] & not_sev) &&
528 if (arg <= 0)
return 0;
540 if (arg <= 0)
return 0;
542 if (arg%2 == 1) { arg--; }
560 poly zeroPoly =
NULL;
561 unsigned long a = (
unsigned long)
pGetCoeff(
p);
564 int a_ind2 =
ind2(a);
568 for (
int i = 1;
i <= leadRing->N;
i++)
577 poly lead_mult =
p_ISet(1, tailRing);
578 if (
n_GetChar(leadRing->cf) <= k_ind2 + a_ind2)
580 int too_much = k_ind2 + a_ind2 -
n_GetChar(leadRing->cf);
582 zeroPoly =
p_ISet(a, tailRing);
583 for (
int i = 1;
i <= leadRing->N;
i++)
590 while ( (0 <
ind2(s_exp)) && (
ind2(s_exp) <= too_much) )
592 too_much = too_much -
ind2(s_exp);
596 for (
int j = 1;
j <= s_exp;
j++)
613 p_Setm(lead_mult, tailRing);
614 zeroPoly =
p_Mult_mm(zeroPoly, lead_mult, tailRing);
616 for (
int i = 1;
i <= leadRing->N;
i++)
669 if (
h->IsNull())
return 0;
670 if (strat->
tl<0)
return 1;
680 long reddeg =
h->GetpFDeg();
682 h->SetShortExpVector();
715 if (
h->GetLmTailRing() ==
NULL)
768 if (
h->GetLmTailRing() ==
NULL)
777 h->SetShortExpVector();
782 (strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
787 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
802 if (
h->pTotalDeg() >= (
long)strat->
tailRing->bitmask)
807 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
824 if (strat->
tl<0)
return 1;
825 if (
h->IsNull())
return 0;
836 long reddeg =
h->GetpFDeg();
838 h->SetShortExpVector();
860 if (
h->GetLmTailRing() ==
NULL)
873 if (
h->GetLmTailRing() ==
NULL)
879 h->SetShortExpVector();
884 (strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
889 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
904 if (
h->pTotalDeg() >= (
long)strat->
tailRing->bitmask)
909 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
931 if (strat->
tl<0)
return 1;
936 int i,
j,at,pass,cnt,ii;
937 unsigned long not_sev;
945 h->SetShortExpVector();
946 h_p =
h->GetLmTailRing();
954 li = strat->
T[
j].pLength;
964 if (li<=0) li=strat->
T[
j].GetpLength();
972 if ((strat->
T[
i].pLength < li)
980 li = strat->
T[
i].pLength;
981 if (li<=0) li=strat->
T[
i].GetpLength();
1004 #if SBA_PRINT_REDUCTION_STEPS
1005 sba_interreduction_steps++;
1007 #if SBA_PRINT_OPERATIONS
1008 sba_interreduction_operations +=
pLength(strat->
T[ii].p);
1020 h_p =
h->GetLmTailRing();
1036 else if (
h->t_p!=
NULL)
1055 else if (
h->t_p!=
NULL)
1064 h->SetShortExpVector();
1077 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1078 if (at <= strat->Ll)
1080 #ifdef HAVE_SHIFTBBA
1089 int dummy=strat->
sl;
1096 Print(
" lazy: -> L%d\n",at);
1115 assume(PR->GetLmCurrRing() != PW->GetLmCurrRing());
1117 Red->HeadNormalize();
1151 if (strat->
tl<0)
return 1;
1157 PrintS(
"------- IN REDSIG -------\n");
1164 PrintS(
"---------------------------\n");
1167 int i,
j,at,pass, ii;
1170 unsigned long not_sev;
1177 h->SetShortExpVector();
1178 h_p =
h->GetLmTailRing();
1188 li = strat->
T[
j].pLength;
1189 if (li<=0) li=strat->
T[
j].GetpLength();
1197 if (test_opt_length)
1206 if ((strat->
T[
i].pLength < li)
1214 li = strat->
T[
i].pLength;
1215 if (li<=0) li=strat->
T[
i].GetpLength();
1237 Print(
"BEFORE REDUCTION WITH %d:\n",ii);
1238 PrintS(
"--------------------------------\n");
1245 PrintS(
"--------------------------------\n");
1246 printf(
"INDEX OF REDUCER T: %d\n",ii);
1249 #if SBA_PRINT_REDUCTION_STEPS
1251 sba_reduction_steps++;
1253 #if SBA_PRINT_OPERATIONS
1255 sba_operations +=
pLength(strat->
T[ii].p);
1262 Print(
"SigSAFE: %d\n",sigSafe);
1277 h_p =
h->GetLmTailRing();
1283 h->SetShortExpVector();
1295 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1296 if (at <= strat->Ll)
1298 int dummy=strat->
sl;
1306 Print(
" lazy: -> L%d\n",at);
1330 beforeredsig =
pCopy(
h->sig);
1332 if (strat->
tl<0)
return 1;
1338 Print(
"------- IN REDSIG -------\n");
1345 Print(
"---------------------------\n");
1348 int i,
j,at,pass, ii;
1351 unsigned long not_sev;
1358 h->SetShortExpVector();
1359 h_p =
h->GetLmTailRing();
1381 h->i_r1 = strat->
tl;
1384 if (
h->GetLmTailRing() ==
NULL)
1391 if(
pLtCmp(beforeredsig,
h->sig) == 1)
1414 li = strat->
T[
j].pLength;
1415 if (li<=0) li=strat->
T[
j].GetpLength();
1422 if (test_opt_length)
1431 if ((strat->
T[
i].pLength < li)
1439 li = strat->
T[
i].pLength;
1440 if (li<=0) li=strat->
T[
i].GetpLength();
1462 Print(
"BEFORE REDUCTION WITH %d:\n",ii);
1463 Print(
"--------------------------------\n");
1470 Print(
"--------------------------------\n");
1471 printf(
"INDEX OF REDUCER T: %d\n",ii);
1499 #if SBA_PRINT_REDUCTION_STEPS
1501 sba_reduction_steps++;
1503 #if SBA_PRINT_OPERATIONS
1505 sba_operations +=
pLength(strat->
T[ii].p);
1512 Print(
"SigSAFE: %d\n",sigSafe);
1527 h_p =
h->GetLmTailRing();
1533 h->SetShortExpVector();
1545 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1546 if (at <= strat->Ll)
1548 int dummy=strat->
sl;
1556 Print(
" lazy: -> L%d\n",at);
1572 p =
h = L->GetLmTailRing();
1574 return L->GetLmCurrRing();
1582 Ln.sevSig = L->sevSig;
1583 Ln.pLength = L->GetpLength() - 1;
1598 Ln.SetShortExpVector();
1604 With = &(strat->
T[
j]);
1609 if (With ==
NULL)
break;
1633 #if SBA_PRINT_REDUCTION_STEPS
1635 sba_reduction_steps++;
1637 #if SBA_PRINT_OPERATIONS
1639 sba_operations +=
pLength(With->p);
1649 pNext(
h) = Ln.LmExtractAndIter();
1652 }
while (!Ln.IsNull());
1655 if (Ln.IsNull())
goto all_done;
1656 if (! withT) With_s.Init(
currRing);
1663 pNext(
h) = Ln.LmExtractAndIter();
1680 return L->GetLmCurrRing();
1689 if (strat->
tl<0)
return 1;
1695 long reddeg =
h->GetpFDeg();
1697 unsigned long not_sev;
1700 h->SetShortExpVector();
1701 poly h_p =
h->GetLmTailRing();
1707 if (
j < 0)
return 1;
1709 li = strat->
T[
j].pLength;
1718 if (test_opt_length)
1720 if (li<=0) li=strat->
T[
j].GetpLength();
1728 if ((strat->
T[
i].pLength < li)
1736 li = strat->
T[
i].pLength;
1737 if (li<=0) li=strat->
T[
i].GetpLength();
1761 #if SBA_PRINT_REDUCTION_STEPS
1762 sba_interreduction_steps++;
1764 #if SBA_PRINT_OPERATIONS
1765 sba_interreduction_operations +=
pLength(strat->
T[ii].p);
1777 h_p=
h->GetLmTailRing();
1794 else if (
h->t_p!=
NULL)
1813 else if (
h->t_p!=
NULL)
1822 h->SetShortExpVector();
1829 (strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
1832 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1833 if (at <= strat->Ll)
1836 #ifdef HAVE_SHIFTBBA
1845 int dummy=strat->
sl;
1858 else if (d != reddeg)
1862 if (
h->pTotalDeg() >= (
long)strat->
tailRing->bitmask)
1867 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1894 if (strat->
tl<0)
return 1;
1898 int i,
j,at,pass,ei, ii, h_d;
1899 unsigned long not_sev;
1905 d = reddeg =
h->GetpFDeg() +
h->ecart;
1906 h->SetShortExpVector();
1907 h_p =
h->GetLmTailRing();
1914 if (
j < 0)
return 1;
1916 ei = strat->
T[
j].ecart;
1917 li = strat->
T[
j].pLength;
1924 if (test_opt_length)
1926 if (li<=0) li=strat->
T[
j].GetpLength();
1932 if (
i > strat->
tl)
break;
1933 if (ei <= h->ecart)
break;
1937 strat->
T[
i].GetpLength();
1938 if (((strat->
T[
i].ecart < ei) && (ei>
h->ecart))
1939 || ((strat->
T[
i].ecart <=
h->ecart) && (strat->
T[
i].pLength < li)))
1944 ei = strat->
T[
i].ecart;
1945 li = strat->
T[
i].pLength;
1948 if (ei<=h->ecart)
break;
1968 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1986 Print(
"\nwith T[%d]:",ii);
1993 #if SBA_PRINT_REDUCTION_STEPS
1994 sba_interreduction_steps++;
1996 #if SBA_PRINT_OPERATIONS
1997 sba_interreduction_operations += strat->
T[ii].pLength;
2023 else if (
h->t_p!=
NULL)
2041 else if (
h->t_p!=
NULL)
2049 h->SetShortExpVector();
2051 h_d =
h->SetpFDeg();
2056 h->ecart = d-h_d+ei-
h->ecart;
2068 && ((d > reddeg) || (pass > strat->
LazyPass))))
2072 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
2073 if (at <= strat->Ll)
2075 #ifdef HAVE_SHIFTBBA
2084 int dummy=strat->
sl;
2091 Print(
" degree jumped: -> L%d\n",at);
2097 else if (d > reddeg)
2101 if (
h->pTotalDeg()+
h->ecart >= (
long)strat->
tailRing->bitmask)
2106 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
2138 P.SetShortExpVector();
2231 P.SetShortExpVector();
2267 P.SetShortExpVector();
2337 P.SetShortExpVector();
2352 P.SetShortExpVector();
2378 int hilbeledeg=1,hilbcount=0,minimcnt=0;
2401 withT = ! strat->
homog;
2406 #ifdef HAVE_TAIL_RING
2422 while (strat->
Ll >= 0)
2429 while (strat->
Ll >= 0)
2442 while ((strat->
Ll >= 0)
2443 && (strat->
L[strat->
Ll].p1!=
NULL) && (strat->
L[strat->
Ll].p2!=
NULL)
2448 if (strat->
Ll<0)
break;
2453 strat->
P = strat->
L[strat->
Ll];
2483 else if (strat->
P.p1 ==
NULL)
2485 if (strat->
minim > 0)
2491 if ((strat->
P.p ==
NULL) && (strat->
P.t_p ==
NULL))
2499 &olddeg,&reduc,strat, red_result);
2502 red_result = strat->
red(&strat->
P,strat);
2512 if (red_result == 1)
2515 strat->
P.GetP(strat->
lmBin);
2524 int pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
2536 strat->
P.pCleardenom();
2541 strat->
P.pCleardenom();
2545 strat->
P.pCleardenom();
2554 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
2566 if (strat->
minim==1)
2573 strat->
M->m[minimcnt]=strat->
P.p2;
2577 pNext(strat->
M->m[minimcnt])
2594 strat->
enterS(strat->
P, pos, strat, strat->
tl);
2609 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
2617 if (strat->
s_poly(strat))
2622 int pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
2628 strat->
enterS(strat->
P, pos, strat, strat->
tl);
2632 else if (strat->
P.p1 ==
NULL && strat->
minim > 0)
2638 memset(&(strat->
P), 0,
sizeof(strat->
P));
2674 #ifdef HAVE_TAIL_RING
2696 for(
int i = 0;
i<=strat->
sl;
i++)
2731 return (strat->
Shdl);
2743 #if SBA_PRINT_ZERO_REDUCTIONS
2744 long zeroreductions = 0;
2746 #if SBA_PRINT_PRODUCT_CRITERION
2747 long product_criterion = 0;
2749 #if SBA_PRINT_SIZE_G
2751 int size_g_non_red = 0;
2753 #if SBA_PRINT_SIZE_SYZ
2757 #if SBA_PRINT_REDUCTION_STEPS
2758 sba_reduction_steps = 0;
2759 sba_interreduction_steps = 0;
2761 #if SBA_PRINT_OPERATIONS
2763 sba_interreduction_operations = 0;
2767 ring sRing, currRingOld;
2772 if (sRing!=currRingOld)
2791 dummy =
pCopy(F->m[0]);
2793 F->m[
i] = F->m[
i+1];
2814 dummy =
pCopy(F->m[0]);
2816 F->m[
i] = F->m[
i+1];
2834 for (
int i=0;
i<
sort->length();++
i)
2835 F->m[
i] = F1->m[(*
sort)[
i]-1];
2849 F->m[
j] = F->m[
j-1];
2863 #if SBA_INTERRED_START
2867 printf(
"SBA COMPUTATIONS DONE IN THE FOLLOWING RING:\n");
2869 printf(
"ordSgn = %d\n",
currRing->OrdSgn);
2872 int srmax,lrmax, red_result = 1;
2874 int hilbeledeg=1,hilbcount=0,minimcnt=0;
2888 reduc = olddeg = lrmax = 0;
2901 #ifdef HAVE_TAIL_RING
2919 strat->
enterS(strat->
L[strat->
Ll-(
i)], strat->
sl+1, strat, strat->
tl);
2929 while (strat->
Ll >= 0)
2931 if (strat->
Ll > lrmax) lrmax =strat->
Ll;
2961 f5c ( strat, olddeg, minimcnt, hilbeledeg, hilbcount, srmax,
2962 lrmax, reduc,
Q,
w, hilb );
2972 strat->
P = strat->
L[strat->
Ll];
2978 if (!strat->
rewCrit2(strat->
P.sig, ~strat->
P.sevSig, strat->
P.GetLmCurrRing(), strat, strat->
P.checked+1))
2982 PrintS(
"SIG OF NEXT PAIR TO HANDLE IN SIG-BASED ALGORITHM\n");
2983 PrintS(
"-------------------------------------------------\n");
2988 PrintS(
"-------------------------------------------------\n");
3023 else if (strat->
P.p1 ==
NULL)
3025 if (strat->
minim > 0)
3031 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
3039 PrintS(
"Poly before red: ");
3043 #if SBA_PRODUCT_CRITERION
3044 if (strat->
P.prod_crit)
3046 #if SBA_PRINT_PRODUCT_CRITERION
3047 product_criterion++;
3049 int pos =
posInSyz(strat, strat->
P.sig);
3056 red_result = strat->
red(&strat->
P,strat);
3059 red_result = strat->
red(&strat->
P,strat);
3075 strat->
P.p =
pNeg(strat->
P.p);
3076 strat->
P.sig =
pNeg(strat->
P.sig);
3079 if(strat->
P.sig !=
NULL)
3081 if(strat->
P.p !=
NULL)
3088 red_result =
redRing(&strat->
P,strat);
3093 strat->
P.sig =
NULL;
3097 strat->
enterS(strat->
P, 0, strat, strat->
tl);
3113 if (red_result != 0)
3115 PrintS(
"Poly after red: ");
3117 pWrite(strat->
P.GetLmCurrRing());
3119 printf(
"%d\n",red_result);
3124 if(strat->
P.p !=
NULL)
3126 &olddeg,&reduc,strat, red_result);
3129 &olddeg,&reduc,strat, red_result);
3137 if (red_result == 1)
3140 strat->
P.GetP(strat->
lmBin);
3144 (strat->
P).FDeg = (strat->
P).pFDeg();
3156 int pos = strat->
sl+1;
3164 beforetailred =
pCopy(strat->
P.sig);
3170 strat->
P.p =
redtailSba(&(strat->
P),pos-1,strat, withT);
3178 strat->
P.pCleardenom();
3181 strat->
P.p =
redtailSba(&(strat->
P),pos-1,strat, withT);
3182 strat->
P.pCleardenom();
3189 strat->
P.p =
redtailSba(&(strat->
P),pos-1,strat, withT);
3198 strat->
enterS(strat->
P, 0, strat, strat->
tl);
3204 if(strat->
P.sig ==
NULL ||
pLtCmp(beforetailred,strat->
P.sig) == 1)
3208 red_result =
redRing(&strat->
P,strat);
3217 strat->
enterS(strat->
P, 0, strat, strat->
tl);
3223 if(strat->
P.p ==
NULL)
3224 goto case_when_red_result_changed;
3230 for (
int jj = 0; jj<strat->
tl+1; jj++)
3234 strat->
T[jj].is_sigsafe =
FALSE;
3240 for (
int jj = 0; jj<strat->
tl+1; jj++)
3242 strat->
T[jj].is_sigsafe =
FALSE;
3252 if (strat->
minim==1)
3259 strat->
M->m[minimcnt]=strat->
P.p2;
3263 pNext(strat->
M->m[minimcnt])
3273 strat->
T[strat->
tl].is_sigsafe =
FALSE;
3287 strat->
enterS(strat->
P, pos, strat, strat->
tl);
3291 for (
int tk=0; tk<strat->
sl+1; tk++)
3312 for(
int ps=0;ps<strat->
sl+1;ps++)
3320 (strat->
syzmax)*
sizeof(
unsigned long),
3322 *
sizeof(
unsigned long));
3354 unsigned max_cmp =
IDELEMS(F);
3364 for (
int i=0;
i<strat->
sl; ++
i)
3381 for (
unsigned i=cmp+1;
i<=max_cmp; ++
i)
3384 for (
int j=0;
j<strat->
sl; ++
j)
3422 printf(
"---------------------------\n");
3423 Print(
" %d. ELEMENT ADDED TO GCURR:\n",strat->
sl+1);
3446 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
3449 if (strat->
sl>srmax) srmax = strat->
sl;
3453 case_when_red_result_changed:
3461 #if SBA_PRINT_ZERO_REDUCTIONS
3470 int pos =
posInSyz(strat, strat->
P.sig);
3474 Print(
"ADDING STUFF TO SYZ : ");
3487 memset(&(strat->
P), 0,
sizeof(strat->
P));
3493 printf(
"\nSigDrop!\n");
3495 printf(
"\nEnded with no SigDrop\n");
3501 if(strat->
P.sig !=
NULL)
3505 memset(&(strat->
P), 0,
sizeof(strat->
P));
3540 #ifdef HAVE_TAIL_RING
3556 #if SBA_PRINT_SIZE_SYZ
3558 size_syz = strat->
syzl;
3571 #if SBA_PRINT_SIZE_G
3586 for(;
k>=0 && (strat->
L[
k].p1 !=
NULL || strat->
L[
k].p2 !=
NULL);
k--)
3596 for(;
k>=0 && strat->
L[
k].p1 ==
NULL && strat->
L[
k].p2 ==
NULL;
k--)
3599 strat->
enterS(strat->
L[
k], strat->
sl+1, strat, strat->
tl);
3607 for(
k=strat->
sl;
k>=0;
k--)
3640 #if SBA_PRINT_SIZE_G
3644 printf(
"SIZE OF SHDL: %d\n",
IDELEMS(strat->
Shdl));
3648 printf(
" %d. ",oo+1);
3653 #if SBA_PRINT_ZERO_REDUCTIONS
3654 printf(
"----------------------------------------------------------\n");
3655 printf(
"ZERO REDUCTIONS: %ld\n",zeroreductions);
3658 #if SBA_PRINT_REDUCTION_STEPS
3659 printf(
"----------------------------------------------------------\n");
3660 printf(
"S-REDUCTIONS: %ld\n",sba_reduction_steps);
3662 #if SBA_PRINT_OPERATIONS
3663 printf(
"OPERATIONS: %ld\n",sba_operations);
3665 #if SBA_PRINT_REDUCTION_STEPS
3666 printf(
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n");
3667 printf(
"INTERREDUCTIONS: %ld\n",sba_interreduction_steps);
3669 #if SBA_PRINT_OPERATIONS
3670 printf(
"INTERREDUCTION OPERATIONS: %ld\n",sba_interreduction_operations);
3672 #if SBA_PRINT_REDUCTION_STEPS
3673 printf(
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n");
3674 printf(
"ALL REDUCTIONS: %ld\n",sba_reduction_steps+sba_interreduction_steps);
3675 sba_interreduction_steps = 0;
3676 sba_reduction_steps = 0;
3678 #if SBA_PRINT_OPERATIONS
3679 printf(
"ALL OPERATIONS: %ld\n",sba_operations+sba_interreduction_operations);
3680 sba_interreduction_operations = 0;
3683 #if SBA_PRINT_SIZE_G
3684 printf(
"----------------------------------------------------------\n");
3685 printf(
"SIZE OF G: %d / %d\n",size_g,size_g_non_red);
3689 #if SBA_PRINT_SIZE_SYZ
3690 printf(
"SIZE OF SYZ: %ld\n",size_syz);
3691 printf(
"----------------------------------------------------------\n");
3694 #if SBA_PRINT_PRODUCT_CRITERION
3695 printf(
"PRODUCT CRITERIA: %ld\n",product_criterion);
3696 product_criterion = 0;
3698 return (strat->
Shdl);
3722 #ifdef HAVE_SHIFTBBA
3882 #ifdef HAVE_SHIFTBBA
4033 int& hilbcount,
int& srmax,
int& lrmax,
int& reduc, ideal
Q,
4036 int Ll_old, red_result = 1;
4042 reduc = olddeg = lrmax = 0;
4047 while (strat->
tl >= 0)
4049 if(!strat->
T[strat->
tl].is_redundant)
4052 h.p = strat->
T[strat->
tl].p;
4053 h.tailRing = strat->
T[strat->
tl].tailRing;
4054 h.t_p = strat->
T[strat->
tl].t_p;
4093 while (strat->
Ll>Ll_old)
4095 strat->
P = strat->
L[strat->
Ll];
4099 PrintS(
"NEXT PAIR TO HANDLE IN INTERRED ALGORITHM\n");
4100 PrintS(
"-------------------------------------------------\n");
4104 printf(
"%d\n",strat->
tl);
4105 PrintS(
"-------------------------------------------------\n");
4138 else if (strat->
P.p1 ==
NULL)
4140 if (strat->
minim > 0)
4147 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
4155 &olddeg,&reduc,strat, red_result);
4158 PrintS(
"Poly before red: ");
4162 red_result = strat->
red2(&strat->
P,strat);
4172 if (red_result == 1)
4175 strat->
P.GetP(strat->
lmBin);
4186 pos =
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
4190 pos =
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
4199 strat->
P.pCleardenom();
4202 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
4203 strat->
P.pCleardenom();
4210 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
4220 if (strat->
minim==1)
4227 strat->
M->m[minimcnt]=strat->
P.p2;
4231 pNext(strat->
M->m[minimcnt])
4244 strat->
enterS(strat->
P, pos, strat, strat->
tl);
4247 PrintS(
"ELEMENT ADDED TO GCURR DURING INTERRED: ");
4251 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
4255 if (strat->
sl>srmax) srmax = strat->
sl;
4271 memset(&(strat->
P), 0,
sizeof(strat->
P));
4275 while (cc<strat->tl+1)
4277 strat->
T[cc].sig =
pOne();
4280 strat->
sig[cc] = strat->
T[cc].sig;
4281 strat->
sevSig[cc] = strat->
T[cc].sevSig;
4282 strat->
T[cc].is_sigsafe =
TRUE;
4290 for (
int cd=strat->
Ll;
cd>=0;
cd--)
4298 printf(
"\nAfter f5c sorting\n");
4299 for(
int i=0;
i<=strat->
sl;
i++)
4305 PrintS(
"------------------- STRAT S ---------------------\n");
4307 while (cc<strat->tl+1)
4311 printf(
"- - - - - -\n");
4314 PrintS(
"-------------------------------------------------\n");
4315 PrintS(
"------------------- STRAT T ---------------------\n");
4317 while (cc<strat->tl+1)
4321 printf(
"- - - - - -\n");
4324 PrintS(
"-------------------------------------------------\n");
4325 PrintS(
"------------------- STRAT L ---------------------\n");
4327 while (cc<strat->Ll+1)
4333 printf(
"- - - - - -\n");
4336 PrintS(
"-------------------------------------------------\n");
4337 printf(
"F5C DONE\nSTRAT SL: %d -- %d\n",strat->
sl, strat->
currIdx);
4344 #ifdef HAVE_SHIFTBBA
4349 int hilbeledeg=1,hilbcount=0,minimcnt=0;
4377 #ifdef HAVE_TAIL_RING
4393 while (strat->
Ll >= 0)
4400 while (strat->
Ll >= 0)
4413 while ((strat->
Ll >= 0)
4414 && (strat->
L[strat->
Ll].p1!=
NULL) && (strat->
L[strat->
Ll].p2!=
NULL)
4419 if (strat->
Ll<0)
break;
4424 strat->
P = strat->
L[strat->
Ll];
4454 else if (strat->
P.p1 ==
NULL)
4456 if (strat->
minim > 0)
4462 if ((strat->
P.p ==
NULL) && (strat->
P.t_p ==
NULL))
4470 &olddeg,&reduc,strat, red_result);
4473 red_result = strat->
red(&strat->
P,strat);
4483 if (red_result == 1)
4486 strat->
P.GetP(strat->
lmBin);
4495 int pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
4507 strat->
P.pCleardenom();
4512 strat->
P.pCleardenom();
4516 strat->
P.pCleardenom();
4529 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
4545 if (strat->
minim==1)
4552 strat->
M->m[minimcnt]=strat->
P.p2;
4556 pNext(strat->
M->m[minimcnt])
4570 strat->
enterS(strat->
P, pos, strat, strat->
tl);
4575 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
4583 if (strat->
s_poly(strat))
4588 int pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
4591 strat->
enterS(strat->
P, pos, strat, strat->
tl);
4597 else if (strat->
P.p1 ==
NULL && strat->
minim > 0)
4602 memset(&(strat->
P), 0,
sizeof(strat->
P));
4614 for (
int k = 0;
k <= strat->
sl; ++
k)
4617 for (
int j = 0;
j<=strat->
tl; ++
j)
4644 #ifdef HAVE_TAIL_RING
4651 WarnS(
"reduction with S is not yet supported by Letterplace");
4668 for(
int i = 0;
i<=strat->
sl;
i++)
4703 return (strat->
Shdl);
4707 #ifdef HAVE_SHIFTBBA
4723 #ifdef HAVE_SHIFTBBA
4726 if (
h->IsNull())
return 0;
4734 d =
h->GetpFDeg() +
h->ecart;
4737 h->SetShortExpVector();
4743 h->SetDegStuffReturnLDeg(strat->
LDegLast);
4748 strat->
T[
j].pNorm();
4774 h->SetShortExpVector();
4787 h->SetDegStuffReturnLDeg(strat->
LDegLast);
4797 if (strat->
T[
j].ecart <=
h->ecart)
4798 h->ecart = d -
h->GetpFDeg();
4800 h->ecart = d -
h->GetpFDeg() + strat->
T[
j].ecart -
h->ecart;
4802 d =
h->GetpFDeg() +
h->ecart;
4805 d =
h->SetDegStuffReturnLDeg(strat->
LDegLast);
4814 && ((d >= reddeg) || (pass > strat->
LazyPass)))
4819 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
4820 if (at <= strat->Ll)
static int si_max(const int a, const int b)
CanonicalForm cd(bCommonDen(FF))
static CanonicalForm bound(const CFMatrix &M)
KINLINE poly kNoetherTail()
int(* red2)(LObject *L, kStrategy strat)
int(* posInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
pShallowCopyDeleteProc p_shallow_copy_delete
void(* enterS)(LObject &h, int pos, kStrategy strat, int atR)
char completeReduce_retry
void(* initEcart)(TObject *L)
int(* posInT)(const TSet T, const int tl, LObject &h)
int(* red)(LObject *L, kStrategy strat)
BOOLEAN(* rewCrit2)(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
char posInLDependsOnLength
static FORCE_INLINE number n_Gcd(number a, number b, const coeffs r)
in Z: return the gcd of 'a' and 'b' in Z/nZ, Z/2^kZ: computed as in the case Z in Z/pZ,...
static FORCE_INLINE number n_EucNorm(number a, const coeffs r)
static FORCE_INLINE number n_QuotRem(number a, number b, number *q, const coeffs r)
static FORCE_INLINE BOOLEAN n_Greater(number a, number b, const coeffs r)
ordered fields: TRUE iff 'a' is larger than 'b'; in Z/pZ: TRUE iff la > lb, where la and lb are the l...
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static FORCE_INLINE BOOLEAN n_DivBy(number a, number b, const coeffs r)
test whether 'a' is divisible 'b'; for r encoding a field: TRUE iff 'b' does not represent zero in Z:...
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
void sort(CFArray &A, int l=0)
quick sort A
void WerrorS(const char *s)
#define idDelete(H)
delete an ideal
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
BOOLEAN idInsertPolyOnPos(ideal I, poly p, int pos)
insert p into I on position pos
static intvec * idSort(ideal id, BOOLEAN nolex=TRUE)
static BOOLEAN length(leftv result, leftv arg)
KINLINE poly redtailBba_Ring(poly p, int pos, kStrategy strat)
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize)
KINLINE poly redtailBbaBound(poly p, int pos, kStrategy strat, int bound, BOOLEAN normalize)
KINLINE void clearS(poly p, unsigned long p_sev, int *at, int *k, kStrategy strat)
KINLINE poly redtailBba_Z(poly p, int pos, kStrategy strat)
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
BOOLEAN kbTest(kBucket_pt bucket)
Tests.
void kBucketDestroy(kBucket_pt *bucket_pt)
void kBucketInit(kBucket_pt bucket, poly lm, int length)
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets.
number kBucketPolyRed(kBucket_pt bucket, poly p1, int l1, poly spNoether)
const poly kBucketGetLm(kBucket_pt bucket)
int kBucketCanonicalize(kBucket_pt bucket)
Canonicalizes Bpoly, i.e. converts polys of buckets into one poly in one bucket: Returns number of bu...
void khCheck(ideal Q, intvec *w, intvec *hilb, int &eledeg, int &count, kStrategy strat)
int ksReducePolyLC(LObject *PR, TObject *PW, poly spNoether, number *coef, kStrategy strat)
void ksCreateSpoly(LObject *Pair, poly spNoether, int use_buckets, ring tailRing, poly m1, poly m2, TObject **R)
int ksReducePoly(LObject *PR, TObject *PW, poly spNoether, number *coef, poly *mon, kStrategy strat)
int ksReducePolySig(LObject *PR, TObject *PW, long, poly spNoether, number *coef, kStrategy strat)
int ksReducePolySigRing(LObject *PR, TObject *PW, long, poly spNoether, number *coef, kStrategy strat)
int ksReducePolyZ(LObject *PR, TObject *PW, poly spNoether, number *coef, kStrategy strat)
int ksReducePolyGCD(LObject *PR, TObject *PW, poly spNoether, number *coef, kStrategy strat)
ideal kStdShift(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, BOOLEAN rightGB)
ideal kInterRed(ideal F, ideal Q)
void initBba(kStrategy strat)
void initSba(ideal F, kStrategy strat)
int redRing_Z(LObject *h, kStrategy strat)
poly kFindZeroPoly(poly input_p, ring leadRing, ring tailRing)
int redFirstShift(LObject *h, kStrategy strat)
int kFindSameLMInT_Z(const kStrategy strat, const LObject *L, const int start)
int kFindDivisibleByInT_Z(const kStrategy strat, const LObject *L, const int start)
int kFindDivisibleByInS(const kStrategy strat, int *max_ind, LObject *L)
return -1 if no divisor is found number of first divisor in S, otherwise
int kTestDivisibleByT0_Z(const kStrategy strat, const LObject *L)
tests if T[0] divides the leading monomial of L, returns -1 if not
poly redNFBound(poly h, int &max_ind, int nonorm, kStrategy strat, int bound)
poly kNF2(ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce)
VAR int(* test_PosInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
int redHoney(LObject *h, kStrategy strat)
int kFindNextDivisibleByInS(const kStrategy strat, int start, int max_ind, LObject *L)
static long ind_fact_2(long arg)
int redHomog(LObject *h, kStrategy strat)
ideal sba(ideal F0, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
ideal bba(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
int redLazy(LObject *h, kStrategy strat)
int redSigRing(LObject *h, kStrategy strat)
poly redtailSba(LObject *L, int pos, kStrategy strat, BOOLEAN withT, BOOLEAN normalize)
KINLINE int ksReducePolyTailSig(LObject *PR, TObject *PW, LObject *Red, kStrategy strat)
poly redNF(poly h, int &max_ind, int nonorm, kStrategy strat)
int redSig(LObject *h, kStrategy strat)
static long ind2(long arg)
void kDebugPrint(kStrategy strat)
void f5c(kStrategy strat, int &olddeg, int &minimcnt, int &hilbeledeg, int &hilbcount, int &srmax, int &lrmax, int &reduc, ideal Q, intvec *w, intvec *hilb)
VAR int(* test_PosInT)(const TSet T, const int tl, LObject &h)
poly kNF2Bound(ideal F, ideal Q, poly q, int bound, kStrategy strat, int lazyReduce)
int redRing(LObject *h, kStrategy strat)
int kFindDivisibleByInT(const kStrategy strat, const LObject *L, const int start)
return -1 if no divisor is found number of first divisor in T, otherwise
ideal bbaShift(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
ideal rightgb(ideal F, ideal Q)
void initSbaPos(kStrategy strat)
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
void initBuchMora(ideal F, ideal Q, kStrategy strat)
void enterSyz(LObject &p, kStrategy strat, int atT)
void enterT(LObject &p, kStrategy strat, int atT)
void enterTShift(LObject p, kStrategy strat, int atT)
BOOLEAN kTest(kStrategy strat)
BOOLEAN kTest_TS(kStrategy strat)
void enterpairsSig(poly h, poly hSig, int hFrom, int k, int ecart, int pos, kStrategy strat, int atR)
void enterL(LSet *set, int *length, int *LSetmax, LObject p, int at)
BOOLEAN kTest_L(LObject *L, ring strat_tailRing, BOOLEAN testp, int lpos, TSet T, int tlength)
void enterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
void redtailBbaAlsoLC_Z(LObject *L, int end_pos, kStrategy strat)
void initHilbCrit(ideal, ideal, intvec **hilb, kStrategy strat)
int posInSMonFirst(const kStrategy strat, const int length, const poly p)
void superenterpairsSig(poly h, poly hSig, int hFrom, int k, int ecart, int pos, kStrategy strat, int atR)
void initBuchMoraPos(kStrategy strat)
void initS(ideal F, ideal Q, kStrategy strat)
BOOLEAN kStratChangeTailRing(kStrategy strat, LObject *L, TObject *T, unsigned long expbound)
ring sbaRing(kStrategy strat, const ring r, BOOLEAN, int)
void postReduceByMon(LObject *h, kStrategy strat)
used for GB over ZZ: intermediate reduction by monomial elements background: any known constant eleme...
void enterpairsShift(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
void exitBuchMora(kStrategy strat)
void messageStatSBA(int hilbcount, kStrategy strat)
int posInS(const kStrategy strat, const int length, const poly p, const int ecart_p)
void initSyzRules(kStrategy strat)
void initSbaBuchMora(ideal F, ideal Q, kStrategy strat)
BOOLEAN kCheckSpolyCreation(LObject *L, kStrategy strat, poly &m1, poly &m2)
void cleanT(kStrategy strat)
int posInSyz(const kStrategy strat, poly sig)
void replaceInLAndSAndT(LObject &p, int tj, kStrategy strat)
void deleteHC(LObject *L, kStrategy strat, BOOLEAN fromNext)
void updateResult(ideal r, ideal Q, kStrategy strat)
void superenterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
void exitSba(kStrategy strat)
TObject * kFindDivisibleByInS_T(kStrategy strat, int end_pos, LObject *L, TObject *T, long ecart)
void deleteInL(LSet set, int *length, int j, kStrategy strat)
void kStratInitChangeTailRing(kStrategy strat)
void initBuchMoraCrit(kStrategy strat)
void completeReduce(kStrategy strat, BOOLEAN withT)
void initBuchMoraPosRing(kStrategy strat)
void postReduceByMonSig(LObject *h, kStrategy strat)
void messageSets(kStrategy strat)
void deleteInS(int i, kStrategy strat)
BOOLEAN sbaCheckGcdPair(LObject *h, kStrategy strat)
int posInLF5CRing(const LSet set, int start, const int length, LObject *p, const kStrategy)
void initEcartBBA(TObject *h)
void enterSBbaShift(LObject &p, int atS, kStrategy strat, int atR)
void messageStat(int hilbcount, kStrategy strat)
int posInIdealMonFirst(const ideal F, const poly p, int start, int end)
void finalReduceByMon(kStrategy strat)
used for GB over ZZ: final reduction by constant elements background: any known constant element of i...
void enterSBba(LObject &p, int atS, kStrategy strat, int atR)
void initSbaCrit(kStrategy strat)
void cancelunit(LObject *L, BOOLEAN inNF)
#define REDNF_CANONICALIZE
static void kDeleteLcm(LObject *P)
#define REDTAIL_CANONICALIZE
static void nc_kBucketPolyRed_NF(kBucket_pt b, poly p, number *c)
void mult(unsigned long *result, unsigned long *a, unsigned long *b, unsigned long p, int dega, int degb)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
#define __p_GetComp(p, r)
#define omRealloc0Size(addr, o_size, size)
#define TEST_OPT_INTSTRATEGY
#define SI_RESTORE_OPT1(A)
#define TEST_OPT_DEGBOUND
#define TEST_OPT_REDTHROUGH
#define TEST_OPT_REDTAIL_SYZ
#define TEST_OPT_CONTENTSB
#define TEST_OPT_NOT_BUCKETS
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
unsigned long p_GetShortExpVector(const poly p, const ring r)
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
void pEnlargeSet(poly **p, int l, int increment)
long p_Deg(poly a, const ring r)
static poly p_Add_q(poly p, poly q, const ring r)
static poly p_Mult_q(poly p, poly q, const ring r)
static void p_ExpVectorAdd(poly p1, poly p2, const ring r)
#define p_LmEqual(p1, p2, r)
static void p_SetExpV(poly p, int *ev, const ring r)
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent @Note: VarOffset encodes the position in p->exp
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
static void p_Setm(poly p, const ring r)
static int p_LmCmp(poly p, poly q, const ring r)
static BOOLEAN p_LmShortDivisibleBy(poly a, unsigned long sev_a, poly b, unsigned long not_sev_b, const ring r)
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
static BOOLEAN p_LmDivisibleBy(poly a, poly b, const ring r)
static void p_Delete(poly *p, const ring r)
static unsigned pLength(poly a)
static void p_GetExpV(poly p, int *ev, const ring r)
static poly p_Mult_mm(poly p, poly m, const ring r)
static poly p_LmDeleteAndNext(poly p, const ring r)
static poly p_Copy(poly p, const ring r)
returns a copy of p
void rChangeCurrRing(ring r)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Compatiblity layer for legacy polynomial operations (over currRing)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
#define pGetComp(p)
Component.
#define pLmShortDivisibleBy(a, sev_a, b, not_sev_b)
Divisibility tests based on Short Exponent vectors sev_a == pGetShortExpVector(a) not_sev_b == ~ pGet...
#define pLmDelete(p)
assume p != NULL, deletes Lm(p)->coef and Lm(p)
#define pGetShortExpVector(a)
returns the "Short Exponent Vector" – used to speed up divisibility tests (see polys-impl....
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced
void pNorm(poly p, const ring R=currRing)
#define pLmCmp(p, q)
returns 0|1|-1 if p=q|p>q|p<q w.r.t monomial ordering
#define pCopy(p)
return a copy of the poly
ideal idrMoveR(ideal &id, ring src_r, ring dest_r)
ideal idrMoveR_NoSort(ideal &id, ring src_r, ring dest_r)
void PrintS(const char *s)
void Werror(const char *fmt,...)
void rWrite(ring r, BOOLEAN details)
void rDelete(ring r)
unconditionally deletes fields in r
static BOOLEAN rField_is_Ring(const ring r)
static BOOLEAN rField_is_Z(const ring r)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static BOOLEAN rField_is_Zn(const ring r)
static BOOLEAN rIsLPRing(const ring r)
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
ideal idInit(int idsize, int rank)
initialise an ideal / module
void id_DelDiv(ideal id, const ring r)
delete id[j], if LT(j) == coeff*mon*LT(i) and vice versa, i.e., delete id[i], if LT(i) == coeff*mon*L...
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
static poly normalize(poly next_p, ideal add_generators, syStrategy syzstr, int *g_l, int *p_l, int crit_comp)