26 # define PLURAL_INTERNAL_DECLARATIONS
94 #define freeT(A,v) omFreeSize((ADDRESS)A,(v+1)*sizeof(int))
95 #define freeN(A,k) omFreeSize((ADDRESS)A,k*sizeof(number))
152 const int pVariables = r->N;
154 for (
int i = pVariables;
i!=0;
i--)
197 const poly,
const ring
r)
208 shorter =
pLength(p)-org_p-org_q;
215 const int,
const ring
r)
230 return gnc_p_Minus_mm_Mult_qq(p, m, q, d1, i, t, r);
396 Print(
"gnc_p_Mult_mm: Multiplication in the left module from the right");
405 if (side==1) s=
"gnc_p_Mult_mm";
406 else s=
"gnc_mm_Mult_p";
407 Print(
"%s: exponent mismatch %d and %d\n",s,expP,expM);
471 memcpy(F, F0,(rN+1)*
sizeof(
int));
473 memcpy(G, G0,(rN+1)*
sizeof(
int));
479 while ((F[iF]==0)&&(iF>=1)) iF--;
490 while ((G[jG]==0)&&(jG<rN)) jG++;
492 while ((G[iG]==0)&&(iG>1)) iG--;
499 {
for(
int ii=rN;ii>0;ii--) F[ii]+=G[ii]; }
513 if (r->GetNC()->IsSkewConstant==1)
516 for(j=jG; j<=iG; j++)
521 for(i=j+1; i<=iF; i++)
523 cpower = cpower + F[
i];
525 cpower = cpower*G[
j];
526 tpower = tpower + cpower;
530 n_Power(cff,tpower,&tmp_num, r);
536 number totcff=
n_Init(1,r);
537 for(j=jG; j<=iG; j++)
542 for(i=j+1; i<=iF; i++)
548 n_Power(cff,cpower,&tmp_num, r);
549 cff =
n_Mult(totcff,tmp_num, r);
560 {
for(
int ii=rN;ii>0;ii--) F[ii]+=G[ii]; }
586 int cnt=0;
int cnf=0;
591 Prv[
i]=F[
i]; Nxt[
i]=0;
595 if (cnf==0)
freeT(Prv,rN);
597 for (i=jG+1;i<=rN;i++)
621 number *c=(number *)
omAlloc0((rN+1)*
sizeof(number));
628 for (i=jG;i<=rN;i++) U[i]=Nxt[i]+G[i];
728 while ((F[iF]==0)&&(iF>0)) iF-- ;
739 while ((F[jF]==0)&&(jF<=rN)) jF++;
794 int cnt=0;
int cnf=0;
798 Prv[
i]=F[
i]; Nxt[
i]=0;
807 for (i=jG+1;i<=rN;i++)
810 if (cnf!=0) { Prv[
i]=0;}
857 number *c=(number *)
omAlloc0((cnt+2)*
sizeof(number));
867 memcpy(U, Nxt,(rN+1)*
sizeof(
int));
932 num=
n_Mult(c[cnt+1],c[cnt],r);
982 matrix cMT=r->GetNC()->MT[cMTindex];
1004 cMT=r->GetNC()->MT[cMTindex];
1026 cMT=r->GetNC()->MT[cMTindex];
1060 if( FormulaMultiplier !=
NULL )
1061 PairType = FormulaMultiplier->
GetPair(j, i);
1115 n_Power(tmp_number,a*b,&tmp_number, r);
1128 if( FormulaMultiplier !=
NULL )
1129 PairType = FormulaMultiplier->
GetPair(j, i);
1142 int cMTsize=r->GetNC()->MTsize[vik];
1146 if (newcMTsize<=cMTsize)
1149 if (out !=
NULL)
return (out);
1152 if (newcMTsize > cMTsize)
1154 int inM=(((newcMTsize+6)/7)*7);
1155 assume (inM>=newcMTsize);
1160 for (k=1;k<=cMTsize;k++)
1162 for (m=1;m<=cMTsize;m++)
1176 r->GetNC()->MT[
UPMATELEM(j,i,rN)] = tmp;
1178 r->GetNC()->MTsize[
UPMATELEM(j,i,rN)] = newcMTsize;
1212 while ( (
MATELEM(cMT,1,toXY)==
NULL) && (toXY>=2)) toXY--;
1213 for (m=toXY+1;m<=
b;m++)
1226 WarnS(
"Error: a=1; MATELEM!=0");
1236 while ( (
MATELEM(cMT,toYX,1)==
NULL) && (toYX>=2)) toYX--;
1237 for (m=toYX+1;m<=
a;m++)
1250 WarnS(
"Error: b=1, MATELEM!=0");
1260 int dXY=0;
int dYX=0;
1263 int toX=a-1;
int toY=b-1;
1267 while ( (
MATELEM(cMT,toX,b)==
NULL) && (toX>=1)) toX--;
1270 while ( (
MATELEM(cMT,1,toXY)==
NULL) && (toXY>=1)) toXY--;
1276 while ( (
MATELEM(cMT,a,toY)==
NULL) && (toY>=1)) toY--;
1279 while ( (
MATELEM(cMT,toYX,1)==
NULL) && (toYX>=1)) toYX--;
1290 for (m=toXY+1;m<=
b;m++)
1303 WarnS(
"dYX>=dXY,toXY; MATELEM==0");
1310 for (k=toX+1;k<=
a;k++)
1323 WarnS(
"dYX>=dXY,toX; MATELEM==0");
1335 for (m=toYX+1;m<=
a;m++)
1348 WarnS(
"dYX<dXY,toYX; MATELEM==0");
1355 for (k=toY+1;k<=
b;k++)
1368 WarnS(
"dYX<dXY,toY; MATELEM==0");
1397 dReportError(
"nc_ReduceSpolyOld: different components");
1451 if ((lCompP1!=lCompP2) && (lCompP1!=0) && (lCompP2!=0))
1454 Werror(
"gnc_ReduceSpolyNew: different non-zero components!");
1524 dReportError(
"gnc_CreateSpolyOld : different components!");
1535 pL =
p_Lcm(p1,p2,r);
1619 if ((lCompP1!=lCompP2) && (lCompP1!=0) && (lCompP2!=0))
1622 Werror(
"gnc_CreateSpolyNew: different non-zero components!");
1676 WarnS(
"gnc_CreateSpolyNew: wrong monomials!");
1732 Werror(
"ERROR in nc_CreateSpoly: result of multiplication is Zero!\n");
1887 void gnc_ReduceSpolyTail(
poly p1,
poly q,
poly q2,
poly spNoether,
const ring
r)
1904 number MinusOne=
n_Init(-1,r);
1936 if ((lCompP1!=lCompP2) && (lCompP1!=0) && (lCompP2!=0))
1939 Werror(
"nc_CreateShortSpoly: wrong module components!");
1946 #ifdef HAVE_RATGRING
2008 if( !
kbTest(b) )
Werror(
"nc_kBucketPolyRed: broken bucket!");
2109 if (c!=
NULL) *c=ctmp;
2143 if (c!=
NULL) *c=ctmp;
2191 PrintS(
"nc_PolyPolyRedNew(");
2255 if(b ==
NULL)
return;
2366 if (i<j) {nMax=
j; nMin=
i;}
else {nMax=
i; nMin=
j;}
2385 if (i>j) bres=
p_Neg(bres, r);
2390 memcpy(aSUFFIX, M1,(rN+1)*
sizeof(
int));
2391 memcpy(aPREFIX, M1,(rN+1)*
sizeof(
int));
2392 for (k=1;k<=
j;k++) aSUFFIX[k]=0;
2393 for (k=j;k<=rN;k++) aPREFIX[k]=0;
2415 memcpy(aSUFFIX, M2,(rN+1)*
sizeof(
int));
2416 memcpy(aPREFIX, M2,(rN+1)*
sizeof(
int));
2417 for (k=1;k<=
i;k++) aSUFFIX[k]=0;
2418 for (k=i;k<=rN;k++) aPREFIX[k]=0;
2452 if (a>b) {j=
b; i=
a;}
2476 for(s=1;s<=
size;s++)
2478 for(t=1;t<=
size;t++)
2497 totdeg=totdeg+
p_Deg(p,r);
2500 number ntd =
n_Init(totdeg, r);
2501 number nln =
n_Init(length, r);
2502 number nres=
n_Div(ntd,nln, r);
2530 if( r->GetNC()->GetGlobalMultiplier() !=
NULL )
2532 delete r->GetNC()->GetGlobalMultiplier();
2533 r->GetNC()->GetGlobalMultiplier() =
NULL;
2536 if( r->GetNC()->GetFormulaPowerMultiplier() !=
NULL )
2538 delete r->GetNC()->GetFormulaPowerMultiplier();
2539 r->GetNC()->GetFormulaPowerMultiplier() =
NULL;
2549 for(j=i+1;j<=rN;j++)
2561 if(
rIsSCA(r) && (r->GetNC()->SCAQuotient() !=
NULL) )
2632 int i;
int j;
int k;
2635 for (i=1; i<rN; i++)
2639 for (j=i+1; j<=rN; j++)
2652 if (ExpVar[k]!=0) OK=0;
2693 for(i=1; i<r->N; i++)
2695 for(j=i+1; j<=r->N; j++)
2706 Werror(
"Bad ordering at %d,%d\n",i,j);
2737 bool bSetupQuotient,
bool bCopyInput,
bool bBeQuiet,
2738 ring curr,
bool dummy_ring )
2743 if( !bSetupQuotient)
2762 WarnS(
"commutative ring with 1 variable");
2779 PrintS(
"nc_CallPlural(), Input data, CCC: \n");
2784 PrintS(
"nc_CallPlural(), Input data, DDD: \n");
2797 if( (!bBeQuiet) && (r->GetNC() !=
NULL) )
2798 WarnS(
"going to redefine the algebra structure");
2805 matrix C;
bool bCnew =
false;
2813 bool IsSkewConstant =
false, tmpIsSkewConstant;
2832 Werror(
"Square %d x %d matrix expected", r->N, r->N);
2839 if (( CCC !=
NULL) && (CC ==
NULL)) CC = CCC;
2840 if (( CCN !=
NULL) && (CN ==
NULL)) CN = CCN;
2851 Werror(
"Square %d x %d matrix expected",r->N,r->N);
2859 if (( DDD !=
NULL) && (DD ==
NULL)) DD = DDD;
2860 if (( DDN !=
NULL) && (DN ==
NULL)) DN = DDN;
2868 Werror(
"Incorrect input : non-constants are not allowed as coefficients (first argument)");
2876 Werror(
"Incorrect input : zero coefficients are not allowed");
2888 IsSkewConstant =
true;
2890 C =
mpNew(r->N,r->N);
2893 for(i=1; i<r->N; i++)
2894 for(j=i+1; j<=r->N; j++)
2902 if ( (CN ==
NULL) && (CC !=
NULL) )
2912 tmpIsSkewConstant =
true;
2914 for(i=1; i<r->N; i++)
2915 for(j=i+1; j<=r->N; j++)
2923 Werror(
"Incorrect input : non-constants are not allowed as coefficients (first argument at [%d, %d])", i, j);
2934 Werror(
"Incorrect input : matrix of coefficients contains zeros in the upper triangle");
2941 if (!
n_Equal(pN, qN, curr->cf)) tmpIsSkewConstant =
false;
2955 IsSkewConstant = tmpIsSkewConstant;
2957 if ( tmpIsSkewConstant &&
n_IsOne(pN, curr) )
2966 D =
mpNew(r->N,r->N); bDnew =
true;
2976 for(i=1; i<r->N; i++)
2977 for(j=i+1; j<=r->N; j++)
2987 for(
int i = 1; (i < r->N) && b; i++)
2988 for(
int j = i+1; (j <= r->N) && b; j++)
3019 PrintS(
"nc_CallPlural(), Computed data, C: \n");
3022 PrintS(
"nc_CallPlural(), Computed data, D: \n");
3025 Print(
"\nTemporary: type = %d, IsSkewConstant = %d\n", nctype, IsSkewConstant);
3035 Werror(
"Matrix of polynomials violates the ordering condition");
3055 if (r->GetNC() !=
NULL)
3058 WarnS(
"Changing the NC-structure of an existing NC-ring!!!");
3063 r->GetNC() = nc_new;
3079 WarnS(
"Error occured while coping/setuping the NC structure!");
3096 r->GetNC()->IsSkewConstant=1;
3113 r->GetNC()->MTsize = (
int *)
omAlloc0((r->N*(r->N-1))/2*
sizeof(
int));
3121 for(i=1; i<r->N; i++)
3123 for(j=i+1; j<=r->N; j++)
3128 r->GetNC()->MTsize[
UPMATELEM(i,j,r->N)] = 1;
3137 r->GetNC()->MTsize[
UPMATELEM(i,j,r->N)] = DefMTsize;
3138 r->GetNC()->MT[
UPMATELEM(i,j,r->N)] =
mpNew(DefMTsize, DefMTsize);
3166 r->GetNC()->IsSkewConstant = 0;
3170 r->GetNC()->COM=
COM;
3190 p_Procs->p_Mult_mm = rGR->p_Procs->p_Mult_mm =
gnc_p_Mult_mm;
3237 p_Procs->p_Minus_mm_Mult_qq =
NULL;
3243 r->GetNC()->SPoly() = gnc_CreateSpoly;
3244 r->GetNC()->ReduceSPoly() = gnc_ReduceSpoly;
3289 pow = PRE[
n]; PRE[
n]=0;
3293 for (i=n+1; i<=rN; i++)
3335 for(
int i=1;
i<rr->N;
i++)
3336 for(
int j=
i+1;
j<=rr->N;
j++)
3340 WarnS(
"Error initializing multiplication!");
3352 if (dstRing == srcRing)
3354 return(
p_Copy(p,dstRing));
3365 int *par_perm = (
int *)
omAlloc0((
rPar(srcRing)+1)*
sizeof(
int));
3373 if ((shift<0) || (shift >
rVar(srcRing)))
3375 Werror(
"bad shifts in p_CopyEmbed");
3378 for (i=1; i<= srcRing->N; i++)
3382 q =
p_PermPoly(p,perm,srcRing, dstRing, nMap,par_perm,
rPar(srcRing));
3390 int diagnose =
TRUE;
3398 if (rBase->N != rCandidate->N) diagnose =
FALSE;
3417 if ( Rop == dst )
return(
p_Copy(p, dst));
3423 WarnS(
"an opposite ring should be used");
3434 int *perm=(
int *)
omAlloc0((Rop->N+1)*
sizeof(
int));
3439 for(i=1; i<=Rop->N; i++)
3441 perm[
i] = Rop->N+1-
i;
3456 if ( Rop == dst )
return id_Copy(I, dst);
3461 WarnS(
"an opposite ring should be used");
3466 for (i=0; i< (I->ncols)*(I->nrows); i++)
3468 idOp->m[
i] =
pOppose(Rop,I->m[i], dst);
3477 if( rGR->qideal ==
NULL )
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
static FORCE_INLINE number n_Sub(number a, number b, const coeffs r)
return the difference of 'a' and 'b', i.e., a-b
BOOLEAN kbTest(kBucket_pt bucket)
Tests.
const const intvec const intvec const ring _currRing const const intvec const intvec const ring _currRing int
ideal idOppose(ring Rop, ideal I, const ring dst)
opposes a module I from Rop to currRing(dst)
const CanonicalForm int s
poly nc_mm_Bracket_nn(poly m1, poly m2, const ring r)
returns [m1,m2] for two monoms, destroys nothing without coeffs
const CanonicalForm int const CFList const Variable & y
void p_DebugPrint(poly p, const ring r)
CFArray copy(const CFList &list)
write elements of list into an array
poly prCopyR_NoSort(poly p, ring src_r, ring dest_r)
poly _gnc_p_Mult_q(poly p, poly q, const int copy, const ring r)
static poly p_LmDeleteAndNext(poly p, const ring r)
poly p_Lcm(const poly a, const poly b, const long lCompM, const ring r)
void nc_rKill(ring r)
complete destructor
BOOLEAN p_ComparePolys(poly p1, poly p2, const ring r)
returns TRUE if p1 is a skalar multiple of p2 assume p1 != NULL and p2 != NULL
number kBucketPolyRed(kBucket_pt bucket, poly p1, int l1, poly spNoether)
ideal id_Copy(ideal h1, const ring r)
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
static int rPar(const ring r)
(r->cf->P)
static poly p_Mult_mm(poly p, poly m, const ring r)
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
poly p_CopyEmbed(poly p, ring srcRing, int shift, int, ring dstRing)
void nc_p_ProcsSet(ring rGR, p_Procs_s *p_Procs)
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
struct p_Procs_s p_Procs_s
poly gnc_CreateSpolyOld(const poly p1, const poly p2, const ring r)
poly pOppose(ring Rop, poly p, const ring dst)
opposes a vector p from Rop to currRing (dst!)
void nc_PolyPolyRedNew(poly &b, poly p, number *c, const ring r)
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
static void p_GetExpV(poly p, int *ev, const ring r)
#define omFreeSize(addr, size)
poly nc_p_Minus_mm_Mult_qq(poly p, const poly m, const poly q, int &shorter, const poly, const ring r)
for p_Minus_mm_Mult_qq in pInline2.h
const CanonicalForm CFMap CFMap int &both_non_zero int n
const poly kBucketGetLm(kBucket_pt bucket)
static short rVar(const ring r)
#define rVar(r) (r->N)
void id_Delete(ideal *h, ring r)
#define MIN_LENGTH_BUCKET
poly gnc_mm_Mult_nn(int *F, int *G, const ring r)
gmp_float log(const gmp_float &a)
static poly pp_Mult_mm(poly p, poly m, const ring r)
ideal gnc_gr_bba(const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing)
bool nc_SetupQuotient(ring rGR, const ring rG, bool bCopy)
static poly gnc_uu_Mult_ww_formula(int i, int a, int j, int b, const ring r)
poly gnc_p_Mult_mm_Common(poly p, const poly m, int side, const ring r)
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
poly gnc_pp_Mult_mm(const poly p, const poly m, const ring r, poly &last)
static bool rIsPluralRing(const ring r)
we must always have this test!
static number p_SetCoeff(poly p, number n, ring r)
BOOLEAN nc_CheckSubalgebra(poly PolyVar, ring r)
static int pLength(poly a)
static void p_SetExpV(poly p, int *ev, const ring r)
poly nc_CreateShortSpoly(poly p1, poly p2, const ring r)
static poly p_Copy(poly p, const ring r)
returns a copy of p
poly gnc_ReduceSpolyNew(const poly p1, poly p2, const ring r)
BOOLEAN rIsLikeOpposite(ring rBase, ring rCandidate)
checks whether rings rBase and rCandidate could be opposite to each other returns TRUE if it is so ...
void iiWriteMatrix(matrix im, const char *n, int dim, const ring r, int spaces)
set spaces to zero by default
#define TEST_OPT_NOT_BUCKETS
void nc_CleanUp(nc_struct *p)
static BOOLEAN p_LmIsConstant(const poly p, const ring r)
void p_Cleardenom_n(poly ph, const ring r, number &c)
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
void gnc_kBucketPolyRed_ZNew(kBucket_pt b, poly p, number *c)
static poly nc_mm_Mult_p(const poly m, poly p, const ring r)
static poly p_Head(poly p, const ring r)
bool nc_rCopy(ring res, const ring r, bool bSetupQuotient)
long p_Deg(poly a, const ring r)
poly p_LcmRat(const poly a, const poly b, const long lCompM, const ring r)
poly _nc_p_Mult_q(poly pPolyP, poly pPolyQ, const ring rRing)
general NC-multiplication with destruction
poly gnc_uu_Mult_ww_vert(int i, int a, int j, int b, const ring r)
static void p_SetCompP(poly p, int i, ring r)
const CanonicalForm CFMap CFMap & N
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent : the integer VarOffset encodes:
poly nc_p_Bracket_qq(poly p, const poly q, const ring r)
returns [p,q], destroys p
static BOOLEAN p_IsConstant(const poly p, const ring r)
poly gnc_mm_Mult_p(const poly m, poly p, const ring r)
poly nc_p_CopyGet(poly a, const ring r)
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
poly gnc_CreateSpolyNew(const poly p1, const poly p2, const ring r)
poly gnc_mm_Mult_pp(const poly m, const poly p, const ring r)
void gnc_kBucketPolyRedOld(kBucket_pt b, poly p, number *c)
D(ideal gnc_gr_bba(const ideal, const ideal, const intvec *, const intvec *, kStrategy, const ring _currRing)) D(ideal gnc_gr_mora(const ideal
Modified Plural's Buchberger's algorithmus.
static BOOLEAN p_DivisibleBy(poly a, poly b, const ring r)
static int p_LmCmp(poly p, poly q, const ring r)
static FORCE_INLINE number n_Invers(number a, const coeffs r)
return the multiplicative inverse of 'a'; raise an error if 'a' is not invertible ...
BOOLEAN rSamePolyRep(ring r1, ring r2)
returns TRUE, if r1 and r2 represents the monomials in the same way FALSE, otherwise this is an analo...
static FORCE_INLINE number n_InpNeg(number n, const coeffs r)
in-place negation of n MUST BE USED: n = n_InpNeg(n) (no copy is returned)
static int si_max(const int a, const int b)
void gnc_kBucketPolyRedNew(kBucket_pt b, poly p, number *c)
BOOLEAN gnc_InitMultiplication(ring r, bool bSetupQuotient=false)
void PrintS(const char *s)
static poly p_Mult_nn(poly p, number n, const ring r)
void sca_p_ProcsSet(ring rGR, p_Procs_s *p_Procs)
poly gnc_uu_Mult_ww_horvert(int i, int a, int j, int b, const ring r)
poly gnc_mm_Mult_uu(int *F, int jG, int bG, const ring r)
void p_Content(poly ph, const ring r)
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
static BOOLEAN p_LmDivisibleBy(poly a, poly b, const ring r)
void mp_Delete(matrix *a, const ring r)
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
BOOLEAN pqLength(poly p, poly q, int &lp, int &lq, const int min)
BOOLEAN p_HasNotCF(poly p1, poly p2, const ring r)
BOOLEAN nc_CallPlural(matrix CCC, matrix DDD, poly CCN, poly DDN, ring r, bool bSetupQuotient, bool bCopyInput, bool bBeQuiet, ring curr, bool dummy_ring)
returns TRUE if there were errors analyze inputs, check them for consistency detects nc_type...
matrix mpNew(int r, int c)
create a r x c zero-matrix
void p_Write0(poly p, ring lmRing, ring tailRing)
static void p_Delete(poly *p, const ring r)
ideal idInit(int idsize, int rank)
poly p_PermPoly(poly p, const int *perm, const ring oldRing, const ring dst, nMapFunc nMap, const int *par_perm, int OldPar)
const Variable & v
< [in] a sqrfree bivariate poly
static void p_ExpVectorDiff(poly pr, poly p1, poly p2, const ring r)
BOOLEAN gnc_CheckOrdCondition(matrix D, ring r)
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent : VarOffset encodes the position in p->exp
static FORCE_INLINE void n_Power(number a, int b, number *res, const coeffs r)
fill res with the power a^b
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
void * cast_A_to_vptr(A a)
poly gnc_ReduceSpolyOld(const poly p1, poly p2, const ring r)
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of 'a' and 'b', i.e., a/b; raises an error if 'b' is not invertible in r exceptio...
void nc_PolyPolyRedOld(poly &b, poly p, number *c, const ring r)
poly _nc_pp_Mult_qq(const poly pPolyP, const poly pPolyQ, const ring rRing)
general NC-multiplication without destruction
poly nc_pSubst(poly p, int n, poly e, const ring r)
substitute the n-th variable by e in p destroy p e is not a constant
poly gnc_uu_Mult_ww(int i, int a, int j, int b, const ring r)
bool sca_SetupQuotient(ring rGR, ring rG, bool bCopy)
static p_Procs_s * _p_procs
static BOOLEAN p_IsConstantPoly(const poly p, const ring r)
ideal gnc_gr_mora(const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing)
static bool rIsSCA(const ring r)
static FORCE_INLINE BOOLEAN n_Equal(number a, number b, const coeffs r)
TRUE iff 'a' and 'b' represent the same number; they may have different representations.
BOOLEAN ncInitSpecialPairMultiplication(ring r)
static void p_Setm(poly p, const ring r)
static long p_AddExp(poly p, int v, long ee, ring r)
matrix mp_Copy(matrix a, const ring r)
copies matrix a (from ring r to r)
static nc_type & ncRingType(nc_struct *p)
static FORCE_INLINE number n_SubringGcd(number a, number b, const coeffs r)
int dReportError(const char *fmt,...)
void gnc_kBucketPolyRed_ZOld(kBucket_pt b, poly p, number *c)
static poly p_Neg(poly p, const ring r)
static void p_LmDelete(poly p, const ring r)
static poly nc_mm_Mult_pp(const poly m, const poly p, const ring r)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static FORCE_INLINE BOOLEAN n_IsMOne(number n, const coeffs r)
TRUE iff 'n' represents the additive inverse of the one element, i.e. -1.
void p_Write(poly p, ring lmRing, ring tailRing)
static void gnc_p_ProcsSet(ring rGR, p_Procs_s *p_Procs)
CPolynomialSummator: unifies bucket and polynomial summation as the later is brocken in buckets :(...
static poly p_Add_q(poly p, poly q, const ring r)
void nc_PolyPolyRed(poly &b, poly p, number *c, const ring r)
poly nc_p_Plus_mm_Mult_qq(poly p, const poly m, const poly q, int &lp, const int, const ring r)
Rational pow(const Rational &a, int e)
ring nc_rCreateNCcomm(ring r)
static poly p_Init(const ring r, omBin bin)
poly nc_p_CopyPut(poly a, const ring r)
poly p_Cleardenom(poly p, const ring r)
poly gnc_p_Mult_mm(poly p, const poly m, const ring r)
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
static bool rIsRatGRing(const ring r)
poly p_Power(poly p, int i, const ring r)
void Werror(const char *fmt,...)
bool ncExtensions(int iMask)
matrix nc_PrintMat(int a, int b, ring r, int metric)
returns matrix with the info on noncomm multiplication
int setNCExtensions(int iMask)
#define UPMATELEM(i, j, nVar)
#define MATELEM(mat, i, j)
void kBucket_Add_q(kBucket_pt bucket, poly q, int *l)
Add to Bucket a poly ,i.e. Bpoly == q+Bpoly.