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