 |
My Project
UNKNOWN_GIT_VERSION
|
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 | 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) |
|
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 | 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 | 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 | 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 | 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, int uptodeg, int lV) |
|
void | initBuchMoraShift (ideal F, ideal Q, kStrategy strat) |
|
void | enterOnePairSelfShifts (poly qq, poly p, int ecart, int isFromQ, kStrategy strat, int atR, int uptodeg, int lV) |
|
void | enterOnePairShift (poly q, poly p, int ecart, int isFromQ, kStrategy strat, int atR, int ecartq, int qisFromQ, int shiftcount, int ifromS, int uptodeg, int lV) |
|
void | enterpairsShift (poly h, int k, int ecart, int pos, kStrategy strat, int atR, int uptodeg, int lV) |
|
void | updateSShift (kStrategy strat, int uptodeg, int lV) |
|
void | initBbaShift (kStrategy strat) |
|
poly | redtailBbaShift (LObject *L, int pos, kStrategy strat, BOOLEAN withT, BOOLEAN normalize) |
|
int | redFirstShift (LObject *h, kStrategy strat) |
|
ideal | freegb (ideal I, int uptodeg, int lVblock) |
|
ideal | bbaShift (ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat, int uptodeg, int lV) |
|
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 | ) |
(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 7103 of file kutil.cc.
7110 for (
int ii=strat->
sl; ii>start; ii--)
7116 if (!(
pLmCmp(p1,p2) == 1))
◆ arriRewCriterionPre()
BOOLEAN arriRewCriterionPre |
( |
poly |
sig, |
|
|
unsigned long |
not_sevSig, |
|
|
poly |
lm, |
|
|
kStrategy |
strat, |
|
|
int |
start |
|
) |
| |
Definition at line 7128 of file kutil.cc.
7135 for (
int i=strat->
Bl;
i>-1;
i--) {
7155 for (
int ii=strat->
sl; ii>-1; ii--)
7161 if (!(
pLmCmp(p1,p2) == 1))
◆ arriRewDummy()
◆ bba()
Definition at line 1901 of file kstd2.cc.
1905 int hilbeledeg=1,hilbcount=0,minimcnt=0;
1928 withT = ! strat->
homog;
1933 #ifdef HAVE_TAIL_RING
1949 while (strat->
Ll >= 0)
1956 while (strat->
Ll >= 0)
1969 while ((strat->
Ll >= 0)
1970 && (strat->
L[strat->
Ll].p1!=
NULL) && (strat->
L[strat->
Ll].p2!=
NULL)
1975 if (strat->
Ll<0)
break;
1980 strat->
P = strat->
L[strat->
Ll];
2010 else if (strat->
P.p1 ==
NULL)
2012 if (strat->
minim > 0)
2018 if ((strat->
P.p ==
NULL) && (strat->
P.t_p ==
NULL))
2026 &olddeg,&reduc,strat, red_result);
2029 red_result = strat->red(&strat->P,strat);
2033 if (strat->overflow)
2039 if (red_result == 1)
2042 strat->P.GetP(strat->lmBin);
2046 if (strat->homog) strat->initEcart(&(strat->P));
2051 int pos=
posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
2056 strat->redTailChange=
FALSE;
2059 strat->P.pCleardenom();
2063 strat->P.pCleardenom();
2064 if (strat->redTailChange) { strat->P.t_p=
NULL; }
2072 strat->P.p =
redtailBba(&(strat->P),pos-1,strat, withT);
2073 if (strat->redTailChange) { strat->P.t_p=
NULL; }
2082 if ((strat->P.p1==
NULL) && (strat->minim>0))
2084 if (strat->minim==1)
2086 strat->M->m[minimcnt]=
p_Copy(strat->P.p,
currRing,strat->tailRing);
2091 strat->M->m[minimcnt]=strat->P.p2;
2095 pNext(strat->M->m[minimcnt])
2096 = strat->p_shallow_copy_delete(
pNext(strat->M->m[minimcnt]),
2107 superenterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
2109 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
2111 strat->enterS(strat->P, pos, strat, strat->tl);
2126 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
2129 if (strat->s_poly!=
NULL)
2134 if (strat->s_poly(strat))
2139 int pos=
posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
2142 superenterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
2144 enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat, strat->tl);
2145 strat->enterS(strat->P, pos, strat, strat->tl);
2149 else if (strat->P.p1 ==
NULL && strat->minim > 0)
2155 memset(&(strat->P), 0,
sizeof(strat->P));
2175 clearS(strat->S[
j],strat->sevS[
j],&
k,&
j,strat);
2186 if (strat->completeReduce_retry)
2191 #ifdef HAVE_TAIL_RING
2192 if(
currRing->bitmask>strat->tailRing->bitmask)
2194 strat->completeReduce_retry=
FALSE;
2197 for(
i=strat->sl;
i>=0;
i--) strat->S_2_R[
i]=-1;
2200 if (strat->completeReduce_retry)
2213 for(
int i = 0;
i<=strat->sl;
i++)
2217 strat->S[
i] =
pNeg(strat->S[
i]);
2225 strat->S[
i] =
pNeg(strat->Shdl->m[
i]);
2248 return (strat->Shdl);
◆ bbaShift()
Definition at line 3828 of file kstd2.cc.
3834 int hilbeledeg=1,hilbcount=0,minimcnt=0;
3864 #ifdef HAVE_TAIL_RING
3870 while (strat->
Ll >= 0)
3885 while ((strat->
Ll >= 0)
3886 && (strat->
L[strat->
Ll].p1!=
NULL) && (strat->
L[strat->
Ll].p2!=
NULL)
3891 if (strat->
Ll<0)
break;
3895 strat->
P = strat->
L[strat->
Ll];
3918 else if (strat->
P.p1 ==
NULL)
3920 if (strat->
minim > 0)
3930 if ( ! strat->
homog)
3932 strat->
P.GetP(strat->
lmBin);
3939 strat->
P.t_p =
NULL;
3940 strat->
P.GetP(strat->
lmBin);
3955 strat->
P.t_p =
NULL;
3960 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
3968 &olddeg,&reduc,strat, red_result);
3971 red_result = strat->red(&strat->P,strat);
3975 if (red_result == 1)
3981 strat->P.GetP(strat->lmBin);
3983 int pos=
posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
3988 strat->P.pCleardenom();
3991 strat->P.p =
redtailBba(&(strat->P),pos-1,strat, withT);
3992 strat->P.pCleardenom();
3999 strat->P.p =
redtailBba(&(strat->P),pos-1,strat, withT);
4010 if ((strat->P.p1==
NULL) && (strat->minim>0))
4012 if (strat->minim==1)
4014 strat->M->m[minimcnt]=
p_Copy(strat->P.p,
currRing,strat->tailRing);
4019 strat->M->m[minimcnt]=strat->P.p2;
4023 pNext(strat->M->m[minimcnt])
4024 = strat->p_shallow_copy_delete(
pNext(strat->M->m[minimcnt]),
4032 if ( ! strat->homog)
4034 strat->P.GetP(strat->lmBin);
4036 if (strat->P.p!=
NULL)
4043 strat->P.t_p =
NULL;
4044 strat->P.GetP(strat->lmBin);
4046 strat->initEcart(&(strat->P));
4056 strat->P.t_p =
NULL;
4057 goto red_shrink2zero;
4067 strat->P.t_p =
NULL;
4069 strat->initEcart(&(strat->P));
4079 strat->P.t_p =
NULL;
4080 goto red_shrink2zero;
4094 int atR=strat->tl+1;
4097 enterpairsShift(strat->P.p,strat->sl,strat->P.ecart,pos,strat, atR,uptodeg,lV);
4100 strat->enterS(strat->P, pos, strat, atR);
4102 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
4109 if (strat->P.p1 ==
NULL && strat->minim > 0)
4115 memset(&(strat->P), 0,
sizeof(strat->P));
4138 Ln.SetShortExpVector();
4140 if (
j<0) {
k++;
j=-1;}
4143 if (
pLmCmp(strat->S[
k],strat->T[
j].p) == 0)
4146 if (
j<0) {
k++;
j=-1;}
4162 if (strat->completeReduce_retry)
4167 #ifdef HAVE_TAIL_RING
4168 if(
currRing->bitmask>strat->tailRing->bitmask)
4170 strat->completeReduce_retry=
FALSE;
4173 for(
i=strat->sl;
i>=0;
i--) strat->S_2_R[
i]=-1;
4176 if (strat->completeReduce_retry)
◆ cancelunit()
Definition at line 331 of file kutil.cc.
339 ring r = L->tailRing;
340 poly
p = L->GetLmTailRing();
419 number eins=
nInit(1);
◆ chainCritNormal()
void chainCritNormal |
( |
poly |
p, |
|
|
int |
ecart, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 3139 of file kutil.cc.
3152 for (
j=0;
j<=strat->
sl;
j++)
3156 for (
i=strat->
Bl;
i>=0;
i--)
3178 for (
j=strat->
Ll;
j>=0;
j--)
3184 if (strat->
L[
j].p == strat->
tail)
3230 for (
j=strat->
Ll;
j>=0;
j--)
3250 for(
i=
j-1;
i>=0;
i--)
3269 for (
j=strat->
Ll;
j>=0;
j--)
3300 if (strat->
L[0].p2 == strat->
tail) strat->
L[0].p2 =
p;
3303 if (strat->
L[
j].p2 ==
p)
3309 if ((strat->
L[
i].p2 ==
p) &&
pLmEqual(strat->
L[
j].lcm,strat->
L[
i].lcm))
3323 strat->
L[
i].p2 = strat->
tail;
3340 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 3368 of file kutil.cc.
3379 if (strat->
L[0].p2 == strat->
tail) strat->
L[0].p2 =
p;
3382 if (strat->
L[
j].p2 ==
p)
3388 if ((strat->
L[
i].p2 ==
p) &&
pLmEqual(strat->
L[
j].lcm,strat->
L[
i].lcm))
3402 strat->
L[
i].p2 = strat->
tail;
3419 else if (strat->
L[
j].p2 == strat->
tail)
◆ cleanT()
Definition at line 536 of file kutil.cc.
547 for (
j=0;
j<=strat->
tl;
j++)
551 if (strat->
T[
j].max_exp !=
NULL)
561 if (strat->
T[
j].t_p !=
NULL)
572 if (
p == strat->
S[
i])
574 if (strat->
T[
j].t_p !=
NULL)
576 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 10408 of file kutil.cc.
10438 for (
i=strat->
sl;
i>=low;
i--)
10440 int end_pos=strat->
sl;
10442 if (strat->
ak==0) end_pos=
i-1;
10444 if ((T_j !=
NULL)&&(T_j->p==strat->
S[
i]))
10462 Print(
"to (tailR) S[%d]:",
i);
10474 T_j->max_exp =
NULL;
10477 T_j->pCleardenom();
10517 Print(
"to (-tailR) S[%d]:",
i);
◆ createG0()
Definition at line 4404 of file kutil.cc.
4427 PrintS(
"-------------\npoly :");
4430 Print(
"cexp : (%d, %d)\n", cexp[1], cexp[2]);
4431 Print(
"cind : (%d, %d)\n", cind[1], cind[2]);
4433 Print(
"cind : %d\n", cabsind);
4451 Print(
"%d, (%d, %d), ind = (%d, %d)\n", cabsind, cexp[1], cexp[2], cind[1], cind[2]);
4459 G0->m[
IDELEMS(G0) - 1] = zeroPoly;
◆ deleteHC() [1/2]
Definition at line 242 of file kutil.cc.
249 poly
p = L->GetLmTailRing();
252 if (L->bucket !=
NULL)
290 L->ecart = L->pLDeg() - L->GetpFDeg();
299 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 1175 of file kutil.cc.
1182 if (set[
j].sig!=
NULL)
1216 #ifdef ENTER_USE_MEMMOVE
1220 for (
i=
j;
i < (*length);
i++)
◆ deleteInS()
Definition at line 1068 of file kutil.cc.
1071 #ifdef ENTER_USE_MEMMOVE
1072 memmove(&(strat->
S[
i]), &(strat->
S[
i+1]), (strat->
sl -
i)*
sizeof(poly));
1074 memmove(&(strat->
sevS[
i]),&(strat->
sevS[
i+1]),(strat->
sl -
i)*
sizeof(
unsigned long));
1075 memmove(&(strat->
S_2_R[
i]),&(strat->
S_2_R[
i+1]),(strat->
sl -
i)*
sizeof(
int));
1078 for (
j=
i;
j<strat->
sl;
j++)
1080 strat->
S[
j] = strat->
S[
j+1];
1088 #ifdef ENTER_USE_MEMMOVE
1089 memmove(&(strat->
lenS[
i]),&(strat->
lenS[
i+1]),(strat->
sl -
i)*
sizeof(
int));
1096 #ifdef ENTER_USE_MEMMOVE
1104 #ifdef ENTER_USE_MEMMOVE
1105 memmove(&(strat->
fromQ[
i]),&(strat->
fromQ[
i+1]),(strat->
sl -
i)*
sizeof(
int));
1107 for (
j=
i;
j<strat->
sl;
j++)
◆ deleteInSSba()
Definition at line 1120 of file kutil.cc.
1123 #ifdef ENTER_USE_MEMMOVE
1124 memmove(&(strat->
S[
i]), &(strat->
S[
i+1]), (strat->
sl -
i)*
sizeof(poly));
1125 memmove(&(strat->
sig[
i]), &(strat->
sig[
i+1]), (strat->
sl -
i)*
sizeof(poly));
1127 memmove(&(strat->
sevS[
i]),&(strat->
sevS[
i+1]),(strat->
sl -
i)*
sizeof(
unsigned long));
1128 memmove(&(strat->
sevSig[
i]),&(strat->
sevSig[
i+1]),(strat->
sl -
i)*
sizeof(
unsigned long));
1129 memmove(&(strat->
S_2_R[
i]),&(strat->
S_2_R[
i+1]),(strat->
sl -
i)*
sizeof(
int));
1132 for (
j=
i;
j<strat->
sl;
j++)
1134 strat->
S[
j] = strat->
S[
j+1];
1144 #ifdef ENTER_USE_MEMMOVE
1145 memmove(&(strat->
lenS[
i]),&(strat->
lenS[
i+1]),(strat->
sl -
i)*
sizeof(
int));
1152 #ifdef ENTER_USE_MEMMOVE
1160 #ifdef ENTER_USE_MEMMOVE
1161 memmove(&(strat->
fromQ[
i]),&(strat->
fromQ[
i+1]),(strat->
sl -
i)*
sizeof(
int));
1163 for (
j=
i;
j<strat->
sl;
j++)
◆ enterExtendedSpoly()
void enterExtendedSpoly |
( |
poly |
h, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 4519 of file kutil.cc.
4554 PrintS(
"--- create zero spoly: ");
4583 posx = strat->
posInL(strat->
L,strat->
Ll,&Lp,strat);
◆ enterExtendedSpolySig()
void enterExtendedSpolySig |
( |
poly |
h, |
|
|
poly |
hSig, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 4602 of file kutil.cc.
4636 PrintS(
"--- create zero spoly: ");
4664 int red_result =
redRing(&Lp,strat);
4674 strat->
enterS(strat->
P,strat->
sl+1,strat, strat->
tl+1);
4676 strat->
enterS(Lp,0,strat,strat->
tl);
◆ enterL()
void enterL |
( |
LSet * |
set, |
|
|
int * |
length, |
|
|
int * |
LSetmax, |
|
|
LObject |
p, |
|
|
int |
at |
|
) |
| |
Definition at line 1232 of file kutil.cc.
1243 memmove(&((*set)[at+1]), &((*set)[at]), ((*
length)-at+1)*
sizeof(
LObject));
1245 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 1876 of file kutil.cc.
1886 Lp.ecart=0; Lp.length=0;
1891 #ifndef HAVE_RATGRING
1893 #elif defined(HAVE_RATGRING)
1904 if((!((strat->
ecartS[
i]>0)&&(ecart>0)))
2004 for(
j = strat->
Bl;
j>=0;
j--)
2103 Lp.p1 = strat->
S[
i];
2117 Lp.i_r1 = strat->
S_2_R[
i];
2131 && (Lp.p->coef!=
NULL))
2135 l = strat->
posInL(strat->
B,strat->
Bl,&Lp,strat);
◆ enterOnePairSelfShifts()
void enterOnePairSelfShifts |
( |
poly |
qq, |
|
|
poly |
p, |
|
|
int |
ecart, |
|
|
int |
isFromQ, |
|
|
kStrategy |
strat, |
|
|
int |
atR, |
|
|
int |
uptodeg, |
|
|
int |
lV |
|
) |
| |
◆ enterOnePairShift()
void enterOnePairShift |
( |
poly |
q, |
|
|
poly |
p, |
|
|
int |
ecart, |
|
|
int |
isFromQ, |
|
|
kStrategy |
strat, |
|
|
int |
atR, |
|
|
int |
ecartq, |
|
|
int |
qisFromQ, |
|
|
int |
shiftcount, |
|
|
int |
ifromS, |
|
|
int |
uptodeg, |
|
|
int |
lV |
|
) |
| |
Definition at line 12116 of file kutil.cc.
12149 int qfromQ = qisFromQ;
12158 Lp.ecart=0; Lp.length=0;
12164 if (!
isInV(Lp.lcm, lV))
12169 PrintS(
"V crit applied to q = ");
12184 if((!((ecartq>0)&&(ecart>0)))
12206 Lp.ecart =
si_max(ecart,ecartq);
12207 if (strat->
fromT && (ecartq>ecart))
12229 if ((strat->
fromQ==
NULL) || (isFromQ==0) || (qfromQ==0))
12272 if (strat->
fromT && (ecartq>ecart))
12284 for(
j = strat->
Bl;
j>=0;
j--)
12290 if ((strat->
fromQ==
NULL) || (isFromQ==0) || (qfromQ==0))
12314 if ((strat->
fromQ!=
NULL) && (isFromQ!=0) && (qfromQ!=0))
12386 if ( (atR >= 0) && (shiftcount==0) && (ifromS >=0) )
◆ 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, |
|
|
int |
uptodeg, |
|
|
int |
lV |
|
) |
| |
◆ enterpairsSig()
void enterpairsSig |
( |
poly |
h, |
|
|
poly |
hSig, |
|
|
int |
from, |
|
|
int |
k, |
|
|
int |
ec, |
|
|
int |
pos, |
|
|
kStrategy |
strat, |
|
|
int |
atR = -1 |
|
) |
| |
◆ enterSBba()
Definition at line 9044 of file kutil.cc.
9059 *
sizeof(
unsigned long));
9086 strat->
Shdl->m=strat->
S;
9088 if (atS <= strat->sl)
9090 #ifdef ENTER_USE_MEMMOVE
9091 memmove(&(strat->
S[atS+1]), &(strat->
S[atS]),
9092 (strat->
sl - atS + 1)*
sizeof(poly));
9093 memmove(&(strat->
ecartS[atS+1]), &(strat->
ecartS[atS]),
9094 (strat->
sl - atS + 1)*
sizeof(
int));
9095 memmove(&(strat->
sevS[atS+1]), &(strat->
sevS[atS]),
9096 (strat->
sl - atS + 1)*
sizeof(
unsigned long));
9097 memmove(&(strat->
S_2_R[atS+1]), &(strat->
S_2_R[atS]),
9098 (strat->
sl - atS + 1)*
sizeof(
int));
9100 memmove(&(strat->
lenS[atS+1]), &(strat->
lenS[atS]),
9101 (strat->
sl - atS + 1)*
sizeof(
int));
9103 memmove(&(strat->
lenSw[atS+1]), &(strat->
lenSw[atS]),
9106 for (
i=strat->
sl+1;
i>=atS+1;
i--)
9108 strat->
S[
i] = strat->
S[
i-1];
9114 for (
i=strat->
sl+1;
i>=atS+1;
i--)
9117 for (
i=strat->
sl+1;
i>=atS+1;
i--)
9123 #ifdef ENTER_USE_MEMMOVE
9124 memmove(&(strat->
fromQ[atS+1]), &(strat->
fromQ[atS]),
9125 (strat->
sl - atS + 1)*
sizeof(
int));
9127 for (
i=strat->
sl+1;
i>=atS+1;
i--)
9132 strat->
fromQ[atS]=0;
◆ entersets()
◆ enterSSba()
Definition at line 9147 of file kutil.cc.
9162 *
sizeof(
unsigned long));
9166 *
sizeof(
unsigned long));
9194 strat->
Shdl->m=strat->
S;
9201 if (atS <= strat->sl)
9203 #ifdef ENTER_USE_MEMMOVE
9204 memmove(&(strat->
S[atS+1]), &(strat->
S[atS]),
9205 (strat->
sl - atS + 1)*
sizeof(poly));
9206 memmove(&(strat->
sig[atS+1]), &(strat->
sig[atS]),
9207 (strat->
sl - atS + 1)*
sizeof(poly));
9208 memmove(&(strat->
sevSig[atS+1]), &(strat->
sevSig[atS]),
9209 (strat->
sl - atS + 1)*
sizeof(
unsigned long));
9210 memmove(&(strat->
ecartS[atS+1]), &(strat->
ecartS[atS]),
9211 (strat->
sl - atS + 1)*
sizeof(
int));
9212 memmove(&(strat->
sevS[atS+1]), &(strat->
sevS[atS]),
9213 (strat->
sl - atS + 1)*
sizeof(
unsigned long));
9214 memmove(&(strat->
S_2_R[atS+1]), &(strat->
S_2_R[atS]),
9215 (strat->
sl - atS + 1)*
sizeof(
int));
9217 memmove(&(strat->
lenS[atS+1]), &(strat->
lenS[atS]),
9218 (strat->
sl - atS + 1)*
sizeof(
int));
9220 memmove(&(strat->
lenSw[atS+1]), &(strat->
lenSw[atS]),
9223 for (
i=strat->
sl+1;
i>=atS+1;
i--)
9225 strat->
S[
i] = strat->
S[
i-1];
9233 for (
i=strat->
sl+1;
i>=atS+1;
i--)
9236 for (
i=strat->
sl+1;
i>=atS+1;
i--)
9242 #ifdef ENTER_USE_MEMMOVE
9243 memmove(&(strat->
fromQ[atS+1]), &(strat->
fromQ[atS]),
9244 (strat->
sl - atS + 1)*
sizeof(
int));
9246 for (
i=strat->
sl+1;
i>=atS+1;
i--)
9251 strat->
fromQ[atS]=0;
9255 strat->
S[atS] =
p.p;
9256 strat->
sig[atS] =
p.sig;
9262 strat->
sevS[atS] =
p.sev;
9272 strat->
sevSig[atS] =
p.sevSig;
9275 strat->
S_2_R[atS] = atR;
9279 Print(
"--- LIST S: %d ---\n",strat->
sl);
9280 for(
k=0;
k<=strat->
sl;
k++)
◆ enterSyz()
Definition at line 9468 of file kutil.cc.
9482 (strat->
syzmax)*
sizeof(
unsigned long),
9484 *
sizeof(
unsigned long));
9487 if (atT < strat->syzl)
9489 #ifdef ENTER_USE_MEMMOVE
9490 memmove(&(strat->
syz[atT+1]), &(strat->
syz[atT]),
9491 (strat->
syzl-atT+1)*
sizeof(poly));
9492 memmove(&(strat->
sevSyz[atT+1]), &(strat->
sevSyz[atT]),
9493 (strat->
syzl-atT+1)*
sizeof(
unsigned long));
9495 for (
i=strat->
syzl;
i>=atT+1;
i--)
9497 #ifndef ENTER_USE_MEMMOVE
9510 strat->
syz[atT] =
p.sig;
9511 strat->
sevSyz[atT] =
p.sevSig;
9514 Print(
"element in strat->syz: %d--%d ",atT+1,strat->
syzmax);
9524 strat->
L[cc].sig, ~strat->
L[cc].sevSig,
currRing)
9538 PrintS(
"--- Syzygies ---\n");
9541 PrintS(
"--------------------------------\n");
◆ enterT()
Definition at line 9285 of file kutil.cc.
9305 for(
i=strat->
tl;
i>=0;
i--)
9307 if (
p.p==strat->
T[
i].p)
9309 printf(
"already in T at pos %d of %d, atT=%d\n",
i,strat->
tl,atT);
9315 #ifdef HAVE_TAIL_RING
9318 p.t_p=
p.GetLmTailRing();
9324 if (strat->
tl == strat->
tmax-1)
9326 if (atT <= strat->tl)
9328 #ifdef ENTER_USE_MEMMOVE
9329 memmove(&(strat->
T[atT+1]), &(strat->
T[atT]),
9331 memmove(&(strat->
sevT[atT+1]), &(strat->
sevT[atT]),
9332 (strat->
tl-atT+1)*
sizeof(
unsigned long));
9334 for (
i=strat->
tl+1;
i>=atT+1;
i--)
9336 #ifndef ENTER_USE_MEMMOVE
9337 strat->
T[
i] = strat->
T[
i-1];
9340 strat->
R[strat->
T[
i].i_r] = &(strat->
T[
i]);
9358 strat->
T[atT].max_exp =
NULL;
◆ enterT_strong()
Definition at line 9366 of file kutil.cc.
9387 for(
i=strat->
tl;
i>=0;
i--)
9389 if (
p.p==strat->
T[
i].p)
9391 printf(
"already in T at pos %d of %d, atT=%d\n",
i,strat->
tl,atT);
9397 #ifdef HAVE_TAIL_RING
9400 p.t_p=
p.GetLmTailRing();
9406 if (strat->
tl == strat->
tmax-1)
9408 if (atT <= strat->tl)
9410 #ifdef ENTER_USE_MEMMOVE
9411 memmove(&(strat->
T[atT+1]), &(strat->
T[atT]),
9413 memmove(&(strat->
sevT[atT+1]), &(strat->
sevT[atT]),
9414 (strat->
tl-atT+1)*
sizeof(
unsigned long));
9416 for (
i=strat->
tl+1;
i>=atT+1;
i--)
9418 #ifndef ENTER_USE_MEMMOVE
9419 strat->
T[
i] = strat->
T[
i-1];
9422 strat->
R[strat->
T[
i].i_r] = &(strat->
T[
i]);
9440 strat->
T[atT].max_exp =
NULL;
9443 strat->
R[strat->
tl] = &(strat->
T[atT]);
9444 strat->
T[atT].i_r = strat->
tl;
9451 for(
i=strat->
tl;
i>=0;
i--)
◆ enterTShift()
◆ exitBuchMora()
◆ 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 3513 of file kstd2.cc.
3519 int Ll_old, red_result = 1;
3525 reduc = olddeg = lrmax = 0;
3530 while (strat->
tl >= 0)
3532 if(!strat->
T[strat->
tl].is_redundant)
3535 h.p = strat->
T[strat->
tl].p;
3536 h.tailRing = strat->
T[strat->
tl].tailRing;
3537 h.t_p = strat->
T[strat->
tl].t_p;
3576 while (strat->
Ll>Ll_old)
3578 strat->
P = strat->
L[strat->
Ll];
3582 PrintS(
"NEXT PAIR TO HANDLE IN INTERRED ALGORITHM\n");
3583 PrintS(
"-------------------------------------------------\n");
3587 printf(
"%d\n",strat->
tl);
3588 PrintS(
"-------------------------------------------------\n");
3621 else if (strat->
P.p1 ==
NULL)
3623 if (strat->
minim > 0)
3630 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
3638 &olddeg,&reduc,strat, red_result);
3641 PrintS(
"Poly before red: ");
3645 red_result = strat->red2(&strat->P,strat);
3649 if (strat->overflow)
3655 if (red_result == 1)
3658 strat->P.GetP(strat->lmBin);
3662 if (strat->homog) strat->initEcart(&(strat->P));
3669 pos =
posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
3673 pos =
posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
3682 strat->P.pCleardenom();
3685 strat->P.p =
redtailBba(&(strat->P),pos-1,strat, withT);
3686 strat->P.pCleardenom();
3693 strat->P.p =
redtailBba(&(strat->P),pos-1,strat, withT);
3701 if ((strat->P.p1==
NULL) && (strat->minim>0))
3703 if (strat->minim==1)
3705 strat->M->m[minimcnt]=
p_Copy(strat->P.p,
currRing,strat->tailRing);
3710 strat->M->m[minimcnt]=strat->P.p2;
3714 pNext(strat->M->m[minimcnt])
3715 = strat->p_shallow_copy_delete(
pNext(strat->M->m[minimcnt]),
3727 strat->enterS(strat->P, pos, strat, strat->tl);
3730 PrintS(
"ELEMENT ADDED TO GCURR DURING INTERRED: ");
3732 pWrite(strat->sig[strat->sl]);
3734 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
3738 if (strat->sl>srmax) srmax = strat->sl;
3747 if (strat->P.p1 ==
NULL && strat->minim > 0)
3754 memset(&(strat->P), 0,
sizeof(strat->P));
3758 while (cc<strat->tl+1)
3760 strat->T[cc].sig =
pOne();
3763 strat->sig[cc] = strat->T[cc].sig;
3764 strat->sevSig[cc] = strat->T[cc].sevSig;
3765 strat->T[cc].is_sigsafe =
TRUE;
3768 strat->max_lower_index = strat->tl;
3772 strat->currIdx = cc+1;
3773 for (
int cd=strat->Ll;
cd>=0;
cd--)
3778 for (cc=strat->sl+1; cc<
IDELEMS(strat->Shdl); ++cc)
3779 strat->Shdl->m[cc] =
NULL;
3781 printf(
"\nAfter f5c sorting\n");
3782 for(
int i=0;
i<=strat->sl;
i++)
3788 PrintS(
"------------------- STRAT S ---------------------\n");
3790 while (cc<strat->tl+1)
3794 printf(
"- - - - - -\n");
3797 PrintS(
"-------------------------------------------------\n");
3798 PrintS(
"------------------- STRAT T ---------------------\n");
3800 while (cc<strat->tl+1)
3803 pWrite(strat->T[cc].sig);
3804 printf(
"- - - - - -\n");
3807 PrintS(
"-------------------------------------------------\n");
3808 PrintS(
"------------------- STRAT L ---------------------\n");
3810 while (cc<strat->Ll+1)
3815 pWrite(strat->L[cc].sig);
3816 printf(
"- - - - - -\n");
3819 PrintS(
"-------------------------------------------------\n");
3820 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 7044 of file kutil.cc.
7052 PrintS(
"rewritten criterion checks: ");
7055 for(
int k = strat->
sl;
k>=start;
k--)
7059 PrintS(
"checking with: ");
7075 PrintS(
"ALL ELEMENTS OF S\n----------------------------------------\n");
7076 for(
int kk = 0; kk<strat->
sl+1; kk++)
7080 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 10979 of file kutil.cc.
◆ findMinLMPair()
BOOLEAN findMinLMPair |
( |
poly |
sig, |
|
|
unsigned long |
not_sevSig, |
|
|
kStrategy |
strat, |
|
|
int |
start |
|
) |
| |
◆ freegb()
ideal freegb |
( |
ideal |
I, |
|
|
int |
uptodeg, |
|
|
int |
lVblock |
|
) |
| |
Definition at line 4198 of file kstd2.cc.
4212 WerrorS(
"The input ideal contains incorrectly encoded elements! ");
◆ HEckeTest()
◆ homogTest()
◆ ind2()
Definition at line 4059 of file kutil.cc.
4063 if (arg <= 0)
return 0;
◆ ind_fact_2()
long ind_fact_2 |
( |
long |
arg | ) |
|
Definition at line 4071 of file kutil.cc.
4075 if (arg <= 0)
return 0;
4076 if (arg%2 == 1) { arg--; }
◆ initBba()
◆ initBbaShift()
◆ initBuchMora()
void initBuchMora |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
kStrategy |
strat |
|
) |
| |
◆ initBuchMoraCrit()
Definition at line 9564 of file kutil.cc.
9583 #ifdef HAVE_RATGRING
◆ initBuchMoraPos()
◆ initBuchMoraPosRing()
◆ initBuchMoraShift()
void initBuchMoraShift |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
kStrategy |
strat |
|
) |
| |
◆ initEcartBBA()
◆ initEcartNormal()
void initEcartNormal |
( |
TObject * |
h | ) |
|
Definition at line 1256 of file kutil.cc.
1259 h->FDeg =
h->pFDeg();
1260 h->ecart =
h->pLDeg() -
h->FDeg;
◆ initEcartPairBba()
void initEcartPairBba |
( |
LObject * |
Lp, |
|
|
poly |
f, |
|
|
poly |
g, |
|
|
int |
ecartF, |
|
|
int |
ecartG |
|
) |
| |
Definition at line 1271 of file kutil.cc.
1274 Lp->FDeg = Lp->pFDeg();
◆ initEcartPairMora()
void initEcartPairMora |
( |
LObject * |
Lp, |
|
|
poly |
f, |
|
|
poly |
g, |
|
|
int |
ecartF, |
|
|
int |
ecartG |
|
) |
| |
Definition at line 1278 of file kutil.cc.
1281 Lp->FDeg = Lp->pFDeg();
1282 (*Lp).ecart =
si_max(ecartF,ecartG);
1283 (*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 7862 of file kutil.cc.
7875 strat->
S=strat->
Shdl->m;
7880 memset(strat->
fromQ,0,
i*
sizeof(
int));
7909 strat->
enterS(
h,pos,strat,-1);
7910 strat->
fromQ[pos]=1;
7943 strat->
enterS(
h,pos,strat,-1);
◆ initSba()
◆ initSbaBuchMora()
void initSbaBuchMora |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
kStrategy |
strat |
|
) |
| |
◆ initSbaCrit()
Definition at line 9628 of file kutil.cc.
9660 #ifdef HAVE_RATGRING
◆ initSbaPos()
◆ initsevT()
KINLINE unsigned long* initsevT |
( |
| ) |
|
◆ initSL()
void initSL |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 7956 of file kutil.cc.
7969 strat->
S=strat->
Shdl->m;
7974 memset(strat->
fromQ,0,
i*
sizeof(
int));
8003 strat->
enterS(
h,pos,strat,-1);
8004 strat->
fromQ[pos]=1;
8036 pos = strat->
posInL(strat->
L,strat->
Ll,&
h,strat);
◆ initSLSba()
void initSLSba |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 8053 of file kutil.cc.
8066 strat->
S = strat->
Shdl->m;
8079 memset(strat->
fromQ,0,
i*
sizeof(
int));
8108 strat->
enterS(
h,pos,strat,-1);
8109 strat->
fromQ[pos]=1;
◆ initSyzRules()
Definition at line 8203 of file kutil.cc.
8219 for(
i=1;
i<=strat->
sl;
i++)
8231 strat->
syz = (poly *)
omAlloc(ps*
sizeof(poly));
8235 #if defined(DEBUGF5) || defined(DEBUGF51)
8236 PrintS(
"------------- GENERATING SYZ RULES NEW ---------------\n");
8243 while (i <= strat->sl)
8273 for (
k = 0;
k<
i;
k++)
8317 for (
k = 0;
k<strat->
sl+1;
k++)
8338 PrintS(
"Principal syzygies:\n");
8341 Print(
"ps %d\n",ps);
8342 PrintS(
"--------------------------------\n");
◆ initT()
◆ k_GetLeadTerms()
Definition at line 925 of file kInline.h.
939 m1 =
p_Init(m_r,m_r->PolyBin);
940 m2 =
p_Init(m_r,m_r->PolyBin);
942 for (
i = p_r->N;
i;
i--)
947 if (
x > (
long) m_r->bitmask)
goto false_return;
953 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 968 of file kInline.h.
985 m1 =
p_Init(tailRing,tailRing->PolyBin);
986 m2 =
p_Init(tailRing,tailRing->PolyBin);
987 lcm =
p_Init(leadRing,leadRing->PolyBin);
989 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 10593 of file kutil.cc.
10606 assume(L->i_r1 >= -1 && L->i_r1 <= strat->
tl);
10607 assume(L->i_r2 >= -1 && L->i_r2 <= strat->
tl);
10613 if ((L->i_r1 == -1) || (L->i_r2 == -1) )
10618 if (L->i_r1>=0) p1_max = (strat->
R[L->i_r1])->max_exp;
10620 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 10632 of file kutil.cc.
10646 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 4275 of file kutil.cc.
4279 poly zeroPoly =
NULL;
4287 for (
int i = 1;
i <= leadRing->N;
i++)
4293 if (cabsind < leadRing->ch)
4295 zeroPoly =
p_ISet(
twoPow(leadRing->ch - cabsind), tailRing);
4299 zeroPoly =
p_ISet(1, tailRing);
4301 for (
int i = 1;
i <= leadRing->N;
i++)
4303 for (
long j = 1;
j <=
exp[
i];
j++)
4321 for (
int i = 1;
i <= leadRing->N;
i++)
4327 zeroPoly =
pNext(zeroPoly);
◆ kDebugPrint()
Output some debug info about a given strategy.
Definition at line 11610 of file kutil.cc.
11626 else Print(
"%p\n",(
void*)strat->
red);
11645 #ifdef HAVE_MORE_POS_IN_T
11683 PrintS(
"initEcartPair: ");
11687 Print(
"homog=%d, LazyDegree=%d, LazyPass=%d, ak=%d,\n",
11689 Print(
"honey=%d, sugarCrit=%d, Gebauer=%d, noTailReduction=%d, use_buckets=%d\n",
11695 Print(
"posInLDependsOnLength=%d\n",
11727 PrintS(
"currRing->pFDeg: ");
11742 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 196 of file kstd2.cc.
198 unsigned long not_sev = ~L->sev;
199 poly
p = L->GetLmCurrRing();
213 ende=
posInS(strat,*max_ind,
p,0)+1;
214 if (ende>(*max_ind)) ende=(*max_ind);
223 if (
j > ende)
return -1;
224 #if defined(PDEBUG) || defined(PDIV_DEBUG)
232 if ( !(strat->
sevS[
j] & not_sev) &&
246 if (
j > ende)
return -1;
247 #if defined(PDEBUG) || defined(PDIV_DEBUG)
254 if ( !(strat->
sevS[
j] & not_sev) &&
◆ kFindDivisibleByInS_T()
Definition at line 7177 of file kutil.cc.
7182 const unsigned long not_sev = ~L->sev;
7183 const unsigned long* sev = strat->
sevS;
7196 if (
j > end_pos)
return NULL;
7197 #if defined(PDEBUG) || defined(PDIV_DEBUG)
7199 (ecart== LONG_MAX || ecart>= strat->
ecartS[
j]))
7204 if (!(sev[
j] & not_sev) &&
7205 (ecart== LONG_MAX || ecart>= strat->
ecartS[
j]) &&
7219 if (
j > end_pos)
return NULL;
7220 #if defined(PDEBUG) || defined(PDIV_DEBUG)
7227 if (!(sev[
j] & not_sev) &&
7228 (ecart== LONG_MAX || ecart>= strat->
ecartS[
j]) &&
7239 if (strat->
tl < 0 || strat->
S_2_R[
j] == -1)
7260 if (
j > end_pos)
return NULL;
7262 #if defined(PDEBUG) || defined(PDIV_DEBUG)
7266 (ecart== LONG_MAX || ecart>= strat->
ecartS[
j]))
7272 if (! (sev[
j] & not_sev) && (ecart== LONG_MAX || ecart>= strat->
ecartS[
j]))
7275 assume(t !=
NULL && t->t_p !=
NULL && t->tailRing == r && t->p == strat->
S[
j]);
7291 if (
j > end_pos)
return NULL;
7293 #if defined(PDEBUG) || defined(PDIV_DEBUG)
7303 if (! (sev[
j] & not_sev) && (ecart== LONG_MAX || ecart>= strat->
ecartS[
j]))
7306 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 86 of file kstd2.cc.
88 unsigned long not_sev = ~L->sev;
92 const unsigned long* sevT=strat->
sevT;
105 if (
j > strat->
tl)
return -1;
106 #if defined(PDEBUG) || defined(PDIV_DEBUG)
113 if (!(sevT[
j] & not_sev) &&
127 if (
j > strat->
tl)
return -1;
128 #if defined(PDEBUG) || defined(PDIV_DEBUG)
134 if (!(sevT[
j] & not_sev) &&
152 if (
j > strat->
tl)
return -1;
153 #if defined(PDEBUG) || defined(PDIV_DEBUG)
161 if (!(sevT[
j] & not_sev) &&
175 if (
j > strat->
tl)
return -1;
176 #if defined(PDEBUG) || defined(PDIV_DEBUG)
183 if (!(sevT[
j] & not_sev) &&
◆ kFindInT()
int kFindInT |
( |
poly |
p, |
|
|
TSet |
T, |
|
|
int |
tlength |
|
) |
| |
returns index of p in TSet, or -1 if not found
Definition at line 703 of file kutil.cc.
708 for (
i=0;
i<=tlength;
i++)
710 if (
T[
i].
p ==
p)
return i;
◆ kFindNextDivisibleByInS()
Definition at line 265 of file kstd2.cc.
267 unsigned long not_sev = ~L->sev;
268 poly
p = L->GetLmCurrRing();
281 if (
j > ende)
return -1;
282 #if defined(PDEBUG) || defined(PDIV_DEBUG)
290 if ( !(strat->
sevS[
j] & not_sev) &&
304 if (
j > ende)
return -1;
305 #if defined(PDEBUG) || defined(PDIV_DEBUG)
312 if ( !(strat->
sevS[
j] & not_sev) &&
◆ kFindZeroPoly()
poly kFindZeroPoly |
( |
poly |
input_p, |
|
|
ring |
leadRing, |
|
|
ring |
tailRing |
|
) |
| |
Definition at line 324 of file kstd2.cc.
331 poly zeroPoly =
NULL;
332 unsigned long a = (
unsigned long)
pGetCoeff(
p);
335 int a_ind2 =
ind2(a);
339 for (
int i = 1;
i <= leadRing->N;
i++)
348 poly lead_mult =
p_ISet(1, tailRing);
349 if (
n_GetChar(leadRing->cf) <= k_ind2 + a_ind2)
351 int too_much = k_ind2 + a_ind2 -
n_GetChar(leadRing->cf);
353 zeroPoly =
p_ISet(a, tailRing);
354 for (
int i = 1;
i <= leadRing->N;
i++)
361 while ( (0 <
ind2(s_exp)) && (
ind2(s_exp) <= too_much) )
363 too_much = too_much -
ind2(s_exp);
367 for (
int j = 1;
j <= s_exp;
j++)
384 p_Setm(lead_mult, tailRing);
385 zeroPoly =
p_Mult_mm(zeroPoly, lead_mult, tailRing);
387 for (
int i = 1;
i <= leadRing->N;
i++)
◆ kFreeStrat()
◆ kNF2() [1/2]
ideal kNF2 |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
ideal |
q, |
|
|
kStrategy |
strat, |
|
|
int |
lazyReduce |
|
) |
| |
◆ kNF2() [2/2]
poly kNF2 |
( |
ideal |
F, |
|
|
ideal |
Q, |
|
|
poly |
q, |
|
|
kStrategy |
strat, |
|
|
int |
lazyReduce |
|
) |
| |
◆ 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 991 of file kspoly.cc.
993 * 1. the coefficient is 0 (
p_Init)
994 * 1. a) in the
case of coefficient ring, the coefficient is calculated
995 * 2.
pNext is undefined
1049 if ((c1==c2)||(c2!=0))
1099 if ((c1==c2)||(c1!=0))
◆ ksCreateSpoly()
Definition at line 746 of file kspoly.cc.
762 Pair->tailRing = tailRing;
802 if (Pair->i_r1 == -1)
808 l1 = (
R[Pair->i_r1])->GetpLength() - 1;
810 if ((Pair->i_r2 == -1)||(
R[Pair->i_r2]==
NULL))
816 l2 = (
R[Pair->i_r2])->GetpLength() - 1;
821 if (spNoether !=
NULL)
824 a2 = tailRing->p_Procs->pp_Mult_mm_Noether(a2, m2, spNoether, l2, tailRing);
828 a2 = tailRing->p_Procs->pp_Mult_mm(a2, m2, tailRing);
833 Pair->SetLmTail(m2, a2, l2, use_buckets, tailRing);
836 Pair->Tail_Minus_mm_Mult_qq(m1, a1, l1, spNoether);
839 Pair->LmDeleteAndIter();
855 #ifdef HAVE_SHIFTBBA_NONEXISTENT
◆ 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 39 of file kspoly.cc.
49 #ifdef TEST_OPT_DEBUG_RED
60 ring tailRing = PR->tailRing;
64 poly p1 = PR->GetLmTailRing();
65 poly p2 = PW->GetLmTailRing();
66 poly t2 =
pNext(p2), lm = p1;
87 poly _p = (PR->t_p !=
NULL ? PR->t_p : PR->p);
90 if (PR->t_p!=
NULL) PR->t_p=_p;
else PR->p=_p;
99 PR->LmDeleteAndIter();
100 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
113 if (strat ==
NULL)
return 2;
116 p1 = PR->GetLmTailRing();
117 p2 = PW->GetLmTailRing();
132 if ((ct == 0) || (ct == 2))
133 PR->Tail_Mult_nn(an);
134 if (coef !=
NULL) *coef = an;
139 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
144 PR->Tail_Minus_mm_Mult_qq(lm, t2,
pLength(t2) , spNoether);
146 PR->LmDeleteAndIter();
149 #ifdef HAVE_SHIFTBBA_NONEXISTENT
158 PR->SetShortExpVector();
◆ ksReducePolyBound()
Definition at line 163 of file kspoly.cc.
174 #ifdef TEST_OPT_DEBUG_RED
185 ring tailRing = PR->tailRing;
189 poly p1 = PR->GetLmTailRing();
190 poly p2 = PW->GetLmTailRing();
191 poly t2 =
pNext(p2), lm = p1;
212 poly _p = (PR->t_p !=
NULL ? PR->t_p : PR->p);
215 if (PR->t_p!=
NULL) PR->t_p=_p;
else PR->p=_p;
224 PR->LmDeleteAndIter();
225 if (coef !=
NULL) *coef =
n_Init(1, tailRing);
238 if (strat ==
NULL)
return 2;
241 p1 = PR->GetLmTailRing();
242 p2 = PW->GetLmTailRing();
257 if ((ct == 0) || (ct == 2))
258 PR->Tail_Mult_nn(an);
259 if (coef !=
NULL) *coef = an;
264 if (coef !=
NULL) *coef =
n_Init(1, tailRing);
269 PR->Tail_Minus_mm_Mult_qq(lm, t2,
pLength(t2) , spNoether);
271 PR->LmDeleteAndIter();
274 #ifdef HAVE_SHIFTBBA_NONEXISTENT
283 PR->SetShortExpVector();
287 #if defined(KDEBUG) && defined(TEST_OPT_DEBUG_RED)
◆ ksReducePolySig()
Definition at line 301 of file kspoly.cc.
313 #ifdef TEST_OPT_DEBUG_RED
322 ring tailRing = PR->tailRing;
356 poly sigMult =
pCopy(PW->sig);
359 printf(
"IN KSREDUCEPOLYSIG: \n");
363 printf(
"--------------\n");
368 printf(
"------------------- IN KSREDUCEPOLYSIG: --------------------\n");
373 printf(
"--------------\n");
380 printf(
"%d -- %d sig\n",sigSafe,PW->is_sigsafe);
389 PR->is_redundant =
TRUE;
394 PR->is_redundant =
FALSE;
395 poly p1 = PR->GetLmTailRing();
396 poly p2 = PW->GetLmTailRing();
397 poly t2 =
pNext(p2), lm = p1;
418 poly _p = (PR->t_p !=
NULL ? PR->t_p : PR->p);
421 if (PR->t_p!=
NULL) PR->t_p=_p;
else PR->p=_p;
430 PR->LmDeleteAndIter();
431 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
444 if (strat ==
NULL)
return 2;
447 p1 = PR->GetLmTailRing();
448 p2 = PW->GetLmTailRing();
463 if ((ct == 0) || (ct == 2))
464 PR->Tail_Mult_nn(an);
465 if (coef !=
NULL) *coef = an;
470 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
475 PR->Tail_Minus_mm_Mult_qq(lm, t2, PW->GetpLength() - 1, spNoether);
477 PR->LmDeleteAndIter();
480 #ifdef HAVE_SHIFTBBA_NONEXISTENT
489 PR->SetShortExpVector();
493 #if defined(KDEBUG) && defined(TEST_OPT_DEBUG_RED)
◆ ksReducePolySigRing()
Definition at line 498 of file kspoly.cc.
511 #ifdef TEST_OPT_DEBUG_RED
520 ring tailRing = PR->tailRing;
554 poly sigMult =
pCopy(PW->sig);
557 printf(
"IN KSREDUCEPOLYSIG: \n");
561 printf(
"--------------\n");
575 printf(
"------------------- IN KSREDUCEPOLYSIG: --------------------\n");
580 printf(
"--------------\n");
589 printf(
"%d -- %d sig\n",sigSafe,PW->is_sigsafe);
595 poly origsig =
pCopy(PR->sig);
606 if(
pLtCmp(PR->sig,origsig) == 1)
610 PR->is_redundant =
TRUE;
616 if(
pLtCmp(PR->sig,origsig) == -1)
628 PR->is_redundant =
TRUE;
633 PR->is_redundant =
FALSE;
634 poly p1 = PR->GetLmTailRing();
635 poly p2 = PW->GetLmTailRing();
636 poly t2 =
pNext(p2), lm = p1;
657 poly _p = (PR->t_p !=
NULL ? PR->t_p : PR->p);
660 if (PR->t_p!=
NULL) PR->t_p=_p;
else PR->p=_p;
669 PR->LmDeleteAndIter();
670 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
683 if (strat ==
NULL)
return 2;
686 p1 = PR->GetLmTailRing();
687 p2 = PW->GetLmTailRing();
698 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
708 if (((ct == 0) || (ct == 2)))
709 PR->Tail_Mult_nn(an);
710 if (coef !=
NULL) *coef = an;
715 if (coef !=
NULL) *coef =
n_Init(1, tailRing->cf);
720 PR->Tail_Minus_mm_Mult_qq(lm, t2, PW->GetpLength() - 1, spNoether);
722 PR->LmDeleteAndIter();
725 #ifdef HAVE_SHIFTBBA_NONEXISTENT
734 PR->SetShortExpVector();
737 #if defined(KDEBUG) && defined(TEST_OPT_DEBUG_RED)
◆ ksReducePolyTail() [1/2]
Definition at line 1015 of file kInline.h.
1027 assume(PR->GetLmCurrRing() != PW->GetLmCurrRing());
1028 Red->HeadNormalize();
◆ ksReducePolyTail() [2/2]
Definition at line 864 of file kspoly.cc.
874 poly Lp = PR->GetLmCurrRing();
875 poly Save = PW->GetLmCurrRing();
895 if (Current == PR->p && PR->t_p !=
NULL)
901 pNext(Current) = Red.GetLmTailRing();
902 if (Current == PR->p && PR->t_p !=
NULL)
910 #ifdef HAVE_SHIFTBBA_NONEXISTENT
◆ kStratChangeTailRing()
Definition at line 11064 of file kutil.cc.
11078 if (expbound == 0) expbound = strat->
tailRing->bitmask << 1;
11095 new_tailRing->pFDeg =
currRing->pFDeg;
11096 new_tailRing->pLDeg =
currRing->pLDeg;
11100 Print(
"[%lu:%d", (
unsigned long) new_tailRing->bitmask, new_tailRing->ExpL_Size);
11109 for (
i=0;
i<=strat->
tl;
i++)
11111 strat->
T[
i].ShallowCopyDelete(new_tailRing, new_tailBin,
11112 p_shallow_copy_delete);
11114 for (
i=0;
i<=strat->
Ll;
i++)
11118 strat->
L[
i].ShallowCopyDelete(new_tailRing, p_shallow_copy_delete);
11120 if ((strat->
P.t_p !=
NULL) ||
11122 strat->
P.ShallowCopyDelete(new_tailRing, p_shallow_copy_delete);
11124 if ((L !=
NULL) && (L->tailRing != new_tailRing))
11127 L->ShallowCopyDelete(new_tailRing, p_shallow_copy_delete);
11133 L->tailRing = new_tailRing;
11136 L->max_exp = t_l->max_exp;
11140 if ((
T !=
NULL) && (
T->tailRing != new_tailRing &&
T->i_r < 0))
11141 T->ShallowCopyDelete(new_tailRing, new_tailBin, p_shallow_copy_delete);
11148 strat->
tailBin = new_tailBin;
◆ kStratInitChangeTailRing()
void kStratInitChangeTailRing |
( |
kStrategy |
strat | ) |
|
Definition at line 11163 of file kutil.cc.
11174 unsigned long l = 0;
11180 for (
i=0;
i<= strat->
Ll;
i++)
11184 for (
i=0;
i<=strat->
tl;
i++)
◆ message()
void message |
( |
int |
i, |
|
|
int * |
reduc, |
|
|
int * |
olddeg, |
|
|
kStrategy |
strat, |
|
|
int |
red_result |
|
) |
| |
Definition at line 7743 of file kutil.cc.
7754 if (strat->
Ll != *reduc)
7756 if (strat->
Ll != *reduc-1)
7768 if (red_result == 0)
7770 else if (red_result < 0)
7772 if ((red_result > 0) || ((strat->
Ll % 100)==99))
7774 if (strat->
Ll != *reduc && strat->
Ll > 0)
◆ messageStat()
void messageStat |
( |
int |
hilbcount, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 7784 of file kutil.cc.
7791 Print(
"product criterion:%d chain criterion:%d\n",strat->
cp,strat->
c3);
7792 if (hilbcount!=0)
Print(
"hilbert series criterion:%d\n",hilbcount);
7794 if (strat->
cv!=0)
Print(
"shift V criterion:%d\n",strat->
cv);
◆ messageStatSBA()
void messageStatSBA |
( |
int |
hilbcount, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 7796 of file kutil.cc.
7805 if (hilbcount!=0)
Print(
"hilbert series criterion:%d\n",hilbcount);
7807 if (strat->
cv!=0)
Print(
"shift V criterion:%d\n",strat->
cv);
◆ newHEdge()
◆ pairs()
◆ pCopyL2p()
Definition at line 11777 of file kutil.cc.
11785 #ifdef HAVE_SHIFTBBA
◆ pMove2CurrTail()
poly pMove2CurrTail |
( |
poly |
p, |
|
|
kStrategy |
strat |
|
) |
| |
◆ pMoveCurrTail2poly()
poly pMoveCurrTail2poly |
( |
poly |
p, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 11760 of file kutil.cc.
11768 #ifdef HAVE_SHIFTBBA
◆ posInIdealMonFirst()
int posInIdealMonFirst |
( |
const ideal |
F, |
|
|
const poly |
p, |
|
|
int |
start = 0 , |
|
|
int |
end = -1 |
|
) |
| |
Definition at line 5128 of file kutil.cc.
5131 if(end < 0 || end >=
IDELEMS(F))
5133 if (end<0)
return 0;
5140 for(
i=start;
i<end;
i++)
5154 || ((op == o) && (
pLtCmp(set[an],
p) == -1)))
5161 || ((op == o) && (
pLtCmp(set[
i],
p) == -1)))
◆ posInL0()
◆ posInL10()
Definition at line 1007 of file kstd1.cc.
1015 int op=
p->GetpFDeg() +
p->ecart;
1023 && (set[
j].GetpFDeg()+set[
j].ecart >= op))
◆ posInL10Ring()
◆ posInL11()
Definition at line 6238 of file kutil.cc.
6244 int o =
p->GetpFDeg();
6245 int op = set[
length].GetpFDeg();
6257 op = set[an].GetpFDeg();
6264 op = set[
i].GetpFDeg();
◆ posInL110()
Definition at line 6536 of file kutil.cc.
6542 int o =
p->GetpFDeg();
6543 int op = set[
length].GetpFDeg();
6547 || ((op == o) && (set[
length].length <=
p->length)
6557 op = set[an].GetpFDeg();
6559 || ((op == o) && (set[an].
length >
p->length))
6560 || ((op == o) && (set[an].length <=
p->length)
6566 op = set[
i].GetpFDeg();
6568 || ((op == o) && (set[
i].
length >
p->length))
6569 || ((op == o) && (set[
i].length <=
p->length)
◆ posInL11Ring()
Definition at line 6280 of file kutil.cc.
6286 int o =
p->GetpFDeg();
6287 int op = set[
length].GetpFDeg();
6299 op = set[an].GetpFDeg();
6306 op = set[
i].GetpFDeg();
◆ posInL11Ringls()
Definition at line 6350 of file kutil.cc.
6354 if (
length < 0)
return 0;
6364 if (set[an].FDeg >
p->FDeg)
6366 if (set[an].FDeg < p->FDeg)
6368 if (set[an].FDeg ==
p->FDeg)
6376 if (set[an].t_p!=
NULL)
6398 if (set[
i].FDeg >
p->FDeg)
6400 if (set[
i].FDeg < p->FDeg)
6402 if (set[
i].FDeg ==
p->FDeg)
6410 if (set[
i].t_p!=
NULL)
◆ posInL13()
Definition at line 6624 of file kutil.cc.
6630 int o =
p->GetpFDeg();
6632 if (set[
length].GetpFDeg() > o)
6642 if (set[an].GetpFDeg() >= o)
6647 if (set[
i].GetpFDeg() >= o)
◆ posInL15()
Definition at line 6659 of file kutil.cc.
6665 int o =
p->GetpFDeg() +
p->ecart;
6678 op = set[an].GetpFDeg() + set[an].ecart;
6685 op = set[
i].GetpFDeg() + set[
i].ecart;
◆ posInL15Ring()
Definition at line 6694 of file kutil.cc.
6700 int o =
p->GetpFDeg() +
p->ecart;
6713 op = set[an].GetpFDeg() + set[an].ecart;
6720 op = set[
i].GetpFDeg() + set[
i].ecart;
◆ posInL17()
Definition at line 6735 of file kutil.cc.
6741 int o =
p->GetpFDeg() +
p->ecart;
6745 && (set[
length].ecart >
p->ecart))
6747 && (set[
length].ecart ==
p->ecart)
6757 if ((set[an].GetpFDeg() + set[an].ecart > o)
6758 || ((set[an].GetpFDeg() + set[an].ecart == o)
6759 && (set[an].ecart >
p->ecart))
6760 || ((set[an].GetpFDeg() + set[an].ecart == o)
6761 && (set[an].ecart ==
p->ecart)
6767 if ((set[
i].GetpFDeg() + set[
i].ecart > o)
6768 || ((set[
i].GetpFDeg() + set[
i].ecart == o)
6769 && (set[
i].ecart >
p->ecart))
6770 || ((set[
i].GetpFDeg() +set[
i].ecart == o)
6771 && (set[
i].ecart ==
p->ecart)
◆ posInLF5C()
◆ posInLF5CRing()
Definition at line 6314 of file kutil.cc.
6320 int o =
p->GetpFDeg();
6321 int op = set[
length].GetpFDeg();
6333 op = set[an].GetpFDeg();
6340 op = set[
i].GetpFDeg();
◆ posInLRing()
Definition at line 6125 of file kutil.cc.
6129 if (
length < 0)
return 0;
6130 if (set[
length].FDeg >
p->FDeg)
6132 if (set[
length].FDeg ==
p->FDeg)
6133 if(set[
length].GetpLength() >
p->GetpLength())
6144 if (set[an].FDeg >
p->FDeg)
6146 if(set[an].FDeg ==
p->FDeg)
6148 if(set[an].GetpLength() >
p->GetpLength())
6152 if(set[an].GetpLength() ==
p->GetpLength())
6169 if (set[
i].FDeg >
p->FDeg)
6173 if(set[
i].FDeg ==
p->FDeg)
6175 if(set[
i].GetpLength() >
p->GetpLength())
6179 if(set[
i].GetpLength() ==
p->GetpLength())
◆ posInLSig()
◆ posInLSigRing()
Definition at line 6062 of file kutil.cc.
6081 cmp =
pLtCmp(set[an].sig,
p->sig);
6088 if (set[an].FDeg >
p->FDeg)
6090 if (set[an].FDeg < p->FDeg)
6092 if (set[an].FDeg ==
p->FDeg)
6110 if (set[
i].FDeg >
p->FDeg)
6112 if (set[
i].FDeg < p->FDeg)
6114 if (set[
i].FDeg ==
p->FDeg)
◆ posInS()
Definition at line 4950 of file kutil.cc.
5003 if (cmp == cmp_int)
return an;
5004 if (cmp == -cmp_int)
return en;
5010 if (cmp == cmp_int) en =
i;
5011 else if (cmp == -cmp_int) an =
i;
5027 if (
pLmCmp(set[an],
p) == cmp_int)
return an;
5028 if (
pLmCmp(set[an],
p) == -cmp_int)
return en;
5030 && ((strat->
ecartS[an])>ecart_p))
5036 else if (
pLmCmp(set[
i],
p) == -cmp_int) an=
i;
5040 &&((strat->
ecartS[
i])<ecart_p))
◆ posInSMonFirst()
Definition at line 5051 of file kutil.cc.
5068 || ((op == o) && (
pLtCmp(set[mon],
p) == -1)))
5079 || ((op == o) && (
pLtCmp(set[an],
p) == -1)))
5086 || ((op == o) && (
pLtCmp(set[
i],
p) == -1)))
5112 || ((op == o) && (
pLtCmp(set[an],
p) == -1)))
5119 || ((op == o) && (
pLtCmp(set[
i],
p) == -1)))
◆ posInSyz()
Definition at line 6198 of file kutil.cc.
6201 if (strat->
syzl==0)
return 0;
6206 int en= strat->
syzl-1;
◆ posInT0()
◆ posInT1()
◆ posInT11()
Definition at line 5241 of file kutil.cc.
5244 if (
length==-1)
return 0;
5246 int o =
p.GetpFDeg();
5247 int op = set[
length].GetpFDeg();
5261 op= set[an].GetpFDeg();
5268 op = set[
i].GetpFDeg();
◆ posInT110()
Definition at line 5394 of file kutil.cc.
5398 if (
length==-1)
return 0;
5400 int o =
p.GetpFDeg();
5401 int op = set[
length].GetpFDeg();
5405 || (( op == o) && (set[
length].length ==
p.length)
5416 op = set[an].GetpFDeg();
5418 || (( op == o) && (set[an].
length >
p.length))
5419 || (( op == o) && (set[an].length ==
p.length)
5425 op = set[
i].GetpFDeg();
5427 || (( op == o) && (set[
i].
length >
p.length))
5428 || (( op == o) && (set[
i].length ==
p.length)
◆ posInT13()
Definition at line 5483 of file kutil.cc.
5486 if (
length==-1)
return 0;
5488 int o =
p.GetpFDeg();
5490 if (set[
length].GetpFDeg() <= o)
5500 if (set[an].GetpFDeg() > o)
5505 if (set[
i].GetpFDeg() > o)
◆ posInT15()
Definition at line 5551 of file kutil.cc.
5572 if (
length==-1)
return 0;
5574 int o =
p.GetpFDeg() +
p.ecart;
5589 op = set[an].GetpFDeg()+set[an].ecart;
5596 op = set[
i].GetpFDeg()+set[
i].ecart;
◆ posInT17()
Definition at line 5646 of file kutil.cc.
5669 if (
length==-1)
return 0;
5671 int o =
p.GetpFDeg() +
p.ecart;
5675 || (( op == o) && (set[
length].ecart >
p.ecart))
5676 || (( op == o) && (set[
length].ecart==
p.ecart)
5687 op = set[an].GetpFDeg()+set[an].ecart;
5689 || (( op == o) && (set[an].ecart <
p.ecart))
5690 || (( op == o) && (set[an].ecart==
p.ecart)
5696 op = set[
i].GetpFDeg()+set[
i].ecart;
5698 || (( op == o) && (set[
i].ecart <
p.ecart))
5699 || (( op == o) && (set[
i].ecart ==
p.ecart)
◆ posInT17_c()
Definition at line 5753 of file kutil.cc.
5756 if (
length==-1)
return 0;
5760 int o =
p.GetpFDeg() +
p.ecart;
5769 || ((op == o) && (set[
length].ecart >
p.ecart))
5770 || ((op == o) && (set[
length].ecart==
p.ecart)
5786 int op = set[an].GetpFDeg()+set[an].ecart;
5788 || ((op == o) && (set[an].ecart <
p.ecart))
5789 || ((op == o) && (set[an].ecart==
p.ecart)
5800 int op = set[
i].GetpFDeg()+set[
i].ecart;
5802 || ((op == o) && (set[
i].ecart <
p.ecart))
5803 || ((op == o) && (set[
i].ecart ==
p.ecart)
◆ posInT19()
Definition at line 5880 of file kutil.cc.
5884 if (
length==-1)
return 0;
5887 int op=
p.GetpFDeg();
5889 if (set[
length].ecart < o)
5891 if (set[
length].ecart == o)
5893 int oo=set[
length].GetpFDeg();
5894 if ((oo < op) || ((oo==op) && (set[
length].
length <
p.length)))
5905 if (set[an].ecart > o)
5907 if (set[an].ecart == o)
5909 int oo=set[an].GetpFDeg();
5911 || ((oo==op) && (set[an].
length >
p.length)))
5917 if (set[
i].ecart > o)
5919 else if (set[
i].ecart == o)
5921 int oo=set[
i].GetpFDeg();
5923 || ((oo == op) && (set[
i].
length >
p.length)))
◆ posInT2()
◆ posInT_EcartFDegpLength()
Definition at line 11485 of file kutil.cc.
11497 if (
length==-1)
return 0;
11500 int op=
p.GetpFDeg();
11501 int ol =
p.GetpLength();
11503 if (set[
length].ecart < o)
11505 if (set[
length].ecart == o)
11507 int oo=set[
length].GetpFDeg();
11508 if ((oo < op) || ((oo==op) && (set[
length].
length < ol)))
11519 if (set[an].ecart > o)
11521 if (set[an].ecart == o)
11523 int oo=set[an].GetpFDeg();
11525 || ((oo==op) && (set[an].
pLength > ol)))
11531 if (set[
i].ecart > o)
11533 else if (set[
i].ecart == o)
11535 int oo=set[
i].GetpFDeg();
◆ posInT_EcartpLength()
Definition at line 5512 of file kutil.cc.
5515 int ol =
p.GetpLength();
5516 if (
length==-1)
return 0;
5520 int oo=set[
length].ecart;
5521 if ((oo < op) || ((oo==op) && (set[
length].
length < ol)))
5531 int oo=set[an].ecart;
5533 || ((oo==op) && (set[an].
pLength > ol)))
5538 int oo=set[
i].ecart;
5540 || ((oo == op) && (set[
i].
pLength > ol)))
◆ posInT_FDegpLength()
Definition at line 11539 of file kutil.cc.
11551 if (
length==-1)
return 0;
11553 int op=
p.GetpFDeg();
11554 int ol =
p.GetpLength();
11556 int oo=set[
length].GetpFDeg();
11557 if ((oo < op) || ((oo==op) && (set[
length].
length < ol)))
11567 int oo=set[an].GetpFDeg();
11569 || ((oo==op) && (set[an].
pLength > ol)))
◆ posInT_pLength()
Definition at line 11576 of file kutil.cc.
11587 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 10822 of file kutil.cc.
10835 poly pH =
h->GetP();
10839 for(
int i = 0;
i<=strat->
sl;
i++)
◆ postReduceByMonSig()
Definition at line 10890 of file kutil.cc.
10903 poly hSig =
h->sig;
10904 poly pH =
h->GetP();
10908 for(
int i = 0;
i<=strat->
sl;
i++)
10919 if(sigMult!=
NULL &&
pLtCmp(hSig,sigMult) == 1)
10946 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 10655 of file kutil.cc.
10668 ideal F =
idCopy(Forig);
10672 ideal monred =
idInit(1,1);
10679 if((posconst != -1) && (!
nIsZero(F->m[posconst]->coef)))
10689 for(
int i=0;
i<idelemQ;
i++)
10697 if((posconst != -1) && (!
nIsZero(monred->m[posconst]->coef)))
10699 pmon =
pCopy(monred->m[posconst]);
10714 II->m[
j++] =
prMapR(F->m[
i], nMap, origR, QQ_ring);
10716 II->m[
j++] =
prMapR(
Q->m[
i], nMap, origR, QQ_ring);
10723 if(II->m[
i] !=
NULL)
10724 II->m[
i+1] = II->m[
i];
10727 poly integer =
NULL;
10735 integer =
pHead(syz->m[
i]);
10742 pmon =
prMapR(integer, nMap2, QQ_ring, origR);
10756 poly mindegmon =
NULL;
10761 if(mindegmon ==
NULL)
10762 mindegmon =
pCopy(one->m[
i]);
10765 if(
p_Deg(one->m[
i], QQ_ring) <
p_Deg(mindegmon, QQ_ring))
10766 mindegmon =
pCopy(one->m[
i]);
10770 if(mindegmon !=
NULL)
10773 if(II->m[
i] !=
NULL)
10774 II->m[
i+1] = II->m[
i];
10775 II->m[0] =
pCopy(mindegmon);
10804 pmon =
prMapR(mindegmon, nMap2, QQ_ring, origR);
◆ redFirstShift()
Definition at line 4232 of file kstd2.cc.
4236 if (
h->IsNull())
return 0;
4244 d =
h->GetpFDeg() +
h->ecart;
4247 h->SetShortExpVector();
4253 h->SetDegStuffReturnLDeg(strat->
LDegLast);
4258 strat->
T[
j].pNorm();
4290 h->SetShortExpVector();
4303 h->SetDegStuffReturnLDeg(strat->
LDegLast);
4313 if (strat->
T[
j].ecart <=
h->ecart)
4314 h->ecart = d -
h->GetpFDeg();
4316 h->ecart = d -
h->GetpFDeg() + strat->
T[
j].ecart -
h->ecart;
4318 d =
h->GetpFDeg() +
h->ecart;
4321 d =
h->SetDegStuffReturnLDeg(strat->
LDegLast);
4330 && ((d >= reddeg) || (pass > strat->
LazyPass)))
4335 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
4336 if (at <= strat->Ll)
◆ redHomog()
Definition at line 545 of file kstd2.cc.
547 if (strat->
tl<0)
return 1;
553 unsigned long not_sev;
558 h->SetShortExpVector();
560 h_p =
h->GetLmTailRing();
567 li = strat->
T[
j].pLength;
568 if (li<=0) li=strat->
T[
j].GetpLength();
585 if ((strat->
T[
i].pLength < li)
593 li = strat->
T[
i].pLength;
594 if (li<=0) li=strat->
T[
i].GetpLength();
615 #if SBA_PRINT_REDUCTION_STEPS
616 sba_interreduction_steps++;
618 #if SBA_PRINT_OPERATIONS
619 sba_interreduction_operations +=
pLength(strat->
T[ii].p);
631 h_p =
h->GetLmTailRing();
637 h->SetShortExpVector();
649 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
658 Print(
" lazy: -> L%d\n",at);
◆ redHoney()
Definition at line 1387 of file kstd2.cc.
1389 if (strat->
tl<0)
return 1;
1393 int i,
j,at,pass,ei, ii, h_d;
1394 unsigned long not_sev;
1398 d = reddeg =
h->GetpFDeg() +
h->ecart;
1399 h->SetShortExpVector();
1401 h_p =
h->GetLmTailRing();
1408 if (
j < 0)
return 1;
1410 ei = strat->
T[
j].ecart;
1411 li = strat->
T[
j].pLength;
1412 if (li<=0) li=strat->
T[
j].GetpLength();
1430 if ((((strat->
T[
i].ecart < ei) && (ei>
h->ecart))
1431 || ((strat->
T[
i].ecart <=
h->ecart) && (strat->
T[
i].pLength < li)))
1439 ei = strat->
T[
i].ecart;
1440 li = strat->
T[
i].pLength;
1441 if (li<=0) li=strat->
T[
i].GetpLength();
1460 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1478 Print(
"\nwith T[%d]:",ii);
1485 #if SBA_PRINT_REDUCTION_STEPS
1486 sba_interreduction_steps++;
1488 #if SBA_PRINT_OPERATIONS
1489 sba_interreduction_operations +=
pLength(strat->
T[ii].p);
1515 else if (
h->t_p!=
NULL)
1524 h->SetShortExpVector();
1526 h_d =
h->SetpFDeg();
1531 h->ecart = d-h_d+ei-
h->ecart;
1545 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1546 if (at <= strat->Ll)
1548 int dummy=strat->
sl;
1554 Print(
" degree jumped: -> L%d\n",at);
1560 else if (d > reddeg)
1562 if (d>=(
long)strat->
tailRing->bitmask)
1564 if (
h->pTotalDeg()+
h->ecart >= (long)strat->
tailRing->bitmask)
1569 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
◆ redLazy()
TEST_OPT_REDTHROUGH &&
Definition at line 1242 of file kstd2.cc.
1244 if (strat->
tl<0)
return 1;
1249 long reddeg =
h->GetpFDeg();
1251 unsigned long not_sev;
1253 h->SetShortExpVector();
1254 poly h_p =
h->GetLmTailRing();
1259 if (
j < 0)
return 1;
1261 li = strat->
T[
j].pLength;
1262 if (li<=0) li=strat->
T[
j].GetpLength();
1280 if ((strat->
T[
i].pLength < li)
1288 li = strat->
T[
i].pLength;
1289 if (li<=0) li=strat->
T[
i].GetpLength();
1311 #if SBA_PRINT_REDUCTION_STEPS
1312 sba_interreduction_steps++;
1314 #if SBA_PRINT_OPERATIONS
1315 sba_interreduction_operations +=
pLength(strat->
T[ii].p);
1327 h_p=
h->GetLmTailRing();
1334 h->SetShortExpVector();
1340 (strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
1343 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1344 if (at <= strat->Ll)
1347 int dummy=strat->
sl;
1359 else if (d != reddeg)
1361 if (d>=(
long)strat->
tailRing->bitmask)
1363 if (
h->pTotalDeg() >= (long)strat->
tailRing->bitmask)
1368 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
◆ redNF()
poly redNF |
( |
poly |
h, |
|
|
int & |
max_ind, |
|
|
int |
nonorm, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 1589 of file kstd2.cc.
1591 #define REDNF_CANONICALIZE 60
1602 P.SetShortExpVector();
1708 P.SetShortExpVector();
◆ redNF0()
◆ redNFTail()
◆ redRiloc()
Definition at line 343 of file kstd1.cc.
351 d =
h->GetpFDeg()+
h->ecart;
353 h->SetShortExpVector();
372 if (
h->GetLmTailRing() ==
NULL)
381 ei = strat->
T[
j].ecart;
383 if (ei >
h->ecart && ii < strat->tl)
385 li = strat->
T[
j].length;
395 if (
i > strat->
tl)
break;
396 if ((strat->
T[
i].ecart < ei || (strat->
T[
i].ecart == ei &&
397 strat->
T[
i].length < li))
406 if (strat->
T[
i].ecart < ei || (strat->
T[
i].ecart == ei &&
407 strat->
T[
i].length < li))
412 ei = strat->
T[
i].ecart;
413 if (ei <= h->ecart)
break;
414 li = strat->
T[
i].length;
432 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
433 if (at <= strat->Ll &&
pLmCmp(
h->p, strat->
L[strat->
Ll].p) != 0 && !
nEqual(
h->p->coef, strat->
L[strat->
Ll].p->coef))
462 h->SetShortExpVector();
467 h->ecart = d-
h->GetpFDeg();
469 h->ecart = d-
h->GetpFDeg()+ei-
h->ecart;
473 h->ecart =
h->pLDeg(strat->
LDegLast) -
h->GetpFDeg();
476 d =
h->GetpFDeg()+
h->ecart;
483 && ((d >= reddeg) || (pass > strat->
LazyPass)))
489 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
511 if (
h->pTotalDeg()+
h->ecart >= (int)strat->
tailRing->bitmask)
516 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
◆ redRing()
Definition at line 438 of file kstd2.cc.
440 if (
h->IsNull())
return 0;
441 if (strat->
tl<0)
return 1;
452 long reddeg =
h->GetpFDeg();
454 h->SetShortExpVector();
476 if (
h->GetLmTailRing() ==
NULL)
489 if (
h->GetLmTailRing() ==
NULL)
495 h->SetShortExpVector();
500 (strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
505 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
518 if (d >= (
long)strat->
tailRing->bitmask)
520 if (
h->pTotalDeg() >= (long)strat->
tailRing->bitmask)
525 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
◆ redSig()
Definition at line 705 of file kstd2.cc.
707 if (strat->
tl<0)
return 1;
713 PrintS(
"------- IN REDSIG -------\n");
720 PrintS(
"---------------------------\n");
726 unsigned long not_sev;
731 h->SetShortExpVector();
733 h_p =
h->GetLmTailRing();
743 li = strat->
T[
j].pLength;
744 if (li<=0) li=strat->
T[
j].GetpLength();
761 if ((strat->
T[
i].pLength < li)
769 li = strat->
T[
i].pLength;
770 if (li<=0) li=strat->
T[
i].GetpLength();
792 Print(
"BEFORE REDUCTION WITH %d:\n",ii);
793 PrintS(
"--------------------------------\n");
800 PrintS(
"--------------------------------\n");
801 printf(
"INDEX OF REDUCER T: %d\n",ii);
804 #if SBA_PRINT_REDUCTION_STEPS
806 sba_reduction_steps++;
808 #if SBA_PRINT_OPERATIONS
810 sba_operations +=
pLength(strat->
T[ii].p);
817 Print(
"SigSAFE: %d\n",sigSafe);
832 h_p =
h->GetLmTailRing();
838 h->SetShortExpVector();
850 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
861 Print(
" lazy: -> L%d\n",at);
◆ redSigRing()
Definition at line 872 of file kstd2.cc.
885 beforeredsig =
pCopy(
h->sig);
887 if (strat->
tl<0)
return 1;
893 Print(
"------- IN REDSIG -------\n");
900 Print(
"---------------------------\n");
906 unsigned long not_sev;
911 h->SetShortExpVector();
913 h_p =
h->GetLmTailRing();
938 if (
h->GetLmTailRing() ==
NULL)
945 if(
pLtCmp(beforeredsig,
h->sig) == 1)
968 li = strat->
T[
j].pLength;
969 if (li<=0) li=strat->
T[
j].GetpLength();
985 if ((strat->
T[
i].pLength < li)
993 li = strat->
T[
i].pLength;
994 if (li<=0) li=strat->
T[
i].GetpLength();
1016 Print(
"BEFORE REDUCTION WITH %d:\n",ii);
1017 Print(
"--------------------------------\n");
1024 Print(
"--------------------------------\n");
1025 printf(
"INDEX OF REDUCER T: %d\n",ii);
1053 #if SBA_PRINT_REDUCTION_STEPS
1055 sba_reduction_steps++;
1057 #if SBA_PRINT_OPERATIONS
1059 sba_operations +=
pLength(strat->
T[ii].p);
1066 Print(
"SigSAFE: %d\n",sigSafe);
1081 h_p =
h->GetLmTailRing();
1087 h->SetShortExpVector();
1099 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1100 if (at <= strat->Ll)
1102 int dummy=strat->
sl;
1110 Print(
" lazy: -> L%d\n",at);
◆ redtail() [1/2]
Definition at line 7319 of file kutil.cc.
7357 if (With ==
NULL)
break;
7367 return redtail(L, end_pos, strat);
7373 if (hn ==
NULL)
goto all_done;
◆ redtail() [2/2]
poly redtail |
( |
poly |
p, |
|
|
int |
end_pos, |
|
|
kStrategy |
strat |
|
) |
| |
◆ redtailBba() [1/3]
Definition at line 7395 of file kutil.cc.
7399 #define REDTAIL_CANONICALIZE 100
7403 p =
h = L->GetLmTailRing();
7405 return L->GetLmCurrRing();
7440 Ln.SetShortExpVector();
7446 With = &(strat->
T[
j]);
7447 assume(With->GetpLength()==
pLength(With->p != __null ? With->p : With->t_p));
7452 if (With ==
NULL)
break;
7453 assume(With->GetpLength()==
pLength(With->p != __null ? With->p : With->t_p));
7480 pNext(
h) = Ln.LmExtractAndIter();
7483 }
while (!Ln.IsNull());
7486 if (Ln.IsNull())
goto all_done;
7487 if (! withT) With_s.Init(
currRing);
7489 pNext(
h) = Ln.LmExtractAndIter();
◆ redtailBba() [2/3]
◆ redtailBba() [3/3]
◆ redtailBba_Z() [1/2]
Definition at line 7625 of file kutil.cc.
7633 p =
h = L->GetLmTailRing();
7635 return L->GetLmCurrRing();
7642 Ln.pLength = L->GetpLength() - 1;
7655 Ln.SetShortExpVector();
7657 if (With ==
NULL)
break;
7667 poly p_Ln=Ln.GetLmCurrRing();
7668 poly p_With=With->GetLmCurrRing();
7680 if (Ln.bucket!=
NULL)
7711 pNext(
h) = Ln.LmExtractAndIter();
7714 }
while (!Ln.IsNull());
7717 if (Ln.IsNull())
goto all_done;
7720 pNext(
h) = Ln.LmExtractAndIter();
◆ redtailBba_Z() [2/2]
◆ redtailBbaBound() [1/2]
Definition at line 7509 of file kutil.cc.
7516 p =
h = L->GetLmTailRing();
7518 return L->GetLmCurrRing();
7525 Ln.pLength = L->GetpLength() - 1;
7549 Ln.SetShortExpVector();
7555 With = &(strat->
T[
j]);
7560 if (With ==
NULL)
break;
7587 pNext(
h) = Ln.LmExtractAndIter();
7590 }
while (!Ln.IsNull());
7602 if (! withT) With_s.Init(
currRing);
7604 pNext(
h) = Ln.LmExtractAndIter();
◆ redtailBbaBound() [2/2]
◆ redtailBbaShift()
Definition at line 12561 of file kutil.cc.
12576 p =
h = L->GetLmTailRing();
12578 return L->GetLmCurrRing();
12585 Ln.pLength = L->GetpLength() - 1;
12593 while(!Ln.IsNull())
12597 Ln.SetShortExpVector();
12603 With = &(strat->
T[
j]);
12608 if (With ==
NULL)
break;
12624 pNext(
h) = Ln.LmExtractAndIter();
12627 }
while (!Ln.IsNull());
12630 if (Ln.IsNull())
goto all_done;
12631 if (! withT) With_s.Init(
currRing);
12633 pNext(
h) = Ln.LmExtractAndIter();
◆ redtailSba()
Definition at line 1121 of file kstd2.cc.
1123 #define REDTAIL_CANONICALIZE 100
1127 p =
h = L->GetLmTailRing();
1129 return L->GetLmCurrRing();
1137 Ln.sevSig = L->sevSig;
1138 Ln.pLength = L->GetpLength() - 1;
1153 Ln.SetShortExpVector();
1159 With = &(strat->
T[
j]);
1164 if (With ==
NULL)
break;
1188 #if SBA_PRINT_REDUCTION_STEPS
1190 sba_reduction_steps++;
1192 #if SBA_PRINT_OPERATIONS
1194 sba_operations +=
pLength(With->p);
1204 pNext(
h) = Ln.LmExtractAndIter();
1207 }
while (!Ln.IsNull());
1210 if (Ln.IsNull())
goto all_done;
1211 if (! withT) With_s.Init(
currRing);
1218 pNext(
h) = Ln.LmExtractAndIter();
1235 return L->GetLmCurrRing();
◆ reorderS()
Definition at line 4897 of file kutil.cc.
4900 int i,
j,at,ecart, s2r;
4904 int new_suc=strat->
sl+1;
4908 for (;
i<=strat->
sl;
i++)
4913 if (new_suc > at) new_suc = at;
4916 sev = strat->
sevS[
i];
4919 for (
j=
i;
j>=at+1;
j--)
4921 strat->
S[
j] = strat->
S[
j-1];
4927 strat->
ecartS[at] = ecart;
4928 strat->
sevS[at] = sev;
4929 strat->
S_2_R[at] = s2r;
4932 for (
j=
i;
j>=at+1;
j--)
4936 strat->
fromQ[at]=fq;
4940 if (new_suc <= strat->sl) *suc=new_suc;
◆ sba()
Definition at line 2251 of file kstd2.cc.
2260 #if SBA_PRINT_ZERO_REDUCTIONS
2261 long zeroreductions = 0;
2263 #if SBA_PRINT_PRODUCT_CRITERION
2264 long product_criterion = 0;
2266 #if SBA_PRINT_SIZE_G
2268 int size_g_non_red = 0;
2270 #if SBA_PRINT_SIZE_SYZ
2274 #if SBA_PRINT_REDUCTION_STEPS
2275 sba_reduction_steps = 0;
2276 sba_interreduction_steps = 0;
2278 #if SBA_PRINT_OPERATIONS
2280 sba_interreduction_operations = 0;
2284 ring sRing, currRingOld;
2289 if (sRing!=currRingOld)
2308 dummy =
pCopy(F->m[0]);
2310 F->m[
i] = F->m[
i+1];
2331 dummy =
pCopy(F->m[0]);
2333 F->m[
i] = F->m[
i+1];
2351 for (
int i=0;
i<
sort->length();++
i)
2352 F->m[
i] = F1->m[(*
sort)[
i]-1];
2366 F->m[
j] = F->m[
j-1];
2384 printf(
"SBA COMPUTATIONS DONE IN THE FOLLOWING RING:\n");
2386 printf(
"ordSgn = %d\n",
currRing->OrdSgn);
2389 int srmax,lrmax, red_result = 1;
2391 int hilbeledeg=1,hilbcount=0,minimcnt=0;
2405 reduc = olddeg = lrmax = 0;
2418 #ifdef HAVE_TAIL_RING
2436 strat->
enterS(strat->
L[strat->
Ll-(
i)], strat->
sl+1, strat, strat->
tl);
2446 while (strat->
Ll >= 0)
2448 if (strat->
Ll > lrmax) lrmax =strat->
Ll;
2478 f5c ( strat, olddeg, minimcnt, hilbeledeg, hilbcount, srmax,
2479 lrmax, reduc,
Q,
w, hilb );
2489 strat->
P = strat->
L[strat->
Ll];
2495 if (!strat->
rewCrit2(strat->
P.sig, ~strat->
P.sevSig, strat->
P.GetLmCurrRing(), strat, strat->
P.checked+1))
2499 PrintS(
"SIG OF NEXT PAIR TO HANDLE IN SIG-BASED ALGORITHM\n");
2500 PrintS(
"-------------------------------------------------\n");
2505 PrintS(
"-------------------------------------------------\n");
2540 else if (strat->
P.p1 ==
NULL)
2542 if (strat->
minim > 0)
2548 if (strat->
P.p ==
NULL && strat->
P.t_p ==
NULL)
2556 PrintS(
"Poly before red: ");
2560 #if SBA_PRODUCT_CRITERION
2561 if (strat->
P.prod_crit)
2563 #if SBA_PRINT_PRODUCT_CRITERION
2564 product_criterion++;
2566 int pos =
posInSyz(strat, strat->
P.sig);
2573 red_result = strat->
red(&strat->
P,strat);
2576 red_result = strat->
red(&strat->
P,strat);
2592 strat->
P.p =
pNeg(strat->
P.p);
2593 strat->
P.sig =
pNeg(strat->
P.sig);
2596 if(strat->
P.sig !=
NULL)
2598 if(strat->
P.p !=
NULL)
2605 red_result =
redRing(&strat->
P,strat);
2610 strat->
P.sig =
NULL;
2614 strat->
enterS(strat->
P, 0, strat, strat->
tl);
2630 if (red_result != 0)
2632 PrintS(
"Poly after red: ");
2634 pWrite(strat->
P.GetLmCurrRing());
2636 printf(
"%d\n",red_result);
2641 if(strat->
P.p !=
NULL)
2643 &olddeg,&reduc,strat, red_result);
2645 message((strat->honey ? strat->P.ecart : 0),
2646 &olddeg,&reduc,strat, red_result);
2649 if (strat->overflow)
2654 if (red_result == 1)
2657 strat->P.GetP(strat->lmBin);
2661 (strat->P).FDeg = (strat->P).pFDeg();
2665 if (strat->homog) strat->initEcart(&(strat->P));
2673 int pos = strat->sl+1;
2681 beforetailred =
pCopy(strat->P.sig);
2687 strat->P.p =
redtailSba(&(strat->P),pos-1,strat, withT);
2691 if (strat->sbaOrder != 2)
2695 strat->P.pCleardenom();
2698 strat->P.p =
redtailSba(&(strat->P),pos-1,strat, withT);
2699 strat->P.pCleardenom();
2706 strat->P.p =
redtailSba(&(strat->P),pos-1,strat, withT);
2715 strat->enterS(strat->P, 0, strat, strat->tl);
2721 if(strat->P.sig ==
NULL ||
pLtCmp(beforetailred,strat->P.sig) == 1)
2723 strat->sigdrop =
TRUE;
2725 red_result =
redRing(&strat->P,strat);
2729 strat->sigdrop =
FALSE;
2734 strat->enterS(strat->P, 0, strat, strat->tl);
2740 if(strat->P.p ==
NULL)
2741 goto case_when_red_result_changed;
2745 if (strat->sbaOrder == 1)
2747 for (
int jj = 0; jj<strat->tl+1; jj++)
2749 if (
pGetComp(strat->T[jj].sig) == strat->currIdx)
2751 strat->T[jj].is_sigsafe =
FALSE;
2757 for (
int jj = 0; jj<strat->tl+1; jj++)
2759 strat->T[jj].is_sigsafe =
FALSE;
2767 if ((strat->P.p1==
NULL) && (strat->minim>0))
2769 if (strat->minim==1)
2771 strat->M->m[minimcnt]=
p_Copy(strat->P.p,
currRing,strat->tailRing);
2776 strat->M->m[minimcnt]=strat->P.p2;
2780 pNext(strat->M->m[minimcnt])
2781 = strat->p_shallow_copy_delete(
pNext(strat->M->m[minimcnt]),
2790 strat->T[strat->tl].is_sigsafe =
FALSE;
2797 superenterpairsSig(strat->P.p,strat->P.sig,strat->sl+1,strat->sl,strat->P.ecart,pos,strat, strat->tl);
2799 enterpairsSig(strat->P.p,strat->P.sig,strat->sl+1,strat->sl,strat->P.ecart,pos,strat, strat->tl);
2804 strat->enterS(strat->P, pos, strat, strat->tl);
2805 if(strat->sbaOrder != 1)
2808 for (
int tk=0; tk<strat->sl+1; tk++)
2829 for(
int ps=0;ps<strat->sl+1;ps++)
2833 if (strat->syzl == strat->syzmax)
2837 (strat->syzmax)*
sizeof(
unsigned long),
2839 *
sizeof(
unsigned long));
2842 Q.sig =
pCopy(strat->P.sig);
2845 if (strat->sbaOrder == 0)
2868 if(strat->sbaOrder == 0 || strat->sbaOrder == 3)
2871 unsigned max_cmp =
IDELEMS(F);
2879 if (strat->currIdx < idx)
2881 for (
int i=0;
i<strat->sl; ++
i)
2892 strat->currIdx = idx;
2898 for (
unsigned i=cmp+1;
i<=max_cmp; ++
i)
2901 for (
int j=0;
j<strat->sl; ++
j)
2919 if (strat->sbaOrder == 0)
2939 printf(
"---------------------------\n");
2940 Print(
" %d. ELEMENT ADDED TO GCURR:\n",strat->sl+1);
2963 if (hilb!=
NULL)
khCheck(
Q,
w,hilb,hilbeledeg,hilbcount,strat);
2966 if (strat->sl>srmax) srmax = strat->sl;
2970 case_when_red_result_changed:
2978 #if SBA_PRINT_ZERO_REDUCTIONS
2987 int pos =
posInSyz(strat, strat->P.sig);
2991 Print(
"ADDING STUFF TO SYZ : ");
2997 if (strat->P.p1 ==
NULL && strat->minim > 0)
3004 memset(&(strat->P), 0,
sizeof(strat->P));
3010 printf(
"\nSigDrop!\n");
3012 printf(
"\nEnded with no SigDrop\n");
3018 if(strat->P.sig !=
NULL)
3019 strat->sbaEnterS =
pGetComp(strat->P.sig)-1;
3022 memset(&(strat->P), 0,
sizeof(strat->P));
3041 clearS(strat->S[
j],strat->sevS[
j],&
k,&
j,strat);
3052 if (strat->completeReduce_retry)
3057 #ifdef HAVE_TAIL_RING
3058 if(
currRing->bitmask>strat->tailRing->bitmask)
3060 strat->completeReduce_retry=
FALSE;
3063 for(
i=strat->sl;
i>=0;
i--) strat->S_2_R[
i]=-1;
3066 if (strat->completeReduce_retry)
3073 #if SBA_PRINT_SIZE_SYZ
3075 size_syz = strat->syzl;
3088 #if SBA_PRINT_SIZE_G
3089 size_g_non_red =
IDELEMS(strat->Shdl);
3103 for(;
k>=0 && (strat->L[
k].p1 !=
NULL || strat->L[
k].p2 !=
NULL);
k--)
3113 for(;
k>=0 && strat->L[
k].p1 ==
NULL && strat->L[
k].p2 ==
NULL;
k--)
3116 strat->enterS(strat->L[
k], strat->sl+1, strat, strat->tl);
3124 for(
k=strat->sl;
k>=0;
k--)
3126 printf(
"\nsig[%i] = ",
i);
pWrite(strat->sig[
k]);
3127 if(strat->sig[
k] ==
NULL)
3128 strat->sig[
k] =
pCopy(strat->sig[
k-1]);
3137 if ((strat->sbaOrder == 1 || strat->sbaOrder == 3) && sRing!=currRingOld)
3146 if(strat->tailRing == sRing)
3157 #if SBA_PRINT_SIZE_G
3158 size_g =
IDELEMS(strat->Shdl);
3161 printf(
"SIZE OF SHDL: %d\n",
IDELEMS(strat->Shdl));
3163 while (oo<
IDELEMS(strat->Shdl))
3165 printf(
" %d. ",oo+1);
3170 #if SBA_PRINT_ZERO_REDUCTIONS
3171 printf(
"----------------------------------------------------------\n");
3172 printf(
"ZERO REDUCTIONS: %ld\n",zeroreductions);
3175 #if SBA_PRINT_REDUCTION_STEPS
3176 printf(
"----------------------------------------------------------\n");
3177 printf(
"S-REDUCTIONS: %ld\n",sba_reduction_steps);
3179 #if SBA_PRINT_OPERATIONS
3180 printf(
"OPERATIONS: %ld\n",sba_operations);
3182 #if SBA_PRINT_REDUCTION_STEPS
3183 printf(
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n");
3184 printf(
"INTERREDUCTIONS: %ld\n",sba_interreduction_steps);
3186 #if SBA_PRINT_OPERATIONS
3187 printf(
"INTERREDUCTION OPERATIONS: %ld\n",sba_interreduction_operations);
3189 #if SBA_PRINT_REDUCTION_STEPS
3190 printf(
"- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \n");
3191 printf(
"ALL REDUCTIONS: %ld\n",sba_reduction_steps+sba_interreduction_steps);
3192 sba_interreduction_steps = 0;
3193 sba_reduction_steps = 0;
3195 #if SBA_PRINT_OPERATIONS
3196 printf(
"ALL OPERATIONS: %ld\n",sba_operations+sba_interreduction_operations);
3197 sba_interreduction_operations = 0;
3200 #if SBA_PRINT_SIZE_G
3201 printf(
"----------------------------------------------------------\n");
3202 printf(
"SIZE OF G: %d / %d\n",size_g,size_g_non_red);
3206 #if SBA_PRINT_SIZE_SYZ
3207 printf(
"SIZE OF SYZ: %ld\n",size_syz);
3208 printf(
"----------------------------------------------------------\n");
3211 #if SBA_PRINT_PRODUCT_CRITERION
3212 printf(
"PRODUCT CRITERIA: %ld\n",product_criterion);
3213 product_criterion = 0;
3215 return (strat->Shdl);
◆ sbaCheckGcdPair()
Definition at line 1623 of file kutil.cc.
1626 if(strat->
sl < 0)
return FALSE;
1628 for(
i=0;
i<strat->
sl;
i++)
1664 h->i_r1 = -1;
h->i_r2 = -1;
◆ sbaRing()
Definition at line 11190 of file kutil.cc.
11211 res->block0 = (
int *)
omAlloc0((n+1)*
sizeof(int));
11212 res->block1 = (
int *)
omAlloc0((n+1)*
sizeof(int));
11213 int **wvhdl = (
int **)
omAlloc0((n+1)*
sizeof(
int*));
11214 res->wvhdl = wvhdl;
11215 for (
int i=1;
i<n;
i++)
11217 res->order[
i] = r->order[
i-1];
11218 res->block0[
i] = r->block0[
i-1];
11219 res->block1[
i] = r->block1[
i-1];
11220 res->wvhdl[
i] = r->wvhdl[
i-1];
11239 #ifndef SING_NDEBUG
11240 WarnS(
"error in nc_rComplete");
11259 res->block0 = (
int *)
omAlloc0((n+2)*
sizeof(int));
11260 res->block1 = (
int *)
omAlloc0((n+2)*
sizeof(int));
11261 int **wvhdl = (
int **)
omAlloc0((n+2)*
sizeof(
int*));
11262 res->wvhdl = wvhdl;
11263 for (
int i=2;
i<n+2;
i++)
11265 res->order[
i] = r->order[
i-2];
11266 res->block0[
i] = r->block0[
i-2];
11267 res->block1[
i] = r->block1[
i-2];
11268 res->wvhdl[
i] = r->wvhdl[
i-2];
11273 res->block0[0] = 1;
11275 for (
int i=0;
i<
res->N; ++
i)
11276 res->wvhdl[0][
i] = 1;
11295 #ifndef SING_NDEBUG
11296 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 6960 of file kutil.cc.
6965 PrintS(
"syzygy criterion checks: ");
6968 for (
int k=0;
k<strat->
syzl;
k++)
6973 Print(
"checking with: %d / %d -- \n",
k,strat->
syzl);
◆ syzCriterionInc()
Definition at line 6995 of file kutil.cc.
7002 PrintS(
"--- syzygy criterion checks: ");
7027 Print(
"checking with: %d -- ",
k);
◆ twoPow()
◆ updateResult()
void updateResult |
( |
ideal |
r, |
|
|
ideal |
Q, |
|
|
kStrategy |
strat |
|
) |
| |
Definition at line 10196 of file kutil.cc.
10221 if ((r->m[
l]!=
NULL)
10228 if ((
Q->m[q]!=
NULL)
10252 if ((r->m[
l]!=
NULL)
10259 if ((
Q->m[q]!=
NULL)
10303 reduction_found=
TRUE;
10334 reduction_found=
TRUE;
10348 if ( reduction_found)
◆ updateS()
Definition at line 8817 of file kutil.cc.
8843 while (i<=strat->sl)
8854 if (
pCmp(redSi,strat->
S[
i])!=0)
8911 if (any_change)
reorderS(&suc,strat);
8916 for (
i=0;
i<=strat->
sl;
i++)
8950 while (i<=strat->sl)
8962 else if (
pCmp((strat->
S)[
i],redSi)!=0)
9003 if (any_change)
reorderS(&suc,strat);
9004 else { suc=-1;
break; }
9015 for (
i=0;
i<=strat->
sl;
i++)
◆ updateSShift()
void updateSShift |
( |
kStrategy |
strat, |
|
|
int |
uptodeg, |
|
|
int |
lV |
|
) |
| |
Definition at line 11870 of file kutil.cc.
11887 for (
i=0;
i<=strat->
sl;
i++)
11889 memset(&
h,0,
sizeof(
h));
◆ 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)
KINLINE poly k_LmShallowCopyDelete_currRing_2_tailRing(poly p, ring tailRing, omBin tailBin)
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)
ideal kStdShift(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, int uptodeg, int lV)
#define pIsConstant(p)
like above, except that Comp might be != 0
void initBuchMoraCrit(kStrategy strat)
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)
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
int isInV(poly p, int lV)
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)
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)
void initBuchMoraShift(ideal F, ideal Q, kStrategy strat)
static poly p_Neg(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)
int itoInsert(poly p, int uptodeg, int lV, const ring r)
#define TEST_OPT_CONTENTSB
#define __p_GetComp(p, r)
KINLINE int ksReducePolyTailSig(LObject *PR, TObject *PW, LObject *Red, 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 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)
int posInT_EcartpLength(const TSet set, const int length, LObject &p)
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 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)
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)
void enterSMoraNF(LObject &p, int atS, kStrategy strat, int atR=-1)
BOOLEAN hasPurePower(const poly p, int last, int *length, kStrategy strat)
int posInT19(const TSet set, const int length, LObject &p)
poly p_LPshiftT(poly p, int sh, int uptodeg, int lV, kStrategy strat, const ring r)
int(* test_PosInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
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)
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)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
void ksCreateSpoly(LObject *Pair, poly spNoether, int use_buckets, ring tailRing, poly m1, poly m2, TObject **R)
int(* red2)(LObject *L, kStrategy strat)
void initEcartPairBba(LObject *Lp, poly, poly, int, int)
static short rVar(const ring r)
#define rVar(r) (r->N)
denominator_list_s * denominator_list
int posInLSpecial(const LSet set, const int length, LObject *p, const kStrategy)
#define ALLOW_PROD_CRIT(A)
int(* test_PosInT)(const TSet T, const int tl, LObject &h)
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)
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)
#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)
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)
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)
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 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)
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)
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)
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
denominator_list DENOMINATOR_LIST
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 ideal_isInV(ideal I, int lV)
int(* posInLSba)(const LSet set, const int length, LObject *L, const kStrategy strat)
void rDelete(ring r)
unconditionally deletes fields in r
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)
void enterpairsShift(poly h, int k, int ecart, int pos, kStrategy strat, int atR, int uptodeg, int lV)
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)
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)
poly p_Shrink(poly p, int lV, const ring r)
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)
void initSLSba(ideal F, ideal Q, kStrategy strat)
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 omMergeStickyBinIntoBin(omBin sticky_bin, omBin into_bin)
void reorderS(int *suc, kStrategy strat)
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
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
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:...
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 initenterpairsShift(poly h, int k, int ecart, int isFromQ, kStrategy strat, int atR, int uptodeg, int lV)
#define pLmDivisibleBy(a, b)
like pDivisibleBy, except that it is assumed that a!=NULL, b!=NULL
void updateSShift(kStrategy strat, int uptodeg, int lV)
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)
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)
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)
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)
#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)
unsigned long p_GetShortExpVector(const poly p, const ring r)
KINLINE TObject ** initR()
poly p_LPshift(poly p, int sh, int uptodeg, int lV, const ring r)
omBin omGetStickyBinOfBin(omBin bin)
BOOLEAN(* syzCrit)(poly sig, unsigned long not_sevSig, kStrategy strat)
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)
void enterTShift(LObject p, kStrategy strat, int atT, int uptodeg, int lV)
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)