Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends
SchreyerSyzygyComputation Class Reference

Computing syzygies after Schreyer. More...

#include <syzextra.h>

Public Member Functions

 SchreyerSyzygyComputation (const ideal idLeads, const ideal idTails, const SchreyerSyzygyComputationFlags setting)
 Construct a global object for given input data (separated into leads & tails) More...
 
 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) More...
 
 ~SchreyerSyzygyComputation ()
 Destructor should not destruct the resulting m_syzLeads, m_syzTails. More...
 
void SetUpTailTerms ()
 Convert the given ideal of tails into the internal representation (with reducers!) Preprocess m_idTails as well...? More...
 
void PrintStats () const
 print statistics about the used heuristics More...
 
void ReadOffResult (ideal &syzL, ideal &syzT)
 Read off the results while detaching them from this object NOTE: no copy! More...
 
void ComputeSyzygy ()
 The main driver function: computes. More...
 
void ComputeLeadingSyzygyTerms (bool bComputeSecondTerms=true)
 Computes Syz(leads) or only LEAD of it. The result is stored into m_syzLeads. More...
 
poly SchreyerSyzygyNF (const poly syz_lead, poly syz_2=NULL) const
 Main HybridNF == 1: poly reduce + LOT + LCM? More...
 
poly TraverseNF (const poly syz_lead, const poly syz_2=NULL) const
 
poly TraverseTail (poly multiplier, const int tail) const
 High level caching function!!! More...
 
poly TraverseTail (poly multiplier, poly tail) const
 called only from above and from outside (for testing) More...
 
poly ReduceTerm (poly multiplier, poly term4reduction, poly syztermCheck) const
 TODO: save shortcut (syz: |-.->) LM(m) * "t" -> ? ??? More...
 
poly ComputeImage (poly multiplier, const int tail) const
 low level computation... More...
 
poly _FindReducer (const poly product, const poly syzterm) const
 just for testing via the wrapper below More...
 
- Public Member Functions inherited from SchreyerSyzygyComputationFlags
 SchreyerSyzygyComputationFlags (idhdl rootRingHdl)
 
 SchreyerSyzygyComputationFlags (const SchreyerSyzygyComputationFlags &attr)
 
void nextSyzygyLayer () const
 

Protected Member Functions

ideal Compute1LeadingSyzygyTerms ()
 just leading terms More...
 
ideal Compute2LeadingSyzygyTerms ()
 leading + second terms More...
 

Private Member Functions

void CleanUp ()
 Clean up all the accumulated data. More...
 

Private Attributes

const ideal m_idLeads
 input leading terms More...
 
const ideal m_idTails
 input tails More...
 
ideal m_syzLeads
 output (syzygy) leading terms (+2nd terms?) More...
 
ideal m_syzTails
 output (syzygy) tails More...
 
ideal m_LS
 leading syzygy terms used for reducing syzygy tails More...
 
const CLCM m_lcm
 Bitmask for variables occuring in leading terms. More...
 
const CReducerFinder m_div
 Divisor finder. More...
 
CReducerFinder m_checker
 for checking tail-terms and makeing them irreducible (wrt m_LS!) More...
 
TCache m_cache
 
SBucketFactory m_sum_bucket_factory
 TODO: look into m_idTailTerms!!!!!!!!!!!!!!!!!!!!!!!! map? heaps??? More...
 
kBucket_pt m_spoly_bucket
 for S-Polynomial reductions More...
 
unsigned long m_stat [9]
 Statistics: 0..3: as in SetUpTailTerms()::PreProcessTerm() // TODO!!?? 4: number of terms discarded due to LOT heuristics 5: number of terms discarded due to LCM heuristics 6, 7: lookups without & with rescale, 8: stores. More...
 

Friends

class CLCM
 
class CReducerFinder
 

Additional Inherited Members

- Data Fields inherited from SchreyerSyzygyComputationFlags
const int OPT__DEBUG
 output all the intermediate states More...
 
const int OPT__LEAD2SYZ
 ? More...
 
const int OPT__TAILREDSYZ
 Reduce syzygy tails wrt the leading syzygy terms. More...
 
const int OPT__HYBRIDNF
 Use the usual NF's S-poly reduction while dropping lower order terms 2 means - smart selection! More...
 
const int OPT__IGNORETAILS
 ignore tails and compute the pure Schreyer frame More...
 
int OPT__SYZNUMBER
 Syzygy level (within a resolution) More...
 
const int OPT__TREEOUTPUT
 output lifting tree More...
 
const int OPT__SYZCHECK
 CheckSyzygyProperty: TODO. More...
 
const bool OPT__PROT
 TEST_OPT_PROT. More...
 
const int OPT__NOCACHING
 no caching/stores/lookups More...
 
const ring m_rBaseRing
 global base ring More...
 

Detailed Description

Computing syzygies after Schreyer.

Storing/accumulating data during the computation requires some global object, like this class. Ideally the above global functions should not be used in favour of this class.

See also
Schreyer Syzygy Computation Paper & Talk & Python prototype

Definition at line 397 of file syzextra.h.

Constructor & Destructor Documentation

SchreyerSyzygyComputation::SchreyerSyzygyComputation ( const ideal  idLeads,
const ideal  idTails,
const SchreyerSyzygyComputationFlags  setting 
)
inline

Construct a global object for given input data (separated into leads & tails)

Definition at line 404 of file syzextra.h.

404  :
406  m_idLeads(idLeads), m_idTails(id_Copy(idTails, setting.m_rBaseRing)),
408  m_LS(NULL), m_lcm(m_idLeads, setting),
409  m_div(m_idLeads, setting), m_checker(NULL, setting), m_cache(),
412  {
413  if( UNLIKELY(OPT__PROT) ) memset( &m_stat, 0, sizeof(m_stat) );
414  }
ideal m_syzLeads
output (syzygy) leading terms (+2nd terms?)
Definition: syzextra.h:516
const ideal m_idLeads
input leading terms
Definition: syzextra.h:510
ideal m_LS
leading syzygy terms used for reducing syzygy tails
Definition: syzextra.h:521
ideal m_syzTails
output (syzygy) tails
Definition: syzextra.h:519
#define UNLIKELY(expression)
Definition: tgb_internal.h:838
kBucket_pt m_spoly_bucket
for S-Polynomial reductions
Definition: syzextra.h:563
CReducerFinder m_checker
for checking tail-terms and makeing them irreducible (wrt m_LS!)
Definition: syzextra.h:531
const bool OPT__PROT
TEST_OPT_PROT.
Definition: syzextra.h:235
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
ideal id_Copy(const ideal, const ring)
copy an ideal
#define NULL
Definition: omList.c:10
SchreyerSyzygyComputationFlags(idhdl rootRingHdl)
Definition: syzextra.cc:2034
const ring m_rBaseRing
global base ring
Definition: syzextra.h:241
SBucketFactory m_sum_bucket_factory
TODO: look into m_idTailTerms!!!!!!!!!!!!!!!!!!!!!!!! map? heaps???
Definition: syzextra.h:560
unsigned long m_stat[9]
Statistics: 0..3: as in SetUpTailTerms()::PreProcessTerm() // TODO!!?? 4: number of terms discarded d...
Definition: syzextra.h:571
const CLCM m_lcm
Bitmask for variables occuring in leading terms.
Definition: syzextra.h:525
const ideal m_idTails
input tails
Definition: syzextra.h:513
SchreyerSyzygyComputation::SchreyerSyzygyComputation ( const ideal  idLeads,
const ideal  idTails,
const ideal  syzLeads,
const SchreyerSyzygyComputationFlags  setting 
)
inline

Construct a global object for given input data (separated into leads & tails)

Definition at line 417 of file syzextra.h.

417  :
419  m_idLeads(idLeads), m_idTails(id_Copy(idTails, setting.m_rBaseRing)),
420  m_syzLeads(syzLeads), m_syzTails(NULL),
421  m_LS(syzLeads), m_lcm(m_idLeads, setting),
422  m_div(m_idLeads, setting), m_checker(NULL, setting), m_cache(),
425  {
426  if( UNLIKELY(OPT__PROT) ) memset( &m_stat, 0, sizeof(m_stat) );
427 
429  {
430  if (syzLeads != NULL)
431  m_checker.Initialize(syzLeads);
432 // if( idTails != NULL )
433 // SetUpTailTerms();
434  }
435  }
ideal m_syzLeads
output (syzygy) leading terms (+2nd terms?)
Definition: syzextra.h:516
const ideal m_idLeads
input leading terms
Definition: syzextra.h:510
ideal m_LS
leading syzygy terms used for reducing syzygy tails
Definition: syzextra.h:521
ideal m_syzTails
output (syzygy) tails
Definition: syzextra.h:519
#define UNLIKELY(expression)
Definition: tgb_internal.h:838
#define LIKELY(expression)
Definition: tgb_internal.h:837
kBucket_pt m_spoly_bucket
for S-Polynomial reductions
Definition: syzextra.h:563
CReducerFinder m_checker
for checking tail-terms and makeing them irreducible (wrt m_LS!)
Definition: syzextra.h:531
const int OPT__TAILREDSYZ
Reduce syzygy tails wrt the leading syzygy terms.
Definition: syzextra.h:210
const bool OPT__PROT
TEST_OPT_PROT.
Definition: syzextra.h:235
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
void Initialize(const ideal L)
Definition: syzextra.cc:2126
ideal id_Copy(const ideal, const ring)
copy an ideal
#define NULL
Definition: omList.c:10
SchreyerSyzygyComputationFlags(idhdl rootRingHdl)
Definition: syzextra.cc:2034
const ring m_rBaseRing
global base ring
Definition: syzextra.h:241
SBucketFactory m_sum_bucket_factory
TODO: look into m_idTailTerms!!!!!!!!!!!!!!!!!!!!!!!! map? heaps???
Definition: syzextra.h:560
unsigned long m_stat[9]
Statistics: 0..3: as in SetUpTailTerms()::PreProcessTerm() // TODO!!?? 4: number of terms discarded d...
Definition: syzextra.h:571
const int OPT__IGNORETAILS
ignore tails and compute the pure Schreyer frame
Definition: syzextra.h:218
const CLCM m_lcm
Bitmask for variables occuring in leading terms.
Definition: syzextra.h:525
const ideal m_idTails
input tails
Definition: syzextra.h:513
SchreyerSyzygyComputation::~SchreyerSyzygyComputation ( )
inline

Destructor should not destruct the resulting m_syzLeads, m_syzTails.

Definition at line 438 of file syzextra.h.

438 { CleanUp(); }
void CleanUp()
Clean up all the accumulated data.
Definition: syzextra.cc:548

Member Function Documentation

poly SchreyerSyzygyComputation::_FindReducer ( const poly  product,
const poly  syzterm 
) const
inline

just for testing via the wrapper below

Definition at line 493 of file syzextra.h.

494  { return m_div.FindReducer(product, syzterm, m_checker); }
CReducerFinder m_checker
for checking tail-terms and makeing them irreducible (wrt m_LS!)
Definition: syzextra.h:531
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
poly FindReducer(const poly multiplier, const poly monom, const poly syzterm, const CReducerFinder &checker) const
Definition: syzextra.cc:2602
void SchreyerSyzygyComputation::CleanUp ( )
private

Clean up all the accumulated data.

Definition at line 548 of file syzextra.cc.

549 {
550  extern void id_Delete (ideal*, const ring);
551 
552  id_Delete(const_cast<ideal*>(&m_idTails), m_rBaseRing); // TODO!!!
553 
554 /*if( m_sum_bucket != NULL )
555  {
556  assume ( sIsEmpty(m_sum_bucket) );
557  sBucketDestroy(&m_sum_bucket);
558  m_sum_bucket = NULL;
559  }*/
560 
561  if( m_spoly_bucket != NULL )
562  {
565  }
566 
567  for( TCache::iterator it = m_cache.begin(); it != m_cache.end(); it++ )
568  {
569  TP2PCache& T = it->second;
570 
571  for(TP2PCache::iterator vit = T.begin(); vit != T.end(); vit++ )
572  {
573  p_Delete( (&(vit->second)), m_rBaseRing);
574  p_Delete( const_cast<poly*>(&(vit->first)), m_rBaseRing);
575  }
576  }
577 }
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
kBucket_pt m_spoly_bucket
for S-Polynomial reductions
Definition: syzextra.h:563
void kBucketDestroy(kBucket_pt *bucket_pt)
Definition: kbuckets.cc:204
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:850
#define NULL
Definition: omList.c:10
const ring m_rBaseRing
global base ring
Definition: syzextra.h:241
const ideal m_idTails
input tails
Definition: syzextra.h:513
static jList * T
Definition: janet.cc:37
std::map< TCacheKey, TCacheValue, CCacheCompare > TP2PCache
Definition: syzextra.h:383
ideal SchreyerSyzygyComputation::Compute1LeadingSyzygyTerms ( )
protected

just leading terms

Definition at line 778 of file syzextra.cc.

779 {
780  const ideal& id = m_idLeads;
781  const ring& r = m_rBaseRing;
782 // const SchreyerSyzygyComputationFlags& attributes = m_atttributes;
783 
785 
786  // 1. set of components S?
787  // 2. for each component c from S: set of indices of leading terms
788  // with this component?
789  // 3. short exp. vectors for each leading term?
790 
791  const int size = IDELEMS(id);
792 
793  if( size < 2 )
794  {
795  const ideal newid = idInit(1, 0); newid->m[0] = NULL; // zero ideal...
796  return newid;
797  }
798 
799  // TODO/NOTE: input is supposed to be (reverse-) sorted wrt "(c,ds)"!??
800 
801  // components should come in groups: count elements in each group
802  // && estimate the real size!!!
803 
804 
805  // use just a vector instead???
806  const ideal newid = idInit( (size * (size-1))/2, size); // maximal size: ideal case!
807 
808  int k = 0;
809 
810  for (int j = 0; j < size; j++)
811  {
812  const poly p = id->m[j];
813  assume( p != NULL );
814  const int c = p_GetComp(p, r);
815 
816  for (int i = j - 1; i >= 0; i--)
817  {
818  const poly pp = id->m[i];
819  assume( pp != NULL );
820  const int cc = p_GetComp(pp, r);
821 
822  if( c != cc )
823  continue;
824 
825  const poly m = p_Init(r); // p_New???
826 
827  // m = LCM(p, pp) / p! // TODO: optimize: knowing the ring structure: (C/lp)!
828  for (int v = rVar(r); v > 0; v--)
829  {
830  assume( v > 0 );
831  assume( v <= rVar(r) );
832 
833  const short e1 = p_GetExp(p , v, r);
834  const short e2 = p_GetExp(pp, v, r);
835 
836  if( e1 >= e2 )
837  p_SetExp(m, v, 0, r);
838  else
839  p_SetExp(m, v, e2 - e1, r);
840 
841  }
842 
843  assume( (j > i) && (i >= 0) );
844 
845  p_SetComp(m, j + 1, r);
846  pNext(m) = NULL;
847  p_SetCoeff0(m, n_Init(1, r->cf), r); // for later...
848 
849  p_Setm(m, r); // should not do anything!!!
850 
851  newid->m[k++] = m;
852  }
853  }
854 
855 // if( OPT__DEBUG & FALSE )
856 // {
857 // PrintS("ComputeLeadingSyzygyTerms::Temp0: \n");
858 // dPrint(newid, r, r, 0);
859 // }
860 
861  // the rest of newid is assumed to be zeroes...
862 
863  // simplify(newid, 2 + 32)??
864  // sort(newid, "C,ds")[1]???
865  id_DelDiv(newid, r); // #define SIMPL_LMDIV 32
866 
867 // if( OPT__DEBUG & FALSE )
868 // {
869 // PrintS("ComputeLeadingSyzygyTerms::Temp1: \n");
870 // dPrint(newid, r, r, 0);
871 // }
872 
873  idSkipZeroes(newid); // #define SIMPL_NULL 2
874 
875 // if( OPT__DEBUG )
876 // {
877 // PrintS("ComputeLeadingSyzygyTerms::Output: \n");
878 // dPrint(newid, r, r, 0);
879 // }
880 
881  Sort_c_ds(newid, r);
882 
883  return newid;
884 }
void id_DelDiv(ideal id, const ring r)
delete id[j], if LT(j) == coeff*mon*LT(i) and vice versa, i.e., delete id[i], if LT(i) == coeff*mon*L...
void Sort_c_ds(const ideal id, const ring r)
inplace sorting of the module (ideal) id wrt <_(c,ds)
Definition: syzextra.cc:527
const ideal m_idLeads
input leading terms
Definition: syzextra.h:510
return P p
Definition: myNF.cc:203
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
Definition: p_polys.h:236
assume(R!=NULL)
#define p_GetComp(p, r)
Definition: monomials.h:72
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
Definition: coeffs.h:539
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:540
int k
Definition: cfEzgcd.cc:93
poly pp
Definition: myNF.cc:296
const ring r
Definition: syzextra.cc:208
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent : the integer VarOffset encodes:
Definition: p_polys.h:465
int j
Definition: myNF.cc:70
int m
Definition: cfEzgcd.cc:119
int i
Definition: cfEzgcd.cc:123
#define IDELEMS(i)
Definition: simpleideals.h:24
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition: cf_ops.cc:600
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:38
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent : VarOffset encodes the position in p->exp
Definition: p_polys.h:484
#define NULL
Definition: omList.c:10
const ring m_rBaseRing
global base ring
Definition: syzextra.h:241
#define pNext(p)
Definition: monomials.h:43
static void p_Setm(poly p, const ring r)
Definition: p_polys.h:436
#define p_SetCoeff0(p, n, r)
Definition: monomials.h:68
polyrec * poly
Definition: hilb.h:10
static poly p_Init(const ring r, omBin bin)
Definition: p_polys.h:1248
ideal SchreyerSyzygyComputation::Compute2LeadingSyzygyTerms ( )
protected

leading + second terms

Definition at line 886 of file syzextra.cc.

887 {
888  const ideal& id = m_idLeads;
889  const ring& r = m_rBaseRing;
890 // const SchreyerSyzygyComputationFlags& attributes = m_atttributes;
891 
892  // 1. set of components S?
893  // 2. for each component c from S: set of indices of leading terms
894  // with this component?
895  // 3. short exp. vectors for each leading term?
896 
897  const int size = IDELEMS(id);
898 
899  if( size < 2 )
900  {
901  const ideal newid = idInit(1, 1); newid->m[0] = NULL; // zero module...
902  return newid;
903  }
904 
905 
906  // TODO/NOTE: input is supposed to be sorted wrt "C,ds"!??
907 
908  // components should come in groups: count elements in each group
909  // && estimate the real size!!!
910 
911 
912  // use just a vector instead???
913  ideal newid = idInit( (size * (size-1))/2, size); // maximal size: ideal case!
914 
915  int k = 0;
916 
917  for (int j = 0; j < size; j++)
918  {
919  const poly p = id->m[j];
920  assume( p != NULL );
921  const int c = p_GetComp(p, r);
922 
923  for (int i = j - 1; i >= 0; i--)
924  {
925  const poly pp = id->m[i];
926  assume( pp != NULL );
927  const int cc = p_GetComp(pp, r);
928 
929  if( c != cc )
930  continue;
931 
932  // allocate memory & zero it out!
933  const poly m = p_Init(r); const poly mm = p_Init(r);
934 
935 
936  // m = LCM(p, pp) / p! mm = LCM(p, pp) / pp!
937  // TODO: optimize: knowing the ring structure: (C/lp)!
938 
939  for (int v = rVar(r); v > 0; v--)
940  {
941  assume( v > 0 );
942  assume( v <= rVar(r) );
943 
944  const short e1 = p_GetExp(p , v, r);
945  const short e2 = p_GetExp(pp, v, r);
946 
947  if( e1 >= e2 )
948  p_SetExp(mm, v, e1 - e2, r); // p_SetExp(m, v, 0, r);
949  else
950  p_SetExp(m, v, e2 - e1, r); // p_SetExp(mm, v, 0, r);
951 
952  }
953 
954  assume( (j > i) && (i >= 0) );
955 
956  p_SetComp(m, j + 1, r);
957  p_SetComp(mm, i + 1, r);
958 
959  const number& lc1 = p_GetCoeff(p , r);
960  const number& lc2 = p_GetCoeff(pp, r);
961 
962 #if NODIVISION
963  assume( n_IsOne(lc1, r->cf) );
964  assume( n_IsOne(lc2, r->cf) );
965 
966  p_SetCoeff0( m, n_Init( 1, r->cf), r );
967  p_SetCoeff0(mm, n_Init(-1, r->cf), r );
968 #else
969  number g = n_Lcm( lc1, lc2, r->cf );
970  p_SetCoeff0(m , n_Div(g, lc1, r), r);
971  p_SetCoeff0(mm, n_InpNeg(n_Div(g, lc2, r), r), r);
972  n_Delete(&g, r);
973 #endif
974 
975  p_Setm(m, r); // should not do anything!!!
976  p_Setm(mm, r); // should not do anything!!!
977 
978  pNext(m) = mm; // pNext(mm) = NULL;
979 
980  newid->m[k++] = m;
981  }
982  }
983 
984 // if( OPT__DEBUG & FALSE )
985 // {
986 // PrintS("Compute2LeadingSyzygyTerms::Temp0: \n");
987 // dPrint(newid, r, r, 0);
988 // }
989 
990  if( UNLIKELY(!OPT__TAILREDSYZ) )
991  {
992  // simplify(newid, 2 + 32)??
993  // sort(newid, "C,ds")[1]???
994  id_DelDiv(newid, r); // #define SIMPL_LMDIV 32
995 
996 // if( OPT__DEBUG & FALSE )
997 // {
998 // PrintS("Compute2LeadingSyzygyTerms::Temp1 (deldiv): \n");
999 // dPrint(newid, r, r, 0);
1000 // }
1001  }
1002  else
1003  {
1004  // option(redSB); option(redTail);
1005  // TEST_OPT_REDSB
1006  // TEST_OPT_REDTAIL
1007  assume( r == currRing );
1008 
1009  BITSET _save_test; SI_SAVE_OPT1(_save_test);
1011 
1012  intvec* w=new intvec(IDELEMS(newid));
1013  ideal tmp = kStd(newid, currRing->qideal, isHomog, &w);
1014  delete w;
1015 
1016  SI_RESTORE_OPT1(_save_test)
1017 
1018  id_Delete(&newid, r);
1019  newid = tmp;
1020 
1021 // if( OPT__DEBUG & FALSE )
1022 // {
1023 // PrintS("Compute2LeadingSyzygyTerms::Temp1 (std): \n");
1024 // dPrint(newid, r, r, 0);
1025 // }
1026 
1027  }
1028 
1029  idSkipZeroes(newid);
1030 
1031  Sort_c_ds(newid, r);
1032 
1033  return newid;
1034 }
#define OPT_REDSB
Definition: options.h:71
void id_DelDiv(ideal id, const ring r)
delete id[j], if LT(j) == coeff*mon*LT(i) and vice versa, i.e., delete id[i], if LT(i) == coeff*mon*L...
void Sort_c_ds(const ideal id, const ring r)
inplace sorting of the module (ideal) id wrt <_(c,ds)
Definition: syzextra.cc:527
return
Definition: syzextra.cc:280
const ideal m_idLeads
input leading terms
Definition: syzextra.h:510
return P p
Definition: myNF.cc:203
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
Definition: coeffs.h:469
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
Definition: p_polys.h:236
assume(R!=NULL)
#define p_GetComp(p, r)
Definition: monomials.h:72
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
Definition: coeffs.h:539
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:540
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
ideal kStd(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
Definition: kstd1.cc:2221
#define SI_SAVE_OPT1(A)
Definition: options.h:20
g
Definition: cfModGcd.cc:4031
int k
Definition: cfEzgcd.cc:93
#define UNLIKELY(expression)
Definition: tgb_internal.h:838
#define BITSET
Definition: structs.h:17
#define Sy_bit(x)
Definition: options.h:30
poly pp
Definition: myNF.cc:296
const int OPT__TAILREDSYZ
Reduce syzygy tails wrt the leading syzygy terms.
Definition: syzextra.h:210
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:12
const ring r
Definition: syzextra.cc:208
Definition: intvec.h:16
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent : the integer VarOffset encodes:
Definition: p_polys.h:465
#define OPT_REDTAIL
Definition: options.h:86
int j
Definition: myNF.cc:70
int m
Definition: cfEzgcd.cc:119
static FORCE_INLINE number n_InpNeg(number n, const coeffs r)
in-place negation of n MUST BE USED: n = n_InpNeg(n) (no copy is returned)
Definition: coeffs.h:558
int i
Definition: cfEzgcd.cc:123
#define IDELEMS(i)
Definition: simpleideals.h:24
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
static FORCE_INLINE number n_Lcm(number a, number b, const coeffs r)
in Z: return the lcm of 'a' and 'b' in Z/nZ, Z/2^kZ: computed as in the case Z in Z/pZ...
Definition: coeffs.h:711
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition: cf_ops.cc:600
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:38
const Variable & v
< [in] a sqrfree bivariate poly
Definition: facBivar.h:37
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent : VarOffset encodes the position in p->exp
Definition: p_polys.h:484
#define NULL
Definition: omList.c:10
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of 'a' and 'b', i.e., a/b; raises an error if 'b' is not invertible in r exceptio...
Definition: coeffs.h:615
const CanonicalForm & w
Definition: facAbsFact.cc:55
const ring m_rBaseRing
global base ring
Definition: syzextra.h:241
#define pNext(p)
Definition: monomials.h:43
static void p_Setm(poly p, const ring r)
Definition: p_polys.h:436
#define p_GetCoeff(p, r)
Definition: monomials.h:57
#define p_SetCoeff0(p, n, r)
Definition: monomials.h:68
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition: coeffs.h:456
polyrec * poly
Definition: hilb.h:10
static poly p_Init(const ring r, omBin bin)
Definition: p_polys.h:1248
#define SI_RESTORE_OPT1(A)
Definition: options.h:23
poly SchreyerSyzygyComputation::ComputeImage ( poly  multiplier,
const int  tail 
) const

low level computation...

Definition at line 1738 of file syzextra.cc.

1739 {
1740  const ring& r = m_rBaseRing;
1741 
1742  assume(m_idTails != NULL && m_idTails->m != NULL);
1743  assume( tail >= 0 && tail < IDELEMS(m_idTails) );
1744 
1745  p_Test(multiplier, r);
1746 
1747  const poly t = m_idTails->m[tail]; // !!!
1748 
1749  if(t != NULL)
1750  {
1751  if( UNLIKELY(OPT__TREEOUTPUT) )
1752  {
1753  PrintS("{ \"proc\": \"ComputeImage\", \"nodelabel\": \"");
1754  writeLatexTerm(multiplier, r, false);
1755  Print(" \\\\GEN{%d}\", \"edgelabel\": \"", tail + 1);
1756  writeLatexTerm(t, r, false);
1757  PrintS("\", \"children\": [");
1758  }
1759 
1760  const poly p = TraverseTail(multiplier, t);
1761 
1762  p_Test(multiplier, r);
1763 
1764  if( UNLIKELY(OPT__TREEOUTPUT) )
1765  {
1766  PrintS("], \"noderesult\": \""); writeLatexTerm(p, r, true, false); PrintS("\" },");
1767  }
1768 
1769  return p;
1770 
1771  }
1772 
1773  return NULL;
1774 }
#define Print
Definition: emacs.cc:83
return P p
Definition: myNF.cc:203
assume(R!=NULL)
#define UNLIKELY(expression)
Definition: tgb_internal.h:838
const ring r
Definition: syzextra.cc:208
poly TraverseTail(poly multiplier, const int tail) const
High level caching function!!!
Definition: syzextra.cc:1594
void PrintS(const char *s)
Definition: reporter.cc:294
#define IDELEMS(i)
Definition: simpleideals.h:24
#define p_Test(p, r)
Definition: p_polys.h:160
#define NULL
Definition: omList.c:10
const int OPT__TREEOUTPUT
output lifting tree
Definition: syzextra.h:229
const ring m_rBaseRing
global base ring
Definition: syzextra.h:241
const ideal m_idTails
input tails
Definition: syzextra.h:513
polyrec * poly
Definition: hilb.h:10
static END_NAMESPACE void writeLatexTerm(const poly t, const ring r, const bool bCurrSyz=true, const bool bLTonly=true)
writes a monomial (p), uses form x*gen(.) if ko != coloumn number of p
Definition: syzextra.cc:336
void SchreyerSyzygyComputation::ComputeLeadingSyzygyTerms ( bool  bComputeSecondTerms = true)

Computes Syz(leads) or only LEAD of it. The result is stored into m_syzLeads.

Definition at line 1371 of file syzextra.cc.

1372 {
1373 // const SchreyerSyzygyComputationFlags& attributes = m_atttributes;
1374 
1375 // const BOOLEAN OPT__LEAD2SYZ = attributes.OPT__LEAD2SYZ;
1376 // const BOOLEAN OPT__TAILREDSYZ = attributes.OPT__TAILREDSYZ;
1377 
1378  assume( m_syzLeads == NULL );
1379 
1380  if( UNLIKELY(bComputeSecondTerms) )
1381  {
1382  assume( OPT__LEAD2SYZ );
1383 // m_syzLeads = FROM_NAMESPACE(INTERNAL, _Compute2LeadingSyzygyTerms(m_idLeads, m_rBaseRing, m_atttributes));
1385  }
1386  else
1387  {
1388  assume( !OPT__LEAD2SYZ );
1389 
1391  }
1392 // m_syzLeads = FROM_NAMESPACE(INTERNAL, _ComputeLeadingSyzygyTerms(m_idLeads, m_rBaseRing, m_atttributes));
1393 
1394  // NOTE: set m_LS if tails are to be reduced!
1395  assume( m_syzLeads!= NULL );
1396 
1397  if ( LIKELY( OPT__TAILREDSYZ && !OPT__IGNORETAILS && (IDELEMS(m_syzLeads) > 0) && !((IDELEMS(m_syzLeads) == 1) && (m_syzLeads->m[0] == NULL)) ) )
1398  {
1399  m_LS = m_syzLeads;
1401 #ifndef SING_NDEBUG
1402  if( OPT__DEBUG )
1403  {
1404  const ring& r = m_rBaseRing;
1405  PrintS("SchreyerSyzygyComputation::ComputeLeadingSyzygyTerms: \n");
1406  PrintS("m_syzLeads: \n");
1407  dPrint(m_syzLeads, r, r, 0);
1408  PrintS("m_checker.Initialize(m_syzLeads) => \n");
1410  }
1411 #endif
1412  assume( m_checker.IsNonempty() ); // TODO: this always fails... BUG????
1413  }
1414 
1415  if( UNLIKELY( OPT__PROT ) ) Print("(L%dS:%d)", bComputeSecondTerms ? 2 : 1, IDELEMS(m_syzLeads));
1416 
1417 }
#define Print
Definition: emacs.cc:83
ideal m_syzLeads
output (syzygy) leading terms (+2nd terms?)
Definition: syzextra.h:516
assume(R!=NULL)
bool IsNonempty() const
Definition: syzextra.h:343
ideal m_LS
leading syzygy terms used for reducing syzygy tails
Definition: syzextra.h:521
#define UNLIKELY(expression)
Definition: tgb_internal.h:838
#define LIKELY(expression)
Definition: tgb_internal.h:837
const int OPT__DEBUG
output all the intermediate states
Definition: syzextra.h:204
CReducerFinder m_checker
for checking tail-terms and makeing them irreducible (wrt m_LS!)
Definition: syzextra.h:531
ideal Compute2LeadingSyzygyTerms()
leading + second terms
Definition: syzextra.cc:886
const int OPT__TAILREDSYZ
Reduce syzygy tails wrt the leading syzygy terms.
Definition: syzextra.h:210
const ring r
Definition: syzextra.cc:208
void DebugPrint() const
Definition: syzextra.cc:2457
const bool OPT__PROT
TEST_OPT_PROT.
Definition: syzextra.h:235
ideal Compute1LeadingSyzygyTerms()
just leading terms
Definition: syzextra.cc:778
void PrintS(const char *s)
Definition: reporter.cc:294
void Initialize(const ideal L)
Definition: syzextra.cc:2126
#define IDELEMS(i)
Definition: simpleideals.h:24
#define NULL
Definition: omList.c:10
const ring m_rBaseRing
global base ring
Definition: syzextra.h:241
const int OPT__IGNORETAILS
ignore tails and compute the pure Schreyer frame
Definition: syzextra.h:218
void dPrint(const ideal id, const ring lmRing=currRing, const ring tailRing=currRing, const int nTerms=0)
prints an ideal, optionally with details
void SchreyerSyzygyComputation::ComputeSyzygy ( )

The main driver function: computes.

Definition at line 1145 of file syzextra.cc.

1146 {
1147 #ifndef SING_NDEBUG
1148  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1149 #endif
1150 
1151  assume( m_idLeads != NULL );
1152  assume( m_idTails != NULL );
1153 
1154  const ideal& L = m_idLeads;
1155  const ideal& T = m_idTails;
1156 
1157  ideal& TT = m_syzTails;
1158  const ring& R = m_rBaseRing;
1159 
1160 // if( m_sum_bucket == NULL )
1161 // m_sum_bucket = sBucketCreate(R);
1162 // assume ( sIsEmpty(m_sum_bucket) );
1163 
1164  if( m_spoly_bucket == NULL )
1166 
1167 
1168  assume( IDELEMS(L) == IDELEMS(T) );
1169 
1170 #ifdef SING_NDEBUG
1171  int t, r; // for rtimer benchmarking in prot realease mode
1172 #endif
1173 
1174  if( UNLIKELY(OPT__TREEOUTPUT) )
1175  Print("\n{ \"syzygylayer\": \"%d\", \"hybridnf\": \"%d\", \"diagrams\": \n[", OPT__SYZNUMBER, OPT__HYBRIDNF );
1176 
1177  if( UNLIKELY(OPT__PROT) ) Print("\n[%d]", OPT__SYZNUMBER );
1178 
1179  if( m_syzLeads == NULL )
1180  {
1181 #ifdef SING_NDEBUG
1183  {
1184  t = getTimer(); r = getRTimer();
1185  Print("\n%% %5d **!TIME4!** SchreyerSyzygyComputation::ComputeSyzygy::ComputeLeadingSyzygyTerms: t: %d, r: %d\n", r, t, r);
1186  }
1187 #endif
1188 
1189  ComputeLeadingSyzygyTerms( OPT__LEAD2SYZ && !OPT__IGNORETAILS ); // 2 terms OR 1 term!
1190 
1191 #ifdef SING_NDEBUG
1192  if( UNLIKELY(OPT__PROT & RTIMER_BENCHMARKING) )
1193  {
1194  t = getTimer() - t; r = getRTimer() - r;
1195  Print("\n%% %5d **!TIME4!** SchreyerSyzygyComputation::ComputeSyzygy::ComputeLeadingSyzygyTerms: dt: %d, dr: %d\n", getRTimer(), t, r);
1196  }
1197 #endif
1198 
1199  }
1200 
1201  assume( m_syzLeads != NULL );
1202  ideal& LL = m_syzLeads;
1203  const int size = IDELEMS(LL);
1204 
1205  TT = idInit(size, 0);
1206 
1207  if( size == 1 && LL->m[0] == NULL )
1208  {
1209  if( UNLIKELY(OPT__TREEOUTPUT) )
1210  PrintS("]},");
1211  return;
1212  }
1213 
1214 
1215  // use hybrid (Schreyer NF) method?
1216  const bool method = (OPT__HYBRIDNF == 1); // || (OPT__HYBRIDNF == 2 && OPT__SYZNUMBER < 3);
1217 
1218  if( UNLIKELY(OPT__PROT) ) Print("[%s NF|%s]",(method) ? "PR" : "TT", (NOPRODUCT == 1)? "_,_": "^*^" );
1219 
1220 
1221  if( LIKELY(!OPT__IGNORETAILS) )
1222  {
1223  if( T != NULL )
1224  {
1225 #ifdef SING_NDEBUG
1226  if( UNLIKELY(OPT__PROT & RTIMER_BENCHMARKING) )
1227  {
1228  t = getTimer(); r = getRTimer();
1229  Print("\n%% %5d **!TIME4!** SchreyerSyzygyComputation::ComputeSyzygy::SetUpTailTerms(): t: %d, r: %d\n", r, t, r);
1230  }
1231 #endif
1232 
1233  SetUpTailTerms();
1234 
1235 #ifdef SING_NDEBUG
1236  if( UNLIKELY(OPT__PROT & RTIMER_BENCHMARKING) )
1237  {
1238  t = getTimer() - t; r = getRTimer() - r;
1239  Print("\n%% %5d **!TIME4!** SchreyerSyzygyComputation::ComputeSyzygy::SetUpTailTerms(): dt: %d, dr: %d\n", getRTimer(), t, r);
1240  }
1241 #endif
1242  }
1243  }
1244 
1245 #ifdef SING_NDEBUG
1246  if( UNLIKELY(OPT__PROT & RTIMER_BENCHMARKING) )
1247  {
1248  t = getTimer(); r = getRTimer();
1249  Print("\n%% %5d **!TIME4!** SchreyerSyzygyComputation::ComputeSyzygy::SyzygyLift: t: %d, r: %d\n", r, t, r);
1250  }
1251 #endif
1252 
1253 #ifndef SING_NDEBUG
1254  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1255 #endif
1256 
1257 // for( int k = 0; k < size; ++k ) // TODO: should be fine now!
1258  for( int k = size - 1; k >= 0; --k )
1259  {
1260  const poly a = LL->m[k]; assume( a != NULL );
1261 
1262  poly a2 = pNext(a);
1263 
1264  // Splitting 2-terms Leading syzygy module
1265  if( a2 != NULL )
1266  pNext(a) = NULL;
1267 
1268  if( UNLIKELY(OPT__IGNORETAILS) )
1269  {
1270  TT->m[k] = NULL;
1271 
1272  assume( a2 != NULL );
1273 
1274  if( a2 != NULL )
1275  p_Delete(&a2, R);
1276 
1277  continue;
1278  }
1279 
1280  // TT->m[k] = a2;
1281 
1282 #ifndef SING_NDEBUG
1283  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1284 #endif
1285 
1286  poly nf;
1287 
1288  if( method )
1289  nf = SchreyerSyzygyNF(a, a2);
1290  else
1291  nf = TraverseNF(a, a2);
1292 
1293 #ifndef SING_NDEBUG
1294  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1295 #endif
1296 
1297  TT->m[k] = nf;
1298 
1299  if( UNLIKELY(OPT__SYZCHECK) )
1300  {
1301  // TODO: check the correctness (syzygy property): a + TT->m[k] should be a syzygy!!!
1302 
1303  poly s = pp_Add_qq( a, TT->m[k], R); // current syzygy
1304 
1305  poly vp = p_VectorProductLT(s, L, T, R);
1306 
1307  if( UNLIKELY( OPT__DEBUG && (vp != NULL) && ! OPT__TREEOUTPUT ) )
1308  {
1309  Warn("SchreyerSyzygyComputation::ComputeSyzygy: failed syzygy property for syzygy [%d], non-zero image is as follows: ", k);
1310  dPrint(vp, R, R, 0); p_Delete(&vp, R);
1311 
1312  PrintS("SchreyerSyzygyComputation::ComputeSyzygy: Wrong syzygy is as follows: ");
1313  s = pp_Add_qq( a, TT->m[k], R);
1314  dPrint(s, R, R, 0); p_Delete(&s, R);
1315 
1316  PrintS("SchreyerSyzygyComputation::ComputeSyzygy: Testing with the other method");
1317 
1318  if( !method )
1319  s = SchreyerSyzygyNF(a, a2);
1320  else
1321  s = TraverseNF(a, a2);
1322 
1323  s = p_Add_q( p_Copy(a, R), s, R); // another syzygy // :((((
1324  PrintS("SchreyerSyzygyComputation::ComputeSyzygy: The other method gives the following syzygy: ");
1325  dPrint(s, R, R, 0);
1326 
1327  vp = p_VectorProductLT(s, L, T, R);
1328 
1329  if( vp == NULL )
1330  {
1331  PrintS("SchreyerSyzygyComputation::ComputeSyzygy: .... which is correct!!! ");
1332  } else
1333  {
1334  Warn("SchreyerSyzygyComputation::ComputeSyzygy: failed to compute syzygy tail[%d] with both methods!!! Non-zero image (2nd) is as follows: ", k);
1335  dPrint(vp, R, R, 0);
1336  }
1337 
1338 #ifndef SING_NDEBUG
1339  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1340 #endif
1341 
1342  } else
1343  assume( vp == NULL );
1344 
1345  if( UNLIKELY( OPT__PROT && (vp != NULL) ) ) Warn("ERROR: SyzCheck failed, wrong tail: [%d]\n\n", k); // check k'th syzygy failed
1346 
1347  p_Delete(&vp, R);
1348  }
1349 
1350 #ifndef SING_NDEBUG
1351  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1352 #endif
1353  }
1354 
1355 #ifdef SING_NDEBUG
1356  if( UNLIKELY( OPT__PROT & RTIMER_BENCHMARKING ) )
1357  {
1358  t = getTimer() - t; r = getRTimer() - r;
1359  Print("\n%% %5d **!TIME4!** SchreyerSyzygyComputation::ComputeSyzygy::SyzygyLift: dt: %d, dr: %d\n", getRTimer(), t, r);
1360  }
1361 #endif
1362 
1363  TT->rank = id_RankFreeModule(TT, R);
1364 
1365  if( UNLIKELY(OPT__TREEOUTPUT) )
1366  PrintS("\n]},");
1367 
1368  if( UNLIKELY(OPT__PROT) ) PrintLn();
1369 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
int OPT__SYZNUMBER
Syzygy level (within a resolution)
Definition: syzextra.h:221
#define NOPRODUCT
Definition: syzextra.h:36
poly TraverseNF(const poly syz_lead, const poly syz_2=NULL) const
Definition: syzextra.cc:1036
const poly a
Definition: syzextra.cc:212
void PrintLn()
Definition: reporter.cc:322
#define Print
Definition: emacs.cc:83
#define RTIMER_BENCHMARKING
Definition: syzextra.cc:64
ideal m_syzLeads
output (syzygy) leading terms (+2nd terms?)
Definition: syzextra.h:516
const int OPT__HYBRIDNF
Use the usual NF's S-poly reduction while dropping lower order terms 2 means - smart selection! ...
Definition: syzextra.h:214
const int OPT__SYZCHECK
CheckSyzygyProperty: TODO.
Definition: syzextra.h:232
poly SchreyerSyzygyNF(const poly syz_lead, poly syz_2=NULL) const
Main HybridNF == 1: poly reduce + LOT + LCM?
Definition: syzextra.cc:1419
const ideal m_idLeads
input leading terms
Definition: syzextra.h:510
int getRTimer()
Definition: timer.cc:172
assume(R!=NULL)
ideal m_syzTails
output (syzygy) tails
Definition: syzextra.h:519
int k
Definition: cfEzgcd.cc:93
#define UNLIKELY(expression)
Definition: tgb_internal.h:838
#define LIKELY(expression)
Definition: tgb_internal.h:837
kBucket_pt m_spoly_bucket
for S-Polynomial reductions
Definition: syzextra.h:563
const int OPT__DEBUG
output all the intermediate states
Definition: syzextra.h:204
CReducerFinder m_checker
for checking tail-terms and makeing them irreducible (wrt m_LS!)
Definition: syzextra.h:531
kBucket_pt kBucketCreate(ring bucket_ring)
Creation/Destruction of buckets.
Definition: kbuckets.cc:197
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:811
Definition: gnumpfl.cc:60
const ring r
Definition: syzextra.cc:208
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
const bool OPT__PROT
TEST_OPT_PROT.
Definition: syzextra.h:235
void SetUpTailTerms()
Convert the given ideal of tails into the internal representation (with reducers!) Preprocess m_idTai...
Definition: syzextra.cc:684
void ComputeLeadingSyzygyTerms(bool bComputeSecondTerms=true)
Computes Syz(leads) or only LEAD of it. The result is stored into m_syzLeads.
Definition: syzextra.cc:1371
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
void PrintS(const char *s)
Definition: reporter.cc:294
#define IDELEMS(i)
Definition: simpleideals.h:24
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition: cf_ops.cc:600
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:850
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:38
#define NULL
Definition: omList.c:10
void Verify() const
Definition: syzextra.cc:2428
#define R
Definition: sirandom.c:26
const int OPT__TREEOUTPUT
output lifting tree
Definition: syzextra.h:229
const ring m_rBaseRing
global base ring
Definition: syzextra.h:241
#define pNext(p)
Definition: monomials.h:43
const int OPT__IGNORETAILS
ignore tails and compute the pure Schreyer frame
Definition: syzextra.h:218
const ideal m_idTails
input tails
Definition: syzextra.h:513
static jList * T
Definition: janet.cc:37
polyrec * poly
Definition: hilb.h:10
static poly p_Add_q(poly p, poly q, const ring r)
Definition: p_polys.h:884
int getTimer()
Definition: timer.cc:97
void dPrint(const ideal id, const ring lmRing=currRing, const ring tailRing=currRing, const int nTerms=0)
prints an ideal, optionally with details
static FORCE_INLINE poly p_VectorProductLT(poly s, const ideal &L, const ideal &T, const ring &R)
Definition: syzextra.cc:158
static FORCE_INLINE poly pp_Add_qq(const poly a, const poly b, const ring R)
Definition: syzextra.cc:153
#define Warn
Definition: emacs.cc:80
void SchreyerSyzygyComputation::PrintStats ( ) const

print statistics about the used heuristics

Definition at line 767 of file syzextra.cc.

768 {
769  Print("SchreyerSyzygyComputation Stats: (PP/ST: {c: %lu, C: %lu, P: %lu} + %lu, LOT: %lu, LCM: %lu, ST:%lu, LK: %lu {*: %lu})\n",
770  m_stat[1], m_stat[2], m_stat[3], m_stat[0],
771  m_stat[4], m_stat[5],
772  m_stat[8],
773  m_stat[6] + m_stat[7], m_stat[7]
774  );
775 }
#define Print
Definition: emacs.cc:83
unsigned long m_stat[9]
Statistics: 0..3: as in SetUpTailTerms()::PreProcessTerm() // TODO!!?? 4: number of terms discarded d...
Definition: syzextra.h:571
void SchreyerSyzygyComputation::ReadOffResult ( ideal &  syzL,
ideal &  syzT 
)
inline

Read off the results while detaching them from this object NOTE: no copy!

Definition at line 449 of file syzextra.h.

450  {
451  syzL = m_syzLeads; syzT = m_syzTails;
452 
453  m_syzLeads = m_syzTails = NULL; // m_LS ?
454 
455  if ( UNLIKELY(OPT__PROT) )
456  PrintStats();
457  }
ideal m_syzLeads
output (syzygy) leading terms (+2nd terms?)
Definition: syzextra.h:516
ideal m_syzTails
output (syzygy) tails
Definition: syzextra.h:519
#define UNLIKELY(expression)
Definition: tgb_internal.h:838
const bool OPT__PROT
TEST_OPT_PROT.
Definition: syzextra.h:235
void PrintStats() const
print statistics about the used heuristics
Definition: syzextra.cc:767
#define NULL
Definition: omList.c:10
poly SchreyerSyzygyComputation::ReduceTerm ( poly  multiplier,
poly  term4reduction,
poly  syztermCheck 
) const

TODO: save shortcut (syz: |-.->) LM(m) * "t" -> ? ???

Definition at line 1895 of file syzextra.cc.

1896 {
1897 #ifndef SING_NDEBUG
1898  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1899 #endif
1900 
1902 
1903  const ideal& L = m_idLeads;
1904  const ideal& T = m_idTails;
1905  const ring& r = m_rBaseRing;
1906 
1907  assume( multiplier != NULL );
1908  assume( term4reduction != NULL );
1909 
1910 
1911  assume( L != NULL );
1912  assume( T != NULL );
1913 
1914  p_Test(multiplier, r);
1915 
1916  // simple implementation with FindReducer:
1917  poly s = NULL;
1918 
1919  if( (!OPT__TAILREDSYZ) || m_lcm.Check(multiplier) ) // TODO: UNLIKELY / LIKELY ????
1920  {
1921 #if NOPRODUCT
1922  s = m_div.FindReducer(multiplier, term4reduction, syztermCheck, m_checker); // s ????
1923  p_Test(s, r);
1924 
1925  p_Test(multiplier, r);
1926 
1927  if( s == NULL ) // No Reducer?
1928  {
1929  if( UNLIKELY(OPT__PROT) ) ++ m_stat[4]; // PrintS("$"); // LOT
1930  return NULL;
1931  }
1932 
1933  if( UNLIKELY( OPT__TREEOUTPUT ) )
1934  {
1935  poly product = pp_Mult_mm(multiplier, term4reduction, r);
1936  PrintS("{ \"proc\": \"RdTrmNoP\", \"nodelabel\": \""); writeLatexTerm(s, r); PrintS("\", \"edgelabel\": \""); writeLatexTerm(product, r, false);
1937  p_Delete(&product, r);
1938  }
1939 
1940 #else
1941  // NOTE: only LT(term4reduction) should be used in the following:
1942  poly product = pp_Mult_mm(multiplier, term4reduction, r);
1943  p_Test(product, r);
1944 
1945  s = m_div.FindReducer(product, syztermCheck, m_checker); // ??
1946  p_Test(s, r);
1947 
1948  p_Test(multiplier, r);
1949 
1950  if( s == NULL ) // No Reducer?
1951  {
1952  if( UNLIKELY(OPT__PROT) ) ++ m_stat[4]; // PrintS("$"); // LOT
1953  return NULL;
1954  }
1955 
1956  if( UNLIKELY(OPT__TREEOUTPUT) )
1957  {
1958  PrintS("{ \"proc\": \"RdTrmP\", \"nodelabel\": \""); writeLatexTerm(s, r); PrintS("\", \"edgelabel\": \""); writeLatexTerm(product, r, false);
1959  }
1960 
1961  p_Delete(&product, r);
1962 #endif
1963  }
1964 
1965 #ifndef SING_NDEBUG
1966  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1967 #endif
1968 
1969  if( s == NULL ) // No Reducer?
1970  {
1972  {
1973  ++ m_stat[5]; // PrintS("%"); // check LCM !
1974 #ifndef SING_NDEBUG
1975  if( OPT__DEBUG )
1976  {
1977  PrintS("\n%: RedTail("); dPrint(multiplier, r, r, 0);
1978  PrintS(" * : "); dPrint(term4reduction, r,r,0 );
1979  PrintS(", { "); dPrint(syztermCheck,r,r,0 );
1980  PrintS(" }) "); PrintLn();
1981  }
1982 #endif
1983  }
1984  return NULL;
1985  }
1986 
1987  p_Test(multiplier, r);
1988  p_Test(s, r);
1989 
1990  poly b = leadmonom(s, r);
1991 
1992  p_Test(b, r);
1993 
1994  const int c = p_GetComp(s, r) - 1;
1995  assume( c >= 0 && c < IDELEMS(T) );
1996 
1997 
1998  if( UNLIKELY( OPT__TREEOUTPUT ) )
1999  PrintS("\", \"children\": [");
2000 
2001  const poly t = TraverseTail(b, c); // T->m[c];
2002 
2003  if( UNLIKELY( OPT__TREEOUTPUT ) )
2004  {
2005 
2006  PrintS("], \"noderesult\": \"");
2007  writeLatexTerm(t, r, true, false);
2008  PrintS("\"");
2009 
2010  if( syztermCheck != NULL )
2011  {
2012  PrintS(", \"syztermCheck\":\"" );
2013  writeLatexTerm(syztermCheck, r, true, false);
2014  PrintS("\" },");
2015  } else
2016  PrintS(" },");
2017  }
2018 
2019  p_Test(multiplier, r);
2020 
2021  if( t != NULL )
2022  s = p_Add_q(s, t, r);
2023 
2024 
2025 #ifndef SING_NDEBUG
2026  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
2027 #endif
2028 
2029  p_Test(multiplier, r);
2030 
2031  return s;
2032 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
void PrintLn()
Definition: reporter.cc:322
poly leadmonom(const poly p, const ring r, const bool bSetZeroComp)
return a new term: leading coeff * leading monomial of p with 0 leading component! ...
Definition: syzextra.cc:473
const ideal m_idLeads
input leading terms
Definition: syzextra.h:510
assume(R!=NULL)
#define p_GetComp(p, r)
Definition: monomials.h:72
static poly pp_Mult_mm(poly p, poly m, const ring r)
Definition: p_polys.h:962
#define UNLIKELY(expression)
Definition: tgb_internal.h:838
const int OPT__DEBUG
output all the intermediate states
Definition: syzextra.h:204
CReducerFinder m_checker
for checking tail-terms and makeing them irreducible (wrt m_LS!)
Definition: syzextra.h:531
const int OPT__TAILREDSYZ
Reduce syzygy tails wrt the leading syzygy terms.
Definition: syzextra.h:210
const ring r
Definition: syzextra.cc:208
const bool OPT__PROT
TEST_OPT_PROT.
Definition: syzextra.h:235
poly TraverseTail(poly multiplier, const int tail) const
High level caching function!!!
Definition: syzextra.cc:1594
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
void PrintS(const char *s)
Definition: reporter.cc:294
#define IDELEMS(i)
Definition: simpleideals.h:24
#define p_Test(p, r)
Definition: p_polys.h:160
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:850
#define NULL
Definition: omList.c:10
void Verify() const
Definition: syzextra.cc:2428
poly FindReducer(const poly multiplier, const poly monom, const poly syzterm, const CReducerFinder &checker) const
Definition: syzextra.cc:2602
const int OPT__TREEOUTPUT
output lifting tree
Definition: syzextra.h:229
const ring m_rBaseRing
global base ring
Definition: syzextra.h:241
unsigned long m_stat[9]
Statistics: 0..3: as in SetUpTailTerms()::PreProcessTerm() // TODO!!?? 4: number of terms discarded d...
Definition: syzextra.h:571
const int OPT__IGNORETAILS
ignore tails and compute the pure Schreyer frame
Definition: syzextra.h:218
const CLCM m_lcm
Bitmask for variables occuring in leading terms.
Definition: syzextra.h:525
bool Check(const poly m) const
Definition: syzextra.cc:3068
const ideal m_idTails
input tails
Definition: syzextra.h:513
static jList * T
Definition: janet.cc:37
polyrec * poly
Definition: hilb.h:10
static poly p_Add_q(poly p, poly q, const ring r)
Definition: p_polys.h:884
void dPrint(const ideal id, const ring lmRing=currRing, const ring tailRing=currRing, const int nTerms=0)
prints an ideal, optionally with details
const poly b
Definition: syzextra.cc:213
static END_NAMESPACE void writeLatexTerm(const poly t, const ring r, const bool bCurrSyz=true, const bool bLTonly=true)
writes a monomial (p), uses form x*gen(.) if ko != coloumn number of p
Definition: syzextra.cc:336
poly SchreyerSyzygyComputation::SchreyerSyzygyNF ( const poly  syz_lead,
poly  syz_2 = NULL 
) const

Main HybridNF == 1: poly reduce + LOT + LCM?

Definition at line 1419 of file syzextra.cc.

1420 {
1422 
1423  const ideal& L = m_idLeads;
1424  const ideal& T = m_idTails;
1425  const ring& r = m_rBaseRing;
1426 
1427  assume( syz_lead != NULL );
1428 
1429 
1430 #ifndef SING_NDEBUG
1431  if( OPT__DEBUG )
1432  {
1433  PrintS("SchreyerSyzygyComputation::SchreyerSyzygyNF(syz_lead, poly syz_2), \n");
1434  PrintS("syz_lead: \n");
1435  dPrint(syz_lead, r, r, 0);
1436  PrintS("syz_2: \n");
1437  dPrint(syz_2, r, r, 0);
1438  PrintLn();
1439  }
1440 #endif
1441 
1442  if( UNLIKELY( OPT__TREEOUTPUT ) )
1443  {
1444  PrintS("{ \"nodelabel\": \""); writeLatexTerm(syz_lead, r);
1445  PrintS("\", \"children\": [");
1446  }
1447 
1448  if( syz_2 == NULL )
1449  {
1450  const int rr = p_GetComp(syz_lead, r) - 1;
1451 
1452  assume( rr >= 0 && rr < IDELEMS(T) );
1453  assume( rr >= 0 && rr < IDELEMS(L) );
1454 
1455 #if NOPRODUCT
1456  syz_2 = m_div.FindReducer(syz_lead, L->m[rr], syz_lead, m_checker);
1457  p_Test(syz_2, r);
1458 
1459  if( UNLIKELY( OPT__TREEOUTPUT ) )
1460  {
1461  PrintS("{ \"nodelabel\": \""); writeLatexTerm(syz_2, r); PrintS("\" },");
1462  }
1463 #else
1464  poly aa = leadmonom(syz_lead, r); assume( aa != NULL); // :(
1465  aa = p_Mult_mm(aa, L->m[rr], r);
1466 
1467  if( UNLIKELY( OPT__TREEOUTPUT ) )
1468  {
1469  PrintS("{ \"nodelabel\": \""); writeLatexTerm(syz_2, r); PrintS("\", \"edgelabel\": \""); writeLatexTerm(aa, r, false); PrintS("\" },");
1470  }
1471 
1472  syz_2 = m_div.FindReducer(aa, syz_lead, m_checker);
1473  p_Test(syz_2, r);
1474 
1475  p_Delete(&aa, r);
1476 #endif
1477 
1478  }
1479 
1480  assume( syz_2 != NULL ); // by construction of S-Polynomial
1481 
1482  assume( L != NULL );
1483  assume( T != NULL );
1484 
1485  assume( IDELEMS(L) == IDELEMS(T) );
1486 
1487  int c = p_GetComp(syz_lead, r) - 1;
1488 
1489  assume( c >= 0 && c < IDELEMS(T) );
1490 
1491  if( m_spoly_bucket == NULL )
1493 
1495 
1496 
1497  kBucket_pt bucket = m_spoly_bucket; assume( bucket != NULL ); kbTest(bucket); m_spoly_bucket = NULL;
1498 
1499 // kBucketInit(bucket, NULL, 0); // not needed!?
1500 
1501  poly p = leadmonom(syz_lead, r); // :(
1502 // poly spoly = pp_Mult_qq(p, T->m[c], r);
1503  kBucket_Plus_mm_Mult_pp(bucket, p, T->m[c], 0); // TODO: store pLength(T->m[c]) separately!?
1504  p_Delete(&p, r);
1505 
1506  kbTest(bucket);
1507 
1508  c = p_GetComp(syz_2, r) - 1;
1509  assume( c >= 0 && c < IDELEMS(T) );
1510 
1511  p = leadmonom(syz_2, r); // :(
1512 // spoly = p_Add_q(spoly, pp_Mult_qq(p, T->m[c], r), r);
1513  kBucket_Plus_mm_Mult_pp(bucket, p, T->m[c], 0); // pLength(T->m[c])?!
1514  kbTest(bucket);
1515  p_Delete(&p, r);
1516 
1517 // const bool bUsePolynomial = TEST_OPT_NOT_BUCKETS; // || (pLength(spoly) < MIN_LENGTH_BUCKET);
1518 // CPolynomialSummator tail(r, bUsePolynomial);
1519  tail.Add(syz_2, 1);
1520 
1521  kbTest(bucket);
1522  for( poly spoly = kBucketExtractLm(bucket); spoly != NULL; p_LmDelete(&spoly, r), spoly = kBucketExtractLm(bucket))
1523  {
1524  kbTest(bucket);
1525  poly t = m_div.FindReducer(spoly, NULL, m_checker);
1526  p_Test(t, r);
1527 
1528  if( t != NULL )
1529  {
1530  p = leadmonom(t, r); // :(
1531  c = p_GetComp(t, r) - 1;
1532 
1533  assume( c >= 0 && c < IDELEMS(T) );
1534 
1535  if(UNLIKELY( OPT__TREEOUTPUT ))
1536  {
1537  PrintS("{ \"nodelabel\": \""); writeLatexTerm(t, r); PrintS("\", \"edgelabel\": \""); writeLatexTerm(spoly, r, false); PrintS("\" },");
1538  }
1539 
1540  kBucket_Plus_mm_Mult_pp(bucket, p, T->m[c], 0); // pLength(T->m[c])?
1541 // spoly = p_Add_q(spoly, pp_Mult_qq(p, T->m[c], r), r);
1542 
1543  p_Delete(&p, r);
1544 
1545  tail.Add(t, 1);
1546  } // otherwise discard that leading term altogether!
1547  else
1548  if( UNLIKELY(OPT__PROT) ) ++ m_stat[4]; // PrintS("$"); // LOT
1549 
1550  kbTest(bucket);
1551  }
1552 
1553  kbTest(bucket);
1554 
1555  // now bucket must be empty!
1556  assume( kBucketClear(bucket) == NULL );
1557 
1558  const poly result = tail.ClearAdd(); // TODO: use Merge with sBucket???
1559 
1560 
1561  if( m_spoly_bucket == NULL )
1563  else
1564  kBucketDestroy(&bucket);
1565 
1566 
1567  if( UNLIKELY(OPT__TREEOUTPUT) )
1568  {
1569  PrintS("]},");
1570  }
1571 
1572 #ifndef SING_NDEBUG
1573  if( OPT__DEBUG )
1574  {
1575  PrintS("SchreyerSyzygyComputation::SchreyerSyzygyNF(syz_lead, poly syz_2) =>>> \n");
1576  dPrint(result, r, r, 0);
1577  PrintLn();
1578  // TODO: Add SyzCheck!!!???
1579  }
1580 #endif
1581 
1582  return result;
1583 }
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
Definition: kbuckets.cc:499
BOOLEAN kbTest(kBucket_pt bucket)
Tests.
Definition: kbuckets.cc:185
void PrintLn()
Definition: reporter.cc:322
poly leadmonom(const poly p, const ring r, const bool bSetZeroComp)
return a new term: leading coeff * leading monomial of p with 0 leading component! ...
Definition: syzextra.cc:473
const ideal m_idLeads
input leading terms
Definition: syzextra.h:510
return P p
Definition: myNF.cc:203
static poly p_Mult_mm(poly p, poly m, const ring r)
Definition: p_polys.h:973
assume(R!=NULL)
#define p_GetComp(p, r)
Definition: monomials.h:72
#define UNLIKELY(expression)
Definition: tgb_internal.h:838
kBucket_pt m_spoly_bucket
for S-Polynomial reductions
Definition: syzextra.h:563
const int OPT__DEBUG
output all the intermediate states
Definition: syzextra.h:204
CReducerFinder m_checker
for checking tail-terms and makeing them irreducible (wrt m_LS!)
Definition: syzextra.h:531
kBucket_pt kBucketCreate(ring bucket_ring)
Creation/Destruction of buckets.
Definition: kbuckets.cc:197
poly kBucketExtractLm(kBucket_pt bucket)
Definition: kbuckets.cc:489
const ring r
Definition: syzextra.cc:208
void kBucketDestroy(kBucket_pt *bucket_pt)
Definition: kbuckets.cc:204
const bool OPT__PROT
TEST_OPT_PROT.
Definition: syzextra.h:235
P bucket
Definition: myNF.cc:79
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
void PrintS(const char *s)
Definition: reporter.cc:294
#define IDELEMS(i)
Definition: simpleideals.h:24
#define p_Test(p, r)
Definition: p_polys.h:160
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:850
#define NULL
Definition: omList.c:10
void kBucket_Plus_mm_Mult_pp(kBucket_pt bucket, poly m, poly p, int l)
Bpoly == Bpoly + m*p; where m is a monom Does not destroy p and m assume (l <= 0 || pLength(p) == l) ...
Definition: kbuckets.cc:803
poly FindReducer(const poly multiplier, const poly monom, const poly syzterm, const CReducerFinder &checker) const
Definition: syzextra.cc:2602
const int OPT__TREEOUTPUT
output lifting tree
Definition: syzextra.h:229
const ring m_rBaseRing
global base ring
Definition: syzextra.h:241
SBucketFactory m_sum_bucket_factory
TODO: look into m_idTailTerms!!!!!!!!!!!!!!!!!!!!!!!! map? heaps???
Definition: syzextra.h:560
unsigned long m_stat[9]
Statistics: 0..3: as in SetUpTailTerms()::PreProcessTerm() // TODO!!?? 4: number of terms discarded d...
Definition: syzextra.h:571
const int OPT__IGNORETAILS
ignore tails and compute the pure Schreyer frame
Definition: syzextra.h:218
static void p_LmDelete(poly p, const ring r)
Definition: p_polys.h:707
const ideal m_idTails
input tails
Definition: syzextra.h:513
static jList * T
Definition: janet.cc:37
polyrec * poly
Definition: hilb.h:10
void dPrint(const ideal id, const ring lmRing=currRing, const ring tailRing=currRing, const int nTerms=0)
prints an ideal, optionally with details
static END_NAMESPACE void writeLatexTerm(const poly t, const ring r, const bool bCurrSyz=true, const bool bLTonly=true)
writes a monomial (p), uses form x*gen(.) if ko != coloumn number of p
Definition: syzextra.cc:336
return result
Definition: facAbsBiFact.cc:76
void SchreyerSyzygyComputation::SetUpTailTerms ( )

Convert the given ideal of tails into the internal representation (with reducers!) Preprocess m_idTails as well...?

Definition at line 684 of file syzextra.cc.

685 {
686  const ideal idTails = m_idTails;
687  assume( idTails != NULL );
688  assume( idTails->m != NULL );
689  const ring r = m_rBaseRing;
690 
691  unsigned long pp[4] = {0,0,0,0}; // count preprocessed terms...
692 
693 #ifndef SING_NDEBUG
694  if( OPT__DEBUG | 0)
695  {
696  PrintS("SchreyerSyzygyComputation::SetUpTailTerms(): Tails: \n");
697  dPrint(idTails, r, r, 0);
698  }
699 #endif
700 
701  for( int p = IDELEMS(idTails) - 1; p >= 0; --p )
702  for( poly* tt = &(idTails->m[p]); (*tt) != NULL; )
703  {
704  const poly t = *tt;
705  const int k = m_div.PreProcessTerm(t, m_checker); // 0..3
706  assume( 0 <= k && k <= 3 );
707 
708  pp[k]++; // collect stats
709 
710  if( k )
711  {
712 #ifndef SING_NDEBUG
713  if( OPT__DEBUG)
714  {
715  Print("SchreyerSyzygyComputation::SetUpTailTerms(): PP (%d) the following TT: \n", k);
716  dPrint(t, r, r, 0);
717  }
718 #endif
719 
720  (*tt) = p_LmDeleteAndNext(t, r); // delete the lead and next...
721  }
722  else
723  tt = &pNext(t); // go next?
724 
725  }
726 
727 #ifndef SING_NDEBUG
728  if( OPT__DEBUG | 0)
729  {
730  PrintS("SchreyerSyzygyComputation::SetUpTailTerms(): Preprocessed Tails: \n");
731  dPrint(idTails, r, r, 0);
732  }
733 #endif
734 
735  if( UNLIKELY(OPT__PROT) )
736  {
737  Print("(PP/ST: {c: %lu, C: %lu, P: %lu} + %lu)", pp[1], pp[2], pp[3], pp[0]);
738  m_stat[0] += pp [0]; m_stat[1] += pp [1]; m_stat[2] += pp [2]; m_stat[3] += pp [3];
739  }
740 }
#define Print
Definition: emacs.cc:83
static poly p_LmDeleteAndNext(poly p, const ring r)
Definition: p_polys.h:721
return P p
Definition: myNF.cc:203
assume(R!=NULL)
int PreProcessTerm(const poly t, CReducerFinder &syzChecker) const
is the term to be "preprocessed" as lower order term or lead to only reducible syzygies...
Definition: syzextra.cc:589
int k
Definition: cfEzgcd.cc:93
#define UNLIKELY(expression)
Definition: tgb_internal.h:838
const int OPT__DEBUG
output all the intermediate states
Definition: syzextra.h:204
CReducerFinder m_checker
for checking tail-terms and makeing them irreducible (wrt m_LS!)
Definition: syzextra.h:531
poly pp
Definition: myNF.cc:296
const ring r
Definition: syzextra.cc:208
const bool OPT__PROT
TEST_OPT_PROT.
Definition: syzextra.h:235
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
void PrintS(const char *s)
Definition: reporter.cc:294
#define IDELEMS(i)
Definition: simpleideals.h:24
#define NULL
Definition: omList.c:10
const ring m_rBaseRing
global base ring
Definition: syzextra.h:241
#define pNext(p)
Definition: monomials.h:43
unsigned long m_stat[9]
Statistics: 0..3: as in SetUpTailTerms()::PreProcessTerm() // TODO!!?? 4: number of terms discarded d...
Definition: syzextra.h:571
const ideal m_idTails
input tails
Definition: syzextra.h:513
polyrec * poly
Definition: hilb.h:10
void dPrint(const ideal id, const ring lmRing=currRing, const ring tailRing=currRing, const int nTerms=0)
prints an ideal, optionally with details
poly SchreyerSyzygyComputation::TraverseNF ( const poly  syz_lead,
const poly  syz_2 = NULL 
) const

Definition at line 1036 of file syzextra.cc.

1037 {
1038 #ifndef SING_NDEBUG
1039  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1040 #endif
1041 
1042  const ideal& L = m_idLeads;
1043  const ideal& T = m_idTails;
1044 
1045  const ring& R = m_rBaseRing;
1046 
1047  const int r = p_GetComp(a, R) - 1;
1048 
1049  assume( r >= 0 && r < IDELEMS(T) );
1050  assume( r >= 0 && r < IDELEMS(L) );
1051 
1052  assume( a != NULL );
1053 
1054 #ifndef SING_NDEBUG
1055  if( OPT__DEBUG )
1056  {
1057  PrintS("SchreyerSyzygyComputation::TraverseNF(syz_lead, poly syz_2), \n");
1058  PrintS("syz_lead: \n");
1059  dPrint(a, R, R, 0);
1060  PrintS("syz_2: \n");
1061  dPrint(a2, R, R, 0);
1062  PrintLn();
1063  }
1064 #endif
1065 
1066  if( UNLIKELY(OPT__TREEOUTPUT) )
1067  {
1068  PrintS("{ \"proc\": \"TraverseNF\", \"nodelabel\": \"");
1069  writeLatexTerm(a, R);
1070  PrintS("\", \"children\": [");
1071  }
1072 
1073  poly aa = leadmonom(a, R); assume( aa != NULL); // :(
1074 
1075 #ifndef SING_NDEBUG
1076  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1077 #endif
1078 
1079  poly t = TraverseTail(aa, r);
1080 
1081  if( a2 != NULL )
1082  {
1083  assume( OPT__LEAD2SYZ );
1084 
1085  if( UNLIKELY(OPT__TREEOUTPUT) )
1086  {
1087 
1088  PrintS("{ \"proc\": \"TraverseNF2\", \"nodelabel\": \"");
1089  writeLatexTerm(a2, R);
1090  PrintS("\", \"children\": [");
1091  }
1092 
1093  // replace the following... ?
1094  const int r2 = p_GetComp(a2, R) - 1; poly aa2 = leadmonom(a2, R); // :(
1095 
1096  assume( r2 >= 0 && r2 < IDELEMS(T) );
1097 
1098  poly s = TraverseTail(aa2, r2);
1099 
1100  p_Delete(&aa2, R);
1101 
1102 
1103  if( UNLIKELY(OPT__TREEOUTPUT) )
1104  {
1105  PrintS("], \"noderesult\": \"");
1106  writeLatexTerm(s, R, true, false);
1107  PrintS("\" },");
1108  }
1109 
1110  t = p_Add_q(a2, p_Add_q(t, s, R), R);
1111 
1112 #ifndef SING_NDEBUG
1113  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1114 #endif
1115 
1116  } else
1117  t = p_Add_q(t, ReduceTerm(aa, L->m[r], a), R); // should be identical to bove with a2
1118 
1119  p_Delete(&aa, R);
1120 
1121  if( UNLIKELY(OPT__TREEOUTPUT) )
1122  {
1123 // poly tt = pp_Add_qq( a, t, R);
1124  PrintS("], \"noderesult\": \"");
1125  writeLatexTerm(t, R, true, false);
1126  PrintS("\" },");
1127 // p_Delete(&tt, R);
1128  }
1129 #ifndef SING_NDEBUG
1130  if( OPT__DEBUG )
1131  {
1132  PrintS("SchreyerSyzygyComputation::TraverseNF(syz_lead, poly syz_2), ==>>> \n");
1133  dPrint(t, R, R, 0);
1134  PrintLn();
1135  }
1136 #endif
1137 
1138 #ifndef SING_NDEBUG
1139  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1140 #endif
1141 
1142  return t;
1143 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
const poly a
Definition: syzextra.cc:212
void PrintLn()
Definition: reporter.cc:322
poly leadmonom(const poly p, const ring r, const bool bSetZeroComp)
return a new term: leading coeff * leading monomial of p with 0 leading component! ...
Definition: syzextra.cc:473
const ideal m_idLeads
input leading terms
Definition: syzextra.h:510
assume(R!=NULL)
#define p_GetComp(p, r)
Definition: monomials.h:72
#define UNLIKELY(expression)
Definition: tgb_internal.h:838
const int OPT__DEBUG
output all the intermediate states
Definition: syzextra.h:204
CReducerFinder m_checker
for checking tail-terms and makeing them irreducible (wrt m_LS!)
Definition: syzextra.h:531
const ring r
Definition: syzextra.cc:208
poly TraverseTail(poly multiplier, const int tail) const
High level caching function!!!
Definition: syzextra.cc:1594
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
void PrintS(const char *s)
Definition: reporter.cc:294
#define IDELEMS(i)
Definition: simpleideals.h:24
poly ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck) const
TODO: save shortcut (syz: |-.->) LM(m) * "t" -> ? ???
Definition: syzextra.cc:1895
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:850
#define NULL
Definition: omList.c:10
void Verify() const
Definition: syzextra.cc:2428
#define R
Definition: sirandom.c:26
const int OPT__TREEOUTPUT
output lifting tree
Definition: syzextra.h:229
const ring m_rBaseRing
global base ring
Definition: syzextra.h:241
const ideal m_idTails
input tails
Definition: syzextra.h:513
static jList * T
Definition: janet.cc:37
polyrec * poly
Definition: hilb.h:10
static poly p_Add_q(poly p, poly q, const ring r)
Definition: p_polys.h:884
void dPrint(const ideal id, const ring lmRing=currRing, const ring tailRing=currRing, const int nTerms=0)
prints an ideal, optionally with details
static END_NAMESPACE void writeLatexTerm(const poly t, const ring r, const bool bCurrSyz=true, const bool bLTonly=true)
writes a monomial (p), uses form x*gen(.) if ko != coloumn number of p
Definition: syzextra.cc:336
poly SchreyerSyzygyComputation::TraverseTail ( poly  multiplier,
const int  tail 
) const

High level caching function!!!

Definition at line 1594 of file syzextra.cc.

1595 {
1596 #ifndef SING_NDEBUG
1597  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1598 #endif
1599 
1600  const ring& r = m_rBaseRing;
1601 
1602  assume(m_idTails != NULL && m_idTails->m != NULL);
1603  assume( tail >= 0 && tail < IDELEMS(m_idTails) );
1604 
1605  p_Test(multiplier, r);
1606 
1607  if( UNLIKELY(OPT__NOCACHING) )
1608  return ComputeImage(multiplier, tail);
1609 
1610  // TODO: store (multiplier, tail) -.-^-.-^-.--> !
1611  TCache::iterator top_itr = m_cache.find(tail);
1612 
1613  if ( top_itr != m_cache.end() )
1614  {
1615  assume( top_itr->first == tail );
1616 
1617  TP2PCache& T = top_itr->second;
1618 
1619  TP2PCache::iterator itr = T.find(multiplier);
1620 
1621  if( itr != T.end() ) // Yey - Reuse!!!
1622  {
1623  assume( p_LmEqual(itr->first, multiplier, r) );
1624 
1625  if( itr->second == NULL ) // leadcoeff plays no role if value is NULL!
1626  return (NULL);
1627 
1628  if( UNLIKELY( OPT__TREEOUTPUT ) )
1629  {
1630 // PrintS("{ \"nodelabel\": \""); writeLatexTerm(multiplier, r, false);
1631 // Print(" \\\\GEN{%d}\", \"children\": [ ", tail + 1);
1632  PrintS("{ \"proc\": \"TTLookup\", \"nodelabel\": \"");
1633  writeLatexTerm(itr->first, r, false); Print(" \\\\GEN{%d}\", \"Lookup\": \"", tail + 1);
1634  writeLatexTerm(itr->second, r, true, false);
1635  PrintS("\", ");
1636  }
1637 
1638  poly p = p_Copy(itr->second, r); // COPY!!!
1639 
1640  p_Test(multiplier, r);
1641 
1642  if( !n_Equal( pGetCoeff(multiplier), pGetCoeff(itr->first), r) ) // normalize coeffs!?
1643  {
1644  number n = n_Div( pGetCoeff(multiplier), pGetCoeff(itr->first), r); // new number
1645 
1646  if( UNLIKELY( OPT__TREEOUTPUT ) )
1647  {
1648  StringSetS("");
1649  n_Write(n, r);
1650  char* s = StringEndS();
1651  Print("\"recale\": \"%s\", ", s);
1652  omFree(s);
1653  }
1654 
1655  if( UNLIKELY( OPT__PROT ) ) ++ m_stat[7]; // PrintS("l*"); // lookup & rescale
1656 
1657  p = p_Mult_nn(p, n, r); // !
1658  n_Delete(&n, r);
1659  } else
1660  if( UNLIKELY( OPT__PROT ) ) ++ m_stat[6]; // PrintS("l"); // lookup no rescale
1661 
1662  if( UNLIKELY(OPT__TREEOUTPUT) )
1663  {
1664  PrintS("\"noderesult\": \""); writeLatexTerm(p, r, true, false); PrintS("\" },");
1665  }
1666 
1667 #ifndef SING_NDEBUG
1668  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1669 #endif
1670  p_Test(multiplier, r);
1671 
1672  return p;
1673  }
1674 
1675 
1676  if( UNLIKELY(OPT__TREEOUTPUT) )
1677  {
1678  Print("{ \"proc\": \"TTStore%d\", \"nodelabel\": \"", tail + 1); writeLatexTerm(multiplier, r, false); Print(" \\\\GEN{%d}\", \"children\": [", tail + 1);
1679  }
1680 
1681  p_Test(multiplier, r);
1682 
1683  const poly p = ComputeImage(multiplier, tail);
1684 
1685  if( UNLIKELY(OPT__TREEOUTPUT) )
1686  {
1687  PrintS("], \"noderesult\": \""); writeLatexTerm(p, r, true, false); PrintS("\" },");
1688  }
1689 
1690  if( UNLIKELY(OPT__PROT) ) ++ m_stat[8]; // PrintS("S"); // store
1691 
1692  p_Test(multiplier, r);
1693 
1694  T.insert( TP2PCache::value_type(myp_Head(multiplier, (p==NULL), r), p) ); // T[ multiplier ] = p;
1695 
1696  p_Test(multiplier, r);
1697 
1698 // if( p == NULL )
1699 // return (NULL);
1700 
1701 #ifndef SING_NDEBUG
1702  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1703 #endif
1704 
1705  return p_Copy(p, r);
1706  }
1707 
1708  CCacheCompare o(r); TP2PCache T(o);
1709 
1710  if( UNLIKELY(OPT__TREEOUTPUT) )
1711  {
1712  Print("{ \"proc\": \"TTStore%d\", \"nodelabel\": \"", 0); writeLatexTerm(multiplier, r, false); Print(" \\\\GEN{%d}\", \"children\": [", tail + 1);
1713  }
1714 
1715  const poly p = ComputeImage(multiplier, tail);
1716 
1717  if( UNLIKELY(OPT__TREEOUTPUT) )
1718  {
1719  PrintS("], \"noderesult\": \""); writeLatexTerm(p, r, true, false); PrintS("\" },");
1720  }
1721 
1722  if( UNLIKELY( OPT__PROT ) ) ++ m_stat[8]; // PrintS("S"); // store // %d", tail + 1);
1723 
1724  T.insert( TP2PCache::value_type(myp_Head(multiplier, (p==NULL), r), p) );
1725 
1726  m_cache.insert( TCache::value_type(tail, T) );
1727 
1728 // if( p == NULL )
1729 // return (NULL);
1730 
1731 #ifndef SING_NDEBUG
1732  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1733 #endif
1734 
1735  return p_Copy(p, r);
1736 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
#define Print
Definition: emacs.cc:83
return P p
Definition: myNF.cc:203
assume(R!=NULL)
const CanonicalForm CFMap CFMap int &both_non_zero int n
Definition: cfEzgcd.cc:52
#define UNLIKELY(expression)
Definition: tgb_internal.h:838
char * StringEndS()
Definition: reporter.cc:151
const int OPT__DEBUG
output all the intermediate states
Definition: syzextra.h:204
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
Definition: monomials.h:51
CReducerFinder m_checker
for checking tail-terms and makeing them irreducible (wrt m_LS!)
Definition: syzextra.h:531
static poly p_Copy(poly p, const ring r)
returns a copy of p
Definition: p_polys.h:811
const ring r
Definition: syzextra.cc:208
#define omFree(addr)
Definition: omAllocDecl.h:261
void StringSetS(const char *st)
Definition: reporter.cc:128
const bool OPT__PROT
TEST_OPT_PROT.
Definition: syzextra.h:235
static FORCE_INLINE void n_Write(number &n, const coeffs r, const BOOLEAN bShortOut=TRUE)
Definition: coeffs.h:592
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
poly ComputeImage(poly multiplier, const int tail) const
low level computation...
Definition: syzextra.cc:1738
void PrintS(const char *s)
Definition: reporter.cc:294
static poly p_Mult_nn(poly p, number n, const ring r)
Definition: p_polys.h:902
#define IDELEMS(i)
Definition: simpleideals.h:24
#define p_Test(p, r)
Definition: p_polys.h:160
#define p_LmEqual(p1, p2, r)
Definition: p_polys.h:1519
#define NULL
Definition: omList.c:10
void Verify() const
Definition: syzextra.cc:2428
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of 'a' and 'b', i.e., a/b; raises an error if 'b' is not invertible in r exceptio...
Definition: coeffs.h:615
const int OPT__TREEOUTPUT
output lifting tree
Definition: syzextra.h:229
const ring m_rBaseRing
global base ring
Definition: syzextra.h:241
static FORCE_INLINE BOOLEAN n_Equal(number a, number b, const coeffs r)
TRUE iff 'a' and 'b' represent the same number; they may have different representations.
Definition: coeffs.h:461
unsigned long m_stat[9]
Statistics: 0..3: as in SetUpTailTerms()::PreProcessTerm() // TODO!!?? 4: number of terms discarded d...
Definition: syzextra.h:571
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition: coeffs.h:456
const ideal m_idTails
input tails
Definition: syzextra.h:513
static jList * T
Definition: janet.cc:37
polyrec * poly
Definition: hilb.h:10
static FORCE_INLINE poly myp_Head(const poly p, const bool bIgnoreCoeff, const ring r)
Definition: syzextra.cc:456
static END_NAMESPACE void writeLatexTerm(const poly t, const ring r, const bool bCurrSyz=true, const bool bLTonly=true)
writes a monomial (p), uses form x*gen(.) if ko != coloumn number of p
Definition: syzextra.cc:336
const int OPT__NOCACHING
no caching/stores/lookups
Definition: syzextra.h:238
std::map< TCacheKey, TCacheValue, CCacheCompare > TP2PCache
Definition: syzextra.h:383
poly SchreyerSyzygyComputation::TraverseTail ( poly  multiplier,
poly  tail 
) const

called only from above and from outside (for testing)

Definition at line 1777 of file syzextra.cc.

1778 {
1780 
1781  const ideal& L = m_idLeads;
1782  const ideal& T = m_idTails;
1783  const ring& r = m_rBaseRing;
1784 
1785  assume( multiplier != NULL );
1786 
1787  assume( L != NULL );
1788  assume( T != NULL );
1789 
1790  p_Test(multiplier, r);
1791 
1792 #ifndef SING_NDEBUG
1793  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1794 #endif
1795 
1796  if( UNLIKELY( !( (!OPT__TAILREDSYZ) || m_lcm.Check(multiplier) )) )
1797  {
1799  {
1800  ++ m_stat[5]; // PrintS("%"); // check LCM !
1801 #ifndef SING_NDEBUG
1802  if( OPT__DEBUG )
1803  {
1804  PrintS("\nTT,%:"); dPrint(multiplier, r, r, 0);
1805  PrintS(", * :"); dPrint(tail, r, r, 0);
1806  PrintLn();
1807  }
1808 #endif
1809  }
1810  return NULL;
1811  }
1812 
1813  // const bool bUsePolynomial = TEST_OPT_NOT_BUCKETS; // || (pLength(tail) < MIN_LENGTH_BUCKET);
1814 
1816 /*
1817  sBucket_pt sum;
1818 
1819  if( m_sum_bucket == NULL )
1820  sum = sBucketCreate(r);
1821  else
1822  {
1823  if( !sIsEmpty(m_sum_bucket) )
1824  sum = sBucketCreate(r);
1825  else
1826  {
1827  sum = m_sum_bucket;
1828  m_sum_bucket = NULL;
1829  }
1830  }
1831 
1832 
1833  assume( sum != NULL ); assume ( sIsEmpty(sum) );
1834  assume( r == sBucketGetRing(sum) );
1835 */
1836 
1837 // poly s; int len;
1838 
1839  // CPolynomialSummator sum(r, bUsePolynomial);
1840  // poly s = NULL;
1841 
1842  if( UNLIKELY( OPT__TREEOUTPUT & 0 ) )
1843  {
1844  Print("{ \"proc\": \"TTPoly\", \"nodelabel\": \""); writeLatexTerm(multiplier, r, false); Print(" * \\\\ldots \", \"children\": [");
1845  }
1846 
1847  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1848  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1849  for(poly p = tail; p != NULL; p = pNext(p)) // iterate over the tail
1850  {
1851  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1852  const poly rt = ReduceTerm(multiplier, p, NULL); // TODO: also return/store length?
1853  sum.Add(rt);
1854  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1855  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1856  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1857 
1858 // const int lp = pLength(rt);
1859 // if( rt != NULL && lp != 0 )
1860 // sBucket_Add_p(sum, rt, lp);
1861  }
1862  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1863  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1864 
1865 // sBucketClearAdd(sum, &s, &len); // Will Not Clear?!?
1866  const poly s = sum.ClearAdd();
1867 
1868 // assume( sum != NULL ); assume ( sIsEmpty(sum) );
1869 /*
1870  if( m_sum_bucket == NULL )
1871  m_sum_bucket = sum;
1872  else
1873  sBucketDestroy(&sum);
1874 
1875  assume( pLength(s) == len );
1876 */
1877 
1878 #ifndef SING_NDEBUG
1879  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1880 #endif
1881 
1882  if( UNLIKELY( OPT__TREEOUTPUT & 0 ) )
1883  {
1884  PrintS("], \"noderesult\": \""); writeLatexTerm(s, r, true, false); PrintS("\" },");
1885  }
1886 
1887  p_Test(multiplier, r);
1888 
1889  return s;
1890 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
void PrintLn()
Definition: reporter.cc:322
#define Print
Definition: emacs.cc:83
const ideal m_idLeads
input leading terms
Definition: syzextra.h:510
return P p
Definition: myNF.cc:203
assume(R!=NULL)
#define UNLIKELY(expression)
Definition: tgb_internal.h:838
const int OPT__DEBUG
output all the intermediate states
Definition: syzextra.h:204
CReducerFinder m_checker
for checking tail-terms and makeing them irreducible (wrt m_LS!)
Definition: syzextra.h:531
const int OPT__TAILREDSYZ
Reduce syzygy tails wrt the leading syzygy terms.
Definition: syzextra.h:210
const ring r
Definition: syzextra.cc:208
const bool OPT__PROT
TEST_OPT_PROT.
Definition: syzextra.h:235
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
void PrintS(const char *s)
Definition: reporter.cc:294
#define p_Test(p, r)
Definition: p_polys.h:160
poly ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck) const
TODO: save shortcut (syz: |-.->) LM(m) * "t" -> ? ???
Definition: syzextra.cc:1895
#define NULL
Definition: omList.c:10
void Verify() const
Definition: syzextra.cc:2428
const int OPT__TREEOUTPUT
output lifting tree
Definition: syzextra.h:229
const ring m_rBaseRing
global base ring
Definition: syzextra.h:241
SBucketFactory m_sum_bucket_factory
TODO: look into m_idTailTerms!!!!!!!!!!!!!!!!!!!!!!!! map? heaps???
Definition: syzextra.h:560
#define pNext(p)
Definition: monomials.h:43
unsigned long m_stat[9]
Statistics: 0..3: as in SetUpTailTerms()::PreProcessTerm() // TODO!!?? 4: number of terms discarded d...
Definition: syzextra.h:571
const int OPT__IGNORETAILS
ignore tails and compute the pure Schreyer frame
Definition: syzextra.h:218
const CLCM m_lcm
Bitmask for variables occuring in leading terms.
Definition: syzextra.h:525
bool Check(const poly m) const
Definition: syzextra.cc:3068
const ideal m_idTails
input tails
Definition: syzextra.h:513
static jList * T
Definition: janet.cc:37
polyrec * poly
Definition: hilb.h:10
void dPrint(const ideal id, const ring lmRing=currRing, const ring tailRing=currRing, const int nTerms=0)
prints an ideal, optionally with details
static END_NAMESPACE void writeLatexTerm(const poly t, const ring r, const bool bCurrSyz=true, const bool bLTonly=true)
writes a monomial (p), uses form x*gen(.) if ko != coloumn number of p
Definition: syzextra.cc:336

Friends And Related Function Documentation

friend class CLCM
friend

Definition at line 399 of file syzextra.h.

friend class CReducerFinder
friend

Definition at line 400 of file syzextra.h.

Field Documentation

TCache SchreyerSyzygyComputation::m_cache
mutableprivate

Definition at line 554 of file syzextra.h.

CReducerFinder SchreyerSyzygyComputation::m_checker
private

for checking tail-terms and makeing them irreducible (wrt m_LS!)

Definition at line 531 of file syzextra.h.

const CReducerFinder SchreyerSyzygyComputation::m_div
private

Divisor finder.

Definition at line 528 of file syzextra.h.

const ideal SchreyerSyzygyComputation::m_idLeads
private

input leading terms

Definition at line 510 of file syzextra.h.

const ideal SchreyerSyzygyComputation::m_idTails
private

input tails

Definition at line 513 of file syzextra.h.

const CLCM SchreyerSyzygyComputation::m_lcm
private

Bitmask for variables occuring in leading terms.

Definition at line 525 of file syzextra.h.

ideal SchreyerSyzygyComputation::m_LS
private

leading syzygy terms used for reducing syzygy tails

Definition at line 521 of file syzextra.h.

kBucket_pt SchreyerSyzygyComputation::m_spoly_bucket
mutableprivate

for S-Polynomial reductions

Definition at line 563 of file syzextra.h.

unsigned long SchreyerSyzygyComputation::m_stat[9]
mutableprivate

Statistics: 0..3: as in SetUpTailTerms()::PreProcessTerm() // TODO!!?? 4: number of terms discarded due to LOT heuristics 5: number of terms discarded due to LCM heuristics 6, 7: lookups without & with rescale, 8: stores.

Definition at line 571 of file syzextra.h.

SBucketFactory SchreyerSyzygyComputation::m_sum_bucket_factory
mutableprivate

TODO: look into m_idTailTerms!!!!!!!!!!!!!!!!!!!!!!!! map? heaps???

used for simple summing up

Definition at line 560 of file syzextra.h.

ideal SchreyerSyzygyComputation::m_syzLeads
private

output (syzygy) leading terms (+2nd terms?)

Definition at line 516 of file syzextra.h.

ideal SchreyerSyzygyComputation::m_syzTails
private

output (syzygy) tails

Definition at line 519 of file syzextra.h.


The documentation for this class was generated from the following files: