[BACK]Return to minimal-test.k CVS log [TXT][DIR] Up to [local] / OpenXM / src / k097 / lib / minimal

Annotation of OpenXM/src/k097/lib/minimal/minimal-test.k, Revision 1.2

1.2     ! takayama    1: /* $OpenXM: OpenXM/src/k097/lib/minimal/minimal-test.k,v 1.1 2000/05/24 15:31:28 takayama Exp $ */
1.1       takayama    2: load["minimal.k"];
                      3: def test5() {
                      4:   local a,b,c,cc,v;
                      5:   a = Sannfs3_laScala2("x^3-y^2*z^2");
                      6:   b = a[0];
                      7:   v = [x,y,z];
                      8:   c = Skernel(b[0],v);
                      9:   c = c[0];
                     10:   sm1_pmat([c,b[1],v]);
                     11:   Println("-----------------------------------");
                     12:   cc = sm1_res_div(c,b[1],v);
                     13:   sm1_pmat(sm1_gb(cc,v));
                     14:   c = Skernel(b[1],v);
                     15:   c = c[0];
                     16:   cc = sm1_res_div(c,b[2],v);
                     17:   sm1_pmat(sm1_gb(cc,v));
                     18:   return(a);
                     19: }
                     20: def test6() {
                     21:   local a,b,c,cc,v;
                     22:   a = Sannfs3("x^3-y^2*z^2");
                     23:   b = a[0];
                     24:   v = [x,y,z];
                     25:   c = Skernel(b[0],v);
                     26:   c = c[0];
                     27:   sm1_pmat([c,b[1],v]);
                     28:   Println("-------ker = im for minimal ?---------------------");
                     29:   cc = sm1_res_div(c,b[1],v);
                     30:   sm1_pmat(sm1_gb(cc,v));
                     31:   c = Skernel(b[1],v);
                     32:   c = c[0];
                     33:   cc = sm1_res_div(c,b[2],v);
                     34:   sm1_pmat(sm1_gb(cc,v));
                     35:   Println("------ ker=im for Schreyer ?------------------");
                     36:   b = a[3];
                     37:   c = Skernel(b[0],v);
                     38:   c = c[0];
                     39:   sm1_pmat([c,b[1],v]);
                     40:   cc = sm1_res_div(c,b[1],v);
                     41:   sm1_pmat(sm1_gb(cc,v));
                     42:   c = Skernel(b[1],v);
                     43:   c = c[0];
                     44:   cc = sm1_res_div(c,b[2],v);
                     45:   sm1_pmat(sm1_gb(cc,v));
                     46:   return(a);
                     47: }
                     48:
                     49: /* May 23, Tue */
                     50: def test7() {
                     51:   local a,b,c,cc,v;
                     52:   a = Sannfs3_laScala2("x^3-y^2*z^2");
                     53:   b = a[0];
                     54:   v = [x,y,z];
                     55:   c = Skernel(b[0],v);
                     56:   c = c[0];
                     57:   sm1_pmat([c,b[1],v]);
                     58:   Println("-------ker = im for minimal ?---------------------");
                     59:   cc = sm1_res_div(c,b[1],v);
                     60:   sm1_pmat(sm1_gb(cc,v));
                     61:   c = Skernel(b[1],v);
                     62:   c = c[0];
                     63:   cc = sm1_res_div(c,b[2],v);
                     64:   sm1_pmat(sm1_gb(cc,v));
                     65:   Println("------ ker=im for Schreyer ?------------------");
                     66:   b = a[3];
                     67:   c = Skernel(b[0],v);
                     68:   c = c[0];
                     69:   sm1_pmat([c,b[1],v]);
                     70:   cc = sm1_res_div(c,b[1],v);
                     71:   sm1_pmat(sm1_gb(cc,v));
                     72:   c = Skernel(b[1],v);
                     73:   c = c[0];
                     74:   cc = sm1_res_div(c,b[2],v);
                     75:   sm1_pmat(sm1_gb(cc,v));
                     76:   return(a);
                     77: }
                     78:
                     79: def sm1_resol1(p) {
                     80:   sm1(" p resol1 /FunctionValue set ");
                     81: }
                     82:
                     83:
                     84: def test8() {
                     85:   local p,pp,ans,b,c,cc,ww,ww2;
                     86:   f = "x^3-y^2*z^2";
                     87:   p = Sannfs(f,"x,y,z");
                     88:   ww = [["x",1,"y",1,"z",1,"Dx",1,"Dy",1,"Dz",1,"h",1],
                     89:                  ["x",-1,"y",-1,"z",-1,"Dx",1,"Dy",1,"Dz",1]];
                     90:   ww2 = [["x",-1,"y",-1,"z",-1,"Dx",1,"Dy",1,"Dz",1]];
                     91:   sm1(" p 0 get { [(x) (y) (z) (Dx) (Dy) (Dz)] laplace0 } map /p set ");
                     92:   Sweyl("x,y,z",ww);
                     93:   pp = Map(p,"Spoly");
                     94:   /* return(pp); */
                     95:   /* pp =
                     96:      [y*Dy-z*Dz , -2*x*Dx-3*y*Dy+1 , 2*x*Dy*Dz^2-3*y*Dx^2 ,
                     97:       2*x*Dy^2*Dz-3*z*Dx^2 , 2*x*z*Dz^3-3*y^2*Dx^2+4*x*Dz^2 ]
                     98:   */
                     99:   ans = sm1_resol1([pp,"x,y,z",ww]);
                    100:   /* Schreyer is in ans. */
                    101:
                    102:   v = [x,y,z];
                    103:   b = ans;
                    104:   Println("------ ker=im for Schreyer ?------------------");
                    105:   c = Skernel(b[0],v);
                    106:   c = c[0];
                    107:   sm1_pmat([c,b[1],v]);
                    108:   cc = sm1_res_div(c,b[1],v);
                    109:   sm1_pmat(sm1_gb(cc,v));
                    110:   c = Skernel(b[1],v);
                    111:   c = c[0];
                    112:   cc = sm1_res_div(c,b[2],v);
                    113:   sm1_pmat(sm1_gb(cc,v));
                    114:   return(ans);
                    115: }
                    116: /*
                    117:    a = test8();
                    118:    SisComplex(a):
                    119: */
                    120:
                    121: def test8a() {
                    122:   local p,pp,ans,b,c,cc,ww, ans_all;
                    123:   f = "x^3-y^2*z^2";
                    124:   p = Sannfs(f,"x,y,z");
                    125:   sm1(" p 0 get { [(x) (y) (z) (Dx) (Dy) (Dz)] laplace0 } map /p set ");
                    126:   ww = [["x",-1,"y",-1,"z",-1,"Dx",1,"Dy",1,"Dz",1]];
                    127:   /* Removed "x",1, ... ===> It causes an error. I do not know the reason.*/
                    128:   Sweyl("x,y,z",ww);
                    129:   pp = Map(p,"Spoly");
                    130:   /* return(pp); */
                    131:   /* pp =
                    132:      [y*Dy-z*Dz , -2*x*Dx-3*y*Dy+1 , 2*x*Dy*Dz^2-3*y*Dx^2 ,
                    133:       2*x*Dy^2*Dz-3*z*Dx^2 , 2*x*z*Dz^3-3*y^2*Dx^2+4*x*Dz^2 ]
                    134:   */
                    135:   ans_all = Sschreyer(pp);
                    136:   ans = ans_all[0];
                    137:   /* ans = sm1_resol1([pp,"x,y,z",ww]); */
                    138:   /* Schreyer is in ans. */
                    139:
                    140:   v = [x,y,z];
                    141:   b = ans;
                    142:   Println("------ ker=im for Schreyer ?------------------");
                    143:   c = Skernel(b[0],v);
                    144:   c = c[0];
                    145:   sm1_pmat([c,b[1],v]);
                    146:   cc = sm1_res_div(c,b[1],v);
                    147:   sm1_pmat(sm1_gb(cc,v));
                    148:   c = Skernel(b[1],v);
                    149:   c = c[0];
                    150:   cc = sm1_res_div(c,b[2],v);
                    151:   sm1_pmat(sm1_gb(cc,v));
                    152:   return(ans);
                    153: }
                    154:
                    155: /* Comparing two constructions */
                    156: def test9() {
                    157:   local p,pp,ans,b,c,cc,ww,ww2,ans_all,ans2;
                    158:   f = "x^3-y^2*z^2";
                    159:   p = Sannfs(f,"x,y,z");
                    160:   ww2 = [["x",-1,"y",-1,"z",-1,"Dx",1,"Dy",1,"Dz",1]];
                    161:   sm1(" p 0 get { [(x) (y) (z) (Dx) (Dy) (Dz)] laplace0 } map /p set ");
                    162:   Sweyl("x,y,z",ww2);
                    163:   pp = Map(p,"Spoly");
                    164:   ans = sm1_resol1([pp,"x,y,z",ww2]);
                    165:
                    166:   f = "x^3-y^2*z^2";
                    167:   p = Sannfs(f,"x,y,z");
                    168:   sm1(" p 0 get { [(x) (y) (z) (Dx) (Dy) (Dz)] laplace0 } map /p set ");
                    169:   ww = [["x",-1,"y",-1,"z",-1,"Dx",1,"Dy",1,"Dz",1]];
                    170:   Sweyl("x,y,z",ww);
                    171:   pp = Map(p,"Spoly");
                    172:   ans_all = Sschreyer(pp);
                    173:   ans2 = ans_all[0];
                    174:
                    175:   return([ans,ans2]);
1.2     ! takayama  176:
        !           177: }
        !           178:
        !           179: /* Check if the complex is exact or not? */
        !           180: def test10() {
        !           181:   local p,pp,ans,b,c,cc,ww,ww2,ans_all,ans2, r;
        !           182:   f = "x^3-y^2*z^2";
        !           183:   p = Sannfs(f,"x,y,z");
        !           184:   ww2 = [["x",-1,"y",-1,"z",-1,"Dx",1,"Dy",1,"Dz",1]];
        !           185:   sm1(" p 0 get { [(x) (y) (z) (Dx) (Dy) (Dz)] laplace0 } map /p set ");
        !           186:   Sweyl("x,y,z",ww2);
        !           187:   pp = Map(p,"Spoly");
        !           188:   ans = sm1_resol1([pp,"x,y,z",ww2]);
        !           189:
        !           190:   f = "x^3-y^2*z^2";
        !           191:   p = Sannfs(f,"x,y,z");
        !           192:   sm1(" p 0 get { [(x) (y) (z) (Dx) (Dy) (Dz)] laplace0 } map /p set ");
        !           193:   ww = [["x",-1,"y",-1,"z",-1,"Dx",1,"Dy",1,"Dz",1]];
        !           194:   Sweyl("x,y,z",ww);
        !           195:   pp = Map(p,"Spoly");
        !           196:   ans_all = Sschreyer(pp);  /* Schreyer by LaScala-Stillman */
        !           197:   ans2 = ans_all[0];
        !           198:
        !           199:   r= SisExact_h(ans2,[x,y,z]);
        !           200:   Print(r);
        !           201:
        !           202:   return([r,[ans,ans2]]);
1.1       takayama  203:
                    204: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>