31#define setmaxL ((int)((4096-12)/sizeof(LObject)))
32#define setmaxLinc ((int)((4096)/sizeof(LObject)))
34#define setmaxT ((int)((4096-12)/sizeof(TObject)))
35#define setmaxTinc ((int)((4096)/sizeof(TObject)))
37#define RED_CANONICALIZE 200
38#define REDNF_CANONICALIZE 60
39#define REDTAIL_CANONICALIZE 100
47#if !defined(KDEBUG) && !defined(NO_INLINE)
115 KINLINE void Set(poly p_in, ring c_r, ring t_r);
132#ifdef OLIVER_PRIVAT_LT
137 KINLINE void GetLt(poly &
p, ring &r)
const;
223 int use_bucket, ring r);
392#define ALLOW_PROD_CRIT(A) (!(A)->no_prod_crit)
394#define ALLOW_PROD_CRIT(A) (1)
446#ifdef HAVE_MORE_POS_IN_T
531#define messageSets(s) do {} while (0)
552#if STDZ_EXCHANGE_DURING_REDUCTIO
631 poly &m1, poly &m2,
const ring m_r);
633 poly &m1, poly &m2, poly &
lcm,
const ring taiRing);
648#define kTest(A) (TRUE)
649#define kTest_TS(A) (TRUE)
650#define kTest_T(T,S) (TRUE)
651#define kTest_S(T) (TRUE)
652#define kTest_L(T,R) (TRUE)
672poly
kFindZeroPoly(poly input_p, ring leadRing, ring tailRing);
675poly
kNF2 (ideal F, ideal
Q, poly q,
kStrategy strat,
int lazyReduce);
676ideal
kNF2 (ideal F,ideal
Q,ideal q,
kStrategy strat,
int lazyReduce);
681void f5c (
kStrategy strat,
int& olddeg,
int& minimcnt,
int& hilbeledeg,
682 int& hilbcount,
int& srmax,
int& lrmax,
int& reduc, ideal
Q,
706 poly spNoether =
NULL,
717 poly spNoether =
NULL,
723 poly spNoether =
NULL,
730 poly spNoether =
NULL,
737 poly spNoether =
NULL,
758 poly spNoether =
NULL,
765 poly spNoether =
NULL,
778 poly spNoether =
NULL);
787 int use_buckets=0, ring tailRing=
currRing,
832 unsigned long new_expbound = 0);
854 for(
int i=strat->
Ll;
i>=0;
i--)
856 if (
p==strat->
L[
i].p1)
return i;
int sgn(const Rational &a)
CanonicalForm normalize(const CanonicalForm &F)
normalize a poly, i.e. in char 0 clear denominators, remove integer content in char p divide by leadi...
KINLINE long SetDegStuffReturnLDeg()
KINLINE void Tail_Mult_nn(number n)
KINLINE void LmDeleteAndIter()
KINLINE TObject * T_2(const skStrategy *strat)
KINLINE void PrepareRed(BOOLEAN use_bucket)
KINLINE void CanonicalizeP()
KINLINE void SetLmTail(poly lm, poly new_p, int length, int use_bucket, ring r)
KINLINE void T_1_2(const skStrategy *strat, TObject *&T_1, TObject *&T_2)
KINLINE long pLDeg(BOOLEAN use_last)
KINLINE void Init(ring tailRing=currRing)
KINLINE TObject * T_1(const skStrategy *strat)
KINLINE int SetLength(BOOLEAN lengt_pLength=FALSE)
KINLINE void Tail_Minus_mm_Mult_qq(poly m, poly qq, int lq, poly spNoether)
KINLINE void ShallowCopyDelete(ring new_tailRing, pShallowCopyDeleteProc p_shallow_copy_delete)
KINLINE sLObject & operator=(const sTObject &)
KINLINE void SetShortExpVector()
KINLINE void HeadNormalize()
KINLINE poly GetP(omBin lmBin=(omBin) NULL)
KINLINE sLObject(ring tailRing=currRing)
KINLINE poly LmExtractAndIter()
KINLINE poly GetLm(ring r)
KINLINE poly GetLmCurrRing()
KINLINE void Init(ring r=currRing)
KINLINE void Mult_nn(number n)
KINLINE long SetDegStuffReturnLDeg()
KINLINE poly GetLmTailRing()
KINLINE void pCleardenom()
KINLINE long GetpFDeg() const
KINLINE sTObject(ring tailRing=currRing)
KINLINE void ShallowCopyDelete(ring new_tailRing, omBin new_tailBin, pShallowCopyDeleteProc p_shallow_copy_delete, BOOLEAN set_max=TRUE)
KINLINE void SetLmCurrRing()
KINLINE void LmDeleteAndIter()
KINLINE long pFDeg() const
KINLINE BOOLEAN IsNull() const
KINLINE void Set(ring r=currRing)
KINLINE long pTotalDeg() const
KINLINE poly kNoetherTail()
void(*) chainCrit(poly p, int ecart, kStrategy strat)
int(*) posInL(const LSet set, const int length, LObject *L, const kStrategy strat)
BOOLEAN(*) syzCrit(poly sig, unsigned long not_sevSig, kStrategy strat)
void(*) initEcart(TObject *L)
pFDegProc pOrigFDeg_TailRing
BOOLEAN(*) rewCrit3(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
void(*) enterOnePair(int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR)
BOOLEAN(*) rewCrit2(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
int(*) red2(LObject *L, kStrategy strat)
BOOLEAN(*) rewCrit1(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
KINLINE TObject * s_2_t(int i)
int(*) posInT(const TSet T, const int tl, LObject &h)
void(*) enterS(LObject *h, int pos, kStrategy strat, int atR)
int(*) red(LObject *L, kStrategy strat)
int(*) posInLOld(const LSet Ls, const int Ll, LObject *Lo, const kStrategy strat)
pShallowCopyDeleteProc p_shallow_copy_delete
char completeReduce_retry
KINLINE TObject * S_2_T(int i)
char posInLDependsOnLength
void(*) initEcartPair(LObject *h, poly f, poly g, int ecartF, int ecartG)
pLDegProc pOrigLDeg_TailRing
CFArray copy(const CFList &list)
write elements of list into an array
KINLINE poly k_LmShallowCopyDelete_tailRing_2_currRing(poly p, ring tailRing, omBin lmBin)
KINLINE poly ksOldCreateSpoly(poly p1, poly p2, poly spNoether, ring r)
KINLINE poly redtailBba_Ring(poly p, int pos, kStrategy strat)
void ksOldSpolyTail(poly p1, poly q, poly q2, poly spNoether, ring r)
KINLINE poly k_LmShallowCopyDelete_currRing_2_tailRing(poly p, ring tailRing, omBin tailBin)
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin tailBin)
KINLINE void k_GetStrongLeadTerms(const poly p1, const poly p2, const ring leadRing, poly &m1, poly &m2, poly &lcm, const ring tailRing)
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize)
KINLINE poly ksOldSpolyRed(poly p1, poly p2, poly spNoether)
KINLINE poly k_LmInit_tailRing_2_currRing(poly t_p, ring tailRing, omBin lmBin)
KINLINE TObject ** initR()
KINLINE poly redtailBbaBound(poly p, int pos, kStrategy strat, int bound, BOOLEAN normalize)
KINLINE BOOLEAN arriRewDummy(poly, unsigned long, poly, kStrategy, int)
KINLINE int ksReducePolyTail(LObject *PR, TObject *PW, LObject *Red)
KINLINE poly ksOldSpolyRedNew(poly p1, poly p2, poly spNoether)
KINLINE void clearS(poly p, unsigned long p_sev, int *at, int *k, kStrategy strat)
KINLINE BOOLEAN k_GetLeadTerms(const poly p1, const poly p2, const ring p_r, poly &m1, poly &m2, const ring m_r)
KINLINE poly redtailBba_Z(poly p, int pos, kStrategy strat)
KINLINE unsigned long * initsevT()
int redLiftstd(LObject *h, kStrategy strat)
int ksReducePolyLC(LObject *PR, TObject *PW, poly spNoether, number *coef, kStrategy strat)
void ksCreateSpoly(LObject *Pair, poly spNoether, int use_buckets, ring tailRing, poly m1, poly m2, TObject **R)
int ksReducePoly(LObject *PR, TObject *PW, poly spNoether, number *coef, poly *mon, kStrategy strat, BOOLEAN reduce)
int ksReducePolySig(LObject *PR, TObject *PW, long, poly spNoether, number *coef, kStrategy strat)
int ksReducePolyBound(LObject *PR, TObject *PW, int, poly spNoether, number *coef, kStrategy strat)
int ksReducePolySigRing(LObject *PR, TObject *PW, long, poly spNoether, number *coef, kStrategy strat)
poly ksCreateShortSpoly(poly p1, poly p2, ring tailRing)
int redFirst(LObject *h, kStrategy strat)
int redEcart(LObject *h, kStrategy strat)
void enterSMora(LObject *p, int atS, kStrategy strat, int atR)
int posInL10(const LSet set, const int length, LObject *p, const kStrategy strat)
void initBba(kStrategy strat)
int redRiloc(LObject *h, kStrategy strat)
void initSba(ideal F, kStrategy strat)
void kDebugPrint(kStrategy strat)
void enterSMoraNF(LObject *p, int atS, kStrategy strat, int atR)
BOOLEAN(*) s_poly_proc_t(kStrategy strat)
int redRing_Z(LObject *h, kStrategy strat)
poly kFindZeroPoly(poly input_p, ring leadRing, ring tailRing)
int redFirstShift(LObject *h, kStrategy strat)
int kFindDivisibleByInT_Z(const kStrategy strat, const LObject *L, const int start)
ideal sba(ideal F0, ideal Q, intvec *w, bigintmat *hilb, 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 kTestDivisibleByT0_Z(const kStrategy strat, const LObject *L)
tests if T[0] divides the leading monomial of L, returns -1 if not
poly kNF2(ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce)
int kFindDivisibleByInT_ecart(const kStrategy strat, const LObject *L, const int ecart)
int redHoney(LObject *h, kStrategy strat)
int kFindNextDivisibleByInS(const kStrategy strat, int start, int max_ind, LObject *L)
int redHomog(LObject *h, kStrategy strat)
int redLazy(LObject *h, kStrategy strat)
int redSigRing(LObject *h, kStrategy strat)
poly redtailSba(LObject *L, int pos, kStrategy strat, BOOLEAN withT, BOOLEAN normalize)
poly redNF(poly h, int &max_ind, int nonorm, kStrategy strat)
ideal bbaShift(ideal F, ideal Q, intvec *w, bigintmat *hilb, kStrategy strat)
int redSig(LObject *h, kStrategy strat)
poly kNF2Bound(ideal F, ideal Q, poly q, int bound, kStrategy strat, int lazyReduce)
int redRing(LObject *h, 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
ideal bba(ideal F, ideal Q, intvec *w, bigintmat *hilb, kStrategy strat)
void f5c(kStrategy strat, int &olddeg, int &minimcnt, int &hilbeledeg, int &hilbcount, int &srmax, int &lrmax, int &reduc, ideal Q, intvec *w, bigintmat *hilb)
void initSbaPos(kStrategy strat)
poly redtail(LObject *L, int end_pos, kStrategy strat)
int posInL110(const LSet set, const int length, LObject *p, const kStrategy)
int posInT17(const TSet set, const int length, LObject &p)
void initBuchMora(ideal F, ideal Q, kStrategy strat)
BOOLEAN arriRewCriterionPre(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int)
void enterSyz(LObject &p, kStrategy strat, int atT)
int posInL11Ring(const LSet set, const int length, LObject *p, const kStrategy)
int posInT11(const TSet set, const int length, LObject &p)
int posInT1(const TSet set, const int length, LObject &p)
void enterSBba(LObject *p, int atS, kStrategy strat, int atR)
void message(int i, int *olddeg, int *reduc, kStrategy strat, int red_result)
BOOLEAN arriRewCriterion(poly, unsigned long, poly, kStrategy strat, int start=0)
BOOLEAN kTest(kStrategy strat)
void enterT_strong(LObject *p, kStrategy strat, int atT)
int posInT_EcartpLength(const TSet set, const int length, LObject &p)
TObject * kFindDivisibleByInS_T(kStrategy strat, int end_pos, LObject *L, TObject *T, long ecart)
int posInT0(const TSet, const int length, LObject &)
BOOLEAN kTest_TS(kStrategy strat)
void enterOnePairNormal(int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR=-1)
int kFindInT(poly p, TSet T, int tlength)
returns index of p in TSet, or -1 if not found
BOOLEAN kCheckStrongCreation(int atR, poly m1, int atS, poly m2, kStrategy strat)
void enterpairsSig(poly h, poly hSig, int hFrom, int k, int ecart, int pos, kStrategy strat, int atR)
void enterL(LSet *set, int *length, int *LSetmax, LObject p, int at)
BOOLEAN faugereRewCriterion(poly sig, unsigned long not_sevSig, poly, kStrategy strat, int start=0)
void enterSBbaShift(LObject *p, int atS, kStrategy strat, int atR)
int posInT2(const TSet set, const int length, LObject &p)
int posInL13(const LSet set, const int length, LObject *p, const kStrategy)
int posInT_pLength(const TSet set, const int length, LObject &p)
void enterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
int posInT13(const TSet set, const int length, LObject &p)
void redtailBbaAlsoLC_Z(LObject *L, int end_pos, kStrategy strat)
BOOLEAN syzCriterionInc(poly sig, unsigned long not_sevSig, kStrategy strat)
void chainCritSig(poly p, int, kStrategy strat)
int posInSMonFirst(const kStrategy strat, const int length, const poly p)
void initEcartPairMora(LObject *Lp, poly, poly, int ecartF, int ecartG)
void superenterpairsSig(poly h, poly hSig, int hFrom, int k, int ecart, int pos, kStrategy strat, int atR)
void initBuchMoraPos(kStrategy strat)
void initenterpairs(poly h, int k, int ecart, int isFromQ, kStrategy strat, int atR)
void initS(ideal F, ideal Q, kStrategy strat)
BOOLEAN kStratChangeTailRing(kStrategy strat, LObject *L, TObject *T, unsigned long expbound)
ring sbaRing(kStrategy strat, const ring r, BOOLEAN, int)
int posInL0(const LSet set, const int length, LObject *p, const kStrategy)
void chainCritOpt_1(poly, int, kStrategy strat)
int posInL15(const LSet set, const int length, LObject *p, const kStrategy)
int posInT17_c(const TSet set, const int length, LObject &p)
poly redtailBbaShift(LObject *L, int pos, kStrategy strat, BOOLEAN withT, BOOLEAN normalize)
int posInT_EcartFDegpLength(const TSet set, const int length, LObject &p)
int posInT15(const TSet set, const int length, LObject &p)
void postReduceByMon(LObject *h, kStrategy strat)
used for GB over ZZ: intermediate reduction by monomial elements background: any known constant eleme...
BOOLEAN syzCriterion(poly sig, unsigned long not_sevSig, kStrategy strat)
void HEckeTest(poly pp, kStrategy strat)
void enterExtendedSpolySig(poly h, poly hSig, kStrategy strat)
void enterpairsShift(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
BOOLEAN kTest_L(LObject *L, kStrategy strat, BOOLEAN testp, int lpos, TSet T, int tlength)
void exitBuchMora(kStrategy strat)
void messageStatSBA(int hilbcount, kStrategy strat)
void initEcartNormal(TObject *h)
int posInS(const kStrategy strat, const int length, const poly p, const int ecart_p)
void updateS(BOOLEAN toT, kStrategy strat)
void initSLSba(ideal F, ideal Q, kStrategy strat)
int posInL11Ringls(const LSet set, const int length, LObject *p, const kStrategy)
int posInL17(const LSet set, const int length, LObject *p, const kStrategy)
void initSyzRules(kStrategy strat)
int posInLSig(const LSet set, const int length, LObject *p, const kStrategy)
void initSbaBuchMora(ideal F, ideal Q, kStrategy strat)
BOOLEAN kCheckSpolyCreation(LObject *L, kStrategy strat, poly &m1, poly &m2)
void enterT(LObject *p, kStrategy strat, int atT)
void cleanT(kStrategy strat)
int posInT110(const TSet set, const int length, LObject &p)
BOOLEAN kTest_S(kStrategy strat)
int posInSyz(const kStrategy strat, poly sig)
void reorderS(int *suc, kStrategy strat)
void enterTShift(LObject *p, kStrategy strat, int atT)
void enterExtendedSpoly(poly h, kStrategy strat)
int posInL15Ring(const LSet set, const int length, LObject *p, const kStrategy)
BOOLEAN kTest_T(TObject *T, kStrategy strat, int i, char TN)
void deleteHC(LObject *L, kStrategy strat, BOOLEAN fromNext)
void updateResult(ideal r, ideal Q, kStrategy strat)
void superenterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
int posInT19(const TSet set, const int length, LObject &p)
poly redtailBba_NF(poly p, kStrategy strat)
void exitSba(kStrategy strat)
BOOLEAN enterOnePairShift(poly q, poly p, int ecart, int isFromQ, kStrategy strat, int atR, int ecartq, int qisFromQ, int shiftcount, int ifromS)
void deleteInL(LSet set, int *length, int j, kStrategy strat)
void kStratInitChangeTailRing(kStrategy strat)
void initBuchMoraCrit(kStrategy strat)
void completeReduce(kStrategy strat, BOOLEAN withT)
void initBuchMoraPosRing(kStrategy strat)
void enterSSba(LObject *p, int atS, kStrategy strat, int atR)
int kFindInTShift(poly p, TSet T, int tlength)
void postReduceByMonSig(LObject *h, kStrategy strat)
void messageSets(kStrategy strat)
void deleteInS(int i, kStrategy strat)
int posInT_FDegpLength(const TSet set, const int length, LObject &p)
int posInLSigRing(const LSet set, const int length, LObject *p, const kStrategy)
BOOLEAN sbaCheckGcdPair(LObject *h, kStrategy strat)
int posInLF5CRing(const LSet set, int start, const int length, LObject *p, const kStrategy)
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...
void chainCritNormal(poly p, int ecart, kStrategy strat)
void initEcartBBA(TObject *h)
VAR denominator_list DENOMINATOR_LIST
int posInL11(const LSet set, const int length, LObject *p, const kStrategy)
void initEcartPairBba(LObject *Lp, poly, poly, int, int)
void messageStat(int hilbcount, kStrategy strat)
void initSL(ideal F, ideal Q, kStrategy strat)
int posInIdealMonFirst(const ideal F, const poly p, int start, int end)
void finalReduceByMon(kStrategy strat)
used for GB over ZZ: final reduction by constant elements background: any known constant element of i...
void initSbaCrit(kStrategy strat)
BOOLEAN newHEdge(kStrategy strat)
void cancelunit(LObject *L, BOOLEAN inNF)
void initHilbCrit(ideal, ideal, bigintmat **hilb, kStrategy strat)
BOOLEAN findMinLMPair(poly sig, unsigned long not_sevSig, kStrategy strat, int start)
int ksReducePolyGCD(LObject *PR, TObject *PW, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL)
denominator_list_s * denominator_list
int redNF0(LObject *P, kStrategy strat)
int posInTSig(const TSet set, const int length, LObject &p)
int kFindSameLMInT_Z(const kStrategy strat, const LObject *L, const int start=0)
static int kFindInL1(const poly p, const kStrategy strat)
static LSet initL(int nr=setmaxL)
void kFreeStrat(kStrategy strat)
static void kDeleteLcm(LObject *P)
int posInL10Ring(const LSet set, const int length, LObject *L, const kStrategy strat)
void superenterpairsShift(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
void entersets(LObject h)
int ksReducePolyZ(LObject *PR, TObject *PW, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL)
poly redNFTail(poly h, const int sl, kStrategy strat)
int redHoneyM(LObject *h, kStrategy strat)
BOOLEAN homogTest(polyset F, int Fmax)
int lcm(unsigned long *l, unsigned long *a, unsigned long *b, unsigned long p, int dega, int degb)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Compatibility layer for legacy polynomial operations (over currRing).
#define pLmDelete(p)
assume p != NULL, deletes Lm(p)->coef and Lm(p)
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...
long(*) pLDegProc(poly p, int *length, ring r)
long(*) pFDegProc(poly p, ring r)
#define rField_is_Ring(R)