Macros | Typedefs | Functions | Variables
kstd1.h File Reference
#include <kernel/structs.h>
#include <polys/monomials/ring.h>

Go to the source code of this file.

Macros

#define KSTD_NF_LAZY   1
 
#define KSTD_NF_ECART   2
 
#define KSTD_NF_NONORM   4
 

Typedefs

typedef BOOLEAN(* s_poly_proc_t) (kStrategy strat)
 

Functions

ideal mora (ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
 
poly kNF1 (ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce)
 
ideal kNF1 (ideal F, ideal Q, ideal q, kStrategy strat, int lazyReduce)
 
poly kNF (ideal F, ideal Q, poly p, int syzComp=0, int lazyReduce=0)
 
ideal kNF (ideal F, ideal Q, ideal p, int syzComp=0, int lazyReduce=0)
 
poly kNFBound (ideal F, ideal Q, poly p, int bound, int syzComp=0, int lazyReduce=0)
 
ideal kNFBound (ideal F, ideal Q, ideal p, int bound, int syzComp=0, int lazyReduce=0)
 
poly k_NF (ideal F, ideal Q, poly p, int syzComp, int lazyReduce, const ring _currRing)
 NOTE: this is just a wrapper which sets currRing for the actual kNF call. More...
 
ideal kSba (ideal F, ideal Q, tHomog h, intvec **mw, int incremental=0, int arri=0, intvec *hilb=NULL, int syzComp=0, int newIdeal=0, intvec *vw=NULL)
 
ideal kStd (ideal F, ideal Q, tHomog h, intvec **mw, intvec *hilb=NULL, int syzComp=0, int newIdeal=0, intvec *vw=NULL, s_poly_proc_t sp=NULL)
 
ideal kStdShift (ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, int uptodeg, int lVblock)
 
void initMora (ideal F, kStrategy strat)
 
ideal kInterRed (ideal F, ideal Q=NULL)
 
ideal kInterRedOld (ideal F, ideal Q=NULL)
 
long kModDeg (poly p, ring r=currRing)
 
long kHomModDeg (poly p, ring r=currRing)
 
ideal stdred (ideal F, ideal Q, tHomog h, intvec **w)
 
ideal kMin_std (ideal F, ideal Q, tHomog h, intvec **w, ideal &M, intvec *hilb=NULL, int syzComp=0, int reduced=0)
 

Variables

int LazyPass
 
int LazyDegree
 
int Kstd1_mu
 
int Kstd1_deg
 
BITSET kOptions
 
BITSET validOpts
 
intveckModW
 
intveckHomW
 

Macro Definition Documentation

§ KSTD_NF_ECART

#define KSTD_NF_ECART   2

Definition at line 19 of file kstd1.h.

§ KSTD_NF_LAZY

#define KSTD_NF_LAZY   1

Definition at line 17 of file kstd1.h.

§ KSTD_NF_NONORM

#define KSTD_NF_NONORM   4

Definition at line 21 of file kstd1.h.

Typedef Documentation

§ s_poly_proc_t

typedef BOOLEAN(* s_poly_proc_t) (kStrategy strat)

Definition at line 14 of file kstd1.h.

Function Documentation

§ initMora()

void initMora ( ideal  F,
kStrategy  strat 
)

Definition at line 1549 of file kstd1.cc.

1550 {
1551  int i,j;
1552 
1553  strat->NotUsedAxis = (BOOLEAN *)omAlloc(((currRing->N)+1)*sizeof(BOOLEAN));
1554  for (j=(currRing->N); j>0; j--) strat->NotUsedAxis[j] = TRUE;
1555  strat->enterS = enterSMora;
1556  strat->initEcartPair = initEcartPairMora; /*- ecart approximation -*/
1557  strat->posInLOld = strat->posInL;
1558  strat->posInLOldFlag = TRUE;
1559  strat->initEcart = initEcartNormal;
1560  strat->kHEdgeFound = (currRing->ppNoether) != NULL;
1561  if ( strat->kHEdgeFound )
1562  strat->kNoether = pCopy((currRing->ppNoether));
1563  else if (strat->kHEdgeFound || strat->homog)
1564  strat->red = redFirst; /*take the first possible in T*/
1565  else
1566  strat->red = redEcart;/*take the first possible in under ecart-restriction*/
1567  if (strat->kHEdgeFound)
1568  {
1569  strat->HCord = currRing->pFDeg((currRing->ppNoether),currRing)+1;
1570  strat->posInT = posInT2;
1571  }
1572  else
1573  {
1574  strat->HCord = 32000;/*- very large -*/
1575  }
1576 
1577  if (rField_is_Ring(currRing))
1578  strat->red = redRiloc;
1579 
1580  /*reads the ecartWeights used for Graebes method from the
1581  *intvec ecart and set ecartWeights
1582  */
1583  if ((TEST_OPT_WEIGHTM)&&(F!=NULL))
1584  {
1585  //interred machen Aenderung
1586  strat->pOrigFDeg=currRing->pFDeg;
1587  strat->pOrigLDeg=currRing->pLDeg;
1588  ecartWeights=(short *)omAlloc(((currRing->N)+1)*sizeof(short));
1589  /*uses automatic computation of the ecartWeights to set them*/
1591 
1593  if (TEST_OPT_PROT)
1594  {
1595  for(i=1; i<=(currRing->N); i++)
1596  Print(" %d",ecartWeights[i]);
1597  PrintLn();
1598  mflush();
1599  }
1600  }
1601  kOptimizeLDeg(currRing->pLDeg, strat);
1602 }
int(* posInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.h:278
void PrintLn()
Definition: reporter.cc:310
int posInT2(const TSet set, const int length, LObject &p)
Definition: kutil.cc:5372
#define Print
Definition: emacs.cc:83
int redEcart(LObject *h, kStrategy strat)
Definition: kstd1.cc:172
#define TEST_OPT_PROT
Definition: options.h:98
void kEcartWeights(poly *s, int sl, short *eweight, const ring R)
Definition: weight.cc:190
long totaldegreeWecart(poly p, ring r)
Definition: weight.cc:225
short * ecartWeights
Definition: weight0.c:28
int redFirst(LObject *h, kStrategy strat)
Definition: kstd1.cc:601
BOOLEAN * NotUsedAxis
Definition: kutil.h:328
poly kNoether
Definition: kutil.h:324
#define TRUE
Definition: auxiliary.h:98
void(* initEcartPair)(LObject *h, poly f, poly g, int ecartF, int ecartG)
Definition: kutil.h:281
int(* red)(LObject *L, kStrategy strat)
Definition: kutil.h:272
#define omAlloc(size)
Definition: omAllocDecl.h:210
int(* posInT)(const TSet T, const int tl, LObject &h)
Definition: kutil.h:275
int HCord
Definition: kutil.h:351
#define mflush()
Definition: reporter.h:57
pFDegProc pOrigFDeg
Definition: kutil.h:290
int redRiloc(LObject *h, kStrategy strat)
Definition: kstd1.cc:348
void(* initEcart)(TObject *L)
Definition: kutil.h:274
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
pLDegProc pOrigLDeg
Definition: kutil.h:291
BOOLEAN homog
Definition: kutil.h:369
void initEcartPairMora(LObject *Lp, poly, poly, int ecartF, int ecartG)
Definition: kutil.cc:1256
int j
Definition: myNF.cc:70
void pSetDegProcs(ring r, pFDegProc new_FDeg, pLDegProc new_lDeg)
Definition: p_polys.cc:3496
void enterSMora(LObject &p, int atS, kStrategy strat, int atR=-1)
Definition: kstd1.cc:1362
void(* enterS)(LObject &h, int pos, kStrategy strat, int atR)
Definition: kutil.h:280
int i
Definition: cfEzgcd.cc:123
static void kOptimizeLDeg(pLDegProc ldeg, kStrategy strat)
Definition: kstd1.cc:103
int(* posInLOld)(const LSet Ls, const int Ll, LObject *Lo, const kStrategy strat)
Definition: kutil.h:282
#define IDELEMS(i)
Definition: simpleideals.h:24
BOOLEAN kHEdgeFound
Definition: kutil.h:373
#define TEST_OPT_WEIGHTM
Definition: options.h:115
static BOOLEAN rField_is_Ring(const ring r)
Definition: ring.h:477
#define NULL
Definition: omList.c:10
BOOLEAN posInLOldFlag
Definition: kutil.h:379
long maxdegreeWecart(poly p, int *l, ring r)
Definition: weight.cc:255
void initEcartNormal(TObject *h)
Definition: kutil.cc:1234
int BOOLEAN
Definition: auxiliary.h:85
#define pCopy(p)
return a copy of the poly
Definition: polys.h:168

§ k_NF()

poly k_NF ( ideal  F,
ideal  Q,
poly  p,
int  syzComp,
int  lazyReduce,
const ring  _currRing 
)

NOTE: this is just a wrapper which sets currRing for the actual kNF call.

Definition at line 3164 of file kstd1.cc.

3165 {
3166  const ring save = currRing;
3167  if( currRing != _currRing ) rChangeCurrRing(_currRing);
3168  poly ret = kNF(F, Q, p, syzComp, lazyReduce);
3169  if( currRing != save ) rChangeCurrRing(save);
3170  return ret;
3171 }
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
Definition: kstd1.cc:2971
return P p
Definition: myNF.cc:203
#define Q
Definition: sirandom.c:25
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int syzComp
Definition: myNF.cc:291
void rChangeCurrRing(ring r)
Definition: polys.cc:12
polyrec * poly
Definition: hilb.h:10
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int int lazyReduce
Definition: myNF.cc:292

§ kHomModDeg()

long kHomModDeg ( poly  p,
ring  r = currRing 
)

Definition at line 2218 of file kstd1.cc.

2219 {
2220  int i;
2221  long j=0;
2222 
2223  for (i=r->N;i>0;i--)
2224  j+=p_GetExp(p,i,r)*(*kHomW)[i-1];
2225  if (kModW == NULL) return j;
2226  i = p_GetComp(p,r);
2227  if (i==0) return j;
2228  return j+(*kModW)[i-1];
2229 }
return P p
Definition: myNF.cc:203
#define p_GetComp(p, r)
Definition: monomials.h:72
const ring r
Definition: syzextra.cc:208
intvec * kModW
Definition: kstd1.cc:2206
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 i
Definition: cfEzgcd.cc:123
#define NULL
Definition: omList.c:10

§ kInterRed()

ideal kInterRed ( ideal  F,
ideal  Q = NULL 
)

Definition at line 3542 of file kstd1.cc.

3543 {
3544 #ifdef HAVE_PLURAL
3545  if(rIsPluralRing(currRing)) return kInterRedOld(F,Q);
3546 #endif
3549  )
3550  return kInterRedOld(F,Q);
3551 
3552  //return kInterRedOld(F,Q);
3553 
3554  BITSET save1;
3555  SI_SAVE_OPT1(save1);
3556  //si_opt_1|=Sy_bit(OPT_NOT_SUGAR);
3558  //si_opt_1&= ~Sy_bit(OPT_REDTAIL);
3559  //si_opt_1&= ~Sy_bit(OPT_REDSB);
3560  //extern char * showOption() ;
3561  //Print("%s\n",showOption());
3562 
3563  int need_retry;
3564  int counter=3;
3565  ideal res, res1;
3566  int elems;
3567  ideal null=NULL;
3568  if ((Q==NULL) || (!TEST_OPT_REDSB))
3569  {
3570  elems=idElem(F);
3571  res=kInterRedBba(F,Q,need_retry);
3572  }
3573  else
3574  {
3575  ideal FF=idSimpleAdd(F,Q);
3576  res=kInterRedBba(FF,NULL,need_retry);
3577  idDelete(&FF);
3578  null=idInit(1,1);
3579  if (need_retry)
3580  res1=kNF(null,Q,res,0,KSTD_NF_LAZY);
3581  else
3582  res1=kNF(null,Q,res);
3583  idDelete(&res);
3584  res=res1;
3585  need_retry=1;
3586  }
3587  if (idElem(res)<=1) need_retry=0;
3588  while (need_retry && (counter>0))
3589  {
3590  #ifdef KDEBUG
3591  if (TEST_OPT_DEBUG) { Print("retry counter %d\n",counter); }
3592  #endif
3593  res1=kInterRedBba(res,Q,need_retry);
3594  int new_elems=idElem(res1);
3595  counter -= (new_elems >= elems);
3596  elems = new_elems;
3597  idDelete(&res);
3598  if (idElem(res1)<=1) need_retry=0;
3599  if ((Q!=NULL) && (TEST_OPT_REDSB))
3600  {
3601  if (need_retry)
3602  res=kNF(null,Q,res1,0,KSTD_NF_LAZY);
3603  else
3604  res=kNF(null,Q,res1);
3605  idDelete(&res1);
3606  }
3607  else
3608  res = res1;
3609  if (idElem(res)<=1) need_retry=0;
3610  }
3611  if (null!=NULL) idDelete(&null);
3612  SI_RESTORE_OPT1(save1);
3613  idSkipZeroes(res);
3614  return res;
3615 }
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
Definition: ring.h:750
unsigned si_opt_1
Definition: options.c:5
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
Definition: kstd1.cc:2971
#define Print
Definition: emacs.cc:83
#define idDelete(H)
delete an ideal
Definition: ideals.h:29
#define idSimpleAdd(A, B)
Definition: ideals.h:42
#define TEST_OPT_REDSB
Definition: options.h:99
#define SI_SAVE_OPT1(A)
Definition: options.h:20
#define TEST_OPT_DEBUG
Definition: options.h:103
#define Q
Definition: sirandom.c:25
#define BITSET
Definition: structs.h:18
#define Sy_bit(x)
Definition: options.h:30
poly res
Definition: myNF.cc:322
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
ideal kInterRedBba(ideal F, ideal Q, int &need_retry)
Definition: kstd1.cc:3268
#define KSTD_NF_LAZY
Definition: kstd1.h:17
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
ideal kInterRedOld(ideal F, ideal Q)
Definition: kstd1.cc:3177
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:38
static BOOLEAN rField_is_Ring(const ring r)
Definition: ring.h:477
#define NULL
Definition: omList.c:10
#define OPT_REDTHROUGH
Definition: options.h:77
int idElem(const ideal F)
count non-zero elements
#define SI_RESTORE_OPT1(A)
Definition: options.h:23
static BOOLEAN rField_is_numeric(const ring r)
Definition: ring.h:507

§ kInterRedOld()

ideal kInterRedOld ( ideal  F,
ideal  Q = NULL 
)

Definition at line 3177 of file kstd1.cc.

3178 {
3179  int j;
3180  kStrategy strat = new skStrategy;
3181 
3182  ideal tempF = F;
3183  ideal tempQ = Q;
3184 
3185 #ifdef HAVE_PLURAL
3186  if(rIsSCA(currRing))
3187  {
3188  const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing);
3189  const unsigned int m_iLastAltVar = scaLastAltVar(currRing);
3190  tempF = id_KillSquares(F, m_iFirstAltVar, m_iLastAltVar, currRing);
3191 
3192  // this should be done on the upper level!!! :
3193  // tempQ = SCAQuotient(currRing);
3194 
3195  if(Q == currRing->qideal)
3196  tempQ = SCAQuotient(currRing);
3197  }
3198 #endif
3199 
3200 // if (TEST_OPT_PROT)
3201 // {
3202 // writeTime("start InterRed:");
3203 // mflush();
3204 // }
3205  //strat->syzComp = 0;
3206  strat->kHEdgeFound = (currRing->ppNoether) != NULL;
3207  strat->kNoether=pCopy((currRing->ppNoether));
3208  strat->ak = id_RankFreeModule(tempF,currRing);
3209  initBuchMoraCrit(strat);
3210  strat->NotUsedAxis = (BOOLEAN *)omAlloc(((currRing->N)+1)*sizeof(BOOLEAN));
3211  for (j=(currRing->N); j>0; j--) strat->NotUsedAxis[j] = TRUE;
3212  strat->enterS = enterSBba;
3213  strat->posInT = posInT17;
3214  strat->initEcart = initEcartNormal;
3215  strat->sl = -1;
3216  strat->tl = -1;
3217  strat->tmax = setmaxT;
3218  strat->T = initT();
3219  strat->R = initR();
3220  strat->sevT = initsevT();
3222  initS(tempF, tempQ, strat);
3223  if (TEST_OPT_REDSB)
3224  strat->noTailReduction=FALSE;
3225  updateS(TRUE,strat);
3227  completeReduce(strat);
3228  //else if (TEST_OPT_PROT) PrintLn();
3229  pDelete(&strat->kHEdge);
3230  omFreeSize((ADDRESS)strat->T,strat->tmax*sizeof(TObject));
3231  omFreeSize((ADDRESS)strat->ecartS,IDELEMS(strat->Shdl)*sizeof(int));
3232  omFreeSize((ADDRESS)strat->sevS,IDELEMS(strat->Shdl)*sizeof(unsigned long));
3233  omFreeSize((ADDRESS)strat->NotUsedAxis,((currRing->N)+1)*sizeof(BOOLEAN));
3234  omfree(strat->sevT);
3235  omfree(strat->S_2_R);
3236  omfree(strat->R);
3237 
3238  if (strat->fromQ)
3239  {
3240  for (j=IDELEMS(strat->Shdl)-1;j>=0;j--)
3241  {
3242  if(strat->fromQ[j]) pDelete(&strat->Shdl->m[j]);
3243  }
3244  omFreeSize((ADDRESS)strat->fromQ,IDELEMS(strat->Shdl)*sizeof(int));
3245  }
3246 // if (TEST_OPT_PROT)
3247 // {
3248 // writeTime("end Interred:");
3249 // mflush();
3250 // }
3251  ideal shdl=strat->Shdl;
3252  idSkipZeroes(shdl);
3253  if (strat->fromQ)
3254  {
3255  strat->fromQ=NULL;
3256  ideal res=kInterRed(shdl,NULL);
3257  idDelete(&shdl);
3258  shdl=res;
3259  }
3260  delete(strat);
3261 #ifdef HAVE_PLURAL
3262  if( tempF != F )
3263  id_Delete( &tempF, currRing);
3264 #endif
3265  return shdl;
3266 }
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
Definition: ring.h:750
ideal SCAQuotient(const ring r)
Definition: sca.h:10
KINLINE TObject ** initR()
Definition: kInline.h:92
BOOLEAN honey
Definition: kutil.h:374
KINLINE unsigned long * initsevT()
Definition: kInline.h:97
poly kHEdge
Definition: kutil.h:323
#define idDelete(H)
delete an ideal
Definition: ideals.h:29
KINLINE TSet initT()
Definition: kInline.h:81
#define FALSE
Definition: auxiliary.h:94
BOOLEAN noTailReduction
Definition: kutil.h:375
int * S_2_R
Definition: kutil.h:338
BOOLEAN * NotUsedAxis
Definition: kutil.h:328
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
poly kNoether
Definition: kutil.h:324
int tl
Definition: kutil.h:346
#define TRUE
Definition: auxiliary.h:98
#define TEST_OPT_REDSB
Definition: options.h:99
unsigned long * sevT
Definition: kutil.h:319
void * ADDRESS
Definition: auxiliary.h:115
int ak
Definition: kutil.h:349
#define Q
Definition: sirandom.c:25
#define omAlloc(size)
Definition: omAllocDecl.h:210
int(* posInT)(const TSet T, const int tl, LObject &h)
Definition: kutil.h:275
poly res
Definition: myNF.cc:322
void(* initEcart)(TObject *L)
Definition: kutil.h:274
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
void initS(ideal F, ideal Q, kStrategy strat)
Definition: kutil.cc:8042
#define TEST_OPT_INTSTRATEGY
Definition: options.h:105
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
#define setmaxT
Definition: kutil.h:32
int j
Definition: myNF.cc:70
intset fromQ
Definition: kutil.h:315
void(* enterS)(LObject &h, int pos, kStrategy strat, int atR)
Definition: kutil.h:280
#define omfree(addr)
Definition: omAllocDecl.h:237
ideal kInterRed(ideal F, ideal Q)
Definition: kstd1.cc:3542
void initBuchMoraCrit(kStrategy strat)
Definition: kutil.cc:9777
int posInT17(const TSet set, const int length, LObject &p)
Definition: kutil.cc:5807
TObject ** R
Definition: kutil.h:336
#define IDELEMS(i)
Definition: simpleideals.h:24
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
static short scaFirstAltVar(ring r)
Definition: sca.h:18
int tmax
Definition: kutil.h:346
int int kStrategy strat
Definition: myNF.cc:68
BOOLEAN kHEdgeFound
Definition: kutil.h:373
intset ecartS
Definition: kutil.h:303
#define NULL
Definition: omList.c:10
ideal id_KillSquares(const ideal id, const short iFirstAltVar, const short iLastAltVar, const ring r, const bool bSkipZeroes)
Definition: sca.cc:1533
#define pDelete(p_ptr)
Definition: polys.h:169
static short scaLastAltVar(ring r)
Definition: sca.h:25
void updateS(BOOLEAN toT, kStrategy strat)
Definition: kutil.cc:9009
unsigned long * sevS
Definition: kutil.h:316
static bool rIsSCA(const ring r)
Definition: nc.h:206
void completeReduce(kStrategy strat, BOOLEAN withT)
Definition: kutil.cc:10622
int sl
Definition: kutil.h:344
TSet T
Definition: kutil.h:320
void initEcartNormal(TObject *h)
Definition: kutil.cc:1234
ideal Shdl
Definition: kutil.h:297
int BOOLEAN
Definition: auxiliary.h:85
class sTObject TObject
Definition: kutil.h:59
void enterSBba(LObject &p, int atS, kStrategy strat, int atR)
Definition: kutil.cc:9238
#define pCopy(p)
return a copy of the poly
Definition: polys.h:168

§ kMin_std()

ideal kMin_std ( ideal  F,
ideal  Q,
tHomog  h,
intvec **  w,
ideal &  M,
intvec hilb = NULL,
int  syzComp = 0,
int  reduced = 0 
)

Definition at line 2822 of file kstd1.cc.

2824 {
2825  if(idIs0(F))
2826  {
2827  M=idInit(1,F->rank);
2828  return idInit(1,F->rank);
2829  }
2831  {
2832  ideal sb;
2833  sb = kStd(F, Q, h, w, hilb);
2834  idSkipZeroes(sb);
2835  if(IDELEMS(sb) <= IDELEMS(F))
2836  {
2837  M = idCopy(sb);
2838  idSkipZeroes(M);
2839  return(sb);
2840  }
2841  else
2842  {
2843  M = idCopy(F);
2844  idSkipZeroes(M);
2845  return(sb);
2846  }
2847  }
2848  ideal r=NULL;
2849  int Kstd1_OldDeg = Kstd1_deg,i;
2850  intvec* temp_w=NULL;
2851  BOOLEAN b=currRing->pLexOrder,toReset=FALSE;
2852  BOOLEAN delete_w=(w==NULL);
2853  BOOLEAN oldDegBound=TEST_OPT_DEGBOUND;
2855 
2856  if(!TEST_OPT_RETURN_SB)
2857  strat->syzComp = syzComp;
2859  strat->LazyPass=20;
2860  else
2861  strat->LazyPass=2;
2862  strat->LazyDegree = 1;
2863  strat->minim=(reduced % 2)+1;
2864  strat->ak = id_RankFreeModule(F,currRing);
2865  if (delete_w)
2866  {
2867  temp_w=new intvec((strat->ak)+1);
2868  w = &temp_w;
2869  }
2870  if (h==testHomog)
2871  {
2872  if (strat->ak == 0)
2873  {
2874  h = (tHomog)idHomIdeal(F,Q);
2875  w=NULL;
2876  }
2877  else
2878  {
2879  h = (tHomog)idHomModule(F,Q,w);
2880  }
2881  }
2882  if (h==isHomog)
2883  {
2884  if (strat->ak > 0 && (w!=NULL) && (*w!=NULL))
2885  {
2886  kModW = *w;
2887  strat->kModW = *w;
2888  assume(currRing->pFDeg != NULL && currRing->pLDeg != NULL);
2889  strat->pOrigFDeg = currRing->pFDeg;
2890  strat->pOrigLDeg = currRing->pLDeg;
2892 
2893  toReset = TRUE;
2894  if (reduced>1)
2895  {
2896  Kstd1_OldDeg=Kstd1_deg;
2897  Kstd1_deg = -1;
2898  for (i=IDELEMS(F)-1;i>=0;i--)
2899  {
2900  if ((F->m[i]!=NULL) && (currRing->pFDeg(F->m[i],currRing)>=Kstd1_deg))
2901  Kstd1_deg = currRing->pFDeg(F->m[i],currRing)+1;
2902  }
2903  }
2904  }
2905  currRing->pLexOrder = TRUE;
2906  strat->LazyPass*=2;
2907  }
2908  strat->homog=h;
2910  {
2911  if (w!=NULL)
2912  r=mora(F,Q,*w,hilb,strat);
2913  else
2914  r=mora(F,Q,NULL,hilb,strat);
2915  }
2916  else
2917  {
2918  if (w!=NULL)
2919  r=bba(F,Q,*w,hilb,strat);
2920  else
2921  r=bba(F,Q,NULL,hilb,strat);
2922  }
2923 #ifdef KDEBUG
2924  {
2925  int i;
2926  for (i=IDELEMS(r)-1; i>=0; i--) pTest(r->m[i]);
2927  }
2928 #endif
2929  idSkipZeroes(r);
2930  if (toReset)
2931  {
2932  pRestoreDegProcs(currRing,strat->pOrigFDeg, strat->pOrigLDeg);
2933  kModW = NULL;
2934  }
2935  currRing->pLexOrder = b;
2936  HCord=strat->HCord;
2937  if ((delete_w)&&(temp_w!=NULL)) delete temp_w;
2938  if ((IDELEMS(r)==1) && (r->m[0]!=NULL) && pIsConstant(r->m[0]) && (strat->ak==0))
2939  {
2940  M=idInit(1,F->rank);
2941  M->m[0]=pOne();
2942  //if (strat->ak!=0) { pSetComp(M->m[0],strat->ak); pSetmComp(M->m[0]); }
2943  if (strat->M!=NULL) idDelete(&strat->M);
2944  }
2945  else if (strat->M==NULL)
2946  {
2947  M=idInit(1,F->rank);
2948  Warn("no minimal generating set computed");
2949  }
2950  else
2951  {
2952  idSkipZeroes(strat->M);
2953  M=strat->M;
2954  }
2955  delete(strat);
2956  if (reduced>2)
2957  {
2958  Kstd1_deg=Kstd1_OldDeg;
2959  if (!oldDegBound)
2961  }
2962  else
2963  {
2964  if (IDELEMS(M)>IDELEMS(r)) {
2965  idDelete(&M);
2966  M=idCopy(r); }
2967  }
2968  return r;
2969 }
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
Definition: ring.h:750
unsigned si_opt_1
Definition: options.c:5
int HCord
Definition: kutil.cc:235
int syzComp
Definition: kutil.h:350
#define TEST_OPT_DEGBOUND
Definition: options.h:108
#define idDelete(H)
delete an ideal
Definition: ideals.h:29
#define FALSE
Definition: auxiliary.h:94
#define pTest(p)
Definition: polys.h:398
#define TRUE
Definition: auxiliary.h:98
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
int ak
Definition: kutil.h:349
#define Q
Definition: sirandom.c:25
ideal bba(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
Definition: kstd2.cc:1958
#define Sy_bit(x)
Definition: options.h:30
int minim
Definition: kutil.h:354
static BOOLEAN rField_has_simple_inverse(const ring r)
Definition: ring.h:540
int HCord
Definition: kutil.h:351
pFDegProc pOrigFDeg
Definition: kutil.h:290
#define M
Definition: sirandom.c:24
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
pLDegProc pOrigLDeg
Definition: kutil.h:291
intvec * kModW
Definition: kstd1.cc:2206
BOOLEAN homog
Definition: kutil.h:369
Definition: intvec.h:14
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
tHomog
Definition: structs.h:37
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int syzComp
Definition: myNF.cc:291
void pSetDegProcs(ring r, pFDegProc new_FDeg, pLDegProc new_lDeg)
Definition: p_polys.cc:3496
#define assume(x)
Definition: mod2.h:394
#define pIsConstant(p)
like above, except that Comp might be != 0
Definition: polys.h:221
ideal M
Definition: kutil.h:299
int i
Definition: cfEzgcd.cc:123
#define pOne()
Definition: polys.h:297
#define IDELEMS(i)
Definition: simpleideals.h:24
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
ideal idCopy(ideal A)
Definition: ideals.h:60
void pRestoreDegProcs(ring r, pFDegProc old_FDeg, pLDegProc old_lDeg)
Definition: p_polys.cc:3508
int int kStrategy strat
Definition: myNF.cc:68
#define TEST_OPT_RETURN_SB
Definition: options.h:107
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:38
static BOOLEAN rField_is_Ring(const ring r)
Definition: ring.h:477
#define NULL
Definition: omList.c:10
BOOLEAN idHomIdeal(ideal id, ideal Q=NULL)
Definition: ideals.h:91
const CanonicalForm & w
Definition: facAbsFact.cc:55
intvec * kModW
Definition: kutil.h:331
long kModDeg(poly p, ring r)
Definition: kstd1.cc:2208
#define OPT_DEGBOUND
Definition: options.h:85
int LazyPass
Definition: kutil.h:349
int Kstd1_deg
Definition: kutil.cc:236
static Poly * h
Definition: janet.cc:978
int BOOLEAN
Definition: auxiliary.h:85
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
const poly b
Definition: syzextra.cc:213
BOOLEAN idHomModule(ideal m, ideal Q, intvec **w)
Definition: ideals.h:96
int LazyDegree
Definition: kutil.h:349
ideal mora(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
Definition: kstd1.cc:1606
#define Warn
Definition: emacs.cc:80

§ kModDeg()

long kModDeg ( poly  p,
ring  r = currRing 
)

Definition at line 2208 of file kstd1.cc.

2209 {
2210  long o=p_WDegree(p, r);
2211  long i=p_GetComp(p, r);
2212  if (i==0) return o;
2213  //assume((i>0) && (i<=kModW->length()));
2214  if (i<=kModW->length())
2215  return o+(*kModW)[i-1];
2216  return o;
2217 }
return P p
Definition: myNF.cc:203
#define p_GetComp(p, r)
Definition: monomials.h:72
long p_WDegree(poly p, const ring r)
Definition: p_polys.cc:713
const ring r
Definition: syzextra.cc:208
int i
Definition: cfEzgcd.cc:123

§ kNF() [1/2]

poly kNF ( ideal  F,
ideal  Q,
poly  p,
int  syzComp = 0,
int  lazyReduce = 0 
)

Definition at line 2971 of file kstd1.cc.

2972 {
2973  if (p==NULL)
2974  return NULL;
2975 
2976  poly pp = p;
2977 
2978 #ifdef HAVE_PLURAL
2979  if(rIsSCA(currRing))
2980  {
2981  const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing);
2982  const unsigned int m_iLastAltVar = scaLastAltVar(currRing);
2983  pp = p_KillSquares(pp, m_iFirstAltVar, m_iLastAltVar, currRing);
2984 
2985  if(Q == currRing->qideal)
2986  Q = SCAQuotient(currRing);
2987  }
2988 #endif
2989 
2990  if ((idIs0(F))&&(Q==NULL))
2991  {
2992 #ifdef HAVE_PLURAL
2993  if(p != pp)
2994  return pp;
2995 #endif
2996  return pCopy(p); /*F+Q=0*/
2997  }
2998 
3000  strat->syzComp = syzComp;
3001  strat->ak = si_max(id_RankFreeModule(F,currRing),pMaxComp(p));
3002  poly res;
3003 
3005  res=kNF1(F,Q,pp,strat,lazyReduce);
3006  else
3007  res=kNF2(F,Q,pp,strat,lazyReduce);
3008  delete(strat);
3009 
3010 #ifdef HAVE_PLURAL
3011  if(pp != p)
3012  p_Delete(&pp, currRing);
3013 #endif
3014  return res;
3015 }
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
Definition: ring.h:750
ideal SCAQuotient(const ring r)
Definition: sca.h:10
int syzComp
Definition: kutil.h:350
#define pMaxComp(p)
Definition: polys.h:281
return P p
Definition: myNF.cc:203
int ak
Definition: kutil.h:349
#define Q
Definition: sirandom.c:25
poly p_KillSquares(const poly p, const short iFirstAltVar, const short iLastAltVar, const ring r)
Definition: sca.cc:1478
poly pp
Definition: myNF.cc:296
poly res
Definition: myNF.cc:322
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
poly kNF2(ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce)
Definition: kstd2.cc:3377
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int syzComp
Definition: myNF.cc:291
poly kNF1(ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce)
Definition: kstd1.cc:1909
static int si_max(const int a, const int b)
Definition: auxiliary.h:120
static short scaFirstAltVar(ring r)
Definition: sca.h:18
int int kStrategy strat
Definition: myNF.cc:68
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:843
#define NULL
Definition: omList.c:10
static short scaLastAltVar(ring r)
Definition: sca.h:25
static bool rIsSCA(const ring r)
Definition: nc.h:206
polyrec * poly
Definition: hilb.h:10
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int int lazyReduce
Definition: myNF.cc:292
#define pCopy(p)
return a copy of the poly
Definition: polys.h:168

§ kNF() [2/2]

ideal kNF ( ideal  F,
ideal  Q,
ideal  p,
int  syzComp = 0,
int  lazyReduce = 0 
)

Definition at line 3059 of file kstd1.cc.

3060 {
3061  ideal res;
3062  if (TEST_OPT_PROT)
3063  {
3064  Print("(S:%d)",IDELEMS(p));mflush();
3065  }
3066  if (idIs0(p))
3067  return idInit(IDELEMS(p),si_max(p->rank,F->rank));
3068 
3069  ideal pp = p;
3070 #ifdef HAVE_PLURAL
3071  if(rIsSCA(currRing))
3072  {
3073  const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing);
3074  const unsigned int m_iLastAltVar = scaLastAltVar(currRing);
3075  pp = id_KillSquares(pp, m_iFirstAltVar, m_iLastAltVar, currRing, false);
3076 
3077  if(Q == currRing->qideal)
3078  Q = SCAQuotient(currRing);
3079  }
3080 #endif
3081 
3082  if ((idIs0(F))&&(Q==NULL))
3083  {
3084 #ifdef HAVE_PLURAL
3085  if(p != pp)
3086  return pp;
3087 #endif
3088  return idCopy(p); /*F+Q=0*/
3089  }
3090 
3092  strat->syzComp = syzComp;
3094  if (strat->ak>0) // only for module case, see Tst/Short/bug_reduce.tst
3095  {
3096  strat->ak = si_max(strat->ak,(int)F->rank);
3097  }
3098 
3100  res=kNF1(F,Q,pp,strat,lazyReduce);
3101  else
3102  res=kNF2(F,Q,pp,strat,lazyReduce);
3103  delete(strat);
3104 
3105 #ifdef HAVE_PLURAL
3106  if(pp != p)
3107  id_Delete(&pp, currRing);
3108 #endif
3109 
3110  return res;
3111 }
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
Definition: ring.h:750
ideal SCAQuotient(const ring r)
Definition: sca.h:10
#define Print
Definition: emacs.cc:83
int syzComp
Definition: kutil.h:350
#define TEST_OPT_PROT
Definition: options.h:98
return P p
Definition: myNF.cc:203
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
int ak
Definition: kutil.h:349
#define Q
Definition: sirandom.c:25
poly pp
Definition: myNF.cc:296
#define mflush()
Definition: reporter.h:57
poly res
Definition: myNF.cc:322
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
poly kNF2(ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce)
Definition: kstd2.cc:3377
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int syzComp
Definition: myNF.cc:291
poly kNF1(ideal F, ideal Q, poly q, kStrategy strat, int lazyReduce)
Definition: kstd1.cc:1909
static int si_max(const int a, const int b)
Definition: auxiliary.h:120
#define IDELEMS(i)
Definition: simpleideals.h:24
static short scaFirstAltVar(ring r)
Definition: sca.h:18
ideal idCopy(ideal A)
Definition: ideals.h:60
int int kStrategy strat
Definition: myNF.cc:68
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:38
#define NULL
Definition: omList.c:10
ideal id_KillSquares(const ideal id, const short iFirstAltVar, const short iLastAltVar, const ring r, const bool bSkipZeroes)
Definition: sca.cc:1533
static short scaLastAltVar(ring r)
Definition: sca.h:25
static bool rIsSCA(const ring r)
Definition: nc.h:206
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int int lazyReduce
Definition: myNF.cc:292

§ kNF1() [1/2]

poly kNF1 ( ideal  F,
ideal  Q,
poly  q,
kStrategy  strat,
int  lazyReduce 
)

Definition at line 1909 of file kstd1.cc.

1910 {
1911  assume(q!=NULL);
1912  assume(!(idIs0(F)&&(Q==NULL)));
1913 
1914 // lazy_reduce flags: can be combined by |
1915 //#define KSTD_NF_LAZY 1
1916  // do only a reduction of the leading term
1917 //#define KSTD_NF_ECART 2
1918  // only local: recude even with bad ecart
1919  poly p;
1920  int i;
1921  int j;
1922  int o;
1923  LObject h;
1924  BITSET save1;
1925  SI_SAVE_OPT1(save1);
1926 
1927  //if ((idIs0(F))&&(Q==NULL))
1928  // return pCopy(q); /*F=0*/
1929  //strat->ak = si_max(idRankFreeModule(F),pMaxComp(q));
1930  /*- creating temp data structures------------------- -*/
1931  strat->kHEdgeFound = (currRing->ppNoether) != NULL;
1932  strat->kNoether = pCopy((currRing->ppNoether));
1936  && (! TEST_V_DEG_STOP)
1937  && (0<Kstd1_deg)
1938  && ((!strat->kHEdgeFound)
1940  {
1941  pDelete(&strat->kNoether);
1942  strat->kNoether=pOne();
1943  pSetExp(strat->kNoether,1, Kstd1_deg+1);
1944  pSetm(strat->kNoether);
1945  strat->kHEdgeFound=TRUE;
1946  }
1947  initBuchMoraCrit(strat);
1949  initBuchMoraPosRing(strat);
1950  else
1951  initBuchMoraPos(strat);
1952  initMora(F,strat);
1953  strat->enterS = enterSMoraNF;
1954  /*- set T -*/
1955  strat->tl = -1;
1956  strat->tmax = setmaxT;
1957  strat->T = initT();
1958  strat->R = initR();
1959  strat->sevT = initsevT();
1960  /*- set S -*/
1961  strat->sl = -1;
1962  /*- init local data struct.-------------------------- -*/
1963  /*Shdl=*/initS(F,Q,strat);
1964  if ((strat->ak!=0)
1965  && (strat->kHEdgeFound))
1966  {
1967  if (strat->ak!=1)
1968  {
1969  pSetComp(strat->kNoether,1);
1970  pSetmComp(strat->kNoether);
1971  poly p=pHead(strat->kNoether);
1972  pSetComp(p,strat->ak);
1973  pSetmComp(p);
1974  p=pAdd(strat->kNoether,p);
1975  strat->kNoether=pNext(p);
1976  p_LmFree(p,currRing);
1977  }
1978  }
1979  if ((lazyReduce & KSTD_NF_LAZY)==0)
1980  {
1981  for (i=strat->sl; i>=0; i--)
1982  pNorm(strat->S[i]);
1983  }
1984  /*- puts the elements of S also to T -*/
1985  for (i=0; i<=strat->sl; i++)
1986  {
1987  h.p = strat->S[i];
1988  h.ecart = strat->ecartS[i];
1989  if (strat->sevS[i] == 0) strat->sevS[i] = pGetShortExpVector(h.p);
1990  else assume(strat->sevS[i] == pGetShortExpVector(h.p));
1991  h.length = pLength(h.p);
1992  h.sev = strat->sevS[i];
1993  h.SetpFDeg();
1994  enterT(h,strat);
1995  }
1996 #ifdef KDEBUG
1997 // kDebugPrint(strat);
1998 #endif
1999  /*- compute------------------------------------------- -*/
2000  p = pCopy(q);
2001  deleteHC(&p,&o,&j,strat);
2002  kTest(strat);
2003  if (TEST_OPT_PROT) { PrintS("r"); mflush(); }
2004  if (BVERBOSE(23)) kDebugPrint(strat);
2006  {
2007  if (p!=NULL) p = redMoraNFRing(p,strat, lazyReduce & KSTD_NF_ECART);
2008  }
2009  else
2010  {
2011  if (p!=NULL) p = redMoraNF(p,strat, lazyReduce & KSTD_NF_ECART);
2012  }
2013  if ((p!=NULL)&&((lazyReduce & KSTD_NF_LAZY)==0))
2014  {
2015  if (TEST_OPT_PROT) { PrintS("t"); mflush(); }
2016  p = redtail(p,strat->sl,strat);
2017  }
2018  /*- release temp data------------------------------- -*/
2019  cleanT(strat);
2020  assume(strat->L==NULL); /*strat->L unsed */
2021  assume(strat->B==NULL); /*strat->B unused */
2022  omFreeSize((ADDRESS)strat->T,strat->tmax*sizeof(TObject));
2023  omFreeSize((ADDRESS)strat->ecartS,IDELEMS(strat->Shdl)*sizeof(int));
2024  omFreeSize((ADDRESS)strat->sevS,IDELEMS(strat->Shdl)*sizeof(unsigned long));
2025  omFreeSize((ADDRESS)strat->NotUsedAxis,((currRing->N)+1)*sizeof(BOOLEAN));
2026  omFree(strat->sevT);
2027  omFree(strat->S_2_R);
2028  omFree(strat->R);
2029 
2030  if ((Q!=NULL)&&(strat->fromQ!=NULL))
2031  {
2032  i=((IDELEMS(Q)+IDELEMS(F)+15)/16)*16;
2033  omFreeSize((ADDRESS)strat->fromQ,i*sizeof(int));
2034  strat->fromQ=NULL;
2035  }
2036  pDelete(&strat->kHEdge);
2037  pDelete(&strat->kNoether);
2038 // if ((TEST_OPT_WEIGHTM)&&(F!=NULL))
2039 // {
2040 // pRestoreDegProcs(currRing,strat->pOrigFDeg, strat->pOrigLDeg);
2041 // if (ecartWeights)
2042 // {
2043 // omFreeSize((ADDRESS *)&ecartWeights,((currRing->N)+1)*sizeof(short));
2044 // ecartWeights=NULL;
2045 // }
2046 // }
2047  idDelete(&strat->Shdl);
2048  SI_RESTORE_OPT1(save1);
2049  if (TEST_OPT_PROT) PrintLn();
2050  return p;
2051 }
#define pSetmComp(p)
TODO:
Definition: polys.h:255
KINLINE TObject ** initR()
Definition: kInline.h:92
unsigned si_opt_1
Definition: options.c:5
poly redtail(LObject *L, int pos, kStrategy strat)
Definition: kutil.cc:7505
#define pSetm(p)
Definition: polys.h:253
void PrintLn()
Definition: reporter.cc:310
static poly redMoraNFRing(poly h, kStrategy strat, int flag)
Definition: kstd1.cc:835
KINLINE unsigned long * initsevT()
Definition: kInline.h:97
#define TEST_OPT_DEGBOUND
Definition: options.h:108
#define pAdd(p, q)
Definition: polys.h:186
void initBuchMoraPos(kStrategy strat)
Definition: kutil.cc:9928
poly kHEdge
Definition: kutil.h:323
void initMora(ideal F, kStrategy strat)
Definition: kstd1.cc:1549
#define idDelete(H)
delete an ideal
Definition: ideals.h:29
class sLObject LObject
Definition: kutil.h:60
KINLINE TSet initT()
Definition: kInline.h:81
#define TEST_OPT_PROT
Definition: options.h:98
#define pSetExp(p, i, v)
Definition: polys.h:42
int * S_2_R
Definition: kutil.h:338
return P p
Definition: myNF.cc:203
BOOLEAN * NotUsedAxis
Definition: kutil.h:328
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
poly kNoether
Definition: kutil.h:324
int tl
Definition: kutil.h:346
#define TRUE
Definition: auxiliary.h:98
#define kTest(A)
Definition: kutil.h:653
unsigned long * sevT
Definition: kutil.h:319
void * ADDRESS
Definition: auxiliary.h:115
#define SI_SAVE_OPT1(A)
Definition: options.h:20
int ak
Definition: kutil.h:349
#define Q
Definition: sirandom.c:25
#define BITSET
Definition: structs.h:18
void initBuchMoraPosRing(kStrategy strat)
Definition: kutil.cc:10014
#define Sy_bit(x)
Definition: options.h:30
static void p_LmFree(poly p, ring)
Definition: p_polys.h:678
void enterT(LObject &p, kStrategy strat, int atT)
Definition: kutil.cc:9478
#define mflush()
Definition: reporter.h:57
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
void initS(ideal F, ideal Q, kStrategy strat)
Definition: kutil.cc:8042
#define KSTD_NF_LAZY
Definition: kstd1.h:17
#define setmaxT
Definition: kutil.h:32
#define OPT_REDTAIL
Definition: options.h:86
#define TEST_V_DEG_STOP
Definition: options.h:130
int j
Definition: myNF.cc:70
#define TEST_OPT_STAIRCASEBOUND
Definition: options.h:110
#define omFree(addr)
Definition: omAllocDecl.h:261
#define assume(x)
Definition: mod2.h:394
intset fromQ
Definition: kutil.h:315
#define pGetShortExpVector(a)
returns the "Short Exponent Vector" – used to speed up divisibility tests (see polys-impl.cc )
Definition: polys.h:152
void(* enterS)(LObject &h, int pos, kStrategy strat, int atR)
Definition: kutil.h:280
#define KSTD_NF_ECART
Definition: kstd1.h:19
#define pSetComp(p, v)
Definition: polys.h:38
void initBuchMoraCrit(kStrategy strat)
Definition: kutil.cc:9777
int i
Definition: cfEzgcd.cc:123
void PrintS(const char *s)
Definition: reporter.cc:284
void deleteHC(LObject *L, kStrategy strat, BOOLEAN fromNext)
Definition: kutil.cc:243
#define pOne()
Definition: polys.h:297
TObject ** R
Definition: kutil.h:336
static unsigned pLength(poly a)
Definition: p_polys.h:189
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL ...
Definition: polys.h:67
polyset S
Definition: kutil.h:300
#define IDELEMS(i)
Definition: simpleideals.h:24
int tmax
Definition: kutil.h:346
#define OPT_INTSTRATEGY
Definition: options.h:87
#define BVERBOSE(a)
Definition: options.h:33
BOOLEAN kHEdgeFound
Definition: kutil.h:373
intset ecartS
Definition: kutil.h:303
LSet L
Definition: kutil.h:321
static BOOLEAN rField_is_Ring(const ring r)
Definition: ring.h:477
#define NULL
Definition: omList.c:10
void cleanT(kStrategy strat)
Definition: kutil.cc:552
LSet B
Definition: kutil.h:322
void pNorm(poly p, const ring R=currRing)
Definition: polys.h:345
#define pWTotaldegree(p)
Definition: polys.h:265
#define pDelete(p_ptr)
Definition: polys.h:169
unsigned long * sevS
Definition: kutil.h:316
#define pNext(p)
Definition: monomials.h:43
static poly redMoraNF(poly h, kStrategy strat, int flag)
Definition: kstd1.cc:735
int sl
Definition: kutil.h:344
TSet T
Definition: kutil.h:320
void enterSMoraNF(LObject &p, int atS, kStrategy strat, int atR=-1)
Definition: kstd1.cc:1416
polyrec * poly
Definition: hilb.h:10
int Kstd1_deg
Definition: kutil.cc:236
ideal Shdl
Definition: kutil.h:297
static Poly * h
Definition: janet.cc:978
int BOOLEAN
Definition: auxiliary.h:85
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
#define SI_RESTORE_OPT1(A)
Definition: options.h:23
void kDebugPrint(kStrategy strat)
Definition: kutil.cc:11806
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int int lazyReduce
Definition: myNF.cc:292
class sTObject TObject
Definition: kutil.h:59
#define pCopy(p)
return a copy of the poly
Definition: polys.h:168

§ kNF1() [2/2]

ideal kNF1 ( ideal  F,
ideal  Q,
ideal  q,
kStrategy  strat,
int  lazyReduce 
)

Definition at line 2053 of file kstd1.cc.

2054 {
2055  assume(!idIs0(q));
2056  assume(!(idIs0(F)&&(Q==NULL)));
2057 
2058 // lazy_reduce flags: can be combined by |
2059 //#define KSTD_NF_LAZY 1
2060  // do only a reduction of the leading term
2061 //#define KSTD_NF_ECART 2
2062  // only local: recude even with bad ecart
2063  poly p;
2064  int i;
2065  int j;
2066  int o;
2067  LObject h;
2068  ideal res;
2069  BITSET save1;
2070  SI_SAVE_OPT1(save1);
2071 
2072  //if (idIs0(q)) return idInit(IDELEMS(q),si_max(q->rank,F->rank));
2073  //if ((idIs0(F))&&(Q==NULL))
2074  // return idCopy(q); /*F=0*/
2075  //strat->ak = si_max(idRankFreeModule(F),idRankFreeModule(q));
2076  /*- creating temp data structures------------------- -*/
2077  strat->kHEdgeFound = (currRing->ppNoether) != NULL;
2078  strat->kNoether=pCopy((currRing->ppNoether));
2081  && (0<Kstd1_deg)
2082  && ((!strat->kHEdgeFound)
2084  {
2085  pDelete(&strat->kNoether);
2086  strat->kNoether=pOne();
2087  pSetExp(strat->kNoether,1, Kstd1_deg+1);
2088  pSetm(strat->kNoether);
2089  strat->kHEdgeFound=TRUE;
2090  }
2091  initBuchMoraCrit(strat);
2093  initBuchMoraPosRing(strat);
2094  else
2095  initBuchMoraPos(strat);
2096  initMora(F,strat);
2097  strat->enterS = enterSMoraNF;
2098  /*- set T -*/
2099  strat->tl = -1;
2100  strat->tmax = setmaxT;
2101  strat->T = initT();
2102  strat->R = initR();
2103  strat->sevT = initsevT();
2104  /*- set S -*/
2105  strat->sl = -1;
2106  /*- init local data struct.-------------------------- -*/
2107  /*Shdl=*/initS(F,Q,strat);
2108  if ((strat->ak!=0)
2109  && (strat->kHEdgeFound))
2110  {
2111  if (strat->ak!=1)
2112  {
2113  pSetComp(strat->kNoether,1);
2114  pSetmComp(strat->kNoether);
2115  poly p=pHead(strat->kNoether);
2116  pSetComp(p,strat->ak);
2117  pSetmComp(p);
2118  p=pAdd(strat->kNoether,p);
2119  strat->kNoether=pNext(p);
2120  p_LmFree(p,currRing);
2121  }
2122  }
2124  {
2125  for (i=strat->sl; i>=0; i--)
2126  pNorm(strat->S[i]);
2127  }
2128  /*- compute------------------------------------------- -*/
2129  res=idInit(IDELEMS(q),strat->ak);
2130  for (i=0; i<IDELEMS(q); i++)
2131  {
2132  if (q->m[i]!=NULL)
2133  {
2134  p = pCopy(q->m[i]);
2135  deleteHC(&p,&o,&j,strat);
2136  if (p!=NULL)
2137  {
2138  /*- puts the elements of S also to T -*/
2139  for (j=0; j<=strat->sl; j++)
2140  {
2141  h.p = strat->S[j];
2142  h.ecart = strat->ecartS[j];
2143  h.pLength = h.length = pLength(h.p);
2144  if (strat->sevS[j] == 0) strat->sevS[j] = pGetShortExpVector(h.p);
2145  else assume(strat->sevS[j] == pGetShortExpVector(h.p));
2146  h.sev = strat->sevS[j];
2147  h.SetpFDeg();
2149  enterT_strong(h,strat);
2150  else
2151  enterT(h,strat);
2152  }
2153  if (TEST_OPT_PROT) { PrintS("r"); mflush(); }
2155  {
2156  p = redMoraNFRing(p,strat, lazyReduce & KSTD_NF_ECART);
2157  }
2158  else
2159  p = redMoraNF(p,strat, lazyReduce & KSTD_NF_ECART);
2160  if ((p!=NULL)&&((lazyReduce & KSTD_NF_LAZY)==0))
2161  {
2162  if (TEST_OPT_PROT) { PrintS("t"); mflush(); }
2163  p = redtail(p,strat->sl,strat);
2164  }
2165  cleanT(strat);
2166  }
2167  res->m[i]=p;
2168  }
2169  //else
2170  // res->m[i]=NULL;
2171  }
2172  /*- release temp data------------------------------- -*/
2173  assume(strat->L==NULL); /*strat->L unsed */
2174  assume(strat->B==NULL); /*strat->B unused */
2175  omFreeSize((ADDRESS)strat->T,strat->tmax*sizeof(TObject));
2176  omFreeSize((ADDRESS)strat->ecartS,IDELEMS(strat->Shdl)*sizeof(int));
2177  omFreeSize((ADDRESS)strat->sevS,IDELEMS(strat->Shdl)*sizeof(unsigned long));
2178  omFreeSize((ADDRESS)strat->NotUsedAxis,((currRing->N)+1)*sizeof(BOOLEAN));
2179  omFree(strat->sevT);
2180  omFree(strat->S_2_R);
2181  omFree(strat->R);
2182  if ((Q!=NULL)&&(strat->fromQ!=NULL))
2183  {
2184  i=((IDELEMS(Q)+IDELEMS(F)+15)/16)*16;
2185  omFreeSize((ADDRESS)strat->fromQ,i*sizeof(int));
2186  strat->fromQ=NULL;
2187  }
2188  pDelete(&strat->kHEdge);
2189  pDelete(&strat->kNoether);
2190 // if ((TEST_OPT_WEIGHTM)&&(F!=NULL))
2191 // {
2192 // pFDeg=strat->pOrigFDeg;
2193 // pLDeg=strat->pOrigLDeg;
2194 // if (ecartWeights)
2195 // {
2196 // omFreeSize((ADDRESS *)&ecartWeights,((currRing->N)+1)*sizeof(short));
2197 // ecartWeights=NULL;
2198 // }
2199 // }
2200  idDelete(&strat->Shdl);
2201  SI_RESTORE_OPT1(save1);
2202  if (TEST_OPT_PROT) PrintLn();
2203  return res;
2204 }
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
Definition: ring.h:750
#define pSetmComp(p)
TODO:
Definition: polys.h:255
KINLINE TObject ** initR()
Definition: kInline.h:92
unsigned si_opt_1
Definition: options.c:5
poly redtail(LObject *L, int pos, kStrategy strat)
Definition: kutil.cc:7505
#define pSetm(p)
Definition: polys.h:253
void PrintLn()
Definition: reporter.cc:310
static poly redMoraNFRing(poly h, kStrategy strat, int flag)
Definition: kstd1.cc:835
KINLINE unsigned long * initsevT()
Definition: kInline.h:97
#define TEST_OPT_DEGBOUND
Definition: options.h:108
#define pAdd(p, q)
Definition: polys.h:186
void initBuchMoraPos(kStrategy strat)
Definition: kutil.cc:9928
poly kHEdge
Definition: kutil.h:323
void initMora(ideal F, kStrategy strat)
Definition: kstd1.cc:1549
#define idDelete(H)
delete an ideal
Definition: ideals.h:29
class sLObject LObject
Definition: kutil.h:60
KINLINE TSet initT()
Definition: kInline.h:81
#define TEST_OPT_PROT
Definition: options.h:98
#define pSetExp(p, i, v)
Definition: polys.h:42
int * S_2_R
Definition: kutil.h:338
return P p
Definition: myNF.cc:203
BOOLEAN * NotUsedAxis
Definition: kutil.h:328
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
poly kNoether
Definition: kutil.h:324
int tl
Definition: kutil.h:346
#define TRUE
Definition: auxiliary.h:98
unsigned long * sevT
Definition: kutil.h:319
void * ADDRESS
Definition: auxiliary.h:115
#define SI_SAVE_OPT1(A)
Definition: options.h:20
int ak
Definition: kutil.h:349
#define Q
Definition: sirandom.c:25
#define BITSET
Definition: structs.h:18
void initBuchMoraPosRing(kStrategy strat)
Definition: kutil.cc:10014
#define Sy_bit(x)
Definition: options.h:30
static void p_LmFree(poly p, ring)
Definition: p_polys.h:678
void enterT(LObject &p, kStrategy strat, int atT)
Definition: kutil.cc:9478
#define mflush()
Definition: reporter.h:57
poly res
Definition: myNF.cc:322
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
void initS(ideal F, ideal Q, kStrategy strat)
Definition: kutil.cc:8042
#define KSTD_NF_LAZY
Definition: kstd1.h:17
#define TEST_OPT_INTSTRATEGY
Definition: options.h:105
#define setmaxT
Definition: kutil.h:32
#define OPT_REDTAIL
Definition: options.h:86
int j
Definition: myNF.cc:70
#define TEST_OPT_STAIRCASEBOUND
Definition: options.h:110
#define omFree(addr)
Definition: omAllocDecl.h:261
#define assume(x)
Definition: mod2.h:394
intset fromQ
Definition: kutil.h:315
#define pGetShortExpVector(a)
returns the "Short Exponent Vector" – used to speed up divisibility tests (see polys-impl.cc )
Definition: polys.h:152
void(* enterS)(LObject &h, int pos, kStrategy strat, int atR)
Definition: kutil.h:280
#define KSTD_NF_ECART
Definition: kstd1.h:19
#define pSetComp(p, v)
Definition: polys.h:38
void initBuchMoraCrit(kStrategy strat)
Definition: kutil.cc:9777
int i
Definition: cfEzgcd.cc:123
void PrintS(const char *s)
Definition: reporter.cc:284
void deleteHC(LObject *L, kStrategy strat, BOOLEAN fromNext)
Definition: kutil.cc:243
#define pOne()
Definition: polys.h:297
TObject ** R
Definition: kutil.h:336
static unsigned pLength(poly a)
Definition: p_polys.h:189
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL ...
Definition: polys.h:67
polyset S
Definition: kutil.h:300
#define IDELEMS(i)
Definition: simpleideals.h:24
int tmax
Definition: kutil.h:346
void enterT_strong(LObject &p, kStrategy strat, int atT)
Definition: kutil.cc:9563
BOOLEAN kHEdgeFound
Definition: kutil.h:373
intset ecartS
Definition: kutil.h:303
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:38
LSet L
Definition: kutil.h:321
static BOOLEAN rField_is_Ring(const ring r)
Definition: ring.h:477
#define NULL
Definition: omList.c:10
void cleanT(kStrategy strat)
Definition: kutil.cc:552
LSet B
Definition: kutil.h:322
void pNorm(poly p, const ring R=currRing)
Definition: polys.h:345
#define pWTotaldegree(p)
Definition: polys.h:265
#define pDelete(p_ptr)
Definition: polys.h:169
unsigned long * sevS
Definition: kutil.h:316
#define pNext(p)
Definition: monomials.h:43
static poly redMoraNF(poly h, kStrategy strat, int flag)
Definition: kstd1.cc:735
int sl
Definition: kutil.h:344
TSet T
Definition: kutil.h:320
void enterSMoraNF(LObject &p, int atS, kStrategy strat, int atR=-1)
Definition: kstd1.cc:1416
polyrec * poly
Definition: hilb.h:10
int Kstd1_deg
Definition: kutil.cc:236
ideal Shdl
Definition: kutil.h:297
static Poly * h
Definition: janet.cc:978
int BOOLEAN
Definition: auxiliary.h:85
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
#define SI_RESTORE_OPT1(A)
Definition: options.h:23
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int int lazyReduce
Definition: myNF.cc:292
class sTObject TObject
Definition: kutil.h:59
#define pCopy(p)
return a copy of the poly
Definition: polys.h:168

§ kNFBound() [1/2]

poly kNFBound ( ideal  F,
ideal  Q,
poly  p,
int  bound,
int  syzComp = 0,
int  lazyReduce = 0 
)

Definition at line 3017 of file kstd1.cc.

3018 {
3019  if (p==NULL)
3020  return NULL;
3021 
3022  poly pp = p;
3023 
3024 #ifdef HAVE_PLURAL
3025  if(rIsSCA(currRing))
3026  {
3027  const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing);
3028  const unsigned int m_iLastAltVar = scaLastAltVar(currRing);
3029  pp = p_KillSquares(pp, m_iFirstAltVar, m_iLastAltVar, currRing);
3030 
3031  if(Q == currRing->qideal)
3032  Q = SCAQuotient(currRing);
3033  }
3034 #endif
3035 
3036  if ((idIs0(F))&&(Q==NULL))
3037  {
3038 #ifdef HAVE_PLURAL
3039  if(p != pp)
3040  return pp;
3041 #endif
3042  return pCopy(p); /*F+Q=0*/
3043  }
3044 
3046  strat->syzComp = syzComp;
3047  strat->ak = si_max(id_RankFreeModule(F,currRing),pMaxComp(p));
3048  poly res;
3049  res=kNF2Bound(F,Q,pp,bound,strat,lazyReduce);
3050  delete(strat);
3051 
3052 #ifdef HAVE_PLURAL
3053  if(pp != p)
3054  p_Delete(&pp, currRing);
3055 #endif
3056  return res;
3057 }
ideal SCAQuotient(const ring r)
Definition: sca.h:10
poly kNF2Bound(ideal F, ideal Q, poly q, int bound, kStrategy strat, int lazyReduce)
Definition: kstd2.cc:3446
static CanonicalForm bound(const CFMatrix &M)
Definition: cf_linsys.cc:460
int syzComp
Definition: kutil.h:350
#define pMaxComp(p)
Definition: polys.h:281
return P p
Definition: myNF.cc:203
int ak
Definition: kutil.h:349
#define Q
Definition: sirandom.c:25
poly p_KillSquares(const poly p, const short iFirstAltVar, const short iLastAltVar, const ring r)
Definition: sca.cc:1478
poly pp
Definition: myNF.cc:296
poly res
Definition: myNF.cc:322
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int syzComp
Definition: myNF.cc:291
static int si_max(const int a, const int b)
Definition: auxiliary.h:120
static short scaFirstAltVar(ring r)
Definition: sca.h:18
int int kStrategy strat
Definition: myNF.cc:68
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:843
#define NULL
Definition: omList.c:10
static short scaLastAltVar(ring r)
Definition: sca.h:25
static bool rIsSCA(const ring r)
Definition: nc.h:206
polyrec * poly
Definition: hilb.h:10
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int int lazyReduce
Definition: myNF.cc:292
#define pCopy(p)
return a copy of the poly
Definition: polys.h:168

§ kNFBound() [2/2]

ideal kNFBound ( ideal  F,
ideal  Q,
ideal  p,
int  bound,
int  syzComp = 0,
int  lazyReduce = 0 
)

Definition at line 3113 of file kstd1.cc.

3114 {
3115  ideal res;
3116  if (TEST_OPT_PROT)
3117  {
3118  Print("(S:%d)",IDELEMS(p));mflush();
3119  }
3120  if (idIs0(p))
3121  return idInit(IDELEMS(p),si_max(p->rank,F->rank));
3122 
3123  ideal pp = p;
3124 #ifdef HAVE_PLURAL
3125  if(rIsSCA(currRing))
3126  {
3127  const unsigned int m_iFirstAltVar = scaFirstAltVar(currRing);
3128  const unsigned int m_iLastAltVar = scaLastAltVar(currRing);
3129  pp = id_KillSquares(pp, m_iFirstAltVar, m_iLastAltVar, currRing, false);
3130 
3131  if(Q == currRing->qideal)
3132  Q = SCAQuotient(currRing);
3133  }
3134 #endif
3135 
3136  if ((idIs0(F))&&(Q==NULL))
3137  {
3138 #ifdef HAVE_PLURAL
3139  if(p != pp)
3140  return pp;
3141 #endif
3142  return idCopy(p); /*F+Q=0*/
3143  }
3144 
3146  strat->syzComp = syzComp;
3148  if (strat->ak>0) // only for module case, see Tst/Short/bug_reduce.tst
3149  {
3150  strat->ak = si_max(strat->ak,(int)F->rank);
3151  }
3152 
3153  res=kNF2Bound(F,Q,pp,bound,strat,lazyReduce);
3154  delete(strat);
3155 
3156 #ifdef HAVE_PLURAL
3157  if(pp != p)
3158  id_Delete(&pp, currRing);
3159 #endif
3160 
3161  return res;
3162 }
ideal SCAQuotient(const ring r)
Definition: sca.h:10
poly kNF2Bound(ideal F, ideal Q, poly q, int bound, kStrategy strat, int lazyReduce)
Definition: kstd2.cc:3446
static CanonicalForm bound(const CFMatrix &M)
Definition: cf_linsys.cc:460
#define Print
Definition: emacs.cc:83
int syzComp
Definition: kutil.h:350
#define TEST_OPT_PROT
Definition: options.h:98
return P p
Definition: myNF.cc:203
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
int ak
Definition: kutil.h:349
#define Q
Definition: sirandom.c:25
poly pp
Definition: myNF.cc:296
#define mflush()
Definition: reporter.h:57
poly res
Definition: myNF.cc:322
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int syzComp
Definition: myNF.cc:291
static int si_max(const int a, const int b)
Definition: auxiliary.h:120
#define IDELEMS(i)
Definition: simpleideals.h:24
static short scaFirstAltVar(ring r)
Definition: sca.h:18
ideal idCopy(ideal A)
Definition: ideals.h:60
int int kStrategy strat
Definition: myNF.cc:68
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:38
#define NULL
Definition: omList.c:10
ideal id_KillSquares(const ideal id, const short iFirstAltVar, const short iLastAltVar, const ring r, const bool bSkipZeroes)
Definition: sca.cc:1533
static short scaLastAltVar(ring r)
Definition: sca.h:25
static bool rIsSCA(const ring r)
Definition: nc.h:206
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int int lazyReduce
Definition: myNF.cc:292

§ kSba()

ideal kSba ( ideal  F,
ideal  Q,
tHomog  h,
intvec **  mw,
int  incremental = 0,
int  arri = 0,
intvec hilb = NULL,
int  syzComp = 0,
int  newIdeal = 0,
intvec vw = NULL 
)

Definition at line 2416 of file kstd1.cc.

2418 {
2419  if(idIs0(F))
2420  return idInit(1,F->rank);
2421  if(!rField_is_Ring(currRing))
2422  {
2423  ideal r;
2424  BOOLEAN b=currRing->pLexOrder,toReset=FALSE;
2425  BOOLEAN delete_w=(w==NULL);
2427  strat->sbaOrder = sbaOrder;
2428  if (arri!=0)
2429  {
2430  strat->rewCrit1 = arriRewDummy;
2431  strat->rewCrit2 = arriRewCriterion;
2432  strat->rewCrit3 = arriRewCriterionPre;
2433  }
2434  else
2435  {
2436  strat->rewCrit1 = faugereRewCriterion;
2437  strat->rewCrit2 = faugereRewCriterion;
2438  strat->rewCrit3 = faugereRewCriterion;
2439  }
2440 
2441  if(!TEST_OPT_RETURN_SB)
2442  strat->syzComp = syzComp;
2443  if (TEST_OPT_SB_1)
2444  //if(!rField_is_Ring(currRing)) // always true here
2445  strat->newIdeal = newIdeal;
2447  strat->LazyPass=20;
2448  else
2449  strat->LazyPass=2;
2450  strat->LazyDegree = 1;
2452  strat->chainCrit=chainCritNormal;
2454  strat->ak = id_RankFreeModule(F,currRing);
2455  strat->kModW=kModW=NULL;
2456  strat->kHomW=kHomW=NULL;
2457  if (vw != NULL)
2458  {
2459  currRing->pLexOrder=FALSE;
2460  strat->kHomW=kHomW=vw;
2461  strat->pOrigFDeg = currRing->pFDeg;
2462  strat->pOrigLDeg = currRing->pLDeg;
2464  toReset = TRUE;
2465  }
2466  if (h==testHomog)
2467  {
2468  if (strat->ak == 0)
2469  {
2470  h = (tHomog)idHomIdeal(F,Q);
2471  w=NULL;
2472  }
2473  else if (!TEST_OPT_DEGBOUND)
2474  {
2475  h = (tHomog)idHomModule(F,Q,w);
2476  }
2477  }
2478  currRing->pLexOrder=b;
2479  if (h==isHomog)
2480  {
2481  if (strat->ak > 0 && (w!=NULL) && (*w!=NULL))
2482  {
2483  strat->kModW = kModW = *w;
2484  if (vw == NULL)
2485  {
2486  strat->pOrigFDeg = currRing->pFDeg;
2487  strat->pOrigLDeg = currRing->pLDeg;
2489  toReset = TRUE;
2490  }
2491  }
2492  currRing->pLexOrder = TRUE;
2493  if (hilb==NULL) strat->LazyPass*=2;
2494  }
2495  strat->homog=h;
2496  #ifdef KDEBUG
2497  idTest(F);
2498  if(Q != NULL)
2499  idTest(Q);
2500  #endif
2501  #ifdef HAVE_PLURAL
2502  if (rIsPluralRing(currRing))
2503  {
2504  const BOOLEAN bIsSCA = rIsSCA(currRing) && strat->z2homog; // for Z_2 prod-crit
2505  strat->no_prod_crit = ! bIsSCA;
2506  if (w!=NULL)
2507  r = nc_GB(F, Q, *w, hilb, strat, currRing);
2508  else
2509  r = nc_GB(F, Q, NULL, hilb, strat, currRing);
2510  }
2511  else
2512  #endif
2513  {
2515  {
2516  if (w!=NULL)
2517  r=mora(F,Q,*w,hilb,strat);
2518  else
2519  r=mora(F,Q,NULL,hilb,strat);
2520  }
2521  else
2522  {
2523  strat->sigdrop = FALSE;
2524  if (w!=NULL)
2525  r=sba(F,Q,*w,hilb,strat);
2526  else
2527  r=sba(F,Q,NULL,hilb,strat);
2528  }
2529  }
2530  #ifdef KDEBUG
2531  idTest(r);
2532  #endif
2533  if (toReset)
2534  {
2535  kModW = NULL;
2536  pRestoreDegProcs(currRing,strat->pOrigFDeg, strat->pOrigLDeg);
2537  }
2538  currRing->pLexOrder = b;
2539  //Print("%d reductions canceled \n",strat->cel);
2540  HCord=strat->HCord;
2541  //delete(strat);
2542  if ((delete_w)&&(w!=NULL)&&(*w!=NULL)) delete *w;
2543  return r;
2544  }
2545  else
2546  {
2547  //--------------------------RING CASE-------------------------
2548  assume(sbaOrder == 1);
2549  assume(arri == 0);
2550  ideal r;
2551  r = idCopy(F);
2552  int sbaEnterS = -1;
2553  bool sigdrop = TRUE;
2554  #ifdef ADIDEBUG
2555  printf("\nEnter the nice kSba loop\n");
2556  #endif
2557  //This is how we set the SBA algorithm;
2558  int totalsbaruns = 1,blockedreductions = 20,blockred = 0,loops = 0;
2559  while(sigdrop && (loops < totalsbaruns || totalsbaruns == -1)
2560  && (blockred <= blockedreductions))
2561  {
2562  loops++;
2563  if(loops == 1)
2564  sigdrop = FALSE;
2565  BOOLEAN b=currRing->pLexOrder,toReset=FALSE;
2566  BOOLEAN delete_w=(w==NULL);
2567  kStrategy strat=new skStrategy;
2568  strat->sbaEnterS = sbaEnterS;
2569  strat->sigdrop = sigdrop;
2570  #if 0
2571  strat->blockred = blockred;
2572  #else
2573  strat->blockred = 0;
2574  #endif
2575  strat->blockredmax = blockedreductions;
2576  //printf("\nsbaEnterS beginning = %i\n",strat->sbaEnterS);
2577  //printf("\nsigdrop beginning = %i\n",strat->sigdrop);
2578  strat->sbaOrder = sbaOrder;
2579  if (arri!=0)
2580  {
2581  strat->rewCrit1 = arriRewDummy;
2582  strat->rewCrit2 = arriRewCriterion;
2583  strat->rewCrit3 = arriRewCriterionPre;
2584  }
2585  else
2586  {
2587  strat->rewCrit1 = faugereRewCriterion;
2588  strat->rewCrit2 = faugereRewCriterion;
2589  strat->rewCrit3 = faugereRewCriterion;
2590  }
2591 
2592  if(!TEST_OPT_RETURN_SB)
2593  strat->syzComp = syzComp;
2594  if (TEST_OPT_SB_1)
2595  if(!rField_is_Ring(currRing))
2596  strat->newIdeal = newIdeal;
2598  strat->LazyPass=20;
2599  else
2600  strat->LazyPass=2;
2601  strat->LazyDegree = 1;
2603  strat->chainCrit=chainCritNormal;
2605  strat->ak = id_RankFreeModule(F,currRing);
2606  strat->kModW=kModW=NULL;
2607  strat->kHomW=kHomW=NULL;
2608  if (vw != NULL)
2609  {
2610  currRing->pLexOrder=FALSE;
2611  strat->kHomW=kHomW=vw;
2612  strat->pOrigFDeg = currRing->pFDeg;
2613  strat->pOrigLDeg = currRing->pLDeg;
2615  toReset = TRUE;
2616  }
2617  if (h==testHomog)
2618  {
2619  if (strat->ak == 0)
2620  {
2621  h = (tHomog)idHomIdeal(F,Q);
2622  w=NULL;
2623  }
2624  else if (!TEST_OPT_DEGBOUND)
2625  {
2626  h = (tHomog)idHomModule(F,Q,w);
2627  }
2628  }
2629  currRing->pLexOrder=b;
2630  if (h==isHomog)
2631  {
2632  if (strat->ak > 0 && (w!=NULL) && (*w!=NULL))
2633  {
2634  strat->kModW = kModW = *w;
2635  if (vw == NULL)
2636  {
2637  strat->pOrigFDeg = currRing->pFDeg;
2638  strat->pOrigLDeg = currRing->pLDeg;
2640  toReset = TRUE;
2641  }
2642  }
2643  currRing->pLexOrder = TRUE;
2644  if (hilb==NULL) strat->LazyPass*=2;
2645  }
2646  strat->homog=h;
2647  #ifdef KDEBUG
2648  idTest(F);
2649  if(Q != NULL)
2650  idTest(Q);
2651  #endif
2652  #ifdef HAVE_PLURAL
2653  if (rIsPluralRing(currRing))
2654  {
2655  const BOOLEAN bIsSCA = rIsSCA(currRing) && strat->z2homog; // for Z_2 prod-crit
2656  strat->no_prod_crit = ! bIsSCA;
2657  if (w!=NULL)
2658  r = nc_GB(F, Q, *w, hilb, strat, currRing);
2659  else
2660  r = nc_GB(F, Q, NULL, hilb, strat, currRing);
2661  }
2662  else
2663  #endif
2664  {
2666  {
2667  if (w!=NULL)
2668  r=mora(F,Q,*w,hilb,strat);
2669  else
2670  r=mora(F,Q,NULL,hilb,strat);
2671  }
2672  else
2673  {
2674  if (w!=NULL)
2675  r=sba(r,Q,*w,hilb,strat);
2676  else
2677  {
2678  r=sba(r,Q,NULL,hilb,strat);
2679  }
2680  #ifdef ADIDEBUG
2681  printf("\nSBA Run %i: %i elements (syzCrit = %i,rewCrit = %i)\n",loops,IDELEMS(r),strat->nrsyzcrit,strat->nrrewcrit);
2682  idPrint(r);
2683  //getchar();
2684  #endif
2685  }
2686  }
2687  #ifdef KDEBUG
2688  idTest(r);
2689  #endif
2690  if (toReset)
2691  {
2692  kModW = NULL;
2693  pRestoreDegProcs(currRing,strat->pOrigFDeg, strat->pOrigLDeg);
2694  }
2695  currRing->pLexOrder = b;
2696  //Print("%d reductions canceled \n",strat->cel);
2697  HCord=strat->HCord;
2698  sigdrop = strat->sigdrop;
2699  sbaEnterS = strat->sbaEnterS;
2700  blockred = strat->blockred;
2701  #ifdef ADIDEBUG
2702  printf("\nsbaEnterS = %i\n",sbaEnterS);
2703  #endif
2704  delete(strat);
2705  if ((delete_w)&&(w!=NULL)&&(*w!=NULL)) delete *w;
2706  }
2707  // Go to std
2708  if(sigdrop || blockred > blockedreductions)
2709  {
2710  #ifdef ADIDEBUG
2711  printf("\nWent to std\n");
2712  idPrint(r);
2713  getchar();
2714  #endif
2715  r = kStd(r, Q, h, w, hilb, syzComp, newIdeal, vw);
2716  }
2717  return r;
2718  }
2719 }
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
Definition: ring.h:750
int HCord
Definition: kutil.cc:235
int syzComp
Definition: kutil.h:350
#define TEST_OPT_DEGBOUND
Definition: options.h:108
BOOLEAN(* rewCrit1)(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
Definition: kutil.h:287
bool sigdrop
Definition: kutil.h:356
if(0 > strat->sl)
Definition: myNF.cc:73
BOOLEAN faugereRewCriterion(poly sig, unsigned long not_sevSig, poly, kStrategy strat, int start=0)
Definition: kutil.cc:7211
#define FALSE
Definition: auxiliary.h:94
void chainCritNormal(poly p, int ecart, kStrategy strat)
Definition: kutil.cc:3253
int sbaEnterS
Definition: kutil.h:359
BOOLEAN(* rewCrit2)(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
Definition: kutil.h:288
BOOLEAN z2homog
Definition: kutil.h:371
#define TRUE
Definition: auxiliary.h:98
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
BOOLEAN(* rewCrit3)(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int start)
Definition: kutil.h:289
int ak
Definition: kutil.h:349
#define Q
Definition: sirandom.c:25
ideal sba(ideal F0, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
Definition: kstd2.cc:2333
void enterOnePairNormal(int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR=-1)
Definition: kutil.cc:1937
static BOOLEAN rField_has_simple_inverse(const ring r)
Definition: ring.h:540
int HCord
Definition: kutil.h:351
pFDegProc pOrigFDeg
Definition: kutil.h:290
intvec * kHomW
Definition: kstd1.cc:2206
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
int blockredmax
Definition: kutil.h:362
void(* enterOnePair)(int i, poly p, int ecart, int isFromQ, kStrategy strat, int atR)
Definition: kutil.h:284
#define idPrint(id)
Definition: ideals.h:46
int nrsyzcrit
Definition: kutil.h:357
int nrrewcrit
Definition: kutil.h:358
const ring r
Definition: syzextra.cc:208
pLDegProc pOrigLDeg
Definition: kutil.h:291
intvec * kModW
Definition: kstd1.cc:2206
BOOLEAN homog
Definition: kutil.h:369
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
tHomog
Definition: structs.h:37
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int syzComp
Definition: myNF.cc:291
void pSetDegProcs(ring r, pFDegProc new_FDeg, pLDegProc new_lDeg)
Definition: p_polys.cc:3496
#define assume(x)
Definition: mod2.h:394
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
long kHomModDeg(poly p, ring r)
Definition: kstd1.cc:2218
unsigned sbaOrder
Definition: kutil.h:310
#define IDELEMS(i)
Definition: simpleideals.h:24
ideal idCopy(ideal A)
Definition: ideals.h:60
void pRestoreDegProcs(ring r, pFDegProc old_FDeg, pLDegProc old_lDeg)
Definition: p_polys.cc:3508
BOOLEAN arriRewCriterion(poly, unsigned long, poly, kStrategy strat, int start=0)
Definition: kutil.cc:7273
int int kStrategy strat
Definition: myNF.cc:68
#define TEST_OPT_RETURN_SB
Definition: options.h:107
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:38
BOOLEAN arriRewCriterionPre(poly sig, unsigned long not_sevSig, poly lm, kStrategy strat, int)
Definition: kutil.cc:7304
void(* chainCrit)(poly p, int ecart, kStrategy strat)
Definition: kutil.h:285
static BOOLEAN rField_is_Ring(const ring r)
Definition: ring.h:477
#define NULL
Definition: omList.c:10
BOOLEAN idHomIdeal(ideal id, ideal Q=NULL)
Definition: ideals.h:91
intvec * kHomW
Definition: kutil.h:332
#define TEST_OPT_SB_1
Definition: options.h:113
int blockred
Definition: kutil.h:361
const CanonicalForm & w
Definition: facAbsFact.cc:55
intvec * kModW
Definition: kutil.h:331
BOOLEAN no_prod_crit
Definition: kutil.h:391
static bool rIsSCA(const ring r)
Definition: nc.h:206
long kModDeg(poly p, ring r)
Definition: kstd1.cc:2208
void chainCritOpt_1(poly, int, kStrategy strat)
Definition: kutil.cc:3466
int LazyPass
Definition: kutil.h:349
int newIdeal
Definition: kutil.h:353
static ideal nc_GB(const ideal F, const ideal Q, const intvec *w, const intvec *hilb, kStrategy strat, const ring r)
Definition: nc.h:27
static Poly * h
Definition: janet.cc:978
int BOOLEAN
Definition: auxiliary.h:85
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
const poly b
Definition: syzextra.cc:213
KINLINE BOOLEAN arriRewDummy(poly, unsigned long, poly, kStrategy, int)
Definition: kInline.h:1147
BOOLEAN idHomModule(ideal m, ideal Q, intvec **w)
Definition: ideals.h:96
int LazyDegree
Definition: kutil.h:349
ideal mora(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
Definition: kstd1.cc:1606
#define idTest(id)
Definition: ideals.h:47

§ kStd()

ideal kStd ( ideal  F,
ideal  Q,
tHomog  h,
intvec **  mw,
intvec hilb = NULL,
int  syzComp = 0,
int  newIdeal = 0,
intvec vw = NULL,
s_poly_proc_t  sp = NULL 
)

Definition at line 2231 of file kstd1.cc.

2233 {
2234  if(idIs0(F))
2235  return idInit(1,F->rank);
2236 
2237  ideal r;
2238  BOOLEAN b=currRing->pLexOrder,toReset=FALSE;
2239  BOOLEAN delete_w=(w==NULL);
2241 
2242  strat->s_poly=sp;
2243  if(!TEST_OPT_RETURN_SB)
2244  strat->syzComp = syzComp;
2245  if (TEST_OPT_SB_1
2246  &&(!rField_is_Ring(currRing))
2247  )
2248  strat->newIdeal = newIdeal;
2250  strat->LazyPass=20;
2251  else
2252  strat->LazyPass=2;
2253  strat->LazyDegree = 1;
2254  strat->ak = id_RankFreeModule(F,currRing);
2255  strat->kModW=kModW=NULL;
2256  strat->kHomW=kHomW=NULL;
2257  if (vw != NULL)
2258  {
2259  currRing->pLexOrder=FALSE;
2260  strat->kHomW=kHomW=vw;
2261  strat->pOrigFDeg = currRing->pFDeg;
2262  strat->pOrigLDeg = currRing->pLDeg;
2264  toReset = TRUE;
2265  }
2266  if (h==testHomog)
2267  {
2268  if (strat->ak == 0)
2269  {
2270  h = (tHomog)idHomIdeal(F,Q);
2271  w=NULL;
2272  }
2273  else if (!TEST_OPT_DEGBOUND)
2274  {
2275  h = (tHomog)idHomModule(F,Q,w);
2276  }
2277  }
2278  currRing->pLexOrder=b;
2279  if (h==isHomog)
2280  {
2281  if (strat->ak > 0 && (w!=NULL) && (*w!=NULL))
2282  {
2283  strat->kModW = kModW = *w;
2284  if (vw == NULL)
2285  {
2286  strat->pOrigFDeg = currRing->pFDeg;
2287  strat->pOrigLDeg = currRing->pLDeg;
2289  toReset = TRUE;
2290  }
2291  }
2292  currRing->pLexOrder = TRUE;
2293  if (hilb==NULL) strat->LazyPass*=2;
2294  }
2295  strat->homog=h;
2296 #ifdef KDEBUG
2297  idTest(F);
2298  if (Q!=NULL) idTest(Q);
2299 #endif
2300 #ifdef HAVE_PLURAL
2301  if (rIsPluralRing(currRing))
2302  {
2303  const BOOLEAN bIsSCA = rIsSCA(currRing) && strat->z2homog; // for Z_2 prod-crit
2304  strat->no_prod_crit = ! bIsSCA;
2305  if (w!=NULL)
2306  r = nc_GB(F, Q, *w, hilb, strat, currRing);
2307  else
2308  r = nc_GB(F, Q, NULL, hilb, strat, currRing);
2309  }
2310  else
2311 #endif
2312  {
2313  #if PRE_INTEGER_CHECK
2314  //the preinteger check strategy is not for modules
2315  if(rField_is_Ring(currRing) && nCoeff_is_Ring_Z(currRing->cf) && strat->ak <= 0)
2316  {
2317  ideal FCopy = idCopy(F);
2318  poly pFmon = preIntegerCheck(FCopy, Q);
2319  if(pFmon != NULL)
2320  {
2321  idInsertPoly(FCopy, pFmon);
2322  #ifdef ADIDEBUG
2323  printf("\nPreintegerCheck found this constant:\n");pWrite(pFmon);
2324  #endif
2325 
2326  strat->kModW=kModW=NULL;
2327  if (h==testHomog)
2328  {
2329  if (strat->ak == 0)
2330  {
2331  h = (tHomog)idHomIdeal(FCopy,Q);
2332  w=NULL;
2333  }
2334  else if (!TEST_OPT_DEGBOUND)
2335  {
2336  h = (tHomog)idHomModule(FCopy,Q,w);
2337  }
2338  }
2339  currRing->pLexOrder=b;
2340  if (h==isHomog)
2341  {
2342  if (strat->ak > 0 && (w!=NULL) && (*w!=NULL))
2343  {
2344  strat->kModW = kModW = *w;
2345  if (vw == NULL)
2346  {
2347  strat->pOrigFDeg = currRing->pFDeg;
2348  strat->pOrigLDeg = currRing->pLDeg;
2350  toReset = TRUE;
2351  }
2352  }
2353  currRing->pLexOrder = TRUE;
2354  if (hilb==NULL) strat->LazyPass*=2;
2355  }
2356  strat->homog=h;
2357  }
2358  else
2359  {
2360  #ifdef ADIDEBUG
2361  printf("\npreIntegerCheck didn't found any new information\n");
2362  #endif
2363  }
2364  omTestMemory(1);
2365  if(w == NULL)
2366  {
2368  r=mora(FCopy,Q,NULL,hilb,strat);
2369  else
2370  r=bba(FCopy,Q,NULL,hilb,strat);
2371  }
2372  else
2373  {
2375  r=mora(FCopy,Q,*w,hilb,strat);
2376  else
2377  r=bba(FCopy,Q,*w,hilb,strat);
2378  }
2379  idDelete(&FCopy);
2380  }
2381  else
2382  #endif
2383  {
2384  if(w==NULL)
2385  {
2387  r=mora(F,Q,NULL,hilb,strat);
2388  else
2389  r=bba(F,Q,NULL,hilb,strat);
2390  }
2391  else
2392  {
2394  r=mora(F,Q,*w,hilb,strat);
2395  else
2396  r=bba(F,Q,*w,hilb,strat);
2397  }
2398  }
2399  }
2400 #ifdef KDEBUG
2401  idTest(r);
2402 #endif
2403  if (toReset)
2404  {
2405  kModW = NULL;
2406  pRestoreDegProcs(currRing,strat->pOrigFDeg, strat->pOrigLDeg);
2407  }
2408  currRing->pLexOrder = b;
2409 //Print("%d reductions canceled \n",strat->cel);
2410  HCord=strat->HCord;
2411  delete(strat);
2412  if ((delete_w)&&(w!=NULL)&&(*w!=NULL)) delete *w;
2413  return r;
2414 }
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
Definition: ring.h:750
int HCord
Definition: kutil.cc:235
int syzComp
Definition: kutil.h:350
#define TEST_OPT_DEGBOUND
Definition: options.h:108
#define idDelete(H)
delete an ideal
Definition: ideals.h:29
if(0 > strat->sl)
Definition: myNF.cc:73
#define FALSE
Definition: auxiliary.h:94
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_Z(const coeffs r)
Definition: coeffs.h:759
BOOLEAN z2homog
Definition: kutil.h:371
#define TRUE
Definition: auxiliary.h:98
void pWrite(poly p)
Definition: polys.h:290
int ak
Definition: kutil.h:349
poly preIntegerCheck(const ideal Forig, const ideal Q)
used for GB over ZZ: look for constant and monomial elements in the ideal background: any known const...
Definition: kutil.cc:10872
#define Q
Definition: sirandom.c:25
ideal bba(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
Definition: kstd2.cc:1958
static BOOLEAN rField_has_simple_inverse(const ring r)
Definition: ring.h:540
int HCord
Definition: kutil.h:351
pFDegProc pOrigFDeg
Definition: kutil.h:290
intvec * kHomW
Definition: kstd1.cc:2206
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
omError_t omTestMemory(int check_level)
Definition: omDebug.c:94
const ring r
Definition: syzextra.cc:208
pLDegProc pOrigLDeg
Definition: kutil.h:291
intvec * kModW
Definition: kstd1.cc:2206
BOOLEAN homog
Definition: kutil.h:369
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
tHomog
Definition: structs.h:37
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int syzComp
Definition: myNF.cc:291
void pSetDegProcs(ring r, pFDegProc new_FDeg, pLDegProc new_lDeg)
Definition: p_polys.cc:3496
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:404
long kHomModDeg(poly p, ring r)
Definition: kstd1.cc:2218
BOOLEAN idInsertPoly(ideal h1, poly h2)
insert h2 into h1 (if h2 is not the zero polynomial) return TRUE iff h2 was indeed inserted ...
ideal idCopy(ideal A)
Definition: ideals.h:60
void pRestoreDegProcs(ring r, pFDegProc old_FDeg, pLDegProc old_lDeg)
Definition: p_polys.cc:3508
int int kStrategy strat
Definition: myNF.cc:68
#define TEST_OPT_RETURN_SB
Definition: options.h:107
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:38
s_poly_proc_t s_poly
Definition: kutil.h:294
static BOOLEAN rField_is_Ring(const ring r)
Definition: ring.h:477
#define NULL
Definition: omList.c:10
BOOLEAN idHomIdeal(ideal id, ideal Q=NULL)
Definition: ideals.h:91
intvec * kHomW
Definition: kutil.h:332
#define TEST_OPT_SB_1
Definition: options.h:113
const CanonicalForm & w
Definition: facAbsFact.cc:55
intvec * kModW
Definition: kutil.h:331
BOOLEAN no_prod_crit
Definition: kutil.h:391
static bool rIsSCA(const ring r)
Definition: nc.h:206
long kModDeg(poly p, ring r)
Definition: kstd1.cc:2208
int LazyPass
Definition: kutil.h:349
polyrec * poly
Definition: hilb.h:10
int newIdeal
Definition: kutil.h:353
static ideal nc_GB(const ideal F, const ideal Q, const intvec *w, const intvec *hilb, kStrategy strat, const ring r)
Definition: nc.h:27
static Poly * h
Definition: janet.cc:978
int BOOLEAN
Definition: auxiliary.h:85
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
const poly b
Definition: syzextra.cc:213
BOOLEAN idHomModule(ideal m, ideal Q, intvec **w)
Definition: ideals.h:96
int LazyDegree
Definition: kutil.h:349
ideal mora(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat)
Definition: kstd1.cc:1606
#define idTest(id)
Definition: ideals.h:47

§ kStdShift()

ideal kStdShift ( ideal  F,
ideal  Q,
tHomog  h,
intvec **  w,
intvec hilb,
int  syzComp,
int  newIdeal,
intvec vw,
int  uptodeg,
int  lVblock 
)

Definition at line 2722 of file kstd1.cc.

2724 {
2725  ideal r;
2726  BOOLEAN b=currRing->pLexOrder,toReset=FALSE;
2727  BOOLEAN delete_w=(w==NULL);
2729 
2730  if(!TEST_OPT_RETURN_SB)
2731  strat->syzComp = syzComp;
2732  if (TEST_OPT_SB_1)
2733  if(!rField_is_Ring(currRing))
2734  strat->newIdeal = newIdeal;
2736  strat->LazyPass=20;
2737  else
2738  strat->LazyPass=2;
2739  strat->LazyDegree = 1;
2740  strat->ak = id_RankFreeModule(F,currRing);
2741  strat->kModW=kModW=NULL;
2742  strat->kHomW=kHomW=NULL;
2743  if (vw != NULL)
2744  {
2745  currRing->pLexOrder=FALSE;
2746  strat->kHomW=kHomW=vw;
2747  strat->pOrigFDeg = currRing->pFDeg;
2748  strat->pOrigLDeg = currRing->pLDeg;
2750  toReset = TRUE;
2751  }
2752  if (h==testHomog)
2753  {
2754  if (strat->ak == 0)
2755  {
2756  h = (tHomog)idHomIdeal(F,Q);
2757  w=NULL;
2758  }
2759  else if (!TEST_OPT_DEGBOUND)
2760  {
2761  h = (tHomog)idHomModule(F,Q,w);
2762  }
2763  }
2764  currRing->pLexOrder=b;
2765  if (h==isHomog)
2766  {
2767  if (strat->ak > 0 && (w!=NULL) && (*w!=NULL))
2768  {
2769  strat->kModW = kModW = *w;
2770  if (vw == NULL)
2771  {
2772  strat->pOrigFDeg = currRing->pFDeg;
2773  strat->pOrigLDeg = currRing->pLDeg;
2775  toReset = TRUE;
2776  }
2777  }
2778  currRing->pLexOrder = TRUE;
2779  if (hilb==NULL) strat->LazyPass*=2;
2780  }
2781  strat->homog=h;
2782 #ifdef KDEBUG
2783  idTest(F);
2784 #endif
2786  {
2787  /* error: no local ord yet with shifts */
2788  PrintS("No local ordering possible for shifts");
2789  return(NULL);
2790  }
2791  else
2792  {
2793  /* global ordering */
2794  if (w!=NULL)
2795  r=bbaShift(F,Q,*w,hilb,strat,uptodeg,lV);
2796  else
2797  r=bbaShift(F,Q,NULL,hilb,strat,uptodeg,lV);
2798  }
2799 #ifdef KDEBUG
2800  idTest(r);
2801 #endif
2802  if (toReset)
2803  {
2804  kModW = NULL;
2805  pRestoreDegProcs(currRing,strat->pOrigFDeg, strat->pOrigLDeg);
2806  }
2807  currRing->pLexOrder = b;
2808 //Print("%d reductions canceled \n",strat->cel);
2809  HCord=strat->HCord;
2810  delete(strat);
2811  if ((delete_w)&&(w!=NULL)&&(*w!=NULL)) delete *w;
2812  return r;
2813 }
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
Definition: ring.h:750
int HCord
Definition: kutil.cc:235
int syzComp
Definition: kutil.h:350
#define TEST_OPT_DEGBOUND
Definition: options.h:108
if(0 > strat->sl)
Definition: myNF.cc:73
#define FALSE
Definition: auxiliary.h:94
#define TRUE
Definition: auxiliary.h:98
int ak
Definition: kutil.h:349
#define Q
Definition: sirandom.c:25
static BOOLEAN rField_has_simple_inverse(const ring r)
Definition: ring.h:540
int HCord
Definition: kutil.h:351
pFDegProc pOrigFDeg
Definition: kutil.h:290
intvec * kHomW
Definition: kstd1.cc:2206
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
pLDegProc pOrigLDeg
Definition: kutil.h:291
intvec * kModW
Definition: kstd1.cc:2206
BOOLEAN homog
Definition: kutil.h:369
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
tHomog
Definition: structs.h:37
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int syzComp
Definition: myNF.cc:291
void pSetDegProcs(ring r, pFDegProc new_FDeg, pLDegProc new_lDeg)
Definition: p_polys.cc:3496
long kHomModDeg(poly p, ring r)
Definition: kstd1.cc:2218
void PrintS(const char *s)
Definition: reporter.cc:284
void pRestoreDegProcs(ring r, pFDegProc old_FDeg, pLDegProc old_lDeg)
Definition: p_polys.cc:3508
int int kStrategy strat
Definition: myNF.cc:68
#define TEST_OPT_RETURN_SB
Definition: options.h:107
static BOOLEAN rField_is_Ring(const ring r)
Definition: ring.h:477
#define NULL
Definition: omList.c:10
BOOLEAN idHomIdeal(ideal id, ideal Q=NULL)
Definition: ideals.h:91
intvec * kHomW
Definition: kutil.h:332
#define TEST_OPT_SB_1
Definition: options.h:113
const CanonicalForm & w
Definition: facAbsFact.cc:55
intvec * kModW
Definition: kutil.h:331
ideal bbaShift(ideal F, ideal Q, intvec *w, intvec *hilb, kStrategy strat, int uptodeg, int lV)
Definition: kstd2.cc:3995
long kModDeg(poly p, ring r)
Definition: kstd1.cc:2208
int LazyPass
Definition: kutil.h:349
int newIdeal
Definition: kutil.h:353
static Poly * h
Definition: janet.cc:978
int BOOLEAN
Definition: auxiliary.h:85
const poly b
Definition: syzextra.cc:213
BOOLEAN idHomModule(ideal m, ideal Q, intvec **w)
Definition: ideals.h:96
int LazyDegree
Definition: kutil.h:349
#define idTest(id)
Definition: ideals.h:47

§ mora()

ideal mora ( ideal  F,
ideal  Q,
intvec w,
intvec hilb,
kStrategy  strat 
)

Definition at line 1606 of file kstd1.cc.

1607 {
1608 #ifdef HAVE_RINGS
1609 #ifdef ADIDEBUG
1610 int loop_count;
1611 loop_count = 1;
1612 #endif
1613 #endif
1614  int olddeg = 0;
1615  int reduc = 0;
1616  int red_result = 1;
1617  int hilbeledeg=1,hilbcount=0;
1618  BITSET save1;
1619  SI_SAVE_OPT1(save1);
1621  {
1622  si_opt_1 &= ~Sy_bit(OPT_REDSB);
1624  }
1625 
1626  strat->update = TRUE;
1627  /*- setting global variables ------------------- -*/
1628  initBuchMoraCrit(strat);
1629  initHilbCrit(F,Q,&hilb,strat);
1630  initMora(F,strat);
1632  initBuchMoraPosRing(strat);
1633  else
1634  initBuchMoraPos(strat);
1635  /*Shdl=*/initBuchMora(F,Q,strat);
1636  if (TEST_OPT_FASTHC) missingAxis(&strat->lastAxis,strat);
1637  /*updateS in initBuchMora has Hecketest
1638  * and could have put strat->kHEdgdeFound FALSE*/
1639  if ((currRing->ppNoether)!=NULL)
1640  {
1641  strat->kHEdgeFound = TRUE;
1642  }
1643  if (strat->kHEdgeFound && strat->update)
1644  {
1645  firstUpdate(strat);
1646  updateLHC(strat);
1647  reorderL(strat);
1648  }
1649  if (TEST_OPT_FASTHC && (strat->lastAxis) && strat->posInLOldFlag)
1650  {
1651  strat->posInLOld = strat->posInL;
1652  strat->posInLOldFlag = FALSE;
1653  strat->posInL = posInL10;
1654  updateL(strat);
1655  reorderL(strat);
1656  }
1657  kTest_TS(strat);
1658  strat->use_buckets = kMoraUseBucket(strat);
1659 
1660 #ifdef HAVE_TAIL_RING
1661  if (strat->homog && strat->red == redFirst)
1662  if(!idIs0(F) &&(!rField_is_Ring(currRing)))
1663  kStratInitChangeTailRing(strat);
1664 #endif
1665 
1666  if (BVERBOSE(23))
1667  {
1668  kDebugPrint(strat);
1669  }
1670 //deleteInL(strat->L,&strat->Ll,1,strat);
1671 //deleteInL(strat->L,&strat->Ll,0,strat);
1672 
1673  /*- compute-------------------------------------------*/
1674  while (strat->Ll >= 0)
1675  {
1676  #ifdef ADIDEBUG
1677  printf("\n ------------------------NEW LOOP\n");
1678  printf("\nShdl = \n");
1679  for(int iii = 0; iii<= strat->sl; iii++)
1680  {
1681  printf("S[%i]:",iii);
1682  p_Write(strat->S[iii], strat->tailRing);
1683  }
1684  printf("\n list L has %i\n", strat->Ll);
1685  int iii;
1686  #ifdef ADIDEBUG
1687  for(iii = 0; iii<= strat->Ll; iii++)
1688  {
1689  printf("L[%i]:",iii);
1690  pWrite(strat->L[iii].p);
1691  pWrite(strat->L[iii].p1);
1692  pWrite(strat->L[iii].p2);
1693  }
1694  #endif
1695  getchar();
1696  #endif
1697  #ifdef KDEBUG
1698  if (TEST_OPT_DEBUG) messageSets(strat);
1699  #endif
1700  if (TEST_OPT_DEGBOUND
1701  && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()> Kstd1_deg))
1702  {
1703  /*
1704  * stops computation if
1705  * - 24 (degBound)
1706  * && upper degree is bigger than Kstd1_deg
1707  */
1708  while ((strat->Ll >= 0)
1709  && (strat->L[strat->Ll].p1!=NULL) && (strat->L[strat->Ll].p2!=NULL)
1710  && (strat->L[strat->Ll].ecart+strat->L[strat->Ll].GetpFDeg()> Kstd1_deg)
1711  )
1712  {
1713  deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
1714  //if (TEST_OPT_PROT)
1715  //{
1716  // PrintS("D"); mflush();
1717  //}
1718  }
1719  if (strat->Ll<0) break;
1720  else strat->noClearS=TRUE;
1721  }
1722  strat->P = strat->L[strat->Ll];/*- picks the last element from the lazyset L -*/
1723  if (strat->Ll==0) strat->interpt=TRUE;
1724  strat->Ll--;
1725  // create the real Spoly
1726  if (pNext(strat->P.p) == strat->tail)
1727  {
1728  /*- deletes the short spoly and computes -*/
1729  if (rField_is_Ring(currRing))
1730  pLmDelete(strat->P.p);
1731  else
1732  pLmFree(strat->P.p);
1733  strat->P.p = NULL;
1734  poly m1 = NULL, m2 = NULL;
1735  // check that spoly creation is ok
1736  while (strat->tailRing != currRing &&
1737  !kCheckSpolyCreation(&(strat->P), strat, m1, m2))
1738  {
1739  assume(m1 == NULL && m2 == NULL);
1740  // if not, change to a ring where exponents are large enough
1741  kStratChangeTailRing(strat);
1742  }
1743  /* create the real one */
1744  ksCreateSpoly(&(strat->P), strat->kNoetherTail(), strat->use_buckets,
1745  strat->tailRing, m1, m2, strat->R);
1746  if (!strat->use_buckets)
1747  strat->P.SetLength(strat->length_pLength);
1748  }
1749  else if (strat->P.p1 == NULL)
1750  {
1751  // for input polys, prepare reduction (buckets !)
1752  strat->P.SetLength(strat->length_pLength);
1753  strat->P.PrepareRed(strat->use_buckets);
1754  }
1755 
1756  // the s-poly
1757  if (!strat->P.IsNull())
1758  {
1759  // might be NULL from noether !!!
1760  if (TEST_OPT_PROT)
1761  message(strat->P.ecart+strat->P.GetpFDeg(),&olddeg,&reduc,strat, red_result);
1762  // reduce
1763  #ifdef ADIDEBUG
1764  printf("\nThis is P vor red:\n");p_Write(strat->P.p,strat->tailRing);p_Write(strat->P.p1,strat->tailRing);p_Write(strat->P.p2,strat->tailRing);
1765  printf("\nBefore Ll = %i\n", strat->Ll);
1766  #endif
1767  red_result = strat->red(&strat->P,strat);
1768  #ifdef ADIDEBUG
1769  printf("\nThis is P nach red:\n");p_Write(strat->P.p,strat->tailRing);p_Write(strat->P.p1,strat->tailRing);p_Write(strat->P.p2,strat->tailRing);
1770  printf("\nAfter Ll = %i\n", strat->Ll);
1771  #endif
1772  }
1773 
1774  // the reduced s-poly
1775  if (! strat->P.IsNull())
1776  {
1777  strat->P.GetP();
1778  // statistics
1779  if (TEST_OPT_PROT) PrintS("s");
1780  // normalization
1782  strat->P.pCleardenom();
1783  else
1784  strat->P.pNorm();
1785  // tailreduction
1786  strat->P.p = redtail(&(strat->P),strat->sl,strat);
1787  if (strat->P.p==NULL)
1788  {
1789  WerrorS("expoent overflow - wrong ordering");
1790  return(idInit(1,1));
1791  }
1792  // set ecart -- might have changed because of tail reductions
1793  if ((!strat->noTailReduction) && (!strat->honey))
1794  strat->initEcart(&strat->P);
1795  // cancel unit
1796  cancelunit(&strat->P);
1797  // for char 0, clear denominators
1798  if ((strat->P.p->next==NULL) /* i.e. cancelunit did something*/
1800  strat->P.pCleardenom();
1801 
1802  enterT(strat->P,strat);
1803  // build new pairs
1804  if (rField_is_Ring(currRing))
1805  superenterpairs(strat->P.p,strat->sl,strat->P.ecart,0,strat, strat->tl);
1806  else
1807  enterpairs(strat->P.p,strat->sl,strat->P.ecart,0,strat, strat->tl);
1808  // put in S
1809 
1810  #ifdef ADIDEBUG
1811  Print("\n The new pair list L -- after superenterpairs in loop %d -- is:\n",loop_count);
1812  for(int iii=0;iii<=strat->Ll;iii++)
1813  {
1814  printf("\n L[%d]:\n",iii);
1815  PrintS(" ");p_Write(strat->L[iii].p,strat->tailRing);
1816  PrintS(" ");p_Write(strat->L[iii].p1,strat->tailRing);
1817  PrintS(" ");p_Write(strat->L[iii].p2,strat->tailRing);
1818  }
1819  #endif
1820  strat->enterS(strat->P,
1821  posInS(strat,strat->sl,strat->P.p, strat->P.ecart),
1822  strat, strat->tl);
1823  #ifdef ADIDEBUG
1824  printf("\nThis pair has been added to S:\n");
1825  pWrite(strat->P.p);
1826  pWrite(strat->P.p1);
1827  pWrite(strat->P.p2);
1828  #endif
1829 
1830  // apply hilbert criterion
1831  if (hilb!=NULL)
1832  {
1833  if (strat->homog==isHomog)
1834  khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat);
1835  else
1836  khCheckLocInhom(Q,w,hilb,hilbcount,strat);
1837  }
1838 
1839  // clear strat->P
1840  if (strat->P.lcm!=NULL)
1841  {
1842  if (rField_is_Ring(currRing))
1843  pLmDelete(strat->P.lcm);
1844  else
1845  pLmFree(strat->P.lcm);
1846  strat->P.lcm=NULL;
1847  }
1848 
1849 #ifdef KDEBUG
1850  // make sure kTest_TS does not complain about strat->P
1851  memset(&strat->P,0,sizeof(strat->P));
1852 #endif
1853  }
1854  if (strat->kHEdgeFound)
1855  {
1856  if ((TEST_OPT_FINDET)
1857  || ((TEST_OPT_MULTBOUND) && (scMult0Int(strat->Shdl,NULL,strat->tailRing) < Kstd1_mu)))
1858  {
1859  // obachman: is this still used ???
1860  /*
1861  * stops computation if strat->kHEdgeFound and
1862  * - 27 (finiteDeterminacyTest)
1863  * or
1864  * - 23
1865  * (multBound)
1866  * && multiplicity of the ideal is smaller then a predefined number mu
1867  */
1868  while (strat->Ll >= 0) deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
1869  }
1870  }
1871  kTest_TS(strat);
1872  }
1873  /*- complete reduction of the standard basis------------------------ -*/
1874  if (TEST_OPT_REDSB) completeReduce(strat);
1875  else if (TEST_OPT_PROT) PrintLn();
1876  /*- release temp data------------------------------- -*/
1877  exitBuchMora(strat);
1878  /*- polynomials used for HECKE: HC, noether -*/
1879  if (TEST_OPT_FINDET)
1880  {
1881  if (strat->kHEdge!=NULL)
1882  Kstd1_mu=currRing->pFDeg(strat->kHEdge,currRing);
1883  else
1884  Kstd1_mu=-1;
1885  }
1886  pDelete(&strat->kHEdge);
1887  strat->update = TRUE; //???
1888  strat->lastAxis = 0; //???
1889  pDelete(&strat->kNoether);
1890  omFreeSize((ADDRESS)strat->NotUsedAxis,((currRing->N)+1)*sizeof(BOOLEAN));
1891  if ((TEST_OPT_PROT)||(TEST_OPT_DEBUG)) messageStat(hilbcount,strat);
1892 // if (TEST_OPT_WEIGHTM)
1893 // {
1894 // pRestoreDegProcs(currRing,strat->pOrigFDeg, strat->pOrigLDeg);
1895 // if (ecartWeights)
1896 // {
1897 // omFreeSize((ADDRESS)ecartWeights,((currRing->N)+1)*sizeof(short));
1898 // ecartWeights=NULL;
1899 // }
1900 // }
1901  if(nCoeff_is_Ring_Z(currRing->cf))
1902  finalReduceByMon(strat);
1903  if (Q!=NULL) updateResult(strat->Shdl,Q,strat);
1904  SI_RESTORE_OPT1(save1);
1905  idTest(strat->Shdl);
1906  return (strat->Shdl);
1907 }
#define OPT_REDSB
Definition: options.h:71
int(* posInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.h:278
unsigned si_opt_1
Definition: options.c:5
poly redtail(LObject *L, int pos, kStrategy strat)
Definition: kutil.cc:7505
void PrintLn()
Definition: reporter.cc:310
#define Print
Definition: emacs.cc:83
#define TEST_OPT_DEGBOUND
Definition: options.h:108
void initBuchMoraPos(kStrategy strat)
Definition: kutil.cc:9928
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
Definition: kutil.cc:7924
void initMora(ideal F, kStrategy strat)
Definition: kstd1.cc:1549
BOOLEAN length_pLength
Definition: kutil.h:384
void messageStat(int hilbcount, kStrategy strat)
Definition: kutil.cc:7965
#define TEST_OPT_PROT
Definition: options.h:98
int Ll
Definition: kutil.h:347
#define FALSE
Definition: auxiliary.h:94
void initBuchMora(ideal F, ideal Q, kStrategy strat)
Definition: kutil.cc:10101
int redFirst(LObject *h, kStrategy strat)
Definition: kstd1.cc:601
static FORCE_INLINE BOOLEAN nCoeff_is_Ring_Z(const coeffs r)
Definition: coeffs.h:759
#define omFreeSize(addr, size)
Definition: omAllocDecl.h:260
void enterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
Definition: kutil.cc:4935
#define pLmDelete(p)
assume p != NULL, deletes Lm(p)->coef and Lm(p)
Definition: polys.h:76
#define TEST_OPT_MULTBOUND
Definition: options.h:109
char noClearS
Definition: kutil.h:399
#define TRUE
Definition: auxiliary.h:98
#define TEST_OPT_REDSB
Definition: options.h:99
void * ADDRESS
Definition: auxiliary.h:115
#define SI_SAVE_OPT1(A)
Definition: options.h:20
void pWrite(poly p)
Definition: polys.h:290
void cancelunit(LObject *L, BOOLEAN inNF)
Definition: kutil.cc:332
void WerrorS(const char *s)
Definition: feFopen.cc:24
#define TEST_OPT_DEBUG
Definition: options.h:103
#define Q
Definition: sirandom.c:25
#define BITSET
Definition: structs.h:18
int(* red)(LObject *L, kStrategy strat)
Definition: kutil.h:272
void initBuchMoraPosRing(kStrategy strat)
Definition: kutil.cc:10014
#define Sy_bit(x)
Definition: options.h:30
void updateL(kStrategy strat)
Definition: kstd1.cc:1131
int lastAxis
Definition: kutil.h:352
void kStratInitChangeTailRing(kStrategy strat)
Definition: kutil.cc:11359
int Kstd1_mu
Definition: kutil.cc:237
#define TEST_OPT_FINDET
Definition: options.h:106
void enterT(LObject &p, kStrategy strat, int atT)
Definition: kutil.cc:9478
void missingAxis(int *last, kStrategy strat)
Definition: kstd1.cc:1015
void deleteInL(LSet set, int *length, int j, kStrategy strat)
Definition: kutil.cc:1148
BOOLEAN interpt
Definition: kutil.h:368
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:10
BOOLEAN homog
Definition: kutil.h:369
#define TEST_OPT_INTSTRATEGY
Definition: options.h:105
#define kTest_TS(A)
Definition: kutil.h:654
#define OPT_REDTAIL
Definition: options.h:86
void initHilbCrit(ideal, ideal, intvec **hilb, kStrategy strat)
Definition: kutil.cc:9759
int scMult0Int(ideal S, ideal Q, const ring tailRing)
Definition: hdegree.cc:919
#define assume(x)
Definition: mod2.h:394
#define messageSets(s)
Definition: kutil.h:538
void updateLHC(kStrategy strat)
Definition: kstd1.cc:1202
void ksCreateSpoly(LObject *Pair, poly spNoether, int use_buckets, ring tailRing, poly m1, poly m2, TObject **R)
Definition: kspoly.cc:774
BOOLEAN kStratChangeTailRing(kStrategy strat, LObject *L, TObject *T, unsigned long expbound)
Definition: kutil.cc:11260
LObject P
Definition: kutil.h:296
void initBuchMoraCrit(kStrategy strat)
Definition: kutil.cc:9777
void reorderL(kStrategy strat)
Definition: kstd1.cc:957
BOOLEAN update
Definition: kutil.h:378
void PrintS(const char *s)
Definition: reporter.cc:284
poly tail
Definition: kutil.h:330
int(* posInLOld)(const LSet Ls, const int Ll, LObject *Lo, const kStrategy strat)
Definition: kutil.h:282
TObject ** R
Definition: kutil.h:336
polyset S
Definition: kutil.h:300
BOOLEAN rHasMixedOrdering(const ring r)
Definition: ring.h:751
BOOLEAN kCheckSpolyCreation(LObject *L, kStrategy strat, poly &m1, poly &m2)
Definition: kutil.cc:10811
#define BVERBOSE(a)
Definition: options.h:33
int int kStrategy strat
Definition: myNF.cc:68
void khCheck(ideal Q, intvec *w, intvec *hilb, int &eledeg, int &count, kStrategy strat)
Definition: khstd.cc:35
BOOLEAN kHEdgeFound
Definition: kutil.h:373
ideal idInit(int idsize, int rank)
initialise an ideal / module
Definition: simpleideals.cc:38
LSet L
Definition: kutil.h:321
static BOOLEAN rField_is_Ring(const ring r)
Definition: ring.h:477
#define NULL
Definition: omList.c:10
void superenterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
Definition: kutil.cc:4898
void firstUpdate(kStrategy strat)
Definition: kstd1.cc:1295
ring tailRing
Definition: kutil.h:339
void khCheckLocInhom(ideal Q, intvec *w, intvec *hilb, int &count, kStrategy strat)
Definition: khstd.cc:140
int posInS(const kStrategy strat, const int length, const poly p, const int ecart_p)
Definition: kutil.cc:5111
#define pDelete(p_ptr)
Definition: polys.h:169
BOOLEAN posInLOldFlag
Definition: kutil.h:379
void completeReduce(kStrategy strat, BOOLEAN withT)
Definition: kutil.cc:10622
#define pNext(p)
Definition: monomials.h:43
void updateResult(ideal r, ideal Q, kStrategy strat)
Definition: kutil.cc:10410
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced ...
Definition: polys.h:70
int sl
Definition: kutil.h:344
static BOOLEAN kMoraUseBucket(kStrategy strat)
Definition: kstd1.cc:3618
BOOLEAN use_buckets
Definition: kutil.h:380
void p_Write(poly p, ring lmRing, ring tailRing)
Definition: polys0.cc:206
#define TEST_OPT_FASTHC
Definition: options.h:104
polyrec * poly
Definition: hilb.h:10
int Kstd1_deg
Definition: kutil.cc:236
void finalReduceByMon(kStrategy strat)
used for GB over ZZ: final reduction by constant elements background: any known constant element of i...
Definition: kutil.cc:11194
int BOOLEAN
Definition: auxiliary.h:85
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
KINLINE poly kNoetherTail()
Definition: kInline.h:63
#define SI_RESTORE_OPT1(A)
Definition: options.h:23
void exitBuchMora(kStrategy strat)
Definition: kutil.cc:10177
int posInL10(const LSet set, const int length, LObject *p, const kStrategy strat)
Definition: kstd1.cc:1098
void kDebugPrint(kStrategy strat)
Definition: kutil.cc:11806
#define idTest(id)
Definition: ideals.h:47

§ stdred()

ideal stdred ( ideal  F,
ideal  Q,
tHomog  h,
intvec **  w 
)

Variable Documentation

§ kHomW

intvec* kHomW

Definition at line 2206 of file kstd1.cc.

§ kModW

intvec* kModW

Definition at line 2206 of file kstd1.cc.

§ kOptions

BITSET kOptions

Definition at line 48 of file kstd1.cc.

§ Kstd1_deg

int Kstd1_deg

Definition at line 236 of file kutil.cc.

§ Kstd1_mu

int Kstd1_mu

Definition at line 237 of file kutil.cc.

§ LazyDegree

int LazyDegree

§ LazyPass

int LazyPass

§ validOpts

BITSET validOpts

Definition at line 63 of file kstd1.cc.