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() [1/2]

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 id_Copy(ideal h1, const ring r)
copy an ideal
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:236
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
#define NULL
Definition: omList.c:10
SchreyerSyzygyComputationFlags(idhdl rootRingHdl)
Definition: syzextra.cc:2032
const ring m_rBaseRing
global base ring
Definition: syzextra.h:242
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() [2/2]

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 id_Copy(ideal h1, const ring r)
copy an ideal
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:211
const bool OPT__PROT
TEST_OPT_PROT.
Definition: syzextra.h:236
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
void Initialize(const ideal L)
Definition: syzextra.cc:2124
#define NULL
Definition: omList.c:10
SchreyerSyzygyComputationFlags(idhdl rootRingHdl)
Definition: syzextra.cc:2032
const ring m_rBaseRing
global base ring
Definition: syzextra.h:242
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:219
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::~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

◆ _FindReducer()

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); }
poly FindReducer(const poly multiplier, const poly monom, const poly syzterm, const CReducerFinder &checker) const
Definition: syzextra.cc:2600
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

◆ CleanUp()

void SchreyerSyzygyComputation::CleanUp ( )
private

Clean up all the accumulated data.

Definition at line 548 of file syzextra.cc.

549 {
550  id_Delete(const_cast<ideal*>(&m_idTails), m_rBaseRing); // TODO!!!
551 
552 /*if( m_sum_bucket != NULL )
553  {
554  assume ( sIsEmpty(m_sum_bucket) );
555  sBucketDestroy(&m_sum_bucket);
556  m_sum_bucket = NULL;
557  }*/
558 
559  if( m_spoly_bucket != NULL )
560  {
563  }
564 
565  for( TCache::iterator it = m_cache.begin(); it != m_cache.end(); it++ )
566  {
567  TP2PCache& T = it->second;
568 
569  for(TP2PCache::iterator vit = T.begin(); vit != T.end(); vit++ )
570  {
571  p_Delete( (&(vit->second)), m_rBaseRing);
572  p_Delete( const_cast<poly*>(&(vit->first)), m_rBaseRing);
573  }
574  }
575 }
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:200
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:843
#define NULL
Definition: omList.c:10
const ring m_rBaseRing
global base ring
Definition: syzextra.h:242
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

◆ Compute1LeadingSyzygyTerms()

ideal SchreyerSyzygyComputation::Compute1LeadingSyzygyTerms ( )
protected

just leading terms

Definition at line 776 of file syzextra.cc.

777 {
778  const ideal& id = m_idLeads;
779  const ring& r = m_rBaseRing;
780 // const SchreyerSyzygyComputationFlags& attributes = m_atttributes;
781 
783 
784  // 1. set of components S?
785  // 2. for each component c from S: set of indices of leading terms
786  // with this component?
787  // 3. short exp. vectors for each leading term?
788 
789  const int size = IDELEMS(id);
790 
791  if( size < 2 )
792  {
793  const ideal newid = idInit(1, 0); newid->m[0] = NULL; // zero ideal...
794  return newid;
795  }
796 
797  // TODO/NOTE: input is supposed to be (reverse-) sorted wrt "(c,ds)"!??
798 
799  // components should come in groups: count elements in each group
800  // && estimate the real size!!!
801 
802 
803  // use just a vector instead???
804  const ideal newid = idInit( (size * (size-1))/2, size); // maximal size: ideal case!
805 
806  int k = 0;
807 
808  for (int j = 0; j < size; j++)
809  {
810  const poly p = id->m[j];
811  assume( p != NULL );
812  const int c = p_GetComp(p, r);
813 
814  for (int i = j - 1; i >= 0; i--)
815  {
816  const poly pp = id->m[i];
817  assume( pp != NULL );
818  const int cc = p_GetComp(pp, r);
819 
820  if( c != cc )
821  continue;
822 
823  const poly m = p_Init(r); // p_New???
824 
825  // m = LCM(p, pp) / p! // TODO: optimize: knowing the ring structure: (C/lp)!
826  for (int v = rVar(r); v > 0; v--)
827  {
828  assume( v > 0 );
829  assume( v <= rVar(r) );
830 
831  const short e1 = p_GetExp(p , v, r);
832  const short e2 = p_GetExp(pp, v, r);
833 
834  if( e1 >= e2 )
835  p_SetExp(m, v, 0, r);
836  else
837  p_SetExp(m, v, e2 - e1, r);
838 
839  }
840 
841  assume( (j > i) && (i >= 0) );
842 
843  p_SetComp(m, j + 1, r);
844  pNext(m) = NULL;
845  p_SetCoeff0(m, n_Init(1, r->cf), r); // for later...
846 
847  p_Setm(m, r); // should not do anything!!!
848 
849  newid->m[k++] = m;
850  }
851  }
852 
853 // if( OPT__DEBUG & FALSE )
854 // {
855 // PrintS("ComputeLeadingSyzygyTerms::Temp0: \n");
856 // dPrint(newid, r, r, 0);
857 // }
858 
859  // the rest of newid is assumed to be zeroes...
860 
861  // simplify(newid, 2 + 32)??
862  // sort(newid, "C,ds")[1]???
863  id_DelDiv(newid, r); // #define SIMPL_LMDIV 32
864 
865 // if( OPT__DEBUG & FALSE )
866 // {
867 // PrintS("ComputeLeadingSyzygyTerms::Temp1: \n");
868 // dPrint(newid, r, r, 0);
869 // }
870 
871  idSkipZeroes(newid); // #define SIMPL_NULL 2
872 
873 // if( OPT__DEBUG )
874 // {
875 // PrintS("ComputeLeadingSyzygyTerms::Output: \n");
876 // dPrint(newid, r, r, 0);
877 // }
878 
879  Sort_c_ds(newid, r);
880 
881  return newid;
882 }
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:242
#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:542
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:583
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:464
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:483
#define NULL
Definition: omList.c:10
const ring m_rBaseRing
global base ring
Definition: syzextra.h:242
#define pNext(p)
Definition: monomials.h:43
static void p_Setm(poly p, const ring r)
Definition: p_polys.h:228
#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:1243
assume(R !=NULL)

◆ Compute2LeadingSyzygyTerms()

ideal SchreyerSyzygyComputation::Compute2LeadingSyzygyTerms ( )
protected

leading + second terms

Definition at line 884 of file syzextra.cc.

885 {
886  const ideal& id = m_idLeads;
887  const ring& r = m_rBaseRing;
888 // const SchreyerSyzygyComputationFlags& attributes = m_atttributes;
889 
890  // 1. set of components S?
891  // 2. for each component c from S: set of indices of leading terms
892  // with this component?
893  // 3. short exp. vectors for each leading term?
894 
895  const int size = IDELEMS(id);
896 
897  if( size < 2 )
898  {
899  const ideal newid = idInit(1, 1); newid->m[0] = NULL; // zero module...
900  return newid;
901  }
902 
903 
904  // TODO/NOTE: input is supposed to be sorted wrt "C,ds"!??
905 
906  // components should come in groups: count elements in each group
907  // && estimate the real size!!!
908 
909 
910  // use just a vector instead???
911  ideal newid = idInit( (size * (size-1))/2, size); // maximal size: ideal case!
912 
913  int k = 0;
914 
915  for (int j = 0; j < size; j++)
916  {
917  const poly p = id->m[j];
918  assume( p != NULL );
919  const int c = p_GetComp(p, r);
920 
921  for (int i = j - 1; i >= 0; i--)
922  {
923  const poly pp = id->m[i];
924  assume( pp != NULL );
925  const int cc = p_GetComp(pp, r);
926 
927  if( c != cc )
928  continue;
929 
930  // allocate memory & zero it out!
931  const poly m = p_Init(r); const poly mm = p_Init(r);
932 
933 
934  // m = LCM(p, pp) / p! mm = LCM(p, pp) / pp!
935  // TODO: optimize: knowing the ring structure: (C/lp)!
936 
937  for (int v = rVar(r); v > 0; v--)
938  {
939  assume( v > 0 );
940  assume( v <= rVar(r) );
941 
942  const short e1 = p_GetExp(p , v, r);
943  const short e2 = p_GetExp(pp, v, r);
944 
945  if( e1 >= e2 )
946  p_SetExp(mm, v, e1 - e2, r); // p_SetExp(m, v, 0, r);
947  else
948  p_SetExp(m, v, e2 - e1, r); // p_SetExp(mm, v, 0, r);
949 
950  }
951 
952  assume( (j > i) && (i >= 0) );
953 
954  p_SetComp(m, j + 1, r);
955  p_SetComp(mm, i + 1, r);
956 
957  const number& lc1 = p_GetCoeff(p , r);
958  const number& lc2 = p_GetCoeff(pp, r);
959 
960 #if NODIVISION
961  assume( n_IsOne(lc1, r->cf) );
962  assume( n_IsOne(lc2, r->cf) );
963 
964  p_SetCoeff0( m, n_Init( 1, r->cf), r );
965  p_SetCoeff0(mm, n_Init(-1, r->cf), r );
966 #else
967  number g = n_Lcm( lc1, lc2, r->cf );
968  p_SetCoeff0(m , n_Div(g, lc1, r), r);
969  p_SetCoeff0(mm, n_InpNeg(n_Div(g, lc2, r), r), r);
970  n_Delete(&g, r);
971 #endif
972 
973  p_Setm(m, r); // should not do anything!!!
974  p_Setm(mm, r); // should not do anything!!!
975 
976  pNext(m) = mm; // pNext(mm) = NULL;
977 
978  newid->m[k++] = m;
979  }
980  }
981 
982 // if( OPT__DEBUG & FALSE )
983 // {
984 // PrintS("Compute2LeadingSyzygyTerms::Temp0: \n");
985 // dPrint(newid, r, r, 0);
986 // }
987 
988  if( UNLIKELY(!OPT__TAILREDSYZ) )
989  {
990  // simplify(newid, 2 + 32)??
991  // sort(newid, "C,ds")[1]???
992  id_DelDiv(newid, r); // #define SIMPL_LMDIV 32
993 
994 // if( OPT__DEBUG & FALSE )
995 // {
996 // PrintS("Compute2LeadingSyzygyTerms::Temp1 (deldiv): \n");
997 // dPrint(newid, r, r, 0);
998 // }
999  }
1000  else
1001  {
1002  // option(redSB); option(redTail);
1003  // TEST_OPT_REDSB
1004  // TEST_OPT_REDTAIL
1005  assume( r == currRing );
1006 
1007  BITSET _save_test; SI_SAVE_OPT1(_save_test);
1009 
1010  intvec* w=new intvec(IDELEMS(newid));
1011  ideal tmp = kStd(newid, currRing->qideal, isHomog, &w);
1012  delete w;
1013 
1014  SI_RESTORE_OPT1(_save_test)
1015 
1016  id_Delete(&newid, r);
1017  newid = tmp;
1018 
1019 // if( OPT__DEBUG & FALSE )
1020 // {
1021 // PrintS("Compute2LeadingSyzygyTerms::Temp1 (std): \n");
1022 // dPrint(newid, r, r, 0);
1023 // }
1024 
1025  }
1026 
1027  idSkipZeroes(newid);
1028 
1029  Sort_c_ds(newid, r);
1030 
1031  return newid;
1032 }
#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
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 &#39;n&#39; represents the one element.
Definition: coeffs.h:472
static unsigned long p_SetComp(poly p, unsigned long c, ring r)
Definition: p_polys.h:242
#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:542
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:583
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:2231
#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:18
#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:211
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
const ring r
Definition: syzextra.cc:208
Definition: intvec.h:14
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:464
#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:561
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 &#39;a&#39; and &#39;b&#39; in Z/nZ, Z/2^kZ: computed as in the case Z in Z/pZ...
Definition: coeffs.h:716
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:483
#define NULL
Definition: omList.c:10
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of &#39;a&#39; and &#39;b&#39;, i.e., a/b; raises an error if &#39;b&#39; is not invertible in r exceptio...
Definition: coeffs.h:619
const CanonicalForm & w
Definition: facAbsFact.cc:55
const ring m_rBaseRing
global base ring
Definition: syzextra.h:242
#define pNext(p)
Definition: monomials.h:43
static void p_Setm(poly p, const ring r)
Definition: p_polys.h:228
#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 &#39;p&#39;
Definition: coeffs.h:459
polyrec * poly
Definition: hilb.h:10
static poly p_Init(const ring r, omBin bin)
Definition: p_polys.h:1243
#define SI_RESTORE_OPT1(A)
Definition: options.h:23
assume(R !=NULL)

◆ ComputeImage()

poly SchreyerSyzygyComputation::ComputeImage ( poly  multiplier,
const int  tail 
) const

low level computation...

Definition at line 1736 of file syzextra.cc.

1737 {
1738  const ring& r = m_rBaseRing;
1739 
1740  assume(m_idTails != NULL && m_idTails->m != NULL);
1741  assume( tail >= 0 && tail < IDELEMS(m_idTails) );
1742 
1743  p_Test(multiplier, r);
1744 
1745  const poly t = m_idTails->m[tail]; // !!!
1746 
1747  if(t != NULL)
1748  {
1749  if( UNLIKELY(OPT__TREEOUTPUT) )
1750  {
1751  PrintS("{ \"proc\": \"ComputeImage\", \"nodelabel\": \"");
1752  writeLatexTerm(multiplier, r, false);
1753  Print(" \\\\GEN{%d}\", \"edgelabel\": \"", tail + 1);
1754  writeLatexTerm(t, r, false);
1755  PrintS("\", \"children\": [");
1756  }
1757 
1758  const poly p = TraverseTail(multiplier, t);
1759 
1760  p_Test(multiplier, r);
1761 
1762  if( UNLIKELY(OPT__TREEOUTPUT) )
1763  {
1764  PrintS("], \"noderesult\": \""); writeLatexTerm(p, r, true, false); PrintS("\" },");
1765  }
1766 
1767  return p;
1768 
1769  }
1770 
1771  return NULL;
1772 }
#define Print
Definition: emacs.cc:83
return P p
Definition: myNF.cc:203
#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:1592
void PrintS(const char *s)
Definition: reporter.cc:284
#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:230
const ring m_rBaseRing
global base ring
Definition: syzextra.h:242
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
assume(R !=NULL)

◆ ComputeLeadingSyzygyTerms()

void SchreyerSyzygyComputation::ComputeLeadingSyzygyTerms ( bool  bComputeSecondTerms = true)

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

Definition at line 1369 of file syzextra.cc.

1370 {
1371 // const SchreyerSyzygyComputationFlags& attributes = m_atttributes;
1372 
1373 // const BOOLEAN OPT__LEAD2SYZ = attributes.OPT__LEAD2SYZ;
1374 // const BOOLEAN OPT__TAILREDSYZ = attributes.OPT__TAILREDSYZ;
1375 
1376  assume( m_syzLeads == NULL );
1377 
1378  if( UNLIKELY(bComputeSecondTerms) )
1379  {
1380  assume( OPT__LEAD2SYZ );
1381 // m_syzLeads = FROM_NAMESPACE(INTERNAL, _Compute2LeadingSyzygyTerms(m_idLeads, m_rBaseRing, m_atttributes));
1383  }
1384  else
1385  {
1386  assume( !OPT__LEAD2SYZ );
1387 
1389  }
1390 // m_syzLeads = FROM_NAMESPACE(INTERNAL, _ComputeLeadingSyzygyTerms(m_idLeads, m_rBaseRing, m_atttributes));
1391 
1392  // NOTE: set m_LS if tails are to be reduced!
1393  assume( m_syzLeads!= NULL );
1394 
1395  if ( LIKELY( OPT__TAILREDSYZ && !OPT__IGNORETAILS && (IDELEMS(m_syzLeads) > 0) && !((IDELEMS(m_syzLeads) == 1) && (m_syzLeads->m[0] == NULL)) ) )
1396  {
1397  m_LS = m_syzLeads;
1399 #ifndef SING_NDEBUG
1400  if( OPT__DEBUG )
1401  {
1402  const ring& r = m_rBaseRing;
1403  PrintS("SchreyerSyzygyComputation::ComputeLeadingSyzygyTerms: \n");
1404  PrintS("m_syzLeads: \n");
1405  dPrint(m_syzLeads, r, r, 0);
1406  PrintS("m_checker.Initialize(m_syzLeads) => \n");
1407  m_checker.DebugPrint();
1408  }
1409 #endif
1410  assume( m_checker.IsNonempty() ); // TODO: this always fails... BUG????
1411  }
1412 
1413  if( UNLIKELY( OPT__PROT ) ) Print("(L%dS:%d)", bComputeSecondTerms ? 2 : 1, IDELEMS(m_syzLeads));
1414 
1415 }
#define Print
Definition: emacs.cc:83
ideal m_syzLeads
output (syzygy) leading terms (+2nd terms?)
Definition: syzextra.h:516
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:205
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:884
const int OPT__TAILREDSYZ
Reduce syzygy tails wrt the leading syzygy terms.
Definition: syzextra.h:211
const ring r
Definition: syzextra.cc:208
const bool OPT__PROT
TEST_OPT_PROT.
Definition: syzextra.h:236
ideal Compute1LeadingSyzygyTerms()
just leading terms
Definition: syzextra.cc:776
void PrintS(const char *s)
Definition: reporter.cc:284
void Initialize(const ideal L)
Definition: syzextra.cc:2124
#define IDELEMS(i)
Definition: simpleideals.h:24
#define NULL
Definition: omList.c:10
const ring m_rBaseRing
global base ring
Definition: syzextra.h:242
const int OPT__IGNORETAILS
ignore tails and compute the pure Schreyer frame
Definition: syzextra.h:219
void dPrint(const ideal id, const ring lmRing=currRing, const ring tailRing=currRing, const int nTerms=0)
prints an ideal, optionally with details
assume(R !=NULL)
bool IsNonempty() const
Definition: syzextra.h:344

◆ ComputeSyzygy()

void SchreyerSyzygyComputation::ComputeSyzygy ( )

The main driver function: computes.

Definition at line 1143 of file syzextra.cc.

1144 {
1145 #ifndef SING_NDEBUG
1146  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1147 #endif
1148 
1149  assume( m_idLeads != NULL );
1150  assume( m_idTails != NULL );
1151 
1152  const ideal& L = m_idLeads;
1153  const ideal& T = m_idTails;
1154 
1155  ideal& TT = m_syzTails;
1156  const ring& R = m_rBaseRing;
1157 
1158 // if( m_sum_bucket == NULL )
1159 // m_sum_bucket = sBucketCreate(R);
1160 // assume ( sIsEmpty(m_sum_bucket) );
1161 
1162  if( m_spoly_bucket == NULL )
1164 
1165 
1166  assume( IDELEMS(L) == IDELEMS(T) );
1167 
1168 #ifdef SING_NDEBUG
1169  int t, r; // for rtimer benchmarking in prot realease mode
1170 #endif
1171 
1172  if( UNLIKELY(OPT__TREEOUTPUT) )
1173  Print("\n{ \"syzygylayer\": \"%d\", \"hybridnf\": \"%d\", \"diagrams\": \n[", OPT__SYZNUMBER, OPT__HYBRIDNF );
1174 
1175  if( UNLIKELY(OPT__PROT) ) Print("\n[%d]", OPT__SYZNUMBER );
1176 
1177  if( m_syzLeads == NULL )
1178  {
1179 #ifdef SING_NDEBUG
1181  {
1182  t = getTimer(); r = getRTimer();
1183  Print("\n%% %5d **!TIME4!** SchreyerSyzygyComputation::ComputeSyzygy::ComputeLeadingSyzygyTerms: t: %d, r: %d\n", r, t, r);
1184  }
1185 #endif
1186 
1187  ComputeLeadingSyzygyTerms( OPT__LEAD2SYZ && !OPT__IGNORETAILS ); // 2 terms OR 1 term!
1188 
1189 #ifdef SING_NDEBUG
1191  {
1192  t = getTimer() - t; r = getRTimer() - r;
1193  Print("\n%% %5d **!TIME4!** SchreyerSyzygyComputation::ComputeSyzygy::ComputeLeadingSyzygyTerms: dt: %d, dr: %d\n", getRTimer(), t, r);
1194  }
1195 #endif
1196 
1197  }
1198 
1199  assume( m_syzLeads != NULL );
1200  ideal& LL = m_syzLeads;
1201  const int size = IDELEMS(LL);
1202 
1203  TT = idInit(size, 0);
1204 
1205  if( size == 1 && LL->m[0] == NULL )
1206  {
1207  if( UNLIKELY(OPT__TREEOUTPUT) )
1208  PrintS("]},");
1209  return;
1210  }
1211 
1212 
1213  // use hybrid (Schreyer NF) method?
1214  const bool method = (OPT__HYBRIDNF == 1); // || (OPT__HYBRIDNF == 2 && OPT__SYZNUMBER < 3);
1215 
1216  if( UNLIKELY(OPT__PROT) ) Print("[%s NF|%s]",(method) ? "PR" : "TT", (NOPRODUCT == 1)? "_,_": "^*^" );
1217 
1218 
1219  if( LIKELY(!OPT__IGNORETAILS) )
1220  {
1221  if( T != NULL )
1222  {
1223 #ifdef SING_NDEBUG
1225  {
1226  t = getTimer(); r = getRTimer();
1227  Print("\n%% %5d **!TIME4!** SchreyerSyzygyComputation::ComputeSyzygy::SetUpTailTerms(): t: %d, r: %d\n", r, t, r);
1228  }
1229 #endif
1230 
1231  SetUpTailTerms();
1232 
1233 #ifdef SING_NDEBUG
1235  {
1236  t = getTimer() - t; r = getRTimer() - r;
1237  Print("\n%% %5d **!TIME4!** SchreyerSyzygyComputation::ComputeSyzygy::SetUpTailTerms(): dt: %d, dr: %d\n", getRTimer(), t, r);
1238  }
1239 #endif
1240  }
1241  }
1242 
1243 #ifdef SING_NDEBUG
1245  {
1246  t = getTimer(); r = getRTimer();
1247  Print("\n%% %5d **!TIME4!** SchreyerSyzygyComputation::ComputeSyzygy::SyzygyLift: t: %d, r: %d\n", r, t, r);
1248  }
1249 #endif
1250 
1251 #ifndef SING_NDEBUG
1252  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1253 #endif
1254 
1255 // for( int k = 0; k < size; ++k ) // TODO: should be fine now!
1256  for( int k = size - 1; k >= 0; --k )
1257  {
1258  const poly a = LL->m[k]; assume( a != NULL );
1259 
1260  poly a2 = pNext(a);
1261 
1262  // Splitting 2-terms Leading syzygy module
1263  if( a2 != NULL )
1264  pNext(a) = NULL;
1265 
1266  if( UNLIKELY(OPT__IGNORETAILS) )
1267  {
1268  TT->m[k] = NULL;
1269 
1270  assume( a2 != NULL );
1271 
1272  if( a2 != NULL )
1273  p_Delete(&a2, R);
1274 
1275  continue;
1276  }
1277 
1278  // TT->m[k] = a2;
1279 
1280 #ifndef SING_NDEBUG
1281  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1282 #endif
1283 
1284  poly nf;
1285 
1286  if( method )
1287  nf = SchreyerSyzygyNF(a, a2);
1288  else
1289  nf = TraverseNF(a, a2);
1290 
1291 #ifndef SING_NDEBUG
1292  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1293 #endif
1294 
1295  TT->m[k] = nf;
1296 
1297  if( UNLIKELY(OPT__SYZCHECK) )
1298  {
1299  // TODO: check the correctness (syzygy property): a + TT->m[k] should be a syzygy!!!
1300 
1301  poly s = pp_Add_qq( a, TT->m[k], R); // current syzygy
1302 
1303  poly vp = p_VectorProductLT(s, L, T, R);
1304 
1305  if( UNLIKELY( OPT__DEBUG && (vp != NULL) && ! OPT__TREEOUTPUT ) )
1306  {
1307  Warn("SchreyerSyzygyComputation::ComputeSyzygy: failed syzygy property for syzygy [%d], non-zero image is as follows: ", k);
1308  dPrint(vp, R, R, 0); p_Delete(&vp, R);
1309 
1310  PrintS("SchreyerSyzygyComputation::ComputeSyzygy: Wrong syzygy is as follows: ");
1311  s = pp_Add_qq( a, TT->m[k], R);
1312  dPrint(s, R, R, 0); p_Delete(&s, R);
1313 
1314  PrintS("SchreyerSyzygyComputation::ComputeSyzygy: Testing with the other method");
1315 
1316  if( !method )
1317  s = SchreyerSyzygyNF(a, a2);
1318  else
1319  s = TraverseNF(a, a2);
1320 
1321  s = p_Add_q( p_Copy(a, R), s, R); // another syzygy // :((((
1322  PrintS("SchreyerSyzygyComputation::ComputeSyzygy: The other method gives the following syzygy: ");
1323  dPrint(s, R, R, 0);
1324 
1325  vp = p_VectorProductLT(s, L, T, R);
1326 
1327  if( vp == NULL )
1328  {
1329  PrintS("SchreyerSyzygyComputation::ComputeSyzygy: .... which is correct!!! ");
1330  } else
1331  {
1332  Warn("SchreyerSyzygyComputation::ComputeSyzygy: failed to compute syzygy tail[%d] with both methods!!! Non-zero image (2nd) is as follows: ", k);
1333  dPrint(vp, R, R, 0);
1334  }
1335 
1336 #ifndef SING_NDEBUG
1337  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1338 #endif
1339 
1340  } else
1341  assume( vp == NULL );
1342 
1343  if( UNLIKELY( OPT__PROT && (vp != NULL) ) ) Warn("ERROR: SyzCheck failed, wrong tail: [%d]\n\n", k); // check k'th syzygy failed
1344 
1345  p_Delete(&vp, R);
1346  }
1347 
1348 #ifndef SING_NDEBUG
1349  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1350 #endif
1351  }
1352 
1353 #ifdef SING_NDEBUG
1355  {
1356  t = getTimer() - t; r = getRTimer() - r;
1357  Print("\n%% %5d **!TIME4!** SchreyerSyzygyComputation::ComputeSyzygy::SyzygyLift: dt: %d, dr: %d\n", getRTimer(), t, r);
1358  }
1359 #endif
1360 
1361  TT->rank = id_RankFreeModule(TT, R);
1362 
1363  if( UNLIKELY(OPT__TREEOUTPUT) )
1364  PrintS("\n]},");
1365 
1366  if( UNLIKELY(OPT__PROT) ) PrintLn();
1367 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
int OPT__SYZNUMBER
Syzygy level (within a resolution)
Definition: syzextra.h:222
#define NOPRODUCT
Definition: syzextra.h:37
const poly a
Definition: syzextra.cc:212
void PrintLn()
Definition: reporter.cc:310
#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
poly SchreyerSyzygyNF(const poly syz_lead, poly syz_2=NULL) const
Main HybridNF == 1: poly reduce + LOT + LCM?
Definition: syzextra.cc:1417
const int OPT__HYBRIDNF
Use the usual NF&#39;s S-poly reduction while dropping lower order terms 2 means - smart selection! ...
Definition: syzextra.h:215
const int OPT__SYZCHECK
CheckSyzygyProperty: TODO.
Definition: syzextra.h:233
const ideal m_idLeads
input leading terms
Definition: syzextra.h:510
int getRTimer()
Definition: timer.cc:172
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:205
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:804
Definition: gnumpfl.cc:27
poly TraverseNF(const poly syz_lead, const poly syz_2=NULL) const
Definition: syzextra.cc:1034
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:236
const ring R
Definition: DebugPrint.cc:36
void SetUpTailTerms()
Convert the given ideal of tails into the internal representation (with reducers!) Preprocess m_idTai...
Definition: syzextra.cc:682
void ComputeLeadingSyzygyTerms(bool bComputeSecondTerms=true)
Computes Syz(leads) or only LEAD of it. The result is stored into m_syzLeads.
Definition: syzextra.cc:1369
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
void PrintS(const char *s)
Definition: reporter.cc:284
#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:843
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:38
#define NULL
Definition: omList.c:10
const int OPT__TREEOUTPUT
output lifting tree
Definition: syzextra.h:230
const ring m_rBaseRing
global base ring
Definition: syzextra.h:242
#define pNext(p)
Definition: monomials.h:43
const int OPT__IGNORETAILS
ignore tails and compute the pure Schreyer frame
Definition: syzextra.h:219
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:877
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets
Definition: kbuckets.cc:193
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
assume(R !=NULL)
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

◆ PrintStats()

void SchreyerSyzygyComputation::PrintStats ( ) const

print statistics about the used heuristics

Definition at line 765 of file syzextra.cc.

766 {
767  Print("SchreyerSyzygyComputation Stats: (PP/ST: {c: %lu, C: %lu, P: %lu} + %lu, LOT: %lu, LCM: %lu, ST:%lu, LK: %lu {*: %lu})\n",
768  m_stat[1], m_stat[2], m_stat[3], m_stat[0],
769  m_stat[4], m_stat[5],
770  m_stat[8],
771  m_stat[6] + m_stat[7], m_stat[7]
772  );
773 }
#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

◆ ReadOffResult()

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
void PrintStats() const
print statistics about the used heuristics
Definition: syzextra.cc:765
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:236
#define NULL
Definition: omList.c:10

◆ ReduceTerm()

poly SchreyerSyzygyComputation::ReduceTerm ( poly  multiplier,
poly  term4reduction,
poly  syztermCheck 
) const

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

Definition at line 1893 of file syzextra.cc.

1894 {
1895 #ifndef SING_NDEBUG
1896  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1897 #endif
1898 
1900 
1901  const ideal& L = m_idLeads;
1902  const ideal& T = m_idTails;
1903  const ring& r = m_rBaseRing;
1904 
1905  assume( multiplier != NULL );
1906  assume( term4reduction != NULL );
1907 
1908 
1909  assume( L != NULL );
1910  assume( T != NULL );
1911 
1912  p_Test(multiplier, r);
1913 
1914  // simple implementation with FindReducer:
1915  poly s = NULL;
1916 
1917  if( (!OPT__TAILREDSYZ) || m_lcm.Check(multiplier) ) // TODO: UNLIKELY / LIKELY ????
1918  {
1919 #if NOPRODUCT
1920  s = m_div.FindReducer(multiplier, term4reduction, syztermCheck, m_checker); // s ????
1921  p_Test(s, r);
1922 
1923  p_Test(multiplier, r);
1924 
1925  if( s == NULL ) // No Reducer?
1926  {
1927  if( UNLIKELY(OPT__PROT) ) ++ m_stat[4]; // PrintS("$"); // LOT
1928  return NULL;
1929  }
1930 
1931  if( UNLIKELY( OPT__TREEOUTPUT ) )
1932  {
1933  poly product = pp_Mult_mm(multiplier, term4reduction, r);
1934  PrintS("{ \"proc\": \"RdTrmNoP\", \"nodelabel\": \""); writeLatexTerm(s, r); PrintS("\", \"edgelabel\": \""); writeLatexTerm(product, r, false);
1935  p_Delete(&product, r);
1936  }
1937 
1938 #else
1939  // NOTE: only LT(term4reduction) should be used in the following:
1940  poly product = pp_Mult_mm(multiplier, term4reduction, r);
1941  p_Test(product, r);
1942 
1943  s = m_div.FindReducer(product, syztermCheck, m_checker); // ??
1944  p_Test(s, r);
1945 
1946  p_Test(multiplier, r);
1947 
1948  if( s == NULL ) // No Reducer?
1949  {
1950  if( UNLIKELY(OPT__PROT) ) ++ m_stat[4]; // PrintS("$"); // LOT
1951  return NULL;
1952  }
1953 
1954  if( UNLIKELY(OPT__TREEOUTPUT) )
1955  {
1956  PrintS("{ \"proc\": \"RdTrmP\", \"nodelabel\": \""); writeLatexTerm(s, r); PrintS("\", \"edgelabel\": \""); writeLatexTerm(product, r, false);
1957  }
1958 
1959  p_Delete(&product, r);
1960 #endif
1961  }
1962 
1963 #ifndef SING_NDEBUG
1964  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1965 #endif
1966 
1967  if( s == NULL ) // No Reducer?
1968  {
1970  {
1971  ++ m_stat[5]; // PrintS("%"); // check LCM !
1972 #ifndef SING_NDEBUG
1973  if( OPT__DEBUG )
1974  {
1975  PrintS("\n%: RedTail("); dPrint(multiplier, r, r, 0);
1976  PrintS(" * : "); dPrint(term4reduction, r,r,0 );
1977  PrintS(", { "); dPrint(syztermCheck,r,r,0 );
1978  PrintS(" }) "); PrintLn();
1979  }
1980 #endif
1981  }
1982  return NULL;
1983  }
1984 
1985  p_Test(multiplier, r);
1986  p_Test(s, r);
1987 
1988  poly b = leadmonom(s, r);
1989 
1990  p_Test(b, r);
1991 
1992  const int c = p_GetComp(s, r) - 1;
1993  assume( c >= 0 && c < IDELEMS(T) );
1994 
1995 
1996  if( UNLIKELY( OPT__TREEOUTPUT ) )
1997  PrintS("\", \"children\": [");
1998 
1999  const poly t = TraverseTail(b, c); // T->m[c];
2000 
2001  if( UNLIKELY( OPT__TREEOUTPUT ) )
2002  {
2003 
2004  PrintS("], \"noderesult\": \"");
2005  writeLatexTerm(t, r, true, false);
2006  PrintS("\"");
2007 
2008  if( syztermCheck != NULL )
2009  {
2010  PrintS(", \"syztermCheck\":\"" );
2011  writeLatexTerm(syztermCheck, r, true, false);
2012  PrintS("\" },");
2013  } else
2014  PrintS(" },");
2015  }
2016 
2017  p_Test(multiplier, r);
2018 
2019  if( t != NULL )
2020  s = p_Add_q(s, t, r);
2021 
2022 
2023 #ifndef SING_NDEBUG
2024  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
2025 #endif
2026 
2027  p_Test(multiplier, r);
2028 
2029  return s;
2030 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
void PrintLn()
Definition: reporter.cc:310
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
#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:957
poly FindReducer(const poly multiplier, const poly monom, const poly syzterm, const CReducerFinder &checker) const
Definition: syzextra.cc:2600
#define UNLIKELY(expression)
Definition: tgb_internal.h:838
const int OPT__DEBUG
output all the intermediate states
Definition: syzextra.h:205
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:211
const ring r
Definition: syzextra.cc:208
const bool OPT__PROT
TEST_OPT_PROT.
Definition: syzextra.h:236
poly TraverseTail(poly multiplier, const int tail) const
High level caching function!!!
Definition: syzextra.cc:1592
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
void PrintS(const char *s)
Definition: reporter.cc:284
#define IDELEMS(i)
Definition: simpleideals.h:24
#define p_Test(p, r)
Definition: p_polys.h:160
bool Check(const poly m) const
Definition: syzextra.cc:3066
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:843
#define NULL
Definition: omList.c:10
const int OPT__TREEOUTPUT
output lifting tree
Definition: syzextra.h:230
const ring m_rBaseRing
global base ring
Definition: syzextra.h:242
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:219
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
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:877
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
assume(R !=NULL)

◆ SchreyerSyzygyNF()

poly SchreyerSyzygyComputation::SchreyerSyzygyNF ( const poly  syz_lead,
poly  syz_2 = NULL 
) const

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

Definition at line 1417 of file syzextra.cc.

1418 {
1420 
1421  const ideal& L = m_idLeads;
1422  const ideal& T = m_idTails;
1423  const ring& r = m_rBaseRing;
1424 
1425  assume( syz_lead != NULL );
1426 
1427 
1428 #ifndef SING_NDEBUG
1429  if( OPT__DEBUG )
1430  {
1431  PrintS("SchreyerSyzygyComputation::SchreyerSyzygyNF(syz_lead, poly syz_2), \n");
1432  PrintS("syz_lead: \n");
1433  dPrint(syz_lead, r, r, 0);
1434  PrintS("syz_2: \n");
1435  dPrint(syz_2, r, r, 0);
1436  PrintLn();
1437  }
1438 #endif
1439 
1440  if( UNLIKELY( OPT__TREEOUTPUT ) )
1441  {
1442  PrintS("{ \"nodelabel\": \""); writeLatexTerm(syz_lead, r);
1443  PrintS("\", \"children\": [");
1444  }
1445 
1446  if( syz_2 == NULL )
1447  {
1448  const int rr = p_GetComp(syz_lead, r) - 1;
1449 
1450  assume( rr >= 0 && rr < IDELEMS(T) );
1451  assume( rr >= 0 && rr < IDELEMS(L) );
1452 
1453 #if NOPRODUCT
1454  syz_2 = m_div.FindReducer(syz_lead, L->m[rr], syz_lead, m_checker);
1455  p_Test(syz_2, r);
1456 
1457  if( UNLIKELY( OPT__TREEOUTPUT ) )
1458  {
1459  PrintS("{ \"nodelabel\": \""); writeLatexTerm(syz_2, r); PrintS("\" },");
1460  }
1461 #else
1462  poly aa = leadmonom(syz_lead, r); assume( aa != NULL); // :(
1463  aa = p_Mult_mm(aa, L->m[rr], r);
1464 
1465  if( UNLIKELY( OPT__TREEOUTPUT ) )
1466  {
1467  PrintS("{ \"nodelabel\": \""); writeLatexTerm(syz_2, r); PrintS("\", \"edgelabel\": \""); writeLatexTerm(aa, r, false); PrintS("\" },");
1468  }
1469 
1470  syz_2 = m_div.FindReducer(aa, syz_lead, m_checker);
1471  p_Test(syz_2, r);
1472 
1473  p_Delete(&aa, r);
1474 #endif
1475 
1476  }
1477 
1478  assume( syz_2 != NULL ); // by construction of S-Polynomial
1479 
1480  assume( L != NULL );
1481  assume( T != NULL );
1482 
1483  assume( IDELEMS(L) == IDELEMS(T) );
1484 
1485  int c = p_GetComp(syz_lead, r) - 1;
1486 
1487  assume( c >= 0 && c < IDELEMS(T) );
1488 
1489  if( m_spoly_bucket == NULL )
1491 
1493 
1494 
1496 
1497 // kBucketInit(bucket, NULL, 0); // not needed!?
1498 
1499  poly p = leadmonom(syz_lead, r); // :(
1500 // poly spoly = pp_Mult_qq(p, T->m[c], r);
1501  kBucket_Plus_mm_Mult_pp(bucket, p, T->m[c], 0); // TODO: store pLength(T->m[c]) separately!?
1502  p_Delete(&p, r);
1503 
1504  kbTest(bucket);
1505 
1506  c = p_GetComp(syz_2, r) - 1;
1507  assume( c >= 0 && c < IDELEMS(T) );
1508 
1509  p = leadmonom(syz_2, r); // :(
1510 // spoly = p_Add_q(spoly, pp_Mult_qq(p, T->m[c], r), r);
1511  kBucket_Plus_mm_Mult_pp(bucket, p, T->m[c], 0); // pLength(T->m[c])?!
1512  kbTest(bucket);
1513  p_Delete(&p, r);
1514 
1515 // const bool bUsePolynomial = TEST_OPT_NOT_BUCKETS; // || (pLength(spoly) < MIN_LENGTH_BUCKET);
1516 // CPolynomialSummator tail(r, bUsePolynomial);
1517  tail.Add(syz_2, 1);
1518 
1519  kbTest(bucket);
1520  for( poly spoly = kBucketExtractLm(bucket); spoly != NULL; p_LmDelete(&spoly, r), spoly = kBucketExtractLm(bucket))
1521  {
1522  kbTest(bucket);
1523  poly t = m_div.FindReducer(spoly, NULL, m_checker);
1524  p_Test(t, r);
1525 
1526  if( t != NULL )
1527  {
1528  p = leadmonom(t, r); // :(
1529  c = p_GetComp(t, r) - 1;
1530 
1531  assume( c >= 0 && c < IDELEMS(T) );
1532 
1533  if(UNLIKELY( OPT__TREEOUTPUT ))
1534  {
1535  PrintS("{ \"nodelabel\": \""); writeLatexTerm(t, r); PrintS("\", \"edgelabel\": \""); writeLatexTerm(spoly, r, false); PrintS("\" },");
1536  }
1537 
1538  kBucket_Plus_mm_Mult_pp(bucket, p, T->m[c], 0); // pLength(T->m[c])?
1539 // spoly = p_Add_q(spoly, pp_Mult_qq(p, T->m[c], r), r);
1540 
1541  p_Delete(&p, r);
1542 
1543  tail.Add(t, 1);
1544  } // otherwise discard that leading term altogether!
1545  else
1546  if( UNLIKELY(OPT__PROT) ) ++ m_stat[4]; // PrintS("$"); // LOT
1547 
1548  kbTest(bucket);
1549  }
1550 
1551  kbTest(bucket);
1552 
1553  // now bucket must be empty!
1554  assume( kBucketClear(bucket) == NULL );
1555 
1556  const poly result = tail.ClearAdd(); // TODO: use Merge with sBucket???
1557 
1558 
1559  if( m_spoly_bucket == NULL )
1561  else
1563 
1564 
1565  if( UNLIKELY(OPT__TREEOUTPUT) )
1566  {
1567  PrintS("]},");
1568  }
1569 
1570 #ifndef SING_NDEBUG
1571  if( OPT__DEBUG )
1572  {
1573  PrintS("SchreyerSyzygyComputation::SchreyerSyzygyNF(syz_lead, poly syz_2) =>>> \n");
1574  dPrint(result, r, r, 0);
1575  PrintLn();
1576  // TODO: Add SyzCheck!!!???
1577  }
1578 #endif
1579 
1580  return result;
1581 }
void kBucketClear(kBucket_pt bucket, poly *p, int *length)
Definition: kbuckets.cc:495
BOOLEAN kbTest(kBucket_pt bucket)
Tests
Definition: kbuckets.cc:181
void PrintLn()
Definition: reporter.cc:310
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:968
#define p_GetComp(p, r)
Definition: monomials.h:72
poly FindReducer(const poly multiplier, const poly monom, const poly syzterm, const CReducerFinder &checker) const
Definition: syzextra.cc:2600
#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:205
CReducerFinder m_checker
for checking tail-terms and makeing them irreducible (wrt m_LS!)
Definition: syzextra.h:531
poly kBucketExtractLm(kBucket_pt bucket)
Definition: kbuckets.cc:485
const ring r
Definition: syzextra.cc:208
void kBucketDestroy(kBucket_pt *bucket_pt)
Definition: kbuckets.cc:200
const bool OPT__PROT
TEST_OPT_PROT.
Definition: syzextra.h:236
P bucket
Definition: myNF.cc:79
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
void PrintS(const char *s)
Definition: reporter.cc:284
#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:843
#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:795
const int OPT__TREEOUTPUT
output lifting tree
Definition: syzextra.h:230
const ring m_rBaseRing
global base ring
Definition: syzextra.h:242
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:219
static void p_LmDelete(poly p, const ring r)
Definition: p_polys.h:706
const ideal m_idTails
input tails
Definition: syzextra.h:513
static jList * T
Definition: janet.cc:37
polyrec * poly
Definition: hilb.h:10
kBucket_pt kBucketCreate(const ring bucket_ring)
Creation/Destruction of buckets
Definition: kbuckets.cc:193
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
assume(R !=NULL)
return result
Definition: facAbsBiFact.cc:76

◆ SetUpTailTerms()

void SchreyerSyzygyComputation::SetUpTailTerms ( )

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

Definition at line 682 of file syzextra.cc.

683 {
684  const ideal idTails = m_idTails;
685  assume( idTails != NULL );
686  assume( idTails->m != NULL );
687  const ring r = m_rBaseRing;
688 
689  unsigned long pp[4] = {0,0,0,0}; // count preprocessed terms...
690 
691 #ifndef SING_NDEBUG
692  if( OPT__DEBUG | 0)
693  {
694  PrintS("SchreyerSyzygyComputation::SetUpTailTerms(): Tails: \n");
695  dPrint(idTails, r, r, 0);
696  }
697 #endif
698 
699  for( int p = IDELEMS(idTails) - 1; p >= 0; --p )
700  for( poly* tt = &(idTails->m[p]); (*tt) != NULL; )
701  {
702  const poly t = *tt;
703  const int k = m_div.PreProcessTerm(t, m_checker); // 0..3
704  assume( 0 <= k && k <= 3 );
705 
706  pp[k]++; // collect stats
707 
708  if( k )
709  {
710 #ifndef SING_NDEBUG
711  if( OPT__DEBUG)
712  {
713  Print("SchreyerSyzygyComputation::SetUpTailTerms(): PP (%d) the following TT: \n", k);
714  dPrint(t, r, r, 0);
715  }
716 #endif
717 
718  (*tt) = p_LmDeleteAndNext(t, r); // delete the lead and next...
719  }
720  else
721  tt = &pNext(t); // go next?
722 
723  }
724 
725 #ifndef SING_NDEBUG
726  if( OPT__DEBUG | 0)
727  {
728  PrintS("SchreyerSyzygyComputation::SetUpTailTerms(): Preprocessed Tails: \n");
729  dPrint(idTails, r, r, 0);
730  }
731 #endif
732 
733  if( UNLIKELY(OPT__PROT) )
734  {
735  Print("(PP/ST: {c: %lu, C: %lu, P: %lu} + %lu)", pp[1], pp[2], pp[3], pp[0]);
736  m_stat[0] += pp [0]; m_stat[1] += pp [1]; m_stat[2] += pp [2]; m_stat[3] += pp [3];
737  }
738 }
#define Print
Definition: emacs.cc:83
static poly p_LmDeleteAndNext(poly p, const ring r)
Definition: p_polys.h:720
return P p
Definition: myNF.cc:203
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:205
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:236
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
void PrintS(const char *s)
Definition: reporter.cc:284
#define IDELEMS(i)
Definition: simpleideals.h:24
#define NULL
Definition: omList.c:10
const ring m_rBaseRing
global base ring
Definition: syzextra.h:242
#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
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:587
assume(R !=NULL)

◆ TraverseNF()

poly SchreyerSyzygyComputation::TraverseNF ( const poly  syz_lead,
const poly  syz_2 = NULL 
) const

Definition at line 1034 of file syzextra.cc.

1035 {
1036 #ifndef SING_NDEBUG
1037  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1038 #endif
1039 
1040  const ideal& L = m_idLeads;
1041  const ideal& T = m_idTails;
1042 
1043  const ring& R = m_rBaseRing;
1044 
1045  const int r = p_GetComp(a, R) - 1;
1046 
1047  assume( r >= 0 && r < IDELEMS(T) );
1048  assume( r >= 0 && r < IDELEMS(L) );
1049 
1050  assume( a != NULL );
1051 
1052 #ifndef SING_NDEBUG
1053  if( OPT__DEBUG )
1054  {
1055  PrintS("SchreyerSyzygyComputation::TraverseNF(syz_lead, poly syz_2), \n");
1056  PrintS("syz_lead: \n");
1057  dPrint(a, R, R, 0);
1058  PrintS("syz_2: \n");
1059  dPrint(a2, R, R, 0);
1060  PrintLn();
1061  }
1062 #endif
1063 
1064  if( UNLIKELY(OPT__TREEOUTPUT) )
1065  {
1066  PrintS("{ \"proc\": \"TraverseNF\", \"nodelabel\": \"");
1067  writeLatexTerm(a, R);
1068  PrintS("\", \"children\": [");
1069  }
1070 
1071  poly aa = leadmonom(a, R); assume( aa != NULL); // :(
1072 
1073 #ifndef SING_NDEBUG
1074  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1075 #endif
1076 
1077  poly t = TraverseTail(aa, r);
1078 
1079  if( a2 != NULL )
1080  {
1081  assume( OPT__LEAD2SYZ );
1082 
1083  if( UNLIKELY(OPT__TREEOUTPUT) )
1084  {
1085 
1086  PrintS("{ \"proc\": \"TraverseNF2\", \"nodelabel\": \"");
1087  writeLatexTerm(a2, R);
1088  PrintS("\", \"children\": [");
1089  }
1090 
1091  // replace the following... ?
1092  const int r2 = p_GetComp(a2, R) - 1; poly aa2 = leadmonom(a2, R); // :(
1093 
1094  assume( r2 >= 0 && r2 < IDELEMS(T) );
1095 
1096  poly s = TraverseTail(aa2, r2);
1097 
1098  p_Delete(&aa2, R);
1099 
1100 
1101  if( UNLIKELY(OPT__TREEOUTPUT) )
1102  {
1103  PrintS("], \"noderesult\": \"");
1104  writeLatexTerm(s, R, true, false);
1105  PrintS("\" },");
1106  }
1107 
1108  t = p_Add_q(a2, p_Add_q(t, s, R), R);
1109 
1110 #ifndef SING_NDEBUG
1111  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1112 #endif
1113 
1114  } else
1115  t = p_Add_q(t, ReduceTerm(aa, L->m[r], a), R); // should be identical to bove with a2
1116 
1117  p_Delete(&aa, R);
1118 
1119  if( UNLIKELY(OPT__TREEOUTPUT) )
1120  {
1121 // poly tt = pp_Add_qq( a, t, R);
1122  PrintS("], \"noderesult\": \"");
1123  writeLatexTerm(t, R, true, false);
1124  PrintS("\" },");
1125 // p_Delete(&tt, R);
1126  }
1127 #ifndef SING_NDEBUG
1128  if( OPT__DEBUG )
1129  {
1130  PrintS("SchreyerSyzygyComputation::TraverseNF(syz_lead, poly syz_2), ==>>> \n");
1131  dPrint(t, R, R, 0);
1132  PrintLn();
1133  }
1134 #endif
1135 
1136 #ifndef SING_NDEBUG
1137  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1138 #endif
1139 
1140  return t;
1141 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
const poly a
Definition: syzextra.cc:212
void PrintLn()
Definition: reporter.cc:310
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
#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:205
CReducerFinder m_checker
for checking tail-terms and makeing them irreducible (wrt m_LS!)
Definition: syzextra.h:531
poly ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck) const
TODO: save shortcut (syz: |-.->) LM(m) * "t" -> ? ???
Definition: syzextra.cc:1893
const ring r
Definition: syzextra.cc:208
const ring R
Definition: DebugPrint.cc:36
poly TraverseTail(poly multiplier, const int tail) const
High level caching function!!!
Definition: syzextra.cc:1592
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
void PrintS(const char *s)
Definition: reporter.cc:284
#define IDELEMS(i)
Definition: simpleideals.h:24
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:843
#define NULL
Definition: omList.c:10
const int OPT__TREEOUTPUT
output lifting tree
Definition: syzextra.h:230
const ring m_rBaseRing
global base ring
Definition: syzextra.h:242
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:877
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
assume(R !=NULL)

◆ TraverseTail() [1/2]

poly SchreyerSyzygyComputation::TraverseTail ( poly  multiplier,
const int  tail 
) const

High level caching function!!!

Definition at line 1592 of file syzextra.cc.

1593 {
1594 #ifndef SING_NDEBUG
1595  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1596 #endif
1597 
1598  const ring& r = m_rBaseRing;
1599 
1600  assume(m_idTails != NULL && m_idTails->m != NULL);
1601  assume( tail >= 0 && tail < IDELEMS(m_idTails) );
1602 
1603  p_Test(multiplier, r);
1604 
1605  if( UNLIKELY(OPT__NOCACHING) )
1606  return ComputeImage(multiplier, tail);
1607 
1608  // TODO: store (multiplier, tail) -.-^-.-^-.--> !
1609  TCache::iterator top_itr = m_cache.find(tail);
1610 
1611  if ( top_itr != m_cache.end() )
1612  {
1613  assume( top_itr->first == tail );
1614 
1615  TP2PCache& T = top_itr->second;
1616 
1617  TP2PCache::iterator itr = T.find(multiplier);
1618 
1619  if( itr != T.end() ) // Yey - Reuse!!!
1620  {
1621  assume( p_LmEqual(itr->first, multiplier, r) );
1622 
1623  if( itr->second == NULL ) // leadcoeff plays no role if value is NULL!
1624  return (NULL);
1625 
1626  if( UNLIKELY( OPT__TREEOUTPUT ) )
1627  {
1628 // PrintS("{ \"nodelabel\": \""); writeLatexTerm(multiplier, r, false);
1629 // Print(" \\\\GEN{%d}\", \"children\": [ ", tail + 1);
1630  PrintS("{ \"proc\": \"TTLookup\", \"nodelabel\": \"");
1631  writeLatexTerm(itr->first, r, false); Print(" \\\\GEN{%d}\", \"Lookup\": \"", tail + 1);
1632  writeLatexTerm(itr->second, r, true, false);
1633  PrintS("\", ");
1634  }
1635 
1636  poly p = p_Copy(itr->second, r); // COPY!!!
1637 
1638  p_Test(multiplier, r);
1639 
1640  if( !n_Equal( pGetCoeff(multiplier), pGetCoeff(itr->first), r->cf) ) // normalize coeffs!?
1641  {
1642  number n = n_Div( pGetCoeff(multiplier), pGetCoeff(itr->first), r->cf); // new number
1643 
1644  if( UNLIKELY( OPT__TREEOUTPUT ) )
1645  {
1646  StringSetS("");
1647  n_Write(n, r->cf);
1648  char* s = StringEndS();
1649  Print("\"recale\": \"%s\", ", s);
1650  omFree(s);
1651  }
1652 
1653  if( UNLIKELY( OPT__PROT ) ) ++ m_stat[7]; // PrintS("l*"); // lookup & rescale
1654 
1655  p = p_Mult_nn(p, n, r); // !
1656  n_Delete(&n, r->cf);
1657  } else
1658  if( UNLIKELY( OPT__PROT ) ) ++ m_stat[6]; // PrintS("l"); // lookup no rescale
1659 
1660  if( UNLIKELY(OPT__TREEOUTPUT) )
1661  {
1662  PrintS("\"noderesult\": \""); writeLatexTerm(p, r, true, false); PrintS("\" },");
1663  }
1664 
1665 #ifndef SING_NDEBUG
1666  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1667 #endif
1668  p_Test(multiplier, r);
1669 
1670  return p;
1671  }
1672 
1673 
1674  if( UNLIKELY(OPT__TREEOUTPUT) )
1675  {
1676  Print("{ \"proc\": \"TTStore%d\", \"nodelabel\": \"", tail + 1); writeLatexTerm(multiplier, r, false); Print(" \\\\GEN{%d}\", \"children\": [", tail + 1);
1677  }
1678 
1679  p_Test(multiplier, r);
1680 
1681  const poly p = ComputeImage(multiplier, tail);
1682 
1683  if( UNLIKELY(OPT__TREEOUTPUT) )
1684  {
1685  PrintS("], \"noderesult\": \""); writeLatexTerm(p, r, true, false); PrintS("\" },");
1686  }
1687 
1688  if( UNLIKELY(OPT__PROT) ) ++ m_stat[8]; // PrintS("S"); // store
1689 
1690  p_Test(multiplier, r);
1691 
1692  T.insert( TP2PCache::value_type(myp_Head(multiplier, (p==NULL), r), p) ); // T[ multiplier ] = p;
1693 
1694  p_Test(multiplier, r);
1695 
1696 // if( p == NULL )
1697 // return (NULL);
1698 
1699 #ifndef SING_NDEBUG
1700  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1701 #endif
1702 
1703  return p_Copy(p, r);
1704  }
1705 
1706  CCacheCompare o(r); TP2PCache T(o);
1707 
1708  if( UNLIKELY(OPT__TREEOUTPUT) )
1709  {
1710  Print("{ \"proc\": \"TTStore%d\", \"nodelabel\": \"", 0); writeLatexTerm(multiplier, r, false); Print(" \\\\GEN{%d}\", \"children\": [", tail + 1);
1711  }
1712 
1713  const poly p = ComputeImage(multiplier, tail);
1714 
1715  if( UNLIKELY(OPT__TREEOUTPUT) )
1716  {
1717  PrintS("], \"noderesult\": \""); writeLatexTerm(p, r, true, false); PrintS("\" },");
1718  }
1719 
1720  if( UNLIKELY( OPT__PROT ) ) ++ m_stat[8]; // PrintS("S"); // store // %d", tail + 1);
1721 
1722  T.insert( TP2PCache::value_type(myp_Head(multiplier, (p==NULL), r), p) );
1723 
1724  m_cache.insert( TCache::value_type(tail, T) );
1725 
1726 // if( p == NULL )
1727 // return (NULL);
1728 
1729 #ifndef SING_NDEBUG
1730  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1731 #endif
1732 
1733  return p_Copy(p, r);
1734 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
#define Print
Definition: emacs.cc:83
return P p
Definition: myNF.cc:203
#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:205
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:804
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:236
static FORCE_INLINE void n_Write(number n, const coeffs r, const BOOLEAN bShortOut=TRUE)
Definition: coeffs.h:595
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
void PrintS(const char *s)
Definition: reporter.cc:284
static poly p_Mult_nn(poly p, number n, const ring r)
Definition: p_polys.h:895
#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:1611
#define NULL
Definition: omList.c:10
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of &#39;a&#39; and &#39;b&#39;, i.e., a/b; raises an error if &#39;b&#39; is not invertible in r exceptio...
Definition: coeffs.h:619
const int OPT__TREEOUTPUT
output lifting tree
Definition: syzextra.h:230
poly ComputeImage(poly multiplier, const int tail) const
low level computation...
Definition: syzextra.cc:1736
const ring m_rBaseRing
global base ring
Definition: syzextra.h:242
static FORCE_INLINE BOOLEAN n_Equal(number a, number b, const coeffs r)
TRUE iff &#39;a&#39; and &#39;b&#39; represent the same number; they may have different representations.
Definition: coeffs.h:464
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 &#39;p&#39;
Definition: coeffs.h:459
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
assume(R !=NULL)
const int OPT__NOCACHING
no caching/stores/lookups
Definition: syzextra.h:239
std::map< TCacheKey, TCacheValue, CCacheCompare > TP2PCache
Definition: syzextra.h:383

◆ TraverseTail() [2/2]

poly SchreyerSyzygyComputation::TraverseTail ( poly  multiplier,
poly  tail 
) const

called only from above and from outside (for testing)

Definition at line 1775 of file syzextra.cc.

1776 {
1778 
1779  const ideal& L = m_idLeads;
1780  const ideal& T = m_idTails;
1781  const ring& r = m_rBaseRing;
1782 
1783  assume( multiplier != NULL );
1784 
1785  assume( L != NULL );
1786  assume( T != NULL );
1787 
1788  p_Test(multiplier, r);
1789 
1790 #ifndef SING_NDEBUG
1791  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1792 #endif
1793 
1794  if( UNLIKELY( !( (!OPT__TAILREDSYZ) || m_lcm.Check(multiplier) )) )
1795  {
1797  {
1798  ++ m_stat[5]; // PrintS("%"); // check LCM !
1799 #ifndef SING_NDEBUG
1800  if( OPT__DEBUG )
1801  {
1802  PrintS("\nTT,%:"); dPrint(multiplier, r, r, 0);
1803  PrintS(", * :"); dPrint(tail, r, r, 0);
1804  PrintLn();
1805  }
1806 #endif
1807  }
1808  return NULL;
1809  }
1810 
1811  // const bool bUsePolynomial = TEST_OPT_NOT_BUCKETS; // || (pLength(tail) < MIN_LENGTH_BUCKET);
1812 
1814 /*
1815  sBucket_pt sum;
1816 
1817  if( m_sum_bucket == NULL )
1818  sum = sBucketCreate(r);
1819  else
1820  {
1821  if( !sIsEmpty(m_sum_bucket) )
1822  sum = sBucketCreate(r);
1823  else
1824  {
1825  sum = m_sum_bucket;
1826  m_sum_bucket = NULL;
1827  }
1828  }
1829 
1830 
1831  assume( sum != NULL ); assume ( sIsEmpty(sum) );
1832  assume( r == sBucketGetRing(sum) );
1833 */
1834 
1835 // poly s; int len;
1836 
1837  // CPolynomialSummator sum(r, bUsePolynomial);
1838  // poly s = NULL;
1839 
1840  if( UNLIKELY( OPT__TREEOUTPUT & 0 ) )
1841  {
1842  Print("{ \"proc\": \"TTPoly\", \"nodelabel\": \""); writeLatexTerm(multiplier, r, false); Print(" * \\\\ldots \", \"children\": [");
1843  }
1844 
1845  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1846  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1847  for(poly p = tail; p != NULL; p = pNext(p)) // iterate over the tail
1848  {
1849  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1850  const poly rt = ReduceTerm(multiplier, p, NULL); // TODO: also return/store length?
1851  sum.Add(rt);
1852  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1853  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1854  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1855 
1856 // const int lp = pLength(rt);
1857 // if( rt != NULL && lp != 0 )
1858 // sBucket_Add_p(sum, rt, lp);
1859  }
1860  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1861  // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1862 
1863 // sBucketClearAdd(sum, &s, &len); // Will Not Clear?!?
1864  const poly s = sum.ClearAdd();
1865 
1866 // assume( sum != NULL ); assume ( sIsEmpty(sum) );
1867 /*
1868  if( m_sum_bucket == NULL )
1869  m_sum_bucket = sum;
1870  else
1871  sBucketDestroy(&sum);
1872 
1873  assume( pLength(s) == len );
1874 */
1875 
1876 #ifndef SING_NDEBUG
1877  if( OPT__DEBUG ) { m_div.Verify(); m_checker.Verify(); }
1878 #endif
1879 
1880  if( UNLIKELY( OPT__TREEOUTPUT & 0 ) )
1881  {
1882  PrintS("], \"noderesult\": \""); writeLatexTerm(s, r, true, false); PrintS("\" },");
1883  }
1884 
1885  p_Test(multiplier, r);
1886 
1887  return s;
1888 }
const CanonicalForm int s
Definition: facAbsFact.cc:55
void PrintLn()
Definition: reporter.cc:310
#define Print
Definition: emacs.cc:83
const ideal m_idLeads
input leading terms
Definition: syzextra.h:510
return P p
Definition: myNF.cc:203
#define UNLIKELY(expression)
Definition: tgb_internal.h:838
const int OPT__DEBUG
output all the intermediate states
Definition: syzextra.h:205
CReducerFinder m_checker
for checking tail-terms and makeing them irreducible (wrt m_LS!)
Definition: syzextra.h:531
poly ReduceTerm(poly multiplier, poly term4reduction, poly syztermCheck) const
TODO: save shortcut (syz: |-.->) LM(m) * "t" -> ? ???
Definition: syzextra.cc:1893
const int OPT__TAILREDSYZ
Reduce syzygy tails wrt the leading syzygy terms.
Definition: syzextra.h:211
const ring r
Definition: syzextra.cc:208
const bool OPT__PROT
TEST_OPT_PROT.
Definition: syzextra.h:236
const CReducerFinder m_div
Divisor finder.
Definition: syzextra.h:528
void PrintS(const char *s)
Definition: reporter.cc:284
#define p_Test(p, r)
Definition: p_polys.h:160
bool Check(const poly m) const
Definition: syzextra.cc:3066
#define NULL
Definition: omList.c:10
const int OPT__TREEOUTPUT
output lifting tree
Definition: syzextra.h:230
const ring m_rBaseRing
global base ring
Definition: syzextra.h:242
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:219
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
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
assume(R !=NULL)

Friends And Related Function Documentation

◆ CLCM

friend class CLCM
friend

Definition at line 399 of file syzextra.h.

◆ CReducerFinder

friend class CReducerFinder
friend

Definition at line 400 of file syzextra.h.

Field Documentation

◆ m_cache

TCache SchreyerSyzygyComputation::m_cache
mutableprivate

Definition at line 554 of file syzextra.h.

◆ m_checker

CReducerFinder SchreyerSyzygyComputation::m_checker
private

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

Definition at line 531 of file syzextra.h.

◆ m_div

const CReducerFinder SchreyerSyzygyComputation::m_div
private

Divisor finder.

Definition at line 528 of file syzextra.h.

◆ m_idLeads

const ideal SchreyerSyzygyComputation::m_idLeads
private

input leading terms

Definition at line 510 of file syzextra.h.

◆ m_idTails

const ideal SchreyerSyzygyComputation::m_idTails
private

input tails

Definition at line 513 of file syzextra.h.

◆ m_lcm

const CLCM SchreyerSyzygyComputation::m_lcm
private

Bitmask for variables occuring in leading terms.

Definition at line 525 of file syzextra.h.

◆ m_LS

ideal SchreyerSyzygyComputation::m_LS
private

leading syzygy terms used for reducing syzygy tails

Definition at line 521 of file syzextra.h.

◆ m_spoly_bucket

kBucket_pt SchreyerSyzygyComputation::m_spoly_bucket
mutableprivate

for S-Polynomial reductions

Definition at line 563 of file syzextra.h.

◆ m_stat

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.

◆ m_sum_bucket_factory

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.

◆ m_syzLeads

ideal SchreyerSyzygyComputation::m_syzLeads
private

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

Definition at line 516 of file syzextra.h.

◆ m_syzTails

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: