My Project
syzextra.h
Go to the documentation of this file.
1// -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2/*****************************************************************************\
3 * Computer Algebra System SINGULAR
4\*****************************************************************************/
5/** @file syzextra.h
6 *
7 * Computation of Syzygies
8 *
9 * ABSTRACT: Computation of Syzygies due to Schreyer
10 *
11 * @author Oleksandr Motsak
12 *
13 **/
14/*****************************************************************************/
15
16#ifndef SYZEXTRA_H
17#define SYZEXTRA_H
18
19#include <vector>
20#include <map>
21#include <string.h>
22#include <stack>
23
24// include basic definitions
25#include "singularxx_defs.h"
26#include "kernel/ideals.h"
27
28class idrec; typedef idrec * idhdl;
29
30class kBucket; typedef kBucket* kBucket_pt;
31
32#ifndef NOPRODUCT
33# define NOPRODUCT 1
34#endif
35
36// set to 1 if all leading coeffs are assumed to be all =1...
37// note the use of simplify on input in SSinit!
38#ifndef NODIVISION
39# define NODIVISION 1
40#endif
41
42poly leadmonom(const poly p, const ring r, const bool bSetZeroComp = true);
43
44/// return the tail of a given polynomial or vector
45/// returns NULL if input is NULL, otherwise
46/// the result is a new polynomial/vector in the ring r
47poly p_Tail(const poly p, const ring r);
48
49
50/// return the tail of a given ideal or module
51/// returns NULL if input is NULL, otherwise
52/// the result is a new ideal/module in the ring r
53/// NOTE: the resulting rank is autocorrected
54ideal id_Tail(const ideal id, const ring r);
55
56/// inplace sorting of the module (ideal) id wrt <_(c,ds)
57void Sort_c_ds(const ideal id, const ring r);
58
59
60class sBucket; typedef sBucket* sBucket_pt;
61
62/** @class SBucketFactory syzextra.h
63 *
64 * sBucket Factory
65 *
66 * Cleate/store/reuse buckets
67 *
68 */
69class SBucketFactory: private std::stack <sBucket_pt>
70{
71 private:
72 typedef std::stack <sBucket_pt> Base;
73
74 public:
75 typedef Base::value_type Bucket;
76
77 SBucketFactory(const ring r)
78 {
79 push ( _CreateBucket(r) ); // start with at least one sBucket...?
80 assume( top() != NULL );
81 };
82
84 {
85 while( !empty() )
86 {
87 _DestroyBucket( top() );
88 pop();
89 }
90 }
91
92 Bucket getBucket(const ring r, const bool remove = true)
93 {
94 Bucket bt = NULL;
95
96 if( !empty() )
97 {
98 bt = top();
99
100 if( remove )
101 pop();
102 }
103 else
104 {
105 bt = _CreateBucket(r);
106
107 if( !remove )
108 {
109 push(bt);
110 assume( bt == top() );
111 }
112 }
113
114 assume( bt != NULL );
115
116 return bt;
117 }
118
119 // TODO: this may be spared if we give-out a smart Bucket (which returns here upon its destructor!)
120 void putBucket(const Bucket & bt, const bool replace = false)
121 {
122 assume( bt != NULL );
123
124 if( empty() )
125 push( bt );
126 else
127 {
128 if( replace )
129 top() = bt;
130 else
131 {
132 if( bt != top() )
133 push( bt );
134 }
135 }
136
137 assume( bt == top() );
138 }
139
140 private:
141 /// inital allocation for new buckets
142 static Bucket _CreateBucket(const ring r);
143
144 /// we only expect empty buckets to be left at the end for destructor
145 /// bt will be set to NULL
146 static void _DestroyBucket(Bucket & bt);
147
148 private:
152
153};
154
155/// Computation attribute storage
157{
159
168 {}
169
170 /// output all the intermediate states
171 const int OPT__DEBUG; // DebugOutput;
172
173 /// ?
174 const int OPT__LEAD2SYZ; // TwoLeadingSyzygyTerms;
175
176 /// Reduce syzygy tails wrt the leading syzygy terms
177 const int OPT__TAILREDSYZ; // TailReducedSyzygies;
178
179 /// Use the usual NF's S-poly reduction while dropping lower order terms
180 /// 2 means - smart selection!
181 const int OPT__HYBRIDNF; // UseHybridNF
182
183
184 /// ignore tails and compute the pure Schreyer frame
185 const int OPT__IGNORETAILS; // @IGNORETAILS
186
187 /// Syzygy level (within a resolution)
188 mutable int OPT__SYZNUMBER;
189
190 inline void nextSyzygyLayer() const
191 {
193 }
194
195 /// output lifting tree
197
198 /// CheckSyzygyProperty: TODO
199 const int OPT__SYZCHECK;
200
201 /// TEST_OPT_PROT
202 const bool OPT__PROT;
203
204 /// no caching/stores/lookups
205 const int OPT__NOCACHING;
206
207 /// global base ring
208 const ring m_rBaseRing;
209};
210
212
213class CLCM: public SchreyerSyzygyComputationFlags, public std::vector<bool>
214{
215 public:
217
218 bool Check(const poly m) const;
219
220 private:
222
223 const unsigned int m_N; ///< number of ring variables
224};
225
226
228{
229 public:
230 CLeadingTerm(unsigned int label, const poly lt, const ring);
231
232#if NOPRODUCT
233 bool DivisibilityCheck(const poly multiplier, const poly t, const unsigned long not_sev, const ring r) const;
234#endif
235 bool DivisibilityCheck(const poly product, const unsigned long not_sev, const ring r) const;
236
237 bool CheckLT( const ideal & L ) const;
238
239 inline poly lt() const { return m_lt; };
240 inline unsigned long sev() const { return m_sev; };
241 inline unsigned int label() const { return m_label; };
242 private:
243 const unsigned long m_sev; ///< not short exp. vector
244
245 // NOTE/TODO: either of the following should be enough:
246 const unsigned int m_label; ///< index in the main L[] + 1
247
248 const poly m_lt; ///< the leading term itself L[label-1]
249
250 // disable the following:
254};
255
256
257// TODO: needs a specialized variant without a component (hash!)
259{
260#if NOPRODUCT
262#endif
263 friend class CDivisorEnumerator;
264
265 public:
266 typedef long TComponentKey;
267 typedef std::vector<const CLeadingTerm*> TReducers;
268
269 private:
270 typedef std::map< TComponentKey, TReducers> CReducersHash;
271
272 public:
273 /// goes over all leading terms
275
276 void Initialize(const ideal L);
277
279
280
281#if NOPRODUCT
282 poly
283 FindReducer(const poly multiplier, const poly monom, const poly syzterm, const CReducerFinder& checker) const;
284
285#endif
286 // TODO: save shortcut (syz: |-.->) LM(LM(m) * "t") -> syz?
287 poly // const_iterator // TODO: return const_iterator it, s.th: it->m_lt is the needed
288 FindReducer(const poly product, const poly syzterm, const CReducerFinder& checker) const;
289
290 bool IsDivisible(const poly q) const;
291
292
293 inline bool IsNonempty() const { return !m_hash.empty(); }
294
295 /// is the term to be "preprocessed" as lower order term or lead to only reducible syzygies...
296 int PreProcessTerm(const poly t, CReducerFinder& syzChecker) const;
297
298 private:
299 ideal m_L; ///< only for debug
300
301 CReducersHash m_hash; // can also be replaced with a vector indexed by components
302
303 private:
306};
307
308bool my_p_LmCmp (poly, poly, const ring);
309
310typedef poly TCacheKey;
311typedef poly TCacheValue;
312
314{
315 const ring & m_ring;
316
318
319 CCacheCompare(const ring& r): m_ring(r) { assume(r != NULL); }
320
322 CCacheCompare& operator=(const CCacheCompare& lhs) { assume(lhs.m_ring != NULL); return (const_cast<CCacheCompare&>(lhs)); }
323
324 inline bool operator() (const TCacheKey& l, const TCacheKey& r) const { assume(m_ring != NULL); return my_p_LmCmp(l, r, m_ring); }
325};
326
327typedef std::map<TCacheKey, TCacheValue, CCacheCompare> TP2PCache; // deallocation??? !!!
328typedef std::map<int, TP2PCache> TCache;
329
330
331/** @class SchreyerSyzygyComputation syzextra.h
332 *
333 * Computing syzygies after Schreyer
334 *
335 * Storing/accumulating data during the computation requires some global
336 * object, like this class. Ideally the above global functions should not
337 * be used in favour of this class.
338 *
339 * @sa Schreyer Syzygy Computation Paper & Talk & Python prototype
340 */
342{
343 friend class CLCM;
344 friend class CReducerFinder;
345
346 public:
347 /// Construct a global object for given input data (separated into leads & tails)
348 SchreyerSyzygyComputation(const ideal idLeads, const ideal idTails, const SchreyerSyzygyComputationFlags setting):
350 m_idLeads(idLeads), m_idTails(id_Copy(idTails, setting.m_rBaseRing)),
352 m_LS(NULL), m_lcm(m_idLeads, setting),
353 m_div(m_idLeads, setting), m_checker(NULL, setting), m_cache(),
356 {
357 if( UNLIKELY(OPT__PROT) ) memset( &m_stat, 0, sizeof(m_stat) );
358 }
359
360 /// Construct a global object for given input data (separated into leads & tails)
361 SchreyerSyzygyComputation(const ideal idLeads, const ideal idTails, const ideal syzLeads, const SchreyerSyzygyComputationFlags setting):
363 m_idLeads(idLeads), m_idTails(id_Copy(idTails, setting.m_rBaseRing)),
364 m_syzLeads(syzLeads), m_syzTails(NULL),
365 m_LS(syzLeads), m_lcm(m_idLeads, setting),
366 m_div(m_idLeads, setting), m_checker(NULL, setting), m_cache(),
369 {
370 if( UNLIKELY(OPT__PROT) ) memset( &m_stat, 0, sizeof(m_stat) );
371
373 {
374 if (syzLeads != NULL)
375 m_checker.Initialize(syzLeads);
376// if( idTails != NULL )
377// SetUpTailTerms();
378 }
379 }
380
381 /// Destructor should not destruct the resulting m_syzLeads, m_syzTails.
383
384 /// Convert the given ideal of tails into the internal representation (with reducers!)
385 /// Preprocess m_idTails as well...?
387
388 /// print statistics about the used heuristics
389 void PrintStats() const;
390
391 /// Read off the results while detaching them from this object
392 /// NOTE: no copy!
393 inline void ReadOffResult(ideal& syzL, ideal& syzT)
394 {
395 syzL = m_syzLeads; syzT = m_syzTails;
396
397 m_syzLeads = m_syzTails = NULL; // m_LS ?
398
399 if ( UNLIKELY(OPT__PROT) )
400 PrintStats();
401 }
402
403
404 /// The main driver function: computes
406
407 /// Computes Syz(leads) or only LEAD of it.
408 /// The result is stored into m_syzLeads
409 void ComputeLeadingSyzygyTerms(bool bComputeSecondTerms = true);
410
411
412
413 /// Main HybridNF == 1: poly reduce + LOT + LCM?
414 poly SchreyerSyzygyNF(const poly syz_lead, poly syz_2 = NULL) const;
415
416
417 // Main (HybridNF == 0) Tree Travers + LOT + LCM?
418 poly TraverseNF(const poly syz_lead, const poly syz_2 = NULL) const;
419
420 /// High level caching function!!!
421 poly TraverseTail(poly multiplier, const int tail) const;
422
423 // REMOVE?
424 /// called only from above and from outside (for testing)
425 poly TraverseTail(poly multiplier, poly tail) const;
426
427 /// TODO: save shortcut (syz: |-.->) LM(m) * "t" -> ? ???
428 poly ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck) const;
429
430 /// low level computation...
431 poly ComputeImage(poly multiplier, const int tail) const;
432
433 public:
434 /// just for testing via the wrapper below
435 inline poly _FindReducer(const poly product, const poly syzterm) const
436 { return m_div.FindReducer(product, syzterm, m_checker); }
437 private:
438 void CleanUp();
439 protected:
440
441
442 /// just leading terms
444
445 /// leading + second terms
447
448
449
450 private:
451 /// input leading terms
452 const ideal m_idLeads;
453
454 /// input tails
455 const ideal m_idTails;
456
457 /// output (syzygy) leading terms (+2nd terms?)
459
460 /// output (syzygy) tails
462
463 /*mutable?*/ ideal m_LS; ///< leading syzygy terms used for reducing syzygy tails
464
465
466 /// Bitmask for variables occuring in leading terms
467 const CLCM m_lcm;
468
469 /// Divisor finder
471
472 /// for checking tail-terms and makeing them irreducible (wrt m_LS!)
474
475 mutable TCache m_cache; // cacher comp + poly -> poly! // mutable???
476
477 /// used for simple summing up
479
480 /// for S-Polynomial reductions
481 mutable kBucket_pt m_spoly_bucket; // only used inside of SchreyerSyzygyNF! destruction by CleanUp()!
482
483
484 /// Statistics:
485 /// 0..3: as in SetUpTailTerms()::PreProcessTerm() // TODO!!??
486 /// 4: number of terms discarded due to LOT heuristics
487 /// 5: number of terms discarded due to LCM heuristics
488 /// 6, 7: lookups without & with rescale, 8: stores
489 mutable unsigned long m_stat[9];
490};
491
492// The following wrappers are just for testing separate functions on highest level (within schreyer.lib)
493
494static inline void ComputeSyzygy(const ideal L, const ideal T, ideal& LL, ideal& TT, const SchreyerSyzygyComputationFlags A)
495{
497 syz.ComputeSyzygy();
498 syz.ReadOffResult(LL, TT);
499}
500
501static inline ideal ComputeLeadingSyzygyTerms(const ideal& L, const SchreyerSyzygyComputationFlags A)
502{
504 syz.ComputeLeadingSyzygyTerms(false);
505 ideal LL, TT;
506 syz.ReadOffResult(LL, TT);
507 return LL; // assume TT is NULL!
508}
509
510static inline ideal Compute2LeadingSyzygyTerms(const ideal& L, const SchreyerSyzygyComputationFlags A)
511{
514 ideal LL, TT;
515 syz.ReadOffResult(LL, TT);
516 return LL; // assume TT is NULL!
517}
518
519static inline poly FindReducer(poly product, poly syzterm,
520 ideal L, ideal LS, const SchreyerSyzygyComputationFlags A)
521{
522 SchreyerSyzygyComputation syz(L, NULL, LS, A);
523 return syz._FindReducer(product, syzterm);
524}
525
526static inline poly TraverseTail(poly multiplier, poly tail,
527 ideal L, ideal T, ideal LS, const SchreyerSyzygyComputationFlags A)
528{
529 SchreyerSyzygyComputation syz(L, T, LS, A);
530 return syz.TraverseTail(multiplier, tail);
531}
532
533static inline poly ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck,
534 ideal L, ideal T, ideal LS, const SchreyerSyzygyComputationFlags A)
535{
536 SchreyerSyzygyComputation syz(L, T, LS, A);
537 return syz.ReduceTerm(multiplier, term4reduction, syztermCheck);
538}
539
540
541static inline poly SchreyerSyzygyNF(poly syz_lead, poly syz_2,
542 ideal L, ideal T, ideal LS, const SchreyerSyzygyComputationFlags A)
543{
544 SchreyerSyzygyComputation syz(L, T, LS, A);
545 return syz.SchreyerSyzygyNF(syz_lead, syz_2);
546}
547
548#endif
549/* #ifndef SYZEXTRA_H */
550
551// Vi-modeline: vim: filetype=c:syntax:shiftwidth=2:tabstop=8:textwidth=0:expandtab
552
#define UNLIKELY(X)
Definition: auxiliary.h:404
#define LIKELY(X)
Definition: auxiliary.h:403
int l
Definition: cfEzgcd.cc:100
int m
Definition: cfEzgcd.cc:128
int p
Definition: cfModGcd.cc:4078
Definition: syzextra.h:214
const unsigned int m_N
number of ring variables
Definition: syzextra.h:223
bool Check(const poly m) const
CLCM(const ideal &L, const SchreyerSyzygyComputationFlags &flags)
bool m_compute
Definition: syzextra.h:221
bool DivisibilityCheck(const poly multiplier, const poly t, const unsigned long not_sev, const ring r) const
CLeadingTerm(const CLeadingTerm &)
bool CheckLT(const ideal &L) const
const poly m_lt
the leading term itself L[label-1]
Definition: syzextra.h:248
const unsigned long m_sev
not short exp. vector
Definition: syzextra.h:241
unsigned int label() const
Definition: syzextra.h:241
const unsigned int m_label
index in the main L[] + 1
Definition: syzextra.h:246
poly lt() const
Definition: syzextra.h:239
bool DivisibilityCheck(const poly product, const unsigned long not_sev, const ring r) const
void operator=(const CLeadingTerm &)
unsigned long sev() const
Definition: syzextra.h:240
CLeadingTerm(unsigned int label, const poly lt, const ring)
poly FindReducer(const poly product, const poly syzterm, const CReducerFinder &checker) const
CReducerFinder(const CReducerFinder &)
CReducerFinder(const ideal L, const SchreyerSyzygyComputationFlags &flags)
goes over all leading terms
poly FindReducer(const poly multiplier, const poly monom, const poly syzterm, const CReducerFinder &checker) const
std::map< TComponentKey, TReducers > CReducersHash
Definition: syzextra.h:270
friend class CDivisorEnumerator
Definition: syzextra.h:263
bool IsNonempty() const
Definition: syzextra.h:293
long TComponentKey
Definition: syzextra.h:266
ideal m_L
only for debug
Definition: syzextra.h:299
friend class CDivisorEnumerator2
Definition: syzextra.h:261
std::vector< const CLeadingTerm * > TReducers
Definition: syzextra.h:267
void Initialize(const ideal L)
int PreProcessTerm(const poly t, CReducerFinder &syzChecker) const
is the term to be "preprocessed" as lower order term or lead to only reducible syzygies....
void operator=(const CReducerFinder &)
CReducersHash m_hash
Definition: syzextra.h:301
bool IsDivisible(const poly q) const
sBucket Factory
Definition: syzextra.h:70
Base::value_type Bucket
Definition: syzextra.h:75
SBucketFactory(const ring r)
Definition: syzextra.h:77
void operator=(const SBucketFactory &)
static Bucket _CreateBucket(const ring r)
inital allocation for new buckets
static void _DestroyBucket(Bucket &bt)
we only expect empty buckets to be left at the end for destructor bt will be set to NULL
std::stack< sBucket_pt > Base
Definition: syzextra.h:72
SBucketFactory(const SBucketFactory &)
void putBucket(const Bucket &bt, const bool replace=false)
Definition: syzextra.h:120
Bucket getBucket(const ring r, const bool remove=true)
Definition: syzextra.h:92
Computing syzygies after Schreyer.
Definition: syzextra.h:342
const CLCM m_lcm
Bitmask for variables occuring in leading terms.
Definition: syzextra.h:467
poly ComputeImage(poly multiplier, const int tail) const
low level computation...
const ideal m_idLeads
input leading terms
Definition: syzextra.h:452
kBucket_pt m_spoly_bucket
for S-Polynomial reductions
Definition: syzextra.h:481
void ReadOffResult(ideal &syzL, ideal &syzT)
Read off the results while detaching them from this object NOTE: no copy!
Definition: syzextra.h:393
poly _FindReducer(const poly product, const poly syzterm) const
just for testing via the wrapper below
Definition: syzextra.h:435
poly TraverseTail(poly multiplier, poly tail) const
called only from above and from outside (for testing)
void SetUpTailTerms()
Convert the given ideal of tails into the internal representation (with reducers!) Preprocess m_idTai...
ideal Compute1LeadingSyzygyTerms()
just leading terms
poly TraverseNF(const poly syz_lead, const poly syz_2=NULL) const
unsigned long m_stat[9]
Statistics: 0..3: as in SetUpTailTerms()::PreProcessTerm() // TODO!!?? 4: number of terms discarded d...
Definition: syzextra.h:489
ideal m_syzTails
output (syzygy) tails
Definition: syzextra.h:461
void ComputeSyzygy()
The main driver function: computes.
void PrintStats() const
print statistics about the used heuristics
SchreyerSyzygyComputation(const ideal idLeads, const ideal idTails, const ideal syzLeads, const SchreyerSyzygyComputationFlags setting)
Construct a global object for given input data (separated into leads & tails)
Definition: syzextra.h:361
poly TraverseTail(poly multiplier, const int tail) const
High level caching function!!!
const ideal m_idTails
input tails
Definition: syzextra.h:455
ideal Compute2LeadingSyzygyTerms()
leading + second terms
void ComputeLeadingSyzygyTerms(bool bComputeSecondTerms=true)
Computes Syz(leads) or only LEAD of it. The result is stored into m_syzLeads.
poly SchreyerSyzygyNF(const poly syz_lead, poly syz_2=NULL) const
Main HybridNF == 1: poly reduce + LOT + LCM?
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:470
~SchreyerSyzygyComputation()
Destructor should not destruct the resulting m_syzLeads, m_syzTails.
Definition: syzextra.h:382
SchreyerSyzygyComputation(const ideal idLeads, const ideal idTails, const SchreyerSyzygyComputationFlags setting)
Construct a global object for given input data (separated into leads & tails)
Definition: syzextra.h:348
ideal m_syzLeads
output (syzygy) leading terms (+2nd terms?)
Definition: syzextra.h:458
SBucketFactory m_sum_bucket_factory
used for simple summing up
Definition: syzextra.h:478
poly ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck) const
TODO: save shortcut (syz: |-.->) LM(m) * "t" -> ? ???
ideal m_LS
leading syzygy terms used for reducing syzygy tails
Definition: syzextra.h:463
CReducerFinder m_checker
for checking tail-terms and makeing them irreducible (wrt m_LS!)
Definition: syzextra.h:473
Definition: idrec.h:35
Definition: attrib.h:21
ideal id_Copy(ideal h1, const ring r)
copy an ideal
STATIC_VAR jList * T
Definition: janet.cc:30
#define assume(x)
Definition: mod2.h:387
#define NULL
Definition: omList.c:12
int status int void size_t count int const void size_t count const char int flags
Definition: si_signals.h:73
#define A
Definition: sirandom.c:24
bool operator()(const TCacheKey &l, const TCacheKey &r) const
Definition: syzextra.h:324
CCacheCompare(const CCacheCompare &lhs)
Definition: syzextra.h:321
CCacheCompare & operator=(const CCacheCompare &lhs)
Definition: syzextra.h:322
CCacheCompare(const ring &r)
Definition: syzextra.h:319
const ring & m_ring
Definition: syzextra.h:315
Computation attribute storage.
Definition: syzextra.h:157
SchreyerSyzygyComputationFlags(const SchreyerSyzygyComputationFlags &attr)
Definition: syzextra.h:160
SchreyerSyzygyComputationFlags(idhdl rootRingHdl)
const int OPT__HYBRIDNF
Use the usual NF's S-poly reduction while dropping lower order terms 2 means - smart selection!
Definition: syzextra.h:181
const ring m_rBaseRing
global base ring
Definition: syzextra.h:208
const int OPT__TREEOUTPUT
output lifting tree
Definition: syzextra.h:196
const int OPT__SYZCHECK
CheckSyzygyProperty: TODO.
Definition: syzextra.h:199
const int OPT__NOCACHING
no caching/stores/lookups
Definition: syzextra.h:205
int OPT__SYZNUMBER
Syzygy level (within a resolution)
Definition: syzextra.h:188
const bool OPT__PROT
TEST_OPT_PROT.
Definition: syzextra.h:202
const int OPT__DEBUG
output all the intermediate states
Definition: syzextra.h:171
const int OPT__TAILREDSYZ
Reduce syzygy tails wrt the leading syzygy terms.
Definition: syzextra.h:177
const int OPT__IGNORETAILS
ignore tails and compute the pure Schreyer frame
Definition: syzextra.h:185
bool my_p_LmCmp(poly, poly, const ring)
static poly SchreyerSyzygyNF(poly syz_lead, poly syz_2, ideal L, ideal T, ideal LS, const SchreyerSyzygyComputationFlags A)
Definition: syzextra.h:541
poly TCacheKey
Definition: syzextra.h:310
poly leadmonom(const poly p, const ring r, const bool bSetZeroComp=true)
poly TCacheValue
Definition: syzextra.h:311
std::map< TCacheKey, TCacheValue, CCacheCompare > TP2PCache
Definition: syzextra.h:327
static poly ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck, ideal L, ideal T, ideal LS, const SchreyerSyzygyComputationFlags A)
Definition: syzextra.h:533
static ideal ComputeLeadingSyzygyTerms(const ideal &L, const SchreyerSyzygyComputationFlags A)
Definition: syzextra.h:501
void Sort_c_ds(const ideal id, const ring r)
inplace sorting of the module (ideal) id wrt <_(c,ds)
static ideal Compute2LeadingSyzygyTerms(const ideal &L, const SchreyerSyzygyComputationFlags A)
Definition: syzextra.h:510
std::map< int, TP2PCache > TCache
Definition: syzextra.h:328
kBucket * kBucket_pt
Definition: syzextra.h:30
poly p_Tail(const poly p, const ring r)
return the tail of a given polynomial or vector returns NULL if input is NULL, otherwise the result i...
Definition: syzextra.cc:40
static poly FindReducer(poly product, poly syzterm, ideal L, ideal LS, const SchreyerSyzygyComputationFlags A)
Definition: syzextra.h:519
sBucket * sBucket_pt
Definition: syzextra.h:60
static poly TraverseTail(poly multiplier, poly tail, ideal L, ideal T, ideal LS, const SchreyerSyzygyComputationFlags A)
Definition: syzextra.h:526
ideal id_Tail(const ideal id, const ring r)
return the tail of a given ideal or module returns NULL if input is NULL, otherwise the result is a n...
Definition: syzextra.cc:48
static void ComputeSyzygy(const ideal L, const ideal T, ideal &LL, ideal &TT, const SchreyerSyzygyComputationFlags A)
Definition: syzextra.h:494
idrec * idhdl
Definition: syzextra.h:28