 |
My Project
debian-1:4.1.1-p2+ds-4build1
|
Go to the documentation of this file.
31 int syComponentOrder=
currRing->ComponentOrder;
33 while ((Fl!=0) && (oldF[Fl-1]==
NULL)) Fl--;
34 if (*modcomp!=
NULL)
delete modcomp;
35 *modcomp =
new intvec(rkF+2);
49 while ((kk<Fl) && (F[kk]) && (
pLmCmp(oldF[
k],F[kk])!=syComponentOrder))
53 for (kkk=
j;kkk>kk;kkk--)
64 (**modcomp)[rkF+1] = Fl;
130 j = (*modcomp)[hncomp];
131 nxt = (*modcomp)[hncomp+1];
144 j = (*modcomp)[hncomp];
145 nxt = (*modcomp)[hncomp+1];
166 while ((Fl!=0) && (arg->m[Fl-1]==
NULL)) Fl--;
171 int i,
j,
l,
k,totalToRed,ecartToRed,kk;
172 int bestEcart,totalmax,rkF,Sl=0,smax,
tmax,tl;
173 int *ecartS, *ecartT, *totalS,
186 ecartS=(
int*)
omAlloc(Fl*
sizeof(
int));
187 totalS=(
int*)
omAlloc(Fl*
sizeof(
int));
189 ecartT=(
int*)
omAlloc(2*Fl*
sizeof(
int));
190 totalT=(
int*)
omAlloc(2*Fl*
sizeof(
int));
197 if (arg->m[
j] !=
NULL)
234 if (totalS[
k]>totalmax) totalmax=totalS[
k];
235 for (kk=1;kk<=rkF;kk++)
237 for (
k=0;
k<=totalmax;
k++)
244 totalT[
j] = totalS[
l];
245 ecartT[
j] = ecartS[
l];
255 totalS[
j] = totalT[
j];
256 ecartS[
j] = ecartT[
j];
262 (*newmodcomp)[
j+1] = Sl;
264 int syComponentOrder=
currRing->ComponentOrder;
266 if (syComponentOrder==1)
283 for (
k=lini;
k<wend;
k++)
290 ecartT[
l] = ecartS[
l];
291 totalT[
l] = totalS[
l];
295 tempcomp =
ivCopy(*modcomp);
337 while ((
l<tl) && (notFound))
340 int kkk = (**modcomp)[
pGetComp(toRed)+1];
341 while ((
l<kkk) && (notFound))
346 if (ecartT[
l]<=ecartToRed) notFound =
FALSE;
348 bestEcart = ecartT[
l];
365 WerrorS(
"ideal not a standard basis");
386 for (
l=tempcomp->
length()-1;
l>comptR;
l--)
388 if ((*tempcomp)[
l]>0)
393 while ((
l<tl) && (totalT[
l]<=totalToRed))
l++;
394 for (kk=tl;kk>
l;kk--)
397 totalT[kk]=totalT[kk-1];
398 ecartT[kk]=ecartT[kk-1];
403 totalT[
l] = totalToRed;
404 ecartT[
l] = ecartToRed;
428 while ((kk<smax) && (
T[
l] != S[kk])) kk++;
440 (*newmodcomp)[Fl+1] = Sl;
450 *modcomp = newmodcomp;
505 while ((Fl!=0) && (arg->m[Fl-1]==
NULL)) Fl--;
507 int i,
j,
l,
k,kkk,Sl=0,syComponentOrder=
currRing->ComponentOrder;
508 int wend,lini,ltR,gencQ=0;
512 poly q,toRed,syz,lastmonom,multWith;
521 if (modcomp!=
NULL) (*modcomp)->show(0,0);
524 newmodcomp =
new intvec(Fl+2);
535 Flength = (
int*)
omAlloc0(Fl*
sizeof(
int));
542 (*newmodcomp)[
j+1] = Sl;
549 if (syComponentOrder==1)
562 for (
k=lini;
k<wend;
k++)
581 lastmonom =
pNext(syz);
583 lastmonom->coef = bn;
584 lastmonom->coef =
nInpNeg(lastmonom->coef);
591 syz->coef =
nInpNeg(syz->coef);
636 printf(
"toRed in Pair[%d, %d]:",
j,
k);
648 printf(
"toRed in Pair[%d, %d]:",
j,
k);
653 isNotReduced =
FALSE;
669 WerrorS(
"ideal not a standard basis");
684 lastmonom->coef =
nDiv(lastmonom->coef,F[
l]->coef);
716 (*newmodcomp)[
j+2] = Sl;
717 (*Shdl)[Sl] =
syRedtail2(syz,*Shdl,newmodcomp);
718 (*newmodcomp)[
j+2] = 0;
728 (*newmodcomp)[Fl+1] = Sl;
735 *modcomp = newmodcomp;
746 while ((syzIndex!=0) && (
res[syzIndex]==
NULL)) syzIndex--;
751 p =
res[syzIndex]->m[
i];
764 PrintS(
"error in the resolvent\n");
780 while ((syzIndex!=0) && (
res[syzIndex]==
NULL)) syzIndex--;
785 p =
res[syzIndex]->m[
i];
823 res[syzIndex]->m[
i] =
p;
848 Print(
"Syz(%d): \n",start);
860 int i,syzIndex = 0,
j=0;
869 WerrorS(
"sres only implemented for modules with ordering ..,c or ..,C");
876 while ((!
idIs0(
res[syzIndex])) && ((maxlength==-1) || (syzIndex<maxlength)))
968 if ( origR!=syRing && syRing !=
NULL)
972 while ((syzIndex < *
length) && (
res[syzIndex]))
976 if (
res[syzIndex]->
m[
i])
989 while ((syzIndex < *
length) && (
res[syzIndex]))
993 if (
res[syzIndex]->
m[
i])
1014 if (modcomp!=
NULL)
delete modcomp;
1029 for (
int i=rl -1;
i>=0;
i--)
1039 for (
int i=0;
i<rl;
i++)
1065 if ((rl>maxlength) && (
result->fullres[rl-1]!=
NULL))
BOOLEAN rHasGlobalOrdering(const ring r)
ring rAssure_SyzComp_CompLastBlock(const ring r)
makes sure that c/C ordering is last ordering and SyzIndex is first
int ksCheckCoeff(number *a, number *b)
#define pDivisibleBy(a, b)
returns TRUE, if leading monom of a divides leading monom of b i.e., if there exists a expvector c > ...
static long p_LDeg(const poly p, int *l, const ring r)
BOOLEAN rRing_has_CompLastBlock(ring r)
#define pGetComp(p)
Component.
void pNorm(poly p, const ring R=currRing)
#define idDelete(H)
delete an ideal
static ideal sySchreyersSyzygiesFB(ideal arg, intvec **modcomp, ideal mW, BOOLEAN redTail=TRUE)
void rChangeCurrRing(ring r)
#define pGetExp(p, i)
Exponent.
void pEnlargeSet(poly **p, int l, int increment)
number kBucketPolyRed(kBucket_pt bucket, poly p1, int l1, poly spNoether)
#define pDeleteComp(p, k)
static BOOLEAN length(leftv result, leftv arg)
const poly kBucketGetLm(kBucket_pt bucket)
void id_Shift(ideal M, int s, const ring r)
poly initial(const poly p, const ring r, const gfan::ZVector &w)
Returns the initial form of p with respect to w.
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
#define __p_Mult_nn(p, n, r)
int rGetMaxSyzComp(int i, const ring r)
return the max-comonent wchich has syzIndex i Assume: i<= syzIndex_limit
poly prMoveR(poly &p, ring src_r, ring dest_r)
static unsigned pLength(poly a)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
intvec * ivCopy(const intvec *o)
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
void kBucketDestroy(kBucket_pt *bucket_pt)
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
void PrintS(const char *s)
#define omFreeSize(addr, size)
void kBucketInit(kBucket_pt bucket, poly lm, int length)
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
static void syInitSort(ideal arg, intvec **modcomp)
static ideal sySchreyersSyzygiesFM(ideal arg, intvec **modcomp)
resolvente sySchreyerResolvente(ideal arg, int maxlength, int *length, BOOLEAN isMonomial, BOOLEAN)
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)
#define pSortCompCorrect(p)
Assume: If considerd only as poly in any component of p (say, monomials of other components of p are ...
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
#define pLmDivisibleByNoComp(a, b)
like pLmDivisibleBy, does not check components
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
KINLINE poly ksOldSpolyRed(poly p1, poly p2, poly spNoether)
template CanonicalForm tmax(const CanonicalForm &, const CanonicalForm &)
void rDelete(ring r)
unconditionally deletes fields in r
#define pSetmComp(p)
TODO:
void rSetSyzComp(int k, const ring r)
ideal idInit(int idsize, int rank)
initialise an ideal / module
static BOOLEAN idHomModule(ideal m, ideal Q, intvec **w)
static poly syRedtail2(poly p, polyset redWith, intvec *modcomp)
void WerrorS(const char *s)
BOOLEAN syTestOrder(ideal M)
ring rAssure_CompLastBlock(ring r, BOOLEAN complete)
makes sure that c/C ordering is last ordering
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets.
#define pLmCmp(p, q)
returns 0|1|-1 if p=q|p>q|p<q w.r.t monomial ordering
#define pCopy(p)
return a copy of the poly
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
static long p_FDeg(const poly p, const ring r)
void syReOrderResolventFB(resolvente res, int length, int initial)
syStrategy sySchreyer(ideal arg, int maxlength)
#define pCmp(p1, p2)
pCmp: args may be NULL returns: (p2==NULL ? 1 : (p1 == NULL ? -1 : p_LmCmp(p1, p2)))
KINLINE poly ksOldCreateSpoly(poly p1, poly p2, poly spNoether, ring r)