63 WarnS(
"minbase applies only to the local or homogeneous case over coefficient fields");
73 WarnS(
"minbase applies only to the local or homogeneous case over coefficient fields");
97 while ((k > 0) && (h3->m[k-1] ==
NULL)) k--;
100 while ((l > 0) && (h2->m[l-1] ==
NULL)) l--;
101 for (i=l-1; i>=0; i--)
103 if (h2->m[i] !=
NULL)
106 while ((ll < k) && ((h3->m[ll] ==
NULL)
117 e->m[
j] =
pCopy(h2->m[i]);
158 r->order=(
int*)
omAlloc0(3*
sizeof(
int*));
162 for (j=0;j<r->N-1;j++) names[j]=r->names[j];
187 for (l=
IDELEMS(h1)-1; l>=0; l--)
189 h->m[
l] = h1->m[
l]; h1->m[
l]=
NULL;
192 for (l=
IDELEMS(h2)-1; l>=0; l--)
194 h->m[l+
j] = h2->m[
l]; h2->m[
l]=
NULL;
216 int rank=
si_max(h1->rank,h2->rank);
219 ideal first,second,temp,temp1,
result;
231 int t=flength; flength=slength; slength=t;
233 length =
si_max(flength,slength);
250 while ((j>0) && (first->m[j-1]==
NULL)) j--;
255 if (first->m[i]!=
NULL)
257 if (syz_ring==orig_ring)
258 temp->m[
k] =
pCopy(first->m[i]);
260 temp->m[
k] =
prCopyR(first->m[i], orig_ring, syz_ring);
271 for (i=0;i<
IDELEMS(second);i++)
273 if (second->m[i]!=
NULL)
275 if (syz_ring==orig_ring)
276 temp->m[
k] =
pCopy(second->m[i]);
285 if (w!=
NULL)
delete w;
287 if(syz_ring!=orig_ring)
294 if ((temp1->m[i]!=
NULL)
295 && (
p_GetComp(temp1->m[i],syz_ring)>length))
297 if(syz_ring==orig_ring)
303 p =
prMoveR(temp1->m[i], syz_ring,orig_ring);
320 if(syz_ring!=orig_ring)
337 if (w!=
NULL)
delete w;
353 ideal bigmat,tempstd,
result;
359 for (i=0;i<length;i++)
366 if (realrki>maxrk) maxrk = realrki;
372 return idInit(1,arg[i]->rank);
389 bigmat =
idInit(j,(
k+1)*maxrk);
391 for (i=0;i<maxrk;i++)
398 bigmat->m[
i] =
pAdd(bigmat->m[i],p);
404 for (j=0;j<length;j++)
408 for (l=0;l<
IDELEMS(arg[j]);l++)
410 if (arg[j]->
m[l]!=
NULL)
412 if (syz_ring==orig_ring)
413 bigmat->m[
i] =
pCopy(arg[j]->
m[l]);
425 if (w!=
NULL)
delete w;
428 if(syz_ring!=orig_ring)
434 for (j=0;j<
IDELEMS(tempstd);j++)
438 if (syz_ring==orig_ring)
439 p =
pCopy(tempstd->m[j]);
448 if(syz_ring!=orig_ring)
451 if(syz_ring!=orig_ring)
482 Warn(
"syzcomp too low, should be %d instead of %d",k,syzcomp);
486 h2->rank = syzcomp+
i;
498 Print(
"Prepare::h2: ");
525 Print(
"Prepare::Input: ");
528 Print(
"Prepare::currQuotient: ");
541 Print(
"Prepare::Output: ");
558 BOOLEAN setRegularity,
int *deg)
561 int j,
k, length=0,reg;
563 int ii, idElemens_h1;
569 for(ii=0;ii<idElemens_h1 ;ii++)
pTest(h1->m[ii]);
586 if (orig_ring != syz_ring)
604 if (orig_ring != syz_ring)
607 for (j=0; j<
IDELEMS(s_h3); j++)
609 if (s_h3->m[j] !=
NULL)
612 p_Shift(&s_h3->m[j], -k,syz_ring);
635 for (j=
IDELEMS(s_h3)-1; j>=0; j--)
637 if (s_h3->m[j] !=
NULL)
641 e->m[
j] = s_h3->m[
j];
642 isMonomial=isMonomial && (
pNext(s_h3->m[j])==
NULL);
664 if (dp_C_ring != syz_ring)
673 for (j=0;j<length;j++)
679 if (dp_C_ring != syz_ring)
712 if (orig_ring != syz_ring)
728 if (orig_ring != syz_ring)
765 return idInit(1,h1->rank);
781 if (orig_ring != syz_ring)
792 if (w!=
NULL)
delete w;
798 for (j=0; j<
IDELEMS(s_h3); j++)
800 if (s_h3->m[j] !=
NULL)
827 (*syz)->m[
j]=s_h3->m[
j];
849 if (syz_ring!=orig_ring)
858 for (j=0; j<
IDELEMS(s_h2); j++)
860 if (s_h2->m[j] !=
NULL)
862 q =
prMoveR( s_h2->m[j], syz_ring,orig_ring);
884 for (i=0; i<
IDELEMS(s_h3); i++)
890 for (i=0; i<
IDELEMS(*syz); i++)
896 if (syz_ring!=orig_ring)
rDelete(syz_ring);
908 for (j=0; j<
IDELEMS(s_temp); j++)
914 for (j=0; j<
IDELEMS(s_temp); j++)
916 if (s_temp->m[j]!=
NULL)
927 s_temp->rank = k+
IDELEMS(s_temp);
951 *rest=
idInit(1,mod->rank);
953 return idInit(1,mod->rank);
957 WerrorS(
"2nd module does not lie in the first");
962 comps_to_add =
IDELEMS(submod);
963 while ((comps_to_add>0) && (submod->m[comps_to_add-1]==
NULL))
967 if ((k!=0) && (lsmod==0)) lsmod=1;
968 k=
si_max(k,(
int)mod->rank);
969 if (k<submod->rank) {
WarnS(
"rk(submod) > rk(mod) ?");k=submod->rank; }
976 if (orig_ring != syz_ring)
1011 for(
j = 0;
j<comps_to_add;
j++)
1024 s_temp->rank += (k+comps_to_add);
1026 ideal s_result =
kNF(s_h3,
currRing->qideal,s_temp,k);
1027 s_result->rank = s_h3->rank;
1034 if (s_result->m[
j]!=
NULL)
1042 WarnS(
"first module not a standardbasis\n" 1043 "// ** or second not a proper submodule");
1046 WerrorS(
"2nd module does not lie in the first");
1054 p = s_rest->m[
j] = s_result->m[
j];
1056 s_result->m[
j] =
pNext(p);
1061 pNeg(s_result->m[
j]);
1064 if ((lsmod==0) && (s_rest!=
NULL))
1068 if (s_rest->m[
j-1]!=
NULL)
1071 s_rest->m[
j-1] = s_rest->m[
j-1];
1075 if(syz_ring!=orig_ring)
1090 *unit=
mpNew(comps_to_add,comps_to_add);
1092 for(i=0;i<
IDELEMS(s_result);i++)
1094 poly p=s_result->m[
i];
1107 pIter(s_result->m[i]);
1112 else p=s_result->m[
i];
1180 R->m[
i]=
pAdd(R->m[i],p0);
1202 int i,
l,ll,
k,kkk,kmax;
1210 if ((k2==0) && (k>1)) *addOnlyOne =
FALSE;
1217 if (weights!=
NULL)
delete weights;
1222 if (h2->m[i] !=
NULL)
1224 p =
pCopy(h2->m[i]);
1233 *kkmax = kmax = j*k+1;
1242 ideal h4 =
idInit(16,kmax+k-1);
1253 if (h4->m[i-1]!=
NULL)
1266 if(temph1->m[l]!=
NULL)
1268 for (ll=0; ll<
j; ll++)
1270 p =
pCopy(temph1->m[l]);
1292 h4->m[
i] = h4->m[i+1];
1336 if (orig_ring!=syz_ring)
1338 s_h4 =
idrMoveR(s_h4,orig_ring, syz_ring);
1361 m=idModule2Matrix(
idCopy(s_h3));
1362 Print(
"result, kmax=%d:\n",kmax);
1367 if (weights1!=
NULL)
delete weights1;
1372 if ((s_h3->m[i]!=
NULL) && (
pGetComp(s_h3->m[i])>=kmax))
1385 s_h3->rank = h1->rank;
1386 if(syz_ring!=orig_ring)
1404 int *ord,*block0,*block1;
1418 WerrorS(
"cannot eliminate in a qring");
1431 WerrorS(
"no elimination is possible: subalgebra is not admissible");
1441 if (origR->order[
k]!=0) ordersize++;
1448 for (
k=0;
k<ordersize-1;
k++)
1450 block0[
k+1] = origR->block0[
k];
1451 block1[
k+1] = origR->block1[
k];
1452 ord[
k+1] = origR->order[
k];
1453 if (origR->wvhdl[
k]!=
NULL) wv[
k+1] = (
int*)
omMemDup(origR->wvhdl[
k]);
1463 double wNsqr = (double)2.0 / (
double)(
currRing->N);
1467 wCall(h1->m, sl, x, wNsqr);
1468 for (sl = (
currRing->N); sl!=0; sl--)
1469 wv[1][sl-1] = x[sl + (
currRing->N) + 1];
1485 block0=(
int*)
omAlloc0(4*
sizeof(
int));
1486 block1=(
int*)
omAlloc0(4*
sizeof(
int));
1487 wv=(
int**)
omAlloc0(4*
sizeof(
int**));
1488 block0[0] = block0[1] = 1;
1489 block1[0] = block1[1] =
rVar(origR);
1494 for (j=0;j<
rVar(origR);j++)
1495 if (
pGetExp(delVar,j+1)!=0) wv[0][j]=1;
1497 for (j=0;j<
rVar(origR);j++)
1502 for (j=0;j<
rVar(origR);j++)
1512 block0=(
int*)
omAlloc0(4*
sizeof(
int));
1513 block1=(
int*)
omAlloc0(4*
sizeof(
int));
1514 wv=(
int**)
omAlloc0(4*
sizeof(
int**));
1515 block0[0] = block0[1] = 1;
1516 block1[0] = block1[1] =
rVar(origR);
1520 for (j=0;j<
rVar(origR);j++)
1523 for (j=0;j<
rVar(origR);j++)
1524 if (
pGetExp(delVar,j+1)!=0) wv[1][j]=1;
1533 ord=(
int*)
omAlloc0(ordersize*
sizeof(
int));
1534 block0=(
int*)
omAlloc0(ordersize*
sizeof(
int));
1535 block1=(
int*)
omAlloc0(ordersize*
sizeof(
int));
1536 wv=(
int**)
omAlloc0(ordersize*
sizeof(
int**));
1537 for (
k=0;
k<ordersize-1;
k++)
1539 block0[
k+1] = origR->block0[
k];
1540 block1[
k+1] = origR->block1[
k];
1541 ord[
k+1] = origR->order[
k];
1542 if (origR->wvhdl[
k]!=
NULL) wv[
k+1] = (
int*)
omMemDup(origR->wvhdl[
k]);
1545 block1[0] =
rVar(origR);
1547 for (j=0;j<
rVar(origR);j++)
1548 if (
pGetExp(delVar,j+1)!=0) wv[0][j]=1;
1558 tmpR->block0 = block0;
1559 tmpR->block1 = block1;
1569 Werror(
"no elimination is possible: ordering condition is violated");
1586 if (origR->qideal!=
NULL)
1588 WarnS(
"eliminate in q-ring: experimental");
1614 while ((i >= 0) && (hh->m[i] ==
NULL)) i--;
1617 for (
k=0;
k<=
i;
k++)
1629 h3->m[
j] =
prMoveR( hh->m[
k], tmpR,origR);
1641 #ifdef WITH_OLD_MINOR 1645 poly idMinor(
matrix a,
int ar,
unsigned long which, ideal
R)
1649 int *rowchoise,*colchoise;
1658 rowchoise=(
int *)
omAlloc(ar*
sizeof(
int));
1659 colchoise=(
int *)
omAlloc(ar*
sizeof(
int));
1674 for (i=1; i<=ar; i++)
1676 for (j=1; j<=ar; j++)
1691 for (i=1; i<=ar; i++)
1715 int *rowchoise,*colchoise;
1724 rowchoise=(
int *)
omAlloc(ar*
sizeof(
int));
1725 colchoise=(
int *)
omAlloc(ar*
sizeof(
int));
1726 if ((i>512) || (j>512) || (i*j >512)) size=512;
1737 for (i=1; i<=ar; i++)
1739 for (j=1; j<=ar; j++)
1769 for (i=1; i<=ar; i++)
1797 const int r = a->nrows;
1798 const int c = a->ncols;
1800 if((ar<=0) || (ar>r) || (ar>c))
1802 Werror(
"%d-th minor, matrix is %dx%d",ar,r,c);
1814 for (
int i=r*c-1;
i>=0;
i--)
1815 if (a->m[
i] !=
NULL)
1850 result =
idrMoveR(result,tmpR,origR);
1868 if (id1->m[i] !=
NULL)
1891 for (i=length-1;i>=0;i--)
1897 if (w->
length()+1 < cmax)
1906 for (i=length-1;i>=0;i--)
2039 int i,
k,rk,flength=0,slength,length;
2047 length =
si_max(flength,slength);
2059 for (i=0;i<length;i++)
2060 ((*wtmp)[i])=(**w)[
i];
2070 ((*wtmp)[i+length]) = d;
2077 temp->m[
i] =
pCopy(h2->m[i]);
2081 if(temp->m[i]!=
NULL)
2100 temp->m[
k] =
pCopy(h1->m[i]);
2118 if (syz_ring != orig_ring)
2136 ((**w)[
i])=(*wtmp)[i+length];
2138 if (wtmp!=
NULL)
delete wtmp;
2140 for (i=0;i<
IDELEMS(s_temp1);i++)
2142 if ((s_temp1->m[i]!=
NULL)
2143 && (((int)
pGetComp(s_temp1->m[i]))<=length))
2155 if (syz_ring!=orig_ring)
2179 while ((i>0) && (mod->m[i-1]==
NULL)) i--;
2200 for (i=0;i<(*convert)->length();i++)
2202 result->m[
i] =
pCopy(kBase->m[(**convert)[i]-1]);
2214 while ((j>0) && (kbase->m[j-1]==
NULL)) j--;
2215 if (j==0)
return -1;
2224 if (j==0)
return -1;
2286 while ((i>0) && (kbase->m[i-1]==
NULL)) i--;
2289 while ((
j>0) && (arg->m[
j-1]==
NULL))
j--;
2293 while ((
j>0) && (arg->m[
j-1]==
NULL))
j--;
2305 MATELEM(result,(*convert)[pos],
k+1) =
2323 for (i=
IDELEMS(arg)-1;i>=0;i--)
2347 int i,next_gen,next_comp;
2349 if (!inPlace) res =
idCopy(arg);
2351 int *red_comp=(
int*)
omAlloc((res->rank+1)*
sizeof(int));
2352 for (i=res->rank;i>=0;i--) red_comp[
i]=
i;
2358 if (next_gen<0)
break;
2361 for(i=next_comp+1;i<=arg->rank;i++) red_comp[i]--;
2364 for(i=next_comp;i<(*w)->length();i++) (**w)[i-1]=(**w)[
i];
2372 if ((w !=
NULL)&&(*w!=
NULL) &&(del>0))
2374 int nl=
si_max((*w)->length()-del,1);
2376 for(i=0;i<res->rank;i++) (*wtmp)[
i]=(**w)[
i];
2390 ideal I=
idInit(2,1); I->m[0]=
f; I->m[1]=
g;
2393 if (w!=
NULL)
delete w;
2404 ideal I=
idInit(2,1); I->m[0]=
f; I->m[1]=
g;
2409 if (w!=
NULL)
delete w;
2429 int cnt=
IDELEMS(xx[0])*xx[0]->nrows;
2431 result->nrows=xx[0]->nrows;
2432 result->ncols=xx[0]->ncols;
2435 number *
x=(number *)
omAlloc(rl*
sizeof(number));
2436 for(i=cnt-1;i>=0;i--)
2442 for(j=rl-1;j>=0;j--)
2451 for(j=rl-1;j>=0;j--)
2464 number n=n_ChineseRemainder(x,q,rl, R->cf);
2466 for(j=rl-1;j>=0;j--)
2481 for(i=rl-1;i>=0;i--)
id_Delete(&(xx[i]), R);
2506 result->nrows=x->nrows;
2507 result->ncols=x->ncols;
2510 for(i=cnt-1;i>=0;i--)
2596 if (a ==
NULL)
return(-1);
2600 if (r != 0)
return(r);
2613 if (r != 0)
return(r);
2617 while (r == 0 && aa !=
NULL && bb !=
NULL)
2651 for (
int i = 0;
i < idsize;
i++)
2653 id_sort[
i].
p =
id->m[
i];
2657 int index, index_i, index_j;
2659 for (
int j = 1;
j < idsize;
j++)
2663 index_i = id_sort[
i].
index;
2664 index_j = id_sort[
j].
index;
2665 if (index_j > index_i)
#define TEST_OPT_NOTREGULARITY
matrix idDiff(matrix i, int k)
#define pSetmComp(p)
TODO:
void p_SetModDeg(intvec *w, ring r)
for idElimination, like a, except pFDeg, pWeigths ignore it
#define idMaxIdeal(D)
initialise the maximal ideal (at 0)
const CanonicalForm int s
ring sm_RingChange(const ring origR, long bound)
void idDelEquals(ideal id)
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
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...
static void idPrepareStd(ideal s_temp, int k)
static CanonicalForm bound(const CFMatrix &M)
poly idDecompose(poly monom, poly how, ideal kbase, int *pos)
poly prCopyR(poly p, ring src_r, ring dest_r)
#define idDelete(H)
delete an ideal
void idLiftW(ideal P, ideal Q, int n, matrix &T, ideal &R, short *w)
Compatiblity layer for legacy polynomial operations (over currRing)
int idIndexOfKBase(poly monom, ideal kbase)
void p_TakeOutComp(poly *p, long comp, poly *q, int *lq, const ring r)
BOOLEAN nc_rComplete(const ring src, ring dest, bool bSetupQuotient)
#define pLmCmp(p, q)
returns 0|1|-1 if p=q|p>q|p<q w.r.t monomial ordering
BOOLEAN idTestHomModule(ideal m, ideal Q, intvec *w)
ideal id_ChineseRemainder(ideal *xx, number *q, int rl, const ring r)
poly prMoveR(poly &p, ring src_r, ring dest_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
static int tCompare(const poly a, const poly b)
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
#define omFreeSize(addr, size)
#define idSimpleAdd(A, B)
matrix idDiffOp(ideal I, ideal J, BOOLEAN multiply)
static short rVar(const ring r)
#define rVar(r) (r->N)
void id_Delete(ideal *h, ring r)
deletes an ideal/module/matrix
int pCompare_qsort(const void *a, const void *b)
CanonicalForm divide(const CanonicalForm &ff, const CanonicalForm &f, const CFList &as)
ring rAssure_SyzOrder(const ring r, BOOLEAN complete)
ideal kStd(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
ideal idMultSect(resolvente arg, int length)
static void ipPrint_MA0(matrix m, const char *name)
void WerrorS(const char *s)
ideal idModulo(ideal h2, ideal h1, tHomog hom, intvec **w)
static intvec * idSort(ideal id, BOOLEAN nolex=TRUE)
#define TEST_V_INTERSECT_ELIM
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)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy ...
#define pEqualPolys(p1, p2)
ideal idMinEmbedding(ideal arg, BOOLEAN inPlace, intvec **w)
poly singclap_pdivide(poly f, poly g, const ring r)
static bool rIsPluralRing(const ring r)
we must always have this test!
long sm_ExpBound(ideal m, int di, int ra, int t, const ring currRing)
ideal idQuot(ideal h1, ideal h2, BOOLEAN h1IsStb, BOOLEAN resultIsIdeal)
static number p_SetCoeff(poly p, number n, ring r)
#define pGetComp(p)
Component.
static poly p_Copy(poly p, const ring r)
returns a copy of p
ideal idMinBase(ideal h1)
matrix idCoeffOfKBase(ideal arg, ideal kbase, poly how)
int pWeight(int i, const ring R=currRing)
static poly p_Copy_noCheck(poly p, const ring r)
returns a copy of p (without any additional testing)
ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
#define pGetExp(p, i)
Exponent.
void id_Shift(ideal M, int s, const ring r)
static poly p_Head(poly p, const ring r)
long p_DegW(poly p, const short *w, const ring R)
static ideal idInitializeQuot(ideal h1, ideal h2, BOOLEAN h1IsStb, BOOLEAN *addOnlyOne, int *kkmax)
ideal idSect(ideal h1, ideal h2)
long p_Deg(poly a, const ring r)
Coefficient rings, fields and other domains suitable for Singular polynomials.
ideal idSeries(int n, ideal M, matrix U, intvec *w)
ideal idElimination(ideal h1, poly delVar, intvec *hilb)
poly p_Farey(poly p, number N, 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 ...
long id_RankFreeModule(ideal s, ring lmRing, ring tailRing)
return the maximal component number found in any polynomial in s
intvec * idMWLift(ideal mod, intvec *weights)
const CanonicalForm CFMap CFMap & N
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...
static long p_GetExp(const poly p, const unsigned long iBitmask, const int VarOffset)
get a single variable exponent : the integer VarOffset encodes:
END_NAMESPACE BEGIN_NAMESPACE_SINGULARXX ideal poly int syzComp
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 ...
ideal idFreeModule(int i)
double(* wFunctional)(int *degw, int *lpol, int npol, double *rel, double wx, double wNsqr)
ring rCopy0(const ring r, BOOLEAN copy_qideal, BOOLEAN copy_ordering)
ideal idSectWithElim(ideal h1, ideal h2)
ring rAssure_SyzComp(const ring r, BOOLEAN complete)
ring rAssure_dp_C(const ring r)
static int pCompare(const poly a, const poly b)
void idSort_qsort(poly_sort *id_sort, int idsize)
ideal idrMoveR(ideal &id, ring src_r, ring dest_r)
static int p_LmCmp(poly p, poly q, const ring r)
void idGetNextChoise(int r, int end, BOOLEAN *endch, int *choise)
static int si_max(const int a, const int b)
void PrintS(const char *s)
static long p_MinComp(poly p, ring lmRing, ring tailRing)
ideal idCreateSpecialKbase(ideal kBase, intvec **convert)
static poly p_LmFreeAndNext(poly p, ring)
BOOLEAN idIsSubModule(ideal id1, ideal id2)
resolvente sySchreyerResolvente(ideal arg, int maxlength, int *length, BOOLEAN isMonomial=FALSE, BOOLEAN notReplace=FALSE)
#define pHead(p)
returns newly allocated copy of Lm(p), coef is copied, next=NULL, p might be NULL ...
static FORCE_INLINE BOOLEAN n_IsZero(number n, const coeffs r)
TRUE iff 'n' represents the zero element.
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size
static poly pReverse(poly p)
static int index(p_Length length, p_Ord ord)
void rSetSyzComp(int k, const ring r)
void rChangeCurrRing(ring r)
poly id_GCD(poly f, poly g, const ring r)
void p_Shift(poly *p, int i, const ring r)
shifts components of the vector p by i
matrix mpNew(int r, int c)
create a r x c zero-matrix
#define TEST_OPT_RETURN_SB
static void p_Delete(poly *p, const ring r)
ideal idMult(ideal h1, ideal h2)
hh := h1 * h2
matrix mp_MultP(matrix a, poly p, const ring R)
multiply a matrix 'a' by a poly 'p', destroy the args
#define SI_RESTORE_OPT2(A)
ideal idInit(int idsize, int rank)
initialise an ideal / module
#define pSeries(n, p, u, w)
static unsigned long p_SetExp(poly p, const unsigned long e, const unsigned long iBitmask, const int VarOffset)
set a single variable exponent : VarOffset encodes the position in p->exp
poly p_DivideM(poly a, poly b, const ring r)
char name(const Variable &v)
static BOOLEAN rField_is_Ring(const ring r)
BOOLEAN idHomIdeal(ideal id, ideal Q=NULL)
static ideal idPrepare(ideal h1, tHomog hom, int syzcomp, intvec **w)
#define pDivisibleBy(a, b)
returns TRUE, if leading monom of a divides leading monom of b i.e., if there exists a expvector c > ...
ideal id_Farey(ideal x, number N, const ring r)
void pEnlargeSet(poly **p, int l, int increment)
void wCall(poly *s, int sl, int *x, double wNsqr, const ring R)
BOOLEAN rHasGlobalOrdering(const ring r)
void rDelete(ring r)
unconditionally deletes fields in r
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 ...
void sm_KillModifiedRing(ring r)
static void idDeleteComps(ideal arg, int *red_comp, int del)
ideal kMin_std(ideal F, ideal Q, tHomog h, intvec **w, ideal &M, intvec *hilb, int syzComp, int reduced)
ideal idLiftStd(ideal h1, matrix *ma, tHomog hi, ideal *syz)
void idInitChoise(int r, int beg, int end, BOOLEAN *endch, int *choise)
poly mp_DetBareiss(matrix a, const ring r)
returns the determinant of the matrix m; uses Bareiss algorithm
ideal idrCopyR(ideal id, ring src_r, ring dest_r)
ideal idLift(ideal mod, ideal submod, ideal *rest, BOOLEAN goodShape, BOOLEAN isSB, BOOLEAN divide, matrix *unit)
static void p_Setm(poly p, const ring r)
void syGaussForOne(ideal syz, int elnum, int ModComp, int from, int till)
matrix mp_Copy(matrix a, const ring r)
copies matrix a (from ring r to r)
static nc_type & ncRingType(nc_struct *p)
ideal idXXX(ideal h1, int k)
#define TEST_V_INTERSECT_SYZ
poly prMoveR_NoSort(poly &p, ring src_r, ring dest_r)
static poly p_Neg(poly p, const ring r)
intvec * syBetti(resolvente res, int length, int *regularity, intvec *weights, BOOLEAN tomin, int *row_shift)
int id_ReadOutPivot(ideal arg, int *comp, const ring r)
static poly p_Add_q(poly p, poly q, const ring r)
BOOLEAN nc_CheckSubalgebra(poly PolyVar, ring r)
ideal idSyzygies(ideal h1, tHomog h, intvec **w, BOOLEAN setSyzComp, BOOLEAN setRegularity, int *deg)
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
#define SI_RESTORE_OPT1(A)
ideal idrCopyR_NoSort(ideal id, ring src_r, ring dest_r)
ideal id_Matrix2Module(matrix mat, const ring R)
BOOLEAN idHomModule(ideal m, ideal Q, intvec **w)
void Werror(const char *fmt,...)
ideal kGroebner(ideal F, ideal Q)
double wFunctionalBuch(int *degw, int *lpol, int npol, double *rel, double wx, double wNsqr)
ideal idrMoveR_NoSort(ideal &id, ring src_r, ring dest_r)
#define pCopy(p)
return a copy of the poly
#define MATELEM(mat, i, j)