11#define TRANSEXT_PRIVATES 
   73#ifdef HAVE_GETTIMEOFDAY 
  120      cf->extRing->ShortOut = shortOut;
 
  122      cf = 
cf->extRing->cf;
 
  134      number one = 
nInit(1);
 
  135      number nn=
nMult(n,one);
 
  170       Werror(
"type %d too complex...set minpoly before",
IDTYP(
h)); 
break;
 
  181      WerrorS(
"cannot set minpoly for these coeffients");
 
  187    WerrorS(
"only univariate minpoly allowed");
 
  208    WerrorS(
"Could not construct the alg. extension: minpoly==0");
 
  213  if (DEN((fraction)(
p)) != 
NULL) 
 
  215    poly n=DEN((fraction)(
p));
 
  218      WarnS(
"denominator must be constant - ignoring it");
 
  221    DEN((fraction)(
p))=
NULL;
 
  224  q->m[0] = NUM((fraction)
p);
 
  228  NUM((fractionObject *)
p) = 
NULL; 
 
  234    WerrorS(
"Could not construct the alg. extension: illegal minpoly?");
 
  247    WarnS(
"Set minpoly over non-transcendental ground field to 0?!");
 
  256    WarnS(
"Trying to set minpoly over non-transcendental ground field...");
 
  259      WerrorS(
"cannot set minpoly for these coeffients");
 
  266    WerrorS(
"only univarite minpoly allowed");
 
  273    redefine_from_algext=(
currRing->cf->extRing->qideal!=
NULL);
 
  298      WarnS(
"minpoly is already 0...");
 
  302    WarnS(
"cannot set minpoly to 0 / alg. extension?");
 
  323    WerrorS(
"Could not construct the alg. extension: minpoly==0");
 
  328  if (!redefine_from_algext && (DEN((fraction)(
p)) != 
NULL)) 
 
  330    poly n=DEN((fraction)(
p));
 
  333      WarnS(
"denominator must be constant - ignoring it");
 
  336    DEN((fraction)(
p))=
NULL;
 
  339  if (redefine_from_algext) q->m[0]=(poly)
p;
 
  340  else          q->m[0] = NUM((fraction)
p);
 
  344  PrintS(
"\nTrying to conver the currRing into an algebraic field: ");
 
  345  PrintS(
"Ground poly. ring: \n");
 
  347  PrintS(
"\nGiven MinPOLY: ");
 
  354  if (!redefine_from_algext)
 
  357    NUM((fractionObject *)
p) = 
NULL; 
 
  364    WerrorS(
"Could not construct the alg. extension: llegal minpoly?");
 
  430      Werror(
"index[%d] must be positive",
i+1);
 
  439        (*iv1)[
i]=(int)((
long)(a->
Data()));
 
  443        res->data=(
void *)ivn;
 
  446        (*iv)[
i]=(int)((
long)(a->
Data()));
 
  450      int c=e->next->start;
 
  451      if ((
i>=iv->
rows())||(c<1)||(c>iv->
cols()))
 
  453        Werror(
"wrong range [%d,%d] in intmat %s(%d,%d)",
i+1,c,
res->Name(),iv->
rows(),iv->
cols());
 
  471        old_r=(ring)(
res-1)->data;
 
  499      number2 nn=(number2)
res->data;
 
  510      Werror(
"index[%d] must be positive",
i+1);
 
  516      WerrorS(
"only one index given");
 
  521      int c=e->next->start;
 
  522      if ((
i>=iv->
rows())||(c<1)||(c>iv->
cols()))
 
  524        Werror(
"wrong range [%d,%d] in cmatrix %s(%d,%d)",
i+1,c,
res->Name(),iv->
rows(),iv->
cols());
 
  548      number2 nn=(number2)
res->data;
 
  549      number2 n=n2Init((
long)a->
Data(),nn->cf);
 
  555      WerrorS(
"no Ring avialable for conversion from int");
 
  564      Werror(
"index[%d] must be positive",
i+1);
 
  570      WerrorS(
"only one index given");
 
  575      int c=e->next->start;
 
  576      if ((
i>=iv->
rows())||(c<1)||(c>iv->
cols()))
 
  578        Werror(
"wrong range [%d,%d] in cmatrix %s(%d,%d)",
i+1,c,
res->Name(),iv->
rows(),iv->
cols());
 
  596      number2 nn=(number2)
res->data;
 
  597      number2 n=(number2)
omAlloc(
sizeof(*n));
 
  605      number2 n=(number2)
omAlloc(
sizeof(*n));
 
  621      poly2 nn=(poly2)
res->data;
 
  632      Werror(
"index[%d] must be positive",
i+1);
 
  647      poly2 nn=(poly2)
res->data;
 
  648      poly2 n=(poly2)
omAlloc(
sizeof(*n));
 
  656      poly2 n=(poly2)
omAlloc(
sizeof(*n));
 
  679      Werror(
"index[%d] must be positive",
i+1);
 
  685      WerrorS(
"only one index given");
 
  690      int c=e->next->start;
 
  691      if ((
i>=iv->
rows())||(c<1)||(c>iv->
cols()))
 
  693        Werror(
"wrong range [%d,%d] in bigintmat %s(%d,%d)",
i+1,c,
res->Name(),iv->
rows(),iv->
cols());
 
  711  int add_row_shift = 0;
 
  713  if (weights!=
NULL)  add_row_shift=weights->
min_in();
 
  764        Werror(
"index[%d] must be positive",
j);
 
  804  if ((am->
rows()!=1) || (am->
cols()!=1))
 
  813  int j=e->next->start;
 
  836  int j=e->next->start;
 
  848    void* tmp = 
res->data;
 
  855    char *
s=(
char *)
res->data;
 
  856    if ((e->start>0)&&(e->start<=(int)strlen(
s)))
 
  857      s[e->start-1]=(char)(*((
char *)a->
Data()));
 
  860      Werror(
"string index %d out of range 1..%d",e->start,(
int)strlen(
s));
 
  869                                          const char *procname, 
int line,
 
 1003    Werror(
"rank of module is %ld in assignment to ideal",
m->rank);
 
 1010  res->data=(
void *)
m;
 
 1029      res->data = (
void *) 
l;
 
 1059  char *rn=
f->preimage; 
 
 1079  ring old_ring=(ring)
res->Data();
 
 1082  ideal 
id = (ideal)a->
Data(); 
 
 1097  if ( 
qr->cf != newcf )
 
 1111    int *perm = (
int *)
omAlloc0((
qr->N+1)*
sizeof(int));
 
 1113    for(
i=
qr->N;
i>0;
i--)
 
 1154      Warn(
"%s is no twosided standard basis",a->
Name());
 
 1181  ring r=(ring)a->
Data();
 
 1193    if (e==
NULL) 
res->data=(
char *)r;
 
 1212  res->data=(
void *)0;
 
 1229#define NULL_VAL NULL 
 1253      WarnS(
"right side is not a datum, assignment ignored");
 
 1285    else if (
l->name!=
NULL)
 
 1314    WerrorS(
"error in assign: left side is not an l-value");
 
 1320#ifdef BLACKBOX_DEVEL 
 1321    Print(
"bb-assign: bb=%lx\n",bb);
 
 1323    return (bb==
NULL) || bb->blackbox_Assign(
l,r);
 
 1394        Werror(
"`%s`(%s) = `%s` is not supported",
 
 1397         Werror(
"`%s` = `%s` is not supported" 
 1406          Werror(
"expected `%s` = `%s`" 
 1474      Werror(
"`%s` = `%s` is not supported" 
 1483          Werror(
"expected `%s` = `%s`" 
 1501  memset(&t,0,
sizeof(
sleftv));
 
 1505    t.
data=(
char *)(
long)(*iv)[
i];
 
 1510    if (nok) 
return TRUE;
 
 1527  memset(&t,0,
sizeof(
sleftv));
 
 1537      t.
data=(
char *)I->m[
i];
 
 1587      Werror(
"`%s` is undefined",
h->Fullname());
 
 1635        Warn(
"expression list length(%d) does not match intmat size(%d)",
 
 1642      (*iv)[
i++] = (int)((
long)(hh->
Data()));
 
 1651        (*iv)[
i++] = (*ivv)[ll++];
 
 1685        Warn(
"expression list length(%d) does not match bigintmat size(%d x %d)",
 
 1698      bim->
set(
i++, (number)(hh->
Data()));
 
 1737    sl += strlen((
char *)hh->
Data());
 
 1745    t=(
char *)hh->
Data();
 
 1766  memset(&t,0,
sizeof(
sleftv));
 
 1772    while ((
i<mxn )&&(
l!=
NULL))
 
 1798        WarnS(
"list length mismatch in assign (l>r)");
 
 1805      WarnS(
"list length mismatch in assign (l<r)");
 
 1843  char *
s=(
char *)r->
Data();
 
 1846  memset(&t,0,
sizeof(
sleftv));
 
 1848  while ((
i<sl)&&(
l!=
NULL))
 
 1870  int i=
l->e->start-1;
 
 1873    Werror(
"index[%d] must be positive",
i+1);
 
 1876  if(
l->attribute!=
NULL)
 
 1898    memset(&(li->
m[li->
nr+1]),0,(
i-li->
nr)*
sizeof(
sleftv));
 
 1908  memset(&tmp,0,
sizeof(
sleftv));
 
 1911  && (ld->
Typ()!=r->
Typ()))
 
 1918    memcpy(ld,&tmp,
sizeof(
sleftv));
 
 1920  else if ((ld->
e==
NULL)
 
 1930    memcpy(ld,&tmp,
sizeof(
sleftv));
 
 1935    if (
l->e!=
NULL) 
l->e->next=ld->
e;
 
 1958  } 
while  ((!
b)&&(
l!=
NULL));
 
 1966  int ll=
l->listLength();
 
 1974    Werror(
"`%s` is read-only",
l->Name());
 
 1985  else if (
l->attribute!=
NULL)
 
 2012          if(bb->blackbox_CheckAssign(bb,
l,r)) 
return TRUE;
 
 2015        if((!
b) && (like_lists==2))
 
 2039#ifdef BLACKBOX_DEVEL 
 2040      Print(
"bb-assign: bb=%lx\n",bb);
 
 2042      return (bb==
NULL) || bb->blackbox_Assign(
l,r);
 
 2130    Werror(
"length of lists in assignment does not match (l:%d,r:%d)",
 
 2164        WerrorS(
"expected ring-name");
 
 2170        WerrorS(
"expected image ideal");
 
 2190      char *pr=((
map)olm)->preimage;
 
 2207          Warn(
"expression list length(%d) does not match matrix size(%d)",el,
num);
 
 2263            for(
k=0;
k<
j;
k++,
i++)
 
 2287        if (module_assign)   lm->
rank=rk;
 
 2288        else if (map_assign) ((
map)lm)->preimage=pr;
 
 2306      Werror(
"cannot assign to %s",
l->Fullname());
 
 2324      ideal I0=(ideal)I->
Data();
 
 2360    poly p2=
kNF(F,r->qideal,
p);
 
 2373  char *vn=(
char *)
v->Name();
 
 2380      WarnS(
"source and destination packages are identical");
 
 2392    memset(&h_expr,0,
sizeof(h_expr));
 
 2396    return iiAssign(&tmp_expr,&h_expr);
 
 2400    Werror(
"`%s` not found in `%s`",
v->Name(), u->
Name());
 
struct for passing initialization parameters to naInitChar
 
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)
 
#define BIMATELEM(M, I, J)
 
blackbox * getBlackboxStuff(const int t)
return the structure to the type given by t
 
CanonicalForm map(const CanonicalForm &primElem, const Variable &alpha, const CanonicalForm &F, const Variable &beta)
map from  to  such that  is mapped onto
 
coeffs basecoeffs() const
 
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]
 
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 coeffs n_CoeffRingQuot1(number c, const coeffs r)
 
static FORCE_INLINE number n_Copy(number n, const coeffs r)
return a copy of 'n'
 
static FORCE_INLINE BOOLEAN nCoeff_is_Extension(const coeffs r)
 
@ n_algExt
used for all algebraic extensions, i.e., the top-most extension in an extension tower is algebraic
 
static FORCE_INLINE nMapFunc n_SetMap(const coeffs src, const coeffs dst)
set the mapping function pointers for translating numbers from src to dst
 
coeffs nInitChar(n_coeffType t, void *parameter)
one-time initialisations for new coeffs in case of an error return NULL
 
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
 
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
 
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 BOOLEAN nCoeff_is_algExt(const coeffs r)
TRUE iff r represents an algebraic extension field.
 
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;
 
void nKillChar(coeffs r)
undo all initialisations
 
static FORCE_INLINE BOOLEAN nCoeff_is_transExt(const coeffs r)
TRUE iff r represents a transcendental extension field.
 
const CanonicalForm int s
 
const Variable & v
< [in] a sqrfree bivariate poly
 
void WerrorS(const char *s)
 
VAR char my_yylinebuf[80]
 
if(!FE_OPT_NO_SHELL_FLAG)(void) system(sys)
 
int iiTestConvert(int inputType, int outputType)
 
const char * Tok2Cmdname(int tok)
 
static int RingDependend(int t)
 
#define idDelete(H)
delete an ideal
 
#define idSimpleAdd(A, B)
 
static ideal idVec2Ideal(poly vec)
 
#define idPosConstant(I)
index of generator with leading term in ground ring (if any); otherwise -1
 
static BOOLEAN length(leftv result, leftv arg)
 
intvec * ivAdd(intvec *a, intvec *b)
 
#define IMATELEM(M, I, J)
 
static BOOLEAN jiA_1x1INTMAT(leftv res, leftv a, Subexpr e)
 
static BOOLEAN jiA_INTVEC(leftv res, leftv a, Subexpr)
 
static BOOLEAN jiA_IDEAL_Mo(leftv res, leftv a, Subexpr)
 
static BOOLEAN jiA_MATRIX_L(leftv l, leftv r)
 
static BOOLEAN jiA_PACKAGE(leftv res, leftv a, Subexpr)
 
void jjNormalizeQRingId(leftv I)
 
static BOOLEAN jiA_1x1MATRIX(leftv res, leftv a, Subexpr e)
 
static ring jjCheck_FLAG_OTHER_RING(leftv res)
 
static BOOLEAN jjPRINTLEVEL(leftv, leftv a)
 
static BOOLEAN jjMINPOLY(leftv, leftv a)
 
static BOOLEAN jjTRACE(leftv, leftv a)
 
static BOOLEAN jiA_VECTOR_L(leftv l, leftv r)
 
static BOOLEAN jiA_BIGINT(leftv res, leftv a, Subexpr e)
 
static BOOLEAN iiAssign_sys(leftv l, leftv r)
 
static BOOLEAN jiA_POLY(leftv res, leftv a, Subexpr e)
 
static BOOLEAN jjCOLMAX(leftv, leftv a)
 
static BOOLEAN jiAssign_rec(leftv l, leftv r)
 
static BOOLEAN jjECHO(leftv, leftv a)
 
poly jj_NormalizeQRingP(poly p, const ring r)
 
static BOOLEAN jiAssign_1(leftv l, leftv r, int rt, BOOLEAN toplevel, BOOLEAN is_qring=FALSE)
 
static BOOLEAN jiA_BUCKET(leftv res, leftv a, Subexpr e)
 
static BOOLEAN jiA_RESOLUTION(leftv res, leftv a, Subexpr)
 
static BOOLEAN jiA_CRING(leftv res, leftv a, Subexpr)
 
static BOOLEAN jjMAXDEG(leftv, leftv a)
 
static BOOLEAN jjA_L_LIST(leftv l, leftv r)
 
static void jiAssignAttr(leftv l, leftv r)
 
BOOLEAN jjIMPORTFROM(leftv, leftv u, leftv v)
 
static BOOLEAN jjRTIMER(leftv, leftv a)
 
static BOOLEAN jiA_RING(leftv res, leftv a, Subexpr e)
 
static BOOLEAN jiA_MAP(leftv res, leftv a, Subexpr)
 
static BOOLEAN jiA_INT(leftv res, leftv a, Subexpr e)
 
static BOOLEAN jiA_STRING_L(leftv l, leftv r)
 
static BOOLEAN jjA_L_BIGINTMAT(leftv l, leftv r, bigintmat *bim)
 
static void jjMINPOLY_red(idhdl h)
 
static BOOLEAN jiA_DEF(leftv res, leftv, Subexpr)
 
static BOOLEAN jiA_IDEAL(leftv res, leftv a, Subexpr)
 
static BOOLEAN jiA_MODUL_P(leftv res, leftv a, Subexpr)
 
static BOOLEAN jiA_BIGINTMAT(leftv res, leftv a, Subexpr)
 
static BOOLEAN jiA_NUMBER(leftv res, leftv a, Subexpr)
 
static BOOLEAN jiAssign_list(leftv l, leftv r)
 
static BOOLEAN jjA_L_STRING(leftv l, leftv r)
 
static BOOLEAN jiA_LIST_RES(leftv res, leftv a, Subexpr)
 
coeffs jjSetMinpoly(coeffs cf, number a)
 
static BOOLEAN jiA_LINK(leftv res, leftv a, Subexpr)
 
static BOOLEAN jiA_MAP_ID(leftv res, leftv a, Subexpr)
 
static BOOLEAN jiA_STRING(leftv res, leftv a, Subexpr e)
 
static BOOLEAN jjSHORTOUT(leftv, leftv a)
 
static BOOLEAN jjNOETHER(leftv, leftv a)
 
BOOLEAN iiAssign(leftv l, leftv r, BOOLEAN toplevel)
 
static BOOLEAN jiA_IDEAL_M(leftv res, leftv a, Subexpr)
 
static BOOLEAN jiA_INTVEC_L(leftv l, leftv r)
 
static BOOLEAN jiA_QRING(leftv res, leftv a, Subexpr e)
 
static BOOLEAN jiA_LIST(leftv res, leftv a, Subexpr)
 
static BOOLEAN jjMAXMULT(leftv, leftv a)
 
static BOOLEAN jjTIMER(leftv, leftv a)
 
static BOOLEAN jjA_L_INTVEC(leftv l, leftv r, intvec *iv)
 
static BOOLEAN jiA_PROC(leftv res, leftv a, Subexpr)
 
BOOLEAN iiConvert(int inputType, int outputType, int index, leftv input, leftv output, const struct sConvertTypes *dConvertTypes)
 
void killhdl2(idhdl h, idhdl *ih, ring r)
 
void killhdl(idhdl h, package proot)
 
void * idrecDataInit(int t)
 
void ipMoveId(idhdl tomove)
 
BOOLEAN piKill(procinfov pi)
 
EXTERN_VAR omBin sleftv_bin
 
#define jjNormalizeQRingP(p)
 
procinfo * iiInitSingularProcinfo(procinfov pi, const char *libname, const char *procname, int, long pos, BOOLEAN pstatic)
 
int iiDeclCommand(leftv sy, leftv name, int lev, int t, idhdl *root, BOOLEAN isring, BOOLEAN init_b)
 
int exprlist_length(leftv v)
 
lists syConvRes(syStrategy syzstr, BOOLEAN toDel, int add_row_shift)
 
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
 
static bool rIsSCA(const ring r)
 
bool nc_SetupQuotient(ring rGR, const ring rG=NULL, bool bCopy=false)
 
BOOLEAN lRingDependend(lists L)
 
poly p_MinPolyNormalize(poly p, const ring r)
 
matrix mpNew(int r, int c)
create a r x c zero-matrix
 
#define MATELEM(mat, i, j)
1-based access to matrix
 
#define SMATELEM(A, i, j, R)
 
The main handler for Singular numbers which are suitable for Singular polynomials.
 
#define omreallocSize(addr, o_size, size)
 
#define omFreeBin(addr, bin)
 
#define omFreeBinAddr(addr)
 
#define TEST_V_ASSIGN_NONE
 
poly p_PermPoly(poly p, const int *perm, const ring oldRing, const ring dst, nMapFunc nMap, const int *par_perm, int OldPar, BOOLEAN use_mult)
 
void p_Normalize(poly p, const ring r)
 
void pEnlargeSet(poly **p, int l, int increment)
 
void p_Write(poly p, ring lmRing, ring tailRing)
 
static BOOLEAN p_IsConstant(const poly p, const ring r)
 
static void p_Delete(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 ...
 
Compatibility layer for legacy polynomial operations (over currRing)
 
#define pGetComp(p)
Component.
 
ideal idrCopyR(ideal id, ring src_r, ring dest_r)
 
void PrintS(const char *s)
 
void Werror(const char *fmt,...)
 
void rWrite(ring r, BOOLEAN details)
 
void rDelete(ring r)
unconditionally deletes fields in r
 
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
 
static ring rIncRefCnt(ring r)
 
static void rDecRefCnt(ring r)
 
static short rVar(const ring r)
#define rVar(r) (r->N)
 
#define rField_is_Ring(R)
 
void sBucketDestroyAdd(sBucket_pt bucket, poly *p, int *length)
 
void slCleanUp(si_link l)
 
BOOLEAN slInit(si_link l, char *istr)
 
static si_link slCopy(si_link l)
 
ideal idInit(int idsize, int rank)
initialise an ideal / module
 
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
 
void id_Normalize(ideal I, const ring r)
normialize all polys in id
 
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
 
void id_Shift(ideal M, int s, const ring r)
 
static int idElem(const ideal F)
number of non-zero polys in F
 
BOOLEAN assumeStdFlag(leftv h)
 
void syKillComputation(syStrategy syzstr, ring r=currRing)
 
const struct sValAssign dAssign[]
 
const struct sValAssign_sys dAssign_sys[]
 
VAR omBin fractionObjectBin