Loading...
Searching...
No Matches
ring.h
Go to the documentation of this file.
#ifndef RING_H
#define RING_H
/****************************************
* Computer Algebra System SINGULAR *
****************************************/
/*
* ABSTRACT - the interpreter related ring operations
*/
/* includes */
#include "misc/auxiliary.h"
#include "coeffs/coeffs.h"
#include "misc/intvec.h"
#include "misc/int64vec.h"
#include "coeffs/coeffs.h" // ring,number
#include "coeffs/bigintmat.h" // bigintmat
#include "polys/monomials/monomials.h"
//#include "polys/monomials/polys-impl.h"
//
/* forward declaration of types */
class idrec; typedef idrec * idhdl; // _only_ for idhdl ip_sring::idroot
struct p_Procs_s;
typedef struct p_Procs_s p_Procs_s;
class kBucket;
typedef kBucket* kBucket_pt;
struct sip_sideal;
typedef struct sip_sideal * ideal;
typedef struct sip_sideal const * const_ideal;
struct sip_smap;
typedef struct sip_smap * map;
typedef struct sip_smap const * const_map;
/* the function pointer types */
typedef long (*pLDegProc)(poly p, int *length, ring r);
typedef long (*pFDegProc)(poly p, ring r);
typedef void (*p_SetmProc)(poly p, const ring r);
/// returns a poly from dest_r which is a ShallowCopy of s_p from source_r
/// assumes that source_r->N == dest_r->N and that orderings are the same
typedef poly (*pShallowCopyDeleteProc)(poly s_p, ring source_r, ring dest_r,
omBin dest_bin);
// ro_typ describes what to store at the corresping "data" place in p->exp
// none of the directly corresponds to a ring ordering (ringorder_*)
// as each ringorder_* blocks corresponds to 0..2 sro-blocks
typedef enum
{
ro_dp, // total degree with weights 1
ro_wp, // total weighted degree with weights>0 in wvhdl
ro_am, // weights for vars + weights for gen
ro_wp64, // weighted64 degree weights in wvhdl
ro_wp_neg, // total weighted degree with weights in Z in wvhdl
// (with possibly negative weights)
ro_cp, // ??ordering duplicates variables
ro_syzcomp, // ??ordering indicates "subset" of component number (ringorder_S)
ro_syz, // component number if <=syzcomp else 0 (ringorder_s)
ro_isTemp, ro_is, // ??Induced Syzygy (Schreyer) ordering (and prefix data placeholder dummy) (ringorder_IS)
ro_none
}
ro_typ;
/// order stuff
typedef enum rRingOrder_t
{
ringorder_no = 0,
ringorder_a,
ringorder_a64, ///< for int64 weights
ringorder_c,
ringorder_C,
ringorder_M,
ringorder_S, ///< S?
ringorder_s, ///< s?
ringorder_lp,
ringorder_dp,
ringorder_ip,
ringorder_Dp,
ringorder_wp,
ringorder_Wp,
ringorder_Ip, /// degree, ip
ringorder_ls,
ringorder_ds,
ringorder_Ds,
ringorder_ws,
ringorder_Ws,
ringorder_am,
ringorder_L,
// the following are only used internally
ringorder_aa, ///< for idElimination, like a, except pFDeg, pWeigths ignore it
ringorder_is, ///< opposite of ls
ringorder_IS, ///< Induced (Schreyer) ordering
ringorder_unspec
} rRingOrder_t;
// compat entries:
#define ringorder_rp ringorder_ip
#define ringorder_rs ringorder_is
typedef enum rOrderType_t
{
rOrderType_General = 0, ///< non-simple ordering as specified by currRing
rOrderType_CompExp, ///< simple ordering, component has priority
rOrderType_ExpComp, ///< simple ordering, exponent vector has priority
///< component not compatible with exp-vector order
rOrderType_Exp, ///< simple ordering, exponent vector has priority
///< component is compatible with exp-vector order
rOrderType_Syz, ///< syzygy ordering
rOrderType_Schreyer, ///< Schreyer ordering
rOrderType_Syz2dpc, ///< syzcomp2dpc
rOrderType_ExpNoComp ///< simple ordering, differences in component are
///< not considered
} rOrderType_t;
// ordering is a degree ordering
struct sro_dp
{
short place; // where degree is stored (in L):
short start; // bounds of ordering (in E):
short end;
};
typedef struct sro_dp sro_dp;
// ordering is a weighted degree ordering
struct sro_wp
{
short place; // where weighted degree is stored (in L)
short start; // bounds of ordering (in E)
short end;
int *weights; // pointers into wvhdl field
};
typedef struct sro_wp sro_wp;
// ordering is a weighted degree ordering
struct sro_am
{
short place; // where weighted degree is stored (in L)
short start; // bounds of ordering (in E)
short end;
short len_gen; // i>len_gen: weight(gen(i)):=0
int *weights; // pointers into wvhdl field of length (end-start+1) + len_gen + 1
// contents w_{start},... w_{end}, len, mod_w_1, .. mod_w_len, 0
int *weights_m; // pointers into wvhdl field of length len_gen + 1
// len_gen, mod_w_1, .. mod_w_len, 0
};
typedef struct sro_am sro_am;
// ordering is a weighted degree ordering
struct sro_wp64
{
short place; // where weighted degree is stored (in L)
short start; // bounds of ordering (in E)
short end;
int64 *weights64; // pointers into wvhdl field
};
typedef struct sro_wp64 sro_wp64;
// ordering duplicates variables
struct sro_cp
{
short place; // where start is copied to (in E)
short start; // bounds of sources of copied variables (in E)
short end;
};
typedef struct sro_cp sro_cp;
// ordering indicates "subset" of component number
struct sro_syzcomp
{
short place; // where the index is stored (in L)
long *ShiftedComponents; // pointer into index field
int* Components;
#ifdef PDEBUG
long length;
#endif
};
typedef struct sro_syzcomp sro_syzcomp;
// ordering with component number >syzcomp is lower
struct sro_syz
{
short place; // where the index is stored (in L)
int limit; // syzcomp
int* syz_index; // mapping Component -> SyzIndex for Comp <= limit
int curr_index; // SyzIndex for Component > limit
};
typedef struct sro_syz sro_syz;
// Induced Syzygy (Schreyer) ordering is built inductively as follows:
// we look for changes made by ordering blocks which are between prefix/suffix markers:
// that is: which variables where placed by them and where (judging by v)
// due to prefix/suffix nature we need some placeholder:
// prefix stores here initial state
// suffix clears this up
struct sro_ISTemp
{
short start; // 1st member SHOULD be short "place"
int suffixpos;
int* pVarOffset; // copy!
};
// So this is the actual thing!
// suffix uses last sro_ISTemp (clears it up afterwards) and
// creates this block
struct sro_IS
{
short start, end; // which part of L we want to want to update...
int* pVarOffset; // same as prefix!
int limit; // first referenced component
// reference poly set?? // Should it be owned by ring?!!!
ideal F; // reference leading (module)-monomials set. owned by ring...
};
typedef struct sro_IS sro_IS;
typedef struct sro_ISTemp sro_ISTemp;
struct sro_ord
{
ro_typ ord_typ;
int order_index; // comes from r->order[order_index]
union
{
sro_dp dp;
sro_wp wp;
sro_am am;
sro_wp64 wp64;
sro_cp cp;
sro_syzcomp syzcomp;
sro_syz syz;
sro_IS is;
sro_ISTemp isTemp;
} data;
};
#ifdef HAVE_PLURAL
struct nc_struct;
typedef struct nc_struct nc_struct;
#endif
class skStrategy;
typedef skStrategy * kStrategy;
typedef poly (*NF_Proc)(ideal, ideal, poly, int, int, const ring _currRing);
typedef ideal (*BBA_Proc) (const ideal, const ideal, const intvec *, const bigintmat *, kStrategy strat, const ring);
struct ip_sring
{
// each entry must have a description and a procedure defining it,
// general ordering: pointer/structs, long, int, short, BOOLEAN/char/enum
// general defining procedures: rInit, rComplete, interpreter, ??
idhdl idroot; /* local objects , interpreter*/
rRingOrder_t* order; /* array of orderings, rInit/rSleftvOrdering2Ordering */
int* block0; /* starting pos., rInit/rSleftvOrdering2Ordering*/
int* block1; /* ending pos., rInit/rSleftvOrdering2Ordering*/
// char** parameter; /* names of parameters, rInit */
int** wvhdl; /* array of weight vectors, rInit/rSleftvOrdering2Ordering */
char ** names; /* array of variable names, rInit */
// what follows below here should be set by rComplete, _only_
long *ordsgn; /* array of +/- 1 (or 0) for comparing monomials */
/* ExpL_Size entries*/
// is NULL for lp or N == 1, otherwise non-NULL (with OrdSize > 0 entries) */
sro_ord* typ; /* array of orderings + sizes, OrdSize entries */
/* if NegWeightL_Size > 0, then NegWeightL_Offset[0..size_1] is index of longs
in ExpVector whose values need an offset due to negative weights */
/* array of NegWeigtL_Size indices */
int* NegWeightL_Offset;
int* VarOffset;
// ideal minideal;
// number minpoly; /* replaced by minideal->m[0] */
ideal qideal; /**< extension to the ring structure: qring, rInit, OR
for Q_a/Zp_a, rInit (replaces minideal!);
for a start, we assume that there is either no
or exactly one generator in minideal, playing
the role of the former minpoly; minideal may
also be NULL which coincides with the
no-generator-case **/
int* firstwv;
omBin PolyBin; /* Bin from where monoms are allocated */
intvec * pModW; /* std: module weights */
poly ppNoether; /* variables, set by procedures from hecke/kstd1:
the highest monomial below pHEdge */
void * ext_ref; /* libsing GAP object */
// #ifdef HAVE_RINGS
// unsigned int cf->ringtype; /* cring = 0 => coefficient field, cring = 1 => coeffs from Z/2^m */
// mpz_ptr cf->modBase; /* Z/(ringflag^cf->modExponent)=Z/cf->modNumber*/
// unsigned long cf->modExponent;
// unsigned long cf->modNumber; /* Z/cf->modNumber */
// mpz_ptr cf->modNumber;
// #endif
unsigned long options; /* ring dependent options */
// int ch; /* characteristic, rInit */
int ref; /* reference counter to the ring, interpreter */
short N; /* number of vars, rInit */
short OrdSgn; /* 1 for polynomial rings, -1 otherwise, rInit */
short firstBlockEnds;
#ifdef HAVE_PLURAL
short real_var_start, real_var_end;
#endif
#ifdef HAVE_SHIFTBBA
short isLPring; /* 0 for non-letterplace rings, otherwise the number of LP blocks, at least 1, known also as lV */
short LPncGenCount;
#endif
BOOLEAN VectorOut;
BOOLEAN ShortOut;
BOOLEAN CanShortOut;
BOOLEAN LexOrder; // TRUE if the monomial ordering has polynomial and power series blocks
BOOLEAN MixedOrder; // TRUE for global/local mixed orderings, FALSE otherwise
BOOLEAN pLexOrder; /* TRUE if the monomial ordering is not compatible with pFDeg */
BOOLEAN ComponentOrder; // 1 if ringorder_c, -1 for ringorder_C,ringorder_S,ringorder_s
// what follows below here should be set by rComplete, _only_
// contains component, but no weight fields in E */
short ExpL_Size; // size of exponent vector in long
short CmpL_Size; // portions which need to be compared
/* number of long vars in exp vector:
long vars are those longs in the exponent vector which are
occupied by variables, only */
short VarL_Size;
short BitsPerExp; /* number of bits per exponent */
short ExpPerLong; /* maximal number of Exponents per long */
short pCompIndex; /* p->exp.e[pCompIndex] is the component */
short pOrdIndex; /* p->exp[pOrdIndex] is pGetOrd(p) */
short OrdSize; /* size of ord vector (in sro_ord) */
/* if >= 0, long vars in exp vector are consecutive and start there
if < 0, long vars in exp vector are not consecutive */
short VarL_LowIndex;
short NegWeightL_Size;
/* array of size VarL_Size,
VarL_Offset[i] gets i-th long var in exp vector */
int* VarL_Offset;
/* mask for getting single exponents, also maxExp */
unsigned long bitmask;
/* wanted maxExp */
unsigned long wanted_maxExp;
/* mask used for divisiblity tests */
unsigned long divmask; // rComplete
p_Procs_s* p_Procs; // rComplete/p_ProcsSet
/* FDeg and LDeg */
pFDegProc pFDeg; // rComplete/rSetDegStuff
pLDegProc pLDeg; // rComplete/rSetDegStuff
/* as it was determined by rComplete */
pFDegProc pFDegOrig;
/* and as it was determined before rOptimizeLDeg */
pLDegProc pLDegOrig;
p_SetmProc p_Setm;
n_Procs_s* cf;
#ifdef HAVE_PLURAL
private:
nc_struct* _nc; // private
public:
inline const nc_struct* GetNC() const { return _nc; }; // public!!!
inline nc_struct*& GetNC() { return _nc; }; // public!!!
#endif
public:
operator coeffs() const { return cf; }
};
////////// DEPRECATED
/////// void rChangeCurrRing(ring r);
ring rDefault(int ch, int N, char **n);
ring rDefault(const coeffs cf, int N, char **n, const rRingOrder_t o=ringorder_lp);
ring rDefault(int ch, int N, char **n,int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl=NULL);
ring rDefault(const coeffs cf, int N, char **n,int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl=NULL, unsigned long bitmask=0);
unsigned long rGetExpSize(unsigned long bitmask, int & bits, int N);
// #define rIsRingVar(A) r_IsRingVar(A,currRing)
int r_IsRingVar(const char *n, char**names, int N);
void rWrite(ring r, BOOLEAN details = FALSE);
ring rCopy(ring r);
ring rCopy0(const ring r, BOOLEAN copy_qideal = TRUE, BOOLEAN copy_ordering = TRUE);
ring rCopy0AndAddA(ring r, int64vec *wv64, BOOLEAN copy_qideal = TRUE,
BOOLEAN copy_ordering = TRUE);
ring rOpposite(ring r);
ring rEnvelope(ring r);
/// we must always have this test!
static inline BOOLEAN rIsPluralRing(const ring r)
{
assume(r != NULL);
#ifdef HAVE_PLURAL
nc_struct *n;
return ((n=r->GetNC()) != NULL) /*&& (n->type != nc_error)*/;
#else
return FALSE;
#endif
}
static inline BOOLEAN rIsLPRing(const ring r)
{
assume(r != NULL);
#ifdef HAVE_SHIFTBBA
return (r->isLPring!=0);
#else
return FALSE;
#endif
}
static inline BOOLEAN rIsNCRing(const ring r)
{
assume(r != NULL);
return rIsPluralRing(r) || rIsLPRing(r);
}
static inline BOOLEAN rIsRatGRing(const ring r)
{
assume(r != NULL);
#ifdef HAVE_PLURAL
/* nc_struct *n; */
return (r != NULL) /* && ((n=r->GetNC()) != NULL) */
&& (r->real_var_start>1);
#else
return FALSE;
#endif
}
// The following are for LaScala3 only!
void rChangeSComps(int* currComponents, long* currShiftedComponents, int length, ring r);
void rGetSComps(int** currComponents, long** currShiftedComponents, int *length, ring r);
const char * rSimpleOrdStr(int ord);
rRingOrder_t rOrderName(char * ordername);
char * rOrdStr(ring r);
char * rVarStr(ring r);
char * rCharStr(ring r);
char * rString(ring r);
int rChar(ring r);
char * rParStr(ring r);
int rSum(ring r1, ring r2, ring &sum);
/// returns -1 for not compatible, 1 for compatible (and sum)
/// dp_dp:0: block ordering, 1: dp,dp, 2: aa(...),dp
/// vartest: check for name conflicts
int rSumInternal(ring r1, ring r2, ring &sum, BOOLEAN vartest, BOOLEAN dp_dp);
/// returns TRUE, if r1 equals r2 FALSE, otherwise Equality is
/// determined componentwise, if qr == 1, then qrideal equality is
/// tested, as well
BOOLEAN rEqual(ring r1, ring r2, BOOLEAN qr = TRUE);
/// returns TRUE, if r1 and r2 represents the monomials in the same way
/// FALSE, otherwise
/// this is an analogue to rEqual but not so strict
BOOLEAN rSamePolyRep(ring r1, ring r2);
void rUnComplete(ring r);
BOOLEAN rRing_has_CompLastBlock(const ring r);
BOOLEAN rRing_ord_pure_dp(const ring r);
BOOLEAN rRing_ord_pure_Dp(const ring r);
BOOLEAN rRing_ord_pure_lp(const ring r);
#ifdef HAVE_RINGS
static inline BOOLEAN rField_is_Ring_2toM(const ring r)
{ assume(r != NULL); assume(r->cf != NULL); return ( nCoeff_is_Ring_2toM(r->cf) ); }
static inline BOOLEAN rField_is_Ring_PtoM(const ring r)
{ assume(r != NULL); assume(r->cf != NULL); return ( nCoeff_is_Ring_PtoM(r->cf) ); }
#define rField_is_Ring(R) nCoeff_is_Ring((R)->cf)
static inline BOOLEAN rField_is_Domain(const ring r)
{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Domain(r->cf); }
static inline BOOLEAN rField_has_Units(const ring r)
{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_has_Units(r->cf); }
#else
#define rField_is_Ring(A) (0)
#define rField_is_Ring_2toM(A) (0)
#define rField_is_Ring_PtoM(A) (0)
#define rField_is_Domain(A) (1)
#define rField_has_Units(A) (1)
#endif
static inline BOOLEAN rField_is_Zp(const ring r)
{ assume(r != NULL); assume(r->cf != NULL); return (getCoeffType(r->cf) == n_Zp); }
static inline BOOLEAN rField_is_Zp(const ring r, int p)
{ assume(r != NULL); assume(r->cf != NULL); return (getCoeffType(r->cf) == n_Zp) && (r->cf->ch == p); }
static inline BOOLEAN rField_is_Q(const ring r)
{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Q(r->cf); }
static inline BOOLEAN rField_is_Z(const ring r)
{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Z(r->cf); }
static inline BOOLEAN rField_is_Zn(const ring r)
{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Zn(r->cf); }
static inline BOOLEAN rField_is_numeric(const ring r) /* R, long R, long C */
{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_numeric(r->cf); }
static inline BOOLEAN rField_is_R(const ring r)
{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_R(r->cf); }
static inline BOOLEAN rField_is_GF(const ring r)
{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_GF(r->cf); }
static inline BOOLEAN rField_is_GF(const ring r, int q)
{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_GF(r->cf, q); }
/* DO NOT USE; just here for compatibility reasons towards
the SINGULAR svn trunk */
static inline BOOLEAN rField_is_Zp_a(const ring r)
{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Zp_a(r->cf); }
/* DO NOT USE; just here for compatibility reasons towards
the SINGULAR svn trunk */
static inline BOOLEAN rField_is_Zp_a(const ring r, int p)
{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Zp_a(r->cf, p); }
/* DO NOT USE; just here for compatibility reasons towards
the SINGULAR svn trunk */
static inline BOOLEAN rField_is_Q_a(const ring r)
{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Q_a(r->cf); }
static inline BOOLEAN rField_is_long_R(const ring r)
{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_long_R(r->cf); }
static inline BOOLEAN rField_is_long_C(const ring r)
{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_long_C(r->cf); }
static inline BOOLEAN rField_has_simple_inverse(const ring r)
{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_has_simple_inverse(r->cf); }
/// Z/p, GF(p,n), R: nCopy, nNew, nDelete are dummies
static inline BOOLEAN rField_has_simple_Alloc(const ring r)
{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_has_simple_Alloc(r->cf); }
/// the type of the coefficient filed of r (n_Zp, n_Q, etc)
static inline n_coeffType rFieldType(const ring r) { return (r->cf->type); }
/// this needs to be called whenever a new ring is created: new fields
/// in ring are created (like VarOffset), unless they already exist
/// with force == 1, new fields are _always_ created (overwritten),
/// even if they exist
BOOLEAN rComplete(ring r, int force = 0);
// use this to free fields created by rComplete //?
/// set all properties of a new ring - also called by rComplete
void p_SetGlobals(const ring r, BOOLEAN complete = TRUE);
static inline int rBlocks(const ring r)
{
assume(r != NULL);
int i=0;
while (r->order[i]!=0) i++;
return i+1;
}
// misc things
static inline char* rRingVar(short i, const ring r)
{
assume(r != NULL); assume(r->cf != NULL); return r->names[i];
}
static inline BOOLEAN rShortOut(const ring r)
{
assume(r != NULL); return (r->ShortOut);
}
static inline BOOLEAN rCanShortOut(const ring r)
{
assume(r != NULL); return (r->CanShortOut);
}
/// #define rVar(r) (r->N)
static inline short rVar(const ring r)
{
assume(r != NULL);
return r->N;
}
/// (r->cf->P)
static inline int rPar(const ring r)
{
assume(r != NULL);
const coeffs C = r->cf;
assume(C != NULL);
return n_NumberOfParameters(C);
// if( nCoeff_is_Extension(C) )
// {
// const ring R = C->extRing;
// assume( R != NULL );
// return rVar( R );
// }
// else if (nCoeff_is_GF(C))
// {
// return 1;
// }
// else if (nCoeff_is_long_C(C))
// {
// return 1;
// }
// return 0;
}
/// (r->cf->parameter)
static inline char const ** rParameter(const ring r)
{
assume(r != NULL);
const coeffs C = r->cf;
assume(C != NULL);
return n_ParameterNames(C);
// if( nCoeff_is_Extension(C) ) // only alg / trans. exts...
// {
// const ring R = C->extRing;
// assume( R != NULL );
// return R->names;
// }
// else if (nCoeff_is_GF(C))
// {
// return &(C->m_nfParameter);
// }
// else if (nCoeff_is_long_C(C))
// {
// return &(C->complex_parameter);
// }
// return NULL;
}
/// return the specified parameter as a (new!) number in the given
/// polynomial ring, or NULL if invalid
/// parameters (as variables) begin with 1!
static inline number n_Param(const short iParameter, const ring r)
{
assume(r != NULL);
const coeffs C = r->cf;
assume(C != NULL);
return n_Param(iParameter, C);
// const n_coeffType _filed_type = getCoeffType(C);
//
// if ( iParameter <= 0 || iParameter > rPar(r) )
// // Wrong parameter
// return NULL;
//
// if( _filed_type == n_algExt )
// return naParameter(iParameter, C);
//
// if( _filed_type == n_transExt )
// return ntParameter(iParameter, C);
//
// if (_filed_type == n_GF)// if (nCoeff_is_GF(C))
// {
// number nfPar (int i, const coeffs);
// return nfPar(iParameter, C);
// }
//
// if (_filed_type == n_long_C) // if (nCoeff_is_long_C(C))
// {
// number ngcPar(int i, const coeffs r);
// return ngcPar(iParameter, C);
// }
//
// return NULL;
}
/// if m == var(i)/1 => return i,
int n_IsParam(number m, const ring r);
//#define rInternalChar(r) ((r)->cf->ch)
static inline int rInternalChar(const ring r)
{
assume(r != NULL);
const coeffs C = r->cf;
assume(C != NULL);
return C->ch;
}
/// Tests whether '(r->cf->minpoly) == NULL'
static inline BOOLEAN rMinpolyIsNULL(const ring r)
{
assume(r != NULL);
const coeffs C = r->cf;
assume(C != NULL);
const BOOLEAN ret = nCoeff_is_algExt(C); // || nCoeff_is_GF(C) || nCoeff_is_long_C(C);
if( ret )
{
assume( (C->extRing) != NULL );
BOOLEAN idIs0 (ideal h);
assume((!((C->extRing)->qideal==NULL)) && (!idIs0((C->extRing)->qideal)));
}
// TODO: this leads to test fails (due to rDecompose?)
return !ret;
}
static inline BOOLEAN rIsSyzIndexRing(const ring r)
{ assume(r != NULL); assume(r->cf != NULL); return r->order[0] == ringorder_s;}
static inline int rGetCurrSyzLimit(const ring r)
{ assume(r != NULL); assume(r->cf != NULL); return (rIsSyzIndexRing(r)? r->typ[0].data.syz.limit : 0);}
void rSetSyzComp(int k, const ring r);
// Ring Manipulations
ring rAssure_HasComp(const ring r);
ring rAssure_SyzOrder(const ring r, BOOLEAN complete);
ring rAssure_SyzComp(const ring r, BOOLEAN complete = TRUE);
ring rAssure_InducedSchreyerOrdering(const ring r, BOOLEAN complete = TRUE, int sgn = 1);
ring rAssure_dp_S(const ring r);
ring rAssure_dp_C(const ring r);
ring rAssure_Dp_C(const ring r);
ring rAssure_Wp_C(const ring r, intvec *w);
ring rAssure_C_dp(const ring r);
ring rAssure_c_dp(const ring r);
/// makes sure that c/C ordering is last ordering
ring rAssure_CompLastBlock(const ring r, BOOLEAN complete = TRUE);
/// makes sure that c/C ordering is last ordering and SyzIndex is first
ring rAssure_SyzComp_CompLastBlock(const ring r);
ring rAssure_TDeg(const ring r, int &pos);
/// return the max-comonent wchich has syzIndex i
/// Assume: i<= syzIndex_limit
int rGetMaxSyzComp(int i, const ring r);
BOOLEAN rHasSimpleOrder(const ring r);
BOOLEAN rHas_c_Ordering(const ring r);
BOOLEAN rHasBlockOrder(const ring r);
/// returns TRUE, if simple lp or ls ordering
BOOLEAN rHasSimpleLexOrder(const ring r);
//???? return TRUE if p->exp[r->pOrdIndex] holds total degree of p ???
static inline BOOLEAN rHasGlobalOrdering(const ring r){ return (r->OrdSgn==1); }
static inline BOOLEAN rHasLocalOrMixedOrdering(const ring r){ return (r->OrdSgn==-1); }
static inline BOOLEAN rHasMixedOrdering(const ring r) { return (r->MixedOrder); }
// #define rHasGlobalOrdering(R) ((R)->OrdSgn==1)
// #define rHasLocalOrMixedOrdering(R) ((R)->OrdSgn==-1)
BOOLEAN rOrd_is_Totaldegree_Ordering(const ring r);
BOOLEAN rOrd_is_dp(const ring r);
BOOLEAN rOrd_is_ds(const ring r);
BOOLEAN rOrd_is_Ds(const ring r);
/// return TRUE if p_SetComp requires p_Setm
BOOLEAN rOrd_SetCompRequiresSetm(const ring r);
rOrderType_t rGetOrderType(ring r);
static inline BOOLEAN rOrd_is_Comp_dp(const ring r)
{
assume(r != NULL);
assume(r->cf != NULL);
return ((r->order[0] == ringorder_c || r->order[0] == ringorder_C) &&
r->order[1] == ringorder_dp &&
r->order[2] == 0);
}
#ifdef RDEBUG
#define rTest(r) rDBTest(r, __FILE__, __LINE__)
extern BOOLEAN rDBTest(ring r, const char* fn, const int l);
#else
#define rTest(r) (TRUE)
#endif
ring rModifyRing(ring r, BOOLEAN omit_degree,
BOOLEAN omit_comp,
unsigned long exp_limit);
/// construct Wp, C ring
ring rModifyRing_Wp(ring r, int* weights);
void rKillModifiedRing(ring r);
// also frees weights
void rKillModified_Wp_Ring(ring r);
ring rModifyRing_Simple(ring r, BOOLEAN omit_degree, BOOLEAN omit_comp, unsigned long exp_limit, BOOLEAN &simple);
#ifdef RDEBUG
void rDebugPrint(const ring r);
// void pDebugPrint(poly p);
void p_DebugPrint(poly p, const ring r);
#endif
int64 * rGetWeightVec(const ring r);
void rSetWeightVec(ring r, int64 *wv);
/////////////////////////////
// Auxiliary functions
//
/* return the varIndex-th ring variable as a poly;
varIndex starts at index 1 */
poly rGetVar(const int varIndex, const ring r);
BOOLEAN rSetISReference(const ring r, const ideal F, const int i = 0, const int p = 0);
/// return the position of the p^th IS block order block in r->typ[]...
int rGetISPos(const int p, const ring r);
BOOLEAN rCheckIV(const intvec *iv);
int rTypeOfMatrixOrder(const intvec *order);
void rDelete(ring r); // To be used instead of rKill!
EXTERN_VAR omBin sip_sring_bin;
// ring manipulation
/// K[x],"y" -> K[x,y] resp. K[y,x]
ring rPlusVar(const ring r, char *v,int left);
/// undo rPlusVar
ring rMinusVar(const ring r, char *v);
static inline ring rIncRefCnt(ring r) { r->ref++; return r; }
static inline void rDecRefCnt(ring r) { r->ref--; }
#endif
sgn
int sgn(const Rational &a)
Definition GMPrat.cc:430
auxiliary.h
All the auxiliary stuff.
int64
long int64
Definition auxiliary.h:68
BOOLEAN
int BOOLEAN
Definition auxiliary.h:88
TRUE
#define TRUE
Definition auxiliary.h:101
FALSE
#define FALSE
Definition auxiliary.h:97
bigintmat.h
N
const CanonicalForm CFMap CFMap & N
Definition cfEzgcd.cc:56
l
int l
Definition cfEzgcd.cc:100
m
int m
Definition cfEzgcd.cc:128
i
int i
Definition cfEzgcd.cc:132
k
int k
Definition cfEzgcd.cc:99
p
int p
Definition cfModGcd.cc:4086
cf
CanonicalForm cf
Definition cfModGcd.cc:4091
map
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from to such that is mapped onto
Definition cf_map_ext.cc:505
bigintmat
Matrices of numbers.
Definition bigintmat.h:51
idrec
Definition idrec.h:35
int64vec
Definition int64vec.h:24
intvec
Definition intvec.h:24
skStrategy
Definition kutil.h:276
coeffs.h
Coefficient rings, fields and other domains suitable for Singular polynomials.
nCoeff_has_Units
static FORCE_INLINE BOOLEAN nCoeff_has_Units(const coeffs r)
returns TRUE, if r is not a field and r has non-trivial units
Definition coeffs.h:792
nCoeff_is_GF
static FORCE_INLINE BOOLEAN nCoeff_is_GF(const coeffs r)
Definition coeffs.h:834
nCoeff_is_Z
static FORCE_INLINE BOOLEAN nCoeff_is_Z(const coeffs r)
Definition coeffs.h:811
nCoeff_is_long_R
static FORCE_INLINE BOOLEAN nCoeff_is_long_R(const coeffs r)
Definition coeffs.h:886
nCoeff_is_Ring_PtoM
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_PtoM(const coeffs r)
Definition coeffs.h:729
n_coeffType
n_coeffType
Definition coeffs.h:27
n_Zp
@ n_Zp
\F{p < 2^31}
Definition coeffs.h:29
nCoeff_is_numeric
static FORCE_INLINE BOOLEAN nCoeff_is_numeric(const coeffs r)
Definition coeffs.h:827
nCoeff_is_Domain
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)
Definition coeffs.h:736
nCoeff_is_Zp_a
static FORCE_INLINE BOOLEAN nCoeff_is_Zp_a(const coeffs r)
Definition coeffs.h:854
nCoeff_has_simple_inverse
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.
Definition coeffs.h:897
n_ParameterNames
static FORCE_INLINE char const ** n_ParameterNames(const coeffs r)
Returns a (const!) pointer to (const char*) names of parameters.
Definition coeffs.h:773
nCoeff_is_Q
static FORCE_INLINE BOOLEAN nCoeff_is_Q(const coeffs r)
Definition coeffs.h:801
nCoeff_has_simple_Alloc
static FORCE_INLINE BOOLEAN nCoeff_has_simple_Alloc(const coeffs r)
TRUE if n_Delete is empty operation.
Definition coeffs.h:901
getCoeffType
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
Definition coeffs.h:431
nCoeff_is_Zn
static FORCE_INLINE BOOLEAN nCoeff_is_Zn(const coeffs r)
Definition coeffs.h:821
n_NumberOfParameters
static FORCE_INLINE int n_NumberOfParameters(const coeffs r)
Returns the number of parameters.
Definition coeffs.h:769
nCoeff_is_Q_a
static FORCE_INLINE BOOLEAN nCoeff_is_Q_a(const coeffs r)
Definition coeffs.h:880
nCoeff_is_Ring_2toM
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_2toM(const coeffs r)
Definition coeffs.h:726
nCoeff_is_algExt
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
Definition coeffs.h:905
nCoeff_is_R
static FORCE_INLINE BOOLEAN nCoeff_is_R(const coeffs r)
Definition coeffs.h:831
nCoeff_is_long_C
static FORCE_INLINE BOOLEAN nCoeff_is_long_C(const coeffs r)
Definition coeffs.h:889
n_Procs_s
Definition coeffs.h:130
w
const CanonicalForm & w
Definition facAbsFact.cc:51
v
const Variable & v
< [in] a sqrfree bivariate poly
Definition facBivar.h:39
const
#define const
Definition fegetopt.c:39
EXTERN_VAR
#define EXTERN_VAR
Definition globaldefs.h:6
idIs0
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
Definition simpleideals.cc:960
int64vec.h
length
static BOOLEAN length(leftv result, leftv arg)
Definition interval.cc:257
intvec.h
h
STATIC_VAR Poly * h
Definition janet.cc:971
kBucket
Definition kbuckets.h:183
assume
#define assume(x)
Definition mod2.h:389
monomials.h
coeffs
The main handler for Singular numbers which are suitable for Singular polynomials.
qr
Definition qr.h:46
NULL
#define NULL
Definition omList.c:12
omBin
omBin_t * omBin
Definition omStructs.h:12
sip_sring_bin
VAR omBin sip_sring_bin
Definition ring.cc:43
rOrd_SetCompRequiresSetm
BOOLEAN rOrd_SetCompRequiresSetm(const ring r)
return TRUE if p_SetComp requires p_Setm
Definition ring.cc:2023
rOpposite
ring rOpposite(ring r)
Definition ring.cc:5425
rField_is_R
static BOOLEAN rField_is_R(const ring r)
Definition ring.h:524
rSum
int rSum(ring r1, ring r2, ring &sum)
Definition ring.cc:1408
sro_am::place
short place
Definition ring.h:140
sro_am::weights_m
int * weights_m
Definition ring.h:146
sro_am::end
short end
Definition ring.h:142
n_IsParam
int n_IsParam(number m, const ring r)
if m == var(i)/1 => return i,
Definition ring.cc:5921
rComplete
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...
Definition ring.cc:3527
sro_syzcomp::Components
int * Components
Definition ring.h:176
rGetSComps
void rGetSComps(int **currComponents, long **currShiftedComponents, int *length, ring r)
Definition ring.cc:4506
rField_is_Zp_a
static BOOLEAN rField_is_Zp_a(const ring r)
Definition ring.h:535
rRing_ord_pure_Dp
BOOLEAN rRing_ord_pure_Dp(const ring r)
Definition ring.cc:5346
rModifyRing_Wp
ring rModifyRing_Wp(ring r, int *weights)
construct Wp, C ring
Definition ring.cc:3005
sro_wp64::end
short end
Definition ring.h:157
sro_cp::place
short place
Definition ring.h:165
sro_wp64::place
short place
Definition ring.h:155
rSetWeightVec
void rSetWeightVec(ring r, int64 *wv)
Definition ring.cc:5376
rField_is_Z
static BOOLEAN rField_is_Z(const ring r)
Definition ring.h:515
rHasBlockOrder
BOOLEAN rHasBlockOrder(const ring r)
Definition ring.cc:1924
rField_is_Zp
static BOOLEAN rField_is_Zp(const ring r)
Definition ring.h:506
sro_wp::start
short start
Definition ring.h:131
rHasLocalOrMixedOrdering
static BOOLEAN rHasLocalOrMixedOrdering(const ring r)
Definition ring.h:769
rHasGlobalOrdering
static BOOLEAN rHasGlobalOrdering(const ring r)
Definition ring.h:768
r_IsRingVar
int r_IsRingVar(const char *n, char **names, int N)
Definition ring.cc:213
p_Procs_s
struct p_Procs_s p_Procs_s
Definition ring.h:24
rGetISPos
int rGetISPos(const int p, const ring r)
return the position of the p^th IS block order block in r->typ[]...
Definition ring.cc:5144
rField_is_Ring_PtoM
static BOOLEAN rField_is_Ring_PtoM(const ring r)
Definition ring.h:488
sro_wp::place
short place
Definition ring.h:130
sro_ISTemp::start
short start
Definition ring.h:202
rHasSimpleLexOrder
BOOLEAN rHasSimpleLexOrder(const ring r)
returns TRUE, if simple lp or ls ordering
Definition ring.cc:1949
p_DebugPrint
void p_DebugPrint(poly p, const ring r)
Definition ring.cc:4419
rKillModifiedRing
void rKillModifiedRing(ring r)
Definition ring.cc:3119
p_SetmProc
void(* p_SetmProc)(poly p, const ring r)
Definition ring.h:40
rRing_ord_pure_dp
BOOLEAN rRing_ord_pure_dp(const ring r)
Definition ring.cc:5336
sro_dp::end
short end
Definition ring.h:123
rFieldType
static n_coeffType rFieldType(const ring r)
the type of the coefficient filed of r (n_Zp, n_Q, etc)
Definition ring.h:562
rIsPluralRing
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition ring.h:406
rField_is_long_C
static BOOLEAN rField_is_long_C(const ring r)
Definition ring.h:551
sro_ord::ord_typ
ro_typ ord_typ
Definition ring.h:226
sro_ISTemp::pVarOffset
int * pVarOffset
Definition ring.h:204
rOrd_is_Comp_dp
static BOOLEAN rOrd_is_Comp_dp(const ring r)
Definition ring.h:784
rSimpleOrdStr
const char * rSimpleOrdStr(int ord)
Definition ring.cc:78
rAssure_CompLastBlock
ring rAssure_CompLastBlock(const ring r, BOOLEAN complete=TRUE)
makes sure that c/C ordering is last ordering
Definition ring.cc:4786
rAssure_Wp_C
ring rAssure_Wp_C(const ring r, intvec *w)
Definition ring.cc:4942
rCopy0AndAddA
ring rCopy0AndAddA(ring r, int64vec *wv64, BOOLEAN copy_qideal=TRUE, BOOLEAN copy_ordering=TRUE)
Definition ring.cc:1570
sro_am::weights
int * weights
Definition ring.h:144
rBlocks
static int rBlocks(const ring r)
Definition ring.h:574
rAssure_c_dp
ring rAssure_c_dp(const ring r)
Definition ring.cc:5134
pFDegProc
long(* pFDegProc)(poly p, ring r)
Definition ring.h:39
rGetCurrSyzLimit
static int rGetCurrSyzLimit(const ring r)
Definition ring.h:729
rGetOrderType
rOrderType_t rGetOrderType(ring r)
Definition ring.cc:1846
rChar
int rChar(ring r)
Definition ring.cc:719
rTypeOfMatrixOrder
int rTypeOfMatrixOrder(const intvec *order)
Definition ring.cc:186
rUnComplete
void rUnComplete(ring r)
Definition ring.cc:4057
rIncRefCnt
static ring rIncRefCnt(ring r)
Definition ring.h:849
rCharStr
char * rCharStr(ring r)
TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar.
Definition ring.cc:652
rModifyRing_Simple
ring rModifyRing_Simple(ring r, BOOLEAN omit_degree, BOOLEAN omit_comp, unsigned long exp_limit, BOOLEAN &simple)
Definition ring.cc:3053
rKillModified_Wp_Ring
void rKillModified_Wp_Ring(ring r)
Definition ring.cc:3130
rField_is_Domain
static BOOLEAN rField_is_Domain(const ring r)
Definition ring.h:493
sro_syz::curr_index
int curr_index
Definition ring.h:189
rMinusVar
ring rMinusVar(const ring r, char *v)
undo rPlusVar
Definition ring.cc:6024
sro_dp::place
short place
Definition ring.h:121
rRing_has_CompLastBlock
BOOLEAN rRing_has_CompLastBlock(const ring r)
Definition ring.cc:5329
sro_syz::place
short place
Definition ring.h:186
rAssure_Dp_C
ring rAssure_Dp_C(const ring r)
Definition ring.cc:5124
BBA_Proc
ideal(* BBA_Proc)(const ideal, const ideal, const intvec *, const bigintmat *, kStrategy strat, const ring)
Definition ring.h:250
pLDegProc
long(* pLDegProc)(poly p, int *length, ring r)
Definition ring.h:38
kBucket_pt
kBucket * kBucket_pt
Definition ring.h:26
rOrd_is_Totaldegree_Ordering
BOOLEAN rOrd_is_Totaldegree_Ordering(const ring r)
Definition ring.cc:2043
rIsRatGRing
static BOOLEAN rIsRatGRing(const ring r)
Definition ring.h:433
rField_is_Zn
static BOOLEAN rField_is_Zn(const ring r)
Definition ring.h:518
sro_ord.data::syzcomp
sro_syzcomp syzcomp
rPar
static int rPar(const ring r)
(r->cf->P)
Definition ring.h:605
rAssure_SyzOrder
ring rAssure_SyzOrder(const ring r, BOOLEAN complete)
Definition ring.cc:4522
NF_Proc
poly(* NF_Proc)(ideal, ideal, poly, int, int, const ring _currRing)
Definition ring.h:249
rAssure_C_dp
ring rAssure_C_dp(const ring r)
Definition ring.cc:5129
rSetISReference
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,...
Definition ring.cc:5176
rHasSimpleOrder
BOOLEAN rHasSimpleOrder(const ring r)
Definition ring.cc:1893
sro_IS::F
ideal F
Definition ring.h:218
ro_typ
ro_typ
Definition ring.h:52
ro_wp64
@ ro_wp64
Definition ring.h:56
ro_syz
@ ro_syz
Definition ring.h:61
ro_cp
@ ro_cp
Definition ring.h:59
ro_dp
@ ro_dp
Definition ring.h:53
ro_is
@ ro_is
Definition ring.h:62
ro_wp_neg
@ ro_wp_neg
Definition ring.h:57
ro_wp
@ ro_wp
Definition ring.h:54
ro_isTemp
@ ro_isTemp
Definition ring.h:62
ro_am
@ ro_am
Definition ring.h:55
ro_none
@ ro_none
Definition ring.h:63
ro_syzcomp
@ ro_syzcomp
Definition ring.h:60
rAssure_SyzComp
ring rAssure_SyzComp(const ring r, BOOLEAN complete=TRUE)
Definition ring.cc:4527
rGetMaxSyzComp
int rGetMaxSyzComp(int i, const ring r)
return the max-comonent wchich has syzIndex i Assume: i<= syzIndex_limit
Definition ring.cc:5302
rInternalChar
static int rInternalChar(const ring r)
Definition ring.h:695
rString
char * rString(ring r)
Definition ring.cc:678
rIsLPRing
static BOOLEAN rIsLPRing(const ring r)
Definition ring.h:417
rAssure_HasComp
ring rAssure_HasComp(const ring r)
Definition ring.cc:4717
sro_syz::limit
int limit
Definition ring.h:187
rEqual
BOOLEAN rEqual(ring r1, ring r2, BOOLEAN qr=TRUE)
returns TRUE, if r1 equals r2 FALSE, otherwise Equality is determined componentwise,...
Definition ring.cc:1752
rOrd_is_Ds
BOOLEAN rOrd_is_Ds(const ring r)
Definition ring.cc:2076
rRingOrder_t
rRingOrder_t
order stuff
Definition ring.h:69
ringorder_lp
@ ringorder_lp
Definition ring.h:78
ringorder_a
@ ringorder_a
Definition ring.h:71
ringorder_am
@ ringorder_am
Definition ring.h:90
ringorder_a64
@ ringorder_a64
for int64 weights
Definition ring.h:72
ringorder_C
@ ringorder_C
Definition ring.h:74
ringorder_S
@ ringorder_S
S?
Definition ring.h:76
ringorder_ds
@ ringorder_ds
Definition ring.h:86
ringorder_Dp
@ ringorder_Dp
Definition ring.h:81
ringorder_unspec
@ ringorder_unspec
Definition ring.h:96
ringorder_L
@ ringorder_L
Definition ring.h:91
ringorder_Ds
@ ringorder_Ds
Definition ring.h:87
ringorder_Ip
@ ringorder_Ip
Definition ring.h:84
ringorder_dp
@ ringorder_dp
Definition ring.h:79
ringorder_c
@ ringorder_c
Definition ring.h:73
ringorder_aa
@ ringorder_aa
for idElimination, like a, except pFDeg, pWeigths ignore it
Definition ring.h:93
ringorder_no
@ ringorder_no
Definition ring.h:70
ringorder_Wp
@ ringorder_Wp
Definition ring.h:83
ringorder_ip
@ ringorder_ip
Definition ring.h:80
ringorder_is
@ ringorder_is
opposite of ls
Definition ring.h:94
ringorder_ws
@ ringorder_ws
Definition ring.h:88
ringorder_Ws
@ ringorder_Ws
Definition ring.h:89
ringorder_IS
@ ringorder_IS
Induced (Schreyer) ordering.
Definition ring.h:95
ringorder_ls
@ ringorder_ls
degree, ip
Definition ring.h:85
ringorder_s
@ ringorder_s
s?
Definition ring.h:77
ringorder_wp
@ ringorder_wp
Definition ring.h:82
ringorder_M
@ ringorder_M
Definition ring.h:75
rField_is_Q_a
static BOOLEAN rField_is_Q_a(const ring r)
Definition ring.h:545
rCopy0
ring rCopy0(const ring r, BOOLEAN copy_qideal=TRUE, BOOLEAN copy_ordering=TRUE)
Definition ring.cc:1427
rRingVar
static char * rRingVar(short i, const ring r)
Definition ring.h:583
rHas_c_Ordering
BOOLEAN rHas_c_Ordering(const ring r)
Definition ring.cc:1889
rField_is_Q
static BOOLEAN rField_is_Q(const ring r)
Definition ring.h:512
sro_ord::data
union sro_ord::@006200034235045362245112336324125006204215012002 data
sro_ord.data::wp64
sro_wp64 wp64
sro_ord.data::isTemp
sro_ISTemp isTemp
rEnvelope
ring rEnvelope(ring r)
Definition ring.cc:5819
sro_IS::limit
int limit
Definition ring.h:215
rDebugPrint
void rDebugPrint(const ring r)
Definition ring.cc:4214
sro_ord.data::dp
sro_dp dp
rWrite
void rWrite(ring r, BOOLEAN details=FALSE)
Definition ring.cc:227
rField_has_Units
static BOOLEAN rField_has_Units(const ring r)
Definition ring.h:496
rShortOut
static BOOLEAN rShortOut(const ring r)
Definition ring.h:587
sro_ord.data::cp
sro_cp cp
rRing_ord_pure_lp
BOOLEAN rRing_ord_pure_lp(const ring r)
Definition ring.cc:5356
rGetVar
poly rGetVar(const int varIndex, const ring r)
Definition ring.cc:5911
rOrd_is_dp
BOOLEAN rOrd_is_dp(const ring r)
Definition ring.cc:2056
rOrderType_t
rOrderType_t
Definition ring.h:104
rOrderType_Syz
@ rOrderType_Syz
syzygy ordering
Definition ring.h:111
rOrderType_Syz2dpc
@ rOrderType_Syz2dpc
syzcomp2dpc
Definition ring.h:113
rOrderType_CompExp
@ rOrderType_CompExp
simple ordering, component has priority
Definition ring.h:106
rOrderType_Exp
@ rOrderType_Exp
simple ordering, exponent vector has priority component is compatible with exp-vector order
Definition ring.h:109
rOrderType_General
@ rOrderType_General
non-simple ordering as specified by currRing
Definition ring.h:105
rOrderType_Schreyer
@ rOrderType_Schreyer
Schreyer ordering.
Definition ring.h:112
rOrderType_ExpNoComp
@ rOrderType_ExpNoComp
simple ordering, differences in component are not considered
Definition ring.h:114
rOrderType_ExpComp
@ rOrderType_ExpComp
simple ordering, exponent vector has priority component not compatible with exp-vector order
Definition ring.h:107
rChangeSComps
void rChangeSComps(int *currComponents, long *currShiftedComponents, int length, ring r)
Definition ring.cc:4497
sro_ord.data::is
sro_IS is
sro_syzcomp::ShiftedComponents
long * ShiftedComponents
Definition ring.h:175
rField_has_simple_Alloc
static BOOLEAN rField_has_simple_Alloc(const ring r)
Z/p, GF(p,n), R: nCopy, nNew, nDelete are dummies.
Definition ring.h:558
sro_IS::end
short end
Definition ring.h:212
rIsNCRing
static BOOLEAN rIsNCRing(const ring r)
Definition ring.h:427
rSamePolyRep
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...
Definition ring.cc:1805
rDecRefCnt
static void rDecRefCnt(ring r)
Definition ring.h:850
rParameter
static char const ** rParameter(const ring r)
(r->cf->parameter)
Definition ring.h:631
rModifyRing
ring rModifyRing(ring r, BOOLEAN omit_degree, BOOLEAN omit_comp, unsigned long exp_limit)
Definition ring.cc:2758
rAssure_SyzComp_CompLastBlock
ring rAssure_SyzComp_CompLastBlock(const ring r)
makes sure that c/C ordering is last ordering and SyzIndex is first
Definition ring.cc:4841
rParStr
char * rParStr(ring r)
Definition ring.cc:654
sro_syz::syz_index
int * syz_index
Definition ring.h:188
rCheckIV
BOOLEAN rCheckIV(const intvec *iv)
Definition ring.cc:176
sro_cp::end
short end
Definition ring.h:167
sro_am::start
short start
Definition ring.h:141
sro_ord.data::wp
sro_wp wp
rField_is_long_R
static BOOLEAN rField_is_long_R(const ring r)
Definition ring.h:548
rOrderName
rRingOrder_t rOrderName(char *ordername)
Definition ring.cc:512
sro_wp::end
short end
Definition ring.h:132
sro_am::len_gen
short len_gen
Definition ring.h:143
sro_wp64::start
short start
Definition ring.h:156
sro_dp::start
short start
Definition ring.h:122
rOrdStr
char * rOrdStr(ring r)
Definition ring.cc:526
rField_is_numeric
static BOOLEAN rField_is_numeric(const ring r)
Definition ring.h:521
rDelete
void rDelete(ring r)
unconditionally deletes fields in r
Definition ring.cc:454
rAssure_InducedSchreyerOrdering
ring rAssure_InducedSchreyerOrdering(const ring r, BOOLEAN complete=TRUE, int sgn=1)
Definition ring.cc:4989
sro_wp64::weights64
int64 * weights64
Definition ring.h:158
sro_cp::start
short start
Definition ring.h:166
sro_ord.data::am
sro_am am
sro_ord::order_index
int order_index
Definition ring.h:227
rVarStr
char * rVarStr(ring r)
Definition ring.cc:628
p_SetGlobals
void p_SetGlobals(const ring r, BOOLEAN complete=TRUE)
set all properties of a new ring - also called by rComplete
Definition ring.cc:3494
rPlusVar
ring rPlusVar(const ring r, char *v, int left)
K[x],"y" -> K[x,y] resp. K[y,x].
Definition ring.cc:5942
sro_IS::start
short start
Definition ring.h:212
rCanShortOut
static BOOLEAN rCanShortOut(const ring r)
Definition ring.h:592
rIsSyzIndexRing
static BOOLEAN rIsSyzIndexRing(const ring r)
Definition ring.h:726
sro_wp::weights
int * weights
Definition ring.h:133
rMinpolyIsNULL
static BOOLEAN rMinpolyIsNULL(const ring r)
Tests whether '(r->cf->minpoly) == NULL'.
Definition ring.h:705
rDefault
ring rDefault(int ch, int N, char **n)
Definition ring.cc:156
sro_IS::pVarOffset
int * pVarOffset
Definition ring.h:213
sro_syzcomp::place
short place
Definition ring.h:174
rField_is_Ring_2toM
static BOOLEAN rField_is_Ring_2toM(const ring r)
Definition ring.h:485
pShallowCopyDeleteProc
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...
Definition ring.h:45
n_Param
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...
Definition ring.h:658
rField_is_GF
static BOOLEAN rField_is_GF(const ring r)
Definition ring.h:527
sro_ISTemp::suffixpos
int suffixpos
Definition ring.h:203
sro_ord.data::syz
sro_syz syz
rVar
static short rVar(const ring r)
define rVar(r) (r->N)
Definition ring.h:598
rAssure_dp_S
ring rAssure_dp_S(const ring r)
Definition ring.cc:5114
rOrd_is_ds
BOOLEAN rOrd_is_ds(const ring r)
Definition ring.cc:2066
rAssure_TDeg
ring rAssure_TDeg(const ring r, int &pos)
Definition ring.cc:4619
rSumInternal
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,...
Definition ring.cc:755
rSetSyzComp
void rSetSyzComp(int k, const ring r)
Definition ring.cc:5230
rHasMixedOrdering
static BOOLEAN rHasMixedOrdering(const ring r)
Definition ring.h:770
sro_syzcomp::length
long length
Definition ring.h:178
rGetWeightVec
int64 * rGetWeightVec(const ring r)
Definition ring.cc:5366
rField_has_simple_inverse
static BOOLEAN rField_has_simple_inverse(const ring r)
Definition ring.h:554
rAssure_dp_C
ring rAssure_dp_C(const ring r)
Definition ring.cc:5119
rCopy
ring rCopy(ring r)
Definition ring.cc:1737
idhdl
idrec * idhdl
Definition ring.h:22
rDBTest
BOOLEAN rDBTest(ring r, const char *fn, const int l)
Definition ring.cc:2098
rGetExpSize
unsigned long rGetExpSize(unsigned long bitmask, int &bits, int N)
Definition ring.cc:2723
sro_IS
Definition ring.h:211
sro_ISTemp
Definition ring.h:201
sro_am
Definition ring.h:139
sro_cp
Definition ring.h:164
sro_dp
Definition ring.h:120
sro_ord
Definition ring.h:225
sro_syz
Definition ring.h:185
sro_syzcomp
Definition ring.h:173
sro_wp
Definition ring.h:129
sro_wp64
Definition ring.h:154
sip_sideal
The following sip_sideal structure has many different uses throughout Singular. Basic use-cases for i...
Definition simpleideals.h:18
sip_smap
Definition simpleideals.h:33
ip_sring
Definition ring.h:254
ip_sring::ppNoether
poly ppNoether
Definition ring.h:293
ip_sring::cf
n_Procs_s * cf
Definition ring.h:374
ip_sring::ExpPerLong
short ExpPerLong
Definition ring.h:341
ip_sring::block0
int * block0
Definition ring.h:260
ip_sring::NegWeightL_Offset
int * NegWeightL_Offset
Definition ring.h:275
ip_sring::p_Setm
p_SetmProc p_Setm
Definition ring.h:373
ip_sring::pLexOrder
BOOLEAN pLexOrder
Definition ring.h:328
ip_sring::ext_ref
void * ext_ref
Definition ring.h:295
ip_sring::pCompIndex
short pCompIndex
Definition ring.h:342
ip_sring::pOrdIndex
short pOrdIndex
Definition ring.h:343
ip_sring::pFDegOrig
pFDegProc pFDegOrig
Definition ring.h:369
ip_sring::N
short N
Definition ring.h:309
ip_sring::firstwv
int * firstwv
Definition ring.h:289
ip_sring::VarL_Size
short VarL_Size
Definition ring.h:339
ip_sring::pModW
intvec * pModW
Definition ring.h:292
ip_sring::GetNC
const nc_struct * GetNC() const
Definition ring.h:379
ip_sring::LPncGenCount
short LPncGenCount
Definition ring.h:320
ip_sring::block1
int * block1
Definition ring.h:261
ip_sring::real_var_end
short real_var_end
Definition ring.h:315
ip_sring::firstBlockEnds
short firstBlockEnds
Definition ring.h:313
ip_sring::CanShortOut
BOOLEAN CanShortOut
Definition ring.h:325
ip_sring::order
rRingOrder_t * order
Definition ring.h:259
ip_sring::NegWeightL_Size
short NegWeightL_Size
Definition ring.h:350
ip_sring::options
unsigned long options
Definition ring.h:304
ip_sring::pFDeg
pFDegProc pFDeg
Definition ring.h:365
ip_sring::wanted_maxExp
unsigned long wanted_maxExp
Definition ring.h:358
ip_sring::VarL_Offset
int * VarL_Offset
Definition ring.h:353
ip_sring::PolyBin
omBin PolyBin
Definition ring.h:291
ip_sring::_nc
nc_struct * _nc
Definition ring.h:377
ip_sring::VarOffset
int * VarOffset
Definition ring.h:277
ip_sring::CmpL_Size
short CmpL_Size
Definition ring.h:335
ip_sring::ComponentOrder
BOOLEAN ComponentOrder
Definition ring.h:330
ip_sring::idroot
idhdl idroot
Definition ring.h:258
ip_sring::MixedOrder
BOOLEAN MixedOrder
Definition ring.h:327
ip_sring::ordsgn
long * ordsgn
Definition ring.h:267
ip_sring::VarL_LowIndex
short VarL_LowIndex
Definition ring.h:348
ip_sring::wvhdl
int ** wvhdl
Definition ring.h:263
ip_sring::LexOrder
BOOLEAN LexOrder
Definition ring.h:326
ip_sring::divmask
unsigned long divmask
Definition ring.h:360
ip_sring::p_Procs
p_Procs_s * p_Procs
Definition ring.h:362
ip_sring::bitmask
unsigned long bitmask
Definition ring.h:356
ip_sring::qideal
ideal qideal
extension to the ring structure: qring, rInit, OR for Q_a/Zp_a, rInit (replaces minideal!...
Definition ring.h:281
ip_sring::pLDeg
pLDegProc pLDeg
Definition ring.h:366
ip_sring::real_var_start
short real_var_start
Definition ring.h:315
ip_sring::typ
sro_ord * typ
Definition ring.h:271
ip_sring::names
char ** names
Definition ring.h:264
ip_sring::ShortOut
BOOLEAN ShortOut
Definition ring.h:324
ip_sring::isLPring
short isLPring
Definition ring.h:319
ip_sring::pLDegOrig
pLDegProc pLDegOrig
Definition ring.h:371
ip_sring::VectorOut
BOOLEAN VectorOut
Definition ring.h:323
ip_sring::BitsPerExp
short BitsPerExp
Definition ring.h:340
ip_sring::ExpL_Size
short ExpL_Size
Definition ring.h:334
ip_sring::GetNC
nc_struct *& GetNC()
Definition ring.h:380
ip_sring::OrdSize
short OrdSize
Definition ring.h:344
ip_sring::OrdSgn
short OrdSgn
Definition ring.h:311
ip_sring::ref
int ref
Definition ring.h:307
nc_struct
Definition nc.h:68
kStrategy
skStrategy * kStrategy
Definition structs.h:54
currShiftedComponents
EXTERN_VAR long * currShiftedComponents
Definition syz.h:118