23 #define HAVE_TAIL_RING
27 #define setmaxL ((4096-12)/sizeof(LObject))
28 #define setmaxLinc ((4096)/sizeof(LObject))
46 #if !defined(KDEBUG) && !defined(NO_INLINE)
47 #define KINLINE inline
126 #ifdef OLIVER_PRIVAT_LT
219 int use_bucket, ring
r);
390 #define ALLOW_PROD_CRIT(A) (!(A)->no_prod_crit)
392 #define ALLOW_PROD_CRIT(A) (1)
438 #ifdef HAVE_MORE_POS_IN_T
506 #define messageSets(s) do {} while (0)
561 const int tl,
const LObject* L,
const int start=0);
570 long ecart = LONG_MAX);
596 poly &m1,
poly &m2,
const ring m_r);
615 #define kTest(A) (TRUE)
616 #define kTest_TS(A) (TRUE)
617 #define kTest_T(T) (TRUE)
618 #define kTest_S(T) (TRUE)
619 #define kTest_L(T) (TRUE)
636 int& hilbcount,
int& srmax,
int& lrmax,
int& reduc,
ideal Q,
745 unsigned long new_expbound = 0);
778 void enterOnePairShift (
poly q,
poly p,
int ecart,
int isFromQ,
kStrategy strat,
int atR,
int ecartq,
int qisFromQ,
int shiftcount,
int ifromS,
int uptodeg,
int lV);
KINLINE TObject ** initR()
KINLINE void Init(ring tailRing=currRing)
int kFindInT(poly p, TSet T, int tlength)
returns index of p in TSet, or -1 if not found
void deleteHC(poly *p, int *e, int *l, kStrategy strat)
KINLINE poly GetP(omBin lmBin=NULL)
const const intvec const intvec const ring _currRing const const intvec const intvec const ring _currRing int
denominator_list_s * denominator_list
int posInT_pLength(const TSet set, const int length, LObject &p)
int posInLSig(const LSet set, const int length, LObject *L, const kStrategy strat)
int(* posInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
CFArray copy(const CFList &list)
write elements of list into an array
void initSba(ideal F, kStrategy strat)
void entersets(LObject h)
static poly normalize(poly next_p, ideal add_generators, syStrategy syzstr, int *g_l, int *p_l, int crit_comp)
void initSyzRules(kStrategy strat)
KINLINE void SetShortExpVector()
int lcm(unsigned long *l, unsigned long *a, unsigned long *b, unsigned long p, int dega, int degb)
void initSbaCrit(kStrategy strat)
void updateResult(ideal r, ideal Q, kStrategy strat)
void initEcartNormal(TObject *h)
void enterOnePairSelfShifts(poly qq, poly p, int ecart, int isFromQ, kStrategy strat, int atR, int uptodeg, int lV)
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
KINLINE void Set(ring r=currRing)
BOOLEAN(* rewCrit1)(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
KINLINE poly ksOldSpolyRed(poly p1, poly p2, poly spNoether=NULL)
int posInT11(const TSet set, const int length, LObject &p)
pLDegProc pOrigLDeg_TailRing
int posInL15(const LSet set, const int length, LObject *L, const kStrategy strat)
int sgn(const Rational &a)
KINLINE sLObject & operator=(const sTObject &)
Compatiblity layer for legacy polynomial operations (over currRing)
BOOLEAN kStratChangeTailRing(kStrategy strat, LObject *L=NULL, TObject *T=NULL, unsigned long new_expbound=0)
void initSbaBuchMora(ideal F, ideal Q, kStrategy strat)
void f5c(kStrategy strat, int &olddeg, int &minimcnt, int &hilbeledeg, int &hilbcount, int &srmax, int &lrmax, int &reduc, ideal Q, intvec *w, intvec *hilb)
int ksReducePolySig(LObject *PR, TObject *PW, long idx, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL)
BOOLEAN syzCriterion(poly sig, unsigned long not_sevSig, kStrategy strat)
poly redtailBbaShift(LObject *L, int pos, kStrategy strat, BOOLEAN withT, BOOLEAN normalize)
int posInT15(const TSet set, const int length, LObject &p)
poly redNF(poly h, int &max_ind, int nonorm, 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
void enterpairsShift(poly h, int k, int ecart, int pos, kStrategy strat, int atR, int uptodeg, int lV)
void chainCritNormal(poly p, int ecart, kStrategy strat)
poly ksCreateShortSpoly(poly p1, poly p2, ring tailRing)
BEGIN_NAMESPACE_SINGULARXX const ring const ring tailRing
BOOLEAN posInLDependsOnLength
KINLINE BOOLEAN k_GetLeadTerms(const poly p1, const poly p2, const ring p_r, poly &m1, poly &m2, const ring m_r)
int(* posInLSba)(const LSet set, const int length, LObject *L, const kStrategy strat)
KINLINE sLObject(ring tailRing=currRing)
KINLINE poly k_LmShallowCopyDelete_tailRing_2_currRing(poly p, ring tailRing, omBin bin)
BOOLEAN(* rewCrit2)(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
KINLINE void Init(ring r=currRing)
const CanonicalForm CFMap CFMap int &both_non_zero int n
void enterOnePairManyShifts(int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR, int uptodeg, int lV)
void messageStat(int hilbcount, kStrategy strat)
KINLINE BOOLEAN IsNull() const
KINLINE poly k_LmInit_tailRing_2_currRing(poly p, ring tailRing, omBin bin)
KINLINE void HeadNormalize()
ideal bba(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
void initSbaPos(kStrategy strat)
void enterOnePairSig(int i, poly p, poly pSig, int ecart, int isFromQ, kStrategy strat, int atR)
poly kCreateZeroPoly(long exp[], long cabsind, poly *t_p, ring leadRing, ring tailRing)
pShallowCopyDeleteProc p_shallow_copy_delete
BOOLEAN(* rewCrit3)(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
void(* initEcartPair)(LObject *h, poly f, poly g, int ecartF, int ecartG)
void enterpairsSig(poly h, poly hSig, int from, int k, int ec, int pos, kStrategy strat, int atR=-1)
poly pMove2CurrTail(poly p, kStrategy strat)
BOOLEAN kCheckStrongCreation(int atR, poly m1, int atS, poly m2, kStrategy strat)
void superenterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR=-1)
void initS(ideal F, ideal Q, kStrategy strat)
ideal bbaShift(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat, int uptodeg, int lV)
void initHilbCrit(ideal F, ideal Q, intvec **hilb, kStrategy strat)
int(* test_PosInT)(const TSet T, const int tl, LObject &h)
void initBuchMora(ideal F, ideal Q, kStrategy strat)
KINLINE unsigned long * initsevT()
int redHomog(LObject *h, kStrategy strat)
void enterExtendedSpoly(poly h, kStrategy strat)
void initEcartBBA(TObject *h)
KINLINE void Tail_Minus_mm_Mult_qq(poly m, poly qq, int lq, poly spNoether)
int(* red)(LObject *L, kStrategy strat)
void HEckeTest(poly pp, kStrategy strat)
int(* posInT)(const TSet T, const int tl, LObject &h)
long(* pLDegProc)(poly p, int *length, ring r)
void exitBuchMora(kStrategy strat)
int posInLF5C(const LSet set, const int length, LObject *L, const kStrategy strat)
void initBuchMoraCrit(kStrategy strat)
KINLINE void PrepareRed(BOOLEAN use_bucket)
void initSLSba(ideal F, ideal Q, kStrategy strat)
BOOLEAN(* syzCrit)(poly sig, unsigned long not_sevSig, kStrategy strat)
KINLINE void Tail_Mult_nn(number n)
KINLINE void LmDeleteAndIter()
KINLINE void SetLmTail(poly lm, poly new_p, int length, int use_bucket, ring r)
char completeReduce_retry
void chainCritSig(poly p, int ecart, kStrategy strat)
KINLINE sTObject(ring tailRing=currRing)
void updateS(BOOLEAN toT, kStrategy strat)
KINLINE void ksOldSpolyTail(poly p1, poly q, poly q2, poly spNoether, ring r=currRing)
int posInT2(const TSet set, const int length, LObject &p)
void(* initEcart)(TObject *L)
void kStratInitChangeTailRing(kStrategy strat)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
int redRiloc(LObject *h, kStrategy strat)
poly redNFTail(poly h, const int sl, kStrategy strat)
KINLINE poly ksOldCreateSpoly(poly p1, poly p2, poly spNoether=NULL, ring r=currRing)
void(* enterOnePair)(int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR)
long ind_fact_2(long arg)
int posInT13(const TSet set, const int length, LObject &p)
int posInT0(const TSet set, const int length, LObject &p)
void initEcartPairMora(LObject *Lp, poly f, poly g, int ecartF, int ecartG)
void initBuchMoraPos(kStrategy strat)
KINLINE TObject * S_2_T(int i)
int posInL17(const LSet set, const int length, LObject *L, const kStrategy strat)
int posInL110(const LSet set, const int length, LObject *L, const kStrategy strat)
KINLINE long pTotalDeg() const
KINLINE void LmDeleteAndIter()
void enterOnePairNormal(int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR)
KINLINE poly k_LmShallowCopyDelete_currRing_2_tailRing(poly p, ring tailRing, omBin bin)
int posInTSig(const TSet set, const int length, LObject &p)
void ksCreateSpoly(LObject *Pair, poly spNoether=NULL, int use_buckets=0, ring tailRing=currRing, poly m1=NULL, poly m2=NULL, TObject **R=NULL)
KINLINE TObject * T_2(const skStrategy *strat)
KINLINE poly CanonicalizeP()
void initBbaShift(ideal F, kStrategy strat)
int posInL0(const LSet set, const int length, LObject *L, const kStrategy strat)
void enterSSba(LObject p, int atS, kStrategy strat, int atR=-1)
KINLINE void ShallowCopyDelete(ring new_tailRing, omBin new_tailBin, pShallowCopyDeleteProc p_shallow_copy_delete, BOOLEAN set_max=TRUE)
ideal sba(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
void kDebugPrint(kStrategy strat)
Output some debug info about a given strategy.
ideal freegb(ideal I, int uptodeg, int lVblock)
void deleteInSSba(int i, kStrategy strat)
int posInS(const kStrategy strat, const int length, const poly p, const int ecart_p)
int redRing(LObject *h, kStrategy strat)
void initBba(ideal F, kStrategy strat)
KINLINE void SetLmCurrRing()
KINLINE BOOLEAN arriRewDummy(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
void initenterpairsShift(poly h, int k, int ecart, int isFromQ, kStrategy strat, int atR, int uptodeg, int lV)
poly redtailSba(LObject *L, int pos, kStrategy strat, BOOLEAN withT=FALSE, BOOLEAN normalize=FALSE)
int(* posInLOld)(const LSet Ls, const int Ll, LObject *Lo, const kStrategy strat)
int posInSyz(const kStrategy strat, const poly sig)
int redFirstShift(LObject *h, kStrategy strat)
int posInT110(const TSet set, const int length, LObject &p)
void initBuchMoraShift(ideal F, ideal Q, kStrategy strat)
void cleanT(kStrategy strat)
int posInT17(const TSet set, const int length, LObject &p)
KINLINE void pCleardenom()
BOOLEAN newHEdge(kStrategy strat)
void initEcartPairBba(LObject *Lp, poly f, poly g, int ecartF, int ecartG)
void cancelunit(LObject *p, BOOLEAN inNF=FALSE)
int posInT_EcartFDegpLength(const TSet set, const int length, LObject &p)
void exitSba(kStrategy strat)
poly pMoveCurrTail2poly(poly p, kStrategy strat)
void reorderS(int *suc, kStrategy strat)
poly(* pShallowCopyDeleteProc)(poly s_p, ring source_r, ring dest_r, omBin dest_bin)
returns a poly from dest_r which is a ShallowCopy of s_p from source_r assumes that source_r->N == de...
KINLINE poly GetLmCurrRing()
void(* chainCrit)(poly p, int ecart, kStrategy strat)
int ksReducePolyTail(LObject *PR, TObject *PW, poly Current, poly spNoether=NULL)
KINLINE void Mult_nn(number n)
void enterpairs(poly h, int k, int ec, int pos, kStrategy strat, int atR=-1)
KINLINE poly redtailBba_Z(poly p, int pos, kStrategy strat)
void enterOnePairShift(poly q, poly p, int ecart, int isFromQ, kStrategy strat, int atR, int ecartq, int qisFromQ, int shiftcount, int ifromS, int uptodeg, int lV)
void updateSShift(kStrategy strat, int uptodeg, int lV)
BOOLEAN homogTest(polyset F, int Fmax)
long(* pFDegProc)(poly p, ring r)
KINLINE poly GetLmTailRing()
void completeReduce(kStrategy strat, BOOLEAN withT=FALSE)
void enterL(LSet *set, int *length, int *LSetmax, LObject p, int at)
KINLINE void clearS(poly p, unsigned long p_sev, int *at, int *k, kStrategy strat)
BOOLEAN arriRewCriterionPre(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
KINLINE int SetLength(BOOLEAN lengt_pLength=FALSE)
KINLINE long SetDegStuffReturnLDeg()
void deleteInS(int i, kStrategy strat)
BOOLEAN arriRewCriterion(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
BOOLEAN faugereRewCriterion(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
void enterSyz(LObject p, kStrategy strat, int atT)
int posInL10(const LSet set, const int length, LObject *L, const kStrategy strat)
denominator_list DENOMINATOR_LIST
poly kFindZeroPoly(poly input_p, ring leadRing, ring tailRing)
int kFindDivisibleByInT(const TSet &T, const unsigned long *sevT, const int tl, const LObject *L, const int start=0)
return -1 if no divisor is found number of first divisor in T, otherwise
KINLINE TObject * s_2_t(int i)
int posInT_EcartpLength(const TSet set, const int length, LObject &p)
int kFindNextDivisibleByInS(const kStrategy strat, int start, int max_ind, LObject *L)
void deleteInL(LSet set, int *length, int j, kStrategy strat)
int posInL13(const LSet set, const int length, LObject *L, const kStrategy strat)
void enterT(LObject p, kStrategy strat, int atT=-1)
KINLINE long pFDeg() const
BOOLEAN findMinLMPair(poly sig, unsigned long not_sevSig, kStrategy strat, int start)
BOOLEAN kCheckSpolyCreation(LObject *L, kStrategy strat, poly &m1, poly &m2)
KINLINE long GetpFDeg() const
void enterTShift(LObject p, kStrategy strat, int atT, int uptodeg, int lV)
KINLINE poly LmExtractAndIter()
poly redtail(poly p, int pos, kStrategy strat)
int(* test_PosInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
BOOLEAN syzCriterionInc(poly sig, unsigned long not_sevSig, kStrategy strat)
void kFreeStrat(kStrategy strat)
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize=FALSE)
poly kNF2(ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce)
KINLINE poly ksOldSpolyRedNew(poly p1, poly p2, poly spNoether=NULL)
KINLINE poly GetLm(ring r)
int posInT19(const TSet set, const int length, LObject &p)
static LSet initL(int nr=setmaxL)
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin bin)
int redNF0(LObject *P, kStrategy strat)
int posInT_FDegpLength(const TSet set, const int length, LObject &p)
void(* enterS)(LObject h, int pos, kStrategy strat, int atR)
int(* red2)(LObject *L, kStrategy strat)
int posInT1(const TSet set, const int length, LObject &p)
int redLazy(LObject *h, kStrategy strat)
KINLINE poly kNoetherTail()
int redHoney(LObject *h, kStrategy strat)
KINLINE void T_1_2(const skStrategy *strat, TObject *&T_1, TObject *&T_2)
void enterSBba(LObject p, int atS, kStrategy strat, int atR=-1)
pFDegProc pOrigFDeg_TailRing
int posInL11(const LSet set, const int length, LObject *L, const kStrategy strat)
int redSig(LObject *h, kStrategy strat)
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int int lazyReduce
KINLINE long SetDegStuffReturnLDeg()
poly pCopyL2p(LObject h, kStrategy strat)
void initSL(ideal F, ideal Q, kStrategy strat)
KINLINE void k_GetStrongLeadTerms(const poly p1, const poly p2, const ring leadRing, poly &m1, poly &m2, poly &lcm, const ring taiRing)
int ksReducePoly(LObject *PR, TObject *PW, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL)
KINLINE TObject * T_1(const skStrategy *strat)
KINLINE void ShallowCopyDelete(ring new_tailRing, pShallowCopyDeleteProc p_shallow_copy_delete)
ring sbaRing(kStrategy strat, const ring r=currRing, BOOLEAN complete=TRUE, int sgn=1)