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();
470 if (h->GetLmTailRing() ==
NULL)
483 if (h->GetLmTailRing() ==
NULL)
492 h->SetShortExpVector();
497 (strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
502 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
515 if (d >= (
long)strat->
tailRing->bitmask)
517 if (h->pTotalDeg() >= (long)strat->
tailRing->bitmask)
522 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
544 if (strat->
tl<0)
return 1;
546 assume(h->FDeg == h->pFDeg());
550 unsigned long not_sev;
555 h->SetShortExpVector();
557 h_p = h->GetLmTailRing();
564 li = strat->
T[
j].pLength;
581 if ((strat->
T[i].pLength < li)
589 li = strat->
T[
i].pLength;
610 #if SBA_PRINT_REDUCTION_STEPS 611 sba_interreduction_steps++;
613 #if SBA_PRINT_OPERATIONS 614 sba_interreduction_operations +=
pLength(strat->
T[ii].p);
626 h_p = h->GetLmTailRing();
635 h->SetShortExpVector();
647 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
656 Print(
" lazy: -> L%d\n",at);
669 assume(PR->GetLmCurrRing() != PW->GetLmCurrRing());
671 Red->HeadNormalize();
705 if (strat->
tl<0)
return 1;
708 assume(h->FDeg == h->pFDeg());
711 PrintS(
"------- IN REDSIG -------\n");
718 PrintS(
"---------------------------\n");
724 unsigned long not_sev;
729 h->SetShortExpVector();
731 h_p = h->GetLmTailRing();
741 li = strat->
T[
j].pLength;
758 if ((strat->
T[i].pLength < li)
766 li = strat->
T[
i].pLength;
788 Print(
"BEFORE REDUCTION WITH %d:\n",ii);
789 PrintS(
"--------------------------------\n");
792 pWrite(h->GetLmCurrRing());
796 PrintS(
"--------------------------------\n");
797 printf(
"INDEX OF REDUCER T: %d\n",ii);
800 #if SBA_PRINT_REDUCTION_STEPS 802 sba_reduction_steps++;
804 #if SBA_PRINT_OPERATIONS 806 sba_operations +=
pLength(strat->
T[ii].p);
813 Print(
"SigSAFE: %d\n",sigSafe);
828 h_p = h->GetLmTailRing();
837 h->SetShortExpVector();
849 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
860 Print(
" lazy: -> L%d\n",at);
879 printf(
"\nBefore sbaCheckGcdPair ");
pWrite(h->p);
884 printf(
"\nIntermidiate sbaCheckGcdPair ");
pWrite(h->p);
889 printf(
"\nAfter sbaCheckGcdPair ");
pWrite(h->p);
893 beforeredsig =
pCopy(h->sig);
895 if (strat->
tl<0)
return 1;
898 assume(h->FDeg == h->pFDeg());
900 printf(
"\n--------------------------redSig-------------------------------------\n");
901 printf(
"\nBefore redSig:\n");
906 Print(
"------- IN REDSIG -------\n");
913 Print(
"---------------------------\n");
919 unsigned long not_sev;
924 h->SetShortExpVector();
926 h_p = h->GetLmTailRing();
935 printf(
"\nBefore sbaCheckGcdPair ");
pWrite(h->p);
940 printf(
"\nIntermidiate sbaCheckGcdPair ");
pWrite(h->p);
943 h->is_redundant =
FALSE;
947 printf(
"\nAfter sbaCheckGcdPair ");
pWrite(h->p);
960 if (h->GetLmTailRing() ==
NULL)
967 if(
pLtCmp(beforeredsig,h->sig) == 1)
970 printf(
"\nSigDrop after reduce\n");
pWrite(beforeredsig);
pWrite(h->sig);
974 int red_result =
redRing(h,strat);
979 printf(
"\nReduced to 0 via redRing. Cancel sigdrop\n");
988 printf(
"\nReduced to this via redRing.SIGDROP\n");
pWrite(h->p);
999 li = strat->
T[
j].pLength;
1015 if ((strat->
T[i].pLength < li)
1023 li = strat->
T[
i].pLength;
1045 Print(
"BEFORE REDUCTION WITH %d:\n",ii);
1046 Print(
"--------------------------------\n");
1049 pWrite(h->GetLmCurrRing());
1053 Print(
"--------------------------------\n");
1054 printf(
"INDEX OF REDUCER T: %d\n",ii);
1061 printf(
"\nAfter small reduction:\n");
pWrite(h->p);
pWrite(h->sig);
1074 printf(
"\nReducer and Original have same LT. Force it with redRing!\n");
1076 int red_result =
redRing(h,strat);
1080 printf(
"\nRedRing reduced it to 0. Perfect\n");
1088 printf(
"\nRedRing reduced it to *.\nHave to sigdrop now\n");
pWrite(h->p);
1097 #if SBA_PRINT_REDUCTION_STEPS 1099 sba_reduction_steps++;
1101 #if SBA_PRINT_OPERATIONS 1103 sba_operations +=
pLength(strat->
T[ii].p);
1110 Print(
"SigSAFE: %d\n",sigSafe);
1125 h_p = h->GetLmTailRing();
1134 h->SetShortExpVector();
1146 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
1147 if (at <= strat->Ll)
1149 int dummy=strat->
sl;
1157 Print(
" lazy: -> L%d\n",at);
1170 #define REDTAIL_CANONICALIZE 100 1174 p = h = L->GetLmTailRing();
1176 return L->GetLmCurrRing();
1184 Ln.sevSig = L->sevSig;
1185 Ln.pLength = L->GetpLength() - 1;
1200 Ln.SetShortExpVector();
1206 With = &(strat->
T[
j]);
1211 if (With ==
NULL)
break;
1242 #if SBA_PRINT_REDUCTION_STEPS 1244 sba_reduction_steps++;
1246 #if SBA_PRINT_OPERATIONS 1248 sba_operations +=
pLength(With->p);
1258 pNext(h) = Ln.LmExtractAndIter();
1261 }
while (!Ln.IsNull());
1264 if (Ln.IsNull())
goto all_done;
1265 if (! withT) With_s.Init(
currRing);
1272 pNext(h) = Ln.LmExtractAndIter();
1289 return L->GetLmCurrRing();
1298 if (strat->
tl<0)
return 1;
1302 assume(h->pFDeg() == h->FDeg);
1303 long reddeg = h->GetpFDeg();
1305 unsigned long not_sev;
1307 h->SetShortExpVector();
1308 poly h_p = h->GetLmTailRing();
1313 if (j < 0)
return 1;
1315 li = strat->
T[
j].pLength;
1319 li=strat->
T[
j].pLength=
pLength(strat->
T[j].p);
1340 if (strat->
T[i].pLength==0)
1346 if ((strat->
T[i].pLength < li)
1355 li = strat->
T[
i].pLength;
1377 #if SBA_PRINT_REDUCTION_STEPS 1378 sba_interreduction_steps++;
1380 #if SBA_PRINT_OPERATIONS 1381 sba_interreduction_operations +=
pLength(strat->
T[ii].p);
1393 h_p=h->GetLmTailRing();
1403 h->SetShortExpVector();
1409 (strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
1412 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
1413 if (at <= strat->Ll)
1416 int dummy=strat->
sl;
1428 else if (d != reddeg)
1430 if (d>=(
long)strat->
tailRing->bitmask)
1432 if (h->pTotalDeg() >= (long)strat->
tailRing->bitmask)
1437 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
1458 if (strat->
tl<0)
return 1;
1460 assume(h->FDeg == h->pFDeg());
1462 int i,
j,at,pass,ei, ii, h_d;
1463 unsigned long not_sev;
1467 d = reddeg = h->GetpFDeg() + h->ecart;
1468 h->SetShortExpVector();
1470 h_p = h->GetLmTailRing();
1477 if (j < 0)
return 1;
1479 ei = strat->
T[
j].ecart;
1480 li = strat->
T[
j].pLength;
1498 if ((((strat->
T[i].ecart < ei) && (ei> h->ecart))
1499 || ((strat->
T[i].ecart <= h->ecart) && (strat->
T[i].pLength < li)))
1507 ei = strat->
T[
i].ecart;
1508 li = strat->
T[
i].pLength;
1527 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
1545 Print(
"\nwith T[%d]:",ii);
1553 #if SBA_PRINT_REDUCTION_STEPS 1554 sba_interreduction_steps++;
1556 #if SBA_PRINT_OPERATIONS 1557 sba_interreduction_operations +=
pLength(strat->
T[ii].p);
1586 else if (h->t_p!=
NULL)
1595 h->SetShortExpVector();
1597 h_d = h->SetpFDeg();
1602 h->ecart = d-h_d+ei-h->ecart;
1616 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
1617 if (at <= strat->Ll)
1619 int dummy=strat->
sl;
1625 Print(
" degree jumped: -> L%d\n",at);
1631 else if (d > reddeg)
1633 if (d>=(
long)strat->
tailRing->bitmask)
1635 if (h->pTotalDeg()+h->ecart >= (long)strat->
tailRing->bitmask)
1640 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
1662 #define REDNF_CANONICALIZE 60 1673 P.SetShortExpVector();
1701 int sl=
pSize(strat->
S[j]);
1779 P.SetShortExpVector();
1828 P.SetShortExpVector();
1856 int sl=
pSize(strat->
S[j]);
1905 P.p =
pJet(P.p,bound);
1909 P.SetShortExpVector();
1937 P.SetShortExpVector();
1976 int hilbeledeg=1,hilbcount=0,minimcnt=0;
1999 withT = ! strat->
homog;
2004 #ifdef HAVE_TAIL_RING 2020 while (strat->
Ll >= 0)
2023 printf(
"\n ------------------------NEW LOOP\n");
2024 printf(
"\nShdl = \n");
2028 for(
int ii = 0; ii<=strat->
sl;ii++)
2031 printf(
"\n list L\n");
2034 for(iii = 0; iii<= strat->
Ll; iii++)
2036 printf(
"L[%i]:",iii);
2043 printf(
"L[%i]:",strat->
Ll);
2050 for(iii = 0; iii<= strat->
Bl; iii++)
2052 printf(
"B[%i]:",iii);
2073 while ((strat->
Ll >= 0)
2074 && (strat->
L[strat->
Ll].p1!=
NULL) && (strat->
L[strat->
Ll].p2!=
NULL)
2079 if (strat->
Ll<0)
break;
2083 strat->
P = strat->
L[strat->
Ll];
2113 else if (strat->
P.p1 ==
NULL)
2115 if (strat->
minim > 0)
2121 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
2129 &olddeg,&reduc,
strat, red_result);
2132 red_result = strat->red(&strat->P,strat);
2142 if (red_result == 1)
2145 strat->
P.GetP(strat->
lmBin);
2154 int pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
2161 strat->
P.pCleardenom();
2165 strat->
P.pCleardenom();
2172 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
2182 if (strat->
minim==1)
2189 strat->
M->m[minimcnt]=strat->
P.p2;
2193 pNext(strat->
M->m[minimcnt])
2209 strat->
enterS(strat->
P, pos, strat, strat->
tl);
2211 printf(
"\nThis element has been added to S:\n");
pWrite(strat->
P.p);
pWrite(strat->
P.p1);
pWrite(strat->
P.p2);
2227 if (hilb!=
NULL)
khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat);
2229 if (strat->
P.lcm!=
NULL)
2240 if (strat->
s_poly(strat))
2245 int pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
2251 strat->
enterS(strat->
P, pos, strat, strat->
tl);
2255 else if (strat->
P.p1 ==
NULL && strat->
minim > 0)
2261 memset(&(strat->
P), 0,
sizeof(strat->
P));
2297 #ifdef HAVE_TAIL_RING 2303 for(i=strat->
sl;i>=0;i--) strat->
S_2_R[
i]=-1;
2316 for(
int i = 0;
i<=strat->
sl;
i++)
2324 for(
int i = 0;
i<=strat->
sl;
i++)
2352 return (strat->
Shdl);
2364 #if SBA_PRINT_ZERO_REDUCTIONS 2365 long zeroreductions = 0;
2367 #if SBA_PRINT_PRODUCT_CRITERION 2368 long product_criterion = 0;
2370 #if SBA_PRINT_SIZE_G 2372 int size_g_non_red = 0;
2374 #if SBA_PRINT_SIZE_SYZ 2378 #if SBA_PRINT_REDUCTION_STEPS 2379 sba_reduction_steps = 0;
2380 sba_interreduction_steps = 0;
2382 #if SBA_PRINT_OPERATIONS 2384 sba_interreduction_operations = 0;
2388 ring sRing, currRingOld;
2393 if (sRing!=currRingOld)
2412 dummy =
pCopy(F->m[0]);
2414 F->m[
i] = F->m[
i+1];
2435 dummy =
pCopy(F->m[0]);
2437 F->m[
i] = F->m[
i+1];
2456 F->m[
i] = F1->m[(*sort)[
i]-1];
2470 F->m[
j] = F->m[
j-1];
2488 printf(
"SBA COMPUTATIONS DONE IN THE FOLLOWING RING:\n");
2490 printf(
"ordSgn = %d\n",
currRing->OrdSgn);
2493 int srmax,lrmax, red_result = 1;
2495 int hilbeledeg=1,hilbcount=0,minimcnt=0;
2509 reduc = olddeg = lrmax = 0;
2522 #ifdef HAVE_TAIL_RING 2540 strat->
enterS(strat->
L[strat->
Ll-(
i)], strat->
sl+1, strat, strat->
tl);
2550 while (strat->
Ll >= 0)
2553 printf(
"\n ------------------------NEW LOOP\n");
2554 printf(
"\nShdl = \n");
2558 for(
int ii = 0; ii<=strat->
sl;ii++)
2565 for(
int iii = 0; iii< strat->
syzl; iii++)
2567 printf(
"\nsyz[%i]:\n",iii);
2572 for(
int iii = 0; iii<= strat->
tl; iii++)
2574 printf(
"\nT[%i]:\n",iii);
2578 printf(
"\n list L\n");
2581 for(iii = 0; iii<= strat->
Ll; iii++)
2583 printf(
"\nL[%i]:\n",iii);
2591 printf(
"L[%i]:",strat->
Ll);
2600 if (strat->
Ll > lrmax) lrmax =strat->
Ll;
2630 f5c ( strat, olddeg, minimcnt, hilbeledeg, hilbcount, srmax,
2631 lrmax, reduc, Q, w, hilb );
2641 strat->
P = strat->
L[strat->
Ll];
2648 printf(
"\n-------------------------\nThis is the current element P\n");
2655 if (!strat->
rewCrit2(strat->
P.sig, ~strat->
P.sevSig, strat->
P.GetLmCurrRing(),
strat, strat->
P.checked+1)) {
2658 PrintS(
"SIG OF NEXT PAIR TO HANDLE IN SIG-BASED ALGORITHM\n");
2659 PrintS(
"-------------------------------------------------\n");
2664 PrintS(
"-------------------------------------------------\n");
2699 else if (strat->
P.p1 ==
NULL)
2701 if (strat->
minim > 0)
2707 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
2715 PrintS(
"Poly before red: ");
2719 #if SBA_PRODUCT_CRITERION 2720 if (strat->
P.prod_crit) {
2721 #if SBA_PRINT_PRODUCT_CRITERION 2722 product_criterion++;
2724 int pos =
posInSyz(strat, strat->
P.sig);
2726 if (strat->
P.lcm!=
NULL)
2730 red_result = strat->
red(&strat->
P,strat);
2733 red_result = strat->
red(&strat->
P,strat);
2747 strat->
P.p =
pNeg(strat->
P.p);
2748 strat->
P.sig =
pNeg(strat->
P.sig);
2751 if(strat->
P.sig !=
NULL)
2753 if(strat->
P.p !=
NULL)
2757 printf(
"\nAfter reduce (redresult=%i): \n",red_result);
pWrite(strat->
P.p);
pWrite(strat->
P.sig);
2764 printf(
"\nSigdrop in the reduce. Trying redring\n");
2766 red_result =
redRing(&strat->
P,strat);
2770 printf(
"\nSigdrop cancelled since redRing reduced to 0\n");
2774 strat->
P.sig =
NULL;
2779 printf(
"\nStill Sigdrop - redRing reduced to:\n");
pWrite(strat->
P.p);
2781 strat->
enterS(strat->
P, 0, strat, strat->
tl);
2790 printf(
"\nToo many blocked reductions\n");
2800 if (red_result != 0) {
2801 PrintS(
"Poly after red: ");
2803 pWrite(strat->
P.GetLmCurrRing());
2805 printf(
"%d\n",red_result);
2810 if(strat->
P.p !=
NULL)
2812 &olddeg,&reduc,
strat, red_result);
2814 message((strat->honey ? strat->P.ecart : 0),
2815 &olddeg,&reduc,strat, red_result);
2823 if (red_result == 1)
2826 strat->
P.GetP(strat->
lmBin);
2830 (strat->
P).FDeg = (strat->
P).pFDeg();
2842 int pos = strat->
sl+1;
2850 beforetailred =
pCopy(strat->
P.sig);
2856 strat->
P.p =
redtailSba(&(strat->
P),pos-1,strat, withT);
2863 strat->
P.pCleardenom();
2866 strat->
P.p =
redtailSba(&(strat->
P),pos-1,strat, withT);
2867 strat->
P.pCleardenom();
2874 strat->
P.p =
redtailSba(&(strat->
P),pos-1,strat, withT);
2884 printf(
"\n Still sigdrop after redtailSba - it reduced to \n");
pWrite(strat->
P.p);
2886 strat->
enterS(strat->
P, 0, strat, strat->
tl);
2892 if(strat->
P.sig ==
NULL ||
pLtCmp(beforetailred,strat->
P.sig) == 1)
2895 printf(
"\nSigDrop after TAILred\n");
pWrite(beforetailred);
pWrite(strat->
P.sig);
2899 red_result =
redRing(&strat->
P,strat);
2904 printf(
"\nReduced to 0 via redRing. Cancel sigdrop\n");
2912 printf(
"\nReduced to this via redRing.SIGDROP\n");
pWrite(strat->
P.p);
2914 strat->
enterS(strat->
P, 0, strat, strat->
tl);
2920 if(strat->
P.p ==
NULL)
2921 goto case_when_red_result_changed;
2924 printf(
"\nNach redTailSba: \n");
2931 for (
int jj = 0; jj<strat->
tl+1; jj++)
2935 strat->
T[jj].is_sigsafe =
FALSE;
2941 for (
int jj = 0; jj<strat->
tl+1; jj++)
2943 strat->
T[jj].is_sigsafe =
FALSE;
2953 if (strat->
minim==1)
2960 strat->
M->m[minimcnt]=strat->
P.p2;
2964 pNext(strat->
M->m[minimcnt])
2974 strat->
T[strat->
tl].is_sigsafe =
FALSE;
2985 printf(
"\nThis element is added to S\n");
2993 strat->
enterS(strat->
P, pos, strat, strat->
tl);
2997 for (
int tk=0; tk<strat->
sl+1; tk++)
3018 for(
int ps=0;ps<strat->
sl+1;ps++)
3026 (strat->
syzmax)*
sizeof(
unsigned long),
3028 *
sizeof(
unsigned long));
3031 Q.sig =
pCopy(strat->
P.sig);
3069 for (
int i=0;
i<strat->
sl; ++
i) {
3083 for (
int i=cmp+1;
i<=max_cmp; ++
i) {
3085 for (
int j=0;
j<strat->
sl; ++
j) {
3116 printf(
"---------------------------\n");
3117 Print(
" %d. ELEMENT ADDED TO GCURR:\n",strat->
sl+1);
3140 if (hilb!=
NULL)
khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat);
3142 if (strat->
P.lcm!=
NULL)
3148 if (strat->
sl>srmax) srmax = strat->
sl;
3152 case_when_red_result_changed:
3158 if (red_result!=2) {
3159 #if SBA_PRINT_ZERO_REDUCTIONS 3168 int pos =
posInSyz(strat, strat->
P.sig);
3172 Print(
"ADDING STUFF TO SYZ : ");
3185 memset(&(strat->
P), 0,
sizeof(strat->
P));
3191 printf(
"\nSigDrop!\n");
3193 printf(
"\nEnded with no SigDrop\n");
3199 if(strat->
P.sig !=
NULL)
3203 memset(&(strat->
P), 0,
sizeof(strat->
P));
3238 #ifdef HAVE_TAIL_RING 3244 for(i=strat->
sl;i>=0;i--) strat->
S_2_R[
i]=-1;
3254 #if SBA_PRINT_SIZE_SYZ 3256 size_syz = strat->
syzl;
3269 #if SBA_PRINT_SIZE_G 3284 for(;k>=0 && (strat->
L[
k].p1 !=
NULL || strat->
L[
k].p2 !=
NULL);k--)
3294 for(;k>=0 && strat->
L[
k].p1 ==
NULL && strat->
L[
k].p2 ==
NULL;k--)
3297 strat->
enterS(strat->
L[k], strat->
sl+1, strat, strat->
tl);
3305 for(k=strat->
sl;k>=0;k--)
3307 printf(
"\nsig[%i] = ",
i);
pWrite(strat->
sig[k]);
3338 #if SBA_PRINT_SIZE_G 3342 printf(
"SIZE OF SHDL: %d\n",
IDELEMS(strat->
Shdl));
3346 printf(
" %d. ",oo+1);
3351 #if SBA_PRINT_ZERO_REDUCTIONS 3352 printf(
"----------------------------------------------------------\n");
3353 printf(
"ZERO REDUCTIONS: %ld\n",zeroreductions);
3356 #if SBA_PRINT_REDUCTION_STEPS 3357 printf(
"----------------------------------------------------------\n");
3358 printf(
"S-REDUCTIONS: %ld\n",sba_reduction_steps);
3360 #if SBA_PRINT_OPERATIONS 3361 printf(
"OPERATIONS: %ld\n",sba_operations);
3363 #if SBA_PRINT_REDUCTION_STEPS 3364 printf(
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n");
3365 printf(
"INTERREDUCTIONS: %ld\n",sba_interreduction_steps);
3367 #if SBA_PRINT_OPERATIONS 3368 printf(
"INTERREDUCTION OPERATIONS: %ld\n",sba_interreduction_operations);
3370 #if SBA_PRINT_REDUCTION_STEPS 3371 printf(
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n");
3372 printf(
"ALL REDUCTIONS: %ld\n",sba_reduction_steps+sba_interreduction_steps);
3373 sba_interreduction_steps = 0;
3374 sba_reduction_steps = 0;
3376 #if SBA_PRINT_OPERATIONS 3377 printf(
"ALL OPERATIONS: %ld\n",sba_operations+sba_interreduction_operations);
3378 sba_interreduction_operations = 0;
3381 #if SBA_PRINT_SIZE_G 3382 printf(
"----------------------------------------------------------\n");
3383 printf(
"SIZE OF G: %d / %d\n",size_g,size_g_non_red);
3387 #if SBA_PRINT_SIZE_SYZ 3388 printf(
"SIZE OF SYZ: %ld\n",size_syz);
3389 printf(
"----------------------------------------------------------\n");
3392 #if SBA_PRINT_PRODUCT_CRITERION 3393 printf(
"PRODUCT CRITERIA: %ld\n",product_criterion);
3394 product_criterion = 0;
3396 return (strat->
Shdl);
3449 p =
redtailBba(p,max_ind,strat,(lazyReduce & KSTD_NF_NONORM)==0);
3518 p =
redtailBbaBound(p,max_ind,strat,bound,(lazyReduce & KSTD_NF_NONORM)==0);
3574 for (i=
IDELEMS(q)-1; i>=0; i--)
3589 p =
redtailBba(p,max_ind,strat,(lazyReduce & KSTD_NF_NONORM)==0);
3649 for (i=
IDELEMS(q)-1; i>=0; i--)
3664 p =
redtailBbaBound(p,max_ind,strat,bound,(lazyReduce & KSTD_NF_NONORM)==0);
3697 int& hilbcount,
int& srmax,
int& lrmax,
int& reduc, ideal
Q,
3700 int Ll_old, red_result = 1;
3706 reduc = olddeg = lrmax = 0;
3711 while (strat->
tl >= 0)
3713 if(!strat->
T[strat->
tl].is_redundant)
3716 h.p = strat->
T[strat->
tl].p;
3717 h.tailRing = strat->
T[strat->
tl].tailRing;
3718 h.t_p = strat->
T[strat->
tl].t_p;
3758 while (strat->
Ll>Ll_old)
3760 strat->
P = strat->
L[strat->
Ll];
3764 PrintS(
"NEXT PAIR TO HANDLE IN INTERRED ALGORITHM\n");
3765 PrintS(
"-------------------------------------------------\n");
3769 printf(
"%d\n",strat->
tl);
3770 PrintS(
"-------------------------------------------------\n");
3803 else if (strat->
P.p1 ==
NULL)
3805 if (strat->
minim > 0)
3812 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
3820 &olddeg,&reduc,
strat, red_result);
3823 PrintS(
"Poly before red: ");
3827 red_result = strat->red2(&strat->P,strat);
3837 if (red_result == 1)
3840 strat->
P.GetP(strat->
lmBin);
3851 pos =
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
3855 pos =
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
3864 strat->
P.pCleardenom();
3867 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
3868 strat->
P.pCleardenom();
3875 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
3885 if (strat->
minim==1)
3892 strat->
M->m[minimcnt]=strat->
P.p2;
3896 pNext(strat->
M->m[minimcnt])
3909 strat->
enterS(strat->
P, pos, strat, strat->
tl);
3912 PrintS(
"ELEMENT ADDED TO GCURR DURING INTERRED: ");
3916 if (hilb!=
NULL)
khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat);
3919 if (strat->
P.lcm!=
NULL)
3925 if (strat->
sl>srmax) srmax = strat->
sl;
3941 memset(&(strat->
P), 0,
sizeof(strat->
P));
3945 while (cc<strat->tl+1)
3947 strat->
T[cc].sig =
pOne();
3950 strat->
sig[cc] = strat->
T[cc].sig;
3951 strat->
sevSig[cc] = strat->
T[cc].sevSig;
3952 strat->
T[cc].is_sigsafe =
TRUE;
3960 for (
int cd=strat->
Ll;
cd>=0;
cd--)
3968 printf(
"\nAfter f5c sorting\n");
3969 for(
int i=0;
i<=strat->
sl;
i++)
3975 PrintS(
"------------------- STRAT S ---------------------\n");
3977 while (cc<strat->tl+1)
3981 printf(
"- - - - - -\n");
3984 PrintS(
"-------------------------------------------------\n");
3985 PrintS(
"------------------- STRAT T ---------------------\n");
3987 while (cc<strat->tl+1)
3991 printf(
"- - - - - -\n");
3994 PrintS(
"-------------------------------------------------\n");
3995 PrintS(
"------------------- STRAT L ---------------------\n");
3997 while (cc<strat->Ll+1)
4003 printf(
"- - - - - -\n");
4006 PrintS(
"-------------------------------------------------\n");
4007 printf(
"F5C DONE\nSTRAT SL: %d -- %d\n",strat->
sl, strat->
currIdx);
4014 #ifdef HAVE_SHIFTBBA 4021 int hilbeledeg=1,hilbcount=0,minimcnt=0;
4051 #ifdef HAVE_TAIL_RING 4056 while (strat->
Ll >= 0)
4071 while ((strat->
Ll >= 0)
4072 && (strat->
L[strat->
Ll].p1!=
NULL) && (strat->
L[strat->
Ll].p2!=
NULL)
4077 if (strat->
Ll<0)
break;
4081 strat->
P = strat->
L[strat->
Ll];
4104 else if (strat->
P.p1 ==
NULL)
4106 if (strat->
minim > 0)
4116 if ( ! strat->
homog)
4118 strat->
P.GetP(strat->
lmBin);
4129 strat->
P.GetP(strat->
lmBin);
4145 strat->
P.t_p =
NULL;
4151 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
4159 &olddeg,&reduc,
strat, red_result);
4162 red_result = strat->red(&strat->P,strat);
4166 if (red_result == 1)
4172 strat->
P.GetP(strat->
lmBin);
4174 int pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
4179 strat->
P.pCleardenom();
4182 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
4183 strat->
P.pCleardenom();
4190 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
4203 if (strat->
minim==1)
4210 strat->
M->m[minimcnt]=strat->
P.p2;
4214 pNext(strat->
M->m[minimcnt])
4223 if ( ! strat->
homog)
4225 strat->
P.GetP(strat->
lmBin);
4237 strat->
P.GetP(strat->
lmBin);
4250 strat->
P.t_p =
NULL;
4252 goto red_shrink2zero;
4265 int atR=strat->
tl+1;
4271 strat->
enterS(strat->
P, pos, strat, atR);
4273 if (hilb!=
NULL)
khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat);
4286 memset(&(strat->
P), 0,
sizeof(strat->
P));
4309 Ln.SetShortExpVector();
4311 if (j<0) { k++; j=-1;}
4314 if (
pLmCmp(strat->
S[k],strat->
T[j].p) == 0)
4317 if (j<0) { k++; j=-1;}
4338 #ifdef HAVE_TAIL_RING 4344 for(i=strat->
sl;i>=0;i--) strat->
S_2_R[
i]=-1;
4367 return (strat->
Shdl);
4371 ideal
freegb(ideal I,
int uptodeg,
int lVblock)
4383 WerrorS(
"The input ideal contains incorrectly encoded elements! ");
4407 if (h->IsNull())
return 0;
4415 d = h->GetpFDeg() + h->ecart;
4418 h->SetShortExpVector();
4424 h->SetDegStuffReturnLDeg(strat->
LDegLast);
4429 strat->
T[
j].pNorm();
4462 h->SetShortExpVector();
4475 h->SetDegStuffReturnLDeg(strat->
LDegLast);
4485 if (strat->
T[j].ecart <= h->ecart)
4486 h->ecart = d - h->GetpFDeg();
4488 h->ecart = d - h->GetpFDeg() + strat->
T[
j].ecart - h->ecart;
4490 d = h->GetpFDeg() + h->ecart;
4493 d = h->SetDegStuffReturnLDeg(strat->
LDegLast);
4502 && ((d >= reddeg) || (pass > strat->
LazyPass)))
4507 at = strat->
posInL(strat->
L,strat->
Ll,h,strat);
4508 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)
int posInSMonFirst(const kStrategy strat, const int length, const poly p)
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
int posInLF5CRing(const LSet set, int start, const int length, LObject *p, const kStrategy)
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)
#define TEST_OPT_CONTENTSB
BEGIN_NAMESPACE_SINGULARXX const ring const ring tailRing
BOOLEAN posInLDependsOnLength
#define REDNF_CANONICALIZE
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)
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)
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)
static BOOLEAN rField_is_Ring_Z(const ring r)
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)
int kBucketCanonicalize(kBucket_pt bucket)
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)