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 {
680 {
682 {
683 Print(
"empty set s(%d) because: D[%d]:", n->
nr,
j);
686 }
687
689
691 {
694 {
695 if (n->
S[
i]==n->
T[n->
tl].p)
696 {
698 break;
699 }
701 }
704 }
707 break;
708 }
709 else
710 {
712 }
713 }
715 }
716 }
717
718
719 {
720 ideal_list Lj=FL;
722 {
723 if ((n->
sl>=0)&&(n->
S[0]!=
NULL))
724 {
727 {
729 {
730 #ifdef KDEBUG
731 Print(
"empty set s(%d) because:L[%d]\n",n->
nr,Lj->nr);
732 #else
733 Print(
"empty set s(%d) because:\n",n->
nr);
734 #endif
736 }
739 {
742 {
743 if (n->
S[
i]==n->
T[n->
tl].p)
744 {
746 break;
747 }
749 }
752 }
756 break;
757 }
759 }
760 Lj=Lj->next;
761 }
762 }
763 }
767 }
768#ifdef KDEBUG
770#endif
772 if ((strat->
Ll==-1) && (strat->
sl>=0))
773 {
775 }
777 }
778#ifdef KDEBUG
780#endif
781
782
784 {
787 {
790 }
791 }
795 return (strat->
Shdl);
796}
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