60 WarnS(
"minbase applies only to the local or homogeneous case over coefficient fields");
69 WarnS(
"minbase applies only to the local or homogeneous case over coefficient fields");
93 while ((
k > 0) && (h3->m[
k-1] ==
NULL))
k--;
96 while ((
l > 0) && (h2->m[
l-1] ==
NULL))
l--;
97 for (
i=
l-1;
i>=0;
i--)
102 while ((ll <
k) && ((h3->m[ll] ==
NULL)
154 for (
j=0;
j<r->N-1;
j++) names[
j]=r->names[
j];
239 Werror(
"error %d in >>groebner<<",err);
247 void *args[]={temp,(
void*)1,
NULL};
250 temp1=(ideal)temp0->
data;
254 Werror(
"error %d in >>modStd<<",err);
297 void *args[]={temp,
v,
NULL};
300 temp1=(ideal)temp0->
data;
305 Werror(
"error %d in >>satstd<<",err);
322 int rank=
si_max(h1->rank,h2->rank);
329 ideal first,second,temp,temp1,
result;
341 int t=flength; flength=slength; slength=t;
361 while ((
j>0) && (first->m[
j-1]==
NULL))
j--;
366 if (first->m[
i]!=
NULL)
368 if (syz_ring==orig_ring)
369 temp->m[
k] =
pCopy(first->m[
i]);
371 temp->m[
k] =
prCopyR(first->m[
i], orig_ring, syz_ring);
384 if (second->m[
i]!=
NULL)
386 if (syz_ring==orig_ring)
387 temp->m[
k] =
pCopy(second->m[
i]);
402 WarnS(
"wrong algorithm for GB");
407 if(syz_ring!=orig_ring)
414 if ((temp1->m[
i]!=
NULL)
417 if(syz_ring==orig_ring)
423 p =
prMoveR(temp1->m[
i], syz_ring,orig_ring);
440 if(syz_ring!=orig_ring)
474 int i,
j=0,
k=0,
l,maxrk=-1,realrki;
476 ideal bigmat,tempstd,
result;
488 if (realrki>maxrk) maxrk = realrki;
514 for (
i=0;
i<maxrk;
i++)
521 bigmat->m[
i] =
pAdd(bigmat->m[
i],
p);
535 if (syz_ring==orig_ring)
553 WarnS(
"wrong algorithm for GB");
558 if(syz_ring!=orig_ring)
568 if (syz_ring==orig_ring)
578 if(syz_ring!=orig_ring)
581 if(syz_ring!=orig_ring)
631 Warn(
"syzcomp too low, should be %d instead of %d",
k,syzcomp);
635 h2->rank = syzcomp+
i;
687 PrintS(
" --------------before std------------------------\n");
699 WarnS(
"wrong algorithm for GB");
710 int h1_size,
BOOLEAN inputIsIdeal,
const ring oring,
const ring sring)
720 Print(
"after std: --------------syzComp=%d------------------------\n",syzComp);
729 if (s_h3->m[
j] !=
NULL)
755 (*S)->m[
j]=s_h3->m[
j];
767 PrintS(
"T: ----------------------------------------\n");
786 if (s_h2->m[
j] !=
NULL)
788 poly q =
prMoveR( s_h2->m[
j], sring,oring);
836 int ii, idElemens_h1;
842 for(ii=0;ii<idElemens_h1 ;ii++)
pTest(h1->m[ii]);
857 if (orig_ring != syz_ring)
877 if (orig_ring != syz_ring)
882 if (s_h3->m[
j] !=
NULL)
910 if (s_h3->m[
j] !=
NULL)
914 e->m[
j] = s_h3->m[
j];
915 isMonomial=isMonomial && (
pNext(s_h3->m[
j])==
NULL);
934 assume(orig_ring==syz_ring);
936 if (dp_C_ring != syz_ring)
951 if (dp_C_ring != orig_ring)
993 return idInit(1,h1->rank);
1010 if (orig_ring != syz_ring)
1025 if (syz_ring!=orig_ring)
1035 if (syz_ring!=orig_ring)
rDelete(syz_ring);
1036 s_h3->rank=h1->rank;
1056 if (s_temp->m[
j]!=
NULL)
1063 #ifdef HAVE_SHIFTBBA
1069 s_temp->m[
j] =
pAdd(
p, q);
1086 *unit=
mpNew(e_mod,e_mod);
1088 for(
int i=e_mod;
i>0;
i--)
1105 int idelems_submod=
IDELEMS(submod);
1115 return idInit(1,idelems_mod);
1123 return idInit(1,idelems_mod);
1127 WerrorS(
"2nd module does not lie in the first");
1133 comps_to_add = idelems_submod;
1134 while ((comps_to_add>0) && (submod->m[comps_to_add-1]==
NULL))
1138 if ((
k!=0) && (lsmod==0)) lsmod=1;
1140 if (k<submod->rank) {
WarnS(
"rk(submod) > rk(mod) ?");
k=submod->rank; }
1147 ideal s_mod, s_temp;
1148 if (orig_ring != syz_ring)
1183 for(
j = 0;
j<comps_to_add;
j++)
1196 s_temp->rank += (
k+comps_to_add);
1199 s_result->rank = s_h3->rank;
1206 if (s_result->m[
j]!=
NULL)
1216 WarnS(
"first module not a standardbasis\n"
1217 "// ** or second not a proper submodule");
1220 WerrorS(
"2nd module does not lie in the first");
1224 if(syz_ring!=orig_ring)
1235 s_result=
idInit(idelems_submod,idelems_mod);
1240 p = s_rest->m[
j] = s_result->m[
j];
1247 pNeg(s_result->m[
j]);
1250 if ((lsmod==0) && (s_rest!=
NULL))
1254 if (s_rest->m[
j-1]!=
NULL)
1260 if(syz_ring!=orig_ring)
1270 s_rest->rank=
mod->rank;
1277 *unit=
mpNew(idelems_submod,idelems_submod);
1281 poly
p=s_result->m[
i];
1299 else p=s_result->m[
i];
1310 s_result->rank=idelems_mod;
1390 int i,
l,ll,
k,kkk,kmax;
1398 if ((k2==0) && (
k>1)) *addOnlyOne =
FALSE;
1405 if (weights!=
NULL)
delete weights;
1410 if (h2->m[
i] !=
NULL)
1421 *kkmax = kmax =
j*
k+1;
1436 if (h4->m[
i-1]!=
NULL)
1450 if(temph1->m[
l]!=
NULL)
1452 for (ll=0; ll<
j; ll++)
1476 h4->m[
i] = h4->m[
i+1];
1516 if (orig_ring!=syz_ring)
1518 s_h4 =
idrMoveR(s_h4,orig_ring, syz_ring);
1547 m=idModule2Matrix(
idCopy(s_h3));
1548 Print(
"result, kmax=%d:\n",kmax);
1554 if (weights1!=
NULL)
delete weights1;
1572 s_h3->rank = h1->rank;
1573 if(syz_ring!=orig_ring)
1592 int *block0,*block1;
1606 WerrorS(
"cannot eliminate in a qring");
1619 WerrorS(
"no elimination is possible: subalgebra is not admissible");
1629 if (origR->order[
k]!=0) ordersize++;
1636 for (
k=0;
k<ordersize-1;
k++)
1638 block0[
k+1] = origR->block0[
k];
1639 block1[
k+1] = origR->block1[
k];
1640 ord[
k+1] = origR->order[
k];
1641 if (origR->wvhdl[
k]!=
NULL) wv[
k+1] = (
int*)
omMemDup(origR->wvhdl[
k]);
1651 double wNsqr = (double)2.0 / (
double)(
currRing->N);
1655 wCall(h1->m, sl,
x, wNsqr);
1656 for (sl = (
currRing->N); sl!=0; sl--)
1657 wv[1][sl-1] =
x[sl + (
currRing->N) + 1];
1673 block0=(
int*)
omAlloc0(4*
sizeof(
int));
1674 block1=(
int*)
omAlloc0(4*
sizeof(
int));
1675 wv=(
int**)
omAlloc0(4*
sizeof(
int**));
1676 block0[0] = block0[1] = 1;
1677 block1[0] = block1[1] =
rVar(origR);
1700 block0=(
int*)
omAlloc0(4*
sizeof(
int));
1701 block1=(
int*)
omAlloc0(4*
sizeof(
int));
1702 wv=(
int**)
omAlloc0(4*
sizeof(
int**));
1703 block0[0] = block0[1] = 1;
1704 block1[0] = block1[1] =
rVar(origR);
1722 block0=(
int*)
omAlloc0(ordersize*
sizeof(
int));
1723 block1=(
int*)
omAlloc0(ordersize*
sizeof(
int));
1724 wv=(
int**)
omAlloc0(ordersize*
sizeof(
int**));
1725 for (
k=0;
k<ordersize-1;
k++)
1727 block0[
k+1] = origR->block0[
k];
1728 block1[
k+1] = origR->block1[
k];
1729 ord[
k+1] = origR->order[
k];
1730 if (origR->wvhdl[
k]!=
NULL) wv[
k+1] = (
int*)
omMemDup(origR->wvhdl[
k]);
1733 block1[0] =
rVar(origR);
1746 tmpR->block0 = block0;
1747 tmpR->block1 = block1;
1757 WerrorS(
"no elimination is possible: ordering condition is violated");
1774 if (origR->qideal!=
NULL)
1776 WarnS(
"eliminate in q-ring: experimental");
1791 WarnS(
"wrong algorithm for GB");
1798 while ((
i >= 0) && (hh->m[
i] ==
NULL))
i--;
1801 for (
k=0;
k<=
i;
k++)
1813 h3->m[
j] =
prMoveR( hh->m[
k], tmpR,origR);
1825 #ifdef WITH_OLD_MINOR
1829 poly idMinor(
matrix a,
int ar,
unsigned long which, ideal
R)
1833 int *rowchoise,*colchoise;
1839 rowchoise=(
int *)
omAlloc(ar*
sizeof(
int));
1840 colchoise=(
int *)
omAlloc(ar*
sizeof(
int));
1851 for (
i=1;
i<=ar;
i++)
1853 for (
j=1;
j<=ar;
j++)
1869 for (
i=1;
i<=ar;
i++)
1892 int *rowchoise,*colchoise;
1902 rowchoise=(
int *)
omAlloc(ar*
sizeof(
int));
1903 colchoise=(
int *)
omAlloc(ar*
sizeof(
int));
1913 for (
i=1;
i<=ar;
i++)
1915 for (
j=1;
j<=ar;
j++)
1942 for (
i=1;
i<=ar;
i++)
1970 const int r = a->
nrows;
1971 const int c = a->
ncols;
1973 if((ar<=0) || (ar>r) || (ar>c))
1975 Werror(
"%d-th minor, matrix is %dx%d",ar,r,c);
1987 for (
int i=r*c-1;
i>=0;
i--)
2040 if (id1->m[
i] !=
NULL)
2069 if (
w->length()+1 < cmax)
2204 #ifdef HAVE_SHIFTBBA
2210 int i,
k,rk,flength=0,slength,
length;
2231 ((*wtmp)[
i])=(**w)[
i];
2255 if(temp->m[
i]!=
NULL)
2293 if (syz_ring != orig_ring)
2303 unsigned save_opt,save_opt2;
2320 if (wtmp!=
NULL)
delete wtmp;
2326 if (s_temp1->m[
i]!=
NULL)
2344 if (s_temp1->m[
i]!=
NULL)
2352 poly q =
prMoveR( s_temp1->m[
i], syz_ring,orig_ring);
2353 s_temp1->m[
i] =
NULL;
2367 }
while (q !=
NULL);
2380 if (syz_ring!=orig_ring)
2400 #ifdef HAVE_SHIFTBBA
2407 int i,flength=0,slength,
length;
2428 ((*wtmp)[
i])=(**w)[
i];
2451 if (syz_ring != orig_ring)
2462 unsigned save_opt,save_opt2;
2480 if (wtmp!=
NULL)
delete wtmp;
2486 if (syz_ring!=orig_ring)
2527 for (
i=0;
i<(*convert)->length();
i++)
2541 while ((
j>0) && (kbase->m[
j-1]==
NULL))
j--;
2542 if (
j==0)
return -1;
2551 if (
j==0)
return -1;
2613 while ((
i>0) && (kbase->m[
i-1]==
NULL))
i--;
2616 while ((
j>0) && (arg->m[
j-1]==
NULL))
j--;
2620 while ((
j>0) && (arg->m[
j-1]==
NULL))
j--;
2674 int i,next_gen,next_comp;
2678 int *red_comp=(
int*)
omAlloc((
res->rank+1)*
sizeof(int));
2679 for (
i=
res->rank;
i>=0;
i--) red_comp[
i]=
i;
2685 if (next_gen<0)
break;
2688 for(
i=next_comp+1;
i<=arg->rank;
i++) red_comp[
i]--;
2691 for(
i=next_comp;
i<(*w)->length();
i++) (**
w)[
i-1]=(**w)[
i];
2701 int nl=
si_max((*w)->length()-del,1);
2703 for(
i=0;
i<
res->rank;
i++) (*wtmp)[
i]=(**w)[
i];
2713 poly
id_GCD(poly
f, poly
g,
const ring r)
2717 ideal I=
idInit(2,1); I->m[0]=
f; I->m[1]=
g;
2731 ideal I=
idInit(2,1); I->m[0]=
f; I->m[1]=
g;
2759 int cnt=
IDELEMS(xx[0])*xx[0]->nrows;
2761 result->nrows=xx[0]->nrows;
2762 result->ncols=xx[0]->ncols;
2765 number *
x=(number *)
omAlloc(rl*
sizeof(number));
2766 for(
i=cnt-1;
i>=0;
i--)
2772 for(
j=rl-1;
j>=0;
j--)
2781 for(
j=rl-1;
j>=0;
j--)
2794 number n=n_ChineseRemainder(
x,q,rl,
R->cf);
2796 for(
j=rl-1;
j>=0;
j--)
2840 for(
i=cnt-1;
i>=0;
i--)
2944 for (
int i = 0;
i < idsize;
i++)
2946 id_sort[
i].
p =
id->m[
i];
2950 int index, index_i, index_j;
2952 for (
int j = 1;
j < idsize;
j++)
2956 index_i = id_sort[
i].
index;
2957 index_j = id_sort[
j].
index;
2958 if (index_j > index_i)
2983 if (strat->
P.t_p==
NULL)
2992 bool nonTrivialSaturationToBeDone=
true;
2995 nonTrivialSaturationToBeDone=
false;
3002 if (mm[
i]>0) nonTrivialSaturationToBeDone=
true;
3007 if (!nonTrivialSaturationToBeDone)
break;
3009 if (nonTrivialSaturationToBeDone)
3038 poly
p=strat->
P.t_p;
3045 bool nonTrivialSaturationToBeDone=
true;
3048 nonTrivialSaturationToBeDone=
false;
3055 if (mm[
i]>0) nonTrivialSaturationToBeDone =
true;
3060 if (!nonTrivialSaturationToBeDone)
break;
3062 if (nonTrivialSaturationToBeDone)
3101 for (
int i=0;
i<
k;
i++)
3110 WerrorS(
"ideal generators must be variables");
3118 for (
int i=1;
i<=r->N;
i++)
3126 Werror(
"exponent(x(%d)^%d) must be 0 or 1",
i,li);
3141 if (strcmp(n,
"default")==0) alg=
GbDefault;
3142 else if (strcmp(n,
"slimgb")==0) alg=
GbSlimgb;
3143 else if (strcmp(n,
"std")==0) alg=
GbStd;
3144 else if (strcmp(n,
"sba")==0) alg=
GbSba;
3145 else if (strcmp(n,
"singmatic")==0) alg=
GbSingmatic;
3146 else if (strcmp(n,
"groebner")==0) alg=
GbGroebner;
3147 else if (strcmp(n,
"modstd")==0) alg=
GbModstd;
3148 else if (strcmp(n,
"ffmod")==0) alg=
GbFfmod;
3149 else if (strcmp(n,
"nfmod")==0) alg=
GbNfmod;
3150 else if (strcmp(n,
"std:sat")==0) alg=
GbStdSat;
3151 else Warn(
">>%s<< is an unknown algorithm",n);
3163 WarnS(
"requires: coef:field, commutative, global ordering, not qring");
3165 else if (alg==
GbSba)
3174 WarnS(
"requires: coef:domain, commutative, global ordering");
3184 WarnS(
">>modStd<< not found");
3193 WarnS(
"requires: coef:QQ, commutative, global ordering");
3199 WarnS(
">>satstd<< not found");
static int si_max(const int a, const int b)
static int si_min(const int a, const int b)
const CanonicalForm CFMap CFMap & N
static CanonicalForm bound(const CFMatrix &M)
poly singclap_pdivide(poly f, poly g, const ring r)
Class used for (list of) interpreter objects.
Coefficient rings, fields and other domains suitable for Singular polynomials.
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
const CanonicalForm int s
CanonicalForm divide(const CanonicalForm &ff, const CanonicalForm &f, const CFList &as)
const Variable & v
< [in] a sqrfree bivariate poly
void WerrorS(const char *s)
GbVariant syGetAlgorithm(char *n, const ring r, const ideal)
static void idPrepareStd(ideal s_temp, int k)
matrix idCoeffOfKBase(ideal arg, ideal kbase, poly how)
void idLiftW(ideal P, ideal Q, int n, matrix &T, ideal &R, int *w)
static void idLift_setUnit(int e_mod, matrix *unit)
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)
void idDelEquals(ideal id)
int pCompare_qsort(const void *a, const void *b)
ideal idQuot(ideal h1, ideal h2, BOOLEAN h1IsStb, BOOLEAN resultIsIdeal)
ideal idMinors(matrix a, int ar, ideal R)
compute all ar-minors of the matrix a the caller of mpRecMin the elements of the result are not in R ...
BOOLEAN idIsSubModule(ideal id1, ideal id2)
ideal idSeries(int n, ideal M, matrix U, intvec *w)
static ideal idGroebner(ideal temp, int syzComp, GbVariant alg, intvec *hilb=NULL, intvec *w=NULL, tHomog hom=testHomog)
ideal idCreateSpecialKbase(ideal kBase, intvec **convert)
static ideal idPrepare(ideal h1, ideal h11, tHomog hom, int syzcomp, intvec **w, GbVariant alg)
poly id_GCD(poly f, poly g, const ring r)
int idIndexOfKBase(poly monom, ideal kbase)
poly idDecompose(poly monom, poly how, ideal kbase, int *pos)
matrix idDiffOp(ideal I, ideal J, BOOLEAN multiply)
void idSort_qsort(poly_sort *id_sort, int idsize)
static ideal idInitializeQuot(ideal h1, ideal h2, BOOLEAN h1IsStb, BOOLEAN *addOnlyOne, int *kkmax)
ideal idElimination(ideal h1, poly delVar, intvec *hilb, GbVariant alg)
static ideal idSectWithElim(ideal h1, ideal h2, GbVariant alg)
ideal idMinBase(ideal h1)
ideal idSect(ideal h1, ideal h2, GbVariant alg)
ideal idMultSect(resolvente arg, int length, GbVariant alg)
void idKeepFirstK(ideal id, const int k)
keeps the first k (>= 1) entries of the given ideal (Note that the kept polynomials may be zero....
ideal idLift(ideal mod, ideal submod, ideal *rest, BOOLEAN goodShape, BOOLEAN isSB, BOOLEAN divide, matrix *unit, GbVariant alg)
STATIC_VAR int * id_satstdSaturatingVariables
ideal idExtractG_T_S(ideal s_h3, matrix *T, ideal *S, long syzComp, int h1_size, BOOLEAN inputIsIdeal, const ring oring, const ring sring)
static void idDeleteComps(ideal arg, int *red_comp, int del)
ideal idModulo(ideal h2, ideal h1, tHomog hom, intvec **w, matrix *T, GbVariant alg)
ideal id_Farey(ideal x, number N, const ring r)
ideal id_Satstd(const ideal I, ideal J, const ring r)
ideal idModuloLP(ideal h2, ideal h1, tHomog, intvec **w, matrix *T, GbVariant alg)
static BOOLEAN id_sat_vars_sp(kStrategy strat)
ideal idMinEmbedding(ideal arg, BOOLEAN inPlace, intvec **w)
#define idDelete(H)
delete an ideal
#define idSimpleAdd(A, B)
void idGetNextChoise(int r, int end, BOOLEAN *endch, int *choise)
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
static BOOLEAN idHomModule(ideal m, ideal Q, intvec **w)
static intvec * idSort(ideal id, BOOLEAN nolex=TRUE)
static BOOLEAN idHomIdeal(ideal id, ideal Q=NULL)
static ideal idMult(ideal h1, ideal h2)
hh := h1 * h2
#define idMaxIdeal(D)
initialise the maximal ideal (at 0)
void idInitChoise(int r, int beg, int end, BOOLEAN *endch, int *choise)
ideal idFreeModule(int i)
static BOOLEAN length(leftv result, leftv arg)
intvec * ivCopy(const intvec *o)
idhdl ggetid(const char *n)
EXTERN_VAR omBin sleftv_bin
void * iiCallLibProc1(const char *n, void *arg, int arg_type, BOOLEAN &err)
leftv ii_CallLibProcM(const char *n, void **args, int *arg_types, const ring R, BOOLEAN &err)
args: NULL terminated array of arguments arg_types: 0 terminated array of corresponding types
void ipPrint_MA0(matrix m, const char *name)
void p_TakeOutComp(poly *p, long comp, poly *q, int *lq, const ring r)
ideal kMin_std(ideal F, ideal Q, tHomog h, intvec **w, ideal &M, intvec *hilb, int syzComp, int reduced)
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
ideal kSba(ideal F, ideal Q, tHomog h, intvec **w, int sbaOrder, int arri, intvec *hilb, int syzComp, int newIdeal, intvec *vw)
ideal kStd(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
BOOLEAN nc_CheckSubalgebra(poly PolyVar, ring r)
static nc_type & ncRingType(nc_struct *p)
matrix mpNew(int r, int c)
create a r x c zero-matrix
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)
void mp_MinorToResult(ideal result, int &elems, matrix a, int r, int c, ideal R, const ring)
entries of a are minors and go to result (only if not in R)
void mp_RecMin(int ar, ideal result, int &elems, matrix a, int lr, int lc, poly barDiv, ideal R, const ring r)
produces recursively the ideal of all arxar-minors of a
poly mp_DetBareiss(matrix a, const ring r)
returns the determinant of the matrix m; uses Bareiss algorithm
#define MATELEM(mat, i, j)
1-based access to matrix
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
#define __p_GetComp(p, r)
#define omFreeSize(addr, size)
#define omFreeBin(addr, bin)
#define SI_RESTORE_OPT1(A)
#define SI_RESTORE_OPT2(A)
#define TEST_OPT_RETURN_SB
#define TEST_V_INTERSECT_ELIM
#define TEST_V_INTERSECT_SYZ
#define TEST_OPT_NOTREGULARITY
static int index(p_Length length, p_Ord ord)
poly p_DivideM(poly a, poly b, const ring r)
poly p_Farey(poly p, number N, const ring r)
int p_Weight(int i, const ring r)
void p_Shift(poly *p, int i, const ring r)
shifts components of the vector p by i
int p_Compare(const poly a, const poly b, const ring R)
long p_DegW(poly p, const int *w, const ring R)
void p_SetModDeg(intvec *w, ring r)
int p_Var(poly m, const ring r)
void pEnlargeSet(poly **p, int l, int increment)
long p_Deg(poly a, const ring r)
static poly p_Neg(poly p, const ring r)
static poly p_Add_q(poly p, poly q, const ring r)
static void p_LmDelete(poly p, const ring r)
static long p_SubExp(poly p, int v, long ee, ring r)
static poly p_Head(poly p, const ring r)
copy the i(leading) term of p
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent @Note: VarOffset encodes the position in p->exp
static long p_MinComp(poly p, ring lmRing, ring tailRing)
static void p_Setm(poly p, const ring r)
static poly p_Copy_noCheck(poly p, const ring r)
returns a copy of p (without any additional testing)
static number p_SetCoeff(poly p, number n, ring r)
static poly pReverse(poly p)
static int p_LmCmp(poly p, poly q, const ring r)
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent @Note: the integer VarOffset encodes:
static void p_Delete(poly *p, const ring r)
static void p_GetExpV(poly p, int *ev, const ring r)
static poly p_LmFreeAndNext(poly p, ring)
static poly p_Copy(poly p, const ring r)
returns a copy of p
void rChangeCurrRing(ring r)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Compatiblity layer for legacy polynomial operations (over currRing)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL
#define pGetComp(p)
Component.
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
#define pSeries(n, p, u, w)
#define pGetExp(p, i)
Exponent.
#define pSetmComp(p)
TODO:
#define pEqualPolys(p1, p2)
#define pDivisibleBy(a, b)
returns TRUE, if leading monom of a divides leading monom of b i.e., if there exists a expvector c > ...
void pTakeOutComp(poly *p, long comp, poly *q, int *lq, const ring R=currRing)
Splits *p into two polys: *q which consists of all monoms with component == comp and *p of all other ...
#define pCopy(p)
return a copy of the poly
poly prMoveR(poly &p, ring src_r, ring dest_r)
ideal idrMoveR(ideal &id, ring src_r, ring dest_r)
poly prCopyR(poly p, ring src_r, ring dest_r)
ideal idrCopyR(ideal id, ring src_r, ring dest_r)
ideal idrMoveR_NoSort(ideal &id, ring src_r, ring dest_r)
poly prMoveR_NoSort(poly &p, ring src_r, ring dest_r)
ideal idrCopyR_NoSort(ideal id, ring src_r, ring dest_r)
void PrintS(const char *s)
void Werror(const char *fmt,...)
BOOLEAN rComplete(ring r, int force)
this needs to be called whenever a new ring is created: new fields in ring are created (like VarOffse...
ring rAssure_SyzComp(const ring r, BOOLEAN complete)
BOOLEAN nc_rComplete(const ring src, ring dest, bool bSetupQuotient)
ring rAssure_SyzOrder(const ring r, BOOLEAN complete)
ring rCopy0(const ring r, BOOLEAN copy_qideal, BOOLEAN copy_ordering)
void rDelete(ring r)
unconditionally deletes fields in r
void rSetSyzComp(int k, const ring r)
ring rAssure_dp_C(const ring r)
static BOOLEAN rField_is_Ring(const ring r)
static BOOLEAN rIsPluralRing(const ring r)
we must always have this test!
static BOOLEAN rField_is_Domain(const ring r)
static BOOLEAN rIsLPRing(const ring r)
@ ringorder_aa
for idElimination, like a, except pFDeg, pWeigths ignore it
static BOOLEAN rField_is_Q(const ring r)
static BOOLEAN rIsNCRing(const ring r)
static short rVar(const ring r)
#define rVar(r) (r->N)
BOOLEAN rHasGlobalOrdering(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
matrix id_Module2Matrix(ideal mod, const ring R)
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
int id_ReadOutPivot(ideal arg, int *comp, const ring r)
void id_DelMultiples(ideal id, const ring r)
ideal id = (id[i]), c any unit if id[i] = c*id[j] then id[j] is deleted for j > i
ideal id_Matrix2Module(matrix mat, const ring R)
converts mat to module, destroys mat
ideal id_SimpleAdd(ideal h1, ideal h2, const ring R)
concat the lists h1 and h2 without zeros
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
void id_Shift(ideal M, int s, const ring r)
ideal id_ChineseRemainder(ideal *xx, number *q, int rl, const ring r)
long sm_ExpBound(ideal m, int di, int ra, int t, const ring currRing)
ring sm_RingChange(const ring origR, long bound)
void sm_KillModifiedRing(ring r)
intvec * syBetti(resolvente res, int length, int *regularity, intvec *weights, BOOLEAN tomin, int *row_shift)
void syGaussForOne(ideal syz, int elnum, int ModComp, int from, int till)
resolvente sySchreyerResolvente(ideal arg, int maxlength, int *length, BOOLEAN isMonomial=FALSE, BOOLEAN notReplace=FALSE)
ideal t_rep_gb(const ring r, ideal arg_I, int syz_comp, BOOLEAN F4_mode)
THREAD_VAR double(* wFunctional)(int *degw, int *lpol, int npol, double *rel, double wx, double wNsqr)
void wCall(poly *s, int sl, int *x, double wNsqr, const ring R)
double wFunctionalBuch(int *degw, int *lpol, int npol, double *rel, double wx, double wNsqr)