384 printf(
"\nksReducePolySig\n");
390 #ifdef TEST_OPT_DEBUG_RED 436 printf(
"IN KSREDUCEPOLYSIG: \n");
440 printf(
"--------------\n");
454 printf(
"------------------- IN KSREDUCEPOLYSIG: --------------------\n");
459 printf(
"--------------\n");
468 printf(
"%d -- %d sig\n",sigSafe,PW->is_sigsafe);
482 printf(
"\nPossible sigdrop in ksreducepolysig (lost signature)\n");
488 if(
pLtCmp(PR->sig,origsig) == 1)
492 PR->is_redundant =
TRUE;
498 if(
pLtCmp(PR->sig,origsig) == -1)
501 printf(
"\nSigdrop in ksreducepolysig from * to *\n");
pWrite(origsig);
pWrite(PR->sig);
513 PR->is_redundant =
TRUE;
518 PR->is_redundant =
FALSE;
519 poly p1 = PR->GetLmTailRing();
520 poly p2 = PW->GetLmTailRing();
542 poly _p = (PR->t_p !=
NULL ? PR->t_p : PR->p);
545 if (PR->t_p!=
NULL) PR->t_p=_p;
else PR->p=_p;
554 PR->LmDeleteAndIter();
555 if (coef !=
NULL) *coef =
n_Init(1, tailRing);
568 if (strat ==
NULL)
return 2;
571 p1 = PR->GetLmTailRing();
572 p2 = PW->GetLmTailRing();
583 if (coef !=
NULL) *coef =
n_Init(1, tailRing);
593 if (((ct == 0) || (ct == 2)))
594 PR->Tail_Mult_nn(an);
595 if (coef !=
NULL) *coef = an;
600 if (coef !=
NULL) *coef =
n_Init(1, tailRing);
605 PR->Tail_Minus_mm_Mult_qq(lm, t2, PW->GetpLength() - 1, spNoether);
607 PR->LmDeleteAndIter();
610 #ifdef HAVE_SHIFTBBA_NONEXISTENT 619 PR->SetShortExpVector();
622 #if defined(KDEBUG) && defined(TEST_OPT_DEBUG_RED) static void nc_kBucketPolyRed(kBucket_pt b, poly p, number *c)
void nc_PolyPolyRed(poly &b, poly p, number *c, const ring r)
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
static BOOLEAN p_LmExpVectorAddIsOk(const poly p1, const poly p2, const ring r)
BEGIN_NAMESPACE_SINGULARXX const ring const ring tailRing
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
int ksCheckCoeff(number *a, number *b)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
static number p_SetCoeff(poly p, number n, ring r)
static int pLength(poly a)
poly p_Shrink(poly p, int lV, const ring r)
BOOLEAN p_CheckPolyRing(poly p, ring r)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static BOOLEAN p_DivisibleBy(poly a, poly b, const ring r)
static int p_LmCmp(poly p, poly q, const ring r)
BOOLEAN kStratChangeTailRing(kStrategy strat, LObject *L, TObject *T, unsigned long expbound)
static void p_ExpVectorSub(poly p1, poly p2, const ring r)
static void p_ExpVectorAdd(poly p1, poly p2, const ring r)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL ...
static BOOLEAN rField_is_Ring(const ring r)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static void p_ExpVectorAddSub(poly p1, poly p2, poly p3, const ring r)
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
static long p_MaxComp(poly p, ring lmRing, ring tailRing)
#define pCopy(p)
return a copy of the poly