=================================================================== RCS file: /home/cvs/OpenXM/src/k097/lib/minimal/minimal.k,v retrieving revision 1.7 retrieving revision 1.10 diff -u -p -r1.7 -r1.10 --- OpenXM/src/k097/lib/minimal/minimal.k 2000/05/06 10:35:33 1.7 +++ OpenXM/src/k097/lib/minimal/minimal.k 2000/05/07 02:10:44 1.10 @@ -1,4 +1,4 @@ -/* $OpenXM: OpenXM/src/k097/lib/minimal/minimal.k,v 1.6 2000/05/06 07:58:37 takayama Exp $ */ +/* $OpenXM: OpenXM/src/k097/lib/minimal/minimal.k,v 1.9 2000/05/06 13:41:12 takayama Exp $ */ #define DEBUG 1 /* #define ORDINARY 1 */ /* If you run this program on openxm version 1.1.2 (FreeBSD), @@ -1044,12 +1044,25 @@ def Sannfs2(f) { Sweyl("x,y",[["x",1,"y",1,"Dx",1,"Dy",1,"h",1], ["x",-1,"y",-1,"Dx",1,"Dy",1]]); */ /* Sweyl("x,y",[["x",1,"y",1,"Dx",1,"Dy",1,"h",1]]); */ + Sweyl("x,y",[["x",-1,"y",-1,"Dx",1,"Dy",1]]); pp = Map(p,"Spoly"); return(Sminimal_v(pp)); /* return(Sminimal(pp)); */ } +HelpAdd(["Sannfs2", +["Sannfs2(f) constructs the V-minimal free resolution for the weight (-1,1)", + "of the Laplace transform of the annihilating ideal of the polynomial f in x,y.", + "See also Sminimal_v, Sannfs3.", + "Example: a=Sannfs2(\"x^3-y^2\");", + " b=a[0]; sm1_pmat(b);", + " b[1]*b[0]:", + "Example: a=Sannfs2(\"x*y*(x-y)*(x+y)\");", + " b=a[0]; sm1_pmat(b);", + " b[1]*b[0]:" +]]); + /* Do not forget to turn on TOTAL_STRATEGY */ def Sannfs2_laScala(f) { local p,pp; @@ -1072,6 +1085,14 @@ def Sannfs3(f) { return(Sminimal_v(pp)); } +HelpAdd(["Sannfs3", +["Sannfs3(f) constructs the V-minimal free resolution for the weight (-1,1)", + "of the Laplace transform of the annihilating ideal of the polynomial f in x,y,z.", + "See also Sminimal_v, Sannfs2.", + "Example: a=Sannfs3(\"x^3-y^2*z^2\");", + " b=a[0]; sm1_pmat(b);", + " b[1]*b[0]: b[2]*b[1]:"]]); + /* The betti numbers of most examples are 2,1. (0-th and 1-th). a=Sannfs2("x*y*(x+y-1)"); ==> The betti numbers are 3, 2. @@ -1153,11 +1174,12 @@ def Sschreyer(g) { /* i must be equal to f[2], I think. Double check. */ /* Correction Of Constant */ + /* Correction of syzygy */ c2 = f[6]; /* or -f[6]? Double check. */ Print("c2="); Println(c2); nn = Length(bases); for (ii=0; ii=0; ii--) { if (!IsNull(reducerBase[ii])) { for (jj=ii-1; jj>=0; jj--) { if (!IsNull(reducerBase[jj])) { if (!IsZero(reducerBase[jj,ii])) { - reducerBase[jj] = reducerBase[jj]-reducerBase[jj,ii]*reducerBase[ii]; + /* reducerBase[ii,ii] should be always constant. */ + reducerBase[jj] = reducerBase[ii,ii]*reducerBase[jj]-reducerBase[jj,ii]*reducerBase[ii]; } } } @@ -1321,10 +1362,23 @@ def SpairAndReduction2(skel,level,ii,freeRes,tower,ww, return(ans); } +HelpAdd(["Sminimal_v", +["It constructs the V-minimal free resolution from the Schreyer resolution", + "step by step.", + "Example: Sweyl(\"x,y\",[[\"x\",-1,\"y\",-1,\"Dx\",1,\"Dy\",1]]);", + " v=[[2*x*Dx + 3*y*Dy+6, 0],", + " [3*x^2*Dy + 2*y*Dx, 0],", + " [0, x^2+y^2],", + " [0, x*y]];", + " a=Sminimal_v(v);", + " sm1_pmat(a[0]); b=a[0]; b[1]*b[0]:", + "Note: a[0] is the V-minimal resolution. a[3] is the Schreyer resolution."]]); + + def Sminimal_v(g) { local r, freeRes, redundantTable, reducer, maxLevel, minRes, seq, maxSeq, level, betti, q, bases, dr, - betti_levelplus, newbases, i, j,qq; + betti_levelplus, newbases, i, j,qq,tminRes; r = Sschreyer(g); sm1_pmat(r); Debug_Sminimal_v = r; @@ -1348,14 +1402,15 @@ def Sminimal_v(g) { if (level < maxLevel-1) { bases = freeRes[level+1]; dr = reducer[level,q]; - dr[q] = -1; + /* dr[q] = -1; We do not need this in our reducer format. */ + /* dr[q] should be a non-zero constant. */ newbases = SnewArrayOfFormat(bases); betti_levelplus = Length(bases); /* bases[i,j] ---> bases[i,j]+bases[i,q]*dr[j] */ for (i=0; i