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 
 1202                                                                                                                                                                                                                {
 1203    int canonicalize    =   0;
 1204    
 1205    bool addToG         =   1;
 1211    number nOne         =   
nInit(1);
 
 1214    poly tempPoly       =   
pInit();
 
 1215    poly redPoly        =   
NULL;
 
 1216    int idx             =   
l->getIndex();
 
 1217    
 1218    
 1219    tempPoly    =   
pCopy(
l->getPoly());
 
 1220    
 1221    
 1222        
 1226        
 1227        
 1228        
 1229        
 1230        while(
NULL != tempPoly) {
 
 1231            
 1233            while(
NULL != tempRed) {
 
 1234                
 1235                
 1237                    u   =   pMDivideM(tempPoly,tempRed->
getPoly());
 
 1238                    
 1239                    
 1242                            
 1244                                    poly tempRedPoly    =   tempRed->
getPoly();
 
 1245                                    
 1246                                    
 1248                                    int lTempRedPoly    =   
pLength(tempRedPoly);
 
 1251                                    canonicalize++;
 1252                                    
 1253                                    if(!(canonicalize % 50)) {
 1255                                    }
 1257                                    
 1258                                    
 1259                                    if(
NULL != tempPoly) {
 
 1261                                        continue;
 1262                                    }
 1263                                    else {
 1264                                        break;
 1265                                    }
 1266                             }
 1267 
 1268                    }
 1269                    else {
 1271                         
 1272                                      
 1273                                      
 1274                                      
 1275                                      addToG  = 0;
 1276                        }
 1278                            
 1280                                
 1283                                        if(
NULL == redPoly) {
 
 1285                                            addToG  = 1;
 1286                                            
 1287                                            
 1288                                        }
 1289                                    }
 1290                                    else {
 1291                                        poly tempRedPoly    =   tempRed->
getPoly();
 
 1292                                        
 1293                                        
 1295                                        int lTempRedPoly    =   
pLength(tempRedPoly);
 
 1296                                        
 1297                                        
 1300                                        canonicalize++;
 1301                                        
 1302                                        addToG  = 1;
 1303                                        if(!(canonicalize % 50)) {
 1305                                        }
 1306                                        
 1307                                        
 1309                                        
 1310                                        
 1311                                        if(
NULL != tempPoly) {
 
 1313                                            continue;
 1314                                        }
 1315                                        else {
 1316                                            break;
 1317                                        }
 1318                                    }
 1319                                }
 1320                            }
 1321                            else {
 1322                              
 1323 
 1325                                      
 1326                                      
 1327                                      
 1328                                      
 1330                                        
 1331                                        
 1332addToG  = 0;
 1333                                      }
 1334                                    }
 1335                            }
 1336                        }
 1337                        else {
 1338                          
 1340                                      
 1341                                      
 1342                                      
 1343                                      
 1345                                        
 1346                                        
 1347addToG  = 0;
 1348                                      }
 1349                                    }
 1350                        }
 1351                    }
 1352                    }
 1353                    else { 
 1354                        poly tempRedPoly    =   tempRed->
getPoly();
 
 1355                        
 1356                        
 1358                        int lTempRedPoly    =   
pLength(tempRedPoly);
 
 1361                        canonicalize++;
 1362                        
 1363                        if(!(canonicalize % 50)) {
 1365                        }
 1367                        
 1368                        
 1369                        if(
NULL != tempPoly) {
 
 1371                            continue;
 1372                        }
 1373                        else {
 1374                            break;
 1375                        }
 1376 
 1377                    }
 1378                }
 1380            }
 1381            
 1382          if(
NULL != tempPoly) {
 
 1383            
 1385            while(
NULL != tempRed) {
 
 1386                
 1387                
 1388              
 1390                    
 1391                    u   =   pMDivideM(tempPoly,tempRed->
getPoly());
 
 1392                    
 1393                    
 1395                            
 1397                                    poly tempRedPoly    =   tempRed->
getPoly();
 
 1398                                    
 1399                                    
 1401                                    int lTempRedPoly    =   
pLength(tempRedPoly);
 
 1404                                    canonicalize++;
 1405                                    
 1406                                    if(!(canonicalize % 50)) {
 1408                                    }
 1410                                    
 1411                                    
 1412                                    if(
NULL != tempPoly) {
 
 1414                                        continue;
 1415                                    }
 1416                                    else {
 1417                                        break;
 1418                                    }
 1419                             }
 1420 
 1421                    }
 1422                    else {
 1424                         
 1425                                      
 1426                                      
 1427                                      
 1428                                      
 1429                        }
 1431                            
 1433                                
 1436                                        if(
NULL == redPoly) {
 
 1438                                            addToG  = 1;
 1439                                            
 1440                                            
 1441                                        }
 1442                                    }
 1443                                    else {
 1444                                        poly tempRedPoly    =   tempRed->
getPoly();
 
 1445                                        
 1446                                        
 1448                                        int lTempRedPoly    =   
pLength(tempRedPoly);
 
 1449                                        
 1450                                        
 1453                                        canonicalize++;
 1454                                        
 1455                                        addToG  = 1;
 1456                                        if(!(canonicalize % 50)) {
 1458                                        }
 1459                                        
 1460                                        
 1462                                        
 1463                                        
 1464                                        if(
NULL != tempPoly) {
 
 1466                                            continue;
 1467                                        }
 1468                                        else {
 1469                                            break;
 1470                                        }
 1471                                    }
 1472                                }
 1473                            }
 1474                            else {
 1475                              
 1476 
 1478                                      
 1479                                      
 1480                                      
 1481                                      
 1483                                        
 1484                                        
 1485                                        addToG  = 0;
 1486                                      }
 1487                                    }
 1488                            }
 1489                        }
 1490                        else {
 1491                          
 1493                                      
 1494                                      
 1495                                      
 1496                                      
 1498                                        
 1499                                        
 1500addToG  = 0;
 1501                                      }
 1502                                    }
 1503                        }
 1504                    }
 1505 
 1506                }
 1508            }
 1509          }
 1510            if(
NULL != tempPoly) {
 
 1511                if(
NULL == redPoly) {
 
 1513                }
 1514                else {
 1516                }
 1517               
 1519               break;
 1520               
 1522 
 1523            }
 1524        }
 1525        if(
NULL == redPoly) {
 
 1527            
 1528        }
 1529        else
 1530        {
 1531            PrintS(
"\nELEMENT ADDED TO GPREV: ");
 
 1534            {
 1536            }
 1538            
 1539            
 1540            l->setPoly(redPoly);
 
 1541            
 1542            
 1544            Print(
"redundant? %d\n\n",
l->getDel());
 
 1545            if(addToG == 0 && termination == 1) {
 1546              reducers->
insert(
l->getLPolyOld());
 
 1547            }
 1548            else {
 1549              gPrev->
insert(
l->getLPolyOld());
 
 1550            }
 1551            
 1552            if(termination == 1) {
 1553            if(addToG) {
 1554              
 1555              criticalPair(gPrev,critPairs,lTag,rTag,rules, rejectedGBList,plus);
 
 1556            }
 1557            else {
 1559              
 1560              
 1561              
 1562            }
 1563            }
 1564            
 1565            
 1566            
 1567            else {
 1569                criticalPair(gPrev,critPairs,lTag,rTag,rules,rejectedGBList,plus);
 
 1570              }
 1571              else {
 1572                criticalPair2(gPrev,critPairs,lTag,rTag,rules, rejectedGBList);
 
 1573              }
 1574            }
 1575        }
 1576 
 1577    
 1578 
 1580        
 1581        
 1583        
 1584        while(
NULL != tempBad) {
 
 1586                
 1587                
 1588                
 1590                
 1591                
 1594                    
 1596                        
 1598                            
 1601                            
 1602                            
 1604                            
 1605                            
 1606                            
 1610                                
 1611                                
 1612                                
 1613                                
 1614                                
 1615                                
 1617 
 1619                                
 1620                                
 1621                            }
 1622                        }
 1623                    }
 1624                }
 1625            }
 1626        
 1628            
 1629        }
 1630       
 1631    }
 1632        
 1633        
 1634        
 1635    
 1636}
void criticalPair2(LList *gPrev, CListOld *critPairs, LTagList *lTag, RTagList *rTag, RList *rules, PList *rejectedGBList)
 
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
 
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 kBucketInit(kBucket_pt bucket, poly lm, int length)
 
poly kBucketExtractLm(kBucket_pt bucket)
 
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets.
 
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...
 
static int pLength(poly a)
 
static poly p_Merge_q(poly p, poly q, const ring r)
 
#define pCopy(p)
return a copy of the poly