483{
484 int olddeg,reduc=0;
485 int red_result = 1;
486 reduc = olddeg = 0;
487
488 if ((strat->
Ll==-1) && (strat->
sl>=0))
489 {
491 }
493 while (strat->
Ll >= 0)
494 {
501 {
502
503
504
505
506
508 break;
509 }
510
511 strat->
P = strat->
L[strat->
Ll];
514 {
515
517
521 }
523 {
526 }
527 else
528 {
531 }
532
534 red_result = strat->
red(&strat->
P,strat);
535 if (strat->
P.p !=
NULL)
536 {
537
539 ideal fac;
540 ideal fac_copy;
541
543 {
545 {
548 }
549 else
550 {
553 }
555 {
559 {
561 fac->m[0]=strat->
P.p;
563 }
564 else
565 {
567 }
568 }
569 }
572
574 {
575 int ii;
578 {
583 }
584 else
585 {
587 }
588
590
593
594
595 int pos;
596 if (n->
sl==-1) pos=0;
598
599
601 {
604 {
607 }
608 }
609 else
610 {
614 {
616 }
617 }
619
621 {
625 }
629 {
632 {
634 for(ii=0; ii<=n->
tl; ii++)
635 {
636 if (n->
R[ii]->p==n->
L[
i].p1) { n->
L[
i].i_r1=ii;
break; }
637 }
639 for(ii=0; ii<=n->
tl; ii++)
640 {
641 if (n->
R[ii]->p==n->
L[
i].p2) { n->
L[
i].i_r2=ii;
break; }
642 }
643 }
644 }
646
648 {
650 {
653 }
654 else
655 {
657 ideal r=
idAdd(n->
D,fac_copy);
660 }
662 {
666 }
667 }
668
669 fac_copy->m[
i]=
pCopy(fac->m[
i]);
671
672
674 {
677 {
679 {
682 {
684 {
685 Print(
"empty set s(%d) because: D[%d]:", n->
nr,
j);
688 }
689
691
693 {
696 {
697 if (n->
S[
i]==n->
T[n->
tl].p)
698 {
700 break;
701 }
703 }
706 }
709 break;
710 }
711 else
712 {
714 }
715 }
717 }
718 }
719
720
721 {
722 ideal_list Lj=FL;
724 {
725 if ((n->
sl>=0)&&(n->
S[0]!=
NULL))
726 {
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 unsigned 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
void pNorm(poly p, const ring R=currRing)
#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