 |
My Project
debian-1:4.1.1-p2+ds-4build1
|
Go to the documentation of this file.
15 #include "factory/factory.h"
99 #define ZERODIVISOR_MASK 8
102 #define ZERODIVISOR_MASK 0
104 #define ALLOW_PLURAL 1
106 #define COMM_PLURAL 2
109 #define NO_ZERODIVISOR 8
110 #define ALLOW_ZERODIVISOR 0
112 #define ALLOW_ZZ (ALLOW_RING|NO_ZERODIVISOR)
118 #define NO_CONVERSION 32
205 extern int iiArithAddCmd(
const char *szName,
short nAlias,
short nTokval,
206 short nToktype,
short nPos=-1);
216 #define ii_div_by_0 "div. by 0"
225 if ((
long)
i==
l)
return l;
250 int bb = (int)(
long)(
v->Data());
255 case '+': cc=
bimAdd(aa,bb);
break;
256 case '-': cc=
bimSub(aa,bb);
break;
257 case '*': cc=
bimMult(aa,bb);
break;
259 res->data=(
char *)cc;
269 number bb = (number)(
v->Data());
276 res->data=(
char *)cc;
286 int bb = (int)(
long)(
v->Data());
290 case '+': (*aa) += bb;
break;
291 case '-': (*aa) -= bb;
break;
292 case '*': (*aa) *= bb;
break;
295 case '%': (*aa) %= bb;
break;
297 res->data=(
char *)aa;
307 int bb = (int)(
long)(
v->Data());
316 res->data=(
char *)aa;
325 int l=(int)(
long)
v->Data();
328 int d=(int)(
long)u->
Data();
331 for(
i=
l-1;
i>=0;
i--) { (*vv)[
i]=d; }
332 res->data=(
char *)vv;
338 res->data=(
char *)
new intvec((
int)(long)u->
Data(),(int)(
long)
v->Data());
350 res->data = (
char *) (r<0);
353 res->data = (
char *) (r>0);
356 res->data = (
char *) (r<=0);
359 res->data = (
char *) (r>=0);
363 res->data = (
char *) (r==0);
367 if(r==-2) {
WerrorS(
"size incompatible");
return TRUE; }
378 res->data = (
char *) (r<0);
381 res->data = (
char *) (r>0);
384 res->data = (
char *) (r<=0);
387 res->data = (
char *) (r>=0);
391 res->data = (
char *) (r==0);
395 if(r==-2) {
WerrorS(
"size incompatible");
return TRUE; }
401 int b = (int)(
long)(
v->Data());
406 res->data = (
char *) (r<0);
409 res->data = (
char *) (r>0);
412 res->data = (
char *) (r<=0);
415 res->data = (
char *) (r>=0);
419 res->data = (
char *) (r==0);
434 res->data = (
char *) (
long)(r < 0);
437 res->data = (
char *) (
long)(r > 0);
440 res->data = (
char *) (
long)(r <= 0);
443 res->data = (
char *) (
long)(r >= 0);
447 res->data = (
char *)(
long) (r == 0);
455 poly
p=(poly)u->
Data();
456 poly q=(poly)
v->Data();
461 res->data = (
char *) (r < 0);
464 res->data = (
char *) (r > 0);
467 res->data = (
char *) (r <= 0);
470 res->data = (
char *) (r >= 0);
482 char* a = (
char * )(u->
Data());
483 char*
b = (
char * )(
v->Data());
515 else if (
v->Next()!=
NULL)
525 int b=(int)(
long)u->
Data();
526 int e=(int)(
long)
v->Data();
535 else if ((e==0)||(
b==1))
553 if(rc/
b!=oldrc) overflow=
TRUE;
557 WarnS(
"int overflow(^), result may be wrong");
559 res->data = (
char *)((
long)rc);
565 WerrorS(
"exponent must be non-negative");
571 int e=(int)(
long)
v->Data();
572 number n=(number)u->
Data();
579 WerrorS(
"exponent must be non-negative");
587 int e=(int)(
long)
v->Data();
588 number n=(number)u->
Data();
605 int v_i=(int)(
long)
v->Data();
608 WerrorS(
"exponent must be non-negative");
616 Werror(
"OVERFLOW in power(d=%ld, e=%d, max=%ld)",
659 res->data =
v->CopyD();
660 res->rtyp =
v->Typ();
700 if(isupper(u->
name[0]))
702 const char *c=u->
name+1;
703 while((*c!=
'\0')&&(islower(*c)||(isdigit(*c))||(*c==
'_'))) c++;
708 Print(
"%s of type 'ANY'. Trying load.\n", u->
name);
724 package pa=(package)u->Data();
738 WerrorS(
"reserved name with ::");
750 WerrorS(
"<package>::<id> expected");
757 unsigned int a=(
unsigned int)(
unsigned long)u->
Data();
758 unsigned int b=(
unsigned int)(
unsigned long)
v->Data();
760 res->data = (
char *)((
long)c);
763 WarnS(
"int overflow(+), result may be wrong");
774 res->data = (
char *)(
nAdd((number)u->
Data(), (number)
v->Data()));
787 WerrorS(
"intmat size not compatible");
797 WerrorS(
"bigintmat/cmatrix not compatible");
808 Werror(
"matrix size not compatible(%dx%d, %dx%d)",
831 char* a = (
char * )(u->
Data());
832 char*
b = (
char * )(
v->Data());
833 char* r = (
char * )
omAlloc(strlen(a) + strlen(
b) + 1);
841 res->data = (
char *)
idAdd((ideal)u->
Data(),(ideal)
v->Data());
846 void *
ap=u->
Data();
void *bp=
v->Data();
847 int aa=(int)(
long)
ap;
848 int bb=(int)(
long)bp;
850 unsigned int a=(
unsigned int)(
unsigned long)
ap;
851 unsigned int b=(
unsigned int)(
unsigned long)bp;
855 WarnS(
"int overflow(-), result may be wrong");
857 res->data = (
char *)((
long)cc);
867 res->data = (
char *)(
nSub((number)u->
Data(), (number)
v->Data()));
880 WerrorS(
"intmat size not compatible");
890 WerrorS(
"bigintmat/cmatrix not compatible");
901 Werror(
"matrix size not compatible(%dx%d, %dx%d)",
910 int a=(int)(
long)u->
Data();
911 int b=(int)(
long)
v->Data();
913 if ((c>INT_MAX)||(c<INT_MIN))
914 WarnS(
"int overflow(*), result may be wrong");
915 res->data = (
char *)((
long)((int)c));
929 res->data = (
char *)(
nMult( (number)u->
Data(), (number)
v->Data()));
930 number n=(number)
res->data;
950 Warn(
"possible OVERFLOW in mult(d=%ld, d=%ld, max=%ld)",
962 Warn(
"possible OVERFLOW in mult(d=%ld, d=%ld, max=%ld)",
997 WerrorS(
"intmat size not compatible");
1009 WerrorS(
"bigintmat/cmatrix not compatible");
1023 res->data = (
char *)I;
1037 res->data = (
char *)I;
1047 res->data = (
char *)I;
1078 Werror(
"matrix size not compatible(%dx%d, %dx%d) in *",
1096 res->data = (
char *)(
long)((int)((
long)u->
Data()) >= (
int)((long)
v->Data()));
1114 res->data = (
char *)(
long)((int)((
long)u->
Data()) > (
int)((long)
v->Data()));
1128 res->data = (
char *)(
long)((int)((
long)u->
Data()) <= (
int)((long)
v->Data()));
1141 res->data = (
char *)(
long)((int)((
long)u->
Data()) < (
int)((long)
v->Data()));
1151 int a= (int)(
long)u->
Data();
1152 int b= (int)(
long)
v->Data();
1166 r=((a-c) /
b);
break;
1168 res->data=(
void *)((
long)r);
1173 number q=(number)
v->Data();
1181 res->data = (
char *)q;
1186 number q=(number)
v->Data();
1194 res->data = (
char *)q;
1199 poly q=(poly)
v->CopyD();
1200 poly
p=(poly)(u->
CopyD());
1208 poly q=(poly)
v->Data();
1233 res->data=(
char *)mm;
1244 res->data = (
char *)((
int)((long)u->
Data()) == (
int)((long)
v->Data()));
1256 res->data = (
char *)(
long)(u->
Data()==
v->Data());
1262 res->data = (
char *)((
long)
nEqual((number)u->
Data(),(number)
v->Data()));
1268 poly
p=(poly)u->
Data();
1269 poly q=(poly)
v->Data();
1289 res->data = (
char *)((
long)u->
Data() && (long)
v->Data());
1294 res->data = (
char *)((
long)u->
Data() || (long)
v->Data());
1307 while (sh->next !=
NULL) sh=sh->next;
1323 WerrorS(
"indexed object must have a name");
1330 memset(&t,0,
sizeof(t));
1334 t.
data=(
char *)((
long)(*iv)[
i]);
1357 poly
p=(poly)u->
Data();
1358 int i=(int)(
long)
v->Data();
1374 poly
p=(poly)u->
Data();
1382 while ((
p!=
NULL) && (sum>0))
1398 res->data=(
char *)r;
1406 int i=(int)(
long)
v->Data();
1428 res->data=(
char *)r;
1462 res->data=(
char *)r;
1470 char * nn = (
char *)
omAlloc(strlen(u->
name) + 14);
1471 sprintf(nn,
"%s(%d)",u->
name,(
int)(
long)
v->Data());
1485 long slen = strlen(u->
name) + 14;
1486 char *n = (
char*)
omAlloc(slen);
1499 sprintf(n,
"%s(%d)",u->
name,(*iv)[
i]);
1511 memset(tmp,0,
sizeof(
sleftv));
1523 while (
h->next!=
NULL)
h=
h->next;
1537 tmp_proc->
id=
"_auto";
1541 d=u->
data; u->
data=(
void *)tmp_proc;
1558 if (sl)
return TRUE;
1595 number *
x=(number *)
omAlloc(rl*
sizeof(number));
1596 number *q=(number *)
omAlloc(rl*
sizeof(number));
1598 for(
i=rl-1;
i>=0;
i--)
1605 for(
i=rl-1;
i>=0;
i--)
1611 res->data=(
char *)n;
1621 number *
x=(number *)
omAlloc(rl*
sizeof(number));
1622 number *q=(number *)
omAlloc(rl*
sizeof(number));
1624 for(
i=rl-1;
i>=0;
i--)
1630 for(
i=rl-1;
i>=0;
i--)
1634 Werror(
"poly expected at pos %d",
i+1);
1635 for(
i=rl-1;
i>=0;
i--)
1647 for(
i=rl-1;
i>=0;
i--)
1659 number n=n_ChineseRemainder(
x,q,rl,
currRing->cf);
1660 for(
i=rl-1;
i>=0;
i--)
1668 for(
i=rl-1;
i>=0;
i--)
1680 int s=(int)(
long)
v->Data();
1689 ideal
M=(ideal)u->
CopyD();
1690 int s=(int)(
long)
v->Data();
1703 poly
p=(poly)
v->Data();
1710 int i=
pVar((poly)
v->Data());
1729 (ideal)(
v->Data()),
p);
1741 ideal I=(ideal)u->
Data();
1746 res->data = (
char *)((
long)d);
1751 poly
p=(poly)u->
Data();
1757 res->data = (
char *)(d);
1760 res->data=(
char *)(
long)(-1);
1765 int pos=(int)(
long)
v->Data();
1772 int pos=(int)(
long)
v->Data();
1773 ideal I=(ideal)u->
Data();
1779 int i=
pVar((poly)
v->Data());
1790 int i=
pVar((poly)
v->Data());
1809 Warn(
"dim(%s,...) may be wrong because the mixed monomial ordering",
v->Name());
1814 ideal vid = (ideal)
v->Data();
1818 res->data = (
char *)-1;
1827 res->data = (
char *)d;
1833 res->data = (
char *)((
long)
scDimInt((ideal)(
v->Data()),(ideal)
w->Data()));
1837 res->data = (
char *)((
long)
scDimInt((ideal)(
v->Data()),q));
1844 ideal vi=(ideal)
v->Data();
1846 ideal ui=(ideal)u->
Data();
1880 res->data=(
char *)L;
1917 number uu=(number)u->
Data();number vv=(number)
v->Data();
1926 res->data=(
char *)L;
1931 int uu=(int)(
long)u->
Data();
int vv=(int)(
long)
v->Data();
1932 int p0=
ABS(uu),p1=
ABS(vv);
1933 int f0 = 1, f1 = 0, g0 = 0, g1 = 1, q, r;
1955 res->data=(
char *)L;
1962 if (ret)
return TRUE;
1965 res->data=(
char *)L;
1966 L->
m[0].
data=(
void *)r;
1968 L->
m[1].
data=(
void *)pa;
1970 L->
m[2].
data=(
void *)pb;
1978 int sw=(int)(
long)dummy->
Data();
1980 if ((sw<0)||(sw>2)) fac_sw=1;
1993 l->m[0].data=(
void *)
f;
1995 l->m[1].data=(
void *)
v;
1996 res->data=(
void *)
l;
2001 res->data=(
void *)
f;
2014 res->data=(
void *)
p;
2041 res->data=(
void *)L;
2048 number uu=(number)u->
Data();
2049 number vv=(number)
v->Data();
2057 ideal uu=(ideal)u->
Data();
2058 number vv=(number)
v->Data();
2072 ring r=(ring)u->
Data();
2081 int par_perm_size=0;
2094 par_perm_size=
rPar(r);
2103 perm=(
int *)
omAlloc0((r->N+1)*
sizeof(int));
2104 if (par_perm_size!=0)
2105 par_perm=(
int *)
omAlloc0(par_perm_size*
sizeof(
int));
2110 char ** r_par_names=
NULL;
2111 if (r->cf->extRing!=
NULL)
2113 r_par=r->cf->extRing->N;
2114 r_par_names=r->cf->extRing->names;
2117 char ** c_par_names=
NULL;
2121 c_par_names=
currRing->cf->extRing->names;
2123 maFindPerm(r->names, r->N, r_par_names, r_par,
2125 perm,par_perm,
currRing->cf->type);
2130 if (par_perm_size!=0)
2144 Print(
"// par nr %d: %s -> %s\n",
2150 memset(&tmpW,0,
sizeof(
sleftv));
2154 perm,par_perm,par_perm_size,nMap)))
2172 Werror(
"no identity map from %s (%s -> %s)",u->
Fullname(),s1,s2);
2183 char *where=(
char *)u->
Data();
2184 char *what=(
char *)
v->Data();
2185 char *
found = strstr(where,what);
2188 res->data=(
char *)((
found-where)+1);
2197 ideal
id = (ideal)u->
Data();
2198 int max_length = (int)(
long)
v->Data();
2199 if (max_length < 0) {
2200 WerrorS(
"length for fres must not be negative");
2203 if (max_length == 0) {
2206 Warn(
"full resolution in a qring may be infinite, "
2207 "setting max length to %d", max_length);
2210 char *method = (
char *)
w->Data();
2214 if (strcmp(method,
"complete") != 0
2215 && strcmp(method,
"frame") != 0
2216 && strcmp(method,
"extended frame") != 0
2217 && strcmp(method,
"single module") != 0) {
2218 WerrorS(
"wrong optional argument for fres");
2222 res->data = (
void *)r;
2230 w->data = (
char *)
"complete";
2244 int uu=(int)(
long)u->
Data();
int vv=(int)(
long)
v->Data();
2245 int p0=
ABS(uu),p1=
ABS(vv);
2253 res->data=(
char *)(
long)p0;
2258 number n1 = (number) u->
Data();
2259 number n2 = (number)
v->Data();
2265 number a=(number) u->
Data();
2266 number
b=(number)
v->Data();
2291 PrintS(
"// NOTE: computation of Hilbert series etc. is being\n");
2292 PrintS(
"// performed for generic fibre, that is, over Q\n");
2300 switch((
int)(long)
v->Data())
2303 res->data=(
void *)iv;
2316 int i=
pVar((poly)
v->Data());
2328 WerrorS(
"variable must have weight 1");
2333 int i=
pVar((poly)
v->Data());
2350 WerrorS(
"variable must have weight 1");
2357 ideal v_id=(ideal)
v->Data();
2366 currRing->pLexOrder=save_pLexOrder;
2389 const int n = L->
nr;
assume (n >= 0);
2390 std::vector<ideal> V(n + 1);
2392 for(
int i = n;
i >= 0;
i--) V[
i] = (ideal)(L->
m[
i].
Data());
2411 res->data = (
char *)
pJet((poly)u->
CopyD(), (int)(
long)
v->Data());
2445 h.data=(
void *)(
long)
IDELEMS((ideal)
v->Data());
2474 char *
s=(
char *)u->
Data();
2475 if(strcmp(
s,
"with")==0)
2477 if (strcmp(
s,
"try")==0)
2479 WerrorS(
"invalid second argument");
2480 WerrorS(
"load(\"libname\" [,option]);");
2502 ideal u_id=(ideal)u->
Data();
2503 ideal v_id=(ideal)
v->Data();
2506 if ((*w_u).compare((w_v))!=0)
2508 WarnS(
"incompatible weights");
2509 delete w_u; w_u=
NULL;
2517 WarnS(
"wrong weights");
2518 delete w_u; w_u=
NULL;
2523 res->data = (
char *)
idModulo(u_id,v_id ,hom,&w_u);
2534 number q=(number)
v->Data();
2545 number q=(number)
v->Data();
2556 poly q=(poly)
v->Data();
2562 poly
p=(poly)(u->
Data());
2580 char *opt=(
char *)
v->Data();
2592 if(strcmp(
l->m->type,
"ASCII")!=0)
2594 Werror(
"ASCII link required, not `%s`",
l->m->type);
2599 if (
l->name[0]!=
'\0')
2603 if (
v==
NULL) opt=(
const char*)
"i";
2604 else opt=(
const char *)
v->Data();
2646 const char *
s=(
const char *)u->
Data();
2647 newstruct_desc d=
NULL;
2653 else WerrorS(
"name of newstruct must be longer than 1 character");
2659 int i=(
int)(long)
v->Data();
2667 Werror(
"par number %d out of range 1..%d",
i,
p);
2677 WerrorS(
"basering must NOT be a qring!");
2697 WerrorS(
"basering must NOT be a qring!");
2717 WerrorS(
"basering must NOT be a qring!");
2737 WerrorS(
"basering must NOT be a qring!");
2759 const poly q = (poly)
b->Data();
2775 ring r = (ring)a->
Data();
2778 res->data =
b->Data();
2779 res->rtyp =
b->rtyp;
2784 Werror(
"%s is not an opposite ring to current ring",a->
Fullname());
2797 res->rtyp = argtype;
2805 res->rtyp = argtype;
2813 res->rtyp = argtype;
2826 res->rtyp = argtype;
2831 WerrorS(
"unsupported type in oppose");
2855 int i=(int)(
long)u->
Data();
2856 int j=(int)(
long)
v->Data();
2857 if (
j-
i <0) {
WerrorS(
"invalid range for random");
return TRUE;}
2864 int isRowEchelon = (int)(
long)
v->Data();
2865 if (isRowEchelon != 1) isRowEchelon = 0;
2866 int rank =
luRank(
m, isRowEchelon);
2867 res->data =(
char *)(
long)rank;
2879 Werror(
"cannot read from `%s`",
s);
2888 ideal vi=(ideal)
v->Data();
2896 ideal ui=(ideal)u->
Data();
2897 ideal vi=(ideal)
v->Data();
2905 int maxl=(int)(
long)
v->Data();
2908 WerrorS(
"length for res must not be negative");
2914 ideal u_id=(ideal)u->
Data();
2923 "full resolution in a qring may be infinite, setting max length to %d",
2937 int add_row_shift=0;
2941 add_row_shift = ww->
min_in();
2942 (*ww) -= add_row_shift;
2958 (
"`lres` not implemented for inhomogeneous input or qring");
2962 WarnS(
"the current implementation of `lres` may not work in the case of a single variable");
2972 (
"`kres` not implemented for inhomogeneous input or qring");
2984 (
"`hres` not implemented for inhomogeneous input or qring");
2987 ideal u_id_copy=
idCopy(u_id);
2989 r=
syHilb(u_id_copy,&dummy);
3002 res->data=(
void *)r;
3003 if ((weights!=
NULL) && (ww!=
NULL)) {
delete ww; ww=
NULL; }
3007 if (weights!=
NULL) (*ww) += add_row_shift;
3036 n1 = (number)u->
CopyD();
3040 i = (int)(
long)u->
Data();
3048 i = (int)(
long)
v->Data();
3052 res->data = (
char*)
l;
3058 int i=
rSum((ring)u->
Data(),(ring)
v->Data(),r);
3059 res->data = (
char *)r;
3062 #define SIMPL_NORMALIZE 64
3063 #define SIMPL_LMDIV 32
3064 #define SIMPL_LMEQ 16
3065 #define SIMPL_MULT 8
3067 #define SIMPL_NULL 2
3068 #define SIMPL_NORM 1
3071 int sw = (int)(
long)
v->Data();
3102 res->data = (
char * )
id;
3109 int sw=(int)(
long)dummy->
Data();
3124 l->m[0].data=(
void *)
f;
3126 l->m[1].data=(
void *)
v;
3127 res->data=(
void *)
l;
3132 res->data=(
void *)
f;
3145 res->data=(
void *)
p;
3166 int sw = (int)(
long)
v->Data();
3177 res->data = (
char * )
p;
3185 ideal u_id=(ideal)(u->
Data());
3210 ideal i1=(ideal)(u->
Data());
3216 i0->m[0]=(poly)
v->Data();
3219 memset(i0->m,0,
sizeof(poly)*
IDELEMS(i0));
3252 i0=(ideal)
v->CopyD();
3255 memset(i0->m,0,
sizeof(poly)*
IDELEMS(i0));
3300 ideal I=(ideal)u->
Data();
3311 int i=(
int)(long)
v->Data();
3332 int t = (int)(
long)
v->Data();
3342 res->data = (
void*)(
long)
i;
3357 int timeout = 1000*(int)(
long)
v->Data();
3365 for(
unsigned nfinished = 0; nfinished < ((unsigned)Lforks->
nr)+1; nfinished++)
3390 res->data = (
void*)(
long)ret;
3398 #define jjWRONG2 (proc2)jjWRONG
3399 #define jjWRONG3 (proc3)jjWRONG
3444 res->data = (
char *)n;
3449 res->data = (
char *)(-(
long)u->
Data());
3456 res->data = (
char *)n;
3474 res->data = (
char *)iv;
3481 res->data = (
char *)bim;
3490 ring r=(ring)u->
Data();
3494 char name_buffer[100];
3495 static int ending=1000000;
3497 sprintf(name_buffer,
"PYTHON_RING_VAR%d",ending);
3521 l->m[0].data=(
void *)
m;
3522 l->m[1].data=(
void *)iv;
3523 res->data = (
char *)
l;
3543 number n=(number)u->
CopyD();
3567 number n=(number) tmp.
data;
3582 res->data = (
char *)(
long)
rChar((ring)
v->Data());
3592 res->data = (
char *)(
long)((
bigintmat*)(
v->Data()))->cols();
3597 res->data = (
char *)(
long)((
intvec*)(
v->Data()))->cols();
3605 res->data = (
char *)
p;
3616 res->data = (
char *)(
long)(aa->
rows()*aa->
cols());
3621 res->data = (
char *)(
long)
nSize((number)
v->Data());
3638 res->data = (
char *)(
long)((
intvec*)(
v->Data()))->length();
3643 ring r=(ring)
v->Data();
3649 extern int ipower (
int b,
int n );
3650 elems=
ipower(r->cf->ch,r->cf->extRing->pFDeg(r->cf->extRing->qideal->m[0],r->cf->extRing));
3652 res->data = (
char *)(
long)elems;
3658 poly
p=(poly)
v->Data();
3660 else res->data=(
char *)-1;
3665 ideal I=(ideal)u->
Data();
3671 res->data = (
char *)(
long)d;
3680 PrintS(
"// NOTE: computation of degree is being performed for\n");
3681 PrintS(
"// generic fibre, that is, over Q\n");
3700 else if (
v->rtyp!=0)
res->data=(
void *)(-1);
3708 number n = reinterpret_cast<number>(
v->Data());
3717 number n = reinterpret_cast<number>(
v->Data());
3734 res ->data = (
char *)
p;
3741 i=
m->rows();
j=
m->cols();
3746 Werror(
"det of %d x %d bigintmat",
i,
j);
3755 number2 r=(number2)
omAlloc0(
sizeof(*r));
3757 i=
m->rows();
j=
m->cols();
3761 r->cf=
m->basecoeffs();
3766 Werror(
"det of %d x %d cmatrix",
i,
j);
3777 i=
m->rows();
j=
m->cols();
3782 Werror(
"det of %d x %d intmat",
i,
j);
3789 ideal I=(ideal)
v->Data();
3800 res->data = (
char *)
p;
3808 Warn(
"dim(%s) may be wrong because the mixed monomial ordering",
v->Name());
3813 ideal vid = (ideal)
v->Data();
3817 res->data = (
char *)-1L;
3839 for(
unsigned ii=0;ii<(unsigned)
IDELEMS(vv);ii++)
3848 for(
unsigned jj = 0;jj<(unsigned)
IDELEMS(vc)-1;jj++)
3850 if((vc->m[jj]!=
NULL)
3871 res->data = (
char *)d;
3887 Werror(
"cannot dump to `%s`",
s);
3896 int co=(int)(
long)
v->Data();
3902 else WerrorS(
"argument of gen must be positive");
3907 char * d = (
char *)
v->Data();
3908 char *
s = (
char *)
omAlloc(strlen(d) + 13);
3909 strcpy(
s, (
char *)d);
3910 strcat(
s,
"\n;RETURN();\n");
3947 WarnS(
"no factorization implemented");
3951 res->data=(
void *)L;
3964 l->m[0].data=(
void *)
f;
3966 l->m[1].data=(
void *)
v;
3967 res->data=(
void *)
l;
3978 Werror(
"cannot get dump from `%s`",
s);
3987 ideal I=(ideal)
v->Data();
3996 ideal I=(ideal)
v->Data();
4010 WerrorS(
"module must be zero-dimensional");
4011 if (delete_w)
delete w;
4034 if (delete_w)
delete w;
4035 res->data=(
void *)po;
4043 PrintS(
"// NOTE: computation of Hilbert series etc. is being\n");
4044 PrintS(
"// performed for generic fibre, that is, over Q\n");
4058 PrintS(
"// NOTE: computation of Hilbert series etc. is being\n");
4059 PrintS(
"// performed for generic fibre, that is, over Q\n");
4068 ideal v_id=(ideal)
v->Data();
4076 char *s_isHomog=
omStrDup(
"isHomog");
4082 else if (
w!=
NULL)
delete w;
4119 res->data=(
char *)mat;
4129 res->data=(
char *)I;
4136 ring q=(ring)
v->Data();
4139 if (q->qideal==
NULL)
4146 WerrorS(
"can only get ideal from identical qring");
4172 WarnS(
"interred: this command is experimental over the integers");
4180 res->data = (
char *)(
long)
pVar((poly)
v->Data());
4191 res->data = (
char *)0;
4198 poly
p=(poly)(
v->Data());
4203 res->data = (
char *)
i;
4210 WerrorS(
"differentiation not defined in the coefficient ring");
4213 number n = (number) u->
Data();
4214 number
k = (number)
v->Data();
4227 ideal
id = (ideal)a->
Data();
4237 for(
int i = 0;
i < W;
i++,
p++, q++ )
4263 poly
p=(poly)
v->Data();
4276 poly
p=(poly)
v->Data();
4289 res->data=(
char *)iv;
4294 poly
p=(poly)
v->Data();
4303 res->data = (
char*) lm;
4315 if (mm==0) mm=0x7fff;
4317 res->data=(
char *)r;
4325 memset(&tmp, 0,
sizeof(tmp));
4341 WerrorS(
"matrix must be constant");
4355 res->data=(
char*)ll;
4366 switch(((
int)(
long)
v->Data()))
4381 res->data = (
char *)0;
4385 res->data = (
char *)0;
4400 l->m[0].data=(
char *)r;
4403 l->m[1].data=(
char *)
m;
4404 res->data=(
char *)
l;
4420 res->data=(
char *)tmp;
4429 number n,
i;
i=(number)
v->Data();
4434 res->data=(
void *)n;
4464 res->data=(
char*)(
long)((long)
v->Data()==0 ? 1 : 0);
4469 res->data = (
char *)(
long)(((ring)(
v->Data()))->N);
4480 poly
p=(poly)
v->Data();
4486 int i=(int)(
long)
v->Data();
4489 if ((0<
i) && (
i<=
p))
4495 Werror(
"par number %d out of range 1..%d",
i,
p);
4502 number nn=(number)
v->Data();
4513 int i=(int)(
long)
v->Data();
4519 Werror(
"par number %d out of range 1..%d",
i,
p);
4526 poly
p=(poly)
v->Data();
4530 WerrorS(
"poly must be constant");
4539 res->data=(
void *)n;
4546 poly
p=(poly)
v->Data();
4550 WerrorS(
"poly must be constant");
4564 int i =
IsPrime((
int)(
long)(
v->Data()));
4565 res->data = (
char *)(
long)(
i > 1 ?
i : 2);
4571 ideal v_id=(ideal)
v->Data();
4576 WarnS(
"wrong weights");
4596 if (((
p=(poly)
v->Data())!=
NULL)
4605 res->data = (
char *)n;
4610 char *
s= (
char *)
v->Data();
4617 res->data = (
char *)1;
4626 res->data = (
char *)1;
4634 res->data =(
char *)(
long)rank;
4653 ring r=(ring)
v->Data();
4659 long mm=r->bitmask/2;
4676 ring r=(ring)
v->Data();
4683 ideal
i = (ideal)
v->Data();
4684 res->data = (
char *)
i->rank;
4689 res->data = (
char *)(
long)((
bigintmat*)(
v->Data()))->rows();
4694 res->data = (
char *)(
long)((
intvec*)(
v->Data()))->rows();
4699 res->data = (
char *)(
long)
rPar(((ring)
v->Data()));
4708 WerrorS(
"qring not supported by slimgb at the moment");
4713 WerrorS(
"ordering must be global for slimgb");
4717 WarnS(
"groebner base computations with inexact coefficients can not be trusted due to rounding errors");
4720 ideal u_id=(ideal)u->
Data();
4725 WarnS(
"wrong weights");
4747 ideal v_id=(ideal)
v->Data();
4754 WarnS(
"wrong weights");
4773 ideal v_id=(ideal)
v->Data();
4780 WarnS(
"wrong weights");
4799 ideal v_id=(ideal)
v->Data();
4806 WarnS(
"wrong weights");
4825 WarnS(
"groebner base computations with inexact coefficients can not be trusted due to rounding errors");
4827 ideal v_id=(ideal)
v->Data();
4834 WarnS(
"wrong weights");
4852 res->data = (
char *)
idSort((ideal)
v->Data());
4865 l->m[0].data=(
void *)
f;
4867 l->m[1].data=(
void *)
v;
4868 res->data=(
void *)
l;
4885 ideal v_id=(ideal)
v->Data();
4887 int add_row_shift=0;
4891 add_row_shift=
w->min_in();
4892 (*w)-=add_row_shift;
4917 res->data = (
char *)(((
bigintmat*)(
v->Data()))->transpose());
4928 ring r = (ring)a->
Data();
4936 WarnS(
"opposite only for global orderings");
4943 ring r = (ring)a->
Data();
4964 int t=(int)(
long)
v->data;
5012 int i=(int)(
long)
v->Data();
5013 if ((0<
i) && (i<=currRing->
N))
5018 res->data=(
char *)
p;
5034 int i=(int)(
long)
v->Data();
5035 if ((0<
i) && (i<=currRing->
N))
5062 res->data = (
void*)(
long)
i;
5075 for(
int nfinished = 0; nfinished < Lforks->
nr+1; nfinished++)
5091 res->data = (
void*)(
long)
j;
5101 #ifdef HAVE_DYNAMIC_LOADING
5108 Werror(
"%s: unknown type",
s);
5126 Werror(
"can not create package `%s`",plib);
5132 package pa=IDPACKAGE(pl);
5133 if ((pa->language==
LANG_C)
5136 Werror(
"can not create package `%s` - binaries exists",plib);
5142 package savepack=currPack;
5158 #ifdef HAVE_DYNAMIC_LOADING
5161 WerrorS(
"Dynamic modules are not supported by this version of Singular");
5179 Print(
"loading of >%s< failed\n",
s);
5187 res->data = (
char *)strlen((
char *)
v->Data());
5192 res->data = (
char *)(
long)
pLength((poly)
v->Data());
5197 res->data = (
char *)(
long)
idElem((ideal)
v->Data());
5217 res->data = (
char *)
pHead((poly)
v->Data());
5285 number n=(number)u->
CopyD();
5292 number n=(number)u->
Data();
5301 char *
s= (
char *)u->
Data();
5302 int r = (int)(
long)
v->Data();
5303 int c = (int)(
long)
w->Data();
5306 if ( (r<1) || (r>
l) || (c<0) )
5312 sprintf((
char *)
res->data,
"%-*.*s",c,c,
s+r-1);
5318 int r = (int)(
long)
v->Data();
5319 int c = (int)(
long)
w->Data();
5320 if ((r<1)||(r>iv->
rows())||(c<1)||(c>iv->
cols()))
5322 Werror(
"wrong range[%d,%d] in intmat %s(%d x %d)",
5335 while (
h->next!=
NULL)
h=
h->next;
5345 int r = (int)(
long)
v->Data();
5346 int c = (int)(
long)
w->Data();
5347 if ((r<1)||(r>bim->
rows())||(c<1)||(c>bim->
cols()))
5349 Werror(
"wrong range[%d,%d] in bigintmat %s(%d x %d)",
5363 while (
h->next!=
NULL)
h=
h->next;
5373 int r = (int)(
long)
v->Data();
5374 int c = (int)(
long)
w->Data();
5378 Werror(
"wrong range[%d,%d] in matrix %s(%d x %d)",r,c,u->
Fullname(),
5392 while (
h->next!=
NULL)
h=
h->next;
5410 WerrorS(
"cannot build expression lists from unnamed objects");
5413 memcpy(&ut,u,
sizeof(ut));
5414 memset(&t,0,
sizeof(t));
5418 t.
data=(
char *)(
long)((*iv)[
l]);
5428 memcpy(u,&ut,
sizeof(ut));
5460 WerrorS(
"cannot build expression lists from unnamed objects");
5463 memcpy(&ut,u,
sizeof(ut));
5464 memset(&t,0,
sizeof(t));
5468 t.
data=(
char *)(
long)((*iv)[
l]);
5478 memcpy(u,&ut,
sizeof(ut));
5511 WerrorS(
"cannot build expression lists from unnamed objects");
5514 memcpy(&ut,u,
sizeof(ut));
5515 memset(&t1,0,
sizeof(
sleftv));
5516 memset(&t2,0,
sizeof(
sleftv));
5519 for (vl=0;vl< vv->
length(); vl++)
5521 t1.
data=(
char *)(
long)((*vv)[vl]);
5522 for (wl=0;wl< wv->
length(); wl++)
5524 t2.
data=(
char *)(
long)((*wv)[wl]);
5534 memcpy(u,&ut,
sizeof(ut));
5574 int k=(int)(
long)
w->Data();
5581 l->m[0].data=(
void *)
m;
5582 l->m[1].data=(
void *)iv;
5589 l->m[0].data=(
void *)
m;
5591 res->data = (
char *)
l;
5598 WerrorS(
"3rd argument must be a name of a matrix");
5601 ideal
i=(ideal)u->
Data();
5602 int rank=(int)
i->rank;
5611 (ideal)(
v->Data()),(poly)(
w->Data()));
5618 WerrorS(
"3rd argument must be a name of a matrix");
5626 memset(&t,0,
sizeof(t));
5643 ideal I=(ideal)u->
Data();
5664 int n=(int)(
long)
w->Data();
5665 char *where=(
char *)u->
Data();
5666 char *what=(
char *)
v->Data();
5668 if ((1>n)||(n>(
int)strlen(where)))
5670 Werror(
"start position %d out of range",n);
5673 found = strchr(where+n-1,*what);
5674 if (*(what+1)!=
'\0')
5676 while((
found !=
NULL) && (strncmp(
found+1,what+1,strlen(what+1))!=0))
5683 res->data=(
char *)((
found-where)+1);
5689 if ((
int)(
long)
w->Data()==0)
5701 Werror(
"weight vector must have size %d, not %d",
5708 PrintS(
"// NOTE: computation of Hilbert series etc. is being\n");
5709 PrintS(
"// performed for generic fibre, that is, over Q\n");
5717 switch((
int)(long)
v->Data())
5720 res->data=(
void *)iv;
5734 int i=
pVar((poly)
v->Data());
5746 WerrorS(
"variable must have weight 1");
5752 int i=
pVar((poly)
v->Data());
5764 WerrorS(
"variable must have weight 1");
5769 intvec* im=
new intvec((
int)(
long)
v->Data(),(int)(
long)
w->Data(), 0);
5775 (*im)[
i] = (*arg)[
i];
5778 res->data = (
char *)im;
5783 ideal I1=(ideal)u->
Data();
5784 ideal I2=(ideal)
v->Data();
5785 ideal I3=(ideal)
w->Data();
5796 ideal I=(ideal)u->
Data();
5798 res->data=(
char *)
idSect(I,(ideal)
v->Data(),alg);
5805 res->data = (
char *)
ppJetW((poly)u->
Data(),(int)(
long)
v->Data(),iw);
5813 WerrorS(
"2nd argument must be a unit");
5829 WerrorS(
"2nd argument must be a diagonal matrix of units");
5876 Werror(
"`%s` is undefined",
v->Fullname());
5892 const int mk = (
const int)(
long)u->
Data();
5893 bool noIdeal =
true;
bool noK =
true;
bool noAlgorithm =
true;
5894 bool noCacheMinors =
true;
bool noCacheMonomials =
true;
5895 ideal IasSB;
int k;
char* algorithm;
int cacheMinors;
int cacheMonomials;
5911 noAlgorithm =
false;
5916 noCacheMinors =
false;
5922 noCacheMonomials =
false;
5936 noAlgorithm =
false;
5941 noCacheMinors =
false;
5946 noCacheMonomials =
false;
5953 algorithm = (
char*)u->
next->
Data();
5954 noAlgorithm =
false;
5958 noCacheMinors =
false;
5963 noCacheMonomials =
false;
5971 if (strcmp(algorithm,
"bareiss") == 0)
5972 algorithm = (
char*)
"Bareiss";
5973 if (strcmp(algorithm,
"laplace") == 0)
5974 algorithm = (
char*)
"Laplace";
5975 if (strcmp(algorithm,
"cache") == 0)
5976 algorithm = (
char*)
"Cache";
5985 if ((!noK) && (
k == 0))
5987 WerrorS(
"Provided number of minors to be computed is zero.");
5990 if ((!noAlgorithm) && (strcmp(algorithm,
"Bareiss") != 0)
5991 && (strcmp(algorithm,
"Laplace") != 0)
5992 && (strcmp(algorithm,
"Cache") != 0))
5994 WerrorS(
"Expected as algorithm one of 'B/bareiss', 'L/laplace', or 'C/cache'.");
5997 if ((!noAlgorithm) && (strcmp(algorithm,
"Bareiss") == 0)
6000 Werror(
"Bareiss algorithm not defined over coefficient rings %s",
6001 "with zero divisors.");
6005 if ((mk < 1) || (mk >
m->rows()) || (mk >
m->cols()))
6014 if ((!noAlgorithm) && (strcmp(algorithm,
"Cache") == 0)
6015 && (noCacheMinors || noCacheMonomials))
6018 cacheMonomials = 100000;
6024 (noIdeal ? 0 : IasSB),
false);
6025 else if (strcmp(algorithm,
"Cache") == 0)
6027 (noIdeal ? 0 : IasSB), 3, cacheMinors,
6028 cacheMonomials,
false);
6031 (noIdeal ? 0 : IasSB),
false);
6041 (
const char *)
w->Data());
6055 WerrorS(
"2nd/3rd arguments must have names");
6059 const char *ring_name=u->
Name();
6066 if ((preim_ring==
NULL)
6069 Werror(
"preimage ring `%s` is not the basering",mapping->preimage);
6085 Werror(
"`%s` is not defined in `%s`",
v->
name,ring_name);
6089 if (kernel_cmd) image=
idInit(1,1);
6106 Werror(
"`%s` is not defined in `%s`",
w->name,ring_name);
6113 WarnS(
"preimage in local qring may be wrong: use Ring::preimageLoc instead");
6122 int i=(int)(
long)u->
Data();
6123 int r=(int)(
long)
v->Data();
6124 int c=(int)(
long)
w->Data();
6125 if ((r<=0) || (c<=0))
return TRUE;
6141 res->data = (
char *)iv;
6151 Werror(
"no random function defined for coeff %d",
cf->type);
6157 number2 nn=(number2)
omAlloc(
sizeof(*nn));
6167 int &ringvar, poly &monomexpr)
6169 monomexpr=(poly)
w->Data();
6170 poly
p=(poly)
v->Data();
6174 Werror(
"`%s` substitutes a ringvar only by a term",
6179 if ((ringvar=
pVar(
p))==0)
6188 WerrorS(
"ringvar/par expected");
6199 if (nok)
return TRUE;
6200 poly
p=(poly)u->
Data();
6225 if (nok)
return TRUE;
6226 ideal
id=(ideal)u->
Data();
6230 if (monomexpr!=
NULL)
6245 Warn(
"possible OVERFLOW in subst, max exponent is %ld",
currRing->bitmask/2);
6275 memset(&tmp,0,
sizeof(tmp));
6284 int mi=(int)(
long)
v->Data();
6285 int ni=(int)(
long)
w->Data();
6288 Werror(
"converting ideal to matrix: dimensions must be positive(%dx%d)",mi,ni);
6299 memcpy(
m->m,I->m,
i*
sizeof(poly));
6300 memset(I->m,0,
i*
sizeof(poly));
6302 res->data = (
char *)
m;
6307 int mi=(int)(
long)
v->Data();
6308 int ni=(int)(
long)
w->Data();
6311 Werror(
"converting module to matrix: dimensions must be positive(%dx%d)",mi,ni);
6320 int mi=(int)(
long)
v->Data();
6321 int ni=(int)(
long)
w->Data();
6324 Werror(
"converting matrix to matrix: dimensions must be positive(%dx%d)",mi,ni);
6341 res->data = (
char *)
m;
6365 &(hw->data.uideal));
6374 Werror(
"`%s` must be 0-dimensional",
v->Name());
6386 Werror(
"`%s` must be 0-dimensional",
v->Name());
6397 0,(int)(
long)
w->Data());
6404 0,(int)(
long)
w->Data());
6410 int maxl=(int)
v->Data();
6411 ideal u_id=(ideal)u->
Data();
6427 WarnS(
"wrong weights");
6455 yes = (strcmp((
char *)
res->data, (
char *)
w->Data()) == 0);
6457 res->data = (
void *)(
long)yes;
6471 ideal u_id=(ideal)(u->
Data());
6476 WarnS(
"wrong weights");
6517 lineno=(int)(
long)
v->
next->Data();
6581 WarnS(
"<module>,<module>,<int>[,<intvec>] expected!");
6588 ideal P=(ideal)w1.
Data();
6589 ideal
Q=(ideal)w2.
Data();
6591 int n=(int)(
long)v3->
Data();
6598 while( (
i > 0) && ((*w0) > 0) )
6604 WarnS(
"not all weights are positive!");
6618 L->
m[1].
rtyp=v1->Typ();
6623 L->
m[1].
data=(
void *)
R->m[0];
6708 res->data=(
char *)
id;
6713 ring r=(ring)u->
Data();
6721 WerrorS(
"fetch(<ring>,<name>[,<intvec>[,<intvec>])");
6726 if (perm_par_l!=
NULL)
6735 int par_perm_size=0;
6748 par_perm_size=
rPar(r);
6756 par_perm_size=
rPar(r);
6758 if (par_perm_size!=0)
6759 par_perm=(
int *)
omAlloc0(par_perm_size*
sizeof(
int));
6761 if (perm_par_l==
NULL)
6763 if (par_perm_size!=0)
6768 if (par_perm_size==0)
WarnS(
"source ring has no parameters");
6773 if (i<perm_par_v->
length()) par_perm[
i]=(*perm_par_v)[
i];
6777 Warn(
"invalid entry for par %d: %d\n",
i,par_perm[
i]);
6785 if (i<perm_var_v->
length()) perm[
i+1]=(*perm_var_v)[
i];
6789 Warn(
"invalid entry for var %d: %d\n",
i,perm[
i]);
6798 Print(
"// var nr %d: %s -> var %s\n",
i,r->names[
i-1],
currRing->names[perm[
i]-1]);
6804 if (par_perm[
i-1]<0)
6805 Print(
"// par nr %d: %s -> par %s\n",
6807 else if (par_perm[
i-1]>0)
6808 Print(
"// par nr %d: %s -> var %s\n",
6814 memset(&tmpW,0,
sizeof(
sleftv));
6818 perm,par_perm,par_perm_size,nMap)))
6836 Werror(
"no identity map from %s (%s -> %s)",u->
Fullname(),s1,s2);
6843 int l=
v->listLength();
6874 WerrorS(
"cannot convert to ideal or module");
6885 r[
i]=(ideal)
h->Data();
6897 r[
i]=(ideal)tmp.
Data();
6929 matrix iMat;
int invertible;
6935 int rr = aMat->
rows();
6936 int cc = aMat->
cols();
6939 Werror(
"given matrix (%d x %d) is not quadratic, hence not invertible", rr, cc);
6944 WerrorS(
"matrix must be constant");
6954 int rr = uMat->
rows();
6955 int cc = uMat->
cols();
6958 Werror(
"third matrix (%d x %d) is not quadratic, hence not invertible",
6967 WerrorS(
"matricesx must be constant");
6974 Werror(
"expected either one or three matrices");
6992 res->data=(
char*)ll;
7016 WerrorS(
"expected exactly three matrices and one vector as input");
7026 Werror(
"first matrix (%d x %d) is not quadratic",
7032 Werror(
"second matrix (%d x %d) is not quadratic",
7038 Werror(
"second matrix (%d x %d) and third matrix (%d x %d) do not fit",
7044 Werror(
"third matrix (%d x %d) and vector (%d x 1) do not fit",
7053 WerrorS(
"matrices must be constant");
7073 res->data=(
char*)ll;
7087 (*iv)[
i]=(int)(
long)
h->Data();
7106 res->data=(
char *)iv;
7123 WerrorS(
"2nd argument must be a unit");
7136 WerrorS(
"2nd argument must be a diagonal matrix of units");
7141 (
int)(long)u3->
Data(),
7150 Werror(
"%s(`poly`,`poly`,`int`,`intvec`) exppected",
7168 else if (
w->next==
NULL)
7195 && ((strcmp(u->
Name(),
"real")==0) || (strcmp(u->
Name(),
"complex")==0)))
7198 memset(u,0,
sizeof(
sleftv));
7216 Werror(
"`int` expected while building `%s(`",u->
name);
7221 sprintf(nn,
"%s(%d",u->
name,(
int)(
long)
v->Data());
7225 while (*
s!=
'\0')
s++;
7229 Werror(
"`int` expected while building `%s`",nn);
7233 sprintf(
s,
",%d",(
int)(
long)
v->Data());
7235 while (*
s!=
'\0')
s++;
7256 ideal I=(ideal)u->
Data();
7269 Werror(
"%s(`ideal`,`ideal`,`matrix`,`string`)\n"
7270 "or (`module`,`module`,`matrix`,`string`)expected",
7288 ideal I=(ideal)u->
Data();
7295 &(hw->data.uideal),alg);
7301 Werror(
"%s(`ideal`,`ideal`,`matrix`,`string`)\n"
7302 "or (`module`,`module`,`matrix`,`string`)expected",
7310 if (
v!=
NULL) sl =
v->listLength();
7314 int add_row_shift = 0;
7316 if (weights!=
NULL) add_row_shift=weights->
min_in();
7343 Werror(
"`%s` is undefined",
h->Fullname());
7349 ((ring)L->
m[
i].
data)->ref++;
7355 res->data=(
char *)L;
7402 WerrorS(
"2nd argument must be a diagonal matrix of units");
7410 (
int)(long)u4->
Data()
7421 WerrorS(
"2nd argument must be a unit");
7450 WerrorS(
"2nd argument must be a diagonal matrix of units");
7458 (
int)(long)u4->
Data(),
7470 WerrorS(
"2nd argument must be a unit");
7481 Werror(
"%s(`ideal`,`ideal`,`matrix`,`int`,`intvec`) exppected",
7493 for(
i=0;
i<nCount;
i++)
7514 int n =
v->listLength();
7517 res->data =
v->String();
7521 char** slist = (
char**)
omAlloc(n*
sizeof(
char*));
7526 slist[
i] =
v->String();
7528 j+=strlen(slist[
i]);
7530 char*
s = (
char*)
omAlloc((
j+1)*
sizeof(char));
7534 strcat(
s, slist[
i]);
7554 #if defined(__alpha) && !defined(linux)
7557 void usleep(
unsigned long usec);
7586 leftv u =
v;
int factorsGiven = 0;
7589 WerrorS(
"expected arguments (poly, int [, poly, poly] [, int, int])");
7592 else h = (poly)u->
Data();
7596 WerrorS(
"expected arguments (poly, int [, poly, poly] [, int, int])");
7599 else d = (int)(
long)u->
Data();
7605 WerrorS(
"expected arguments (poly, int [, poly, poly] [, int, int])");
7610 f0 = (poly)u->
Data();
7620 WerrorS(
"expected arguments (poly, int [, poly, poly] [, int, int])");
7625 xIndex = (int)(
long)u->
Data();
7626 yIndex = (int)(
long)u->
next->
Data();
7632 WerrorS(
"expected arguments (poly, int [, poly, poly] [, int, int])");
7639 WerrorS(
"expected non-constant polynomial argument(s)");
7643 if ((xIndex < 1) || (n < xIndex))
7645 Werror(
"index for variable x (%d) out of range [1..%d]", xIndex, n);
7648 if ((yIndex < 1) || (n < yIndex))
7650 Werror(
"index for variable y (%d) out of range [1..%d]", yIndex, n);
7653 if (xIndex == yIndex)
7655 WerrorS(
"expected distinct indices for variables x and y");
7660 if (factorsGiven == 0)
7674 WerrorS(
"expected h(0,y) to have exactly two distinct monic factors");
7689 res->data = (
char*)L;
7700 #if defined(HAVE_USLEEP)
7701 if (((
long)
res->data) == 0L)
7710 #elif defined(HAVE_SLEEP)
7711 if (((
int)
res->data) == 0)
7716 si_sleep((is - 1)/1000000 + 1);
7735 if ((rest!=
NULL) && (!
b))
7740 memset(&tmp_res,0,
sizeof(tmp_res));
7742 memcpy(
res,&tmp_res,
sizeof(tmp_res));
7757 WerrorS(
"expected (matrix, number, number, number) as arguments");
7762 (number)(
v->Data()),
7763 (number)(
w->Data()),
7764 (number)(
x->Data()));
7774 ideal i1=(ideal)(u->
Data());
7780 WerrorS(
"expected `std(`ideal/module`,`poly/vector`,`intvec`,`intvec`)");
7795 i0->m[0]=(poly)
v->Data();
7800 i0=(ideal)
v->Data();
7804 WerrorS(
"expected `std(`ideal/module`,`poly/vector`,`intvec`,`intvec`)");
7811 memset(i0->m,0,
sizeof(poly)*
IDELEMS(i0));
7821 WarnS(
"wrong weights");
7855 WerrorS(
"expected `cring` [ `id` ... ]");
7861 char **n=(
char**)
omAlloc0(
N*
sizeof(
char*));
7862 for(
int i=0;
i<
N;
i++,names=names->
next)
7864 n[
i]=(
char *)names->Name();
7876 r->start =(int)(
long)e->
Data();
7881 int c=(int)(
long)u->
Data();
7885 PrintS(
"delete all variables\n");
7890 default:
WerrorS(
"not implemented");
7895 #define NULL_VAL NULL
7899 #include "iparith.inc"
7918 while (dA2[
i].cmd==op)
7920 if ((at==dA2[
i].arg1)
7921 && (bt==dA2[
i].arg2))
7938 if ((call_failed=dA2[
i].
p(
res,a,
b)))
7958 while (dA2[
i].cmd==op)
7985 || (call_failed=dA2[
i].
p(
res,an,bn)));
8024 Werror(
"`%s` is not defined",
s);
8031 Werror(
"%s(`%s`,`%s`) failed"
8036 Werror(
"`%s` %s `%s` failed"
8041 while (dA2[
i].cmd==op)
8043 if(((at==dA2[
i].arg1)||(bt==dA2[
i].arg2))
8048 Werror(
"expected %s(`%s`,`%s`)"
8051 Werror(
"expected `%s` %s `%s`"
8089 memcpy(&d->arg1,a,
sizeof(
sleftv));
8091 memcpy(&d->arg2,
b,
sizeof(
sleftv));
8095 res->data=(
char *)d;
8108 if (!bb->blackbox_Op2(op,
res,a,
b))
return FALSE;
8114 else if ((bt>
MAX_TOK)&&(op!=
'('))
8119 if(!bb->blackbox_Op2(op,
res,a,
b))
return FALSE;
8147 while (dA1[
i].cmd==op)
8166 if ((call_failed=dA1[
i].
p(
res,a)))
8186 while (dA1[
i].cmd==op)
8210 || (call_failed=dA1[
i].
p(
res,an)));
8251 while (dA1[
i].cmd==op)
8255 Werror(
"expected %s(`%s`)"
8278 memcpy(&d->arg1,a,
sizeof(
sleftv));
8282 res->data=(
char *)d;
8295 res->data=bb->blackbox_Init(bb);
8296 if(!bb->blackbox_Assign(
res,a))
return FALSE;
8306 if(!bb->blackbox_Op1(op,
res,a))
return FALSE;
8327 const struct sValCmd3* dA3,
int at,
int bt,
int ct,
8339 while (dA3[
i].cmd==op)
8341 if ((at==dA3[
i].arg1)
8342 && (bt==dA3[
i].arg2)
8343 && (ct==dA3[
i].arg3))
8351 Print(
"call %s(%s,%s,%s)\n",
8353 if ((call_failed=dA3[
i].
p(
res,a,
b,c)))
8374 while (dA3[
i].cmd==op)
8390 Print(
"call %s(%s,%s,%s)\n",
8396 || (call_failed=dA3[
i].
p(
res,an,bn,cn)));
8445 Werror(
"`%s` is not defined",
s);
8451 Werror(
"%s(`%s`,`%s`,`%s`) failed"
8455 while (dA3[
i].cmd==op)
8457 if(((at==dA3[
i].arg1)
8459 ||(ct==dA3[
i].arg3))
8462 Werror(
"expected %s(`%s`,`%s`,`%s`)"
8491 memcpy(&d->arg1,a,
sizeof(
sleftv));
8493 memcpy(&d->arg2,
b,
sizeof(
sleftv));
8495 memcpy(&d->arg3,c,
sizeof(
sleftv));
8499 res->data=(
char *)d;
8511 if(!bb->blackbox_Op3(op,
res,a,
b,c))
return FALSE;
8560 if(
v==
NULL)
return failed;
8582 res->data=(
char *)d;
8587 memcpy(&d->arg1,a,
sizeof(
sleftv));
8622 if(!bb->blackbox_OpM(op,
res,a))
return FALSE;
8637 if ((args==
dArithM[
i].number_of_args)
8639 || ((
dArithM[
i].number_of_args==-2)&&(args>0)))
8737 Warn(
"outdated identifier `%s` used - please change your code",
8788 if (op==dArithTab[
p].cmd)
return dArithTab[
p].start;
8789 if (op<dArithTab[
p].cmd) e=
p-1;
8809 if (tok==
ANY_TYPE)
return "any_type";
8810 if (tok==
COMMAND)
return "command";
8811 if (tok==
NONE)
return "nothing";
8823 if (tok==
IDHDL)
return "identifier";
8859 cmdnames *pCmdL = (cmdnames*)a;
8860 cmdnames *pCmdR = (cmdnames*)
b;
8865 if(pCmdL->name==
NULL)
return 1;
8866 if(pCmdR->name==
NULL)
return -1;
8869 if(strcmp(pCmdL->name,
"$INVALID$")==0)
return -1;
8870 if(strcmp(pCmdR->name,
"$INVALID$")==0)
return 1;
8873 if (pCmdL->tokval==-1)
8875 if (pCmdR->tokval==-1)
8876 return strcmp(pCmdL->name, pCmdR->name);
8881 if(pCmdR->tokval==-1)
return -1;
8883 return strcmp(pCmdL->name, pCmdR->name);
8991 if(nPos<0)
return NULL;
9000 if(szName==
NULL)
return -1;
9005 Print(
"'%s' not found (%d)\n", szName, nIndex);
9048 if(szName==
NULL)
return -1;
9052 Print(
"'%s' already exists at %d\n", szName, nIndex);
9090 WerrorS(
"not implemented for non-commutative rings");
9106 WerrorS(
"not implemented for rings with rings as coeffients");
9113 WerrorS(
"domain required as coeffients");
9119 WarnS(
"considering the image in Q[...]");
9132 WerrorS(
"not implemented for rings with rings as coeffients (except ZZ)");
9138 int return_type=c->
m[0].
Typ();
9154 for (
unsigned i=0;
i<=(unsigned)c->
nr;
i++)
9159 if (bo) {
Werror(
"chinrem failed for list entry %d",
i+1);
break;}
9169 WerrorS(
"poly/ideal/module/matrix/list expected");
9186 ideal *
x=(ideal *)
omAlloc(rl*
sizeof(ideal));
9192 for(
i=rl-1;
i>=0;
i--)
9194 if (c->
m[
i].
Typ()!=return_type)
9219 xx=(number *)
omAlloc(rl*
sizeof(number));
9220 for(
i=rl-1;
i>=0;
i--)
9232 Werror(
"bigint expected at pos %d",
i+1);
9239 number *q=(number *)
omAlloc(rl*
sizeof(number));
9242 for(
i=rl-1;
i>=0;
i--)
9249 for(
i=rl-1;
i>=0;
i--)
9261 Werror(
"bigint expected at pos %d",
i+1);
9277 res->data=(
char *)n;
9292 for(
i=rl-1;
i>=0;
i--)
9297 res->rtyp=return_type;
9307 for (
unsigned i=0;
i<=(unsigned)c->
nr;
i++)
9312 if (bo) {
Werror(
"farey failed for list entry %d",
i+1);
break;}
9325 if (at < bt)
return -1;
9326 if (at > bt)
return 1;
9327 int tab_pos=
iiTabIndex(dArithTab2,JJTAB2LEN,
'<');
9329 memset(&tmp,0,
sizeof(
sleftv));
9335 unsigned long ad=(
unsigned long)a->
Data();
9336 unsigned long bd=(
unsigned long)
b->Data();
9337 if (ad<bd)
return -1;
9338 else if (ad==bd)
return 0;
9349 unsigned long ad=(
unsigned long)a->
Data();
9350 unsigned long bd=(
unsigned long)
b->Data();
9351 if (ad<bd)
return -1;
9352 else if (ad==bd)
return 0;
9383 for(
j=
i;
j<len;
j++)
l->m[
j]=
l->m[
j+1];
9384 memset(&(
l->m[len]),0,
sizeof(
sleftv));
lists qrDoubleShift(const matrix A, const number tol1, const number tol2, const number tol3, const ring r=currRing)
Computes all eigenvalues of a given real quadratic matrix with multiplicites.
static FORCE_INLINE number n_IntMod(number a, number b, const coeffs r)
for r a field, return n_Init(0,r) always: n_Div(a,b,r)*b+n_IntMod(a,b,r)==a n_IntMod(a,...
static BOOLEAN jjELIMIN_IV(leftv res, leftv u, leftv v)
static BOOLEAN jjMEMORY(leftv res, leftv v)
ideal id_FreeModule(int i, const ring r)
the free module of rank i
static BOOLEAN jjmpTransp(leftv res, leftv v)
BOOLEAN iiConvert(int inputType, int outputType, int index, leftv input, leftv output, const struct sConvertTypes *dConvertTypes)
static BOOLEAN jjPlural_mat_mat(leftv res, leftv a, leftv b)
static BOOLEAN jjLISTRING(leftv res, leftv v)
static int si_min(const int a, const int b)
static BOOLEAN jjFACSTD(leftv res, leftv v)
static BOOLEAN jjE(leftv res, leftv v)
static BOOLEAN jjDEFINED(leftv res, leftv v)
static BOOLEAN jjKLAMMER_rest(leftv res, leftv u, leftv v)
poly p_Divide(poly p, poly q, const ring r)
polynomial division, ignoring the rest via singclap_pdiive resp. idLift destroyes a,...
poly redNF(poly h, int &max_ind, int nonorm, kStrategy strat)
static BOOLEAN jjEQUAL_I(leftv res, leftv u, leftv v)
ideal id_Homogen(ideal h, int varnum, const ring r)
struct sValCmdM * psValCmdM
static BOOLEAN jjLT_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjINTERSEC3S(leftv res, leftv u, leftv v, leftv w)
ideal_list kStdfac(ideal F, ideal Q, tHomog h, intvec **w, ideal D)
static BOOLEAN jjOP_BIM_I(leftv res, leftv u, leftv v)
static BOOLEAN jjFAREY_ID(leftv res, leftv u, leftv v)
BOOLEAN jjUNIQLIST(leftv, leftv arg)
ideal idLift(ideal mod, ideal submod, ideal *rest, BOOLEAN goodShape, BOOLEAN isSB, BOOLEAN divide, matrix *unit, GbVariant alg)
int idElem(const ideal F)
count non-zero elements
static BOOLEAN jjNOT(leftv res, leftv v)
void scDegree(ideal S, intvec *modulweight, ideal Q)
static BOOLEAN jjCOEF(leftv res, leftv u, leftv v)
static BOOLEAN jjNAMES(leftv res, leftv v)
static FORCE_INLINE number n_Random(siRandProc p, number p1, number p2, const coeffs cf)
static BOOLEAN jjJACOB_M(leftv res, leftv a)
long p_DegW(poly p, const short *w, const ring R)
int iiArithFindCmd(const char *szName)
ideal twostd(ideal I)
Compute two-sided GB:
static BOOLEAN jjSQR_FREE(leftv res, leftv u)
static BOOLEAN jjLT_N(leftv res, leftv u, leftv v)
#define pIsConstant(p)
like above, except that Comp might be != 0
BOOLEAN jjStdJanetBasis(leftv res, leftv v, int flag)
flag: 0: JB, 1: SB
int iiArithRemoveCmd(char *szName)
static BOOLEAN jjSBA_2(leftv res, leftv v, leftv u, leftv t)
static BOOLEAN jjCALL1MANY(leftv res, leftv u)
static BOOLEAN jjrVarStr(leftv res, leftv v)
static BOOLEAN jjDEG(leftv res, leftv v)
static BOOLEAN jjROWS(leftv res, leftv v)
static BOOLEAN jjTIMES_P(leftv res, leftv u, leftv v)
BOOLEAN slGetDump(si_link l)
static BOOLEAN jjCOLON(leftv res, leftv u, leftv v)
#define pGetComp(p)
Component.
static FORCE_INLINE int n_ParDeg(number n, const coeffs r)
static BOOLEAN jjCALL1ARG(leftv res, leftv v)
static BOOLEAN jjPROC3(leftv res, leftv u, leftv v, leftv w)
matrix idDiffOp(ideal I, ideal J, BOOLEAN multiply)
void pNorm(poly p, const ring R=currRing)
FILE * feFopen(const char *path, const char *mode, char *where, short useWerror, short path_only)
static BOOLEAN jjFETCH_M(leftv res, leftv u)
static BOOLEAN jjHOMOG_P(leftv res, leftv u, leftv v)
void pRestoreDegProcs(ring r, pFDegProc old_FDeg, pLDegProc old_lDeg)
struct sValCmd3 * psValCmd3
void p_Normalize(poly p, const ring r)
static BOOLEAN jjBAREISS3(leftv res, leftv u, leftv v, leftv w)
int iiRegularity(lists L)
BOOLEAN jjWAIT1ST1(leftv res, leftv u)
static BOOLEAN jjDIV_BI(leftv res, leftv u, leftv v)
void newstruct_setup(const char *n, newstruct_desc d)
poly pSubstPar(poly p, int par, poly image)
ideal id_Matrix2Module(matrix mat, const ring R)
converts mat to module, destroys mat
#define idDelete(H)
delete an ideal
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced
static BOOLEAN jjHOMOG_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjRING3(leftv res, leftv u, leftv v, leftv w)
#define SI_LINK_SET_CLOSE_P(l)
#define nPower(a, b, res)
long(* pLDegProc)(poly p, int *length, ring r)
static BOOLEAN jjCHINREM_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjRESERVEDNAME(leftv res, leftv v)
static BOOLEAN jjUMINUS_N(leftv res, leftv u)
matrix mp_CoeffProc(poly f, poly vars, const ring R)
static BOOLEAN jjELIMIN_ALG(leftv res, leftv u, leftv v, leftv w)
ideal idSect(ideal h1, ideal h2, GbVariant alg)
#define MATELEM(mat, i, j)
static BOOLEAN jjGCD_I(leftv res, leftv u, leftv v)
static BOOLEAN jjTIMES_MA_N1(leftv res, leftv u, leftv v)
static BOOLEAN jjSYZ_2(leftv res, leftv u, leftv v)
int iiInitArithmetic()
initialisation of arithmetic structured data
static BOOLEAN jjBAREISS_BIM(leftv res, leftv v)
static BOOLEAN jjREPART(leftv res, leftv v)
static BOOLEAN rField_is_Domain(const ring r)
const char * lastreserved
void rChangeCurrRing(ring r)
#define TEST_OPT_DEGBOUND
static BOOLEAN jjHILBERT3(leftv res, leftv u, leftv v, leftv w)
ring rCompose(const lists L, const BOOLEAN check_comp=TRUE, const long bitmask=0x7fff)
poly nc_p_Bracket_qq(poly p, const poly q, const ring r)
returns [p,q], destroys p
static BOOLEAN jjEXECUTE(leftv, leftv v)
bool luInverse(const matrix aMat, matrix &iMat, const ring R)
This code first computes the LU-decomposition of aMat, and then calls the method for inverting a matr...
poly singclap_gcd(poly f, poly g, const ring r)
destroys f and g
static BOOLEAN jjTIMES_MA_P2(leftv res, leftv u, leftv v)
static BOOLEAN jjDIV_Ma(leftv res, leftv u, leftv v)
static BOOLEAN jjRING_1(leftv res, leftv u, leftv v)
int singclap_factorize_retry
static BOOLEAN jjBRACK_Ma(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjNAMEOF(leftv res, leftv v)
static BOOLEAN jjLU_INVERSE(leftv res, leftv v)
matrix mp_Coeffs(ideal I, int var, const ring R)
corresponds to Maple's coeffs: var has to be the number of a variable
static BOOLEAN jjSUBST_Test(leftv v, leftv w, int &ringvar, poly &monomexpr)
ideal idMultSect(resolvente arg, int length, GbVariant alg)
ideal kMin_std(ideal F, ideal Q, tHomog h, intvec **w, ideal &M, intvec *hilb, int syzComp, int reduced)
void id_Norm(ideal id, const ring r)
ideal id = (id[i]), result is leadcoeff(id[i]) = 1
static BOOLEAN jjRING_PL(leftv res, leftv a)
BOOLEAN iiMake_proc(idhdl pn, package pack, leftv sl)
BOOLEAN iiExprArith1(leftv res, leftv a, int op)
static BOOLEAN idHomIdeal(ideal id, ideal Q=NULL)
static BOOLEAN jjROWS_IV(leftv res, leftv v)
ideal id_ChineseRemainder(ideal *xx, number *q, int rl, const ring r)
#define pGetExp(p, i)
Exponent.
ideal idAdd(ideal h1, ideal h2)
h1 + h2
static BOOLEAN jjNUMERATOR(leftv res, leftv v)
Return the numerator of the input number NOTE: the input number is normalized as a side effect.
poly mp_Trace(matrix a, const ring R)
static BOOLEAN jjPFAC1(leftv res, leftv v)
static BOOLEAN jjCOMPARE_MA(leftv res, leftv u, leftv v)
static BOOLEAN jjCOUNT_BI(leftv res, leftv v)
idhdl enterid(const char *s, int lev, int t, idhdl *root, BOOLEAN init, BOOLEAN search)
static FORCE_INLINE number n_GetNumerator(number &n, const coeffs r)
return the numerator of n (if elements of r are by nature not fractional, result is n)
lists primeFactorisation(const number n, const int pBound)
Factorises a given bigint number n into its prime factors less than or equal to a given bound,...
static BOOLEAN jjJACOB_P(leftv res, leftv v)
static BOOLEAN jjHIGHCORNER(leftv res, leftv v)
long(* pFDegProc)(poly p, ring r)
static BOOLEAN jjWEDGE(leftv res, leftv u, leftv v)
static BOOLEAN jjKBASE(leftv res, leftv v)
static FORCE_INLINE char * nCoeffString(const coeffs cf)
TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar.
static BOOLEAN jjROWS_BIM(leftv res, leftv v)
syStrategy syResolution(ideal arg, int maxlength, intvec *w, BOOLEAN minim)
static BOOLEAN jjEQUAL_P(leftv res, leftv u, leftv v)
static BOOLEAN jjCOEFFS_Id(leftv res, leftv u, leftv v)
static BOOLEAN jjINTERSECT3(leftv res, leftv u, leftv v, leftv w)
poly singclap_det(const matrix m, const ring s)
static BOOLEAN jjKLAMMER_PL(leftv res, leftv u)
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from to such that is mapped onto
BOOLEAN yyInRingConstruction
static BOOLEAN jjidHead(leftv res, leftv v)
ideal scKBase(int deg, ideal s, ideal Q, intvec *mv)
static BOOLEAN jjSTD_HILB_WP(leftv res, leftv INPUT)
static BOOLEAN jjSort_Id(leftv res, leftv v)
static BOOLEAN jjSTATUS2(leftv res, leftv u, leftv v)
BOOLEAN rIsLikeOpposite(ring rBase, ring rCandidate)
checks whether rings rBase and rCandidate could be opposite to each other returns TRUE if it is so
ideal singclap_factorize(poly f, intvec **v, int with_exps, const ring r)
ideal sm_CallSolv(ideal I, const ring R)
static BOOLEAN jjREDUCE3_ID(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjEXTGCD_I(leftv res, leftv u, leftv v)
static BOOLEAN iiExprArith3TabIntern(leftv res, int op, leftv a, leftv b, leftv c, const struct sValCmd3 *dA3, int at, int bt, int ct, const struct sConvertTypes *dConvertTypes)
static BOOLEAN jjSTRING_PL(leftv res, leftv v)
BOOLEAN(* proc2)(leftv, leftv, leftv)
static BOOLEAN jjFAC_P(leftv res, leftv u)
static BOOLEAN jjINTVEC_PL(leftv res, leftv v)
static BOOLEAN jjRSUM(leftv res, leftv u, leftv v)
matrix mp_InitP(int r, int c, poly p, const ring R)
make it a p * unit matrix
void id_DelDiv(ideal id, const ring r)
delete id[j], if LT(j) == coeff*mon*LT(i) and vice versa, i.e., delete id[i], if LT(i) == coeff*mon*L...
poly p_Homogen(poly p, int varnum, const ring r)
const struct sValCmd2 dArith2[]
static BOOLEAN jjDUMMY(leftv res, leftv u)
BOOLEAN iiExprArithM(leftv res, leftv a, int op)
static BOOLEAN jjOPPOSITE(leftv res, leftv a)
BOOLEAN idInsertPoly(ideal h1, poly h2)
insert h2 into h1 (if h2 is not the zero polynomial) return TRUE iff h2 was indeed inserted
short * iv2array(intvec *iv, const ring R)
bool luSolveViaLUDecomp(const matrix pMat, const matrix lMat, const matrix uMat, const matrix bVec, matrix &xVec, matrix &H)
Solves the linear system A * x = b, where A is an (m x n)-matrix which is given by its LU-decompositi...
static BOOLEAN length(leftv result, leftv arg)
void omPrintInfo(FILE *fd)
poly singclap_pdivide(poly f, poly g, const ring r)
static BOOLEAN jjDEG_M(leftv res, leftv u)
static BOOLEAN jjSBA_1(leftv res, leftv v, leftv u)
static BOOLEAN jjVARSTR2(leftv res, leftv u, leftv v)
ideal idModulo(ideal h2, ideal h1, tHomog hom, intvec **w)
lists ipNameListLev(idhdl root, int lev)
ideal getMinorIdealHeuristic(const matrix mat, const int minorSize, const int k, const ideal iSB, const bool allDifferent)
Returns the specified set of minors (= subdeterminantes) of the given matrix.
ideal idQuot(ideal h1, ideal h2, BOOLEAN h1IsStb, BOOLEAN resultIsIdeal)
static BOOLEAN jjLOAD_E(leftv, leftv v, leftv u)
static BOOLEAN jjidMinBase(leftv res, leftv v)
static BOOLEAN jjGE_I(leftv res, leftv u, leftv v)
static BOOLEAN jjMINRES_R(leftv res, leftv v)
ideal walkProc(leftv first, leftv second)
BOOLEAN mpKoszul(leftv res, leftv c, leftv b, leftv id)
leftv slRead(si_link l, leftv a)
static BOOLEAN jjRINGLIST(leftv res, leftv v)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
intvec * ivSub(intvec *a, intvec *b)
static BOOLEAN jjDIVISION(leftv res, leftv u, leftv v)
static BOOLEAN jjMATRIX_Mo(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjTIMES_BIM(leftv res, leftv u, leftv v)
void idLiftW(ideal P, ideal Q, int n, matrix &T, ideal &R, short *w)
ideal idMinBase(ideal h1)
static BOOLEAN jjDIVISION4(leftv res, leftv v)
static BOOLEAN jjTYPEOF(leftv res, leftv v)
static BOOLEAN jjTIMES_IV(leftv res, leftv u, leftv v)
static BOOLEAN jjPLUS_N(leftv res, leftv u, leftv v)
static BOOLEAN jjCOEFFS3_Id(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjDIFF_P(leftv res, leftv u, leftv v)
BOOLEAN jjSORTLIST(leftv, leftv arg)
const char * slStatus(si_link l, const char *request)
int scMultInt(ideal S, ideal Q)
static BOOLEAN jjMONOM(leftv res, leftv v)
number ntDiff(number a, number d, const coeffs cf)
static BOOLEAN jjSYZYGY(leftv res, leftv v)
const CanonicalForm CFMap CFMap & N
BOOLEAN iiExprArith1Tab(leftv res, leftv a, int op, const struct sValCmd1 *dA1, int at, const struct sConvertTypes *dConvertTypes)
apply an operation 'op' to an argument a return TRUE on failure
void id_Shift(ideal M, int s, const ring r)
BOOLEAN idTestHomModule(ideal m, ideal Q, intvec *w)
static BOOLEAN jjSUBST_Id(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN rField_is_Zp_a(const ring r)
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
static BOOLEAN jjLU_SOLVE(leftv res, leftv v)
static BOOLEAN jjIDEAL_Ma(leftv res, leftv v)
static FORCE_INLINE number n_Param(const int iParameter, const coeffs r)
return the (iParameter^th) parameter as a NEW number NOTE: parameter numbering: 1....
static BOOLEAN jjSTATUS2L(leftv res, leftv u, leftv v)
BOOLEAN sdb_set_breakpoint(const char *pp, int given_lineno)
void printBlackboxTypes()
list all defined type (for debugging)
static BOOLEAN jjCOUNT_M(leftv res, leftv v)
static BOOLEAN jjrParStr(leftv res, leftv v)
static BOOLEAN jjLE_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjCOUNT_RES(leftv res, leftv v)
static BOOLEAN jjPlural_num_poly(leftv res, leftv a, leftv b)
Class used for (list of) interpreter objects.
BOOLEAN slOpen(si_link l, short flag, leftv h)
LINLINE number nlInit(long i, const coeffs r)
static BOOLEAN jjOP_REST(leftv res, leftv u, leftv v)
static BOOLEAN jjKERNEL(leftv res, leftv u, leftv v)
static BOOLEAN jjMINUS_BIM(leftv res, leftv u, leftv v)
static BOOLEAN jjJET_P_IV(leftv res, leftv u, leftv v, leftv w)
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
static BOOLEAN jjidElem(leftv res, leftv v)
static BOOLEAN jjREDUCE3_CP(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjTIMES_MA(leftv res, leftv u, leftv v)
struct sValCmd2 * psValCmd2
int rSum(ring r1, ring r2, ring &sum)
intvec * ivTranp(intvec *o)
int scDimInt(ideal S, ideal Q)
poly pOppose(ring Rop_src, poly p, const ring Rop_dst)
opposes a vector p from Rop to currRing (dst!)
static BOOLEAN jjINDEX_I(leftv res, leftv u, leftv v)
BOOLEAN maApplyFetch(int what, map theMap, leftv res, leftv w, ring preimage_r, int *perm, int *par_perm, int P, nMapFunc nMap)
SModulFunc_t iiGetBuiltinModInit(const char *libname)
static BOOLEAN jjHILBERT_IV(leftv res, leftv v)
const char * iiTwoOps(int t)
static BOOLEAN jjRES3(leftv res, leftv u, leftv v, leftv w)
static long pTotaldegree(poly p)
static BOOLEAN jjFACSTD2(leftv res, leftv v, leftv w)
static BOOLEAN jjUMINUS_BI(leftv res, leftv u)
matrix idCoeffOfKBase(ideal arg, ideal kbase, poly how)
bigintmat * bimMult(bigintmat *a, bigintmat *b)
static BOOLEAN jjCOEFFS2_KB(leftv res, leftv u, leftv v)
static BOOLEAN jjLOAD2(leftv, leftv, leftv v)
static BOOLEAN jjDET(leftv res, leftv v)
bigintmat * bimSub(bigintmat *a, bigintmat *b)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static BOOLEAN jjTIMES_MA_I2(leftv res, leftv u, leftv v)
static unsigned pLength(poly a)
static BOOLEAN jjJanetBasis(leftv res, leftv v)
ideal maGetPreimage(ring theImageRing, map theMap, ideal id, const ring dst_r)
ring rDefault(const coeffs cf, int N, char **n, int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl, unsigned long bitmask)
#define omRealloc(addr, size)
int r_IsRingVar(const char *n, char **names, int N)
static BOOLEAN jjERROR(leftv, leftv u)
static BOOLEAN jjFRES3(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjWAIT1ST2(leftv res, leftv u, leftv v)
static BOOLEAN jjSLIM_GB(leftv res, leftv u)
static BOOLEAN jjRANDOM(leftv res, leftv u, leftv v)
static BOOLEAN jjTEST(leftv, leftv v)
static BOOLEAN jjSUBST_Id_I(leftv res, leftv u, leftv v, leftv w)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
static BOOLEAN jjNVARS(leftv res, leftv v)
void sm_CallBareiss(ideal I, int x, int y, ideal &M, intvec **iv, const ring R)
static BOOLEAN jjDIFF_ID_ID(leftv res, leftv u, leftv v)
resolvente syResolvente(ideal arg, int maxlength, int *length, intvec ***weights, BOOLEAN minim)
static BOOLEAN jjLT_I(leftv res, leftv u, leftv v)
static BOOLEAN jjPLUS_I(leftv res, leftv u, leftv v)
static BOOLEAN jjRANK2(leftv res, leftv u, leftv v)
static BOOLEAN check_valid(const int p, const int op)
const struct sValCmdM dArithM[]
static FORCE_INLINE number n_Add(number a, number b, const coeffs r)
return the sum of 'a' and 'b', i.e., a+b
static short rVar(const ring r)
#define rVar(r) (r->N)
static BOOLEAN jjGCD_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjLIFT3(leftv res, leftv u, leftv v, leftv w)
static long p_MinComp(poly p, ring lmRing, ring tailRing)
static BOOLEAN jjGT_N(leftv res, leftv u, leftv v)
static BOOLEAN jjMULT(leftv res, leftv v)
static BOOLEAN rField_is_Ring_Z(const ring r)
static BOOLEAN jjDIV_N(leftv res, leftv u, leftv v)
intvec * ivCopy(const intvec *o)
BOOLEAN rHasLocalOrMixedOrdering(const ring r)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
BOOLEAN rDecompose_CF(leftv res, const coeffs C)
matrix mp_Wedge(matrix a, int ar, const ring R)
int iiArithAddCmd(const char *szName, short nAlias, short nTokval, short nToktype, short nPos=-1)
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
void show(int mat=0, int spaces=0) const
static BOOLEAN jjTRACE_IV(leftv res, leftv v)
static BOOLEAN idIsZeroDim(ideal i)
static BOOLEAN jjBRACK_Ma_I_IV(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN rField_is_Q_a(const ring r)
static BOOLEAN jjCOLS_BIM(leftv res, leftv v)
#define pLmFreeAndNext(p)
assumes p != NULL, deletes p, returns pNext(p)
static BOOLEAN jjVDIM(leftv res, leftv v)
static BOOLEAN jjMINUS_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjSTD_1(leftv res, leftv u, leftv v)
static BOOLEAN jjTIMES_MA_N2(leftv res, leftv u, leftv v)
static BOOLEAN jjL2R(leftv res, leftv v)
BOOLEAN iiLoadLIB(FILE *fp, const char *libnamebuf, const char *newlib, idhdl pl, BOOLEAN autoexport, BOOLEAN tellerror)
int syDim(syStrategy syzstr)
int compare(const bigintmat *op) const
void monitor(void *F, int mode)
syStrategy syConvList(lists li)
static BOOLEAN jjRINGLIST_C(leftv res, leftv v)
void PrintS(const char *s)
void id_DelLmEquals(ideal id, const ring r)
Delete id[j], if Lm(j) == Lm(i) and both LC(j), LC(i) are units and j > i.
static BOOLEAN jjCOUNT_N(leftv res, leftv v)
#define omFreeSize(addr, size)
int compare(const intvec *o) const
static BOOLEAN jjUMINUS_BIM(leftv res, leftv u)
static BOOLEAN jjmpTrace(leftv res, leftv v)
static BOOLEAN jjAND_I(leftv res, leftv u, leftv v)
static BOOLEAN jjPOWER_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjKLAMMER(leftv res, leftv u, leftv v)
static BOOLEAN jjDET_BI(leftv res, leftv v)
static BOOLEAN jjMATRIX_Id(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjRESERVED0(leftv, leftv)
static BOOLEAN jjINDEX_IV(leftv res, leftv u, leftv v)
syStrategy syHilb(ideal arg, int *length)
static BOOLEAN jjRING_2(leftv res, leftv u, leftv v, leftv w)
BOOLEAN(* proc3)(leftv, leftv, leftv, leftv)
static BOOLEAN jjCOEFFS3_KB(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjHOMOG_ID_W(leftv res, leftv u, leftv v, leftv)
ideal t_rep_gb(const ring r, ideal arg_I, int syz_comp, BOOLEAN F4_mode)
static BOOLEAN jjRANK1(leftv res, leftv v)
static BOOLEAN jjTIMES_MA_BI1(leftv res, leftv u, leftv v)
static BOOLEAN jjINDEX_V_IV(leftv res, leftv u, leftv v)
static BOOLEAN jjTIMES_MA_P1(leftv res, leftv u, leftv v)
void syMake(leftv v, const char *id, package pa)
static BOOLEAN jjDIFF_COEF(leftv res, leftv u, leftv v)
const struct sValCmd3 dArith3[]
static FORCE_INLINE number n_RePart(number i, const coeffs cf)
static BOOLEAN jjTIMES_BI(leftv res, leftv u, leftv v)
void omPrintBinStats(FILE *fd)
BOOLEAN iiExport(leftv v, int toLev)
static BOOLEAN jjSIMPL_P(leftv res, leftv u, leftv v)
matrix mp_Transp(matrix a, const ring R)
BOOLEAN slPrepClose(si_link l)
static BOOLEAN jjpLength(leftv res, leftv v)
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
static BOOLEAN jjPLUS_BIM(leftv res, leftv u, leftv v)
static BOOLEAN jjLEADCOEF(leftv res, leftv v)
static BOOLEAN rField_is_Ring(const ring r)
void henselFactors(const int xIndex, const int yIndex, const poly h, const poly f0, const poly g0, const int d, poly &f, poly &g)
Computes a factorization of a polynomial h(x, y) in K[[x]][y] up to a certain degree in x,...
void omPrintStats(FILE *fd)
void id_DelEquals(ideal id, const ring r)
ideal id = (id[i]) if id[i] = id[j] then id[j] is deleted for j > i
char * iiConvName(const char *libname)
static BOOLEAN jjNAMES0(leftv res, leftv)
matrix id_Module2Matrix(ideal mod, const ring R)
static BOOLEAN jjUMINUS_MA(leftv res, leftv u)
static BOOLEAN jjKoszul_Id(leftv res, leftv u, leftv v)
static BOOLEAN jjUMINUS_I(leftv res, leftv u)
static BOOLEAN jjGCD_P(leftv res, leftv u, leftv v)
matrix mp_MultI(matrix a, int f, const ring R)
c = f*a
BOOLEAN load_modules(const char *newlib, char *fullname, BOOLEAN autoexport)
newstruct_desc newstructChildFromString(const char *parent, const char *s)
ideal idMinEmbedding(ideal arg, BOOLEAN inPlace, intvec **w)
void iiMakeResolv(resolvente r, int length, int rlen, char *name, int typ0, intvec **weights)
static BOOLEAN jjLIFTSTD_4(leftv res, leftv U)
bigintmat * bimAdd(bigintmat *a, bigintmat *b)
Matrix-Add/-Sub/-Mult so oder mit operator+/-/* ? @Note: NULL as a result means an error (non-compati...
static BOOLEAN jjMODULO(leftv res, leftv u, leftv v)
static BOOLEAN jjREDUCE_P(leftv res, leftv u, leftv v)
static BOOLEAN jjEXTGCD_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjPRIME(leftv res, leftv v)
static BOOLEAN jjCOEFFS3_P(leftv res, leftv u, leftv v, leftv w)
BOOLEAN iiExprArith3Tab(leftv res, leftv a, int op, const struct sValCmd3 *dA3, int at, const struct sConvertTypes *dConvertTypes)
apply an operation 'op' to arguments a, a->next and a->next->next return TRUE on failure
static int iin_Int(number &n, coeffs cf)
static BOOLEAN jjOP_BIM_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjPOWER_P(leftv res, leftv u, leftv v)
static BOOLEAN jjLOAD1(leftv, leftv v)
static BOOLEAN jjstrlen(leftv res, leftv v)
lists rDecompose(const ring r)
static BOOLEAN jjRPAR(leftv res, leftv v)
ideal idSeries(int n, ideal M, matrix U, intvec *w)
lists ipNameList(idhdl root)
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
static BOOLEAN jjINDEX_V(leftv res, leftv u, leftv v)
static BOOLEAN jjBAREISS(leftv res, leftv v)
int singclap_det_i(intvec *m, const ring)
#define pInit()
allocates a new monomial and initializes everything to 0
static BOOLEAN jjFAREY_LI(leftv res, leftv u, leftv v)
static BOOLEAN jjCONTRACT(leftv res, leftv u, leftv v)
static BOOLEAN jjINTERPOLATION(leftv res, leftv l, leftv v)
static BOOLEAN jjDET_I(leftv res, leftv v)
void atSet(idhdl root, char *name, void *data, int typ)
ideal idSubstPar(ideal id, int n, poly e)
ideal id_Jet(const ideal i, int d, const ring R)
int(* SModulFunc_t)(SModulFunctions *)
BOOLEAN setOption(leftv res, leftv v)
static BOOLEAN jjIMPART(leftv res, leftv v)
static BOOLEAN jjMAP(leftv res, leftv u, leftv v)
int blackboxIsCmd(const char *n, int &tok)
used by scanner: returns ROOT_DECL for known types (and the type number in tok)
BOOLEAN jjLOAD(const char *s, BOOLEAN autoexport)
load lib/module given in v
unsigned nLastIdentifier
valid indentifieres are slot 1..nLastIdentifier
static BOOLEAN jjLEADMONOM(leftv res, leftv v)
static BOOLEAN jjREDUCE5(leftv res, leftv u)
static BOOLEAN jjMINUS_I(leftv res, leftv u, leftv v)
static BOOLEAN jjHILBERT2(leftv res, leftv u, leftv v)
poly p_Cleardenom(poly p, const ring r)
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
ideal interpolation(const std::vector< ideal > &L, intvec *v)
static BOOLEAN jjBRACK_Ma_IV_I(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjBI2IM(leftv res, leftv u)
static BOOLEAN jjOPTION_PL(leftv res, leftv v)
static void jjEQUAL_REST(leftv res, leftv u, leftv v)
static int rPar(const ring r)
(r->cf->P)
matrix pMultMp(poly p, matrix a, const ring R)
ideal idElimination(ideal h1, poly delVar, intvec *hilb, GbVariant alg)
static BOOLEAN jjpMaxComp(leftv res, leftv v)
int p_Compare(const poly a, const poly b, const ring R)
syStrategy syLaScala3(ideal arg, int *length)
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
static BOOLEAN jjCOMPARE_S(leftv res, leftv u, leftv v)
static BOOLEAN jjPLUS_P_MA(leftv res, leftv u, leftv v)
static BOOLEAN jjRANDOM_Im(leftv res, leftv u, leftv v, leftv w)
syStrategy sySchreyer(ideal arg, int maxlength)
static BOOLEAN jjEXTGCD_P(leftv res, leftv u, leftv v)
static BOOLEAN jjSTD(leftv res, leftv v)
static BOOLEAN jjidFreeModule(leftv res, leftv v)
static BOOLEAN jjJET4(leftv res, leftv u)
static BOOLEAN jjDIFF_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjCOUNT_IV(leftv res, leftv v)
static BOOLEAN jjBRACK_Im(leftv res, leftv u, leftv v, leftv w)
lists scIndIndset(ideal S, BOOLEAN all, ideal Q)
static BOOLEAN jjQRDS(leftv res, leftv INPUT)
static BOOLEAN jjBI2N(leftv res, leftv u)
static BOOLEAN jjpHead(leftv res, leftv v)
static BOOLEAN jjNULL(leftv, leftv)
static void WerrorS_dummy(const char *)
static BOOLEAN jjPOWER_N(leftv res, leftv u, leftv v)
static BOOLEAN jjTIMES_MA_BI2(leftv res, leftv u, leftv v)
static BOOLEAN jjMATRIX_Ma(leftv res, leftv u, leftv v, leftv w)
lib_types type_of_LIB(const char *newlib, char *libnamebuf)
static BOOLEAN jjPLUS_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjBRACKET(leftv res, leftv a, leftv b)
static BOOLEAN jjELIMIN_HILB(leftv res, leftv u, leftv v, leftv w)
int iiTestConvert(int inputType, int outputType)
static BOOLEAN jjEQUAL_R(leftv res, leftv u, leftv v)
BOOLEAN jjLIST_PL(leftv res, leftv v)
syStrategy syKosz(ideal arg, int *length)
BOOLEAN iiExprArith3(leftv res, int op, leftv a, leftv b, leftv c)
int ipower(int b, int m)
int ipower ( int b, int m )
static BOOLEAN jjDENOMINATOR(leftv res, leftv v)
Return the denominator of the input number NOTE: the input number is normalized as a side effect.
static BOOLEAN jjIm2Iv(leftv res, leftv v)
static BOOLEAN jjGT_BI(leftv res, leftv u, leftv v)
static FORCE_INLINE BOOLEAN nCoeff_is_Extension(const coeffs r)
static BOOLEAN jjORD(leftv res, leftv v)
void CleanUp(ring r=currRing)
static BOOLEAN jjidTransp(leftv res, leftv v)
static FORCE_INLINE number n_InpNeg(number n, const coeffs r)
in-place negation of n MUST BE USED: n = n_InpNeg(n) (no copy is returned)
static BOOLEAN jjLIFTSTD(leftv res, leftv u, leftv v)
intvec * bim2iv(bigintmat *b)
static BOOLEAN jjDIM_R(leftv res, leftv v)
static BOOLEAN jjCHINREM_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjGT_I(leftv res, leftv u, leftv v)
poly p_Series(int n, poly p, poly u, intvec *w, const ring R)
ideal id_Power(ideal given, int exp, const ring r)
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
static FORCE_INLINE BOOLEAN nCoeff_is_transExt(const coeffs r)
TRUE iff r represents a transcendental extension field.
#define TEST_OPT_RETURN_SB
int n_IsParam(const number m, const ring r)
TODO: rewrite somehow...
matrix mpNew(int r, int c)
create a r x c zero-matrix
static BOOLEAN jjDIM(leftv res, leftv v)
void p_Shift(poly *p, int i, const ring r)
shifts components of the vector p by i
#define pLmInit(p)
like pInit, except that expvector is initialized to that of p, p must be != NULL
ideal fractalWalkProc(leftv first, leftv second)
static BOOLEAN jjFactModD_M(leftv res, leftv v)
static BOOLEAN jjUMINUS_IV(leftv res, leftv u)
static BOOLEAN jjrCharStr(leftv res, leftv v)
static BOOLEAN jjBRACK_Ma_IV_IV(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjPAR1(leftv res, leftv v)
static BOOLEAN jjMONITOR1(leftv res, leftv v)
bool luInverseFromLUDecomp(const matrix pMat, const matrix lMat, const matrix uMat, matrix &iMat, const ring R)
This code computes the inverse by inverting lMat and uMat, and then performing two matrix multiplicat...
const char * Tok2Cmdname(int tok)
static BOOLEAN jjCOMPARE_P(leftv res, leftv u, leftv v)
static BOOLEAN jjREDUCE4(leftv res, leftv u)
static BOOLEAN jjNEWSTRUCT2(leftv, leftv u, leftv v)
static BOOLEAN jjVARSTR1(leftv res, leftv v)
static BOOLEAN jjTRANSP_BIM(leftv res, leftv v)
void mp_Coef2(poly v, poly mon, matrix *c, matrix *m, const ring R)
corresponds to Macauley's coef: the exponent vector of vars has to contain the variables,...
static BOOLEAN jjPREIMAGE_R(leftv res, leftv v)
static FORCE_INLINE number n_Farey(number a, number b, const coeffs r)
static BOOLEAN jjREDUCE_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjP2BI(leftv res, leftv v)
int exprlist_length(leftv v)
BOOLEAN jjANY2LIST(leftv res, leftv v, int cnt)
intvec * ivMult(intvec *a, intvec *b)
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
static BOOLEAN jjPLUS_S(leftv res, leftv u, leftv v)
intvec * hSecondSeries(intvec *hseries1)
static BOOLEAN jjCOMPARE_IV_I(leftv res, leftv u, leftv v)
intvec * scIndIntvec(ideal S, ideal Q)
static BOOLEAN jjTIMES_ID(leftv res, leftv u, leftv v)
BOOLEAN iiExprArith2Tab(leftv res, leftv a, int op, const struct sValCmd2 *dA2, int at, const struct sConvertTypes *dConvertTypes)
apply an operation 'op' to arguments a and a->next return TRUE on failure
static BOOLEAN jjCOUNT_BIM(leftv res, leftv v)
static BOOLEAN jjPARSTR2(leftv res, leftv u, leftv v)
static FORCE_INLINE number n_Sub(number a, number b, const coeffs r)
return the difference of 'a' and 'b', i.e., a-b
static BOOLEAN jjIS_RINGVAR_P(leftv res, leftv v)
#define pIsUnit(p)
return true if the Lm is a constant <>0
static BOOLEAN jjGE_BI(leftv res, leftv u, leftv v)
char * iiArithGetCmd(int nPos)
cmdnames * sCmds
array of existing commands
static BOOLEAN jjrOrdStr(leftv res, leftv v)
BOOLEAN jjPROC(leftv res, leftv u, leftv v)
static BOOLEAN jjPLUS_MA_P(leftv res, leftv u, leftv v)
poly pSubstPoly(poly p, int var, poly image)
static Subexpr jjMakeSub(leftv e)
static BOOLEAN jjIS_RINGVAR0(leftv res, leftv)
static BOOLEAN jjSUBST_Id_X(leftv res, leftv u, leftv v, leftv w, int input_type)
static BOOLEAN jjCOMPARE_BIM(leftv res, leftv u, leftv v)
matrix mp_Mult(matrix a, matrix b, const ring R)
static BOOLEAN jjINTERRED(leftv res, leftv v)
static BOOLEAN jjDIM2(leftv res, leftv v, leftv w)
idhdl rFindHdl(ring r, idhdl n)
static BOOLEAN jjINTERSECT(leftv res, leftv u, leftv v)
static BOOLEAN jjPOWER_I(leftv res, leftv u, leftv v)
static BOOLEAN jjREAD2(leftv res, leftv u, leftv v)
#define IMATELEM(M, I, J)
static BOOLEAN jjPLUS_MA(leftv res, leftv u, leftv v)
static BOOLEAN jjLEADEXP(leftv res, leftv v)
void hLookSeries(ideal S, intvec *modulweight, ideal Q, intvec *wdegree, ring tailRing)
static void p_Delete(poly *p, const ring r)
static BOOLEAN jjCALL3ARG(leftv res, leftv u)
static BOOLEAN jjMINUS_IV(leftv res, leftv u, leftv v)
int IsCmd(const char *n, int &tok)
number singclap_det_bi(bigintmat *m, const coeffs cf)
static BOOLEAN jjDelete_IV(leftv res, leftv u, leftv v)
static int iiTabIndex(const jjValCmdTab dArithTab, const int len, const int op)
intvec * hFirstSeries(ideal S, intvec *modulweight, ideal Q, intvec *wdegree, ring tailRing)
static BOOLEAN rField_is_numeric(const ring r)
static BOOLEAN jjALIGN_V(leftv res, leftv u, leftv v)
static BOOLEAN jjFAC_P2(leftv res, leftv u, leftv dummy)
static BOOLEAN jjUNIVARIATE(leftv res, leftv v)
static BOOLEAN jjINDEX_P(leftv res, leftv u, leftv v)
static FORCE_INLINE number n_ImPart(number i, const coeffs cf)
static BOOLEAN jjGETDUMP(leftv, leftv v)
static BOOLEAN jjIDEAL_R(leftv res, leftv v)
static BOOLEAN jjOP_I_IV(leftv res, leftv u, leftv v)
static BOOLEAN rField_is_GF(const ring r)
BOOLEAN singclap_extgcd(poly f, poly g, poly &res, poly &pa, poly &pb, const ring r)
static BOOLEAN jjMONITOR2(leftv res, leftv u, leftv v)
static BOOLEAN jjREDUCE3_P(leftv res, leftv u, leftv v, leftv w)
ring rInit(leftv pn, leftv rv, leftv ord)
static BOOLEAN jjUMINUS_P(leftv res, leftv u)
ideal id_Delete_Pos(const ideal I, const int p, const ring r)
static BOOLEAN jjGCD_N(leftv res, leftv u, leftv v)
BOOLEAN nc_CallPlural(matrix cc, matrix dd, poly cn, poly dn, ring r, bool bSetupQuotient, bool bCopyInput, bool bBeQuiet, ring curr, bool dummy_ring=false)
returns TRUE if there were errors analyze inputs, check them for consistency detects nc_type,...
static BOOLEAN jjJET_P(leftv res, leftv u, leftv v)
static BOOLEAN jjMINUS_N(leftv res, leftv u, leftv v)
static BOOLEAN jjCOLCOL(leftv res, leftv u, leftv v)
static BOOLEAN jjCOUNT_L(leftv res, leftv v)
static BOOLEAN jjCOLS_IV(leftv res, leftv v)
static BOOLEAN jjEQUAL_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjP2N(leftv res, leftv v)
BOOLEAN iiExprArith2(leftv res, leftv a, int op, leftv b, BOOLEAN proccall)
ideal idLiftStd(ideal h1, matrix *ma, tHomog hi, ideal *syz, GbVariant alg)
static BOOLEAN jjSIMPL_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjJanetBasis2(leftv res, leftv u, leftv v)
matrix mp_MultP(matrix a, poly p, const ring R)
multiply a matrix 'a' by a poly 'p', destroy the args
static BOOLEAN jjDEGREE(leftv res, leftv v)
static int si_max(const int a, const int b)
struct sValCmd1 * psValCmd1
ideal getMinorIdealCache(const matrix mat, const int minorSize, const int k, const ideal iSB, const int cacheStrategy, const int cacheN, const int cacheW, const bool allDifferent)
Returns the specified set of minors (= subdeterminantes) of the given matrix.
static BOOLEAN jjPREIMAGE(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjLU_DECOMP(leftv res, leftv v)
leftv iiMap(map theMap, const char *what)
static BOOLEAN jjLE_I(leftv res, leftv u, leftv v)
void pSetDegProcs(ring r, pFDegProc new_FDeg, pLDegProc new_lDeg)
BOOLEAN iiTryLoadLib(leftv v, const char *id)
static BOOLEAN jjCALL2ARG(leftv res, leftv u)
static BOOLEAN jjnlInt(leftv res, leftv u)
#define SI_RESTORE_OPT2(A)
poly singclap_pmod(poly f, poly g, const ring r)
static BOOLEAN jjDIVMOD_I(leftv res, leftv u, leftv v)
static BOOLEAN jjJET_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjREGULARITY(leftv res, leftv v)
ideal id_JetW(const ideal i, int d, intvec *iv, const ring R)
ideal id_Vec2Ideal(poly vec, const ring R)
static BOOLEAN jjOR_I(leftv res, leftv u, leftv v)
static BOOLEAN jjINDEPSET(leftv res, leftv v)
static BOOLEAN jjTRANSP_IV(leftv res, leftv v)
static BOOLEAN jjSTATUS3(leftv res, leftv u, leftv v, leftv w)
ideal syMinBase(ideal arg)
static BOOLEAN jjPLUS_IV(leftv res, leftv u, leftv v)
int sySize(syStrategy syzstr)
static BOOLEAN jjENVELOPE(leftv res, leftv a)
static BOOLEAN jjPLUSMINUS_Gen(leftv res, leftv u, leftv v)
void * atGet(idhdl root, const char *name, int t, void *defaultReturnValue)
static BOOLEAN jjREAD(leftv res, leftv v)
static BOOLEAN jjCHAR(leftv res, leftv v)
BOOLEAN mp_IsDiagUnit(matrix U, const ring R)
void Werror(const char *fmt,...)
BOOLEAN slClose(si_link l)
static BOOLEAN jjJET_ID_M(leftv res, leftv u, leftv v, leftv w)
syStrategy syFrank(const ideal arg, const int length, const char *method, const bool use_cache=true, const bool use_tensor_trick=false)
ideal idInit(int idsize, int rank)
initialise an ideal / module
static BOOLEAN jjDIV_P(leftv res, leftv u, leftv v)
static BOOLEAN jjSTATUS_M(leftv res, leftv v)
static BOOLEAN jjHOMOG_P_W(leftv res, leftv u, leftv v, leftv)
static BOOLEAN jjHIGHCORNER_M(leftv res, leftv v)
static BOOLEAN jjSUBST_P(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjBRACK_S(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjSQR_FREE2(leftv res, leftv u, leftv dummy)
static BOOLEAN idHomModule(ideal m, ideal Q, intvec **w)
static BOOLEAN jjDET_S(leftv res, leftv v)
static FORCE_INLINE BOOLEAN n_GreaterZero(number n, const coeffs r)
ordered fields: TRUE iff 'n' is positive; in Z/pZ: TRUE iff 0 < m <= roundedBelow(p/2),...
static SArithBase sArithBase
Base entry for arithmetic.
static BOOLEAN jjFETCH(leftv res, leftv u, leftv v)
static BOOLEAN jjDOTDOT(leftv res, leftv u, leftv v)
BOOLEAN assumeStdFlag(leftv h)
static BOOLEAN jjOP_I_IM(leftv res, leftv u, leftv v)
static BOOLEAN jjPARSTR1(leftv res, leftv v)
static BOOLEAN jjTWOSTD(leftv res, leftv a)
static BOOLEAN jjSUBST_M(leftv res, leftv u)
static FORCE_INLINE number n_Gcd(number a, number b, const coeffs r)
in Z: return the gcd of 'a' and 'b' in Z/nZ, Z/2^kZ: computed as in the case Z in Z/pZ,...
static BOOLEAN jjBI2P(leftv res, leftv u)
void WerrorS(const char *s)
#define pEqualPolys(p1, p2)
static BOOLEAN jjFIND3(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjPlural_mat_poly(leftv res, leftv a, leftv b)
static BOOLEAN jjPRUNE(leftv res, leftv v)
unsigned nCmdAllocated
number of commands-slots allocated
matrix mp_Add(matrix a, matrix b, const ring R)
BOOLEAN slDump(si_link l)
static BOOLEAN jjFIND2(leftv res, leftv u, leftv v)
char * rCharStr(const ring r)
TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar.
static BOOLEAN jjEQUAL_Ma(leftv res, leftv u, leftv v)
void(* WerrorS_callback)(const char *s)
static BOOLEAN jjVAR1(leftv res, leftv v)
poly iiHighCorner(ideal I, int ak)
static BOOLEAN jjIS_RINGVAR_S(leftv res, leftv v)
void mp_Monomials(matrix c, int r, int var, matrix m, const ring R)
static FORCE_INLINE BOOLEAN n_DivBy(number a, number b, const coeffs r)
test whether 'a' is divisible 'b'; for r encoding a field: TRUE iff 'b' does not represent zero in Z:...
static FORCE_INLINE number n_ChineseRemainderSym(number *a, number *b, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs r)
BOOLEAN mp_Equal(matrix a, matrix b, const ring R)
newstruct_desc newstructFromString(const char *s)
static BOOLEAN jjMOD_BI(leftv res, leftv u, leftv v)
#define pLmDelete(p)
assume p != NULL, deletes Lm(p)->coef and Lm(p)
ideal kSba(ideal F, ideal Q, tHomog h, intvec **w, int sbaOrder, int arri, intvec *hilb, int syzComp, int newIdeal, intvec *vw)
static FORCE_INLINE char * nCoeffName(const coeffs cf)
static BOOLEAN jjCOLS(leftv res, leftv v)
static BOOLEAN jjBREAK0(leftv, leftv)
poly sm_CallDet(ideal I, const ring R)
static BOOLEAN jjMINOR_M(leftv res, leftv v)
static BOOLEAN jjPROC1(leftv res, leftv u)
ideal idSyzygies(ideal h1, tHomog h, intvec **w, BOOLEAN setSyzComp, BOOLEAN setRegularity, int *deg, GbVariant alg)
static BOOLEAN jjLIFT(leftv res, leftv u, leftv v)
const struct sValCmd1 dArith1[]
void maFindPerm(char const *const *const preim_names, int preim_n, char const *const *const preim_par, int preim_p, char const *const *const names, int n, char const *const *const par, int nop, int *perm, int *par_perm, n_coeffType ch)
static BOOLEAN jjN2BI(leftv res, leftv v)
static BOOLEAN jjHOMOG1(leftv res, leftv v)
static BOOLEAN jjGE_N(leftv res, leftv u, leftv v)
static BOOLEAN jjNEWSTRUCT3(leftv, leftv u, leftv v, leftv w)
static BOOLEAN iiExprArith2TabIntern(leftv res, leftv a, int op, leftv b, BOOLEAN proccall, const struct sValCmd2 *dA2, int at, int bt, const struct sConvertTypes *dConvertTypes)
static FORCE_INLINE number n_SubringGcd(number a, number b, const coeffs r)
static BOOLEAN jjSTD_HILB(leftv res, leftv u, leftv v)
ideal id_Farey(ideal x, number N, const ring r)
const char feNotImplemented[]
static BOOLEAN jjEXPORTTO(leftv, leftv u, leftv v)
static FORCE_INLINE long n_Int(number &n, const coeffs r)
conversion of n to an int; 0 if not possible in Z/pZ: the representing int lying in (-p/2 ....
static BOOLEAN jjBRACK_Bim(leftv res, leftv u, leftv v, leftv w)
static int WerrorS_dummy_cnt
static BOOLEAN jjLIFTSTD3(leftv res, leftv u, leftv v, leftv w)
ideal idOppose(ring Rop_src, ideal I, const ring Rop_dst)
opposes a module I from Rop to currRing(dst)
static ideal idMult(ideal h1, ideal h2)
hh := h1 * h2
static FORCE_INLINE void n_Power(number a, int b, number *res, const coeffs r)
fill res with the power a^b
static BOOLEAN jjHILBERT(leftv, leftv v)
static BOOLEAN jjMSTD(leftv res, leftv v)
int luRank(const matrix aMat, const bool isRowEchelon, const ring R)
Computes the rank of a given (m x n)-matrix.
GbVariant syGetAlgorithm(char *n, const ring r, const ideal)
static BOOLEAN jjWAITALL2(leftv res, leftv u, leftv v)
static BOOLEAN jjCONTENT(leftv res, leftv v)
static BOOLEAN jjSTD_HILB_W(leftv res, leftv u, leftv v, leftv w)
const Variable & v
< [in] a sqrfree bivariate poly
static BOOLEAN jjTIMES_N(leftv res, leftv u, leftv v)
static int jjCOMPARE_ALL(const void *aa, const void *bb)
const struct sConvertTypes dConvertTypes[]
BOOLEAN rSamePolyRep(ring r1, ring r2)
returns TRUE, if r1 and r2 represents the monomials in the same way FALSE, otherwise this is an analo...
static BOOLEAN jjP2I(leftv res, leftv v)
INLINE_THIS void Init(int l=0)
static FORCE_INLINE BOOLEAN n_Equal(number a, number b, const coeffs r)
TRUE iff 'a' and 'b' represent the same number; they may have different representations.
static BOOLEAN jjSUBST_Id_N(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjDUMP(leftv, leftv v)
static BOOLEAN jjWRONG(leftv, leftv)
static long p_Totaldegree(poly p, const ring r)
unsigned nCmdUsed
number of commands used
static BOOLEAN jjIDEAL_Map(leftv res, leftv v)
static BOOLEAN jjPLUS_P(leftv res, leftv u, leftv v)
BOOLEAN load_builtin(const char *newlib, BOOLEAN autoexport, SModulFunc_t init)
#define idSimpleAdd(A, B)
static BOOLEAN jjMOD_P(leftv res, leftv u, leftv v)
static BOOLEAN jjTIMES_MA_I1(leftv res, leftv u, leftv v)
#define pSeries(n, p, u, w)
const CanonicalForm int s
static BOOLEAN jjPLUSPLUS(leftv, leftv u)
BOOLEAN iiCheckTypes(leftv args, const short *type_list, int report)
check a list of arguemys against a given field of types return TRUE if the types match return FALSE (...
static BOOLEAN jjJET_ID_IV(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjDEG_IV(leftv res, leftv u, leftv v)
#define pLmCmp(p, q)
returns 0|1|-1 if p=q|p>q|p<q w.r.t monomial ordering
intvec * delete_pos(int p)
static BOOLEAN jjFRES(leftv res, leftv u, leftv v)
static BOOLEAN jjDEG_M_IV(leftv res, leftv u, leftv v)
static BOOLEAN jjLE_N(leftv res, leftv u, leftv v)
BOOLEAN jjWAITALL1(leftv res, leftv u)
lists rDecompose_list_cf(const ring r)
static BOOLEAN jjINDEX_P_IV(leftv res, leftv u, leftv v)
static BOOLEAN jjINDEPSET2(leftv res, leftv u, leftv v)
int slStatusSsiL(lists L, int timeout)
static int _gentable_sort_cmds(const void *a, const void *b)
compares to entry of cmdsname-list
long kHomModDeg(poly p, ring r)
static FORCE_INLINE number n_Div(number a, number b, const coeffs r)
return the quotient of 'a' and 'b', i.e., a/b; raises an error if 'b' is not invertible in r exceptio...
#define pCopy(p)
return a copy of the poly
#define SI_RESTORE_OPT1(A)
static BOOLEAN jjLIFT_4(leftv res, leftv U)
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
static BOOLEAN jjFWALK3(leftv res, leftv u, leftv v, leftv w)
ideal kStd(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
matrix id_Module2formatedMatrix(ideal mod, int rows, int cols, const ring R)
static BOOLEAN jjELIMIN(leftv res, leftv u, leftv v)
ideal id_Copy(ideal h1, const ring r)
copy an ideal
resolvente sySchreyerResolvente(ideal arg, int maxlength, int *length, BOOLEAN isMonomial=FALSE, BOOLEAN notReplace=FALSE)
static BOOLEAN jjMINUS_P(leftv res, leftv u, leftv v)
static BOOLEAN jjINTMAT3(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjKLAMMER_IV(leftv res, leftv u, leftv v)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
static BOOLEAN jjNAMES_I(leftv res, leftv v)
static BOOLEAN jjSetRing(leftv, leftv u)
BOOLEAN rHasMixedOrdering(const ring r)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
static BOOLEAN jjPFAC2(leftv res, leftv u, leftv v)
ideal id_Transp(ideal a, const ring rRing)
transpose a module
int mp_Compare(matrix a, matrix b, const ring R)
static BOOLEAN jjidMaxIdeal(leftv res, leftv v)
static BOOLEAN jjOPPOSE(leftv res, leftv a, leftv b)
static const char ** rParameter(const ring r)
(r->cf->parameter)
ideal getMinorIdeal(const matrix mat, const int minorSize, const int k, const char *algorithm, const ideal iSB, const bool allDifferent)
Returns the specified set of minors (= subdeterminantes) of the given matrix.
static FORCE_INLINE int n_Size(number n, const coeffs r)
return a non-negative measure for the complexity of n; return 0 only when n represents zero; (used fo...
static BOOLEAN jjPlural_num_mat(leftv res, leftv a, leftv b)
ideal kInterRed(ideal F, ideal Q)
lists syConvRes(syStrategy syzstr, BOOLEAN toDel, int add_row_shift)
matrix mp_Copy(matrix a, const ring r)
copies matrix a (from ring r to r)
static BOOLEAN jjCOEF_M(leftv, leftv v)
static BOOLEAN jjIDEAL_PL(leftv res, leftv v)
static BOOLEAN rField_is_Z(const ring r)
static bool rIsSCA(const ring r)
static BOOLEAN jjDelete_ID(leftv res, leftv u, leftv v)
LINLINE void nlDelete(number *a, const coeffs r)
#define omFreeBin(addr, bin)
static BOOLEAN jjFAREY_BI(leftv res, leftv u, leftv v)
static BOOLEAN rField_is_Zp(const ring r)
static BOOLEAN jjnInt(leftv res, leftv u)
static BOOLEAN jjHOMOG1_W(leftv res, leftv v, leftv u)
void newBuffer(char *s, feBufferTypes t, procinfo *pi, int lineno)
ideal idSubstPoly(ideal id, int n, poly e)
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
matrix idDiff(matrix i, int k)
ideal id_Head(ideal h, const ring r)
returns the ideals of initial terms
static BOOLEAN jjRESTART(leftv, leftv u)
static BOOLEAN jjRES(leftv res, leftv u, leftv v)
static BOOLEAN jjRING_LIST(leftv res, leftv v)
static BOOLEAN jjPOWER_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjCOMPARE_IV(leftv res, leftv u, leftv v)
static si_char_2 Tok2Cmdname_buf
static FORCE_INLINE number n_GetDenom(number &n, const coeffs r)
return the denominator of n (if elements of r are by nature not fractional, result is 1)
ideal singclap_sqrfree(poly f, intvec **v, int with_exps, const ring r)
static FORCE_INLINE number n_ExtGcd(number a, number b, number *s, number *t, const coeffs r)
beware that ExtGCD is only relevant for a few chosen coeff. domains and may perform something unexpec...
static FORCE_INLINE BOOLEAN n_IsUnit(number n, const coeffs r)
TRUE iff n has a multiplicative inverse in the given coeff field/ring r.
matrix mp_Sub(matrix a, matrix b, const ring R)
intvec * ivAdd(intvec *a, intvec *b)
static BOOLEAN jjKBASE2(leftv res, leftv u, leftv v)
static intvec * idSort(ideal id, BOOLEAN nolex=TRUE)
const char * getBlackboxName(const int t)
return the name to the type given by t (r/o)
static BOOLEAN jjOP_BI_BIM(leftv res, leftv u, leftv v)
static BOOLEAN jjQUOT(leftv res, leftv u, leftv v)
void luDecomp(const matrix aMat, matrix &pMat, matrix &lMat, matrix &uMat, const ring R)
LU-decomposition of a given (m x n)-matrix.
static BOOLEAN jjMINUS_MA(leftv res, leftv u, leftv v)
ideal id_Subst(ideal id, int n, poly e, const ring r)
void id_Normalize(ideal I, const ring r)
normialize all polys in id
BOOLEAN jjLOAD_TRY(const char *s)
static BOOLEAN jjREDUCE3_CID(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjINTERSECT_PL(leftv res, leftv v)
static BOOLEAN jjBREAK1(leftv, leftv v)
static BOOLEAN jjEQUAL_N(leftv res, leftv u, leftv v)
static BOOLEAN jjOP_IM_I(leftv res, leftv u, leftv v)
static BOOLEAN jjMOD_N(leftv res, leftv u, leftv v)
static BOOLEAN jjJET_P_P(leftv res, leftv u, leftv v, leftv w)
#define idPosConstant(I)
index of generator with leading term in ground ring (if any); otherwise -1
int scMult0Int(ideal S, ideal Q, const ring tailRing)
static BOOLEAN jjFWALK(leftv res, leftv u, leftv v)
BOOLEAN(* proc1)(leftv, leftv)
static BOOLEAN jjOP_I_BIM(leftv res, leftv u, leftv v)
static BOOLEAN jjCOUNT_RG(leftv res, leftv v)
used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
static BOOLEAN jjOP_IV_I(leftv res, leftv u, leftv v)
static BOOLEAN jjSBA(leftv res, leftv v)
BOOLEAN sm_CheckDet(ideal I, int d, BOOLEAN sw, const ring r)
static BOOLEAN rField_is_Q(const ring r)
syStrategy syMinimize(syStrategy syzstr)
static BOOLEAN jjKoszul(leftv res, leftv u, leftv v)
static BOOLEAN jjidVec2Ideal(leftv res, leftv v)
static BOOLEAN jjPARDEG(leftv res, leftv v)
static BOOLEAN jjALIGN_M(leftv res, leftv u, leftv v)
static BOOLEAN jjTIMES_I(leftv res, leftv u, leftv v)
static BOOLEAN jjPLUS_BI(leftv res, leftv u, leftv v)
void Clean(ring r=currRing)
#define idMaxIdeal(D)
initialise the maximal ideal (at 0)
static BOOLEAN jjOpenClose(leftv, leftv v)