[BACK]Return to demo.k CVS log [TXT][DIR] Up to [local] / OpenXM / src / k097 / lib / restriction

Annotation of OpenXM/src/k097/lib/restriction/demo.k, Revision 1.1

1.1     ! takayama    1: /* $OpenXM$  */
        !             2:
        !             3: load["restriction.k"];;
        !             4: load("../ox/ox.k");;
        !             5:
        !             6: def demoSendAsirCommand(a) {
        !             7:   a.executeString("load(\"bfct\");");
        !             8:   a.executeString(" def myann(F) { B=ann(eval_str(F)); print(B); return(map(dp_ptod,B,[hoge,x,y,z,s,hh,ee,dx,dy,dz,ds,dhh])); }; ");
        !             9:   a.executeString(" def mybfct(F) { return(rtostr(bfct(eval_str(F)))); }; ");
        !            10: }
        !            11:
        !            12: as = startAsir();
        !            13: asssssir = as;
        !            14: demoSendAsirCommand(as);
        !            15: RingD("x,y,z,s");
        !            16:
        !            17: def asirBfunction(a,f) {
        !            18:   local p,b;
        !            19:   p = ToString(f);
        !            20:   Println(p);
        !            21:   b = a.rpc("mybfct",[p]);
        !            22:   sm1(" b . /b set ");
        !            23:   return(b);
        !            24: }
        !            25:
        !            26: def asirAnnfsXYZ(a,f) {
        !            27:   local p,b;
        !            28:   RingD("x,y,z,s");  /* Fix!! See the definition of myann() */
        !            29:   p = ToString(f);
        !            30:   b = a.rpc("myann",[p]);
        !            31:   return(b);
        !            32: }
        !            33:
        !            34: def findMinSol(f) {
        !            35:   sm1(" f (string) dc findIntegralRoots 0 get (universalNumber) dc /FunctionValue set ");
        !            36: }
        !            37:
        !            38: def asirAnnXYZ(a,f) {
        !            39:   local p,b,b0,k1;
        !            40:   RingD("x,y,z,s");  /* Fix!! See the definition of myann() */
        !            41:   p = ToString(f);
        !            42:   b = a.rpc("myann",[p]);
        !            43:   Print("Annhilating ideal with s is "); Println(b);
        !            44:   b0 = asirBfunction(a,f);
        !            45:   Print("bfunction is "); Println(b0);
        !            46:   k1 = findMinSol(b0);
        !            47:   Print("Minimal integral root is "); Println(k1);
        !            48:   sm1(" b { [[(s). k1 (string) dc .]] replace } map /b set ");
        !            49:   return(b);
        !            50: }
        !            51:
        !            52: def nonquasi2(p,q) {
        !            53:   local s,ans,f;
        !            54:   f = x^p+y^q+x*y^(q-1);
        !            55:   Print("f=");Println(f);
        !            56:   s = ToString(f);
        !            57:   sm1(" Onverbose ");
        !            58:   ans = asirAnnfsXYZ(asssssir,f);
        !            59:   sm1(" ans 0 get (ring) dc ring_def ");
        !            60:   sm1("[ ans { [[(s). (-1).]] replace } map ] /II set ");
        !            61:   Println("Step 1: Annhilating ideal (II)"); Println(II);
        !            62:   sm1(" II 0 get { [(x) (y) (Dx) (Dy) ] laplace0 } map /II set ");
        !            63:   Sweyl("x,y",[["x",-1,"y",-1,"Dx",1,"Dy",1]]);
        !            64:   pp = Map(II,"Spoly");
        !            65:   Res = Sminimal(pp);
        !            66:   Res0 = Res[0];
        !            67:   Println("Step2: (-1,1)-minimal resolution (Res0) "); sm1_pmat(Res0);
        !            68:   R = BfRoots1(Res0[0],"x,y");
        !            69:   Println("Step3: computing the cohomology of the truncated complex.");
        !            70:   Print("Roots and b-function are "); Println(R);
        !            71:   R0 = R[0];
        !            72:   Ans=Srestall(Res0, ["x", "y"],  ["x", "y"], R0[Length(R0)-1]);
        !            73:   Print("Answer is "); Println(Ans[0]);
        !            74:   return(Ans);
        !            75: }

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