Loading CoCoA packages from directory: /usr/local/cocoa-5.1/packages ______ ______ ___ ______ / ____/___ / ____/___ / | / ____/ / / / __ `/ / / __ `/ /| |______/___ ` / /___/ /_/ / /___/ /_/ / ___ /_____/___/ / `____/`____/`____/`____/_/ |_| /_____/ With CoCoALib and external libraries FROBBY READLINE indent(VersionInfo()); -- for information about this version # indent(VersionInfo()); record[ CoCoALibVersion := "0.99539", CoCoAVersion := "5.1.3", CompilationDate := "18 Feb 2016 at 09:13:03", CompilationDefines := "-DCoCoA_ULONG2LONG=1 -DCoCoA_WITH_BOOST -DCoCoA_WITH_FROBBY -DCoCoA_WITH_READLINE ", CompilationFlags := "-Wall -pedantic -fPIC -m64 -mtune=core2 -march=core2 -O2", Compiler := "g++", MachineIntNumBits := 32, MachineLongNumBits := 64 ] # // [CLO, pag. 90] # use R ::= QQ[x,y], DegLex; # f1 := x^3 - 2*x*y; # f2 := x^2*y - 2*y^2 + x; # I := ideal(f1,f2); # G := GBasis(I); # G; [x^2, -2*y^2 +x, -x*y] # ReducedGBasis(I); [y^2 +(-1/2)*x, x*y, x^2] # Define spoly(f,g); Define # xgamma := lcm(LT(f),LT(g)); Define # Return (xgamma/LM(f))*f - (xgamma/LM(g))*g; Define # EndDefine # LT(f2); x^2*y # LM(f2); x^2*y # LM(f1); x^3 # LM(3*x); 3*x # LT(3*x); x # spoly(f1,f2); -x^2 # // resto dell'algoritmo di divisione: NR # f3 = NR(spoly(f1,f2),[f1,f2]); --> ERROR: Cannot find a variable named "f3" in scope. Similarly named variables (that you might need to import) are: "f1", "f2" --> f3 = NR(spoly(f1,f2),[f1,f2]); --> ^^ # f3 := NR(spoly(f1,f2),[f1,f2]); # f3; -x^2 # f4 := NR(spoly(f1,f3),[f1,f2,f3]); f4; -2*x*y # f5 := NR(spoly(f1,f4),[f1,f2,f3,f4]); f5; 0 # f5 := NR(spoly(f2,f3),[f1,f2,f3,f4]); f5; -2*y^2 +x # // Verifichiamo che [f1,f2,f3,f4,f5] e' base di Groebner: # NR(spoly(f1,f2),[f1,f2,f3,f4,f5]); 0 # NR(spoly(f1,f3),[f1,f2,f3,f4,f5]); 0 # NR(spoly(f1,f4),[f1,f2,f3,f4,f5]); 0 # NR(spoly(f1,f5),[f1,f2,f3,f4,f5]); 0 # NR(spoly(f2,f3),[f1,f2,f3,f4,f5]); 0 # NR(spoly(f2,f4),[f1,f2,f3,f4,f5]); 0 # NR(spoly(f2,f5),[f1,f2,f3,f4,f5]); 0 # NR(spoly(f3,f4),[f1,f2,f3,f4,f5]); 0 # NR(spoly(f3,f5),[f1,f2,f3,f4,f5]); 0 # NR(spoly(f4,f5),[f1,f2,f3,f4,f5]); 0 # // Sfida: consultare il manuale e scrivere un ciclo per # // verificare l'annullamento di tutti i resti della divisone # // degli S-polinomi S(f_i,f_j) per [f1,f2,f3,f4,f5]. # ciao; Bye.