58 poly &m1, poly &m2,
const ring m_r)
65 for (i = p_r->N; i; i--)
83 if (cp1 != 0 && cp2 != 0)
85 while (cp1%2 == 0 && cp2%2 == 0)
126 Print(
"%d-step RedNF - g=", c);
154 if (rside ==
NULL)
return -1;
157 for (i = 0; i <
IDELEMS(G); i++)
207 while (h !=
NULL && i >= 0) {
231 for (i = 0; i <
IDELEMS(I); i++) {
233 PrintS(
"Not reduced to zero from I: ");
242 PrintS(
" Yes!\nspoly --> 0?");
243 for (i = 0; i <
IDELEMS(GI); i++)
245 for (j = i + 1; j <
IDELEMS(GI); j++)
273 PrintS(
" Yes!\nzero-spoly --> 0?");
274 for (i = 0; i <
IDELEMS(GI); i++)
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...
KINLINE BOOLEAN k_GetLeadTerms(const poly p1, const poly p2, const ring p_r, poly &m1, poly &m2, const ring m_r)
Compatiblity layer for legacy polynomial operations (over currRing)
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
static poly p_Mult_mm(poly p, poly m, const ring r)
int ksCheckCoeff(number *a, number *b)
int findRingSolver(poly rside, ideal G, ring r)
#define pLmDelete(p)
assume p != NULL, deletes Lm(p)->coef and Lm(p)
static poly pp_Mult_mm(poly p, poly m, const ring r)
static BOOLEAN rField_is_Domain(const ring r)
poly reduce_poly_fct(poly p, ring r)
int testGB(ideal I, ideal GI)
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 poly p_Copy(poly p, const ring r)
returns a copy of p
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 ...
poly spolyRing2toM(poly f, poly g, ring r)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
static long p_GetExpDiff(poly p1, poly p2, int i, ring r)
BOOLEAN ring2toM_GetLeadTerms(const poly p1, const poly p2, const ring p_r, poly &m1, poly &m2, const ring m_r)
void PrintS(const char *s)
void printPolyMsg(const char *start, poly f, const char *end)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL ...
static BOOLEAN p_LmDivisibleBy(poly a, poly b, const ring r)
poly ringRedNF(poly f, ideal G, ring r)
poly kFindZeroPoly(poly input_p, ring leadRing, ring tailRing)
poly plain_spoly(poly f, poly g)
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
#define __p_Mult_nn(p, n, r)
static void p_Setm(poly p, const ring r)
poly plain_zero_spoly(poly h)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
poly ringNF(poly f, ideal G, ring r)
static poly p_Init(const ring r, omBin bin)
#define pCopy(p)
return a copy of the poly