 |
My Project
debian-1:4.1.2-p1+ds-2
|
Go to the source code of this file.
|
void | deleteHC (poly *p, int *e, int *l, kStrategy strat) |
|
void | deleteHC (LObject *L, kStrategy strat, BOOLEAN fromNext=FALSE) |
|
void | deleteInS (int i, kStrategy strat) |
|
void | deleteInSSba (int i, kStrategy strat) |
|
void | cleanT (kStrategy strat) |
|
static LSet | initL (int nr=setmaxL) |
|
void | deleteInL (LSet set, int *length, int j, kStrategy strat) |
|
void | enterL (LSet *set, int *length, int *LSetmax, LObject p, int at) |
|
void | enterSBba (LObject &p, int atS, kStrategy strat, int atR=-1) |
|
void | enterSBbaShift (LObject &p, int atS, kStrategy strat, int atR=-1) |
|
void | enterSSba (LObject &p, int atS, kStrategy strat, int atR=-1) |
|
void | initEcartPairBba (LObject *Lp, poly f, poly g, int ecartF, int ecartG) |
|
void | initEcartPairMora (LObject *Lp, poly f, poly g, int ecartF, int ecartG) |
|
int | posInS (const kStrategy strat, const int length, const poly p, const int ecart_p) |
|
int | posInSMonFirst (const kStrategy strat, const int length, const poly p) |
|
int | posInIdealMonFirst (const ideal F, const poly p, int start=0, int end=-1) |
|
int | posInT0 (const TSet set, const int length, LObject &p) |
|
int | posInT1 (const TSet set, const int length, LObject &p) |
|
int | posInT2 (const TSet set, const int length, LObject &p) |
|
int | posInT11 (const TSet set, const int length, LObject &p) |
|
int | posInTSig (const TSet set, const int length, LObject &p) |
|
int | posInT110 (const TSet set, const int length, LObject &p) |
|
int | posInT13 (const TSet set, const int length, LObject &p) |
|
int | posInT15 (const TSet set, const int length, LObject &p) |
|
int | posInT17 (const TSet set, const int length, LObject &p) |
|
int | posInT17_c (const TSet set, const int length, LObject &p) |
|
int | posInT19 (const TSet set, const int length, LObject &p) |
|
int | posInT_EcartpLength (const TSet set, const int length, LObject &p) |
|
int | posInT_EcartFDegpLength (const TSet set, const int length, LObject &p) |
|
int | posInT_FDegpLength (const TSet set, const int length, LObject &p) |
|
int | posInT_pLength (const TSet set, const int length, LObject &p) |
|
void | reorderS (int *suc, kStrategy strat) |
|
int | posInLF5C (const LSet set, const int length, LObject *L, const kStrategy strat) |
|
int | posInLSig (const LSet set, const int length, LObject *L, const kStrategy strat) |
|
int | posInLSigRing (const LSet set, const int length, LObject *L, const kStrategy strat) |
|
int | posInLRing (const LSet set, const int length, LObject *L, const kStrategy strat) |
|
int | posInSyz (const kStrategy strat, const poly sig) |
|
int | posInL0 (const LSet set, const int length, LObject *L, const kStrategy strat) |
|
int | posInL11 (const LSet set, const int length, LObject *L, const kStrategy strat) |
|
int | posInL11Ring (const LSet set, const int length, LObject *L, const kStrategy strat) |
|
int | posInLF5CRing (const LSet set, int start, const int length, LObject *L, const kStrategy strat) |
|
int | posInL11Ringls (const LSet set, const int length, LObject *L, const kStrategy strat) |
|
int | posInL13 (const LSet set, const int length, LObject *L, const kStrategy strat) |
|
int | posInL15 (const LSet set, const int length, LObject *L, const kStrategy strat) |
|
int | posInL15Ring (const LSet set, const int length, LObject *L, const kStrategy strat) |
|
int | posInL17 (const LSet set, const int length, LObject *L, const kStrategy strat) |
|
int | posInL10 (const LSet set, const int length, LObject *L, const kStrategy strat) |
|
int | posInL10Ring (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 poly | redtailBba (poly p, int end_pos, kStrategy strat, BOOLEAN normalize=FALSE) |
|
KINLINE poly | redtailBbaBound (poly p, int end_pos, kStrategy strat, int bound, BOOLEAN normalize=FALSE) |
|
KINLINE poly | redtailBba_Z (poly p, int end_pos, kStrategy strat) |
|
poly | redtailBba_Z (LObject *L, int end_pos, kStrategy strat) |
|
void | redtailBbaAlsoLC_Z (LObject *L, int end_pos, kStrategy strat) |
|
poly | redtailBba (LObject *L, int end_pos, kStrategy strat, BOOLEAN withT=FALSE, BOOLEAN normalize=FALSE) |
|
poly | redtailBbaBound (LObject *L, int end_pos, kStrategy strat, int bound, BOOLEAN withT=FALSE, BOOLEAN normalize=FALSE) |
|
poly | redtailSba (LObject *L, int end_pos, kStrategy strat, BOOLEAN withT=FALSE, BOOLEAN normalize=FALSE) |
|
poly | redtailBba (TObject *T, int end_pos, kStrategy strat) |
|
poly | redtail (poly p, int end_pos, kStrategy strat) |
|
poly | redtail (LObject *L, int end_pos, kStrategy strat) |
|
poly | redNF (poly h, int &max_ind, int nonorm, kStrategy strat) |
|
int | redNF0 (LObject *P, kStrategy strat) |
|
poly | redNFTail (poly h, const int sl, kStrategy strat) |
|
int | redHoney (LObject *h, kStrategy strat) |
|
int | redRing (LObject *h, kStrategy strat) |
|
int | redRing_Z (LObject *h, kStrategy strat) |
|
int | redRiloc (LObject *h, kStrategy strat) |
|
void | enterExtendedSpoly (poly h, kStrategy strat) |
|
void | enterExtendedSpolySig (poly h, poly hSig, kStrategy strat) |
|
void | superenterpairs (poly h, int k, int ecart, int pos, kStrategy strat, int atR=-1) |
|
void | superenterpairsSig (poly h, poly hSig, int hFrom, int k, int ecart, int pos, kStrategy strat, int atR=-1) |
|
poly | kCreateZeroPoly (long exp[], long cabsind, poly *t_p, ring leadRing, ring tailRing) |
|
long | ind2 (long arg) |
|
long | ind_fact_2 (long arg) |
|
long | twoPow (long arg) |
|
ideal | createG0 () |
|
int | redLazy (LObject *h, kStrategy strat) |
|
int | redHomog (LObject *h, kStrategy strat) |
|
int | redSig (LObject *h, kStrategy strat) |
|
int | redSigRing (LObject *h, kStrategy strat) |
|
void | enterpairsSig (poly h, poly hSig, int from, int k, int ec, int pos, kStrategy strat, int atR=-1) |
|
void | enterpairs (poly h, int k, int ec, int pos, kStrategy strat, int atR=-1) |
|
void | entersets (LObject h) |
|
void | pairs () |
|
BOOLEAN | sbaCheckGcdPair (LObject *h, kStrategy strat) |
|
void | message (int i, int *reduc, int *olddeg, kStrategy strat, int red_result) |
|
void | messageStat (int hilbcount, kStrategy strat) |
|
void | messageStatSBA (int hilbcount, kStrategy strat) |
|
void | initEcartNormal (TObject *h) |
|
void | initEcartBBA (TObject *h) |
|
void | initS (ideal F, ideal Q, kStrategy strat) |
|
void | initSL (ideal F, ideal Q, kStrategy strat) |
|
void | initSLSba (ideal F, ideal Q, kStrategy strat) |
|
void | initSyzRules (kStrategy strat) |
|
void | updateS (BOOLEAN toT, kStrategy strat) |
|
void | enterSyz (LObject &p, kStrategy strat, int atT) |
|
void | enterT (LObject &p, kStrategy strat, int atT=-1) |
|
void | replaceInLAndSAndT (LObject &p, int tj, kStrategy strat) |
|
void | enterT_strong (LObject &p, kStrategy strat, int atT=-1) |
|
void | cancelunit (LObject *p, BOOLEAN inNF=FALSE) |
|
void | HEckeTest (poly pp, kStrategy strat) |
|
void | initBuchMoraCrit (kStrategy strat) |
|
void | initSbaCrit (kStrategy strat) |
|
void | initHilbCrit (ideal F, ideal Q, intvec **hilb, kStrategy strat) |
|
void | initBuchMoraPos (kStrategy strat) |
|
void | initBuchMoraPosRing (kStrategy strat) |
|
void | initSbaPos (kStrategy strat) |
|
void | initBuchMora (ideal F, ideal Q, kStrategy strat) |
|
void | initSbaBuchMora (ideal F, ideal Q, kStrategy strat) |
|
void | exitBuchMora (kStrategy strat) |
|
void | exitSba (kStrategy strat) |
|
void | updateResult (ideal r, ideal Q, kStrategy strat) |
|
void | completeReduce (kStrategy strat, BOOLEAN withT=FALSE) |
|
void | kFreeStrat (kStrategy strat) |
|
void | enterOnePairNormal (int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR) |
|
void | chainCritNormal (poly p, int ecart, kStrategy strat) |
|
void | chainCritOpt_1 (poly, int, kStrategy strat) |
|
void | chainCritSig (poly p, int ecart, kStrategy strat) |
|
BOOLEAN | homogTest (polyset F, int Fmax) |
|
BOOLEAN | newHEdge (kStrategy strat) |
|
BOOLEAN | syzCriterion (poly sig, unsigned long not_sevSig, kStrategy strat) |
|
BOOLEAN | syzCriterionInc (poly sig, unsigned long not_sevSig, kStrategy strat) |
|
KINLINE BOOLEAN | arriRewDummy (poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start) |
|
BOOLEAN | arriRewCriterion (poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start) |
|
BOOLEAN | arriRewCriterionPre (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) |
|
BOOLEAN | findMinLMPair (poly sig, unsigned long not_sevSig, kStrategy strat, int start) |
|
int | kFindInT (poly p, TSet T, int tlength) |
| returns index of p in TSet, or -1 if not found More...
|
|
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 More...
|
|
int | kFindDivisibleByInT_Z (const kStrategy strat, const LObject *L, const int start=0) |
|
int | kFindSameLMInT_Z (const kStrategy strat, const LObject *L, const int start=0) |
|
int | kFindDivisibleByInS (const kStrategy strat, int *max_ind, LObject *L) |
| return -1 if no divisor is found number of first divisor in S, otherwise More...
|
|
int | kFindNextDivisibleByInS (const kStrategy strat, int start, int max_ind, LObject *L) |
|
TObject * | kFindDivisibleByInS_T (kStrategy strat, int end_pos, LObject *L, TObject *T, long ecart=LONG_MAX) |
|
KINLINE TSet | initT () |
|
KINLINE TObject ** | initR () |
|
KINLINE unsigned long * | initsevT () |
|
KINLINE poly | k_LmInit_currRing_2_tailRing (poly p, ring tailRing, omBin bin) |
|
KINLINE poly | k_LmInit_tailRing_2_currRing (poly p, ring tailRing, omBin bin) |
|
KINLINE poly | k_LmShallowCopyDelete_currRing_2_tailRing (poly p, ring tailRing, omBin bin) |
|
KINLINE poly | k_LmShallowCopyDelete_tailRing_2_currRing (poly p, ring tailRing, omBin bin) |
|
KINLINE poly | k_LmInit_currRing_2_tailRing (poly p, ring tailRing) |
|
KINLINE poly | k_LmInit_tailRing_2_currRing (poly p, ring tailRing) |
|
KINLINE poly | k_LmShallowCopyDelete_currRing_2_tailRing (poly p, ring tailRing) |
|
KINLINE poly | k_LmShallowCopyDelete_tailRing_2_currRing (poly p, 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 void | k_GetStrongLeadTerms (const poly p1, const poly p2, const ring leadRing, poly &m1, poly &m2, poly &lcm, const ring taiRing) |
|
poly | kFindZeroPoly (poly input_p, ring leadRing, ring tailRing) |
|
ideal | bba (ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat) |
|
ideal | sba (ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat) |
|
poly | kNF2 (ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce) |
|
ideal | kNF2 (ideal F, ideal Q, ideal q, kStrategy strat, int lazyReduce) |
|
poly | kNF2Bound (ideal F, ideal Q, poly q, int bound, kStrategy strat, int lazyReduce) |
|
ideal | kNF2Bound (ideal F, ideal Q, ideal q, int bound, kStrategy strat, int lazyReduce) |
|
void | initBba (kStrategy strat) |
|
void | initSba (ideal F, 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 | ksReducePoly (LObject *PR, TObject *PW, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL) |
|
int | ksReducePolyZ (LObject *PR, TObject *PW, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL) |
|
int | ksReducePolyLC (LObject *PR, TObject *PW, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL) |
|
int | ksReducePolyGCD (LObject *PR, TObject *PW, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL) |
|
int | ksReducePolyBound (LObject *PR, TObject *PW, int bound, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL) |
|
int | ksReducePolySig (LObject *PR, TObject *PW, long idx, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL) |
|
int | ksReducePolySigRing (LObject *PR, TObject *PW, long idx, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL) |
|
int | ksReducePolyTail (LObject *PR, TObject *PW, poly Current, poly spNoether=NULL) |
|
KINLINE int | ksReducePolyTail (LObject *PR, TObject *PW, LObject *Red) |
|
void | ksCreateSpoly (LObject *Pair, poly spNoether=NULL, int use_buckets=0, ring tailRing=currRing, poly m1=NULL, poly m2=NULL, TObject **R=NULL) |
|
poly | ksCreateShortSpoly (poly p1, poly p2, ring tailRing) |
|
KINLINE poly | ksOldSpolyRed (poly p1, poly p2, poly spNoether=NULL) |
|
KINLINE poly | ksOldSpolyRedNew (poly p1, poly p2, poly spNoether=NULL) |
|
KINLINE poly | ksOldCreateSpoly (poly p1, poly p2, poly spNoether=NULL, ring r=currRing) |
|
KINLINE void | ksOldSpolyTail (poly p1, poly q, poly q2, poly spNoether, ring r=currRing) |
|
BOOLEAN | kCheckSpolyCreation (LObject *L, kStrategy strat, poly &m1, poly &m2) |
|
BOOLEAN | kCheckStrongCreation (int atR, poly m1, int atS, poly m2, kStrategy strat) |
|
poly | preIntegerCheck (ideal F, ideal Q) |
| used for GB over ZZ: look for constant and monomial elements in the ideal background: any known constant element of ideal suppresses intermediate coefficient swell More...
|
|
void | postReduceByMon (LObject *h, kStrategy strat) |
| used for GB over ZZ: intermediate reduction by monomial elements background: any known constant element of ideal suppresses intermediate coefficient swell More...
|
|
void | postReduceByMonSig (LObject *h, kStrategy strat) |
|
void | finalReduceByMon (kStrategy strat) |
| used for GB over ZZ: final reduction by constant elements background: any known constant element of ideal suppresses intermediate coefficient swell and beautifies output More...
|
|
BOOLEAN | kStratChangeTailRing (kStrategy strat, LObject *L=NULL, TObject *T=NULL, unsigned long new_expbound=0) |
|
void | kStratInitChangeTailRing (kStrategy strat) |
|
void | kDebugPrint (kStrategy strat) |
| Output some debug info about a given strategy. More...
|
|
ring | sbaRing (kStrategy strat, const ring r=currRing, BOOLEAN complete=TRUE, int sgn=1) |
|
KINLINE void | clearS (poly p, unsigned long p_sev, int *at, int *k, kStrategy strat) |
|
poly | pMove2CurrTail (poly p, kStrategy strat) |
|
poly | pMoveCurrTail2poly (poly p, kStrategy strat) |
|
poly | pCopyL2p (LObject h, kStrategy strat) |
|
void | enterTShift (LObject p, kStrategy strat, int atT=-1) |
|
void | enterOnePairShift (poly q, poly p, int ecart, int isFromQ, kStrategy strat, int atR, int ecartq, int qisFromQ, int shiftcount, int ifromS) |
|
void | enterpairsShift (poly h, int k, int ecart, int pos, kStrategy strat, int atR) |
|
void | initBbaShift (kStrategy strat) |
|
poly | redtailBbaShift (LObject *L, int pos, kStrategy strat, BOOLEAN withT, BOOLEAN normalize) |
|
int | redFirstShift (LObject *h, kStrategy strat) |
|
ideal | bbaShift (ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat) |
|
static void | kDeleteLcm (LObject *P) |
|
◆ denominator_list_s
struct denominator_list_s |
◆ ALLOW_PROD_CRIT
#define ALLOW_PROD_CRIT |
( |
|
A | ) |
(!(A)->no_prod_crit) |
◆ HAVE_TAIL_RING
◆ KINLINE
◆ kTest
#define kTest |
( |
|
A | ) |
(TRUE) |
◆ kTest_L
#define kTest_L |
( |
|
T, |
|
|
|
R |
|
) |
| (TRUE) |
◆ kTest_S
#define kTest_S |
( |
|
T | ) |
(TRUE) |
◆ kTest_T
#define kTest_T |
( |
|
T | ) |
(TRUE) |
◆ kTest_TS
#define kTest_TS |
( |
|
A | ) |
(TRUE) |
◆ messageSets
#define messageSets |
( |
|
s | ) |
do {} while (0) |
◆ NO_KINLINE
◆ setmax
◆ setmaxL
#define setmaxL ((4096-12)/sizeof(LObject)) |
◆ setmaxLinc
#define setmaxLinc ((4096)/sizeof(LObject)) |
◆ setmaxT
#define setmaxT ((4096-12)/sizeof(TObject)) |
◆ setmaxTinc
#define setmaxTinc ((4096)/sizeof(TObject)) |
◆ denominator_list
◆ intset
◆ LObject
◆ LSet
◆ TObject
◆ TSet
◆ wlen_set
◆ wlen_type
◆ arriRewCriterion()
BOOLEAN arriRewCriterion |
( |
poly |
sig, |
|
|
unsigned long |
not_sevSig, |
|
|
poly |
lm, |
|
|
kStrategy |
strat, |
|
|
int |
start |
|
) |
| |
Definition at line 7187 of file kutil.cc.
7194 for (
int ii=strat->
sl; ii>start; ii--)
7200 if (!(
pLmCmp(p1,p2) == 1))
◆ arriRewCriterionPre()
BOOLEAN arriRewCriterionPre |
( |
poly |
sig, |
|
|
unsigned long |
not_sevSig, |
|
|
poly |
lm, |
|
|
kStrategy |
strat, |
|
|
int |
start |
|
) |
| |
Definition at line 7212 of file kutil.cc.
7219 for (
int i=strat->
Bl;
i>-1;
i--) {
7239 for (
int ii=strat->
sl; ii>-1; ii--)
7245 if (!(
pLmCmp(p1,p2) == 1))
◆ arriRewDummy()
◆ bba()
Definition at line 2178 of file kstd2.cc.
2182 int hilbeledeg=1,hilbcount=0,minimcnt=0;
2205 withT = ! strat->
homog;
2210 #ifdef HAVE_TAIL_RING
2226 while (strat->
Ll >= 0)
2233 while (strat->
Ll >= 0)
2246 while ((strat->
Ll >= 0)
2247 && (strat->
L[strat->
Ll].p1!=
NULL) && (strat->
L[strat->
Ll].p2!=
NULL)
2252 if (strat->
Ll<0)
break;
2257 strat->
P = strat->
L[strat->
Ll];
2287 else if (strat->
P.p1 ==
NULL)
2289 if (strat->
minim > 0)
2295 if ((strat->
P.p ==
NULL) && (strat->
P.t_p ==
NULL))
2303 &olddeg,&reduc,strat, red_result);
2306 red_result = strat->red(&strat->P,strat);
2310 if (strat->overflow)
2316 if (red_result == 1)
2319 strat->P.GetP(strat->lmBin);
2323 if (strat->homog) strat->initEcart(&(strat->P));
2328 int pos=
posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
2333 strat->redTailChange=
FALSE;
2339 strat->P.pCleardenom();
2344 strat->P.pCleardenom();
2348 strat->P.pCleardenom();
2349 if (strat->redTailChange) { strat->P.t_p=
NULL; }
2357 strat->P.p =
redtailBba(&(strat->P),pos-1,strat, withT);
2358 if (strat->redTailChange) { strat->P.t_p=
NULL; }
2367 if ((strat->P.p1==
NULL) && (strat->minim>0))
2369 if (strat->minim==1)
2371 strat->M->m[minimcnt]=
p_Copy(strat->P.p,
currRing,strat->tailRing);
2376 strat->M->m[minimcnt]=strat->P.p2;
2380 pNext(strat->M->m[minimcnt])
2381 = strat->p_shallow_copy_delete(
pNext(strat->M->m[minimcnt]),
2392 superenterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
2394 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
2396 strat->enterS(strat->P, pos, strat, strat->tl);
2411 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
2414 if (strat->s_poly!=
NULL)
2419 if (strat->s_poly(strat))
2424 int pos=
posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
2427 superenterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
2429 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
2430 strat->enterS(strat->P, pos, strat, strat->tl);
2434 else if (strat->P.p1 ==
NULL && strat->minim > 0)
2440 memset(&(strat->P), 0,
sizeof(strat->P));
2460 clearS(strat->S[
j],strat->sevS[
j],&
k,&
j,strat);
2471 if (strat->completeReduce_retry)
2476 #ifdef HAVE_TAIL_RING
2477 if(
currRing->bitmask>strat->tailRing->bitmask)
2479 strat->completeReduce_retry=
FALSE;
2482 for(
i=strat->sl;
i>=0;
i--) strat->S_2_R[
i]=-1;
2485 if (strat->completeReduce_retry)
2498 for(
int i = 0;
i<=strat->sl;
i++)
2502 strat->S[
i] =
pNeg(strat->S[
i]);
2510 strat->S[
i] =
pNeg(strat->Shdl->m[
i]);
2533 return (strat->Shdl);
◆ bbaShift()
Definition at line 4161 of file kstd2.cc.
4167 int hilbeledeg=1,hilbcount=0,minimcnt=0;
4195 #ifdef HAVE_TAIL_RING
4205 while (strat->
Ll >= 0)
4220 while ((strat->
Ll >= 0)
4221 && (strat->
L[strat->
Ll].p1!=
NULL) && (strat->
L[strat->
Ll].p2!=
NULL)
4226 if (strat->
Ll<0)
break;
4230 strat->
P = strat->
L[strat->
Ll];
4253 else if (strat->
P.p1 ==
NULL)
4255 if (strat->
minim > 0)
4261 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
4269 &olddeg,&reduc,strat, red_result);
4272 red_result = strat->red(&strat->P,strat);
4277 if (red_result == 1)
4280 strat->P.GetP(strat->lmBin);
4284 if (strat->homog) strat->initEcart(&(strat->P));
4289 int pos=
posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
4294 strat->redTailChange=
FALSE;
4297 strat->P.pCleardenom();
4300 strat->P.p =
redtailBba(&(strat->P),pos-1,strat, withT);
4301 strat->P.pCleardenom();
4302 if (strat->redTailChange) {
4304 strat->initEcart(&(strat->P));
4312 strat->P.p =
redtailBba(&(strat->P),pos-1,strat, withT);
4313 if (strat->redTailChange) {
4315 strat->initEcart(&(strat->P));
4325 if ((strat->P.p1==
NULL) && (strat->minim>0))
4327 if (strat->minim==1)
4329 strat->M->m[minimcnt]=
p_Copy(strat->P.p,
currRing,strat->tailRing);
4334 strat->M->m[minimcnt]=strat->P.p2;
4338 pNext(strat->M->m[minimcnt])
4339 = strat->p_shallow_copy_delete(
pNext(strat->M->m[minimcnt]),
4350 enterpairsShift(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
4352 strat->enterS(strat->P, pos, strat, strat->tl);
4353 if (!strat->rightGB)
4357 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
4360 if (strat->s_poly!=
NULL)
4365 if (strat->s_poly(strat))
4370 int pos=
posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
4372 enterpairsShift(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
4373 strat->enterS(strat->P, pos, strat, strat->tl);
4374 if (!strat->rightGB)
4379 else if (strat->P.p1 ==
NULL && strat->minim > 0)
4384 memset(&(strat->P), 0,
sizeof(strat->P));
4394 for (
int k = 0;
k <= strat->sl; ++
k)
4396 if ((strat->fromQ!=
NULL) && (strat->fromQ[
k]))
continue;
4397 for (
int j = 0;
j<=strat->tl; ++
j)
4404 if (
pLmCmp(strat->T[
j].p, strat->S[
k]) != 0) {
4417 if (strat->completeReduce_retry)
4422 #ifdef HAVE_TAIL_RING
4423 if(
currRing->bitmask>strat->tailRing->bitmask)
4425 strat->completeReduce_retry=
FALSE;
4428 for(
i=strat->sl;
i>=0;
i--) strat->S_2_R[
i]=-1;
4429 WarnS(
"reduction with S is not yet supported by Letterplace");
4432 if (strat->completeReduce_retry)
◆ cancelunit()
Definition at line 332 of file kutil.cc.
340 ring r = L->tailRing;
341 poly
p = L->GetLmTailRing();
420 number eins=
nInit(1);
◆ chainCritNormal()
void chainCritNormal |
( |
poly |
p, |
|
|
int |
ecart, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 3191 of file kutil.cc.
3204 for (
j=0;
j<=strat->
sl;
j++)
3208 for (
i=strat->
Bl;
i>=0;
i--)
3230 for (
j=strat->
Ll;
j>=0;
j--)
3236 if (strat->
L[
j].p == strat->
tail)
3282 for (
j=strat->
Ll;
j>=0;
j--)
3302 for(
i=
j-1;
i>=0;
i--)
3321 for (
j=strat->
Ll;
j>=0;
j--)
3352 if (strat->
L[0].p2 == strat->
tail) strat->
L[0].p2 =
p;
3355 if (strat->
L[
j].p2 ==
p)
3361 if ((strat->
L[
i].p2 ==
p) &&
pLmEqual(strat->
L[
j].lcm,strat->
L[
i].lcm))
3375 strat->
L[
i].p2 = strat->
tail;
3392 else if (strat->
L[
j].p2 == strat->
tail)
◆ chainCritOpt_1()
void chainCritOpt_1 |
( |
poly |
, |
|
|
int |
, |
|
|
kStrategy |
strat |
|
) |
| |
◆ chainCritSig()
void chainCritSig |
( |
poly |
p, |
|
|
int |
ecart, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 3420 of file kutil.cc.
3431 if (strat->
L[0].p2 == strat->
tail) strat->
L[0].p2 =
p;
3434 if (strat->
L[
j].p2 ==
p)
3440 if ((strat->
L[
i].p2 ==
p) &&
pLmEqual(strat->
L[
j].lcm,strat->
L[
i].lcm))
3454 strat->
L[
i].p2 = strat->
tail;
3471 else if (strat->
L[
j].p2 == strat->
tail)
◆ cleanT()
Definition at line 537 of file kutil.cc.
548 for (
j=0;
j<=strat->
tl;
j++)
552 if (strat->
T[
j].max_exp !=
NULL)
562 if (strat->
T[
j].t_p !=
NULL)
570 if (
currRing->isLPring && strat->
T[
j].shift > 0)
579 if (
p == strat->
S[
i])
581 if (strat->
T[
j].t_p !=
NULL)
583 if (p_shallow_copy_delete!=
NULL)
◆ clearS()
KINLINE void clearS |
( |
poly |
p, |
|
|
unsigned long |
p_sev, |
|
|
int * |
at, |
|
|
int * |
k, |
|
|
kStrategy |
strat |
|
) |
| |
◆ completeReduce()
Definition at line 10738 of file kutil.cc.
10768 for (
i=strat->
sl;
i>=low;
i--)
10770 int end_pos=strat->
sl;
10772 if (strat->
ak==0) end_pos=
i-1;
10774 if ((T_j !=
NULL)&&(T_j->p==strat->
S[
i]))
10792 Print(
"to (tailR) S[%d]:",
i);
10804 T_j->max_exp =
NULL;
10807 T_j->pCleardenom();
10847 Print(
"to (-tailR) S[%d]:",
i);
◆ createG0()
Definition at line 4455 of file kutil.cc.
4478 PrintS(
"-------------\npoly :");
4481 Print(
"cexp : (%d, %d)\n", cexp[1], cexp[2]);
4482 Print(
"cind : (%d, %d)\n", cind[1], cind[2]);
4484 Print(
"cind : %d\n", cabsind);
4502 Print(
"%d, (%d, %d), ind = (%d, %d)\n", cabsind, cexp[1], cexp[2], cind[1], cind[2]);
4510 G0->m[
IDELEMS(G0) - 1] = zeroPoly;
◆ deleteHC() [1/2]
Definition at line 243 of file kutil.cc.
250 poly
p = L->GetLmTailRing();
253 if (L->bucket !=
NULL)
291 L->ecart = L->pLDeg() - L->GetpFDeg();
300 L->ecart = L->pLDeg(strat->
LDegLast) - L->GetpFDeg();
◆ deleteHC() [2/2]
void deleteHC |
( |
poly * |
p, |
|
|
int * |
e, |
|
|
int * |
l, |
|
|
kStrategy |
strat |
|
) |
| |
◆ deleteInL()
void deleteInL |
( |
LSet |
set, |
|
|
int * |
length, |
|
|
int |
j, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 1202 of file kutil.cc.
1209 if (set[
j].sig!=
NULL)
1243 #ifdef ENTER_USE_MEMMOVE
1247 for (
i=
j;
i < (*length);
i++)
◆ deleteInS()
Definition at line 1095 of file kutil.cc.
1098 #ifdef ENTER_USE_MEMMOVE
1099 memmove(&(strat->
S[
i]), &(strat->
S[
i+1]), (strat->
sl -
i)*
sizeof(poly));
1101 memmove(&(strat->
sevS[
i]),&(strat->
sevS[
i+1]),(strat->
sl -
i)*
sizeof(
unsigned long));
1102 memmove(&(strat->
S_2_R[
i]),&(strat->
S_2_R[
i+1]),(strat->
sl -
i)*
sizeof(
int));
1105 for (
j=
i;
j<strat->
sl;
j++)
1107 strat->
S[
j] = strat->
S[
j+1];
1115 #ifdef ENTER_USE_MEMMOVE
1116 memmove(&(strat->
lenS[
i]),&(strat->
lenS[
i+1]),(strat->
sl -
i)*
sizeof(
int));
1123 #ifdef ENTER_USE_MEMMOVE
1131 #ifdef ENTER_USE_MEMMOVE
1132 memmove(&(strat->
fromQ[
i]),&(strat->
fromQ[
i+1]),(strat->
sl -
i)*
sizeof(
int));
1134 for (
j=
i;
j<strat->
sl;
j++)
◆ deleteInSSba()
Definition at line 1147 of file kutil.cc.
1150 #ifdef ENTER_USE_MEMMOVE
1151 memmove(&(strat->
S[
i]), &(strat->
S[
i+1]), (strat->
sl -
i)*
sizeof(poly));
1152 memmove(&(strat->
sig[
i]), &(strat->
sig[
i+1]), (strat->
sl -
i)*
sizeof(poly));
1154 memmove(&(strat->
sevS[
i]),&(strat->
sevS[
i+1]),(strat->
sl -
i)*
sizeof(
unsigned long));
1155 memmove(&(strat->
sevSig[
i]),&(strat->
sevSig[
i+1]),(strat->
sl -
i)*
sizeof(
unsigned long));
1156 memmove(&(strat->
S_2_R[
i]),&(strat->
S_2_R[
i+1]),(strat->
sl -
i)*
sizeof(
int));
1159 for (
j=
i;
j<strat->
sl;
j++)
1161 strat->
S[
j] = strat->
S[
j+1];
1171 #ifdef ENTER_USE_MEMMOVE
1172 memmove(&(strat->
lenS[
i]),&(strat->
lenS[
i+1]),(strat->
sl -
i)*
sizeof(
int));
1179 #ifdef ENTER_USE_MEMMOVE
1187 #ifdef ENTER_USE_MEMMOVE
1188 memmove(&(strat->
fromQ[
i]),&(strat->
fromQ[
i+1]),(strat->
sl -
i)*
sizeof(
int));
1190 for (
j=
i;
j<strat->
sl;
j++)
◆ enterExtendedSpoly()
void enterExtendedSpoly |
( |
poly |
h, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 4603 of file kutil.cc.
4638 PrintS(
"--- create zero spoly: ");
4667 posx = strat->
posInL(strat->
L,strat->
Ll,&Lp,strat);
◆ enterExtendedSpolySig()
void enterExtendedSpolySig |
( |
poly |
h, |
|
|
poly |
hSig, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 4686 of file kutil.cc.
4720 PrintS(
"--- create zero spoly: ");
4748 int red_result =
redRing(&Lp,strat);
4758 strat->
enterS(strat->
P,strat->
sl+1,strat, strat->
tl+1);
4760 strat->
enterS(Lp,0,strat,strat->
tl);
◆ enterL()
void enterL |
( |
LSet * |
set, |
|
|
int * |
length, |
|
|
int * |
LSetmax, |
|
|
LObject |
p, |
|
|
int |
at |
|
) |
| |
Definition at line 1259 of file kutil.cc.
1270 memmove(&((*set)[at+1]), &((*set)[at]), ((*
length)-at+1)*
sizeof(
LObject));
1272 for (
i=(*
length)+1;
i>=at+1;
i--) (*set)[
i] = (*set)[
i-1];
◆ enterOnePairNormal()
void enterOnePairNormal |
( |
int |
i, |
|
|
poly |
p, |
|
|
int |
ecart, |
|
|
int |
isFromQ, |
|
|
kStrategy |
strat, |
|
|
int |
atR |
|
) |
| |
Definition at line 1928 of file kutil.cc.
1938 Lp.ecart=0; Lp.length=0;
1943 #ifndef HAVE_RATGRING
1945 #elif defined(HAVE_RATGRING)
1956 if((!((strat->
ecartS[
i]>0)&&(ecart>0)))
2056 for(
j = strat->
Bl;
j>=0;
j--)
2155 Lp.p1 = strat->
S[
i];
2169 Lp.i_r1 = strat->
S_2_R[
i];
2183 && (Lp.p->coef!=
NULL))
2187 l = strat->
posInL(strat->
B,strat->
Bl,&Lp,strat);
◆ enterOnePairShift()
void enterOnePairShift |
( |
poly |
q, |
|
|
poly |
p, |
|
|
int |
ecart, |
|
|
int |
isFromQ, |
|
|
kStrategy |
strat, |
|
|
int |
atR, |
|
|
int |
ecartq, |
|
|
int |
qisFromQ, |
|
|
int |
shiftcount, |
|
|
int |
ifromS |
|
) |
| |
Definition at line 12261 of file kutil.cc.
12272 #ifdef CRITERION_DEBUG
12277 poly lmq =
pHead(q);
12298 int qfromQ = qisFromQ;
12307 Lp.ecart=0; Lp.length=0;
12317 #ifdef CRITERION_DEBUG
12325 if((!((ecartq>0)&&(ecart>0)))
12344 #ifdef CRITERION_DEBUG
12350 Lp.ecart =
si_max(ecart,ecartq);
12351 if (strat->
fromT && (ecartq>ecart))
12354 #ifdef CRITERION_DEBUG
12376 if ((strat->
fromQ==
NULL) || (isFromQ==0) || (qfromQ==0))
12379 #ifdef CRITERION_DEBUG
12391 #ifdef CRITERION_DEBUG
12423 #ifdef CRITERION_DEBUG
12428 if (strat->
fromT && (ecartq>ecart))
12431 #ifdef CRITERION_DEBUG
12443 for(
j = strat->
Bl;
j>=0;
j--)
12449 if ((strat->
fromQ==
NULL) || (isFromQ==0) || (qfromQ==0))
12452 #ifdef CRITERION_DEBUG
12463 #ifdef CRITERION_DEBUG
12479 #ifdef CRITERION_DEBUG
12484 if ((strat->
fromQ!=
NULL) && (isFromQ!=0) && (qfromQ!=0))
12487 #ifdef CRITERION_DEBUG
12548 #ifdef CRITERION_DEBUG
12564 if ( (atR >= 0) && (shiftcount==0) && (ifromS >=0) )
12581 && (Lp.p->coef!=
NULL))
◆ enterpairs()
void enterpairs |
( |
poly |
h, |
|
|
int |
k, |
|
|
int |
ec, |
|
|
int |
pos, |
|
|
kStrategy |
strat, |
|
|
int |
atR = -1 |
|
) |
| |
◆ enterpairsShift()
void enterpairsShift |
( |
poly |
h, |
|
|
int |
k, |
|
|
int |
ecart, |
|
|
int |
pos, |
|
|
kStrategy |
strat, |
|
|
int |
atR |
|
) |
| |
◆ enterpairsSig()
void enterpairsSig |
( |
poly |
h, |
|
|
poly |
hSig, |
|
|
int |
from, |
|
|
int |
k, |
|
|
int |
ec, |
|
|
int |
pos, |
|
|
kStrategy |
strat, |
|
|
int |
atR = -1 |
|
) |
| |
◆ enterSBba()
Definition at line 9265 of file kutil.cc.
9280 *
sizeof(
unsigned long));
9307 strat->
Shdl->m=strat->
S;
9309 if (atS <= strat->sl)
9311 #ifdef ENTER_USE_MEMMOVE
9312 memmove(&(strat->
S[atS+1]), &(strat->
S[atS]),
9313 (strat->
sl - atS + 1)*
sizeof(poly));
9314 memmove(&(strat->
ecartS[atS+1]), &(strat->
ecartS[atS]),
9315 (strat->
sl - atS + 1)*
sizeof(
int));
9316 memmove(&(strat->
sevS[atS+1]), &(strat->
sevS[atS]),
9317 (strat->
sl - atS + 1)*
sizeof(
unsigned long));
9318 memmove(&(strat->
S_2_R[atS+1]), &(strat->
S_2_R[atS]),
9319 (strat->
sl - atS + 1)*
sizeof(
int));
9321 memmove(&(strat->
lenS[atS+1]), &(strat->
lenS[atS]),
9322 (strat->
sl - atS + 1)*
sizeof(
int));
9324 memmove(&(strat->
lenSw[atS+1]), &(strat->
lenSw[atS]),
9327 for (
i=strat->
sl+1;
i>=atS+1;
i--)
9329 strat->
S[
i] = strat->
S[
i-1];
9335 for (
i=strat->
sl+1;
i>=atS+1;
i--)
9338 for (
i=strat->
sl+1;
i>=atS+1;
i--)
9344 #ifdef ENTER_USE_MEMMOVE
9345 memmove(&(strat->
fromQ[atS+1]), &(strat->
fromQ[atS]),
9346 (strat->
sl - atS + 1)*
sizeof(
int));
9348 for (
i=strat->
sl+1;
i>=atS+1;
i--)
9353 strat->
fromQ[atS]=0;
◆ enterSBbaShift()
Definition at line 9365 of file kutil.cc.
9374 for (
int i = maxPossibleShift;
i > 0;
i--)
◆ entersets()
◆ enterSSba()
Definition at line 9384 of file kutil.cc.
9399 *
sizeof(
unsigned long));
9403 *
sizeof(
unsigned long));
9431 strat->
Shdl->m=strat->
S;
9438 if (atS <= strat->sl)
9440 #ifdef ENTER_USE_MEMMOVE
9441 memmove(&(strat->
S[atS+1]), &(strat->
S[atS]),
9442 (strat->
sl - atS + 1)*
sizeof(poly));
9443 memmove(&(strat->
sig[atS+1]), &(strat->
sig[atS]),
9444 (strat->
sl - atS + 1)*
sizeof(poly));
9445 memmove(&(strat->
sevSig[atS+1]), &(strat->
sevSig[atS]),
9446 (strat->
sl - atS + 1)*
sizeof(
unsigned long));
9447 memmove(&(strat->
ecartS[atS+1]), &(strat->
ecartS[atS]),
9448 (strat->
sl - atS + 1)*
sizeof(
int));
9449 memmove(&(strat->
sevS[atS+1]), &(strat->
sevS[atS]),
9450 (strat->
sl - atS + 1)*
sizeof(
unsigned long));
9451 memmove(&(strat->
S_2_R[atS+1]), &(strat->
S_2_R[atS]),
9452 (strat->
sl - atS + 1)*
sizeof(
int));
9454 memmove(&(strat->
lenS[atS+1]), &(strat->
lenS[atS]),
9455 (strat->
sl - atS + 1)*
sizeof(
int));
9457 memmove(&(strat->
lenSw[atS+1]), &(strat->
lenSw[atS]),
9460 for (
i=strat->
sl+1;
i>=atS+1;
i--)
9462 strat->
S[
i] = strat->
S[
i-1];
9470 for (
i=strat->
sl+1;
i>=atS+1;
i--)
9473 for (
i=strat->
sl+1;
i>=atS+1;
i--)
9479 #ifdef ENTER_USE_MEMMOVE
9480 memmove(&(strat->
fromQ[atS+1]), &(strat->
fromQ[atS]),
9481 (strat->
sl - atS + 1)*
sizeof(
int));
9483 for (
i=strat->
sl+1;
i>=atS+1;
i--)
9488 strat->
fromQ[atS]=0;
9492 strat->
S[atS] =
p.p;
9493 strat->
sig[atS] =
p.sig;
9499 strat->
sevS[atS] =
p.sev;
9509 strat->
sevSig[atS] =
p.sevSig;
9512 strat->
S_2_R[atS] = atR;
9516 Print(
"--- LIST S: %d ---\n",strat->
sl);
9517 for(
k=0;
k<=strat->
sl;
k++)
◆ enterSyz()
Definition at line 9782 of file kutil.cc.
9796 (strat->
syzmax)*
sizeof(
unsigned long),
9798 *
sizeof(
unsigned long));
9801 if (atT < strat->syzl)
9803 #ifdef ENTER_USE_MEMMOVE
9804 memmove(&(strat->
syz[atT+1]), &(strat->
syz[atT]),
9805 (strat->
syzl-atT+1)*
sizeof(poly));
9806 memmove(&(strat->
sevSyz[atT+1]), &(strat->
sevSyz[atT]),
9807 (strat->
syzl-atT+1)*
sizeof(
unsigned long));
9809 for (
i=strat->
syzl;
i>=atT+1;
i--)
9811 #ifndef ENTER_USE_MEMMOVE
9824 strat->
syz[atT] =
p.sig;
9825 strat->
sevSyz[atT] =
p.sevSig;
9828 Print(
"element in strat->syz: %d--%d ",atT+1,strat->
syzmax);
9838 strat->
L[cc].sig, ~strat->
L[cc].sevSig,
currRing)
9852 PrintS(
"--- Syzygies ---\n");
9855 PrintS(
"--------------------------------\n");
◆ enterT()
Definition at line 9580 of file kutil.cc.
9591 #ifdef HAVE_SHIFTBBA
9613 for(
i=strat->
tl;
i>=0;
i--)
9615 if (
p.p==strat->
T[
i].p)
9617 printf(
"already in T at pos %d of %d, atT=%d\n",
i,strat->
tl,atT);
9623 #ifdef HAVE_TAIL_RING
9626 p.t_p=
p.GetLmTailRing();
9632 if (strat->
tl == strat->
tmax-1)
9634 if (atT <= strat->tl)
9636 #ifdef ENTER_USE_MEMMOVE
9637 memmove(&(strat->
T[atT+1]), &(strat->
T[atT]),
9639 memmove(&(strat->
sevT[atT+1]), &(strat->
sevT[atT]),
9640 (strat->
tl-atT+1)*
sizeof(
unsigned long));
9642 for (
i=strat->
tl+1;
i>=atT+1;
i--)
9644 #ifndef ENTER_USE_MEMMOVE
9645 strat->
T[
i] = strat->
T[
i-1];
9648 strat->
R[strat->
T[
i].i_r] = &(strat->
T[
i]);
9654 #ifdef HAVE_SHIFTBBA
9656 if (!(
currRing->isLPring &&
p.shift > 0))
9672 strat->
T[atT].max_exp =
NULL;
◆ enterT_strong()
Definition at line 9680 of file kutil.cc.
9701 for(
i=strat->
tl;
i>=0;
i--)
9703 if (
p.p==strat->
T[
i].p)
9705 printf(
"already in T at pos %d of %d, atT=%d\n",
i,strat->
tl,atT);
9711 #ifdef HAVE_TAIL_RING
9714 p.t_p=
p.GetLmTailRing();
9720 if (strat->
tl == strat->
tmax-1)
9722 if (atT <= strat->tl)
9724 #ifdef ENTER_USE_MEMMOVE
9725 memmove(&(strat->
T[atT+1]), &(strat->
T[atT]),
9727 memmove(&(strat->
sevT[atT+1]), &(strat->
sevT[atT]),
9728 (strat->
tl-atT+1)*
sizeof(
unsigned long));
9730 for (
i=strat->
tl+1;
i>=atT+1;
i--)
9732 #ifndef ENTER_USE_MEMMOVE
9733 strat->
T[
i] = strat->
T[
i-1];
9736 strat->
R[strat->
T[
i].i_r] = &(strat->
T[
i]);
9754 strat->
T[atT].max_exp =
NULL;
9757 strat->
R[strat->
tl] = &(strat->
T[atT]);
9758 strat->
T[atT].i_r = strat->
tl;
9765 for(
i=strat->
tl;
i>=0;
i--)
◆ enterTShift()
Definition at line 12798 of file kutil.cc.
12817 for (
int i = 1;
i <= maxPossibleShift;
i++)
◆ exitBuchMora()
Definition at line 10285 of file kutil.cc.
10309 #ifdef HAVE_SHIFTBBA
◆ exitSba()
◆ f5c()
void f5c |
( |
kStrategy |
strat, |
|
|
int & |
olddeg, |
|
|
int & |
minimcnt, |
|
|
int & |
hilbeledeg, |
|
|
int & |
hilbcount, |
|
|
int & |
srmax, |
|
|
int & |
lrmax, |
|
|
int & |
reduc, |
|
|
ideal |
Q, |
|
|
intvec * |
w, |
|
|
intvec * |
hilb |
|
) |
| |
Definition at line 3846 of file kstd2.cc.
3852 int Ll_old, red_result = 1;
3858 reduc = olddeg = lrmax = 0;
3863 while (strat->
tl >= 0)
3865 if(!strat->
T[strat->
tl].is_redundant)
3868 h.p = strat->
T[strat->
tl].p;
3869 h.tailRing = strat->
T[strat->
tl].tailRing;
3870 h.t_p = strat->
T[strat->
tl].t_p;
3909 while (strat->
Ll>Ll_old)
3911 strat->
P = strat->
L[strat->
Ll];
3915 PrintS(
"NEXT PAIR TO HANDLE IN INTERRED ALGORITHM\n");
3916 PrintS(
"-------------------------------------------------\n");
3920 printf(
"%d\n",strat->
tl);
3921 PrintS(
"-------------------------------------------------\n");
3954 else if (strat->
P.p1 ==
NULL)
3956 if (strat->
minim > 0)
3963 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
3971 &olddeg,&reduc,strat, red_result);
3974 PrintS(
"Poly before red: ");
3978 red_result = strat->red2(&strat->P,strat);
3982 if (strat->overflow)
3988 if (red_result == 1)
3991 strat->P.GetP(strat->lmBin);
3995 if (strat->homog) strat->initEcart(&(strat->P));
4002 pos =
posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
4006 pos =
posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
4015 strat->P.pCleardenom();
4018 strat->P.p =
redtailBba(&(strat->P),pos-1,strat, withT);
4019 strat->P.pCleardenom();
4026 strat->P.p =
redtailBba(&(strat->P),pos-1,strat, withT);
4034 if ((strat->P.p1==
NULL) && (strat->minim>0))
4036 if (strat->minim==1)
4038 strat->M->m[minimcnt]=
p_Copy(strat->P.p,
currRing,strat->tailRing);
4043 strat->M->m[minimcnt]=strat->P.p2;
4047 pNext(strat->M->m[minimcnt])
4048 = strat->p_shallow_copy_delete(
pNext(strat->M->m[minimcnt]),
4060 strat->enterS(strat->P, pos, strat, strat->tl);
4063 PrintS(
"ELEMENT ADDED TO GCURR DURING INTERRED: ");
4065 pWrite(strat->sig[strat->sl]);
4067 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
4071 if (strat->sl>srmax) srmax = strat->sl;
4080 if (strat->P.p1 ==
NULL && strat->minim > 0)
4087 memset(&(strat->P), 0,
sizeof(strat->P));
4091 while (cc<strat->tl+1)
4093 strat->T[cc].sig =
pOne();
4096 strat->sig[cc] = strat->T[cc].sig;
4097 strat->sevSig[cc] = strat->T[cc].sevSig;
4098 strat->T[cc].is_sigsafe =
TRUE;
4101 strat->max_lower_index = strat->tl;
4105 strat->currIdx = cc+1;
4106 for (
int cd=strat->Ll;
cd>=0;
cd--)
4111 for (cc=strat->sl+1; cc<
IDELEMS(strat->Shdl); ++cc)
4112 strat->Shdl->m[cc] =
NULL;
4114 printf(
"\nAfter f5c sorting\n");
4115 for(
int i=0;
i<=strat->sl;
i++)
4121 PrintS(
"------------------- STRAT S ---------------------\n");
4123 while (cc<strat->tl+1)
4127 printf(
"- - - - - -\n");
4130 PrintS(
"-------------------------------------------------\n");
4131 PrintS(
"------------------- STRAT T ---------------------\n");
4133 while (cc<strat->tl+1)
4136 pWrite(strat->T[cc].sig);
4137 printf(
"- - - - - -\n");
4140 PrintS(
"-------------------------------------------------\n");
4141 PrintS(
"------------------- STRAT L ---------------------\n");
4143 while (cc<strat->Ll+1)
4148 pWrite(strat->L[cc].sig);
4149 printf(
"- - - - - -\n");
4152 PrintS(
"-------------------------------------------------\n");
4153 printf(
"F5C DONE\nSTRAT SL: %d -- %d\n",strat->sl, strat->currIdx);
◆ faugereRewCriterion()
BOOLEAN faugereRewCriterion |
( |
poly |
sig, |
|
|
unsigned long |
not_sevSig, |
|
|
poly |
lm, |
|
|
kStrategy |
strat, |
|
|
int |
start |
|
) |
| |
Definition at line 7128 of file kutil.cc.
7136 PrintS(
"rewritten criterion checks: ");
7139 for(
int k = strat->
sl;
k>=start;
k--)
7143 PrintS(
"checking with: ");
7159 PrintS(
"ALL ELEMENTS OF S\n----------------------------------------\n");
7160 for(
int kk = 0; kk<strat->
sl+1; kk++)
7164 PrintS(
"------------------------------\n");
◆ finalReduceByMon()
used for GB over ZZ: final reduction by constant elements background: any known constant element of ideal suppresses intermediate coefficient swell and beautifies output
Definition at line 11309 of file kutil.cc.
◆ findMinLMPair()
BOOLEAN findMinLMPair |
( |
poly |
sig, |
|
|
unsigned long |
not_sevSig, |
|
|
kStrategy |
strat, |
|
|
int |
start |
|
) |
| |
◆ HEckeTest()
◆ homogTest()
◆ ind2()
◆ ind_fact_2()
long ind_fact_2 |
( |
long |
arg | ) |
|
◆ initBba()
◆ initBbaShift()
◆ initBuchMora()
void initBuchMora |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 10201 of file kutil.cc.
10216 #ifdef HAVE_SHIFTBBA
10239 strat->
P.pLength=0;
10282 #ifdef HAVE_SHIFTBBA
◆ initBuchMoraCrit()
Definition at line 9878 of file kutil.cc.
9897 #ifdef HAVE_RATGRING
◆ initBuchMoraPos()
◆ initBuchMoraPosRing()
◆ initEcartBBA()
◆ initEcartNormal()
void initEcartNormal |
( |
TObject * |
h | ) |
|
Definition at line 1283 of file kutil.cc.
1286 h->FDeg =
h->pFDeg();
1287 h->ecart =
h->pLDeg() -
h->FDeg;
◆ initEcartPairBba()
void initEcartPairBba |
( |
LObject * |
Lp, |
|
|
poly |
f, |
|
|
poly |
g, |
|
|
int |
ecartF, |
|
|
int |
ecartG |
|
) |
| |
Definition at line 1298 of file kutil.cc.
1301 Lp->FDeg = Lp->pFDeg();
◆ initEcartPairMora()
void initEcartPairMora |
( |
LObject * |
Lp, |
|
|
poly |
f, |
|
|
poly |
g, |
|
|
int |
ecartF, |
|
|
int |
ecartG |
|
) |
| |
Definition at line 1305 of file kutil.cc.
1308 Lp->FDeg = Lp->pFDeg();
1309 (*Lp).ecart =
si_max(ecartF,ecartG);
1310 (*Lp).ecart = (*Lp).ecart- (Lp->FDeg -
p_FDeg((*Lp).lcm,
currRing));
◆ initHilbCrit()
◆ initL()
◆ initR()
◆ initS()
void initS |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 8075 of file kutil.cc.
8088 strat->
S=strat->
Shdl->m;
8093 memset(strat->
fromQ,0,
i*
sizeof(
int));
8122 strat->
enterS(
h,pos,strat,-1);
8123 strat->
fromQ[pos]=1;
8156 strat->
enterS(
h,pos,strat,-1);
◆ initSba()
◆ initSbaBuchMora()
void initSbaBuchMora |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
kStrategy |
strat |
|
) |
| |
◆ initSbaCrit()
Definition at line 9942 of file kutil.cc.
9974 #ifdef HAVE_RATGRING
◆ initSbaPos()
◆ initsevT()
KINLINE unsigned long* initsevT |
( |
| ) |
|
◆ initSL()
void initSL |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 8169 of file kutil.cc.
8182 strat->
S=strat->
Shdl->m;
8187 memset(strat->
fromQ,0,
i*
sizeof(
int));
8216 strat->
enterS(
h,pos,strat,-1);
8217 strat->
fromQ[pos]=1;
8249 pos = strat->
posInL(strat->
L,strat->
Ll,&
h,strat);
◆ initSLSba()
void initSLSba |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 8266 of file kutil.cc.
8279 strat->
S = strat->
Shdl->m;
8292 memset(strat->
fromQ,0,
i*
sizeof(
int));
8321 strat->
enterS(
h,pos,strat,-1);
8322 strat->
fromQ[pos]=1;
◆ initSyzRules()
Definition at line 8416 of file kutil.cc.
8432 for(
i=1;
i<=strat->
sl;
i++)
8444 strat->
syz = (poly *)
omAlloc(ps*
sizeof(poly));
8448 #if defined(DEBUGF5) || defined(DEBUGF51)
8449 PrintS(
"------------- GENERATING SYZ RULES NEW ---------------\n");
8456 while (i <= strat->sl)
8486 for (
k = 0;
k<
i;
k++)
8530 for (
k = 0;
k<strat->
sl+1;
k++)
8551 PrintS(
"Principal syzygies:\n");
8554 Print(
"ps %d\n",ps);
8555 PrintS(
"--------------------------------\n");
◆ initT()
◆ k_GetLeadTerms()
Definition at line 960 of file kInline.h.
972 m1 =
p_Init(m_r,m_r->PolyBin);
973 m2 =
p_Init(m_r,m_r->PolyBin);
975 for (
i = p_r->N;
i;
i--)
980 if (
x > (
long) m_r->bitmask)
goto false_return;
986 if (-
x > (
long) m_r->bitmask)
goto false_return;
◆ k_GetStrongLeadTerms()
KINLINE void k_GetStrongLeadTerms |
( |
const poly |
p1, |
|
|
const poly |
p2, |
|
|
const ring |
leadRing, |
|
|
poly & |
m1, |
|
|
poly & |
m2, |
|
|
poly & |
lcm, |
|
|
const ring |
taiRing |
|
) |
| |
Definition at line 1003 of file kInline.h.
1018 m1 =
p_Init(tailRing,tailRing->PolyBin);
1019 m2 =
p_Init(tailRing,tailRing->PolyBin);
1020 lcm =
p_Init(leadRing,leadRing->PolyBin);
1022 for (
i = leadRing->N;
i>=0;
i--)
◆ k_LmInit_currRing_2_tailRing() [1/2]
KINLINE poly k_LmInit_currRing_2_tailRing |
( |
poly |
p, |
|
|
ring |
tailRing |
|
) |
| |
◆ k_LmInit_currRing_2_tailRing() [2/2]
KINLINE poly k_LmInit_currRing_2_tailRing |
( |
poly |
p, |
|
|
ring |
tailRing, |
|
|
omBin |
bin |
|
) |
| |
◆ k_LmInit_tailRing_2_currRing() [1/2]
KINLINE poly k_LmInit_tailRing_2_currRing |
( |
poly |
p, |
|
|
ring |
tailRing |
|
) |
| |
◆ k_LmInit_tailRing_2_currRing() [2/2]
KINLINE poly k_LmInit_tailRing_2_currRing |
( |
poly |
p, |
|
|
ring |
tailRing, |
|
|
omBin |
bin |
|
) |
| |
◆ k_LmShallowCopyDelete_currRing_2_tailRing() [1/2]
KINLINE poly k_LmShallowCopyDelete_currRing_2_tailRing |
( |
poly |
p, |
|
|
ring |
tailRing |
|
) |
| |
◆ k_LmShallowCopyDelete_currRing_2_tailRing() [2/2]
KINLINE poly k_LmShallowCopyDelete_currRing_2_tailRing |
( |
poly |
p, |
|
|
ring |
tailRing, |
|
|
omBin |
bin |
|
) |
| |
◆ k_LmShallowCopyDelete_tailRing_2_currRing() [1/2]
KINLINE poly k_LmShallowCopyDelete_tailRing_2_currRing |
( |
poly |
p, |
|
|
ring |
tailRing |
|
) |
| |
◆ k_LmShallowCopyDelete_tailRing_2_currRing() [2/2]
KINLINE poly k_LmShallowCopyDelete_tailRing_2_currRing |
( |
poly |
p, |
|
|
ring |
tailRing, |
|
|
omBin |
bin |
|
) |
| |
◆ kCheckSpolyCreation()
Definition at line 10923 of file kutil.cc.
10936 assume(L->i_r1 >= -1 && L->i_r1 <= strat->
tl);
10937 assume(L->i_r2 >= -1 && L->i_r2 <= strat->
tl);
10943 if ((L->i_r1 == -1) || (L->i_r2 == -1) )
10948 if (L->i_r1>=0) p1_max = (strat->
R[L->i_r1])->max_exp;
10950 if (L->i_r2>=0) p2_max = (strat->
R[L->i_r2])->max_exp;
◆ kCheckStrongCreation()
BOOLEAN kCheckStrongCreation |
( |
int |
atR, |
|
|
poly |
m1, |
|
|
int |
atS, |
|
|
poly |
m2, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 10962 of file kutil.cc.
10976 poly p1_max = (strat->
R[atR])->max_exp;
◆ kCreateZeroPoly()
poly kCreateZeroPoly |
( |
long |
exp[], |
|
|
long |
cabsind, |
|
|
poly * |
t_p, |
|
|
ring |
leadRing, |
|
|
ring |
tailRing |
|
) |
| |
Definition at line 4326 of file kutil.cc.
4330 poly zeroPoly =
NULL;
4338 for (
int i = 1;
i <= leadRing->N;
i++)
4344 if (cabsind < leadRing->ch)
4346 zeroPoly =
p_ISet(
twoPow(leadRing->ch - cabsind), tailRing);
4350 zeroPoly =
p_ISet(1, tailRing);
4352 for (
int i = 1;
i <= leadRing->N;
i++)
4354 for (
long j = 1;
j <=
exp[
i];
j++)
4372 for (
int i = 1;
i <= leadRing->N;
i++)
4378 zeroPoly =
pNext(zeroPoly);
◆ kDebugPrint()
Output some debug info about a given strategy.
Definition at line 11940 of file kutil.cc.
11956 else Print(
"%p\n",(
void*)strat->
red);
11975 #ifdef HAVE_MORE_POS_IN_T
12013 PrintS(
"initEcartPair: ");
12017 Print(
"homog=%d, LazyDegree=%d, LazyPass=%d, ak=%d,\n",
12019 Print(
"honey=%d, sugarCrit=%d, Gebauer=%d, noTailReduction=%d, use_buckets=%d\n",
12025 Print(
"posInLDependsOnLength=%d\n",
12057 PrintS(
"currRing->pFDeg: ");
12072 PrintS(
"ecartWeights: ");
◆ kDeleteLcm()
static void kDeleteLcm |
( |
LObject * |
P | ) |
|
|
inlinestatic |
◆ kFindDivisibleByInS()
return -1 if no divisor is found number of first divisor in S, otherwise
Definition at line 326 of file kstd2.cc.
328 unsigned long not_sev = ~L->sev;
329 poly
p = L->GetLmCurrRing();
343 ende=
posInS(strat,*max_ind,
p,0)+1;
344 if (ende>(*max_ind)) ende=(*max_ind);
353 if (
j > ende)
return -1;
354 #if defined(PDEBUG) || defined(PDIV_DEBUG)
362 if ( !(strat->
sevS[
j] & not_sev) &&
376 if (
j > ende)
return -1;
377 #if defined(PDEBUG) || defined(PDIV_DEBUG)
384 if ( !(strat->
sevS[
j] & not_sev) &&
◆ kFindDivisibleByInS_T()
Definition at line 7261 of file kutil.cc.
7266 const unsigned long not_sev = ~L->sev;
7267 const unsigned long* sev = strat->
sevS;
7280 if (
j > end_pos)
return NULL;
7281 #if defined(PDEBUG) || defined(PDIV_DEBUG)
7283 (ecart== LONG_MAX || ecart>= strat->
ecartS[
j]))
7288 if (!(sev[
j] & not_sev) &&
7289 (ecart== LONG_MAX || ecart>= strat->
ecartS[
j]) &&
7303 if (
j > end_pos)
return NULL;
7304 #if defined(PDEBUG) || defined(PDIV_DEBUG)
7311 if (!(sev[
j] & not_sev) &&
7312 (ecart== LONG_MAX || ecart>= strat->
ecartS[
j]) &&
7323 if (strat->
tl < 0 || strat->
S_2_R[
j] == -1)
7344 if (
j > end_pos)
return NULL;
7346 #if defined(PDEBUG) || defined(PDIV_DEBUG)
7350 (ecart== LONG_MAX || ecart>= strat->
ecartS[
j]))
7356 if (! (sev[
j] & not_sev) && (ecart== LONG_MAX || ecart>= strat->
ecartS[
j]))
7359 assume(t !=
NULL && t->t_p !=
NULL && t->tailRing == r && t->p == strat->
S[
j]);
7375 if (
j > end_pos)
return NULL;
7377 #if defined(PDEBUG) || defined(PDIV_DEBUG)
7387 if (! (sev[
j] & not_sev) && (ecart== LONG_MAX || ecart>= strat->
ecartS[
j]))
7390 assume(t !=
NULL && t->t_p !=
NULL && t->tailRing == r && t->p == strat->
S[
j]);
◆ kFindDivisibleByInT()
return -1 if no divisor is found number of first divisor in T, otherwise
Definition at line 216 of file kstd2.cc.
218 unsigned long not_sev = ~L->sev;
222 const unsigned long* sevT=strat->
sevT;
235 if (
j > strat->
tl)
return -1;
236 #if defined(PDEBUG) || defined(PDIV_DEBUG)
243 if (!(sevT[
j] & not_sev) &&
257 if (
j > strat->
tl)
return -1;
258 #if defined(PDEBUG) || defined(PDIV_DEBUG)
264 if (!(sevT[
j] & not_sev) &&
282 if (
j > strat->
tl)
return -1;
283 #if defined(PDEBUG) || defined(PDIV_DEBUG)
291 if (!(sevT[
j] & not_sev) &&
305 if (
j > strat->
tl)
return -1;
306 #if defined(PDEBUG) || defined(PDIV_DEBUG)
313 if (!(sevT[
j] & not_sev) &&
◆ kFindDivisibleByInT_Z()
Definition at line 139 of file kstd2.cc.
141 unsigned long not_sev = ~L->sev;
146 const unsigned long* sevT=strat->
sevT;
147 number rest, orest,
mult;
158 if (
j > strat->
tl)
return o;
159 #if defined(PDEBUG) || defined(PDIV_DEBUG)
188 if (
j > strat->
tl)
return o;
189 #if defined(PDEBUG) || defined(PDIV_DEBUG)
◆ kFindInT()
int kFindInT |
( |
poly |
p, |
|
|
TSet |
T, |
|
|
int |
tlength |
|
) |
| |
returns index of p in TSet, or -1 if not found
Definition at line 710 of file kutil.cc.
715 for (
i=0;
i<=tlength;
i++)
717 if (
T[
i].
p ==
p)
return i;
◆ kFindNextDivisibleByInS()
Definition at line 395 of file kstd2.cc.
397 unsigned long not_sev = ~L->sev;
398 poly
p = L->GetLmCurrRing();
411 if (
j > ende)
return -1;
412 #if defined(PDEBUG) || defined(PDIV_DEBUG)
420 if ( !(strat->
sevS[
j] & not_sev) &&
434 if (
j > ende)
return -1;
435 #if defined(PDEBUG) || defined(PDIV_DEBUG)
442 if ( !(strat->
sevS[
j] & not_sev) &&
◆ kFindSameLMInT_Z()
Definition at line 84 of file kstd2.cc.
86 unsigned long not_sev = ~L->sev;
91 const unsigned long* sevT=strat->
sevT;
103 if (
j > strat->
tl)
return o;
123 if (
j > strat->
tl)
return o;
◆ kFindZeroPoly()
poly kFindZeroPoly |
( |
poly |
input_p, |
|
|
ring |
leadRing, |
|
|
ring |
tailRing |
|
) |
| |
Definition at line 454 of file kstd2.cc.
461 poly zeroPoly =
NULL;
462 unsigned long a = (
unsigned long)
pGetCoeff(
p);
465 int a_ind2 =
ind2(a);
469 for (
int i = 1;
i <= leadRing->N;
i++)
478 poly lead_mult =
p_ISet(1, tailRing);
479 if (
n_GetChar(leadRing->cf) <= k_ind2 + a_ind2)
481 int too_much = k_ind2 + a_ind2 -
n_GetChar(leadRing->cf);
483 zeroPoly =
p_ISet(a, tailRing);
484 for (
int i = 1;
i <= leadRing->N;
i++)
491 while ( (0 <
ind2(s_exp)) && (
ind2(s_exp) <= too_much) )
493 too_much = too_much -
ind2(s_exp);
497 for (
int j = 1;
j <= s_exp;
j++)
514 p_Setm(lead_mult, tailRing);
515 zeroPoly =
p_Mult_mm(zeroPoly, lead_mult, tailRing);
517 for (
int i = 1;
i <= leadRing->N;
i++)
◆ kFreeStrat()
◆ kNF2() [1/2]
ideal kNF2 |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
ideal |
q, |
|
|
kStrategy |
strat, |
|
|
int |
lazyReduce |
|
) |
| |
Definition at line 3665 of file kstd2.cc.
3691 #ifdef HAVE_SHIFTBBA
3744 #ifdef HAVE_SHIFTBBA
◆ kNF2() [2/2]
poly kNF2 |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
poly |
q, |
|
|
kStrategy |
strat, |
|
|
int |
lazyReduce |
|
) |
| |
Definition at line 3502 of file kstd2.cc.
3524 #ifdef HAVE_SHIFTBBA
3575 #ifdef HAVE_SHIFTBBA
◆ kNF2Bound() [1/2]
ideal kNF2Bound |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
ideal |
q, |
|
|
int |
bound, |
|
|
kStrategy |
strat, |
|
|
int |
lazyReduce |
|
) |
| |
◆ kNF2Bound() [2/2]
poly kNF2Bound |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
poly |
q, |
|
|
int |
bound, |
|
|
kStrategy |
strat, |
|
|
int |
lazyReduce |
|
) |
| |
◆ ksCreateShortSpoly()
poly ksCreateShortSpoly |
( |
poly |
p1, |
|
|
poly |
p2, |
|
|
ring |
tailRing |
|
) |
| |
Definition at line 1402 of file kspoly.cc.
1404 * 1. the coefficient is 0 (
p_Init)
1405 * 1. a) in the
case of coefficient ring, the coefficient is calculated
1406 * 2.
pNext is undefined
1412 #ifdef HAVE_SHIFTBBA
1414 if (tailRing->isLPring) {
1453 #ifdef HAVE_SHIFTBBA
1455 if (tailRing->isLPring)
1479 if ((c1==c2)||(c2!=0))
1529 if ((c1==c2)||(c1!=0))
1683 #ifdef HAVE_SHIFTBBA
1684 if (tailRing->isLPring)
◆ ksCreateSpoly()
Definition at line 1153 of file kspoly.cc.
1169 Pair->tailRing = tailRing;
1204 #ifdef HAVE_SHIFTBBA
1206 if (tailRing->isLPring)
1214 n_Delete(&(m1->coef), tailRing->cf);
1215 n_Delete(&(m2->coef), tailRing->cf);
1224 if (Pair->i_r1 == -1)
1230 l1 = (
R[Pair->i_r1])->GetpLength() - 1;
1232 if ((Pair->i_r2 == -1)||(
R[Pair->i_r2]==
NULL))
1238 l2 = (
R[Pair->i_r2])->GetpLength() - 1;
1243 if (spNoether !=
NULL)
1246 a2 = tailRing->p_Procs->pp_Mult_mm_Noether(a2, m2, spNoether, l2, tailRing);
1250 #ifdef HAVE_SHIFTBBA
1251 if (tailRing->isLPring)
1254 a2 = tailRing->p_Procs->pp_Mult_mm(tailRing->p_Procs->pp_mm_Mult(a2, m2, tailRing), m22, tailRing);
1259 a2 = tailRing->p_Procs->pp_Mult_mm(a2, m2, tailRing);
1265 Pair->SetLmTail(m2, a2, l2, use_buckets, tailRing);
1267 #ifdef HAVE_SHIFTBBA
1268 if (tailRing->isLPring)
1271 Pair->Tail_Minus_mm_Mult_qq(m1, tailRing->p_Procs->pp_Mult_mm(a1, m12, tailRing), l1, spNoether);
1277 Pair->Tail_Minus_mm_Mult_qq(m1, a1, l1, spNoether);
1281 Pair->LmDeleteAndIter();
1283 #ifdef HAVE_SHIFTBBA
1284 if (tailRing->isLPring)
1287 assume(Pair->shift == 0);
◆ ksOldCreateSpoly()
◆ ksOldSpolyRed()
KINLINE poly ksOldSpolyRed |
( |
poly |
p1, |
|
|
poly |
p2, |
|
|
poly |
spNoether = NULL |
|
) |
| |
◆ ksOldSpolyRedNew()
KINLINE poly ksOldSpolyRedNew |
( |
poly |
p1, |
|
|
poly |
p2, |
|
|
poly |
spNoether = NULL |
|
) |
| |
◆ ksOldSpolyTail()
KINLINE void ksOldSpolyTail |
( |
poly |
p1, |
|
|
poly |
q, |
|
|
poly |
q2, |
|
|
poly |
spNoether, |
|
|
ring |
r = currRing |
|
) |
| |
◆ ksReducePoly()
Definition at line 186 of file kspoly.cc.
196 #ifdef TEST_OPT_DEBUG_RED
207 ring tailRing = PR->tailRing;
211 poly p1 = PR->GetLmTailRing();
212 poly p2 = PW->GetLmTailRing();
213 poly t2 =
pNext(p2), lm = p1;
234 poly _p = (PR->t_p !=
NULL ? PR->t_p : PR->p);
237 if (PR->t_p!=
NULL) PR->t_p=_p;
else PR->p=_p;
246 PR->LmDeleteAndIter();
247 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
260 if (strat ==
NULL)
return 2;
263 p1 = PR->GetLmTailRing();
264 p2 = PW->GetLmTailRing();
274 if (tailRing->isLPring)
292 if ((ct == 0) || (ct == 2))
293 PR->Tail_Mult_nn(an);
294 if (coef !=
NULL) *coef = an;
299 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
305 if (tailRing->isLPring)
307 PR->Tail_Minus_mm_Mult_qq(lm, tailRing->p_Procs->pp_Mult_mm(t2, lmRight, tailRing),
pLength(t2), spNoether);
312 PR->Tail_Minus_mm_Mult_qq(lm, t2,
pLength(t2) , spNoether);
315 PR->LmDeleteAndIter();
◆ ksReducePolyBound()
Definition at line 541 of file kspoly.cc.
552 #ifdef TEST_OPT_DEBUG_RED
563 ring tailRing = PR->tailRing;
567 poly p1 = PR->GetLmTailRing();
568 poly p2 = PW->GetLmTailRing();
569 poly t2 =
pNext(p2), lm = p1;
590 poly _p = (PR->t_p !=
NULL ? PR->t_p : PR->p);
593 if (PR->t_p!=
NULL) PR->t_p=_p;
else PR->p=_p;
602 PR->LmDeleteAndIter();
603 if (coef !=
NULL) *coef =
n_Init(1, tailRing);
616 if (strat ==
NULL)
return 2;
619 p1 = PR->GetLmTailRing();
620 p2 = PW->GetLmTailRing();
630 if (tailRing->isLPring)
648 if ((ct == 0) || (ct == 2))
649 PR->Tail_Mult_nn(an);
650 if (coef !=
NULL) *coef = an;
655 if (coef !=
NULL) *coef =
n_Init(1, tailRing);
661 if (tailRing->isLPring)
663 PR->Tail_Minus_mm_Mult_qq(lm, tailRing->p_Procs->pp_Mult_mm(t2, lmRight, tailRing),
pLength(t2), spNoether);
668 PR->Tail_Minus_mm_Mult_qq(lm, t2,
pLength(t2) , spNoether);
671 PR->LmDeleteAndIter();
673 #if defined(KDEBUG) && defined(TEST_OPT_DEBUG_RED)
◆ ksReducePolyGCD()
Definition at line 318 of file kspoly.cc.
328 #ifdef TEST_OPT_DEBUG_RED
339 ring tailRing = PR->tailRing;
343 poly p1 = PR->GetLmTailRing();
344 poly p2 = PW->GetLmTailRing();
366 poly _p = (PR->t_p !=
NULL ? PR->t_p : PR->p);
369 if (PR->t_p!=
NULL) PR->t_p=_p;
else PR->p=_p;
380 if (strat ==
NULL)
return 2;
383 p1 = PR->GetLmTailRing();
384 p2 = PW->GetLmTailRing();
399 PR->Tail_Mult_nn(an);
403 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
408 PR->Tail_Minus_mm_Mult_qq(lm, t2,
pLength(t2) , spNoether);
413 #ifdef HAVE_SHIFTBBA_NONEXISTENT
422 PR->SetShortExpVector();
◆ ksReducePolyLC()
Definition at line 434 of file kspoly.cc.
444 #ifdef TEST_OPT_DEBUG_RED
457 ring tailRing = PR->tailRing;
461 poly p1 = PR->GetLmTailRing();
462 poly p2 = PW->GetLmTailRing();
463 poly t2 =
pNext(p2), lm = p1;
484 poly _p = (PR->t_p !=
NULL ? PR->t_p : PR->p);
487 if (PR->t_p!=
NULL) PR->t_p=_p;
else PR->p=_p;
500 if (strat ==
NULL)
return 2;
503 p1 = PR->GetLmTailRing();
504 p2 = PW->GetLmTailRing();
512 PR->Tail_Minus_mm_Mult_qq(lm, p2,
pLength(p2) , spNoether);
515 PR->LmDeleteAndIter();
520 #ifdef HAVE_SHIFTBBA_NONEXISTENT
529 PR->SetShortExpVector();
533 #if defined(KDEBUG) && defined(TEST_OPT_DEBUG_RED)
◆ ksReducePolySig()
Definition at line 687 of file kspoly.cc.
699 #ifdef TEST_OPT_DEBUG_RED
708 ring tailRing = PR->tailRing;
742 poly sigMult =
pCopy(PW->sig);
745 printf(
"IN KSREDUCEPOLYSIG: \n");
749 printf(
"--------------\n");
754 printf(
"------------------- IN KSREDUCEPOLYSIG: --------------------\n");
759 printf(
"--------------\n");
766 printf(
"%d -- %d sig\n",sigSafe,PW->is_sigsafe);
775 PR->is_redundant =
TRUE;
780 PR->is_redundant =
FALSE;
781 poly p1 = PR->GetLmTailRing();
782 poly p2 = PW->GetLmTailRing();
783 poly t2 =
pNext(p2), lm = p1;
804 poly _p = (PR->t_p !=
NULL ? PR->t_p : PR->p);
807 if (PR->t_p!=
NULL) PR->t_p=_p;
else PR->p=_p;
816 PR->LmDeleteAndIter();
817 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
830 if (strat ==
NULL)
return 2;
833 p1 = PR->GetLmTailRing();
834 p2 = PW->GetLmTailRing();
844 if (tailRing->isLPring)
862 if ((ct == 0) || (ct == 2))
863 PR->Tail_Mult_nn(an);
864 if (coef !=
NULL) *coef = an;
869 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
875 if (tailRing->isLPring)
877 PR->Tail_Minus_mm_Mult_qq(lm, tailRing->p_Procs->pp_Mult_mm(t2, lmRight, tailRing),
pLength(t2), spNoether);
882 PR->Tail_Minus_mm_Mult_qq(lm, t2, PW->GetpLength() - 1, spNoether);
885 PR->LmDeleteAndIter();
887 #if defined(KDEBUG) && defined(TEST_OPT_DEBUG_RED)
◆ ksReducePolySigRing()
Definition at line 892 of file kspoly.cc.
905 #ifdef TEST_OPT_DEBUG_RED
914 ring tailRing = PR->tailRing;
948 poly sigMult =
pCopy(PW->sig);
951 printf(
"IN KSREDUCEPOLYSIG: \n");
955 printf(
"--------------\n");
969 printf(
"------------------- IN KSREDUCEPOLYSIG: --------------------\n");
974 printf(
"--------------\n");
983 printf(
"%d -- %d sig\n",sigSafe,PW->is_sigsafe);
989 poly origsig =
pCopy(PR->sig);
1000 if(
pLtCmp(PR->sig,origsig) == 1)
1004 PR->is_redundant =
TRUE;
1010 if(
pLtCmp(PR->sig,origsig) == -1)
1022 PR->is_redundant =
TRUE;
1027 PR->is_redundant =
FALSE;
1028 poly p1 = PR->GetLmTailRing();
1029 poly p2 = PW->GetLmTailRing();
1030 poly t2 =
pNext(p2), lm = p1;
1051 poly _p = (PR->t_p !=
NULL ? PR->t_p : PR->p);
1054 if (PR->t_p!=
NULL) PR->t_p=_p;
else PR->p=_p;
1063 PR->LmDeleteAndIter();
1064 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
1077 if (strat ==
NULL)
return 2;
1080 p1 = PR->GetLmTailRing();
1081 p2 = PW->GetLmTailRing();
1089 #ifdef HAVE_SHIFTBBA
1091 if (tailRing->isLPring)
1103 #ifdef HAVE_SHIFTBBA
1106 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
1116 #ifdef HAVE_SHIFTBBA
1119 if (((ct == 0) || (ct == 2)))
1120 PR->Tail_Mult_nn(an);
1121 if (coef !=
NULL) *coef = an;
1126 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
1131 #ifdef HAVE_SHIFTBBA
1132 if (tailRing->isLPring)
1134 PR->Tail_Minus_mm_Mult_qq(lm, tailRing->p_Procs->pp_Mult_mm(t2, lmRight, tailRing),
pLength(t2), spNoether);
1139 PR->Tail_Minus_mm_Mult_qq(lm, t2, PW->GetpLength() - 1, spNoether);
1142 PR->LmDeleteAndIter();
1144 #if defined(KDEBUG) && defined(TEST_OPT_DEBUG_RED)
◆ ksReducePolyTail() [1/2]
Definition at line 1088 of file kInline.h.
1098 assume(PR->GetLmCurrRing() != PW->GetLmCurrRing());
1099 Red->HeadNormalize();
◆ ksReducePolyTail() [2/2]
Definition at line 1303 of file kspoly.cc.
1313 poly Lp = PR->GetLmCurrRing();
1314 poly Save = PW->GetLmCurrRing();
1334 if (Current == PR->p && PR->t_p !=
NULL)
1340 pNext(Current) = Red.GetLmTailRing();
1341 if (Current == PR->p && PR->t_p !=
NULL)
◆ ksReducePolyZ()
Definition at line 42 of file kspoly.cc.
52 #ifdef TEST_OPT_DEBUG_RED
63 ring tailRing = PR->tailRing;
67 poly p1 = PR->GetLmTailRing();
68 poly p2 = PW->GetLmTailRing();
69 poly t2 =
pNext(p2), lm = p1;
90 poly _p = (PR->t_p !=
NULL ? PR->t_p : PR->p);
93 if (PR->t_p!=
NULL) PR->t_p=_p;
else PR->p=_p;
109 if ((ct == 0) || (ct == 2))
110 PR->Tail_Mult_nn(an);
111 if (coef !=
NULL) *coef = an;
114 PR->LmDeleteAndIter();
115 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
128 if (strat ==
NULL)
return 2;
131 p1 = PR->GetLmTailRing();
132 p2 = PW->GetLmTailRing();
142 if (tailRing->isLPring)
160 if ((ct == 0) || (ct == 2))
161 PR->Tail_Mult_nn(an);
162 if (coef !=
NULL) *coef = an;
167 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
173 if (tailRing->isLPring)
175 PR->Tail_Minus_mm_Mult_qq(lm, tailRing->p_Procs->pp_Mult_mm(t2, lmRight, tailRing),
pLength(t2), spNoether);
180 PR->Tail_Minus_mm_Mult_qq(lm, t2,
pLength(t2) , spNoether);
183 PR->LmDeleteAndIter();
◆ kStratChangeTailRing()
Definition at line 11394 of file kutil.cc.
11408 if (expbound == 0) expbound = strat->
tailRing->bitmask << 1;
11425 new_tailRing->pFDeg =
currRing->pFDeg;
11426 new_tailRing->pLDeg =
currRing->pLDeg;
11430 Print(
"[%lu:%d", (
unsigned long) new_tailRing->bitmask, new_tailRing->ExpL_Size);
11439 for (
i=0;
i<=strat->
tl;
i++)
11441 strat->
T[
i].ShallowCopyDelete(new_tailRing, new_tailBin,
11442 p_shallow_copy_delete);
11444 for (
i=0;
i<=strat->
Ll;
i++)
11448 strat->
L[
i].ShallowCopyDelete(new_tailRing, p_shallow_copy_delete);
11450 if ((strat->
P.t_p !=
NULL) ||
11452 strat->
P.ShallowCopyDelete(new_tailRing, p_shallow_copy_delete);
11454 if ((L !=
NULL) && (L->tailRing != new_tailRing))
11457 L->ShallowCopyDelete(new_tailRing, p_shallow_copy_delete);
11463 L->tailRing = new_tailRing;
11466 L->max_exp = t_l->max_exp;
11470 if ((
T !=
NULL) && (
T->tailRing != new_tailRing &&
T->i_r < 0))
11471 T->ShallowCopyDelete(new_tailRing, new_tailBin, p_shallow_copy_delete);
11478 strat->
tailBin = new_tailBin;
◆ kStratInitChangeTailRing()
void kStratInitChangeTailRing |
( |
kStrategy |
strat | ) |
|
Definition at line 11493 of file kutil.cc.
11504 unsigned long l = 0;
11510 for (
i=0;
i<= strat->
Ll;
i++)
11514 for (
i=0;
i<=strat->
tl;
i++)
◆ message()
void message |
( |
int |
i, |
|
|
int * |
reduc, |
|
|
int * |
olddeg, |
|
|
kStrategy |
strat, |
|
|
int |
red_result |
|
) |
| |
Definition at line 7952 of file kutil.cc.
7963 if (strat->
Ll != *reduc)
7965 if (strat->
Ll != *reduc-1)
7977 if (red_result == 0)
7979 else if (red_result < 0)
7981 if ((red_result > 0) || ((strat->
Ll % 100)==99))
7983 if (strat->
Ll != *reduc && strat->
Ll > 0)
◆ messageStat()
void messageStat |
( |
int |
hilbcount, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 7993 of file kutil.cc.
8000 Print(
"product criterion:%d chain criterion:%d\n",strat->
cp,strat->
c3);
8001 if (hilbcount!=0)
Print(
"hilbert series criterion:%d\n",hilbcount);
8002 #ifdef HAVE_SHIFTBBA
8004 if (strat->
cv!=0)
Print(
"shift V criterion:%d\n",strat->
cv);
◆ messageStatSBA()
void messageStatSBA |
( |
int |
hilbcount, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 8006 of file kutil.cc.
8015 if (hilbcount!=0)
Print(
"hilbert series criterion:%d\n",hilbcount);
8016 #ifdef HAVE_SHIFTBBA
8018 if (strat->
cv!=0)
Print(
"shift V criterion:%d\n",strat->
cv);
◆ newHEdge()
◆ pairs()
◆ pCopyL2p()
Definition at line 12107 of file kutil.cc.
12115 #ifdef HAVE_SHIFTBBA
◆ pMove2CurrTail()
poly pMove2CurrTail |
( |
poly |
p, |
|
|
kStrategy |
strat |
|
) |
| |
◆ pMoveCurrTail2poly()
poly pMoveCurrTail2poly |
( |
poly |
p, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 12090 of file kutil.cc.
12098 #ifdef HAVE_SHIFTBBA
◆ posInIdealMonFirst()
int posInIdealMonFirst |
( |
const ideal |
F, |
|
|
const poly |
p, |
|
|
int |
start = 0 , |
|
|
int |
end = -1 |
|
) |
| |
Definition at line 5212 of file kutil.cc.
5215 if(end < 0 || end >=
IDELEMS(F))
5217 if (end<0)
return 0;
5224 for(
i=start;
i<end;
i++)
5238 || ((op == o) && (
pLtCmp(set[an],
p) == -1)))
5245 || ((op == o) && (
pLtCmp(set[
i],
p) == -1)))
◆ posInL0()
◆ posInL10()
Definition at line 1005 of file kstd1.cc.
1013 int op=
p->GetpFDeg() +
p->ecart;
1021 && (set[
j].GetpFDeg()+set[
j].ecart >= op))
◆ posInL10Ring()
◆ posInL11()
Definition at line 6322 of file kutil.cc.
6328 int o =
p->GetpFDeg();
6329 int op = set[
length].GetpFDeg();
6341 op = set[an].GetpFDeg();
6348 op = set[
i].GetpFDeg();
◆ posInL110()
Definition at line 6620 of file kutil.cc.
6626 int o =
p->GetpFDeg();
6627 int op = set[
length].GetpFDeg();
6631 || ((op == o) && (set[
length].length <=
p->length)
6641 op = set[an].GetpFDeg();
6643 || ((op == o) && (set[an].
length >
p->length))
6644 || ((op == o) && (set[an].length <=
p->length)
6650 op = set[
i].GetpFDeg();
6652 || ((op == o) && (set[
i].
length >
p->length))
6653 || ((op == o) && (set[
i].length <=
p->length)
◆ posInL11Ring()
Definition at line 6364 of file kutil.cc.
6370 int o =
p->GetpFDeg();
6371 int op = set[
length].GetpFDeg();
6383 op = set[an].GetpFDeg();
6390 op = set[
i].GetpFDeg();
◆ posInL11Ringls()
Definition at line 6434 of file kutil.cc.
6438 if (
length < 0)
return 0;
6448 if (set[an].FDeg >
p->FDeg)
6450 if (set[an].FDeg < p->FDeg)
6452 if (set[an].FDeg ==
p->FDeg)
6460 if (set[an].t_p!=
NULL)
6482 if (set[
i].FDeg >
p->FDeg)
6484 if (set[
i].FDeg < p->FDeg)
6486 if (set[
i].FDeg ==
p->FDeg)
6494 if (set[
i].t_p!=
NULL)
◆ posInL13()
Definition at line 6708 of file kutil.cc.
6714 int o =
p->GetpFDeg();
6716 if (set[
length].GetpFDeg() > o)
6726 if (set[an].GetpFDeg() >= o)
6731 if (set[
i].GetpFDeg() >= o)
◆ posInL15()
Definition at line 6743 of file kutil.cc.
6749 int o =
p->GetpFDeg() +
p->ecart;
6762 op = set[an].GetpFDeg() + set[an].ecart;
6769 op = set[
i].GetpFDeg() + set[
i].ecart;
◆ posInL15Ring()
Definition at line 6778 of file kutil.cc.
6784 int o =
p->GetpFDeg() +
p->ecart;
6797 op = set[an].GetpFDeg() + set[an].ecart;
6804 op = set[
i].GetpFDeg() + set[
i].ecart;
◆ posInL17()
Definition at line 6819 of file kutil.cc.
6825 int o =
p->GetpFDeg() +
p->ecart;
6829 && (set[
length].ecart >
p->ecart))
6831 && (set[
length].ecart ==
p->ecart)
6841 if ((set[an].GetpFDeg() + set[an].ecart > o)
6842 || ((set[an].GetpFDeg() + set[an].ecart == o)
6843 && (set[an].ecart >
p->ecart))
6844 || ((set[an].GetpFDeg() + set[an].ecart == o)
6845 && (set[an].ecart ==
p->ecart)
6851 if ((set[
i].GetpFDeg() + set[
i].ecart > o)
6852 || ((set[
i].GetpFDeg() + set[
i].ecart == o)
6853 && (set[
i].ecart >
p->ecart))
6854 || ((set[
i].GetpFDeg() +set[
i].ecart == o)
6855 && (set[
i].ecart ==
p->ecart)
◆ posInLF5C()
◆ posInLF5CRing()
Definition at line 6398 of file kutil.cc.
6404 int o =
p->GetpFDeg();
6405 int op = set[
length].GetpFDeg();
6417 op = set[an].GetpFDeg();
6424 op = set[
i].GetpFDeg();
◆ posInLRing()
Definition at line 6209 of file kutil.cc.
6213 if (
length < 0)
return 0;
6214 if (set[
length].FDeg >
p->FDeg)
6216 if (set[
length].FDeg ==
p->FDeg)
6217 if(set[
length].GetpLength() >
p->GetpLength())
6228 if (set[an].FDeg >
p->FDeg)
6230 if(set[an].FDeg ==
p->FDeg)
6232 if(set[an].GetpLength() >
p->GetpLength())
6236 if(set[an].GetpLength() ==
p->GetpLength())
6253 if (set[
i].FDeg >
p->FDeg)
6257 if(set[
i].FDeg ==
p->FDeg)
6259 if(set[
i].GetpLength() >
p->GetpLength())
6263 if(set[
i].GetpLength() ==
p->GetpLength())
◆ posInLSig()
◆ posInLSigRing()
Definition at line 6146 of file kutil.cc.
6165 cmp =
pLtCmp(set[an].sig,
p->sig);
6172 if (set[an].FDeg >
p->FDeg)
6174 if (set[an].FDeg < p->FDeg)
6176 if (set[an].FDeg ==
p->FDeg)
6194 if (set[
i].FDeg >
p->FDeg)
6196 if (set[
i].FDeg < p->FDeg)
6198 if (set[
i].FDeg ==
p->FDeg)
◆ posInS()
Definition at line 5034 of file kutil.cc.
5087 if (cmp == cmp_int)
return an;
5088 if (cmp == -cmp_int)
return en;
5094 if (cmp == cmp_int) en =
i;
5095 else if (cmp == -cmp_int) an =
i;
5111 if (
pLmCmp(set[an],
p) == cmp_int)
return an;
5112 if (
pLmCmp(set[an],
p) == -cmp_int)
return en;
5114 && ((strat->
ecartS[an])>ecart_p))
5120 else if (
pLmCmp(set[
i],
p) == -cmp_int) an=
i;
5124 &&((strat->
ecartS[
i])<ecart_p))
◆ posInSMonFirst()
Definition at line 5135 of file kutil.cc.
5152 || ((op == o) && (
pLtCmp(set[mon],
p) == -1)))
5163 || ((op == o) && (
pLtCmp(set[an],
p) == -1)))
5170 || ((op == o) && (
pLtCmp(set[
i],
p) == -1)))
5196 || ((op == o) && (
pLtCmp(set[an],
p) == -1)))
5203 || ((op == o) && (
pLtCmp(set[
i],
p) == -1)))
◆ posInSyz()
Definition at line 6282 of file kutil.cc.
6285 if (strat->
syzl==0)
return 0;
6290 int en= strat->
syzl-1;
◆ posInT0()
◆ posInT1()
◆ posInT11()
Definition at line 5325 of file kutil.cc.
5328 if (
length==-1)
return 0;
5330 int o =
p.GetpFDeg();
5331 int op = set[
length].GetpFDeg();
5345 op= set[an].GetpFDeg();
5352 op = set[
i].GetpFDeg();
◆ posInT110()
Definition at line 5478 of file kutil.cc.
5482 if (
length==-1)
return 0;
5484 int o =
p.GetpFDeg();
5485 int op = set[
length].GetpFDeg();
5489 || (( op == o) && (set[
length].length ==
p.length)
5500 op = set[an].GetpFDeg();
5502 || (( op == o) && (set[an].
length >
p.length))
5503 || (( op == o) && (set[an].length ==
p.length)
5509 op = set[
i].GetpFDeg();
5511 || (( op == o) && (set[
i].
length >
p.length))
5512 || (( op == o) && (set[
i].length ==
p.length)
◆ posInT13()
Definition at line 5567 of file kutil.cc.
5570 if (
length==-1)
return 0;
5572 int o =
p.GetpFDeg();
5574 if (set[
length].GetpFDeg() <= o)
5584 if (set[an].GetpFDeg() > o)
5589 if (set[
i].GetpFDeg() > o)
◆ posInT15()
Definition at line 5635 of file kutil.cc.
5656 if (
length==-1)
return 0;
5658 int o =
p.GetpFDeg() +
p.ecart;
5673 op = set[an].GetpFDeg()+set[an].ecart;
5680 op = set[
i].GetpFDeg()+set[
i].ecart;
◆ posInT17()
Definition at line 5730 of file kutil.cc.
5753 if (
length==-1)
return 0;
5755 int o =
p.GetpFDeg() +
p.ecart;
5759 || (( op == o) && (set[
length].ecart >
p.ecart))
5760 || (( op == o) && (set[
length].ecart==
p.ecart)
5771 op = set[an].GetpFDeg()+set[an].ecart;
5773 || (( op == o) && (set[an].ecart <
p.ecart))
5774 || (( op == o) && (set[an].ecart==
p.ecart)
5780 op = set[
i].GetpFDeg()+set[
i].ecart;
5782 || (( op == o) && (set[
i].ecart <
p.ecart))
5783 || (( op == o) && (set[
i].ecart ==
p.ecart)
◆ posInT17_c()
Definition at line 5837 of file kutil.cc.
5840 if (
length==-1)
return 0;
5844 int o =
p.GetpFDeg() +
p.ecart;
5853 || ((op == o) && (set[
length].ecart >
p.ecart))
5854 || ((op == o) && (set[
length].ecart==
p.ecart)
5870 int op = set[an].GetpFDeg()+set[an].ecart;
5872 || ((op == o) && (set[an].ecart <
p.ecart))
5873 || ((op == o) && (set[an].ecart==
p.ecart)
5884 int op = set[
i].GetpFDeg()+set[
i].ecart;
5886 || ((op == o) && (set[
i].ecart <
p.ecart))
5887 || ((op == o) && (set[
i].ecart ==
p.ecart)
◆ posInT19()
Definition at line 5964 of file kutil.cc.
5968 if (
length==-1)
return 0;
5971 int op=
p.GetpFDeg();
5973 if (set[
length].ecart < o)
5975 if (set[
length].ecart == o)
5977 int oo=set[
length].GetpFDeg();
5978 if ((oo < op) || ((oo==op) && (set[
length].
length <
p.length)))
5989 if (set[an].ecart > o)
5991 if (set[an].ecart == o)
5993 int oo=set[an].GetpFDeg();
5995 || ((oo==op) && (set[an].
length >
p.length)))
6001 if (set[
i].ecart > o)
6003 else if (set[
i].ecart == o)
6005 int oo=set[
i].GetpFDeg();
6007 || ((oo == op) && (set[
i].
length >
p.length)))
◆ posInT2()
◆ posInT_EcartFDegpLength()
Definition at line 11815 of file kutil.cc.
11827 if (
length==-1)
return 0;
11830 int op=
p.GetpFDeg();
11831 int ol =
p.GetpLength();
11833 if (set[
length].ecart < o)
11835 if (set[
length].ecart == o)
11837 int oo=set[
length].GetpFDeg();
11838 if ((oo < op) || ((oo==op) && (set[
length].
length < ol)))
11849 if (set[an].ecart > o)
11851 if (set[an].ecart == o)
11853 int oo=set[an].GetpFDeg();
11855 || ((oo==op) && (set[an].
pLength > ol)))
11861 if (set[
i].ecart > o)
11863 else if (set[
i].ecart == o)
11865 int oo=set[
i].GetpFDeg();
◆ posInT_EcartpLength()
Definition at line 5596 of file kutil.cc.
5599 int ol =
p.GetpLength();
5600 if (
length==-1)
return 0;
5604 int oo=set[
length].ecart;
5605 if ((oo < op) || ((oo==op) && (set[
length].
length <= ol)))
5615 int oo=set[an].ecart;
5617 || ((oo==op) && (set[an].
pLength > ol)))
5622 int oo=set[
i].ecart;
5624 || ((oo == op) && (set[
i].
pLength > ol)))
◆ posInT_FDegpLength()
Definition at line 11869 of file kutil.cc.
11881 if (
length==-1)
return 0;
11883 int op=
p.GetpFDeg();
11884 int ol =
p.GetpLength();
11886 int oo=set[
length].GetpFDeg();
11887 if ((oo < op) || ((oo==op) && (set[
length].
length < ol)))
11897 int oo=set[an].GetpFDeg();
11899 || ((oo==op) && (set[an].
pLength > ol)))
◆ posInT_pLength()
Definition at line 11906 of file kutil.cc.
11917 int ol =
p.GetpLength();
◆ posInTSig()
◆ postReduceByMon()
used for GB over ZZ: intermediate reduction by monomial elements background: any known constant element of ideal suppresses intermediate coefficient swell
Definition at line 11152 of file kutil.cc.
11165 poly pH =
h->GetP();
11169 for(
int i = 0;
i<=strat->
sl;
i++)
◆ postReduceByMonSig()
Definition at line 11220 of file kutil.cc.
11233 poly hSig =
h->sig;
11234 poly pH =
h->GetP();
11238 for(
int i = 0;
i<=strat->
sl;
i++)
11249 if(sigMult!=
NULL &&
pLtCmp(hSig,sigMult) == 1)
11276 if(sigMult!=
NULL &&
pLtCmp(hSig,sigMult) == 1)
◆ preIntegerCheck()
poly preIntegerCheck |
( |
ideal |
F, |
|
|
ideal |
Q |
|
) |
| |
used for GB over ZZ: look for constant and monomial elements in the ideal background: any known constant element of ideal suppresses intermediate coefficient swell
Definition at line 10985 of file kutil.cc.
10998 ideal F =
idCopy(Forig);
11002 ideal monred =
idInit(1,1);
11009 if((posconst != -1) && (!
nIsZero(F->m[posconst]->coef)))
11019 for(
int i=0;
i<idelemQ;
i++)
11027 if((posconst != -1) && (!
nIsZero(monred->m[posconst]->coef)))
11029 pmon =
pCopy(monred->m[posconst]);
11044 II->m[
j++] =
prMapR(F->m[
i], nMap, origR, QQ_ring);
11046 II->m[
j++] =
prMapR(
Q->m[
i], nMap, origR, QQ_ring);
11053 if(II->m[
i] !=
NULL)
11054 II->m[
i+1] = II->m[
i];
11057 poly integer =
NULL;
11065 integer =
pHead(syz->m[
i]);
11072 pmon =
prMapR(integer, nMap2, QQ_ring, origR);
11086 poly mindegmon =
NULL;
11091 if(mindegmon ==
NULL)
11092 mindegmon =
pCopy(one->m[
i]);
11095 if(
p_Deg(one->m[
i], QQ_ring) <
p_Deg(mindegmon, QQ_ring))
11096 mindegmon =
pCopy(one->m[
i]);
11100 if(mindegmon !=
NULL)
11103 if(II->m[
i] !=
NULL)
11104 II->m[
i+1] = II->m[
i];
11105 II->m[0] =
pCopy(mindegmon);
11134 pmon =
prMapR(mindegmon, nMap2, QQ_ring, origR);
◆ redFirstShift()
Definition at line 4483 of file kstd2.cc.
4487 if (
h->IsNull())
return 0;
4495 d =
h->GetpFDeg() +
h->ecart;
4498 h->SetShortExpVector();
4504 h->SetDegStuffReturnLDeg(strat->
LDegLast);
4509 strat->
T[
j].pNorm();
4535 h->SetShortExpVector();
4548 h->SetDegStuffReturnLDeg(strat->
LDegLast);
4558 if (strat->
T[
j].ecart <=
h->ecart)
4559 h->ecart = d -
h->GetpFDeg();
4561 h->ecart = d -
h->GetpFDeg() + strat->
T[
j].ecart -
h->ecart;
4563 d =
h->GetpFDeg() +
h->ecart;
4566 d =
h->SetDegStuffReturnLDeg(strat->
LDegLast);
4575 && ((d >= reddeg) || (pass > strat->
LazyPass)))
4580 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
4581 if (at <= strat->Ll)
◆ redHomog()
Definition at line 822 of file kstd2.cc.
824 if (strat->
tl<0)
return 1;
830 unsigned long not_sev;
835 h->SetShortExpVector();
837 h_p =
h->GetLmTailRing();
844 li = strat->
T[
j].pLength;
845 if (li<=0) li=strat->
T[
j].GetpLength();
862 if ((strat->
T[
i].pLength < li)
870 li = strat->
T[
i].pLength;
871 if (li<=0) li=strat->
T[
i].GetpLength();
892 #if SBA_PRINT_REDUCTION_STEPS
893 sba_interreduction_steps++;
895 #if SBA_PRINT_OPERATIONS
896 sba_interreduction_operations +=
pLength(strat->
T[ii].p);
908 h_p =
h->GetLmTailRing();
914 h->SetShortExpVector();
926 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
935 Print(
" lazy: -> L%d\n",at);
◆ redHoney()
Definition at line 1664 of file kstd2.cc.
1666 if (strat->
tl<0)
return 1;
1670 int i,
j,at,pass,ei, ii, h_d;
1671 unsigned long not_sev;
1675 d = reddeg =
h->GetpFDeg() +
h->ecart;
1676 h->SetShortExpVector();
1678 h_p =
h->GetLmTailRing();
1685 if (
j < 0)
return 1;
1687 ei = strat->
T[
j].ecart;
1688 li = strat->
T[
j].pLength;
1689 if (li<=0) li=strat->
T[
j].GetpLength();
1707 if ((((strat->
T[
i].ecart < ei) && (ei>
h->ecart))
1708 || ((strat->
T[
i].ecart <=
h->ecart) && (strat->
T[
i].pLength < li)))
1716 ei = strat->
T[
i].ecart;
1717 li = strat->
T[
i].pLength;
1718 if (li<=0) li=strat->
T[
i].GetpLength();
1737 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1755 Print(
"\nwith T[%d]:",ii);
1762 #if SBA_PRINT_REDUCTION_STEPS
1763 sba_interreduction_steps++;
1765 #if SBA_PRINT_OPERATIONS
1766 sba_interreduction_operations +=
pLength(strat->
T[ii].p);
1792 else if (
h->t_p!=
NULL)
1801 h->SetShortExpVector();
1803 h_d =
h->SetpFDeg();
1808 h->ecart = d-h_d+ei-
h->ecart;
1822 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1823 if (at <= strat->Ll)
1825 int dummy=strat->
sl;
1831 Print(
" degree jumped: -> L%d\n",at);
1837 else if (d > reddeg)
1839 if (d>=(
long)strat->
tailRing->bitmask)
1841 if (
h->pTotalDeg()+
h->ecart >= (long)strat->
tailRing->bitmask)
1846 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
◆ redLazy()
TEST_OPT_REDTHROUGH &&
Definition at line 1519 of file kstd2.cc.
1521 if (strat->
tl<0)
return 1;
1526 long reddeg =
h->GetpFDeg();
1528 unsigned long not_sev;
1530 h->SetShortExpVector();
1531 poly h_p =
h->GetLmTailRing();
1536 if (
j < 0)
return 1;
1538 li = strat->
T[
j].pLength;
1539 if (li<=0) li=strat->
T[
j].GetpLength();
1557 if ((strat->
T[
i].pLength < li)
1565 li = strat->
T[
i].pLength;
1566 if (li<=0) li=strat->
T[
i].GetpLength();
1588 #if SBA_PRINT_REDUCTION_STEPS
1589 sba_interreduction_steps++;
1591 #if SBA_PRINT_OPERATIONS
1592 sba_interreduction_operations +=
pLength(strat->
T[ii].p);
1604 h_p=
h->GetLmTailRing();
1611 h->SetShortExpVector();
1617 (strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
1620 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1621 if (at <= strat->Ll)
1624 int dummy=strat->
sl;
1636 else if (d != reddeg)
1638 if (d>=(
long)strat->
tailRing->bitmask)
1640 if (
h->pTotalDeg() >= (long)strat->
tailRing->bitmask)
1645 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
◆ redNF()
poly redNF |
( |
poly |
h, |
|
|
int & |
max_ind, |
|
|
int |
nonorm, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 1866 of file kstd2.cc.
1868 #define REDNF_CANONICALIZE 60
1879 P.SetShortExpVector();
1985 P.SetShortExpVector();
◆ redNF0()
◆ redNFTail()
◆ redRiloc()
Definition at line 341 of file kstd1.cc.
349 d =
h->GetpFDeg()+
h->ecart;
351 h->SetShortExpVector();
370 if (
h->GetLmTailRing() ==
NULL)
379 ei = strat->
T[
j].ecart;
381 if (ei >
h->ecart && ii < strat->tl)
383 li = strat->
T[
j].length;
393 if (
i > strat->
tl)
break;
394 if ((strat->
T[
i].ecart < ei || (strat->
T[
i].ecart == ei &&
395 strat->
T[
i].length < li))
404 if (strat->
T[
i].ecart < ei || (strat->
T[
i].ecart == ei &&
405 strat->
T[
i].length < li))
410 ei = strat->
T[
i].ecart;
411 if (ei <= h->ecart)
break;
412 li = strat->
T[
i].length;
430 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
431 if (at <= strat->Ll &&
pLmCmp(
h->p, strat->
L[strat->
Ll].p) != 0 && !
nEqual(
h->p->coef, strat->
L[strat->
Ll].p->coef))
460 h->SetShortExpVector();
465 h->ecart = d-
h->GetpFDeg();
467 h->ecart = d-
h->GetpFDeg()+ei-
h->ecart;
471 h->ecart =
h->pLDeg(strat->
LDegLast) -
h->GetpFDeg();
474 d =
h->GetpFDeg()+
h->ecart;
481 && ((d >= reddeg) || (pass > strat->
LazyPass)))
487 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
509 if (
h->pTotalDeg()+
h->ecart >= (int)strat->
tailRing->bitmask)
514 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
◆ redRing()
Definition at line 715 of file kstd2.cc.
717 if (
h->IsNull())
return 0;
718 if (strat->
tl<0)
return 1;
729 long reddeg =
h->GetpFDeg();
731 h->SetShortExpVector();
753 if (
h->GetLmTailRing() ==
NULL)
766 if (
h->GetLmTailRing() ==
NULL)
772 h->SetShortExpVector();
777 (strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
782 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
795 if (d >= (
long)strat->
tailRing->bitmask)
797 if (
h->pTotalDeg() >= (long)strat->
tailRing->bitmask)
802 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
◆ redRing_Z()
Definition at line 568 of file kstd2.cc.
570 if (
h->IsNull())
return 0;
571 if (strat->
tl<0)
return 1;
582 long reddeg =
h->GetpFDeg();
584 h->SetShortExpVector();
615 if (
h->GetLmTailRing() ==
NULL)
661 if (
h->GetLmTailRing() ==
NULL)
670 h->SetShortExpVector();
675 (strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
680 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
693 if (d >= (
long)strat->
tailRing->bitmask)
695 if (
h->pTotalDeg() >= (long)strat->
tailRing->bitmask)
700 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
◆ redSig()
Definition at line 982 of file kstd2.cc.
984 if (strat->
tl<0)
return 1;
990 PrintS(
"------- IN REDSIG -------\n");
997 PrintS(
"---------------------------\n");
1000 int i,
j,at,pass, ii;
1003 unsigned long not_sev;
1008 h->SetShortExpVector();
1010 h_p =
h->GetLmTailRing();
1020 li = strat->
T[
j].pLength;
1021 if (li<=0) li=strat->
T[
j].GetpLength();
1038 if ((strat->
T[
i].pLength < li)
1046 li = strat->
T[
i].pLength;
1047 if (li<=0) li=strat->
T[
i].GetpLength();
1069 Print(
"BEFORE REDUCTION WITH %d:\n",ii);
1070 PrintS(
"--------------------------------\n");
1077 PrintS(
"--------------------------------\n");
1078 printf(
"INDEX OF REDUCER T: %d\n",ii);
1081 #if SBA_PRINT_REDUCTION_STEPS
1083 sba_reduction_steps++;
1085 #if SBA_PRINT_OPERATIONS
1087 sba_operations +=
pLength(strat->
T[ii].p);
1094 Print(
"SigSAFE: %d\n",sigSafe);
1109 h_p =
h->GetLmTailRing();
1115 h->SetShortExpVector();
1127 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1128 if (at <= strat->Ll)
1130 int dummy=strat->
sl;
1138 Print(
" lazy: -> L%d\n",at);
◆ redSigRing()
Definition at line 1149 of file kstd2.cc.
1162 beforeredsig =
pCopy(
h->sig);
1164 if (strat->
tl<0)
return 1;
1170 Print(
"------- IN REDSIG -------\n");
1177 Print(
"---------------------------\n");
1180 int i,
j,at,pass, ii;
1183 unsigned long not_sev;
1188 h->SetShortExpVector();
1190 h_p =
h->GetLmTailRing();
1212 h->i_r1 = strat->
tl;
1215 if (
h->GetLmTailRing() ==
NULL)
1222 if(
pLtCmp(beforeredsig,
h->sig) == 1)
1245 li = strat->
T[
j].pLength;
1246 if (li<=0) li=strat->
T[
j].GetpLength();
1262 if ((strat->
T[
i].pLength < li)
1270 li = strat->
T[
i].pLength;
1271 if (li<=0) li=strat->
T[
i].GetpLength();
1293 Print(
"BEFORE REDUCTION WITH %d:\n",ii);
1294 Print(
"--------------------------------\n");
1301 Print(
"--------------------------------\n");
1302 printf(
"INDEX OF REDUCER T: %d\n",ii);
1330 #if SBA_PRINT_REDUCTION_STEPS
1332 sba_reduction_steps++;
1334 #if SBA_PRINT_OPERATIONS
1336 sba_operations +=
pLength(strat->
T[ii].p);
1343 Print(
"SigSAFE: %d\n",sigSafe);
1358 h_p =
h->GetLmTailRing();
1364 h->SetShortExpVector();
1376 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1377 if (at <= strat->Ll)
1379 int dummy=strat->
sl;
1387 Print(
" lazy: -> L%d\n",at);
◆ redtail() [1/2]
Definition at line 7403 of file kutil.cc.
7441 if (With ==
NULL)
break;
7451 return redtail(L, end_pos, strat);
7457 if (hn ==
NULL)
goto all_done;
◆ redtail() [2/2]
poly redtail |
( |
poly |
p, |
|
|
int |
end_pos, |
|
|
kStrategy |
strat |
|
) |
| |
◆ redtailBba() [1/3]
Definition at line 7479 of file kutil.cc.
7483 #define REDTAIL_CANONICALIZE 100
7487 p =
h = L->GetLmTailRing();
7489 return L->GetLmCurrRing();
7524 Ln.SetShortExpVector();
7530 With = &(strat->
T[
j]);
7531 assume(With->GetpLength()==
pLength(With->p != __null ? With->p : With->t_p));
7536 if (With ==
NULL)
break;
7537 assume(With->GetpLength()==
pLength(With->p != __null ? With->p : With->t_p));
7564 pNext(
h) = Ln.LmExtractAndIter();
7567 }
while (!Ln.IsNull());
7570 if (Ln.IsNull())
goto all_done;
7571 if (! withT) With_s.Init(
currRing);
7573 pNext(
h) = Ln.LmExtractAndIter();
◆ redtailBba() [2/3]
◆ redtailBba() [3/3]
◆ redtailBba_Z() [1/2]
Definition at line 7834 of file kutil.cc.
7842 p =
h = L->GetLmTailRing();
7844 return L->GetLmCurrRing();
7851 Ln.pLength = L->GetpLength() - 1;
7864 Ln.SetShortExpVector();
7866 if (With ==
NULL)
break;
7876 poly p_Ln=Ln.GetLmCurrRing();
7877 poly p_With=With->GetLmCurrRing();
7889 if (Ln.bucket!=
NULL)
7920 pNext(
h) = Ln.LmExtractAndIter();
7923 }
while (!Ln.IsNull());
7926 if (Ln.IsNull())
goto all_done;
7929 pNext(
h) = Ln.LmExtractAndIter();
◆ redtailBba_Z() [2/2]
◆ redtailBbaAlsoLC_Z()
Definition at line 7709 of file kutil.cc.
7717 p =
h = L->GetLmTailRing();
7752 Ln.SetShortExpVector();
7761 With = &(strat->
T[
j]);
7762 assume(With->GetpLength()==
pLength(With->p != __null ? With->p : With->t_p));
7779 pNext(
h) = Ln.LmExtractAndIter();
7782 }
while (!Ln.IsNull());
7790 With = &(strat->
T[
j]);
7791 assume(With->GetpLength()==
pLength(With->p != __null ? With->p : With->t_p));
7808 pNext(
h) = Ln.LmExtractAndIter();
7811 }
while (!Ln.IsNull());
7815 if (Ln.IsNull())
goto all_done;
7817 pNext(
h) = Ln.LmExtractAndIter();
◆ redtailBbaBound() [1/2]
Definition at line 7593 of file kutil.cc.
7600 p =
h = L->GetLmTailRing();
7602 return L->GetLmCurrRing();
7609 Ln.pLength = L->GetpLength() - 1;
7633 Ln.SetShortExpVector();
7639 With = &(strat->
T[
j]);
7644 if (With ==
NULL)
break;
7671 pNext(
h) = Ln.LmExtractAndIter();
7674 }
while (!Ln.IsNull());
7686 if (! withT) With_s.Init(
currRing);
7688 pNext(
h) = Ln.LmExtractAndIter();
◆ redtailBbaBound() [2/2]
◆ redtailBbaShift()
Definition at line 12821 of file kutil.cc.
12836 p =
h = L->GetLmTailRing();
12838 return L->GetLmCurrRing();
12845 Ln.pLength = L->GetpLength() - 1;
12853 while(!Ln.IsNull())
12857 Ln.SetShortExpVector();
12863 With = &(strat->
T[
j]);
12868 if (With ==
NULL)
break;
12884 pNext(
h) = Ln.LmExtractAndIter();
12887 }
while (!Ln.IsNull());
12890 if (Ln.IsNull())
goto all_done;
12891 if (! withT) With_s.Init(
currRing);
12893 pNext(
h) = Ln.LmExtractAndIter();
◆ redtailSba()
Definition at line 1398 of file kstd2.cc.
1400 #define REDTAIL_CANONICALIZE 100
1404 p =
h = L->GetLmTailRing();
1406 return L->GetLmCurrRing();
1414 Ln.sevSig = L->sevSig;
1415 Ln.pLength = L->GetpLength() - 1;
1430 Ln.SetShortExpVector();
1436 With = &(strat->
T[
j]);
1441 if (With ==
NULL)
break;
1465 #if SBA_PRINT_REDUCTION_STEPS
1467 sba_reduction_steps++;
1469 #if SBA_PRINT_OPERATIONS
1471 sba_operations +=
pLength(With->p);
1481 pNext(
h) = Ln.LmExtractAndIter();
1484 }
while (!Ln.IsNull());
1487 if (Ln.IsNull())
goto all_done;
1488 if (! withT) With_s.Init(
currRing);
1495 pNext(
h) = Ln.LmExtractAndIter();
1512 return L->GetLmCurrRing();
◆ reorderS()
Definition at line 4981 of file kutil.cc.
4984 int i,
j,at,ecart, s2r;
4988 int new_suc=strat->
sl+1;
4992 for (;
i<=strat->
sl;
i++)
4997 if (new_suc > at) new_suc = at;
5000 sev = strat->
sevS[
i];
5003 for (
j=
i;
j>=at+1;
j--)
5005 strat->
S[
j] = strat->
S[
j-1];
5011 strat->
ecartS[at] = ecart;
5012 strat->
sevS[at] = sev;
5013 strat->
S_2_R[at] = s2r;
5016 for (
j=
i;
j>=at+1;
j--)
5020 strat->
fromQ[at]=fq;
5024 if (new_suc <= strat->sl) *suc=new_suc;
◆ replaceInLAndSAndT()
Definition at line 9519 of file kutil.cc.
9544 poly tp = strat->
T[tj].p;
9549 for (
j = 0;
j <= strat->
sl; ++
j) {
9550 if (
pLtCmp(tp, strat->
S[
j]) == 0) {
9556 if (j <= strat->sl) {
9560 pos =
posInS(strat, strat->
sl,
p.p,
p.ecart);
9566 for (
i = 0;
i <= strat->
Ll; ++
i) {
◆ sba()
Definition at line 2536 of file kstd2.cc.
2545 #if SBA_PRINT_ZERO_REDUCTIONS
2546 long zeroreductions = 0;
2548 #if SBA_PRINT_PRODUCT_CRITERION
2549 long product_criterion = 0;
2551 #if SBA_PRINT_SIZE_G
2553 int size_g_non_red = 0;
2555 #if SBA_PRINT_SIZE_SYZ
2559 #if SBA_PRINT_REDUCTION_STEPS
2560 sba_reduction_steps = 0;
2561 sba_interreduction_steps = 0;
2563 #if SBA_PRINT_OPERATIONS
2565 sba_interreduction_operations = 0;
2569 ring sRing, currRingOld;
2574 if (sRing!=currRingOld)
2593 dummy =
pCopy(F->m[0]);
2595 F->m[
i] = F->m[
i+1];
2616 dummy =
pCopy(F->m[0]);
2618 F->m[
i] = F->m[
i+1];
2636 for (
int i=0;
i<
sort->length();++
i)
2637 F->m[
i] = F1->m[(*
sort)[
i]-1];
2651 F->m[
j] = F->m[
j-1];
2669 printf(
"SBA COMPUTATIONS DONE IN THE FOLLOWING RING:\n");
2671 printf(
"ordSgn = %d\n",
currRing->OrdSgn);
2674 int srmax,lrmax, red_result = 1;
2676 int hilbeledeg=1,hilbcount=0,minimcnt=0;
2690 reduc = olddeg = lrmax = 0;
2703 #ifdef HAVE_TAIL_RING
2721 strat->
enterS(strat->
L[strat->
Ll-(
i)], strat->
sl+1, strat, strat->
tl);
2731 while (strat->
Ll >= 0)
2733 if (strat->
Ll > lrmax) lrmax =strat->
Ll;
2763 f5c ( strat, olddeg, minimcnt, hilbeledeg, hilbcount, srmax,
2764 lrmax, reduc,
Q,
w, hilb );
2774 strat->
P = strat->
L[strat->
Ll];
2780 if (!strat->
rewCrit2(strat->
P.sig, ~strat->
P.sevSig, strat->
P.GetLmCurrRing(), strat, strat->
P.checked+1))
2784 PrintS(
"SIG OF NEXT PAIR TO HANDLE IN SIG-BASED ALGORITHM\n");
2785 PrintS(
"-------------------------------------------------\n");
2790 PrintS(
"-------------------------------------------------\n");
2825 else if (strat->
P.p1 ==
NULL)
2827 if (strat->
minim > 0)
2833 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
2841 PrintS(
"Poly before red: ");
2845 #if SBA_PRODUCT_CRITERION
2846 if (strat->
P.prod_crit)
2848 #if SBA_PRINT_PRODUCT_CRITERION
2849 product_criterion++;
2851 int pos =
posInSyz(strat, strat->
P.sig);
2858 red_result = strat->
red(&strat->
P,strat);
2861 red_result = strat->
red(&strat->
P,strat);
2877 strat->
P.p =
pNeg(strat->
P.p);
2878 strat->
P.sig =
pNeg(strat->
P.sig);
2881 if(strat->
P.sig !=
NULL)
2883 if(strat->
P.p !=
NULL)
2890 red_result =
redRing(&strat->
P,strat);
2895 strat->
P.sig =
NULL;
2899 strat->
enterS(strat->
P, 0, strat, strat->
tl);
2915 if (red_result != 0)
2917 PrintS(
"Poly after red: ");
2919 pWrite(strat->
P.GetLmCurrRing());
2921 printf(
"%d\n",red_result);
2926 if(strat->
P.p !=
NULL)
2928 &olddeg,&reduc,strat, red_result);
2930 message((strat->honey ? strat->P.ecart : 0),
2931 &olddeg,&reduc,strat, red_result);
2934 if (strat->overflow)
2939 if (red_result == 1)
2942 strat->P.GetP(strat->lmBin);
2946 (strat->P).FDeg = (strat->P).pFDeg();
2950 if (strat->homog) strat->initEcart(&(strat->P));
2958 int pos = strat->sl+1;
2966 beforetailred =
pCopy(strat->P.sig);
2972 strat->P.p =
redtailSba(&(strat->P),pos-1,strat, withT);
2976 if (strat->sbaOrder != 2)
2980 strat->P.pCleardenom();
2983 strat->P.p =
redtailSba(&(strat->P),pos-1,strat, withT);
2984 strat->P.pCleardenom();
2991 strat->P.p =
redtailSba(&(strat->P),pos-1,strat, withT);
3000 strat->enterS(strat->P, 0, strat, strat->tl);
3006 if(strat->P.sig ==
NULL ||
pLtCmp(beforetailred,strat->P.sig) == 1)
3008 strat->sigdrop =
TRUE;
3010 red_result =
redRing(&strat->P,strat);
3014 strat->sigdrop =
FALSE;
3019 strat->enterS(strat->P, 0, strat, strat->tl);
3025 if(strat->P.p ==
NULL)
3026 goto case_when_red_result_changed;
3030 if (strat->sbaOrder == 1)
3032 for (
int jj = 0; jj<strat->tl+1; jj++)
3034 if (
pGetComp(strat->T[jj].sig) == strat->currIdx)
3036 strat->T[jj].is_sigsafe =
FALSE;
3042 for (
int jj = 0; jj<strat->tl+1; jj++)
3044 strat->T[jj].is_sigsafe =
FALSE;
3052 if ((strat->P.p1==
NULL) && (strat->minim>0))
3054 if (strat->minim==1)
3056 strat->M->m[minimcnt]=
p_Copy(strat->P.p,
currRing,strat->tailRing);
3061 strat->M->m[minimcnt]=strat->P.p2;
3065 pNext(strat->M->m[minimcnt])
3066 = strat->p_shallow_copy_delete(
pNext(strat->M->m[minimcnt]),
3075 strat->T[strat->tl].is_sigsafe =
FALSE;
3082 superenterpairsSig(strat->P.p,strat->P.sig,strat->sl+1,strat->sl,strat->P.ecart,pos,strat, strat->tl);
3084 enterpairsSig(strat->P.p,strat->P.sig,strat->sl+1,strat->sl,strat->P.ecart,pos,strat, strat->tl);
3089 strat->enterS(strat->P, pos, strat, strat->tl);
3090 if(strat->sbaOrder != 1)
3093 for (
int tk=0; tk<strat->sl+1; tk++)
3114 for(
int ps=0;ps<strat->sl+1;ps++)
3118 if (strat->syzl == strat->syzmax)
3122 (strat->syzmax)*
sizeof(
unsigned long),
3124 *
sizeof(
unsigned long));
3127 Q.sig =
pCopy(strat->P.sig);
3130 if (strat->sbaOrder == 0)
3153 if(strat->sbaOrder == 0 || strat->sbaOrder == 3)
3156 unsigned max_cmp =
IDELEMS(F);
3164 if (strat->currIdx < idx)
3166 for (
int i=0;
i<strat->sl; ++
i)
3177 strat->currIdx = idx;
3183 for (
unsigned i=cmp+1;
i<=max_cmp; ++
i)
3186 for (
int j=0;
j<strat->sl; ++
j)
3204 if (strat->sbaOrder == 0)
3224 printf(
"---------------------------\n");
3225 Print(
" %d. ELEMENT ADDED TO GCURR:\n",strat->sl+1);
3248 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
3251 if (strat->sl>srmax) srmax = strat->sl;
3255 case_when_red_result_changed:
3263 #if SBA_PRINT_ZERO_REDUCTIONS
3272 int pos =
posInSyz(strat, strat->P.sig);
3276 Print(
"ADDING STUFF TO SYZ : ");
3282 if (strat->P.p1 ==
NULL && strat->minim > 0)
3289 memset(&(strat->P), 0,
sizeof(strat->P));
3295 printf(
"\nSigDrop!\n");
3297 printf(
"\nEnded with no SigDrop\n");
3303 if(strat->P.sig !=
NULL)
3304 strat->sbaEnterS =
pGetComp(strat->P.sig)-1;
3307 memset(&(strat->P), 0,
sizeof(strat->P));
3326 clearS(strat->S[
j],strat->sevS[
j],&
k,&
j,strat);
3337 if (strat->completeReduce_retry)
3342 #ifdef HAVE_TAIL_RING
3343 if(
currRing->bitmask>strat->tailRing->bitmask)
3345 strat->completeReduce_retry=
FALSE;
3348 for(
i=strat->sl;
i>=0;
i--) strat->S_2_R[
i]=-1;
3351 if (strat->completeReduce_retry)
3358 #if SBA_PRINT_SIZE_SYZ
3360 size_syz = strat->syzl;
3373 #if SBA_PRINT_SIZE_G
3374 size_g_non_red =
IDELEMS(strat->Shdl);
3388 for(;
k>=0 && (strat->L[
k].p1 !=
NULL || strat->L[
k].p2 !=
NULL);
k--)
3398 for(;
k>=0 && strat->L[
k].p1 ==
NULL && strat->L[
k].p2 ==
NULL;
k--)
3401 strat->enterS(strat->L[
k], strat->sl+1, strat, strat->tl);
3409 for(
k=strat->sl;
k>=0;
k--)
3411 printf(
"\nsig[%i] = ",
i);
pWrite(strat->sig[
k]);
3412 if(strat->sig[
k] ==
NULL)
3413 strat->sig[
k] =
pCopy(strat->sig[
k-1]);
3422 if ((strat->sbaOrder == 1 || strat->sbaOrder == 3) && sRing!=currRingOld)
3431 if(strat->tailRing == sRing)
3442 #if SBA_PRINT_SIZE_G
3443 size_g =
IDELEMS(strat->Shdl);
3446 printf(
"SIZE OF SHDL: %d\n",
IDELEMS(strat->Shdl));
3448 while (oo<
IDELEMS(strat->Shdl))
3450 printf(
" %d. ",oo+1);
3455 #if SBA_PRINT_ZERO_REDUCTIONS
3456 printf(
"----------------------------------------------------------\n");
3457 printf(
"ZERO REDUCTIONS: %ld\n",zeroreductions);
3460 #if SBA_PRINT_REDUCTION_STEPS
3461 printf(
"----------------------------------------------------------\n");
3462 printf(
"S-REDUCTIONS: %ld\n",sba_reduction_steps);
3464 #if SBA_PRINT_OPERATIONS
3465 printf(
"OPERATIONS: %ld\n",sba_operations);
3467 #if SBA_PRINT_REDUCTION_STEPS
3468 printf(
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n");
3469 printf(
"INTERREDUCTIONS: %ld\n",sba_interreduction_steps);
3471 #if SBA_PRINT_OPERATIONS
3472 printf(
"INTERREDUCTION OPERATIONS: %ld\n",sba_interreduction_operations);
3474 #if SBA_PRINT_REDUCTION_STEPS
3475 printf(
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n");
3476 printf(
"ALL REDUCTIONS: %ld\n",sba_reduction_steps+sba_interreduction_steps);
3477 sba_interreduction_steps = 0;
3478 sba_reduction_steps = 0;
3480 #if SBA_PRINT_OPERATIONS
3481 printf(
"ALL OPERATIONS: %ld\n",sba_operations+sba_interreduction_operations);
3482 sba_interreduction_operations = 0;
3485 #if SBA_PRINT_SIZE_G
3486 printf(
"----------------------------------------------------------\n");
3487 printf(
"SIZE OF G: %d / %d\n",size_g,size_g_non_red);
3491 #if SBA_PRINT_SIZE_SYZ
3492 printf(
"SIZE OF SYZ: %ld\n",size_syz);
3493 printf(
"----------------------------------------------------------\n");
3496 #if SBA_PRINT_PRODUCT_CRITERION
3497 printf(
"PRODUCT CRITERIA: %ld\n",product_criterion);
3498 product_criterion = 0;
3500 return (strat->Shdl);
◆ sbaCheckGcdPair()
Definition at line 1675 of file kutil.cc.
1678 if(strat->
sl < 0)
return FALSE;
1680 for(
i=0;
i<strat->
sl;
i++)
1716 h->i_r1 = -1;
h->i_r2 = -1;
◆ sbaRing()
Definition at line 11520 of file kutil.cc.
11541 res->block0 = (
int *)
omAlloc0((n+1)*
sizeof(int));
11542 res->block1 = (
int *)
omAlloc0((n+1)*
sizeof(int));
11543 int **wvhdl = (
int **)
omAlloc0((n+1)*
sizeof(
int*));
11544 res->wvhdl = wvhdl;
11545 for (
int i=1;
i<n;
i++)
11547 res->order[
i] = r->order[
i-1];
11548 res->block0[
i] = r->block0[
i-1];
11549 res->block1[
i] = r->block1[
i-1];
11550 res->wvhdl[
i] = r->wvhdl[
i-1];
11569 #ifndef SING_NDEBUG
11570 WarnS(
"error in nc_rComplete");
11589 res->block0 = (
int *)
omAlloc0((n+2)*
sizeof(int));
11590 res->block1 = (
int *)
omAlloc0((n+2)*
sizeof(int));
11591 int **wvhdl = (
int **)
omAlloc0((n+2)*
sizeof(
int*));
11592 res->wvhdl = wvhdl;
11593 for (
int i=2;
i<n+2;
i++)
11595 res->order[
i] = r->order[
i-2];
11596 res->block0[
i] = r->block0[
i-2];
11597 res->block1[
i] = r->block1[
i-2];
11598 res->wvhdl[
i] = r->wvhdl[
i-2];
11603 res->block0[0] = 1;
11605 for (
int i=0;
i<
res->N; ++
i)
11606 res->wvhdl[0][
i] = 1;
11625 #ifndef SING_NDEBUG
11626 WarnS(
"error in nc_rComplete");
◆ superenterpairs()
void superenterpairs |
( |
poly |
h, |
|
|
int |
k, |
|
|
int |
ecart, |
|
|
int |
pos, |
|
|
kStrategy |
strat, |
|
|
int |
atR = -1 |
|
) |
| |
◆ superenterpairsSig()
void superenterpairsSig |
( |
poly |
h, |
|
|
poly |
hSig, |
|
|
int |
hFrom, |
|
|
int |
k, |
|
|
int |
ecart, |
|
|
int |
pos, |
|
|
kStrategy |
strat, |
|
|
int |
atR = -1 |
|
) |
| |
◆ syzCriterion()
Definition at line 7044 of file kutil.cc.
7049 PrintS(
"syzygy criterion checks: ");
7052 for (
int k=0;
k<strat->
syzl;
k++)
7057 Print(
"checking with: %d / %d -- \n",
k,strat->
syzl);
◆ syzCriterionInc()
Definition at line 7079 of file kutil.cc.
7086 PrintS(
"--- syzygy criterion checks: ");
7111 Print(
"checking with: %d -- ",
k);
◆ twoPow()
◆ updateResult()
void updateResult |
( |
ideal |
r, |
|
|
ideal |
Q, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 10526 of file kutil.cc.
10551 if ((r->m[
l]!=
NULL)
10558 if ((
Q->m[q]!=
NULL)
10582 if ((r->m[
l]!=
NULL)
10589 if ((
Q->m[q]!=
NULL)
10633 reduction_found=
TRUE;
10664 reduction_found=
TRUE;
10678 if ( reduction_found)
◆ updateS()
Definition at line 9030 of file kutil.cc.
9056 while (i<=strat->sl)
9067 if (
pCmp(redSi,strat->
S[
i])!=0)
9124 if (any_change)
reorderS(&suc,strat);
9129 for (
i=0;
i<=strat->
sl;
i++)
9155 #ifdef HAVE_SHIFTBBA
9167 while (i<=strat->sl)
9179 else if (
pCmp((strat->
S)[
i],redSi)!=0)
9220 if (any_change)
reorderS(&suc,strat);
9221 else { suc=-1;
break; }
9232 for (
i=0;
i<=strat->
sl;
i++)
9255 #ifdef HAVE_SHIFTBBA
◆ DENOMINATOR_LIST
◆ HCord
◆ strat_nr
◆ test_PosInL
◆ test_PosInT
static FORCE_INLINE number n_IntMod(number a, number b, const coeffs r)
for r a field, return n_Init(0,r) always: n_Div(a,b,r)*b+n_IntMod(a,b,r)==a n_IntMod(a,...
void chainCritSig(poly p, int, kStrategy strat)
void kEcartWeights(poly *s, int sl, short *eweight, const ring R)
KINLINE void clearS(poly p, unsigned long p_sev, int *at, int *k, kStrategy strat)
BOOLEAN rHasGlobalOrdering(const ring r)
KINLINE TObject * S_2_T(int i)
static int si_min(const int a, const int b)
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 > ...
void kStratInitChangeTailRing(kStrategy strat)
void enterpairsSig(poly h, poly hSig, int hFrom, int k, int ecart, int pos, kStrategy strat, int atR)
poly redNF(poly h, int &max_ind, int nonorm, kStrategy strat)
void chainCritRing(poly p, int, kStrategy strat)
int posInLSig(const LSet set, const int length, LObject *p, const kStrategy)
#define pLPCopyAndShiftLM(p, sh)
KINLINE poly k_LmInit_tailRing_2_currRing(poly t_p, ring tailRing, omBin lmBin)
int idElem(const ideal F)
count non-zero elements
static poly p_LmFreeAndNext(poly p, ring)
long pLDeg1(poly p, int *l, const ring r)
int kBucketCanonicalize(kBucket_pt bucket)
Canonicalizes Bpoly, i.e. converts polys of buckets into one poly in one bucket: Returns number of bu...
static poly p_LmDeleteAndNext(poly p, const ring r)
void nc_PolyPolyRed(poly &b, poly p, number *c, const ring r)
void deleteHC(LObject *L, kStrategy strat, BOOLEAN fromNext)
#define pIsConstant(p)
like above, except that Comp must be 0
void initBuchMoraCrit(kStrategy strat)
void enterExtendedSpolySig(poly h, poly hSig, kStrategy strat)
void initPairtest(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:
int posInT17_c(const TSet set, const int length, LObject &p)
void pNorm(poly p, const ring R=currRing)
#define TEST_OPT_INFREDTAIL
void cleanT(kStrategy strat)
static BOOLEAN rIsLPRing(const ring r)
void pRestoreDegProcs(ring r, pFDegProc old_FDeg, pLDegProc old_lDeg)
void(* enterS)(LObject &h, int pos, kStrategy strat, int atR)
#define SBA_INTERRED_START
long pLDeg0c(poly p, int *l, const ring r)
int redEcart(LObject *h, kStrategy strat)
#define pHasNotCF(p1, p2)
#define idDelete(H)
delete an ideal
void scComputeHC(ideal S, ideal Q, int ak, poly &hEdge, ring tailRing)
static FORCE_INLINE BOOLEAN nCoeff_is_Z(const coeffs r)
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced
static BOOLEAN enterOneStrongPoly(int i, poly p, int, int, kStrategy strat, int atR, bool enterTstrong)
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)
static BOOLEAN rField_is_Domain(const ring r)
long pLDeg0(poly p, int *l, const ring r)
void rChangeCurrRing(ring r)
#define TEST_OPT_DEGBOUND
poly nc_p_Bracket_qq(poly p, const poly q, const ring r)
returns [p,q], destroys p
int posInL17_c(const LSet set, const int length, LObject *p, const kStrategy)
static FORCE_INLINE int n_GetChar(const coeffs r)
Return the characteristic of the coeff. domain.
#define REDTAIL_CANONICALIZE
long pLDeg1_Totaldegree(poly p, int *l, const ring r)
#define pGetExp(p, i)
Exponent.
ideal idrMoveR_NoSort(ideal &id, ring src_r, ring dest_r)
void initBbaShift(kStrategy strat)
int posInT_EcartFDegpLength(const TSet set, const int length, LObject &p)
void pEnlargeSet(poly **p, int l, int increment)
poly redtail(LObject *L, int end_pos, kStrategy strat)
int posInT17(const TSet set, const int length, LObject &p)
void initenterpairsShift(poly h, int k, int ecart, int isFromQ, kStrategy strat, int atR)
BOOLEAN isInPairsetL(int length, poly p1, poly p2, int *k, kStrategy strat)
int posInT110Ring(const TSet set, const int length, LObject &p)
static poly p_Mult_mm(poly p, poly m, const ring r)
int(* posInLOld)(const LSet Ls, const int Ll, LObject *Lo, const kStrategy strat)
void(* chainCrit)(poly p, int ecart, kStrategy strat)
static nc_type & ncRingType(nc_struct *p)
KINLINE unsigned long * initsevT()
number kBucketPolyRed(kBucket_pt bucket, poly p1, int l1, poly spNoether)
static poly p_Neg(poly p, const ring r)
static poly p_LmInit(poly p, const ring r)
static void p_SetCompP(poly p, int i, ring r)
void rKillModifiedRing(ring r)
void updateResult(ideal r, ideal Q, kStrategy strat)
void id_DelDiv(ideal id, const ring r)
delete id[j], if LT(j) == coeff*mon*LT(i) and vice versa, i.e., delete id[i], if LT(i) == coeff*mon*L...
BOOLEAN kCheckSpolyCreation(LObject *L, kStrategy strat, poly &m1, poly &m2)
void superenterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
long totaldegreeWecart(poly p, ring r)
int posInT110(const TSet set, const int length, LObject &p)
BOOLEAN idInsertPoly(ideal h1, poly h2)
insert h2 into h1 (if h2 is not the zero polynomial) return TRUE iff h2 was indeed inserted
poly redtailBba(LObject *L, int end_pos, kStrategy strat, BOOLEAN withT, BOOLEAN normalize)
static BOOLEAN length(leftv result, leftv arg)
long ind_fact_2(long arg)
static poly p_ShallowCopyDelete(poly p, const ring r, omBin bin)
static void p_ExpVectorCopy(poly d_p, poly s_p, const ring r)
#define TEST_OPT_CONTENTSB
#define __p_GetComp(p, r)
KINLINE int ksReducePolyTailSig(LObject *PR, TObject *PW, LObject *Red, kStrategy strat)
void updateS(BOOLEAN toT, kStrategy strat)
poly prMapR(poly src, nMapFunc nMap, ring src_r, ring dest_r)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
long pLDeg1c_Deg(poly p, int *l, const ring r)
BOOLEAN nc_rComplete(const ring src, ring dest, bool bSetupQuotient)
void p_wrp(poly p, ring lmRing, ring tailRing)
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
#define pGetShortExpVector(a)
returns the "Short Exponent Vector" – used to speed up divisibility tests (see polys-impl....
#define omGetStickyBinOfBin(B)
#define REDTAIL_CANONICALIZE
static poly pp_Mult_mm(poly p, poly m, const ring r)
int posInS(const kStrategy strat, const int length, const poly p, const int ecart_p)
void initSbaCrit(kStrategy strat)
const poly kBucketGetLm(kBucket_pt bucket)
long pLDeg1c_WFirstTotalDegree(poly p, int *l, const ring r)
void f5c(kStrategy strat, int &olddeg, int &minimcnt, int &hilbeledeg, int &hilbcount, int &srmax, int &lrmax, int &reduc, ideal Q, intvec *w, intvec *hilb)
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
int posInT_EcartpLength(const TSet set, const int length, LObject &p)
static FORCE_INLINE BOOLEAN n_Greater(number a, number b, const coeffs r)
ordered fields: TRUE iff 'a' is larger than 'b'; in Z/pZ: TRUE iff la > lb, where la and lb are the l...
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
int posInL0Ring(const LSet set, const int length, LObject *p, const kStrategy)
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
static void enlargeL(LSet *L, int *length, const int incr)
int posInT_FDegpLength(const TSet set, const int length, LObject &p)
BOOLEAN syzCriterion(poly sig, unsigned long not_sevSig, kStrategy strat)
void enterpairsShift(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
void p_Lcm(const poly a, const poly b, poly m, const ring r)
static intset initec(const int maxnr)
static BOOLEAN p_LmDivisibleBy(poly a, poly b, const ring r)
int posInSyz(const kStrategy strat, poly sig)
static FORCE_INLINE number n_QuotRem(number a, number b, number *q, const coeffs r)
int posInT17_cRing(const TSet set, const int length, LObject &p)
static void p_ExpVectorSub(poly p1, poly p2, const ring r)
long pLDegb(poly p, int *l, const ring r)
BOOLEAN p_LmCheckIsFromRing(poly p, ring r)
poly p_LPCopyAndShiftLM(poly p, int sh, const ring r)
void enterSMoraNF(LObject &p, int atS, kStrategy strat, int atR=-1)
#define p_LmEqual(p1, p2, r)
BOOLEAN hasPurePower(const poly p, int last, int *length, kStrategy strat)
int posInT19(const TSet set, const int length, LObject &p)
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent @Note: VarOffset encodes the position in p->exp
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin tailBin)
ring rCopy0(const ring r, BOOLEAN copy_qideal, BOOLEAN copy_ordering)
BOOLEAN p_LmCheckPolyRing(poly p, ring r)
VAR int(* test_PosInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
poly prMoveR(poly &p, ring src_r, ring dest_r)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static int rGetCurrSyzLimit(const ring r)
static unsigned pLength(poly a)
ring rAssure_c_dp(const ring r)
BOOLEAN newHEdge(kStrategy strat)
KINLINE poly redtailBba_Z(poly p, int pos, kStrategy strat)
void kMergeBintoLSba(kStrategy strat)
void chainCritOpt_1(poly, int, kStrategy strat)
static void p_SetExpV(poly p, int *ev, const ring r)
poly ksCreateShortSpoly(poly p1, poly p2, ring tailRing)
BOOLEAN syzCriterionInc(poly sig, unsigned long not_sevSig, kStrategy strat)
int kFindNextDivisibleByInS(const kStrategy strat, int start, int max_ind, LObject *L)
long p_WFirstTotalDegree(poly p, const ring r)
static poly p_Copy(poly p, const ring r)
returns a copy of p
int posInLSigRing(const LSet set, const int length, LObject *p, const kStrategy)
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)
denominator_list_s * denominator_list
int posInLSpecial(const LSet set, const int length, LObject *p, const kStrategy)
#define ALLOW_PROD_CRIT(A)
static void p_ExpVectorAdd(poly p1, poly p2, const ring r)
KINLINE TObject * s_2_t(int i)
#define TEST_OPT_INTSTRATEGY
poly redtailSba(LObject *L, int pos, kStrategy strat, BOOLEAN withT, BOOLEAN normalize)
BOOLEAN p_OneComp(poly p, const ring r)
return TRUE if all monoms have the same component
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 kBucket_Add_q(kBucket_pt bucket, poly q, int *l)
Add to Bucket a poly ,i.e. Bpoly == q+Bpoly.
static FORCE_INLINE number n_Ann(number a, const coeffs r)
if r is a ring with zero divisors, return an annihilator!=0 of b otherwise return NULL
ideal idrMoveR(ideal &id, ring src_r, ring dest_r)
void kBucketDestroy(kBucket_pt *bucket_pt)
int ksReducePolyGCD(LObject *PR, TObject *PW, poly spNoether, number *coef, kStrategy strat)
VAR denominator_list DENOMINATOR_LIST
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
int posInSMonFirst(const kStrategy strat, const int length, const poly p)
int redRing(LObject *h, kStrategy strat)
char posInLDependsOnLength
void enterSBba(LObject &p, int atS, kStrategy strat, int atR)
CanonicalForm cd(bCommonDen(FF))
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 enterTShift(LObject p, kStrategy strat, int atT)
int ksReducePolyZ(LObject *PR, TObject *PW, poly spNoether, number *coef, kStrategy strat)
#define TEST_OPT_NOT_SUGAR
long pLDeg1_WFirstTotalDegree(poly p, int *l, const ring r)
static int p_Cmp(poly p1, poly p2, ring r)
void kBucketInit(kBucket_pt bucket, poly lm, int length)
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
BOOLEAN kbTest(kBucket_pt bucket)
Tests.
void finalReduceByMon(kStrategy strat)
used for GB over ZZ: final reduction by constant elements background: any known constant element of i...
KINLINE int ksReducePolyTail(LObject *PR, TObject *PW, LObject *Red)
int posInT_pLength(const TSet set, const int length, LObject &p)
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
static BOOLEAN rField_is_Ring(const ring r)
int posInTrg0(const TSet set, const int length, LObject &p)
void completeReduce(kStrategy strat, BOOLEAN withT)
int posInL11Ringls(const LSet set, const int length, LObject *p, const kStrategy)
int(* posInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
KINLINE poly kNoetherTail()
static int * initS_2_R(const int maxnr)
void exitBuchMora(kStrategy strat)
int kFindSameLMInT_Z(const kStrategy strat, const LObject *L, const int start)
void enterSSba(LObject &p, int atS, kStrategy strat, int atR)
static BOOLEAN rIsRatGRing(const ring r)
#define ENTER_USE_MEMMOVE
int redFirst(LObject *h, kStrategy strat)
void initenterpairs(poly h, int k, int ecart, int isFromQ, kStrategy strat, int atR=-1)
int ksReducePolySig(LObject *PR, TObject *PW, long, poly spNoether, number *coef, kStrategy strat)
static int max(int a, int b)
pFDegProc pOrigFDeg_TailRing
int posInL17Ring(const LSet set, const int length, LObject *p, const kStrategy)
static void initenterstrongPairsSig(poly h, poly hSig, int k, int ecart, int isFromQ, kStrategy strat, int atR=-1)
static LSet initL(int nr=setmaxL)
static void p_LmDelete(poly p, const ring r)
void initBuchMora(ideal F, ideal Q, kStrategy strat)
#define pInit()
allocates a new monomial and initializes everything to 0
static poly redMora(poly h, int maxIndex, kStrategy strat)
KINLINE BOOLEAN k_GetLeadTerms(const poly p1, const poly p2, const ring p_r, poly &m1, poly &m2, const ring m_r)
poly pCopyL2p(LObject H, kStrategy strat)
void kMergeBintoL(kStrategy strat)
void enterSyz(LObject &p, kStrategy strat, int atT)
int posInL10(const LSet set, const int length, LObject *p, const kStrategy strat)
void cancelunit1(LObject *p, int *suc, int index, 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
static void enterOnePairLift(int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR=-1)
long pLDeg1c_Totaldegree(poly p, int *l, const ring r)
poly p_Cleardenom(poly p, const ring r)
static void p_ExpVectorAddSub(poly p1, poly p2, poly p3, const ring r)
int posInL11Ring(const LSet set, const int length, LObject *p, const kStrategy)
int p_mLPmaxPossibleShift(poly p, const ring r)
void initenterpairsSigRing(poly h, poly hSig, int hFrom, int k, int ecart, int isFromQ, kStrategy strat, int atR=-1)
pShallowCopyDeleteProc pGetShallowCopyDeleteProc(ring, ring)
long pLDeg1c(poly p, int *l, const ring r)
KINLINE int ksReducePolyTailLC_Z(LObject *PR, TObject *PW, LObject *Red)
static BOOLEAN p_LmExpVectorAddIsOk(const poly p1, const poly p2, const ring r)
int posInLF5CRing(const LSet set, int start, const int length, LObject *p, const kStrategy)
void replaceInLAndSAndT(LObject &p, int tj, kStrategy strat)
void initBuchMoraPos(kStrategy strat)
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
static BOOLEAN p_DivisibleBy(poly a, poly b, const ring r)
void clearSbatch(poly h, int k, int pos, kStrategy strat)
static BOOLEAN sugarDivisibleBy(int ecart1, int ecart2)
static void p_GetExpV(poly p, int *ev, const ring r)
static poly p_Init(const ring r, omBin bin)
void k_SplitFrame(poly &m1, poly &m2, int at, const ring r)
static int p_LmCmp(poly p, poly q, const ring r)
void chainCritPart(poly p, int ecart, kStrategy strat)
static void p_ExpVectorSum(poly pr, poly p1, poly p2, const ring r)
poly p_GetMaxExpP(poly p, const ring r)
return monomial r such that GetExp(r,i) is maximum of all monomials in p; coeff == 0,...
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
TObject * kFindDivisibleByInS_T(kStrategy strat, int end_pos, LObject *L, TObject *T, long ecart)
void enterSBbaShift(LObject &p, int atS, kStrategy strat, int atR)
static int rBlocks(ring r)
#define __pp_Mult_nn(p, n, r)
void messageStat(int hilbcount, kStrategy strat)
#define pLtCmpOrdSgnDiffM(p, q)
void initSyzRules(kStrategy strat)
void pLcmRat(poly a, poly b, poly m, int rat_shift)
int posInL15Ring(const LSet set, const int length, LObject *p, const kStrategy)
static FORCE_INLINE number n_InpNeg(number n, const coeffs r)
in-place negation of n MUST BE USED: n = n_InpNeg(n) (no copy is returned)
BOOLEAN pCompareChain(poly p, poly p1, poly p2, poly lcm, const ring R)
Returns TRUE if.
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
void sort(CFArray &A, int l=0)
quick sort A
void kDebugPrint(kStrategy strat)
#define pLmInit(p)
like pInit, except that expvector is initialized to that of p, p must be != NULL
int posInT13(const TSet set, const int length, LObject &p)
int posInL13(const LSet set, const int length, LObject *p, const kStrategy)
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
int kFindInT(poly p, TSet T, int tlength)
returns index of p in TSet, or -1 if not found
int posInL110Ring(const LSet set, const int length, LObject *p, const kStrategy)
gmp_float exp(const gmp_float &a)
int(* posInLSba)(const LSet set, const int length, LObject *L, const kStrategy strat)
void rDelete(ring r)
unconditionally deletes fields in r
static CFList split(const CanonicalForm &F, const int m, const Variable &x)
pLDegProc pOrigLDeg_TailRing
static void p_LmFree(poly p, ring)
BOOLEAN(* rewCrit2)(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
int redSig(LObject *h, kStrategy strat)
void initBba(kStrategy strat)
poly nc_CreateShortSpoly(poly p1, poly p2, const ring r)
void initSbaPos(kStrategy strat)
long p_Deg(poly a, const ring r)
int posInL11(const LSet set, const int length, LObject *p, const kStrategy)
poly redNFBound(poly h, int &max_ind, int nonorm, kStrategy strat, int bound)
int posInIdealMonFirst(const ideal F, const poly p, int start, int end)
int posInL17_cRing(const LSet set, const int length, LObject *p, const kStrategy)
static void p_Delete(poly *p, const ring r)
void initSL(ideal F, ideal Q, kStrategy strat)
static poly p_Add_q(poly p, poly q, const ring r)
static int min(int a, int b)
int posInL17(const LSet set, const int length, LObject *p, const kStrategy)
void postReduceByMonSig(LObject *h, kStrategy strat)
BOOLEAN sbaCheckGcdPair(LObject *h, kStrategy strat)
static FORCE_INLINE number n_EucNorm(number a, const coeffs r)
long maxdegreeWecart(poly p, int *l, ring r)
int posInT15Ring(const TSet set, const int length, LObject &p)
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize)
int kFindDivisibleByInT_Z(const kStrategy strat, const LObject *L, const int start)
static poly normalize(poly next_p, ideal add_generators, syStrategy syzstr, int *g_l, int *p_l, int crit_comp)
void initBuchMoraPosRing(kStrategy strat)
void rWrite(ring r, BOOLEAN details)
void chainCritNormal(poly p, int ecart, kStrategy strat)
static int si_max(const int a, const int b)
static CanonicalForm bound(const CFMatrix &M)
void mult(unsigned long *result, unsigned long *a, unsigned long *b, unsigned long p, int dega, int degb)
void enterSMora(LObject &p, int atS, kStrategy strat, int atR=-1)
pShallowCopyDeleteProc p_shallow_copy_delete
long pLDeg1_Deg(poly p, int *l, const ring r)
KINLINE poly redtailBbaBound(poly p, int pos, kStrategy strat, int bound, BOOLEAN normalize)
BOOLEAN p_CheckPolyRing(poly p, ring r)
#define rRing_has_Comp(r)
int posInL110(const LSet set, const int length, LObject *p, const kStrategy)
static poly redBba(poly h, int maxIndex, kStrategy strat)
int redRing_Z(LObject *h, kStrategy strat)
void initSLSba(ideal F, ideal Q, kStrategy strat)
int p_mFirstVblock(poly p, const ring ri)
void(* initEcartPair)(LObject *h, poly f, poly g, int ecartF, int ecartG)
void initSbaBuchMora(ideal F, ideal Q, kStrategy strat)
#define TEST_OPT_SUGARCRIT
void cleanTSbaRing(kStrategy strat)
void reorderS(int *suc, kStrategy strat)
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
VAR int(* test_PosInT)(const TSet T, const int tl, LObject &h)
void Werror(const char *fmt,...)
ideal idInit(int idsize, int rank)
initialise an ideal / module
static number p_SetCoeff(poly p, number n, ring r)
#define pp_Test(p, lmRing, tailRing)
int posInLF5C(const LSet, const int, LObject *, const kStrategy strat)
BOOLEAN idInsertPolyOnPos(ideal I, poly p, int pos)
insert p into I on position pos
int p_FirstVblock(poly p, const ring r)
static unsigned long * initsevS(const int maxnr)
ring rModifyRing(ring r, BOOLEAN omit_degree, BOOLEAN try_omit_comp, unsigned long exp_limit)
static FORCE_INLINE number n_Gcd(number a, number b, const coeffs r)
in Z: return the gcd of 'a' and 'b' in Z/nZ, Z/2^kZ: computed as in the case Z in Z/pZ,...
void WerrorS(const char *s)
static long p_GetExpDiff(poly p1, poly p2, int i, ring r)
static void enterOnePairRing(int i, poly p, int, int isFromQ, kStrategy strat, int atR)
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 omMergeStickyBinIntoBin(A, B)
unsigned long p_GetMaxExpL(poly p, const ring r, unsigned long l_max)
return the maximal exponent of p in form of the maximal long var
#define pLmDelete(p)
assume p != NULL, deletes Lm(p)->coef and Lm(p)
int posInT1(const TSet set, const int length, LObject &p)
ideal idSyzygies(ideal h1, tHomog h, intvec **w, BOOLEAN setSyzComp, BOOLEAN setRegularity, int *deg, GbVariant alg)
#define pLmShortDivisibleBy(a, sev_a, b, not_sev_b)
Divisibility tests based on Short Exponent vectors sev_a == pGetShortExpVector(a) not_sev_b == ~ pGet...
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
int lcm(unsigned long *l, unsigned long *a, unsigned long *b, unsigned long p, int dega, int degb)
static void enlargeT(TSet &T, TObject **&R, unsigned long *&sevT, int &length, const int incr)
int posInLrg0(const LSet set, const int length, LObject *p, const kStrategy)
long p_WTotaldegree(poly p, const ring r)
#define omRealloc0Size(addr, o_size, size)
void initSSpecialSba(ideal F, ideal Q, ideal P, kStrategy strat)
int posInT11Ring(const TSet set, const int length, LObject &p)
char completeReduce_retry
static void p_Setm(poly p, const ring r)
int posInL15(const LSet set, const int length, LObject *p, const kStrategy)
#define TEST_OPT_CANCELUNIT
void redtailBbaAlsoLC_Z(LObject *L, int end_pos, kStrategy strat)
#define pLmDivisibleBy(a, b)
like pDivisibleBy, except that it is assumed that a!=NULL, b!=NULL
void initenterstrongPairs(poly h, int k, int ecart, int isFromQ, kStrategy strat, int atR=-1)
static int doRed(LObject *h, TObject *with, BOOLEAN intoT, kStrategy strat, bool redMoraNF)
KINLINE int ksReducePolyTail_Z(LObject *PR, TObject *PW, LObject *Red)
void cancelunit(LObject *L, BOOLEAN inNF)
static int pDivComp(poly p, poly q)
#define TEST_OPT_REDTHROUGH
static long p_Totaldegree(poly p, const ring r)
int ksReducePolyTail(LObject *PR, TObject *PW, poly Current, poly spNoether)
void initSba(ideal F, 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...
#define REDNF_CANONICALIZE
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets.
int posInT17Ring(const TSet set, const int length, LObject &p)
void messageStatSBA(int hilbcount, kStrategy strat)
void enterL(LSet *set, int *length, int *LSetmax, LObject p, int at)
int redLazy(LObject *h, kStrategy strat)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
void deleteInL(LSet set, int *length, int j, kStrategy strat)
void(* initEcart)(TObject *L)
const CanonicalForm int s
static unsigned long p_GetMaxExp(const unsigned long l, const ring r)
#define pLmCmp(p, q)
returns 0|1|-1 if p=q|p>q|p<q w.r.t monomial ordering
void initSSpecial(ideal F, ideal Q, ideal P, kStrategy strat)
static BOOLEAN rIsSyzIndexRing(const ring r)
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)
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
int(* posInT)(const TSet T, const int tl, LObject &h)
int posInT15(const TSet set, const int length, LObject &p)
void initenterpairsSig(poly h, poly hSig, int hFrom, int k, int ecart, int isFromQ, kStrategy strat, int atR=-1)
ideal kStd(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
int comp(const CanonicalForm &A, const CanonicalForm &B)
compare polynomials
int posInT0(const TSet, const int length, LObject &)
static poly p_Mult_q(poly p, poly q, const ring r)
void deleteInS(int i, kStrategy strat)
static void kDeleteLcm(LObject *P)
int ksReducePolyLC(LObject *PR, TObject *PW, poly spNoether, number *coef, kStrategy strat)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
KINLINE void k_GetStrongLeadTerms(const poly p1, const poly p2, const ring leadRing, poly &m1, poly &m2, poly &lcm, const ring tailRing)
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
int redFirstShift(LObject *h, kStrategy strat)
void enterOnePairNormal(int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR=-1)
ideal kInterRed(ideal F, ideal Q)
ring sbaRing(kStrategy strat, const ring r, BOOLEAN, int)
static BOOLEAN rField_is_Z(const ring r)
static bool rIsSCA(const ring r)
BOOLEAN kStratChangeTailRing(kStrategy strat, LObject *L, TObject *T, unsigned long expbound)
EXTERN_VAR short * ecartWeights
unsigned long p_GetShortExpVector(const poly p, const ring r)
KINLINE TObject ** initR()
BOOLEAN(* syzCrit)(poly sig, unsigned long not_sevSig, kStrategy strat)
STATIC_VAR gmp_float * diff
BOOLEAN pHaveCommonMonoms(poly p, poly q)
static long p_FDeg(const poly p, const ring r)
poly kCreateZeroPoly(long exp[], long cabsind, poly *t_p, ring leadRing, ring tailRing)
void enterExtendedSpoly(poly h, kStrategy strat)
void initHilbCrit(ideal, ideal, intvec **hilb, kStrategy strat)
static long p_MaxComp(poly p, ring lmRing, ring tailRing)
void exitSba(kStrategy strat)
int redHoney(LObject *h, kStrategy strat)
static FORCE_INLINE number n_ExtGcd(number a, number b, number *s, number *t, const coeffs r)
beware that ExtGCD is only relevant for a few chosen coeff. domains and may perform something unexpec...
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.
static void nc_kBucketPolyRed_NF(kBucket_pt b, poly p, number *c)
int ksReducePolySigRing(LObject *PR, TObject *PW, long, poly spNoether, number *coef, kStrategy strat)
void superenterpairsSig(poly h, poly hSig, int hFrom, int k, int ecart, int pos, kStrategy strat, int atR)
void enterT(LObject &p, kStrategy strat, int atT)
static intvec * idSort(ideal id, BOOLEAN nolex=TRUE)
static BOOLEAN p_LmShortDivisibleBy(poly a, unsigned long sev_a, poly b, unsigned long not_sev_b, const ring r)
#define pCmp(p1, p2)
pCmp: args may be NULL returns: (p2==NULL ? 1 : (p1 == NULL ? -1 : p_LmCmp(p1, p2)))
int posInT11(const TSet set, const int length, LObject &p)
static void nc_kBucketPolyRed_Z(kBucket_pt b, poly p, number *c)
int redSigRing(LObject *h, kStrategy strat)
void nKillChar(coeffs r)
undo all initialisations
void(* enterOnePair)(int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR)
#define idPosConstant(I)
index of generator with leading term in ground ring (if any); otherwise -1
int redHomog(LObject *h, kStrategy strat)
poly pMoveCurrTail2poly(poly p, kStrategy strat)
BOOLEAN pIsMonomOf(poly p, poly m)
void initS(ideal F, ideal Q, kStrategy strat)
int nextZeroSimplexExponent(long exp[], long ind[], long cexp[], long cind[], long *cabsind, long step[], long bound, long N)
BOOLEAN rComplete(ring r, int force)
this needs to be called whenever a new ring is created: new fields in ring are created (like VarOffse...
#define omReallocSize(addr, o_size, size)
void p_Cleardenom_n(poly ph, const ring r, number &c)
BOOLEAN p_CheckIsFromRing(poly p, ring r)