My Project
Loading...
Searching...
No Matches
customstd.cc
Go to the documentation of this file.
3//#include <vector>
4//#include <iostream>
5
6// global variable potentially storing output
7//ideal idealCache=NULL;
8
9// //------------------------------------------------------------------------
10// // example of a routine which changes nothing
11// static BOOLEAN display_sp(kStrategy strat)
12// {
13// // will be call each time a new s-poly is computed (strat->P)
14// // the algorithm assures that strat->P.p!=NULL, in currRing
15// // if strat->P.t_p==NULL: strat->P.p->next is in currRing
16// // otherwise: strat->P.t_p->next==strat->P.p->next, in strat->tailRing
17// // must return TRUE, if strat->P is changed, FALSE otherwise
18// PrintS("a new s-poly found: ");
19// p_Write(strat->P.p,currRing,strat->tailRing);
20// return FALSE;
21// }
22// static BOOLEAN std_with_display(leftv res, leftv args)
23// {
24// if (args!=NULL)
25// {
26// if (args->Typ()==IDEAL_CMD)
27// {
28// ideal I=(ideal)args->Data();
29// I=kStd2(I,currRing->qideal,testHomog,NULL,NULL,0,0,NULL,display_sp);
30// idSkipZeroes(I);
31// res->data=(char*)I;
32// res->rtyp=IDEAL_CMD;
33// return FALSE;
34// }
35// }
36// WerrorS("expected: std_with_display(`idea;`)");
37// return TRUE;
38// }
39
41{
42 leftv u = args;
43 if ((u!=NULL)
44 && ((u->Typ()==IDEAL_CMD)||(u->Typ()==MODUL_CMD)))
45 {
46 ideal I=(ideal)u->Data();
47 leftv v = u->next;
48
49 res->rtyp=IDEAL_CMD;
50 ideal J;
51 if (v==NULL)
52 {
54 }
55 else
56 {
57 if (v->Typ()==IDEAL_CMD)
58 {
59 J = (ideal) v->Data();
60 }
61 else
62 {
63 args->CleanUp();
64 WerrorS("satstd: unexpected parameters");
65 return TRUE;
66 }
67 }
68 I=id_Satstd(I,J,currRing);
69
70#if 0 /* unused */
71 if (idealCache)
72 {
74 res->data = (char*) idealCache;
75 idealCache = NULL;
76 }
77 else
78#endif
79 {
80 idSkipZeroes(I);
81 res->data=(char*)I;
82 }
83 if (v==NULL) id_Delete(&J,currRing);
84 args->CleanUp();
86 return (res->data==NULL);
87 }
88 WerrorS("satstd: unexpected parameters");
89 return TRUE;
90}
91
93{
94 BOOLEAN b = FALSE; // set b to TRUE, if spoly was changed,
95 // let it remain FALSE otherwise
96 if (strat->P.t_p==NULL)
97 {
98 poly p=strat->P.p;
99 if (pNext(p)==NULL)
100 {
101 while ((strat->Ll >= 0))
102 deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
103 return FALSE;
104 }
105 }
106 else
107 {
108 poly p=strat->P.t_p;
109 if (pNext(p)==NULL)
110 {
111 while ((strat->Ll >= 0))
112 deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
113 return FALSE;
114 }
115 }
116 return b; // return TRUE if sp was changed, FALSE if not
117}
118
121{
122 char *s;
123 if (strat->P.t_p==NULL)
124 {
125 s=pString(strat->P.p);
126 }
127 else
128 {
129 poly p=strat->P.t_p;
130 s=p_String(p,strat->tailRing);
131 }
132 FILE *f=fopen(si_filename,"a");
133 fwrite(s,strlen(s),1,f);
134 fwrite("\n",1,1,f);
135 fflush(f);
136 fclose(f);
137 return FALSE; // return TRUE if sp was changed, FALSE if not
138}
139
140#if 0 //unused
141STATIC_VAR int si_filenr;
142static BOOLEAN print_syz(kStrategy strat)
143{
144 char *s=NULL;
145 if (strat->P.t_p==NULL)
146 {
147 if (pGetComp(strat->P.p)>=strat->syzComp)
148 s=pString(strat->P.p);
149 }
150 else
151 {
152 if (p_GetComp(strat->P.t_p,strat->tailRing)>=strat->syzComp)
153 s=p_String(strat->P.t_p,strat->tailRing);
154 }
155 if (s!=NULL)
156 {
157 size_t len=strlen(si_filename)+12;
158 char *fn=(char*)malloc(len);
159 snprintf(fn,len, "%s.%d",si_filename,si_filenr);
160 si_filenr++;
161 FILE *f=fopen(fn,"w");
162 fwrite(s,strlen(s),1,f);
163 fwrite("\n",1,1,f);
164 fclose(f);
165 free(fn);
166 }
167 return FALSE; // return TRUE if sp was changed, FALSE if not
168}
169#endif
171{
172 if (args!=NULL)
173 {
174 if ((args->Typ()==IDEAL_CMD) && (args->next!=NULL)
175 && (args->next->Typ()==STRING_CMD))
176 {
177 si_filename=(char*)args->next->Data();
178 ideal I=(ideal)args->Data();
180 idSkipZeroes(I);
181 res->rtyp=IDEAL_CMD;
182 res->data=(char*)I;
183 return FALSE;
184 }
185 }
186 WerrorS("std_print_spoly: unexpected parameters");
187 return TRUE;
188}
189
190#if 0 // unused
191static ideal idGroebner_print(ideal temp,int syzComp, intvec* w=NULL, tHomog hom=testHomog)
192{
193 ideal temp1;
194 if (w==NULL)
195 {
196 if (hom==testHomog)
197 hom=(tHomog)idHomModule(temp,currRing->qideal,&w); //sets w to weight vector or NULL
198 }
199 else
200 {
201 w=ivCopy(w);
202 hom=isHomog;
203 }
204 temp1 = kStd2(temp,currRing->qideal,hom,&w,NULL,syzComp,0,NULL,print_syz);
205 idDelete(&temp);
206 if (w!=NULL) delete w;
207 return temp1;
208}
209#endif
210
211#if 0 // unused
212static ideal idPrepare_print (ideal h1, ideal h11, tHomog hom, int syzcomp, intvec **w)
213{
214 ideal h2,h22;
215 int j,k;
216 poly p,q;
217
218 assume(!idIs0(h1));
220 if (h11!=NULL)
221 {
222 k = si_max(k,(int)id_RankFreeModule(h11,currRing));
223 h22=idCopy(h11);
224 }
225 h2=idCopy(h1);
226 int i = IDELEMS(h2);
227 if (h11!=NULL) i+=IDELEMS(h22);
228 if (k == 0)
229 {
230 id_Shift(h2,1,currRing);
231 if (h11!=NULL) id_Shift(h22,1,currRing);
232 k = 1;
233 }
234 if (syzcomp<k)
235 {
236 Warn("syzcomp too low, should be %d instead of %d",k,syzcomp);
237 syzcomp = k;
239 }
240 h2->rank = syzcomp+i;
241
242 for (j=0; j<IDELEMS(h2); j++)
243 {
244 p = h2->m[j];
245 q = pOne();
246 pSetComp(q,syzcomp+1+j);
247 pSetmComp(q);
248 if (p!=NULL)
249 {
250 {
251 while (pNext(p)) pIter(p);
252 p->next = q;
253 }
254 }
255 else
256 h2->m[j]=q;
257 }
258 if (h11!=NULL)
259 {
260 ideal h=id_SimpleAdd(h2,h22,currRing);
261 id_Delete(&h2,currRing);
262 id_Delete(&h22,currRing);
263 h2=h;
264 }
265
266 idTest(h2);
267 #if 0
269 PrintS(" --------------before std------------------------\n");
270 ipPrint_MA0(TT,"T");
271 PrintLn();
272 idDelete((ideal*)&TT);
273 #endif
274
275 ideal h3;
276 if (w!=NULL) h3=idGroebner_print(h2,syzcomp,*w,hom);
277 else h3=idGroebner_print(h2,syzcomp,NULL,hom);
278 return h3;
279}
280#endif
281
282#if 0
283static ideal idSyzygies_print (ideal h1, tHomog h,intvec **w)
284{
285 ideal s_h1;
286 int j, k;
287 BOOLEAN isMonomial=TRUE;
288 int ii, idElemens_h1;
289
290 assume(h1 != NULL);
291
292 idElemens_h1=IDELEMS(h1);
293#ifdef PDEBUG
294 for(ii=0;ii<idElemens_h1 /*IDELEMS(h1)*/;ii++) pTest(h1->m[ii]);
295#endif
296 if (idIs0(h1))
297 {
298 ideal result=idFreeModule(idElemens_h1/*IDELEMS(h1)*/);
299 return result;
300 }
301 int slength=(int)id_RankFreeModule(h1,currRing);
302 k=si_max(1,slength /*id_RankFreeModule(h1)*/);
303
304 assume(currRing != NULL);
305 ring orig_ring=currRing;
306 ring syz_ring=rAssure_SyzComp(orig_ring,TRUE);
307 rSetSyzComp(k,syz_ring);
308
309 if (orig_ring != syz_ring)
310 {
311 rChangeCurrRing(syz_ring);
312 s_h1=idrCopyR_NoSort(h1,orig_ring,syz_ring);
313 }
314 else
315 {
316 s_h1 = h1;
317 }
318
319 idTest(s_h1);
320
321 BITSET save_opt;
322 SI_SAVE_OPT1(save_opt);
324
325 ideal s_h3=idPrepare_print(s_h1,NULL,h,k,w); // main (syz) GB computation
326
327 SI_RESTORE_OPT1(save_opt);
328
329 if (orig_ring != syz_ring)
330 {
331 idDelete(&s_h1);
332 for (j=0; j<IDELEMS(s_h3); j++)
333 {
334 if (s_h3->m[j] != NULL)
335 {
336 if (p_MinComp(s_h3->m[j],syz_ring) > k)
337 p_Shift(&s_h3->m[j], -k,syz_ring);
338 else
339 p_Delete(&s_h3->m[j],syz_ring);
340 }
341 }
342 idSkipZeroes(s_h3);
343 s_h3->rank -= k;
344 rChangeCurrRing(orig_ring);
345 s_h3 = idrMoveR_NoSort(s_h3, syz_ring, orig_ring);
346 rDelete(syz_ring);
347 #ifdef HAVE_PLURAL
348 if (rIsPluralRing(orig_ring))
349 {
350 id_DelMultiples(s_h3,orig_ring);
351 idSkipZeroes(s_h3);
352 }
353 #endif
354 idTest(s_h3);
355 return s_h3;
356 }
357
358 ideal e = idInit(IDELEMS(s_h3), s_h3->rank);
359
360 for (j=IDELEMS(s_h3)-1; j>=0; j--)
361 {
362 if (s_h3->m[j] != NULL)
363 {
364 if (p_MinComp(s_h3->m[j],syz_ring) <= k)
365 {
366 e->m[j] = s_h3->m[j];
367 isMonomial=isMonomial && (pNext(s_h3->m[j])==NULL);
368 p_Delete(&pNext(s_h3->m[j]),syz_ring);
369 s_h3->m[j] = NULL;
370 }
371 }
372 }
373
374 idSkipZeroes(s_h3);
375
376 idDelete(&e);
377 assume(orig_ring==currRing);
378 idTest(s_h3);
379 if (currRing->qideal != NULL)
380 {
381 ideal ts_h3=kStd2(s_h3,currRing->qideal,h,w);
382 idDelete(&s_h3);
383 s_h3 = ts_h3;
384 }
385 return s_h3;
386}
387#endif
388
389#if 0
390static BOOLEAN syz_print_spoly(leftv res, leftv args)
391{
392 if (args!=NULL)
393 {
394 if (((args->Typ()==IDEAL_CMD)||(args->Typ()==MODUL_CMD)) && (args->next!=NULL)
395 && (args->next->Typ()==STRING_CMD))
396 {
397 si_filename=(char*)args->next->Data();
398 si_filenr=0;
399 ideal v_id=(ideal)args->Data();
400 intvec *ww=(intvec *)atGet(args,"isHomog",INTVEC_CMD);
401 intvec *w=NULL;
402 tHomog hom=testHomog;
403 if (ww!=NULL)
404 {
405 if (idTestHomModule(v_id,currRing->qideal,ww))
406 {
407 w=ivCopy(ww);
408 int add_row_shift=w->min_in();
409 (*w)-=add_row_shift;
410 hom=isHomog;
411 }
412 else
413 {
414 //WarnS("wrong weights");
415 delete ww; ww=NULL;
416 hom=testHomog;
417 }
418 }
419 else
420 {
421 if (args->Typ()==IDEAL_CMD)
422 if (idHomIdeal(v_id,currRing->qideal))
423 hom=isHomog;
424 }
425 ideal S=idSyzygies_print(v_id,hom,&w);
426 res->data = (char *)S;
427 res->rtyp=args->Typ();
428 if (hom==isHomog)
429 {
430 int vl=S->rank;
431 intvec *vv=new intvec(vl);
432 if ((args->Typ()==IDEAL_CMD)||(ww==NULL))
433 {
434 for(int i=0;i<vl;i++)
435 {
436 if (v_id->m[i]!=NULL)
437 (*vv)[i]=p_Deg(v_id->m[i],currRing);
438 }
439 }
440 else
441 {
443 for(int i=0;i<vl;i++)
444 {
445 if (v_id->m[i]!=NULL)
446 (*vv)[i]=currRing->pFDeg(v_id->m[i],currRing);
447 }
449 }
450 if (idTestHomModule(S,currRing->qideal,vv))
451 atSet(res,omStrDup("isHomog"),vv,INTVEC_CMD);
452 else
453 delete vv;
454 }
455 if (w!=NULL) delete w;
456 return FALSE;
457 }
458 }
459 WerrorS("syz_print_spoly: unexpected parameters");
460 return TRUE;
461}
462#endif
463
465{
466 if (args!=NULL)
467 {
468 if ((args->Typ()==IDEAL_CMD) && (args->next==NULL))
469 {
470 ideal I=(ideal)args->Data();
472 idSkipZeroes(I);
473 res->rtyp=IDEAL_CMD;
474 res->data=(char*)I;
475 return FALSE;
476 }
477 }
478 WerrorS("monomialabortstd: unexpected parameters");
479 return TRUE;
480}
481
482// static long wDeg(const poly p, const ring r)
483// {
484// if (r->order[0] == ringorder_lp)
485// return p_GetExp(p,1,currRing);
486// if (r->order[0] == ringorder_ls)
487// return -p_GetExp(p,1,currRing);
488
489// if (r->order[0] == ringorder_dp)
490// {
491// long d = 0;
492// for (int i=1; i<=rVar(r); i++)
493// d = d + p_GetExp(p,i,r);
494// return d;
495// }
496// if (r->order[0] == ringorder_wp || r->order[0] == ringorder_a)
497// {
498// long d = 0;
499// for (int i=r->block0[0]; i<=r->block1[0]; i++)
500// d = d + p_GetExp(p,i,r)*r->wvhdl[0][i-1];
501// return d;
502// }
503// if (r->order[0] == ringorder_ws)
504// {
505// long d = 0;
506// for (int i=r->block0[0]; i<=r->block1[0]; i++)
507// d = d - p_GetExp(p,i,r)*r->wvhdl[0][i-1];
508// return d;
509// }
510// }
511
512// static bool isInitialFormMonomial(const poly g, const ring r)
513// {
514// if (g->next==NULL)
515// return true;
516// return wDeg(g,r)!=wDeg(g->next,r);
517// }
518
519// //------------------------------------------------------------------------
520// // routine that checks whether the initial form is a monomial,
521// // breaks computation if it finds one, writing the element into idealCache
522// static BOOLEAN sat_sp_initial(kStrategy strat)
523// {
524// BOOLEAN b = FALSE; // set b to TRUE, if spoly was changed,
525// // let it remain FALSE otherwise
526// if (strat->P.t_p==NULL)
527// {
528// poly p=strat->P.p;
529// if (pNext(p)==NULL)
530// {
531// // if a term is contained in the ideal, abort std computation
532// // and store the output in idealCache to be returned
533// while ((strat->Ll >= 0))
534// deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
535// idealCache = idInit(1);
536// idealCache->m[0] = p_One(currRing);
537// return FALSE;
538// }
539// if (isInitialFormMonomial(p,currRing))
540// {
541// while ((strat->Ll >= 0))
542// deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
543// idealCache = idInit(1);
544// idealCache->m[0] = p_Copy(p,currRing);
545// }
546// int *mm=(int*)omAlloc((1+rVar(currRing))*sizeof(int));
547// int *m0=(int*)omAlloc((1+rVar(currRing))*sizeof(int));
548// p_GetExpV(p,mm,currRing);
549// int m_null=0;
550// while(p!=NULL)
551// {
552// m_null=0;
553// p_GetExpV(p,m0,currRing);
554// for(int i=1;i<=rVar(currRing);i++)
555// {
556// mm[i]=si_min(mm[i],m0[i]);
557// if (mm[i]>0) m_null++;
558// }
559// if (m_null==0) break;
560// pIter(p);
561// }
562// if (m_null>0)
563// {
564// std::cout << "simplifying!" << std::endl;
565// p=p_Copy(strat->P.p,currRing);
566// strat->P.p=p;
567// while(p!=NULL)
568// {
569// for(int i=1;i<=rVar(currRing);i++)
570// p_SubExp(p,i,mm[i],currRing);
571// p_Setm(p,currRing);
572// pIter(p);
573// }
574// b = TRUE;
575// }
576// omFree(mm);
577// omFree(m0);
578// }
579// else
580// {
581// poly p=strat->P.t_p;
582// if (pNext(p)==NULL)
583// {
584// // if a term is contained in the ideal, abort std computation
585// // and store the output in idealCache to be returned
586// while ((strat->Ll >= 0))
587// deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
588// idealCache = idInit(1);
589// idealCache->m[0] = p_One(currRing);
590// return FALSE;
591// }
592// if (isInitialFormMonomial(p,strat->tailRing))
593// {
594// while ((strat->Ll >= 0))
595// deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
596// nMapFunc identity = n_SetMap(strat->tailRing,currRing);
597// idealCache = idInit(1);
598// idealCache->m[0] = p_PermPoly(p,NULL,strat->tailRing,currRing,identity,NULL,0);
599// }
600// int *mm=(int*)omAlloc((1+rVar(currRing))*sizeof(int));
601// int *m0=(int*)omAlloc((1+rVar(currRing))*sizeof(int));
602// p_GetExpV(p,mm,strat->tailRing);
603// int m_null=0;
604// while(p!=NULL)
605// {
606// m_null=0;
607// p_GetExpV(p,m0,strat->tailRing);
608// for(int i=1;i<=rVar(currRing);i++)
609// {
610// mm[i]=si_min(mm[i],m0[i]);
611// if (mm[i]>0) m_null++;
612// }
613// if (m_null==0) break;
614// pIter(p);
615// }
616// if (m_null>0)
617// {
618// std::cout << "simplifying!" << std::endl;
619// p=p_Copy(strat->P.t_p,strat->tailRing);
620// strat->P.t_p=p;
621// strat->P.p=NULL;
622// while(p!=NULL)
623// {
624// for(int i=1;i<=rVar(currRing);i++)
625// p_SubExp(p,i,mm[i],strat->tailRing);
626// p_Setm(p,strat->tailRing);
627// pIter(p);
628// }
629// strat->P.GetP();
630// b = TRUE;
631// }
632// omFree(mm);
633// omFree(m0);
634// }
635// return b; // return TRUE if sp was changed, FALSE if not
636// }
637// static BOOLEAN satstdWithInitialCheck(leftv res, leftv args)
638// {
639// if (args!=NULL)
640// {
641// if ((args->Typ()==IDEAL_CMD) && (args->next==NULL))
642// {
643// ideal I=(ideal)args->Data();
644// idealCache = NULL;
645// I=kStd2(I,currRing->qideal,testHomog,NULL,NULL,0,0,NULL,sat_sp_initial);
646// res->rtyp=IDEAL_CMD;
647// if (idealCache)
648// res->data=(char*)idealCache;
649// else
650// res->data=(char*)I;
651// return FALSE;
652// }
653// }
654// WerrorS("satstdWithInitialCheck: unexpected parameters");
655// return TRUE;
656// }
657
658
659
660//------------------------------------------------------------------------
661// initialisation of the module
662extern "C" int SI_MOD_INIT(customstd)(SModulFunctions* p)
663{
664 // p->iiAddCproc("std_demo","std_with_display",FALSE,std_with_display);
665 p->iiAddCproc("customstd.lib","satstdInternal",FALSE,satstd);
666 // p->iiAddCproc("std_demo","satstdWithInitialCheck",FALSE,satstdWithInitialCheck);
667 p->iiAddCproc("customstd.lib","monomialabortstdInternal",FALSE,monomialabortstd);
668 // PrintS("init of std_demo - type `listvar(Std_demo);` to its contents\n");
669 p->iiAddCproc("customstd.lib","std_print_spoly",FALSE,std_print_spoly);
670 p->iiAddCproc("customstd.lib","syz_print_spoly",FALSE,std_print_spoly);
671
672 return (MAX_TOK);
673}
void atSet(idhdl root, char *name, void *data, int typ)
Definition attrib.cc:153
void * atGet(idhdl root, const char *name, int t, void *defaultReturnValue)
Definition attrib.cc:132
#define BITSET
Definition auxiliary.h:85
static int si_max(const int a, const int b)
Definition auxiliary.h:125
int BOOLEAN
Definition auxiliary.h:88
#define TRUE
Definition auxiliary.h:101
#define FALSE
Definition auxiliary.h:97
int i
Definition cfEzgcd.cc:132
int k
Definition cfEzgcd.cc:99
int p
Definition cfModGcd.cc:4086
CanonicalForm b
Definition cfModGcd.cc:4111
FILE * f
Definition checklibs.c:9
Matrices of numbers.
Definition bigintmat.h:51
int syzComp
Definition kutil.h:355
ring tailRing
Definition kutil.h:344
int Ll
Definition kutil.h:352
LObject P
Definition kutil.h:303
LSet L
Definition kutil.h:328
int Typ()
Definition subexpr.cc:1048
void * Data()
Definition subexpr.cc:1192
leftv next
Definition subexpr.h:86
void CleanUp(ring r=currRing)
Definition subexpr.cc:351
int SI_MOD_INIT customstd(SModulFunctions *p)
Definition customstd.cc:662
static BOOLEAN satstd(leftv res, leftv args)
Definition customstd.cc:40
static BOOLEAN abort_if_monomial_sp(kStrategy strat)
Definition customstd.cc:92
STATIC_VAR char * si_filename
Definition customstd.cc:119
static BOOLEAN std_print_spoly(leftv res, leftv args)
Definition customstd.cc:170
static BOOLEAN monomialabortstd(leftv res, leftv args)
Definition customstd.cc:464
static BOOLEAN print_spoly(kStrategy strat)
Definition customstd.cc:120
#define Warn
Definition emacs.cc:77
return result
const CanonicalForm int s
Definition facAbsFact.cc:51
CanonicalForm res
Definition facAbsFact.cc:60
const CanonicalForm & w
Definition facAbsFact.cc:51
const Variable & v
< [in] a sqrfree bivariate poly
Definition facBivar.h:39
int j
Definition facHensel.cc:110
void WerrorS(const char *s)
Definition feFopen.cc:24
#define STATIC_VAR
Definition globaldefs.h:7
@ IDEAL_CMD
Definition grammar.cc:285
@ MODUL_CMD
Definition grammar.cc:288
BOOLEAN idTestHomModule(ideal m, ideal Q, intvec *w)
Definition ideals.cc:2091
void ipPrint_MA0(matrix m, const char *name)
Definition ipprint.cc:57
ideal id_Satstd(const ideal I, ideal J, const ring r)
Definition ideals.cc:3334
#define idDelete(H)
delete an ideal
Definition ideals.h:29
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
static BOOLEAN idHomModule(ideal m, ideal Q, intvec **w)
Definition ideals.h:96
#define idTest(id)
Definition ideals.h:47
static BOOLEAN idHomIdeal(ideal id, ideal Q=NULL)
Definition ideals.h:91
ideal idCopy(ideal A)
Definition ideals.h:60
ideal idFreeModule(int i)
Definition ideals.h:111
intvec * ivCopy(const intvec *o)
Definition intvec.h:146
#define setFlag(A, F)
Definition ipid.h:113
#define FLAG_STD
Definition ipid.h:106
STATIC_VAR Poly * h
Definition janet.cc:971
ideal kStd2(ideal F, ideal Q, tHomog h, intvec **w, bigintmat *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
generic interface to GB/SB computations, large hilbert vectors
Definition kstd1.cc:2602
void deleteInL(LSet set, int *length, int j, kStrategy strat)
Definition kutil.cc:1215
ip_smatrix * matrix
Definition matpol.h:43
#define assume(x)
Definition mod2.h:389
#define p_GetComp(p, r)
Definition monomials.h:64
#define pIter(p)
Definition monomials.h:37
#define pNext(p)
Definition monomials.h:36
#define omStrDup(s)
#define free
Definition omAllocFunc.c:14
#define malloc
Definition omAllocFunc.c:12
#define NULL
Definition omList.c:12
VAR unsigned si_opt_1
Definition options.c:5
#define OPT_REDTAIL_SYZ
Definition options.h:88
#define SI_SAVE_OPT1(A)
Definition options.h:21
#define SI_RESTORE_OPT1(A)
Definition options.h:24
#define Sy_bit(x)
Definition options.h:31
void p_Shift(poly *p, int i, const ring r)
shifts components of the vector p by i
Definition p_polys.cc:4815
void p_SetModDeg(intvec *w, ring r)
Definition p_polys.cc:3753
long p_Deg(poly a, const ring r)
Definition p_polys.cc:586
char * p_String(poly p, ring lmRing, ring tailRing)
Definition polys0.cc:322
static long p_MinComp(poly p, ring lmRing, ring tailRing)
Definition p_polys.h:315
static void p_Delete(poly *p, const ring r)
Definition p_polys.h:903
void rChangeCurrRing(ring r)
Definition polys.cc:16
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition polys.cc:13
#define pTest(p)
Definition polys.h:415
#define pGetComp(p)
Component.
Definition polys.h:38
#define pSetComp(p, v)
Definition polys.h:39
#define pSetmComp(p)
TODO:
Definition polys.h:274
char * pString(poly p)
Definition polys.h:307
#define pOne()
Definition polys.h:316
ideal idrMoveR_NoSort(ideal &id, ring src_r, ring dest_r)
Definition prCopy.cc:261
ideal idrCopyR_NoSort(ideal id, ring src_r, ring dest_r)
Definition prCopy.cc:205
void PrintS(const char *s)
Definition reporter.cc:284
void PrintLn()
Definition reporter.cc:310
ring rAssure_SyzComp(const ring r, BOOLEAN complete)
Definition ring.cc:4527
void rDelete(ring r)
unconditionally deletes fields in r
Definition ring.cc:454
void rSetSyzComp(int k, const ring r)
Definition ring.cc:5230
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition ring.h:406
ideal idInit(int idsize, int rank)
initialise an ideal / module
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
matrix id_Module2Matrix(ideal mod, const ring R)
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
ideal id_MaxIdeal(const ring r)
initialise the maximal ideal (at 0)
void id_DelMultiples(ideal id, const ring r)
ideal id = (id[i]), c any unit if id[i] = c*id[j] then id[j] is deleted for j > i
ideal id_SimpleAdd(ideal h1, ideal h2, const ring R)
concat the lists h1 and h2 without zeros
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
void id_Shift(ideal M, int s, const ring r)
#define IDELEMS(i)
sleftv * leftv
Definition structs.h:53
tHomog
Definition structs.h:31
@ isHomog
Definition structs.h:33
@ testHomog
Definition structs.h:34
skStrategy * kStrategy
Definition structs.h:54
@ INTVEC_CMD
Definition tok.h:101
@ STRING_CMD
Definition tok.h:187
@ MAX_TOK
Definition tok.h:220