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