My Project  debian-1:4.1.1-p2+ds-4build1
Macros | Functions
sca.cc File Reference
#include "kernel/mod2.h"
#include "misc/options.h"
#include "polys/simpleideals.h"
#include "polys/prCopy.h"
#include "polys/nc/sca.h"
#include "polys/nc/gb_hack.h"
#include "kernel/polys.h"
#include "kernel/ideals.h"
#include "kernel/GBEngine/kstd1.h"
#include "kernel/GBEngine/kutil.h"
#include "kernel/GBEngine/nc.h"

Go to the source code of this file.

Macros

#define PLURAL_INTERNAL_DECLARATIONS
 
#define NO_BUCKETS
 

Functions

void nc_gr_initBba (ideal F, kStrategy strat)
 nc_gr_initBba is needed for sca_gr_bba and gr_bba. More...
 
void addLObject (LObject &h, kStrategy &strat)
 
ideal k_sca_gr_bba (const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing)
 Modified Plural's Buchberger's algorithmus. More...
 
ideal k_sca_bba (const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing)
 Modified modern Sinuglar Buchberger's algorithm. More...
 
static BOOLEAN kMoraUseBucket (kStrategy)
 
ideal k_sca_mora (const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing)
 Modified modern Sinuglar Mora's algorithm. More...
 

Macro Definition Documentation

◆ NO_BUCKETS

#define NO_BUCKETS

◆ PLURAL_INTERNAL_DECLARATIONS

#define PLURAL_INTERNAL_DECLARATIONS

Definition at line 1 of file sca.cc.

Function Documentation

◆ addLObject()

void addLObject ( LObject h,
kStrategy strat 
)

Definition at line 23 of file sca.cc.

24 {
25  if(h.IsNull()) return;
26 
27  strat->initEcart(&h);
28  h.sev=0; // pGetShortExpVector(h.p);
29 
30  // add h into S and L
31  int pos=posInS(strat, strat->sl, h.p, h.ecart);
32 
33  if ( (pos <= strat->sl) && (p_ComparePolys(h.p, strat->S[pos], currRing)) )
34  {
35  if (TEST_OPT_PROT)
36  PrintS("d\n");
37  }
38  else
39  {
41  {
43  }
44  else
45  {
46  pNorm(h.p);
47  }
48 
49  if ((strat->syzComp==0)||(!strat->homog))
50  {
51  h.p = redtailBba(h.p,pos-1,strat);
52 
54  {
56  }
57  else
58  {
59  pNorm(h.p);
60  }
61  }
62 
63  if(h.IsNull()) return;
64 
65  // statistic
66  if (TEST_OPT_PROT)
67  {
68  PrintS("s\n");
69  }
70 
71 #ifdef KDEBUG
72  if (TEST_OPT_DEBUG)
73  {
74  PrintS("new s:");
75  wrp(h.p);
76  PrintLn();
77  }
78 #endif
79 
80  enterpairs(h.p, strat->sl, h.ecart, 0, strat);
81 
82  pos=0;
83 
84  if (strat->sl!=-1) pos = posInS(strat, strat->sl, h.p, h.ecart);
85  strat->enterS(h, pos, strat, -1);
86 // enterT(h, strat); // ?!
87 
88  if (h.lcm!=NULL) pLmFree(h.lcm);
89  }
90 
91 
92 }

◆ k_sca_bba()

ideal k_sca_bba ( const ideal  F,
const ideal  Q,
const intvec ,
const intvec ,
kStrategy  strat,
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  F,
const ideal  Q,
const intvec ,
const intvec ,
kStrategy  strat,
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  F,
const ideal  Q,
const intvec ,
const intvec ,
kStrategy  strat,
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 }

◆ kMoraUseBucket()

static BOOLEAN kMoraUseBucket ( kStrategy  )
static

Definition at line 858 of file sca.cc.

860 {
861 #ifdef MORA_USE_BUCKETS
863  return FALSE;
864  if (strat->red == redFirst)
865  {
866 #ifdef NO_LDEG
867  if (!strat->syzComp)
868  return TRUE;
869 #else
870  if ((strat->homog || strat->honey) && !strat->syzComp)
871  return TRUE;
872 #endif
873  }
874  else
875  {
876  assume(strat->red == redEcart);
877  if (strat->honey && !strat->syzComp)
878  return TRUE;
879  }
880 #endif
881  return FALSE;
882 }

◆ nc_gr_initBba()

void nc_gr_initBba ( ideal  F,
kStrategy  strat 
)

nc_gr_initBba is needed for sca_gr_bba and gr_bba.

Definition at line 965 of file gr_kstd2.cc.

969 {
971 
972  // int i;
973 // idhdl h;
974  /* setting global variables ------------------- */
975  strat->enterS = enterSBba;
976 
977 /*
978  if ((BTEST1(20)) && (!strat->honey))
979  strat->red = nc_redBest;
980  else if (strat->honey)
981  strat->red = nc_redHoney;
982  else if (currRing->pLexOrder && !strat->homog)
983  strat->red = nc_redLazy;
984  else if (TEST_OPT_INTSTRATEGY && strat->homog)
985  strat->red = nc_redHomog0;
986  else
987  strat->red = nc_redHomog;
988 */
989 
990 // if (rIsPluralRing(currRing))
991  strat->red = redGrFirst;
992 #ifdef HAVE_RATGRING
993  if (rIsRatGRing(currRing))
994  {
995  int ii=IDELEMS(F)-1;
996  int jj;
997  BOOLEAN is_rat_id=FALSE;
998  for(;ii>=0;ii--)
999  {
1000  for(jj=currRing->real_var_start;jj<=currRing->real_var_end;jj++)
1001  {
1002  if(pGetExp(F->m[ii],jj)>0) { is_rat_id=TRUE; break; }
1003  }
1004  if (is_rat_id) break;
1005  }
1006  if (is_rat_id) strat->red=redGrRatGB;
1007  }
1008 #endif
1009 
1010  if (currRing->pLexOrder && strat->honey)
1011  strat->initEcart = initEcartNormal;
1012  else
1013  strat->initEcart = initEcartBBA;
1014  if (strat->honey)
1016  else
1018 // if ((TEST_OPT_WEIGHTM)&&(F!=NULL))
1019 // {
1020 // //interred machen Aenderung
1021 // pFDegOld=currRing->pFDeg;
1022 // pLDegOld=currRing->pLDeg;
1023 // // h=ggetid("ecart");
1024 // // if ((h!=NULL) && (IDTYP(h)==INTVEC_CMD))
1025 // // {
1026 // // ecartWeights=iv2array(IDINTVEC(h));
1027 // // }
1028 // // else
1029 // {
1030 // ecartWeights=(short *)omAlloc(((currRing->N)+1)*sizeof(short));
1031 // /*uses automatic computation of the ecartWeights to set them*/
1032 // kEcartWeights(F->m,IDELEMS(F)-1,ecartWeights);
1033 // }
1034 // currRing->pFDeg=totaldegreeWecart;
1035 // currRing->pLDeg=maxdegreeWecart;
1036 // for(i=1; i<=(currRing->N); i++)
1037 // Print(" %d",ecartWeights[i]);
1038 // PrintLn();
1039 // mflush();
1040 // }
1041 }
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
skStrategy::no_prod_crit
char no_prod_crit
Definition: kutil.h:387
initBuchMoraCrit
void initBuchMoraCrit(kStrategy strat)
Definition: kutil.cc:9548
skStrategy::tail
poly tail
Definition: kutil.h:326
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
pNorm
void pNorm(poly p, const ring R=currRing)
Definition: polys.h:337
skStrategy::enterS
void(* enterS)(LObject &h, int pos, kStrategy strat, int atR)
Definition: kutil.h:276
TEST_OPT_PROT
#define TEST_OPT_PROT
Definition: options.h:101
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
rChangeCurrRing
void rChangeCurrRing(ring r)
Definition: polys.cc:15
TEST_OPT_DEGBOUND
#define TEST_OPT_DEGBOUND
Definition: options.h:111
skStrategy::P
LObject P
Definition: kutil.h:292
reorderL
void reorderL(kStrategy strat)
Definition: kstd1.cc:868
pGetExp
#define pGetExp(p, i)
Exponent.
Definition: polys.h:40
ADDRESS
void * ADDRESS
Definition: auxiliary.h:133
redtail
poly redtail(LObject *L, int end_pos, kStrategy strat)
Definition: kutil.cc:7303
skStrategy::posInLOld
int(* posInLOld)(const LSet Ls, const int Ll, LObject *Lo, const kStrategy strat)
Definition: kutil.h:278
p_ComparePolys
BOOLEAN p_ComparePolys(poly p1, poly p2, const ring r)
returns TRUE if p1 is a skalar multiple of p2 assume p1 != NULL and p2 != NULL
Definition: p_polys.cc:4456
skStrategy::L
LSet L
Definition: kutil.h:317
skStrategy::S
polyset S
Definition: kutil.h:296
skStrategy::z2homog
char z2homog
Definition: kutil.h:367
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
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
skStrategy::homog
char homog
Definition: kutil.h:365
pDelete
#define pDelete(p_ptr)
Definition: polys.h:166
skStrategy::honey
char honey
Definition: kutil.h:370
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
skStrategy::Lmax
int Lmax
Definition: kutil.h:343
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
rIsPluralRing
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:403
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
initEcartPairBba
void initEcartPairBba(LObject *Lp, poly, poly, int, int)
Definition: kutil.cc:1253
rVar
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:582
test_PosInT
int(* test_PosInT)(const TSet T, const int tl, LObject &h)
Definition: kstd2.cc:80
skStrategy::update
char update
Definition: kutil.h:374
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
nIsOne
#define nIsOne(n)
Definition: numbers.h:25
skStrategy::sl
int sl
Definition: kutil.h:340
firstUpdate
void firstUpdate(kStrategy strat)
Definition: kstd1.cc:1206
redGrFirst
int redGrFirst(LObject *h, kStrategy strat)
Definition: gr_kstd2.cc:53
enterSBba
void enterSBba(LObject &p, int atS, kStrategy strat, int atR)
Definition: kutil.cc:9028
kMoraUseBucket
static BOOLEAN kMoraUseBucket(kStrategy)
Definition: sca.cc:858
TEST_OPT_NOT_BUCKETS
#define TEST_OPT_NOT_BUCKETS
Definition: options.h:103
initEcartNormal
void initEcartNormal(TObject *h)
Definition: kutil.cc:1238
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
redGrRatGB
int redGrRatGB(LObject *h, kStrategy strat)
Definition: gr_kstd2.cc:225
message
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
Definition: kutil.cc:7727
redEcart
int redEcart(LObject *h, kStrategy strat)
Definition: kstd1.cc:167
TEST_OPT_OLDSTD
#define TEST_OPT_OLDSTD
Definition: options.h:120
skStrategy::newIdeal
int newIdeal
Definition: kutil.h:349
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
skStrategy::posInL
int(* posInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.h:274
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
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
skStrategy::kHEdgeFound
char kHEdgeFound
Definition: kutil.h:369
messageSets
#define messageSets(s)
Definition: kutil.h:532
kDebugPrint
void kDebugPrint(kStrategy strat)
Definition: kutil.cc:11574
skStrategy::syzComp
int syzComp
Definition: kutil.h:346
Kstd1_deg
int Kstd1_deg
Definition: kutil.cc:235
skStrategy::interpt
char interpt
Definition: kutil.h:364
initBba
void initBba(kStrategy strat)
Definition: kstd1.cc:1337
skStrategy::Ll
int Ll
Definition: kutil.h:343
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
skStrategy::initEcartPair
void(* initEcartPair)(LObject *h, poly f, poly g, int ecartF, int ecartG)
Definition: kutil.h:277
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
assume
#define assume(x)
Definition: mod2.h:384
NULL
#define NULL
Definition: omList.c:9
skStrategy::posInLOldFlag
char posInLOldFlag
Definition: kutil.h:375
SCAQuotient
ideal SCAQuotient(const ring r)
Definition: sca.h:10
skStrategy::noClearS
char noClearS
Definition: kutil.h:395
skStrategy::length_pLength
char length_pLength
Definition: kutil.h:380
skStrategy::lastAxis
int lastAxis
Definition: kutil.h:348
redFirst
int redFirst(LObject *h, kStrategy strat)
Definition: kstd1.cc:529
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
skStrategy::initEcart
void(* initEcart)(TObject *L)
Definition: kutil.h:270
skStrategy::red
int(* red)(LObject *L, kStrategy strat)
Definition: kutil.h:268
initEcartBBA
void initEcartBBA(TObject *h)
Definition: kutil.cc:1246
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
skStrategy::posInT
int(* posInT)(const TSet T, const int tl, LObject &h)
Definition: kutil.h:271
Q
#define Q
Definition: sirandom.c:25
initEcartPairMora
void initEcartPairMora(LObject *Lp, poly, poly, int ecartF, int ecartG)
Definition: kutil.cc:1260
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
skStrategy::use_buckets
char use_buckets
Definition: kutil.h:376
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
wrp
void wrp(poly p)
Definition: polys.h:284