18 #define PLURAL_INTERNAL_DECLARATIONS 1
21 #define STDZ_EXHANGE_DURING_REDUCTION 0
39 #define SBA_INTERRED_START 0
40 #define SBA_TAIL_RED 1
41 #define SBA_PRODUCT_CRITERION 0
42 #define SBA_PRINT_ZERO_REDUCTIONS 0
43 #define SBA_PRINT_REDUCTION_STEPS 0
44 #define SBA_PRINT_OPERATIONS 0
45 #define SBA_PRINT_SIZE_G 0
46 #define SBA_PRINT_SIZE_SYZ 0
47 #define SBA_PRINT_PRODUCT_CRITERION 0
50 #if SBA_PRINT_REDUCTION_STEPS
51 VAR long sba_reduction_steps;
52 VAR long sba_interreduction_steps;
54 #if SBA_PRINT_OPERATIONS
55 VAR long sba_operations;
56 VAR long sba_interreduction_operations;
88 unsigned long not_sev = ~L->sev;
93 const unsigned long* sevT=strat->
sevT;
105 if (
j > strat->
tl)
return o;
126 if (
j > strat->
tl)
return o;
147 unsigned long not_sev = ~L->sev;
148 const unsigned long sevT0 = strat->
sevT[0];
149 number rest, orest,
mult;
152 const poly T0p = strat->
T[0].p;
159 #if defined(PDEBUG) || defined(PDIV_DEBUG)
181 const poly T0p = strat->
T[0].t_p;
183 const poly
p = L->t_p;
185 #if defined(PDEBUG) || defined(PDIV_DEBUG)
211 unsigned long not_sev = ~L->sev;
216 const unsigned long* sevT=strat->
sevT;
217 number rest, orest,
mult;
228 if (
j > strat->
tl)
return o;
229 #if defined(PDEBUG) || defined(PDIV_DEBUG)
260 if (
j > strat->
tl)
return o;
261 #if defined(PDEBUG) || defined(PDIV_DEBUG)
292 unsigned long not_sev = ~L->sev;
296 const unsigned long* sevT=strat->
sevT;
309 if (
j > strat->
tl)
return -1;
310 #if defined(PDEBUG) || defined(PDIV_DEBUG)
317 if (!(sevT[
j] & not_sev) &&
331 if (
j > strat->
tl)
return -1;
332 #if defined(PDEBUG) || defined(PDIV_DEBUG)
338 if (!(sevT[
j] & not_sev) &&
356 if (
j > strat->
tl)
return -1;
357 #if defined(PDEBUG) || defined(PDIV_DEBUG)
365 if (!(sevT[
j] & not_sev) &&
379 if (
j > strat->
tl)
return -1;
380 #if defined(PDEBUG) || defined(PDIV_DEBUG)
387 if (!(sevT[
j] & not_sev) &&
402 unsigned long not_sev = ~L->sev;
403 poly
p = L->GetLmCurrRing();
417 ende=
posInS(strat,*max_ind,
p,0)+1;
418 if (ende>(*max_ind)) ende=(*max_ind);
427 if (
j > ende)
return -1;
428 #if defined(PDEBUG) || defined(PDIV_DEBUG)
436 if ( !(strat->
sevS[
j] & not_sev) &&
450 if (
j > ende)
return -1;
451 #if defined(PDEBUG) || defined(PDIV_DEBUG)
458 if ( !(strat->
sevS[
j] & not_sev) &&
471 unsigned long not_sev = ~L->sev;
472 poly
p = L->GetLmCurrRing();
485 if (
j > ende)
return -1;
486 #if defined(PDEBUG) || defined(PDIV_DEBUG)
494 if ( !(strat->
sevS[
j] & not_sev) &&
508 if (
j > ende)
return -1;
509 #if defined(PDEBUG) || defined(PDIV_DEBUG)
516 if ( !(strat->
sevS[
j] & not_sev) &&
530 if (arg <= 0)
return 0;
542 if (arg <= 0)
return 0;
544 if (arg%2 == 1) { arg--; }
562 poly zeroPoly =
NULL;
563 unsigned long a = (
unsigned long)
pGetCoeff(
p);
566 int a_ind2 =
ind2(a);
570 for (
int i = 1;
i <= leadRing->N;
i++)
579 poly lead_mult =
p_ISet(1, tailRing);
580 if (
n_GetChar(leadRing->cf) <= k_ind2 + a_ind2)
582 int too_much = k_ind2 + a_ind2 -
n_GetChar(leadRing->cf);
584 zeroPoly =
p_ISet(a, tailRing);
585 for (
int i = 1;
i <= leadRing->N;
i++)
592 while ( (0 <
ind2(s_exp)) && (
ind2(s_exp) <= too_much) )
594 too_much = too_much -
ind2(s_exp);
598 for (
int j = 1;
j <= s_exp;
j++)
615 p_Setm(lead_mult, tailRing);
616 zeroPoly =
p_Mult_mm(zeroPoly, lead_mult, tailRing);
618 for (
int i = 1;
i <= leadRing->N;
i++)
671 if (
h->IsNull())
return 0;
672 if (strat->
tl<0)
return 1;
682 long reddeg =
h->GetpFDeg();
684 h->SetShortExpVector();
691 #if STDZ_EXCHANGE_DURING_REDUCTION
719 if (
h->GetLmTailRing() ==
NULL)
748 #if STDZ_EXCHANGE_DURING_REDUCTION
773 if (
h->GetLmTailRing() ==
NULL)
782 h->SetShortExpVector();
787 (strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
792 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
807 if (
h->pTotalDeg() >= (
long)strat->
tailRing->bitmask)
812 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
829 if (strat->
tl<0)
return 1;
830 if (
h->IsNull())
return 0;
841 long reddeg =
h->GetpFDeg();
843 h->SetShortExpVector();
865 if (
h->GetLmTailRing() ==
NULL)
878 if (
h->GetLmTailRing() ==
NULL)
884 h->SetShortExpVector();
889 (strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
894 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
909 if (
h->pTotalDeg() >= (
long)strat->
tailRing->bitmask)
914 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
936 if (strat->
tl<0)
return 1;
941 int i,
j,at,pass,cnt,ii;
949 h->SetShortExpVector();
950 h_p =
h->GetLmTailRing();
957 li = strat->
T[
j].pLength;
967 if (li<=0) li=strat->
T[
j].GetpLength();
970 unsigned long not_sev = ~
h->sev;
977 if ((strat->
T[
i].pLength < li)
985 li = strat->
T[
i].pLength;
986 if (li<=0) li=strat->
T[
i].GetpLength();
1010 #if SBA_PRINT_REDUCTION_STEPS
1011 sba_interreduction_steps++;
1013 #if SBA_PRINT_OPERATIONS
1014 sba_interreduction_operations +=
pLength(strat->
T[ii].p);
1026 h_p =
h->GetLmTailRing();
1042 else if (
h->t_p!=
NULL)
1061 else if (
h->t_p!=
NULL)
1070 h->SetShortExpVector();
1082 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1083 if (at <= strat->Ll)
1085 #ifdef HAVE_SHIFTBBA
1094 int dummy=strat->
sl;
1101 Print(
" lazy: -> L%d\n",at);
1120 assume(PR->GetLmCurrRing() != PW->GetLmCurrRing());
1122 Red->HeadNormalize();
1156 if (strat->
tl<0)
return 1;
1162 PrintS(
"------- IN REDSIG -------\n");
1169 PrintS(
"---------------------------\n");
1172 int i,
j,at,pass, ii;
1175 unsigned long not_sev;
1182 h->SetShortExpVector();
1183 h_p =
h->GetLmTailRing();
1193 li = strat->
T[
j].pLength;
1194 if (li<=0) li=strat->
T[
j].GetpLength();
1202 if (test_opt_length)
1211 if ((strat->
T[
i].pLength < li)
1219 li = strat->
T[
i].pLength;
1220 if (li<=0) li=strat->
T[
i].GetpLength();
1242 Print(
"BEFORE REDUCTION WITH %d:\n",ii);
1243 PrintS(
"--------------------------------\n");
1250 PrintS(
"--------------------------------\n");
1251 printf(
"INDEX OF REDUCER T: %d\n",ii);
1254 #if SBA_PRINT_REDUCTION_STEPS
1256 sba_reduction_steps++;
1258 #if SBA_PRINT_OPERATIONS
1260 sba_operations +=
pLength(strat->
T[ii].p);
1267 Print(
"SigSAFE: %d\n",sigSafe);
1282 h_p =
h->GetLmTailRing();
1288 h->SetShortExpVector();
1300 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1301 if (at <= strat->Ll)
1303 int dummy=strat->
sl;
1311 Print(
" lazy: -> L%d\n",at);
1335 beforeredsig =
pCopy(
h->sig);
1337 if (strat->
tl<0)
return 1;
1343 Print(
"------- IN REDSIG -------\n");
1350 Print(
"---------------------------\n");
1353 int i,
j,at,pass, ii;
1356 unsigned long not_sev;
1363 h->SetShortExpVector();
1364 h_p =
h->GetLmTailRing();
1386 h->i_r1 = strat->
tl;
1389 if (
h->GetLmTailRing() ==
NULL)
1396 if(
pLtCmp(beforeredsig,
h->sig) == 1)
1419 li = strat->
T[
j].pLength;
1420 if (li<=0) li=strat->
T[
j].GetpLength();
1427 if (test_opt_length)
1436 if ((strat->
T[
i].pLength < li)
1444 li = strat->
T[
i].pLength;
1445 if (li<=0) li=strat->
T[
i].GetpLength();
1467 Print(
"BEFORE REDUCTION WITH %d:\n",ii);
1468 Print(
"--------------------------------\n");
1475 Print(
"--------------------------------\n");
1476 printf(
"INDEX OF REDUCER T: %d\n",ii);
1504 #if SBA_PRINT_REDUCTION_STEPS
1506 sba_reduction_steps++;
1508 #if SBA_PRINT_OPERATIONS
1510 sba_operations +=
pLength(strat->
T[ii].p);
1517 Print(
"SigSAFE: %d\n",sigSafe);
1532 h_p =
h->GetLmTailRing();
1538 h->SetShortExpVector();
1550 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1551 if (at <= strat->Ll)
1553 int dummy=strat->
sl;
1561 Print(
" lazy: -> L%d\n",at);
1577 p =
h = L->GetLmTailRing();
1579 return L->GetLmCurrRing();
1587 Ln.sevSig = L->sevSig;
1588 Ln.pLength = L->GetpLength() - 1;
1603 Ln.SetShortExpVector();
1609 With = &(strat->
T[
j]);
1614 if (With ==
NULL)
break;
1638 #if SBA_PRINT_REDUCTION_STEPS
1640 sba_reduction_steps++;
1642 #if SBA_PRINT_OPERATIONS
1644 sba_operations +=
pLength(With->p);
1654 pNext(
h) = Ln.LmExtractAndIter();
1657 }
while (!Ln.IsNull());
1660 if (Ln.IsNull())
goto all_done;
1661 if (! withT) With_s.Init(
currRing);
1668 pNext(
h) = Ln.LmExtractAndIter();
1685 return L->GetLmCurrRing();
1694 if (strat->
tl<0)
return 1;
1700 long reddeg =
h->GetpFDeg();
1704 h->SetShortExpVector();
1705 poly h_p =
h->GetLmTailRing();
1710 if (
j < 0)
return 1;
1712 li = strat->
T[
j].pLength;
1721 if (test_opt_length)
1723 if (li<=0) li=strat->
T[
j].GetpLength();
1726 unsigned long not_sev = ~
h->sev;
1733 if ((strat->
T[
i].pLength < li)
1741 li = strat->
T[
i].pLength;
1742 if (li<=0) li=strat->
T[
i].GetpLength();
1767 #if SBA_PRINT_REDUCTION_STEPS
1768 sba_interreduction_steps++;
1770 #if SBA_PRINT_OPERATIONS
1771 sba_interreduction_operations +=
pLength(strat->
T[ii].p);
1783 h_p=
h->GetLmTailRing();
1800 else if (
h->t_p!=
NULL)
1819 else if (
h->t_p!=
NULL)
1828 h->SetShortExpVector();
1834 (strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
1837 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1838 if (at <= strat->Ll)
1841 #ifdef HAVE_SHIFTBBA
1850 int dummy=strat->
sl;
1863 else if (d != reddeg)
1867 if (
h->pTotalDeg() >= (
long)strat->
tailRing->bitmask)
1872 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1899 if (strat->
tl<0)
return 1;
1903 int i,
j,at,pass,ei, ii, h_d;
1909 d = reddeg =
h->GetpFDeg() +
h->ecart;
1910 h->SetShortExpVector();
1911 h_p =
h->GetLmTailRing();
1917 if (
j < 0)
return 1;
1919 ei = strat->
T[
j].ecart;
1920 li = strat->
T[
j].pLength;
1927 if (test_opt_length)
1929 if (li<=0) li=strat->
T[
j].GetpLength();
1932 unsigned long not_sev = ~
h->sev;
1937 if (
i > strat->
tl)
break;
1938 if (ei <= h->ecart)
break;
1942 strat->
T[
i].GetpLength();
1943 if (((strat->
T[
i].ecart < ei) && (ei>
h->ecart))
1944 || ((strat->
T[
i].ecart <=
h->ecart) && (strat->
T[
i].pLength < li)))
1949 ei = strat->
T[
i].ecart;
1950 li = strat->
T[
i].pLength;
1953 if (ei<=h->ecart)
break;
1974 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1992 Print(
"\nwith T[%d]:",ii);
1999 #if SBA_PRINT_REDUCTION_STEPS
2000 sba_interreduction_steps++;
2002 #if SBA_PRINT_OPERATIONS
2003 sba_interreduction_operations += strat->
T[ii].pLength;
2029 else if (
h->t_p!=
NULL)
2047 else if (
h->t_p!=
NULL)
2055 h->SetShortExpVector();
2056 h_d =
h->SetpFDeg();
2061 h->ecart = d-h_d+ei-
h->ecart;
2073 && ((d > reddeg) || (pass > strat->
LazyPass))))
2077 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
2078 if (at <= strat->Ll)
2080 #ifdef HAVE_SHIFTBBA
2089 int dummy=strat->
sl;
2096 Print(
" degree jumped: -> L%d\n",at);
2102 else if (d > reddeg)
2106 if (
h->pTotalDeg()+
h->ecart >= (
long)strat->
tailRing->bitmask)
2111 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
2143 P.SetShortExpVector();
2236 P.SetShortExpVector();
2272 P.SetShortExpVector();
2342 P.SetShortExpVector();
2357 P.SetShortExpVector();
2383 int hilbeledeg=1,hilbcount=0,minimcnt=0;
2406 withT = ! strat->
homog;
2411 #ifdef HAVE_TAIL_RING
2427 while (strat->
Ll >= 0)
2434 while (strat->
Ll >= 0)
2447 while ((strat->
Ll >= 0)
2448 && (strat->
L[strat->
Ll].p1!=
NULL) && (strat->
L[strat->
Ll].p2!=
NULL)
2453 if (strat->
Ll<0)
break;
2458 strat->
P = strat->
L[strat->
Ll];
2488 else if (strat->
P.p1 ==
NULL)
2490 if (strat->
minim > 0)
2496 if ((strat->
P.p ==
NULL) && (strat->
P.t_p ==
NULL))
2504 &olddeg,&reduc,strat, red_result);
2507 red_result = strat->
red(&strat->
P,strat);
2517 if (red_result == 1)
2520 strat->
P.GetP(strat->
lmBin);
2529 int pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
2544 strat->
P.pCleardenom();
2548 strat->
P.pCleardenom();
2557 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
2569 if (strat->
minim==1)
2576 strat->
M->m[minimcnt]=strat->
P.p2;
2580 pNext(strat->
M->m[minimcnt])
2591 strat->
P.SetShortExpVector();
2598 strat->
enterS(strat->
P, pos, strat, strat->
tl);
2613 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
2621 if (strat->
s_poly(strat))
2626 int pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
2632 strat->
enterS(strat->
P, pos, strat, strat->
tl);
2636 else if (strat->
P.p1 ==
NULL && strat->
minim > 0)
2642 memset(&(strat->
P), 0,
sizeof(strat->
P));
2678 #ifdef HAVE_TAIL_RING
2700 for(
int i = 0;
i<=strat->
sl;
i++)
2735 return (strat->
Shdl);
2747 #if SBA_PRINT_ZERO_REDUCTIONS
2748 long zeroreductions = 0;
2750 #if SBA_PRINT_PRODUCT_CRITERION
2751 long product_criterion = 0;
2753 #if SBA_PRINT_SIZE_G
2755 int size_g_non_red = 0;
2757 #if SBA_PRINT_SIZE_SYZ
2761 #if SBA_PRINT_REDUCTION_STEPS
2762 sba_reduction_steps = 0;
2763 sba_interreduction_steps = 0;
2765 #if SBA_PRINT_OPERATIONS
2767 sba_interreduction_operations = 0;
2771 ring sRing, currRingOld;
2776 if (sRing!=currRingOld)
2795 dummy =
pCopy(F->m[0]);
2797 F->m[
i] = F->m[
i+1];
2818 dummy =
pCopy(F->m[0]);
2820 F->m[
i] = F->m[
i+1];
2838 for (
int i=0;
i<
sort->length();++
i)
2839 F->m[
i] = F1->m[(*
sort)[
i]-1];
2853 F->m[
j] = F->m[
j-1];
2867 #if SBA_INTERRED_START
2871 printf(
"SBA COMPUTATIONS DONE IN THE FOLLOWING RING:\n");
2873 printf(
"ordSgn = %d\n",
currRing->OrdSgn);
2876 int srmax,lrmax, red_result = 1;
2878 int hilbeledeg=1,hilbcount=0,minimcnt=0;
2892 reduc = olddeg = lrmax = 0;
2905 #ifdef HAVE_TAIL_RING
2923 strat->
enterS(strat->
L[strat->
Ll-(
i)], strat->
sl+1, strat, strat->
tl);
2933 while (strat->
Ll >= 0)
2935 if (strat->
Ll > lrmax) lrmax =strat->
Ll;
2965 f5c ( strat, olddeg, minimcnt, hilbeledeg, hilbcount, srmax,
2966 lrmax, reduc,
Q,
w, hilb );
2976 strat->
P = strat->
L[strat->
Ll];
2982 if (!strat->
rewCrit2(strat->
P.sig, ~strat->
P.sevSig, strat->
P.GetLmCurrRing(), strat, strat->
P.checked+1))
2986 PrintS(
"SIG OF NEXT PAIR TO HANDLE IN SIG-BASED ALGORITHM\n");
2987 PrintS(
"-------------------------------------------------\n");
2992 PrintS(
"-------------------------------------------------\n");
3027 else if (strat->
P.p1 ==
NULL)
3029 if (strat->
minim > 0)
3035 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
3043 PrintS(
"Poly before red: ");
3047 #if SBA_PRODUCT_CRITERION
3048 if (strat->
P.prod_crit)
3050 #if SBA_PRINT_PRODUCT_CRITERION
3051 product_criterion++;
3053 int pos =
posInSyz(strat, strat->
P.sig);
3060 red_result = strat->
red(&strat->
P,strat);
3063 red_result = strat->
red(&strat->
P,strat);
3079 strat->
P.p =
pNeg(strat->
P.p);
3080 strat->
P.sig =
pNeg(strat->
P.sig);
3083 if(strat->
P.sig !=
NULL)
3085 if(strat->
P.p !=
NULL)
3092 red_result =
redRing(&strat->
P,strat);
3097 strat->
P.sig =
NULL;
3101 strat->
enterS(strat->
P, 0, strat, strat->
tl);
3117 if (red_result != 0)
3119 PrintS(
"Poly after red: ");
3121 pWrite(strat->
P.GetLmCurrRing());
3123 printf(
"%d\n",red_result);
3128 if(strat->
P.p !=
NULL)
3130 &olddeg,&reduc,strat, red_result);
3133 &olddeg,&reduc,strat, red_result);
3141 if (red_result == 1)
3144 strat->
P.GetP(strat->
lmBin);
3148 (strat->
P).FDeg = (strat->
P).pFDeg();
3160 int pos = strat->
sl+1;
3167 beforetailred =
pCopy(strat->
P.sig);
3173 strat->
P.p =
redtailSba(&(strat->
P),pos-1,strat, withT);
3181 strat->
P.pCleardenom();
3184 strat->
P.p =
redtailSba(&(strat->
P),pos-1,strat, withT);
3185 strat->
P.pCleardenom();
3192 strat->
P.p =
redtailSba(&(strat->
P),pos-1,strat, withT);
3201 strat->
enterS(strat->
P, 0, strat, strat->
tl);
3207 if(strat->
P.sig ==
NULL ||
pLtCmp(beforetailred,strat->
P.sig) == 1)
3211 red_result =
redRing(&strat->
P,strat);
3220 strat->
enterS(strat->
P, 0, strat, strat->
tl);
3226 if(strat->
P.p ==
NULL)
3227 goto case_when_red_result_changed;
3233 for (
int jj = 0; jj<strat->
tl+1; jj++)
3237 strat->
T[jj].is_sigsafe =
FALSE;
3243 for (
int jj = 0; jj<strat->
tl+1; jj++)
3245 strat->
T[jj].is_sigsafe =
FALSE;
3255 if (strat->
minim==1)
3262 strat->
M->m[minimcnt]=strat->
P.p2;
3266 pNext(strat->
M->m[minimcnt])
3276 strat->
T[strat->
tl].is_sigsafe =
FALSE;
3290 strat->
enterS(strat->
P, pos, strat, strat->
tl);
3294 for (
int tk=0; tk<strat->
sl+1; tk++)
3315 for(
int ps=0;ps<strat->
sl+1;ps++)
3323 (strat->
syzmax)*
sizeof(
unsigned long),
3325 *
sizeof(
unsigned long));
3357 unsigned max_cmp =
IDELEMS(F);
3367 for (
int i=0;
i<strat->
sl; ++
i)
3384 for (
unsigned i=cmp+1;
i<=max_cmp; ++
i)
3387 for (
int j=0;
j<strat->
sl; ++
j)
3425 printf(
"---------------------------\n");
3426 Print(
" %d. ELEMENT ADDED TO GCURR:\n",strat->
sl+1);
3449 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
3452 if (strat->
sl>srmax) srmax = strat->
sl;
3456 case_when_red_result_changed:
3464 #if SBA_PRINT_ZERO_REDUCTIONS
3473 int pos =
posInSyz(strat, strat->
P.sig);
3477 Print(
"ADDING STUFF TO SYZ : ");
3490 memset(&(strat->
P), 0,
sizeof(strat->
P));
3496 printf(
"\nSigDrop!\n");
3498 printf(
"\nEnded with no SigDrop\n");
3504 if(strat->
P.sig !=
NULL)
3508 memset(&(strat->
P), 0,
sizeof(strat->
P));
3543 #ifdef HAVE_TAIL_RING
3559 #if SBA_PRINT_SIZE_SYZ
3561 size_syz = strat->
syzl;
3574 #if SBA_PRINT_SIZE_G
3589 for(;
k>=0 && (strat->
L[
k].p1 !=
NULL || strat->
L[
k].p2 !=
NULL);
k--)
3599 for(;
k>=0 && strat->
L[
k].p1 ==
NULL && strat->
L[
k].p2 ==
NULL;
k--)
3602 strat->
enterS(strat->
L[
k], strat->
sl+1, strat, strat->
tl);
3610 for(
k=strat->
sl;
k>=0;
k--)
3643 #if SBA_PRINT_SIZE_G
3647 printf(
"SIZE OF SHDL: %d\n",
IDELEMS(strat->
Shdl));
3651 printf(
" %d. ",oo+1);
3656 #if SBA_PRINT_ZERO_REDUCTIONS
3657 printf(
"----------------------------------------------------------\n");
3658 printf(
"ZERO REDUCTIONS: %ld\n",zeroreductions);
3661 #if SBA_PRINT_REDUCTION_STEPS
3662 printf(
"----------------------------------------------------------\n");
3663 printf(
"S-REDUCTIONS: %ld\n",sba_reduction_steps);
3665 #if SBA_PRINT_OPERATIONS
3666 printf(
"OPERATIONS: %ld\n",sba_operations);
3668 #if SBA_PRINT_REDUCTION_STEPS
3669 printf(
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n");
3670 printf(
"INTERREDUCTIONS: %ld\n",sba_interreduction_steps);
3672 #if SBA_PRINT_OPERATIONS
3673 printf(
"INTERREDUCTION OPERATIONS: %ld\n",sba_interreduction_operations);
3675 #if SBA_PRINT_REDUCTION_STEPS
3676 printf(
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n");
3677 printf(
"ALL REDUCTIONS: %ld\n",sba_reduction_steps+sba_interreduction_steps);
3678 sba_interreduction_steps = 0;
3679 sba_reduction_steps = 0;
3681 #if SBA_PRINT_OPERATIONS
3682 printf(
"ALL OPERATIONS: %ld\n",sba_operations+sba_interreduction_operations);
3683 sba_interreduction_operations = 0;
3686 #if SBA_PRINT_SIZE_G
3687 printf(
"----------------------------------------------------------\n");
3688 printf(
"SIZE OF G: %d / %d\n",size_g,size_g_non_red);
3692 #if SBA_PRINT_SIZE_SYZ
3693 printf(
"SIZE OF SYZ: %ld\n",size_syz);
3694 printf(
"----------------------------------------------------------\n");
3697 #if SBA_PRINT_PRODUCT_CRITERION
3698 printf(
"PRODUCT CRITERIA: %ld\n",product_criterion);
3699 product_criterion = 0;
3701 return (strat->
Shdl);
3725 #ifdef HAVE_SHIFTBBA
3885 #ifdef HAVE_SHIFTBBA
4036 int& hilbcount,
int& srmax,
int& lrmax,
int& reduc, ideal
Q,
4039 int Ll_old, red_result = 1;
4045 reduc = olddeg = lrmax = 0;
4050 while (strat->
tl >= 0)
4052 if(!strat->
T[strat->
tl].is_redundant)
4055 h.p = strat->
T[strat->
tl].p;
4056 h.tailRing = strat->
T[strat->
tl].tailRing;
4057 h.t_p = strat->
T[strat->
tl].t_p;
4096 while (strat->
Ll>Ll_old)
4098 strat->
P = strat->
L[strat->
Ll];
4102 PrintS(
"NEXT PAIR TO HANDLE IN INTERRED ALGORITHM\n");
4103 PrintS(
"-------------------------------------------------\n");
4107 printf(
"%d\n",strat->
tl);
4108 PrintS(
"-------------------------------------------------\n");
4141 else if (strat->
P.p1 ==
NULL)
4143 if (strat->
minim > 0)
4150 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
4158 &olddeg,&reduc,strat, red_result);
4161 PrintS(
"Poly before red: ");
4165 red_result = strat->
red2(&strat->
P,strat);
4175 if (red_result == 1)
4178 strat->
P.GetP(strat->
lmBin);
4189 pos =
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
4193 pos =
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
4201 strat->
P.pCleardenom();
4204 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
4205 strat->
P.pCleardenom();
4212 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
4222 if (strat->
minim==1)
4229 strat->
M->m[minimcnt]=strat->
P.p2;
4233 pNext(strat->
M->m[minimcnt])
4246 strat->
enterS(strat->
P, pos, strat, strat->
tl);
4249 PrintS(
"ELEMENT ADDED TO GCURR DURING INTERRED: ");
4253 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
4257 if (strat->
sl>srmax) srmax = strat->
sl;
4273 memset(&(strat->
P), 0,
sizeof(strat->
P));
4277 while (cc<strat->tl+1)
4279 strat->
T[cc].sig =
pOne();
4282 strat->
sig[cc] = strat->
T[cc].sig;
4283 strat->
sevSig[cc] = strat->
T[cc].sevSig;
4284 strat->
T[cc].is_sigsafe =
TRUE;
4292 for (
int cd=strat->
Ll;
cd>=0;
cd--)
4300 printf(
"\nAfter f5c sorting\n");
4301 for(
int i=0;
i<=strat->
sl;
i++)
4307 PrintS(
"------------------- STRAT S ---------------------\n");
4309 while (cc<strat->tl+1)
4313 printf(
"- - - - - -\n");
4316 PrintS(
"-------------------------------------------------\n");
4317 PrintS(
"------------------- STRAT T ---------------------\n");
4319 while (cc<strat->tl+1)
4323 printf(
"- - - - - -\n");
4326 PrintS(
"-------------------------------------------------\n");
4327 PrintS(
"------------------- STRAT L ---------------------\n");
4329 while (cc<strat->Ll+1)
4335 printf(
"- - - - - -\n");
4338 PrintS(
"-------------------------------------------------\n");
4339 printf(
"F5C DONE\nSTRAT SL: %d -- %d\n",strat->
sl, strat->
currIdx);
4346 #ifdef HAVE_SHIFTBBA
4351 int hilbeledeg=1,hilbcount=0,minimcnt=0;
4379 #ifdef HAVE_TAIL_RING
4395 while (strat->
Ll >= 0)
4402 while (strat->
Ll >= 0)
4415 while ((strat->
Ll >= 0)
4416 && (strat->
L[strat->
Ll].p1!=
NULL) && (strat->
L[strat->
Ll].p2!=
NULL)
4421 if (strat->
Ll<0)
break;
4426 strat->
P = strat->
L[strat->
Ll];
4456 else if (strat->
P.p1 ==
NULL)
4458 if (strat->
minim > 0)
4464 if ((strat->
P.p ==
NULL) && (strat->
P.t_p ==
NULL))
4472 &olddeg,&reduc,strat, red_result);
4475 red_result = strat->
red(&strat->
P,strat);
4485 if (red_result == 1)
4488 strat->
P.GetP(strat->
lmBin);
4497 int pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
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)
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)
BOOLEAN kTest_L(LObject *L, kStrategy strat, BOOLEAN testp, int lpos, TSet T, int tlength)
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
#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_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)
#define rField_is_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)