 |
My Project
debian-1:4.1.1-p2+ds-4
|
Go to the documentation of this file.
12 #define MORA_USE_BUCKETS
14 #define PRE_INTEGER_CHECK 0
145 if (ret < 0)
return ret;
175 d =
h->GetpFDeg()+
h->ecart;
177 h->SetShortExpVector();
187 ei = strat->
T[
j].ecart;
190 if (ei >
h->ecart && ii < strat->tl)
192 li = strat->
T[
j].length;
202 if (
i > strat->
tl)
break;
203 if ((strat->
T[
i].ecart < ei || (strat->
T[
i].ecart == ei &&
204 strat->
T[
i].length < li))
211 if (strat->
T[
i].ecart < ei || (strat->
T[
i].ecart == ei &&
212 strat->
T[
i].length < li))
217 ei = strat->
T[
i].ecart;
218 if (ei <= h->ecart)
break;
219 li = strat->
T[
i].length;
237 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
266 h->SetShortExpVector();
271 h->ecart = d-
h->GetpFDeg();
273 h->ecart = d-
h->GetpFDeg()+ei-
h->ecart;
277 h->ecart =
h->pLDeg(strat->
LDegLast) -
h->GetpFDeg();
284 if (strat->
honey)
h->SetLength();
294 d =
h->GetpFDeg()+
h->ecart;
301 && ((d >= reddeg) || (pass > strat->
LazyPass)))
307 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
329 if (
h->pTotalDeg()+
h->ecart >= (int)strat->
tailRing->bitmask)
334 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
351 d =
h->GetpFDeg()+
h->ecart;
353 h->SetShortExpVector();
372 if (
h->GetLmTailRing() ==
NULL)
381 ei = strat->
T[
j].ecart;
383 if (ei >
h->ecart && ii < strat->tl)
385 li = strat->
T[
j].length;
395 if (
i > strat->
tl)
break;
396 if ((strat->
T[
i].ecart < ei || (strat->
T[
i].ecart == ei &&
397 strat->
T[
i].length < li))
406 if (strat->
T[
i].ecart < ei || (strat->
T[
i].ecart == ei &&
407 strat->
T[
i].length < li))
412 ei = strat->
T[
i].ecart;
413 if (ei <= h->ecart)
break;
414 li = strat->
T[
i].length;
432 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
433 if (at <= strat->Ll &&
pLmCmp(
h->p, strat->
L[strat->
Ll].p) != 0 && !
nEqual(
h->p->coef, strat->
L[strat->
Ll].p->coef))
462 h->SetShortExpVector();
467 h->ecart = d-
h->GetpFDeg();
469 h->ecart = d-
h->GetpFDeg()+ei-
h->ecart;
473 h->ecart =
h->pLDeg(strat->
LDegLast) -
h->GetpFDeg();
476 d =
h->GetpFDeg()+
h->ecart;
483 && ((d >= reddeg) || (pass > strat->
LazyPass)))
489 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
511 if (
h->pTotalDeg()+
h->ecart >= (int)strat->
tailRing->bitmask)
516 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
532 if (
h->IsNull())
return 0;
541 d =
h->GetpFDeg() +
h->ecart;
544 h->SetShortExpVector();
550 h->SetDegStuffReturnLDeg(strat->
LDegLast);
581 h->SetShortExpVector();
594 h->SetDegStuffReturnLDeg(strat->
LDegLast);
604 if (strat->
T[
j].ecart <=
h->ecart)
605 h->ecart = d -
h->GetpFDeg();
607 h->ecart = d -
h->GetpFDeg() + strat->
T[
j].ecart -
h->ecart;
609 d =
h->GetpFDeg() +
h->ecart;
612 d =
h->SetDegStuffReturnLDeg(strat->
LDegLast);
621 && ((d >= reddeg) || (pass > strat->
LazyPass)))
626 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
644 if (
h->pTotalDeg()+
h->ecart >= (int)strat->
tailRing->bitmask)
649 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
670 int o =
H.SetpFDeg();
674 unsigned long not_sev = ~
H.sev;
691 int ei = strat->
T[
j].ecart;
692 int li = strat->
T[
j].length;
703 if (
j > strat->
tl)
break;
704 if (ei <=
H.ecart)
break;
705 if (((strat->
T[
j].ecart < ei)
706 || ((strat->
T[
j].ecart == ei)
707 && (strat->
T[
j].length < li)))
715 ei = strat->
T[
j].ecart;
716 li = strat->
T[
j].length;
770 int o =
H.SetpFDeg();
774 unsigned long not_sev = ~
H.sev;
792 int ei = strat->
T[
j].ecart;
793 int li = strat->
T[
j].length;
804 if (
j > strat->
tl)
break;
805 if (ei <=
H.ecart)
break;
806 if (((strat->
T[
j].ecart < ei)
807 || ((strat->
T[
j].ecart == ei)
808 && (strat->
T[
j].length < li)))
817 ei = strat->
T[
j].ecart;
818 li = strat->
T[
j].length;
874 for (
i=1;
i<=strat->
Ll;
i++)
876 at = strat->
posInL(strat->
L,
i-1,&(strat->
L[
i]),strat);
880 for (
j=
i-1;
j>=at;
j--) strat->
L[
j+1] = strat->
L[
j];
896 for (
i=1;
i<=strat->
tl;
i++)
898 if (strat->
T[
i-1].length > strat->
T[
i].length)
901 sev = strat->
sevT[
i];
907 if (strat->
T[
i].length > strat->
T[at].length)
break;
909 for (
j =
i-1;
j>at;
j--)
911 strat->
T[
j+1]=strat->
T[
j];
913 strat->
R[strat->
T[
j+1].i_r] = &(strat->
T[
j+1]);
916 strat->
sevT[at+1] = sev;
917 strat->
R[
p.i_r] = &(strat->
T[at+1]);
993 if (L->bucket !=
NULL)
995 poly
p = L->CanonicalizeP();
1017 int op=
p->GetpFDeg() +
p->ecart;
1025 && (set[
j].GetpFDeg()+set[
j].ecart >= op))
1053 p=strat->
L[strat->
Ll];
1054 strat->
L[strat->
Ll]=strat->
L[
j];
1087 strat->
L[
j].SetLmCurrRing();
1099 p=strat->
L[strat->
Ll];
1100 strat->
L[strat->
Ll]=strat->
L[
j];
1119 while (i <= strat->Ll)
1152 if (! strat->
L[
i].IsNull())
1154 strat->
L[
i].SetLmCurrRing();
1155 strat->
L[
i].SetpFDeg();
1157 = strat->
L[
i].pLDeg(strat->
LDegLast) - strat->
L[
i].GetpFDeg();
1164 if (strat->
L[
i].IsNull())
1186 while (i <= strat->tl)
1194 if (
p.p != strat->
T[
i].p)
1222 for (
i=strat->
Ll;
i>=0;
i--)
1224 strat->
L[
i].SetpFDeg();
1226 for (
i=strat->
tl;
i>=0;
i--)
1228 strat->
T[
i].SetpFDeg();
1280 Print(
"new s%d:",atS);
1486 strat->
HCord = 32000;
1523 int hilbeledeg=1,hilbcount=0;
1566 #ifdef HAVE_TAIL_RING
1580 while (strat->
Ll >= 0)
1587 while (strat->
Ll >= 0)
1592 && (strat->
L[strat->
Ll].ecart+strat->
L[strat->
Ll].GetpFDeg()>
Kstd1_deg))
1599 while ((strat->
Ll >= 0)
1600 && (strat->
L[strat->
Ll].p1!=
NULL) && (strat->
L[strat->
Ll].p2!=
NULL)
1601 && (strat->
L[strat->
Ll].ecart+strat->
L[strat->
Ll].GetpFDeg()>
Kstd1_deg)
1610 if (strat->
Ll<0)
break;
1613 strat->
P = strat->
L[strat->
Ll];
1640 else if (strat->
P.p1 ==
NULL)
1648 if (!strat->
P.IsNull())
1652 message(strat->
P.ecart+strat->
P.GetpFDeg(),&olddeg,&reduc,strat, red_result);
1654 red_result = strat->red(&strat->P,strat);
1658 if (! strat->
P.IsNull())
1665 strat->
P.pCleardenom();
1669 strat->
P.p =
redtail(&(strat->
P),strat->
sl,strat);
1670 if (strat->
P.p==
NULL)
1672 WerrorS(
"expoent overflow - wrong ordering");
1681 if ((strat->
P.p->next==
NULL)
1683 strat->
P.pCleardenom();
1693 posInS(strat,strat->
sl,strat->
P.p, strat->
P.ecart),
1699 khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
1705 if (strat->
P.lcm!=
NULL)
1716 memset(&strat->
P,0,
sizeof(strat->
P));
1771 return (strat->
Shdl);
1774 poly
kNF1 (ideal F,ideal
Q,poly q,
kStrategy strat,
int lazyReduce)
1846 for (
i=strat->
sl;
i>=0;
i--)
1850 for (
i=0;
i<=strat->
sl;
i++)
1918 ideal
kNF1 (ideal F,ideal
Q,ideal q,
kStrategy strat,
int lazyReduce)
1990 for (
i=strat->
sl;
i>=0;
i--)
2004 for (
j=0;
j<=strat->
sl;
j++)
2080 return o+(*kModW)[
i-1];
2088 for (
i=r->N;
i>0;
i--)
2093 return j+(*kModW)[
i-1];
2100 return idInit(1,F->rank);
2181 #if PRE_INTEGER_CHECK
2233 r=
mora(FCopy,
Q,*
w,hilb,strat);
2235 r=
bba(FCopy,
Q,*
w,hilb,strat);
2252 r=
mora(F,
Q,*
w,hilb,strat);
2254 r=
bba(F,
Q,*
w,hilb,strat);
2275 int newIdeal,
intvec *vw)
2278 return idInit(1,F->rank);
2375 r=
mora(F,
Q,*
w,hilb,strat);
2383 r=
sba(F,
Q,*
w,hilb,strat);
2411 bool sigdrop =
TRUE;
2413 int totalsbaruns = 1,blockedreductions = 20,blockred = 0,loops = 0;
2414 while(sigdrop && (loops < totalsbaruns || totalsbaruns == -1)
2415 && (blockred <= blockedreductions))
2523 r=
mora(F,
Q,*
w,hilb,strat);
2530 r=
sba(r,
Q,*
w,hilb,strat);
2555 if(sigdrop || blockred > blockedreductions)
2557 r =
kStd(r,
Q,
h,
w, hilb, syzComp, newIdeal, vw);
2563 #ifdef HAVE_SHIFTBBA
2565 int newIdeal,
intvec *vw,
int uptodeg,
int lV)
2630 WerrorS(
"No local ordering possible for shift algebra");
2665 int syzComp,
int reduced)
2670 return idInit(1,F->rank);
2705 strat->
minim=(reduced % 2)+1;
2754 r=
mora(F,
Q,*
w,hilb,strat);
2761 r=
bba(F,
Q,*
w,hilb,strat);
2779 if ((delete_w)&&(temp_w!=
NULL))
delete temp_w;
2787 else if (strat->
M==
NULL)
2790 WarnS(
"no minimal generating set computed");
2813 poly
kNF(ideal F, ideal
Q, poly
p,
int syzComp,
int lazyReduce)
2859 poly
kNFBound(ideal F, ideal
Q, poly
p,
int bound,
int syzComp,
int lazyReduce)
2901 ideal
kNF(ideal F, ideal
Q, ideal
p,
int syzComp,
int lazyReduce)
2955 ideal
kNFBound(ideal F, ideal
Q, ideal
p,
int bound,
int syzComp,
int lazyReduce)
3006 poly
k_NF (ideal F, ideal
Q, poly
p,
int syzComp,
int lazyReduce,
const ring _currRing)
3010 poly ret =
kNF(F,
Q,
p, syzComp, lazyReduce);
3064 initS(tempF, tempQ, strat);
3094 ideal shdl=strat->
Shdl;
3178 withT = ! strat->
homog;
3183 #ifdef HAVE_TAIL_RING
3188 while (strat->
Ll >= 0)
3195 strat->
P = strat->
L[strat->
Ll];
3198 if (strat->
P.p1 ==
NULL)
3204 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
3212 &olddeg,&reduc,strat, red_result);
3215 red_result = strat->red(&strat->P,strat);
3219 if (red_result == 1)
3225 strat->
P.GetP(strat->
lmBin);
3227 int pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
3234 strat->
P.pCleardenom();
3238 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
3239 strat->
P.pCleardenom();
3247 strat->
P.p =
redtailBba(&(strat->
P),pos-1,strat, withT);
3259 strat->
enterS(strat->
P, pos, strat, strat->
tl);
3267 for(;ii<=strat->
sl;ii++)
3270 memset(&
h,0,
sizeof(
h));
3272 h.p=strat->
S[ii]; strat->
S[ii]=
NULL;
3274 h.sev=strat->
sevS[ii];
3278 if (strat->
T[jj].p==
h.p)
3280 strat->
T[jj].p=
NULL;
3283 memmove(&(strat->
T[jj]),&(strat->
T[jj+1]),
3284 (strat->
tl-jj)*
sizeof(strat->
T[jj]));
3285 memmove(&(strat->
sevT[jj]),&(strat->
sevT[jj+1]),
3286 (strat->
tl-jj)*
sizeof(strat->
sevT[jj]));
3293 int lpos=strat->
posInL(strat->
L,strat->
Ll,&
h,strat);
3298 Print(
"move S[%d] -> L[%d]: ",ii,pos);
3306 for(ii=pos+1;ii<=strat->
sl;ii++) strat->
fromQ[ii]=0;
3315 if (strat->
P.lcm!=
NULL)
3328 memset(&(strat->
P), 0,
sizeof(strat->
P));
3349 #ifdef HAVE_TAIL_RING
3433 while (need_retry && (counter>0))
3439 int new_elems=
idElem(res1);
3440 counter -= (new_elems >= elems);
3443 if (
idElem(res1)<=1) need_retry=0;
3465 #ifdef MORA_USE_BUCKETS
void kEcartWeights(poly *s, int sl, short *eweight, const ring R)
BOOLEAN rHasGlobalOrdering(const ring r)
void updateL(kStrategy strat)
void kStratInitChangeTailRing(kStrategy strat)
static ideal nc_GB(const ideal F, const ideal Q, const intvec *w, const intvec *hilb, kStrategy strat, const ring r)
int idElem(const ideal F)
count non-zero elements
void deleteHC(LObject *L, kStrategy strat, BOOLEAN fromNext)
ideal kStdShift(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, int uptodeg, int lV)
#define pIsConstant(p)
like above, except that Comp might be != 0
void initBuchMoraCrit(kStrategy strat)
int redRiloc(LObject *h, kStrategy strat)
#define pGetComp(p)
Component.
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
BOOLEAN(* s_poly_proc_t)(kStrategy strat)
poly kNF2(ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce)
void pNorm(poly p, const ring R=currRing)
void cleanT(kStrategy strat)
void pRestoreDegProcs(ring r, pFDegProc old_FDeg, pLDegProc old_lDeg)
void(* enterS)(LObject &h, int pos, kStrategy strat, int atR)
long pLDeg0c(poly p, int *l, const ring r)
#define idDelete(H)
delete an ideal
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced
void enterT_strong(LObject &p, kStrategy strat, int atT)
long(* pLDegProc)(poly p, int *length, ring r)
void khCheck(ideal Q, intvec *w, intvec *hilb, int &eledeg, int &count, kStrategy strat)
int kFindDivisibleByInS(const kStrategy strat, int *max_ind, LObject *L)
return -1 if no divisor is found number of first divisor in S, otherwise
int posInL0(const LSet set, const int length, LObject *p, const kStrategy)
long pLDeg0(poly p, int *l, const ring r)
void rChangeCurrRing(ring r)
#define TEST_OPT_DEGBOUND
BOOLEAN arriRewCriterion(poly, unsigned long, poly, kStrategy strat, int start=0)
ideal kMin_std(ideal F, ideal Q, tHomog h, intvec **w, ideal &M, intvec *hilb, int syzComp, int reduced)
void enterSMora(LObject &p, int atS, kStrategy strat, int atR=-1)
static BOOLEAN idHomIdeal(ideal id, ideal Q=NULL)
void reorderL(kStrategy strat)
poly kNF1(ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce)
poly redtail(LObject *L, int end_pos, kStrategy strat)
int posInT17(const TSet set, const int length, LObject &p)
static void kOptimizeLDeg(pLDegProc ldeg, kStrategy strat)
int(* posInLOld)(const LSet Ls, const int Ll, LObject *Lo, const kStrategy strat)
void(* chainCrit)(poly p, int ecart, kStrategy strat)
KINLINE unsigned long * initsevT()
#define TEST_OPT_MULTBOUND
void updateResult(ideal r, ideal Q, kStrategy strat)
BOOLEAN kCheckSpolyCreation(LObject *L, kStrategy strat, poly &m1, poly &m2)
void khCheckLocInhom(ideal Q, intvec *w, intvec *hilb, int &count, kStrategy strat)
void superenterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
long totaldegreeWecart(poly p, ring r)
BOOLEAN idInsertPoly(ideal h1, poly h2)
insert h2 into h1 (if h2 is not the zero polynomial) return TRUE iff h2 was indeed inserted
static BOOLEAN length(leftv result, leftv arg)
#define __p_GetComp(p, r)
void updateS(BOOLEAN toT, kStrategy strat)
ideal kInterRedOld(ideal F, ideal Q)
void p_wrp(poly p, ring lmRing, ring tailRing)
#define pGetShortExpVector(a)
returns the "Short Exponent Vector" – used to speed up divisibility tests (see polys-impl....
int posInS(const kStrategy strat, const int length, const poly p, const int ecart_p)
ideal bbaShift(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat, int uptodeg, int lV)
void postReduceByMon(LObject *h, kStrategy strat)
used for GB over ZZ: intermediate reduction by monomial elements background: any known constant eleme...
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
poly kNFBound(ideal F, ideal Q, poly p, int bound, int syzComp, int lazyReduce)
poly p_KillSquares(const poly p, const short iFirstAltVar, const short iLastAltVar, const ring r)
static BOOLEAN kMoraUseBucket(kStrategy strat)
BOOLEAN hasPurePower(const poly p, int last, int *length, kStrategy strat)
BOOLEAN arriRewCriterionPre(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int)
ideal mora(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static unsigned pLength(poly a)
BOOLEAN newHEdge(kStrategy strat)
void chainCritOpt_1(poly, int, kStrategy strat)
static poly redMoraNF(poly h, kStrategy strat, int flag)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
void ksCreateSpoly(LObject *Pair, poly spNoether, int use_buckets, ring tailRing, poly m1, poly m2, TObject **R)
int(* red2)(LObject *L, kStrategy strat)
void initEcartPairBba(LObject *Lp, poly, poly, int, int)
static short rVar(const ring r)
#define rVar(r) (r->N)
static long p_MinComp(poly p, ring lmRing, ring tailRing)
#define TEST_OPT_INTSTRATEGY
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
int ksReducePoly(LObject *PR, TObject *PW, poly spNoether, number *coef, kStrategy strat)
void firstUpdate(kStrategy strat)
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
poly kNF2Bound(ideal F, ideal Q, poly q, int bound, kStrategy strat, int lazyReduce)
int redRing(LObject *h, kStrategy strat)
char posInLDependsOnLength
void enterSBba(LObject &p, int atS, kStrategy strat, int atR)
void reorderT(kStrategy strat)
int posInT2(const TSet set, const int length, LObject &p)
#define TEST_OPT_NOT_BUCKETS
void initEcartNormal(TObject *h)
void PrintS(const char *s)
#define omFreeSize(addr, size)
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
void finalReduceByMon(kStrategy strat)
used for GB over ZZ: final reduction by constant elements background: any known constant element of i...
int redEcart(LObject *h, kStrategy strat)
poly k_NF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce, const ring _currRing)
NOTE: this is just a wrapper which sets currRing for the actual kNF call.
static short scaFirstAltVar(ring r)
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
static BOOLEAN rField_is_Ring(const ring r)
long kModDeg(poly p, ring r)
void completeReduce(kStrategy strat, BOOLEAN withT)
int(* posInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
KINLINE poly kNoetherTail()
void exitBuchMora(kStrategy strat)
void enterSSba(LObject &p, int atS, kStrategy strat, int atR)
pFDegProc pOrigFDeg_TailRing
static void p_LmDelete(poly p, const ring r)
void initBuchMora(ideal F, ideal Q, kStrategy strat)
int posInL10(const LSet set, const int length, LObject *p, const kStrategy strat)
int kFindDivisibleByInT(const kStrategy strat, const LObject *L, const int start)
return -1 if no divisor is found number of first divisor in T, otherwise
void enterSMoraNF(LObject &p, int atS, kStrategy strat, int atR=-1)
#define TEST_OPT_STAIRCASEBOUND
BOOLEAN(* rewCrit1)(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
pShallowCopyDeleteProc pGetShallowCopyDeleteProc(ring, ring)
void initBuchMoraPos(kStrategy strat)
void updateT(kStrategy strat)
KINLINE BOOLEAN arriRewDummy(poly, unsigned long, poly, kStrategy, int)
void messageStat(int hilbcount, kStrategy strat)
long p_WDegree(poly p, const ring r)
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
#define TEST_OPT_RETURN_SB
void kDebugPrint(kStrategy strat)
static poly redMoraNFRing(poly h, kStrategy strat, int flag)
poly preIntegerCheck(const ideal Forig, const ideal Q)
used for GB over ZZ: look for constant and monomial elements in the ideal background: any known const...
pLDegProc pOrigLDeg_TailRing
BOOLEAN(* rewCrit2)(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
int redSig(LObject *h, kStrategy strat)
void initBba(kStrategy strat)
int p_IsPurePower(const poly p, const ring r)
return i, if head depends only on var(i)
static void p_Delete(poly *p, const ring r)
static BOOLEAN rField_is_numeric(const ring r)
long maxdegreeWecart(poly p, int *l, ring r)
BOOLEAN faugereRewCriterion(poly sig, unsigned long not_sevSig, poly, kStrategy strat, int start=0)
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize)
void initBuchMoraPosRing(kStrategy strat)
void chainCritNormal(poly p, int ecart, kStrategy strat)
static int si_max(const int a, const int b)
static CanonicalForm bound(const CFMatrix &M)
#define pSetmComp(p)
TODO:
void pSetDegProcs(ring r, pFDegProc new_FDeg, pLDegProc new_lDeg)
void(* initEcartPair)(LObject *h, poly f, poly g, int ecartF, int ecartG)
void Werror(const char *fmt,...)
static short scaLastAltVar(ring r)
ideal idInit(int idsize, int rank)
initialise an ideal / module
#define pp_Test(p, lmRing, tailRing)
static BOOLEAN idHomModule(ideal m, ideal Q, intvec **w)
void initMora(ideal F, kStrategy strat)
ideal id_KillSquares(const ideal id, const short iFirstAltVar, const short iLastAltVar, const ring r, const bool bSkipZeroes)
void WerrorS(const char *s)
static BOOLEAN rField_has_simple_inverse(const ring r)
void HEckeTest(poly pp, kStrategy strat)
static FORCE_INLINE BOOLEAN n_DivBy(number a, number b, const coeffs r)
test whether 'a' is divisible 'b'; for r encoding a field: TRUE iff 'b' does not represent zero in Z:...
#define pLmDelete(p)
assume p != NULL, deletes Lm(p)->coef and Lm(p)
ideal kSba(ideal F, ideal Q, tHomog h, intvec **w, int sbaOrder, int arri, intvec *hilb, int syzComp, int newIdeal, intvec *vw)
ideal SCAQuotient(const ring r)
#define pLmShortDivisibleBy(a, sev_a, b, not_sev_b)
Divisibility tests based on Short Exponent vectors sev_a == pGetShortExpVector(a) not_sev_b == ~ pGet...
BOOLEAN(* rewCrit3)(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
int redFirst(LObject *h, kStrategy strat)
char completeReduce_retry
static int doRed(LObject *h, TObject *with, BOOLEAN intoT, kStrategy strat, bool redMoraNF)
void cancelunit(LObject *L, BOOLEAN inNF)
#define TEST_OPT_REDTHROUGH
void initSba(ideal F, kStrategy strat)
void enterL(LSet *set, int *length, int *LSetmax, LObject p, int at)
int redLazy(LObject *h, kStrategy strat)
#define idSimpleAdd(A, B)
void deleteInL(LSet set, int *length, int j, kStrategy strat)
void(* initEcart)(TObject *L)
ideal bba(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
#define pLmCmp(p, q)
returns 0|1|-1 if p=q|p>q|p<q w.r.t monomial ordering
ideal sba(ideal F0, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
int(* red)(LObject *L, kStrategy strat)
long kHomModDeg(poly p, ring r)
void initEcartBBA(TObject *h)
void enterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
#define pCopy(p)
return a copy of the poly
#define SI_RESTORE_OPT1(A)
int(* posInT)(const TSet T, const int tl, LObject &h)
ideal kStd(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
void initEcartPairMora(LObject *Lp, poly, poly, int ecartF, int ecartG)
BOOLEAN rHasMixedOrdering(const ring r)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
void enterOnePairNormal(int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR=-1)
ideal kInterRed(ideal F, ideal Q)
static bool rIsSCA(const ring r)
BOOLEAN kStratChangeTailRing(kStrategy strat, LObject *L, TObject *T, unsigned long expbound)
KINLINE TObject ** initR()
void initHilbCrit(ideal, ideal, intvec **hilb, kStrategy strat)
int redHoney(LObject *h, kStrategy strat)
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_Z(const coeffs r)
static FORCE_INLINE BOOLEAN n_IsUnit(number n, const coeffs r)
TRUE iff n has a multiplicative inverse in the given coeff field/ring r.
void missingAxis(int *last, kStrategy strat)
void enterT(LObject &p, kStrategy strat, int atT)
static BOOLEAN p_LmShortDivisibleBy(poly a, unsigned long sev_a, poly b, unsigned long not_sev_b, const ring r)
int redSigRing(LObject *h, kStrategy strat)
void(* enterOnePair)(int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR)
int redHomog(LObject *h, kStrategy strat)
int scMult0Int(ideal S, ideal Q, const ring tailRing)
#define OPT_NOTREGULARITY
ideal kInterRedBba(ideal F, ideal Q, int &need_retry)
omError_t omTestMemory(int check_level)
void updateLHC(kStrategy strat)
void initS(ideal F, ideal Q, kStrategy strat)