My Project  debian-1:4.1.1-p2+ds-4build1
Functions | Variables
gb_hack.h File Reference
#include "polys/nc/nc.h"

Go to the source code of this file.

Functions

ideal k_gnc_gr_bba (const ideal, const ideal, const intvec *, const intvec *, kStrategy, const ring _currRing)
 
ideal k_gnc_gr_mora (const ideal, const ideal, const intvec *, const intvec *, kStrategy, const ring _currRing)
 
ideal k_sca_gr_bba (const ideal, const ideal, const intvec *, const intvec *, kStrategy, const ring _currRing)
 Modified Plural's Buchberger's algorithmus. More...
 
ideal k_sca_bba (const ideal, const ideal, const intvec *, const intvec *, kStrategy, const ring _currRing)
 Modified modern Sinuglar Buchberger's algorithm. More...
 
ideal k_sca_mora (const ideal, const ideal, const intvec *, const intvec *, kStrategy, const ring _currRing)
 Modified modern Sinuglar Mora's algorithm. More...
 

Variables

NF_Proc nc_NF
 
BBA_Proc gnc_gr_bba
 
BBA_Proc gnc_gr_mora
 
BBA_Proc sca_bba
 
BBA_Proc sca_mora
 
BBA_Proc sca_gr_bba
 

Function Documentation

◆ k_gnc_gr_bba()

ideal k_gnc_gr_bba ( const  ideal,
const  ideal,
const intvec ,
const intvec ,
kStrategy  ,
const ring  _currRing 
)

Definition at line 1045 of file gr_kstd2.cc.

1046 {
1047  const ring save = currRing; if( currRing != _currRing ) rChangeCurrRing(_currRing);
1048 
1049 #if MYTEST
1050  PrintS("<gnc_gr_bba>\n");
1051 #endif
1052 
1053 #ifdef HAVE_PLURAL
1054 #if MYTEST
1055  PrintS("currRing: \n");
1056  rWrite(currRing);
1057 #ifdef RDEBUG
1059 #endif
1060 
1061  PrintS("F: \n");
1062  idPrint(F);
1063  PrintS("Q: \n");
1064  idPrint(Q);
1065 #endif
1066 #endif
1067 
1068  assume(currRing->OrdSgn != -1); // no mora!!! it terminates only for global ordering!!! (?)
1069 
1070  // intvec *w=NULL;
1071  // intvec *hilb=NULL;
1072  int olddeg,reduc;
1073  int red_result=1;
1074  int /*hilbeledeg=1,*/hilbcount=0/*,minimcnt=0*/;
1075 
1076  initBuchMoraCrit(strat); /*set Gebauer, honey, sugarCrit*/
1077  // initHilbCrit(F,Q,&hilb,strat);
1078  /* in plural we don't need Hilb yet */
1079  nc_gr_initBba(F,strat);
1080  initBuchMoraPos(strat);
1081  if (rIsRatGRing(currRing))
1082  {
1083  strat->posInL=posInL0; // by pCmp of lcm
1084  }
1085  /*set enterS, spSpolyShort, reduce, red, initEcart, initEcartPair*/
1086  /*Shdl=*/initBuchMora(F, Q,strat);
1087  strat->posInT=posInT110;
1088  reduc = olddeg = 0;
1089 
1090  /* compute------------------------------------------------------- */
1091  while (strat->Ll >= 0)
1092  {
1093  if (TEST_OPT_DEBUG) messageSets(strat);
1094 
1095  if (strat->Ll== 0) strat->interpt=TRUE;
1096  if (TEST_OPT_DEGBOUND
1097  && ((strat->honey
1098  && (strat->L[strat->Ll].ecart+currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))
1099  || ((!strat->honey) && (currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))))
1100  {
1101  /*
1102  *stops computation if
1103  * 24 IN test and the degree +ecart of L[strat->Ll] is bigger then
1104  *a predefined number Kstd1_deg
1105  */
1106  while (strat->Ll >= 0) deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
1107  break;
1108  }
1109  /* picks the last element from the lazyset L */
1110  strat->P = strat->L[strat->Ll];
1111  strat->Ll--;
1112  //kTest(strat);
1113 
1114  if (strat->P.p != NULL)
1115  if (pNext(strat->P.p) == strat->tail)
1116  {
1117  /* deletes the short spoly and computes */
1118  pLmFree(strat->P.p);
1119  /* the real one */
1120 // if (ncRingType(currRing)==nc_lie) /* prod crit */
1121 // if(pHasNotCF(strat->P.p1,strat->P.p2))
1122 // {
1123 // strat->cp++;
1124 // /* prod.crit itself in nc_CreateSpoly */
1125 // }
1126 
1127 
1128  if( ! rIsRatGRing(currRing) )
1129  {
1130  strat->P.p = nc_CreateSpoly(strat->P.p1,strat->P.p2,currRing);
1131  }
1132 #ifdef HAVE_RATGRING
1133  else
1134  {
1135  /* rational case */
1136  strat->P.p = nc_rat_CreateSpoly(strat->P.p1,strat->P.p2,currRing->real_var_start-1,currRing);
1137  }
1138 #endif
1139 
1140 
1141 #ifdef PDEBUG
1142  p_Test(strat->P.p, currRing);
1143 #endif
1144 
1145 #if MYTEST
1146  if (TEST_OPT_DEBUG)
1147  {
1148  PrintS("p1: "); pWrite(strat->P.p1);
1149  PrintS("p2: "); pWrite(strat->P.p2);
1150  PrintS("SPoly: "); pWrite(strat->P.p);
1151  }
1152 #endif
1153  }
1154 
1155 
1156  if (strat->P.p != NULL)
1157  {
1158  if (TEST_OPT_PROT)
1159  message((strat->honey ? strat->P.ecart : 0) + strat->P.pFDeg(),
1160  &olddeg,&reduc,strat, red_result);
1161 
1162 #if MYTEST
1163  if (TEST_OPT_DEBUG)
1164  {
1165  PrintS("p1: "); pWrite(strat->P.p1);
1166  PrintS("p2: "); pWrite(strat->P.p2);
1167  PrintS("SPoly before: "); pWrite(strat->P.p);
1168  }
1169 #endif
1170 
1171  /* reduction of the element chosen from L */
1172  strat->red(&strat->P,strat);
1173 
1174 #if MYTEST
1175  if (TEST_OPT_DEBUG)
1176  {
1177  PrintS("red SPoly: "); pWrite(strat->P.p);
1178  }
1179 #endif
1180  }
1181  if (strat->P.p != NULL)
1182  {
1183  if (TEST_OPT_PROT)
1184  {
1185  PrintS("s\n");
1186  }
1187  /* enter P.p into s and L */
1188  {
1189 /* quick unit detection in the rational case */
1190 #ifdef HAVE_RATGRING
1191  if( rIsRatGRing(currRing) )
1192  {
1193  if ( p_LmIsConstantRat(strat->P.p, currRing) )
1194  {
1195 #ifdef PDEBUG
1196  PrintS("unit element detected:");
1197  p_wrp(strat->P.p,currRing);
1198 #endif
1199  p_Delete(&strat->P.p,currRing, strat->tailRing);
1200  strat->P.p = pOne();
1201  }
1202  }
1203 #endif
1204  strat->P.sev=0;
1205  int pos=posInS(strat,strat->sl,strat->P.p, strat->P.ecart);
1206  {
1208  {
1209  if ((strat->syzComp==0)||(!strat->homog))
1210  {
1211  #ifdef HAVE_RATGRING
1212  if(!rIsRatGRing(currRing))
1213  #endif
1214  strat->P.p = redtailBba(strat->P.p,pos-1,strat);
1215  }
1216 
1217  strat->P.p=p_Cleardenom(strat->P.p, currRing);
1218  }
1219  else
1220  {
1221  pNorm(strat->P.p);
1222  if ((strat->syzComp==0)||(!strat->homog))
1223  {
1224  strat->P.p = redtailBba(strat->P.p,pos-1,strat);
1225  }
1226  }
1227  if (TEST_OPT_DEBUG)
1228  {
1229  PrintS("new s:"); wrp(strat->P.p);
1230  PrintLn();
1231 #if MYTEST
1232  PrintS("s: "); pWrite(strat->P.p);
1233 #endif
1234 
1235  }
1236  // kTest(strat);
1237  //
1238  enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat);
1239 
1240  if (strat->sl==-1) pos=0;
1241  else pos=posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
1242 
1243  strat->enterS(strat->P,pos,strat,-1);
1244  }
1245 // if (hilb!=NULL) khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat);
1246  }
1247  if (strat->P.lcm!=NULL) pLmFree(strat->P.lcm);
1248  }
1249 #ifdef KDEBUG
1250  strat->P.lcm=NULL;
1251 #endif
1252  //kTest(strat);
1253  }
1254  if (TEST_OPT_DEBUG) messageSets(strat);
1255 
1256  /* complete reduction of the standard basis--------- */
1257  if (TEST_OPT_SB_1)
1258  {
1259  int k=1;
1260  int j;
1261  while(k<=strat->sl)
1262  {
1263  j=0;
1264  loop
1265  {
1266  if (j>=k) break;
1267  clearS(strat->S[j],strat->sevS[j],&k,&j,strat);
1268  j++;
1269  }
1270  k++;
1271  }
1272  }
1273 
1274  if (TEST_OPT_REDSB)
1275  completeReduce(strat);
1276  /* release temp data-------------------------------- */
1277  exitBuchMora(strat);
1278 // if (TEST_OPT_WEIGHTM)
1279 // {
1280 // currRing->pFDeg=pFDegOld;
1281 // currRing->pLDeg=pLDegOld;
1282 // if (ecartWeights)
1283 // {
1284 // omFreeSize((ADDRESS)ecartWeights,((currRing->N)+1)*sizeof(short));
1285 // ecartWeights=NULL;
1286 // }
1287 // }
1288  if (TEST_OPT_PROT) messageStat(hilbcount,strat);
1289  if (Q!=NULL) updateResult(strat->Shdl,Q,strat);
1290 
1291 
1292 #ifdef PDEBUG
1293 /* for counting number of pairs [enterL] in Plural */
1294 /* extern int zaehler; */
1295 /* Print("Total pairs considered:%d\n",zaehler); zaehler=0; */
1296 #endif /*PDEBUG*/
1297 
1298 #if MYTEST
1299  PrintS("</gnc_gr_bba>\n");
1300 #endif
1301 
1302  if( currRing != save ) rChangeCurrRing(save);
1303 
1304  return (strat->Shdl);
1305 }

◆ k_gnc_gr_mora()

ideal k_gnc_gr_mora ( const  ideal,
const  ideal,
const intvec ,
const intvec ,
kStrategy  ,
const ring  _currRing 
)

Definition at line 1307 of file gr_kstd2.cc.

1308 {
1309 #ifndef SING_NDEBUG
1310  // Not yet!
1311  WarnS("Sorry, non-commutative mora is not yet implemented!");
1312 #endif
1313 
1314  return gnc_gr_bba(F, Q, NULL, NULL, strat, _currRing);
1315 }

◆ k_sca_bba()

ideal k_sca_bba ( const  ideal,
const  ideal,
const intvec ,
const intvec ,
kStrategy  ,
const ring  _currRing 
)

Modified modern Sinuglar Buchberger's algorithm.

Definition at line 368 of file sca.cc.

369 {
370  const ring save = currRing;
371  if( currRing != _currRing ) rChangeCurrRing(_currRing);
372  assume( currRing == _currRing );
373 
374 #if MYTEST
375  PrintS("\n\n<sca_bba>\n\n");
376 #endif
377 
379 
380 #ifndef SING_NDEBUG
381  idTest(F);
382  idTest(Q);
383 #endif
384 
385 #if MYTEST
386  PrintS("\ncurrRing: \n");
387  rWrite(currRing);
388 #ifdef RDEBUG
389 // rDebugPrint(currRing);
390 #endif
391 
392  PrintS("\n\nF: \n");
393  idPrint(F);
394  PrintS("\n\nQ: \n");
395  idPrint(Q);
396 
397  PrintLn();
398 #endif
399 
400 
401  const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing);
402  const unsigned int m_iLastAltVar = scaLastAltVar(currRing);
403 
404  ideal tempF = id_KillSquares(F, m_iFirstAltVar, m_iLastAltVar, currRing);
405 
406  ideal tempQ = Q;
407 
408  if(Q == currRing->qideal)
409  tempQ = SCAQuotient(currRing);
410 
411  // Q or tempQ will not be used below :(((
412 
413 
414 #if MYTEST
415 
416  PrintS("tempF: \n");
417  idPrint(tempF);
418  PrintS("tempQ: \n");
419  idPrint(tempQ);
420 #endif
421 
422  strat->z2homog = id_IsSCAHomogeneous(tempF, NULL, NULL, currRing); // wCx == wCy == NULL!
423  // redo no_prod_crit:
424  const BOOLEAN bIsSCA = rIsSCA(currRing) && strat->z2homog; // for Z_2 prod-crit
425  strat->no_prod_crit = ! bIsSCA;
426 
427 // strat->homog = strat->homog && strat->z2homog; // ?
428 
429  int red_result = 1;
430  int olddeg, reduc;
431 
432 // int hilbeledeg = 1, minimcnt = 0;
433  int hilbcount = 0;
434 
435  BOOLEAN withT = FALSE;
436 
437  initBuchMoraCrit(strat); // sets Gebauer, honey, sugarCrit // sca - ok???
438  initBuchMoraPos(strat); // sets strat->posInL, strat->posInT // check!! (Plural's: )
439 
440 // initHilbCrit(F, Q, &hilb, strat);
441 
442 // nc_gr_initBba(F,strat);
443  initBba(strat); // set enterS, red, initEcart, initEcartPair
444 
445  // set enterS, spSpolyShort, reduce, red, initEcart, initEcartPair
446  // ?? set spSpolyShort, reduce ???
447  initBuchMora(tempF, tempQ, strat); // tempQ = Q without squares!!!
448 
449 // if (strat->minim>0) strat->M = idInit(IDELEMS(F),F->rank);
450 
451  reduc = olddeg = 0;
452 
453 #define NO_BUCKETS
454 
455 #ifndef NO_BUCKETS
457  strat->use_buckets = 1;
458 #endif
459 
460  // redtailBBa against T for inhomogenous input
461  if (!TEST_OPT_OLDSTD)
462  withT = ! strat->homog;
463 
464  // strat->posInT = posInT_pLength;
465  kTest_TS(strat);
466 
467 #undef HAVE_TAIL_RING
468 
469 #ifdef HAVE_TAIL_RING
470  if(!idIs0(F) &&(!rField_is_Ring())) // create strong gcd poly computes with tailring and S[i] ->to be fixed
472 #endif
473  if (BVERBOSE(23))
474  {
475  if (test_PosInT!=NULL) strat->posInT=test_PosInT;
476  if (test_PosInL!=NULL) strat->posInL=test_PosInL;
477  kDebugPrint(strat);
478  }
479 
480 
481  ///////////////////////////////////////////////////////////////
482  // SCA:
483 
484  // due to std( SB, p).
485  // Note that after initBuchMora :: initSSpecial all these additional
486  // elements are in S and T (and some pairs are in L, which also has no initiall
487  // elements!!!)
488  if(TEST_OPT_SB_1)
489  {
490  // For all additional elements...
491  for (int iNewElement = strat->newIdeal; iNewElement < IDELEMS(tempF); iNewElement++)
492  {
493  const poly pSave = tempF->m[iNewElement];
494 
495  if( pSave != NULL )
496  {
497 // tempF->m[iNewElement] = NULL;
498 
499  const poly p_next = pNext(pSave);
500 
501  if(p_next != NULL)
502  for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ )
503  if( p_GetExp(pSave, i, currRing) != 0 )
504  {
505  assume(p_GetExp(pSave, i, currRing) == 1);
506 
507  const poly p_new = sca_pp_Mult_xi_pp(i, p_next, currRing);
508 
509 #ifdef PDEBUG
510  p_Test(p_new, currRing);
511 #endif
512 
513  if( p_new == NULL) continue;
514 
515  LObject h(p_new); // h = x_i * strat->P
516  h.is_special = TRUE;
517 
519  h.pCleardenom(); // also removes Content
520  else
521  h.pNorm();
522 
523  strat->initEcart(&h);
524  h.sev = pGetShortExpVector(h.p);
525 
526  int pos = 0;
527 
528  if (strat->Ll != -1)
529  pos = strat->posInL(strat->L,strat->Ll,&h,strat);
530 
531  enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);
532  }
533  }
534  }
535  }
536 
537  // compute-------------------------------------------------------
538  while (strat->Ll >= 0)
539  {
540 #ifdef KDEBUG
541  if (TEST_OPT_DEBUG) messageSets(strat);
542 #endif
543 
544  if (strat->Ll== 0) strat->interpt=TRUE;
545 
547  && ((strat->honey && (strat->L[strat->Ll].ecart+currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))
548  || ((!strat->honey) && (currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))))
549  {
550 
551 #ifdef KDEBUG
552 // if (TEST_OPT_DEBUG){PrintS("^^^^?");}
553 #endif
554 
555  // *stops computation if
556  // * 24 IN test and the degree +ecart of L[strat->Ll] is bigger then
557  // *a predefined number Kstd1_deg
558  while ((strat->Ll >= 0)
559  && ( (strat->homog==isHomog) || strat->L[strat->Ll].is_special || ((strat->L[strat->Ll].p1!=NULL) && (strat->L[strat->Ll].p2!=NULL)) )
560  && ((strat->honey && (strat->L[strat->Ll].ecart+currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))
561  || ((!strat->honey) && (currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg)))
562  )
563  {
564 #ifdef KDEBUG
565 // if (TEST_OPT_DEBUG){PrintS("^^^^^^^^^^^^!!!!");}
566 #endif
567  deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
568 // if (TEST_OPT_PROT) PrintS("^!");
569  }
570  if (strat->Ll<0) break;
571  else strat->noClearS=TRUE;
572  }
573 
574  // picks the last element from the lazyset L
575  strat->P = strat->L[strat->Ll];
576  strat->Ll--;
577 
578 
579 // assume(pNext(strat->P.p) != strat->tail);
580 
581  if(strat->P.IsNull()) continue;
582 
583  if (pNext(strat->P.p) == strat->tail)
584  {
585  // deletes the short spoly
586  pLmFree(strat->P.p);
587 
588  strat->P.p = nc_CreateSpoly(strat->P.p1, strat->P.p2, currRing);
589  if (strat->P.p!=NULL) strat->initEcart(&strat->P);
590  }// else
591 
592 
593  if(strat->P.IsNull()) continue;
594 
595  if (strat->P.p1 == NULL)
596  {
597 // if (strat->minim > 0)
598 // strat->P.p2=p_Copy(strat->P.p, currRing, strat->tailRing);
599 
600 
601  // for input polys, prepare reduction
602  strat->P.PrepareRed(strat->use_buckets);
603  }
604 
605  if (TEST_OPT_PROT)
606  message((strat->honey ? strat->P.ecart : 0) + strat->P.pFDeg(),
607  &olddeg,&reduc,strat, red_result);
608 
609  // reduction of the element chosen from L
610  red_result = strat->red(&strat->P,strat);
611 
612 
613  // reduction to non-zero new poly
614  if (red_result == 1)
615  {
616  // statistic
617  if (TEST_OPT_PROT) PrintS("s");
618 
619  // get the polynomial (canonicalize bucket, make sure P.p is set)
620  strat->P.GetP(strat->lmBin);
621 
622  int pos = posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
623 
624  // reduce the tail and normalize poly
626  {
627  strat->P.pCleardenom();
629  {
630  strat->P.p = redtailBba(&(strat->P),pos-1,strat, withT); // !!!
631  strat->P.pCleardenom();
632  }
633  }
634  else
635  {
636  strat->P.pNorm();
638  strat->P.p = redtailBba(&(strat->P),pos-1,strat, withT);
639  }
640  strat->P.is_normalized=nIsOne(pGetCoeff(strat->P.p));
641 
642 #ifdef KDEBUG
643  if (TEST_OPT_DEBUG){PrintS(" ns:");p_wrp(strat->P.p,currRing);PrintLn();}
644 #endif
645 
646 // // min_std stuff
647 // if ((strat->P.p1==NULL) && (strat->minim>0))
648 // {
649 // if (strat->minim==1)
650 // {
651 // strat->M->m[minimcnt]=p_Copy(strat->P.p,currRing,strat->tailRing);
652 // p_Delete(&strat->P.p2, currRing, strat->tailRing);
653 // }
654 // else
655 // {
656 // strat->M->m[minimcnt]=strat->P.p2;
657 // strat->P.p2=NULL;
658 // }
659 // if (strat->tailRing!=currRing && pNext(strat->M->m[minimcnt])!=NULL)
660 // pNext(strat->M->m[minimcnt])
661 // = strat->p_shallow_copy_delete(pNext(strat->M->m[minimcnt]),
662 // strat->tailRing, currRing,
663 // currRing->PolyBin);
664 // minimcnt++;
665 // }
666 
667  // enter into S, L, and T
668  //if(withT)
669  {
670  strat->P.SetpFDeg();
671  enterT(strat->P, strat);
672  }
673 
674  // L
675  enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
676 
677  // posInS only depends on the leading term
678  strat->enterS(strat->P, pos, strat, strat->tl);
679 
680 // if (hilb!=NULL) khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat);
681 
682 // Print("[%d]",hilbeledeg);
683  if (strat->P.lcm!=NULL) pLmFree(strat->P.lcm);
684 
685  // //////////////////////////////////////////////////////////
686  // SCA:
687  const poly pSave = strat->P.p;
688  const poly p_next = pNext(pSave);
689 
690 // if(0)
691  if( p_next != NULL )
692  for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ )
693  if( p_GetExp(pSave, i, currRing) != 0 )
694  {
695  assume(p_GetExp(pSave, i, currRing) == 1);
696  const poly p_new = sca_pp_Mult_xi_pp(i, p_next, currRing);
697 
698 #ifdef PDEBUG
699  p_Test(p_new, currRing);
700 #endif
701 
702  if( p_new == NULL) continue;
703 
704  LObject h(p_new); // h = x_i * strat->P
705 
706  h.is_special = TRUE;
707 
709  {
710  h.pCleardenom(); // also removes Content
711  }
712  else
713  {
714  h.pNorm();
715  }
716 
717  strat->initEcart(&h);
718  h.sev = pGetShortExpVector(h.p);
719 
720  int pos = 0;
721 
722  if (strat->Ll != -1)
723  pos = strat->posInL(strat->L,strat->Ll,&h,strat);
724 
725  enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);
726 
727 
728 
729 
730 #if 0
731  h.sev = pGetShortExpVector(h.p);
732  strat->initEcart(&h);
733 
734  h.PrepareRed(strat->use_buckets);
735 
736  // reduction of the element chosen from L(?)
737  red_result = strat->red(&h,strat);
738 
739  // reduction to non-zero new poly
740  if (red_result != 1) continue;
741 
742 
743  int pos = posInS(strat,strat->sl,h.p,h.ecart);
744 
745  // reduce the tail and normalize poly
747  {
748  h.pCleardenom();
750  {
751  h.p = redtailBba(&(h),pos-1,strat, withT); // !!!
752  h.pCleardenom();
753  }
754  }
755  else
756  {
757  h.pNorm();
759  h.p = redtailBba(&(h),pos-1,strat, withT);
760  }
761 
762 #ifdef KDEBUG
763  if (TEST_OPT_DEBUG){PrintS(" N:");h.wrp();PrintLn();}
764 #endif
765 
766 // h.PrepareRed(strat->use_buckets); // ???
767 
768  h.sev = pGetShortExpVector(h.p);
769  strat->initEcart(&h);
770 
771  if (strat->Ll==-1)
772  pos = 0;
773  else
774  pos = strat->posInL(strat->L,strat->Ll,&h,strat);
775 
776  enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);
777 // the end of "#if 0" (comment)
778 #endif
779 
780  } // for all x_i \in Ann(lm(P))
781  } // if red(P) != NULL
782 
783 // else if (strat->P.p1 == NULL && strat->minim > 0)
784 // {
785 // p_Delete(&strat->P.p2, currRing, strat->tailRing);
786 // }
787 
788 #ifdef KDEBUG
789 // memset(&(strat->P), 0, sizeof(strat->P));
790 #endif
791 
792  kTest_TS(strat); // even of T is not used!
793 
794 // Print("\n$\n");
795 
796  }
797 
798 #ifdef KDEBUG
799  if (TEST_OPT_DEBUG) messageSets(strat);
800 #endif
801 
802  // complete reduction of the standard basis---------
803 
804  if (TEST_OPT_REDSB)
805  {
806  completeReduce(strat);
807  }
808 
809  //release temp data--------------------------------
810 
811  exitBuchMora(strat); // cleanT!
812 
813  id_Delete(&tempF, currRing);
814 
815 // if (TEST_OPT_WEIGHTM)
816 // {
817 // pRestoreDegProcs(currRing, pFDegOld, pLDegOld);
818 // if (ecartWeights)
819 // {
820 // omFreeSize((ADDRESS)ecartWeights,(rVar(currRing)+1)*sizeof(short));
821 // ecartWeights=NULL;
822 // }
823 // }
824 
825  if (TEST_OPT_PROT) messageStat(hilbcount,strat);
826 
827 
828 
829  if (tempQ!=NULL) updateResult(strat->Shdl,tempQ,strat);
830 
831 
832  if (TEST_OPT_REDSB) // ???
833  {
834  // must be at the very end (after exitBuchMora) as it changes the S set!!!
835  ideal I = strat->Shdl;
836  ideal erg = kInterRedOld(I,tempQ);
837  assume(I!=erg);
838  id_Delete(&I, currRing);
839  strat->Shdl = erg;
840  }
841 
842 #if MYTEST
843  PrintS("\n\n</sca_bba>\n\n");
844 #endif
845 
846  if( currRing != save ) rChangeCurrRing(save);
847 
848  return (strat->Shdl);
849 }

◆ k_sca_gr_bba()

ideal k_sca_gr_bba ( const  ideal,
const  ideal,
const intvec ,
const intvec ,
kStrategy  ,
const ring  _currRing 
)

Modified Plural's Buchberger's algorithmus.

Definition at line 95 of file sca.cc.

96 {
97  const ring save = currRing;
98  if( currRing != _currRing ) rChangeCurrRing(_currRing);
99  assume( currRing == _currRing );
100 
101 
102 #if MYTEST
103  PrintS("<sca_gr_bba>\n");
104 #endif
105 
107 
108 #ifndef SING_NDEBUG
109  idTest(F);
110  idTest(Q);
111 #endif
112 
113 #ifdef HAVE_PLURAL
114 #if MYTEST
115  PrintS("currRing: \n");
116  rWrite(currRing);
117 #ifdef RDEBUG
119 #endif
120 
121  PrintS("F: \n");
122  idPrint(F);
123  PrintS("Q: \n");
124  idPrint(Q);
125 #endif
126 #endif
127 
128 
129  const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing);
130  const unsigned int m_iLastAltVar = scaLastAltVar(currRing);
131 
132  ideal tempF = id_KillSquares(F, m_iFirstAltVar, m_iLastAltVar, currRing);
133  ideal tempQ = Q;
134 
135  if(Q == currRing->qideal)
136  tempQ = SCAQuotient(currRing);
137 
138  strat->z2homog = id_IsSCAHomogeneous(tempF, NULL, NULL, currRing); // wCx == wCy == NULL!
139  // redo: no_prod_crit
140  const BOOLEAN bIsSCA = rIsSCA(currRing) && strat->z2homog; // for Z_2 prod-crit
141  strat->no_prod_crit = ! bIsSCA;
142 
143 // strat->homog = strat->homog && strat->z2homog; // ?
144 
145 #if MYTEST
146  {
147  PrintS("ideal tempF: \n");
148  idPrint(tempF);
149  PrintS("ideal tempQ: \n");
150  idPrint(tempQ);
151  }
152 #endif
153 
154  int olddeg, reduc;
155  int red_result = 1;
156 // int hilbeledeg = 1, minimcnt = 0;
157  int hilbcount = 0;
158 
159  initBuchMoraCrit(strat); // set Gebauer, honey, sugarCrit
160 
161  nc_gr_initBba(tempF,strat); // set enterS, red, initEcart, initEcartPair
162 
163  initBuchMoraPos(strat);
164 
165 
166  // ?? set spSpolyShort, reduce ???
167 
168  initBuchMora(tempF, tempQ, strat); // SCAQuotient(currRing) instead of Q == squares!!!!!!!
169 
170  strat->posInT=posInT110; // !!!
171 
172  reduc = olddeg = 0;
173 
174 
175  // compute-------------------------------------------------------
176  for(; strat->Ll >= 0;
177 #ifdef KDEBUG
178  strat->P.lcm = NULL,
179 #endif
180  kTest(strat)
181  )
182  {
183 #ifdef KDEBUG
184  if (TEST_OPT_DEBUG) messageSets(strat);
185 #endif
186 
187  if (strat->Ll== 0) strat->interpt=TRUE;
188 
190  && ((strat->honey
191  && (strat->L[strat->Ll].ecart+ currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))
192  || ((!strat->honey) && (currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))))
193  {
194  // stops computation if
195  // 24 IN test and the degree +ecart of L[strat->Ll] is bigger then
196  // a predefined number Kstd1_deg
197  while (strat->Ll >= 0) deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
198  break;
199  }
200 
201  // picks the last element from the lazyset L
202  strat->P = strat->L[strat->Ll];
203  strat->Ll--;
204 
205  //kTest(strat);
206 
207 // assume(pNext(strat->P.p) != strat->tail); // !???
208  if(strat->P.IsNull()) continue;
209 
210 
211  if( pNext(strat->P.p) == strat->tail )
212  {
213  // deletes the int spoly and computes SPoly
214  pLmFree(strat->P.p); // ???
215  strat->P.p = nc_CreateSpoly(strat->P.p1, strat->P.p2, currRing);
216  }
217 
218  if(strat->P.IsNull()) continue;
219 
220 // poly save = NULL;
221 //
222 // if(pNext(strat->P.p) != NULL)
223 // save = p_Copy(strat->P.p, currRing);
224 
225  strat->initEcart(&strat->P); // remove it?
226 
227  if (TEST_OPT_PROT)
228  message((strat->honey ? strat->P.ecart : 0) + strat->P.pFDeg(), &olddeg,&reduc,strat, red_result);
229 
230  // reduction of the element chosen from L wrt S
231  strat->red(&strat->P,strat);
232 
233  if(strat->P.IsNull()) continue;
234 
235  addLObject(strat->P, strat);
236 
237  const poly save = strat->P.p;
238 
239 #ifdef PDEBUG
240  p_Test(save, currRing);
241 #endif
242  assume( save != NULL );
243 
244  // SCA Specials:
245 
246  {
247  const poly p_next = pNext(save);
248 
249  if( p_next != NULL )
250  for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ )
251  if( p_GetExp(save, i, currRing) != 0 )
252  {
253  assume(p_GetExp(save, i, currRing) == 1);
254 
255  const poly tt = sca_pp_Mult_xi_pp(i, p_next, currRing);
256 
257 #ifdef PDEBUG
258  p_Test(tt, currRing);
259 #endif
260 
261  if( tt == NULL) continue;
262 
263  LObject h(tt); // h = x_i * P
264 
266  {
267  h.pCleardenom(); // also removes Content
268  }
269  else
270  {
271  h.pNorm();
272  }
273 
274  strat->initEcart(&h);
275 
276 
277 // if (pOrdSgn==-1)
278 // {
279 // cancelunit(&h); // tries to cancel a unit
280 // deleteHC(&h, strat);
281 // }
282 
283 // if(h.IsNull()) continue;
284 
285 // if (TEST_OPT_PROT)
286 // message((strat->honey ? h.ecart : 0) + h.pFDeg(), &olddeg, &reduc, strat, red_result);
287 
288 // strat->red(&h, strat); // wrt S
289 // if(h.IsNull()) continue;
290 
291 // poly save = p_Copy(h.p, currRing);
292 
293  int pos;
294 
295  if (strat->Ll==-1)
296  pos =0;
297  else
298  pos = strat->posInL(strat->L,strat->Ll,&h,strat);
299 
300  h.sev = pGetShortExpVector(h.p);
301  enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);
302 
303  // h.p = save;
304  // addLObject(h, strat);
305  }
306 
307  // p_Delete( &save, currRing );
308  }
309 
310 
311  } // for(;;)
312 
313 
314 #ifdef KDEBUG
315  if (TEST_OPT_DEBUG) messageSets(strat);
316 #endif
317 
318  if (TEST_OPT_REDSB){
319  completeReduce(strat); // ???
320  }
321 
322  // release temp data--------------------------------
323  exitBuchMora(strat);
324 
325 // if (TEST_OPT_WEIGHTM)
326 // {
327 // pRestoreDegProcs(currRing,pFDegOld, pLDegOld);
328 // if (ecartWeights)
329 // {
330 // omFreeSize((ADDRESS)ecartWeights,(rVar(currRing)+1)*sizeof(int));
331 // ecartWeights=NULL;
332 // }
333 // }
334 
335  if (TEST_OPT_PROT) messageStat(hilbcount,strat);
336 
337  if (tempQ!=NULL) updateResult(strat->Shdl,tempQ,strat);
338 
339  id_Delete(&tempF, currRing);
340 
341 
342  // complete reduction of the standard basis---------
343  if (TEST_OPT_REDSB){
344  ideal I = strat->Shdl;
345  ideal erg = kInterRedOld(I,tempQ);
346  assume(I!=erg);
347  id_Delete(&I, currRing);
348  strat->Shdl = erg;
349  }
350 
351 
352 #if MYTEST
353 // PrintS("</sca_gr_bba>\n");
354 #endif
355 
356  if( currRing != save ) rChangeCurrRing(save);
357 
358  return (strat->Shdl);
359 }

◆ k_sca_mora()

ideal k_sca_mora ( const  ideal,
const  ideal,
const intvec ,
const intvec ,
kStrategy  ,
const ring  _currRing 
)

Modified modern Sinuglar Mora's algorithm.

Definition at line 885 of file sca.cc.

886 {
887  const ring save = currRing;
888  if( currRing != _currRing ) rChangeCurrRing(_currRing);
889  assume( currRing == _currRing );
890 
892 
893  const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing);
894  const unsigned int m_iLastAltVar = scaLastAltVar(currRing);
895 
896  ideal tempF = id_KillSquares(F, m_iFirstAltVar, m_iLastAltVar, currRing);
897 
898  ideal tempQ = Q;
899 
900  if(Q == currRing->qideal)
901  tempQ = SCAQuotient(currRing);
902 
903  bool bIdHomog = id_IsSCAHomogeneous(tempF, NULL, NULL, currRing); // wCx == wCy == NULL!
904 
905  assume( !bIdHomog || strat->homog ); // bIdHomog =====[implies]>>>>> strat->homog
906 
907  strat->homog = strat->homog && bIdHomog;
908 
909 #ifdef PDEBUG
910  assume( strat->homog == bIdHomog );
911 #endif
912 
913  strat->update = TRUE;
914  //- setting global variables ------------------- -
915  initBuchMoraCrit(strat);
916 // initHilbCrit(F,NULL,&hilb,strat); // no Q!
917  initMora(tempF, strat);
918  initBuchMoraPos(strat);
919  //Shdl=
920  initBuchMora(tempF, tempQ, strat); // temp Q, F!
921 // if (TEST_OPT_FASTHC) missingAxis(&strat->lastAxis,strat);
922  // updateS in initBuchMora has Hecketest
923  // * and could have put strat->kHEdgdeFound FALSE
924 #if 0
925  if (ppNoether!=NULL)
926  {
927  strat->kHEdgeFound = TRUE;
928  }
929  if (strat->kHEdgeFound && strat->update)
930  {
931  firstUpdate(strat);
932  updateLHC(strat);
933  reorderL(strat);
934  }
935  if (TEST_OPT_FASTHC && (strat->lastAxis) && strat->posInLOldFlag)
936  {
937  strat->posInLOld = strat->posInL;
938  strat->posInLOldFlag = FALSE;
939  strat->posInL = posInL10;
940  updateL(strat);
941  reorderL(strat);
942  }
943 #endif
944  strat->use_buckets = kMoraUseBucket(strat);
945 
946  kTest_TS(strat);
947 
948 
949  int olddeg = 0;
950  int reduc = 0;
951  int red_result = 1;
952 // int hilbeledeg=1;
953  int hilbcount=0;
954 
955 
956  //- compute-------------------------------------------
957 
958 #undef HAVE_TAIL_RING
959 
960 #ifdef HAVE_TAIL_RING
961 // if (strat->homog && strat->red == redFirst)
962 // kStratInitChangeTailRing(strat);
963 #endif
964 
965 
966 
967 
968 
969 // due to std( SB, p)
970  if(TEST_OPT_SB_1)
971  {
972  for (int iNewElement = strat->newIdeal; iNewElement < IDELEMS(tempF); iNewElement++)
973  {
974 
975  const poly pSave = tempF->m[iNewElement];
976 
977  if( pSave != NULL )
978  {
979 // tempF->m[iNewElement] = NULL;
980 
981  const poly p_next = pNext(pSave);
982 
983  if(p_next != NULL)
984  for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ )
985  if( p_GetExp(pSave, i, currRing) != 0 )
986  {
987 
988  assume(p_GetExp(pSave, i, currRing) == 1);
989 
990  const poly p_new = sca_pp_Mult_xi_pp(i, p_next, currRing);
991 
992 #ifdef PDEBUG
993  p_Test(p_new, currRing);
994 #endif
995 
996  if( p_new == NULL) continue;
997 
998  LObject h(p_new); // h = x_i * strat->P
999 
1001  h.pCleardenom(); // also removes Content
1002  else
1003  h.pNorm();
1004 
1005  strat->initEcart(&h);
1006  h.sev = pGetShortExpVector(h.p);
1007 
1008  int pos = 0;
1009 
1010  if (strat->Ll != -1)
1011  pos = strat->posInL(strat->L,strat->Ll,&h,strat);
1012 
1013  enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);
1014  }
1015  }
1016 
1017  }
1018  }
1019 
1020  while (strat->Ll >= 0)
1021  {
1022  //test_int_std(strat->kIdeal);
1023 #ifdef KDEBUG
1024  if (TEST_OPT_DEBUG) messageSets(strat);
1025 #endif
1026  if (TEST_OPT_DEGBOUND
1027  && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()> Kstd1_deg))
1028  {
1029  // * stops computation if
1030  // * - 24 (degBound)
1031  // * && upper degree is bigger than Kstd1_deg
1032  while ((strat->Ll >= 0)
1033  && (strat->L[strat->Ll].p1!=NULL) && (strat->L[strat->Ll].p2!=NULL)
1034  && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()> Kstd1_deg)
1035  )
1036  {
1037  deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
1038  //if (TEST_OPT_PROT)
1039  //{
1040  // PrintS("D"); mflush();
1041  //}
1042  }
1043  if (strat->Ll<0) break;
1044  else strat->noClearS=TRUE;
1045  }
1046  strat->P = strat->L[strat->Ll];// - picks the last element from the lazyset L -
1047  if (strat->Ll==0) strat->interpt=TRUE;
1048  strat->Ll--;
1049 
1050  // create the real Spoly
1051 // assume(pNext(strat->P.p) != strat->tail);
1052 
1053  if(strat->P.IsNull()) continue;
1054 
1055 
1056  if( pNext(strat->P.p) == strat->tail )
1057  {
1058  // deletes the int spoly and computes SPoly
1059  pLmFree(strat->P.p); // ???
1060  strat->P.p = nc_CreateSpoly(strat->P.p1, strat->P.p2, currRing);
1061  }
1062 
1063 
1064 
1065  if (strat->P.p1 == NULL)
1066  {
1067  // for input polys, prepare reduction (buckets !)
1068  strat->P.SetLength(strat->length_pLength);
1069  strat->P.PrepareRed(strat->use_buckets);
1070  }
1071 
1072  if (!strat->P.IsNull())
1073  {
1074  // might be NULL from noether !!!
1075  if (TEST_OPT_PROT)
1076  message(strat->P.ecart+strat->P.GetpFDeg(),&olddeg,&reduc,strat, red_result);
1077  // reduce
1078  red_result = strat->red(&strat->P,strat);
1079  }
1080 
1081  if (! strat->P.IsNull())
1082  {
1083  strat->P.GetP();
1084  // statistics
1085  if (TEST_OPT_PROT) PrintS("s");
1086  // normalization
1087  if (!TEST_OPT_INTSTRATEGY)
1088  strat->P.pNorm();
1089  // tailreduction
1090  strat->P.p = redtail(&(strat->P),strat->sl,strat);
1091  // set ecart -- might have changed because of tail reductions
1092  if ((!strat->noTailReduction) && (!strat->honey))
1093  strat->initEcart(&strat->P);
1094  // cancel unit
1095  cancelunit(&strat->P);
1096  // for char 0, clear denominators
1098  strat->P.pCleardenom();
1099 
1100  // put in T
1101  enterT(strat->P,strat);
1102  // build new pairs
1103  enterpairs(strat->P.p,strat->sl,strat->P.ecart,0,strat, strat->tl);
1104  // put in S
1105  strat->enterS(strat->P,
1106  posInS(strat,strat->sl,strat->P.p, strat->P.ecart),
1107  strat, strat->tl);
1108 
1109 
1110  // clear strat->P
1111  if (strat->P.lcm!=NULL) pLmFree(strat->P.lcm);
1112  strat->P.lcm=NULL;
1113 
1114  // //////////////////////////////////////////////////////////
1115  // SCA:
1116  const poly pSave = strat->P.p;
1117  const poly p_next = pNext(pSave);
1118 
1119  if(p_next != NULL)
1120  for( unsigned int i = m_iFirstAltVar; i <= m_iLastAltVar; i++ )
1121  if( p_GetExp(pSave, i, currRing) != 0 )
1122  {
1123 
1124  assume(p_GetExp(pSave, i, currRing) == 1);
1125 
1126  const poly p_new = sca_pp_Mult_xi_pp(i, p_next, currRing);
1127 
1128 #ifdef PDEBUG
1129  p_Test(p_new, currRing);
1130 #endif
1131 
1132  if( p_new == NULL) continue;
1133 
1134  LObject h(p_new); // h = x_i * strat->P
1135 
1137  h.pCleardenom(); // also removes Content
1138  else
1139  h.pNorm();
1140 
1141  strat->initEcart(&h);
1142  h.sev = pGetShortExpVector(h.p);
1143 
1144  int pos = 0;
1145 
1146  if (strat->Ll != -1)
1147  pos = strat->posInL(strat->L,strat->Ll,&h,strat);
1148 
1149  enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);
1150  }
1151 
1152 #ifdef KDEBUG
1153  // make sure kTest_TS does not complain about strat->P
1154  memset(&strat->P,0,sizeof(strat->P));
1155 #endif
1156  }
1157 #if 0
1158  if (strat->kHEdgeFound)
1159  {
1160  if ((TEST_OPT_FINDET)
1161  || ((TEST_OPT_MULTBOUND) && (scMult0Int((strat->Shdl)) < mu)))
1162  {
1163  // obachman: is this still used ???
1164  // * stops computation if strat->kHEdgeFound and
1165  // * - 27 (finiteDeterminacyTest)
1166  // * or
1167  // * - 23
1168  // * (multBound)
1169  // * && multiplicity of the ideal is smaller then a predefined number mu
1170  while (strat->Ll >= 0) deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
1171  }
1172  }
1173 #endif
1174  kTest_TS(strat);
1175  }
1176  // - complete reduction of the standard basis------------------------ -
1177  if (TEST_OPT_REDSB) completeReduce(strat);
1178  // - release temp data------------------------------- -
1179  exitBuchMora(strat);
1180  // - polynomials used for HECKE: HC, noether -
1181  if (TEST_OPT_FINDET)
1182  {
1183  if (strat->kHEdge!=NULL)
1184  Kstd1_mu=currRing->pFDeg(strat->kHEdge,currRing);
1185  else
1186  Kstd1_mu=-1;
1187  }
1188  if(strat->kHEdge!=NULL) pLmFree(&strat->kHEdge);
1189  strat->update = TRUE; //???
1190  strat->lastAxis = 0; //???
1191  pDelete(&strat->kNoether);
1192  omFreeSize((ADDRESS)strat->NotUsedAxis,(rVar(currRing)+1)*sizeof(BOOLEAN));
1193  if (TEST_OPT_PROT) messageStat(hilbcount,strat);
1194 // if (TEST_OPT_WEIGHTM)
1195 // {
1196 // pRestoreDegProcs(currRing, pFDegOld, pLDegOld);
1197 // if (ecartWeights)
1198 // {
1199 // omFreeSize((ADDRESS)ecartWeights,(rVar(currRing)+1)*sizeof(short));
1200 // ecartWeights=NULL;
1201 // }
1202 // }
1203  if (tempQ!=NULL) updateResult(strat->Shdl,tempQ,strat);
1204  idTest(strat->Shdl);
1205 
1206  id_Delete( &tempF, currRing);
1207 
1208  if( currRing != save ) rChangeCurrRing(save);
1209 
1210  return (strat->Shdl);
1211 }

Variable Documentation

◆ gnc_gr_bba

BBA_Proc gnc_gr_bba

Definition at line 67 of file old.gring.cc.

◆ gnc_gr_mora

BBA_Proc gnc_gr_mora

Definition at line 68 of file old.gring.cc.

◆ nc_NF

NF_Proc nc_NF

Definition at line 66 of file old.gring.cc.

◆ sca_bba

BBA_Proc sca_bba

Definition at line 69 of file old.gring.cc.

◆ sca_gr_bba

BBA_Proc sca_gr_bba

Definition at line 71 of file old.gring.cc.

◆ sca_mora

BBA_Proc sca_mora

Definition at line 70 of file old.gring.cc.

clearS
KINLINE void clearS(poly p, unsigned long p_sev, int *at, int *k, kStrategy strat)
Definition: kInline.h:1107
updateL
void updateL(kStrategy strat)
Definition: kstd1.cc:1042
kStratInitChangeTailRing
void kStratInitChangeTailRing(kStrategy strat)
Definition: kutil.cc:11127
FALSE
#define FALSE
Definition: auxiliary.h:94
initBuchMoraCrit
void initBuchMoraCrit(kStrategy strat)
Definition: kutil.cc:9548
p_GetExp
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
Definition: p_polys.h:457
j
int j
Definition: facHensel.cc:105
pNorm
void pNorm(poly p, const ring R=currRing)
Definition: polys.h:337
TEST_OPT_PROT
#define TEST_OPT_PROT
Definition: options.h:101
k
int k
Definition: cfEzgcd.cc:92
pLmFree
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced
Definition: polys.h:68
TEST_OPT_REDTAIL
#define TEST_OPT_REDTAIL
Definition: options.h:114
rDebugPrint
void rDebugPrint(const ring r)
Definition: ring.cc:3997
posInL0
int posInL0(const LSet set, const int length, LObject *p, const kStrategy)
Definition: kutil.cc:5964
rChangeCurrRing
void rChangeCurrRing(ring r)
Definition: polys.cc:15
TEST_OPT_DEGBOUND
#define TEST_OPT_DEGBOUND
Definition: options.h:111
reorderL
void reorderL(kStrategy strat)
Definition: kstd1.cc:868
ADDRESS
void * ADDRESS
Definition: auxiliary.h:133
redtail
poly redtail(LObject *L, int end_pos, kStrategy strat)
Definition: kutil.cc:7303
TEST_OPT_MULTBOUND
#define TEST_OPT_MULTBOUND
Definition: options.h:112
updateResult
void updateResult(ideal r, ideal Q, kStrategy strat)
Definition: kutil.cc:10180
posInT110
int posInT110(const TSet set, const int length, LObject &p)
Definition: kutil.cc:5378
gnc_gr_bba
BBA_Proc gnc_gr_bba
Definition: old.gring.cc:67
kInterRedOld
ideal kInterRedOld(ideal F, ideal Q)
Definition: kstd1.cc:3018
TEST_OPT_DEBUG
#define TEST_OPT_DEBUG
Definition: options.h:106
p_Test
#define p_Test(p, r)
Definition: p_polys.h:155
p_wrp
void p_wrp(poly p, ring lmRing, ring tailRing)
Definition: polys0.cc:234
pGetShortExpVector
#define pGetShortExpVector(a)
returns the "Short Exponent Vector" – used to speed up divisibility tests (see polys-impl....
Definition: polys.h:146
idTest
#define idTest(id)
Definition: ideals.h:46
posInS
int posInS(const kStrategy strat, const int length, const poly p, const int ecart_p)
Definition: kutil.cc:4934
pDelete
#define pDelete(p_ptr)
Definition: polys.h:166
Kstd1_mu
int Kstd1_mu
Definition: kutil.cc:236
idIs0
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
Definition: simpleideals.cc:767
loop
#define loop
Definition: structs.h:77
nc_gr_initBba
void nc_gr_initBba(ideal F, kStrategy strat)
nc_gr_initBba is needed for sca_gr_bba and gr_bba.
Definition: gr_kstd2.cc:965
TEST_OPT_REDSB
#define TEST_OPT_REDSB
Definition: options.h:102
test_PosInL
int(* test_PosInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kstd2.cc:81
mu
void mu(int **points, int sizePoints)
Definition: cfNewtonPolygon.cc:467
TEST_OPT_FINDET
#define TEST_OPT_FINDET
Definition: options.h:109
kTest
#define kTest(A)
Definition: kutil.h:640
currRing
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13
rVar
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:582
nc_gr_initBba
void nc_gr_initBba(ideal F, kStrategy strat)
nc_gr_initBba is needed for sca_gr_bba and gr_bba.
Definition: gr_kstd2.cc:965
test_PosInT
int(* test_PosInT)(const TSet T, const int tl, LObject &h)
Definition: kstd2.cc:80
TRUE
#define TRUE
Definition: auxiliary.h:98
TEST_OPT_INTSTRATEGY
#define TEST_OPT_INTSTRATEGY
Definition: options.h:108
i
int i
Definition: cfEzgcd.cc:125
id_Delete
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
Definition: simpleideals.cc:113
p_LmIsConstantRat
BOOLEAN p_LmIsConstantRat(const poly p, const ring r)
Definition: ratgring.cc:642
nIsOne
#define nIsOne(n)
Definition: numbers.h:25
firstUpdate
void firstUpdate(kStrategy strat)
Definition: kstd1.cc:1206
kMoraUseBucket
static BOOLEAN kMoraUseBucket(kStrategy)
Definition: sca.cc:858
TEST_OPT_NOT_BUCKETS
#define TEST_OPT_NOT_BUCKETS
Definition: options.h:103
PrintS
void PrintS(const char *s)
Definition: reporter.cc:283
omFreeSize
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:258
BOOLEAN
int BOOLEAN
Definition: auxiliary.h:85
message
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
Definition: kutil.cc:7727
TEST_OPT_OLDSTD
#define TEST_OPT_OLDSTD
Definition: options.h:120
scaFirstAltVar
static short scaFirstAltVar(ring r)
Definition: sca.h:18
rField_is_Ring
static BOOLEAN rField_is_Ring(const ring r)
Definition: ring.h:476
completeReduce
void completeReduce(kStrategy strat, BOOLEAN withT)
Definition: kutil.cc:10392
exitBuchMora
void exitBuchMora(kStrategy strat)
Definition: kutil.cc:9947
h
static Poly * h
Definition: janet.cc:972
rIsRatGRing
static BOOLEAN rIsRatGRing(const ring r)
Definition: ring.h:414
initBuchMora
void initBuchMora(ideal F, ideal Q, kStrategy strat)
Definition: kutil.cc:9871
pOne
#define pOne()
Definition: polys.h:289
posInL10
int posInL10(const LSet set, const int length, LObject *p, const kStrategy strat)
Definition: kstd1.cc:1009
id_IsSCAHomogeneous
static bool id_IsSCAHomogeneous(const ideal id, const intvec *wCx, const intvec *wCy, const ring r)
Definition: sca.h:115
isHomog
Definition: structs.h:39
p_Cleardenom
poly p_Cleardenom(poly p, const ring r)
Definition: p_polys.cc:2779
kTest_TS
#define kTest_TS(A)
Definition: kutil.h:641
initBuchMoraPos
void initBuchMoraPos(kStrategy strat)
Definition: kutil.cc:9698
addLObject
void addLObject(LObject &h, kStrategy &strat)
Definition: sca.cc:23
sca_pp_Mult_xi_pp
poly sca_pp_Mult_xi_pp(short i, const poly pPoly, const ring rRing)
Definition: sca.cc:1201
messageStat
void messageStat(int hilbcount, kStrategy strat)
Definition: kutil.cc:7768
messageSets
#define messageSets(s)
Definition: kutil.h:532
kDebugPrint
void kDebugPrint(kStrategy strat)
Definition: kutil.cc:11574
Kstd1_deg
int Kstd1_deg
Definition: kutil.cc:235
nc_rat_CreateSpoly
poly nc_rat_CreateSpoly(poly pp1, poly pp2, int ishift, const ring r)
Definition: ratgring.cc:340
initBba
void initBba(kStrategy strat)
Definition: kstd1.cc:1337
p_Delete
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:842
idPrint
#define idPrint(id)
Definition: ideals.h:45
redtailBba
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize)
Definition: kInline.h:1087
rWrite
void rWrite(ring r, BOOLEAN details)
Definition: ring.cc:226
BVERBOSE
#define BVERBOSE(a)
Definition: options.h:34
scaLastAltVar
static short scaLastAltVar(ring r)
Definition: sca.h:25
initMora
void initMora(ideal F, kStrategy strat)
Definition: kstd1.cc:1460
id_KillSquares
ideal id_KillSquares(const ideal id, const short iFirstAltVar, const short iLastAltVar, const ring r, const bool bSkipZeroes)
Definition: sca.cc:1518
WarnS
#define WarnS
Definition: emacs.cc:77
assume
#define assume(x)
Definition: mod2.h:384
NULL
#define NULL
Definition: omList.c:9
SCAQuotient
ideal SCAQuotient(const ring r)
Definition: sca.h:10
TEST_OPT_SB_1
#define TEST_OPT_SB_1
Definition: options.h:116
LObject
class sLObject LObject
Definition: kutil.h:53
cancelunit
void cancelunit(LObject *L, BOOLEAN inNF)
Definition: kutil.cc:331
enterL
void enterL(LSet *set, int *length, int *LSetmax, LObject p, int at)
Definition: kutil.cc:1214
deleteInL
void deleteInL(LSet set, int *length, int j, kStrategy strat)
Definition: kutil.cc:1151
enterpairs
void enterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
Definition: kutil.cc:4758
IDELEMS
#define IDELEMS(i)
Definition: simpleideals.h:24
nc_CreateSpoly
static poly nc_CreateSpoly(const poly p1, const poly p2, const ring r)
Definition: nc.h:250
Q
#define Q
Definition: sirandom.c:25
pGetCoeff
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
Definition: monomials.h:48
PrintLn
void PrintLn()
Definition: reporter.cc:309
rIsSCA
static bool rIsSCA(const ring r)
Definition: nc.h:198
pNext
#define pNext(p)
Definition: monomials.h:40
enterT
void enterT(LObject &p, kStrategy strat, int atT)
Definition: kutil.cc:9269
TEST_OPT_FASTHC
#define TEST_OPT_FASTHC
Definition: options.h:107
scMult0Int
int scMult0Int(ideal S, ideal Q, const ring tailRing)
Definition: hdegree.cc:919
updateLHC
void updateLHC(kStrategy strat)
Definition: kstd1.cc:1113
pWrite
void pWrite(poly p)
Definition: polys.h:282
wrp
void wrp(poly p)
Definition: polys.h:284