[BACK]Return to exp-dmod CVS log [TXT][DIR] Up to [local] / OpenXM / src / asir-contrib / packages / sample

Annotation of OpenXM/src/asir-contrib/packages/sample/exp-dmod, Revision 1.1.1.1

1.1       takayama    1: /* $OpenXM: OpenXM/src/asir99/lib/contrib/packages/sample/exp-dmod,v 1.1 1999/11/10 12:01:02 takayama Exp $ */
                      2: /* exp-dmod,  1999/ 9/27 */
                      3: /* From 1999/Int/exp.asir */
                      4: /*  Computing exponents of holonomic system along f=0 */
                      5:
                      6: /* In order to use #define in k0, use load["exp.asir"] */
                      7: print("load xm , sm1_start, init0 for initialization. extest2();");
                      8: def init0() {
                      9:   extern Xm_noX;
                     10:   sm1(0,"[(parse) (oxasir.sm1) pushfile] extension");
                     11:   if (Xm_noX == 1) {
                     12:     sm1(0," oxNoX ");
                     13:   }
                     14:   sm1(0,"[(parse) (intw.sm1) pushfile] extension");
                     15:   ox_check_errors2(0);
                     16: }
                     17:
                     18: def sm1reset() {
                     19:   ox_reset(0);
                     20:   print("Restoring sm1 local variables.")$
                     21:   sm1(0," db.restore ");
                     22:   ox_check_errors2(0);
                     23: }
                     24: register_handler(sm1reset);
                     25:
                     26: def extest2() {
                     27:   F = x;
                     28:   A = [t-F, dx+diff(F,x)*dt, dy+diff(F,y)*dt];
                     29:   EEE = ["dx (2 x dx + 3) - (x dx + y dy + 10) (2 x dx -6)",
                     30:          "dy (y dy - 8) - (x dx + y dy + 10) (y dy +2)","dt"];
                     31:   EEE2 = ["dx (x dx-4) - (x dx + y dy + 10) ( x dx -6)",
                     32:           "dy (y dy - 8) - (x dx + y dy + 10) (y dy +2)","dt"];
                     33:   B=sm1_wTensor0(0,[A,EEE,
                     34:                      "t,x,y",[1,2,3]]);
                     35:   print(["Tensor Product is ", B])$
                     36:   G = sm1_wbf(0,[B,[t,x,y],[t,-1,dt,1]]);
                     37:   return(G);
                     38:
                     39: }
                     40:
                     41: def extest3() {
                     42:   print("This example seems to be hard!");
                     43:   F = x*s-y*z;
                     44:   A = [t-F, dx+diff(F,x)*dt, dy+diff(F,y)*dt,
                     45:             dz+diff(F,z)*dt, ds+diff(F,s)*dt];
                     46:   EEE = [x*dx+y*dy+z*dz+s*ds-2/3,
                     47:               y*dy     +s*ds+1/5,
                     48:                    z*dz+s*dx-3/2,
                     49:          dx*ds-dy*dz,
                     50:          dt];
                     51:   EEE = sm1_rat_to_p(EEE); EEE = EEE[0];
                     52:   print(["Numerator: ",EEE]);
                     53:   B=sm1_wTensor0(0,[A,EEE,
                     54:                      "t,x,y,z,s",[1,2,3,4,5]]);
                     55:   print(["Tensor Product is ", B])$
                     56:   G = sm1_wbf(0,[B,[t,x,y,z,s],[t,-1,dt,1]]);
                     57:   return(G);
                     58:
                     59: }
                     60:
                     61: def extest4() {
                     62:   F = 1-x-y;
                     63:   A = [t-F, dx+diff(F,x)*dt, dy+diff(F,y)*dt];
                     64:   EEE = ["dx (2 x dx + 3) - (x dx + y dy + 10) (2 x dx -6)",
                     65:          "dy (y dy - 8) - (x dx + y dy + 10) (y dy +2)","dt"];
                     66:   B=sm1_wTensor0(0,[A,EEE,
                     67:                      "t,x,y",[1,2,3]]);
                     68:   print(["Tensor Product is ", B])$
                     69:   G = sm1_wbf(0,[B,[t,x,y],[t,-1,dt,1]]);
                     70:   return(G);
                     71:   /* 0 and -27/2 */
                     72: }
                     73:
                     74: def extest4a() {
                     75:    A = 10; B = -3; Bp = -2; C=5/2;Cp=-7;
                     76:    print([Cp-A-Bp+C-B,Cp-A-Bp]);
                     77: }
                     78: def nody(F) {
                     79:   if (deg(F,dy) == 0) return(F);
                     80:   else return(0);
                     81: }
                     82:
                     83: def extest4b() {
                     84:   EEE = ["dx (2 x dx + 3) - (x dx + y dy + 10) (2 x dx -6)",
                     85:          "dy (y dy - 8) - (x dx + y dy + 10) (y dy +2)"];
                     86:   G = sm1_gb(0,[EEE,"x,y",[[dy,1]]]);
                     87:   G = G[0];
                     88:   print(["GB is ",G]);
                     89:   H = map(nody,G);
                     90:   H = map(subst,H,y,2);
                     91:   J = sm1_gb(0,[H,"x"]);
                     92:   print(["GB of ode is ",J]);
                     93:   K = map(subst,J[0],x,x-1);
                     94:   G = sm1_wbf(0,[K,[x],[x,-1,dx,1]]);
                     95:   return(G);
                     96: }
                     97:
                     98: def extest5() {
                     99:   EEE = ["dx (x dx + 3) - (x dx + y dy + 10) (x dx +y dy -6)",
                    100:          "dy (y dy - 8) - (x dx + y dy + 10) (x dx + y dy -6)"];
                    101: /* Compute the singular locus
                    102:   G = sm1_ch(0,[EEE,[x,y]]);
                    103:   G = G[0];
                    104:   print(["characteristic variety is ",G]);
                    105:   H = sm1_saturation(0,[G,[dx,dy],[x,y,dx,dy]]);
                    106:   return(gr(H,[dx,dy,x,y],2));
                    107: */
                    108:   EEE = sm1_mul(0,1,EEE,[x,y]);
                    109:   F = -x^2+(2*y+2)*x-y^2+2*y-1;
                    110:   A = [t-F, dx+diff(F,x)*dt, dy+diff(F,y)*dt];
                    111:   B=sm1_wTensor0(0,[A,EEE,
                    112:                      "t,x,y",[3,2,1]]);
                    113:   print(["Tensor Product is ", B])$
                    114:   G = sm1_wbf(0,[B,[t,x,y],[t,-1,dt,1]]);
                    115:   return(G);
                    116: }
                    117:
                    118: end$
                    119:

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