13#if !defined(NO_KINLINE) || defined(KUTIL_CC)
49 if (
i >= 0 &&
i <=
sl)
52 if ((sri >= 0) && (sri <=
tl))
55 if ((t !=
NULL) && (t->p ==
S[
i]))
385 if (new_tailBin ==
NULL) new_tailBin = new_tailRing->PolyBin;
388 t_p = p_shallow_copy_delete(
t_p,
tailRing, new_tailRing, new_tailBin);
403 tailRing, new_tailRing, new_tailBin);
449 long d = this->
pLDeg();
623 if (use_bucket && (
l > 1))
761 else if ((lmBin !=
NULL) && (lmBin !=
currRing->PolyBin))
784 p_shallow_copy_delete);
786 new_tailRing->PolyBin,p_shallow_copy_delete,
852 long d = this->
pLDeg();
859 long d = this->
pLDeg(use_last);
868 return bucket->buckets_length[
i] + 1;
906 memset(
this, 0,
sizeof(*
this));
1019 poly &m1, poly &m2,
const ring m_r)
1026 m1 =
p_Init(m_r,m_r->PolyBin);
1027 m2 =
p_Init(m_r,m_r->PolyBin);
1029 for (
i = p_r->N;
i;
i--)
1034 if (
x > (
long) m_r->bitmask)
goto false_return;
1040 if (-
x > (
long) m_r->bitmask)
goto false_return;
1062 poly &m1, poly &m2, poly &
lcm,
const ring tailRing)
1072 m1 =
p_Init(tailRing,tailRing->PolyBin);
1073 m2 =
p_Init(tailRing,tailRing->PolyBin);
1074 lcm =
p_Init(leadRing,leadRing->PolyBin);
1076 for (
i = leadRing->N;
i>=0;
i--)
1119 assume(PR->GetLmCurrRing() != red.GetLmCurrRing());
1132 assume(PR->GetLmCurrRing() != PW->GetLmCurrRing());
1154 assume(PR->GetLmCurrRing() != PW->GetLmCurrRing());
1155 Red->HeadNormalize();
1183 return L.GetLmCurrRing();
1193 return L.GetLmCurrRing();
1203 return L.GetLmCurrRing();
static int si_max(const int a, const int b)
static CanonicalForm bound(const CFMatrix &M)
KINLINE long SetDegStuffReturnLDeg()
KINLINE void Tail_Mult_nn(number n)
KINLINE void LmDeleteAndIter()
KINLINE TObject * T_2(const skStrategy *strat)
KINLINE void PrepareRed(BOOLEAN use_bucket)
KINLINE void CanonicalizeP()
KINLINE void SetLmTail(poly lm, poly new_p, int length, int use_bucket, ring r)
KINLINE void T_1_2(const skStrategy *strat, TObject *&T_1, TObject *&T_2)
KINLINE void Init(ring tailRing=currRing)
KINLINE TObject * T_1(const skStrategy *strat)
KINLINE int SetLength(BOOLEAN lengt_pLength=FALSE)
KINLINE void Tail_Minus_mm_Mult_qq(poly m, poly qq, int lq, poly spNoether)
KINLINE void ShallowCopyDelete(ring new_tailRing, pShallowCopyDeleteProc p_shallow_copy_delete)
KINLINE sLObject & operator=(const sTObject &)
KINLINE void SetShortExpVector()
KINLINE void HeadNormalize()
KINLINE poly GetP(omBin lmBin=(omBin) NULL)
KINLINE sLObject(ring tailRing=currRing)
KINLINE poly LmExtractAndIter()
KINLINE poly GetLm(ring r)
KINLINE poly GetLmCurrRing()
KINLINE void Init(ring r=currRing)
KINLINE void Mult_nn(number n)
KINLINE long SetDegStuffReturnLDeg()
KINLINE poly GetLmTailRing()
KINLINE void pCleardenom()
KINLINE long GetpFDeg() const
KINLINE sTObject(ring tailRing=currRing)
KINLINE void ShallowCopyDelete(ring new_tailRing, omBin new_tailBin, pShallowCopyDeleteProc p_shallow_copy_delete, BOOLEAN set_max=TRUE)
KINLINE void SetLmCurrRing()
KINLINE void LmDeleteAndIter()
KINLINE long pFDeg() const
KINLINE BOOLEAN IsNull() const
KINLINE void Set(ring r=currRing)
KINLINE long pTotalDeg() const
KINLINE poly kNoetherTail()
KINLINE TObject * s_2_t(int i)
KINLINE TObject * S_2_T(int i)
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
static FORCE_INLINE number n_QuotRem(number a, number b, number *q, const coeffs r)
static FORCE_INLINE BOOLEAN n_GreaterZero(number n, const coeffs r)
ordered fields: TRUE iff 'n' is positive; in Z/pZ: TRUE iff 0 < m <= roundedBelow(p/2),...
static FORCE_INLINE number n_GetUnit(number n, const coeffs r)
in Z: 1 in Z/kZ (where k is not a prime): largest divisor of n (taken in Z) that is co-prime with k i...
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static FORCE_INLINE BOOLEAN n_DivBy(number a, number b, const coeffs r)
test whether 'a' is divisible 'b'; for r encoding a field: TRUE iff 'b' does not represent zero in Z:...
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
const CanonicalForm int s
CFArray copy(const CFList &list)
write elements of list into an array
KINLINE poly k_LmShallowCopyDelete_tailRing_2_currRing(poly p, ring tailRing, omBin lmBin)
KINLINE poly ksOldCreateSpoly(poly p1, poly p2, poly spNoether, ring r)
KINLINE poly redtailBba_Ring(poly p, int pos, kStrategy strat)
void ksOldSpolyTail(poly p1, poly q, poly q2, poly spNoether, ring r)
KINLINE poly k_LmShallowCopyDelete_currRing_2_tailRing(poly p, ring tailRing, omBin tailBin)
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin tailBin)
KINLINE void k_GetStrongLeadTerms(const poly p1, const poly p2, const ring leadRing, poly &m1, poly &m2, poly &lcm, const ring tailRing)
KINLINE int ksReducePolyTailLC_Z(LObject *PR, TObject *PW, LObject *Red)
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize)
KINLINE poly ksOldSpolyRed(poly p1, poly p2, poly spNoether)
KINLINE poly k_LmInit_tailRing_2_currRing(poly t_p, ring tailRing, omBin lmBin)
KINLINE TObject ** initR()
KINLINE poly redtailBbaBound(poly p, int pos, kStrategy strat, int bound, BOOLEAN normalize)
KINLINE BOOLEAN arriRewDummy(poly, unsigned long, poly, kStrategy, int)
KINLINE int ksReducePolyTail(LObject *PR, TObject *PW, LObject *Red)
KINLINE poly ksOldSpolyRedNew(poly p1, poly p2, poly spNoether)
KINLINE void clearS(poly p, unsigned long p_sev, int *at, int *k, kStrategy strat)
KINLINE BOOLEAN k_GetLeadTerms(const poly p1, const poly p2, const ring p_r, poly &m1, poly &m2, const ring m_r)
KINLINE poly redtailBba_Z(poly p, int pos, kStrategy strat)
KINLINE int ksReducePolyTail_Z(LObject *PR, TObject *PW, LObject *Red)
KINLINE unsigned long * initsevT()
void kBucketDeleteAndDestroy(kBucket_pt *bucket_pt)
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
void kBucketShallowCopyDelete(kBucket_pt bucket, ring new_tailRing, omBin new_tailBin, pShallowCopyDeleteProc p_shallow_copy_delete)
For changing the ring of the Bpoly to new_tailBin.
void kBucket_Minus_m_Mult_p(kBucket_pt bucket, poly m, poly p, int *l, poly spNoether)
Bpoly == Bpoly - m*p; where m is a monom Does not destroy p and m assume (*l <= 0 || pLength(p) == *l...
void kBucket_Mult_n(kBucket_pt bucket, number n)
Multiply Bucket by number ,i.e. Bpoly == n*Bpoly.
void kBucketDestroy(kBucket_pt *bucket_pt)
void kBucketInit(kBucket_pt bucket, poly lm, int length)
poly kBucketExtractLm(kBucket_pt bucket)
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets.
void kBucketNormalize(kBucket_pt bucket)
apply n_Normalize to all coefficients
int kBucketCanonicalize(kBucket_pt bucket)
Canonicalizes Bpoly, i.e. converts polys of buckets into one poly in one bucket: Returns number of bu...
int ksReducePolyLC(LObject *PR, TObject *PW, poly spNoether, number *coef, kStrategy strat)
void ksCreateSpoly(LObject *Pair, poly spNoether, int use_buckets, ring tailRing, poly m1, poly m2, TObject **R)
int ksReducePoly(LObject *PR, TObject *PW, poly spNoether, number *coef, poly *mon, kStrategy strat, BOOLEAN reduce)
void deleteInS(int i, kStrategy strat)
denominator_list_s * denominator_list
int kFindInT(poly p, TSet T, int tlength)
returns index of p in TSet, or -1 if not found
EXTERN_VAR denominator_list DENOMINATOR_LIST
KINLINE poly k_LmInit_tailRing_2_currRing(poly p, ring tailRing, omBin bin)
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin bin)
void mult(unsigned long *result, unsigned long *a, unsigned long *b, unsigned long p, int dega, int degb)
int lcm(unsigned long *l, unsigned long *a, unsigned long *b, unsigned long p, int dega, int degb)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
The main handler for Singular numbers which are suitable for Singular polynomials.
#define TEST_OPT_CONTENTSB
poly p_GetMaxExpP(poly p, const ring r)
return monomial r such that GetExp(r,i) is maximum of all monomials in p; coeff == 0,...
void p_Cleardenom_n(poly ph, const ring r, number &c)
void p_SimpleContent(poly ph, int smax, const ring r)
void p_Norm(poly p1, const ring r)
unsigned long p_GetShortExpVector(const poly p, const ring r)
void p_ProjectiveUnique(poly ph, const ring r)
poly p_Last(const poly p, int &l, const ring r)
static poly p_Neg(poly p, const ring r)
static long p_GetExpDiff(poly p1, poly p2, int i, ring r)
BOOLEAN p_LmCheckPolyRing(poly p, ring r)
static poly p_LmInit(poly p, const ring r)
static long p_FDeg(const poly p, const 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 @Note: VarOffset encodes the position in p->exp
static long p_MinComp(poly p, ring lmRing, ring tailRing)
static void p_Setm(poly p, const ring r)
static poly p_LmShallowCopyDelete(poly p, 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 p_Mult_nn(poly p, number n, const ring r)
static void p_Delete(poly *p, const ring r)
static void p_LmFree(poly p, ring)
static poly p_Minus_mm_Mult_qq(poly p, const poly m, const poly q, int &lp, int lq, const poly spNoether, const ring r)
static poly p_Init(const ring r, omBin bin)
static poly p_LmDeleteAndNext(poly p, const ring r)
static poly p_Copy(poly p, const ring r)
returns a copy of p
static long p_Totaldegree(poly p, const ring r)
#define __p_Mult_nn(p, n, r)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Compatibility layer for legacy polynomial operations (over currRing)
#define pLmShortDivisibleBy(a, sev_a, b, not_sev_b)
Divisibility tests based on Short Exponent vectors sev_a == pGetShortExpVector(a) not_sev_b == ~ pGet...
#define pGetShortExpVector(a)
returns the "Short Exponent Vector" – used to speed up divisibility tests (see polys-impl....
static BOOLEAN rIsSyzIndexRing(const ring r)
poly(* pShallowCopyDeleteProc)(poly s_p, ring source_r, ring dest_r, omBin dest_bin)
returns a poly from dest_r which is a ShallowCopy of s_p from source_r assumes that source_r->N == de...
#define rField_is_Ring(R)
int p_mFirstVblock(poly p, const ring ri)
static poly normalize(poly next_p, ideal add_generators, syStrategy syzstr, int *g_l, int *p_l, int crit_comp)