243typedef poly (*
NF_Proc)(ideal, ideal, poly, int, int,
const ring _currRing);
387unsigned long rGetExpSize(
unsigned long bitmask,
int & bits,
int N);
405 return ((n=r->GetNC()) !=
NULL) ;
415 return (r->isLPring!=0);
433 && (r->real_var_start>1);
455int rSum(ring r1, ring r2, ring &sum);
485#define rField_is_Ring(R) nCoeff_is_Ring((R)->cf)
493#define rField_is_Ring(A) (0)
494#define rField_is_Ring_2toM(A) (0)
495#define rField_is_Ring_PtoM(A) (0)
496#define rField_is_Domain(A) (1)
497#define rField_has_Units(A) (1)
572 while (r->order[
i]!=0)
i++;
592static inline short rVar(
const ring r)
599static inline int rPar(
const ring r)
652static inline number
n_Param(
const short iParameter,
const ring r)
711 assume((!((C->extRing)->qideal==
NULL)) && (!
idIs0((C->extRing)->qideal)));
782#define rTest(r) rDBTest(r, __FILE__, __LINE__)
785#define rTest(r) (TRUE)
790 unsigned long exp_limit);
816poly
rGetVar(
const int varIndex,
const ring r);
832ring
rPlusVar(
const ring r,
char *
v,
int left);
int sgn(const Rational &a)
const CanonicalForm CFMap CFMap & N
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from to such that is mapped onto
Coefficient rings, fields and other domains suitable for Singular polynomials.
static FORCE_INLINE BOOLEAN nCoeff_has_Units(const coeffs r)
returns TRUE, if r is not a field and r has non-trivial units
static FORCE_INLINE BOOLEAN nCoeff_is_GF(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_Z(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_long_R(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_PtoM(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_numeric(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_Domain(const coeffs r)
returns TRUE, if r is a field or r has no zero divisors (i.e is a domain)
static FORCE_INLINE BOOLEAN nCoeff_is_Zp_a(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_has_simple_inverse(const coeffs r)
TRUE, if the computation of the inverse is fast, i.e. prefer leading coeff. 1 over content.
static FORCE_INLINE char const ** n_ParameterNames(const coeffs r)
Returns a (const!) pointer to (const char*) names of parameters.
static FORCE_INLINE BOOLEAN nCoeff_is_Q(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_has_simple_Alloc(const coeffs r)
TRUE if n_Delete is empty operation.
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
static FORCE_INLINE BOOLEAN nCoeff_is_Zn(const coeffs r)
static FORCE_INLINE int n_NumberOfParameters(const coeffs r)
Returns the number of parameters.
static FORCE_INLINE BOOLEAN nCoeff_is_Q_a(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_2toM(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
static FORCE_INLINE BOOLEAN nCoeff_is_R(const coeffs r)
static FORCE_INLINE BOOLEAN nCoeff_is_long_C(const coeffs r)
const Variable & v
< [in] a sqrfree bivariate poly
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
static BOOLEAN length(leftv result, leftv arg)
The main handler for Singular numbers which are suitable for Singular polynomials.
BOOLEAN rOrd_SetCompRequiresSetm(const ring r)
return TRUE if p_SetComp requires p_Setm
static BOOLEAN rField_is_R(const ring r)
int rSum(ring r1, ring r2, ring &sum)
int n_IsParam(number m, const ring r)
if m == var(i)/1 => return i,
BOOLEAN rComplete(ring r, int force=0)
this needs to be called whenever a new ring is created: new fields in ring are created (like VarOffse...
void rGetSComps(int **currComponents, long **currShiftedComponents, int *length, ring r)
static BOOLEAN rField_is_Zp_a(const ring r)
BOOLEAN rRing_ord_pure_Dp(const ring r)
ring rModifyRing_Wp(ring r, int *weights)
construct Wp, C ring
void rSetWeightVec(ring r, int64 *wv)
static BOOLEAN rField_is_Z(const ring r)
static BOOLEAN rField_is_Zp(const ring r)
int r_IsRingVar(const char *n, char **names, int N)
struct p_Procs_s p_Procs_s
int rGetISPos(const int p, const ring r)
return the position of the p^th IS block order block in r->typ[]...
static BOOLEAN rField_is_Ring_PtoM(const ring r)
BOOLEAN rHasSimpleLexOrder(const ring r)
returns TRUE, if simple lp or ls ordering
void p_DebugPrint(poly p, const ring r)
void rKillModifiedRing(ring r)
void(* p_SetmProc)(poly p, const ring r)
BOOLEAN rRing_ord_pure_dp(const ring r)
static n_coeffType rFieldType(const ring r)
the type of the coefficient filed of r (n_Zp, n_Q, etc)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static BOOLEAN rField_is_long_C(const ring r)
static BOOLEAN rOrd_is_Comp_dp(const ring r)
const char * rSimpleOrdStr(int ord)
ring rAssure_CompLastBlock(const ring r, BOOLEAN complete=TRUE)
makes sure that c/C ordering is last ordering
ring rCopy0AndAddA(ring r, int64vec *wv64, BOOLEAN copy_qideal=TRUE, BOOLEAN copy_ordering=TRUE)
ideal(* BBA_Proc)(const ideal, const ideal, const intvec *, const intvec *, kStrategy strat, const ring)
static int rBlocks(const ring r)
ring rAssure_c_dp(const ring r)
long(* pFDegProc)(poly p, ring r)
static int rGetCurrSyzLimit(const ring r)
rOrderType_t rGetOrderType(ring r)
int rTypeOfMatrixOrder(const intvec *order)
static ring rIncRefCnt(ring r)
char * rCharStr(ring r)
TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar.
ring rModifyRing_Simple(ring r, BOOLEAN omit_degree, BOOLEAN omit_comp, unsigned long exp_limit, BOOLEAN &simple)
void rKillModified_Wp_Ring(ring r)
static BOOLEAN rField_is_Domain(const ring r)
ring rMinusVar(const ring r, char *v)
undo rPlusVar
BOOLEAN rRing_has_CompLastBlock(const ring r)
long(* pLDegProc)(poly p, int *length, ring r)
BOOLEAN rOrd_is_Totaldegree_Ordering(const ring r)
static BOOLEAN rIsRatGRing(const ring r)
static BOOLEAN rField_is_Zn(const ring r)
static int rPar(const ring r)
(r->cf->P)
ring rAssure_SyzOrder(const ring r, BOOLEAN complete)
poly(* NF_Proc)(ideal, ideal, poly, int, int, const ring _currRing)
ring rAssure_C_dp(const ring r)
BOOLEAN rSetISReference(const ring r, const ideal F, const int i=0, const int p=0)
Changes r by setting induced ordering parameters: limit and reference leading terms F belong to r,...
BOOLEAN rHasSimpleOrder(const ring r)
ring rAssure_SyzComp(const ring r, BOOLEAN complete=TRUE)
int rGetMaxSyzComp(int i, const ring r)
return the max-comonent wchich has syzIndex i Assume: i<= syzIndex_limit
static int rInternalChar(const ring r)
static BOOLEAN rIsLPRing(const ring r)
ring rAssure_HasComp(const ring r)
BOOLEAN rEqual(ring r1, ring r2, BOOLEAN qr=TRUE)
returns TRUE, if r1 equals r2 FALSE, otherwise Equality is determined componentwise,...
@ ringorder_a64
for int64 weights
@ ringorder_rs
opposite of ls
@ ringorder_aa
for idElimination, like a, except pFDeg, pWeigths ignore it
@ ringorder_IS
Induced (Schreyer) ordering.
static BOOLEAN rField_is_Q_a(const ring r)
ring rCopy0(const ring r, BOOLEAN copy_qideal=TRUE, BOOLEAN copy_ordering=TRUE)
static char * rRingVar(short i, const ring r)
BOOLEAN rHas_c_Ordering(const ring r)
static BOOLEAN rField_is_Q(const ring r)
void rDebugPrint(const ring r)
void rWrite(ring r, BOOLEAN details=FALSE)
static BOOLEAN rField_has_Units(const ring r)
static BOOLEAN rShortOut(const ring r)
BOOLEAN rRing_ord_pure_lp(const ring r)
poly rGetVar(const int varIndex, const ring r)
@ rOrderType_Syz
syzygy ordering
@ rOrderType_Syz2dpc
syzcomp2dpc
@ rOrderType_CompExp
simple ordering, component has priority
@ rOrderType_Exp
simple ordering, exponent vector has priority component is compatible with exp-vector order
@ rOrderType_General
non-simple ordering as specified by currRing
@ rOrderType_Schreyer
Schreyer ordering.
@ rOrderType_ExpNoComp
simple ordering, differences in component are not considered
@ rOrderType_ExpComp
simple ordering, exponent vector has priority component not compatible with exp-vector order
void rChangeSComps(int *currComponents, long *currShiftedComponents, int length, ring r)
EXTERN_VAR omBin sip_sring_bin
static BOOLEAN rField_has_simple_Alloc(const ring r)
Z/p, GF(p,n), R: nCopy, nNew, nDelete are dummies.
static BOOLEAN rIsNCRing(const ring r)
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 void rDecRefCnt(ring r)
static char const ** rParameter(const ring r)
(r->cf->parameter)
ring rModifyRing(ring r, BOOLEAN omit_degree, BOOLEAN omit_comp, unsigned long exp_limit)
ring rAssure_SyzComp_CompLastBlock(const ring r)
makes sure that c/C ordering is last ordering and SyzIndex is first
BOOLEAN rCheckIV(const intvec *iv)
static BOOLEAN rField_is_long_R(const ring r)
rRingOrder_t rOrderName(char *ordername)
static BOOLEAN rField_is_numeric(const ring r)
void rDelete(ring r)
unconditionally deletes fields in r
ring rAssure_InducedSchreyerOrdering(const ring r, BOOLEAN complete=TRUE, int sgn=1)
BOOLEAN rHasMixedOrdering(const ring r)
void p_SetGlobals(const ring r, BOOLEAN complete=TRUE)
set all properties of a new ring - also called by rComplete
ring rPlusVar(const ring r, char *v, int left)
K[x],"y" -> K[x,y] resp. K[y,x].
static BOOLEAN rCanShortOut(const ring r)
static BOOLEAN rIsSyzIndexRing(const ring r)
static BOOLEAN rMinpolyIsNULL(const ring r)
Tests whether '(r->cf->minpoly) == NULL'.
ring rDefault(int ch, int N, char **n)
static BOOLEAN rField_is_Ring_2toM(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...
static number n_Param(const short iParameter, const ring r)
return the specified parameter as a (new!) number in the given polynomial ring, or NULL if invalid pa...
static BOOLEAN rField_is_GF(const ring r)
static short rVar(const ring r)
#define rVar(r) (r->N)
ring rAssure_dp_S(const ring r)
ring rAssure_TDeg(const ring r, int &pos)
int rSumInternal(ring r1, ring r2, ring &sum, BOOLEAN vartest, BOOLEAN dp_dp)
returns -1 for not compatible, 1 for compatible (and sum) dp_dp:0: block ordering,...
BOOLEAN rHasGlobalOrdering(const ring r)
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
void rSetSyzComp(int k, const ring r)
int64 * rGetWeightVec(const ring r)
static BOOLEAN rField_has_simple_inverse(const ring r)
ring rAssure_dp_C(const ring r)
BOOLEAN rDBTest(ring r, const char *fn, const int l)
unsigned long rGetExpSize(unsigned long bitmask, int &bits, int N)
The following sip_sideal structure has many different uses thoughout Singular. Basic use-cases for it...
const nc_struct * GetNC() const
unsigned long wanted_maxExp
ideal qideal
extension to the ring structure: qring, rInit, OR for Q_a/Zp_a, rInit (replaces minideal!...
EXTERN_VAR long * currShiftedComponents