500{
502
504 while ((Fl!=0) && (arg->m[Fl-1]==
NULL)) Fl--;
506 int i,
j,
l,
k,kkk,Sl=0,syComponentOrder=
currRing->ComponentOrder;
507 int wend,lini,ltR,gencQ=0;
509 int *Flength;
511 poly q,toRed,syz,lastmonom,multWith;
513
514
515#ifdef WRITE_BUCKETS
520 if (modcomp!=
NULL) (*modcomp)->show(0,0);
521#endif
522
523 newmodcomp =
new intvec(Fl+2);
524
525
528 else
529 {
532 }
533
534 Flength = (
int*)
omAlloc0(Fl*
sizeof(
int));
536 {
538 }
540 {
541 (*newmodcomp)[
j+1] = Sl;
543 {
546 }
548 if (syComponentOrder==1)
549 {
551 wend=Fl;
552 }
553 else
554 {
558 }
561 for (
k=lini;
k<wend;
k++)
562 {
564 {
566 {
569 }
570
572 {
576
577 syz->coef = an;
578
580 lastmonom =
pNext(syz);
581
582 lastmonom->coef = bn;
583 lastmonom->coef =
nInpNeg(lastmonom->coef);
585 }
586 else
587 {
590 syz->coef =
nInpNeg(syz->coef);
591 lastmonom = syz;
594 }
597
598
600 {
602 {
604 }
605 else
606 {
608 }
609 }
612 else
613 {
617 }
622 {
624 {
626 }
627
628
629
633#ifdef WRITE_BUCKETS
635 printf(
"toRed in Pair[%d, %d]:",
j,
k);
638#endif
639
641 {
643 {
646#ifdef WRITE_BUCKETS
647 printf(
"toRed in Pair[%d, %d]:",
j,
k);
649#endif
652 isNotReduced =
FALSE;
653 }
654 else
655 {
657
661
662
664
666
667
668 WerrorS(
"ideal not a standard basis");
669
671 }
672 }
673 else
674 {
675
678 {
680 }
683 lastmonom->coef =
nDiv(lastmonom->coef,F[
l]->coef);
684
686
689 {
690
691#ifdef WRITE_BUCKETS
693#endif
695 }
697
699
700
701 }
702 }
704
706 {
708 {
711 }
714 {
715 (*newmodcomp)[
j+2] = Sl;
716 (*Shdl)[Sl] =
syRedtail2(syz,*Shdl,newmodcomp);
717 (*newmodcomp)[
j+2] = 0;
718 }
719 else
720 (*Shdl)[Sl] = syz;
721 Sl++;
722 }
723 }
724 }
725
726 }
727 (*newmodcomp)[Fl+1] = Sl;
730 else
733 delete *modcomp;
734 *modcomp = newmodcomp;
735
738}
KINLINE poly ksOldCreateSpoly(poly p1, poly p2, poly spNoether, ring r)
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
void kBucketDestroy(kBucket_pt *bucket_pt)
void kBucketInit(kBucket_pt bucket, poly lm, int length)
int ksCheckCoeff(number *a, number *b, const coeffs r)
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets.
number kBucketPolyRed(kBucket_pt bucket, poly p1, int l1, poly spNoether)
const poly kBucketGetLm(kBucket_pt bucket)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
void pEnlargeSet(poly **p, int l, int increment)
static int pLength(poly a)
#define __p_Mult_nn(p, n, r)
#define pCopy(p)
return a copy of the poly
ideal idInit(int idsize, int rank)
initialise an ideal / module
static void syCreatePairs(polyset F, int lini, int wend, int k, int j, int i, polyset pairs, int regularPairs=0, ideal mW=NULL)
poly sySpecNormalize(poly toNorm, ideal mW=NULL)
static poly syRedtail2(poly p, polyset redWith, intvec *modcomp)