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=kStd(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 }
69
70#if 0 /* unused */
71 if (idealCache)
72 {
74 res->data = (char*) idealCache;
76 }
77 else
78#endif
79 {
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
142{
143 char *s=NULL;
144 if (strat->P.t_p==NULL)
145 {
146 if (pGetComp(strat->P.p)>=strat->syzComp)
147 s=pString(strat->P.p);
148 }
149 else
150 {
151 if (p_GetComp(strat->P.t_p,strat->tailRing)>=strat->syzComp)
152 s=p_String(strat->P.t_p,strat->tailRing);
153 }
154 if (s!=NULL)
155 {
156 size_t len=strlen(si_filename)+12;
157 char *fn=(char*)malloc(len);
158 snprintf(fn,len, "%s.%d",si_filename,si_filenr);
159 si_filenr++;
160 FILE *f=fopen(fn,"w");
161 fwrite(s,strlen(s),1,f);
162 fwrite("\n",1,1,f);
163 fclose(f);
164 free(fn);
165 }
166 return FALSE; // return TRUE if sp was changed, FALSE if not
167}
168
170{
171 if (args!=NULL)
172 {
173 if ((args->Typ()==IDEAL_CMD) && (args->next!=NULL)
174 && (args->next->Typ()==STRING_CMD))
175 {
176 si_filename=(char*)args->next->Data();
177 ideal I=(ideal)args->Data();
180 res->rtyp=IDEAL_CMD;
181 res->data=(char*)I;
182 return FALSE;
183 }
184 }
185 WerrorS("std_print_spoly: unexpected parameters");
186 return TRUE;
187}
188
190{
191 ideal temp1;
192 if (w==NULL)
193 {
194 if (hom==testHomog)
195 hom=(tHomog)idHomModule(temp,currRing->qideal,&w); //sets w to weight vector or NULL
196 }
197 else
198 {
199 w=ivCopy(w);
200 hom=isHomog;
201 }
202 temp1 = kStd(temp,currRing->qideal,hom,&w,NULL,syzComp,0,NULL,print_syz);
203 idDelete(&temp);
204 if (w!=NULL) delete w;
205 return temp1;
206}
207
209{
210 ideal h2,h22;
211 int j,k;
212 poly p,q;
213
214 assume(!idIs0(h1));
216 if (h11!=NULL)
217 {
219 h22=idCopy(h11);
220 }
221 h2=idCopy(h1);
222 int i = IDELEMS(h2);
223 if (h11!=NULL) i+=IDELEMS(h22);
224 if (k == 0)
225 {
227 if (h11!=NULL) id_Shift(h22,1,currRing);
228 k = 1;
229 }
230 if (syzcomp<k)
231 {
232 Warn("syzcomp too low, should be %d instead of %d",k,syzcomp);
233 syzcomp = k;
235 }
236 h2->rank = syzcomp+i;
237
238 for (j=0; j<IDELEMS(h2); j++)
239 {
240 p = h2->m[j];
241 q = pOne();
242 pSetComp(q,syzcomp+1+j);
243 pSetmComp(q);
244 if (p!=NULL)
245 {
246 {
247 while (pNext(p)) pIter(p);
248 p->next = q;
249 }
250 }
251 else
252 h2->m[j]=q;
253 }
254 if (h11!=NULL)
255 {
259 h2=h;
260 }
261
262 idTest(h2);
263 #if 0
265 PrintS(" --------------before std------------------------\n");
266 ipPrint_MA0(TT,"T");
267 PrintLn();
268 idDelete((ideal*)&TT);
269 #endif
270
271 ideal h3;
272 if (w!=NULL) h3=idGroebner_print(h2,syzcomp,*w,hom);
273 else h3=idGroebner_print(h2,syzcomp,NULL,hom);
274 return h3;
275}
276
277#if 0
279{
280 ideal s_h1;
281 int j, k;
283 int ii, idElemens_h1;
284
285 assume(h1 != NULL);
286
288#ifdef PDEBUG
289 for(ii=0;ii<idElemens_h1 /*IDELEMS(h1)*/;ii++) pTest(h1->m[ii]);
290#endif
291 if (idIs0(h1))
292 {
293 ideal result=idFreeModule(idElemens_h1/*IDELEMS(h1)*/);
294 return result;
295 }
297 k=si_max(1,slength /*id_RankFreeModule(h1)*/);
298
299 assume(currRing != NULL);
303
304 if (orig_ring != syz_ring)
305 {
308 }
309 else
310 {
311 s_h1 = h1;
312 }
313
314 idTest(s_h1);
315
319
320 ideal s_h3=idPrepare_print(s_h1,NULL,h,k,w); // main (syz) GB computation
321
323
324 if (orig_ring != syz_ring)
325 {
326 idDelete(&s_h1);
327 for (j=0; j<IDELEMS(s_h3); j++)
328 {
329 if (s_h3->m[j] != NULL)
330 {
331 if (p_MinComp(s_h3->m[j],syz_ring) > k)
332 p_Shift(&s_h3->m[j], -k,syz_ring);
333 else
334 p_Delete(&s_h3->m[j],syz_ring);
335 }
336 }
338 s_h3->rank -= k;
342 #ifdef HAVE_PLURAL
344 {
347 }
348 #endif
349 idTest(s_h3);
350 return s_h3;
351 }
352
353 ideal e = idInit(IDELEMS(s_h3), s_h3->rank);
354
355 for (j=IDELEMS(s_h3)-1; j>=0; j--)
356 {
357 if (s_h3->m[j] != NULL)
358 {
359 if (p_MinComp(s_h3->m[j],syz_ring) <= k)
360 {
361 e->m[j] = s_h3->m[j];
364 s_h3->m[j] = NULL;
365 }
366 }
367 }
368
370
371 idDelete(&e);
373 idTest(s_h3);
374 if (currRing->qideal != NULL)
375 {
376 ideal ts_h3=kStd(s_h3,currRing->qideal,h,w);
377 idDelete(&s_h3);
378 s_h3 = ts_h3;
379 }
380 return s_h3;
381}
382#endif
383
384#if 0
386{
387 if (args!=NULL)
388 {
389 if (((args->Typ()==IDEAL_CMD)||(args->Typ()==MODUL_CMD)) && (args->next!=NULL)
390 && (args->next->Typ()==STRING_CMD))
391 {
392 si_filename=(char*)args->next->Data();
393 si_filenr=0;
394 ideal v_id=(ideal)args->Data();
395 intvec *ww=(intvec *)atGet(args,"isHomog",INTVEC_CMD);
396 intvec *w=NULL;
398 if (ww!=NULL)
399 {
400 if (idTestHomModule(v_id,currRing->qideal,ww))
401 {
402 w=ivCopy(ww);
403 int add_row_shift=w->min_in();
404 (*w)-=add_row_shift;
405 hom=isHomog;
406 }
407 else
408 {
409 //WarnS("wrong weights");
410 delete ww; ww=NULL;
412 }
413 }
414 else
415 {
416 if (args->Typ()==IDEAL_CMD)
417 if (idHomIdeal(v_id,currRing->qideal))
418 hom=isHomog;
419 }
421 res->data = (char *)S;
422 res->rtyp=args->Typ();
423 if (hom==isHomog)
424 {
425 int vl=S->rank;
426 intvec *vv=new intvec(vl);
427 if ((args->Typ()==IDEAL_CMD)||(ww==NULL))
428 {
429 for(int i=0;i<vl;i++)
430 {
431 if (v_id->m[i]!=NULL)
432 (*vv)[i]=p_Deg(v_id->m[i],currRing);
433 }
434 }
435 else
436 {
438 for(int i=0;i<vl;i++)
439 {
440 if (v_id->m[i]!=NULL)
441 (*vv)[i]=currRing->pFDeg(v_id->m[i],currRing);
442 }
444 }
445 if (idTestHomModule(S,currRing->qideal,vv))
446 atSet(res,omStrDup("isHomog"),vv,INTVEC_CMD);
447 else
448 delete vv;
449 }
450 if (w!=NULL) delete w;
451 return FALSE;
452 }
453 }
454 WerrorS("syz_print_spoly: unexpected parameters");
455 return TRUE;
456}
457#endif
458
460{
461 if (args!=NULL)
462 {
463 if ((args->Typ()==IDEAL_CMD) && (args->next==NULL))
464 {
465 ideal I=(ideal)args->Data();
468 res->rtyp=IDEAL_CMD;
469 res->data=(char*)I;
470 return FALSE;
471 }
472 }
473 WerrorS("monomialabortstd: unexpected parameters");
474 return TRUE;
475}
476
477// static long wDeg(const poly p, const ring r)
478// {
479// if (r->order[0] == ringorder_lp)
480// return p_GetExp(p,1,currRing);
481// if (r->order[0] == ringorder_ls)
482// return -p_GetExp(p,1,currRing);
483
484// if (r->order[0] == ringorder_dp)
485// {
486// long d = 0;
487// for (int i=1; i<=rVar(r); i++)
488// d = d + p_GetExp(p,i,r);
489// return d;
490// }
491// if (r->order[0] == ringorder_wp || r->order[0] == ringorder_a)
492// {
493// long d = 0;
494// for (int i=r->block0[0]; i<=r->block1[0]; i++)
495// d = d + p_GetExp(p,i,r)*r->wvhdl[0][i-1];
496// return d;
497// }
498// if (r->order[0] == ringorder_ws)
499// {
500// long d = 0;
501// for (int i=r->block0[0]; i<=r->block1[0]; i++)
502// d = d - p_GetExp(p,i,r)*r->wvhdl[0][i-1];
503// return d;
504// }
505// }
506
507// static bool isInitialFormMonomial(const poly g, const ring r)
508// {
509// if (g->next==NULL)
510// return true;
511// return wDeg(g,r)!=wDeg(g->next,r);
512// }
513
514// //------------------------------------------------------------------------
515// // routine that checks whether the initial form is a monomial,
516// // breaks computation if it finds one, writing the element into idealCache
517// static BOOLEAN sat_sp_initial(kStrategy strat)
518// {
519// BOOLEAN b = FALSE; // set b to TRUE, if spoly was changed,
520// // let it remain FALSE otherwise
521// if (strat->P.t_p==NULL)
522// {
523// poly p=strat->P.p;
524// if (pNext(p)==NULL)
525// {
526// // if a term is contained in the ideal, abort std computation
527// // and store the output in idealCache to be returned
528// while ((strat->Ll >= 0))
529// deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
530// idealCache = idInit(1);
531// idealCache->m[0] = p_One(currRing);
532// return FALSE;
533// }
534// if (isInitialFormMonomial(p,currRing))
535// {
536// while ((strat->Ll >= 0))
537// deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
538// idealCache = idInit(1);
539// idealCache->m[0] = p_Copy(p,currRing);
540// }
541// int *mm=(int*)omAlloc((1+rVar(currRing))*sizeof(int));
542// int *m0=(int*)omAlloc((1+rVar(currRing))*sizeof(int));
543// p_GetExpV(p,mm,currRing);
544// int m_null=0;
545// while(p!=NULL)
546// {
547// m_null=0;
548// p_GetExpV(p,m0,currRing);
549// for(int i=1;i<=rVar(currRing);i++)
550// {
551// mm[i]=si_min(mm[i],m0[i]);
552// if (mm[i]>0) m_null++;
553// }
554// if (m_null==0) break;
555// pIter(p);
556// }
557// if (m_null>0)
558// {
559// std::cout << "simplifying!" << std::endl;
560// p=p_Copy(strat->P.p,currRing);
561// strat->P.p=p;
562// while(p!=NULL)
563// {
564// for(int i=1;i<=rVar(currRing);i++)
565// p_SubExp(p,i,mm[i],currRing);
566// p_Setm(p,currRing);
567// pIter(p);
568// }
569// b = TRUE;
570// }
571// omFree(mm);
572// omFree(m0);
573// }
574// else
575// {
576// poly p=strat->P.t_p;
577// if (pNext(p)==NULL)
578// {
579// // if a term is contained in the ideal, abort std computation
580// // and store the output in idealCache to be returned
581// while ((strat->Ll >= 0))
582// deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
583// idealCache = idInit(1);
584// idealCache->m[0] = p_One(currRing);
585// return FALSE;
586// }
587// if (isInitialFormMonomial(p,strat->tailRing))
588// {
589// while ((strat->Ll >= 0))
590// deleteInL(strat->L,&strat->Ll,strat->Ll,strat);
591// nMapFunc identity = n_SetMap(strat->tailRing,currRing);
592// idealCache = idInit(1);
593// idealCache->m[0] = p_PermPoly(p,NULL,strat->tailRing,currRing,identity,NULL,0);
594// }
595// int *mm=(int*)omAlloc((1+rVar(currRing))*sizeof(int));
596// int *m0=(int*)omAlloc((1+rVar(currRing))*sizeof(int));
597// p_GetExpV(p,mm,strat->tailRing);
598// int m_null=0;
599// while(p!=NULL)
600// {
601// m_null=0;
602// p_GetExpV(p,m0,strat->tailRing);
603// for(int i=1;i<=rVar(currRing);i++)
604// {
605// mm[i]=si_min(mm[i],m0[i]);
606// if (mm[i]>0) m_null++;
607// }
608// if (m_null==0) break;
609// pIter(p);
610// }
611// if (m_null>0)
612// {
613// std::cout << "simplifying!" << std::endl;
614// p=p_Copy(strat->P.t_p,strat->tailRing);
615// strat->P.t_p=p;
616// strat->P.p=NULL;
617// while(p!=NULL)
618// {
619// for(int i=1;i<=rVar(currRing);i++)
620// p_SubExp(p,i,mm[i],strat->tailRing);
621// p_Setm(p,strat->tailRing);
622// pIter(p);
623// }
624// strat->P.GetP();
625// b = TRUE;
626// }
627// omFree(mm);
628// omFree(m0);
629// }
630// return b; // return TRUE if sp was changed, FALSE if not
631// }
632// static BOOLEAN satstdWithInitialCheck(leftv res, leftv args)
633// {
634// if (args!=NULL)
635// {
636// if ((args->Typ()==IDEAL_CMD) && (args->next==NULL))
637// {
638// ideal I=(ideal)args->Data();
639// idealCache = NULL;
640// I=kStd(I,currRing->qideal,testHomog,NULL,NULL,0,0,NULL,sat_sp_initial);
641// res->rtyp=IDEAL_CMD;
642// if (idealCache)
643// res->data=(char*)idealCache;
644// else
645// res->data=(char*)I;
646// return FALSE;
647// }
648// }
649// WerrorS("satstdWithInitialCheck: unexpected parameters");
650// return TRUE;
651// }
652
653
654
655//------------------------------------------------------------------------
656// initialisation of the module
658{
659 // p->iiAddCproc("std_demo","std_with_display",FALSE,std_with_display);
660 p->iiAddCproc("customstd.lib","satstd",FALSE,satstd);
661 // p->iiAddCproc("std_demo","satstdWithInitialCheck",FALSE,satstdWithInitialCheck);
662 p->iiAddCproc("customstd.lib","monomialabortstd",FALSE,monomialabortstd);
663 // PrintS("init of std_demo - type `listvar(Std_demo);` to its contents\n");
664 p->iiAddCproc("customstd.lib","std_print_spoly",FALSE,std_print_spoly);
665 p->iiAddCproc("customstd.lib","syz_print_spoly",FALSE,std_print_spoly);
666
667 return (MAX_TOK);
668}
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
static int si_max(const int a, const int b)
Definition auxiliary.h:124
int BOOLEAN
Definition auxiliary.h:87
#define TRUE
Definition auxiliary.h:100
#define FALSE
Definition auxiliary.h:96
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
int syzComp
Definition kutil.h:354
ring tailRing
Definition kutil.h:343
int Ll
Definition kutil.h:351
LObject P
Definition kutil.h:302
LSet L
Definition kutil.h:327
Class used for (list of) interpreter objects.
Definition subexpr.h:83
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
static BOOLEAN satstd(leftv res, leftv args)
Definition customstd.cc:40
static BOOLEAN abort_if_monomial_sp(kStrategy strat)
Definition customstd.cc:92
static BOOLEAN print_syz(kStrategy strat)
Definition customstd.cc:141
int SI_MOD_INIT() customstd(SModulFunctions *p)
Definition customstd.cc:657
STATIC_VAR char * si_filename
Definition customstd.cc:119
static BOOLEAN std_print_spoly(leftv res, leftv args)
Definition customstd.cc:169
static BOOLEAN monomialabortstd(leftv res, leftv args)
Definition customstd.cc:459
STATIC_VAR int si_filenr
Definition customstd.cc:140
static ideal idGroebner_print(ideal temp, int syzComp, intvec *w=NULL, tHomog hom=testHomog)
Definition customstd.cc:189
static BOOLEAN print_spoly(kStrategy strat)
Definition customstd.cc:120
static ideal idPrepare_print(ideal h1, ideal h11, tHomog hom, int syzcomp, intvec **w)
Definition customstd.cc:208
#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:2077
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:3324
#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:145
#define setFlag(A, F)
Definition ipid.h:113
#define FLAG_STD
Definition ipid.h:106
STATIC_VAR Poly * h
Definition janet.cc:971
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:2471
void deleteInL(LSet set, int *length, int j, kStrategy strat)
Definition kutil.cc:1213
#define assume(x)
Definition mod2.h:387
#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:87
#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:4755
void p_SetModDeg(intvec *w, ring r)
Definition p_polys.cc:3694
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:313
static void p_Delete(poly *p, const ring r)
Definition p_polys.h:901
void rChangeCurrRing(ring r)
Definition polys.cc:15
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:414
#define pGetComp(p)
Component.
Definition polys.h:37
#define pSetComp(p, v)
Definition polys.h:38
#define pSetmComp(p)
TODO:
Definition polys.h:273
char * pString(poly p)
Definition polys.h:306
#define pOne()
Definition polys.h:315
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:4467
void rDelete(ring r)
unconditionally deletes fields in r
Definition ring.cc:452
void rSetSyzComp(int k, const ring r)
Definition ring.cc:5170
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
Definition ring.h:405
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)
tHomog
Definition structs.h:35
@ isHomog
Definition structs.h:37
@ testHomog
Definition structs.h:38
#define BITSET
Definition structs.h:16
@ INTVEC_CMD
Definition tok.h:101
@ STRING_CMD
Definition tok.h:187
@ MAX_TOK
Definition tok.h:220