Changeset c1c2ccd in git for kernel/GBEngine/kutil.cc
 Timestamp:
 Sep 9, 2015, 4:25:50 PM (8 years ago)
 Branches:
 (u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
 Children:
 b4fbb84ad318878fabdaa4dbc73d6d1fcea0a9e8
 Parents:
 456eb622b2382d15921e6e3db01415bc2871fd1c
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

kernel/GBEngine/kutil.cc
r456eb62 rc1c2ccd 77 77 #endif 78 78 79 #define ADIDEBUG 079 #define ADIDEBUG 1 80 80 81 81 denominator_list DENOMINATOR_LIST=NULL; … … 1168 1168 void enterOnePairRing (int i,poly p,int ecart, int isFromQ,kStrategy strat, int atR = 1) 1169 1169 { 1170 number s, t; 1170 #if 0 1171 assume(i<=strat>sl); 1172 int l,j,compare,compareCoeff; 1173 LObject Lp; 1174 if (strat>interred_flag) return; 1175 #ifdef KDEBUG 1176 Lp.ecart=0; Lp.length=0; 1177 #endif 1178 /* computes the lcm(s[i],p) */ 1179 Lp.lcm = pInit(); 1180 pSetCoeff0(Lp.lcm, n_Lcm(pGetCoeff(p), pGetCoeff(strat>S[i]), currRing>cf)); 1181 1182 // Lp.lcm == 0 1183 if (nIsZero(pGetCoeff(Lp.lcm))) 1184 { 1185 #ifdef KDEBUG 1186 if (TEST_OPT_DEBUG) 1187 { 1188 PrintS(" Lp.lcm == 0\n"); 1189 PrintS("p:"); 1190 wrp(p); 1191 Print(" strat>S[%d]:", i); 1192 wrp(strat>S[i]); 1193 PrintLn(); 1194 } 1195 #endif 1196 strat>cp++; 1197 pLmDelete(Lp.lcm); 1198 return; 1199 } 1200 // basic product criterion 1201 pLcm(p,strat>S[i],Lp.lcm); 1202 1203 pSetm(Lp.lcm); 1204 assume(!strat>sugarCrit); 1205 if (pHasNotCF(p,strat>S[i]) && n_IsUnit(pGetCoeff(p),currRing>cf) 1206 && n_IsUnit(pGetCoeff(strat>S[i]),currRing>cf)) 1207 { 1208 #ifdef KDEBUG 1209 if (TEST_OPT_DEBUG) 1210 { 1211 PrintS(" product criterion func enterOnePairRing type 1\n"); 1212 PrintS("p:"); 1213 wrp(p); 1214 Print(" strat>S[%d]:", i); 1215 wrp(strat>S[i]); 1216 PrintLn(); 1217 } 1218 #endif 1219 strat>cp++; 1220 pLmDelete(Lp.lcm); 1221 return; 1222 } 1223 assume(!strat>fromT); 1224 /* 1225 *the set B collects the pairs of type (S[j],p) 1226 *suppose (r,p) is in B and (s,p) is the new pair and lcm(s,p) != lcm(r,p) 1227 *if the leading term of s devides lcm(r,p) then (r,p) will be canceled 1228 *if the leading term of r devides lcm(s,p) then (s,p) will not enter B 1229 */ 1230 for(j = strat>Bl;j>=0;j) 1231 { 1232 compare=pDivCompRing(strat>B[j].lcm,Lp.lcm); 1233 compareCoeff = n_DivComp(pGetCoeff(strat>B[j].lcm), pGetCoeff(Lp.lcm), currRing>cf); 1234 if ((compareCoeff == pDivComp_EQUAL)  (compare == compareCoeff)) 1235 { 1236 if (compare == 1) 1237 { 1238 strat>c3++; 1239 #ifdef KDEBUG 1240 if (TEST_OPT_DEBUG) 1241 { 1242 PrintS(" chain criterion type 1\n"); 1243 PrintS("strat>B[j]:"); 1244 wrp(strat>B[j].lcm); 1245 PrintS(" Lp.lcm:"); 1246 wrp(Lp.lcm); 1247 PrintLn(); 1248 } 1249 #endif 1250 if ((strat>fromQ==NULL)  (isFromQ==0)  (strat>fromQ[i]==0)) 1251 { 1252 pLmDelete(Lp.lcm); 1253 return; 1254 } 1255 break; 1256 } 1257 else 1258 if (compare == 1) 1259 { 1260 #ifdef KDEBUG 1261 if (TEST_OPT_DEBUG) 1262 { 1263 PrintS(" chain criterion type 2\n"); 1264 Print("strat>B[%d].lcm:",j); 1265 wrp(strat>B[j].lcm); 1266 PrintS(" Lp.lcm:"); 1267 wrp(Lp.lcm); 1268 PrintLn(); 1269 } 1270 #endif 1271 deleteInL(strat>B,&strat>Bl,j,strat); 1272 strat>c3++; 1273 } 1274 } 1275 if ((compare == pDivComp_EQUAL) && (compareCoeff != 2)) 1276 { 1277 if (compareCoeff == pDivComp_LESS) 1278 { 1279 #ifdef KDEBUG 1280 if (TEST_OPT_DEBUG) 1281 { 1282 PrintS(" chain criterion type 3\n"); 1283 Print("strat>B[%d].lcm:", j); 1284 wrp(strat>B[j].lcm); 1285 PrintS(" Lp.lcm:"); 1286 wrp(Lp.lcm); 1287 PrintLn(); 1288 } 1289 #endif 1290 strat>c3++; 1291 if ((strat>fromQ==NULL)  (isFromQ==0)  (strat>fromQ[i]==0)) 1292 { 1293 pLmDelete(Lp.lcm); 1294 return; 1295 } 1296 break; 1297 } 1298 else 1299 // Add hint for same LM and LC (later) (TODO Oliver) 1300 // if (compareCoeff == pDivComp_GREATER) 1301 { 1302 #ifdef KDEBUG 1303 if (TEST_OPT_DEBUG) 1304 { 1305 PrintS(" chain criterion type 4\n"); 1306 Print("strat>B[%d].lcm:", j); 1307 wrp(strat>B[j].lcm); 1308 PrintS(" Lp.lcm:"); 1309 wrp(Lp.lcm); 1310 PrintLn(); 1311 } 1312 #endif 1313 deleteInL(strat>B,&strat>Bl,j,strat); 1314 strat>c3++; 1315 } 1316 } 1317 } 1318 /* 1319 *the pair (S[i],p) enters B if the spoly != 0 1320 */ 1321 /* compute the short spolynomial */ 1322 if ((strat>S[i]==NULL)  (p==NULL)) 1323 { 1324 #ifdef KDEBUG 1325 if (TEST_OPT_DEBUG) 1326 { 1327 PrintS(" spoly = NULL\n"); 1328 } 1329 #endif 1330 pLmDelete(Lp.lcm); 1331 return; 1332 } 1333 if ((strat>fromQ!=NULL) && (isFromQ!=0) && (strat>fromQ[i]!=0)) 1334 { 1335 // Is from a previous computed GB, therefore we know that spoly will 1336 // reduce to zero. Oliver. 1337 WarnS("Could we come here? 8738947389"); 1338 Lp.p=NULL; 1339 } 1340 else 1341 { 1342 Lp.p = ksCreateShortSpoly(strat>S[i], p, strat>tailRing); 1343 } 1344 if (Lp.p == NULL) 1345 { 1346 #ifdef KDEBUG 1347 if (TEST_OPT_DEBUG) 1348 { 1349 PrintS(" spoly = NULL\n"); 1350 } 1351 #endif 1352 /* the case that the spoly is 0 */ 1353 if (strat>pairtest==NULL) initPairtest(strat); 1354 strat>pairtest[i] = TRUE;/* hint for spoly(S^[i],p)=0 */ 1355 strat>pairtest[strat>sl+1] = TRUE; 1356 /*hint for spoly(S[i],p) == 0 for some i,0 <= i <= sl*/ 1357 /* 1358 *suppose we have (s,r),(r,p),(s,p) and spoly(s,p) == 0 and (r,p) is 1359 *still in B (i.e. lcm(r,p) == lcm(s,p) or the leading term of s does not 1360 *devide lcm(r,p)). In the last case (s,r) can be canceled if the leading 1361 *term of p devides the lcm(s,r) 1362 *(this canceling should be done here because 1363 *the case lcm(s,p) == lcm(s,r) is not covered in chainCrit) 1364 *the first case is handeled in chainCrit 1365 */ 1366 pLmDelete(Lp.lcm); 1367 } 1368 else 1369 { 1370 /* the pair (S[i],p) enters B */ 1371 Lp.p1 = strat>S[i]; 1372 Lp.p2 = p; 1373 1374 pNext(Lp.p) = strat>tail; 1375 1376 if (atR >= 0) 1377 { 1378 Lp.i_r2 = atR; 1379 Lp.i_r1 = strat>S_2_R[i]; 1380 } 1381 strat>initEcartPair(&Lp,strat>S[i],p,strat>ecartS[i],ecart); 1382 l = strat>posInL(strat>L,strat>Ll,&Lp,strat); 1383 enterL(&strat>L,&strat>Ll,&strat>Lmax,Lp,l); 1384 } 1385 #else 1171 1386 assume(i<=strat>sl); 1172 1387 assume(atR >= 0); … … 1285 1500 } 1286 1501 #endif 1502 number s, t; 1287 1503 poly m1, m2, gcd; 1288 1504 #if ADIDEBUG … … 1306 1522 if(pm1 == NULL) 1307 1523 { 1308 pDelete(&sim2); 1309 pDelete(&pm1); 1310 pDelete(&m1); 1311 pDelete(&m2); 1524 //pDelete(&sim2); 1525 //pDelete(&pm1); 1526 //pDelete(&gcd); 1527 //pDelete(&m1); 1528 //pDelete(&m2); 1312 1529 return; 1313 1530 } 1314 1531 else 1315 1532 { 1316 gcd = p _Copy(pm1, strat>tailRing);1533 gcd = pCopy(pm1); 1317 1534 pDelete(&pm1); 1318 1535 pDelete(&sim2); … … 1381 1598 enterL(&strat>B,&strat>Bl,&strat>Bmax,h,posx); 1382 1599 kTest_TS(strat); 1600 #endif 1383 1601 } 1384 1602 … … 1388 1606 */ 1389 1607 1390 BOOLEAN enterOneStrongPoly (int i,poly p,int /*ecart*/, int /*isFromQ*/,kStrategy strat, int atR = 1)1608 BOOLEAN enterOneStrongPoly (int i,poly p,int /*ecart*/, int /*isFromQ*/,kStrategy strat, int atR, bool redMoraNF) 1391 1609 { 1392 1610 number d, s, t; 1393 assume(i<=strat>sl);1394 1611 assume(atR >= 0); 1395 poly m1, m2, gcd; 1396 1397 d = n_ExtGcd(pGetCoeff(p), pGetCoeff(strat>S[i]), &s, &t, currRing>cf); 1612 poly m1, m2, gcd,si; 1613 if(!redMoraNF) 1614 { 1615 assume(i<=strat>sl); 1616 si = strat>S[i]; 1617 } 1618 else 1619 { 1620 assume(i<=strat>tl); 1621 si = strat>T[i].p; 1622 } 1623 //printf("\n\n"); 1624 //pWrite(p);pWrite(si); 1625 d = n_ExtGcd(pGetCoeff(p), pGetCoeff(si), &s, &t, currRing>cf); 1398 1626 1399 1627 if (nIsZero(s)  nIsZero(t)) // evtl. durch divBy tests ersetzen … … 1405 1633 } 1406 1634 1407 k_GetStrongLeadTerms(p, s trat>S[i], currRing, m1, m2, gcd, strat>tailRing);1635 k_GetStrongLeadTerms(p, si, currRing, m1, m2, gcd, strat>tailRing); 1408 1636 //p_Test(m1,strat>tailRing); 1409 1637 //p_Test(m2,strat>tailRing); 1410 while (! kCheckStrongCreation(atR, m1, i, m2, strat) ) 1411 { 1412 memset(&(strat>P), 0, sizeof(strat>P)); 1413 kStratChangeTailRing(strat); 1414 strat>P = *(strat>R[atR]); 1415 p_LmFree(m1, strat>tailRing); 1416 p_LmFree(m2, strat>tailRing); 1417 p_LmFree(gcd, currRing); 1418 k_GetStrongLeadTerms(p, strat>S[i], currRing, m1, m2, gcd, strat>tailRing); 1638 if(!redMoraNF) 1639 { 1640 while (! kCheckStrongCreation(atR, m1, i, m2, strat) ) 1641 { 1642 memset(&(strat>P), 0, sizeof(strat>P)); 1643 kStratChangeTailRing(strat); 1644 strat>P = *(strat>R[atR]); 1645 p_LmFree(m1, strat>tailRing); 1646 p_LmFree(m2, strat>tailRing); 1647 p_LmFree(gcd, currRing); 1648 k_GetStrongLeadTerms(p, si, currRing, m1, m2, gcd, strat>tailRing); 1649 } 1419 1650 } 1420 1651 pSetCoeff0(m1, s); … … 1423 1654 p_Test(m1,strat>tailRing); 1424 1655 p_Test(m2,strat>tailRing); 1425 1656 //printf("\n===================================\n"); 1657 //pWrite(m1);pWrite(m2);pWrite(gcd); 1426 1658 #ifdef KDEBUG 1427 1659 if (TEST_OPT_DEBUG) … … 1438 1670 wrp(p); 1439 1671 Print("\n strat>S[%d]: ", i); 1440 wrp(s trat>S[i]);1672 wrp(si); 1441 1673 PrintS(" > "); 1442 1674 } 1443 1675 #endif 1444 1445 pNext(gcd) = p_Add_q(pp_Mult_mm(pNext(p), m1, strat>tailRing), pp_Mult_mm(pNext(s trat>S[i]), m2, strat>tailRing), strat>tailRing);1676 1677 pNext(gcd) = p_Add_q(pp_Mult_mm(pNext(p), m1, strat>tailRing), pp_Mult_mm(pNext(si), m2, strat>tailRing), strat>tailRing); 1446 1678 p_LmDelete(m1, strat>tailRing); 1447 1679 p_LmDelete(m2, strat>tailRing); 1448 1449 1680 #ifdef KDEBUG 1450 1681 if (TEST_OPT_DEBUG) … … 1461 1692 h.pCleardenom(); 1462 1693 strat>initEcart(&h); 1463 if (strat>Ll==1)1464 posx =0;1465 else1466 posx = strat>posInL(strat>L,strat>Ll,&h,strat);1467 1694 h.sev = pGetShortExpVector(h.p); 1468 1695 h.i_r1 = 1;h.i_r2 = 1; 1469 1696 if (currRing!=strat>tailRing) 1470 { 1471 if (h.t_p==NULL) /* may already been set by pLdeg() in initEcart */ 1472 h.t_p = k_LmInit_currRing_2_tailRing(h.p, strat>tailRing); 1473 } 1474 #if 1 1475 h.p1 = p;h.p2 = strat>S[i]; 1476 #endif 1477 if (atR >= 0) 1697 h.t_p = k_LmInit_currRing_2_tailRing(h.p, strat>tailRing); 1698 if(!redMoraNF) 1699 { 1700 #if 1 1701 h.p1 = p;h.p2 = strat>S[i]; 1702 #endif 1703 if (atR >= 0) 1478 1704 { 1479 1705 h.i_r2 = strat>S_2_R[i]; … … 1485 1711 h.i_r2 = 1; 1486 1712 } 1487 enterL(&strat>L,&strat>Ll,&strat>Lmax,h,posx); 1713 if (strat>Ll==1) 1714 posx =0; 1715 else 1716 posx = strat>posInL(strat>L,strat>Ll,&h,strat); 1717 enterL(&strat>L,&strat>Ll,&strat>Lmax,h,posx); 1718 } 1719 else 1720 { 1721 enterT(h, strat); 1722 } 1723 //#if 1 1488 1724 #if ADIDEBUG 1489 printf("\nThis strong poly was added to L:\n");pWrite(h.p);pWrite(h.p1);pWrite(h.p2); printf("\ni_r1 = %i, i_r2 = %i\n",h.i_r1, h.i_r2);pWrite(strat>T[h.i_r1].p);pWrite(strat>T[h.i_r2].p);1725 printf("\nThis strong poly was added to L:\n");pWrite(h.p);pWrite(h.p1);pWrite(h.p2); 1490 1726 #endif 1491 1727 return TRUE; … … 3037 3273 } 3038 3274 #if 1 3275 3039 3276 if (new_pair) 3040 3277 { … … 3702 3939 && ((iCompH<=strat>syzComp)(strat>syzComp==0))) 3703 3940 { 3704 enterOneStrongPoly(j,h,ecart,isFromQ,strat, atR );3941 enterOneStrongPoly(j,h,ecart,isFromQ,strat, atR, FALSE); 3705 3942 } 3706 3943 } … … 3834 4071 void superenterpairs (poly h,int k,int ecart,int pos,kStrategy strat, int atR) 3835 4072 { 4073 #if ADIDEBUG 4074 PrintS("\nEnter superenterpairs\n"); 4075 int iii = strat>Ll; 4076 #endif 3836 4077 assume (rField_is_Ring(currRing)); 3837 4078 // enter also zero divisor * poly, if this is non zero and of smaller degree 3838 4079 if (!(rField_is_Domain(currRing))) enterExtendedSpoly(h, strat); 4080 #if ADIDEBUG 4081 if(iii==strat>Ll) 4082 { 4083 PrintS("\n enterExtendedSpoly has not changed the list L.\n"); 4084 } 4085 else 4086 { 4087 PrintLn(); 4088 PrintS("\n enterExtendedSpoly changed the list L:\n"); 4089 for(iii=0;iii<=strat>Ll;iii++) 4090 { 4091 Print("\n L[%d]:\n",iii); 4092 PrintS(" ");p_Write(strat>L[iii].p1,strat>tailRing); 4093 PrintS(" ");p_Write(strat>L[iii].p2,strat>tailRing); 4094 PrintS(" ");p_Write(strat>L[iii].p,strat>tailRing); 4095 } 4096 } 4097 iii = strat>Ll; 4098 #endif 3839 4099 initenterpairs(h, k, ecart, 0, strat, atR); 4100 #if ADIDEBUG 4101 if(iii==strat>Ll) 4102 { 4103 PrintS("\n initenterpairs has not changed the list L.\n"); 4104 } 4105 else 4106 { 4107 PrintS("\n initenterpairs changed the list L:\n"); 4108 for(iii=0;iii<=strat>Ll;iii++) 4109 { 4110 Print("\n L[%d]:\n",iii); 4111 PrintS(" ");p_Write(strat>L[iii].p1,strat>tailRing); 4112 PrintS(" ");p_Write(strat>L[iii].p2,strat>tailRing); 4113 PrintS(" ");p_Write(strat>L[iii].p,strat>tailRing); 4114 } 4115 } 4116 iii = strat>Ll; 4117 #endif 3840 4118 initenterstrongPairs(h, k, ecart, 0, strat, atR); 4119 #if ADIDEBUG 4120 if(iii==strat>Ll) 4121 { 4122 PrintS("\n initenterstrongPairs has not changed the list L.\n"); 4123 } 4124 else 4125 { 4126 PrintS("\n initenterstrongPairs changed the list L:\n"); 4127 for(iii=0;iii<=strat>Ll;iii++) 4128 { 4129 Print("\n L[%d]:\n",iii); 4130 PrintS(" ");p_Write(strat>L[iii].p1,strat>tailRing); 4131 PrintS(" ");p_Write(strat>L[iii].p2,strat>tailRing); 4132 PrintS(" ");p_Write(strat>L[iii].p,strat>tailRing); 4133 } 4134 } 4135 PrintS("\nEnd of superenterpairs\n"); 4136 #endif 3841 4137 clearSbatch(h, k, pos, strat); 3842 4138 } … … 3854 4150 assume (!rField_is_Ring(currRing)); 3855 4151 #endif 4152 #if ADIDEBUG 4153 Print("\n Vor initenterpairs: The new pair list L  after superenterpairs in loop\n"); 4154 for(int iii=0;iii<=strat>Ll;iii++) 4155 { 4156 printf("\n L[%d]:\n",iii); 4157 PrintS(" ");p_Write(strat>L[iii].p,strat>tailRing); 4158 PrintS(" ");p_Write(strat>L[iii].p1,strat>tailRing); 4159 PrintS(" ");p_Write(strat>L[iii].p2,strat>tailRing); 4160 } 4161 #endif 4162 3856 4163 initenterpairs(h,k,ecart,0,strat, atR); 4164 4165 #if ADIDEBUG 4166 Print("\n Nach initenterpairs: The new pair list L  after superenterpairs in loop \n"); 4167 for(int iii=0;iii<=strat>Ll;iii++) 4168 { 4169 printf("\n L[%d]:\n",iii); 4170 PrintS(" ");p_Write(strat>L[iii].p,strat>tailRing); 4171 PrintS(" ");p_Write(strat>L[iii].p1,strat>tailRing); 4172 PrintS(" ");p_Write(strat>L[iii].p2,strat>tailRing); 4173 } 4174 #endif 4175 3857 4176 if ( (!strat>fromT) 3858 4177 && ((strat>syzComp==0) … … 3867 4186 j++; 3868 4187 } 3869 } 4188 //Print("end clearS sl=%d\n",strat>sl); 4189 } 4190 // PrintS("end enterpairs\n"); 3870 4191 } 3871 4192 … … 7652 7973 } 7653 7974 #endif 7975 #ifdef HAVE_RINGS 7976 if(rField_is_Ring(currRing) && !n_IsUnit(p.p>coef, currRing>cf)) 7977 { 7978 #if ADIDEBUG_NF 7979 printf("\nDas ist p:\n");pWrite(p.p); 7980 #endif 7981 for(i=strat>tl;i>=0;i) 7982 { 7983 if(strat>T[i].ecart <= p.ecart && pLmDivisibleBy(strat>T[i].p,p.p)) 7984 { 7985 #if ADIDEBUG_NF 7986 printf("\nFound one: %i\n",i);pWrite(strat>T[i].p); 7987 #endif 7988 enterOneStrongPoly(i,p.p,p.ecart,0,strat,0 , TRUE); 7989 } 7990 } 7991 } 7992 /* 7993 printf("\nThis is T:\n"); 7994 for(i=strat>tl;i>=0;i) 7995 { 7996 pWrite(strat>T[i].p); 7997 } 7998 //getchar();*/ 7999 #endif 7654 8000 #ifdef HAVE_TAIL_RING 7655 8001 if (currRing!=strat>tailRing) … … 8111 8457 updateS(TRUE,strat); 8112 8458 } 8113 //if (strat>fromQ!=NULL) omFreeSize(strat>fromQ,IDELEMS(strat>Shdl)*sizeof(int));8114 //strat>fromQ=NULL;8459 if (strat>fromQ!=NULL) omFreeSize(strat>fromQ,IDELEMS(strat>Shdl)*sizeof(int)); 8460 strat>fromQ=NULL; 8115 8461 assume(kTest_TS(strat)); 8116 8462 } … … 8745 9091 if((posconst != 1) && (!nIsZero(F>m[posconst]>coef))) 8746 9092 { 8747 //pDelete(&pmon);9093 pmon = pCopy(F>m[posconst]); 8748 9094 idDelete(&F); 8749 //idDelete(&monred);8750 return NULL;9095 idDelete(&monred); 9096 return pmon; 8751 9097 } 8752 9098 int idelemQ = 0; … … 8764 9110 if((posconst != 1) && (!nIsZero(monred>m[posconst]>coef))) 8765 9111 { 9112 pmon = pCopy(monred>m[posconst]); 8766 9113 idDelete(&F); 8767 9114 idDelete(&monred); 8768 return NULL;9115 return pmon; 8769 9116 } 8770 9117 } … … 8790 9137 II>m[i+1] = II>m[i]; 8791 9138 II>m[0] = pOne(); 8792 ideal syz = idSyzygies(II, isNotHomog, NULL); 8793 //idPrint(syz); 9139 ideal syz = idSyzygies(II, isNotHomog, NULL); 8794 9140 poly integer = NULL; 8795 9141 for(int i = IDELEMS(syz)1;i>=0; i) … … 8797 9143 if(pGetComp(syz>m[i]) == 1) 8798 9144 { 8799 integer = pHead(syz>m[i]); 8800 pSetComp(integer,0); 8801 if(pIsConstant(integer)) 9145 if(pIsConstant(syz>m[i])) 8802 9146 { 9147 integer = pHead(syz>m[i]); 9148 pSetComp(integer, 0); 8803 9149 break; 8804 9150 } … … 8809 9155 pmon = prMapR(integer, nMap2, QQ_ring, origR); 8810 9156 idDelete(&F); 8811 //idDelete(&monred);8812 //idDelete(&II);8813 //idDelete(&one);8814 //idDelete(&syz);8815 //pDelete(&integer);9157 idDelete(&monred); 9158 idDelete(&II); 9159 idDelete(&one); 9160 idDelete(&syz); 9161 pDelete(&integer); 8816 9162 rDelete(QQ_ring); 8817 9163 return pmon; … … 8888 9234 } 8889 9235 idDelete(&F); 8890 //idDelete(&monred);8891 //idDelete(&II);8892 //idDelete(&one);8893 //pDelete(&pmon);9236 idDelete(&monred); 9237 idDelete(&II); 9238 idDelete(&one); 9239 pDelete(&pmon); 8894 9240 rDelete(QQ_ring); 8895 9241 return NULL; … … 8913 9259 if(pNext(strat>S[i]) == NULL) 8914 9260 { 9261 pWrite(p); 9262 pWrite(strat>S[i]); 8915 9263 while(ok == FALSE) 8916 9264 { 8917 9265 if(pLmDivisibleBy(strat>S[i], p)) 8918 9266 { 8919 number c = currRing>cf>cfIntMod(p>coef, strat>S[i]>coef, currRing>cf); 8920 pSetCoeff(p,c); 9267 p>coef = currRing>cf>cfIntMod(p>coef, strat>S[i]>coef, currRing>cf); 8921 9268 } 8922 9269 if(nIsZero(p>coef)) … … 8935 9282 if(pLmDivisibleBy(strat>S[i], pp)) 8936 9283 { 8937 number c = currRing>cf>cfIntMod(pp>coef, strat>S[i]>coef, currRing>cf); 8938 pSetCoeff(pp,c); 9284 pp>coef = currRing>cf>cfIntMod(pp>coef, strat>S[i]>coef, currRing>cf); 8939 9285 if(nIsZero(pp>coef)) 8940 9286 { … … 8983 9329 if(pLmDivisibleBy(strat>S[j], p)) 8984 9330 { 8985 number n = currRing>cf>cfIntMod(p>coef, strat>S[j]>coef, currRing>cf);8986 p SetCoeff(p,n);9331 //nDelete(&(p>coef)); 9332 p>coef = currRing>cf>cfIntMod(p>coef, strat>S[j]>coef, currRing>cf); 8987 9333 } 8988 9334 pp = pNext(p); … … 8997 9343 if(pLmDivisibleBy(strat>S[j], pp)) 8998 9344 { 8999 number n = currRing>cf>cfIntMod(pp>coef, strat>S[j]>coef, currRing>cf);9000 p SetCoeff(pp,n);9345 //nDelete(&(pp>coef)); 9346 pp>coef = currRing>cf>cfIntMod(pp>coef, strat>S[j]>coef, currRing>cf); 9001 9347 if(nIsZero(pp>coef)) 9002 9348 {
Note: See TracChangeset
for help on using the changeset viewer.