10#if !defined(__CYGWIN__) || defined(STATIC_VERSION)
65static void listsprint(std::vector<std::vector<int> > posMat)
68 for(
i=0;
i<posMat.size();
i++)
99 for(
unsigned i=0;
i<pv.size();
i++)
112static void lpsprint(std::vector<std::vector<poly> > pvs)
114 for(
unsigned i=0;
i<pvs.size();
i++)
150 std::vector<int> inte;
151 for(
i=0;
i<
p.size();
i++)
154 inte.push_back(
p[
i]);
160static bool vsubset(std::vector<int> vec1, std::vector<int> vec2)
163 if(vec1.size()>vec2.size())
165 for(
i=0;
i<vec1.size();
i++)
174static bool vEvl(std::vector<int> vec1, std::vector<int> vec2)
176 if(vec1.size()==0 && vec2.size()==0)
186static bool vInvsl(std::vector<int>
vec, std::vector<std::vector<int> > vecs)
189 for(
i=0;
i<vecs.size();
i++)
200static std::vector<int>
vecUnion(std::vector<int> vec1, std::vector<int> vec2)
202 std::vector<int>
vec=vec1;
204 for(
i=0;
i<vec2.size();
i++)
207 vec.push_back(vec2[
i]);
212static std::vector<int>
vecMinus(std::vector<int> vec1,std::vector<int> vec2)
214 std::vector<int>
vec;
215 for(
unsigned i=0;
i<vec1.size();
i++)
219 vec.push_back(vec1[
i]);
225static std::vector<std::vector<int> >
vsMinusv(std::vector<std::vector<int> > vecs, std::vector<int>
vec)
228 std::vector<std::vector<int> >
rem;
229 for(
i=0;
i<vecs.size();
i++)
233 rem.push_back(vecs[
i]);
239static std::vector<std::vector<int> >
vsUnion(std::vector<std::vector<int> > vs1, std::vector<std::vector<int> > vs2)
242 std::vector<std::vector<int> > vs=vs1;
243 for(
i=0;
i<vs2.size();
i++)
247 vs.push_back(vs2[
i]);
253static std::vector<std::vector<int> >
vsIntersection(std::vector<std::vector<int> > vs1, std::vector<std::vector<int> > vs2)
256 std::vector<std::vector<int> > vs;
257 for(
i=0;
i<vs2.size();
i++)
261 vs.push_back(vs2[
i]);
274 std::vector<int> supset;
275 if(
p==0)
return supset;
289 std::vector<std::vector<int> > vecs;
290 std::vector<int>
vec;
308 std::vector<int> supset;
328 std::vector<std::vector<int> > vecs;
329 std::vector<int>
vec;
343static poly
pMake(std::vector<int> vbase)
345 int n=vbase.size(); poly
p,q=0;
358static ideal
idMake(std::vector<std::vector<int> > vecs)
360 int lv=vecs.size(),
i;
423 std::vector<int> vbase;
439static std::vector<std::vector<int> >
vsMake(ideal
h)
441 std::vector<int>
vec;
442 std::vector<std::vector<int> > vecs;
454static std::vector<std::vector<int> >
vecqring(std::vector<std::vector<int> > vec1, std::vector<std::vector<int> > vec2)
458 std::vector<std::vector<int> > vecs=
vsMake(
h);
465static poly
pMaken(std::vector<int> vbase)
479static ideal
idMaken(std::vector<std::vector<int> > vecs)
483 int i,lv=vecs.size();
500 std::vector<std::vector<int> > vecs;
503 bv.push_back(
vec[
i]);
508 for(
i=0;
i<vecs.size();
i++)
510 for(
j=
i+1;
j<vecs.size();
j++)
681 ideal asfmons,sfmons,mons;
790 ideal h1,mons,id_re=
idInit(1,1);
842 id_so=
idadda(id_so, id_re);
934static ideal
finda(ideal
h,poly S,
int ddeg)
943 std::vector<std::vector<int> > hvs=
supports(
h);
949 if(
vInvsl(
v,hvs)&&in.size()==0)
963static bool mabconditionv(std::vector<std::vector<int> > hvs,std::vector<int> pv,std::vector<int> av,std::vector<int> bv)
965 std::vector<int> uv=
vecUnion(pv,av);
975static std::vector<std::vector<int> >
Mabv(ideal
h,poly a,poly
b)
980 for(
unsigned i=0;
i<h2v.size();
i++)
996static std::vector<int>
eli1(std::vector<int> eq1,std::vector<int> eq2)
1041 std::vector<int> yaya;
1052static std::vector<std::vector<int> >
soleli1( std::vector<std::vector<int> > eqs)
1055 std::vector<int> yaya;
1056 std::vector<std::vector<int> > pre=eqs, ppre, re;
1059 re.push_back(eqs[0]);
1060 pre.erase(pre.begin());
1065 for(
i=1;
i<re.size();
i++)
1069 yaya=
eli1(re[
i],yaya);
1077 pre.erase(pre.begin());
1085static std::vector<int>
freevars(
int n, std::vector<int> bset, std::vector<std::vector<int> > gset)
1087 int ql=gset.size(), bl=bset.size(),
i;
1088 std::vector<int>
mvar, fvar;
1091 mvar.push_back(bset[
i]);
1095 mvar.push_back(gset[
i][0]);
1108static std::vector<int>
fvarsvalue(
int vnum, std::vector<int> fvars)
1111 std::vector<int> fset=fvars;
1112 for(
i=0;
i<fset.size();
i++)
1116 fset.erase(fset.begin()+
i);
1125static std::vector<std::vector<int> >
vAbsorb( std::vector<int> bset,std::vector<std::vector<int> > gset)
1127 std::vector<int> badset=bset;
1128 int i,
j,
m, bl=bset.size(), gl=gset.size();
1134 if(gset[
j][0]==
m && !
IsinL(gset[
j][1],badset))
1136 badset.push_back(gset[
j][1]);
1137 gset.erase(gset.begin()+
j);
1142 else if(!
IsinL(gset[
j][0],badset) && gset[
j][1]==
m)
1144 badset.push_back(gset[
j][0]);
1145 gset.erase(gset.begin()+
j);
1150 else if(
IsinL(gset[
j][0],badset) &&
IsinL(gset[
j][1],badset))
1152 gset.erase(gset.begin()+
j);
1162 if(badset.size()==0) badset.push_back(0);
1163 gset.push_back(badset);
1172 std::vector<int> base;
1188 std::vector<int>
vec;
1201 std::vector<int>
vec;
1211static std::vector<int>
ofindbases1(
int num,
int vnum, std::vector<int> bset,std::vector<std::vector<int> > gset)
1213 std::vector<std::vector<int> > goodset;
1214 std::vector<int> fvars=
freevars(
num, bset, gset), oset, base;
1215 std::vector<int> zset=
fvarsvalue(vnum, fvars);
1217 oset.push_back(vnum);
1219 oset=goodset[goodset.size()-1];
1220 goodset.erase(goodset.end());
1227static std::vector<std::vector<int> >
ofindbases(
int num, std::vector<int> bset,std::vector<std::vector<int> > gset)
1230 std::vector<std::vector<int> > bases;
1231 std::vector<int> fvars=
freevars(
num, bset, gset), base1;
1232 if (fvars.size()==0)
1235 bases.push_back(base1);
1239 for(
i=0;
i<fvars.size();
i++)
1243 bases.push_back(base1);
1254static std::vector<std::vector<int> >
eli2(
int num, std::vector<int> bset,std::vector<std::vector<int> > gset)
1256 std::vector<int> badset;
1257 std::vector<std::vector<int> > goodset,
solve;
1267 int m=goodset.size();
1268 badset=goodset[
m-1];
1269 goodset.erase(goodset.end());
1293static std::vector<std::vector<int> >
links(poly a, ideal
h)
1296 std::vector<std::vector<int> > lk,X=
supports(
h);
1297 std::vector<int> U,In,av=
support1(a);
1298 for(
i=0;
i<X.size();
i++)
1302 if( In.size()==0 &&
vInvsl(U,X))
1341 std::vector<int> as;
1342 std::vector<std::vector<int> > hvs=
supports(
h);
1404static std::vector<int>
vertset(std::vector<std::vector<int> > vecs)
1407 std::vector<int> vert;
1408 std::vector<std::vector<int> > vvs;
1411 for(
j=0;
j<vecs.size();
j++)
1429 std::vector<std::vector<int> > pbv,lk=
links(a,
h),
res;
1430 std::vector<int> vert=
vertset(lk), bv;
1435 for(
i=0;
i<
res.size();
i++)
1438 pbv.push_back(
res[
i]);
1542 ideal h1,mons, id_re=
idInit(1,1);
1561static std::vector<std::vector<int> >
listsinsertlist(std::vector<std::vector<int> > gset,
int a,
int b)
1563 std::vector<int> eq;
1572 std::vector<int> equation;
1573 equation.push_back(
i);
1574 equation.push_back(
j);
1575 equation.push_back(t);
1587 for(
int i=0;
i<3;
i++)
1601static ideal
idMake3(std::vector<std::vector<int> > vecs)
1605 int i,lv=vecs.size();
1629 sprintf (tt[
i],
"t(%d)",
i+1);
1640static std::vector<int>
subspace1(std::vector<std::vector<int> > mv, std::vector<int> bv)
1642 int i,
num=mv.size();
1643 std::vector<int> base;
1657static std::vector<poly>
pMakei(std::vector<std::vector<int> > mv,std::vector<int> vbase)
1660 std::vector<poly> h1;
1662 for(
int i=0;
i<n;
i++)
1671static std::vector<std::vector<poly> >
idMakei(std::vector<std::vector<int> > mv,std::vector<std::vector<int> > vecs)
1673 int i,lv=vecs.size();
1674 std::vector<std::vector<poly> > re;
1675 std::vector<poly>
h;
1735 std::vector<std::vector<int> > suu;
1746 PrintS(
"No element considered!\n");
1751static bool condition1for2(std::vector<int > pv,std::vector<int > qv,std::vector<int > bv)
1764static bool condition2for2(std::vector<std::vector<int> > hvs, std::vector<int> pv, std::vector<int> qv, std::vector<int> sv, std::vector<int> av, std::vector<int> bv)
1777static bool condition3for2(std::vector<std::vector<int> > hvs, std::vector<int> pv, std::vector<int> qv, std::vector<int> av, std::vector<int> bv)
1779 std::vector<int> v1,v2,v3;
1805 WerrorS(
"presolve.lib are not loaded!");
1815 ideal re=(ideal)L->
m[4].
CopyD();
1827 std::vector<int> fvar;
1845 std::vector<std::vector<int> > vecs;
1846 std::vector<int>
vec;
1857 vecs.push_back(
vec);
1865 std::vector<int>
vec;
1866 std::vector<std::vector<int> > vecs;
1873 std::vector<int> fvar=
numfree(h1);
1914 vecs.push_back(
vec);
1927static std::vector<int>
findalpha(std::vector<std::vector<int> > mv, std::vector<int> bv)
1929 std::vector<int> alset;
1930 for(
unsigned i=0;
i<mv.size();
i++)
1944 int i,
j, t, n=ntvs.size();
1945 std::vector<int> subase;
1952 subase.push_back(1);
1956 subase.push_back(-1);
1960 subase.push_back(0);
1969static std::vector<std::vector<int> >
subspacet(std::vector<std::vector<int> > mv, std::vector<int> bv,std::vector<std::vector<int> > ntvs)
1971 std::vector<int> alset=
findalpha(mv,bv), subase;
1972 std::vector<std::vector<int> > subases;
1973 for(
unsigned i=0;
i<alset.size();
i++)
1976 subases.push_back(subase);
1983static std::vector<std::vector<int> >
mabtv(std::vector<std::vector<int> > hvs, std::vector<std::vector<int> > Mv, std::vector<int> av, std::vector<int> bv)
1985 std::vector<int> v1,var;
1986 std::vector<std::vector<int> > vars;
1987 for(
unsigned i=0;
i<Mv.size();
i++)
1989 for(
unsigned j=
i+1;
j<Mv.size();
j++)
1997 vars.push_back(var);
2008 int t0,t1,t2,
i,
j,t,
m;
2011 std::vector<std::vector<int> > hvs=
supports(
h), mv=
Mabv(
h,a,
b), mts, vecs,vars;
2013 mts=
mabtv(hvs,mv,av,bv);
2014 PrintS(
"The homomorphism should map onto:\n");
2019 vars=
mabtv(hvs,mv,av,bv);
2021 for(t0=0;t0<vars.size();t0++)
2032 vecs.push_back(
vec);
2042 vecs.push_back(
vec);
2045 for(t1=t0+1;t1<vars.size();t1++)
2047 for(t2=t1+1;t2<vars.size();t2++)
2049 if(vars[t0][0]==vars[t1][0]&&vars[t1][1]==vars[t2][1]&&vars[t0][1]==vars[t2][0])
2057 vecs.push_back(
vec);
2069 std::vector<std::vector<int> > re=
getvector(id_re,vn);
2070 PrintS(
"this is the solution for ideal :\n");
2073 std::vector<std::vector<int> > sub=
subspacet(mv, bv,vars);
2074 PrintS(
"this is the solution for subspace:\n");
2078 PrintS(
"This is the solution of coefficients:\n");
2084 PrintS(
"No element considered!");
2092static bool nabconditionv(std::vector<std::vector<int> > hvs, std::vector<int> pv, std::vector<int> av, std::vector<int> bv)
2106static std::vector<std::vector<int> >
Nabv(std::vector<std::vector<int> > hvs, std::vector<int> av, std::vector<int> bv)
2108 std::vector<std::vector<int> > vecs;
2115 vecs.push_back(hvs[
i]);
2123static bool nabtconditionv(std::vector<std::vector<int> > hvs, std::vector<int> pv, std::vector<int> qv)
2125 std::vector<int> v1;
2135static std::vector<std::vector<int> >
nabtv(std::vector<std::vector<int> > hvs, std::vector<std::vector<int> > Nv, std::vector<int> av, std::vector<int> bv)
2137 std::vector<int> v1,var;
2138 std::vector<std::vector<int> > vars;
2139 for(
unsigned i=0;
i<Nv.size();
i++)
2141 for(
unsigned j=
i+1;
j<Nv.size();
j++)
2148 vars.push_back(var);
2157static bool tNab(std::vector<std::vector<int> > hvs, std::vector<int> pv, std::vector<std::vector<int> > bvs)
2159 std::vector<int> sv;
2160 if(bvs.size()<=1)
return false;
2161 for(
unsigned i=0;
i<bvs.size();
i++)
2172static std::vector<int>
tnab(std::vector<std::vector<int> > hvs,std::vector<std::vector<int> > nvs,std::vector<std::vector<int> > bvs)
2174 std::vector<int> pv,
vec;
2175 for(
unsigned j=0;
j<nvs.size();
j++)
2178 if(
tNab(hvs, pv, bvs))
2187static std::vector<int>
phimage(std::vector<int> pv, std::vector<int> av, std::vector<int> bv)
2189 std::vector<int> qv=
vecUnion(pv,av);
2196static std::vector<std::vector<int> >
value1(std::vector<std::vector<int> > mvs, std::vector<std::vector<int> > nvs, std::vector<std::vector<int> > vecs,std::vector<int> av, std::vector<int> bv)
2199 std::vector<int> pv, base;
2200 std::vector<std::vector<int> > bases;
2201 for(
unsigned t=0;t<vecs.size();t++)
2203 for(
unsigned i=0;
i<mvs.size();
i++)
2206 for(
j=0;
j<nvs.size();
j++)
2210 base.push_back(vecs[t][
j]);
2219 if(base.size()!=mvs.size())
2222 WerrorS(
"Errors in Equations solving (Values Finding)!");
2227 bases.push_back(base);
2239 int i,
j, a=vecs.size();
2246 int b=vecs[0].size();
2266 std::vector<std::vector<int> > vecs=
supports(ids);
2280 std::vector<std::vector<int> > mv=
Mabv(
h,a,
b);
2294 std::vector<int>
vec,solm;
2295 std::vector<std::vector<int> > solsm;
2299 for(
j=0;
j<
vec.size();
j++)
2302 solm.push_back(
vec[
j]);
2304 solsm.push_back(solm);
2327 tnv=
tnab(hvs,nv,sbv);
2328 for(
i=0;
i<tnv.size();
i++)
2331 bad.push_back(co+1);
2355 std::vector<int> su=
make1(n);
2356 std::vector<std::vector<int> > suu;
2386 std::vector<std::vector<int> >
solve;
2407 Print(
"Finished %d!\n",mm);
2410static bool condition2for2nv(std::vector<std::vector<int> > hvs, std::vector<int> pv, std::vector<int> qv, std::vector<int> fv)
2424static std::vector<int>
findalphan(std::vector<std::vector<int> >
N, std::vector<int> tN)
2426 int i;std::vector<int> alset,
vec;
2427 for(
i=0;
i<
N.size();
i++)
2440static std::vector<std::vector<int> >
subspacetn(std::vector<std::vector<int> >
N, std::vector<int> tN, std::vector<std::vector<int> > ntvs)
2444 std::vector<std::vector<int> > subases;
2445 for(
i=0;
i<alset.size();
i++)
2448 subases.push_back(subase);
2459static std::vector<std::vector<int> >
value2(std::vector<std::vector<int> > mvs, std::vector<std::vector<int> > nvs, std::vector<std::vector<int> > mts, std::vector<std::vector<int> > nts, std::vector<std::vector<int> > vecs,std::vector<int> av, std::vector<int> bv)
2462 std::vector<int> pv,qv, base;
2463 std::vector<std::vector<int> > bases;
2470 for(
unsigned t=0;t<vecs.size();t++)
2472 for(
unsigned i=0;
i<mts.size();
i++)
2482 for(
j=0;
j<nts.size();
j++)
2486 if(
vEvl(pv,nvs[row])&&
vEvl(qv,nvs[col]))
2488 base.push_back(vecs[t][
j]);
break;
2490 else if(
vEvl(pv,nvs[col])&&
vEvl(qv,nvs[row]))
2492 base.push_back(-vecs[t][
j]);
break;
2495 if(
j==nts.size()) {base.push_back(0);}
2498 if(base.size()!=mts.size())
2500 WerrorS(
"Errors in Values Finding(value2)!");
2505 bases.push_back(base);
2513 std::vector<std::vector<int> > hvs=
supports(
h),mv,mts;
2516 mts=
mabtv(hvs,mv,av,bv);
2517 std::vector<std::vector<poly> > pvs=
idMakei(mv,mts);
2519 for(
unsigned i=0;
i<pvs.size();
i++)
2531 std::vector<std::vector<int> > hvs=
supports(
h),nv,mv,mts,sbv,vecs,vars,ntvs,
solve;
2537 tnv=
tnab(hvs,nv,sbv);
2540 mts=
mabtv(hvs,mv,av,bv);
2547 ntvs=
nabtv( hvs, nv, av, bv);
2551 for(
int t0=0;t0<
l;t0++)
2558 vecs.push_back(
vec);
2561 for(
int t1=t0+1;t1<ntvs.size();t1++)
2563 for(
int t2=t1+1;t2<ntvs.size();t2++)
2565 if(ntvs[t0][0]==ntvs[t1][0]&&ntvs[t1][1]==ntvs[t2][1]&&ntvs[t0][1]==ntvs[t2][0])
2573 vecs.push_back(
vec);
2586 std::vector<std::vector<int> > re=
getvector(id_re,
l);
2590 std::vector<std::vector<int> > sub=
subspacetn(nv, tnv,ntvs);
2613 std::vector<int> bv,av;
2614 std::vector<std::vector<int> >
solve;
2626 PrintS(
"This is a set according to current b:\n");
2644 Print(
"There are %d graded pieces in total.\n",
gp);
2649static std::vector<int>
phimagel(std::vector<int> fv, std::vector<int> av, std::vector<int> bv)
2651 std::vector<int> nv;
2659static std::vector<std::vector<int> >
value1l(std::vector<std::vector<int> > mvs, std::vector<std::vector<int> > lks, std::vector<std::vector<int> > vecs,std::vector<int> av, std::vector<int> bv)
2662 std::vector<int> pv;
2663 std::vector<int> base;
2664 std::vector<std::vector<int> > bases;
2665 for(
unsigned t=0;t<vecs.size();t++)
2667 for(
unsigned i=0;
i<mvs.size();
i++)
2670 for(
j=0;
j<lks.size();
j++)
2674 base.push_back(vecs[t][
j]);
break;
2679 if(base.size()!=mvs.size())
2681 WerrorS(
"Errors in Values Finding(value1l)!");
2685 bases.push_back(base);
2697 Print(
"The time of value matching for first order deformation: %.2f sec ;\n", ((
double)
t_value)/CLOCKS_PER_SEC);
2698 Print(
"The total time of fpiece: %.2f sec ;\n", ((
double)
t_total)/CLOCKS_PER_SEC);
2699 Print(
"The time of equations construction for fpiece: %.2f sec ;\n", ((
double)
t_construct)/CLOCKS_PER_SEC);
2700 Print(
"The total time of equations solving for fpiece: %.2f sec ;\n", ((
double)
t_solve)/CLOCKS_PER_SEC);
2701 PrintS(
"__________________________________________________________\n");
2704static std::vector<std::vector<int> >
gpl(ideal
h,poly a,poly
b)
2707 std::vector<std::vector<int> > hvs=
supports(
h),sbv,nv,mv,good,
solve;
2720 tnv=
tnab(hvs,nv,sbv);
2721 for(
i=0;
i<tnv.size();
i++)
2724 bad.push_back(co+1);
2749 std::vector<int> su=
make1(n);
2750 std::vector<std::vector<int> > suu;
2779 nvl=
Nabv(lks,em,bv);
2792static std::vector<std::vector<int> >
value2l(std::vector<std::vector<int> > mvs, std::vector<std::vector<int> > lks, std::vector<std::vector<int> > mts, std::vector<std::vector<int> > lkts, std::vector<std::vector<int> > vecs,std::vector<int> av, std::vector<int> bv)
2794 std::vector<int> pv,qv,base;
2796 std::vector<std::vector<int> > bases;
2801 for(
unsigned t=0;t<vecs.size();t++)
2803 for(
unsigned i=0;
i<mts.size();
i++)
2813 for(
j=0;
j<lkts.size();
j++)
2817 if(
vEvl(pv,lks[row])&&
vEvl(qv,lks[col]))
2819 base.push_back(vecs[t][
j]);
break;
2821 else if(
vEvl(qv,lks[row])&&
vEvl(pv,lks[col]))
2823 base.push_back(-vecs[t][
j]);
break;
2832 if(base.size()!=mts.size())
2834 WerrorS(
"Errors in Values Finding!");
2839 bases.push_back(base);
2845static std::vector<std::vector<int> >
gpl2(ideal
h,poly a,poly
b)
2848 std::vector<std::vector<int> > hvs=
supports(
h),sbv,nv,mv,mts,vecs,vars,ntvs,
solve;
2854 tnv=
tnab(hvs,nv,sbv);
2857 mts=
mabtv(hvs,mv,av,bv);
2860 ntvs=
nabtv( hvs, nv, av, bv);
2864 for(
int t0=0;t0<
l;t0++)
2871 vecs.push_back(
vec);
2874 for(
int t1=t0+1;t1<ntvs.size();t1++)
2876 for(
int t2=t1+1;t2<ntvs.size();t2++)
2878 if(ntvs[t0][0]==ntvs[t1][0]&&ntvs[t1][1]==ntvs[t2][1]&&ntvs[t0][1]==ntvs[t2][0])
2886 vecs.push_back(
vec);
2896 std::vector<std::vector<int> > re=
getvector(id_re,
l);
2898 std::vector<std::vector<int> > sub=
subspacetn(nv, tnv,ntvs);
2918 mts=
mabtv(hvs,mv,av,bv);
2922 nvl=
Nabv(lks,em,bv);
2924 ntsl=
nabtv(lks,nvl,em,bv);
2928 if(
solve.size() > 0)
2973 std::vector<int> pv;
2985static std::vector<std::vector<int> >
triface(poly
p,
int vert)
2988 std::vector<std::vector<int> > fvs0, fvs;
2989 vec.push_back(vert);
2993 for(
unsigned i=0;
i<fvs0.size();
i++)
2996 vec.push_back(vert);
3007 std::vector<std::vector<int> > vecs=
supports(
h),vs,vs0;
3045 for(
unsigned i=0;
i<fv1.size();
i++)
3048 ev.push_back(fv1[
i]);
3072static std::vector<std::vector<int> >
tetraface(poly
p, poly q,
int vert)
3075 std::vector<std::vector<int> > fvs1, fvs2, fvs;
3076 vec.push_back(vert);
3084 for(
unsigned i=0;
i<fvs2.size();
i++)
3087 vec.push_back(vert);
3097 std::vector<std::vector<int> > vecs=
supports(
h), vs1;
3109static std::vector<std::vector<int> >
penface(poly
p, poly q, poly
g,
int vert)
3112 std::vector<int> ev1=
commonedge(
p, q), ev2=
commonedge(
p,
g), ev3=
commonedge(q,
g), ind,
vec, fv1=
support1(
p), fv2=
support1(q), fv3=
support1(
g);
3113 std::vector<std::vector<int> > fvs1, fvs2, fvs3, fvs, evec;
3114 evec.push_back(ev1);
3115 evec.push_back(ev2);
3116 evec.push_back(ev3);
3117 for(
unsigned i=0;
i<evec.size();
i++)
3119 if(evec[
i].
size()==2)
3126 vec.push_back(vert);
3136 for(
unsigned i=0;
i<evec.size();
i++)
3138 if(evec[
i].
size()==2)
3143 for(
unsigned i=0;
i<fvs3.size();
i++)
3146 vec.push_back(vert);
3156 std::vector<std::vector<int> > vecs=
supports(
h), vs1, evec;
3157 evec.push_back(ev1);
3158 evec.push_back(ev2);
3159 evec.push_back(ev3);
3160 for(
unsigned i=0;
i<evec.size();
i++)
3162 if(evec[
i].
size()==2)
3185 for(
unsigned i=0;
i<vecs.size();
i++)
3226static std::vector<std::vector<int> >
vsMinusvs(std::vector<std::vector<int> > vs1, std::vector<std::vector<int> > vs2)
3228 std::vector<std::vector<int> > vs=vs1;
3229 for(
unsigned i=0;
i<vs2.size();
i++)
3236static std::vector<std::vector<int> >
vs_subsets(std::vector<std::vector<int> > vs)
3238 std::vector<std::vector<int> > sset, bv;
3239 for(
unsigned i=0;
i<vs.size();
i++)
3247static std::vector<std::vector<int> >
p_constant(ideal Xo, ideal Sigma)
3255static std::vector<std::vector<int> >
p_change(ideal Sigma)
3262static std::vector<std::vector<int> >
p_new(ideal Xo, ideal Sigma)
3280 fvs=
triface(Sigma->m[0], vert);
3284 fvs=
tetraface(Sigma->m[0], Sigma->m[1], vert);
3288 fvs=
penface(Sigma->m[0], Sigma->m[1], Sigma->m[2], vert);
3296 std::vector<int> ev;
3297 int ednum=vsig.size();
3300 vsig.push_back(
commonedge(sig->m[0], sig->m[1]));
3328static std::vector<std::vector<int> >
phi1(poly a, ideal Sigma)
3332 for(
unsigned i=0;
i<ss.size();
i++)
3335 if(
intvec.size()==av.size())
3344static std::vector<std::vector<int> >
phi2(poly a, ideal Xo, ideal Sigma)
3347 std::vector<std::vector<int> > ss=
p_new(Sigma, Xo), fvs;
3349 for(
unsigned i=0;
i<ss.size();
i++)
3352 if(
intvec.size()==av.size())
3361static std::vector<std::vector<int> >
links_new(poly a, ideal Xo, ideal Sigma,
int vert,
int ord)
3364 std::vector<std::vector<int> > lko, lkn, lk1, lk2;
3371 lk2=
phi2(a, Xo, Sigma);
3378 lkn=
phi2(a, Xo, Sigma);
3381 WerrorS(
"Cannot find the links smartly!");
3391 for(
unsigned i=0;
i<bs.size();
i++)
3406 std::vector<int> vp, iv=
phimagel(
v, v1, v2);
3418static int ifIso(poly
p, poly q, poly
f, poly
g, poly a, poly
b)
3421 std::vector<int> v1=
phimagel(vp, va, vb), v2=
phimagel(vq, va, vb), v3=
phimagel(vf, va, vb), v4=
phimagel(vg, va, vb);
3446static std::vector<int>
v_minus(std::vector<int> v1, std::vector<int> v2)
3448 std::vector<int>
vec;
3449 for(
unsigned i=0;
i<v1.size();
i++)
3451 vec.push_back(v1[
i]-v2[
i]);
3459 std::vector<int> av,bv;
3473static std::vector<std::vector<int> >
star(poly a, ideal
h)
3476 std::vector<std::vector<int> > st,X=
supports(
h);
3478 for(
i=0;
i<X.size();
i++)
3492 std::vector<std::vector<int> > vecs;
3494 vecs.push_back(
vec);
3515 vec_n.push_back(vert);
3516 for(
i=0;
i<lk.size();
i++)
3519 vecs_minus.push_back(
vec);
3520 for(
j=0;
j<bys.size();
j++)
3524 vecs_plus.push_back(
vec);
3535 std::vector<std::vector<int> > bset;
3536 for(
unsigned i=0;
i<bvs.size();
i++)
3538 for(
int j=0;
j!=
i;
j++)
3540 vs.push_back(bvs[
j]);
3553 ideal ai=
p_a(
h), bi;
3605 ideal hh=(ideal)
h->Data();
3617 ideal hh=(ideal)
h->Data();
3630 ideal hh=(ideal)
h->Data();
3642 ideal h1= (ideal)
h->Data();
3646 poly
p= (poly)
h->Data();
3650 poly q= (poly)
h->Data();
3682 poly
p= (poly)
h->Data();
3686 poly q= (poly)
h->Data();
3699 poly
p= (poly)
h->Data();
3703 poly q= (poly)
h->Data();
3716 ideal h1= (ideal)
h->Data();
3728 ideal h1= (ideal)
h->Data();
3740 ideal h1= (ideal)
h->Data();
3752 ideal h1= (ideal)
h->Data();
3756 poly
p= (poly)
h->Data();
3769 ideal h1= (ideal)
h->Data();
3773 poly q= (poly)
h->Data();
3777 int d= (int)(
long)
h->Data();
3791 ideal h1= (ideal)
h->Data();
3795 poly
p= (poly)
h->Data();
3799 poly q= (poly)
h->Data();
3813 ideal h1= (ideal)
h->Data();
3817 poly
p= (poly)
h->Data();
3821 poly q= (poly)
h->Data();
3825 int d= (int)(
long)
h->Data();
3840 ideal h1= (ideal)
h->Data();
3844 poly
p= (poly)
h->Data();
3848 poly q= (poly)
h->Data();
3862 ideal h1= (ideal)
h->Data();
3866 poly
p= (poly)
h->Data();
3870 poly q= (poly)
h->Data();
3884 ideal h1= (ideal)
h->Data();
3888 poly
p= (poly)
h->Data();
3892 poly q= (poly)
h->Data();
3906 poly
p= (poly)
h->Data();
3910 ideal h1= (ideal)
h->Data();
3912 std::vector<std::vector<int> > vecs=
links(
p,h1);
3924 ideal h1= (ideal)
h->Data();
3936 ideal h1= (ideal)
h->Data();
3940 poly
p= (poly)
h->Data();
3944 int d= (int)(
long)
h->Data();
3958 ideal h1= (ideal)
h->Data();
3962 poly
p= (poly)
h->Data();
3966 poly q= (poly)
h->Data();
3970 int d= (int)(
long)
h->Data();
3985 ideal h1= (ideal)
h->Data();
3989 poly
p= (poly)
h->Data();
3993 poly q= (poly)
h->Data();
3997 poly
g= (poly)
h->Data();
4001 int d= (int)(
long)
h->Data();
4015 std::vector<int> bset,bs;
4016 std::vector<std::vector<int> > gset;
4019 int n= (int)(
long)
h->Data();
4023 ideal bi= (ideal)
h->Data();
4027 ideal gi= (ideal)
h->Data();
4032 bset.push_back(bs[0]);
4033 else if(bs.size()==0)
4037 WerrorS(
"Errors in T^1 Equations Solving!");
4045 std::vector<std::vector<int> > vecs=
eli2(n,bset,gset);
4058 ideal h1= (ideal)
h->Data();
4070 ideal h1= (ideal)
h->Data();
4074 poly
p= (poly)
h->Data();
4087 ideal h1= (ideal)
h->Data();
4091 poly
p= (poly)
h->Data();
4095 poly q= (poly)
h->Data();
4097 std::vector<std::vector<int> > vecs=
supports(h1);
4111 ideal h1= (ideal)
h->Data();
4115 poly
p= (poly)
h->Data();
4119 poly q= (poly)
h->Data();
4121 std::vector<std::vector<int> > vecs=
supports(h1), sbv,tnbr;
4123 std::vector<std::vector<int> > nvs=
Nabv(vecs, pv, qv);
4126 std::vector<int> tnv =
tnab(vecs,nvs,sbv);
4127 for(
unsigned i=0;
i<tnv.size();
i++)
4129 tnbr.push_back(nvs[tnv[
i]]);
4143 ideal h1= (ideal)
h->Data();
4147 ideal h2= (ideal)
h->Data();
4161 ideal h1= (ideal)
h->Data();
4165 poly
p= (poly)
h->Data();
4169 poly q= (poly)
h->Data();
4183 ideal h1= (ideal)
h->Data();
4187 poly
p= (poly)
h->Data();
4191 poly q= (poly)
h->Data();
4192 std::vector<std::vector<int> > hvs=
supports(h1), nv, ntvs;
4195 ntvs=
nabtv( hvs, nv, av, bv);
4196 std::vector<std::vector<poly> > pvs=
idMakei(nv,ntvs);
4198 for(
unsigned i=0;
i<pvs.size();
i++)
4217 poly a= (poly)
h->Data();
4221 ideal Xo= (ideal)
h->Data();
4225 ideal Sigma= (ideal)
h->Data();
4229 int vert= (int)(
long)
h->Data();
4233 int ord= (int)(
long)
h->Data();
4249 poly
p= (poly)
h->Data();
4253 ideal h1= (ideal)
h->Data();
4266 ideal h1= (ideal)
h->Data();
4270 ideal h2= (ideal)
h->Data();
4283 ideal h1= (ideal)
h->Data();
4295 ideal h1= (ideal)
h->Data();
4299 ideal h2= (ideal)
h->Data();
4312 poly
p= (poly)
h->Data();
4324 poly
p= (poly)
h->Data();
4336 ideal h1= (ideal)
h->Data();
4340 poly
p= (poly)
h->Data();
4353 ideal h1= (ideal)
h->Data();
4357 poly
p= (poly)
h->Data();
4358 std::vector<std::vector<int> > st=
star(
p, h1);
4359 std::vector<std::vector<int> > hvs=
supports(h1);
4360 std::vector<std::vector<int> > re=
vsMinusvs(hvs, st);
4373 ideal h1= (ideal)
h->Data();
4377 ideal h2= (ideal)
h->Data();
4390 poly
p= (poly)
h->Data();
4394 ideal h1= (ideal)
h->Data();
4407 ideal h2= (ideal)
h->Data();
4411 poly
p= (poly)
h->Data();
4424 ideal h1= (ideal)
h->Data();
4428 ideal h2= (ideal)
h->Data();
4441 ideal h1= (ideal)
h->Data();
4445 ideal h2= (ideal)
h->Data();
4458 poly
p= (poly)
h->Data();
4462 ideal h1= (ideal)
h->Data();
4466 poly a= (poly)
h->Data();
4470 poly
b= (poly)
h->Data();
4485 poly
p= (poly)
h->Data();
4489 poly q= (poly)
h->Data();
4493 poly
f= (poly)
h->Data();
4497 poly
g= (poly)
h->Data();
4501 poly a= (poly)
h->Data();
4505 poly
b= (poly)
h->Data();
4522 poly
p= (poly)
h->Data();
4526 int num= (int)(
long)
h->Data();
4539 ideal h1= (ideal)
h->Data();
4551 ideal h1= (ideal)
h->Data();
4563 ideal h1= (ideal)
h->Data();
4567 int num= (int)(
long)
h->Data();
4581 p->iiAddCproc(
"",
"findbset",
FALSE,
fb);
4582 p->iiAddCproc(
"",
"findaset",
FALSE,
fa);
const CanonicalForm CFMap CFMap & N
bool solve(int **extmat, int nrows, int ncols)
Class used for (list of) interpreter objects.
Coefficient rings, fields and other domains suitable for Singular polynomials.
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 coeffs nCopyCoeff(const coeffs r)
"copy" coeffs, i.e. increment ref
static BOOLEAN fa(leftv res, leftv args)
static std::vector< int > vecbase1(int num, std::vector< int > oset)
static BOOLEAN pa(leftv res, leftv args)
static BOOLEAN tsets(leftv res, leftv args)
static ideal T_1h(ideal h)
static std::vector< int > fvarsvalue(int vnum, std::vector< int > fvars)
static std::vector< int > commonedge(poly p, poly q)
static std::vector< int > v_minus(std::vector< int > v1, std::vector< int > v2)
static bool IsinL(int a, std::vector< int > vec)
static BOOLEAN tnabvl(leftv res, leftv args)
BOOLEAN nfaces1(leftv res, leftv args)
static std::vector< int > subspace1(std::vector< std::vector< int > > mv, std::vector< int > bv)
static std::vector< int > tnab(std::vector< std::vector< int > > hvs, std::vector< std::vector< int > > nvs, std::vector< std::vector< int > > bvs)
static BOOLEAN cNew(leftv res, leftv args)
static std::vector< std::vector< int > > listsinsertlist(std::vector< std::vector< int > > gset, int a, int b)
static std::vector< std::vector< int > > vsMinusvs(std::vector< std::vector< int > > vs1, std::vector< std::vector< int > > vs2)
static BOOLEAN comedg(leftv res, leftv args)
static poly pMaken(std::vector< int > vbase)
static std::vector< std::vector< int > > value1l(std::vector< std::vector< int > > mvs, std::vector< std::vector< int > > lks, std::vector< std::vector< int > > vecs, std::vector< int > av, std::vector< int > bv)
static BOOLEAN idModulo(leftv res, leftv args)
static ideal idMaken(std::vector< std::vector< int > > vecs)
static std::vector< int > vecIntersection(std::vector< int > p, std::vector< int > q)
static std::vector< std::vector< int > > penface(poly p, poly q, poly g, int vert)
static ideal idMake(std::vector< std::vector< int > > vecs)
static std::vector< std::vector< int > > vsMinusv(std::vector< std::vector< int > > vecs, std::vector< int > vec)
static intvec * gradedpiece1n(ideal h, poly a, poly b)
static std::vector< std::vector< int > > value2l(std::vector< std::vector< int > > mvs, std::vector< std::vector< int > > lks, std::vector< std::vector< int > > mts, std::vector< std::vector< int > > lkts, std::vector< std::vector< int > > vecs, std::vector< int > av, std::vector< int > bv)
static BOOLEAN isoNumber(leftv res, leftv args)
static BOOLEAN makeSimplex(leftv res, leftv args)
static bool vInvsl(std::vector< int > vec, std::vector< std::vector< int > > vecs)
static std::vector< std::vector< int > > mabtv(std::vector< std::vector< int > > hvs, std::vector< std::vector< int > > Mv, std::vector< int > av, std::vector< int > bv)
static BOOLEAN fgp(leftv res, leftv args)
static bool tNab(std::vector< std::vector< int > > hvs, std::vector< int > pv, std::vector< std::vector< int > > bvs)
static int valency(ideal h, poly p)
static bool condition3for2(std::vector< std::vector< int > > hvs, std::vector< int > pv, std::vector< int > qv, std::vector< int > av, std::vector< int > bv)
static void lpsprint(std::vector< std::vector< poly > > pvs)
static std::vector< std::vector< int > > value2(std::vector< std::vector< int > > mvs, std::vector< std::vector< int > > nvs, std::vector< std::vector< int > > mts, std::vector< std::vector< int > > nts, std::vector< std::vector< int > > vecs, std::vector< int > av, std::vector< int > bv)
static std::vector< int > phimagel(std::vector< int > fv, std::vector< int > av, std::vector< int > bv)
static BOOLEAN stars(leftv res, leftv args)
static std::vector< int > keeporder(std::vector< int > vec)
static std::vector< std::vector< int > > p_new(ideal Xo, ideal Sigma)
static BOOLEAN newDegree(leftv res, leftv args)
static bool condition2for2(std::vector< std::vector< int > > hvs, std::vector< int > pv, std::vector< int > qv, std::vector< int > sv, std::vector< int > av, std::vector< int > bv)
static std::vector< std::vector< int > > Nabv(std::vector< std::vector< int > > hvs, std::vector< int > av, std::vector< int > bv)
static ideal trisets(ideal h)
static int idvert(ideal h)
static void firstorderdef_setup(SModulFunctions *p)
static ideal SimFacset(poly p)
static std::vector< std::vector< int > > links_new(poly a, ideal Xo, ideal Sigma, int vert, int ord)
static std::vector< std::vector< poly > > idMakei(std::vector< std::vector< int > > mv, std::vector< std::vector< int > > vecs)
static ideal psubset(poly p)
static BOOLEAN bprime(leftv res, leftv args)
static void listprint(std::vector< int > vec)
static BOOLEAN pConstant(leftv res, leftv args)
static bool vInp(int m, poly p)
static BOOLEAN dimsim(leftv res, leftv args)
static std::vector< std::vector< int > > ofindbases(int num, std::vector< int > bset, std::vector< std::vector< int > > gset)
static BOOLEAN fgpl(leftv res, leftv args)
static bool p_Ifsfree(poly P)
static int redefinedeg(poly p, int num)
static intvec * edgemat(poly p, poly q)
static BOOLEAN psMinusp(leftv res, leftv args)
static bool nabtconditionv(std::vector< std::vector< int > > hvs, std::vector< int > pv, std::vector< int > qv)
static BOOLEAN SRideal(leftv res, leftv args)
static std::vector< std::vector< int > > phi1(poly a, ideal Sigma)
static bool condition2for2nv(std::vector< std::vector< int > > hvs, std::vector< int > pv, std::vector< int > qv, std::vector< int > fv)
static std::vector< int > freevars(int n, std::vector< int > bset, std::vector< std::vector< int > > gset)
static BOOLEAN stellarsubdivision(leftv res, leftv args)
static BOOLEAN idcomplement(leftv res, leftv args)
static std::vector< std::vector< int > > phi2(poly a, ideal Xo, ideal Sigma)
static int isoNum(poly p, ideal I, poly a, poly b)
static bool condition1for2(std::vector< int > pv, std::vector< int > qv, std::vector< int > bv)
static BOOLEAN isSim(leftv res, leftv args)
static ideal IsSimplex(ideal h)
static BOOLEAN gd(leftv res, leftv args)
static std::vector< std::vector< int > > vsUnion(std::vector< std::vector< int > > vs1, std::vector< std::vector< int > > vs2)
static BOOLEAN nabvl(leftv res, leftv args)
static BOOLEAN fb(leftv res, leftv args)
static ideal idmodulo(ideal h1, ideal h2)
static ideal idadda(ideal h1, ideal h2)
static intvec * gradedpiece2n(ideal h, poly a, poly b)
static ideal idMake3(std::vector< std::vector< int > > vecs)
static ideal complementsimplex(ideal h)
static ideal c_New(ideal Io, ideal sig)
static std::vector< int > make1(int n)
static ideal qringadd(ideal h1, ideal h2, int deg)
static BOOLEAN eqsolve1(leftv res, leftv args)
static std::vector< std::vector< int > > vAbsorb(std::vector< int > bset, std::vector< std::vector< int > > gset)
static ideal finda(ideal h, poly S, int ddeg)
static std::vector< std::vector< int > > soleli1(std::vector< std::vector< int > > eqs)
static std::vector< int > vMake(poly p)
static std::vector< int > subspacet1(int num, std::vector< std::vector< int > > ntvs)
static std::vector< std::vector< int > > vsMake(ideal h)
static BOOLEAN numdim(leftv res, leftv args)
static bool vEvl(std::vector< int > vec1, std::vector< int > vec2)
static BOOLEAN vsIntersec(leftv res, leftv args)
static BOOLEAN support(leftv res, leftv args)
static void id_print(ideal h)
static std::vector< std::vector< int > > bsubsets_1(poly b)
static BOOLEAN genstt(leftv res, leftv args)
static void TimeShow(clock_t t_construct, clock_t t_solve, clock_t t_value, clock_t t_total)
static intvec * dmat(poly a, poly b)
static BOOLEAN nonf2f(leftv res, leftv args)
static std::vector< std::vector< int > > stellarsub(poly a, ideal h)
static void equmab(int num)
static BOOLEAN sgpl(leftv res, leftv args)
static std::vector< int > support1(poly p)
static bool nabconditionv(std::vector< std::vector< int > > hvs, std::vector< int > pv, std::vector< int > av, std::vector< int > bv)
static std::vector< int > support2(poly p)
static std::vector< std::vector< int > > p_change(ideal Sigma)
static std::vector< std::vector< int > > vecqring(std::vector< std::vector< int > > vec1, std::vector< std::vector< int > > vec2)
static std::vector< int > gdegree(poly a, poly b)
static ideal id_sfmon(ideal h)
static ideal triangulations1(ideal h, poly p, int vert)
static int id_maxdeg(ideal h)
static std::vector< int > vertset(std::vector< std::vector< int > > vecs)
static ideal id_complement(ideal h)
static ideal p_a(ideal h)
static std::vector< std::vector< int > > tetraface(poly p, poly q, int vert)
static std::vector< std::vector< int > > eli2(int num, std::vector< int > bset, std::vector< std::vector< int > > gset)
static ideal triangulations3(ideal h, poly p, poly q, poly g, int vert)
static std::vector< std::vector< int > > vs_subsets(std::vector< std::vector< int > > vs)
static std::vector< int > vecUnion(std::vector< int > vec1, std::vector< int > vec2)
static BOOLEAN sgp(leftv res, leftv args)
static intvec * Tmat(std::vector< std::vector< int > > vecs)
static std::vector< std::vector< int > > canonicalbase(int n)
static BOOLEAN idsr(leftv res, leftv args)
static std::vector< std::vector< int > > minisolve(std::vector< std::vector< int > > solve, std::vector< int > index)
static ideal genst(ideal h, poly a, poly b)
static BOOLEAN linkn(leftv res, leftv args)
static std::vector< int > vecMinus(std::vector< int > vec1, std::vector< int > vec2)
static std::vector< std::vector< int > > Mabv(ideal h, poly a, poly b)
static std::vector< int > gensindex(ideal M, ideal ids)
static BOOLEAN Valency(leftv res, leftv args)
static std::vector< int > makeequation(int i, int j, int t)
static bool mabconditionv(std::vector< std::vector< int > > hvs, std::vector< int > pv, std::vector< int > av, std::vector< int > bv)
static std::vector< std::vector< int > > boundary(poly a)
static ideal idMinus(ideal h1, ideal h2)
int SI_MOD_INIT() cohomo(SModulFunctions *p)
static int dim_sim(ideal h)
static std::vector< std::vector< int > > star(poly a, ideal h)
static std::vector< int > findalpha(std::vector< std::vector< int > > mv, std::vector< int > bv)
static BOOLEAN stellarremain(leftv res, leftv args)
static void lpprint(std::vector< poly > pv)
static ideal getpresolve(ideal h)
static BOOLEAN nabtvl(leftv res, leftv args)
static std::vector< int > make0(int n)
static std::vector< std::vector< int > > subspacetn(std::vector< std::vector< int > > N, std::vector< int > tN, std::vector< std::vector< int > > ntvs)
static int pcoef(poly p, int m)
static ideal triangulations2(ideal h, poly p, poly q, int vert)
static std::vector< std::vector< int > > getvector(ideal h, int n)
static std::vector< std::vector< int > > gpl(ideal h, poly a, poly b)
static BOOLEAN nfaces3(leftv res, leftv args)
static std::vector< std::vector< int > > nabtv(std::vector< std::vector< int > > hvs, std::vector< std::vector< int > > Nv, std::vector< int > av, std::vector< int > bv)
static void gradedpiece1(ideal h, poly a, poly b)
static BOOLEAN p_New(leftv res, leftv args)
static BOOLEAN Links(leftv res, leftv args)
static poly pMake(std::vector< int > vbase)
static BOOLEAN nfaces2(leftv res, leftv args)
static std::vector< std::vector< int > > value1(std::vector< std::vector< int > > mvs, std::vector< std::vector< int > > nvs, std::vector< std::vector< int > > vecs, std::vector< int > av, std::vector< int > bv)
static bool IsInX(poly p, ideal X)
static intvec * gradedpiece1nl(ideal h, poly a, poly b, int set)
static std::vector< std::vector< int > > links(poly a, ideal h)
static std::vector< std::vector< int > > supports(ideal h)
static BOOLEAN pb(leftv res, leftv args)
static std::vector< int > ofindbases1(int num, int vnum, std::vector< int > bset, std::vector< std::vector< int > > gset)
static std::vector< std::vector< int > > vsIntersection(std::vector< std::vector< int > > vs1, std::vector< std::vector< int > > vs2)
static ideal sfreemon(ideal h, int deg)
static int existIn(poly b, ideal Xs)
static std::vector< std::vector< int > > supports2(ideal h)
static BOOLEAN pChange(leftv res, leftv args)
static std::vector< std::vector< int > > gpl2(ideal h, poly a, poly b)
static std::vector< int > numfree(ideal h)
static std::vector< int > eli1(std::vector< int > eq1, std::vector< int > eq2)
static ideal idsrRing(ideal h)
static ideal idMinusp(ideal I, poly p)
static std::vector< std::vector< int > > triface(poly p, int vert)
static BOOLEAN idminus(leftv res, leftv args)
static ideal p_b(ideal h, poly a)
static void listsprint(std::vector< std::vector< int > > posMat)
static BOOLEAN mabvl(leftv res, leftv args)
static int num4dim(ideal h, int n)
static std::vector< int > findalphan(std::vector< std::vector< int > > N, std::vector< int > tN)
static BOOLEAN ifIsomorphism(leftv res, leftv args)
static int ifIso(poly p, poly q, poly f, poly g, poly a, poly b)
static void gradedpiece2(ideal h, poly a, poly b)
static intvec * gradedpiece2nl(ideal h, poly a, poly b)
static std::vector< std::vector< int > > b_subsets(std::vector< int > vec)
static std::vector< std::vector< int > > p_constant(ideal Xo, ideal Sigma)
static BOOLEAN existsub(leftv res, leftv args)
static ideal mingens(ideal h, poly a, poly b)
static std::vector< int > phimage(std::vector< int > pv, std::vector< int > av, std::vector< int > bv)
static bool vsubset(std::vector< int > vec1, std::vector< int > vec2)
static ideal findb(ideal h)
static BOOLEAN t1h(leftv res, leftv args)
static std::vector< poly > pMakei(std::vector< std::vector< int > > mv, std::vector< int > vbase)
static std::vector< std::vector< int > > subspacet(std::vector< std::vector< int > > mv, std::vector< int > bv, std::vector< std::vector< int > > ntvs)
static poly pMake3(std::vector< int > vbase)
const CanonicalForm int s
const Variable & v
< [in] a sqrfree bivariate poly
static int max(int a, int b)
void WerrorS(const char *s)
ideal scKBase(int deg, ideal s, ideal Q, intvec *mv)
BOOLEAN idInsertPoly(ideal h1, poly h2)
insert h2 into h1 (if h2 is not the zero polynomial) return TRUE iff h2 was indeed inserted
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
ideal idAdd(ideal h1, ideal h2)
h1 + h2
#define IMATELEM(M, I, J)
idhdl ggetid(const char *n)
idhdl enterid(const char *s, int lev, int t, idhdl *root, BOOLEAN init, BOOLEAN search)
BOOLEAN iiMake_proc(idhdl pn, package pack, leftv args)
INST_VAR sleftv iiRETURNEXPR
poly kNF(ideal F, ideal Q, poly p, int syzComp, int lazyReduce)
ideal kStd(ideal F, ideal Q, tHomog h, intvec **w, intvec *hilb, int syzComp, int newIdeal, intvec *vw, s_poly_proc_t sp)
void rem(unsigned long *a, unsigned long *q, unsigned long p, int °a, int degq)
static number & pGetCoeff(poly p)
return an alias to the leading coefficient of p assumes that p != NULL NOTE: not copy
The main handler for Singular numbers which are suitable for Singular polynomials.
static int index(p_Length length, p_Ord ord)
poly p_Subst(poly p, int n, poly e, const ring r)
BOOLEAN p_EqualPolys(poly p1, poly p2, const ring r)
static poly pp_Mult_mm(poly p, poly m, 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 BOOLEAN p_DivisibleBy(poly a, poly b, const ring r)
void rChangeCurrRing(ring r)
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
static long pTotaldegree(poly p)
#define pSetCoeff(p, n)
deletes old coeff before setting the new one
#define pGetExp(p, i)
Exponent.
#define pEqualPolys(p1, p2)
#define pCopy(p)
return a copy of the poly
void PrintS(const char *s)
ring rDefault(const coeffs cf, int N, char **n, int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl, unsigned long bitmask)
static short rVar(const ring r)
#define rVar(r) (r->N)
ideal id_Add(ideal h1, ideal h2, const ring r)
h1 + h2
ideal idInit(int idsize, int rank)
initialise an ideal / module
ideal id_MaxIdeal(const ring r)
initialise the maximal ideal (at 0)
void idSkipZeroes(ideal ide)
gives an ideal/module the minimal possible size