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 /// order stuff
75 typedef enum rRingOrder_t
76 {
79  ringorder_a64, ///< for int64 weights
83  ringorder_S, ///< S?
84  ringorder_s, ///< s?
98  // the following are only used internally
99  ringorder_aa, ///< for idElimination, like a, except pFDeg, pWeigths ignore it
100  ringorder_rs, ///< opposite of ls
101  ringorder_IS, ///< Induced (Schreyer) ordering
103 } rRingOrder_t;
104 
105 typedef enum rOrderType_t
106 {
107  rOrderType_General = 0, ///< non-simple ordering as specified by currRing
108  rOrderType_CompExp, ///< simple ordering, component has priority
109  rOrderType_ExpComp, ///< simple ordering, exponent vector has priority
110  ///< component not compatible with exp-vector order
111  rOrderType_Exp, ///< simple ordering, exponent vector has priority
112  ///< component is compatible with exp-vector order
113  rOrderType_Syz, ///< syzygy ordering
114  rOrderType_Schreyer, ///< Schreyer ordering
115  rOrderType_Syz2dpc, ///< syzcomp2dpc
116  rOrderType_ExpNoComp ///< simple ordering, differences in component are
117  ///< not considered
118 } rOrderType_t;
119 
120 // ordering is a degree ordering
121 struct sro_dp
122 {
123  short place; // where degree is stored (in L):
124  short start; // bounds of ordering (in E):
125  short end;
126 };
127 typedef struct sro_dp sro_dp;
128 
129 // ordering is a weighted degree ordering
130 struct sro_wp
131 {
132  short place; // where weighted degree is stored (in L)
133  short start; // bounds of ordering (in E)
134  short end;
135  int *weights; // pointers into wvhdl field
136 };
137 typedef struct sro_wp sro_wp;
138 
139 // ordering is a weighted degree ordering
140 struct sro_am
141 {
142  short place; // where weighted degree is stored (in L)
143  short start; // bounds of ordering (in E)
144  short end;
145  short len_gen; // i>len_gen: weight(gen(i)):=0
146  int *weights; // pointers into wvhdl field of length (end-start+1) + len_gen + 1
147  // contents w_{start},... w_{end}, len, mod_w_1, .. mod_w_len, 0
148  int *weights_m; // pointers into wvhdl field of length len_gen + 1
149  // len_gen, mod_w_1, .. mod_w_len, 0
150 
151 };
152 typedef struct sro_am sro_am;
153 
154 // ordering is a weighted degree ordering
155 struct sro_wp64
156 {
157  short place; // where weighted degree is stored (in L)
158  short start; // bounds of ordering (in E)
159  short end;
160  int64 *weights64; // pointers into wvhdl field
161 };
162 typedef struct sro_wp64 sro_wp64;
163 
164 // ordering duplicates variables
165 struct sro_cp
166 {
167  short place; // where start is copied to (in E)
168  short start; // bounds of sources of copied variables (in E)
169  short end;
170 };
171 typedef struct sro_cp sro_cp;
172 
173 // ordering indicates "subset" of component number
175 {
176  short place; // where the index is stored (in L)
177  long *ShiftedComponents; // pointer into index field
179 #ifdef PDEBUG
180  long length;
181 #endif
182 };
183 typedef struct sro_syzcomp sro_syzcomp;
184 
185 // ordering with component number >syzcomp is lower
186 struct sro_syz
187 {
188  short place; // where the index is stored (in L)
189  int limit; // syzcomp
190  int* syz_index; // mapping Component -> SyzIndex for Comp <= limit
191  int curr_index; // SyzIndex for Component > limit
192 };
193 
194 typedef struct sro_syz sro_syz;
195 // Induced Syzygy (Schreyer) ordering is built inductively as follows:
196 // we look for changes made by ordering blocks which are between prefix/suffix markers:
197 // that is: which variables where placed by them and where (judging by v)
198 
199 // due to prefix/suffix nature we need some placeholder:
200 // prefix stores here initial state
201 // suffix cleares this up
203 {
204  short start; // 1st member SHOULD be short "place"
206  int* pVarOffset; // copy!
207 };
208 
209 // So this is the actuall thing!
210 // suffix uses last sro_ISTemp (cleares it up afterwards) and
211 // creates this block
212 struct sro_IS
213 {
214  short start, end; // which part of L we want to want to update...
215  int* pVarOffset; // same as prefix!
216 
217  int limit; // first referenced component
218 
219  // reference poly set?? // Should it be owned by ring?!!!
220  ideal F; // reference leading (module)-monomials set. owned by ring...
221 };
222 
223 typedef struct sro_IS sro_IS;
224 typedef struct sro_ISTemp sro_ISTemp;
225 
226 struct sro_ord
227 {
229  int order_index; // comes from r->order[order_index]
230  union
231  {
232  sro_dp dp;
233  sro_wp wp;
234  sro_am am;
235  sro_wp64 wp64;
236  sro_cp cp;
237  sro_syzcomp syzcomp;
238  sro_syz syz;
239  sro_IS is;
240  sro_ISTemp isTemp;
241  } data;
242 };
243 
244 #ifdef HAVE_PLURAL
245 struct nc_struct;
246 typedef struct nc_struct nc_struct;
247 #endif
249 typedef skStrategy * kStrategy;
250 
251 typedef poly (*NF_Proc)(ideal, ideal, poly, int, int, const ring _currRing);
252 typedef ideal (*BBA_Proc) (const ideal, const ideal, const intvec *, const intvec *, kStrategy strat, const ring);
253 
254 
255 struct ip_sring
256 {
257 // each entry must have a description and a procedure defining it,
258 // general ordering: pointer/structs, long, int, short, BOOLEAN/char/enum
259 // general defining procedures: rInit, rComplete, interpreter, ??
260  idhdl idroot; /* local objects , interpreter*/
261  int* order; /* array of orderings, rInit/rSleftvOrdering2Ordering */
262  int* block0; /* starting pos., rInit/rSleftvOrdering2Ordering*/
263  int* block1; /* ending pos., rInit/rSleftvOrdering2Ordering*/
264 // char** parameter; /* names of parameters, rInit */
265  int** wvhdl; /* array of weight vectors, rInit/rSleftvOrdering2Ordering */
266  char ** names; /* array of variable names, rInit */
267 
268  // what follows below here should be set by rComplete, _only_
269  long *ordsgn; /* array of +/- 1 (or 0) for comparing monomials */
270  /* ExpL_Size entries*/
271 
272  // is NULL for lp or N == 1, otherwise non-NULL (with OrdSize > 0 entries) */
273  sro_ord* typ; /* array of orderings + sizes, OrdSize entries */
274  /* if NegWeightL_Size > 0, then NegWeightL_Offset[0..size_1] is index of longs
275  in ExpVector whose values need an offset due to negative weights */
276  /* array of NegWeigtL_Size indicies */
278 
279  int* VarOffset;
280 
281 // ideal minideal;
282 // number minpoly; /* replaced by minideal->m[0] */
283  ideal qideal; /**< extension to the ring structure: qring, rInit, OR
284  for Q_a/Zp_a, rInit (replaces minideal!);
285  for a start, we assume that there is either no
286  or exactly one generator in minideal, playing
287  the role of the former minpoly; minideal may
288  also be NULL which coincides with the
289  no-generator-case **/
290 
291  int* firstwv;
292 
293  omBin PolyBin; /* Bin from where monoms are allocated */
294  intvec * pModW; /* std: module weights */
295  poly ppNoether; /* variables, set by procedures from hecke/kstd1:
296  the highest monomial below pHEdge */
297  void * ext_ref; /* libsing GAP object */
298 // #ifdef HAVE_RINGS
299 // unsigned int cf->ringtype; /* cring = 0 => coefficient field, cring = 1 => coeffs from Z/2^m */
300 // mpz_ptr cf->modBase; /* Z/(ringflag^cf->modExponent)=Z/cf->modNumber*/
301 // unsigned long cf->modExponent;
302 // unsigned long cf->modNumber; /* Z/cf->modNumber */
303 // mpz_ptr cf->modNumber;
304 // #endif
305 
306  unsigned long options; /* ring dependent options */
307 
308 // int ch; /* characteristic, rInit */
309  int ref; /* reference counter to the ring, interpreter */
310 
311  short N; /* number of vars, rInit */
312 
313  short OrdSgn; /* 1 for polynomial rings, -1 otherwise, rInit */
314 
316 #ifdef HAVE_PLURAL
317  short real_var_start, real_var_end;
318 #endif
319 
320 #ifdef HAVE_SHIFTBBA
321  short isLPring; /* 0 for non-letterplace rings, otherwise the number of LP blocks, at least 1, known also as lV */
322 #endif
323 
327  BOOLEAN LexOrder; // TRUE if the monomial ordering has polynomial and power series blocks
328  BOOLEAN MixedOrder; // TRUE for global/local mixed orderings, FALSE otherwise
329  BOOLEAN pLexOrder; /* TRUE if the monomial ordering is not compatible with pFDeg */
330 
332 
333  // what follows below here should be set by rComplete, _only_
334  // contains component, but no weight fields in E */
335  short ExpL_Size; // size of exponent vector in long
336  short CmpL_Size; // portions which need to be compared
337  /* number of long vars in exp vector:
338  long vars are those longs in the exponent vector which are
339  occupied by variables, only */
340  short VarL_Size;
341  short BitsPerExp; /* number of bits per exponent */
342  short ExpPerLong; /* maximal number of Exponents per long */
343  short pCompIndex; /* p->exp.e[pCompIndex] is the component */
344  short pOrdIndex; /* p->exp[pOrdIndex] is pGetOrd(p) */
345  short OrdSize; /* size of ord vector (in sro_ord) */
346 
347  /* if >= 0, long vars in exp vector are consecutive and start there
348  if < 0, long vars in exp vector are not consecutive */
350 
352  /* array of size VarL_Size,
353  VarL_Offset[i] gets i-th long var in exp vector */
355 
356  /* mask for getting single exponents */
357  unsigned long bitmask;
358  /* mask used for divisiblity tests */
359  unsigned long divmask; // rComplete
360 
361  p_Procs_s* p_Procs; // rComplete/p_ProcsSet
362 
363  /* FDeg and LDeg */
364  pFDegProc pFDeg; // rComplete/rSetDegStuff
365  pLDegProc pLDeg; // rComplete/rSetDegStuff
366 
367  /* as it was determined by rComplete */
369  /* and as it was determined before rOptimizeLDeg */
371 
374 #ifdef HAVE_PLURAL
375  private:
376  nc_struct* _nc; // private
377  public:
378  inline const nc_struct* GetNC() const { return _nc; }; // public!!!
379  inline nc_struct*& GetNC() { return _nc; }; // public!!!
380 #endif
381  public:
382  operator coeffs() const { return cf; }
383 };
384 
385 ////////// DEPRECATED
386 /////// void rChangeCurrRing(ring r);
387 
388 ring rDefault(int ch, int N, char **n);
389 ring rDefault(const coeffs cf, int N, char **n, const rRingOrder_t o=ringorder_lp);
390 ring rDefault(int ch, int N, char **n,int ord_size, int *ord, int *block0, int *block1, int **wvhdl=NULL);
391 ring rDefault(const coeffs cf, int N, char **n,int ord_size, int *ord, int *block0, int *block1, int **wvhdl=NULL);
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 int 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_numeric(const ring r) /* R, long R, long C */
505 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_numeric(r->cf); }
506 
507 static inline BOOLEAN rField_is_R(const ring r)
508 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_R(r->cf); }
509 
510 static inline BOOLEAN rField_is_GF(const ring r)
511 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_GF(r->cf); }
512 
513 static inline BOOLEAN rField_is_GF(const ring r, int q)
514 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_GF(r->cf, q); }
515 
516 /* DO NOT USE; just here for compatibility reasons towards
517  the SINGULAR svn trunk */
518 static inline BOOLEAN rField_is_Zp_a(const ring r)
519 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Zp_a(r->cf); }
520 
521 /* DO NOT USE; just here for compatibility reasons towards
522  the SINGULAR svn trunk */
523 static inline BOOLEAN rField_is_Zp_a(const ring r, int p)
524 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Zp_a(r->cf, p); }
525 
526 /* DO NOT USE; just here for compatibility reasons towards
527  the SINGULAR svn trunk */
528 static inline BOOLEAN rField_is_Q_a(const ring r)
529 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Q_a(r->cf); }
530 
531 static inline BOOLEAN rField_is_long_R(const ring r)
532 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_long_R(r->cf); }
533 
534 static inline BOOLEAN rField_is_long_C(const ring r)
535 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_long_C(r->cf); }
536 
537 static inline BOOLEAN rField_has_simple_inverse(const ring r)
538 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_has_simple_inverse(r->cf); }
539 
540 /// Z/p, GF(p,n), R: nCopy, nNew, nDelete are dummies
541 static inline BOOLEAN rField_has_simple_Alloc(const ring r)
542 { assume(r != NULL); assume(r->cf != NULL); return nCoeff_has_simple_Alloc(r->cf); }
543 
544 n_coeffType rFieldType(const ring r);
545 
546 /// this needs to be called whenever a new ring is created: new fields
547 /// in ring are created (like VarOffset), unless they already exist
548 /// with force == 1, new fields are _always_ created (overwritten),
549 /// even if they exist
550 BOOLEAN rComplete(ring r, int force = 0);
551 // use this to free fields created by rComplete //?
552 
553 /// set all properties of a new ring - also called by rComplete
554 void p_SetGlobals(const ring r, BOOLEAN complete = TRUE);
555 
556 static inline int rBlocks(ring r)
557 {
558  assume(r != NULL);
559  int i=0;
560  while (r->order[i]!=0) i++;
561  return i+1;
562 }
563 
564 // misc things
565 static inline char* rRingVar(short i, const ring r)
566 {
567  assume(r != NULL); assume(r->cf != NULL); return r->names[i];
568 }
569 static inline BOOLEAN rShortOut(const ring r)
570 {
571  assume(r != NULL); return (r->ShortOut);
572 }
573 
574 static inline BOOLEAN rCanShortOut(const ring r)
575 {
576  assume(r != NULL); return (r->CanShortOut);
577 }
578 
579 /// #define rVar(r) (r->N)
580 static inline short rVar(const ring r)
581 {
582  assume(r != NULL);
583  return r->N;
584 }
585 
586 /// (r->cf->P)
587 static inline int rPar(const ring r)
588 {
589  assume(r != NULL);
590  const coeffs C = r->cf;
591  assume(C != NULL);
592 
593  return n_NumberOfParameters(C);
594 // if( nCoeff_is_Extension(C) )
595 // {
596 // const ring R = C->extRing;
597 // assume( R != NULL );
598 // return rVar( R );
599 // }
600 // else if (nCoeff_is_GF(C))
601 // {
602 // return 1;
603 // }
604 // else if (nCoeff_is_long_C(C))
605 // {
606 // return 1;
607 // }
608 // return 0;
609 }
610 
611 
612 /// (r->cf->parameter)
613 static inline char const ** rParameter(const ring r)
614 {
615  assume(r != NULL);
616  const coeffs C = r->cf;
617  assume(C != NULL);
618 
619  return n_ParameterNames(C);
620 // if( nCoeff_is_Extension(C) ) // only alg / trans. exts...
621 // {
622 // const ring R = C->extRing;
623 // assume( R != NULL );
624 // return R->names;
625 // }
626 // else if (nCoeff_is_GF(C))
627 // {
628 // return &(C->m_nfParameter);
629 // }
630 // else if (nCoeff_is_long_C(C))
631 // {
632 // return &(C->complex_parameter);
633 // }
634 // return NULL;
635 }
636 
637 /// return the specified parameter as a (new!) number in the given
638 /// polynomial ring, or NULL if invalid
639 /// parameters (as variables) begin with 1!
640 static inline number n_Param(const short iParameter, const ring r)
641 {
642  assume(r != NULL);
643  const coeffs C = r->cf;
644  assume(C != NULL);
645  return n_Param(iParameter, C);
646 // const n_coeffType _filed_type = getCoeffType(C);
647 //
648 // if ( iParameter <= 0 || iParameter > rPar(r) )
649 // // Wrong parameter
650 // return NULL;
651 //
652 // if( _filed_type == n_algExt )
653 // return naParameter(iParameter, C);
654 //
655 // if( _filed_type == n_transExt )
656 // return ntParameter(iParameter, C);
657 //
658 // if (_filed_type == n_GF)// if (nCoeff_is_GF(C))
659 // {
660 // number nfPar (int i, const coeffs);
661 // return nfPar(iParameter, C);
662 // }
663 //
664 // if (_filed_type == n_long_C) // if (nCoeff_is_long_C(C))
665 // {
666 // number ngcPar(int i, const coeffs r);
667 // return ngcPar(iParameter, C);
668 // }
669 //
670 // return NULL;
671 }
672 
673 /// if m == var(i)/1 => return i,
674 int n_IsParam(number m, const ring r);
675 
676 //#define rInternalChar(r) ((r)->cf->ch)
677 static inline int rInternalChar(const ring r)
678 {
679  assume(r != NULL);
680  const coeffs C = r->cf;
681  assume(C != NULL);
682  return C->ch;
683 }
684 
685 
686 /// Tests whether '(r->cf->minpoly) == NULL'
687 static inline BOOLEAN rMinpolyIsNULL(const ring r)
688 {
689  assume(r != NULL);
690  const coeffs C = r->cf;
691  assume(C != NULL);
692 
693  const BOOLEAN ret = nCoeff_is_algExt(C); // || nCoeff_is_GF(C) || nCoeff_is_long_C(C);
694 
695  if( ret )
696  {
697  assume( (C->extRing) != NULL );
698  BOOLEAN idIs0 (ideal h);
699  assume((!((C->extRing)->qideal==NULL)) && (!idIs0((C->extRing)->qideal)));
700  }
701 
702  // TODO: this leads to test fails (due to rDecompose?)
703  return !ret;
704 }
705 
706 
707 
708 static inline BOOLEAN rIsSyzIndexRing(const ring r)
709 { assume(r != NULL); assume(r->cf != NULL); return r->order[0] == ringorder_s;}
710 
711 static inline int rGetCurrSyzLimit(const ring r)
712 { assume(r != NULL); assume(r->cf != NULL); return (rIsSyzIndexRing(r)? r->typ[0].data.syz.limit : 0);}
713 
714 void rSetSyzComp(int k, const ring r);
715 
716 // Ring Manipulations
717 ring rAssure_HasComp(const ring r);
718 ring rAssure_SyzOrder(const ring r, BOOLEAN complete);
719 ring rAssure_SyzComp(const ring r, BOOLEAN complete = TRUE);
720 
721 ring rAssure_dp_S(const ring r);
722 ring rAssure_dp_C(const ring r);
723 ring rAssure_C_dp(const ring r);
724 ring rAssure_c_dp(const ring r);
725 
726 /// makes sure that c/C ordering is last ordering
727 ring rAssure_CompLastBlock(const ring r, BOOLEAN complete = TRUE);
728 
729 /// makes sure that c/C ordering is last ordering and SyzIndex is first
730 ring rAssure_SyzComp_CompLastBlock(const ring r, BOOLEAN complete = TRUE);
731 ring rAssure_TDeg(const ring r, int start_var, int end_var, int &pos);
732 
733 /// return the max-comonent wchich has syzIndex i
734 /// Assume: i<= syzIndex_limit
735 int rGetMaxSyzComp(int i, const ring r);
736 
737 BOOLEAN rHasSimpleOrder(const ring r);
738 BOOLEAN rHas_c_Ordering(const ring r);
739 
740 /// returns TRUE, if simple lp or ls ordering
741 BOOLEAN rHasSimpleLexOrder(const ring r);
742 
743 //???? return TRUE if p->exp[r->pOrdIndex] holds total degree of p ???
744 
745 
746 inline BOOLEAN rHasGlobalOrdering(const ring r){ return (r->OrdSgn==1); }
747 inline BOOLEAN rHasLocalOrMixedOrdering(const ring r){ return (r->OrdSgn==-1); }
748 inline BOOLEAN rHasMixedOrdering(const ring r) { return (r->MixedOrder); }
749 
750 // #define rHasGlobalOrdering(R) ((R)->OrdSgn==1)
751 // #define rHasLocalOrMixedOrdering(R) ((R)->OrdSgn==-1)
752 
753 #define rHasGlobalOrdering_currRing() rHasGlobalOrdering(currRing)
754 #define rHasLocalOrMixedOrdering_currRing() rHasLocalOrMixedOrdering(currRing)
755 
757 
758 /// return TRUE if p_SetComp requires p_Setm
761 
762 /// returns TRUE if var(i) belongs to p-block
763 BOOLEAN rIsPolyVar(int i, const ring r);
764 
765 static inline BOOLEAN rOrd_is_Comp_dp(const ring r)
766 {
767  assume(r != NULL);
768  assume(r->cf != NULL);
769  return ((r->order[0] == ringorder_c || r->order[0] == ringorder_C) &&
770  r->order[1] == ringorder_dp &&
771  r->order[2] == 0);
772 }
773 
774 #ifdef RDEBUG
775 #define rTest(r) rDBTest(r, __FILE__, __LINE__)
776 extern BOOLEAN rDBTest(ring r, const char* fn, const int l);
777 #else
778 #define rTest(r) (TRUE)
779 #endif
780 
781 ring rModifyRing(ring r, BOOLEAN omit_degree,
782  BOOLEAN omit_comp,
783  unsigned long exp_limit);
784 
785 /// construct Wp, C ring
786 ring rModifyRing_Wp(ring r, int* weights);
787 void rModify_a_to_A(ring r);
788 
789 void rKillModifiedRing(ring r);
790 // also frees weights
791 void rKillModified_Wp_Ring(ring r);
792 
793 ring rModifyRing_Simple(ring r, BOOLEAN omit_degree, BOOLEAN omit_comp, unsigned long exp_limit, BOOLEAN &simple);
794 void rKillModifiedRing_Simple(ring r);
795 
796 #ifdef RDEBUG
797 void rDebugPrint(const ring r);
798 // void pDebugPrint(poly p);
799 void p_DebugPrint(poly p, const ring r);
800 #endif
801 
802 int64 * rGetWeightVec(const 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(const intvec *iv);
819 int rTypeOfMatrixOrder(const 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:747
short N
Definition: ring.h:311
ideal F
Definition: ring.h:220
Definition: ring.h:140
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:541
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:4935
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:324
for idElimination, like a, except pFDeg, pWeigths ignore it
Definition: ring.h:99
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:2892
poly(* NF_Proc)(ideal, ideal, poly, int, int, const ring _currRing)
Definition: ring.h:251
static FORCE_INLINE char const ** n_ParameterNames(const coeffs r)
Returns a (const!) pointer to (const char*) names of parameters.
Definition: coeffs.h:812
const char * rSimpleOrdStr(int ord)
Definition: ring.cc:88
BOOLEAN rRing_is_Homog(ring r)
Definition: ring.cc:5081
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_ModN(const coeffs r)
Definition: coeffs.h:753
pFDegProc pFDegOrig
Definition: ring.h:368
ring rAssure_dp_C(const ring r)
Definition: ring.cc:4883
short start
Definition: ring.h:214
ideal(* BBA_Proc)(const ideal, const ideal, const intvec *, const intvec *, kStrategy strat, const ring)
Definition: ring.h:252
for int64 weights
Definition: ring.h:79
int * pVarOffset
Definition: ring.h:215
pFDegProc pFDeg
Definition: ring.h:364
static FORCE_INLINE BOOLEAN nCoeff_is_numeric(const coeffs r)
Definition: coeffs.h:846
short CmpL_Size
Definition: ring.h:336
n_Procs_s * cf
Definition: ring.h:373
const nc_struct * GetNC() const
Definition: ring.h:378
Definition: ring.h:68
int * syz_index
Definition: ring.h:190
BOOLEAN rOrd_is_Totaldegree_Ordering(const ring r)
Definition: ring.cc:1896
short end
Definition: ring.h:169
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:3435
ring rAssure_CompLastBlock(const ring r, BOOLEAN complete=TRUE)
makes sure that c/C ordering is last ordering
Definition: ring.cc:4612
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:873
Definition: ring.h:61
non-simple ordering as specified by currRing
Definition: ring.h:107
int order_index
Definition: ring.h:229
simple ordering, exponent vector has priority < component is compatible with exp-vector order ...
Definition: ring.h:111
static BOOLEAN rField_is_Zp_a(const ring r)
Definition: ring.h:518
char * rOrdStr(ring r)
Definition: ring.cc:522
int curr_index
Definition: ring.h:191
static BOOLEAN rField_is_Ring_PtoM(const ring r)
Definition: ring.h:471
#define FALSE
Definition: auxiliary.h:97
omBin sip_sring_bin
Definition: ring.cc:54
int * pVarOffset
Definition: ring.h:206
idhdl idroot
Definition: ring.h:260
Definition: ring.h:70
int * weights_m
Definition: ring.h:148
return P p
Definition: myNF.cc:203
opposite of ls
Definition: ring.h:100
void rSetSyzComp(int k, const ring r)
Definition: ring.cc:4989
pLDegProc pLDeg
Definition: ring.h:365
static int rPar(const ring r)
(r->cf->P)
Definition: ring.h:587
static BOOLEAN rField_is_Ring_ModN(const ring r)
Definition: ring.h:468
static FORCE_INLINE BOOLEAN nCoeff_is_long_R(const coeffs r)
Definition: coeffs.h:905
short place
Definition: ring.h:123
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:1682
char * rString(ring r)
Definition: ring.cc:644
static BOOLEAN rIsSyzIndexRing(const ring r)
Definition: ring.h:708
struct p_Procs_s p_Procs_s
Definition: ring.h:29
static BOOLEAN rField_is_R(const ring r)
Definition: ring.h:507
void rUnComplete(ring r)
Definition: ring.cc:3881
pLDegProc pLDegOrig
Definition: ring.h:370
static int rGetCurrSyzLimit(const ring r)
Definition: ring.h:711
intvec * pModW
Definition: ring.h:294
static BOOLEAN rIsRatGRing(const ring r)
Definition: ring.h:415
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_Z(const coeffs r)
Definition: coeffs.h:759
ring rAssure_c_dp(const ring r)
Definition: ring.cc:4893
static FORCE_INLINE BOOLEAN nCoeff_is_R(const coeffs r)
Definition: coeffs.h:850
{p < 2^31}
Definition: coeffs.h:30
static BOOLEAN rShortOut(const ring r)
Definition: ring.h:569
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_2toM(const coeffs r)
Definition: coeffs.h:750
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:580
short end
Definition: ring.h:159
int n_IsParam(number m, const ring r)
if m == var(i)/1 => return i,
Definition: ring.cc:5638
short place
Definition: ring.h:176
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:916
BOOLEAN rDBTest(ring r, const char *fn, const int l)
Definition: ring.cc:1957
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:4667
long int64
Definition: auxiliary.h:69
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:528
Definition: ring.h:255
#define TRUE
Definition: auxiliary.h:101
short place
Definition: ring.h:188
int limit
Definition: ring.h:189
unsigned long divmask
Definition: ring.h:359
static BOOLEAN rField_is_Domain(const ring r)
Definition: ring.h:480
short start
Definition: ring.h:124
void rKillModified_Wp_Ring(ring r)
Definition: ring.cc:2973
simple ordering, component has priority
Definition: ring.h:108
BOOLEAN rHas_c_Ordering(const ring r)
Definition: ring.cc:1766
int * weights
Definition: ring.h:135
ring rCopy0AndAddA(ring r, int64vec *wv64, BOOLEAN copy_qideal=TRUE, BOOLEAN copy_ordering=TRUE)
Definition: ring.cc:1463
int * weights
Definition: ring.h:146
int k
Definition: cfEzgcd.cc:93
static BOOLEAN rField_is_GF(const ring r)
Definition: ring.h:510
static char const ** rParameter(const ring r)
(r->cf->parameter)
Definition: ring.h:613
long * currShiftedComponents
Definition: syz1.cc:40
short firstBlockEnds
Definition: ring.h:315
void rDebugPrint(const ring r)
Definition: ring.cc:4033
short ExpL_Size
Definition: ring.h:335
static FORCE_INLINE BOOLEAN nCoeff_is_Q(const coeffs r)
Definition: coeffs.h:840
BOOLEAN CanShortOut
Definition: ring.h:326
static FORCE_INLINE BOOLEAN nCoeff_is_long_C(const coeffs r)
Definition: coeffs.h:908
Definition: ring.h:66
Definition: nc.h:83
short VarL_Size
Definition: ring.h:340
Schreyer ordering.
Definition: ring.h:114
int suffixpos
Definition: ring.h:205
short end
Definition: ring.h:144
void rChangeSComps(int *currComponents, long *currShiftedComponents, int length, ring r)
Definition: ring.cc:4354
short place
Definition: ring.h:132
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:4903
long(* pLDegProc)(poly p, int *length, ring r)
Definition: ring.h:45
static BOOLEAN rCanShortOut(const ring r)
Definition: ring.h:574
static FORCE_INLINE BOOLEAN nCoeff_is_Ring(const coeffs r)
Definition: coeffs.h:762
Definition: ring.h:64
int64 * weights64
Definition: ring.h:160
ring rModifyRing_Wp(ring r, int *weights)
construct Wp, C ring
Definition: ring.cc:2844
Definition: idrec.h:34
static FORCE_INLINE BOOLEAN nCoeff_is_Q_a(const coeffs r)
Definition: coeffs.h:899
void rKillModifiedRing(ring r)
Definition: ring.cc:2963
long * ShiftedComponents
Definition: ring.h:177
omBin PolyBin
Definition: ring.h:293
simple ordering, exponent vector has priority < component not compatible with exp-vector order ...
Definition: ring.h:109
static BOOLEAN rField_has_simple_inverse(const ring r)
Definition: ring.h:537
int * block0
Definition: ring.h:262
ring rEnvelope(ring r)
Definition: ring.cc:5513
static FORCE_INLINE int n_NumberOfParameters(const coeffs r)
Returns the number of parameters.
Definition: coeffs.h:808
syzygy ordering
Definition: ring.h:113
ring rAssure_HasComp(const ring r)
Definition: ring.cc:4557
n_coeffType rFieldType(const ring r)
Definition: ring.cc:5110
p_SetmProc p_Setm
Definition: ring.h:372
int ref
Definition: ring.h:309
ro_typ ord_typ
Definition: ring.h:228
short start
Definition: ring.h:204
short real_var_start
Definition: ring.h:317
short pOrdIndex
Definition: ring.h:344
static int rBlocks(ring r)
Definition: ring.h:556
skStrategy * kStrategy
Definition: ring.h:248
sro_ord * typ
Definition: ring.h:273
const ring r
Definition: syzextra.cc:208
static BOOLEAN rMinpolyIsNULL(const ring r)
Tests whether &#39;(r->cf->minpoly) == NULL&#39;.
Definition: ring.h:687
Coefficient rings, fields and other domains suitable for Singular polynomials.
ring rAssure_dp_S(const ring r)
Definition: ring.cc:4878
Definition: ring.h:186
short ExpPerLong
Definition: ring.h:342
static FORCE_INLINE BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
Definition: coeffs.h:924
Definition: intvec.h:14
void rGetSComps(int **currComponents, long **currShiftedComponents, int *length, ring r)
Definition: ring.cc:4363
const CanonicalForm CFMap CFMap & N
Definition: cfEzgcd.cc:49
int * order
Definition: ring.h:261
short end
Definition: ring.h:134
ring rAssure_SyzOrder(const ring r, BOOLEAN complete)
Definition: ring.cc:4379
#define assume(x)
Definition: mod2.h:403
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
ring rModifyRing(ring r, BOOLEAN omit_degree, BOOLEAN omit_comp, unsigned long exp_limit)
Definition: ring.cc:2597
The main handler for Singular numbers which are suitable for Singular polynomials.
BOOLEAN rCheckIV(const intvec *iv)
Definition: ring.cc:185
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:831
ring rCopy(ring r)
Definition: ring.cc:1619
short place
Definition: ring.h:167
static FORCE_INLINE BOOLEAN nCoeff_has_simple_Alloc(const coeffs r)
TRUE if n_Delete/n_New are empty operations.
Definition: coeffs.h:920
short start
Definition: ring.h:158
rRingOrder_t
order stuff
Definition: ring.h:75
short start
Definition: ring.h:168
short isLPring
Definition: ring.h:321
BOOLEAN LexOrder
Definition: ring.h:327
Definition: ring.h:226
All the auxiliary stuff.
int rChar(ring r)
Definition: ring.cc:684
int m
Definition: cfEzgcd.cc:119
int64 * rGetWeightVec(const ring r)
Definition: ring.cc:5129
BOOLEAN rHasSimpleLexOrder(const ring r)
returns TRUE, if simple lp or ls ordering
Definition: ring.cc:1802
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_PtoM(const coeffs r)
Definition: coeffs.h:756
short NegWeightL_Size
Definition: ring.h:351
idrec * idhdl
Definition: ring.h:18
int rSum(ring r1, ring r2, ring &sum)
Definition: ring.cc:1302
BOOLEAN ShortOut
Definition: ring.h:325
int i
Definition: cfEzgcd.cc:123
Induced (Schreyer) ordering.
Definition: ring.h:101
static char * rRingVar(short i, const ring r)
Definition: ring.h:565
void(* p_SetmProc)(poly p, const ring r)
Definition: ring.h:47
static BOOLEAN rField_is_Q(const ring r)
Definition: ring.h:501
short BitsPerExp
Definition: ring.h:341
short OrdSize
Definition: ring.h:345
S?
Definition: ring.h:83
ring rAssure_TDeg(const ring r, int start_var, int end_var, int &pos)
Definition: ring.cc:4465
Definition: ring.h:155
BOOLEAN rOrd_SetCompRequiresSetm(const ring r)
return TRUE if p_SetComp requires p_Setm
Definition: ring.cc:1876
static FORCE_INLINE BOOLEAN nCoeff_is_GF(const coeffs r)
Definition: coeffs.h:853
short OrdSgn
Definition: ring.h:313
static FORCE_INLINE n_coeffType getCoeffType(const coeffs r)
Returns the type of coeffs domain.
Definition: coeffs.h:425
BOOLEAN rHasMixedOrdering(const ring r)
Definition: ring.h:748
Definition: ring.h:69
syzcomp2dpc
Definition: ring.h:115
static BOOLEAN rField_is_long_C(const ring r)
Definition: ring.h:534
short place
Definition: ring.h:142
Definition: ring.h:69
ring rOpposite(ring r)
Definition: ring.cc:5185
static BOOLEAN rField_is_Zp(const ring r)
Definition: ring.h:495
rOrderType_t
Definition: ring.h:105
int int kStrategy strat
Definition: myNF.cc:68
ring rAssure_SyzComp(const ring r, BOOLEAN complete=TRUE)
Definition: ring.cc:4384
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:295
n_coeffType
Definition: coeffs.h:27
CanonicalForm cf
Definition: cfModGcd.cc:4024
The following sip_sideal structure has many different uses thoughout Singular. Basic use-cases for it...
Definition: simpleideals.h:18
static BOOLEAN rField_is_Ring_2toM(const ring r)
Definition: ring.h:465
static BOOLEAN rField_is_Ring(const ring r)
Definition: ring.h:477
void rKillModifiedRing_Simple(ring r)
Definition: ring.cc:2957
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:773
#define NULL
Definition: omList.c:10
int * VarOffset
Definition: ring.h:279
ring rDefault(int ch, int N, char **n)
Definition: ring.cc:165
int * firstwv
Definition: ring.h:291
int * block1
Definition: ring.h:263
BOOLEAN rHasGlobalOrdering(const ring r)
Definition: ring.h:746
nc_struct * _nc
Definition: ring.h:376
long(* pFDegProc)(poly p, ring r)
Definition: ring.h:46
char ** names
Definition: ring.h:266
static BOOLEAN rField_is_Ring_Z(const ring r)
Definition: ring.h:474
static BOOLEAN rField_is_long_R(const ring r)
Definition: ring.h:531
rOrderType_t rGetOrderType(ring r)
Definition: ring.cc:1723
ideal qideal
extension to the ring structure: qring, rInit, OR for Q_a/Zp_a, rInit (replaces minideal!); for a sta...
Definition: ring.h:283
long * ordsgn
Definition: ring.h:269
int limit
Definition: ring.h:217
char * rVarStr(ring r)
Definition: ring.cc:594
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, 1: dp,dp, 2: aa(...),dp vartest: check for name conflicts
Definition: ring.cc:722
Definition: ring.h:63
BOOLEAN rHasSimpleOrder(const ring r)
Definition: ring.cc:1770
void rSetWeightVec(ring r, int64 *wv)
Definition: ring.cc:5139
ring rAssure_C_dp(const ring r)
Definition: ring.cc:4888
Definition: ring.h:60
p_Procs_s * p_Procs
Definition: ring.h:361
BOOLEAN rIsPolyVar(int i, const ring r)
returns TRUE if var(i) belongs to p-block
Definition: ring.cc:1918
short end
Definition: ring.h:125
Definition: ring.h:212
poly rGetVar(const int varIndex, const ring r)
Definition: ring.cc:5628
BOOLEAN ComponentOrder
Definition: ring.h:331
long length
Definition: ring.h:180
void rModify_a_to_A(ring r)
Definition: ring.cc:5605
static int rInternalChar(const ring r)
Definition: ring.h:677
short place
Definition: ring.h:157
char * rParStr(ring r)
Definition: ring.cc:620
BOOLEAN MixedOrder
Definition: ring.h:328
BOOLEAN pLexOrder
Definition: ring.h:329
#define const
Definition: fegetopt.c:41
BOOLEAN rRing_has_CompLastBlock(ring r)
Definition: ring.cc:5103
Definition: ring.h:62
short len_gen
Definition: ring.h:145
int * VarL_Offset
Definition: ring.h:354
nc_struct *& GetNC()
Definition: ring.h:379
int rGetMaxSyzComp(int i, const ring r)
return the max-comonent wchich has syzIndex i Assume: i<= syzIndex_limit
Definition: ring.cc:5057
void p_DebugPrint(poly p, const ring r)
Definition: ring.cc:4238
short start
Definition: ring.h:143
polyrec * poly
Definition: hilb.h:10
static BOOLEAN rField_has_Units(const ring r)
Definition: ring.h:483
int ** wvhdl
Definition: ring.h:265
static BOOLEAN rOrd_is_Comp_dp(const ring r)
Definition: ring.h:765
int rOrderName(char *ordername)
Definition: ring.cc:508
int rTypeOfMatrixOrder(const intvec *order)
Definition: ring.cc:195
simple ordering, differences in component are < not considered
Definition: ring.h:116
int * Components
Definition: ring.h:178
static Poly * h
Definition: janet.cc:978
short VarL_LowIndex
Definition: ring.h:349
int BOOLEAN
Definition: auxiliary.h:88
s?
Definition: ring.h:84
int * NegWeightL_Offset
Definition: ring.h:277
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
void p_SetGlobals(const ring r, BOOLEAN complete=TRUE)
set all properties of a new ring - also called by rComplete
Definition: ring.cc:3400
static BOOLEAN rField_is_numeric(const ring r)
Definition: ring.h:504
short start
Definition: ring.h:133
void * ext_ref
Definition: ring.h:297
unsigned long options
Definition: ring.h:306
Definition: ring.h:130
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:640
short pCompIndex
Definition: ring.h:343
Definition: ring.h:165
Definition: ring.h:121
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:1634
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:1321
unsigned long bitmask
Definition: ring.h:357