My Project  debian-1:4.1.1-p2+ds-4build1
ring.h
Go to the documentation of this file.
1 #ifndef RING_H
2 #define RING_H
3 /****************************************
4 * Computer Algebra System SINGULAR *
5 ****************************************/
6 /*
7 * ABSTRACT - the interpreter related ring operations
8 */
9 
10 /* includes */
11 #include "omalloc/omalloc.h"
12 #include "misc/auxiliary.h"
13 #include "coeffs/coeffs.h"
14 #include "misc/intvec.h"
15 #include "misc/int64vec.h"
17 //#include "polys/monomials/polys-impl.h"
18 //
19 
20 /* forward declaration of types */
21 class idrec; typedef idrec * idhdl; // _only_ for idhdl ip_sring::idroot
22 //struct spolyrec;
23 //typedef struct spolyrec polyrec;
24 //typedef struct spolyrec * poly;
25 //typedef struct spolyrec const * const_poly;
26 struct ip_sring;
27 typedef struct ip_sring * ring;
28 typedef struct ip_sring const * const_ring;
29 struct p_Procs_s;
30 typedef struct p_Procs_s p_Procs_s;
31 class kBucket;
32 typedef kBucket* kBucket_pt;
33 
34 struct sip_sideal;
35 typedef struct sip_sideal * ideal;
36 typedef struct sip_sideal const * const_ideal;
37 
38 struct sip_smap;
39 typedef struct sip_smap * map;
40 typedef struct sip_smap const * const_map;
41 
42 /* the function pointer types */
43 
44 typedef long (*pLDegProc)(poly p, int *length, ring r);
45 typedef long (*pFDegProc)(poly p, ring r);
46 typedef void (*p_SetmProc)(poly p, const ring r);
47 
48 
49 /// returns a poly from dest_r which is a ShallowCopy of s_p from source_r
50 /// assumes that source_r->N == dest_r->N and that orderings are the same
51 typedef poly (*pShallowCopyDeleteProc)(poly s_p, ring source_r, ring dest_r,
52  omBin dest_bin);
53 
54 // ro_typ describes what to store at the corresping "data" place in p->exp
55 // none of the directly corresponds to a ring ordering (ringorder_*)
56 // as each ringorder_* blocks corrsponds to 0..2 sro-blocks
57 typedef enum
58 {
59  ro_dp, // total degree with weights 1
60  ro_wp, // total weighted degree with weights>0 in wvhdl
61  ro_am, // weights for vars + weights for gen
62  ro_wp64, // weighted64 degree weights in wvhdl
63  ro_wp_neg, // total weighted degree with weights in Z in wvhdl
64  // (with possibly negative weights)
65  ro_cp, // ??ordering duplicates variables
66  ro_syzcomp, // ??ordering indicates "subset" of component number (ringorder_S)
67  ro_syz, // component number if <=syzcomp else 0 (ringorder_s)
68  ro_isTemp, ro_is, // ??Induced Syzygy (Schreyer) ordering (and prefix data placeholder dummy) (ringorder_IS)
69  ro_none
70 }
71 ro_typ;
72 
73 /// order stuff
74 typedef enum rRingOrder_t
75 {
78  ringorder_a64, ///< for int64 weights
82  ringorder_S, ///< S?
83  ringorder_s, ///< s?
97  // the following are only used internally
98  ringorder_aa, ///< for idElimination, like a, except pFDeg, pWeigths ignore it
99  ringorder_rs, ///< opposite of ls
100  ringorder_IS, ///< Induced (Schreyer) ordering
102 } rRingOrder_t;
103 
104 typedef enum rOrderType_t
105 {
106  rOrderType_General = 0, ///< non-simple ordering as specified by currRing
107  rOrderType_CompExp, ///< simple ordering, component has priority
108  rOrderType_ExpComp, ///< simple ordering, exponent vector has priority
109  ///< component not compatible with exp-vector order
110  rOrderType_Exp, ///< simple ordering, exponent vector has priority
111  ///< component is compatible with exp-vector order
112  rOrderType_Syz, ///< syzygy ordering
113  rOrderType_Schreyer, ///< Schreyer ordering
114  rOrderType_Syz2dpc, ///< syzcomp2dpc
115  rOrderType_ExpNoComp ///< simple ordering, differences in component are
116  ///< not considered
117 } rOrderType_t;
118 
119 // ordering is a degree ordering
120 struct sro_dp
121 {
122  short place; // where degree is stored (in L):
123  short start; // bounds of ordering (in E):
124  short end;
125 };
126 typedef struct sro_dp sro_dp;
127 
128 // ordering is a weighted degree ordering
129 struct sro_wp
130 {
131  short place; // where weighted degree is stored (in L)
132  short start; // bounds of ordering (in E)
133  short end;
134  int *weights; // pointers into wvhdl field
135 };
136 typedef struct sro_wp sro_wp;
137 
138 // ordering is a weighted degree ordering
139 struct sro_am
140 {
141  short place; // where weighted degree is stored (in L)
142  short start; // bounds of ordering (in E)
143  short end;
144  short len_gen; // i>len_gen: weight(gen(i)):=0
145  int *weights; // pointers into wvhdl field of length (end-start+1) + len_gen + 1
146  // contents w_{start},... w_{end}, len, mod_w_1, .. mod_w_len, 0
147  int *weights_m; // pointers into wvhdl field of length len_gen + 1
148  // len_gen, mod_w_1, .. mod_w_len, 0
149 
150 };
151 typedef struct sro_am sro_am;
152 
153 // ordering is a weighted degree ordering
154 struct sro_wp64
155 {
156  short place; // where weighted degree is stored (in L)
157  short start; // bounds of ordering (in E)
158  short end;
159  int64 *weights64; // pointers into wvhdl field
160 };
161 typedef struct sro_wp64 sro_wp64;
162 
163 // ordering duplicates variables
164 struct sro_cp
165 {
166  short place; // where start is copied to (in E)
167  short start; // bounds of sources of copied variables (in E)
168  short end;
169 };
170 typedef struct sro_cp sro_cp;
171 
172 // ordering indicates "subset" of component number
173 struct sro_syzcomp
174 {
175  short place; // where the index is stored (in L)
176  long *ShiftedComponents; // pointer into index field
177  int* Components;
178 #ifdef PDEBUG
179  long length;
180 #endif
181 };
182 typedef struct sro_syzcomp sro_syzcomp;
183 
184 // ordering with component number >syzcomp is lower
185 struct sro_syz
186 {
187  short place; // where the index is stored (in L)
188  int limit; // syzcomp
189  int* syz_index; // mapping Component -> SyzIndex for Comp <= limit
190  int curr_index; // SyzIndex for Component > limit
191 };
192 
193 typedef struct sro_syz sro_syz;
194 // Induced Syzygy (Schreyer) ordering is built inductively as follows:
195 // we look for changes made by ordering blocks which are between prefix/suffix markers:
196 // that is: which variables where placed by them and where (judging by v)
197 
198 // due to prefix/suffix nature we need some placeholder:
199 // prefix stores here initial state
200 // suffix cleares this up
201 struct sro_ISTemp
202 {
203  short start; // 1st member SHOULD be short "place"
205  int* pVarOffset; // copy!
206 };
207 
208 // So this is the actuall thing!
209 // suffix uses last sro_ISTemp (cleares it up afterwards) and
210 // creates this block
211 struct sro_IS
212 {
213  short start, end; // which part of L we want to want to update...
214  int* pVarOffset; // same as prefix!
215 
216  int limit; // first referenced component
217 
218  // reference poly set?? // Should it be owned by ring?!!!
219  ideal F; // reference leading (module)-monomials set. owned by ring...
220 };
221 
222 typedef struct sro_IS sro_IS;
223 typedef struct sro_ISTemp sro_ISTemp;
224 
225 struct sro_ord
226 {
228  int order_index; // comes from r->order[order_index]
229  union
230  {
231  sro_dp dp;
232  sro_wp wp;
233  sro_am am;
234  sro_wp64 wp64;
235  sro_cp cp;
236  sro_syzcomp syzcomp;
237  sro_syz syz;
238  sro_IS is;
239  sro_ISTemp isTemp;
240  } data;
241 };
242 
243 #ifdef HAVE_PLURAL
244 struct nc_struct;
245 typedef struct nc_struct nc_struct;
246 #endif
247 class skStrategy;
248 typedef skStrategy * kStrategy;
249 
250 typedef poly (*NF_Proc)(ideal, ideal, poly, int, int, const ring _currRing);
251 typedef ideal (*BBA_Proc) (const ideal, const ideal, const intvec *, const intvec *, kStrategy strat, const ring);
252 
253 
254 struct ip_sring
255 {
256 // each entry must have a description and a procedure defining it,
257 // general ordering: pointer/structs, long, int, short, BOOLEAN/char/enum
258 // general defining procedures: rInit, rComplete, interpreter, ??
259  idhdl idroot; /* local objects , interpreter*/
260  rRingOrder_t* order; /* array of orderings, rInit/rSleftvOrdering2Ordering */
261  int* block0; /* starting pos., rInit/rSleftvOrdering2Ordering*/
262  int* block1; /* ending pos., rInit/rSleftvOrdering2Ordering*/
263 // char** parameter; /* names of parameters, rInit */
264  int** wvhdl; /* array of weight vectors, rInit/rSleftvOrdering2Ordering */
265  char ** names; /* array of variable names, rInit */
266 
267  // what follows below here should be set by rComplete, _only_
268  long *ordsgn; /* array of +/- 1 (or 0) for comparing monomials */
269  /* ExpL_Size entries*/
270 
271  // is NULL for lp or N == 1, otherwise non-NULL (with OrdSize > 0 entries) */
272  sro_ord* typ; /* array of orderings + sizes, OrdSize entries */
273  /* if NegWeightL_Size > 0, then NegWeightL_Offset[0..size_1] is index of longs
274  in ExpVector whose values need an offset due to negative weights */
275  /* array of NegWeigtL_Size indicies */
276  int* NegWeightL_Offset;
277 
278  int* VarOffset;
279 
280 // ideal minideal;
281 // number minpoly; /* replaced by minideal->m[0] */
282  ideal qideal; /**< extension to the ring structure: qring, rInit, OR
283  for Q_a/Zp_a, rInit (replaces minideal!);
284  for a start, we assume that there is either no
285  or exactly one generator in minideal, playing
286  the role of the former minpoly; minideal may
287  also be NULL which coincides with the
288  no-generator-case **/
289 
290  int* firstwv;
291 
292  omBin PolyBin; /* Bin from where monoms are allocated */
293  intvec * pModW; /* std: module weights */
294  poly ppNoether; /* variables, set by procedures from hecke/kstd1:
295  the highest monomial below pHEdge */
296  void * ext_ref; /* libsing GAP object */
297 // #ifdef HAVE_RINGS
298 // unsigned int cf->ringtype; /* cring = 0 => coefficient field, cring = 1 => coeffs from Z/2^m */
299 // mpz_ptr cf->modBase; /* Z/(ringflag^cf->modExponent)=Z/cf->modNumber*/
300 // unsigned long cf->modExponent;
301 // unsigned long cf->modNumber; /* Z/cf->modNumber */
302 // mpz_ptr cf->modNumber;
303 // #endif
304 
305  unsigned long options; /* ring dependent options */
306 
307 // int ch; /* characteristic, rInit */
308  int ref; /* reference counter to the ring, interpreter */
309 
310  short N; /* number of vars, rInit */
311 
312  short OrdSgn; /* 1 for polynomial rings, -1 otherwise, rInit */
313 
314  short firstBlockEnds;
315 #ifdef HAVE_PLURAL
317 #endif
318 
319 #ifdef HAVE_SHIFTBBA
320  short isLPring; /* 0 for non-letterplace rings, otherwise the number of LP blocks, at least 1, known also as lV */
321 #endif
322 
326  BOOLEAN LexOrder; // TRUE if the monomial ordering has polynomial and power series blocks
327  BOOLEAN MixedOrder; // TRUE for global/local mixed orderings, FALSE otherwise
328  BOOLEAN pLexOrder; /* TRUE if the monomial ordering is not compatible with pFDeg */
329 
330  BOOLEAN ComponentOrder; // 1 if ringorder_c, -1 for ringorder_C,ringorder_S,ringorder_s
331 
332  // what follows below here should be set by rComplete, _only_
333  // contains component, but no weight fields in E */
334  short ExpL_Size; // size of exponent vector in long
335  short CmpL_Size; // portions which need to be compared
336  /* number of long vars in exp vector:
337  long vars are those longs in the exponent vector which are
338  occupied by variables, only */
339  short VarL_Size;
340  short BitsPerExp; /* number of bits per exponent */
341  short ExpPerLong; /* maximal number of Exponents per long */
342  short pCompIndex; /* p->exp.e[pCompIndex] is the component */
343  short pOrdIndex; /* p->exp[pOrdIndex] is pGetOrd(p) */
344  short OrdSize; /* size of ord vector (in sro_ord) */
345 
346  /* if >= 0, long vars in exp vector are consecutive and start there
347  if < 0, long vars in exp vector are not consecutive */
348  short VarL_LowIndex;
349 
350  short NegWeightL_Size;
351  /* array of size VarL_Size,
352  VarL_Offset[i] gets i-th long var in exp vector */
353  int* VarL_Offset;
354 
355  /* mask for getting single exponents */
356  unsigned long bitmask;
357  /* mask used for divisiblity tests */
358  unsigned long divmask; // rComplete
359 
360  p_Procs_s* p_Procs; // rComplete/p_ProcsSet
361 
362  /* FDeg and LDeg */
363  pFDegProc pFDeg; // rComplete/rSetDegStuff
364  pLDegProc pLDeg; // rComplete/rSetDegStuff
365 
366  /* as it was determined by rComplete */
368  /* and as it was determined before rOptimizeLDeg */
370 
372  n_Procs_s* cf;
373 #ifdef HAVE_PLURAL
374  private:
375  nc_struct* _nc; // private
376  public:
377  inline const nc_struct* GetNC() const { return _nc; }; // public!!!
378  inline nc_struct*& GetNC() { return _nc; }; // public!!!
379 #endif
380  public:
381  operator coeffs() const { return cf; }
382 };
383 
384 ////////// DEPRECATED
385 /////// void rChangeCurrRing(ring r);
386 
387 ring rDefault(int ch, int N, char **n);
388 ring rDefault(const coeffs cf, int N, char **n, const rRingOrder_t o=ringorder_lp);
389 ring rDefault(int ch, int N, char **n,int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl=NULL);
390 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);
391 unsigned long rGetExpSize(unsigned long bitmask, int & bits, int N);
392 
393 // #define rIsRingVar(A) r_IsRingVar(A,currRing)
394 int r_IsRingVar(const char *n, char**names, int N);
395 void rWrite(ring r, BOOLEAN details = FALSE);
396 ring rCopy(ring r);
397 ring rCopy0(const ring r, BOOLEAN copy_qideal = TRUE, BOOLEAN copy_ordering = TRUE);
398 ring rCopy0AndAddA(ring r, int64vec *wv64, BOOLEAN copy_qideal = TRUE,
399  BOOLEAN copy_ordering = TRUE);
400 ring rOpposite(ring r);
401 ring rEnvelope(ring r);
402 
403 /// we must always have this test!
404 static inline BOOLEAN rIsPluralRing(const ring r)
405 {
406  assume(r != NULL); assume(r->cf != NULL);
407 #ifdef HAVE_PLURAL
408  nc_struct *n;
409  return (r != NULL) && ((n=r->GetNC()) != NULL) /*&& (n->type != nc_error)*/;
410 #else
411  return FALSE;
412 #endif
413 }
414 
415 static inline BOOLEAN rIsRatGRing(const ring r)
416 {
417  assume(r != NULL);
418 #ifdef HAVE_PLURAL
419  /* nc_struct *n; */
420  return (r != NULL) /* && ((n=r->GetNC()) != NULL) */
421  && (r->real_var_start>1);
422 #else
423  return FALSE;
424 #endif
425 }
426 
427 // The following are for LaScala3 only!
428 void rChangeSComps(int* currComponents, long* currShiftedComponents, int length, ring r);
429 void rGetSComps(int** currComponents, long** currShiftedComponents, int *length, ring r);
430 
431 
432 
433 const char * rSimpleOrdStr(int ord);
434 rRingOrder_t rOrderName(char * ordername);
435 char * rOrdStr(ring r);
436 char * rVarStr(ring r);
437 char * rCharStr(ring r);
438 char * rString(ring r);
439 int rChar(ring r);
440 
441 char * rParStr(ring r);
442 
443 int rSum(ring r1, ring r2, ring &sum);
444 /// returns -1 for not compatible, 1 for compatible (and sum)
445 /// dp_dp:0: block ordering, 1: dp,dp, 2: aa(...),dp
446 /// vartest: check for name conflicts
447 int rSumInternal(ring r1, ring r2, ring &sum, BOOLEAN vartest, BOOLEAN dp_dp);
448 
449 /// returns TRUE, if r1 equals r2 FALSE, otherwise Equality is
450 /// determined componentwise, if qr == 1, then qrideal equality is
451 /// tested, as well
452 BOOLEAN rEqual(ring r1, ring r2, BOOLEAN qr = TRUE);
453 
454 /// returns TRUE, if r1 and r2 represents the monomials in the same way
455 /// FALSE, otherwise
456 /// this is an analogue to rEqual but not so strict
457 BOOLEAN rSamePolyRep(ring r1, ring r2);
458 
459 void rUnComplete(ring r);
460 
461 BOOLEAN rRing_is_Homog(ring r);
463 
464 #ifdef HAVE_RINGS
465 static inline BOOLEAN rField_is_Ring_2toM(const ring r)
466 { assume(r != NULL); assume(r->cf != NULL); return ( nCoeff_is_Ring_2toM(r->cf) ); }
467 
468 static inline BOOLEAN rField_is_Ring_ModN(const ring r)
469 { assume(r != NULL); assume(r->cf != NULL); return ( nCoeff_is_Ring_ModN(r->cf) ); }
470 
471 static inline BOOLEAN rField_is_Ring_PtoM(const ring r)
472 { assume(r != NULL); assume(r->cf != NULL); return ( nCoeff_is_Ring_PtoM(r->cf) ); }
473 
474 static inline BOOLEAN rField_is_Ring_Z(const ring r)
475 { assume(r != NULL); assume(r->cf != NULL); return ( nCoeff_is_Ring_Z(r->cf) ); }
476 
477 static inline BOOLEAN rField_is_Ring(const ring r)
478 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Ring(r->cf); }
479 
480 static inline BOOLEAN rField_is_Domain(const ring r)
481 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Domain(r->cf); }
482 
483 static inline BOOLEAN rField_has_Units(const ring r)
484 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_has_Units(r->cf); }
485 #else
486 #define rField_is_Ring(A) (0)
487 #define rField_is_Ring_2toM(A) (0)
488 #define rField_is_Ring_ModN(A) (0)
489 #define rField_is_Ring_PtoM(A) (0)
490 #define rField_is_Ring_Z(A) (0)
491 #define rField_is_Domain(A) (1)
492 #define rField_has_Units(A) (1)
493 #endif
494 
495 static inline BOOLEAN rField_is_Zp(const ring r)
496 { assume(r != NULL); assume(r->cf != NULL); return (getCoeffType(r->cf) == n_Zp); }
497 
498 static inline BOOLEAN rField_is_Zp(const ring r, int p)
499 { assume(r != NULL); assume(r->cf != NULL); return (getCoeffType(r->cf) == n_Zp) && (r->cf->ch == p); }
500 
501 static inline BOOLEAN rField_is_Q(const ring r)
502 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Q(r->cf); }
503 
504 static inline BOOLEAN rField_is_Z(const ring r)
505 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Z(r->cf); }
506 
507 static inline BOOLEAN rField_is_numeric(const ring r) /* R, long R, long C */
508 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_numeric(r->cf); }
509 
510 static inline BOOLEAN rField_is_R(const ring r)
511 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_R(r->cf); }
512 
513 static inline BOOLEAN rField_is_GF(const ring r)
514 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_GF(r->cf); }
515 
516 static inline BOOLEAN rField_is_GF(const ring r, int q)
517 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_GF(r->cf, q); }
518 
519 /* DO NOT USE; just here for compatibility reasons towards
520  the SINGULAR svn trunk */
521 static inline BOOLEAN rField_is_Zp_a(const ring r)
522 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Zp_a(r->cf); }
523 
524 /* DO NOT USE; just here for compatibility reasons towards
525  the SINGULAR svn trunk */
526 static inline BOOLEAN rField_is_Zp_a(const ring r, int p)
527 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Zp_a(r->cf, p); }
528 
529 /* DO NOT USE; just here for compatibility reasons towards
530  the SINGULAR svn trunk */
531 static inline BOOLEAN rField_is_Q_a(const ring r)
532 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Q_a(r->cf); }
533 
534 static inline BOOLEAN rField_is_long_R(const ring r)
535 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_long_R(r->cf); }
536 
537 static inline BOOLEAN rField_is_long_C(const ring r)
538 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_long_C(r->cf); }
539 
540 static inline BOOLEAN rField_has_simple_inverse(const ring r)
541 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_has_simple_inverse(r->cf); }
542 
543 /// Z/p, GF(p,n), R: nCopy, nNew, nDelete are dummies
544 static inline BOOLEAN rField_has_simple_Alloc(const ring r)
545 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_has_simple_Alloc(r->cf); }
546 
547 n_coeffType rFieldType(const ring r);
548 
549 /// this needs to be called whenever a new ring is created: new fields
550 /// in ring are created (like VarOffset), unless they already exist
551 /// with force == 1, new fields are _always_ created (overwritten),
552 /// even if they exist
553 BOOLEAN rComplete(ring r, int force = 0);
554 // use this to free fields created by rComplete //?
555 
556 /// set all properties of a new ring - also called by rComplete
557 void p_SetGlobals(const ring r, BOOLEAN complete = TRUE);
558 
559 static inline int rBlocks(ring r)
560 {
561  assume(r != NULL);
562  int i=0;
563  while (r->order[i]!=0) i++;
564  return i+1;
565 }
566 
567 // misc things
568 static inline char* rRingVar(short i, const ring r)
569 {
570  assume(r != NULL); assume(r->cf != NULL); return r->names[i];
571 }
572 static inline BOOLEAN rShortOut(const ring r)
573 {
574  assume(r != NULL); return (r->ShortOut);
575 }
576 
577 static inline BOOLEAN rCanShortOut(const ring r)
578 {
579  assume(r != NULL); return (r->CanShortOut);
580 }
581 
582 /// #define rVar(r) (r->N)
583 static inline short rVar(const ring r)
584 {
585  assume(r != NULL);
586  return r->N;
587 }
588 
589 /// (r->cf->P)
590 static inline int rPar(const ring r)
591 {
592  assume(r != NULL);
593  const coeffs C = r->cf;
594  assume(C != NULL);
595 
596  return n_NumberOfParameters(C);
597 // if( nCoeff_is_Extension(C) )
598 // {
599 // const ring R = C->extRing;
600 // assume( R != NULL );
601 // return rVar( R );
602 // }
603 // else if (nCoeff_is_GF(C))
604 // {
605 // return 1;
606 // }
607 // else if (nCoeff_is_long_C(C))
608 // {
609 // return 1;
610 // }
611 // return 0;
612 }
613 
614 
615 /// (r->cf->parameter)
616 static inline char const ** rParameter(const ring r)
617 {
618  assume(r != NULL);
619  const coeffs C = r->cf;
620  assume(C != NULL);
621 
622  return n_ParameterNames(C);
623 // if( nCoeff_is_Extension(C) ) // only alg / trans. exts...
624 // {
625 // const ring R = C->extRing;
626 // assume( R != NULL );
627 // return R->names;
628 // }
629 // else if (nCoeff_is_GF(C))
630 // {
631 // return &(C->m_nfParameter);
632 // }
633 // else if (nCoeff_is_long_C(C))
634 // {
635 // return &(C->complex_parameter);
636 // }
637 // return NULL;
638 }
639 
640 /// return the specified parameter as a (new!) number in the given
641 /// polynomial ring, or NULL if invalid
642 /// parameters (as variables) begin with 1!
643 static inline number n_Param(const short iParameter, const ring r)
644 {
645  assume(r != NULL);
646  const coeffs C = r->cf;
647  assume(C != NULL);
648  return n_Param(iParameter, C);
649 // const n_coeffType _filed_type = getCoeffType(C);
650 //
651 // if ( iParameter <= 0 || iParameter > rPar(r) )
652 // // Wrong parameter
653 // return NULL;
654 //
655 // if( _filed_type == n_algExt )
656 // return naParameter(iParameter, C);
657 //
658 // if( _filed_type == n_transExt )
659 // return ntParameter(iParameter, C);
660 //
661 // if (_filed_type == n_GF)// if (nCoeff_is_GF(C))
662 // {
663 // number nfPar (int i, const coeffs);
664 // return nfPar(iParameter, C);
665 // }
666 //
667 // if (_filed_type == n_long_C) // if (nCoeff_is_long_C(C))
668 // {
669 // number ngcPar(int i, const coeffs r);
670 // return ngcPar(iParameter, C);
671 // }
672 //
673 // return NULL;
674 }
675 
676 /// if m == var(i)/1 => return i,
677 int n_IsParam(number m, const ring r);
678 
679 //#define rInternalChar(r) ((r)->cf->ch)
680 static inline int rInternalChar(const ring r)
681 {
682  assume(r != NULL);
683  const coeffs C = r->cf;
684  assume(C != NULL);
685  return C->ch;
686 }
687 
688 
689 /// Tests whether '(r->cf->minpoly) == NULL'
690 static inline BOOLEAN rMinpolyIsNULL(const ring r)
691 {
692  assume(r != NULL);
693  const coeffs C = r->cf;
694  assume(C != NULL);
695 
696  const BOOLEAN ret = nCoeff_is_algExt(C); // || nCoeff_is_GF(C) || nCoeff_is_long_C(C);
697 
698  if( ret )
699  {
700  assume( (C->extRing) != NULL );
701  BOOLEAN idIs0 (ideal h);
702  assume((!((C->extRing)->qideal==NULL)) && (!idIs0((C->extRing)->qideal)));
703  }
704 
705  // TODO: this leads to test fails (due to rDecompose?)
706  return !ret;
707 }
708 
709 
710 
711 static inline BOOLEAN rIsSyzIndexRing(const ring r)
712 { assume(r != NULL); assume(r->cf != NULL); return r->order[0] == ringorder_s;}
713 
714 static inline int rGetCurrSyzLimit(const ring r)
715 { assume(r != NULL); assume(r->cf != NULL); return (rIsSyzIndexRing(r)? r->typ[0].data.syz.limit : 0);}
716 
717 void rSetSyzComp(int k, const ring r);
718 
719 // Ring Manipulations
720 ring rAssure_HasComp(const ring r);
721 ring rAssure_SyzOrder(const ring r, BOOLEAN complete);
722 ring rAssure_SyzComp(const ring r, BOOLEAN complete = TRUE);
723 ring rAssure_InducedSchreyerOrdering(const ring r, BOOLEAN complete = TRUE, int sgn = 1);
724 
725 ring rAssure_dp_S(const ring r);
726 ring rAssure_dp_C(const ring r);
727 ring rAssure_C_dp(const ring r);
728 ring rAssure_c_dp(const ring r);
729 
730 /// makes sure that c/C ordering is last ordering
731 ring rAssure_CompLastBlock(const ring r, BOOLEAN complete = TRUE);
732 
733 /// makes sure that c/C ordering is last ordering and SyzIndex is first
734 ring rAssure_SyzComp_CompLastBlock(const ring r);
735 ring rAssure_TDeg(const ring r, int &pos);
736 BOOLEAN rHasTDeg(const ring r);
737 
738 /// return the max-comonent wchich has syzIndex i
739 /// Assume: i<= syzIndex_limit
740 int rGetMaxSyzComp(int i, const ring r);
741 
742 BOOLEAN rHasSimpleOrder(const ring r);
743 BOOLEAN rHas_c_Ordering(const ring r);
744 
745 /// returns TRUE, if simple lp or ls ordering
746 BOOLEAN rHasSimpleLexOrder(const ring r);
747 
748 //???? return TRUE if p->exp[r->pOrdIndex] holds total degree of p ???
749 
750 
751 inline BOOLEAN rHasGlobalOrdering(const ring r){ return (r->OrdSgn==1); }
752 inline BOOLEAN rHasLocalOrMixedOrdering(const ring r){ return (r->OrdSgn==-1); }
753 inline BOOLEAN rHasMixedOrdering(const ring r) { return (r->MixedOrder); }
754 
755 // #define rHasGlobalOrdering(R) ((R)->OrdSgn==1)
756 // #define rHasLocalOrMixedOrdering(R) ((R)->OrdSgn==-1)
757 
759 
760 /// return TRUE if p_SetComp requires p_Setm
761 BOOLEAN rOrd_SetCompRequiresSetm(const ring r);
763 
764 /// returns TRUE if var(i) belongs to p-block
765 BOOLEAN rIsPolyVar(int i, const ring r);
766 
767 static inline BOOLEAN rOrd_is_Comp_dp(const ring r)
768 {
769  assume(r != NULL);
770  assume(r->cf != NULL);
771  return ((r->order[0] == ringorder_c || r->order[0] == ringorder_C) &&
772  r->order[1] == ringorder_dp &&
773  r->order[2] == 0);
774 }
775 
776 #ifdef RDEBUG
777 #define rTest(r) rDBTest(r, __FILE__, __LINE__)
778 extern BOOLEAN rDBTest(ring r, const char* fn, const int l);
779 #else
780 #define rTest(r) (TRUE)
781 #endif
782 
783 ring rModifyRing(ring r, BOOLEAN omit_degree,
784  BOOLEAN omit_comp,
785  unsigned long exp_limit);
786 
787 /// construct Wp, C ring
788 ring rModifyRing_Wp(ring r, int* weights);
789 void rModify_a_to_A(ring r);
790 
791 void rKillModifiedRing(ring r);
792 // also frees weights
793 void rKillModified_Wp_Ring(ring r);
794 
795 ring rModifyRing_Simple(ring r, BOOLEAN omit_degree, BOOLEAN omit_comp, unsigned long exp_limit, BOOLEAN &simple);
796 
797 #ifdef RDEBUG
798 void rDebugPrint(const ring r);
799 // void pDebugPrint(poly p);
800 void p_DebugPrint(poly p, const ring r);
801 #endif
802 
803 int64 * rGetWeightVec(const ring r);
804 void rSetWeightVec(ring r, int64 *wv);
805 
806 /////////////////////////////
807 // Auxillary functions
808 //
809 
810 /* return the varIndex-th ring variable as a poly;
811  varIndex starts at index 1 */
812 poly rGetVar(const int varIndex, const ring r);
813 
814 BOOLEAN rSetISReference(const ring r, const ideal F, const int i = 0, const int p = 0);
815 
816 /// return the position of the p^th IS block order block in r->typ[]...
817 int rGetISPos(const int p, const ring r);
818 void pISUpdateComponents(ideal F, const intvec *const V, const int MIN, const ring r);
819 
820 BOOLEAN rCheckIV(const intvec *iv);
821 int rTypeOfMatrixOrder(const intvec *order);
822 
823 void rDelete(ring r); // To be used instead of rKill!
824 
825 extern omBin sip_sring_bin;
826 #endif
getCoeffType
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
Definition: coeffs.h:421
rEnvelope
ring rEnvelope(ring r)
Definition: ring.cc:5505
nc_struct
Definition: nc.h:75
rHasGlobalOrdering
BOOLEAN rHasGlobalOrdering(const ring r)
Definition: ring.h:750
ip_sring::ordsgn
long * ordsgn
Definition: ring.h:267
ro_am
Definition: ring.h:60
FALSE
#define FALSE
Definition: auxiliary.h:94
sro_IS::end
short end
Definition: ring.h:212
ip_sring::names
char ** names
Definition: ring.h:264
ip_sring::real_var_end
short real_var_end
Definition: ring.h:315
ip_sring::options
unsigned long options
Definition: ring.h:304
rUnComplete
void rUnComplete(ring r)
Definition: ring.cc:3845
skStrategy
Definition: kutil.h:261
omalloc.h
ip_sring::PolyBin
omBin PolyBin
Definition: ring.h:291
ip_sring::pLDeg
pLDegProc pLDeg
Definition: ring.h:363
sro_wp::weights
int * weights
Definition: ring.h:133
nCoeff_is_numeric
static FORCE_INLINE BOOLEAN nCoeff_is_numeric(const coeffs r)
Definition: coeffs.h:845
rField_is_long_R
static BOOLEAN rField_is_long_R(const ring r)
Definition: ring.h:533
sro_am::end
short end
Definition: ring.h:142
ringorder_Ds
Definition: ring.h:91
ip_sring::CanShortOut
BOOLEAN CanShortOut
Definition: ring.h:324
rAssure_dp_S
ring rAssure_dp_S(const ring r)
Definition: ring.cc:4861
ip_sring::BitsPerExp
short BitsPerExp
Definition: ring.h:339
rSetWeightVec
void rSetWeightVec(ring r, int64 *wv)
Definition: ring.cc:5129
ip_sring::VectorOut
BOOLEAN VectorOut
Definition: ring.h:322
nCoeff_is_R
static FORCE_INLINE BOOLEAN nCoeff_is_R(const coeffs r)
Definition: coeffs.h:849
k
int k
Definition: cfEzgcd.cc:92
nCoeff_is_Z
static FORCE_INLINE BOOLEAN nCoeff_is_Z(const coeffs r)
Definition: coeffs.h:839
pLDegProc
long(* pLDegProc)(poly p, int *length, ring r)
Definition: ring.h:43
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:3315
nCoeff_is_Ring_2toM
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_2toM(const coeffs r)
Definition: coeffs.h:746
rGetExpSize
unsigned long rGetExpSize(unsigned long bitmask, int &bits, int N)
Definition: ring.cc:2557
rCanShortOut
static BOOLEAN rCanShortOut(const ring r)
Definition: ring.h:576
ip_sring::NegWeightL_Offset
int * NegWeightL_Offset
Definition: ring.h:275
sro_wp64::weights64
int64 * weights64
Definition: ring.h:158
rField_is_Domain
static BOOLEAN rField_is_Domain(const ring r)
Definition: ring.h:479
ip_sring::isLPring
short isLPring
Definition: ring.h:319
rField_is_Ring_2toM
static BOOLEAN rField_is_Ring_2toM(const ring r)
Definition: ring.h:464
sro_syzcomp::ShiftedComponents
long * ShiftedComponents
Definition: ring.h:175
rIsPolyVar
BOOLEAN rIsPolyVar(int i, const ring r)
returns TRUE if var(i) belongs to p-block
Definition: ring.cc:1904
sro_dp::end
short end
Definition: ring.h:123
rOrderType_ExpComp
simple ordering, exponent vector has priority component not compatible with exp-vector order
Definition: ring.h:107
sro_cp::place
short place
Definition: ring.h:165
sro_wp64::place
short place
Definition: ring.h:155
rCopy0AndAddA
ring rCopy0AndAddA(ring r, int64vec *wv64, BOOLEAN copy_qideal=TRUE, BOOLEAN copy_ordering=TRUE)
Definition: ring.cc:1452
ringorder_ds
Definition: ring.h:90
ip_sring::pLDegOrig
pLDegProc pLDegOrig
Definition: ring.h:368
p_DebugPrint
void p_DebugPrint(poly p, const ring r)
Definition: ring.cc:4202
ringorder_ws
Definition: ring.h:92
sro_am::start
short start
Definition: ring.h:141
pFDegProc
long(* pFDegProc)(poly p, ring r)
Definition: ring.h:44
kBucket_pt
kBucket * kBucket_pt
Definition: ring.h:30
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:400
ip_sring::typ
sro_ord * typ
Definition: ring.h:271
rOrderType_Schreyer
Schreyer ordering.
Definition: ring.h:112
ip_sring::cf
n_Procs_s * cf
Definition: ring.h:371
rChangeSComps
void rChangeSComps(int *currComponents, long *currShiftedComponents, int length, ring r)
Definition: ring.cc:4318
ip_sring::firstwv
int * firstwv
Definition: ring.h:289
cf
CanonicalForm cf
Definition: cfModGcd.cc:4024
sro_syzcomp
Definition: ring.h:172
sro_IS::pVarOffset
int * pVarOffset
Definition: ring.h:213
MIN
#define MIN(a, b)
Definition: omDebug.c:100
rGetSComps
void rGetSComps(int **currComponents, long **currShiftedComponents, int *length, ring r)
Definition: ring.cc:4327
ip_sring::_nc
nc_struct * _nc
Definition: ring.h:374
length
static BOOLEAN length(leftv result, leftv arg)
Definition: interval.cc:267
ip_sring::ext_ref
void * ext_ref
Definition: ring.h:295
rCopy
ring rCopy(ring r)
Definition: ring.cc:1604
rParStr
char * rParStr(ring r)
Definition: ring.cc:623
rOrderName
rRingOrder_t rOrderName(char *ordername)
Definition: ring.cc:498
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:1619
rRing_has_CompLastBlock
BOOLEAN rRing_has_CompLastBlock(ring r)
Definition: ring.cc:5093
rModifyRing
ring rModifyRing(ring r, BOOLEAN omit_degree, BOOLEAN omit_comp, unsigned long exp_limit)
Definition: ring.cc:2597
rOrderType_General
non-simple ordering as specified by currRing
Definition: ring.h:105
auxiliary.h
rHasTDeg
BOOLEAN rHasTDeg(const ring r)
Definition: ring.cc:4426
ro_wp
Definition: ring.h:59
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:642
N
const CanonicalForm CFMap CFMap & N
Definition: cfEzgcd.cc:48
sip_smap
Definition: simpleideals.h:36
rField_is_Zp_a
static BOOLEAN rField_is_Zp_a(const ring r)
Definition: ring.h:520
ip_sring::wvhdl
int ** wvhdl
Definition: ring.h:263
ip_sring::idroot
idhdl idroot
Definition: ring.h:258
nCoeff_is_GF
static FORCE_INLINE BOOLEAN nCoeff_is_GF(const coeffs r)
Definition: coeffs.h:852
n_NumberOfParameters
static FORCE_INLINE int n_NumberOfParameters(const coeffs r)
Returns the number of parameters.
Definition: coeffs.h:804
rModifyRing_Simple
ring rModifyRing_Simple(ring r, BOOLEAN omit_degree, BOOLEAN omit_comp, unsigned long exp_limit, BOOLEAN &simple)
Definition: ring.cc:2892
ip_sring::VarOffset
int * VarOffset
Definition: ring.h:277
ip_sring::ComponentOrder
BOOLEAN ComponentOrder
Definition: ring.h:329
ip_sring::firstBlockEnds
short firstBlockEnds
Definition: ring.h:313
idIs0
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
Definition: simpleideals.cc:767
ip_sring::VarL_LowIndex
short VarL_LowIndex
Definition: ring.h:347
idhdl
idrec * idhdl
Definition: ring.h:20
nCoeff_is_long_C
static FORCE_INLINE BOOLEAN nCoeff_is_long_C(const coeffs r)
Definition: coeffs.h:907
rCharStr
char * rCharStr(ring r)
TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar.
Definition: ring.cc:621
rField_has_Units
static BOOLEAN rField_has_Units(const ring r)
Definition: ring.h:482
ip_sring::pFDegOrig
pFDegProc pFDegOrig
Definition: ring.h:366
sro_ISTemp::pVarOffset
int * pVarOffset
Definition: ring.h:204
sro_cp::start
short start
Definition: ring.h:166
sro_am::weights_m
int * weights_m
Definition: ring.h:146
rTypeOfMatrixOrder
int rTypeOfMatrixOrder(const intvec *order)
Definition: ring.cc:185
pISUpdateComponents
void pISUpdateComponents(ideal F, const intvec *const V, const int MIN, const ring r)
Definition: ring.cc:4239
ip_sring::VarL_Offset
int * VarL_Offset
Definition: ring.h:352
ip_sring::GetNC
nc_struct *& GetNC()
Definition: ring.h:377
rGetWeightVec
int64 * rGetWeightVec(const ring r)
Definition: ring.cc:5119
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:1667
ip_sring::pFDeg
pFDegProc pFDeg
Definition: ring.h:362
rSum
int rSum(ring r1, ring r2, ring &sum)
Definition: ring.cc:1305
ip_sring::pCompIndex
short pCompIndex
Definition: ring.h:341
ringorder_C
Definition: ring.h:79
rIsPluralRing
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:403
rGetCurrSyzLimit
static int rGetCurrSyzLimit(const ring r)
Definition: ring.h:713
n_coeffType
n_coeffType
Definition: coeffs.h:26
nCoeff_is_Q
static FORCE_INLINE BOOLEAN nCoeff_is_Q(const coeffs r)
Definition: coeffs.h:836
ip_sring::ExpL_Size
short ExpL_Size
Definition: ring.h:333
ringorder_Wp
Definition: ring.h:88
ringorder_S
S?
Definition: ring.h:81
sro_ord::order_index
int order_index
Definition: ring.h:227
rOrderType_Exp
simple ordering, exponent vector has priority component is compatible with exp-vector order
Definition: ring.h:109
rCheckIV
BOOLEAN rCheckIV(const intvec *iv)
Definition: ring.cc:175
ip_sring::ref
int ref
Definition: ring.h:307
sro_wp64
Definition: ring.h:153
rOrd_SetCompRequiresSetm
BOOLEAN rOrd_SetCompRequiresSetm(const ring r)
return TRUE if p_SetComp requires p_Setm
Definition: ring.cc:1861
rOrderType_t
rOrderType_t
Definition: ring.h:103
rVar
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:582
sro_wp64::start
short start
Definition: ring.h:156
rField_is_Ring_Z
static BOOLEAN rField_is_Ring_Z(const ring r)
Definition: ring.h:473
TRUE
#define TRUE
Definition: auxiliary.h:98
i
int i
Definition: cfEzgcd.cc:125
sro_syz::curr_index
int curr_index
Definition: ring.h:189
rHasLocalOrMixedOrdering
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
Definition: ring.h:751
rGetOrderType
rOrderType_t rGetOrderType(ring r)
Definition: ring.cc:1708
nCoeff_is_Ring_ModN
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_ModN(const coeffs r)
Definition: coeffs.h:749
sro_IS
Definition: ring.h:210
ro_none
Definition: ring.h:68
ro_isTemp
Definition: ring.h:67
int64vec
Definition: int64vec.h:16
rField_is_Q_a
static BOOLEAN rField_is_Q_a(const ring r)
Definition: ring.h:530
rOpposite
ring rOpposite(ring r)
Definition: ring.cc:5175
ip_sring::CmpL_Size
short CmpL_Size
Definition: ring.h:334
ringorder_Dp
Definition: ring.h:86
BOOLEAN
int BOOLEAN
Definition: auxiliary.h:85
nCoeff_is_algExt
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
Definition: coeffs.h:923
rOrderType_CompExp
simple ordering, component has priority
Definition: ring.h:106
monomials.h
rRingVar
static char * rRingVar(short i, const ring r)
Definition: ring.h:567
rAssure_dp_C
ring rAssure_dp_C(const ring r)
Definition: ring.cc:4866
sro_IS::start
short start
Definition: ring.h:212
BBA_Proc
ideal(* BBA_Proc)(const ideal, const ideal, const intvec *, const intvec *, kStrategy strat, const ring)
Definition: ring.h:250
sro_syzcomp::length
long length
Definition: ring.h:178
ip_sring::bitmask
unsigned long bitmask
Definition: ring.h:355
rField_is_Ring
static BOOLEAN rField_is_Ring(const ring r)
Definition: ring.h:476
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:3350
rAssure_TDeg
ring rAssure_TDeg(const ring r, int &pos)
Definition: ring.cc:4444
rAssure_CompLastBlock
ring rAssure_CompLastBlock(const ring r, BOOLEAN complete=TRUE)
makes sure that c/C ordering is last ordering
Definition: ring.cc:4594
ip_sring::OrdSgn
short OrdSgn
Definition: ring.h:311
sro_wp
Definition: ring.h:128
ringorder_M
Definition: ring.h:80
rDefault
ring rDefault(int ch, int N, char **n)
Definition: ring.cc:155
nCoeff_is_Ring
static FORCE_INLINE BOOLEAN nCoeff_is_Ring(const coeffs r)
Definition: coeffs.h:758
ro_cp
Definition: ring.h:64
h
static Poly * h
Definition: janet.cc:972
rIsRatGRing
static BOOLEAN rIsRatGRing(const ring r)
Definition: ring.h:414
nCoeff_is_Q_a
static FORCE_INLINE BOOLEAN nCoeff_is_Q_a(const coeffs r)
Definition: coeffs.h:898
sro_IS::limit
int limit
Definition: ring.h:215
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:4886
ro_wp_neg
Definition: ring.h:62
nCoeff_has_simple_Alloc
static FORCE_INLINE BOOLEAN nCoeff_has_simple_Alloc(const coeffs r)
TRUE if n_Delete/n_New are empty operations.
Definition: coeffs.h:919
coeffs
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:725
ip_sring
Definition: ring.h:253
rModifyRing_Wp
ring rModifyRing_Wp(ring r, int *weights)
construct Wp, C ring
Definition: ring.cc:2844
nCoeff_is_long_R
static FORCE_INLINE BOOLEAN nCoeff_is_long_R(const coeffs r)
Definition: coeffs.h:904
sro_syzcomp::place
short place
Definition: ring.h:174
intvec
Definition: intvec.h:16
sro_dp::start
short start
Definition: ring.h:122
rField_is_Ring_PtoM
static BOOLEAN rField_is_Ring_PtoM(const ring r)
Definition: ring.h:470
rKillModifiedRing
void rKillModifiedRing(ring r)
Definition: ring.cc:2957
sro_syzcomp::Components
int * Components
Definition: ring.h:176
rDBTest
BOOLEAN rDBTest(ring r, const char *fn, const int l)
Definition: ring.cc:1943
ip_sring::LexOrder
BOOLEAN LexOrder
Definition: ring.h:325
rSetSyzComp
void rSetSyzComp(int k, const ring r)
Definition: ring.cc:4972
rOrderType_Syz
syzygy ordering
Definition: ring.h:111
sro_cp
Definition: ring.h:163
sro_dp
Definition: ring.h:119
rPar
static int rPar(const ring r)
(r->cf->P)
Definition: ring.h:589
nCoeff_is_Ring_PtoM
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_PtoM(const coeffs r)
Definition: coeffs.h:752
ro_wp64
Definition: ring.h:61
ip_sring::pOrdIndex
short pOrdIndex
Definition: ring.h:342
rAssure_C_dp
ring rAssure_C_dp(const ring r)
Definition: ring.cc:4871
sro_syz::place
short place
Definition: ring.h:186
sro_syz::limit
int limit
Definition: ring.h:187
sro_dp::place
short place
Definition: ring.h:121
p_Procs_s
struct p_Procs_s p_Procs_s
Definition: ring.h:29
rField_is_R
static BOOLEAN rField_is_R(const ring r)
Definition: ring.h:509
sro_am
Definition: ring.h:138
ip_sring::block1
int * block1
Definition: ring.h:261
ringorder_am
Definition: ring.h:94
ip_sring::p_Setm
p_SetmProc p_Setm
Definition: ring.h:370
rGetVar
poly rGetVar(const int varIndex, const ring r)
Definition: ring.cc:5620
sro_ISTemp::start
short start
Definition: ring.h:202
sro_am::weights
int * weights
Definition: ring.h:144
intvec.h
rBlocks
static int rBlocks(ring r)
Definition: ring.h:558
rWrite
void rWrite(ring r, BOOLEAN details=FALSE)
Definition: ring.cc:226
rMinpolyIsNULL
static BOOLEAN rMinpolyIsNULL(const ring r)
Tests whether '(r->cf->minpoly) == NULL'.
Definition: ring.h:689
sro_IS::F
ideal F
Definition: ring.h:218
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:4918
sro_wp64::end
short end
Definition: ring.h:157
rAssure_InducedSchreyerOrdering
ring rAssure_InducedSchreyerOrdering(const ring r, BOOLEAN complete=TRUE, int sgn=1)
Definition: ring.cc:4750
ip_sring::GetNC
const nc_struct * GetNC() const
Definition: ring.h:376
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
rGetMaxSyzComp
int rGetMaxSyzComp(int i, const ring r)
return the max-comonent wchich has syzIndex i Assume: i<= syzIndex_limit
Definition: ring.cc:5044
ringorder_c
Definition: ring.h:78
ringorder_lp
Definition: ring.h:83
sro_ISTemp::suffixpos
int suffixpos
Definition: ring.h:203
ringorder_dp
Definition: ring.h:84
sro_wp::place
short place
Definition: ring.h:130
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:827
ip_sring::block0
int * block0
Definition: ring.h:260
rVarStr
char * rVarStr(ring r)
Definition: ring.cc:597
n_ParameterNames
static FORCE_INLINE const char ** n_ParameterNames(const coeffs r)
Returns a (const!) pointer to (const char*) names of parameters.
Definition: coeffs.h:808
rHasSimpleOrder
BOOLEAN rHasSimpleOrder(const ring r)
Definition: ring.cc:1755
rAssure_SyzOrder
ring rAssure_SyzOrder(const ring r, BOOLEAN complete)
Definition: ring.cc:4343
rAssure_HasComp
ring rAssure_HasComp(const ring r)
Definition: ring.cc:4539
rFieldType
n_coeffType rFieldType(const ring r)
Definition: ring.cc:5100
rKillModified_Wp_Ring
void rKillModified_Wp_Ring(ring r)
Definition: ring.cc:2967
rOrderType_ExpNoComp
simple ordering, differences in component are not considered
Definition: ring.h:114
idrec
Definition: idrec.h:33
omBin
omBin_t * omBin
Definition: omStructs.h:11
ip_sring::MixedOrder
BOOLEAN MixedOrder
Definition: ring.h:326
sro_ord
Definition: ring.h:224
rField_is_numeric
static BOOLEAN rField_is_numeric(const ring r)
Definition: ring.h:506
kStrategy
skStrategy * kStrategy
Definition: ring.h:246
ip_sring::real_var_start
short real_var_start
Definition: ring.h:315
rField_is_GF
static BOOLEAN rField_is_GF(const ring r)
Definition: ring.h:512
const
#define const
Definition: fegetopt.c:40
ip_sring::pLexOrder
BOOLEAN pLexOrder
Definition: ring.h:327
sip_sideal
The following sip_sideal structure has many different uses thoughout Singular. Basic use-cases for it...
Definition: simpleideals.h:17
ip_sring::p_Procs
p_Procs_s * p_Procs
Definition: ring.h:359
ro_typ
ro_typ
Definition: ring.h:56
ip_sring::NegWeightL_Size
short NegWeightL_Size
Definition: ring.h:349
rDelete
void rDelete(ring r)
unconditionally deletes fields in r
Definition: ring.cc:438
rCopy0
ring rCopy0(const ring r, BOOLEAN copy_qideal=TRUE, BOOLEAN copy_ordering=TRUE)
Definition: ring.cc:1324
sro_am::len_gen
short len_gen
Definition: ring.h:143
rDebugPrint
void rDebugPrint(const ring r)
Definition: ring.cc:3997
n_Zp
\F{p < 2^31}
Definition: coeffs.h:29
ip_sring::ExpPerLong
short ExpPerLong
Definition: ring.h:340
sro_ord::ord_typ
ro_typ ord_typ
Definition: ring.h:226
ringorder_a
Definition: ring.h:76
sro_wp::end
short end
Definition: ring.h:132
ringorder_IS
Induced (Schreyer) ordering.
Definition: ring.h:99
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:543
int64
long int64
Definition: auxiliary.h:66
sro_syz
Definition: ring.h:184
sro_ord::data
union sro_ord::@0 data
rOrd_is_Comp_dp
static BOOLEAN rOrd_is_Comp_dp(const ring r)
Definition: ring.h:766
ringorder_ls
Definition: ring.h:89
ringorder_rp
Definition: ring.h:85
ip_sring::order
rRingOrder_t * order
Definition: ring.h:259
ro_syzcomp
Definition: ring.h:65
NF_Proc
poly(* NF_Proc)(ideal, ideal, poly, int, int, const ring _currRing)
Definition: ring.h:249
ip_sring::VarL_Size
short VarL_Size
Definition: ring.h:338
ringorder_s
s?
Definition: ring.h:82
rField_has_simple_inverse
static BOOLEAN rField_has_simple_inverse(const ring r)
Definition: ring.h:539
sro_syz::syz_index
int * syz_index
Definition: ring.h:188
rOrd_is_Totaldegree_Ordering
BOOLEAN rOrd_is_Totaldegree_Ordering(const ring r)
Definition: ring.cc:1881
m
int m
Definition: cfEzgcd.cc:121
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:4649
sro_wp::start
short start
Definition: ring.h:131
assume
#define assume(x)
Definition: mod2.h:384
ringorder_L
Definition: ring.h:95
NULL
#define NULL
Definition: omList.c:9
ringorder_Ws
Definition: ring.h:93
ro_is
Definition: ring.h:67
ringorder_no
Definition: ring.h:75
l
int l
Definition: cfEzgcd.cc:93
ip_sring::OrdSize
short OrdSize
Definition: ring.h:343
sro_cp::end
short end
Definition: ring.h:167
kBucket
Definition: kbuckets.h:174
rHasSimpleLexOrder
BOOLEAN rHasSimpleLexOrder(const ring r)
returns TRUE, if simple lp or ls ordering
Definition: ring.cc:1787
n_IsParam
int n_IsParam(number m, const ring r)
if m == var(i)/1 => return i,
Definition: ring.cc:5630
ip_sring::ShortOut
BOOLEAN ShortOut
Definition: ring.h:323
rAssure_SyzComp
ring rAssure_SyzComp(const ring r, BOOLEAN complete=TRUE)
Definition: ring.cc:4348
ringorder_wp
Definition: ring.h:87
p_SetmProc
void(* p_SetmProc)(poly p, const ring r)
Definition: ring.h:45
p
int p
Definition: cfModGcd.cc:4019
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:50
r_IsRingVar
int r_IsRingVar(const char *n, char **names, int N)
Definition: ring.cc:212
ringorder_unspec
Definition: ring.h:100
ringorder_aa
for idElimination, like a, except pFDeg, pWeigths ignore it
Definition: ring.h:97
ip_sring::ppNoether
poly ppNoether
Definition: ring.h:293
rOrdStr
char * rOrdStr(ring r)
Definition: ring.cc:512
rSimpleOrdStr
const char * rSimpleOrdStr(int ord)
Definition: ring.cc:77
qr
Definition: qr.h:44
rIsSyzIndexRing
static BOOLEAN rIsSyzIndexRing(const ring r)
Definition: ring.h:710
rRing_is_Homog
BOOLEAN rRing_is_Homog(ring r)
Definition: ring.cc:5071
rHas_c_Ordering
BOOLEAN rHas_c_Ordering(const ring r)
Definition: ring.cc:1751
ringorder_rs
opposite of ls
Definition: ring.h:98
ringorder_a64
for int64 weights
Definition: ring.h:77
rHasMixedOrdering
BOOLEAN rHasMixedOrdering(const ring r)
Definition: ring.h:752
ip_sring::divmask
unsigned long divmask
Definition: ring.h:357
rParameter
static const char ** rParameter(const ring r)
(r->cf->parameter)
Definition: ring.h:615
rField_is_Ring_ModN
static BOOLEAN rField_is_Ring_ModN(const ring r)
Definition: ring.h:467
rField_is_Z
static BOOLEAN rField_is_Z(const ring r)
Definition: ring.h:503
rField_is_long_C
static BOOLEAN rField_is_long_C(const ring r)
Definition: ring.h:536
rOrderType_Syz2dpc
syzcomp2dpc
Definition: ring.h:113
ro_syz
Definition: ring.h:66
rString
char * rString(ring r)
Definition: ring.cc:647
rField_is_Zp
static BOOLEAN rField_is_Zp(const ring r)
Definition: ring.h:494
rShortOut
static BOOLEAN rShortOut(const ring r)
Definition: ring.h:571
nCoeff_is_Ring_Z
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_Z(const coeffs r)
Definition: coeffs.h:755
rRingOrder_t
rRingOrder_t
order stuff
Definition: ring.h:73
int64vec.h
rAssure_c_dp
ring rAssure_c_dp(const ring r)
Definition: ring.cc:4876
sro_am::place
short place
Definition: ring.h:140
n_Procs_s
Definition: coeffs.h:122
rChar
int rChar(ring r)
Definition: ring.cc:687
currShiftedComponents
long * currShiftedComponents
Definition: syz1.cc:34
ip_sring::N
short N
Definition: ring.h:309
nCoeff_is_Zp_a
static FORCE_INLINE BOOLEAN nCoeff_is_Zp_a(const coeffs r)
Definition: coeffs.h:872
ro_dp
Definition: ring.h:58
ip_sring::pModW
intvec * pModW
Definition: ring.h:292
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:915
sgn
int sgn(const Rational &a)
Definition: GMPrat.cc:433
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:769
coeffs.h
sip_sring_bin
omBin sip_sring_bin
Definition: ring.cc:43
rField_is_Q
static BOOLEAN rField_is_Q(const ring r)
Definition: ring.h:500
rModify_a_to_A
void rModify_a_to_A(ring r)
Definition: ring.cc:5597
rInternalChar
static int rInternalChar(const ring r)
Definition: ring.h:679
sro_ISTemp
Definition: ring.h:200