27 #define HAVE_TAIL_RING 30 #define setmaxL ((4096-12)/sizeof(LObject)) 31 #define setmaxLinc ((4096)/sizeof(LObject)) 33 #define setmaxT ((4096-12)/sizeof(TObject)) 34 #define setmaxTinc ((4096)/sizeof(TObject)) 42 #if !defined(KDEBUG) && !defined(NO_INLINE) 43 #define KINLINE inline 110 KINLINE void Set(poly p_in, ring c_r, ring t_r);
125 KINLINE void GetLm(poly &p, ring &r)
const;
127 #ifdef OLIVER_PRIVAT_LT 132 KINLINE void GetLt(poly &p, ring &r)
const;
145 KINLINE void LmDeleteAndIter();
149 KINLINE long pTotalDeg()
const;
160 KINLINE long SetDegStuffReturnLDeg();
164 KINLINE void ShallowCopyDelete(ring new_tailRing,
omBin new_tailBin,
210 KINLINE void LmDeleteAndIter();
211 KINLINE poly LmExtractAndIter();
217 int use_bucket, ring r);
218 KINLINE void Tail_Minus_mm_Mult_qq(poly
m, poly qq,
int lq, poly spNoether);
219 KINLINE void Tail_Mult_nn(number
n);
236 KINLINE long SetDegStuffReturnLDeg();
244 KINLINE void ShallowCopyDelete(ring new_tailRing,
248 KINLINE void SetShortExpVector();
283 void (*initEcartPair)(
LObject *
h, poly
f, poly
g,
int ecartF,
int ecartG);
284 int (*posInLOld)(
const LSet Ls,
const int Ll,
286 void (*enterOnePair) (
int i,poly
p,
int ecart,
int isFromQ,
kStrategy strat,
int atR );
289 BOOLEAN (*rewCrit1) (poly sig,
unsigned long not_sevSig, poly lm,
kStrategy strat,
int start );
290 BOOLEAN (*rewCrit2) (poly sig,
unsigned long not_sevSig, poly lm,
kStrategy strat,
int start );
291 BOOLEAN (*rewCrit3) (poly sig,
unsigned long not_sevSig, poly lm,
kStrategy strat,
int start );
393 #define ALLOW_PROD_CRIT(A) (!(A)->no_prod_crit) 395 #define ALLOW_PROD_CRIT(A) (1) 448 #ifdef HAVE_MORE_POS_IN_T 517 poly
kCreateZeroPoly(
long exp[],
long cabsind, poly* t_p, ring leadRing, ring tailRing);
540 #define messageSets(s) do {} while (0) 634 poly &m1, poly &m2,
const ring m_r);
637 poly &m1, poly &m2, poly &lcm,
const ring taiRing);
653 #define kTest(A) (TRUE) 654 #define kTest_TS(A) (TRUE) 655 #define kTest_T(T) (TRUE) 656 #define kTest_S(T) (TRUE) 657 #define kTest_L(T,R) (TRUE) 666 poly
kFindZeroPoly(poly input_p, ring leadRing, ring tailRing);
669 poly
kNF2 (ideal F, ideal
Q, poly q,
kStrategy strat,
int lazyReduce);
670 ideal
kNF2 (ideal F,ideal
Q,ideal q,
kStrategy strat,
int lazyReduce);
675 void f5c (
kStrategy strat,
int& olddeg,
int& minimcnt,
int& hilbeledeg,
676 int& hilbcount,
int& srmax,
int& lrmax,
int& reduc, ideal
Q,
699 poly spNoether =
NULL,
708 poly spNoether =
NULL,
714 poly spNoether =
NULL,
721 poly spNoether =
NULL,
728 poly spNoether =
NULL,
749 poly spNoether =
NULL,
756 poly spNoether =
NULL,
769 poly spNoether =
NULL);
778 int use_buckets=0, ring tailRing=
currRing,
825 unsigned long new_expbound = 0);
836 KINLINE void clearS (poly p,
unsigned long p_sev,
int* at,
int* k,
856 void enterOnePairShift (poly q, poly p,
int ecart,
int isFromQ,
kStrategy strat,
int atR,
int ecartq,
int qisFromQ,
int shiftcount,
int ifromS);
KINLINE TObject ** initR()
int posInT_pLength(const TSet set, const int length, LObject &p)
int posInT_FDegpLength(const TSet set, const int length, LObject &p)
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)
int posInLRing(const LSet set, const int length, LObject *L, const kStrategy strat)
denominator_list_s * denominator_list
int posInLSig(const LSet set, const int length, LObject *L, const kStrategy strat)
static number Copy(number a, const coeffs r)
int ksReducePolyLC(LObject *PR, TObject *PW, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL)
void updateSShift(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)
int posInLF5CRing(const LSet set, int start, const int length, LObject *L, const kStrategy strat)
void initSbaCrit(kStrategy strat)
static CanonicalForm bound(const CFMatrix &M)
void updateResult(ideal r, ideal Q, kStrategy strat)
void mu(int **points, int sizePoints)
void initEcartNormal(TObject *h)
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
void postReduceByMonSig(LObject *h, kStrategy strat)
KINLINE poly ksOldSpolyRed(poly p1, poly p2, poly spNoether=NULL)
BOOLEAN sbaCheckGcdPair(LObject *h, kStrategy strat)
int posInT11(const TSet set, const int length, LObject &p)
pLDegProc pOrigLDeg_TailRing
void enterTShift(LObject p, kStrategy strat, int atT=-1)
gmp_float exp(const gmp_float &a)
int posInSMonFirst(const kStrategy strat, const int length, const poly p)
int posInL15(const LSet set, const int length, LObject *L, const kStrategy strat)
int sgn(const Rational &a)
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 preIntegerCheck(ideal F, ideal Q)
used for GB over ZZ: look for constant and monomial elements in the ideal background: any known const...
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 chainCritNormal(poly p, int ecart, kStrategy strat)
ideal bbaShift(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
poly ksCreateShortSpoly(poly p1, poly p2, ring tailRing)
KINLINE BOOLEAN k_GetLeadTerms(const poly p1, const poly p2, const ring p_r, poly &m1, poly &m2, const ring m_r)
KINLINE poly k_LmShallowCopyDelete_tailRing_2_currRing(poly p, ring tailRing, omBin bin)
void messageStat(int hilbcount, kStrategy strat)
KINLINE poly k_LmInit_tailRing_2_currRing(poly p, ring tailRing, omBin bin)
void enterExtendedSpolySig(poly h, poly hSig, kStrategy strat)
ideal bba(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
#define pLmDelete(p)
assume p != NULL, deletes Lm(p)->coef and Lm(p)
void initSbaPos(kStrategy strat)
int redRing_Z(LObject *h, kStrategy strat)
static void kDeleteLcm(LObject *P)
void messageStatSBA(int hilbcount, kStrategy strat)
int posInIdealMonFirst(const ideal F, const poly p, int start=0, int end=-1)
poly kCreateZeroPoly(long exp[], long cabsind, poly *t_p, ring leadRing, ring tailRing)
pShallowCopyDeleteProc p_shallow_copy_delete
void enterpairsSig(poly h, poly hSig, int from, int k, int ec, int pos, kStrategy strat, int atR=-1)
void enterOnePairSelfShifts(poly qq, poly p, int ecart, int isFromQ, kStrategy strat, int atR)
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)
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)
void enterT(LObject &p, kStrategy strat, int atT=-1)
KINLINE unsigned long * initsevT()
void chainCritOpt_1(poly, int, kStrategy strat)
void initBbaShift(kStrategy strat)
int redHomog(LObject *h, kStrategy strat)
void enterExtendedSpoly(poly h, kStrategy strat)
void initEcartBBA(TObject *h)
void HEckeTest(poly pp, kStrategy strat)
long(* pLDegProc)(poly p, int *length, ring r)
int kFindDivisibleByInT(const kStrategy strat, const LObject *L, const int start=0)
return -1 if no divisor is found number of first divisor in T, otherwise
void exitBuchMora(kStrategy strat)
void postReduceByMon(LObject *h, kStrategy strat)
used for GB over ZZ: intermediate reduction by monomial elements background: any known constant eleme...
int posInLF5C(const LSet set, const int length, LObject *L, const kStrategy strat)
void initBuchMoraCrit(kStrategy strat)
int ksReducePolyGCD(LObject *PR, TObject *PW, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL)
void initSLSba(ideal F, ideal Q, kStrategy strat)
char completeReduce_retry
void chainCritSig(poly p, int ecart, kStrategy strat)
poly kNF2Bound(ideal F, ideal Q, poly q, int bound, kStrategy strat, int lazyReduce)
void updateS(BOOLEAN toT, kStrategy strat)
int ksReducePolyZ(LObject *PR, TObject *PW, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL)
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 kStratInitChangeTailRing(kStrategy strat)
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)
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)
int posInL10Ring(const LSet set, const int length, LObject *L, const kStrategy strat)
poly redtail(poly p, int end_pos, kStrategy strat)
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)
static void Normalize(number &a, const coeffs r)
void enterpairsShift(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
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)
int posInL0(const LSet set, const int length, LObject *L, const kStrategy strat)
int ksReducePolySigRing(LObject *PR, TObject *PW, long idx, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL)
void enterSSba(LObject &p, int atS, kStrategy strat, int atR=-1)
ideal sba(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
void superenterpairsSig(poly h, poly hSig, int hFrom, int k, int ecart, int pos, kStrategy strat, int atR=-1)
int kFindDivisibleByInT_Z(const kStrategy strat, const LObject *L, const int start=0)
int redSigRing(LObject *h, kStrategy strat)
void kDebugPrint(kStrategy strat)
Output some debug info about a given strategy.
void deleteInSSba(int i, kStrategy strat)
int posInS(const kStrategy strat, const int length, const poly p, const int ecart_p)
int posInLSigRing(const LSet set, const int length, LObject *L, const kStrategy strat)
int redRing(LObject *h, kStrategy strat)
KINLINE BOOLEAN arriRewDummy(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
void enterOnePairShift(poly q, poly p, int ecart, int isFromQ, kStrategy strat, int atR, int ecartq, int qisFromQ, int shiftcount, int ifromS)
void redtailBbaAlsoLC_Z(LObject *L, int end_pos, kStrategy strat)
int posInSyz(const kStrategy strat, const poly sig)
int redFirstShift(LObject *h, kStrategy strat)
static void Delete(number *a, const coeffs r)
int posInT110(const TSet set, const int length, LObject &p)
void initBuchMoraShift(ideal F, ideal Q, kStrategy strat)
void cleanT(kStrategy strat)
KINLINE poly redtailBbaBound(poly p, int end_pos, kStrategy strat, int bound, BOOLEAN normalize=FALSE)
void enterT_strong(LObject &p, kStrategy strat, int atT=-1)
int posInT17(const TSet set, const int length, LObject &p)
int posInL11Ringls(const LSet set, const int length, LObject *L, const kStrategy strat)
BOOLEAN newHEdge(kStrategy strat)
void initEcartPairBba(LObject *Lp, poly f, poly g, int ecartF, int ecartG)
void cancelunit(LObject *p, BOOLEAN inNF=FALSE)
static number Init(long i, const coeffs r)
void exitSba(kStrategy strat)
poly pMoveCurrTail2poly(poly p, kStrategy strat)
poly redtailSba(LObject *L, int end_pos, kStrategy strat, BOOLEAN withT=FALSE, BOOLEAN normalize=FALSE)
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...
void initBba(kStrategy strat)
int ksReducePolyTail(LObject *PR, TObject *PW, poly Current, poly spNoether=NULL)
KINLINE poly redtailBba(poly p, int end_pos, kStrategy strat, BOOLEAN normalize=FALSE)
static BOOLEAN rField_is_Ring(const ring r)
int posInT_EcartFDegpLength(const TSet set, const int length, LObject &p)
void replaceInLAndSAndT(LObject &p, int tj, kStrategy strat)
void enterSyz(LObject &p, kStrategy strat, int atT)
void enterpairs(poly h, int k, int ec, int pos, kStrategy strat, int atR=-1)
BOOLEAN homogTest(polyset F, int Fmax)
long(* pFDegProc)(poly p, ring r)
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)
void pNorm(poly p, const ring R=currRing)
static BOOLEAN length(leftv result, leftv arg)
BOOLEAN(* s_poly_proc_t)(kStrategy strat)
BOOLEAN arriRewCriterionPre(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
int posInT17_c(const TSet set, const int length, LObject &p)
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 enterSBba(LObject &p, int atS, kStrategy strat, int atR=-1)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
int kFindSameLMInT_Z(const kStrategy strat, const LObject *L, const int start=0)
void finalReduceByMon(kStrategy strat)
used for GB over ZZ: final reduction by constant elements background: any known constant element of i...
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)
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced ...
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)
BOOLEAN findMinLMPair(poly sig, unsigned long not_sevSig, kStrategy strat, int start)
char posInLDependsOnLength
BOOLEAN kCheckSpolyCreation(LObject *L, kStrategy strat, poly &m1, poly &m2)
TObject * kFindDivisibleByInS_T(kStrategy strat, int end_pos, LObject *L, TObject *T, long ecart=LONG_MAX)
KINLINE poly redtailBba_Z(poly p, int end_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)
poly kNF2(ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce)
KINLINE poly ksOldSpolyRedNew(poly p1, poly p2, poly spNoether=NULL)
int posInT19(const TSet set, const int length, LObject &p)
static LSet initL(int nr=setmaxL)
void initBuchMoraPosRing(kStrategy strat)
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin bin)
int redNF0(LObject *P, kStrategy strat)
int posInT1(const TSet set, const int length, LObject &p)
int posInL11Ring(const LSet set, const int length, LObject *L, const kStrategy strat)
int redLazy(LObject *h, kStrategy strat)
void enterSBbaShift(LObject &p, int atS, kStrategy strat, int atR=-1)
int redHoney(LObject *h, kStrategy strat)
pFDegProc pOrigFDeg_TailRing
int posInL11(const LSet set, const int length, LObject *L, const kStrategy strat)
int ksReducePolyBound(LObject *PR, TObject *PW, int bound, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL)
int redSig(LObject *h, kStrategy strat)
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)
ring sbaRing(kStrategy strat, const ring r=currRing, BOOLEAN complete=TRUE, int sgn=1)
int posInL15Ring(const LSet set, const int length, LObject *L, const kStrategy strat)