searches for reducers of temp similar to the symbolic preprocessing of F4 and divides them into a "good" and "bad" part:
the "good" ones are the reducers which do not corrupt the label of temp, with these the normal form of temp is computed
the "bad" ones are the reducers which corrupt the label of temp, they are tested
1204 int canonicalize = 0;
1212 number nOne =
nInit(1);
1215 poly tempPoly =
pInit();
1216 poly redPoly =
NULL;
1217 int idx =
l->getIndex();
1220 tempPoly =
pCopy(
l->getPoly());
1231 while(
NULL != tempPoly) {
1234 while(
NULL != tempRed) {
1238 u = pMDivideM(tempPoly,tempRed->
getPoly());
1245 poly tempRedPoly = tempRed->
getPoly();
1249 int lTempRedPoly =
pLength(tempRedPoly);
1254 if(!(canonicalize % 50)) {
1260 if(
NULL != tempPoly) {
1284 if(
NULL == redPoly) {
1285 bad->insert(tempRed->getLPolyOld());
1292 poly tempRedPoly = tempRed->getPoly();
1296 int lTempRedPoly =
pLength(tempRedPoly);
1304 if(!(canonicalize % 50)) {
1312 if(
NULL != tempPoly) {
1355 poly tempRedPoly = tempRed->
getPoly();
1359 int lTempRedPoly =
pLength(tempRedPoly);
1364 if(!(canonicalize % 50)) {
1370 if(
NULL != tempPoly) {
1383 if(
NULL != tempPoly) {
1386 while(
NULL != tempRed) {
1392 u = pMDivideM(tempPoly,tempRed->getPoly());
1395 if(tempRed->getIndex() != idx) {
1398 poly tempRedPoly = tempRed->
getPoly();
1402 int lTempRedPoly =
pLength(tempRedPoly);
1407 if(!(canonicalize % 50)) {
1413 if(
NULL != tempPoly) {
1437 if(
NULL == redPoly) {
1438 bad->insert(tempRed->getLPolyOld());
1445 poly tempRedPoly = tempRed->getPoly();
1449 int lTempRedPoly =
pLength(tempRedPoly);
1457 if(!(canonicalize % 50)) {
1465 if(
NULL != tempPoly) {
1511 if(
NULL != tempPoly) {
1512 if(
NULL == redPoly) {
1526 if(
NULL == redPoly) {
1532 PrintS(
"\nELEMENT ADDED TO GPREV: ");
1541 l->setPoly(redPoly);
1545 Print(
"redundant? %d\n\n",
l->getDel());
1546 if(addToG == 0 && termination == 1) {
1547 reducers->
insert(
l->getLPolyOld());
1550 gPrev->
insert(
l->getLPolyOld());
1553 if(termination == 1) {
1556 criticalPair(gPrev,critPairs,lTag,rTag,rules, rejectedGBList,plus);
1570 criticalPair(gPrev,critPairs,lTag,rTag,rules,rejectedGBList,plus);
1573 criticalPair2(gPrev,critPairs,lTag,rTag,rules, rejectedGBList);
1585 while(
NULL != tempBad) {
1600 rules->insert(tempBad->getIndex(),
ppMult_qq(u,tempBad->getTerm()));
1610 LNode* tempBadNew =
new LNode(
ppMult_qq(u,tempBad->getTerm()),tempBad->getIndex(),temp,rules->getFirst()->getRuleOld());
1628 tempBad = tempBad->getNext();
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
void kBucketInit(kBucket_pt bucket, poly lm, int length)
void insert(LPolyOld *lp)
#define pLmCmp(p, q)
returns 0|1|-1 if p=q|p>q|p<q w.r.t monomial ordering
const poly kBucketGetLm(kBucket_pt bucket)
poly kBucketExtractLm(kBucket_pt bucket)
void criticalPair(LList *gPrev, CListOld *critPairs, LTagList *lTag, RTagList *rTag, RList *rules, PList *rejectedGBList, int plus)
#define pLmDivisibleByNoComp(a, b)
like pLmDivisibleBy, does not check components
LNode * getFirstCurrentIdx()
bool criterion1(LList *gPrev, poly t, LNode *l, LTagList *lTag)
void PrintS(const char *s)
static unsigned pLength(poly a)
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...
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
KINLINE poly ksOldSpolyRedNew(poly p1, poly p2, poly spNoether)
bool criterion2(int idx, poly t, LNode *l, RList *rules, RTagList *rTag)
#define pDivisibleBy(a, b)
returns TRUE, if leading monom of a divides leading monom of b i.e., if there exists a expvector c > ...
static poly p_Merge_q(poly p, poly q, const ring r)
void pNorm(poly p, const ring R=currRing)
void insertByLabel(poly t, int i, poly p, RuleOld *r=NULL)
#define pInit()
allocates a new monomial and initializes everything to 0
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
void criticalPair2(LList *gPrev, CListOld *critPairs, LTagList *lTag, RTagList *rTag, RList *rules, PList *rejectedGBList)
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets.
int kBucketCanonicalize(kBucket_pt bucket)
Canonicalizes Bpoly, i.e. converts polys of buckets into one poly in one bucket: Returns number of bu...
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
#define pCopy(p)
return a copy of the poly