7 #define PLURAL_INTERNAL_DECLARATIONS
45 return(nc_ReduceSPoly(p1,
p_Copy(p2,r),r));
114 (*h).ecart = d-(*h).FDeg;
133 && ((d >= reddeg) || (pass > strat->
LazyPass))
136 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
182 for (
i=
currRing->real_var_start;i<=currRing->real_var_end;
i++)
258 Print(
" with S[%d]= ",c_j);
294 (*h).ecart = d-(*h).FDeg;
298 c_j=-1; c_e=-2; c_p=
NULL;
315 if ((c_j<0)||(c_e>=0))
332 if ((c_j<0)||(c_e>a_e))
580 if ((strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
641 int i,
j,at,reddeg,d,pass,ei;
657 ei = strat->
T[
j].ecart;
669 if ((!
BTEST1(20)) && (ei <= (*h).ecart))
679 ei = strat->
T[
i].ecart;
696 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
736 if (ei <= (*h).ecart)
760 if ((strat->
Ll >= 0) && ((d > reddeg) || (pass > strat->
LazyPass)))
762 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
778 Print(
" degree jumped: -> L%d\n",at);
820 int j,jbest,at,reddeg,d,pass;
838 p=spSpolyCreate(strat->
T[
j].p,(*h).p,strat->
kNoether);
862 ph=spSpolyCreate(strat->
T[
j].p,(*h).p,strat->
kNoether);
927 if ((strat->
Ll >= 0) && ((pass > strat->
LazyPass) || (d > reddeg)))
929 at = strat->
posInL(strat->
L,strat->
Ll,
h,strat);
1000 for(jj=
currRing->real_var_start;jj<=currRing->real_var_end;jj++)
1002 if(
pGetExp(F->m[ii],jj)>0) { is_rat_id=
TRUE;
break; }
1004 if (is_rat_id)
break;
1050 PrintS(
"<gnc_gr_bba>\n");
1091 while (strat->
Ll >= 0)
1110 strat->
P = strat->
L[strat->
Ll];
1114 if (strat->
P.p !=
NULL)
1132 #ifdef HAVE_RATGRING
1156 if (strat->
P.p !=
NULL)
1160 &olddeg,&reduc,strat, red_result);
1172 strat->
red(&strat->
P,strat);
1181 if (strat->
P.p !=
NULL)
1190 #ifdef HAVE_RATGRING
1196 PrintS(
"unit element detected:");
1200 strat->
P.p =
pOne();
1205 int pos=
posInS(strat,strat->
sl,strat->
P.p, strat->
P.ecart);
1211 #ifdef HAVE_RATGRING
1240 if (strat->
sl==-1) pos=0;
1241 else pos=
posInS(strat,strat->
sl,strat->
P.p,strat->
P.ecart);
1243 strat->
enterS(strat->
P,pos,strat,-1);
1299 PrintS(
"</gnc_gr_bba>\n");
1304 return (strat->
Shdl);
1311 WarnS(
"Sorry, non-commutative mora is not yet implemented!");
static int si_min(const int a, const int b)
int(* posInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
void(* initEcartPair)(LObject *h, poly f, poly g, int ecartF, int ecartG)
void(* enterS)(LObject &h, int pos, kStrategy strat, int atR)
void(* initEcart)(TObject *L)
int(* posInT)(const TSet T, const int tl, LObject &h)
int(* red)(LObject *L, kStrategy strat)
int redGrRatGB(LObject *h, kStrategy strat)
ideal k_gnc_gr_mora(const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing)
int redGrFirst(LObject *h, kStrategy strat)
void nc_gr_initBba(ideal F, kStrategy strat)
nc_gr_initBba is needed for sca_gr_bba and gr_bba.
void ratGB_divide_out(poly p)
ideal k_gnc_gr_bba(const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing)
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize)
KINLINE void clearS(poly p, unsigned long p_sev, int *at, int *k, kStrategy strat)
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
void initBuchMora(ideal F, ideal Q, kStrategy strat)
void enterT(LObject &p, kStrategy strat, int atT)
void enterL(LSet *set, int *length, int *LSetmax, LObject p, int at)
void enterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
void initEcartPairMora(LObject *Lp, poly, poly, int ecartF, int ecartG)
void initBuchMoraPos(kStrategy strat)
int posInL0(const LSet set, const int length, LObject *p, const kStrategy)
void exitBuchMora(kStrategy strat)
void initEcartNormal(TObject *h)
int posInS(const kStrategy strat, const int length, const poly p, const int ecart_p)
int posInT110(const TSet set, const int length, LObject &p)
void updateResult(ideal r, ideal Q, kStrategy strat)
void deleteInL(LSet set, int *length, int j, kStrategy strat)
void initBuchMoraCrit(kStrategy strat)
void completeReduce(kStrategy strat, BOOLEAN withT)
void messageSets(kStrategy strat)
void initEcartBBA(TObject *h)
int posInL11(const LSet set, const int length, LObject *p, const kStrategy)
void initEcartPairBba(LObject *Lp, poly, poly, int, int)
void messageStat(int hilbcount, kStrategy strat)
void enterSBba(LObject &p, int atS, kStrategy strat, int atR)
static poly nc_CreateSpoly(const poly p1, const poly p2, const ring r)
poly nc_CreateShortSpoly(poly p1, poly p2, const ring r)
static poly nc_ReduceSpoly(const poly p1, poly p2, const ring r)
poly gnc_ReduceSpolyNew(const poly p1, poly p2, const ring r)
#define TEST_OPT_INTSTRATEGY
#define TEST_OPT_DEGBOUND
poly p_Cleardenom(poly p, const ring r)
static BOOLEAN p_LmDivisibleBy(poly a, poly b, const ring r)
static void p_Delete(poly *p, const ring r)
static void p_LmFree(poly p, ring)
static BOOLEAN p_LmDivisibleByPart(poly a, poly b, const ring r, const int start, const int end)
static poly p_Copy(poly p, const ring r)
returns a copy of p
static long p_Totaldegree(poly p, const ring r)
void p_wrp(poly p, ring lmRing, ring tailRing)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
void rChangeCurrRing(ring r)
Compatiblity layer for legacy polynomial operations (over currRing)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
#define pIsConstant(p)
like above, except that Comp might be != 0
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced
#define pGetExp(p, i)
Exponent.
void pNorm(poly p, const ring R=currRing)
#define pDivisibleBy(a, b)
returns TRUE, if leading monom of a divides leading monom of b i.e., if there exists a expvector c > ...
#define pLmCmp(p, q)
returns 0|1|-1 if p=q|p>q|p<q w.r.t monomial ordering
poly nc_rat_CreateSpoly(poly pp1, poly pp2, int ishift, const ring r)
BOOLEAN p_LmIsConstantRat(const poly p, const ring r)
poly nc_rat_ReduceSpolyNew(const poly p1, poly p2, int ishift, const ring r)
void PrintS(const char *s)
void rWrite(ring r, BOOLEAN details)
void rDebugPrint(const ring r)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static BOOLEAN rIsRatGRing(const ring r)
static short rVar(const ring r)
#define rVar(r) (r->N)