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

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

1.1     ! takayama    1: /* load["lib/all.k"];;
        !             2: */
        !             3: /* $OpenXM$
        !             4:    The original was in misc-2007/11/logc2/logc2.kk
        !             5:    It is put under the cvs repository of openxm.org
        !             6: */
        !             7:
        !             8: def Syz0(f) {
        !             9:   local ans;
        !            10:   sm1(" f syz /ans set ");
        !            11:   return(ans);
        !            12: }
        !            13: HelpAdd(["Syz0",
        !            14: ["Syz0 calls syz (sm1).",
        !            15:  "Example: Syz0([[\"z^2-1\",\"z-1\"], \"z\"]); "
        !            16: ]]);
        !            17:
        !            18: def Syz0_xy(f) {
        !            19:   local ans;
        !            20:   sm1(" [(x,y) ring_of_differential_operators 0] define_ring f { . homogenize} map message ");
        !            21:   return( [1,1,1] );
        !            22: }
        !            23:
        !            24: /* Some test functions */
        !            25: def logc2_pq(p,q) {
        !            26:   local f,ans;
        !            27:   RingD("x,y");
        !            28:   f = x^p+y^q+x*y^(q-1);
        !            29:   ans = Logc2(f);
        !            30:   return(ans);
        !            31: }
        !            32:
        !            33: /* cf. mail from Paco in Jan, 2007
        !            34:    logc2_pqab(4,7,1,1);
        !            35:    logc2_pqab(4,7,2,3); --> need minimal syzygy
        !            36: */
        !            37: def logc2_pqab(p,q,a,b) {
        !            38:   local f,ans;
        !            39:   RingD("x,y");
        !            40:   f = (x^p+y^q+x*y^(q-1))*(x^a-y^b);
        !            41:   ans = Logc2(f);
        !            42:   return(ans);
        !            43: }
        !            44:
        !            45: HelpAdd(["Logc2",
        !            46: ["Logc2(f) [f a polynomial in x and y] computes dimensions",
        !            47:  "of the logarithmic cohomology groups.",
        !            48:  "load[\"lib/all.k\"];; is required to use it.",
        !            49:  "See Castro, Takayama: The Computation of the Logarithmic Cohomology for Plane Curves.",
        !            50:  "Example: Logc2(\"x*y*(x-y)\"): "
        !            51: ]]);
        !            52: def Logc2(f) {
        !            53:   local s,ans,f,II,sss,pp,fx,fy;
        !            54:
        !            55:   sm1("0 set_timer "); sm1(" oxNoX ");
        !            56:   asssssir.OnTimer();
        !            57:
        !            58:   RingD("x,y");
        !            59:   /* f = x^p+y^q+x*y^(q-1); */
        !            60:   f = ReParse(f);
        !            61:   Print("f=");Println(f);
        !            62:   fx = Dx*f; fx = Replace(fx,[[Dx,Poly("0")],[h,Poly("1")]]);
        !            63:   fy = Dy*f; fy = Replace(fy,[[Dy,Poly("0")],[h,Poly("1")]]);
        !            64:
        !            65:   pp = [f,fx,fy];
        !            66:   Println(pp);
        !            67:   sss = Syz0([pp]);
        !            68:   sss = sss[0];
        !            69:   Println(sss);
        !            70:   if (Length(sss) != 2) Error("You need to use a function for Quillen-Suslin Theorem.");
        !            71:
        !            72:   p1 = -sss[0,0]+sss[0,1]*Dx+sss[0,2]*Dy;
        !            73:   p2 = -sss[1,0]+sss[1,1]*Dx+sss[1,2]*Dy;
        !            74:   SSS=sss;
        !            75:   Println([p1,p2]);
        !            76:   sm1(" [p1,p2] { [(x) (y) (Dx) (Dy) ] laplace0 } map /II set ");
        !            77:
        !            78:   Sweyl("x,y",[["x",-1,"y",-1,"Dx",1,"Dy",1]]);
        !            79:   pp = Map(II,"ReParse");
        !            80:   Res = Sminimal(pp);
        !            81:   Res0 = Res[0];
        !            82:   Println("Step1: minimal resolution (Res0) "); sm1_pmat(Res0);
        !            83:
        !            84:   R = asir_BfRoots2(Res0[0]);
        !            85:   Println("Step2: computing the cohomology of the truncated complex.");
        !            86:   Print("Roots and b-function are "); Println(R);
        !            87:   R0 = R[0];
        !            88:   Ans=Srestall(Res0, ["x", "y"],  ["x", "y"], R0[Length(R0)-1]);
        !            89:
        !            90:   Println("Timing data: sm1 "); sm1(" 1 set_timer ");
        !            91:   Print("     ox_asir [CPU,GC]:  ");Println(asssssir.OffTimer());
        !            92:
        !            93:   Print("Answer is "); Println(Ans[0]);
        !            94:   return(Ans);
        !            95:
        !            96: }
        !            97:

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