My Project  debian-1:4.1.1-p2+ds-4
Macros | Functions
gr_kstd2.cc File Reference
#include "kernel/mod2.h"
#include "omalloc/omalloc.h"
#include "misc/options.h"
#include "misc/intvec.h"
#include "polys/weight.h"
#include "kernel/polys.h"
#include "polys/monomials/ring.h"
#include "polys/nc/gb_hack.h"
#include "polys/nc/nc.h"
#include "polys/nc/sca.h"
#include "kernel/ideals.h"
#include "kernel/GBEngine/kstd1.h"
#include "kernel/GBEngine/khstd.h"
#include "kernel/GBEngine/ratgring.h"
#include "kernel/GBEngine/kutil.h"
#include "kernel/GBEngine/nc.h"

Go to the source code of this file.

Macros

#define PLURAL_INTERNAL_DECLARATIONS
 
#define MYTEST   0
 

Functions

int redGrFirst (LObject *h, kStrategy strat)
 
void ratGB_divide_out (poly p)
 
int redGrRatGB (LObject *h, kStrategy strat)
 
void nc_gr_initBba (ideal F, kStrategy strat)
 nc_gr_initBba is needed for sca_gr_bba and gr_bba. More...
 
ideal k_gnc_gr_bba (const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing)
 
ideal k_gnc_gr_mora (const ideal F, const ideal Q, const intvec *, const intvec *, kStrategy strat, const ring _currRing)
 

Macro Definition Documentation

◆ MYTEST

#define MYTEST   0

Definition at line 1043 of file gr_kstd2.cc.

◆ PLURAL_INTERNAL_DECLARATIONS

#define PLURAL_INTERNAL_DECLARATIONS

Definition at line 6 of file gr_kstd2.cc.

Function Documentation

◆ k_gnc_gr_bba()

ideal k_gnc_gr_bba ( const ideal  F,
const ideal  Q,
const intvec ,
const intvec ,
kStrategy  strat,
const ring  _currRing 
)

Definition at line 1045 of file gr_kstd2.cc.

1046 {
1047  const ring save = currRing; if( currRing != _currRing ) rChangeCurrRing(_currRing);
1048 
1049 #if MYTEST
1050  PrintS("<gnc_gr_bba>\n");
1051 #endif
1052 
1053 #ifdef HAVE_PLURAL
1054 #if MYTEST
1055  PrintS("currRing: \n");
1056  rWrite(currRing);
1057 #ifdef RDEBUG
1059 #endif
1060 
1061  PrintS("F: \n");
1062  idPrint(F);
1063  PrintS("Q: \n");
1064  idPrint(Q);
1065 #endif
1066 #endif
1067 
1068  assume(currRing->OrdSgn != -1); // no mora!!! it terminates only for global ordering!!! (?)
1069 
1070  // intvec *w=NULL;
1071  // intvec *hilb=NULL;
1072  int olddeg,reduc;
1073  int red_result=1;
1074  int /*hilbeledeg=1,*/hilbcount=0/*,minimcnt=0*/;
1075 
1076  initBuchMoraCrit(strat); /*set Gebauer, honey, sugarCrit*/
1077  // initHilbCrit(F,Q,&hilb,strat);
1078  /* in plural we don't need Hilb yet */
1079  nc_gr_initBba(F,strat);
1080  initBuchMoraPos(strat);
1081  if (rIsRatGRing(currRing))
1082  {
1083  strat->posInL=posInL0; // by pCmp of lcm
1084  }
1085  /*set enterS, spSpolyShort, reduce, red, initEcart, initEcartPair*/
1086  /*Shdl=*/initBuchMora(F, Q,strat);
1087  strat->posInT=posInT110;
1088  reduc = olddeg = 0;
1089 
1090  /* compute------------------------------------------------------- */
1091  while (strat->Ll >= 0)
1092  {
1093  if (TEST_OPT_DEBUG) messageSets(strat);
1094 
1095  if (strat->Ll== 0) strat->interpt=TRUE;
1096  if (TEST_OPT_DEGBOUND
1097  && ((strat->honey
1098  && (strat->L[strat->Ll].ecart+currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))
1099  || ((!strat->honey) && (currRing->pFDeg(strat->L[strat->Ll].p,currRing)>Kstd1_deg))))
1100  {
1101  /*
1102  *stops computation if
1103  * 24 IN test and the degree +ecart of L[strat->Ll] is bigger then
1104  *a predefined number Kstd1_deg
1105  */
1106  while (strat->Ll >= 0) deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
1107  break;
1108  }
1109  /* picks the last element from the lazyset L */
1110  strat->P = strat->L[strat->Ll];
1111  strat->Ll--;
1112  //kTest(strat);
1113 
1114  if (strat->P.p != NULL)
1115  if (pNext(strat->P.p) == strat->tail)
1116  {
1117  /* deletes the short spoly and computes */
1118  pLmFree(strat->P.p);
1119  /* the real one */
1120 // if (ncRingType(currRing)==nc_lie) /* prod crit */
1121 // if(pHasNotCF(strat->P.p1,strat->P.p2))
1122 // {
1123 // strat->cp++;
1124 // /* prod.crit itself in nc_CreateSpoly */
1125 // }
1126 
1127 
1128  if( ! rIsRatGRing(currRing) )
1129  {
1130  strat->P.p = nc_CreateSpoly(strat->P.p1,strat->P.p2,currRing);
1131  }
1132 #ifdef HAVE_RATGRING
1133  else
1134  {
1135  /* rational case */
1136  strat->P.p = nc_rat_CreateSpoly(strat->P.p1,strat->P.p2,currRing->real_var_start-1,currRing);
1137  }
1138 #endif
1139 
1140 
1141 #ifdef PDEBUG
1142  p_Test(strat->P.p, currRing);
1143 #endif
1144 
1145 #if MYTEST
1146  if (TEST_OPT_DEBUG)
1147  {
1148  PrintS("p1: "); pWrite(strat->P.p1);
1149  PrintS("p2: "); pWrite(strat->P.p2);
1150  PrintS("SPoly: "); pWrite(strat->P.p);
1151  }
1152 #endif
1153  }
1154 
1155 
1156  if (strat->P.p != NULL)
1157  {
1158  if (TEST_OPT_PROT)
1159  message((strat->honey ? strat->P.ecart : 0) + strat->P.pFDeg(),
1160  &olddeg,&reduc,strat, red_result);
1161 
1162 #if MYTEST
1163  if (TEST_OPT_DEBUG)
1164  {
1165  PrintS("p1: "); pWrite(strat->P.p1);
1166  PrintS("p2: "); pWrite(strat->P.p2);
1167  PrintS("SPoly before: "); pWrite(strat->P.p);
1168  }
1169 #endif
1170 
1171  /* reduction of the element chosen from L */
1172  strat->red(&strat->P,strat);
1173 
1174 #if MYTEST
1175  if (TEST_OPT_DEBUG)
1176  {
1177  PrintS("red SPoly: "); pWrite(strat->P.p);
1178  }
1179 #endif
1180  }
1181  if (strat->P.p != NULL)
1182  {
1183  if (TEST_OPT_PROT)
1184  {
1185  PrintS("s\n");
1186  }
1187  /* enter P.p into s and L */
1188  {
1189 /* quick unit detection in the rational case */
1190 #ifdef HAVE_RATGRING
1191  if( rIsRatGRing(currRing) )
1192  {
1193  if ( p_LmIsConstantRat(strat->P.p, currRing) )
1194  {
1195 #ifdef PDEBUG
1196  PrintS("unit element detected:");
1197  p_wrp(strat->P.p,currRing);
1198 #endif
1199  p_Delete(&strat->P.p,currRing, strat->tailRing);
1200  strat->P.p = pOne();
1201  }
1202  }
1203 #endif
1204  strat->P.sev=0;
1205  int pos=posInS(strat,strat->sl,strat->P.p, strat->P.ecart);
1206  {
1208  {
1209  if ((strat->syzComp==0)||(!strat->homog))
1210  {
1211  #ifdef HAVE_RATGRING
1212  if(!rIsRatGRing(currRing))
1213  #endif
1214  strat->P.p = redtailBba(strat->P.p,pos-1,strat);
1215  }
1216 
1217  strat->P.p=p_Cleardenom(strat->P.p, currRing);
1218  }
1219  else
1220  {
1221  pNorm(strat->P.p);
1222  if ((strat->syzComp==0)||(!strat->homog))
1223  {
1224  strat->P.p = redtailBba(strat->P.p,pos-1,strat);
1225  }
1226  }
1227  if (TEST_OPT_DEBUG)
1228  {
1229  PrintS("new s:"); wrp(strat->P.p);
1230  PrintLn();
1231 #if MYTEST
1232  PrintS("s: "); pWrite(strat->P.p);
1233 #endif
1234 
1235  }
1236  // kTest(strat);
1237  //
1238  enterpairs(strat->P.p,strat->sl,strat->P.ecart,pos,strat);
1239 
1240  if (strat->sl==-1) pos=0;
1241  else pos=posInS(strat,strat->sl,strat->P.p,strat->P.ecart);
1242 
1243  strat->enterS(strat->P,pos,strat,-1);
1244  }
1245 // if (hilb!=NULL) khCheck(Q,w,hilb,hilbeledeg,hilbcount,strat);
1246  }
1247  if (strat->P.lcm!=NULL) pLmFree(strat->P.lcm);
1248  }
1249 #ifdef KDEBUG
1250  strat->P.lcm=NULL;
1251 #endif
1252  //kTest(strat);
1253  }
1254  if (TEST_OPT_DEBUG) messageSets(strat);
1255 
1256  /* complete reduction of the standard basis--------- */
1257  if (TEST_OPT_SB_1)
1258  {
1259  int k=1;
1260  int j;
1261  while(k<=strat->sl)
1262  {
1263  j=0;
1264  loop
1265  {
1266  if (j>=k) break;
1267  clearS(strat->S[j],strat->sevS[j],&k,&j,strat);
1268  j++;
1269  }
1270  k++;
1271  }
1272  }
1273 
1274  if (TEST_OPT_REDSB)
1275  completeReduce(strat);
1276  /* release temp data-------------------------------- */
1277  exitBuchMora(strat);
1278 // if (TEST_OPT_WEIGHTM)
1279 // {
1280 // currRing->pFDeg=pFDegOld;
1281 // currRing->pLDeg=pLDegOld;
1282 // if (ecartWeights)
1283 // {
1284 // omFreeSize((ADDRESS)ecartWeights,((currRing->N)+1)*sizeof(short));
1285 // ecartWeights=NULL;
1286 // }
1287 // }
1288  if (TEST_OPT_PROT) messageStat(hilbcount,strat);
1289  if (Q!=NULL) updateResult(strat->Shdl,Q,strat);
1290 
1291 
1292 #ifdef PDEBUG
1293 /* for counting number of pairs [enterL] in Plural */
1294 /* extern int zaehler; */
1295 /* Print("Total pairs considered:%d\n",zaehler); zaehler=0; */
1296 #endif /*PDEBUG*/
1297 
1298 #if MYTEST
1299  PrintS("</gnc_gr_bba>\n");
1300 #endif
1301 
1302  if( currRing != save ) rChangeCurrRing(save);
1303 
1304  return (strat->Shdl);
1305 }

◆ k_gnc_gr_mora()

ideal k_gnc_gr_mora ( const ideal  F,
const ideal  Q,
const intvec ,
const intvec ,
kStrategy  strat,
const ring  _currRing 
)

Definition at line 1307 of file gr_kstd2.cc.

1308 {
1309 #ifndef SING_NDEBUG
1310  // Not yet!
1311  WarnS("Sorry, non-commutative mora is not yet implemented!");
1312 #endif
1313 
1314  return gnc_gr_bba(F, Q, NULL, NULL, strat, _currRing);
1315 }

◆ nc_gr_initBba()

void nc_gr_initBba ( ideal  F,
kStrategy  strat 
)

nc_gr_initBba is needed for sca_gr_bba and gr_bba.

Definition at line 965 of file gr_kstd2.cc.

969 {
971 
972  // int i;
973 // idhdl h;
974  /* setting global variables ------------------- */
975  strat->enterS = enterSBba;
976 
977 /*
978  if ((BTEST1(20)) && (!strat->honey))
979  strat->red = nc_redBest;
980  else if (strat->honey)
981  strat->red = nc_redHoney;
982  else if (currRing->pLexOrder && !strat->homog)
983  strat->red = nc_redLazy;
984  else if (TEST_OPT_INTSTRATEGY && strat->homog)
985  strat->red = nc_redHomog0;
986  else
987  strat->red = nc_redHomog;
988 */
989 
990 // if (rIsPluralRing(currRing))
991  strat->red = redGrFirst;
992 #ifdef HAVE_RATGRING
993  if (rIsRatGRing(currRing))
994  {
995  int ii=IDELEMS(F)-1;
996  int jj;
997  BOOLEAN is_rat_id=FALSE;
998  for(;ii>=0;ii--)
999  {
1000  for(jj=currRing->real_var_start;jj<=currRing->real_var_end;jj++)
1001  {
1002  if(pGetExp(F->m[ii],jj)>0) { is_rat_id=TRUE; break; }
1003  }
1004  if (is_rat_id) break;
1005  }
1006  if (is_rat_id) strat->red=redGrRatGB;
1007  }
1008 #endif
1009 
1010  if (currRing->pLexOrder && strat->honey)
1011  strat->initEcart = initEcartNormal;
1012  else
1013  strat->initEcart = initEcartBBA;
1014  if (strat->honey)
1016  else
1018 // if ((TEST_OPT_WEIGHTM)&&(F!=NULL))
1019 // {
1020 // //interred machen Aenderung
1021 // pFDegOld=currRing->pFDeg;
1022 // pLDegOld=currRing->pLDeg;
1023 // // h=ggetid("ecart");
1024 // // if ((h!=NULL) && (IDTYP(h)==INTVEC_CMD))
1025 // // {
1026 // // ecartWeights=iv2array(IDINTVEC(h));
1027 // // }
1028 // // else
1029 // {
1030 // ecartWeights=(short *)omAlloc(((currRing->N)+1)*sizeof(short));
1031 // /*uses automatic computation of the ecartWeights to set them*/
1032 // kEcartWeights(F->m,IDELEMS(F)-1,ecartWeights);
1033 // }
1034 // currRing->pFDeg=totaldegreeWecart;
1035 // currRing->pLDeg=maxdegreeWecart;
1036 // for(i=1; i<=(currRing->N); i++)
1037 // Print(" %d",ecartWeights[i]);
1038 // PrintLn();
1039 // mflush();
1040 // }
1041 }

◆ ratGB_divide_out()

void ratGB_divide_out ( poly  p)

Definition at line 172 of file gr_kstd2.cc.

173 {
174  /* extracts monomial content from localized expression */
175  /* searches for an m (monomial in var 1.. real_var_start-1)
176  * such that m divides p and divides p by this m if it exist*/
177  if (p==NULL) return;
178  poly root=p;
180  poly f=pHead(p);
181  int i;
182  for (i=currRing->real_var_start;i<=currRing->real_var_end;i++)
183  {
184  pSetExp(f,i,0);
185  }
186  loop
187  {
188  pIter(p);
189  if (p==NULL) { pSetm(f); break;}
190  for (i=1;i<=rVar(currRing);i++)
191  {
193  }
194  }
195  if (!pIsConstant(f))
196  {
197 #ifdef KDEBUG
198  if (TEST_OPT_DEBUG)
199  {
200  PrintS("divide out:");p_wrp(f,currRing);
201  PrintS(" from ");pWrite(root);
202  }
203 #endif
204  p=root;
205  loop
206  {
207  if (p==NULL) break;
208  for (i=1;i<=rVar(currRing);i++)
209  {
210  pSetExp(p,i,pGetExp(p,i)-pGetExp(f,i));
211  }
212  pSetm(p);
213  pIter(p);
214  }
215  }
216  pDelete(&f);
217 }

◆ redGrFirst()

int redGrFirst ( LObject h,
kStrategy  strat 
)

Definition at line 53 of file gr_kstd2.cc.

54 {
55  int at,reddeg,d,i;
56  int pass = 0;
57  int j = 0;
58 
59  d = currRing->pFDeg((*h).p,currRing)+(*h).ecart;
60  reddeg = strat->LazyDegree+d;
61  loop
62  {
63  if (j > strat->sl)
64  {
65 #ifdef KDEBUG
66  if (TEST_OPT_DEBUG) PrintLn();
67 #endif
68  return 0;
69  }
70 #ifdef KDEBUG
71  if (TEST_OPT_DEBUG) Print("%d",j);
72 #endif
73  if (pDivisibleBy(strat->S[j],(*h).p))
74  {
75 #ifdef KDEBUG
76  if (TEST_OPT_DEBUG) PrintS("+\n");
77 #endif
78  /*
79  * the polynomial to reduce with is;
80  * T[j].p
81  */
83  pNorm(strat->S[j]);
84 #ifdef KDEBUG
85  if (TEST_OPT_DEBUG)
86  {
87  wrp(h->p);
88  PrintS(" with ");
89  wrp(strat->S[j]);
90  }
91 #endif
92  (*h).p = nc_ReduceSpoly(strat->S[j],(*h).p, currRing);
93  //spSpolyRed(strat->T[j].p,(*h).p,strat->kNoether);
94 
95 #ifdef KDEBUG
96  if (TEST_OPT_DEBUG)
97  {
98  PrintS(" to ");
99  wrp(h->p);
100  }
101 #endif
102  if ((*h).p == NULL)
103  {
104  if (h->lcm!=NULL) p_LmFree((*h).lcm, currRing);
105  return 0;
106  }
108  {
109  h->pCleardenom();// also removes Content
110  }
111  /*computes the ecart*/
112  d = currRing->pLDeg((*h).p,&((*h).length),currRing);
113  (*h).FDeg=currRing->pFDeg((*h).p,currRing);
114  (*h).ecart = d-(*h).FDeg; /*pFDeg((*h).p);*/
115  if ((strat->syzComp!=0) && !strat->honey)
116  {
117  if ((strat->syzComp>0) && (pMinComp((*h).p) > strat->syzComp))
118  {
119 #ifdef KDEBUG
120  if (TEST_OPT_DEBUG) PrintS(" > sysComp\n");
121 #endif
122  return 0;
123  }
124  }
125  /*- try to reduce the s-polynomial -*/
126  pass++;
127  /*
128  *test whether the polynomial should go to the lazyset L
129  *-if the degree jumps
130  *-if the number of pre-defined reductions jumps
131  */
132  if ((strat->Ll >= 0)
133  && ((d >= reddeg) || (pass > strat->LazyPass))
134  && !strat->homog)
135  {
136  at = strat->posInL(strat->L,strat->Ll,h,strat);
137  if (at <= strat->Ll)
138  {
139  i=strat->sl+1;
140  do
141  {
142  i--;
143  if (i<0) return 0;
144  } while (!pDivisibleBy(strat->S[i],(*h).p));
145  enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at);
146 #ifdef KDEBUG
147  if (TEST_OPT_DEBUG) Print(" degree jumped; ->L%d\n",at);
148 #endif
149  (*h).p = NULL;
150  return 0;
151  }
152  }
153  if ((TEST_OPT_PROT) && (strat->Ll < 0) && (d >= reddeg))
154  {
155  reddeg = d+1;
156  Print(".%d",d);mflush();
157  }
158  j = 0;
159 #ifdef KDEBUG
160  if TEST_OPT_DEBUG PrintLn();
161 #endif
162  }
163  else
164  {
165 #ifdef KDEBUG
166  if (TEST_OPT_DEBUG) PrintS("-");
167 #endif
168  j++;
169  }
170  }
171 }

◆ redGrRatGB()

int redGrRatGB ( LObject h,
kStrategy  strat 
)

Definition at line 225 of file gr_kstd2.cc.

226 {
227  int at,reddeg,d,i;
228  int pass = 0;
229  int j = 0;
230  int c_j=-1, c_e=-2;
231  poly c_p=NULL;
232  assume(strat->tailRing==currRing);
233 
234  ratGB_divide_out((*h).p);
235  d = currRing->pFDeg((*h).p,currRing)+(*h).ecart;
236  reddeg = strat->LazyDegree+d;
238  {
239  h->pCleardenom();// also does a pContentRat
240  }
241  loop
242  {
243  if (j > strat->sl)
244  {
245  if (c_j>=0)
246  {
247  /*
248  * the polynomial to reduce with is;
249  * S[c_j]
250  */
252  pNorm(strat->S[c_j]);
253 #ifdef KDEBUG
254  if (TEST_OPT_DEBUG)
255  if (TEST_OPT_DEBUG)
256  {
257  wrp(h->p);
258  Print(" with S[%d]= ",c_j);
259  wrp(strat->S[c_j]);
260  }
261 #endif
262  //poly hh = nc_CreateSpoly(strat->S[c_j],(*h).p, currRing);
263  // Print("vor nc_rat_ReduceSpolyNew (ce:%d) ",c_e);wrp(h->p);PrintLn();
264  //if(c_e==-1)
265  // c_p = nc_CreateSpoly(pCopy(strat->S[c_j]),pCopy((*h).p), currRing);
266  //else
267  // c_p=nc_rat_ReduceSpolyNew(strat->S[c_j],pCopy((*h).p), currRing->real_var_start-1,currRing);
268  // Print("nach nc_rat_ReduceSpolyNew ");wrp(c_p);PrintLn();
269  // pDelete(&((*h).p));
270 
271  c_p=nc_rat_ReduceSpolyNew(strat->S[c_j],(*h).p, currRing->real_var_start-1,currRing);
272  (*h).p=c_p;
274  {
275  h->pCleardenom();// also removes Content
276  }
277 
278 #ifdef KDEBUG
279  if (TEST_OPT_DEBUG)
280  {
281  PrintS(" to ");
282  wrp(h->p);
283  PrintLn();
284  }
285 #endif
286  if ((*h).p == NULL)
287  {
288  if (h->lcm!=NULL) p_LmFree((*h).lcm, currRing);
289  return 0;
290  }
291  ratGB_divide_out((*h).p);
292  d = currRing->pLDeg((*h).p,&((*h).length),currRing);
293  (*h).FDeg=currRing->pFDeg((*h).p,currRing);
294  (*h).ecart = d-(*h).FDeg; /*pFDeg((*h).p);*/
295  /*- try to reduce the s-polynomial again -*/
296  pass++;
297  j=0;
298  c_j=-1; c_e=-2; c_p=NULL;
299  }
300  else
301  { // nothing found
302  return 0;
303  }
304  }
305  // first try usal division
306  if (p_LmDivisibleBy(strat->S[j],(*h).p,currRing))
307  {
308 #ifdef KDEBUG
309  if(TEST_OPT_DEBUG)
310  {
311  p_wrp(h->p,currRing); Print(" divisible by S[%d]=",j);
312  p_wrp(strat->S[j],currRing); PrintS(" e=-1\n");
313  }
314 #endif
315  if ((c_j<0)||(c_e>=0))
316  {
317  c_e=-1; c_j=j;
318  }
319  }
320  else
321  if (p_LmDivisibleByPart(strat->S[j],(*h).p,currRing,
322  currRing->real_var_start,currRing->real_var_end))
323  {
324  int a_e=(p_Totaldegree(strat->S[j],currRing)-currRing->pFDeg(strat->S[j],currRing));
325 #ifdef KDEBUG
326  if(TEST_OPT_DEBUG)
327  {
328  p_wrp(h->p,currRing); Print(" divisibly by S[%d]=",j);
329  p_wrp(strat->S[j],currRing); Print(" e=%d\n",a_e);
330  }
331 #endif
332  if ((c_j<0)||(c_e>a_e))
333  {
334  c_e=a_e; c_j=j;
335  //c_p = nc_CreateSpoly(pCopy(strat->S[c_j]),pCopy((*h).p), currRing);
336  }
337  /*computes the ecart*/
338  if ((strat->syzComp!=0) && !strat->honey)
339  {
340  if ((strat->syzComp>0) && (pMinComp((*h).p) > strat->syzComp))
341  {
342 #ifdef KDEBUG
343  if (TEST_OPT_DEBUG) PrintS(" > sysComp\n");
344 #endif
345  return 0;
346  }
347  }
348  }
349  else
350  {
351 #ifdef KDEBUG
352  if(TEST_OPT_DEBUG)
353  {
354  p_wrp(h->p,currRing); Print(" not divisibly by S[%d]=",j);
355  p_wrp(strat->S[j],currRing); PrintLn();
356  }
357 #endif
358  }
359  j++;
360  }
361 }
clearS
KINLINE void clearS(poly p, unsigned long p_sev, int *at, int *k, kStrategy strat)
Definition: kInline.h:1107
si_min
static int si_min(const int a, const int b)
Definition: auxiliary.h:139
pDivisibleBy
#define pDivisibleBy(a, b)
returns TRUE, if leading monom of a divides leading monom of b i.e., if there exists a expvector c > ...
Definition: polys.h:132
FALSE
#define FALSE
Definition: auxiliary.h:94
pIsConstant
#define pIsConstant(p)
like above, except that Comp might be != 0
Definition: polys.h:215
initBuchMoraCrit
void initBuchMoraCrit(kStrategy strat)
Definition: kutil.cc:9548
skStrategy::tail
poly tail
Definition: kutil.h:326
j
int j
Definition: facHensel.cc:105
f
FILE * f
Definition: checklibs.c:9
pMinComp
#define pMinComp(p)
Definition: polys.h:274
pNorm
void pNorm(poly p, const ring R=currRing)
Definition: polys.h:337
skStrategy::enterS
void(* enterS)(LObject &h, int pos, kStrategy strat, int atR)
Definition: kutil.h:276
TEST_OPT_PROT
#define TEST_OPT_PROT
Definition: options.h:101
k
int k
Definition: cfEzgcd.cc:92
pLmFree
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:68
rDebugPrint
void rDebugPrint(const ring r)
Definition: ring.cc:3997
posInL0
int posInL0(const LSet set, const int length, LObject *p, const kStrategy)
Definition: kutil.cc:5964
rChangeCurrRing
void rChangeCurrRing(ring r)
Definition: polys.cc:15
TEST_OPT_DEGBOUND
#define TEST_OPT_DEGBOUND
Definition: options.h:111
nc_rat_ReduceSpolyNew
poly nc_rat_ReduceSpolyNew(const poly p1, poly p2, int ishift, const ring r)
Definition: ratgring.cc:465
skStrategy::P
LObject P
Definition: kutil.h:292
pGetExp
#define pGetExp(p, i)
Exponent.
Definition: polys.h:40
skStrategy::L
LSet L
Definition: kutil.h:317
skStrategy::S
polyset S
Definition: kutil.h:296
updateResult
void updateResult(ideal r, ideal Q, kStrategy strat)
Definition: kutil.cc:10180
posInT110
int posInT110(const TSet set, const int length, LObject &p)
Definition: kutil.cc:5378
skStrategy::tailRing
ring tailRing
Definition: kutil.h:335
gnc_gr_bba
BBA_Proc gnc_gr_bba
Definition: old.gring.cc:67
TEST_OPT_DEBUG
#define TEST_OPT_DEBUG
Definition: options.h:106
p_Test
#define p_Test(p, r)
Definition: p_polys.h:155
p_wrp
void p_wrp(poly p, ring lmRing, ring tailRing)
Definition: polys0.cc:234
posInS
int posInS(const kStrategy strat, const int length, const poly p, const int ecart_p)
Definition: kutil.cc:4934
skStrategy::homog
char homog
Definition: kutil.h:365
pDelete
#define pDelete(p_ptr)
Definition: polys.h:166
skStrategy::honey
char honey
Definition: kutil.h:370
loop
#define loop
Definition: structs.h:77
skStrategy::Lmax
int Lmax
Definition: kutil.h:343
TEST_OPT_REDSB
#define TEST_OPT_REDSB
Definition: options.h:102
p_LmDivisibleBy
static BOOLEAN p_LmDivisibleBy(poly a, poly b, const ring r)
Definition: p_polys.h:1794
rIsPluralRing
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition: ring.h:403
currRing
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition: polys.cc:13
initEcartPairBba
void initEcartPairBba(LObject *Lp, poly, poly, int, int)
Definition: kutil.cc:1253
rVar
static short rVar(const ring r)
#define rVar(r) (r->N)
Definition: ring.h:582
nc_gr_initBba
void nc_gr_initBba(ideal F, kStrategy strat)
nc_gr_initBba is needed for sca_gr_bba and gr_bba.
Definition: gr_kstd2.cc:965
TRUE
#define TRUE
Definition: auxiliary.h:98
TEST_OPT_INTSTRATEGY
#define TEST_OPT_INTSTRATEGY
Definition: options.h:108
i
int i
Definition: cfEzgcd.cc:125
p_LmIsConstantRat
BOOLEAN p_LmIsConstantRat(const poly p, const ring r)
Definition: ratgring.cc:642
skStrategy::sl
int sl
Definition: kutil.h:340
redGrFirst
int redGrFirst(LObject *h, kStrategy strat)
Definition: gr_kstd2.cc:53
skStrategy::LazyDegree
int LazyDegree
Definition: kutil.h:345
enterSBba
void enterSBba(LObject &p, int atS, kStrategy strat, int atR)
Definition: kutil.cc:9028
initEcartNormal
void initEcartNormal(TObject *h)
Definition: kutil.cc:1238
PrintS
void PrintS(const char *s)
Definition: reporter.cc:283
BOOLEAN
int BOOLEAN
Definition: auxiliary.h:85
redGrRatGB
int redGrRatGB(LObject *h, kStrategy strat)
Definition: gr_kstd2.cc:225
message
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
Definition: kutil.cc:7727
skStrategy::LazyPass
int LazyPass
Definition: kutil.h:345
completeReduce
void completeReduce(kStrategy strat, BOOLEAN withT)
Definition: kutil.cc:10392
skStrategy::posInL
int(* posInL)(const LSet set, const int length, LObject *L, const kStrategy strat)
Definition: kutil.h:274
exitBuchMora
void exitBuchMora(kStrategy strat)
Definition: kutil.cc:9947
h
static Poly * h
Definition: janet.cc:972
rIsRatGRing
static BOOLEAN rIsRatGRing(const ring r)
Definition: ring.h:414
initBuchMora
void initBuchMora(ideal F, ideal Q, kStrategy strat)
Definition: kutil.cc:9871
pOne
#define pOne()
Definition: polys.h:289
pIter
#define pIter(p)
Definition: monomials.h:41
p_Cleardenom
poly p_Cleardenom(poly p, const ring r)
Definition: p_polys.cc:2779
initBuchMoraPos
void initBuchMoraPos(kStrategy strat)
Definition: kutil.cc:9698
messageStat
void messageStat(int hilbcount, kStrategy strat)
Definition: kutil.cc:7768
nc_ReduceSpoly
static poly nc_ReduceSpoly(const poly p1, poly p2, const ring r)
Definition: nc.h:263
messageSets
#define messageSets(s)
Definition: kutil.h:532
skStrategy::syzComp
int syzComp
Definition: kutil.h:346
Kstd1_deg
int Kstd1_deg
Definition: kutil.cc:235
nc_rat_CreateSpoly
poly nc_rat_CreateSpoly(poly pp1, poly pp2, int ishift, const ring r)
Definition: ratgring.cc:340
skStrategy::interpt
char interpt
Definition: kutil.h:364
p_LmFree
static void p_LmFree(poly p, ring)
Definition: p_polys.h:670
p_Delete
static void p_Delete(poly *p, const ring r)
Definition: p_polys.h:842
skStrategy::Ll
int Ll
Definition: kutil.h:343
idPrint
#define idPrint(id)
Definition: ideals.h:45
redtailBba
KINLINE poly redtailBba(poly p, int pos, kStrategy strat, BOOLEAN normalize)
Definition: kInline.h:1087
rWrite
void rWrite(ring r, BOOLEAN details)
Definition: ring.cc:226
Print
#define Print
Definition: emacs.cc:79
skStrategy::initEcartPair
void(* initEcartPair)(LObject *h, poly f, poly g, int ecartF, int ecartG)
Definition: kutil.h:277
WarnS
#define WarnS
Definition: emacs.cc:77
assume
#define assume(x)
Definition: mod2.h:384
NULL
#define NULL
Definition: omList.c:9
pSetm
#define pSetm(p)
Definition: polys.h:246
mflush
#define mflush()
Definition: reporter.h:56
TEST_OPT_SB_1
#define TEST_OPT_SB_1
Definition: options.h:116
pSetExp
#define pSetExp(p, i, v)
Definition: polys.h:41
p_Totaldegree
static long p_Totaldegree(poly p, const ring r)
Definition: p_polys.h:1435
p
int p
Definition: cfModGcd.cc:4019
enterL
void enterL(LSet *set, int *length, int *LSetmax, LObject p, int at)
Definition: kutil.cc:1214
deleteInL
void deleteInL(LSet set, int *length, int j, kStrategy strat)
Definition: kutil.cc:1151
skStrategy::initEcart
void(* initEcart)(TObject *L)
Definition: kutil.h:270
skStrategy::red
int(* red)(LObject *L, kStrategy strat)
Definition: kutil.h:268
initEcartBBA
void initEcartBBA(TObject *h)
Definition: kutil.cc:1246
enterpairs
void enterpairs(poly h, int k, int ecart, int pos, kStrategy strat, int atR)
Definition: kutil.cc:4758
IDELEMS
#define IDELEMS(i)
Definition: simpleideals.h:24
nc_CreateSpoly
static poly nc_CreateSpoly(const poly p1, const poly p2, const ring r)
Definition: nc.h:250
skStrategy::posInT
int(* posInT)(const TSet T, const int tl, LObject &h)
Definition: kutil.h:271
Q
#define Q
Definition: sirandom.c:25
pHead
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
Definition: polys.h:65
initEcartPairMora
void initEcartPairMora(LObject *Lp, poly, poly, int ecartF, int ecartG)
Definition: kutil.cc:1260
PrintLn
void PrintLn()
Definition: reporter.cc:309
pNext
#define pNext(p)
Definition: monomials.h:40
ratGB_divide_out
void ratGB_divide_out(poly p)
Definition: gr_kstd2.cc:172
p_LmDivisibleByPart
static BOOLEAN p_LmDivisibleByPart(poly a, poly b, const ring r, const int start, const int end)
Definition: p_polys.h:1759
pWrite
void pWrite(poly p)
Definition: polys.h:282
wrp
void wrp(poly p)
Definition: polys.h:284