654 SObject tso = resPairs[itso];
656 ideal old_generators=syzstr->
res[
index];
658 int og_idel=
IDELEMS(old_generators),ng_place=
IDELEMS(new_generators);
668 int syz_place=
IDELEMS(syzygies);
670 while ((syz_place>0) && (syzygies->m[syz_place-1]==
NULL)) syz_place--;
671 while ((ng_place>0) && (new_generators->m[ng_place-1]==
NULL)) ng_place--;
672 while ((og_idel>0) && (old_generators->m[og_idel-1]==
NULL)) og_idel--;
673 assume (tso.ind1<og_idel);
674 assume (tso.ind2<og_idel);
675 assume (tso.ind1!=tso.ind2);
676 assume (tso.p1 == old_generators->m[tso.ind1]);
677 assume (tso.p2 == old_generators->m[tso.ind2]);
678 tso.p1 = old_generators->m[tso.ind1];
679 tso.p2 = old_generators->m[tso.ind2];
680 if ((tso.p1!=
NULL) && (tso.p2!=
NULL))
688 toReplace = tso.ind1+1;
690 toReplace = tso.ind2+1;
694 if ((
index==0) && (old_generators->rank==1) &&
706 pp =
pCopy(old_repr->m[tso.ind2]);
716 pp =
pCopy(old_repr->m[tso.ind1]);
726 tso.syz =
pMult(p,
pCopy(old_repr->m[tso.ind2]));
739 tso.syz =
pCopy(old_repr->m[tso.ind1]);
748 p =
pCopy(old_repr->m[tso.ind2]);
755 tso.syz =
pAdd(p,tso.syz);
767 Print(
"reduziere Paar im Module %d mit: \n",
index);
775 if ((tso.p!=
NULL) && (!deleteP))
786 while ((j<ng_place) && (!
pDivisibleBy(new_generators->m[j],p))) j++;
787 if (j>=ng_place)
break;
843 PrintS(
"Shit happens!\n");
846 Print(
"erhalte Paar im Module %d mit: \n",
index);
854 pDelete(&old_generators->m[toReplace-1]);
855 pDelete(&old_repr->m[toReplace-1]);
856 for (i=toReplace-1;i<og_idel-1;i++)
858 old_generators->m[
i] = old_generators->m[i+1];
859 old_repr->m[
i] = old_repr->m[i+1];
861 old_generators->m[og_idel-1] =
NULL;
862 old_repr->m[og_idel-1] =
NULL;
863 for (i=itso+1;i<
l;i++)
867 if ((resPairs[i].ind1==toReplace-1)||(resPairs[i].
ind2==toReplace-1))
871 if (resPairs[i].ind1>=toReplace)
872 (resPairs[
i].ind1)--;
873 if (resPairs[i].
ind2>=toReplace)
874 (resPairs[
i].ind2)--;
884 if (ng_place>=
IDELEMS(new_generators))
898 new_generators->m[ng_place] = tso.p;
900 new_repr->m[ng_place] = tso.syz;
914 else if (
pGetComp(tso.syz)<=crit_comp)
920 if (syz_place>=
IDELEMS(syzygies))
925 syzygies->m[syz_place] = tso.syz;
927 pNorm(syzygies->m[syz_place]);
930 resPairs[itso] = tso;
#define pSetmComp(p)
TODO:
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
static FORCE_INLINE number n_Gcd(number a, number b, const coeffs r)
in Z: return the gcd of 'a' and 'b' in Z/nZ, Z/2^kZ: computed as in the case Z in Z/pZ...
int lcm(unsigned long *l, unsigned long *a, unsigned long *b, unsigned long p, int dega, int degb)
void kBucketInit(kBucket_pt bucket, poly lm, int length)
number kBucketPolyRed(kBucket_pt bucket, poly p1, int l1, poly spNoether)
void syCompactifyPairSet(SSet sPairs, int sPlength, int first)
const poly kBucketGetLm(kBucket_pt bucket)
KINLINE poly ksOldCreateSpoly(poly p1, poly p2, poly spNoether, ring r)
#define pLmDelete(p)
assume p != NULL, deletes Lm(p)->coef and Lm(p)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
#define pGetComp(p)
Component.
static long p_FDeg(const poly p, const ring r)
void PrintS(const char *s)
static unsigned pLength(poly a)
void kBucket_Minus_m_Mult_p(kBucket_pt bucket, poly m, poly p, int *l, poly spNoether)
Bpoly == Bpoly - m*p; where m is a monom Does not destroy p and m assume (*l <= 0 || pLength(p) == *l...
static int index(p_Length length, p_Ord ord)
void sySPRedSyz_Kosz(syStrategy syzstr, poly redWith, poly syz, poly q=NULL, int l_syz=-1)
void p_Shift(poly *p, int i, const ring r)
shifts components of the vector p by i
static void syTestPairs(SSet resPairs, int length, ideal old_generators)
#define __p_Mult_nn(p, n, r)
#define pDivisibleBy(a, b)
returns TRUE, if leading monom of a divides leading monom of b i.e., if there exists a expvector c > ...
void pEnlargeSet(poly **p, int l, int increment)
void pNorm(poly p, const ring R=currRing)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
void syDeletePair(SObject *so)
#define pCopy(p)
return a copy of the poly