27#define PLURAL_INTERNAL_DECLARATIONS 
   53  PrintS(
"ncInitSpecialPowersMultiplication(ring), ring: \n");
 
   62  if( r->GetNC()->GetFormulaPowerMultiplier() != 
NULL )
 
   64    WarnS(
"Already defined!");
 
   85  Print(
"AreCommutingVariables(ring, k: %d, i: %d)!\n", 
j, 
i);
 
  104    const poly d = 
GetD(r, 
i, 
j);
 
  136  Print(
"AnalyzePair(ring, i: %d, j: %d):\n", 
i, 
j);
 
  146  const poly c = 
GetC(r, 
i, 
j);
 
  148  const poly d = 
GetD(r, 
i, 
j);
 
  190          } 
else if ( 
exp == 2 && 
k!= 
i && 
k != 
j)  
 
  209  PrintS(
"====>>>>_ncSA_notImplemented\n");
 
  219  PrintS(
"CFormulaPowerMultiplier::CFormulaPowerMultiplier(ring)!");
 
  236  PrintS(
"CFormulaPowerMultiplier::~CFormulaPowerMultiplier()!");
 
  259static inline poly 
ncSA_1xy0x0y0(
const int i, 
const int j, 
const int n, 
const int m, 
const ring r)
 
  262  Print(
"ncSA_1xy0x0y0(var(%d)^{%d}, var(%d)^{%d}, r)!\n", 
j, 
m, 
i, n);
 
  276static inline poly 
ncSA_Mxy0x0y0(
const int i, 
const int j, 
const int n, 
const int m, 
const ring r)
 
  279  Print(
"ncSA_{M = -1}xy0x0y0(var(%d)^{%d}, var(%d)^{%d}, r)!\n", 
j, 
m, 
i, n);
 
  282  const int  sign = 1 - ((n & (
m & 1)) << 1);
 
  295static inline poly 
ncSA_Qxy0x0y0(
const int i, 
const int j, 
const int n, 
const int m, 
const number m_q, 
const ring r)
 
  298  Print(
"ncSA_Qxy0x0y0(var(%d)^{%d}, var(%d)^{%d}, Q, r)!\n", 
j, 
m, 
i, n);
 
  344static inline poly 
ncSA_1xy0x0yG(
const int i, 
const int j, 
const int n, 
const int m, 
const number m_g, 
const ring r)
 
  347  Print(
"ncSA_1xy0x0yG(var(%d)^{%d}, var(%d)^{%d}, G, r)!\n", 
j, 
m, 
i, n);
 
  348  number t = 
n_Copy(m_g, r->cf);
 
  356  number c = 
n_Init(1, r->cf);
 
  375    number t = 
n_Init(km + 1, r->cf);
 
  380    t = 
n_Init(kn + 1, r->cf);
 
  385    c = 
n_Div(c, t, r->cf);
 
  404  assume((km == 0) || (kn == 0) );
 
  411      number t = 
n_Init(km + 1, r->cf);
 
  418      number t = 
n_Init(kn + 1, r->cf);
 
  424    c = 
n_Div(c, t, r->cf);
 
  443static inline poly 
ncSA_1xy0x0yT2(
const int i, 
const int j, 
const int n, 
const int m, 
const int m_k, 
const ring r)
 
  446  Print(
"ncSA_1xy0x0yT2(var(%d)^{%d}, var(%d)^{%d}, t: var(%d), r)!\n", 
j, 
m, 
i, n, m_k);
 
  453  number c = 
n_Init(1, r->cf);
 
  473    number t = 
n_Init(km + 1, r->cf);
 
  478    t = 
n_Init(kn + 1, r->cf);
 
  483    c = 
n_Div(c, t, r->cf);
 
  504  assume((km == 0) || (kn == 0) );
 
  511      number t = 
n_Init(km + 1, r->cf);
 
  518      number t = 
n_Init(kn + 1, r->cf);
 
  524    c = 
n_Div(c, t, r->cf);
 
  548static inline poly 
ncSA_ShiftAx(
int i, 
int j, 
int n, 
int m, 
const number m_shiftCoef, 
const ring r)
 
  554  number c = 
n_Init(1, r->cf); 
 
  566  number nn =  
n_Init(n, r->cf); 
 
  575    number t = 
n_Init(
k + 1, r->cf);  
 
  581    c = 
n_Div(c, t, r->cf);           
 
  605    c = 
n_Div(c, t, r->cf);           
 
  625static inline poly 
ncSA_1xyAx0y0(
const int i, 
const int j, 
const int n, 
const int m, 
const number m_shiftCoef, 
const ring r)
 
  628  Print(
"ncSA_1xyAx0y0(var(%d)^{%d}, var(%d)^{%d}, A, r)!\n", 
j, 
m, 
i, n);
 
  629  number t = 
n_Copy(m_shiftCoef, r);
 
  637static inline poly 
ncSA_1xy0xBy0(
const int i, 
const int j, 
const int n, 
const int m, 
const number m_shiftCoef, 
const ring r)
 
  640  Print(
"ncSA_1xy0xBy0(var(%d)^{%d}, var(%d)^{%d}, B, r)!\n", 
j, 
m, 
i, n);
 
  641  number t = 
n_Copy(m_shiftCoef, r);
 
  657  Print(
"ncSA_Multiply(type: %d, ring, (var(%d)^{%d} * var(%d)^{%d}, r)!\n", (
int)type, 
j, 
m, 
i, n);
 
  664    return ::ncSA_1xy0x0y0(
i, 
j, n, 
m, r);
 
  667    return ::ncSA_Mxy0x0y0(
i, 
j, n, 
m, r);
 
  672    return ::ncSA_Qxy0x0y0(
i, 
j, n, 
m, q, r);
 
  675  const poly d = 
GetD(r, 
i, 
j);
 
  679    return ::ncSA_1xy0x0yG(
i, 
j, n, 
m, 
g, r);
 
  685    return ::ncSA_1xyAx0y0(
i, 
j, n, 
m, 
g, r);
 
  688    return ::ncSA_1xy0xBy0(
i, 
j, n, 
m, 
g, r);
 
  704  return ::AnalyzePairType( r, 
i, 
j);
 
  717  return ::ncSA_1xy0x0y0(
i, 
j, n, 
m, r);
 
  722  return ::ncSA_Mxy0x0y0(
i, 
j, n, 
m, r);
 
  727  return ::ncSA_Qxy0x0y0(
i, 
j, n, 
m, m_q, r);
 
  732  return ::ncSA_1xy0x0yG(
i, 
j, n, 
m, m_g, r);
 
  737  return ::ncSA_1xy0x0yT2(
i, 
j, n, 
m, 
k, r);
 
  742  return ::ncSA_1xyAx0y0(
i, 
j, n, 
m, m_shiftCoef, r);
 
  747  return ::ncSA_1xy0xBy0(
i, 
j, n, 
m, m_shiftCoef, r);
 
static int si_min(const int a, const int b)
 
const CanonicalForm CFMap CFMap & N
 
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
 
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.
 
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_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...
 
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
 
static FORCE_INLINE void n_Write(number n, const coeffs r, const BOOLEAN bShortOut=TRUE)
 
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
 
static FORCE_INLINE void n_InpMult(number &a, number b, const coeffs r)
multiplication of 'a' and 'b'; replacement of 'a' by the product a*b
 
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
 
CanonicalForm reverse(const CanonicalForm &F, int d)
 
static int min(int a, int b)
 
static int max(int a, int b)
 
static bool rIsSCA(const ring r)
 
static poly GetD(const ring r, int i, int j)
 
static poly GetC(const ring r, int i, int j)
 
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
 
gmp_float exp(const gmp_float &a)
 
#define omFreeSize(addr, size)
 
int p_IsPurePower(const poly p, const ring r)
return i, if head depends only on var(i)
 
poly p_ISet(long i, const ring r)
returns the poly representing the integer i
 
poly p_NSet(number n, const ring r)
returns the poly representing the number n, destroys n
 
void p_Write(poly p, ring lmRing, ring tailRing)
 
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
 
static void p_Setm(poly p, const ring r)
 
static poly pReverse(poly p)
 
static BOOLEAN p_LmIsConstantComp(const poly p, const ring r)
 
static int p_LmCmp(poly p, poly q, const ring r)
 
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
 
static poly pLast(poly a, int &length)
returns the length of a polynomial (numbers of monomials) respect syzComp
 
void PrintS(const char *s)
 
void rWrite(ring r, BOOLEAN details)
 
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!