My Project
kutil.h
Go to the documentation of this file.
1 #ifndef KUTIL_H
2 #define KUTIL_H
3 /****************************************
4 * Computer Algebra System SINGULAR *
5 ****************************************/
6 /*
7 * ABSTRACT: kernel: utils for kStd
8 */
9 
10 
11 #include <string.h>
12 
13 #include "omalloc/omalloc.h"
14 #ifdef HAVE_OMALLOC
15 #include "omalloc/omallocClass.h"
16 #endif
17 
18 #include "misc/mylimits.h"
19 
20 #include "kernel/polys.h"
22 
23 #include "kernel/structs.h"
24 #include "kernel/GBEngine/kstd1.h" /* for s_poly_proc_t */
25 
26 // define if tailrings should be used
27 #define HAVE_TAIL_RING
28 
29 #define setmax 128
30 #define setmaxL ((4096-12)/sizeof(LObject))
31 #define setmaxLinc ((4096)/sizeof(LObject))
32 
33 #define setmaxT ((4096-12)/sizeof(TObject))
34 #define setmaxTinc ((4096)/sizeof(TObject))
35 
36 // if you want std computations as in Singular version < 2:
37 // This disables RedThrough, tailReductions against T (bba),
38 // sets posInT = posInT15 (bba, strat->honey), and enables redFirst with LDeg
39 // NOTE: can be achieved with option(oldStd)
40 
41 #undef NO_KINLINE
42 #if !defined(KDEBUG) && !defined(NO_INLINE)
43 #define KINLINE inline
44 #else
45 #define KINLINE
46 #define NO_KINLINE 1
47 #endif
48 
49 typedef int* intset;
50 typedef int64 wlen_type;
52 
53 typedef class sTObject TObject;
54 typedef class sLObject LObject;
55 typedef TObject * TSet;
56 typedef LObject * LSet;
57 
60 
63 
64 class sTObject
65 {
66 public:
67  unsigned long sevSig;
68  poly sig; // the signature of the element
69  poly p; // Lm(p) \in currRing Tail(p) \in tailRing
70  poly t_p; // t_p \in tailRing: as monomials Lm(t_p) == Lm(p)
71  poly max_exp; // p_GetMaxExpP(pNext(p))
72  ring tailRing;
73  long FDeg; // pFDeg(p)
74  int ecart,
75  length, // as of pLDeg
76  pLength, // either == 0, or == pLength(p)
77  i_r; // index of TObject in R set, or -1 if not in T
78 
79 #ifdef HAVE_SHIFTBBA
80  int shift;
81 #endif
82 
83  /*BOOLEAN*/ char is_normalized; // true, if pNorm was called on p, false otherwise
84  // used in incremental sba() with F5C:
85  // we know some of the redundant elements in
86  // strat->T beforehand, so we can just discard
87  // them and do not need to consider them in the
88  // interreduction process
89  /*BOOLEAN*/ char is_redundant;
90  // used in sba's sig-safe reduction:
91  // sometimes we already know that a reducer
92  // is sig-safe, so no need for a real
93  // sig-safeness check
94  /*BOOLEAN*/ char is_sigsafe;
95 
96 
97 #ifdef HAVE_PLURAL
98  /*BOOLEAN*/ char is_special; // true, it is a new special S-poly (e.g. for SCA)
99 #endif
100 
101  // initialization
102  KINLINE void Init(ring r = currRing);
104  KINLINE sTObject(poly p, ring tailRing = currRing);
105  KINLINE sTObject(poly p, ring c_r, ring tailRing);
106  KINLINE sTObject(sTObject* T, int copy);
107 
108  KINLINE void Set(ring r=currRing);
109  KINLINE void Set(poly p_in, ring r=currRing);
110  KINLINE void Set(poly p_in, ring c_r, ring t_r);
111 
112  // Frees the polys of T
113  KINLINE void Delete();
114  // Sets polys to NULL
115  KINLINE void Clear();
116  // makes a copy of the poly of T
117  KINLINE void Copy();
118 
119  // ring-dependent Lm access: these might result in allocation of monomials
120  KINLINE poly GetLmCurrRing();
121  KINLINE poly GetLmTailRing();
122  KINLINE poly GetLm(ring r);
123  // this returns Lm and ring r (preferably from tailRing), but does not
124  // allocate a new poly
125  KINLINE void GetLm(poly &p, ring &r) const;
126 
127 #ifdef OLIVER_PRIVAT_LT
128  // routines for calc. with rings
129  KINLINE poly GetLtCurrRing();
130  KINLINE poly GetLtTailRing();
131  KINLINE poly GetLt(ring r);
132  KINLINE void GetLt(poly &p, ring &r) const;
133 #endif
134 
135  KINLINE BOOLEAN IsNull() const;
136 
137  KINLINE int GetpLength();
138 
139  // makes sure that T.p exists
140  KINLINE void SetLmCurrRing();
141 
142  // Iterations
143  // simply get the next monomial
144  KINLINE poly Next();
145  KINLINE void LmDeleteAndIter();
146 
147  // deg stuff
148  // compute pTotalDegree
149  KINLINE long pTotalDeg() const;
150  // computes pFDeg
151  KINLINE long pFDeg() const;
152  // computes and sets FDeg
153  KINLINE long SetpFDeg();
154  // gets stored FDeg
155  KINLINE long GetpFDeg() const;
156 
157  // computes pLDeg
158  KINLINE long pLDeg();
159  // sets length, FDeg, returns LDeg
161 
162  // arithmetic
163  KINLINE void Mult_nn(number n);
164  KINLINE void ShallowCopyDelete(ring new_tailRing, omBin new_tailBin,
165  pShallowCopyDeleteProc p_shallow_copy_delete,
166  BOOLEAN set_max = TRUE);
167  // manipulations
168  KINLINE void pNorm();
169  KINLINE void pCleardenom();
170  KINLINE void pContent();
171 
172 #ifdef KDEBUG
173  void wrp();
174 #endif
175 };
176 
178 
179 class sLObject : public sTObject
180 {
181 
182 public:
183  unsigned long sev;
184  poly p1,p2; /*- the pair p comes from,
185  lm(pi) in currRing, tail(pi) in tailring -*/
186 
187  poly lcm; /*- the lcm of p1,p2 -*/
189  int i_r1, i_r2;
190  unsigned checked; // this is the index of S up to which
191  // the corresponding LObject was already checked in
192  // critical pair creation => when entering the
193  // reduction process it is enough to start a second
194  // rewritten criterion check from checked+1 onwards
196  // NOTE: If prod_crit = TRUE then the corresponding pair is
197  // detected by Buchberger's Product Criterion and can be
198  // deleted
199 
200  // initialization
201  KINLINE void Init(ring tailRing = currRing);
203  KINLINE sLObject(poly p, ring tailRing = currRing);
204  KINLINE sLObject(poly p, ring c_r, ring tailRing);
205 
206  // Frees the polys of L
207  KINLINE void Delete();
208  KINLINE void Clear();
209 
210  // Iterations
211  KINLINE void LmDeleteAndIter();
212  KINLINE poly LmExtractAndIter();
213 
214  // spoly related things
215  // preparation for reduction if not spoly
216  KINLINE void PrepareRed(BOOLEAN use_bucket);
217  KINLINE void SetLmTail(poly lm, poly new_p, int length,
218  int use_bucket, ring r);
219  KINLINE void Tail_Minus_mm_Mult_qq(poly m, poly qq, int lq, poly spNoether);
220  KINLINE void Tail_Mult_nn(number n);
221  // deletes bucket, makes sure that p and t_p exists
222  KINLINE poly GetP(omBin lmBin = (omBin)NULL);
223  // similar, except that only t_p exists
224  KINLINE poly GetTP();
225 
226  // does not delete bucket, just canonicalizes it
227  // returned poly is such that Lm(p) \in currRing, Tail(p) \in tailRing
228  KINLINE void CanonicalizeP();
229 
230  // makes a copy of the poly of L
231  KINLINE void Copy();
232 
233  KINLINE int GetpLength();
234  KINLINE long pLDeg(BOOLEAN use_last);
235  KINLINE long pLDeg();
236  KINLINE int SetLength(BOOLEAN lengt_pLength = FALSE);
238  KINLINE long SetDegStuffReturnLDeg(BOOLEAN use_last);
239 
240  // returns minimal component of p
241  KINLINE long MinComp();
242  // returns component of p
243  KINLINE long Comp();
244 
245  KINLINE void ShallowCopyDelete(ring new_tailRing,
246  pShallowCopyDeleteProc p_shallow_copy_delete);
247 
248  // sets sev
249  KINLINE void SetShortExpVector();
250 
251  // enable assignment from TObject
253 
254  // get T's corresponding to p1, p2: they might return NULL
255  KINLINE TObject* T_1(const skStrategy* strat);
256  KINLINE TObject* T_2(const skStrategy* strat);
257  KINLINE void T_1_2(const skStrategy* strat,
258  TObject* &T_1, TObject* &T_2);
259 
260  // simplify coefficients
261  KINLINE void Normalize();
262  KINLINE void HeadNormalize();
263 };
264 
265 
267 
269 #ifdef HAVE_OMALLOC
270  : public omallocClass
271 #endif
272 {
273 public:
275  int (*red)(LObject * L,kStrategy strat);
276  int (*red2)(LObject * L,kStrategy strat);
277  void (*initEcart)(TObject * L);
278  int (*posInT)(const TSet T,const int tl,LObject &h);
279  int (*posInLSba)(const LSet set, const int length,
280  LObject* L,const kStrategy strat);
281  int (*posInL)(const LSet set, const int length,
282  LObject* L,const kStrategy strat);
283  void (*enterS)(LObject &h, int pos,kStrategy strat, int atR/* =-1*/ );
284  void (*initEcartPair)(LObject * h, poly f, poly g, int ecartF, int ecartG);
285  int (*posInLOld)(const LSet Ls,const int Ll,
286  LObject* Lo,const kStrategy strat);
287  void (*enterOnePair) (int i,poly p,int ecart, int isFromQ,kStrategy strat, int atR /*= -1*/);
288  void (*chainCrit) (poly p,int ecart,kStrategy strat);
289  BOOLEAN (*syzCrit) (poly sig, unsigned long not_sevSig, kStrategy strat);
290  BOOLEAN (*rewCrit1) (poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start /*= 0*/);
291  BOOLEAN (*rewCrit2) (poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start /*= 0*/);
292  BOOLEAN (*rewCrit3) (poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start /*= 0*/);
298 
300  ideal Shdl;
301  ideal D; /*V(S) is in D(D)*/
302  ideal M; /*set of minimal generators*/
307  intset fromS; // from which S[i] S[j] comes from
308  // this is important for signature-based
309  // algorithms
310  intset syzIdx;// index in the syz array at which the first
311  // syzygy of component i comes up
312  // important for signature-based algorithms
313  unsigned sbaOrder;
314  int currIdx;
317  wlen_set lenSw; /* for tgb.ccc */
319  unsigned long* sevS;
320  unsigned long* sevSyz;
321  unsigned long* sevSig;
322  unsigned long* sevT;
326  poly kHEdge;
327  poly kNoether;
328  poly t_kHEdge; // same polys in tailring
329  KINLINE poly kNoetherTail();
332  BOOLEAN * pairtest;/*used for enterOnePair*/
333  poly tail;
336  // procedure for ShalloCopy from tailRing to currRing
338  // pointers to Tobjects R[i] is ith Tobject which is generated
340  // S_2_R[i] yields Tobject which corresponds to S[i]
341  int* S_2_R;
342  ring tailRing;
345  int nr;
346  int cp,c3;
347  int sl,mu;
349  int tl,tmax;
350  int Ll,Lmax;
351  int Bl,Bmax;
353  int syzComp;
354  int HCord;
355  int lastAxis;
356  int newIdeal;
357  int minim;
358  #ifdef HAVE_RINGS
359  bool sigdrop; //This is used to check sigdrop in sba over Z
360  int nrsyzcrit; // counts how many pairs are deleted by SyzCrit
361  int nrrewcrit; // counts how many pairs are deleted by FaugereRewCrit
362  int sbaEnterS; // sba over Z strategy: if sigdrop element has _*gen(sbaEnterS+1), then
363  // add directly sbaEnterS elements into S
364  int blockred; // counter for blocked reductions in redSig
366  #endif
367  #ifdef HAVE_SHIFTBBA
368  int cv; // in shift bases: counting V criterion
369  /*BOOLEAN*/ char rightGB;
370  #endif
371  /*BOOLEAN*/ char interpt;
372  /*BOOLEAN*/ char homog;
373 #ifdef HAVE_PLURAL
374  /*BOOLEAN*/ char z2homog; // Z_2 - homogeneous input allows product criterion in commutative and SCA cases!
375 #endif
376  /*BOOLEAN*/ char kHEdgeFound;
377  /*BOOLEAN*/ char honey,sugarCrit;
378  /*BOOLEAN*/ char Gebauer,noTailReduction;
379  /*BOOLEAN*/ char fromT;
380  /*BOOLEAN*/ char noetherSet;
381  /*BOOLEAN*/ char update;
382  /*BOOLEAN*/ char posInLOldFlag;
383  /*BOOLEAN*/ char use_buckets;
384  // if set, pLDeg(p, l) == (pFDeg(pLast(p), pLength)
385  /*BOOLEAN*/ char LDegLast;
386  // if set, then L.length == L.pLength
387  /*BOOLEAN*/ char length_pLength;
388  // if set, then posInL does not depend on L.length
389  /*BOOLEAN*/ char posInLDependsOnLength;
390  /*FALSE, if posInL == posInL10*/
391 #ifdef HAVE_PLURAL
392  // set this flag to 1 to stop the product criteria
393  // use ALLOW_PROD_CRIT(strat) to test
394  /*BOOLEAN*/ char no_prod_crit;
395 #define ALLOW_PROD_CRIT(A) (!(A)->no_prod_crit)
396 #else
397 #define ALLOW_PROD_CRIT(A) (1)
398 #endif
400  char news;
401  char newt;/*used for messageSets*/
402  char noClearS;
404  char overflow;
405 
406  skStrategy();
407  ~skStrategy();
408 
409  // return TObject corresponding to S[i]: assume that it exists
410  // i.e. no error checking is done
411  KINLINE TObject* S_2_T(int i);
412  // like S_2_T, except that NULL is returned if it can not be found
413  KINLINE TObject* s_2_t(int i);
414 };
415 
416 void deleteHC(poly *p, int *e, int *l, kStrategy strat);
417 void deleteHC(LObject* L, kStrategy strat, BOOLEAN fromNext = FALSE);
418 void deleteInS (int i,kStrategy strat);
419 void deleteInSSba (int i,kStrategy strat);
420 void cleanT (kStrategy strat);
421 static inline LSet initL (int nr=setmaxL)
422 { return (LSet)omAlloc(nr*sizeof(LObject)); }
423 void deleteInL(LSet set, int *length, int j,kStrategy strat);
424 void enterL (LSet *set,int *length, int *LSetmax, LObject p,int at);
425 void enterSBba (LObject &p,int atS,kStrategy strat, int atR = -1);
426 void enterSBbaShift (LObject &p,int atS,kStrategy strat, int atR = -1);
427 void enterSSba (LObject &p,int atS,kStrategy strat, int atR = -1);
428 void initEcartPairBba (LObject* Lp,poly f,poly g,int ecartF,int ecartG);
429 void initEcartPairMora (LObject* Lp,poly f,poly g,int ecartF,int ecartG);
430 int posInS (const kStrategy strat, const int length, const poly p,
431  const int ecart_p);
432 int posInSMonFirst (const kStrategy strat, const int length, const poly p);
433 int posInIdealMonFirst (const ideal F, const poly p,int start = 0,int end = -1);
434 int posInT0 (const TSet set,const int length,LObject &p);
435 int posInT1 (const TSet set,const int length,LObject &p);
436 int posInT2 (const TSet set,const int length,LObject &p);
437 int posInT11 (const TSet set,const int length,LObject &p);
438 int posInTSig (const TSet set,const int length,LObject &p);
439 int posInT110 (const TSet set,const int length,LObject &p);
440 int posInT13 (const TSet set,const int length,LObject &p);
441 int posInT15 (const TSet set,const int length,LObject &p);
442 int posInT17 (const TSet set,const int length,LObject &p);
443 int posInT17_c (const TSet set,const int length,LObject &p);
444 int posInT19 (const TSet set,const int length,LObject &p);
445 int posInT_EcartpLength(const TSet set,const int length,LObject &p);
446 int posInT_EcartFDegpLength(const TSet set,const int length,LObject &p);
447 int posInT_FDegpLength(const TSet set,const int length,LObject &p);
448 int posInT_pLength(const TSet set,const int length,LObject &p);
449 
450 #ifdef HAVE_MORE_POS_IN_T
451 int posInT_EcartFDegpLength(const TSet set,const int length,LObject &p);
452 int posInT_FDegpLength(const TSet set,const int length,LObject &p);
453 int posInT_pLength(const TSet set,const int length,LObject &p);
454 #endif
455 
456 
457 void reorderS (int* suc,kStrategy strat);
458 int posInLF5C (const LSet set, const int length,
459  LObject* L,const kStrategy strat);
460 int posInLSig (const LSet set, const int length,
461  LObject* L,const kStrategy strat);
462 int posInLSigRing (const LSet set, const int length,
463  LObject* L,const kStrategy strat);
464 int posInLRing (const LSet set, const int length,
465  LObject* L,const kStrategy strat);
466 int posInSyz (const kStrategy strat, const poly sig);
467 int posInL0 (const LSet set, const int length,
468  LObject* L,const kStrategy strat);
469 int posInL11 (const LSet set, const int length,
470  LObject* L,const kStrategy strat);
471 int posInL11Ring (const LSet set, const int length,
472  LObject* L,const kStrategy strat);
473 int posInLF5CRing (const LSet set, int start , const int length,
474  LObject* L,const kStrategy strat);
475 int posInL11Ringls (const LSet set, const int length,
476  LObject* L,const kStrategy strat);
477 int posInL13 (const LSet set, const int length,
478  LObject* L,const kStrategy strat);
479 int posInL15 (const LSet set, const int length,
480  LObject* L,const kStrategy strat);
481 int posInL15Ring (const LSet set, const int length,
482  LObject* L,const kStrategy strat);
483 int posInL17 (const LSet set, const int length,
484  LObject* L,const kStrategy strat);
485 int posInL10 (const LSet set, const int length,
486  LObject* L,const kStrategy strat);
487 int posInL10Ring (const LSet set, const int length,
488  LObject* L,const kStrategy strat);
489 int posInL110 (const LSet set, const int length,
490  LObject* L,const kStrategy strat);
491 KINLINE poly redtailBba (poly p,int end_pos,kStrategy strat,BOOLEAN normalize=FALSE);
492 KINLINE poly redtailBbaBound (poly p,int end_pos,kStrategy strat,int bound,BOOLEAN normalize=FALSE);
493 #ifdef HAVE_RINGS
494 KINLINE poly redtailBba_Z (poly p,int end_pos,kStrategy strat);
495 poly redtailBba_Z (LObject* L, int end_pos, kStrategy strat );
496 void redtailBbaAlsoLC_Z (LObject* L, int end_pos, kStrategy strat );
497 #endif
498 poly redtailBba (LObject *L, int end_pos,kStrategy strat,
500 poly redtailBbaBound (LObject *L, int end_pos,kStrategy strat,int bound,
502 poly redtailSba (LObject *L, int end_pos,kStrategy strat,
504 poly redtailBba (TObject *T, int end_pos,kStrategy strat);
505 poly redtail (poly p,int end_pos,kStrategy strat);
506 poly redtail (LObject *L,int end_pos,kStrategy strat);
507 poly redNF (poly h,int & max_ind,int nonorm,kStrategy strat);
508 int redNF0 (LObject *P,kStrategy strat);
509 poly redNFTail (poly h,const int sl,kStrategy strat);
510 int redHoney (LObject* h, kStrategy strat);
511 int redLiftstd (LObject* h, kStrategy strat);
512 #ifdef HAVE_RINGS
513 int redRing (LObject* h,kStrategy strat);
514 int redRing_Z (LObject* h,kStrategy strat);
515 int redRiloc (LObject* h,kStrategy strat);
516 void enterExtendedSpoly(poly h,kStrategy strat);
517 void enterExtendedSpolySig(poly h,poly hSig,kStrategy strat);
518 void superenterpairs (poly h,int k,int ecart,int pos,kStrategy strat, int atR = -1);
519 void superenterpairsSig (poly h,poly hSig,int hFrom,int k,int ecart,int pos,kStrategy strat, int atR = -1);
520 poly kCreateZeroPoly(long exp[], long cabsind, poly* t_p, ring leadRing, ring tailRing);
521 long ind2(long arg);
522 
523 long ind_fact_2(long arg);
524 long twoPow(long arg);
525 ideal createG0();
526 #endif
527 int redLazy (LObject* h,kStrategy strat);
528 int redHomog (LObject* h,kStrategy strat);
529 int redSig (LObject* h,kStrategy strat);
530 int redSigRing (LObject* h,kStrategy strat);
531 //adds hSig to be able to check with F5's criteria when entering pairs!
532 void enterpairsSig (poly h, poly hSig, int from, int k, int ec, int pos,kStrategy strat, int atR = -1);
533 void enterpairs (poly h, int k, int ec, int pos,kStrategy strat, int atR = -1);
535 void pairs ();
537 void message (int i,int* reduc,int* olddeg,kStrategy strat,int red_result);
538 void messageStat (int hilbcount,kStrategy strat);
539 void messageStatSBA (int hilbcount,kStrategy strat);
540 #ifdef KDEBUG
541 void messageSets (kStrategy strat);
542 #else
543 #define messageSets(s) do {} while (0)
544 #endif
545 
546 void initEcartNormal (TObject* h);
547 void initEcartBBA (TObject* h);
548 void initS (ideal F, ideal Q,kStrategy strat);
549 void initSL (ideal F, ideal Q,kStrategy strat);
550 void initSLSba (ideal F, ideal Q,kStrategy strat);
551 /*************************************************
552  * when initializing a new bunch of principal
553  * syzygies at the beginning of a new iteration
554  * step in a signature-based algorithm we
555  * compute ONLY the leading elements of those
556  * syzygies, NOT the whole syzygy
557  * NOTE: this needs to be adjusted for a more
558  * general approach on signature-based algorithms
559  ***********************************************/
560 void initSyzRules (kStrategy strat);
561 void updateS(BOOLEAN toT,kStrategy strat);
562 void enterSyz (LObject &p,kStrategy strat, int atT);
563 void enterT (LObject &p,kStrategy strat, int atT = -1);
564 void replaceInLAndSAndT(LObject &p, int tj, kStrategy strat);
565 #ifdef HAVE_RINGS
566 void enterT_strong (LObject &p,kStrategy strat, int atT = -1);
567 #endif
568 void cancelunit (LObject* p,BOOLEAN inNF=FALSE);
569 void HEckeTest (poly pp,kStrategy strat);
570 void initBuchMoraCrit(kStrategy strat);
571 void initSbaCrit(kStrategy strat);
572 void initHilbCrit(ideal F, ideal Q, intvec **hilb,kStrategy strat);
573 void initBuchMoraPos(kStrategy strat);
574 void initBuchMoraPosRing(kStrategy strat);
575 void initSbaPos(kStrategy strat);
576 void initBuchMora (ideal F, ideal Q,kStrategy strat);
577 void initSbaBuchMora (ideal F, ideal Q,kStrategy strat);
578 void exitBuchMora (kStrategy strat);
579 void exitSba (kStrategy strat);
580 void updateResult(ideal r,ideal Q,kStrategy strat);
581 void completeReduce (kStrategy strat, BOOLEAN withT=FALSE);
582 void kFreeStrat(kStrategy strat);
583 void enterOnePairNormal (int i,poly p,int ecart, int isFromQ,kStrategy strat, int atR);
584 void chainCritNormal (poly p,int ecart,kStrategy strat);
585 void chainCritOpt_1 (poly,int,kStrategy strat);
586 void chainCritSig (poly p,int ecart,kStrategy strat);
587 BOOLEAN homogTest(polyset F, int Fmax);
588 BOOLEAN newHEdge(kStrategy strat);
589 BOOLEAN syzCriterion(poly sig, unsigned long not_sevSig, kStrategy strat);
590 BOOLEAN syzCriterionInc(poly sig, unsigned long not_sevSig, kStrategy strat);
591 KINLINE BOOLEAN arriRewDummy(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start);
592 BOOLEAN arriRewCriterion(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start);
593 BOOLEAN arriRewCriterionPre(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start);
594 BOOLEAN faugereRewCriterion(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start);
595 BOOLEAN findMinLMPair(poly sig, unsigned long not_sevSig, kStrategy strat, int start);
596 
597 /// returns index of p in TSet, or -1 if not found
598 int kFindInT(poly p, TSet T, int tlength);
599 #ifdef HAVE_SHIFTBBA
600 int kFindInTShift(poly p, TSet T, int tlength);
601 #endif
602 
603 /// return -1 if no divisor is found
604 /// number of first divisor in T, otherwise
605 int kFindDivisibleByInT(const kStrategy strat, const LObject* L, const int start=0);
606 int kFindDivisibleByInT_Z(const kStrategy strat, const LObject* L, const int start=0);
607 int kFindSameLMInT_Z(const kStrategy strat, const LObject* L, const int start=0);
608 
609 /// tests if T[0] divides the leading monomial of L, returns -1 if not
610 int kTestDivisibleByT0_Z(const kStrategy strat, const LObject* L);
611 /// return -1 if no divisor is found
612 /// number of first divisor in S, otherwise
613 int kFindDivisibleByInS(const kStrategy strat, int *max_ind, LObject* L);
614 
615 int kFindNextDivisibleByInS(const kStrategy strat, int start,int max_ind, LObject* L);
616 TObject* kFindDivisibleByInS_T(kStrategy strat, int end_pos, LObject* L, TObject *T, long ecart = LONG_MAX);
617 
618 /***************************************************************
619  *
620  * stuff to be inlined
621  *
622  ***************************************************************/
623 
624 KINLINE TSet initT ();
625 KINLINE TObject** initR();
626 KINLINE unsigned long* initsevT();
627 KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin bin);
628 KINLINE poly k_LmInit_tailRing_2_currRing(poly p, ring tailRing, omBin bin);
629 KINLINE poly k_LmShallowCopyDelete_currRing_2_tailRing(poly p, ring tailRing, omBin bin);
630 KINLINE poly k_LmShallowCopyDelete_tailRing_2_currRing(poly p, ring tailRing, omBin bin);
631 
632 KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing);
633 KINLINE poly k_LmInit_tailRing_2_currRing(poly p, ring tailRing);
634 KINLINE poly k_LmShallowCopyDelete_currRing_2_tailRing(poly p, ring tailRing);
635 KINLINE poly k_LmShallowCopyDelete_tailRing_2_currRing(poly p, ring tailRing);
636 
637 // if exp bound is not violated, return TRUE and
638 // get m1 = LCM(LM(p1), LM(p2))/LM(p1)
639 // m2 = LCM(LM(p1), LM(p2))/LM(p2)
640 // return FALSE and m1 == NULL, m2 == NULL , otherwise
641 KINLINE BOOLEAN k_GetLeadTerms(const poly p1, const poly p2, const ring p_r,
642  poly &m1, poly &m2, const ring m_r);
643 #ifdef HAVE_RINGS
644 KINLINE void k_GetStrongLeadTerms(const poly p1, const poly p2, const ring leadRing,
645  poly &m1, poly &m2, poly &lcm, const ring taiRing);
646 #endif
647 #ifdef KDEBUG
648 // test strat
649 BOOLEAN kTest(kStrategy strat);
650 // test strat, and test that S is contained in T
651 BOOLEAN kTest_TS(kStrategy strat);
652 // test LObject
653 BOOLEAN kTest_L(LObject* L, ring tailRing,
654  BOOLEAN testp = FALSE, int lpos = -1,
655  TSet T = NULL, int tlength = -1);
656 // test TObject
657 BOOLEAN kTest_T(TObject* T, ring tailRing = NULL, int tpos = -1, char TN = '?');
658 // test set strat->SevS
659 BOOLEAN kTest_S(kStrategy strat);
660 #else
661 #define kTest(A) (TRUE)
662 #define kTest_TS(A) (TRUE)
663 #define kTest_T(T) (TRUE)
664 #define kTest_S(T) (TRUE)
665 #define kTest_L(T,R) (TRUE)
666 #endif
667 
668 
669 /***************************************************************
670  *
671  * From kstd2.cc
672  *
673  ***************************************************************/
674 poly kFindZeroPoly(poly input_p, ring leadRing, ring tailRing);
675 ideal bba (ideal F, ideal Q,intvec *w,intvec *hilb,kStrategy strat);
676 ideal sba (ideal F, ideal Q,intvec *w,intvec *hilb,kStrategy strat);
677 poly kNF2 (ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce);
678 ideal kNF2 (ideal F,ideal Q,ideal q, kStrategy strat, int lazyReduce);
679 poly kNF2Bound (ideal F, ideal Q, poly q,int bound, kStrategy strat, int lazyReduce);
680 ideal kNF2Bound (ideal F,ideal Q,ideal q,int bound, kStrategy strat, int lazyReduce);
681 void initBba(kStrategy strat);
682 void initSba(ideal F,kStrategy strat);
683 void f5c (kStrategy strat, int& olddeg, int& minimcnt, int& hilbeledeg,
684  int& hilbcount, int& srmax, int& lrmax, int& reduc, ideal Q,
685  intvec *w,intvec *hilb );
686 
687 /***************************************************************
688  *
689  * From kspoly.cc
690  *
691  ***************************************************************/
692 // Reduces PR with PW
693 // Assumes PR != NULL, PW != NULL, Lm(PW) divides Lm(PR)
694 // Changes: PR
695 // Const: PW
696 // If coef != NULL, then *coef is a/gcd(a,b), where a = LC(PR), b = LC(PW)
697 // If strat != NULL, tailRing is changed if reduction would violate exp bound
698 // of tailRing
699 // Returns: 0 everything ok, no tailRing change
700 // 1 tailRing has successfully changed (strat != NULL)
701 // 2 no reduction performed, tailRing needs to be changed first
702 // (strat == NULL)
703 // -1 tailRing change could not be performed due to exceeding exp
704 // bound of currRing
705 int ksReducePoly(LObject* PR,
706  TObject* PW,
707  poly spNoether = NULL,
708  number *coef = NULL,
709  poly *mon =NULL,
710  kStrategy strat = NULL);
711 
712 /* like ksReducePoly, but if the reducer has only 1 term we still
713  * compute a possible coefficient multiplier for PR. this comes from
714  * a special situation in redRing_Z and it is used only there. */
715 int ksReducePolyZ(LObject* PR,
716  TObject* PW,
717  poly spNoether = NULL,
718  number *coef = NULL,
719  kStrategy strat = NULL);
720 
721 int ksReducePolyLC(LObject* PR,
722  TObject* PW,
723  poly spNoether = NULL,
724  number *coef = NULL,
725  kStrategy strat = NULL);
726 
727 
728 int ksReducePolyGCD(LObject* PR,
729  TObject* PW,
730  poly spNoether = NULL,
731  number *coef = NULL,
732  kStrategy strat = NULL);
733 
734 int ksReducePolyBound(LObject* PR,
735  TObject* PW,
736  int bound,
737  poly spNoether = NULL,
738  number *coef = NULL,
739  kStrategy strat = NULL);
740 
741 // Reduces PR with PW
742 // Assumes PR != NULL, PW != NULL, Lm(PW) divides Lm(PR)
743 // Changes: PR
744 // Const: PW
745 // If coef != NULL, then *coef is a/gcd(a,b), where a = LC(PR), b = LC(PW)
746 // If strat != NULL, tailRing is changed if reduction would violate exp bound
747 // of tailRing
748 // Returns: 0 everything ok, no tailRing change
749 // 1 tailRing has successfully changed (strat != NULL)
750 // 2 no reduction performed, tailRing needs to be changed first
751 // (strat == NULL)
752 // 3 no reduction performed, not sig-safe!!!
753 // -1 tailRing change could not be performed due to exceeding exp
754 // bound of currRing
755 int ksReducePolySig(LObject* PR,
756  TObject* PW,
757  long idx,
758  poly spNoether = NULL,
759  number *coef = NULL,
760  kStrategy strat = NULL);
761 
763  TObject* PW,
764  long idx,
765  poly spNoether = NULL,
766  number *coef = NULL,
767  kStrategy strat = NULL);
768 
769 // Reduces PR at Current->next with PW
770 // Assumes PR != NULL, Current contained in PR
771 // Current->next != NULL, LM(PW) devides LM(Current->next)
772 // Changes: PR
773 // Const: PW
774 // Return: see ksReducePoly
775 int ksReducePolyTail(LObject* PR,
776  TObject* PW,
777  poly Current,
778  poly spNoether = NULL);
779 
780 KINLINE int ksReducePolyTail(LObject* PR, TObject* PW, LObject* Red);
781 
782 // Creates S-Poly of Pair
783 // Const: Pair->p1, Pair->p2
784 // Changes: Pair->p == S-Poly of p1, p2
785 // Assume: Pair->p1 != NULL && Pair->p2
786 void ksCreateSpoly(LObject* Pair, poly spNoether = NULL,
787  int use_buckets=0, ring tailRing=currRing,
788  poly m1 = NULL, poly m2 = NULL, TObject** R = NULL);
789 
790 /*2
791 * creates the leading term of the S-polynomial of p1 and p2
792 * do not destroy p1 and p2
793 * remarks:
794 * 1. the coefficient is 0 (nNew)
795 * 2. pNext is undefined
796 */
797 poly ksCreateShortSpoly(poly p1, poly p2, ring tailRing);
798 
799 
800 // old stuff
801 KINLINE poly ksOldSpolyRed(poly p1, poly p2, poly spNoether = NULL);
802 KINLINE poly ksOldSpolyRedNew(poly p1, poly p2, poly spNoether = NULL);
803 KINLINE poly ksOldCreateSpoly(poly p1, poly p2, poly spNoether = NULL, ring r = currRing);
804 KINLINE void ksOldSpolyTail(poly p1, poly q, poly q2, poly spNoether, ring r = currRing);
805 
806 /***************************************************************
807  *
808  * Routines related for ring changes during std computations
809  *
810  ***************************************************************/
811 // return TRUE and set m1, m2 to k_GetLcmTerms,
812 // if spoly creation of strat->P does not violate
813 // exponent bound of strat->tailRing
814 // FALSE, otherwise
815 BOOLEAN kCheckSpolyCreation(LObject* L, kStrategy strat, poly &m1, poly &m2);
816 #ifdef HAVE_RINGS
817 // return TRUE if gcdpoly creation of R[atR] and S[atS] does not violate
818 // exponent bound of strat->tailRing
819 // FALSE, otherwise
820 BOOLEAN kCheckStrongCreation(int atR, poly m1, int atS, poly m2, kStrategy strat);
821 poly preIntegerCheck(ideal F, ideal Q);
822 void postReduceByMon(LObject* h, kStrategy strat);
823 void postReduceByMonSig(LObject* h, kStrategy strat);
824 void finalReduceByMon(kStrategy strat);
825 #endif
826 // change strat->tailRing and adjust all data in strat, L, and T:
827 // new tailRing has larger exponent bound
828 // do nothing and return FALSE if exponent bound increase would result in
829 // larger exponent bound that that of currRing
831  LObject* L = NULL, TObject* T = NULL,
832  // take this as new_expbound: if 0
833  // new expbound is 2*expbound of tailRing
834  unsigned long new_expbound = 0);
835 // initiate a change of the tailRing of strat -- should be called
836 // right before main loop in bba
838 
839 /// Output some debug info about a given strategy
840 void kDebugPrint(kStrategy strat);
841 
842 // getting sb order for sba computations
843 ring sbaRing(kStrategy strat, const ring r=currRing, BOOLEAN complete=TRUE, int sgn=1);
844 
845 KINLINE void clearS (poly p, unsigned long p_sev, int* at, int* k,
846  kStrategy strat);
847 
848 #include "kernel/GBEngine/kInline.h"
849 
850 /* shiftgb stuff */
851 #include "kernel/GBEngine/shiftgb.h"
852 
853 poly pMove2CurrTail(poly p, kStrategy strat);
854 
855 poly pMoveCurrTail2poly(poly p, kStrategy strat);
856 
857 poly pCopyL2p(LObject h, kStrategy strat);
858 
859 void enterTShift(LObject p, kStrategy strat, int atT = -1);
860 
861 void enterOnePairShift (poly q, poly p, int ecart, int isFromQ, kStrategy strat, int atR, int ecartq, int qisFromQ, int shiftcount, int ifromS);
862 
863 void enterpairsShift (poly h,int k,int ecart,int pos,kStrategy strat, int atR);
864 
865 void superenterpairsShift (poly h,int k,int ecart,int pos,kStrategy strat, int atR);
866 
867 poly redtailBbaShift (LObject* L, int pos, kStrategy strat, BOOLEAN withT, BOOLEAN normalize);
868 
869 int redFirstShift (LObject* h,kStrategy strat); // ok
870 
871 ideal bbaShift(ideal F, ideal Q,intvec *w,intvec *hilb,kStrategy strat);
872 // test syz strategy: // will be removed soon
873 EXTERN_VAR int (*test_PosInT)(const TSet T,const int tl,LObject &h);
874 EXTERN_VAR int (*test_PosInL)(const LSet set, const int length,
875  LObject* L,const kStrategy strat);
876 
877 static inline void kDeleteLcm(LObject *P)
878 {
879  if (P->lcm!=NULL)
880  {
881  #ifdef HAVE_RINGS
883  pLmDelete(P->lcm);
884  else
885  #endif
886  pLmFree(P->lcm);
887  P->lcm=NULL;
888  }
889 }
890 
891 void initenterpairs (poly h,int k,int ecart,int isFromQ,kStrategy strat, int atR = -1);
892 #endif
int sgn(const Rational &a)
Definition: GMPrat.cc:430
long int64
Definition: auxiliary.h:68
int BOOLEAN
Definition: auxiliary.h:87
#define TRUE
Definition: auxiliary.h:100
#define FALSE
Definition: auxiliary.h:96
CanonicalForm pp(const CanonicalForm &)
CanonicalForm pp ( const CanonicalForm & f )
Definition: cf_gcd.cc:676
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:4080
g
Definition: cfModGcd.cc:4092
static CanonicalForm bound(const CFMatrix &M)
Definition: cf_linsys.cc:460
FILE * f
Definition: checklibs.c:9
Definition: intvec.h:23
KINLINE long SetDegStuffReturnLDeg()
Definition: kInline.h:817
KINLINE void Tail_Mult_nn(number n)
Definition: kInline.h:622
int i_r1
Definition: kutil.h:189
KINLINE void Copy()
Definition: kInline.h:770
KINLINE void Delete()
Definition: kInline.h:555
KINLINE void LmDeleteAndIter()
Definition: kInline.h:658
KINLINE TObject * T_2(const skStrategy *strat)
Definition: kInline.h:889
KINLINE void PrepareRed(BOOLEAN use_bucket)
Definition: kInline.h:586
unsigned checked
Definition: kutil.h:190
KINLINE void CanonicalizeP()
Definition: kInline.h:372
KINLINE void SetLmTail(poly lm, poly new_p, int length, int use_bucket, ring r)
Definition: kInline.h:604
KINLINE void T_1_2(const skStrategy *strat, TObject *&T_1, TObject *&T_2)
Definition: kInline.h:900
KINLINE void Normalize()
Definition: kInline.h:358
unsigned long sev
Definition: kutil.h:183
KINLINE void Init(ring tailRing=currRing)
Definition: kInline.h:562
KINLINE long MinComp()
Definition: kInline.h:848
kBucket_pt bucket
Definition: kutil.h:188
poly p2
Definition: kutil.h:184
BOOLEAN prod_crit
Definition: kutil.h:195
KINLINE TObject * T_1(const skStrategy *strat)
Definition: kInline.h:879
KINLINE int GetpLength()
Definition: kInline.h:831
KINLINE int SetLength(BOOLEAN lengt_pLength=FALSE)
Definition: kInline.h:838
poly lcm
Definition: kutil.h:187
KINLINE void Clear()
Definition: kInline.h:549
KINLINE void Tail_Minus_mm_Mult_qq(poly m, poly qq, int lq, poly spNoether)
Definition: kInline.h:636
KINLINE void ShallowCopyDelete(ring new_tailRing, pShallowCopyDeleteProc p_shallow_copy_delete)
Definition: kInline.h:747
KINLINE poly GetTP()
Definition: kInline.h:704
KINLINE long pLDeg()
Definition: kInline.h:786
KINLINE sLObject & operator=(const sTObject &)
Definition: kInline.h:872
KINLINE void SetShortExpVector()
Definition: kInline.h:758
KINLINE void HeadNormalize()
Definition: kInline.h:378
KINLINE poly GetP(omBin lmBin=(omBin) NULL)
Definition: kInline.h:720
KINLINE sLObject(ring tailRing=currRing)
Definition: kInline.h:570
poly p1
Definition: kutil.h:184
KINLINE long Comp()
Definition: kInline.h:863
KINLINE poly LmExtractAndIter()
Definition: kInline.h:678
int i_r2
Definition: kutil.h:189
Definition: kutil.h:65
KINLINE poly GetLm(ring r)
Definition: kInline.h:273
KINLINE poly GetLmCurrRing()
Definition: kInline.h:253
char is_redundant
Definition: kutil.h:89
poly sig
Definition: kutil.h:68
KINLINE void Init(ring r=currRing)
Definition: kInline.h:110
KINLINE void Mult_nn(number n)
Definition: kInline.h:345
int length
Definition: kutil.h:75
KINLINE long SetDegStuffReturnLDeg()
Definition: kInline.h:457
KINLINE poly GetLmTailRing()
Definition: kInline.h:260
KINLINE void pCleardenom()
Definition: kInline.h:469
int ecart
Definition: kutil.h:74
KINLINE long GetpFDeg() const
Definition: kInline.h:448
KINLINE sTObject(ring tailRing=currRing)
Definition: kInline.h:116
KINLINE void ShallowCopyDelete(ring new_tailRing, omBin new_tailBin, pShallowCopyDeleteProc p_shallow_copy_delete, BOOLEAN set_max=TRUE)
Definition: kInline.h:392
char is_special
Definition: kutil.h:98
KINLINE void SetLmCurrRing()
Definition: kInline.h:310
poly max_exp
Definition: kutil.h:71
char is_normalized
Definition: kutil.h:83
KINLINE long pLDeg()
Definition: kInline.h:453
char is_sigsafe
Definition: kutil.h:94
KINLINE void LmDeleteAndIter()
Definition: kInline.h:324
int pLength
Definition: kutil.h:76
KINLINE long pFDeg() const
Definition: kInline.h:433
int i_r
Definition: kutil.h:77
poly p
Definition: kutil.h:69
KINLINE BOOLEAN IsNull() const
Definition: kInline.h:299
KINLINE void Set(ring r=currRing)
Definition: kInline.h:106
KINLINE void Delete()
Definition: kInline.h:210
poly t_p
Definition: kutil.h:70
ring tailRing
Definition: kutil.h:72
KINLINE int GetpLength()
Definition: kInline.h:304
KINLINE void pNorm()
Definition: kInline.h:529
KINLINE void Clear()
Definition: kInline.h:224
long FDeg
Definition: kutil.h:73
KINLINE poly Next()
Definition: kInline.h:316
void wrp()
Definition: kutil.cc:773
int shift
Definition: kutil.h:80
KINLINE void pContent()
Definition: kInline.h:507
KINLINE long pTotalDeg() const
Definition: kInline.h:438
KINLINE long SetpFDeg()
Definition: kInline.h:443
unsigned long sevSig
Definition: kutil.h:67
KINLINE void Copy()
Definition: kInline.h:235
KINLINE poly kNoetherTail()
Definition: kInline.h:66
unsigned long * sevSyz
Definition: kutil.h:320
kStrategy next
Definition: kutil.h:274
intvec * kModW
Definition: kutil.h:334
bool sigdrop
Definition: kutil.h:359
poly t_kNoether
Definition: kutil.h:330
int syzComp
Definition: kutil.h:353
int * S_2_R
Definition: kutil.h:341
ring tailRing
Definition: kutil.h:342
void(* chainCrit)(poly p, int ecart, kStrategy strat)
Definition: kutil.h:288
ideal D
Definition: kutil.h:301
char noTailReduction
Definition: kutil.h:378
int currIdx
Definition: kutil.h:314
~skStrategy()
Definition: kutil.cc:11902
skStrategy()
Definition: kutil.cc:11882
int nrsyzcrit
Definition: kutil.h:360
intset lenS
Definition: kutil.h:316
int nrrewcrit
Definition: kutil.h:361
char posInLOldFlag
Definition: kutil.h:382
pFDegProc pOrigFDeg_TailRing
Definition: kutil.h:295
int Ll
Definition: kutil.h:350
TSet T
Definition: kutil.h:323
BOOLEAN(* rewCrit1)(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
Definition: kutil.h:290
char news
Definition: kutil.h:400
omBin lmBin
Definition: kutil.h:343
int syzmax
Definition: kutil.h:348
int Bl
Definition: kutil.h:351
intset ecartS
Definition: kutil.h:306
int syzidxmax
Definition: kutil.h:348
char honey
Definition: kutil.h:377
char rightGB
Definition: kutil.h:369
polyset S
Definition: kutil.h:303
int minim
Definition: kutil.h:357
poly kNoether
Definition: kutil.h:327
BOOLEAN * NotUsedAxis
Definition: kutil.h:331
LSet B
Definition: kutil.h:325
BOOLEAN * pairtest
Definition: kutil.h:332
int cp
Definition: kutil.h:346
int ak
Definition: kutil.h:352
TObject ** R
Definition: kutil.h:339
BOOLEAN(* rewCrit3)(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
Definition: kutil.h:292
poly kHEdge
Definition: kutil.h:326
int lastAxis
Definition: kutil.h:355
ideal M
Definition: kutil.h:302
poly t_kHEdge
Definition: kutil.h:328
int tl
Definition: kutil.h:349
int(* red2)(LObject *L, kStrategy strat)
Definition: kutil.h:276
unsigned long * sevT
Definition: kutil.h:322
unsigned long * sevSig
Definition: kutil.h:321
int nr
Definition: kutil.h:345
intvec * kHomW
Definition: kutil.h:335
int max_lower_index
Definition: kutil.h:315
poly tail
Definition: kutil.h:333
char sugarCrit
Definition: kutil.h:377
int(* posInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.h:281
KINLINE TObject * s_2_t(int i)
Definition: kInline.h:47
int blockred
Definition: kutil.h:364
intset syzIdx
Definition: kutil.h:310
ideal Shdl
Definition: kutil.h:300
int syzl
Definition: kutil.h:348
unsigned sbaOrder
Definition: kutil.h:313
pFDegProc pOrigFDeg
Definition: kutil.h:293
int blockredmax
Definition: kutil.h:365
int tmax
Definition: kutil.h:349
int(* posInLOld)(const LSet Ls, const int Ll, LObject *Lo, const kStrategy strat)
Definition: kutil.h:285
polyset sig
Definition: kutil.h:305
polyset syz
Definition: kutil.h:304
char LDegLast
Definition: kutil.h:385
void(* initEcartPair)(LObject *h, poly f, poly g, int ecartF, int ecartG)
Definition: kutil.h:284
BOOLEAN(* syzCrit)(poly sig, unsigned long not_sevSig, kStrategy strat)
Definition: kutil.h:289
wlen_set lenSw
Definition: kutil.h:317
int cv
Definition: kutil.h:368
char noetherSet
Definition: kutil.h:380
pShallowCopyDeleteProc p_shallow_copy_delete
Definition: kutil.h:337
char Gebauer
Definition: kutil.h:378
intset fromQ
Definition: kutil.h:318
void(* enterS)(LObject &h, int pos, kStrategy strat, int atR)
Definition: kutil.h:283
char newt
Definition: kutil.h:401
char use_buckets
Definition: kutil.h:383
int mu
Definition: kutil.h:347
char interpt
Definition: kutil.h:371
char redTailChange
Definition: kutil.h:399
int newIdeal
Definition: kutil.h:356
char fromT
Definition: kutil.h:379
char completeReduce_retry
Definition: kutil.h:403
void(* initEcart)(TObject *L)
Definition: kutil.h:277
omBin tailBin
Definition: kutil.h:344
LObject P
Definition: kutil.h:299
KINLINE TObject * S_2_T(int i)
Definition: kInline.h:38
char noClearS
Definition: kutil.h:402
int Lmax
Definition: kutil.h:350
char z2homog
Definition: kutil.h:374
int LazyPass
Definition: kutil.h:352
char no_prod_crit
Definition: kutil.h:394
char overflow
Definition: kutil.h:404
void(* enterOnePair)(int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR)
Definition: kutil.h:287
LSet L
Definition: kutil.h:324
char length_pLength
Definition: kutil.h:387
int(* posInT)(const TSet T, const int tl, LObject &h)
Definition: kutil.h:278
int(* red)(LObject *L, kStrategy strat)
Definition: kutil.h:275
BOOLEAN(* rewCrit2)(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
Definition: kutil.h:291
int sl
Definition: kutil.h:347
int sbaEnterS
Definition: kutil.h:362
int LazyDegree
Definition: kutil.h:352
char kHEdgeFound
Definition: kutil.h:376
char posInLDependsOnLength
Definition: kutil.h:389
unsigned long * sevS
Definition: kutil.h:319
int HCord
Definition: kutil.h:354
char homog
Definition: kutil.h:372
pLDegProc pOrigLDeg
Definition: kutil.h:294
intset fromS
Definition: kutil.h:307
char update
Definition: kutil.h:381
s_poly_proc_t s_poly
Definition: kutil.h:297
int(* posInLSba)(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.h:279
pLDegProc pOrigLDeg_TailRing
Definition: kutil.h:296
int Bmax
Definition: kutil.h:351
int c3
Definition: kutil.h:346
const CanonicalForm & w
Definition: facAbsFact.cc:51
CFArray copy(const CFList &list)
write elements of list into an array
int j
Definition: facHensel.cc:110
#define EXTERN_VAR
Definition: globaldefs.h:6
static BOOLEAN length(leftv result, leftv arg)
Definition: interval.cc:257
STATIC_VAR jList * T
Definition: janet.cc:30
STATIC_VAR Poly * h
Definition: janet.cc:971
STATIC_VAR jList * Q
Definition: janet.cc:30
BOOLEAN(* s_poly_proc_t)(kStrategy strat)
Definition: kstd1.h:14
int posInLF5C(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.cc:6385
int posInLRing(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.cc:6284
KINLINE void ksOldSpolyTail(poly p1, poly q, poly q2, poly spNoether, ring r=currRing)
Definition: kInline.h:1172
void initSbaPos(kStrategy strat)
Definition: kutil.cc:10432
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
Definition: kutil.cc:8033
BOOLEAN findMinLMPair(poly sig, unsigned long not_sevSig, kStrategy strat, int start)
int ksReducePolyGCD(LObject *PR, TObject *PW, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL)
Definition: kspoly.cc:316
int ksReducePolyLC(LObject *PR, TObject *PW, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL)
Definition: kspoly.cc:452
void initenterpairs(poly h, int k, int ecart, int isFromQ, kStrategy strat, int atR=-1)
Definition: kutil.cc:3840
int posInSyz(const kStrategy strat, const poly sig)
Definition: kutil.cc:6357
int redLiftstd(LObject *h, kStrategy strat)
Definition: kLiftstd.cc:161
int ksReducePolyBound(LObject *PR, TObject *PW, int bound, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL)
Definition: kspoly.cc:563
int kFindDivisibleByInT(const kStrategy strat, const LObject *L, const int start=0)
return -1 if no divisor is found number of first divisor in T, otherwise
Definition: kstd2.cc:288
int redRing_Z(LObject *h, kStrategy strat)
Definition: kstd2.cc:640
int posInT17(const TSet set, const int length, LObject &p)
Definition: kutil.cc:5805
int posInL13(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.cc:6783
void initBuchMora(ideal F, ideal Q, kStrategy strat)
Definition: kutil.cc:10322
void initEcartPairBba(LObject *Lp, poly f, poly g, int ecartF, int ecartG)
Definition: kutil.cc:1340
poly pMove2CurrTail(poly p, kStrategy strat)
Definition: kutil.cc:12218
denominator_list_s * denominator_list
Definition: kutil.h:59
wlen_type * wlen_set
Definition: kutil.h:51
poly kFindZeroPoly(poly input_p, ring leadRing, ring tailRing)
Definition: kstd2.cc:526
int redFirstShift(LObject *h, kStrategy strat)
Definition: kstd2.cc:4719
BOOLEAN arriRewCriterionPre(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
Definition: kutil.cc:7287
void enterSyz(LObject &p, kStrategy strat, int atT)
Definition: kutil.cc:9901
int posInL15(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.cc:6818
int redNF0(LObject *P, kStrategy strat)
int posInT11(const TSet set, const int length, LObject &p)
Definition: kutil.cc:5400
int posInLSigRing(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.cc:6221
int ksReducePolySigRing(LObject *PR, TObject *PW, long idx, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL)
Definition: kspoly.cc:910
int posInTSig(const TSet set, const int length, LObject &p)
int posInT1(const TSet set, const int length, LObject &p)
Definition: kutil.cc:5342
EXTERN_VAR int(* test_PosInT)(const TSet T, const int tl, LObject &h)
Definition: kutil.h:873
int ksReducePolySig(LObject *PR, TObject *PW, long idx, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL)
Definition: kspoly.cc:707
void enterT_strong(LObject &p, kStrategy strat, int atT=-1)
Definition: kutil.cc:9799
BOOLEAN kTest(kStrategy strat)
Definition: kutil.cc:1010
void chainCritSig(poly p, int ecart, kStrategy strat)
Definition: kutil.cc:3492
int posInT_EcartpLength(const TSet set, const int length, LObject &p)
Definition: kutil.cc:5671
poly pMoveCurrTail2poly(poly p, kStrategy strat)
Definition: kutil.cc:12232
BOOLEAN kTest_TS(kStrategy strat)
Definition: kutil.cc:1071
KINLINE unsigned long * initsevT()
Definition: kInline.h:100
int kFindDivisibleByInS(const kStrategy strat, int *max_ind, LObject *L)
return -1 if no divisor is found number of first divisor in S, otherwise
Definition: kstd2.cc:398
int kFindInT(poly p, TSet T, int tlength)
returns index of p in TSet, or -1 if not found
Definition: kutil.cc:718
BOOLEAN kCheckStrongCreation(int atR, poly m1, int atS, poly m2, kStrategy strat)
Definition: kutil.cc:11084
int kTestDivisibleByT0_Z(const kStrategy strat, const LObject *L)
tests if T[0] divides the leading monomial of L, returns -1 if not
Definition: kstd2.cc:140
TObject * TSet
Definition: kutil.h:55
void enterL(LSet *set, int *length, int *LSetmax, LObject p, int at)
Definition: kutil.cc:1301
int posInL17(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.cc:6894
long ind_fact_2(long arg)
Definition: kutil.cc:4194
#define setmaxL
Definition: kutil.h:30
void enterT(LObject &p, kStrategy strat, int atT=-1)
Definition: kutil.cc:9699
int kFindSameLMInT_Z(const kStrategy strat, const LObject *L, const int start=0)
Definition: kstd2.cc:84
void enterTShift(LObject p, kStrategy strat, int atT=-1)
Definition: kutil.cc:13666
int posInT2(const TSet set, const int length, LObject &p)
Definition: kutil.cc:5370
int posInL15Ring(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.cc:6853
void superenterpairsSig(poly h, poly hSig, int hFrom, int k, int ecart, int pos, kStrategy strat, int atR=-1)
Definition: kutil.cc:4915
int posInT_pLength(const TSet set, const int length, LObject &p)
Definition: kutil.cc:12046
void completeReduce(kStrategy strat, BOOLEAN withT=FALSE)
Definition: kutil.cc:10859
void enterOnePairNormal(int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR)
Definition: kutil.cc:1975
int posInT13(const TSet set, const int length, LObject &p)
Definition: kutil.cc:5642
void redtailBbaAlsoLC_Z(LObject *L, int end_pos, kStrategy strat)
Definition: kutil.cc:7786
poly kNF2(ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce)
Definition: kstd2.cc:3712
BOOLEAN syzCriterionInc(poly sig, unsigned long not_sevSig, kStrategy strat)
Definition: kutil.cc:7154
void deleteHC(poly *p, int *e, int *l, kStrategy strat)
Definition: kutil.cc:329
poly pCopyL2p(LObject h, kStrategy strat)
Definition: kutil.cc:12249
int posInSMonFirst(const kStrategy strat, const int length, const poly p)
Definition: kutil.cc:5210
KINLINE BOOLEAN arriRewDummy(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
Definition: kInline.h:1225
ideal sba(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
Definition: kstd2.cc:2745
EXTERN_VAR denominator_list DENOMINATOR_LIST
Definition: kutil.h:62
void initBuchMoraPos(kStrategy strat)
Definition: kutil.cc:10149
void initS(ideal F, ideal Q, kStrategy strat)
Definition: kutil.cc:8156
int posInIdealMonFirst(const ideal F, const poly p, int start=0, int end=-1)
Definition: kutil.cc:5287
KINLINE poly redtailBbaBound(poly p, int end_pos, kStrategy strat, int bound, BOOLEAN normalize=FALSE)
Definition: kInline.h:1186
int redHoney(LObject *h, kStrategy strat)
Definition: kstd2.cc:1842
EXTERN_VAR int strat_nr
Definition: kutil.h:177
poly preIntegerCheck(ideal F, ideal Q)
used for GB over ZZ: look for constant and monomial elements in the ideal background: any known const...
Definition: kutil.cc:11107
KINLINE poly k_LmShallowCopyDelete_currRing_2_tailRing(poly p, ring tailRing, omBin bin)
Definition: kInline.h:945
BOOLEAN kStratChangeTailRing(kStrategy strat, LObject *L=NULL, TObject *T=NULL, unsigned long new_expbound=0)
Definition: kutil.cc:11532
int64 wlen_type
Definition: kutil.h:50
int posInLSig(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.cc:6197
KINLINE poly k_LmInit_tailRing_2_currRing(poly p, ring tailRing, omBin bin)
Definition: kInline.h:936
int posInL11(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.cc:6397
TObject * kFindDivisibleByInS_T(kStrategy strat, int end_pos, LObject *L, TObject *T, long ecart=LONG_MAX)
Definition: kutil.cc:7338
void chainCritOpt_1(poly, int, kStrategy strat)
Definition: kutil.cc:3476
int kFindNextDivisibleByInS(const kStrategy strat, int start, int max_ind, LObject *L)
Definition: kstd2.cc:467
static LSet initL(int nr=setmaxL)
Definition: kutil.h:421
KINLINE TSet initT()
Definition: kInline.h:84
void cancelunit(LObject *p, BOOLEAN inNF=FALSE)
Definition: kutil.cc:343
EXTERN_VAR int(* test_PosInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.h:874
int posInL11Ringls(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.cc:6509
KINLINE poly k_LmShallowCopyDelete_tailRing_2_currRing(poly p, ring tailRing, omBin bin)
Definition: kInline.h:952
int kFindDivisibleByInT_Z(const kStrategy strat, const LObject *L, const int start=0)
Definition: kstd2.cc:207
poly kCreateZeroPoly(long exp[], long cabsind, poly *t_p, ring leadRing, ring tailRing)
Definition: kutil.cc:4398
LObject * LSet
Definition: kutil.h:56
int redHomog(LObject *h, kStrategy strat)
Definition: kstd2.cc:902
int posInT17_c(const TSet set, const int length, LObject &p)
Definition: kutil.cc:5912
poly redtailBbaShift(LObject *L, int pos, kStrategy strat, BOOLEAN withT, BOOLEAN normalize)
Definition: kutil.cc:13689
denominator_list next
Definition: kutil.h:61
int posInT_EcartFDegpLength(const TSet set, const int length, LObject &p)
Definition: kutil.cc:11955
int posInT15(const TSet set, const int length, LObject &p)
Definition: kutil.cc:5710
void kFreeStrat(kStrategy strat)
void pairs()
void postReduceByMon(LObject *h, kStrategy strat)
used for GB over ZZ: intermediate reduction by monomial elements background: any known constant eleme...
Definition: kutil.cc:11274
long ind2(long arg)
Definition: kutil.cc:4182
BOOLEAN syzCriterion(poly sig, unsigned long not_sevSig, kStrategy strat)
Definition: kutil.cc:7119
EXTERN_VAR int HCord
Definition: kutil.h:266
void HEckeTest(poly pp, kStrategy strat)
Definition: kutil.cc:475
ideal bba(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
Definition: kstd2.cc:2383
int redLazy(LObject *h, kStrategy strat)
Definition: kstd2.cc:1648
ideal createG0()
Definition: kutil.cc:4527
void enterExtendedSpolySig(poly h, poly hSig, kStrategy strat)
Definition: kutil.cc:4758
void enterpairsSig(poly h, poly hSig, int from, int k, int ec, int pos, kStrategy strat, int atR=-1)
Definition: kutil.cc:4959
void enterpairsShift(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
Definition: kutil.cc:13636
KINLINE poly k_LmInit_currRing_2_tailRing(poly p, ring tailRing, omBin bin)
Definition: kInline.h:927
void initBba(kStrategy strat)
Definition: kstd1.cc:1659
void enterOnePairShift(poly q, poly p, int ecart, int isFromQ, kStrategy strat, int atR, int ecartq, int qisFromQ, int shiftcount, int ifromS)
Definition: kutil.cc:12862
void exitBuchMora(kStrategy strat)
Definition: kutil.cc:10406
void messageStatSBA(int hilbcount, kStrategy strat)
Definition: kutil.cc:8087
int redRiloc(LObject *h, kStrategy strat)
Definition: kstd1.cc:383
void initEcartNormal(TObject *h)
Definition: kutil.cc:1325
static void kDeleteLcm(LObject *P)
Definition: kutil.h:877
int posInS(const kStrategy strat, const int length, const poly p, const int ecart_p)
Definition: kutil.cc:5109
void updateS(BOOLEAN toT, kStrategy strat)
Definition: kutil.cc:9115
int posInL0(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.cc:6139
int redSigRing(LObject *h, kStrategy strat)
Definition: kstd2.cc:1278
int * intset
Definition: kutil.h:49
void initSLSba(ideal F, ideal Q, kStrategy strat)
Definition: kutil.cc:8347
void enterSBbaShift(LObject &p, int atS, kStrategy strat, int atR=-1)
Definition: kutil.cc:9450
void initSba(ideal F, kStrategy strat)
Definition: kstd1.cc:1717
int ksReducePolyTail(LObject *PR, TObject *PW, poly Current, poly spNoether=NULL)
Definition: kspoly.cc:1315
BOOLEAN kTest_L(LObject *L, ring tailRing, BOOLEAN testp=FALSE, int lpos=-1, TSet T=NULL, int tlength=-1)
Definition: kutil.cc:925
void initSyzRules(kStrategy strat)
Definition: kutil.cc:8497
void initSbaBuchMora(ideal F, ideal Q, kStrategy strat)
Definition: kutil.cc:10534
BOOLEAN kCheckSpolyCreation(LObject *L, kStrategy strat, poly &m1, poly &m2)
Definition: kutil.cc:11045
void cleanT(kStrategy strat)
Definition: kutil.cc:545
KINLINE void k_GetStrongLeadTerms(const poly p1, const poly p2, const ring leadRing, poly &m1, poly &m2, poly &lcm, const ring taiRing)
Definition: kInline.h:1029
int posInT110(const TSet set, const int length, LObject &p)
Definition: kutil.cc:5553
BOOLEAN kTest_S(kStrategy strat)
Definition: kutil.cc:1053
void replaceInLAndSAndT(LObject &p, int tj, kStrategy strat)
Definition: kutil.cc:9608
poly redNF(poly h, int &max_ind, int nonorm, kStrategy strat)
Definition: kstd2.cc:2071
void reorderS(int *suc, kStrategy strat)
Definition: kutil.cc:5056
KINLINE poly ksOldSpolyRed(poly p1, poly p2, poly spNoether=NULL)
Definition: kInline.h:1142
void enterExtendedSpoly(poly h, kStrategy strat)
Definition: kutil.cc:4675
void enterpairs(poly h, int k, int ec, int pos, kStrategy strat, int atR=-1)
Definition: kutil.cc:4933
void superenterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR=-1)
Definition: kutil.cc:4902
int redSig(LObject *h, kStrategy strat)
Definition: kstd2.cc:1111
KINLINE poly redtailBba_Z(poly p, int end_pos, kStrategy strat)
Definition: kInline.h:1193
KINLINE poly ksOldSpolyRedNew(poly p1, poly p2, poly spNoether=NULL)
Definition: kInline.h:1152
int posInL10(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kstd1.cc:1331
KINLINE poly redtailBba(poly p, int end_pos, kStrategy strat, BOOLEAN normalize=FALSE)
Definition: kInline.h:1180
void updateResult(ideal r, ideal Q, kStrategy strat)
Definition: kutil.cc:10647
long twoPow(long arg)
Definition: kutil.cc:4209
int posInT0(const TSet set, const int length, LObject &p)
Definition: kutil.cc:5331
#define KINLINE
Definition: kutil.h:45
int posInT19(const TSet set, const int length, LObject &p)
Definition: kutil.cc:6039
void exitSba(kStrategy strat)
Definition: kutil.cc:10607
ring sbaRing(kStrategy strat, const ring r=currRing, BOOLEAN complete=TRUE, int sgn=1)
Definition: kutil.cc:11660
void enterSSba(LObject &p, int atS, kStrategy strat, int atR=-1)
Definition: kutil.cc:9473
void kDebugPrint(kStrategy strat)
Output some debug info about a given strategy.
Definition: kutil.cc:12080
void f5c(kStrategy strat, int &olddeg, int &minimcnt, int &hilbeledeg, int &hilbcount, int &srmax, int &lrmax, int &reduc, ideal Q, intvec *w, intvec *hilb)
Definition: kstd2.cc:4027
void deleteInL(LSet set, int *length, int j, kStrategy strat)
Definition: kutil.cc:1244
void initHilbCrit(ideal F, ideal Q, intvec **hilb, kStrategy strat)
Definition: kutil.cc:9979
KINLINE poly ksOldCreateSpoly(poly p1, poly p2, poly spNoether=NULL, ring r=currRing)
Definition: kInline.h:1162
void kStratInitChangeTailRing(kStrategy strat)
Definition: kutil.cc:11632
BOOLEAN arriRewCriterion(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
Definition: kutil.cc:7262
void initBuchMoraCrit(kStrategy strat)
Definition: kutil.cc:9997
void deleteInSSba(int i, kStrategy strat)
Definition: kutil.cc:1189
void initBuchMoraPosRing(kStrategy strat)
Definition: kutil.cc:10235
poly kNF2Bound(ideal F, ideal Q, poly q, int bound, kStrategy strat, int lazyReduce)
Definition: kstd2.cc:3790
int kFindInTShift(poly p, TSet T, int tlength)
Definition: kutil.cc:743
int ksReducePoly(LObject *PR, TObject *PW, poly spNoether=NULL, number *coef=NULL, poly *mon=NULL, kStrategy strat=NULL)
Definition: kspoly.cc:185
void postReduceByMonSig(LObject *h, kStrategy strat)
Definition: kutil.cc:11350
void ksCreateSpoly(LObject *Pair, poly spNoether=NULL, int use_buckets=0, ring tailRing=currRing, poly m1=NULL, poly m2=NULL, TObject **R=NULL)
Definition: kspoly.cc:1167
int posInL11Ring(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.cc:6439
void enterSBba(LObject &p, int atS, kStrategy strat, int atR=-1)
Definition: kutil.cc:9350
void messageSets(kStrategy strat)
Definition: kutil.cc:8106
int redRing(LObject *h, kStrategy strat)
Definition: kstd2.cc:795
void deleteInS(int i, kStrategy strat)
Definition: kutil.cc:1137
int posInT_FDegpLength(const TSet set, const int length, LObject &p)
Definition: kutil.cc:12009
BOOLEAN kTest_T(TObject *T, ring tailRing=NULL, int tpos=-1, char TN='?')
Definition: kutil.cc:801
BOOLEAN sbaCheckGcdPair(LObject *h, kStrategy strat)
Definition: kutil.cc:1722
int posInL110(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.cc:6695
poly redtail(poly p, int end_pos, kStrategy strat)
Definition: kutil.cc:7550
int posInL10Ring(const LSet set, const int length, LObject *L, const kStrategy strat)
void initEcartPairMora(LObject *Lp, poly f, poly g, int ecartF, int ecartG)
Definition: kutil.cc:1347
void superenterpairsShift(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
void entersets(LObject h)
void chainCritNormal(poly p, int ecart, kStrategy strat)
Definition: kutil.cc:3240
void initEcartBBA(TObject *h)
Definition: kutil.cc:1333
class sTObject TObject
Definition: kutil.h:53
KINLINE void clearS(poly p, unsigned long p_sev, int *at, int *k, kStrategy strat)
Definition: kInline.h:1200
ideal bbaShift(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
Definition: kstd2.cc:4340
int posInLF5CRing(const LSet set, int start, const int length, LObject *L, const kStrategy strat)
Definition: kutil.cc:6473
int ksReducePolyZ(LObject *PR, TObject *PW, poly spNoether=NULL, number *coef=NULL, kStrategy strat=NULL)
Definition: kspoly.cc:44
KINLINE TObject ** initR()
Definition: kInline.h:95
poly redNFTail(poly h, const int sl, kStrategy strat)
poly ksCreateShortSpoly(poly p1, poly p2, ring tailRing)
Definition: kspoly.cc:1415
void messageStat(int hilbcount, kStrategy strat)
Definition: kutil.cc:8074
void initSL(ideal F, ideal Q, kStrategy strat)
Definition: kutil.cc:8250
KINLINE BOOLEAN k_GetLeadTerms(const poly p1, const poly p2, const ring p_r, poly &m1, poly &m2, const ring m_r)
Definition: kInline.h:986
void finalReduceByMon(kStrategy strat)
used for GB over ZZ: final reduction by constant elements background: any known constant element of i...
Definition: kutil.cc:11439
void initSbaCrit(kStrategy strat)
Definition: kutil.cc:10062
BOOLEAN newHEdge(kStrategy strat)
Definition: kutil.cc:10981
BOOLEAN homogTest(polyset F, int Fmax)
class sLObject LObject
Definition: kutil.h:54
poly redtailSba(LObject *L, int end_pos, kStrategy strat, BOOLEAN withT=FALSE, BOOLEAN normalize=FALSE)
Definition: kstd2.cc:1527
BOOLEAN faugereRewCriterion(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
Definition: kutil.cc:7203
int lcm(unsigned long *l, unsigned long *a, unsigned long *b, unsigned long p, int dega, int degb)
Definition: minpoly.cc:709
gmp_float exp(const gmp_float &a)
Definition: mpr_complex.cc:357
Definition: lq.h:40
#define omAlloc(size)
Definition: omAllocDecl.h:210
#define NULL
Definition: omList.c:12
omBin_t * omBin
Definition: omStructs.h:12
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13
Compatiblity layer for legacy polynomial operations (over currRing)
#define pLmDelete(p)
assume p != NULL, deletes Lm(p)->coef and Lm(p)
Definition: polys.h:76
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced
Definition: polys.h:70
poly * polyset
Definition: polys.h:259
static BOOLEAN rField_is_Ring(const ring r)
Definition: ring.h:489
long(* pFDegProc)(poly p, ring r)
Definition: ring.h:38
long(* pLDegProc)(poly p, int *length, ring r)
Definition: ring.h:37
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:44
#define R
Definition: sirandom.c:27
static poly normalize(poly next_p, ideal add_generators, syStrategy syzstr, int *g_l, int *p_l, int crit_comp)
Definition: syz3.cc:1026