481{
482 int olddeg,reduc=0;
483 int red_result = 1;
484 reduc = olddeg = 0;
485
486 if ((strat->
Ll==-1) && (strat->
sl>=0))
487 {
489 }
491 while (strat->
Ll >= 0)
492 {
499 {
500
501
502
503
504
506 break;
507 }
508
509 strat->
P = strat->
L[strat->
Ll];
512 {
513
515
519 }
521 {
524 }
525 else
526 {
529 }
530
532 red_result = strat->
red(&strat->
P,strat);
533 if (strat->
P.p !=
NULL)
534 {
535
537 ideal fac;
538 ideal fac_copy;
539
541 {
543 {
546 }
547 else
548 {
551 }
553 {
557 {
559 fac->m[0]=strat->
P.p;
561 }
562 else
563 {
565 }
566 }
567 }
570
572 {
573 int ii;
576 {
581 }
582 else
583 {
585 }
586
588
591
592
593 int pos;
594 if (n->
sl==-1) pos=0;
596
597
599 {
602 {
605 }
606 }
607 else
608 {
612 {
614 }
615 }
617
619 {
623 }
627 {
630 {
632 for(ii=0; ii<=n->
tl; ii++)
633 {
634 if (n->
R[ii]->p==n->
L[
i].p1) { n->
L[
i].i_r1=ii;
break; }
635 }
637 for(ii=0; ii<=n->
tl; ii++)
638 {
639 if (n->
R[ii]->p==n->
L[
i].p2) { n->
L[
i].i_r2=ii;
break; }
640 }
641 }
642 }
644
646 {
648 {
651 }
652 else
653 {
655 ideal r=
idAdd(n->
D,fac_copy);
658 }
660 {
664 }
665 }
666
667 fac_copy->m[
i]=
pCopy(fac->m[
i]);
669
670
672 {
675 {
677 {
681 {
683 {
684 Print(
"empty set s(%d) because: D[%d]:", n->
nr,
j);
687 }
688
690
692 {
695 {
696 if (n->
S[
i]==n->
T[n->
tl].p)
697 {
699 break;
700 }
702 }
705 }
708 break;
709 }
710 else
711 {
713 }
714 }
716 }
717 }
718
719
720 {
721 ideal_list Lj=FL;
723 {
724 if ((n->
sl>=0)&&(n->
S[0]!=
NULL))
725 {
729 {
731 {
732 #ifdef KDEBUG
733 Print(
"empty set s(%d) because:L[%d]\n",n->
nr,Lj->nr);
734 #else
735 Print(
"empty set s(%d) because:\n",n->
nr);
736 #endif
738 }
741 {
744 {
745 if (n->
S[
i]==n->
T[n->
tl].p)
746 {
748 break;
749 }
751 }
754 }
758 break;
759 }
761 }
762 Lj=Lj->next;
763 }
764 }
765 }
769 }
770#ifdef KDEBUG
772#endif
774 if ((strat->
Ll==-1) && (strat->
sl>=0))
775 {
777 }
779 }
780#ifdef KDEBUG
782#endif
783
784
786 {
789 {
792 }
793 }
797 return (strat->
Shdl);
798}
void(* enterS)(LObject &h, int pos, kStrategy strat, int atR)
void(* initEcart)(TObject *L)
int(* red)(LObject *L, kStrategy strat)
#define idDelete(H)
delete an ideal
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
ideal idAdd(ideal h1, ideal h2)
h1 + h2
KINLINE poly ksOldCreateSpoly(poly p1, poly p2, poly spNoether, ring r)
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize)
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
static void completeReduceFac(kStrategy strat, ideal_list FL)
kStrategy kStratCopy(kStrategy o)
BOOLEAN k_factorize(poly p, ideal &rfac, ideal &fac_copy)
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
void enterT(LObject &p, kStrategy strat, int atT)
BOOLEAN kTest_TS(kStrategy strat)
void enterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
void exitBuchMora(kStrategy strat)
int posInS(const kStrategy strat, const int length, const poly p, const int ecart_p)
void updateResult(ideal r, ideal Q, kStrategy strat)
void deleteInL(LSet set, int *length, int j, kStrategy strat)
void messageSets(kStrategy strat)
void messageStat(int hilbcount, kStrategy strat)
static void kDeleteLcm(LObject *P)
void iiWriteMatrix(matrix im, const char *n, int dim, const ring r, int spaces)
set spaces to zero by default
#define omFreeSize(addr, size)
#define TEST_OPT_INTSTRATEGY
#define TEST_OPT_DEGBOUND
void pRestoreDegProcs(ring r, pFDegProc old_FDeg, pLDegProc old_lDeg)
static int pLength(poly a)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced
#define pCopy(p)
return a copy of the poly
void PrintS(const char *s)
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
EXTERN_VAR short * ecartWeights