19 #define PLURAL_INTERNAL_DECLARATIONS 1 38 #define SBA_INTERRED_START 0 39 #define SBA_TAIL_RED 1 40 #define SBA_PRODUCT_CRITERION 0 41 #define SBA_PRINT_ZERO_REDUCTIONS 0 42 #define SBA_PRINT_REDUCTION_STEPS 0 43 #define SBA_PRINT_OPERATIONS 0 44 #define SBA_PRINT_SIZE_G 0 45 #define SBA_PRINT_SIZE_SYZ 0 46 #define SBA_PRINT_PRODUCT_CRITERION 0 49 #if SBA_PRINT_REDUCTION_STEPS 50 long sba_reduction_steps;
51 long sba_interreduction_steps;
53 #if SBA_PRINT_OPERATIONS 55 long sba_interreduction_operations;
90 unsigned long not_sev = ~L->sev;
94 const unsigned long* sevT=strat->
sevT;
106 if (j > strat->
tl)
return -1;
107 #if defined(PDEBUG) || defined(PDIV_DEBUG) 114 if (!(sevT[j] & not_sev) &&
128 if (j > strat->
tl)
return -1;
129 #if defined(PDEBUG) || defined(PDIV_DEBUG) 135 if (!(sevT[j] & not_sev) &&
153 if (j > strat->
tl)
return -1;
154 #if defined(PDEBUG) || defined(PDIV_DEBUG) 162 if (!(sevT[j] & not_sev) &&
176 if (j > strat->
tl)
return -1;
177 #if defined(PDEBUG) || defined(PDIV_DEBUG) 184 if (!(sevT[j] & not_sev) &&
199 unsigned long not_sev = ~L->sev;
200 poly p = L->GetLmCurrRing();
207 else ende=
posInS(strat,*max_ind,p,0)+1;
208 if (ende>(*max_ind)) ende=(*max_ind);
217 if (j > ende)
return -1;
218 #if defined(PDEBUG) || defined(PDIV_DEBUG) 226 if ( !(strat->
sevS[j] & not_sev) &&
240 if (j > ende)
return -1;
241 #if defined(PDEBUG) || defined(PDIV_DEBUG) 248 if ( !(strat->
sevS[j] & not_sev) &&
261 unsigned long not_sev = ~L->sev;
262 poly p = L->GetLmCurrRing();
275 if (j > ende)
return -1;
276 #if defined(PDEBUG) || defined(PDIV_DEBUG) 284 if ( !(strat->
sevS[j] & not_sev) &&
298 if (j > ende)
return -1;
299 #if defined(PDEBUG) || defined(PDIV_DEBUG) 306 if ( !(strat->
sevS[j] & not_sev) &&
326 unsigned long a = (
unsigned long)
pGetCoeff(p);
329 int a_ind2 =
ind2(a);
333 for (
int i = 1;
i <= leadRing->N;
i++)
343 if (
n_GetChar(leadRing->cf) <= k_ind2 + a_ind2)
345 int too_much = k_ind2 + a_ind2 -
n_GetChar(leadRing->cf);
347 zeroPoly =
p_ISet(a, tailRing);
348 for (
int i = 1;
i <= leadRing->N;
i++)
355 while ( (0 <
ind2(s_exp)) && (
ind2(s_exp) <= too_much) )
357 too_much = too_much -
ind2(s_exp);
361 for (
int j = 1;
j <= s_exp;
j++)
364 tmp2 =
p_ISet(1, tailRing);
369 zeroPoly =
p_Mult_q(zeroPoly, tmp2, tailRing);
374 zeroPoly =
p_Mult_q(zeroPoly,
p_Add_q(tmp3, tmp2, tailRing), tailRing);
378 p_Setm(lead_mult, tailRing);
379 zeroPoly =
p_Mult_mm(zeroPoly, lead_mult, tailRing);
381 for (
int i = 1;
i <= leadRing->N;
i++)
387 pNext(tmp2) = zeroPoly;
434 if (h->IsNull())
return 0;
435 if (strat->
tl<0)
return 1;
445 assume(h->pFDeg() == h->FDeg);
446 long reddeg = h->GetpFDeg();
448 h->SetShortExpVector();
464 if (h->GetLmTailRing() ==
NULL)
477 if (h->GetLmTailRing() ==
NULL)
486 h->SetShortExpVector();
491 (strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
496 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
509 if (d >= (
long)strat->
tailRing->bitmask)
511 if (h->pTotalDeg() >= (long)strat->
tailRing->bitmask)
516 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
538 if (strat->
tl<0)
return 1;
540 assume(h->FDeg == h->pFDeg());
544 unsigned long not_sev;
549 h->SetShortExpVector();
551 h_p = h->GetLmTailRing();
558 li = strat->
T[
j].pLength;
575 if ((strat->
T[i].pLength < li)
583 li = strat->
T[
i].pLength;
604 #if SBA_PRINT_REDUCTION_STEPS 605 sba_interreduction_steps++;
607 #if SBA_PRINT_OPERATIONS 608 sba_interreduction_operations +=
pLength(strat->
T[ii].p);
620 h_p = h->GetLmTailRing();
629 h->SetShortExpVector();
641 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
650 Print(
" lazy: -> L%d\n",at);
663 assume(PR->GetLmCurrRing() != PW->GetLmCurrRing());
665 Red->HeadNormalize();
699 if (strat->
tl<0)
return 1;
702 assume(h->FDeg == h->pFDeg());
705 PrintS(
"------- IN REDSIG -------\n");
712 PrintS(
"---------------------------\n");
718 unsigned long not_sev;
723 h->SetShortExpVector();
725 h_p = h->GetLmTailRing();
735 li = strat->
T[
j].pLength;
752 if ((strat->
T[i].pLength < li)
760 li = strat->
T[
i].pLength;
782 Print(
"BEFORE REDUCTION WITH %d:\n",ii);
783 PrintS(
"--------------------------------\n");
786 pWrite(h->GetLmCurrRing());
790 PrintS(
"--------------------------------\n");
791 printf(
"INDEX OF REDUCER T: %d\n",ii);
794 #if SBA_PRINT_REDUCTION_STEPS 796 sba_reduction_steps++;
798 #if SBA_PRINT_OPERATIONS 800 sba_operations +=
pLength(strat->
T[ii].p);
807 Print(
"SigSAFE: %d\n",sigSafe);
822 h_p = h->GetLmTailRing();
831 h->SetShortExpVector();
843 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
854 Print(
" lazy: -> L%d\n",at);
873 printf(
"\nBefore sbaCheckGcdPair ");
pWrite(h->p);
878 printf(
"\nIntermidiate sbaCheckGcdPair ");
pWrite(h->p);
883 printf(
"\nAfter sbaCheckGcdPair ");
pWrite(h->p);
887 beforeredsig =
pCopy(h->sig);
889 if (strat->
tl<0)
return 1;
892 assume(h->FDeg == h->pFDeg());
894 printf(
"\n--------------------------redSig-------------------------------------\n");
895 printf(
"\nBefore redSig:\n");
900 Print(
"------- IN REDSIG -------\n");
907 Print(
"---------------------------\n");
913 unsigned long not_sev;
918 h->SetShortExpVector();
920 h_p = h->GetLmTailRing();
929 printf(
"\nBefore sbaCheckGcdPair ");
pWrite(h->p);
934 printf(
"\nIntermidiate sbaCheckGcdPair ");
pWrite(h->p);
937 h->is_redundant =
FALSE;
941 printf(
"\nAfter sbaCheckGcdPair ");
pWrite(h->p);
954 if (h->GetLmTailRing() ==
NULL)
961 if(
pLtCmp(beforeredsig,h->sig) == 1)
964 printf(
"\nSigDrop after reduce\n");
pWrite(beforeredsig);
pWrite(h->sig);
968 int red_result =
redRing(h,strat);
973 printf(
"\nReduced to 0 via redRing. Cancel sigdrop\n");
982 printf(
"\nReduced to this via redRing.SIGDROP\n");
pWrite(h->p);
993 li = strat->
T[
j].pLength;
1009 if ((strat->
T[i].pLength < li)
1017 li = strat->
T[
i].pLength;
1039 Print(
"BEFORE REDUCTION WITH %d:\n",ii);
1040 Print(
"--------------------------------\n");
1043 pWrite(h->GetLmCurrRing());
1047 Print(
"--------------------------------\n");
1048 printf(
"INDEX OF REDUCER T: %d\n",ii);
1055 printf(
"\nAfter small reduction:\n");
pWrite(h->p);
pWrite(h->sig);
1068 printf(
"\nReducer and Original have same LT. Force it with redRing!\n");
1070 int red_result =
redRing(h,strat);
1074 printf(
"\nRedRing reduced it to 0. Perfect\n");
1082 printf(
"\nRedRing reduced it to *.\nHave to sigdrop now\n");
pWrite(h->p);
1091 #if SBA_PRINT_REDUCTION_STEPS 1093 sba_reduction_steps++;
1095 #if SBA_PRINT_OPERATIONS 1097 sba_operations +=
pLength(strat->
T[ii].p);
1104 Print(
"SigSAFE: %d\n",sigSafe);
1119 h_p = h->GetLmTailRing();
1128 h->SetShortExpVector();
1140 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
1141 if (at <= strat->Ll)
1143 int dummy=strat->
sl;
1151 Print(
" lazy: -> L%d\n",at);
1164 #define REDTAIL_CANONICALIZE 100 1168 p = h = L->GetLmTailRing();
1170 return L->GetLmCurrRing();
1178 Ln.sevSig = L->sevSig;
1179 Ln.pLength = L->GetpLength() - 1;
1194 Ln.SetShortExpVector();
1200 With = &(strat->
T[
j]);
1205 if (With ==
NULL)
break;
1236 #if SBA_PRINT_REDUCTION_STEPS 1238 sba_reduction_steps++;
1240 #if SBA_PRINT_OPERATIONS 1242 sba_operations +=
pLength(With->p);
1252 pNext(h) = Ln.LmExtractAndIter();
1255 }
while (!Ln.IsNull());
1258 if (Ln.IsNull())
goto all_done;
1259 if (! withT) With_s.Init(
currRing);
1266 pNext(h) = Ln.LmExtractAndIter();
1283 return L->GetLmCurrRing();
1292 if (strat->
tl<0)
return 1;
1296 assume(h->pFDeg() == h->FDeg);
1297 long reddeg = h->GetpFDeg();
1299 unsigned long not_sev;
1301 h->SetShortExpVector();
1302 poly h_p = h->GetLmTailRing();
1307 if (j < 0)
return 1;
1309 li = strat->
T[
j].pLength;
1313 li=strat->
T[
j].pLength=
pLength(strat->
T[j].p);
1334 if (strat->
T[i].pLength==0)
1340 if ((strat->
T[i].pLength < li)
1349 li = strat->
T[
i].pLength;
1371 #if SBA_PRINT_REDUCTION_STEPS 1372 sba_interreduction_steps++;
1374 #if SBA_PRINT_OPERATIONS 1375 sba_interreduction_operations +=
pLength(strat->
T[ii].p);
1387 h_p=h->GetLmTailRing();
1397 h->SetShortExpVector();
1403 (strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
1406 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
1407 if (at <= strat->Ll)
1410 int dummy=strat->
sl;
1422 else if (d != reddeg)
1424 if (d>=(
long)strat->
tailRing->bitmask)
1426 if (h->pTotalDeg() >= (long)strat->
tailRing->bitmask)
1431 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
1452 if (strat->
tl<0)
return 1;
1454 assume(h->FDeg == h->pFDeg());
1456 int i,
j,at,pass,ei, ii, h_d;
1457 unsigned long not_sev;
1461 d = reddeg = h->GetpFDeg() + h->ecart;
1462 h->SetShortExpVector();
1464 h_p = h->GetLmTailRing();
1471 if (j < 0)
return 1;
1473 ei = strat->
T[
j].ecart;
1474 li = strat->
T[
j].pLength;
1492 if ((((strat->
T[i].ecart < ei) && (ei> h->ecart))
1493 || ((strat->
T[i].ecart <= h->ecart) && (strat->
T[i].pLength < li)))
1501 ei = strat->
T[
i].ecart;
1502 li = strat->
T[
i].pLength;
1521 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
1547 #if SBA_PRINT_REDUCTION_STEPS 1548 sba_interreduction_steps++;
1550 #if SBA_PRINT_OPERATIONS 1551 sba_interreduction_operations +=
pLength(strat->
T[ii].p);
1580 else if (h->t_p!=
NULL)
1589 h->SetShortExpVector();
1591 h_d = h->SetpFDeg();
1596 h->ecart = d-h_d+ei-h->ecart;
1610 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
1611 if (at <= strat->Ll)
1613 int dummy=strat->
sl;
1619 Print(
" degree jumped: -> L%d\n",at);
1625 else if (d > reddeg)
1627 if (d>=(
long)strat->
tailRing->bitmask)
1629 if (h->pTotalDeg()+h->ecart >= (long)strat->
tailRing->bitmask)
1634 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
1665 P.SetShortExpVector();
1693 int sl=
pSize(strat->
S[j]);
1765 P.SetShortExpVector();
1814 P.SetShortExpVector();
1842 int sl=
pSize(strat->
S[j]);
1891 P.p =
pJet(P.p,bound);
1895 P.SetShortExpVector();
1923 P.SetShortExpVector();
1962 int hilbeledeg=1,hilbcount=0,minimcnt=0;
1985 withT = ! strat->
homog;
1990 #ifdef HAVE_TAIL_RING 2006 while (strat->
Ll >= 0)
2009 printf(
"\n ------------------------NEW LOOP\n");
2010 printf(
"\nShdl = \n");
2014 for(
int ii = 0; ii<=strat->
sl;ii++)
2017 printf(
"\n list L\n");
2020 for(iii = 0; iii<= strat->
Ll; iii++)
2022 printf(
"L[%i]:",iii);
2029 printf(
"L[%i]:",strat->
Ll);
2036 for(iii = 0; iii<= strat->
Bl; iii++)
2038 printf(
"B[%i]:",iii);
2059 while ((strat->
Ll >= 0)
2060 && (strat->
L[strat->
Ll].p1!=
NULL) && (strat->
L[strat->
Ll].p2!=
NULL)
2065 if (strat->
Ll<0)
break;
2069 strat->
P = strat->
L[strat->
Ll];
2099 else if (strat->
P.p1 ==
NULL)
2101 if (strat->
minim > 0)
2107 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
2115 &olddeg,&reduc,
strat, red_result);
2118 red_result = strat->red(&strat->P,strat);
2128 if (red_result == 1)
2131 strat->
P.GetP(strat->
lmBin);
2140 int pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
2147 strat->
P.pCleardenom();
2150 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
2151 strat->
P.pCleardenom();
2158 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
2168 if (strat->
minim==1)
2175 strat->
M->m[minimcnt]=strat->
P.p2;
2179 pNext(strat->
M->m[minimcnt])
2195 strat->
enterS(strat->
P, pos, strat, strat->
tl);
2197 printf(
"\nThis element has been added to S:\n");
pWrite(strat->
P.p);
pWrite(strat->
P.p1);
pWrite(strat->
P.p2);
2213 if (hilb!=
NULL)
khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat);
2215 if (strat->
P.lcm!=
NULL)
2226 if (strat->
s_poly(strat))
2231 int pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
2237 strat->
enterS(strat->
P, pos, strat, strat->
tl);
2241 else if (strat->
P.p1 ==
NULL && strat->
minim > 0)
2247 memset(&(strat->
P), 0,
sizeof(strat->
P));
2283 #ifdef HAVE_TAIL_RING 2289 for(i=strat->
sl;i>=0;i--) strat->
S_2_R[
i]=-1;
2304 for(
int i = 0;
i<=strat->
sl;
i++)
2330 return (strat->
Shdl);
2342 #if SBA_PRINT_ZERO_REDUCTIONS 2343 long zeroreductions = 0;
2345 #if SBA_PRINT_PRODUCT_CRITERION 2346 long product_criterion = 0;
2348 #if SBA_PRINT_SIZE_G 2350 int size_g_non_red = 0;
2352 #if SBA_PRINT_SIZE_SYZ 2356 #if SBA_PRINT_REDUCTION_STEPS 2357 sba_reduction_steps = 0;
2358 sba_interreduction_steps = 0;
2360 #if SBA_PRINT_OPERATIONS 2362 sba_interreduction_operations = 0;
2366 ring sRing, currRingOld;
2371 if (sRing!=currRingOld)
2390 dummy =
pCopy(F->m[0]);
2392 F->m[
i] = F->m[
i+1];
2413 dummy =
pCopy(F->m[0]);
2415 F->m[
i] = F->m[
i+1];
2434 F->m[
i] = F1->m[(*sort)[
i]-1];
2448 F->m[
j] = F->m[
j-1];
2466 printf(
"SBA COMPUTATIONS DONE IN THE FOLLOWING RING:\n");
2468 printf(
"ordSgn = %d\n",
currRing->OrdSgn);
2471 int srmax,lrmax, red_result = 1;
2473 int hilbeledeg=1,hilbcount=0,minimcnt=0;
2487 reduc = olddeg = lrmax = 0;
2500 #ifdef HAVE_TAIL_RING 2518 strat->
enterS(strat->
L[strat->
Ll-(
i)], strat->
sl+1, strat, strat->
tl);
2528 while (strat->
Ll >= 0)
2531 printf(
"\n ------------------------NEW LOOP\n");
2532 printf(
"\nShdl = \n");
2536 for(
int ii = 0; ii<=strat->
sl;ii++)
2543 for(
int iii = 0; iii< strat->
syzl; iii++)
2545 printf(
"\nsyz[%i]:\n",iii);
2550 for(
int iii = 0; iii<= strat->
tl; iii++)
2552 printf(
"\nT[%i]:\n",iii);
2556 printf(
"\n list L\n");
2559 for(iii = 0; iii<= strat->
Ll; iii++)
2561 printf(
"\nL[%i]:\n",iii);
2569 printf(
"L[%i]:",strat->
Ll);
2578 if (strat->
Ll > lrmax) lrmax =strat->
Ll;
2608 f5c ( strat, olddeg, minimcnt, hilbeledeg, hilbcount, srmax,
2609 lrmax, reduc, Q, w, hilb );
2619 strat->
P = strat->
L[strat->
Ll];
2626 printf(
"\n-------------------------\nThis is the current element P\n");
2633 if (!strat->
rewCrit2(strat->
P.sig, ~strat->
P.sevSig, strat->
P.GetLmCurrRing(),
strat, strat->
P.checked+1)) {
2636 PrintS(
"SIG OF NEXT PAIR TO HANDLE IN SIG-BASED ALGORITHM\n");
2637 PrintS(
"-------------------------------------------------\n");
2642 PrintS(
"-------------------------------------------------\n");
2677 else if (strat->
P.p1 ==
NULL)
2679 if (strat->
minim > 0)
2685 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
2693 PrintS(
"Poly before red: ");
2697 #if SBA_PRODUCT_CRITERION 2698 if (strat->
P.prod_crit) {
2699 #if SBA_PRINT_PRODUCT_CRITERION 2700 product_criterion++;
2702 int pos =
posInSyz(strat, strat->
P.sig);
2704 if (strat->
P.lcm!=
NULL)
2708 red_result = strat->
red(&strat->
P,strat);
2711 red_result = strat->
red(&strat->
P,strat);
2725 strat->
P.p =
pNeg(strat->
P.p);
2726 strat->
P.sig =
pNeg(strat->
P.sig);
2729 if(strat->
P.sig !=
NULL)
2731 if(strat->
P.p !=
NULL)
2735 printf(
"\nAfter reduce (redresult=%i): \n",red_result);
pWrite(strat->
P.p);
pWrite(strat->
P.sig);
2742 printf(
"\nSigdrop in the reduce. Trying redring\n");
2744 red_result =
redRing(&strat->
P,strat);
2748 printf(
"\nSigdrop cancelled since redRing reduced to 0\n");
2752 strat->
P.sig =
NULL;
2757 printf(
"\nStill Sigdrop - redRing reduced to:\n");
pWrite(strat->
P.p);
2759 strat->
enterS(strat->
P, 0, strat, strat->
tl);
2768 printf(
"\nToo many blocked reductions\n");
2778 if (red_result != 0) {
2779 PrintS(
"Poly after red: ");
2781 pWrite(strat->
P.GetLmCurrRing());
2783 printf(
"%d\n",red_result);
2788 if(strat->
P.p !=
NULL)
2790 &olddeg,&reduc,
strat, red_result);
2792 message((strat->honey ? strat->P.ecart : 0),
2793 &olddeg,&reduc,strat, red_result);
2801 if (red_result == 1)
2804 strat->
P.GetP(strat->
lmBin);
2808 (strat->
P).FDeg = (strat->
P).pFDeg();
2820 int pos = strat->
sl+1;
2828 beforetailred =
pCopy(strat->
P.sig);
2834 strat->
P.p =
redtailSba(&(strat->
P),pos-1,strat, withT);
2841 strat->
P.pCleardenom();
2844 strat->
P.p =
redtailSba(&(strat->
P),pos-1,strat, withT);
2845 strat->
P.pCleardenom();
2852 strat->
P.p =
redtailSba(&(strat->
P),pos-1,strat, withT);
2862 printf(
"\n Still sigdrop after redtailSba - it reduced to \n");
pWrite(strat->
P.p);
2864 strat->
enterS(strat->
P, 0, strat, strat->
tl);
2870 if(strat->
P.sig ==
NULL ||
pLtCmp(beforetailred,strat->
P.sig) == 1)
2873 printf(
"\nSigDrop after TAILred\n");
pWrite(beforetailred);
pWrite(strat->
P.sig);
2877 red_result =
redRing(&strat->
P,strat);
2882 printf(
"\nReduced to 0 via redRing. Cancel sigdrop\n");
2890 printf(
"\nReduced to this via redRing.SIGDROP\n");
pWrite(strat->
P.p);
2892 strat->
enterS(strat->
P, 0, strat, strat->
tl);
2898 if(strat->
P.p ==
NULL)
2899 goto case_when_red_result_changed;
2902 printf(
"\nNach redTailSba: \n");
2909 for (
int jj = 0; jj<strat->
tl+1; jj++)
2913 strat->
T[jj].is_sigsafe =
FALSE;
2919 for (
int jj = 0; jj<strat->
tl+1; jj++)
2921 strat->
T[jj].is_sigsafe =
FALSE;
2931 if (strat->
minim==1)
2938 strat->
M->m[minimcnt]=strat->
P.p2;
2942 pNext(strat->
M->m[minimcnt])
2952 strat->
T[strat->
tl].is_sigsafe =
FALSE;
2963 printf(
"\nThis element is added to S\n");
2971 strat->
enterS(strat->
P, pos, strat, strat->
tl);
2975 for (
int tk=0; tk<strat->
sl+1; tk++)
2996 for(
int ps=0;ps<strat->
sl+1;ps++)
3004 (strat->
syzmax)*
sizeof(
unsigned long),
3006 *
sizeof(
unsigned long));
3009 Q.sig =
pCopy(strat->
P.sig);
3047 for (
int i=0;
i<strat->
sl; ++
i) {
3061 for (
int i=cmp+1;
i<=max_cmp; ++
i) {
3063 for (
int j=0;
j<strat->
sl; ++
j) {
3094 printf(
"---------------------------\n");
3095 Print(
" %d. ELEMENT ADDED TO GCURR:\n",strat->
sl+1);
3118 if (hilb!=
NULL)
khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat);
3120 if (strat->
P.lcm!=
NULL)
3126 if (strat->
sl>srmax) srmax = strat->
sl;
3130 case_when_red_result_changed:
3136 if (red_result!=2) {
3137 #if SBA_PRINT_ZERO_REDUCTIONS 3146 int pos =
posInSyz(strat, strat->
P.sig);
3150 Print(
"ADDING STUFF TO SYZ : ");
3163 memset(&(strat->
P), 0,
sizeof(strat->
P));
3169 printf(
"\nSigDrop!\n");
3171 printf(
"\nEnded with no SigDrop\n");
3177 if(strat->
P.sig !=
NULL)
3181 memset(&(strat->
P), 0,
sizeof(strat->
P));
3216 #ifdef HAVE_TAIL_RING 3222 for(i=strat->
sl;i>=0;i--) strat->
S_2_R[
i]=-1;
3232 #if SBA_PRINT_SIZE_SYZ 3234 size_syz = strat->
syzl;
3247 #if SBA_PRINT_SIZE_G 3262 for(;k>=0 && (strat->
L[
k].p1 !=
NULL || strat->
L[
k].p2 !=
NULL);k--)
3272 for(;k>=0 && strat->
L[
k].p1 ==
NULL && strat->
L[
k].p2 ==
NULL;k--)
3275 strat->
enterS(strat->
L[k], strat->
sl+1, strat, strat->
tl);
3283 for(k=strat->
sl;k>=0;k--)
3285 printf(
"\nsig[%i] = ",
i);
pWrite(strat->
sig[k]);
3316 #if SBA_PRINT_SIZE_G 3320 printf(
"SIZE OF SHDL: %d\n",
IDELEMS(strat->
Shdl));
3324 printf(
" %d. ",oo+1);
3329 #if SBA_PRINT_ZERO_REDUCTIONS 3330 printf(
"----------------------------------------------------------\n");
3331 printf(
"ZERO REDUCTIONS: %ld\n",zeroreductions);
3334 #if SBA_PRINT_REDUCTION_STEPS 3335 printf(
"----------------------------------------------------------\n");
3336 printf(
"S-REDUCTIONS: %ld\n",sba_reduction_steps);
3338 #if SBA_PRINT_OPERATIONS 3339 printf(
"OPERATIONS: %ld\n",sba_operations);
3341 #if SBA_PRINT_REDUCTION_STEPS 3342 printf(
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n");
3343 printf(
"INTERREDUCTIONS: %ld\n",sba_interreduction_steps);
3345 #if SBA_PRINT_OPERATIONS 3346 printf(
"INTERREDUCTION OPERATIONS: %ld\n",sba_interreduction_operations);
3348 #if SBA_PRINT_REDUCTION_STEPS 3349 printf(
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n");
3350 printf(
"ALL REDUCTIONS: %ld\n",sba_reduction_steps+sba_interreduction_steps);
3351 sba_interreduction_steps = 0;
3352 sba_reduction_steps = 0;
3354 #if SBA_PRINT_OPERATIONS 3355 printf(
"ALL OPERATIONS: %ld\n",sba_operations+sba_interreduction_operations);
3356 sba_interreduction_operations = 0;
3359 #if SBA_PRINT_SIZE_G 3360 printf(
"----------------------------------------------------------\n");
3361 printf(
"SIZE OF G: %d / %d\n",size_g,size_g_non_red);
3365 #if SBA_PRINT_SIZE_SYZ 3366 printf(
"SIZE OF SYZ: %ld\n",size_syz);
3367 printf(
"----------------------------------------------------------\n");
3370 #if SBA_PRINT_PRODUCT_CRITERION 3371 printf(
"PRODUCT CRITERIA: %ld\n",product_criterion);
3372 product_criterion = 0;
3374 return (strat->
Shdl);
3427 p =
redtailBba(p,max_ind,strat,(lazyReduce & KSTD_NF_NONORM)==0);
3496 p =
redtailBbaBound(p,max_ind,strat,bound,(lazyReduce & KSTD_NF_NONORM)==0);
3552 for (i=
IDELEMS(q)-1; i>=0; i--)
3567 p =
redtailBba(p,max_ind,strat,(lazyReduce & KSTD_NF_NONORM)==0);
3627 for (i=
IDELEMS(q)-1; i>=0; i--)
3642 p =
redtailBbaBound(p,max_ind,strat,bound,(lazyReduce & KSTD_NF_NONORM)==0);
3675 int& hilbcount,
int& srmax,
int& lrmax,
int& reduc, ideal
Q,
3678 int Ll_old, red_result = 1;
3684 reduc = olddeg = lrmax = 0;
3689 while (strat->
tl >= 0)
3691 if(!strat->
T[strat->
tl].is_redundant)
3694 h.p = strat->
T[strat->
tl].p;
3695 h.tailRing = strat->
T[strat->
tl].tailRing;
3696 h.t_p = strat->
T[strat->
tl].t_p;
3736 while (strat->
Ll>Ll_old)
3738 strat->
P = strat->
L[strat->
Ll];
3742 PrintS(
"NEXT PAIR TO HANDLE IN INTERRED ALGORITHM\n");
3743 PrintS(
"-------------------------------------------------\n");
3747 printf(
"%d\n",strat->
tl);
3748 PrintS(
"-------------------------------------------------\n");
3781 else if (strat->
P.p1 ==
NULL)
3783 if (strat->
minim > 0)
3790 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
3798 &olddeg,&reduc,
strat, red_result);
3801 PrintS(
"Poly before red: ");
3805 red_result = strat->red2(&strat->P,strat);
3815 if (red_result == 1)
3818 strat->
P.GetP(strat->
lmBin);
3829 pos =
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
3833 pos =
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
3842 strat->
P.pCleardenom();
3845 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
3846 strat->
P.pCleardenom();
3853 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
3863 if (strat->
minim==1)
3870 strat->
M->m[minimcnt]=strat->
P.p2;
3874 pNext(strat->
M->m[minimcnt])
3887 strat->
enterS(strat->
P, pos, strat, strat->
tl);
3890 PrintS(
"ELEMENT ADDED TO GCURR DURING INTERRED: ");
3894 if (hilb!=
NULL)
khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat);
3897 if (strat->
P.lcm!=
NULL)
3903 if (strat->
sl>srmax) srmax = strat->
sl;
3919 memset(&(strat->
P), 0,
sizeof(strat->
P));
3923 while (cc<strat->tl+1)
3925 strat->
T[cc].sig =
pOne();
3928 strat->
sig[cc] = strat->
T[cc].sig;
3929 strat->
sevSig[cc] = strat->
T[cc].sevSig;
3930 strat->
T[cc].is_sigsafe =
TRUE;
3938 for (
int cd=strat->
Ll;
cd>=0;
cd--)
3946 printf(
"\nAfter f5c sorting\n");
3947 for(
int i=0;
i<=strat->
sl;
i++)
3953 PrintS(
"------------------- STRAT S ---------------------\n");
3955 while (cc<strat->tl+1)
3959 printf(
"- - - - - -\n");
3962 PrintS(
"-------------------------------------------------\n");
3963 PrintS(
"------------------- STRAT T ---------------------\n");
3965 while (cc<strat->tl+1)
3969 printf(
"- - - - - -\n");
3972 PrintS(
"-------------------------------------------------\n");
3973 PrintS(
"------------------- STRAT L ---------------------\n");
3975 while (cc<strat->Ll+1)
3981 printf(
"- - - - - -\n");
3984 PrintS(
"-------------------------------------------------\n");
3985 printf(
"F5C DONE\nSTRAT SL: %d -- %d\n",strat->
sl, strat->
currIdx);
3992 #ifdef HAVE_SHIFTBBA 3999 int hilbeledeg=1,hilbcount=0,minimcnt=0;
4029 #ifdef HAVE_TAIL_RING 4034 while (strat->
Ll >= 0)
4049 while ((strat->
Ll >= 0)
4050 && (strat->
L[strat->
Ll].p1!=
NULL) && (strat->
L[strat->
Ll].p2!=
NULL)
4055 if (strat->
Ll<0)
break;
4059 strat->
P = strat->
L[strat->
Ll];
4082 else if (strat->
P.p1 ==
NULL)
4084 if (strat->
minim > 0)
4094 if ( ! strat->
homog)
4096 strat->
P.GetP(strat->
lmBin);
4107 strat->
P.GetP(strat->
lmBin);
4123 strat->
P.t_p =
NULL;
4129 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
4137 &olddeg,&reduc,
strat, red_result);
4140 red_result = strat->red(&strat->P,strat);
4144 if (red_result == 1)
4150 strat->
P.GetP(strat->
lmBin);
4152 int pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
4157 strat->
P.pCleardenom();
4160 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
4161 strat->
P.pCleardenom();
4168 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
4181 if (strat->
minim==1)
4188 strat->
M->m[minimcnt]=strat->
P.p2;
4192 pNext(strat->
M->m[minimcnt])
4201 if ( ! strat->
homog)
4203 strat->
P.GetP(strat->
lmBin);
4215 strat->
P.GetP(strat->
lmBin);
4228 strat->
P.t_p =
NULL;
4230 goto red_shrink2zero;
4247 strat->
enterS(strat->
P, pos, strat, strat->
tl);
4249 if (hilb!=
NULL)
khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat);
4262 memset(&(strat->
P), 0,
sizeof(strat->
P));
4285 Ln.SetShortExpVector();
4287 if (j<0) { k++; j=-1;}
4290 if (
pLmCmp(strat->
S[k],strat->
T[j].p) == 0)
4293 if (j<0) { k++; j=-1;}
4314 #ifdef HAVE_TAIL_RING 4320 for(i=strat->
sl;i>=0;i--) strat->
S_2_R[
i]=-1;
4343 return (strat->
Shdl);
4347 ideal
freegb(ideal I,
int uptodeg,
int lVblock)
4359 WerrorS(
"The input ideal contains incorrectly encoded elements! ");
4383 if (h->IsNull())
return 0;
4391 d = h->GetpFDeg() + h->ecart;
4394 h->SetShortExpVector();
4400 h->SetDegStuffReturnLDeg(strat->
LDegLast);
4405 strat->
T[
j].pNorm();
4438 h->SetShortExpVector();
4451 h->SetDegStuffReturnLDeg(strat->
LDegLast);
4461 if (strat->
T[j].ecart <= h->ecart)
4462 h->ecart = d - h->GetpFDeg();
4464 h->ecart = d - h->GetpFDeg() + strat->
T[
j].ecart - h->ecart;
4466 d = h->GetpFDeg() + h->ecart;
4469 d = h->SetDegStuffReturnLDeg(strat->
LDegLast);
4478 && ((d >= reddeg) || (pass > strat->
LazyPass)))
4483 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
4484 if (at <= strat->Ll)
void initEcartPairBba(LObject *Lp, poly, poly, int, int)
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
int kFindNextDivisibleByInS(const kStrategy strat, int start, int max_ind, LObject *L)
BOOLEAN kbTest(kBucket_pt bucket)
Tests.
#define omRealloc0Size(addr, o_size, size)
int(* posInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
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 initSbaPos(kStrategy strat)
poly kNF2Bound(ideal F, ideal Q, poly q, int bound, kStrategy strat, int lazyReduce)
int redRing(LObject *h, kStrategy strat)
static poly normalize(poly next_p, ideal add_generators, syStrategy syzstr, int *g_l, int *p_l, int crit_comp)
void kBucketInit(kBucket_pt bucket, poly lm, int length)
static void nc_kBucketPolyRed(kBucket_pt b, poly p, number *c)
static CanonicalForm bound(const CFMatrix &M)
static poly p_LmDeleteAndNext(poly p, const ring r)
#define TEST_OPT_DEGBOUND
KINLINE poly redtailBba_Z(poly p, int pos, kStrategy strat)
void initBuchMoraPos(kStrategy strat)
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
CanonicalForm cd(bCommonDen(FF))
BOOLEAN idInsertPolyOnPos(ideal I, poly p, int pos)
insert p into I on position pos
#define idDelete(H)
delete an ideal
void messageStat(int hilbcount, kStrategy strat)
void postReduceByMonSig(LObject *h, kStrategy strat)
int posInIdealMonFirst(const ideal F, const poly p, int start, int end)
Compatiblity layer for legacy polynomial operations (over currRing)
number kBucketPolyRed(kBucket_pt bucket, poly p1, int l1, poly spNoether)
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
void initBuchMora(ideal F, ideal Q, kStrategy strat)
static poly p_Mult_mm(poly p, poly m, const ring r)
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
#define pLmCmp(p, q)
returns 0|1|-1 if p=q|p>q|p<q w.r.t monomial ordering
int ideal_isInV(ideal I, int lV)
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
BEGIN_NAMESPACE_SINGULARXX const ring const ring tailRing
BOOLEAN posInLDependsOnLength
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_Z(const coeffs r)
BOOLEAN(* rewCrit2)(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
const poly kBucketGetLm(kBucket_pt bucket)
void initSba(ideal F, kStrategy strat)
BOOLEAN sbaCheckGcdPair(LObject *h, kStrategy strat)
void initSyzRules(kStrategy strat)
void enterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
poly redNFBound(poly h, int &max_ind, int nonorm, kStrategy strat, int bound)
#define pLmDelete(p)
assume p != NULL, deletes Lm(p)->coef and Lm(p)
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
int ksReducePoly(LObject *PR, TObject *PW, poly spNoether, number *coef, kStrategy strat)
void deleteInS(int i, kStrategy strat)
pShallowCopyDeleteProc p_shallow_copy_delete
void(* initEcartPair)(LObject *h, poly f, poly g, int ecartF, int ecartG)
ring sbaRing(kStrategy strat, const ring r, BOOLEAN, int)
void cancelunit(LObject *L, BOOLEAN inNF)
void WerrorS(const char *s)
void initSbaBuchMora(ideal F, ideal Q, kStrategy strat)
static intvec * idSort(ideal id, BOOLEAN nolex=TRUE)
void initBba(kStrategy strat)
void enterL(LSet *set, int *length, int *LSetmax, LObject p, int at)
int redSig(LObject *h, kStrategy strat)
ideal bba(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
ideal sba(ideal F0, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
void enterpairsShift(poly h, int k, int ecart, int pos, kStrategy strat, int atR, int uptodeg, int lV)
int(* red)(LObject *L, kStrategy strat)
void initBuchMoraPosRing(kStrategy strat)
int redHomog(LObject *h, kStrategy strat)
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize)
int(* posInT)(const TSet T, const int tl, LObject &h)
void enterpairsSig(poly h, poly hSig, int hFrom, int k, int ecart, int pos, kStrategy strat, int atR)
#define pGetComp(p)
Component.
static void p_SetExpV(poly p, int *ev, const ring r)
int ksReducePolySig(LObject *PR, TObject *PW, long, poly spNoether, number *coef, kStrategy strat)
int redFirstShift(LObject *h, kStrategy strat)
static poly p_Copy(poly p, const ring r)
returns a copy of p
poly redNF(poly h, int &max_ind, int nonorm, kStrategy strat)
char completeReduce_retry
void kStratInitChangeTailRing(kStrategy strat)
#define TEST_OPT_NOT_BUCKETS
void enterT(LObject &p, kStrategy strat, int atT)
int redHoney(LObject *h, kStrategy strat)
void deleteInL(LSet set, int *length, int j, kStrategy strat)
void updateSShift(kStrategy strat, int uptodeg, int lV)
ideal kStdShift(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, int uptodeg, int lV)
poly p_Shrink(poly p, int lV, const ring r)
KINLINE poly redtailBbaBound(poly p, int pos, kStrategy strat, int bound, BOOLEAN normalize)
void(* initEcart)(TObject *L)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
int redLazy(LObject *h, kStrategy strat)
int posInSMonFirst(const kStrategy strat, const int length, const poly p, const int ecart_p)
void initS(ideal F, ideal Q, kStrategy strat)
poly kNF2(ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce)
void enterTShift(LObject p, kStrategy strat, int atT, int uptodeg, int lV)
int posInLF5CRing(const LSet set, int start, const int length, LObject *p, const kStrategy strat)
void kBucketDestroy(kBucket_pt *bucket_pt)
void initEcartPairMora(LObject *Lp, poly, poly, int ecartF, int ecartG)
#define TEST_OPT_INTSTRATEGY
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent : the integer VarOffset encodes:
void initHilbCrit(ideal, ideal, intvec **hilb, kStrategy strat)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
void initEcartBBA(TObject *h)
void messageStatSBA(int hilbcount, kStrategy strat)
#define pGetShortExpVector(a)
returns the "Short Exponent Vector" – used to speed up divisibility tests (see polys-impl.cc )
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:...
void(* enterS)(LObject &h, int pos, kStrategy strat, int atR)
static BOOLEAN p_LmShortDivisibleBy(poly a, unsigned long sev_a, poly b, unsigned long not_sev_b, const ring r)
ideal kInterRed(ideal F, ideal Q)
void ksCreateSpoly(LObject *Pair, poly spNoether, int use_buckets, ring tailRing, poly m1, poly m2, TObject **R)
int kFindDivisibleByInS(const kStrategy strat, int *max_ind, LObject *L)
return -1 if no divisor is found number of first divisor in S, otherwise
ideal idrMoveR(ideal &id, ring src_r, ring dest_r)
static int p_LmCmp(poly p, poly q, const ring r)
BOOLEAN kStratChangeTailRing(kStrategy strat, LObject *L, TObject *T, unsigned long expbound)
void initBuchMoraCrit(kStrategy strat)
static int si_max(const int a, const int b)
void exitSba(kStrategy strat)
void PrintS(const char *s)
void deleteHC(LObject *L, kStrategy strat, BOOLEAN fromNext)
void superenterpairsSig(poly h, poly hSig, int hFrom, int k, int ecart, int pos, kStrategy strat, int atR)
int redSigRing(LObject *h, kStrategy strat)
static void p_ExpVectorAdd(poly p1, poly p2, const ring r)
void f5c(kStrategy strat, int &olddeg, int &minimcnt, int &hilbeledeg, int &hilbcount, int &srmax, int &lrmax, int &reduc, ideal Q, intvec *w, intvec *hilb)
void rWrite(ring r, BOOLEAN details)
static unsigned pLength(poly a)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL ...
static BOOLEAN p_LmDivisibleBy(poly a, poly b, const ring r)
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
ideal freegb(ideal I, int uptodeg, int lVblock)
void initBuchMoraShift(ideal F, ideal Q, kStrategy strat)
poly kFindZeroPoly(poly input_p, ring leadRing, ring tailRing)
void rChangeCurrRing(ring r)
BOOLEAN kCheckSpolyCreation(LObject *L, kStrategy strat, poly &m1, poly &m2)
#define REDTAIL_CANONICALIZE
static void p_Delete(poly *p, const ring r)
void initBbaShift(kStrategy strat)
void khCheck(ideal Q, intvec *w, intvec *hilb, int &eledeg, int &count, kStrategy strat)
unsigned long p_GetShortExpVector(const poly p, const ring r)
ideal idInit(int idsize, int rank)
initialise an ideal / module
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent : VarOffset encodes the position in p->exp
void postReduceByMon(LObject *h, kStrategy strat)
used for GB over ZZ: intermediate reduction by monomial elements background: any known constant eleme...
static BOOLEAN rField_is_Ring(const ring r)
void cleanT(kStrategy strat)
#define SBA_INTERRED_START
void pEnlargeSet(poly **p, int l, int increment)
void superenterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
void rDelete(ring r)
unconditionally deletes fields in r
long ind_fact_2(long arg)
int posInSyz(const kStrategy strat, poly sig)
void pNorm(poly p, const ring R=currRing)
void initSbaCrit(kStrategy strat)
int posInS(const kStrategy strat, const int length, const poly p, const int ecart_p)
#define pGetExpV(p, e)
Gets a copy of (resp. set) the exponent vector, where e is assumed to point to (r->N +1)*sizeof(long)...
ideal bbaShift(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat, int uptodeg, int lV)
void completeReduce(kStrategy strat, BOOLEAN withT)
static void p_Setm(poly p, const ring r)
void updateResult(ideal r, ideal Q, kStrategy strat)
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced ...
KINLINE void clearS(poly p, unsigned long p_sev, int *at, int *k, kStrategy strat)
int(* test_PosInT)(const TSet T, const int tl, LObject &h)
void sort(CFArray &A, int l=0)
quick sort A
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
void p_Write(poly p, ring lmRing, ring tailRing)
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
KINLINE int ksReducePolyTailSig(LObject *PR, TObject *PW, LObject *Red, kStrategy strat)
int(* test_PosInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
void initEcartNormal(TObject *h)
static poly p_Add_q(poly p, poly q, const ring r)
#define TEST_OPT_REDTHROUGH
void finalReduceByMon(kStrategy strat)
used for GB over ZZ: final reduction by constant elements background: any known constant element of i...
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets.
poly redtailSba(LObject *L, int pos, kStrategy strat, BOOLEAN withT, BOOLEAN normalize)
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
KINLINE poly kNoetherTail()
#define SI_RESTORE_OPT1(A)
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
static poly p_Mult_q(poly p, poly q, const ring r)
void exitBuchMora(kStrategy strat)
void Werror(const char *fmt,...)
void kDebugPrint(kStrategy strat)
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int int lazyReduce
void enterSyz(LObject &p, kStrategy strat, int atT)
ideal idrMoveR_NoSort(ideal &id, ring src_r, ring dest_r)
void enterSBba(LObject &p, int atS, kStrategy strat, int atR)
#define pCopy(p)
return a copy of the poly
int ksReducePolySigRing(LObject *PR, TObject *PW, long, poly spNoether, number *coef, kStrategy strat)