18#define PLURAL_INTERNAL_DECLARATIONS 1
21#define STDZ_EXHANGE_DURING_REDUCTION 0
39#define SBA_INTERRED_START 0
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
51VAR long sba_reduction_steps;
52VAR long sba_interreduction_steps;
54#if SBA_PRINT_OPERATIONS
55VAR long sba_operations;
56VAR long sba_interreduction_operations;
82#ifdef STDZ_EXCHANGE_DURING_REDUCTION
85 unsigned long not_sev = ~L->sev;
90 const unsigned long* sevT=strat->
sevT;
102 if (
j > strat->
tl)
return o;
123 if (
j > strat->
tl)
return o;
147 unsigned long not_sev = ~L->sev;
148 const unsigned long sevT0 = strat->
sevT[0];
149 number orest,rest,
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)
252 if (
j > strat->
tl)
return o;
253#if defined(PDEBUG) || defined(PDIV_DEBUG)
274 unsigned long not_sev = ~L->sev;
279 const unsigned long* sevS=strat->
sevS;
280 number rest, orest,
mult;
292 if (
j > strat->
sl)
return o;
293#if defined(PDEBUG) || defined(PDIV_DEBUG)
319 unsigned long not_sev = ~L->sev;
323 const unsigned long* sevT=strat->
sevT;
336 if (
j > strat->
tl)
return -1;
337#if defined(PDEBUG) || defined(PDIV_DEBUG)
341 if (!(sevT[
j] & not_sev)
356 if (
j > strat->
tl)
return -1;
357#if defined(PDEBUG) || defined(PDIV_DEBUG)
361 if (!(sevT[
j] & not_sev)
380 if (
j > strat->
tl)
return -1;
381#if defined(PDEBUG) || defined(PDIV_DEBUG)
385 if (!(sevT[
j] & not_sev) &&
399 if (
j > strat->
tl)
return -1;
400#if defined(PDEBUG) || defined(PDIV_DEBUG)
404 if (!(sevT[
j] & not_sev) &&
432 if (strat->
T[jj].ecart<=ecart)
434 if (strat->
T[jj].pLength<=0)
435 strat->
T[jj].pLength=strat->
T[jj].GetpLength();
437 else if (strat->
T[
j].pLength > strat->
T[jj].pLength)
439 if (strat->
T[
j].pLength<=2)
return j;
454 else if (r== -1) r=jj;
455 if (strat->
T[jj].ecart<=ecart)
466 unsigned long not_sev = ~L->sev;
467 poly
p = L->GetLmCurrRing();
481 ende=
posInS(strat,*max_ind,
p,0)+1;
482 if (ende>(*max_ind)) ende=(*max_ind);
491 if (
j > ende)
return -1;
492#if defined(PDEBUG) || defined(PDIV_DEBUG)
496 if ( !(strat->
sevS[
j] & not_sev) &&
510 if (
j > ende)
return -1;
511#if defined(PDEBUG) || defined(PDIV_DEBUG)
515 if ( !(strat->
sevS[
j] & not_sev) &&
529 unsigned long not_sev = ~L->sev;
530 poly
p = L->GetLmCurrRing();
544 ende=
posInS(strat,*max_ind,
p,0)+1;
545 if (ende>(*max_ind)) ende=(*max_ind);
552 if (
j > ende)
return -1;
553#if defined(PDEBUG) || defined(PDIV_DEBUG)
557 if ( !(strat->
sevS[
j] & not_sev) &&
569 unsigned long not_sev = ~L->sev;
570 poly
p = L->GetLmCurrRing();
581 if (
j > ende)
return -1;
582#if defined(PDEBUG) || defined(PDIV_DEBUG)
586 if ( !(strat->
sevS[
j] & not_sev) &&
598 if (arg <= 0)
return 0;
600 if (arg%2 == 1) { arg--; }
616 poly zeroPoly =
NULL;
617 unsigned long a = (
unsigned long)
pGetCoeff(
p);
624 for (
int i = 1;
i <= leadRing->N;
i++)
633 poly lead_mult =
p_ISet(1, tailRing);
634 if (
n_GetChar(leadRing->cf) <= k_ind2 + a_ind2)
636 int too_much = k_ind2 + a_ind2 -
n_GetChar(leadRing->cf);
638 zeroPoly =
p_ISet(a, tailRing);
639 for (
int i = 1;
i <= leadRing->N;
i++)
652 for (
int j = 1;
j <= s_exp;
j++)
669 p_Setm(lead_mult, tailRing);
670 zeroPoly =
p_Mult_mm(zeroPoly, lead_mult, tailRing);
672 for (
int i = 1;
i <= leadRing->N;
i++)
722 if (
h->IsNull())
return 0;
723 if (strat->
tl<0)
return 1;
733 long reddeg =
h->GetpFDeg();
735 h->SetShortExpVector();
742#if STDZ_EXCHANGE_DURING_REDUCTION
770 if (
h->GetLmTailRing() ==
NULL)
799#if STDZ_EXCHANGE_DURING_REDUCTION
815 replaceInLAndSAndT(h2,
j, strat);
824 if (
h->GetLmTailRing() ==
NULL)
833 h->SetShortExpVector();
838 (strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
843 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
858 if (
h->pTotalDeg() >= (
long)strat->
tailRing->bitmask)
863 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
880 if (
h->IsNull())
return 0;
881 if (strat->
sl<0)
return 1;
889 h->SetShortExpVector();
890 int max_ind=strat->
sl;
899#if STDZ_EXCHANGE_DURING_REDUCTION
923 if (
h->GetLmTailRing() ==
NULL)
949#if STDZ_EXCHANGE_DURING_REDUCTION
963 redtailBbaAlsoLC_Z_S(&h2,
j, strat);
966 replaceInLAndSAndT(h2,
j, strat);
976 if (
h->GetLmCurrRing() ==
NULL)
981 h->SetShortExpVector();
990 if (strat->
tl<0)
return 1;
991 if (
h->IsNull())
return 0;
1002 long reddeg =
h->GetpFDeg();
1004 h->SetShortExpVector();
1023 h->i_r1 = strat->
tl;
1026 if (
h->GetLmTailRing() ==
NULL)
1039 if (
h->GetLmTailRing() ==
NULL)
1045 h->SetShortExpVector();
1050 (strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
1055 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1056 if (at <= strat->Ll)
1070 if (
h->pTotalDeg() >= (
long)strat->
tailRing->bitmask)
1075 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1092 if (strat->
sl<0)
return 1;
1093 if (
h->IsNull())
return 0;
1103 h->SetShortExpVector();
1122 if (
h->GetLmTailRing() ==
NULL)
1135 if (
h->GetLmTailRing() ==
NULL)
1140 h->SetShortExpVector();
1152 if (strat->
tl<0)
return 1;
1157 int i,
j,at,pass,cnt,ii;
1164 h->SetShortExpVector();
1165 h_p =
h->GetLmTailRing();
1170 if (
j < 0)
return 1;
1172 li = strat->
T[
j].pLength;
1180 if (test_opt_length)
1182 if (li<=0) li=strat->
T[
j].GetpLength();
1185 unsigned long not_sev = ~ h->sev;
1192 if ((strat->
T[
i].pLength < li)
1200 li = strat->
T[
i].pLength;
1201 if (li<=0) li=strat->
T[
i].GetpLength();
1225#if SBA_PRINT_REDUCTION_STEPS
1226 sba_interreduction_steps++;
1228#if SBA_PRINT_OPERATIONS
1229 sba_interreduction_operations +=
pLength(strat->
T[ii].p);
1241 h_p =
h->GetLmTailRing();
1285 h->SetShortExpVector();
1297 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1298 if (at <= strat->Ll)
1309 int dummy=strat->
sl;
1316 Print(
" lazy: -> L%d\n",at);
1335 assume(PR->GetLmCurrRing() != PW->GetLmCurrRing());
1337 Red->HeadNormalize();
1371 if (strat->
tl<0)
return 1;
1377 PrintS(
"------- IN REDSIG -------\n");
1384 PrintS(
"---------------------------\n");
1387 int i,
j,at,pass, ii;
1390 unsigned long not_sev;
1396 h->SetShortExpVector();
1397 h_p =
h->GetLmTailRing();
1407 li = strat->
T[
j].pLength;
1408 if (li<=0) li=strat->
T[
j].GetpLength();
1416 if (test_opt_length)
1425 if ((strat->
T[
i].pLength < li)
1433 li = strat->
T[
i].pLength;
1434 if (li<=0) li=strat->
T[
i].GetpLength();
1456 Print(
"BEFORE REDUCTION WITH %d:\n",ii);
1457 PrintS(
"--------------------------------\n");
1464 PrintS(
"--------------------------------\n");
1465 printf(
"INDEX OF REDUCER T: %d\n",ii);
1468#if SBA_PRINT_REDUCTION_STEPS
1470 sba_reduction_steps++;
1472#if SBA_PRINT_OPERATIONS
1474 sba_operations +=
pLength(strat->
T[ii].p);
1481 Print(
"SigSAFE: %d\n",sigSafe);
1496 h_p =
h->GetLmTailRing();
1502 h->SetShortExpVector();
1514 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1515 if (at <= strat->Ll)
1517 int dummy=strat->
sl;
1525 Print(
" lazy: -> L%d\n",at);
1549 beforeredsig =
pCopy(
h->sig);
1551 if (strat->
tl<0)
return 1;
1557 Print(
"------- IN REDSIG -------\n");
1564 Print(
"---------------------------\n");
1567 int i,
j,at,pass, ii;
1570 unsigned long not_sev;
1576 h->SetShortExpVector();
1577 h_p =
h->GetLmTailRing();
1599 h->i_r1 = strat->
tl;
1602 if (
h->GetLmTailRing() ==
NULL)
1609 if(
pLtCmp(beforeredsig,
h->sig) == 1)
1632 li = strat->
T[
j].pLength;
1633 if (li<=0) li=strat->
T[
j].GetpLength();
1640 if (test_opt_length)
1649 if ((strat->
T[
i].pLength < li)
1657 li = strat->
T[
i].pLength;
1658 if (li<=0) li=strat->
T[
i].GetpLength();
1680 Print(
"BEFORE REDUCTION WITH %d:\n",ii);
1681 Print(
"--------------------------------\n");
1688 Print(
"--------------------------------\n");
1689 printf(
"INDEX OF REDUCER T: %d\n",ii);
1717#if SBA_PRINT_REDUCTION_STEPS
1719 sba_reduction_steps++;
1721#if SBA_PRINT_OPERATIONS
1723 sba_operations +=
pLength(strat->
T[ii].p);
1730 Print(
"SigSAFE: %d\n",sigSafe);
1745 h_p =
h->GetLmTailRing();
1751 h->SetShortExpVector();
1763 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1764 if (at <= strat->Ll)
1766 int dummy=strat->
sl;
1774 Print(
" lazy: -> L%d\n",at);
1790 p =
h = L->GetLmTailRing();
1792 return L->GetLmCurrRing();
1800 Ln.sevSig = L->sevSig;
1801 Ln.pLength = L->GetpLength() - 1;
1816 Ln.SetShortExpVector();
1822 With = &(strat->
T[
j]);
1827 if (With ==
NULL)
break;
1851#if SBA_PRINT_REDUCTION_STEPS
1853 sba_reduction_steps++;
1855#if SBA_PRINT_OPERATIONS
1857 sba_operations +=
pLength(With->p);
1867 pNext(
h) = Ln.LmExtractAndIter();
1870 }
while (!Ln.IsNull());
1873 if (Ln.IsNull())
goto all_done;
1874 if (! withT) With_s.Init(
currRing);
1881 pNext(
h) = Ln.LmExtractAndIter();
1898 return L->GetLmCurrRing();
1907 if (strat->
tl<0)
return 1;
1913 long reddeg =
h->GetpFDeg();
1917 h->SetShortExpVector();
1918 poly h_p =
h->GetLmTailRing();
1923 if (
j < 0)
return 1;
1925 li = strat->
T[
j].pLength;
1934 if (test_opt_length)
1936 if (li<=0) li=strat->
T[
j].GetpLength();
1939 unsigned long not_sev = ~ h->sev;
1946 if ((strat->
T[
i].pLength < li)
1954 li = strat->
T[
i].pLength;
1955 if (li<=0) li=strat->
T[
i].GetpLength();
1980#if SBA_PRINT_REDUCTION_STEPS
1981 sba_interreduction_steps++;
1983#if SBA_PRINT_OPERATIONS
1984 sba_interreduction_operations +=
pLength(strat->
T[ii].p);
1996 h_p=
h->GetLmTailRing();
2041 h->SetShortExpVector();
2047 (strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
2050 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
2051 if (at <= strat->Ll)
2063 int dummy=strat->
sl;
2076 else if (d != reddeg)
2080 if (
h->pTotalDeg() >= (
long)strat->
tailRing->bitmask)
2085 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
2112 if (strat->
tl<0)
return 1;
2115 int j,at,pass,ei, ii, h_d;
2119 d = reddeg =
h->GetpFDeg() +
h->ecart;
2120 h->SetShortExpVector();
2126 if (
j < 0)
return 1;
2129 ei = strat->
T[ii].ecart;
2149 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
2167 Print(
"\nwith T[%d]:",ii);
2174#if SBA_PRINT_REDUCTION_STEPS
2175 sba_interreduction_steps++;
2177#if SBA_PRINT_OPERATIONS
2178 sba_interreduction_operations += strat->
T[ii].pLength;
2231 h->SetShortExpVector();
2232 h_d =
h->SetpFDeg();
2237 h->ecart = d-h_d+ei-
h->ecart;
2249 && ((d > reddeg) || (pass > strat->
LazyPass))))
2253 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
2254 if (at <= strat->Ll)
2265 int dummy=strat->
sl;
2272 Print(
" degree jumped: -> L%d\n",at);
2278 else if (d > reddeg)
2282 if (
h->pTotalDeg()+
h->ecart >= (
long)strat->
tailRing->bitmask)
2287 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
2319 P.SetShortExpVector();
2322 if(is_ring) nonorm=
TRUE;
2440 P.SetShortExpVector();
2515 P.SetShortExpVector();
2578 P.SetShortExpVector();
2592 P.SetShortExpVector();
2618 int hilbeledeg=1,hilbcount=0,minimcnt=0;
2642 withT = ! strat->
homog;
2649#ifdef HAVE_TAIL_RING
2658 while (strat->
Ll >= 0)
2665 while (strat->
Ll >= 0)
2678 while ((strat->
Ll >= 0)
2679 && (strat->
L[strat->
Ll].p1!=
NULL) && (strat->
L[strat->
Ll].p2!=
NULL)
2687 if (strat->
Ll<0)
break;
2692 strat->
P = strat->
L[strat->
Ll];
2722 else if (strat->
P.p1 ==
NULL)
2724 if (strat->
minim > 0)
2730 if ((strat->
P.p ==
NULL) && (strat->
P.t_p ==
NULL))
2738 &olddeg,&reduc,strat, red_result);
2741 red_result = strat->
red(&strat->
P,strat);
2751 if (red_result == 1)
2754 strat->
P.GetP(strat->
lmBin);
2763 int pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
2778 strat->
P.pCleardenom();
2782 strat->
P.pCleardenom();
2791 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
2803 if (strat->
minim==1)
2810 strat->
M->m[minimcnt]=strat->
P.p2;
2814 pNext(strat->
M->m[minimcnt])
2824 strat->
P.SetShortExpVector();
2831 strat->
enterS(&strat->
P, pos, strat, strat->
tl);
2846 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
2854 if (strat->
s_poly(strat))
2859 int pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
2865 strat->
enterS(&strat->
P, pos, strat, strat->
tl);
2869 else if (strat->
P.p1 ==
NULL && strat->
minim > 0)
2911#ifdef HAVE_TAIL_RING
2933 for(
int i = 0;
i<=strat->
sl;
i++)
2968 return (strat->
Shdl);
2980#if SBA_PRINT_ZERO_REDUCTIONS
2981 long zeroreductions = 0;
2983#if SBA_PRINT_PRODUCT_CRITERION
2984 long product_criterion = 0;
2988 int size_g_non_red = 0;
2990#if SBA_PRINT_SIZE_SYZ
2994#if SBA_PRINT_REDUCTION_STEPS
2995 sba_reduction_steps = 0;
2996 sba_interreduction_steps = 0;
2998#if SBA_PRINT_OPERATIONS
3000 sba_interreduction_operations = 0;
3009 if (sRing!=currRingOld)
3028 dummy =
pCopy(F->m[0]);
3030 F->m[
i] = F->m[
i+1];
3051 dummy =
pCopy(F->m[0]);
3053 F->m[
i] = F->m[
i+1];
3071 for (
int i=0;
i<
sort->length();++
i)
3086 F->m[
j] = F->m[
j-1];
3100#if SBA_INTERRED_START
3104 printf(
"SBA COMPUTATIONS DONE IN THE FOLLOWING RING:\n");
3106 printf(
"ordSgn = %d\n",
currRing->OrdSgn);
3109 int srmax,lrmax, red_result = 1;
3111 int hilbeledeg=1,hilbcount=0,minimcnt=0;
3125 reduc = olddeg = lrmax = 0;
3138#ifdef HAVE_TAIL_RING
3150 strat->
enterS(&strat->
L[strat->
Ll-(
i)], strat->
sl+1, strat, strat->
tl);
3160 while (strat->
Ll >= 0)
3162 if (strat->
Ll > lrmax) lrmax =strat->
Ll;
3192 f5c ( strat, olddeg, minimcnt, hilbeledeg, hilbcount, srmax,
3193 lrmax, reduc,
Q,
w, hilb );
3203 strat->
P = strat->
L[strat->
Ll];
3209 if (!strat->
rewCrit2(strat->
P.sig, ~strat->
P.sevSig, strat->
P.GetLmCurrRing(), strat, strat->
P.checked+1))
3213 PrintS(
"SIG OF NEXT PAIR TO HANDLE IN SIG-BASED ALGORITHM\n");
3214 PrintS(
"-------------------------------------------------\n");
3219 PrintS(
"-------------------------------------------------\n");
3254 else if (strat->
P.p1 ==
NULL)
3256 if (strat->
minim > 0)
3262 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
3270 PrintS(
"Poly before red: ");
3274#if SBA_PRODUCT_CRITERION
3275 if (strat->
P.prod_crit)
3277#if SBA_PRINT_PRODUCT_CRITERION
3278 product_criterion++;
3280 int pos =
posInSyz(strat, strat->
P.sig);
3287 red_result = strat->
red(&strat->
P,strat);
3290 red_result = strat->
red(&strat->
P,strat);
3306 strat->
P.p =
pNeg(strat->
P.p);
3307 strat->
P.sig =
pNeg(strat->
P.sig);
3310 if(strat->
P.sig !=
NULL)
3312 if(strat->
P.p !=
NULL)
3319 red_result =
redRing(&strat->
P,strat);
3324 strat->
P.sig =
NULL;
3328 strat->
enterS(&strat->
P, 0, strat, strat->
tl);
3344 if (red_result != 0)
3346 PrintS(
"Poly after red: ");
3348 pWrite(strat->
P.GetLmCurrRing());
3350 printf(
"%d\n",red_result);
3355 if(strat->
P.p !=
NULL)
3357 &olddeg,&reduc,strat, red_result);
3360 &olddeg,&reduc,strat, red_result);
3368 if (red_result == 1)
3371 strat->
P.GetP(strat->
lmBin);
3375 (strat->
P).FDeg = (strat->
P).pFDeg();
3387 int pos = strat->
sl+1;
3393 beforetailred =
pCopy(strat->
P.sig);
3398 strat->
P.p =
redtailSba(&(strat->
P),pos-1,strat, withT);
3406 strat->
P.pCleardenom();
3409 strat->
P.p =
redtailSba(&(strat->
P),pos-1,strat, withT);
3410 strat->
P.pCleardenom();
3417 strat->
P.p =
redtailSba(&(strat->
P),pos-1,strat, withT);
3426 strat->
enterS(&strat->
P, 0, strat, strat->
tl);
3432 if(strat->
P.sig ==
NULL ||
pLtCmp(beforetailred,strat->
P.sig) == 1)
3436 red_result =
redRing(&strat->
P,strat);
3445 strat->
enterS(&strat->
P, 0, strat, strat->
tl);
3451 if(strat->
P.p ==
NULL)
3452 goto case_when_red_result_changed;
3458 for (
int jj = 0; jj<strat->
tl+1; jj++)
3462 strat->
T[jj].is_sigsafe =
FALSE;
3468 for (
int jj = 0; jj<strat->
tl+1; jj++)
3470 strat->
T[jj].is_sigsafe =
FALSE;
3480 if (strat->
minim==1)
3487 strat->
M->m[minimcnt]=strat->
P.p2;
3491 pNext(strat->
M->m[minimcnt])
3501 strat->
T[strat->
tl].is_sigsafe =
FALSE;
3515 strat->
enterS(&strat->
P, pos, strat, strat->
tl);
3519 for (
int tk=0; tk<strat->
sl+1; tk++)
3540 for(
int ps=0;ps<strat->
sl+1;ps++)
3548 (strat->
syzmax)*
sizeof(
unsigned long),
3550 *
sizeof(
unsigned long));
3582 unsigned max_cmp =
IDELEMS(F);
3592 for (
int i=0;
i<strat->
sl; ++
i)
3609 for (
unsigned i=cmp+1;
i<=max_cmp; ++
i)
3612 for (
int j=0;
j<strat->
sl; ++
j)
3650 printf(
"---------------------------\n");
3651 Print(
" %d. ELEMENT ADDED TO GCURR:\n",strat->
sl+1);
3674 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
3677 if (strat->
sl>srmax) srmax = strat->
sl;
3681 case_when_red_result_changed:
3689#if SBA_PRINT_ZERO_REDUCTIONS
3698 int pos =
posInSyz(strat, strat->
P.sig);
3702 Print(
"ADDING STUFF TO SYZ : ");
3721 printf(
"\nSigDrop!\n");
3723 printf(
"\nEnded with no SigDrop\n");
3729 if(strat->
P.sig !=
NULL)
3768#ifdef HAVE_TAIL_RING
3784#if SBA_PRINT_SIZE_SYZ
3786 size_syz = strat->
syzl;
3813 for(;
k>=0 && (strat->
L[
k].p1 !=
NULL || strat->
L[
k].p2 !=
NULL);
k--)
3823 for(;
k>=0 && strat->
L[
k].p1 ==
NULL && strat->
L[
k].p2 ==
NULL;
k--)
3826 strat->
enterS(&strat->
L[
k], strat->
sl+1, strat, strat->
tl);
3834 for(
k=strat->
sl;
k>=0;
k--)
3870 printf(
"SIZE OF SHDL: %d\n",
IDELEMS(strat->
Shdl));
3874 printf(
" %d. ",oo+1);
3879#if SBA_PRINT_ZERO_REDUCTIONS
3880 printf(
"----------------------------------------------------------\n");
3881 printf(
"ZERO REDUCTIONS: %ld\n",zeroreductions);
3884#if SBA_PRINT_REDUCTION_STEPS
3885 printf(
"----------------------------------------------------------\n");
3886 printf(
"S-REDUCTIONS: %ld\n",sba_reduction_steps);
3888#if SBA_PRINT_OPERATIONS
3889 printf(
"OPERATIONS: %ld\n",sba_operations);
3891#if SBA_PRINT_REDUCTION_STEPS
3892 printf(
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n");
3893 printf(
"INTERREDUCTIONS: %ld\n",sba_interreduction_steps);
3895#if SBA_PRINT_OPERATIONS
3896 printf(
"INTERREDUCTION OPERATIONS: %ld\n",sba_interreduction_operations);
3898#if SBA_PRINT_REDUCTION_STEPS
3899 printf(
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n");
3900 printf(
"ALL REDUCTIONS: %ld\n",sba_reduction_steps+sba_interreduction_steps);
3901 sba_interreduction_steps = 0;
3902 sba_reduction_steps = 0;
3904#if SBA_PRINT_OPERATIONS
3905 printf(
"ALL OPERATIONS: %ld\n",sba_operations+sba_interreduction_operations);
3906 sba_interreduction_operations = 0;
3910 printf(
"----------------------------------------------------------\n");
3911 printf(
"SIZE OF G: %d / %d\n",size_g,size_g_non_red);
3915#if SBA_PRINT_SIZE_SYZ
3916 printf(
"SIZE OF SYZ: %ld\n",size_syz);
3917 printf(
"----------------------------------------------------------\n");
3920#if SBA_PRINT_PRODUCT_CRITERION
3921 printf(
"PRODUCT CRITERIA: %ld\n",product_criterion);
3922 product_criterion = 0;
3924 return (strat->
Shdl);
4266 int& hilbcount,
int& srmax,
int& lrmax,
int& reduc, ideal
Q,
4269 int Ll_old, red_result = 1;
4275 reduc = olddeg = lrmax = 0;
4280 while (strat->
tl >= 0)
4282 if(!strat->
T[strat->
tl].is_redundant)
4285 h.p = strat->
T[strat->
tl].p;
4286 h.tailRing = strat->
T[strat->
tl].tailRing;
4287 h.t_p = strat->
T[strat->
tl].t_p;
4326 while (strat->
Ll>Ll_old)
4328 strat->
P = strat->
L[strat->
Ll];
4332 PrintS(
"NEXT PAIR TO HANDLE IN INTERRED ALGORITHM\n");
4333 PrintS(
"-------------------------------------------------\n");
4337 printf(
"%d\n",strat->
tl);
4338 PrintS(
"-------------------------------------------------\n");
4371 else if (strat->
P.p1 ==
NULL)
4373 if (strat->
minim > 0)
4380 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
4388 &olddeg,&reduc,strat, red_result);
4391 PrintS(
"Poly before red: ");
4395 red_result = strat->
red2(&strat->
P,strat);
4405 if (red_result == 1)
4408 strat->
P.GetP(strat->
lmBin);
4419 pos =
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
4423 pos =
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
4431 strat->
P.pCleardenom();
4434 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
4435 strat->
P.pCleardenom();
4442 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
4452 if (strat->
minim==1)
4459 strat->
M->m[minimcnt]=strat->
P.p2;
4463 pNext(strat->
M->m[minimcnt])
4476 strat->
enterS(&strat->
P, pos, strat, strat->
tl);
4479 PrintS(
"ELEMENT ADDED TO GCURR DURING INTERRED: ");
4483 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
4487 if (strat->
sl>srmax) srmax = strat->
sl;
4507 while (cc<strat->tl+1)
4509 strat->
T[cc].sig =
pOne();
4512 strat->
sig[cc] = strat->
T[cc].sig;
4513 strat->
sevSig[cc] = strat->
T[cc].sevSig;
4514 strat->
T[cc].is_sigsafe =
TRUE;
4522 for (
int cd=strat->
Ll;
cd>=0;
cd--)
4530 printf(
"\nAfter f5c sorting\n");
4531 for(
int i=0;
i<=strat->
sl;
i++)
4537 PrintS(
"------------------- STRAT S ---------------------\n");
4539 while (cc<strat->tl+1)
4543 printf(
"- - - - - -\n");
4546 PrintS(
"-------------------------------------------------\n");
4547 PrintS(
"------------------- STRAT T ---------------------\n");
4549 while (cc<strat->tl+1)
4553 printf(
"- - - - - -\n");
4556 PrintS(
"-------------------------------------------------\n");
4557 PrintS(
"------------------- STRAT L ---------------------\n");
4559 while (cc<strat->Ll+1)
4565 printf(
"- - - - - -\n");
4568 PrintS(
"-------------------------------------------------\n");
4569 printf(
"F5C DONE\nSTRAT SL: %d -- %d\n",strat->
sl, strat->
currIdx);
4581 int hilbeledeg=1,hilbcount=0,minimcnt=0;
4609#ifdef HAVE_TAIL_RING
4619 while (strat->
Ll >= 0)
4626 while (strat->
Ll >= 0)
4639 while ((strat->
Ll >= 0)
4640 && (strat->
L[strat->
Ll].p1!=
NULL) && (strat->
L[strat->
Ll].p2!=
NULL)
4645 if (strat->
Ll<0)
break;
4650 strat->
P = strat->
L[strat->
Ll];
4680 else if (strat->
P.p1 ==
NULL)
4682 if (strat->
minim > 0)
4688 if ((strat->
P.p ==
NULL) && (strat->
P.t_p ==
NULL))
4696 &olddeg,&reduc,strat, red_result);
4699 red_result = strat->
red(&strat->
P,strat);
4709 if (red_result == 1)
4712 strat->
P.GetP(strat->
lmBin);
4721 int pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
4736 strat->
P.pCleardenom();
4740 strat->
P.pCleardenom();
4753 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
4769 if (strat->
minim==1)
4776 strat->
M->m[minimcnt]=strat->
P.p2;
4780 pNext(strat->
M->m[minimcnt])
4794 strat->
enterS(&strat->
P, pos, strat, strat->
tl);
4799 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
4807 if (strat->
s_poly(strat))
4812 int pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
4815 strat->
enterS(&strat->
P, pos, strat, strat->
tl);
4821 else if (strat->
P.p1 ==
NULL && strat->
minim > 0)
4838 for (
int k = 0;
k <= strat->
sl; ++
k)
4841 for (
int j = 0;
j<=strat->
tl; ++
j)
4871#ifdef HAVE_TAIL_RING
4878 WarnS(
"reduction with S is not yet supported by Letterplace");
4895 for(
int i = 0;
i<=strat->
sl;
i++)
4930 return (strat->
Shdl);
4953 if (
h->IsNull())
return 0;
4961 d =
h->GetpFDeg() +
h->ecart;
4964 h->SetShortExpVector();
4970 h->SetDegStuffReturnLDeg(strat->
LDegLast);
4975 strat->
T[
j].pNorm();
5001 h->SetShortExpVector();
5014 h->SetDegStuffReturnLDeg(strat->
LDegLast);
5024 if (strat->
T[
j].ecart <=
h->ecart)
5025 h->ecart = d -
h->GetpFDeg();
5027 h->ecart = d -
h->GetpFDeg() + strat->
T[
j].ecart -
h->ecart;
5029 d =
h->GetpFDeg() +
h->ecart;
5032 d =
h->SetDegStuffReturnLDeg(strat->
LDegLast);
5041 && ((d >= reddeg) || (pass > strat->
LazyPass)))
5046 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
5047 if (at <= strat->Ll)
static int si_max(const int a, const int b)
CanonicalForm cd(bCommonDen(FF))
static void sort(int **points, int sizePoints)
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)
void(* enterS)(LObject *h, int pos, kStrategy strat, int atR)
pShallowCopyDeleteProc p_shallow_copy_delete
char completeReduce_retry
void(* initEcart)(TObject *L)
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 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)
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 kBucket_Minus_m_Mult_p(kBucket_pt bucket, poly m, poly p, int *l, poly spNoether)
Bpoly == Bpoly - m*p; where m is a monom Does not destroy p and m assume (*l <= 0 || pLength(p) == *l...
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.
void kBucketPolyRedNF(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, bigintmat *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, BOOLEAN reduce)
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)
ideal kStdShift(ideal F, ideal Q, tHomog h, intvec **w, bigintmat *hilb, int syzComp, int newIdeal, intvec *vw, BOOLEAN rightGB)
ideal kInterRed(ideal F, const 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 kFindDivisibleByInT_Z(const kStrategy strat, const LObject *L, const int start)
ideal sba(ideal F0, ideal Q, intvec *w, bigintmat *hilb, kStrategy strat)
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)
int kFindDivisibleByInT_ecart(const kStrategy strat, const LObject *L, const int ecart)
int redHoney(LObject *h, kStrategy strat)
static int kFindDivisibleByInS_Z(const kStrategy strat, LObject *L)
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)
int redLazy(LObject *h, kStrategy strat)
int redSigRing(LObject *h, kStrategy strat)
int kFindDivisibleByInS_noCF(const kStrategy strat, int *max_ind, LObject *L)
poly redtailSba(LObject *L, int pos, kStrategy strat, BOOLEAN withT, BOOLEAN normalize)
KINLINE int ksReducePolyTailSig(LObject *PR, TObject *PW, LObject *Red, kStrategy strat)
ideal rightgb(ideal F, const ideal Q)
poly redNF(poly h, int &max_ind, int nonorm, kStrategy strat)
ideal bbaShift(ideal F, ideal Q, intvec *w, bigintmat *hilb, kStrategy strat)
static int redRing_S(LObject *h, kStrategy strat)
int redSig(LObject *h, kStrategy strat)
void kDebugPrint(kStrategy strat)
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 bba(ideal F, ideal Q, intvec *w, bigintmat *hilb, kStrategy strat)
static int redRing_Z_S(LObject *h, kStrategy strat)
void f5c(kStrategy strat, int &olddeg, int &minimcnt, int &hilbeledeg, int &hilbcount, int &srmax, int &lrmax, int &reduc, ideal Q, intvec *w, bigintmat *hilb)
void initSbaPos(kStrategy strat)
void initBuchMora(ideal F, ideal Q, kStrategy strat)
void enterSyz(LObject &p, kStrategy strat, int atT)
void enterSBba(LObject *p, int atS, kStrategy strat, int atR)
void message(int i, int *olddeg, int *reduc, kStrategy strat, int red_result)
BOOLEAN kTest(kStrategy strat)
TObject * kFindDivisibleByInS_T(kStrategy strat, int end_pos, LObject *L, TObject *T, long ecart)
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 enterSBbaShift(LObject *p, int atS, kStrategy strat, int atR)
void enterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
void redtailBbaAlsoLC_Z(LObject *L, int end_pos, 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 enterT(LObject *p, kStrategy strat, int atT)
void cleanT(kStrategy strat)
int posInSyz(const kStrategy strat, poly sig)
void enterTShift(LObject *p, kStrategy strat, int atT)
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)
poly redtailBba_NF(poly p, kStrategy strat)
void exitSba(kStrategy strat)
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 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 initSbaCrit(kStrategy strat)
void cancelunit(LObject *L, BOOLEAN inNF)
void initHilbCrit(ideal, ideal, bigintmat **hilb, kStrategy strat)
int ksReducePolyGCD(LObject *PR, TObject *PW, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL)
int kFindSameLMInT_Z(const kStrategy strat, const LObject *L, const int start=0)
#define REDNF_CANONICALIZE
static void kDeleteLcm(LObject *P)
int ksReducePolyZ(LObject *PR, TObject *PW, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL)
#define REDTAIL_CANONICALIZE
static void nc_kBucketPolyRed_NF(kBucket_pt b, poly p, number *c, BOOLEAN reduce)
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)
number ndQuotRem(number a, number b, number *r, const coeffs 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)
static int pLength(poly a)
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_ExpVectorSub(poly p1, poly p2, const ring r)
static void p_Setm(poly p, const ring r)
static number p_SetCoeff(poly p, number n, ring r)
static poly p_Head(const poly p, const ring r)
copy the (leading) term of p
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 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 ...
Compatibility 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 rHasLocalOrMixedOrdering(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)
#define rField_is_Ring(R)
static int SI_LOG2_LONG(long v)
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)
int F1(int a1, int &r1)
F1.