93 #define NC_MASK (3+64)
99#define ZERODIVISOR_MASK 8
100#define ALLOW_PLURAL 1
105#define NO_ZERODIVISOR 8
106#define ALLOW_ZERODIVISOR 0
109#define ALLOW_NC ALLOW_LP|ALLOW_PLURAL
111#define ALLOW_ZZ (ALLOW_RING|NO_ZERODIVISOR)
117#define NO_CONVERSION 32
121#define bit31 SIZEOF_LONG*8-1
206extern int iiArithAddCmd(
const char *szName,
short nAlias,
short nTokval,
207 short nToktype,
short nPos=-1);
217#define ii_div_by_0 "div. by 0"
226 if ((
long)
i==
l)
return l;
247 long bb = (long)(
v->Data());
252 case '+': cc=
bimAdd(aa,bb);
break;
253 case '-': cc=
bimSub(aa,bb);
break;
254 case '*': cc=
bimMult(aa,bb);
break;
256 res->data=(
char *)cc;
266 number bb = (number)(
v->Data());
273 res->data=(
char *)cc;
283 int bb = (int)(
long)(
v->Data());
287 case '+': (*aa) += bb;
break;
288 case '-': (*aa) -= bb;
break;
289 case '*': (*aa) *= bb;
break;
292 case '%': (*aa) %= bb;
break;
294 res->data=(
char *)aa;
304 int bb = (int)(
long)(
v->Data());
313 res->data=(
char *)aa;
322 int l=(int)(
long)
v->Data();
325 int d=(int)(
long)u->
Data();
328 for(
i=
l-1;
i>=0;
i--) { (*vv)[
i]=d; }
329 res->data=(
char *)vv;
335 res->data=(
char *)
new intvec((
int)(
long)u->
Data(),(
int)(
long)
v->Data());
347 res->data = (
char *) (r<0);
350 res->data = (
char *) (r>0);
353 res->data = (
char *) (r<=0);
356 res->data = (
char *) (r>=0);
360 res->data = (
char *) (r==0);
364 if(r==-2) {
WerrorS(
"size incompatible");
return TRUE; }
376 res->data = (
char *) (r<0);
379 res->data = (
char *) (r>0);
382 res->data = (
char *) (r<=0);
385 res->data = (
char *) (r>=0);
390 res->data = (
char *) (r==0);
394 if(r==-2) {
WerrorS(
"size incompatible");
return TRUE; }
400 int b = (int)(
long)(
v->Data());
405 res->data = (
char *) (r<0);
408 res->data = (
char *) (r>0);
411 res->data = (
char *) (r<=0);
414 res->data = (
char *) (r>=0);
418 res->data = (
char *) (r==0);
433 res->data = (
char *) (
long)(r < 0);
436 res->data = (
char *) (
long)(r > 0);
439 res->data = (
char *) (
long)(r <= 0);
442 res->data = (
char *) (
long)(r >= 0);
446 res->data = (
char *)(
long) (r == 0);
454 poly
p=(poly)u->
Data();
455 poly q=(poly)
v->Data();
460 res->data = (
char *) (r < 0);
463 res->data = (
char *) (r > 0);
466 res->data = (
char *) (r <= 0);
469 res->data = (
char *) (r >= 0);
481 char* a = (
char * )(u->
Data());
482 char*
b = (
char * )(
v->Data());
514 else if (
v->Next()!=
NULL)
524 long b=(long)u->
Data();
525 long e=(long)
v->Data();
534 else if ((e==0)||(
b==1))
552 if(rc/
b!=oldrc) overflow=
TRUE;
556 WarnS(
"int overflow(^), result may be wrong");
558 res->data = (
char *)rc;
564 WerrorS(
"exponent must be non-negative");
570 int e=(int)(
long)
v->Data();
571 number n=(number)u->
Data();
578 WerrorS(
"exponent must be non-negative");
586 int e=(int)(
long)
v->Data();
587 number n=(number)u->
Data();
604 int v_i=(int)(
long)
v->Data();
607 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();
729 Werror(
"'%s' not loaded", u->name);
734 v->name = omStrDup(v->name);
738 WerrorS(
"reserved name with ::");
750 WerrorS(
"<package>::<id> expected");
757 unsigned long a=(
unsigned long)u->
Data();
758 unsigned long b=(
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()));
809 WerrorS(
"intmat size not compatible");
819 WerrorS(
"bigintmat/cmatrix not compatible");
830 Werror(
"matrix size not compatible(%dx%d, %dx%d)",
838 ideal
A=(ideal)u->
Data(); ideal
B=(ideal)
v->Data();
842 Werror(
"matrix size not compatible(%dx%d, %dx%d)",
865 char* a = (
char * )(u->
Data());
866 char*
b = (
char * )(
v->Data());
867 char* r = (
char * )
omAlloc(strlen(a) + strlen(
b) + 1);
875 res->data = (
char *)
idAdd((ideal)u->
Data(),(ideal)
v->Data());
880 void *
ap=u->
Data();
void *bp=
v->Data();
884 unsigned long a=(
unsigned long)
ap;
885 unsigned long b=(
unsigned long)bp;
889 WarnS(
"int overflow(-), result may be wrong");
891 res->data = (
char *)cc;
901 res->data = (
char *)(
nSub((number)u->
Data(), (number)
v->Data()));
937 WerrorS(
"intmat size not compatible");
947 WerrorS(
"bigintmat/cmatrix not compatible");
958 Werror(
"matrix size not compatible(%dx%d, %dx%d)",
967 ideal
A=(ideal)u->
Data(); ideal
B=(ideal)
v->Data();
971 Werror(
"matrix size not compatible(%dx%d, %dx%d)",
980 long a=(long)u->
Data();
981 long b=(long)
v->Data();
982 long c=(long)((
unsigned long)a * (
unsigned long)
b);
984 if ((a!=0)&&(c/a!=
b))
985 WarnS(
"int overflow(*), result may be wrong");
986 res->data = (
char *)c;
1000 res->data = (
char *)(
nMult( (number)u->
Data(), (number)
v->Data()));
1001 number n=(number)
res->data;
1003 res->data=(
char *)n;
1022 Warn(
"possible OVERFLOW in mult(d=%ld, d=%ld, max=%ld)",
1035 Warn(
"possible OVERFLOW in mult(d=%ld, d=%ld, max=%ld)",
1067 WerrorS(
"intmat size not compatible");
1079 WerrorS(
"bigintmat/cmatrix not compatible");
1093 res->data = (
char *)I;
1106 res->data = (
char *)I;
1115 res->data = (
char *)I;
1144 Werror(
"matrix size not compatible(%dx%d, %dx%d) in *",
1154 ideal
A=(ideal)u->
Data(); ideal
B=(ideal)
v->Data();
1158 Werror(
"matrix size not compatible(%dx%d, %dx%d) in *",
1175 res->data = (
char *)(
long)((int)((long)u->
Data()) >= (
int)((
long)
v->Data()));
1193 res->data = (
char *)(
long)((int)((long)u->
Data()) > (
int)((
long)
v->Data()));
1207 res->data = (
char *)(
long)((int)((long)u->
Data()) <= (
int)((
long)
v->Data()));
1220 res->data = (
char *)(
long)((int)((long)u->
Data()) < (
int)((
long)
v->Data()));
1230 long a= (long)u->
Data();
1231 long b= (long)
v->Data();
1245 r=((a-c) /
b);
break;
1247 res->data=(
void *)r;
1252 number q=(number)
v->Data();
1260 res->data = (
char *)q;
1265 number q=(number)
v->Data();
1273 res->data = (
char *)q;
1278 poly q=(poly)
v->Data();
1279 poly
p=(poly)(u->
Data());
1296 poly q=(poly)
v->Data();
1320 res->data=(
char *)mm;
1331 res->data = (
char *)((
int)((
long)u->
Data()) == (
int)((
long)
v->Data()));
1349 res->data = (
char *)(
long)(u->
Data()==
v->Data());
1355 res->data = (
char *)((
long)
nEqual((number)u->
Data(),(number)
v->Data()));
1361 poly
p=(poly)u->
Data();
1362 poly q=(poly)
v->Data();
1382 res->data = (
char *)((
long)u->
Data() && (
long)
v->Data());
1387 res->data = (
char *)((
long)u->
Data() || (
long)
v->Data());
1400 while (sh->next !=
NULL) sh=sh->next;
1416 WerrorS(
"indexed object must have a name");
1427 t.
data=(
char *)((
long)(*iv)[
i]);
1450 poly
p=(poly)u->
Data();
1451 long i=(long)
v->Data();
1471 long i=(long)
v->Data();
1490 poly
p=(poly)u->
Data();
1498 while ((
p!=
NULL) && (sum>0))
1514 res->data=(
char *)r;
1519 poly
p=(poly)u->
Data();
1520 int i=(int)(
long)
v->Data();
1555 res->data=(
char *)r;
1563 long slen = strlen(u->
name) + 14;
1564 char *nn = (
char*)
omAlloc(slen);
1565 snprintf(nn,slen,
"%s(%d)",u->
name,(
int)(
long)
v->Data());
1578 long slen = strlen(u->
name) + 14;
1579 char *n = (
char*)
omAlloc(slen);
1592 snprintf(n,slen,
"%s(%d)",u->
name,(*iv)[
i]);
1613 while (
h->next!=
NULL)
h=
h->next;
1627 tmp_proc->
id=
"_auto";
1631 d=u->
data; u->
data=(
void *)tmp_proc;
1648 if (sl)
return TRUE;
1687 number *
x=(number *)
omAlloc(rl*
sizeof(number));
1688 number *q=(number *)
omAlloc(rl*
sizeof(number));
1690 for(
i=rl-1;
i>=0;
i--)
1697 for(
i=rl-1;
i>=0;
i--)
1703 res->data=(
char *)n;
1713 number *
x=(number *)
omAlloc(rl*
sizeof(number));
1714 number *q=(number *)
omAlloc(rl*
sizeof(number));
1716 for(
i=rl-1;
i>=0;
i--)
1722 for(
i=rl-1;
i>=0;
i--)
1726 Werror(
"poly expected at pos %d",
i+1);
1727 for(
i=rl-1;
i>=0;
i--)
1739 for(
i=rl-1;
i>=0;
i--)
1751 number n=n_ChineseRemainder(
x,q,rl,
currRing->cf);
1752 for(
i=rl-1;
i>=0;
i--)
1760 for(
i=rl-1;
i>=0;
i--)
1772 long s=(long)
v->Data();
1781 ideal
M=(ideal)u->
CopyD();
1782 int s=(int)(
long)
v->Data();
1795 poly
p=(poly)
v->Data();
1802 poly
p=(poly)
v->Data();
1809 int i=
pVar((poly)
v->Data());
1828 (ideal)(
v->Data()),
p);
1840 ideal I=(ideal)u->
Data();
1845 res->data = (
char *)((
long)d);
1850 poly
p=(poly)u->
Data();
1856 res->data = (
char *)(d);
1859 res->data=(
char *)(
long)(-1);
1864 int pos=(int)(
long)
v->Data();
1871 int pos=(int)(
long)
v->Data();
1872 ideal I=(ideal)u->
Data();
1879 ideal I=(ideal)u->
Data();
1906 ideal
m=(ideal)u->
Data();
1912 int i=
pVar((poly)
v->Data());
1923 int i=
pVar((poly)
v->Data());
1942 Warn(
"dim(%s,...) may be wrong because the mixed monomial ordering",
v->Name());
1956 ideal vi=(ideal)
v->Data();
1958 ideal ui=(ideal)u->
Data();
1971 res->data=(
char *)L;
1978 return v->next!=
NULL;
2008 number uu=(number)u->
Data();number vv=(number)
v->Data();
2017 res->data=(
char *)L;
2022 int uu=(int)(
long)u->
Data();
int vv=(int)(
long)
v->Data();
2023 int p0=
ABS(uu),p1=
ABS(vv);
2024 int f0 = 1, f1 = 0, g0 = 0, g1 = 1, q, r;
2045 res->data=(
char *)L;
2052 if (ret)
return TRUE;
2055 res->data=(
char *)L;
2056 L->
m[0].
data=(
void *)r;
2068 int sw=(int)(
long)dummy->
Data();
2070 if ((sw<0)||(sw>2)) fac_sw=1;
2083 l->m[0].data=(
void *)
f;
2085 l->m[1].data=(
void *)
v;
2086 res->data=(
void *)
l;
2091 res->data=(
void *)
f;
2104 res->data=(
void *)
p;
2131 res->data=(
void *)L;
2138 number uu=(number)u->
Data();
2139 number vv=(number)
v->Data();
2147 ideal uu=(ideal)u->
Data();
2148 number vv=(number)
v->Data();
2168 ring r=(ring)u->
Data();
2177 int par_perm_size=0;
2187 par_perm_size=
rPar(r);
2201 perm=(
int *)
omAlloc0((r->N+1)*
sizeof(
int));
2202 if (par_perm_size!=0)
2203 par_perm=(
int *)
omAlloc0(par_perm_size*
sizeof(
int));
2208 char ** r_par_names=
NULL;
2209 if (r->cf->extRing!=
NULL)
2211 r_par=r->cf->extRing->N;
2212 r_par_names=r->cf->extRing->names;
2215 char ** c_par_names=
NULL;
2219 c_par_names=
currRing->cf->extRing->names;
2223 maFindPerm(r->names, r->N, r_par_names, r_par,
2225 perm,par_perm,
currRing->cf->type);
2227 #ifdef HAVE_SHIFTBBA
2232 perm,par_perm,
currRing->cf->type,r->isLPring);
2247 if (par_perm_size!=0)
2262 Print(
"// par nr %d: %s -> %s\n",
2272 perm,par_perm,par_perm_size,nMap)))
2290 Werror(
"no identity map from %s (%s -> %s)",u->
Fullname(),s1,s2);
2301 char *where=(
char *)u->
Data();
2302 char *what=(
char *)
v->Data();
2303 char *
found = strstr(where,what);
2306 res->data=(
char *)((
found-where)+1);
2315 ideal
id = (ideal)u->
Data();
2316 int max_length = (int)(
long)
v->Data();
2319 WerrorS(
"length for fres must not be negative");
2322 if (max_length == 0)
2328 Warn(
"full resolution in a qring may be infinite, "
2329 "setting max length to %d", max_length);
2332 char *method = (
char *)
w->Data();
2336 if (strcmp(method,
"complete") != 0
2337 && strcmp(method,
"frame") != 0
2338 && strcmp(method,
"extended frame") != 0
2339 && strcmp(method,
"single module") != 0)
2341 WerrorS(
"wrong optional argument for fres");
2347 res->data = (
void *)r;
2355 w->data = (
char *)
"complete";
2369 int uu=(int)(
long)u->
Data();
int vv=(int)(
long)
v->Data();
2370 int p0=
ABS(uu),p1=
ABS(vv);
2377 res->data=(
char *)(
long)p0;
2382 number n1 = (number) u->
Data();
2383 number n2 = (number)
v->Data();
2389 number a=(number) u->
Data();
2390 number
b=(number)
v->Data();
2414 PrintS(
"// NOTE: computation of Hilbert series etc. is being\n");
2415 PrintS(
"// performed for generic fibre, that is, over Q\n");
2420 switch((
int)(
long)
v->Data())
2433 switch((
int)(
long)
v->Data())
2436 res->data=(
void *)iv;
2450 int i=
pVar((poly)
v->Data());
2462 WerrorS(
"variable must have weight 1");
2467 int i=
pVar((poly)
v->Data());
2484 WerrorS(
"variable must have weight 1");
2491 ideal v_id=(ideal)
v->Data();
2500 currRing->pLexOrder=save_pLexOrder;
2510 ideal v_id=(ideal)
v->Data();
2530 const int n = L->
nr;
assume (n >= 0);
2531 std::vector<ideal> V(n + 1);
2533 for(
int i = n;
i >= 0;
i--) V[
i] = (ideal)(L->
m[
i].
Data());
2552 res->data = (
char *)
pJet((poly)u->
CopyD(), (
int)(
long)
v->Data());
2586 h.data=(
void *)(
long)
IDELEMS((ideal)
v->Data());
2598 Werror(
"At least %d ncgen variables are needed for this computation.", ul);
2618 Werror(
"At least %d ncgen variables are needed for this computation.",
IDELEMS((ideal)u->
Data()));
2635 char *
s=(
char *)u->
Data();
2636 if(strcmp(
s,
"with")==0)
2638 if (strcmp(
s,
"try")==0)
2640 WerrorS(
"invalid second argument");
2641 WerrorS(
"load(\"libname\" [,option]);");
2667 ideal u_id=(ideal)u->
Data();
2668 ideal v_id=(ideal)
v->Data();
2671 if ((*w_u).compare((w_v))!=0)
2673 WarnS(
"incompatible weights");
2674 delete w_u; w_u=
NULL;
2682 WarnS(
"wrong weights");
2683 delete w_u; w_u=
NULL;
2688 res->data = (
char *)
idModulo(u_id,v_id ,hom,&w_u);
2699 number q=(number)
v->Data();
2710 number q=(number)
v->Data();
2721 poly q=(poly)
v->Data();
2727 poly
p=(poly)(u->
Data());
2745 char *opt=(
char *)
v->Data();
2757 if(strcmp(
l->m->type,
"ASCII")!=0)
2759 Werror(
"ASCII link required, not `%s`",
l->m->type);
2764 if (
l->name[0]!=
'\0')
2768 if (
v==
NULL) opt=(
const char*)
"i";
2769 else opt=(
const char *)
v->Data();
2811 const char *
s=(
const char *)u->
Data();
2812 newstruct_desc d=
NULL;
2818 else WerrorS(
"name of newstruct must be longer than 1 character");
2824 int i=(int)(
long)
v->Data();
2832 Werror(
"par number %d out of range 1..%d",
i,
p);
2842 WerrorS(
"basering must NOT be a qring!");
2862 WerrorS(
"basering must NOT be a qring!");
2882 WerrorS(
"basering must NOT be a qring!");
2902 WerrorS(
"basering must NOT be a qring!");
2924 const poly q = (poly)
b->Data();
2937 const poly
p = (poly)a->
Data();
2951 const poly q = (poly)
b->Data();
2956 const poly
p = (poly)a->
Data();
2957 int k=(int)(
long)c->
Data();
2961 for (
int i = 0;
i <
k;
i++)
2973 if (qq ==
NULL)
break;
2979 Werror(
"invalid number of iterations");
2989 ring r = (ring)a->
Data();
2992 res->data =
b->Data();
2993 res->rtyp =
b->rtyp;
2998 Werror(
"%s is not an opposite ring to current ring",a->
Fullname());
3011 res->rtyp = argtype;
3019 res->rtyp = argtype;
3027 res->rtyp = argtype;
3040 res->rtyp = argtype;
3045 WerrorS(
"unsupported type in oppose");
3063 WerrorS(
"expected prune_map(`module`,`smatrix`)`");
3068 ideal v_id=(ideal)
v->Data();
3073 WarnS(
"wrong weights");
3082 int *
g=(
int*)
omAlloc(v_id->rank*
sizeof(
int));
3088 for(
int i=0;
i<v_id->rank;
i++)
Print(
"v[%d]:%d ",
i+1,
g[
i]);
3095 int *
g=(
int*)
omAlloc(v_id->rank*
sizeof(
int));
3097 for(
int i=0;
i<v_id->rank;
i++)
Print(
"v[%d]:%d ",
i+1,
g[
i]);
3114 int i=(int)(
long)u->
Data();
3115 int j=(int)(
long)
v->Data();
3116 if (
j-
i <0) {
WerrorS(
"invalid range for random");
return TRUE;}
3123 int isRowEchelon = (int)(
long)
v->Data();
3124 if (isRowEchelon != 1) isRowEchelon = 0;
3125 int rank =
luRank(
m, isRowEchelon);
3126 res->data =(
char *)(
long)rank;
3138 Werror(
"cannot read from `%s`",
s);
3147 ideal vi=(ideal)
v->Data();
3155 ideal ui=(ideal)u->
Data();
3156 ideal vi=(ideal)
v->Data();
3165 int maxl=(int)(
long)
v->Data();
3168 WerrorS(
"length for res must not be negative");
3175 ideal u_id=(ideal)u->
Data();
3186 "full resolution in a qring may be infinite, setting max length to %d",
3200 int add_row_shift=0;
3204 add_row_shift = ww->
min_in();
3205 (*ww) -= add_row_shift;
3222 WerrorS(
"`lres` not implemented for inhomogeneous input or qring");
3226 WarnS(
"the current implementation of `lres` may not work in the case of a single variable");
3236 (
"`kres` not implemented for inhomogeneous input or qring");
3248 (
"`hres` not implemented for inhomogeneous input or qring");
3251 ideal u_id_copy=
idCopy(u_id);
3253 r=
syHilb(u_id_copy,&dummy);
3269 res->data=(
void *)r;
3270 if ((weights!=
NULL) && (ww!=
NULL)) {
delete ww; ww=
NULL; }
3274 if (weights!=
NULL) (*ww) += add_row_shift;
3294 if(complete)
syFix(r);
3305 n1 = (number)u->
CopyD();
3309 i = (int)(
long)u->
Data();
3317 i = (int)(
long)
v->Data();
3321 res->data = (
char*)
l;
3327 res->data = (
char *)r;
3340 res->data = (
char *)r;
3346 int i=
rSum((ring)u->
Data(),(ring)
v->Data(),r);
3347 res->data = (
char *)r;
3350#define SIMPL_NORMALIZE 64
3351#define SIMPL_LMDIV 32
3352#define SIMPL_LMEQ 16
3359 int sw = (int)(
long)
v->Data();
3390 res->data = (
char * )
id;
3397 int sw=(int)(
long)dummy->
Data();
3412 l->m[0].data=(
void *)
f;
3414 l->m[1].data=(
void *)
v;
3415 res->data=(
void *)
l;
3420 res->data=(
void *)
f;
3433 res->data=(
void *)
p;
3454 int sw = (int)(
long)
v->Data();
3465 res->data = (
char * )
p;
3473 ideal u_id=(ideal)(u->
Data());
3500 ideal i1=(ideal)(u->
Data());
3510 poly
p=(poly)
v->Data();
3538 i0=(ideal)
v->CopyD();
3540 memset(i0->m,0,
sizeof(poly)*
IDELEMS(i0));
3578 ideal I=(ideal)u->
Data();
3585 int add_row_shift=
w->min_in();
3586 (*w)-=add_row_shift;
3604 res->data = (
char *)S;
3611 for(
int i=0;
i<vl;
i++)
3620 for(
int i=0;
i<vl;
i++)
3646 ideal
A=(ideal)u->
Data();
3647 ideal
B=(ideal)
v->Data();
3653 sleftv tmp_u,tmp_v,tmp_res;
3673 int i=(int)(
long)
v->Data();
3694 int t = (int)(
long)
v->Data();
3704 res->data = (
void*)(
long)
i;
3721 int timeout = (int)(
long)
v->Data();
3729 for(
unsigned nfinished = 0; nfinished <= ((unsigned)L->
nr); nfinished++)
3752 res->data = (
void*)(
long)ret;
3814 res->data = (
char *)n;
3819 res->data = (
char *)(-(
long)u->
Data());
3826 res->data = (
char *)n;
3844 res->data = (
char *)iv;
3851 res->data = (
char *)bim;
3860 ring r=(ring)u->
Data();
3864 char name_buffer[100];
3867 snprintf(name_buffer,100,
"PYTHON_RING_VAR%d",ending);
3890 l->m[0].data=(
void *)
m;
3891 l->m[1].data=(
void *)iv;
3892 res->data = (
char *)
l;
3912 number n=(number)u->
CopyD();
3936 number n=(number) tmp.
data;
3951 res->data = (
char *)(
long)
rChar((ring)
v->Data());
3956 ring r=(ring)
v->Data();
3958 res->data = (
char *)r->cf;
3968 res->data = (
char *)(
long)((
bigintmat*)(
v->Data()))->cols();
3973 res->data = (
char *)(
long)((
intvec*)(
v->Data()))->cols();
3981 res->data = (
char *)
p;
3992 res->data = (
char *)(
long)(aa->
rows()*aa->
cols());
3997 res->data = (
char *)(
long)
nSize((number)
v->Data());
4014 res->data = (
char *)(
long)((
intvec*)(
v->Data()))->length();
4019 ring r=(ring)
v->Data();
4025 extern int ipower (
int b,
int n );
4026 elems=
ipower(r->cf->ch,r->cf->extRing->pFDeg(r->cf->extRing->qideal->m[0],r->cf->extRing));
4028 res->data = (
char *)(
long)elems;
4034 poly
p=(poly)
v->Data();
4036 else res->data=(
char *)-1;
4041 ideal I=(ideal)u->
Data();
4047 res->data = (
char *)(
long)d;
4055 PrintS(
"// NOTE: computation of degree is being performed for\n");
4056 PrintS(
"// generic fibre, that is, over Q\n");
4074 else if (
v->rtyp!=0)
res->data=(
void *)(-1);
4081 number n =
reinterpret_cast<number
>(
v->CopyD());
4090 number n =
reinterpret_cast<number
>(
v->CopyD());
4106 i=
m->rows();
j=
m->cols();
4111 Werror(
"det of %d x %d bigintmat",
i,
j);
4120 number2 r=(number2)
omAlloc0(
sizeof(*r));
4122 i=
m->rows();
j=
m->cols();
4126 r->cf=
m->basecoeffs();
4131 Werror(
"det of %d x %d cmatrix",
i,
j);
4142 i=
m->rows();
j=
m->cols();
4147 Werror(
"det of %d x %d intmat",
i,
j);
4154 ideal I=(ideal)
v->Data();
4166 WerrorS(
"`dim` is not implemented for letterplace rings over rings");
4171 WerrorS(
"qring not supported by `dim` for letterplace rings at the moment");
4174 int gkDim =
lp_gkDim((ideal)(
v->Data()));
4175 res->data = (
char *)(
long)gkDim;
4176 return (gkDim == -2);
4181 Warn(
"dim(%s) may be wrong because the mixed monomial ordering",
v->Name());
4194 Werror(
"cannot dump to `%s`",
s);
4203 int co=(int)(
long)
v->Data();
4209 else WerrorS(
"argument of gen must be positive");
4214 char * d = (
char *)
v->Data();
4215 char *
s = (
char *)
omAlloc(strlen(d) + 13);
4216 strcpy(
s, (
char *)d);
4217 strcat(
s,
"\n;RETURN();\n");
4254 WarnS(
"no factorization implemented");
4258 res->data=(
void *)L;
4271 l->m[0].data=(
void *)
f;
4273 l->m[1].data=(
void *)
v;
4274 res->data=(
void *)
l;
4285 Werror(
"cannot get dump from `%s`",
s);
4294 ideal I=(ideal)
v->Data();
4303 ideal I=(ideal)
v->Data();
4317 WerrorS(
"module must be zero-dimensional");
4318 if (delete_w)
delete w;
4341 if (delete_w)
delete w;
4342 res->data=(
void *)po;
4349 PrintS(
"// NOTE: computation of Hilbert series etc. is being\n");
4350 PrintS(
"// performed for generic fibre, that is, over Q\n");
4362 PrintS(
"// NOTE: computation of Hilbert series etc. is being\n");
4363 PrintS(
"// performed for generic fibre, that is, over Q\n");
4371 ideal v_id=(ideal)
v->Data();
4379 char *s_isHomog=
omStrDup(
"isHomog");
4385 else if (
w!=
NULL)
delete w;
4406 int deg = (int)(
long)
v->Data();
4409 WerrorS(
"degree bound of Letterplace ring is to small");
4424 res->data=(
char *)mat;
4434 res->data=(
char *)I;
4441 ring q=(ring)
v->Data();
4444 if (q->qideal==
NULL)
4451 WerrorS(
"can only get ideal from identical qring");
4485 res->data = (
void*)iv;
4490 res->data = (
char *)(
long)
pVar((poly)
v->Data());
4501 res->data = (
char *)0;
4508 poly
p=(poly)(
v->Data());
4513 res->data = (
char *)
i;
4520 WerrorS(
"differentiation not defined in the coefficient ring");
4523 number n = (number) u->
Data();
4524 number
k = (number)
v->Data();
4537 ideal
id = (ideal)a->
Data();
4547 for(
int i = 0;
i < W;
i++,
p++, q++ )
4590 poly
p=(poly)
v->Data();
4604 poly
p=(poly)
v->Data();
4617 res->data=(
char *)iv;
4622 poly
p=(poly)
v->Data();
4631 res->data = (
char*) lm;
4643 int isLetterplace=(int)(
long)
atGet(
v,
"isLetterplaceRing",
INT_CMD);
4645 res->data=(
char *)r;
4678 WerrorS(
"matrix must be constant");
4692 res->data=(
char*)ll;
4702 switch(((
int)(
long)
v->Data()))
4719 res->data = (
char *)0;
4736 l->m[0].data=(
char *)r;
4739 l->m[1].data=(
char *)
m;
4740 res->data=(
char *)
l;
4756 res->data=(
char *)tmp;
4765 number n,
i;
i=(number)
v->Data();
4770 res->data=(
void *)n;
4779 else if (
v->name==
NULL)
4783 res->data = (
char *)
v->name;
4800 res->data=(
char*)(
long)((long)
v->Data()==0 ? 1 : 0);
4805 res->data = (
char *)(
long)(((ring)(
v->Data()))->
N);
4816 poly
p=(poly)
v->Data();
4822 int i=(int)(
long)
v->Data();
4825 if ((0<
i) && (
i<=
p))
4831 Werror(
"par number %d out of range 1..%d",
i,
p);
4838 number nn=(number)
v->Data();
4846 WerrorS(
"no ring active (1)");
4849 int i=(int)(
long)
v->Data();
4855 Werror(
"par number %d out of range 1..%d",
i,
p);
4862 poly
p=(poly)
v->Data();
4866 WerrorS(
"poly must be constant");
4875 res->data=(
void *)n;
4882 poly
p=(poly)
v->Data();
4886 WerrorS(
"poly must be constant");
4900 int i =
IsPrime((
int)(
long)(
v->Data()));
4901 res->data = (
char *)(
long)(
i > 1 ?
i : 2);
4907 ideal v_id=(ideal)
v->Data();
4912 WarnS(
"wrong weights");
4932 if (((
p=(poly)
v->Data())!=
NULL)
4941 res->data = (
char *)n;
4946 char *
s= (
char *)
v->Data();
4953 res->data = (
char *)1;
4962 res->data = (
char *)1;
4970 res->data =(
char *)(
long)rank;
4989 ring r=(ring)
v->Data();
4995 long mm=r->wanted_maxExp;
5011 ring r=(ring)
v->Data();
5018 ideal
i = (ideal)
v->Data();
5019 res->data = (
char *)
i->rank;
5024 res->data = (
char *)(
long)((
bigintmat*)(
v->Data()))->rows();
5029 res->data = (
char *)(
long)((
intvec*)(
v->Data()))->rows();
5034 res->data = (
char *)(
long)
rPar(((ring)
v->Data()));
5039 res->data = (
char *)(
long)atoi((
char*)
v->Data());
5048 WerrorS(
"qring not supported by slimgb at the moment");
5053 WerrorS(
"ordering must be global for slimgb");
5057 WarnS(
"groebner base computations with inexact coefficients can not be trusted due to rounding errors");
5060 ideal u_id=(ideal)u->
Data();
5065 WarnS(
"wrong weights");
5087 ideal v_id=(ideal)
v->Data();
5094 WarnS(
"wrong weights");
5114 ideal v_id=(ideal)
v->Data();
5121 WarnS(
"wrong weights");
5141 ideal v_id=(ideal)
v->Data();
5148 WarnS(
"wrong weights");
5168 WarnS(
"groebner base computations with inexact coefficients can not be trusted due to rounding errors");
5170 ideal v_id=(ideal)
v->Data();
5177 WarnS(
"wrong weights");
5196 res->data = (
char *)
idSort((ideal)
v->Data());
5209 l->m[0].data=(
void *)
f;
5211 l->m[1].data=(
void *)
v;
5212 res->data=(
void *)
l;
5228 ideal v_id=(ideal)
v->Data();
5234 Werror(
"At least %d ncgen variables are needed for this computation.",
IDELEMS(v_id));
5247 int add_row_shift=
w->min_in();
5248 (*w)-=add_row_shift;
5265 res->data = (
char *)S;
5272 for(
int i=0;
i<vl;
i++)
5274 if (v_id->m[
i]!=
NULL)
5281 for(
int i=0;
i<vl;
i++)
5283 if (v_id->m[
i]!=
NULL)
5304 res->data = (
char *)(((
bigintmat*)(
v->Data()))->transpose());
5315 ring r = (ring)a->
Data();
5323 WarnS(
"opposite only for global orderings");
5334 ring r = (ring)a->
Data();
5350 ideal v_id=(ideal)a->
Data();
5367#if defined(HAVE_SHIFTBBA) || defined(HAVE_PLURAL)
5371 WarnS(
"groebner base computations with inexact coefficients can not be trusted due to rounding errors");
5373 ideal v_id=(ideal)
v->Data();
5400 ideal I=(ideal)
v->Data();
5416 res->data = (
char *)J;
5430 int t=(int)(
long)
v->data;
5484 int i=(int)(
long)
v->Data();
5490 res->data=(
char *)
p;
5503 WerrorS(
"no ring active (2)");
5506 int i=(int)(
long)
v->Data();
5524 WerrorS(
"`vdim` is not implemented for letterplace rings over rings");
5529 WerrorS(
"qring not supported by `vdim` for letterplace rings at the moment");
5532 int kDim =
lp_kDim((ideal)(
v->Data()));
5533 res->data = (
char *)(
long)kDim;
5534 return (kDim == -2);
5539 WerrorS(
"int overflow in vdim");
5540 res->data = (
char *)
l;
5555 res->data = (
void*)(
long)
i;
5569 for(
int nfinished = 0; nfinished <= L->
nr; nfinished++)
5577 if((
i == -1)||(
j==0))
5589 res->data = (
void*)(
long)
j;
5598#ifdef HAVE_DYNAMIC_LOADING
5605 Werror(
"%s: unknown type",
s);
5623 Werror(
"can not create package `%s`",plib);
5629 package pa=IDPACKAGE(pl);
5633 Werror(
"can not create package `%s` - binaries exists",plib);
5634 omFreeBinAddr(plib);
5639 package savepack=currPack;
5655#ifdef HAVE_DYNAMIC_LOADING
5658 WerrorS(
"Dynamic modules are not supported by this version of Singular");
5678 Print(
"loading of >%s< failed\n",
s);
5687 res->data = (
char *)strlen((
char *)
v->Data());
5692 res->data = (
char *)(
long)
pLength((poly)
v->Data());
5697 res->data = (
char *)(
long)
idElem((ideal)
v->Data());
5717 res->data = (
char *)
pHead((poly)
v->Data());
5785 number n=(number)u->
CopyD();
5792 number n=(number)u->
Data();
5801 char *
s= (
char *)u->
Data();
5802 int r = (int)(
long)
v->Data();
5803 int c = (int)(
long)
w->Data();
5806 if ( (r<1) || (r>
l) || (c<0) )
5812 snprintf((
char *)
res->data,c+1,
"%-*.*s",c,c,
s+r-1);
5818 int r = (int)(
long)
v->Data();
5819 int c = (int)(
long)
w->Data();
5820 if ((r<1)||(r>iv->
rows())||(c<1)||(c>iv->
cols()))
5822 Werror(
"wrong range[%d,%d] in intmat %s(%d x %d)",
5835 while (
h->next!=
NULL)
h=
h->next;
5845 int r = (int)(
long)
v->Data();
5846 int c = (int)(
long)
w->Data();
5847 if ((r<1)||(r>bim->
rows())||(c<1)||(c>bim->
cols()))
5849 Werror(
"wrong range[%d,%d] in bigintmat %s(%d x %d)",
5863 while (
h->next!=
NULL)
h=
h->next;
5873 int r = (int)(
long)
v->Data();
5874 int c = (int)(
long)
w->Data();
5878 Werror(
"wrong range[%d,%d] in matrix %s(%d x %d)",r,c,u->
Fullname(),
5892 while (
h->next!=
NULL)
h=
h->next;
5901 ideal
m= (ideal)u->
Data();
5902 int r = (int)(
long)
v->Data();
5903 int c = (int)(
long)
w->Data();
5905 if ((r<1)||(r>
m->rank)||(c<1)||(c>
IDELEMS(
m)))
5907 Werror(
"wrong range[%d,%d] in matrix %s(%d x %d)",r,c,u->
Fullname(),
5921 while (
h->next!=
NULL)
h=
h->next;
5932 WerrorS(
"cannot build expression lists from unnamed objects");
5941 memcpy(&ut,u,
sizeof(ut));
5947 t.
data=(
char *)(
long)((*iv)[
l]);
5957 memcpy(u,&ut,
sizeof(ut));
5982 WerrorS(
"cannot build expression lists from unnamed objects");
5990 memcpy(&ut,u,
sizeof(ut));
5996 t.
data=(
char *)(
long)((*iv)[
l]);
6006 memcpy(u,&ut,
sizeof(ut));
6031 WerrorS(
"cannot build expression lists from unnamed objects");
6042 memcpy(&ut,u,
sizeof(ut));
6047 for (vl=0;vl< vv->
length(); vl++)
6049 t1.
data=(
char *)(
long)((*vv)[vl]);
6050 for (wl=0;wl< wv->
length(); wl++)
6052 t2.
data=(
char *)(
long)((*wv)[wl]);
6062 memcpy(u,&ut,
sizeof(ut));
6102 int k=(int)(
long)
w->Data();
6109 l->m[0].data=(
void *)
m;
6110 l->m[1].data=(
void *)iv;
6117 l->m[0].data=(
void *)
m;
6119 res->data = (
char *)
l;
6126 WerrorS(
"3rd argument must be a name of a matrix");
6129 ideal
i=(ideal)u->
Data();
6130 int rank=(int)
i->rank;
6139 (ideal)(
v->Data()),(poly)(
w->Data()));
6146 WerrorS(
"3rd argument must be a name of a matrix");
6171 ideal I=(ideal)u->
Data();
6175 return v->next!=
NULL;
6194 int n=(int)(
long)
w->Data();
6195 char *where=(
char *)u->
Data();
6196 char *what=(
char *)
v->Data();
6198 if ((1>n)||(n>(
int)strlen(where)))
6200 Werror(
"start position %d out of range",n);
6203 found = strchr(where+n-1,*what);
6204 if (*(what+1)!=
'\0')
6206 while((
found !=
NULL) && (strncmp(
found+1,what+1,strlen(what+1))!=0))
6213 res->data=(
char *)((
found-where)+1);
6219 if ((
int)(
long)
w->Data()==0)
6231 Werror(
"weight vector must have size %d, not %d",
6237 PrintS(
"// NOTE: computation of Hilbert series etc. is being\n");
6238 PrintS(
"// performed for generic fibre, that is, over Q\n");
6244 switch((
int)(
long)
v->Data())
6260 PrintS(
"// NOTE: computation of Hilbert series etc. is being\n");
6261 PrintS(
"// performed for generic fibre, that is, over Q\n");
6264 ring Qt =(ring)
v->Data();
6265 char *
name=(
char*)
w->Data();
6281 int i=
pVar((poly)
v->Data());
6293 WerrorS(
"variable must have weight 1");
6299 int i=
pVar((poly)
v->Data());
6311 WerrorS(
"variable must have weight 1");
6318 ideal v_id=(ideal)v1->
Data();
6324 intvec* im=
new intvec((
int)(
long)
v->Data(),(
int)(
long)
w->Data(), 0);
6330 (*im)[
i] = (*arg)[
i];
6333 res->data = (
char *)im;
6338 ideal I1=(ideal)u->
Data();
6339 ideal I2=(ideal)
v->Data();
6340 ideal I3=(ideal)
w->Data();
6351 ideal I=(ideal)u->
Data();
6353 res->data=(
char *)
idSect(I,(ideal)
v->Data(),alg);
6360 res->data = (
char *)
ppJetW((poly)u->
Data(),(
int)(
long)
v->Data(),iw);
6368 WerrorS(
"2nd argument must be a unit");
6384 WerrorS(
"2nd argument must be a diagonal matrix of units");
6431 Werror(
"`%s` is undefined",
v->Fullname());
6447 const int mk = (int)(
long)u->
Data();
6448 bool noIdeal =
true;
bool noK =
true;
bool noAlgorithm =
true;
6449 bool noCacheMinors =
true;
bool noCacheMonomials =
true;
6450 ideal IasSB;
int k=0;
char* algorithm;
int cacheMinors;
int cacheMonomials;
6465 noAlgorithm =
false;
6470 noCacheMinors =
false;
6476 noCacheMonomials =
false;
6489 noAlgorithm =
false;
6494 noCacheMinors =
false;
6499 noCacheMonomials =
false;
6506 algorithm = (
char*)u->
next->
Data();
6507 noAlgorithm =
false;
6511 noCacheMinors =
false;
6516 noCacheMonomials =
false;
6524 if (strcmp(algorithm,
"bareiss") == 0)
6525 algorithm = (
char*)
"Bareiss";
6526 if (strcmp(algorithm,
"laplace") == 0)
6527 algorithm = (
char*)
"Laplace";
6528 if (strcmp(algorithm,
"cache") == 0)
6529 algorithm = (
char*)
"Cache";
6538 if ((!noK) && (
k == 0))
6540 WerrorS(
"Provided number of minors to be computed is zero.");
6543 if ((!noAlgorithm) && (strcmp(algorithm,
"Bareiss") != 0)
6544 && (strcmp(algorithm,
"Laplace") != 0)
6545 && (strcmp(algorithm,
"Cache") != 0))
6547 WerrorS(
"Expected as algorithm one of 'B/bareiss', 'L/laplace', or 'C/cache'.");
6550 if ((!noAlgorithm) && (strcmp(algorithm,
"Bareiss") == 0)
6553 Werror(
"Bareiss algorithm not defined over coefficient rings %s",
6554 "with zero divisors.");
6557 if ((mk < 1) || (mk >
m->rows()) || (mk >
m->cols()))
6566 if ((!noAlgorithm) && (strcmp(algorithm,
"Cache") == 0)
6567 && (noCacheMinors || noCacheMonomials))
6570 cacheMonomials = 100000;
6576 (noIdeal ? 0 : IasSB),
false);
6577 else if (strcmp(algorithm,
"Cache") == 0)
6579 (noIdeal ? 0 : IasSB), 3, cacheMinors,
6580 cacheMonomials,
false);
6583 (noIdeal ? 0 : IasSB),
false);
6591 WerrorS(
"3rd argument must have a name");
6594 int maxl=(int)(
long)
v->Data();
6597 WerrorS(
"length for res must not be negative");
6603 ideal u_id=(ideal)u->
Data();
6612 "full resolution in a qring may be infinite, setting max length to %d",
6626 int add_row_shift=0;
6630 add_row_shift = ww->
min_in();
6631 (*ww) -= add_row_shift;
6635 u_id=(ideal)u->
CopyD();
6650 res->data=(
void *)r;
6651 if ((weights!=
NULL) && (ww!=
NULL)) {
delete ww; ww=
NULL; }
6655 if (weights!=
NULL) (*ww) += add_row_shift;
6676 (
const char *)
w->Data());
6688 if ((
v->name==
NULL) || (!kernel_cmd && (
w->name==
NULL)))
6690 WerrorS(
"2nd/3rd arguments must have names");
6694 const char *ring_name=u->
Name();
6701 if ((preim_ring==
NULL)
6704 Werror(
"preimage ring `%s` is not the basering",mapping->preimage);
6720 Werror(
"`%s` is not defined in `%s`",
v->name,ring_name);
6724 if (kernel_cmd) image=
idInit(1,1);
6741 Werror(
"`%s` is not defined in `%s`",
w->name,ring_name);
6748 WarnS(
"preimage in local qring may be wrong: use Ring::preimageLoc instead");
6758 char *key=(
char*)
v->CopyD();
6766 int i=(int)(
long)u->
Data();
6767 int r=(int)(
long)
v->Data();
6768 int c=(int)(
long)
w->Data();
6769 if ((r<=0) || (c<=0))
return TRUE;
6785 res->data = (
char *)iv;
6795 Werror(
"no random function defined for coeff %d",
cf->type);
6801 number2 nn=(number2)
omAlloc(
sizeof(*nn));
6811 int &ringvar, poly &monomexpr)
6813 monomexpr=(poly)
w->Data();
6814 poly
p=(poly)
v->Data();
6818 Werror(
"`%s` substitutes a ringvar only by a term",
6823 if ((ringvar=
pVar(
p))==0)
6832 WerrorS(
"ringvar/par expected");
6856 if (nok)
return TRUE;
6857 poly
p=(poly)u->
Data();
6862 (monomexpr!=
NULL) && (
p!=
NULL) && (mm!=0) &&
6865 Warn(
"possible OVERFLOW in subst, max exponent is %ld, substituting deg %d by deg %d",
currRing->bitmask/2,
pTotaldegree(monomexpr), mm);
6877 WerrorS(
"Substituting parameters not implemented for Letterplace rings.");
6889 if (nok)
return TRUE;
6890 ideal
id=(ideal)u->
Data();
6901 if ((
p!=
NULL) && (mm!=0) &&
6902 ((
unsigned long)deg_monexp > (
currRing->bitmask / (
unsigned long)mm/2)))
6910 Warn(
"possible OVERFLOW in subst, max exponent is %ld",
currRing->bitmask/2);
6924 WerrorS(
"Substituting parameters not implemented for Letterplace rings.");
6954 int mi=(int)(
long)
v->Data();
6955 int ni=(int)(
long)
w->Data();
6958 Werror(
"converting ideal to matrix: dimensions must be positive(%dx%d)",mi,ni);
6969 memcpy(
m->m,I->m,
i*
sizeof(poly));
6970 memset(I->m,0,
i*
sizeof(poly));
6972 res->data = (
char *)
m;
6977 int mi=(int)(
long)
v->Data();
6978 int ni=(int)(
long)
w->Data();
6981 Werror(
"converting module to matrix: dimensions must be positive(%dx%d)",mi,ni);
6990 int mi=(int)(
long)
v->Data();
6991 int ni=(int)(
long)
w->Data();
6994 Werror(
"converting matrix to matrix: dimensions must be positive(%dx%d)",mi,ni);
7011 res->data = (
char *)
m;
7034 ideal u_id=(ideal)u->
Data();
7035 ideal v_id=(ideal)
v->Data();
7038 if ((*w_u).compare((w_v))!=0)
7040 WarnS(
"incompatible weights");
7041 delete w_u; w_u=
NULL;
7049 WarnS(
"wrong weights");
7050 delete w_u; w_u=
NULL;
7056 res->data = (
char *)
idModulo(u_id,v_id ,hom,&w_u, &(
h->data.umatrix));
7085 ideal u_id=(ideal)u->
Data();
7087 ideal v_id=(ideal)
v->Data();
7090 if ((*w_u).compare((w_v))!=0)
7092 WarnS(
"incompatible weights");
7093 delete w_u; w_u=
NULL;
7101 WarnS(
"wrong weights");
7102 delete w_u; w_u=
NULL;
7118 int mi=(int)(
long)
v->Data();
7119 int ni=(int)(
long)
w->Data();
7122 Werror(
"converting to smatrix: dimensions must be positive(%dx%d)",mi,ni);
7139 Werror(
"At least %d ncgen variables are needed for this computation.", ul);
7162 Werror(
"At least %d ncgen variables are needed for this computation.",
IDELEMS((ideal)u->
Data()));
7170 &(hw->
data.uideal));
7184 Werror(
"At least %d ncgen variables are needed for this computation.",
IDELEMS((ideal)u->
Data()));
7201 Werror(
"`%s` must be 0-dimensional",
v->Name());
7213 Werror(
"`%s` must be 0-dimensional",
v->Name());
7224 0,(
int)(
long)
w->Data());
7231 0,(
int)(
long)
w->Data());
7237 int maxl=(int)
v->Data();
7238 ideal u_id=(ideal)u->
Data();
7256 WarnS(
"wrong weights");
7285 yes = (strcmp((
char *)
res->data, (
char *)
w->Data()) == 0);
7287 res->data = (
void *)(
long)yes;
7301 ideal u_id=(ideal)(u->
Data());
7306 WarnS(
"wrong weights");
7349 lineno=(int)(
long)
v->next->Data();
7388 if (
v->next->next->next->rtyp!=
IDHDL)
return TRUE;
7392 mp_Coef2((poly)
v->Data(),(poly)
v->next->Data(),
7413 WarnS(
"<module>,<module>,<int>[,<intvec>] expected!");
7420 ideal P=(ideal)w1.
Data();
7421 ideal
Q=(ideal)w2.
Data();
7423 int n=(int)(
long)v3->
Data();
7430 while( (
i > 0) && ((*w0) > 0) )
7436 WarnS(
"not all weights are positive!");
7455 L->
m[1].
data=(
void *)
R->m[0];
7538 res->data=(
char *)
id;
7543 ring r=(ring)u->
Data();
7545 leftv perm_var_l=
v->next;
7546 leftv perm_par_l=
v->next->next;
7551 WerrorS(
"fetch(<ring>,<name>[,<intvec>[,<intvec>])");
7556 if (perm_par_l!=
NULL)
7565 int par_perm_size=0;
7574 par_perm_size=
rPar(r);
7582 par_perm_size=
rPar(r);
7584 if (par_perm_size!=0)
7585 par_perm=(
int *)
omAlloc0(par_perm_size*
sizeof(
int));
7587 if (perm_par_l==
NULL)
7589 if (par_perm_size!=0)
7594 if (par_perm_size==0)
WarnS(
"source ring has no parameters");
7603 Warn(
"invalid entry for par %d: %d\n",
i,par_perm[
i]);
7615 Warn(
"invalid entry for var %d: %d\n",
i,perm[
i]);
7624 Print(
"// var nr %d: %s -> var %s\n",
i,r->names[
i-1],
currRing->names[perm[
i]-1]);
7630 if (par_perm[
i-1]<0)
7631 Print(
"// par nr %d: %s -> par %s\n",
7633 else if (par_perm[
i-1]>0)
7634 Print(
"// par nr %d: %s -> var %s\n",
7644 perm,par_perm,par_perm_size,nMap)))
7662 Werror(
"no identity map from %s (%s -> %s)",u->
Fullname(),s1,s2);
7669 int l=
v->listLength();
7700 WerrorS(
"cannot convert to ideal or module");
7711 r[
i]=(ideal)
h->Data();
7723 r[
i]=(ideal)tmp.
Data();
7755 matrix iMat;
int invertible;
7761 int rr = aMat->
rows();
7762 int cc = aMat->
cols();
7765 Werror(
"given matrix (%d x %d) is not quadratic, hence not invertible", rr, cc);
7770 WerrorS(
"matrix must be constant");
7780 int rr = uMat->
rows();
7781 int cc = uMat->
cols();
7784 Werror(
"third matrix (%d x %d) is not quadratic, hence not invertible",
7793 WerrorS(
"matricesx must be constant");
7800 Werror(
"expected either one or three matrices");
7818 res->data=(
char*)ll;
7842 WerrorS(
"expected exactly three matrices and one vector as input");
7852 Werror(
"first matrix (%d x %d) is not quadratic",
7858 Werror(
"second matrix (%d x %d) is not quadratic",
7864 Werror(
"second matrix (%d x %d) and third matrix (%d x %d) do not fit",
7870 Werror(
"third matrix (%d x %d) and vector (%d x 1) do not fit",
7879 WerrorS(
"matrices must be constant");
7899 res->data=(
char*)ll;
7912 (*iv)[
i]=(int)(
long)
h->Data();
7931 res->data=(
char *)iv;
7978 number tp = (number)
h->Data();
7984 for(
int j=0;
j<
b->cols();
j++)
7992 res->data=(
char *)bim;
8009 WerrorS(
"2nd argument must be a unit");
8022 WerrorS(
"2nd argument must be a diagonal matrix of units");
8027 (
int)(
long)u3->
Data(),
8036 Werror(
"%s(`poly`,`poly`,`int`,`intvec`) exppected",
8054 else if (
w->next==
NULL)
8081 && ((strcmp(u->
Name(),
"real")==0) || (strcmp(u->
Name(),
"complex")==0)))
8091 else if ((
v->next==
NULL)
8102 Werror(
"`%s` undefined or `int` expected while building `%s(`",u->
name,u->
name);
8106 size_t len=strlen(u->
name) + 12*
l;
8107 char * nn = (
char *)
omAlloc(len);
8108 snprintf(nn,len,
"%s(%d",u->
name,(
int)(
long)
v->Data());
8112 while (*
s!=
'\0')
s++;
8116 Werror(
"`%s` undefined or `int` expected while building `%s(`",u->
name,u->
name);
8120 snprintf(
s,len-(nn-
s),
",%d",(
int)(
long)
v->Data());
8121 }
while (
v->next!=
NULL);
8122 while (*
s!=
'\0')
s++;
8143 ideal I=(ideal)u->
Data();
8156 Werror(
"%s(`ideal`,`ideal`,`matrix`,`string`)\n"
8157 "or (`module`,`module`,`matrix`,`string`) expected",
8189 syz=&(hw->
data.uideal);
8196 syz=&(hw->
data.uideal);
8197 h11=(ideal)u4->
Data();
8202 h11=(ideal)u4->
Data();
8206 Werror(
"%s(`ideal/module`,`matrix`[,`module`][,`string`][,`ideal/module`]) expected",
Tok2Cmdname(
iiOp));
8218 syz=&(hw->
data.uideal);
8220 h11=(ideal)u5->
Data();
8224 Werror(
"%s(`ideal/module`,`matrix`[,`module`][,`string`][,`ideal/module`]) expected",
Tok2Cmdname(
iiOp));
8234 Werror(
"At least %d ncgen variables are needed for this computation.",
IDELEMS((ideal)u->
Data()));
8255 if (
v!=
NULL) sl =
v->listLength();
8259 int add_row_shift = 0;
8261 if (weights!=
NULL) add_row_shift=weights->
min_in();
8288 Werror(
"`%s` is undefined",
h->Fullname());
8300 res->data=(
char *)L;
8315 u_id=(ideal)u->
Data();
8316 v_id=(ideal)
v->Data();
8343 if ((*w_u).compare((w_v))!=0)
8345 WarnS(
"incompatible weights");
8346 delete w_u; w_u=
NULL;
8354 WarnS(
"wrong weights");
8355 delete w_u; w_u=
NULL;
8361 res->data = (
char *)
idModulo(u_id,v_id ,hom,&w_u, &(
h->data.umatrix),alg);
8416 WerrorS(
"2nd argument must be a diagonal matrix of units");
8423 (
int)(
long)u4->
Data()
8433 else u1p=(poly)u1->
Data();
8436 else u2p=(poly)u2->
Data();
8440 WerrorS(
"2nd argument must be a unit");
8469 WerrorS(
"2nd argument must be a diagonal matrix of units");
8476 (
int)(
long)u4->
Data(),
8488 WerrorS(
"2nd argument must be a unit");
8499 Werror(
"%s(`ideal`,`ideal`,`matrix`,`int`,`intvec`) exppected",
8511 for(
i=0;
i<nCount;
i++)
8532 unsigned nCount = (
sArithBase.nCmdUsed-1) / 3;
8540 for (
unsigned i=0;
i<nCount;
i++)
8552 for (
int i = 0;
i < bb_list->
count;
i++)
8562 for (
unsigned i=0;
i<nCount;
i++)
8586 for (
int i = 0;
i < bb_list->
count;
i++)
8602 res->data=(
void *)L;
8613 int n =
v->listLength();
8616 res->data =
v->String();
8620 char** slist = (
char**)
omAlloc(n*
sizeof(
char*));
8623 for (
i=0,
j=0;
i<n;
i++,
v =
v ->next)
8625 slist[
i] =
v->String();
8627 j+=strlen(slist[
i]);
8629 char*
s = (
char*)
omAlloc((
j+1)*
sizeof(
char));
8633 strcat(
s, slist[
i]);
8653#if defined(__alpha) && !defined(linux)
8656 void usleep(
unsigned long usec);
8685 leftv u =
v;
int factorsGiven = 0;
8688 WerrorS(
"expected arguments (poly, int [, poly, poly] [, int, int])");
8691 else h = (poly)u->
Data();
8695 WerrorS(
"expected arguments (poly, int [, poly, poly] [, int, int])");
8698 else d = (int)(
long)u->
Data();
8704 WerrorS(
"expected arguments (poly, int [, poly, poly] [, int, int])");
8709 f0 = (poly)u->
Data();
8719 WerrorS(
"expected arguments (poly, int [, poly, poly] [, int, int])");
8724 xIndex = (int)(
long)u->
Data();
8725 yIndex = (int)(
long)u->
next->
Data();
8731 WerrorS(
"expected arguments (poly, int [, poly, poly] [, int, int])");
8738 WerrorS(
"expected non-constant polynomial argument(s)");
8742 if ((xIndex < 1) || (n < xIndex))
8744 Werror(
"index for variable x (%d) out of range [1..%d]", xIndex, n);
8747 if ((yIndex < 1) || (n < yIndex))
8749 Werror(
"index for variable y (%d) out of range [1..%d]", yIndex, n);
8752 if (xIndex == yIndex)
8754 WerrorS(
"expected distinct indices for variables x and y");
8759 if (factorsGiven == 0)
8773 WerrorS(
"expected h(0,y) to have exactly two distinct monic factors");
8788 res->data = (
char*)L;
8796 (
v->next->next->next->Typ() !=
INT_CMD))
8799#if defined(HAVE_USLEEP)
8800 if (((
long)
res->data) == 0L)
8802 int i_s = (int)(
long)
v->next->next->next->Data();
8805 usleep((
int)(
long)
v->next->next->next->Data());
8809#elif defined(HAVE_SLEEP)
8810 if (((
int)
res->data) == 0)
8812 int i_s = (int)
v->next->next->next->Data();
8815 si_sleep((is - 1)/1000000 + 1);
8834 if ((rest!=
NULL) && (!
b))
8841 memcpy(
res,&tmp_res,
sizeof(tmp_res));
8856 WerrorS(
"expected (matrix, number, number, number) as arguments");
8861 (number)(
v->Data()),
8862 (number)(
w->Data()),
8863 (number)(
x->Data()));
8873 ideal i1=(ideal)(u->
Data());
8879 WerrorS(
"expected `std(`ideal/module`,`poly/vector`,`bigintvec`,`intvec`)");
8894 i0->m[0]=(poly)
v->Data();
8899 i0=(ideal)
v->Data();
8903 WerrorS(
"expected `std(`ideal/module`,`poly/vector`,`intvec`,`intvec`)");
8910 memset(i0->m,0,
sizeof(poly)*
IDELEMS(i0));
8920 WarnS(
"wrong weights");
8955 WerrorS(
"expected `cring` [ `id` ... ]");
8961 char **n=(
char**)
omAlloc0(
N*
sizeof(
char*));
8962 for(
int i=0;
i<
N;
i++,names=names->
next)
8964 n[
i]=(
char *)names->
Name();
8976 r->start =(int)(
long)e->
Data();
8981 int c=(int)(
long)u->
Data();
8985 PrintS(
"delete all variables\n");
8990 default:
WerrorS(
"not implemented");
8995#define NULL_VAL NULL
8999#include "iparith.inc"
9017 while (dA2[
i].cmd==op)
9019 if ((at==dA2[
i].arg1)
9020 && (bt==dA2[
i].arg2))
9031 WerrorS(
"no ring active (3)");
9037 if ((call_failed=dA2[
i].
p(
res,a,
b)))
9057 while (dA2[
i].cmd==op)
9075 WerrorS(
"no ring active (4)");
9084 || (call_failed=dA2[
i].
p(
res,an,bn)));
9123 Werror(
"`%s` is not defined",
s);
9130 Werror(
"%s(`%s`,`%s`) failed"
9135 Werror(
"`%s` %s `%s` failed"
9140 while (dA2[
i].cmd==op)
9142 if(((at==dA2[
i].arg1)||(bt==dA2[
i].arg2))
9147 Werror(
"expected %s(`%s`,`%s`)"
9150 Werror(
"expected `%s` %s `%s`"
9189 memcpy(&d->arg1,a,
sizeof(
sleftv));
9191 memcpy(&d->arg2,
b,
sizeof(
sleftv));
9195 res->data=(
char *)d;
9208 if(!bb->blackbox_Op2(op,
res,a,
b))
return FALSE;
9214 else if ((bt>
MAX_TOK)&&(op!=
'('))
9219 if(!bb->blackbox_Op2(op,
res,a,
b))
return FALSE;
9247 while (dA1[
i].cmd==op)
9259 WerrorS(
"no ring active (5)");
9266 if ((call_failed=dA1[
i].
p(
res,a)))
9286 while (dA1[
i].cmd==op)
9302 WerrorS(
"no ring active (6)");
9310 || (call_failed=dA1[
i].
p(
res,an)));
9351 while (dA1[
i].cmd==op)
9355 Werror(
"expected %s(`%s`)"
9377 memcpy(&d->arg1,a,
sizeof(
sleftv));
9381 res->data=(
char *)d;
9394 res->data=bb->blackbox_Init(bb);
9395 return bb->blackbox_Assign(
res,a);
9405 if(!bb->blackbox_Op1(op,
res,a))
return FALSE;
9425 const struct sValCmd3* dA3,
int at,
int bt,
int ct,
9436 while (dA3[
i].cmd==op)
9438 if ((at==dA3[
i].arg1)
9439 && (bt==dA3[
i].arg2)
9440 && (ct==dA3[
i].arg3))
9448 Print(
"call %s(%s,%s,%s)\n",
9450 if ((call_failed=dA3[
i].
p(
res,a,
b,c)))
9471 while (dA3[
i].cmd==op)
9487 Print(
"call %s(%s,%s,%s)\n",
9493 || (call_failed=dA3[
i].
p(
res,an,bn,cn)));
9542 Werror(
"`%s` is not defined",
s);
9548 Werror(
"%s(`%s`,`%s`,`%s`) failed"
9552 while (dA3[
i].cmd==op)
9554 if(((at==dA3[
i].arg1)
9556 ||(ct==dA3[
i].arg3))
9559 Werror(
"expected %s(`%s`,`%s`,`%s`)"
9588 memcpy(&d->arg1,a,
sizeof(
sleftv));
9590 memcpy(&d->arg2,
b,
sizeof(
sleftv));
9592 memcpy(&d->arg3,c,
sizeof(
sleftv));
9596 res->data=(
char *)d;
9608 if(!bb->blackbox_Op3(op,
res,a,
b,c))
return FALSE;
9658 if(
v==
NULL)
return failed;
9660 if(cnt)
v->next =
NULL;
9680 res->data=(
char *)d;
9685 memcpy(&d->arg1,a,
sizeof(
sleftv));
9718 if(!bb->blackbox_OpM(op,
res,a))
return FALSE;
9733 if ((args==
dArithM[
i].number_of_args)
9735 || ((
dArithM[
i].number_of_args==-2)&&(args>0)))
9786 if (strcmp(n,
sArithBase.sCmds[an].name) == 0)
9791 else if ((an!=en) && (strcmp(n,
sArithBase.sCmds[en].name) == 0))
9833 Warn(
"outdated identifier `%s` used - please change your code",
9884 if (op==dArithTab[
p].cmd)
return dArithTab[
p].start;
9885 if (op<dArithTab[
p].cmd) e=
p-1;
9905 if (tok==
ANY_TYPE)
return "any_type";
9906 if (tok==
COMMAND)
return "command";
9907 if (tok==
NONE)
return "nothing";
9919 if (tok==
IDHDL)
return "identifier";
9955 cmdnames *pCmdL = (cmdnames*)a;
9956 cmdnames *pCmdR = (cmdnames*)
b;
9961 if(pCmdL->name==
NULL)
return 1;
9962 if(pCmdR->name==
NULL)
return -1;
9965 if(strcmp(pCmdL->name,
"$INVALID$")==0)
return -1;
9966 if(strcmp(pCmdR->name,
"$INVALID$")==0)
return 1;
9969 if (pCmdL->tokval==-1)
9971 if (pCmdR->tokval==-1)
9972 return strcmp(pCmdL->name, pCmdR->name);
9977 if(pCmdR->tokval==-1)
return -1;
9979 return strcmp(pCmdL->name, pCmdR->name);
10036 if (strcmp(szName,
sArithBase.sCmds[an].name) == 0)
10041 else if (strcmp(szName,
sArithBase.sCmds[en].name) == 0)
10087 if(nPos<0)
return NULL;
10096 if(szName==
NULL)
return -1;
10099 if(nIndex<0 || nIndex>=(
int)
sArithBase.nCmdUsed)
10101 Print(
"'%s' not found (%d)\n", szName, nIndex);
10121 const char *szName,
10144 if(szName==
NULL)
return -1;
10148 Print(
"'%s' already exists at %d\n", szName, nIndex);
10185 WerrorS(
"not implemented for non-commutative rings");
10207 WerrorS(
"not implemented for rings with rings as coeffients");
10212 WerrorS(
"not implemented for rings with rings as coeffients and non-global orderings");
10219 WerrorS(
"domain required as coeffients");
10225 WarnS(
"considering the image in Q[...]");
10237 WerrorS(
"not implemented for rings with rings as coeffients (except ZZ)");
10243 int return_type=c->
m[0].
Typ();
10260 for (
unsigned i=0;
i<=(unsigned)c->
nr;
i++)
10265 if (bo) {
Werror(
"chinrem failed for list entry %d",
i+1);
break;}
10275 WerrorS(
"poly/ideal/module/matrix/list expected");
10285 cf=
cf->extRing->cf;
10294 Werror(
"wromg number of primes (%d:%d) for chinrem",pl->
nr+1,rl);
10301 if (
p->length()!=rl)
10303 Werror(
"wromg number of primes (%d:%d) for chinrem",
p->length(),rl);
10308 ideal *
x=(ideal *)
omAlloc(rl*
sizeof(ideal));
10314 for(
i=rl-1;
i>=0;
i--)
10316 if (c->
m[
i].
Typ()!=return_type)
10341 xx=(number *)
omAlloc(rl*
sizeof(number));
10342 for(
i=rl-1;
i>=0;
i--)
10354 Werror(
"bigint expected at pos %d",
i+1);
10361 number *q=(number *)
omAlloc(rl*
sizeof(number));
10364 for(
i=rl-1;
i>=0;
i--)
10371 for(
i=rl-1;
i>=0;
i--)
10383 Werror(
"bigint expected at pos %d",
i+1);
10399 res->data=(
char *)n;
10422 for(
i=rl-1;
i>=0;
i--)
10427 res->rtyp=return_type;
10437 for (
unsigned i=0;
i<=(unsigned)c->
nr;
i++)
10442 if (bo) {
Werror(
"farey failed for list entry %d",
i+1);
break;}
10455 if (at < bt)
return -1;
10456 if (at > bt)
return 1;
10457 int tab_pos=
iiTabIndex(dArithTab2,JJTAB2LEN,
'<');
10465 unsigned long ad=(
unsigned long)a->
Data();
10466 unsigned long bd=(
unsigned long)
b->Data();
10467 if (ad<bd)
return -1;
10468 else if (ad==bd)
return 0;
10479 unsigned long ad=(
unsigned long)a->
Data();
10480 unsigned long bd=(
unsigned long)
b->Data();
10481 if (ad<bd)
return -1;
10482 else if (ad==bd)
return 0;
10485 else if (tmp.
data==
NULL)
return 1;
10513 for(
j=
i;
j<len;
j++)
l->m[
j]=
l->m[
j+1];
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.
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.
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.
void atSet(idhdl root, char *name, void *data, int typ)
void * atGet(idhdl root, const char *name, int t, void *defaultReturnValue)
static int si_max(const int a, const int b)
static int si_min(const int a, const int b)
intvec * bim2iv(bigintmat *b)
bigintmat * bimMult(bigintmat *a, bigintmat *b)
bigintmat * bimSub(bigintmat *a, bigintmat *b)
bigintmat * bimAdd(bigintmat *a, bigintmat *b)
Matrix-Add/-Sub/-Mult so oder mit operator+/-/* ? @Note: NULL as a result means an error (non-compati...
#define BIMATELEM(M, I, J)
struct blackbox_list * getBlackboxTypes()
return array of all define types.
const char * getBlackboxName(const int t)
return the name to the type given by t (r/o)
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
int blackboxIsCmd(const char *n, int &tok)
used by scanner: returns ROOT_DECL for known types (and the type number in tok)
void printBlackboxTypes()
list all defined type (for debugging)
struct for containing list of blackbox names and the number of them.
const CanonicalForm CFMap CFMap & N
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from to such that is mapped onto
int ipower(int b, int m)
int ipower ( int b, int m )
poly singclap_pmod(poly f, poly g, const ring r)
ideal singclap_factorize(poly f, intvec **v, int with_exps, const ring r)
VAR int singclap_factorize_retry
poly singclap_pdivide(poly f, poly g, const ring r)
BOOLEAN singclap_extgcd(poly f, poly g, poly &res, poly &pa, poly &pb, const ring r)
number singclap_det_bi(bigintmat *m, const coeffs cf)
int singclap_det_i(intvec *m, const ring)
ideal singclap_sqrfree(poly f, intvec **v, int with_exps, const ring r)
void set(int i, int j, number n, const coeffs C=NULL)
replace an entry with a copy (delete old + copy new!). NOTE: starts at [1,1]
int compare(const bigintmat *op) const
intvec * delete_pos(int p)
void show(int mat=0, int spaces=0) const
int compare(const intvec *o) const
Class used for (list of) interpreter objects.
void CleanUp(ring r=currRing)
void Clean(ring r=currRing)
INLINE_THIS void Init(int l=0)
Coefficient rings, fields and other domains suitable for Singular polynomials.
static FORCE_INLINE int n_ParDeg(number n, const coeffs 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
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 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 FORCE_INLINE number n_Add(number a, number b, const coeffs r)
return the sum of 'a' and 'b', i.e., a+b
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)
static FORCE_INLINE BOOLEAN nCoeff_is_Extension(const coeffs r)
static FORCE_INLINE number n_Random(siRandProc p, number p1, number p2, const coeffs cf)
@ n_algExt
used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
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 FORCE_INLINE char * nCoeffString(const coeffs cf)
TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar.
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 FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
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 FORCE_INLINE void n_Power(number a, int b, number *res, const coeffs r)
fill res with the power a^b
static FORCE_INLINE number n_Farey(number a, number b, const coeffs 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...
static FORCE_INLINE number n_RePart(number i, const coeffs cf)
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
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 FORCE_INLINE number n_Sub(number a, number b, const coeffs r)
return the difference of 'a' and 'b', i.e., a-b
static FORCE_INLINE number n_ChineseRemainderSym(number *a, number *b, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs r)
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
static FORCE_INLINE char * nCoeffName(const coeffs cf)
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 number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
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 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 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)
static FORCE_INLINE number n_SubringGcd(number a, number b, const coeffs r)
static FORCE_INLINE number n_ImPart(number i, const coeffs cf)
number(* nMapFunc)(number a, const coeffs src, const coeffs dst)
maps "a", which lives in src, into dst
static FORCE_INLINE void n_Normalize(number &n, const coeffs r)
inplace-normalization of n; produces some canonical representation of n;
static FORCE_INLINE BOOLEAN nCoeff_is_transExt(const coeffs r)
TRUE iff r represents a transcendental extension field.
static BOOLEAN pa(leftv res, leftv args)
static BOOLEAN pb(leftv res, leftv args)
const CanonicalForm int s
const Variable & v
< [in] a sqrfree bivariate poly
factory.h' is the user interface to Factory.
VAR void(* WerrorS_callback)(const char *s)
FILE * feFopen(const char *path, const char *mode, char *where, short useWerror, short path_only)
void WerrorS(const char *s)
static void * feOptValue(feOptIndex opt)
VAR char my_yylinebuf[80]
void monitor(void *F, int mode)
if(!FE_OPT_NO_SHELL_FLAG)
void newBuffer(char *s, feBufferTypes t, procinfo *pi, int lineno)
This file is work in progress and currently not part of the official Singular.
matrix singflint_kernel(matrix m, const ring R)
static int _gentable_sort_cmds(const void *a, const void *b)
compares to entry of cmdsname-list
int iiTestConvert(int inputType, int outputType)
const char * iiTwoOps(int t)
const char * Tok2Cmdname(int tok)
static int RingDependend(int t)
BOOLEAN yyInRingConstruction
ideal scKBase(int deg, ideal s, ideal Q, intvec *mv)
int scDimIntRing(ideal vid, ideal Q)
scDimInt for ring-coefficients
long scMult0Int(ideal S, ideal Q)
intvec * scIndIntvec(ideal S, ideal Q)
int lp_kDim(const ideal _G)
int lp_gkDim(const ideal _G)
int scMultInt(ideal S, ideal Q)
poly hFirstSeries0m(ideal A, ideal Q, intvec *wdegree, intvec *shifts, const ring src, const ring Qt)
poly hFirstSeries0p(ideal A, ideal Q, intvec *wdegree, const ring src, const ring Qt)
intvec * hSecondSeries(intvec *hseries1)
intvec * hFirstSeries(ideal A, intvec *module_w, ideal Q, intvec *wdegree)
bigintmat * hFirstSeries0b(ideal I, ideal Q, intvec *wdegree, intvec *shifts, const ring src, const coeffs biv_cf)
bigintmat * hSecondSeries0b(ideal I, ideal Q, intvec *wdegree, intvec *shifts, const ring src, const coeffs biv_cf)
void scDegree(ideal S, intvec *modulweight, ideal Q)
void hLookSeries(ideal S, intvec *modulweight, ideal Q, intvec *wdegree)
leftv t_findTabelVal(stablerec *t, const char *s)
find the data to key s
void t_addTable(stablerec *t, char *s, leftv v)
add a new entry (key s, data v) to table t, eats s, copies v
GbVariant syGetAlgorithm(char *n, const ring r, const ideal)
matrix idCoeffOfKBase(ideal arg, ideal kbase, poly how)
void idLiftW(ideal P, ideal Q, int n, matrix &T, ideal &R, int *w)
ideal idSyzygies(ideal h1, tHomog h, intvec **w, BOOLEAN setSyzComp, BOOLEAN setRegularity, int *deg, GbVariant alg)
matrix idDiff(matrix i, int k)
BOOLEAN idTestHomModule(ideal m, ideal Q, intvec *w)
ideal idLiftStd(ideal h1, matrix *T, tHomog hi, ideal *S, GbVariant alg, ideal h11)
ideal idQuot(ideal h1, ideal h2, BOOLEAN h1IsStb, BOOLEAN resultIsIdeal)
ideal idSeries(int n, ideal M, matrix U, intvec *w)
ideal idMinEmbedding_with_map_v(ideal arg, intvec **w, ideal &trans, int *g)
ideal idElimination2(ideal h1, poly delVar, bigintmat *hilb, GbVariant alg)
matrix idDiffOp(ideal I, ideal J, BOOLEAN multiply)
ideal idElimination(ideal h1, poly delVar, intvec *hilb, GbVariant alg)
ideal idSect(ideal h1, ideal h2, GbVariant alg)
ideal idMultSect(resolvente arg, int length, GbVariant alg)
ideal idLift(ideal mod, ideal submod, ideal *rest, BOOLEAN goodShape, BOOLEAN isSB, BOOLEAN divide, matrix *unit, GbVariant alg)
represents the generators of submod in terms of the generators of mod (Matrix(SM)*U-Matrix(rest)) = M...
ideal idModulo(ideal h2, ideal h1, tHomog hom, intvec **w, matrix *T, GbVariant alg)
ideal idMinBase(ideal h1, ideal *SB)
ideal id_Farey(ideal x, number N, const ring r)
ideal idMinEmbedding(ideal arg, BOOLEAN inPlace, intvec **w)
#define idDelete(H)
delete an ideal
#define idSimpleAdd(A, B)
ideal id_Copy(ideal h1, const ring r)
copy an ideal
static BOOLEAN idIsZeroDim(ideal i)
static BOOLEAN idHomModule(ideal m, ideal Q, intvec **w)
static BOOLEAN idHomIdeal(ideal id, ideal Q=NULL)
static ideal idMult(ideal h1, ideal h2)
hh := h1 * h2
ideal idAdd(ideal h1, ideal h2)
h1 + h2
#define idMaxIdeal(D)
initialise the maximal ideal (at 0)
static intvec * idSort(ideal id, BOOLEAN nolex=TRUE)
ideal interpolation(const std::vector< ideal > &L, intvec *v)
static BOOLEAN length(leftv result, leftv arg)
intvec * ivSub(intvec *a, intvec *b)
intvec * ivAdd(intvec *a, intvec *b)
intvec * ivMult(intvec *a, intvec *b)
intvec * ivTranp(intvec *o)
intvec * ivCopy(const intvec *o)
#define IMATELEM(M, I, J)
static BOOLEAN jjUMINUS_MA(leftv res, leftv u)
static BOOLEAN jjOP_BIM_I(leftv res, leftv u, leftv v)
static BOOLEAN jjRANK1(leftv res, leftv v)
static BOOLEAN jjINDEX_V_IV(leftv res, leftv u, leftv v)
static BOOLEAN jjIMPART(leftv res, leftv v)
static BOOLEAN jjIm2Iv(leftv res, leftv v)
static BOOLEAN jjQUOT(leftv res, leftv u, leftv v)
static BOOLEAN jjUMINUS_IV(leftv res, leftv u)
static BOOLEAN jjOPPOSITE(leftv res, leftv a)
static int _gentable_sort_cmds(const void *a, const void *b)
compares to entry of cmdsname-list
BOOLEAN jjWAITALL1(leftv res, leftv u)
static BOOLEAN jjRESTART(leftv, leftv u)
static BOOLEAN jjidHead(leftv res, leftv v)
static BOOLEAN jjHILBERT(leftv, leftv v)
static BOOLEAN jjTIMES_MA_P1(leftv res, leftv u, leftv v)
static BOOLEAN jjLEADMONOM(leftv res, leftv v)
static BOOLEAN jjOP_IV_I(leftv res, leftv u, leftv v)
static BOOLEAN jjstrlen(leftv res, leftv v)
static BOOLEAN jjBRACK_Bim(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjEXTGCD_P(leftv res, leftv u, leftv v)
static BOOLEAN jjDET_BI(leftv res, leftv v)
BOOLEAN jjWAIT1ST1(leftv res, leftv u)
BOOLEAN jjLOAD(const char *s, BOOLEAN autoexport)
load lib/module given in v
static BOOLEAN jjMATRIX_Mo(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjP2I(leftv res, leftv v)
static BOOLEAN jjIS_RINGVAR_P(leftv res, leftv v)
static BOOLEAN jjDOTDOT(leftv res, leftv u, leftv v)
static BOOLEAN jjFWALK3(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjREPART(leftv res, leftv v)
static BOOLEAN jjTIMES_MA_BI2(leftv res, leftv u, leftv v)
static BOOLEAN jjMAP(leftv res, leftv u, leftv v)
static BOOLEAN jjGT_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjN2BI(leftv res, leftv v)
static BOOLEAN jjRESERVEDLIST0(leftv res, leftv)
static BOOLEAN jjCHAR(leftv res, leftv v)
static BOOLEAN jjOP_I_IM(leftv res, leftv u, leftv v)
static BOOLEAN jjBRACK_Ma_IV_I(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjROWS_IV(leftv res, leftv v)
static BOOLEAN jjLIFTSTD(leftv res, leftv u, leftv v)
static BOOLEAN jjNULL(leftv, leftv)
static BOOLEAN jjNEWSTRUCT2(leftv, leftv u, leftv v)
static BOOLEAN jjBIV2IV(leftv res, leftv v)
static BOOLEAN jjMONITOR2(leftv res, leftv u, leftv v)
static BOOLEAN jjDIM(leftv res, leftv v)
static BOOLEAN jjCOUNT_BIM(leftv res, leftv v)
static BOOLEAN jjBRACKET(leftv res, leftv a, leftv b)
static BOOLEAN jjCOLS_IV(leftv res, leftv v)
static BOOLEAN jjNAMES_I(leftv res, leftv v)
static BOOLEAN jjMULT(leftv res, leftv v)
static BOOLEAN jjHOMOG1_WI(leftv res, leftv v, leftv u)
static BOOLEAN jjPARDEG(leftv res, leftv v)
static BOOLEAN jjDENOMINATOR(leftv res, leftv v)
Return the denominator of the input number.
static BOOLEAN jjRANDOM(leftv res, leftv u, leftv v)
static BOOLEAN jjIDEAL_Ma(leftv res, leftv v)
static BOOLEAN jjDIVISION(leftv res, leftv u, leftv v)
static BOOLEAN jjOP_I_IV(leftv res, leftv u, leftv v)
static BOOLEAN jjmpTransp(leftv res, leftv v)
static BOOLEAN jjOPTION_PL(leftv res, leftv v)
static BOOLEAN jjEQUAL_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjDET_S(leftv res, leftv v)
static BOOLEAN jjL2R(leftv res, leftv v)
static BOOLEAN jjREDUCE5(leftv res, leftv u)
static BOOLEAN jjrCharStr(leftv res, leftv v)
static BOOLEAN jjSUBST_Id_I(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjMINUS_B_P(leftv res, leftv u, leftv v)
static BOOLEAN jjHILBERT_IV(leftv res, leftv v)
int iiArithFindCmd(const char *szName)
static BOOLEAN jjIDEAL_R(leftv res, leftv v)
static BOOLEAN jjINDEPSET(leftv res, leftv v)
static BOOLEAN jjTYPEOF(leftv res, leftv v)
static BOOLEAN jjLU_SOLVE(leftv res, leftv v)
static BOOLEAN jjFACSTD(leftv res, leftv v)
static BOOLEAN jjMEMORY(leftv res, leftv v)
static BOOLEAN jjidTransp(leftv res, leftv v)
static BOOLEAN jjLIFT(leftv res, leftv u, leftv v)
static BOOLEAN jjUMINUS_BIM(leftv res, leftv u)
static BOOLEAN jjSUBST_Bu(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjTIMES_MA_N2(leftv res, leftv u, leftv v)
static BOOLEAN jjDIM_R(leftv res, leftv v)
BOOLEAN jjSORTLIST(leftv, leftv arg)
static BOOLEAN jjDUMP(leftv, leftv v)
static BOOLEAN jjpMaxComp(leftv res, leftv v)
static BOOLEAN jjCOEFFS1(leftv res, leftv v)
static BOOLEAN jjREDUCE3_ID(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjELIMIN_HILB(leftv res, leftv u, leftv v, leftv w)
static int jjCOMPARE_ALL(const void *aa, const void *bb)
static BOOLEAN jjNAMEOF(leftv res, leftv v)
static BOOLEAN jjPlural_mat_poly(leftv res, leftv a, leftv b)
static BOOLEAN jjTIMES_SM(leftv res, leftv u, leftv v)
static BOOLEAN jjMOD_BI(leftv res, leftv u, leftv v)
BOOLEAN jjUNIQLIST(leftv, leftv arg)
static BOOLEAN jjTIMES_MA_I2(leftv res, leftv u, leftv v)
static BOOLEAN jjSTATUS2L(leftv res, leftv u, leftv v)
BOOLEAN(* proc3)(leftv, leftv, leftv, leftv)
static BOOLEAN jjGT_I(leftv res, leftv u, leftv v)
static BOOLEAN jjPRIME(leftv res, leftv v)
static BOOLEAN jjPFAC2(leftv res, leftv u, leftv v)
static BOOLEAN jjidVec2Ideal(leftv res, leftv v)
static BOOLEAN jjJACOB_P(leftv res, leftv v)
static BOOLEAN jjSQR_FREE(leftv res, leftv u)
static BOOLEAN jjSTD_HILB_W(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjEQUAL_I(leftv res, leftv u, leftv v)
static BOOLEAN jjTIMES_MA_P2(leftv res, leftv u, leftv v)
static BOOLEAN jjMODULO3(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjSBA_1(leftv res, leftv v, leftv u)
static BOOLEAN jjCOEFFS3_P(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjCALL1MANY(leftv res, leftv u)
static BOOLEAN jjPLUS_MA(leftv res, leftv u, leftv v)
static BOOLEAN jjMINUS_V(leftv res, leftv u, leftv v)
static BOOLEAN jjINTERRED(leftv res, leftv v)
static BOOLEAN jjJACOB_M(leftv res, leftv a)
static BOOLEAN jjJET_ID_IV(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjTIMES_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjBAREISS(leftv res, leftv v)
static BOOLEAN jjREAD(leftv res, leftv v)
static BOOLEAN jjLT_N(leftv res, leftv u, leftv v)
static BOOLEAN jjMINUS_MA(leftv res, leftv u, leftv v)
static BOOLEAN jjFactModD_M(leftv res, leftv v)
static BOOLEAN jjMATRIX_Id(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjEXTGCD_I(leftv res, leftv u, leftv v)
static BOOLEAN jjIS_RINGVAR_S(leftv res, leftv v)
static BOOLEAN jjDelete_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjLE_N(leftv res, leftv u, leftv v)
static BOOLEAN jjSUBST_P(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjROWS_BIM(leftv res, leftv v)
static BOOLEAN jjCOMPARE_S(leftv res, leftv u, leftv v)
int iiInitArithmetic()
initialisation of arithmetic structured data
static BOOLEAN jjOR_I(leftv res, leftv u, leftv v)
static BOOLEAN jjTIMES_MA_I1(leftv res, leftv u, leftv v)
static BOOLEAN jjLIFTSTD_SYZ(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjBAREISS3(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjRESERVED0(leftv, leftv)
static BOOLEAN jjTIMES_MA_N1(leftv res, leftv u, leftv v)
static BOOLEAN jjLIFT_4(leftv res, leftv U)
static BOOLEAN jjSLIM_GB(leftv res, leftv u)
static BOOLEAN jjMSTD(leftv res, leftv v)
static BOOLEAN jjBREAK1(leftv, leftv v)
static BOOLEAN jjJET_ID_M(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjMINUS_BIM(leftv res, leftv u, leftv v)
static BOOLEAN jjnInt(leftv res, leftv u)
static BOOLEAN jjSQR_FREE2(leftv res, leftv u, leftv dummy)
static BOOLEAN jjCOEFFS3_Id(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjREGULARITY(leftv res, leftv v)
static BOOLEAN jjHOMOG_W_M(leftv res, leftv v1, leftv v2, leftv v3)
static BOOLEAN jjMINUS_N(leftv res, leftv u, leftv v)
static BOOLEAN jjBREAK0(leftv, leftv)
static BOOLEAN jjTRACE_IV(leftv res, leftv v)
BOOLEAN iiExprArith2(leftv res, leftv a, int op, leftv b, BOOLEAN proccall)
static BOOLEAN jjMONOM(leftv res, leftv v)
static BOOLEAN jjSort_Id(leftv res, leftv v)
static BOOLEAN jjCOEF_M(leftv, leftv v)
static BOOLEAN jjidMinBase(leftv res, leftv v)
static BOOLEAN jjDEG_IV(leftv res, leftv u, leftv v)
static BOOLEAN jjRING_2(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjMINUS_IV(leftv res, leftv u, leftv v)
static BOOLEAN jjPREIMAGE_R(leftv res, leftv v)
static BOOLEAN jjHOMOG_P(leftv res, leftv u, leftv v)
static BOOLEAN jjBRACK_Im(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjMATRIX_Ma(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjidMaxIdeal(leftv res, leftv v)
static BOOLEAN jjMINOR_M(leftv res, leftv v)
static BOOLEAN jjCOUNT_BI(leftv res, leftv v)
static BOOLEAN jjPROC3(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjKERNEL_M(leftv res, leftv v)
static BOOLEAN jjCOLS_BIM(leftv res, leftv v)
static BOOLEAN jjREDUCE3_CP(leftv res, leftv u, leftv v, leftv w)
struct sValCmd3 * psValCmd3
static BOOLEAN jjBRACK_Ma_I_IV(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjLE_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjPLUS_B_P(leftv res, leftv u, leftv v)
static BOOLEAN jjPlural_mat_mat(leftv res, leftv a, leftv b)
static BOOLEAN jjIDEAL_Map(leftv res, leftv v)
static BOOLEAN jjPARSTR2(leftv res, leftv u, leftv v)
BOOLEAN(* proc2)(leftv, leftv, leftv)
static BOOLEAN jjKoszul(leftv res, leftv u, leftv v)
static BOOLEAN jjTIMES_N(leftv res, leftv u, leftv v)
static BOOLEAN jjINTERSECT_PL(leftv res, leftv v)
static BOOLEAN jjTIMES_MA(leftv res, leftv u, leftv v)
static BOOLEAN jjTIMES_IV(leftv res, leftv u, leftv v)
static BOOLEAN jjPLUS_I(leftv res, leftv u, leftv v)
static BOOLEAN jjINTERSEC3S(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjRES3(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjBIGINTVEC_PL(leftv res, leftv v)
static BOOLEAN jjJET_P_IV(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjREDUCE_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjCOEF(leftv res, leftv u, leftv v)
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 BOOLEAN jjOP_REST(leftv res, leftv u, leftv v)
static BOOLEAN jjEXECUTE(leftv, leftv v)
static BOOLEAN jjDEG_M_IV(leftv res, leftv u, leftv v)
static BOOLEAN jjSTATUS3(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjLEADEXP(leftv res, leftv v)
static BOOLEAN jjDEG_M(leftv res, leftv u)
static BOOLEAN jjPLUS_IV(leftv res, leftv u, leftv v)
static BOOLEAN jjDIFF_COEF(leftv res, leftv u, leftv v)
int iiArithRemoveCmd(char *szName)
static BOOLEAN jjGE_N(leftv res, leftv u, leftv v)
static BOOLEAN jjEQUAL_SM(leftv res, leftv u, leftv v)
static BOOLEAN jjINTERPOLATION(leftv res, leftv l, leftv v)
static BOOLEAN jjSIMPL_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjRING3(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjREDUCE_P(leftv res, leftv u, leftv v)
static BOOLEAN jjDIV_Ma(leftv res, leftv u, leftv v)
static BOOLEAN jjFRES3(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjMODULO(leftv res, leftv u, leftv v)
static BOOLEAN jjCOMPARE_IV(leftv res, leftv u, leftv v)
STATIC_VAR int WerrorS_dummy_cnt
static BOOLEAN jjREAD2(leftv res, leftv u, leftv v)
static BOOLEAN jjREDUCE3_P(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjPAR1(leftv res, leftv v)
static BOOLEAN jjnlInt(leftv res, leftv u)
cmdnames * sCmds
array of existing commands
static BOOLEAN jjFAREY_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjPLUS_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjGCD_N(leftv res, leftv u, leftv v)
static BOOLEAN jjELIMIN(leftv res, leftv u, leftv v)
static BOOLEAN jjPLUSPLUS(leftv, leftv u)
static Subexpr jjMakeSub(leftv e)
static BOOLEAN jjCHINREM_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjROWS(leftv res, leftv v)
static BOOLEAN jjJET_ID(leftv res, leftv u, leftv v)
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)
int IsCmd(const char *n, int &tok)
static BOOLEAN jjSBA(leftv res, leftv v)
static BOOLEAN jjOP_IM_I(leftv res, leftv u, leftv v)
static BOOLEAN jjJanetBasis(leftv res, leftv v)
static BOOLEAN jjKBASE(leftv res, leftv v)
static BOOLEAN jjTENSOR(leftv res, leftv u, leftv v)
static BOOLEAN jjmpTrace(leftv res, leftv v)
static BOOLEAN jjRING_PL(leftv res, leftv a)
static BOOLEAN jjREDUCE4(leftv res, leftv u)
static BOOLEAN jjFWALK(leftv res, leftv u, leftv v)
static BOOLEAN jjTEST(leftv, leftv v)
static BOOLEAN jjDIFF_ID_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjSYZ_2(leftv res, leftv u, leftv v)
static BOOLEAN jjPRUNE(leftv res, leftv v)
static BOOLEAN jjDIVISION4(leftv res, leftv v)
unsigned nLastIdentifier
valid identifiers are slot 1..nLastIdentifier
static BOOLEAN jjDEFINED(leftv res, leftv v)
static BOOLEAN jjLagSolve(leftv res, leftv v)
static BOOLEAN jjRING_1(leftv res, leftv u, leftv v)
static BOOLEAN jjVDIM(leftv res, leftv v)
static BOOLEAN jjHILBERT3Qt(leftv, leftv u, leftv v, leftv w)
static BOOLEAN jjOP_I_BIM(leftv res, leftv u, leftv v)
static BOOLEAN jjCOUNT_N(leftv res, leftv v)
static BOOLEAN jjHILBERT2(leftv res, leftv u, leftv v)
static BOOLEAN jjFIND2(leftv res, leftv u, leftv v)
static BOOLEAN jjCOEF_Id(leftv res, leftv u, leftv v)
static BOOLEAN jjP2N(leftv res, leftv v)
static BOOLEAN jjE(leftv res, leftv v)
static BOOLEAN jjPOWER_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjTIMES_MA_BI1(leftv res, leftv u, leftv v)
BOOLEAN iiExprArith1(leftv res, leftv a, int op)
static BOOLEAN jjSTD_HILB_WP(leftv res, leftv INPUT)
static BOOLEAN jjLISTRING(leftv res, leftv v)
static BOOLEAN jjCOEFFS2_KB(leftv res, leftv u, leftv v)
static BOOLEAN jjLIFTSTD_M(leftv res, leftv U)
static BOOLEAN jjELIMIN_ALG(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjVAR1(leftv res, leftv v)
static BOOLEAN jjLEADCOEF(leftv res, leftv v)
static BOOLEAN jjVARSTR2(leftv res, leftv u, leftv v)
static BOOLEAN jjPLUS_N(leftv res, leftv u, leftv v)
static BOOLEAN jjSUBST_Id_X(leftv res, leftv u, leftv v, leftv w, int input_type)
static BOOLEAN jjUMINUS_BI(leftv res, leftv u)
int iiArithAddCmd(const char *szName, short nAlias, short nTokval, short nToktype, short nPos=-1)
static BOOLEAN jjpLength(leftv res, leftv v)
static BOOLEAN jjJET_P_P(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjLT_I(leftv res, leftv u, leftv v)
static BOOLEAN jjIS_RINGVAR0(leftv res, leftv)
static BOOLEAN jjEXTGCD_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjBI2P(leftv res, leftv u)
static BOOLEAN jjTWOSTD(leftv res, leftv a)
static BOOLEAN jjGCD_I(leftv res, leftv u, leftv v)
static BOOLEAN jjCONTRACT(leftv res, leftv u, leftv v)
static BOOLEAN jjFAC_P(leftv res, leftv u)
static BOOLEAN jjREDUCE3_CID(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjFAREY_LI(leftv res, leftv u, leftv v)
static BOOLEAN jjTRANSP_BIM(leftv res, leftv v)
static BOOLEAN jjCOUNT_RES(leftv res, leftv v)
static BOOLEAN jjDelete_IV(leftv res, leftv u, leftv v)
static BOOLEAN jjGE_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjrOrdStr(leftv res, leftv v)
static BOOLEAN jjKERNEL(leftv res, leftv u, leftv v)
static BOOLEAN jjINTERSECT3(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjBRACK_Ma(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjMOD_N(leftv res, leftv u, leftv v)
static BOOLEAN jjLOAD_E(leftv, leftv v, leftv u)
static BOOLEAN jjNEWSTRUCT3(leftv, leftv u, leftv v, leftv w)
static BOOLEAN jjHOMOG_P_W(leftv res, leftv u, leftv v, leftv)
static BOOLEAN jjpHead(leftv res, leftv v)
static BOOLEAN jjSUBST_Id(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjEQUAL_R(leftv res, leftv u, leftv v)
static BOOLEAN jjCOUNT_L(leftv res, leftv v)
struct sValCmdM * psValCmdM
static BOOLEAN jjDET_I(leftv res, leftv v)
static BOOLEAN jjCOUNT_RG(leftv res, leftv v)
static BOOLEAN jjSMATRIX_Mo(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjINTERSECT(leftv res, leftv u, leftv v)
static BOOLEAN jjrVarStr(leftv res, leftv v)
static BOOLEAN jjOP_BI_BIM(leftv res, leftv u, leftv v)
static BOOLEAN jjDIFF_P(leftv res, leftv u, leftv v)
static BOOLEAN check_valid(const int p, const int op)
static BOOLEAN jjSTRING_PL(leftv res, leftv v)
static BOOLEAN jjMINUS_B(leftv res, leftv u, leftv v)
static BOOLEAN jjRSUM(leftv res, leftv u, leftv v)
static BOOLEAN jjINDEX_I(leftv res, leftv u, leftv v)
static BOOLEAN jjPOWER_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjMONITOR1(leftv res, leftv v)
static BOOLEAN jjKLAMMER_IV(leftv res, leftv u, leftv v)
static BOOLEAN jjFETCH(leftv res, leftv u, leftv v)
static BOOLEAN jjCALL3ARG(leftv res, leftv u)
static BOOLEAN jjSTD_1(leftv res, leftv u, leftv v)
static BOOLEAN jjUMINUS_N(leftv res, leftv u)
static BOOLEAN jjNUMERATOR(leftv res, leftv v)
Return the numerator of the input number.
static BOOLEAN jjORD(leftv res, leftv v)
static BOOLEAN jjTIMES_P(leftv res, leftv u, leftv v)
static BOOLEAN jjUMINUS_I(leftv res, leftv u)
static BOOLEAN jjPREIMAGE(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjBRACK_Ma_IV_IV(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjMRES_MAP(leftv res, leftv u, leftv v, leftv ma)
static BOOLEAN jjPLUS_SM(leftv res, leftv u, leftv v)
BOOLEAN jjLOAD_TRY(const char *s)
static BOOLEAN jjLIFT3(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjENVELOPE(leftv res, leftv a)
static BOOLEAN jjSetRing(leftv, leftv u)
static BOOLEAN jjMINUS_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjTIMES_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjFACSTD2(leftv res, leftv v, leftv w)
static BOOLEAN jjINTVEC_PL(leftv res, leftv v)
STATIC_VAR SArithBase sArithBase
Base entry for arithmetic.
static BOOLEAN jjEXPORTTO(leftv, leftv u, leftv v)
static BOOLEAN jjPlural_num_poly(leftv res, leftv a, leftv b)
static BOOLEAN jjDIV_P(leftv res, leftv u, leftv v)
static BOOLEAN jjKBASE2(leftv res, leftv u, leftv v)
static BOOLEAN jjPOWER_I(leftv res, leftv u, leftv v)
static BOOLEAN jjRES(leftv res, leftv u, leftv v)
static int iin_Int(number &n, coeffs cf)
static BOOLEAN jjPLUS_P_MA(leftv res, leftv u, leftv v)
static BOOLEAN jjMINRES_R(leftv res, leftv v)
static BOOLEAN jjCOLS(leftv res, leftv v)
static BOOLEAN jjPLUS_BIM(leftv res, leftv u, leftv v)
static BOOLEAN jjP2BI(leftv res, leftv v)
static void WerrorS_dummy(const char *)
static BOOLEAN jjGE_I(leftv res, leftv u, leftv v)
static BOOLEAN jjTRANSP_IV(leftv res, leftv v)
static BOOLEAN jjGT_N(leftv res, leftv u, leftv v)
static BOOLEAN jjUNIVARIATE(leftv res, leftv v)
static BOOLEAN jjMODULO4(leftv res, leftv u)
static BOOLEAN jjHOMOG_ID_W(leftv res, leftv u, leftv v, leftv)
static BOOLEAN jjWEDGE(leftv res, leftv u, leftv v)
static BOOLEAN jjCOMPARE_P(leftv res, leftv u, leftv v)
static BOOLEAN jjFIND3(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjLU_INVERSE(leftv res, leftv v)
static BOOLEAN jjMODULO3S(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjBAREISS_BIM(leftv res, leftv v)
static BOOLEAN jjPLUS_MA_P(leftv res, leftv u, leftv v)
static BOOLEAN jjSIMPL_P(leftv res, leftv u, leftv v)
static BOOLEAN jjPFAC1(leftv res, leftv v)
static BOOLEAN jjQRDS(leftv res, leftv INPUT)
static BOOLEAN jjELIMIN_IV(leftv res, leftv u, leftv v)
static BOOLEAN jjCONTENT(leftv res, leftv v)
static BOOLEAN jjDIFF_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjSTD(leftv res, leftv v)
static BOOLEAN jjTIMES_BIM(leftv res, leftv u, leftv v)
static BOOLEAN jjTIMES_I(leftv res, leftv u, leftv v)
static BOOLEAN jjDIV_N(leftv res, leftv u, leftv v)
static BOOLEAN jjINTMAT3(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjCOUNT_IV(leftv res, leftv v)
static BOOLEAN jjFRES(leftv res, leftv u, leftv v)
unsigned nCmdAllocated
number of commands-slots allocated
static BOOLEAN jjDUMMY(leftv res, leftv u)
static BOOLEAN jjS2I(leftv res, leftv v)
static BOOLEAN jjKLAMMER(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 jjBI2N(leftv res, leftv u)
static BOOLEAN jjRIGHTSTD(leftv res, leftv v)
BOOLEAN iiExprArithM(leftv res, leftv a, int op)
static BOOLEAN jjCOMPARE_MA(leftv res, leftv u, leftv v)
BOOLEAN iiExprArith3(leftv res, int op, leftv a, leftv b, leftv c)
static BOOLEAN jjGETDUMP(leftv, leftv v)
static BOOLEAN jjidFreeModule(leftv res, leftv v)
static BOOLEAN jjFAREY_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjBRACKET_REC(leftv res, leftv a, leftv b, leftv c)
static BOOLEAN jjCOMPARE_IV_I(leftv res, leftv u, leftv v)
static BOOLEAN jjRANDOM_Im(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjRESERVEDNAME(leftv res, leftv v)
struct sValCmd1 * psValCmd1
static BOOLEAN jjDIVMOD_I(leftv res, leftv u, leftv v)
static BOOLEAN jjLE_I(leftv res, leftv u, leftv v)
static BOOLEAN jjTENSOR_Ma(leftv res, leftv u, leftv v)
static BOOLEAN jjCOEFFS3_KB(leftv res, leftv u, leftv v, leftv w)
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 jjRMINUS(leftv res, leftv u, leftv v)
BOOLEAN jjPROC(leftv res, leftv u, leftv v)
static BOOLEAN jjPLUS_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjHILBERT3(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjDET2(leftv res, leftv u, leftv v)
static BOOLEAN jjSTD_HILB(leftv res, leftv u, leftv v)
static BOOLEAN jjAND_I(leftv res, leftv u, leftv v)
static BOOLEAN jjINDEX_P_IV(leftv res, leftv u, leftv v)
static BOOLEAN jjRPAR(leftv res, leftv v)
static BOOLEAN jjJanetBasis2(leftv res, leftv u, leftv v)
static BOOLEAN jjLOAD1(leftv, leftv v)
static BOOLEAN jjCOLON(leftv res, leftv u, leftv v)
const char * Tok2Cmdname(int tok)
static BOOLEAN jjRPLUS(leftv res, leftv u, leftv v)
static BOOLEAN jjKERNEL_SM(leftv res, leftv v)
static BOOLEAN jjCOLCOL(leftv res, leftv u, leftv v)
static BOOLEAN jjFAC_P2(leftv res, leftv u, leftv dummy)
static BOOLEAN jjHOMOG_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjrParStr(leftv res, leftv v)
struct sValCmd2 * psValCmd2
static BOOLEAN jjDEG(leftv res, leftv v)
static BOOLEAN jjFETCH_M(leftv res, leftv u)
static BOOLEAN jjINDEX_V(leftv res, leftv u, leftv v)
static BOOLEAN jjRINGLIST(leftv res, leftv v)
static BOOLEAN jjidElem(leftv res, leftv v)
static BOOLEAN jjDIM2(leftv res, leftv v, leftv w)
static BOOLEAN jjOP_BIM_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjGCD_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjBI2IM(leftv res, leftv u)
static BOOLEAN jjRANK2(leftv res, leftv u, leftv v)
static BOOLEAN jjDEGREE(leftv res, leftv v)
static BOOLEAN jjLIFTSTD_ALG(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjINDEPSET2(leftv res, leftv u, leftv v)
static BOOLEAN jjWAITALL2(leftv res, leftv u, leftv v)
static BOOLEAN jjOpenClose(leftv, leftv v)
static BOOLEAN jjBRACK_S(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjUMINUS_P(leftv res, leftv u)
static BOOLEAN jjMINUS_SM(leftv res, leftv u, leftv v)
static BOOLEAN jjHIGHCORNER_M(leftv res, leftv v)
static BOOLEAN jjNAMES(leftv res, leftv v)
static BOOLEAN jjINDEX_P(leftv res, leftv u, leftv v)
static BOOLEAN jjHIGHCORNER(leftv res, leftv v)
static BOOLEAN jjEQUAL_Ma(leftv res, leftv u, leftv v)
static BOOLEAN jjNAMES0(leftv res, leftv)
static BOOLEAN jjLOAD2(leftv, leftv, leftv v)
static BOOLEAN jjALIGN_M(leftv res, leftv u, leftv v)
static BOOLEAN jjWAIT1ST2(leftv res, leftv u, leftv v)
static BOOLEAN jjDIV_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjCOMPARE_BIM(leftv res, leftv u, leftv v)
static BOOLEAN jjEQUAL_N(leftv res, leftv u, leftv v)
static BOOLEAN jjDelete_ID_IV(leftv res, leftv u, leftv v)
static BOOLEAN jjDET2_S(leftv res, leftv u, leftv v)
static BOOLEAN jjCOEFFS_Id(leftv res, leftv u, leftv v)
STATIC_VAR si_char_2 Tok2Cmdname_buf
static BOOLEAN jjPROC1(leftv res, leftv u)
static BOOLEAN jjNOT(leftv res, leftv v)
static BOOLEAN jjPARSTR1(leftv res, leftv v)
static BOOLEAN jjSUBST_Id_N(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjJET4(leftv res, leftv u)
static BOOLEAN jjOPPOSE(leftv res, leftv a, leftv b)
static BOOLEAN jjMOD_P(leftv res, leftv u, leftv v)
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
static BOOLEAN jjPLUS_B(leftv res, leftv u, leftv v)
static BOOLEAN jjGCD_P(leftv res, leftv u, leftv v)
static BOOLEAN jjHOMOG1(leftv res, leftv v)
static BOOLEAN jjDET(leftv res, leftv v)
static void jjEQUAL_REST(leftv res, leftv u, leftv v)
static BOOLEAN jjCOUNT_M(leftv res, leftv v)
static BOOLEAN jjPLUS_V(leftv res, leftv u, leftv v)
static BOOLEAN jjKoszul_Id(leftv res, leftv u, leftv v)
static BOOLEAN jjKLAMMER_rest(leftv res, leftv u, leftv v)
static BOOLEAN jjCHINREM_ID(leftv res, leftv u, leftv v)
static BOOLEAN jjPLUS_S(leftv res, leftv u, leftv v)
static BOOLEAN jjHOMOG1_W(leftv res, leftv v, leftv u)
static BOOLEAN jjSBA_2(leftv res, leftv v, leftv u, leftv t)
static BOOLEAN jjINDEX_IV(leftv res, leftv u, leftv v)
unsigned nCmdUsed
number of commands used
static BOOLEAN jjRING_LIST(leftv res, leftv v)
static BOOLEAN jjBRACK_SM(leftv res, leftv u, leftv v, leftv w)
static BOOLEAN jjSUBST_Test(leftv v, leftv w, int &ringvar, poly &monomexpr)
static BOOLEAN jjMINUS_I(leftv res, leftv u, leftv v)
static BOOLEAN jjJET_P(leftv res, leftv u, leftv v)
static BOOLEAN jjVARSTR1(leftv res, leftv v)
char * iiArithGetCmd(int nPos)
static BOOLEAN jjSTATUS_M(leftv res, leftv v)
static BOOLEAN jjCALL1ARG(leftv res, leftv v)
static BOOLEAN jjPRUNE_MAP(leftv res, leftv v, leftv ma)
static BOOLEAN jjLT_BI(leftv res, leftv u, leftv v)
static BOOLEAN jjPOWER_P(leftv res, leftv u, leftv v)
BOOLEAN jjLIST_PL(leftv res, leftv v)
static BOOLEAN jjPLUSMINUS_Gen(leftv res, leftv u, leftv v)
static BOOLEAN jjCALL2ARG(leftv res, leftv u)
static BOOLEAN jjINDEX_PBu(leftv res, leftv u, leftv v)
static int iiTabIndex(const jjValCmdTab dArithTab, const int len, const int op)
static BOOLEAN jjSYZYGY(leftv res, leftv v)
static BOOLEAN jjPOWER_N(leftv res, leftv u, leftv v)
static BOOLEAN jjKLAMMER_PL(leftv res, leftv u)
static BOOLEAN jjSUBST_M(leftv res, leftv u)
static BOOLEAN jjEQUAL_P(leftv res, leftv u, leftv v)
static BOOLEAN jjLU_DECOMP(leftv res, leftv v)
static BOOLEAN jjPlural_num_mat(leftv res, leftv a, leftv b)
static BOOLEAN jjIDEAL_PL(leftv res, leftv v)
static BOOLEAN jjNVARS(leftv res, leftv v)
static BOOLEAN jjERROR(leftv, leftv u)
static BOOLEAN jjSTATUS2(leftv res, leftv u, leftv v)
static BOOLEAN jjALIGN_V(leftv res, leftv u, leftv v)
static BOOLEAN jjRINGLIST_C(leftv res, leftv v)
BOOLEAN iiConvert(int inputType, int outputType, int index, leftv input, leftv output, const struct sConvertTypes *dConvertTypes)
const struct sConvertTypes dConvertTypes[]
VAR omBin sip_command_bin
lists ipNameListLev(idhdl root, int lev)
idhdl enterid(const char *s, int lev, int t, idhdl *root, BOOLEAN init, BOOLEAN search)
lists ipNameList(idhdl root)
EXTERN_VAR omBin sleftv_bin
BOOLEAN load_builtin(const char *newlib, BOOLEAN autoexport, SModulFunc_t init)
int(* SModulFunc_t)(SModulFunctions *)
BOOLEAN iiLoadLIB(FILE *fp, const char *libnamebuf, const char *newlib, idhdl pl, BOOLEAN autoexport, BOOLEAN tellerror)
char * iiConvName(const char *libname)
BOOLEAN iiGetLibStatus(const char *lib)
BOOLEAN iiMake_proc(idhdl pn, package pack, leftv args)
BOOLEAN iiTryLoadLib(leftv v, const char *id)
BOOLEAN load_modules(const char *newlib, char *fullname, BOOLEAN autoexport)
INST_VAR sleftv iiRETURNEXPR
SModulFunc_t iiGetBuiltinModInit(const char *libname)
lists rDecompose(const ring r)
lists rDecompose_list_cf(const ring r)
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 (...
ring rInit(leftv pn, leftv rv, leftv ord)
leftv iiMap(map theMap, const char *what)
int iiRegularity(lists L)
BOOLEAN rDecompose_CF(leftv res, const coeffs C)
void iiMakeResolv(resolvente r, int length, int rlen, char *name, int typ0, intvec **weights)
int exprlist_length(leftv v)
BOOLEAN mpKoszul(leftv res, leftv c, leftv b, leftv id)
poly iiHighCorner(ideal I, int ak)
the largest monomial in R/I
lists scIndIndset(ideal S, BOOLEAN all, ideal Q)
idhdl rFindHdl(ring r, idhdl n)
syStrategy syConvList(lists li)
ring rCompose(const lists L, const BOOLEAN check_comp, const long bitmask, const int isLetterplace)
const char * lastreserved
lists syConvRes(syStrategy syzstr, BOOLEAN toDel, int add_row_shift)
BOOLEAN iiExport(leftv v, int toLev)
const struct sValCmd1 dArith1[]
BOOLEAN(* proc3)(leftv, leftv, leftv, leftv)
const struct sValCmd2 dArith2[]
BOOLEAN(* proc2)(leftv, leftv, leftv)
BOOLEAN setOption(leftv res, leftv v)
BOOLEAN(* proc1)(leftv, leftv)
const struct sValCmdM dArithM[]
const struct sValCmd3 dArith3[]
ideal id_Farey_0(ideal x, number N, const ring r)
long kHomModDeg(poly p, const ring r)
ideal kMin_std2(ideal F, ideal Q, tHomog h, intvec **w, ideal &M, bigintmat *hilb, int syzComp, int reduced)
ideal kInterRed(ideal F, const ideal Q)
ideal kStd2(ideal F, ideal Q, tHomog h, intvec **w, bigintmat *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
generic interface to GB/SB computations, large hilbert vectors
ideal kSba(ideal F, ideal Q, tHomog h, intvec **w, int sbaOrder, int arri, bigintmat *hilb, int syzComp, int newIdeal, intvec *vw)
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
ideal rightgb(ideal F, const ideal Q)
poly redNF(poly h, int &max_ind, int nonorm, kStrategy strat)
ideal_list kStdfac(ideal F, ideal Q, tHomog h, intvec **w, ideal D)
VAR char libnamebuf[1024]
static bool rIsSCA(const ring r)
ideal idOppose(ring Rop_src, ideal I, const ring Rop_dst)
opposes a module I from Rop to currRing(dst)
poly pOppose(ring Rop_src, poly p, const ring Rop_dst)
opposes a vector p from Rop to currRing (dst!)
BOOLEAN rIsLikeOpposite(ring rBase, ring rCandidate)
checks whether rings rBase and rCandidate could be opposite to each other returns TRUE if it is so
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,...
poly nc_p_Bracket_qq(poly p, const poly q, const ring r)
returns [p,q], destroys p
int luRank(const matrix aMat, const bool isRowEchelon, const ring R)
Computes the rank of a given (m x n)-matrix.
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...
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,...
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...
void luDecomp(const matrix aMat, matrix &pMat, matrix &lMat, matrix &uMat, const ring R)
LU-decomposition of a given (m x n)-matrix.
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...
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.
BOOLEAN jjANY2LIST(leftv res, leftv v, int cnt)
LINLINE void nlDelete(number *a, const coeffs r)
LINLINE number nlInit(long i, const coeffs r)
void maFetchPermLP(const ring preimage_r, const ring dst_r, int *perm)
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)
void maFindPermLP(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, int lV)
poly pSubstPoly(poly p, int var, poly image)
ideal idSubstPoly(ideal id, int n, poly e)
BOOLEAN maApplyFetch(int what, map theMap, leftv res, leftv w, ring preimage_r, int *perm, int *par_perm, int P, nMapFunc nMap)
ideal idSubstPar(ideal id, int n, poly e)
poly pSubstPar(poly p, int par, poly image)
BOOLEAN mp_IsDiagUnit(matrix U, const ring R)
matrix mp_Wedge(matrix a, int ar, const ring R)
matrix mp_Transp(matrix a, const ring R)
ideal sm_Tensor(ideal A, ideal B, const ring r)
ideal sm_Add(ideal a, ideal b, const ring R)
matrix mp_CoeffProc(poly f, poly vars, const ring R)
matrix pMultMp(poly p, matrix a, const ring R)
void mp_Monomials(matrix c, int r, int var, matrix m, const ring R)
DetVariant mp_GetAlgorithmDet(matrix m, const ring r)
matrix mp_CoeffProcId(ideal I, poly vars, const ring R)
poly sm_Det(ideal a, const ring r, DetVariant d)
matrix mp_MultI(matrix a, long f, const ring R)
c = f*a
ideal sm_Sub(ideal a, ideal b, const ring R)
ideal sm_Mult(ideal a, ideal b, const ring R)
matrix mp_Sub(matrix a, matrix b, const ring R)
poly mp_Det(matrix a, const ring r, DetVariant d)
matrix mpNew(int r, int c)
create a r x c zero-matrix
int mp_Compare(matrix a, matrix b, const ring R)
BOOLEAN sm_Equal(ideal a, ideal b, const ring R)
matrix mp_Mult(matrix a, matrix b, const ring R)
BOOLEAN mp_Equal(matrix a, matrix b, const ring R)
matrix mp_Coeffs(ideal I, int var, const ring R)
corresponds to Maple's coeffs: var has to be the number of a variable
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,...
matrix mp_MultP(matrix a, poly p, const ring R)
multiply a matrix 'a' by a poly 'p', destroy the args
matrix mp_Copy(matrix a, const ring r)
copies matrix a (from ring r to r)
matrix mp_Add(matrix a, matrix b, const ring R)
matrix mp_InitP(int r, int c, poly p, const ring R)
make it a p * unit matrix
poly mp_Trace(matrix a, const ring R)
#define MATELEM(mat, i, j)
1-based access to matrix
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,...
This file provides miscellaneous functionality.
lib_types type_of_LIB(const char *newlib, char *libnamebuf)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
BOOLEAN nuLagSolve(leftv res, leftv arg1, leftv arg2, leftv arg3)
find the (complex) roots an univariate polynomial Determines the roots of an univariate polynomial us...
The main handler for Singular numbers which are suitable for Singular polynomials.
ideal twostd(ideal I)
Compute two-sided GB:
void newstruct_setup(const char *n, newstruct_desc d)
newstruct_desc newstructChildFromString(const char *parent, const char *s)
newstruct_desc newstructFromString(const char *s)
CanonicalForm ndConvSingNFactoryN(number, BOOLEAN, const coeffs)
#define nPower(a, b, res)
#define omFreeSize(addr, size)
#define omRealloc(addr, size)
#define omFreeBin(addr, bin)
#define omFreeBinAddr(addr)
#define SI_RESTORE_OPT1(A)
#define SI_RESTORE_OPT2(A)
#define TEST_OPT_DEGBOUND
#define TEST_OPT_RETURN_SB
static int index(p_Length length, p_Ord ord)
void pRestoreDegProcs(ring r, pFDegProc old_FDeg, pLDegProc old_lDeg)
poly p_Homogen(poly p, int varnum, const ring r)
poly pp_DivideM(poly a, poly b, const ring r)
void p_Shift(poly *p, int i, const ring r)
shifts components of the vector p by i
void p_Normalize(poly p, const ring r)
int p_MaxExpPerVar(poly p, int i, const ring r)
max exponent of variable x_i in p
int p_Compare(const poly a, const poly b, const ring R)
poly p_Series(int n, poly p, poly u, intvec *w, const ring R)
long p_DegW(poly p, const int *w, const ring R)
poly p_Cleardenom(poly p, const ring r)
poly p_Vec2Poly(poly v, int k, const ring r)
void p_SetModDeg(intvec *w, ring r)
void pSetDegProcs(ring r, pFDegProc new_FDeg, pLDegProc new_lDeg)
long p_Deg(poly a, const ring r)
static poly p_Neg(poly p, const ring r)
static int pLength(poly a)
static long p_MinComp(poly p, ring lmRing, ring tailRing)
static void p_Delete(poly *p, const ring r)
static poly pp_Mult_qq(poly p, poly q, const ring r)
static long p_Totaldegree(poly p, const ring r)
void rChangeCurrRing(ring r)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
poly pp_Divide(poly p, poly q, const ring r)
polynomial division a/b, ignoring the rest via singclap_pdivide resp. idLift does not destroy a,...
poly singclap_gcd(poly f, poly g, const ring r)
polynomial gcd via singclap_gcd_r resp. idSyzygies destroys f and g
Compatibility layer for legacy polynomial operations (over currRing).
static long pTotaldegree(poly p)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
#define pIsConstant(p)
like above, except that Comp must be 0
#define pGetComp(p)
Component.
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
#define pLmInit(p)
like pInit, except that expvector is initialized to that of p, p must be != NULL
#define pIsUnit(p)
return true if the Lm is a constant <>0
#define pLmDelete(p)
assume p != NULL, deletes Lm(p)->coef and Lm(p)
static void pLmFree(poly p)
frees the space of the monomial m, assumes m != NULL coef is not freed, m is not advanced
#define pSeries(n, p, u, w)
#define pGetExp(p, i)
Exponent.
#define pInit()
allocates a new monomial and initializes everything to 0
#define pEqualPolys(p1, p2)
#define pLmCmp(p, q)
returns 0|1|-1 if p=q|p>q|p<q w.r.t monomial ordering
#define pCopy(p)
return a copy of the poly
#define pLmFreeAndNext(p)
assumes p != NULL, deletes p, returns pNext(p)
ideal maGetPreimage(ring theImageRing, map theMap, ideal id, const ring dst_r)
const char feNotImplemented[]
void PrintS(const char *s)
void Werror(const char *fmt,...)
int rSum(ring r1, ring r2, ring &sum)
int r_IsRingVar(const char *n, char **names, int N)
ring rMinusVar(const ring r, char *v)
undo rPlusVar
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...
char * rCharStr(const ring r)
TODO: make it a virtual method of coeffs, together with: Decompose & Compose, rParameter & rPar.
void rDelete(ring r)
unconditionally deletes fields in 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)
ring rPlusVar(const ring r, char *v, int left)
K[x],"y" -> K[x,y] resp. K[y,x].
int n_IsParam(const number m, const ring r)
TODO: rewrite somehow...
static BOOLEAN rField_is_Zp_a(const ring r)
static BOOLEAN rField_is_Z(const ring r)
static BOOLEAN rField_is_Zp(const ring r)
static BOOLEAN rHasLocalOrMixedOrdering(const ring r)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
long(* pFDegProc)(poly p, ring r)
static ring rIncRefCnt(ring r)
static BOOLEAN rField_is_Domain(const ring r)
long(* pLDegProc)(poly p, int *length, ring r)
static int rPar(const ring r)
(r->cf->P)
static BOOLEAN rIsLPRing(const ring r)
static BOOLEAN rField_is_Q(const ring r)
static char const ** rParameter(const ring r)
(r->cf->parameter)
static BOOLEAN rField_is_numeric(const ring r)
static BOOLEAN rField_is_GF(const ring r)
static short rVar(const ring r)
define rVar(r) (r->N)
static BOOLEAN rHasMixedOrdering(const ring r)
#define rField_is_Ring(R)
void sBucket_Add_p(sBucket_pt bucket, poly p, int length)
adds poly p to bucket destroys p!
void sBucketCanonicalize(sBucket_pt bucket)
sBucket_pt sBucketCreate(const ring r)
poly sBucketPeek(sBucket_pt b)
void sBucketDestroyAdd(sBucket_pt bucket, poly *p, int *length)
BOOLEAN sdb_set_breakpoint(const char *pp, int given_lineno)
BOOLEAN slPrepClose(si_link l)
leftv slRead(si_link l, leftv a)
BOOLEAN slDump(si_link l)
BOOLEAN slGetDump(si_link l)
const char * slStatus(si_link l, const char *request)
BOOLEAN slClose(si_link l)
BOOLEAN slOpen(si_link l, short flag, leftv h)
#define SI_LINK_SET_CLOSE_P(l)
int slStatusSsiL(lists L, int timeout, BOOLEAN *ignore=NULL)
ideal id_Vec2Ideal(poly vec, const ring R)
ideal idInit(int idsize, int rank)
initialise an ideal / module
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
void id_Norm(ideal id, const ring r)
ideal id = (id[i]), result is leadcoeff(id[i]) = 1
BOOLEAN id_HomModuleW(ideal id, ideal Q, const intvec *w, const intvec *module_w, const ring r)
void id_Normalize(ideal I, const ring r)
normialize all polys in id
ideal id_Transp(ideal a, const ring rRing)
transpose a module
ideal id_FreeModule(int i, const ring r)
the free module of rank i
ideal id_Homogen(ideal h, int varnum, const ring r)
ideal id_Power(ideal given, int exp, const ring r)
matrix id_Module2Matrix(ideal mod, const ring R)
ideal id_Head(ideal h, const ring r)
returns the ideals of initial terms
BOOLEAN id_HomIdealW(ideal id, ideal Q, const intvec *w, const ring r)
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
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...
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
matrix id_Module2formatedMatrix(ideal mod, int rows, int cols, const ring R)
ideal id_Matrix2Module(matrix mat, const ring R)
converts mat to module, destroys mat
ideal id_ResizeModule(ideal mod, int rows, int cols, const ring R)
ideal id_Delete_Pos(const ideal I, const int p, const ring r)
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
ideal id_Jet(const ideal i, int d, const ring R)
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.
ideal id_JetW(const ideal i, int d, intvec *iv, const ring R)
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
void id_Shift(ideal M, int s, const ring r)
ideal id_ChineseRemainder(ideal *xx, number *q, int rl, const ring r)
ideal id_Subst(ideal id, int n, poly e, const ring r)
static int idElem(const ideal F)
number of non-zero polys in F
void sm_CallBareiss(ideal I, int x, int y, ideal &M, intvec **iv, const ring R)
ideal sm_CallSolv(ideal I, const ring R)
EXTERN_VAR omBin char_ptr_bin
void syMake(leftv v, const char *id, package pa)
INST_VAR sleftv sLastPrinted
BOOLEAN assumeStdFlag(leftv h)
resolvente syResolvente(ideal arg, int maxlength, int *length, intvec ***weights, BOOLEAN minim)
syStrategy syMres_with_map(ideal arg, int maxlength, intvec *w, ideal &trans)
syStrategy syResolution(ideal arg, int maxlength, intvec *w, BOOLEAN minim)
ideal syMinBase(ideal arg)
syStrategy syHilb(ideal arg, int *length)
resolvente sySchreyerResolvente(ideal arg, int maxlength, int *length, BOOLEAN isMonomial=FALSE, BOOLEAN notReplace=FALSE)
syStrategy sySchreyer(ideal arg, int maxlength)
int syDim(syStrategy syzstr)
syStrategy syMinimize(syStrategy syzstr)
syStrategy syCopy(syStrategy syzstr)
syStrategy syKosz(ideal arg, int *length)
int sySize(syStrategy syzstr)
syStrategy syFrank(const ideal arg, const int length, const char *method, const bool use_cache=true, const bool use_tensor_trick=false)
syStrategy syLaScala3(ideal arg, int *length)
int name
New type name for int.
ideal t_rep_gb(const ring r, ideal arg_I, int syz_comp, BOOLEAN F4_mode)
number ntDiff(number a, number d, const coeffs cf)
ideal fractalWalkProc(leftv first, leftv second)
ideal walkProc(leftv first, leftv second)
int * iv2array(intvec *iv, const ring R)
BOOLEAN jjStdJanetBasis(leftv res, leftv v, int flag)
flag: 0: JB, 1: SB
#define omPrintBinStats(F)