=================================================================== RCS file: /home/cvs/OpenXM/src/asir-contrib/packages/doc/Attic/sm1.oxweave,v retrieving revision 1.7 retrieving revision 1.11 diff -u -p -r1.7 -r1.11 --- OpenXM/src/asir-contrib/packages/doc/Attic/sm1.oxweave 2003/05/04 08:37:40 1.7 +++ OpenXM/src/asir-contrib/packages/doc/Attic/sm1.oxweave 2003/07/27 13:18:46 1.11 @@ -1,10 +1,11 @@ -/*$OpenXM: OpenXM/src/asir-contrib/packages/doc/sm1.oxweave,v 1.6 2002/08/23 08:16:13 takayama Exp $ */ +/*$OpenXM: OpenXM/src/asir-contrib/packages/doc/sm1.oxweave,v 1.10 2003/05/20 23:25:28 takayama Exp $ */ /*&C-texi @c DO NOT EDIT THIS FILE oxphc.texi */ /*&C-texi @node SM1 Functions,,, Top + */ /*&jp-texi @chapter SM1 $BH!?t(B @@ -72,7 +73,7 @@ cohomology groups. @include opening.texi -[283] sm1_deRham([x*(x-1),[x]]); +[283] sm1.deRham([x*(x-1),[x]]); [1,2] @end example */ @@ -86,29 +87,35 @@ Grobner Deformations of Hypergeometric Differential Eq See the appendix. */ -/* +/*&C-texi @menu * ox_sm1_forAsir:: -* sm1_start:: -* sm1:: -* sm1_push_int0:: -* sm1_gb:: -* sm1_deRham:: -* sm1_hilbert:: -* hilbert_polynomial:: -* sm1_genericAnn:: -* sm1_wTensor0:: -* sm1_reduction:: -* sm1_xml_tree_to_prefix_string:: -* sm1_syz:: -* sm1_mul:: -* sm1_distraction:: -* sm1_gkz:: -* sm1_appell1:: -* sm1_appell4:: -* sm1_rank:: -* sm1_auto_reduce:: -* sm1_slope:: +* sm1.start:: +* sm1.sm1:: +* sm1.push_int0:: +* sm1.gb:: +* sm1.deRham:: +* sm1.hilbert:: +* sm1.genericAnn:: +* sm1.wTensor0:: +* sm1.reduction:: +* sm1.xml_tree_to_prefix_string:: +* sm1.syz:: +* sm1.mul:: +* sm1.distraction:: +* sm1.gkz:: +* sm1.appell1:: +* sm1.appell4:: +* sm1.rank:: +* sm1.auto_reduce:: +* sm1.slope:: +* sm1.gb_d:: +* sm1.syz_d:: +* sm1.ahg:: +* sm1.bfunction:: +* sm1.generalized_bfunction:: +* sm1.restriction:: +* sm1.saturation:: @end menu */ @@ -120,7 +127,7 @@ See the appendix. */ /*&eg-texi -@node ox_sm1_forAsir,,, Top +@node ox_sm1_forAsir,,, SM1 Functions @subsection @code{ox_sm1_forAsir} @findex ox_sm1_forAsir @table @t @@ -130,7 +137,7 @@ See the appendix. @itemize @bullet @item @code{ox_sm1_forAsir} is the @code{sm1} server started from asir - by the command @code{sm1_start}. + by the command @code{sm1.start}. In the standard setting, @* @code{ox_sm1_forAsir} = @file{$(OpenXM_HOME)/lib/sm1/bin/ox_sm1} @@ -151,7 +158,7 @@ to build your own server by reading @code{sm1} macros. @end itemize */ /*&jp-texi -@node ox_sm1_forAsir,,, Top +@node ox_sm1_forAsir,,, SM1 Functions @subsection @code{ox_sm1_forAsir} @findex ox_sm1_forAsir @table @t @@ -161,7 +168,7 @@ to build your own server by reading @code{sm1} macros. @itemize @bullet @item $B%5!<%P(B @code{ox_sm1_forAsir} $B$O(B @code{asir} $B$h$j%3%^%s%I(B - @code{sm1_start} $B$G5/F0$5$l$k(B @code{sm1} $B%5!<%P$G$"$k(B. + @code{sm1.start} $B$G5/F0$5$l$k(B @code{sm1} $B%5!<%P$G$"$k(B. $BI8=`E*@_Dj$G$O(B, @* @code{ox_sm1_forAsir} = @@ -183,20 +190,6 @@ to build your own server by reading @code{sm1} macros. @end itemize */ -def sm1_check_server(P) { - M=ox_get_serverinfo(P); - if (M == []) { - return(sm1_start()); - } - if (M[0][1] != "Ox_system=ox_sm1_ox_sm1_forAsir") { - print("Warning: the server number ",0)$ - print(P,0)$ - print(" is not ox_sm1_forAsir server.")$ - print("Starting ox_sm1_forAsir server on the localhost.")$ - return(sm1_start()); - } - return(P); -} /*&jp-texi @section $BH!?t0lMw(B @@ -206,12 +199,12 @@ def sm1_check_server(P) { */ /*&eg-texi -@c sort-sm1_start -@node sm1_start,,, SM1 Functions -@subsection @code{sm1_start} -@findex sm1_start +@c sort-sm1.start +@node sm1.start,,, SM1 Functions +@subsection @code{sm1.start} +@findex sm1.start @table @t -@item sm1_start() +@item sm1.start() :: Start @code{ox_sm1_forAsir} on the localhost. @end table @@ -242,16 +235,18 @@ for computation in @code{sm1}. and @code{x0}, ..., @code{x20}, @code{y0}, ..., @code{y20}, @code{z0}, ..., @code{z20} can be used as variables for ring of differential operators in default. (cf. @code{Sm1_ord_list} in @code{sm1}). -@item The descriptor is stored in @code{Sm1_proc}. +@item The descriptor is stored in @code{static Sm1_proc}. +The descriptor can be obtained by the function +@code{sm1.get_Sm1_proc()}. @end itemize */ /*&jp-texi -@c sort-sm1_start -@node sm1_start,,, SM1 Functions -@subsection @code{sm1_start} -@findex sm1_start +@c sort-sm1.start +@node sm1.start,,, SM1 Functions +@subsection @code{sm1.start} +@findex sm1.start @table @t -@item sm1_start() +@item sm1.start() :: localhost $B$G(B @code{ox_sm1_forAsir} $B$r%9%?!<%H$9$k(B. @end table @@ -282,7 +277,8 @@ differential operators in default. (cf. @code{Sm1_ord_ $B$=$l$+$i(B, @code{x0}, ..., @code{x20}, @code{y0}, ..., @code{y20}, @code{z0}, ..., @code{z20} $B$O(B, $B%G%U%)!<%k%H$GHyJ,:nMQAG4D$NJQ?t$H$7$F(B $B;H$($k(B (cf. @code{Sm1_ord_list} in @code{sm1}). -@item $B<1JLHV9f$O(B @code{Sm1_proc} $B$K3JG<$5$l$k(B. +@item $B<1JLHV9f$O(B @code{static Sm1_proc} $B$K3JG<$5$l$k(B. +$B$3$N<1JLHV9f$O4X?t(B @code{sm1.get_Sm1_proc()} $B$G$H$j$@$9$3$H$,$G$-$k(B. @end itemize */ /*&C-texi @@ -295,64 +291,36 @@ differential operators in default. (cf. @code{Sm1_ord_ a*da [262] cc*dcc; dcc*cc -[263] sm1_mul(da,a,[a]); +[263] sm1.mul(da,a,[a]); a*da+1 -[264] sm1_mul(a,da,[a]); +[264] sm1.mul(a,da,[a]); a*da @end example */ /*&eg-texi @table @t @item Reference - @code{ox_launch}, @code{sm1_push_int0}, @code{sm1_push_poly0}, + @code{ox_launch}, @code{sm1.push_int0}, @code{sm1.push_poly0}, @code{ord} @end table */ /*&jp-texi @table @t @item $B;2>H(B - @code{ox_launch}, @code{sm1_push_int0}, @code{sm1_push_poly0}, + @code{ox_launch}, @code{sm1.push_int0}, @code{sm1.push_poly0}, @code{ord} @end table */ -def sm1_start() { - extern Sm1_lib; - extern Xm_noX; - extern Sm1_proc; - if (Xm_noX) { - P = ox_launch_nox(0,Sm1_lib+"/bin/ox_sm1_forAsir"); - }else{ - P = ox_launch(0,Sm1_lib+"/bin/ox_sm1_forAsir"); - } - if (Xm_noX) { - sm1(P," oxNoX "); - } - ox_check_errors(P); - Sm1_proc = P; - return(P); -} - -/* ox_sm1 */ -/* P is the process number */ -def sm1flush(P) { - ox_execute_string(P,"[(flush)] extension pop"); -} - -def sm1push(P,F) { - G = ox_ptod(F); - ox_push_cmo(P,G); -} - /*&eg-texi @c sort-sm1 -@node sm1,,, SM1 Functions -@subsection @code{sm1} -@findex sm1 +@node sm1.sm1,,, SM1 Functions +@subsection @code{sm1.sm1} +@findex sm1.sm1 @table @t -@item sm1(@var{p},@var{s}) +@item sm1.sm1(@var{p},@var{s}) :: ask the @code{sm1} server to execute the command string @var{s}. @end table @@ -368,14 +336,15 @@ String @itemize @bullet @item It asks the @code{sm1} server of the descriptor number @var{p} to execute the command string @var{s}. +(In the next example, the descriptor number is 0.) @end itemize */ /*&jp-texi -@node sm1,,, SM1 Functions -@subsection @code{sm1} -@findex sm1 +@node sm1.sm1,,, SM1 Functions +@subsection @code{sm1.sm1} +@findex sm1.sm1 @table @t -@item sm1(@var{p},@var{s}) +@item sm1.sm1(@var{p},@var{s}) :: $B%5!<%P(B @code{sm1} $B$K%3%^%s%INs(B @var{s} $B$rH(B - @code{sm1_start}, @code{ox_push_int0}, @code{sm1_push_poly0}, @code{Sm1_proc}. + @code{sm1.start}, @code{ox_push_int0}, @code{sm1.push_poly0}, @code{sm1.get_Sm1_proc()}. @end table */ /*&eg-texi @table @t @item Reference - @code{sm1_start}, @code{ox_push_int0}, @code{sm1_push_poly0}, @code{Sm1_proc}. + @code{sm1.start}, @code{ox_push_int0}, @code{sm1.push_poly0}, @code{sm1.get_Sm1_proc()}. @end table */ -def sm1pop(P) { - return(ox_pop_cmo(P)); -} -def sm1_to_asir_form(V) { return(toAsirForm(V)); } -def toAsirForm(V) { - extern ToAsirForm_V; /* for debug */ - if (type(V) == 4) { /* list */ - if((length(V) == 3) && (V[0] == "sm1_dp")) { - /* For debugging. */ - if (ToAsir_Debug != 0) { - ToAsirForm_V = V; - print(map(type,V[1])); - print(V); - } - /* */ - Vlist = map(strtov,V[1]); - return(dp_dtop(V[2],Vlist)); - } else { - return(map(toAsirForm,V)); - } - }else{ - return(V); - } -} - -def sm1_toOrdered(V) { - if (type(V) == 4) { /* list */ - if((length(V) == 3) && (V[0] == "sm1_dp")) { - Vlist = map(strtov,V[1]); - Ans = ""; - F = V[2]; - while (F != 0) { - G = dp_hm(F); - F = dp_rest(F); - if (dp_hc(G)>0) { - Ans += "+"; - } - Ans += rtostr(dp_dtop(G,Vlist)); - } - return Ans; - } else { - return(map(sm1_toOrdered,V)); - } - }else{ - return(V); - } -} - - -def sm1_push_poly0_R(A,P,Vlist) { - return(sm1_push_poly0(P,A,Vlist)); -} -def sm1_push_poly0(P,A,Vlist) { - if (type(Vlist[0]) == 4) { - Vlist = Vlist[2]; - } - /* if Vlist=[[e,x,y,H,E,Dx,Dy,h],[e,x,y,hH,eE,dx,dy,h],[e,x,y,hH,eE,dx,dy,h]] - list of str (sm1) list of str (asir) list of var (asir) - then we execute the code above. - */ - if (type(A) == 2 || type(A) == 1) { /* recursive poly or number*/ - A = dp_ptod(A,Vlist); - ox_push_cmo(P,A); - return; - } - if (type(A) == 0) { /* zero */ - sm1(P," (0). "); - return; - } - if (type(A) == 4) { /* list */ - ox_execute_string(P," [ "); - map(sm1_push_poly0_R,A,P,Vlist); - ox_execute_string(P," ] "); - return; - } - ox_push_cmo(P,A); - ox_check_errors2(P); - return; -} -/* sm1_push_poly0(0,[0,1,x+y,["Hello",y^3]],[x,y]); */ - -def sm1_pop_poly0(P,Vlist) { - if (type(Vlist[0]) == 4) { - Vlist = Vlist[2]; - } - A = ox_pop_cmo(P); - return(sm1_pop_poly0_0(P,A,Vlist)); -} -def sm1_pop_poly0_0_R(A,P,Vlist) { - return(sm1_pop_poly0_0(P,A,Vlist)); -} -def sm1_pop_poly0_0(P,A,Vlist) { - if (type(A) == 4) { - return(map(sm1_pop_poly0_0_R,A,P,Vlist)); - } - if (type(A)== 9) {return(dp_dtop(A,Vlist));} - return(A); -} - -def sm1_push_int0_R(A,P) { - return(sm1_push_int0(P,A)); -} - /*&eg-texi -@c sort-sm1_push_int0 -@node sm1_push_int0,,, SM1 Functions -@subsection @code{sm1_push_int0} -@findex sm1_push_int0 +@c sort-sm1.push_int0 +@node sm1.push_int0,,, SM1 Functions +@subsection @code{sm1.push_int0} +@findex sm1.push_int0 @table @t -@item sm1_push_int0(@var{p},@var{f}) +@item sm1.push_int0(@var{p},@var{f}) :: push the object @var{f} to the server with the descriptor number @var{p}. @end table @@ -565,12 +429,12 @@ Note that @code{ox_push_cmo(@var{p},1234)} send the bi @end itemize */ /*&jp-texi -@c sort-sm1_push_int0 -@node sm1_push_int0,,, SM1 Functions -@subsection @code{sm1_push_int0} -@findex sm1_push_int0 +@c sort-sm1.push_int0 +@node sm1.push_int0,,, SM1 Functions +@subsection @code{sm1.push_int0} +@findex sm1.push_int0 @table @t -@item sm1_push_int0(@var{p},@var{f}) +@item sm1.push_int0(@var{p},@var{f}) :: $B%*%V%8%'%/%H(B @var{f} $B$r<1JL;R(B @var{p} $B$N%5!<%P$XAw$k(B. @end table @@ -601,9 +465,9 @@ Note that @code{ox_push_cmo(@var{p},1234)} send the bi */ /*&C @example -[219] P=sm1_start(); +[219] P=sm1.start(); 0 -[220] sm1_push_int0(P,x*dx+1); +[220] sm1.push_int0(P,x*dx+1); 0 [221] A=ox_pop_cmo(P); x*dx+1 @@ -612,7 +476,7 @@ x*dx+1 @end example @example -[271] sm1_push_int0(0,[x*(x-1),[x]]); +[271] sm1.push_int0(0,[x*(x-1),[x]]); 0 [272] ox_execute_string(0," deRham "); 0 @@ -634,140 +498,19 @@ x*dx+1 */ -def sm1_push_int0(P,A) { - if (type(A) == 1 || type(A) == 0) { - /* recursive poly or number or 0*/ - A = rtostr(A); - ox_push_cmo(P,A); - sm1(P," . (integer) dc "); - return; - } - if (type(A) == 2) { - A = rtostr(A); ox_push_cmo(P,A); - return; - } - if (type(A) == 4) { /* list */ - ox_execute_string(P," [ "); - map(sm1_push_int0_R,A,P); - ox_execute_string(P," ] "); - return; - } - ox_push_cmo(P,A); - return; -} -def sm1_push_0_R(A,P) { - return(sm1_push_0(P,A)); -} -def sm1_push_0(P,A) { - if (type(A) == 0) { - /* 0 */ - A = rtostr(A); - ox_push_cmo(P,A); - sm1(P," .. "); - return; - } - if (type(A) == 2) { - /* Vlist = vars(A); One should check Vlist is a subset of Vlist3. */ - Vlist2 = sm1_vlist(P); - Vlist3 = map(strtov,Vlist2[1]); - B = dp_ptod(A,Vlist3); - ox_push_cmo(P,B); - return; - } - if (type(A) == 4) { /* list */ - ox_execute_string(P," [ "); - map(sm1_push_0_R,A,P); - ox_execute_string(P," ] "); - return; - } - ox_push_cmo(P,A); - return; -} - -def sm1_push(P,A) { - sm1_push_0(P,A); -} - - -def sm1_pop(P) { - extern V_sm1_pop; - sm1(P," toAsirForm "); - V_sm1_pop = ox_pop_cmo(P); - return(toAsirForm(V_sm1_pop)); -} - -def sm1_pop2(P) { - extern V_sm1_pop; - sm1(P," toAsirForm "); - V_sm1_pop = ox_pop_cmo(P); - return([toAsirForm(V_sm1_pop),V_sm1_pop]); -} - -def sm1_check_arg_gb(A,Fname) { - /* A = [[x^2+y^2-1,x*y],[x,y],[[x,-1,y,-1]]] */ - if (type(A) != 4) { - error(Fname+" : argument should be a list."); - } - if (length(A) < 2) { - error(Fname+" : argument should be a list of 2 or 3 elements."); - } - if (type(A[0]) != 4) { - error(Fname+" : example: [[dx^2+dy^2-4,dx*dy-1]<== it should be a list,[x,y]]"); - } - if (!sm1_isListOfPoly(A[0])) { - error(Fname+" : example: [[dx^2+dy^2-4,dx*dy-1]<== it should be a list of polynomials or strings,[x,y]]"); - } - if (!sm1_isListOfVar(A[1])) { - error(Fname+" : example: [[dx^2+dy^2-4,dx*dy-1],[x,y]<== list of variables or \"x,y\"]"); - } - if (length(A) >= 3) { - if (type(A[2]) != 4) { - error(Fname+" : example:[[dx^2+dy^2-4,dx*dy-1],[x,y],[[x,-1,dx,1]]<== a list of weights]"); - } - if (type(A[2][0]) != 4) { - error(Fname+" : example:[[dx^2+dy^2-4,dx*dy-1],[x,y],[[x,-1,dx,1],[dy,1]]<== a list of lists of weight]"); - } - } - return(1); -} - -def sm1_isListOfPoly(A) { - if (type(A) !=4 ) return(0); - N = length(A); - for (I=0; Ie$NHyJ,:nMQAG4D$K$*$$$F(B @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B. -@item sm1_gb_d([@var{f},@var{v},@var{w}]|proc=@var{p}) +@item sm1.gb_d([@var{f},@var{v},@var{w}]|proc=@var{p}) :: @var{v} $B>e$NHyJ,:nMQAG4D$K$*$$$F(B @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B. $B7k2L$rJ,;6B?9`<0$N%j%9%H$GLa$9(B. @end table @@ -845,11 +588,11 @@ List $B>JN,$7$?>l9g(B, graded reverse lexicographic order $B$r$D$+$C$F(B $B%V%l%V%J4pDl$r7W;;$9$k(B. @item - @code{sm1_gb} $B$NLa$jCM$O(B @var{f} $B$N%0%l%V%J4pDl$*$h$S%$%K%7%c%k%b%N%_%"%k(B + @code{sm1.gb} $B$NLa$jCM$O(B @var{f} $B$N%0%l%V%J4pDl$*$h$S%$%K%7%c%k%b%N%_%"%k(B ( @var{w} $B$,$J$$$H$-(B ) $B$^$?$O(B $B%$%K%7%!%kB?9`<0(B ( @var{w} $B$,M?$($i$?$H$-(B) $B$N%j%9%H$G$"$k(B. @item - @code{sm1_gb_d} $B$O7k2L$rJ,;6B?9`<0$N%j%9%H$GLa$9(B. + @code{sm1.gb_d} $B$O7k2L$rJ,;6B?9`<0$N%j%9%H$GLa$9(B. $BB?9`<0$NCf$K8=$l$k%b%N%_%"%k$O%0%l%V%J4pDl$r7W;;$9$k$H$-$KM?$($i$?=g=x$G%=!<%H$5$l$F$$$k(B. $BLa$jCM$O(B [$BJQ?tL>$N%j%9%H(B, $B=g=x$r$-$a$k9TNs(B, $B%0%l%V%J4pDl(B, $B%$%K%7%c%k%b%N%_%"%k$^$?$O%$%K%7%!%kB?9`<0(B] @@ -867,7 +610,7 @@ List */ /*&C-texi @example -[293] sm1_gb([[x*dx+y*dy-1,x*y*dx*dy-2],[x,y]]); +[293] sm1.gb([[x*dx+y*dy-1,x*y*dx*dy-2],[x,y]]); [[x*dx+y*dy-1,y^2*dy^2+2],[x*dx,y^2*dy^2]] @end example */ @@ -896,7 +639,7 @@ graded reverse lexicographic order $B$K4X$9$k%0%l%V%J */ /*&C-texi @example -[294] sm1_gb([[dx^2+dy^2-4,dx*dy-1],[x,y],[[dx,50,dy,2,x,1]]]); +[294] sm1.gb([[dx^2+dy^2-4,dx*dy-1],[x,y],[[dx,50,dy,2,x,1]]]); [[dx+dy^3-4*dy,-dy^4+4*dy^2-1],[dx,-dy^4]] @end example */ @@ -929,7 +672,7 @@ $m' = x^{a'} y^{b'} \partial_x^{c'} \partial_y^{d'}$ */ /*&C-texi @example -[294] F=sm1_gb([[dx^2+dy^2-4,dx*dy-1],[x,y],[[dx,50,dy,2,x,1]]]|sorted=1); +[294] F=sm1.gb([[dx^2+dy^2-4,dx*dy-1],[x,y],[[dx,50,dy,2,x,1]]]|sorted=1); map(print,F[2][0])$ map(print,F[2][1])$ @end example @@ -937,14 +680,14 @@ $m' = x^{a'} y^{b'} \partial_x^{c'} \partial_y^{d'}$ /*&C-texi @example [595] - sm1_gb([["dx*(x*dx +y*dy-2)-1","dy*(x*dx + y*dy -2)-1"], + sm1.gb([["dx*(x*dx +y*dy-2)-1","dy*(x*dx + y*dy -2)-1"], [x,y],[[dx,1,x,-1],[dy,1]]]); [[x*dx^2+(y*dy-h^2)*dx-h^3,x*dy*dx+y*dy^2-h^2*dy-h^3,h^3*dx-h^3*dy], [x*dx^2+(y*dy-h^2)*dx,x*dy*dx+y*dy^2-h^2*dy-h^3,h^3*dx]] [596] - sm1_gb_d([["dx (x dx +y dy-2)-1","dy (x dx + y dy -2)-1"], + sm1.gb_d([["dx (x dx +y dy-2)-1","dy (x dx + y dy -2)-1"], "x,y",[[dx,1,x,-1],[dy,1]]]); [[[e0,x,y,H,E,dx,dy,h], [[0,-1,0,0,0,1,0,0],[0,0,0,0,0,0,1,0],[1,0,0,0,0,0,0,0], @@ -964,58 +707,25 @@ $m' = x^{a'} y^{b'} \partial_x^{c'} \partial_y^{d'}$ /*&eg-texi @table @t @item Reference - @code{sm1_reduction}, @code{sm1_rat_to_p} + @code{sm1.reduction}, @code{sm1.rat_to_p} @end table */ /*&jp-texi @table @t @item $B;2>H(B - @code{sm1_reduction}, @code{sm1_rat_to_p} + @code{sm1.reduction}, @code{sm1.rat_to_p} @end table */ -def sm1_gb(A) { - SM1_FIND_PROC(P); - P = sm1_check_server(P); - sm1_check_arg_gb(A,"Error in sm1_gb"); - sm1_push_int0(P,A); - sm1(P," gb "); - T = sm1_pop2(P); - return(append(T[0],[sm1_toOrdered(T[1])])); -} -def sm1_gb_d(A) { - SM1_FIND_PROC(P); - P = sm1_check_server(P); - sm1_check_arg_gb(A,"Error in sm1_gb_d"); - sm1_push_int0(P,A); - sm1(P," gb /gb.tmp1 set "); - sm1(P," gb.tmp1 getOrderMatrix {{(universalNumber) dc} map } map /gb.tmp2 set "); - sm1(P," gb.tmp1 0 get 0 get getvNamesCR { [(class) (indeterminate)] dc } map /gb.tmp3 set "); - sm1(P," gb.tmp1 getRing ring_def "); /* Change the current ring! */ - sm1(P,"[[ gb.tmp3 gb.tmp2] gb.tmp1] "); - return(ox_pop_cmo(P)); -} -def sm1_pgb(A) { - SM1_FIND_PROC(P); - P = sm1_check_server(P); - sm1_check_arg_gb(A,"Error in sm1_pgb"); - sm1(P," set_timer "); - sm1_push_int0(P,A); - sm1(P," pgb "); - B = sm1_pop(P); - sm1(P," set_timer "); - return(B); -} - /*&eg-texi -@c sort-sm1_deRham -@node sm1_deRham,,, SM1 Functions -@subsection @code{sm1_deRham} -@findex sm1_deRham +@c sort-sm1.deRham +@node sm1.deRham,,, SM1 Functions +@subsection @code{sm1.deRham} +@findex sm1.deRham @table @t -@item sm1_deRham([@var{f},@var{v}]|proc=@var{p}) +@item sm1.deRham([@var{f},@var{v}]|proc=@var{p}) :: ask the server to evaluate the dimensions of the de Rham cohomology groups of C^n - (the zero set of @var{f}=0). @end table @@ -1038,8 +748,8 @@ List [dim H^0(X,C), dim H^1(X,C), dim H^2(X,C), ..., dim H^n(X,C)]. @item @var{v} is a list of variables. n = @code{length(@var{v})}. @item - @code{sm1_deRham} requires huge computer resources. - For example, @code{sm1_deRham(0,[x*y*z*(x+y+z-1)*(x-y),[x,y,z]])} + @code{sm1.deRham} requires huge computer resources. + For example, @code{sm1.deRham(0,[x*y*z*(x+y+z-1)*(x-y),[x,y,z]])} is already very hard. @item To efficiently analyze the roots of b-function, @code{ox_asir} should be used @@ -1048,19 +758,19 @@ List by the command @* @code{sm1(0,"[(parse) (oxasir.sm1) pushfile] extension");} This command is automatically executed when @code{ox_sm1_forAsir} is started. -@item If you make an interruption to the function @code{sm1_deRham} -by @code{ox_reset(Sm1_proc);}, the server might get out of the standard +@item If you make an interruption to the function @code{sm1.deRham} +by @code{ox_reset(sm1.get_Sm1_proc());}, the server might get out of the standard mode. So, it is strongly recommended to execute the command -@code{ox_shutdown(Sm1_proc);} to interrupt and restart the server. +@code{ox_shutdown(sm1.get_Sm1_proc());} to interrupt and restart the server. @end itemize */ /*&jp-texi -@c sort-sm1_deRham -@node sm1_deRham,,, SM1 Functions -@subsection @code{sm1_deRham} -@findex sm1_deRham +@c sort-sm1.deRham +@node sm1.deRham,,, SM1 Functions +@subsection @code{sm1.deRham} +@findex sm1.deRham @table @t -@item sm1_deRham([@var{f},@var{v}]|proc=@var{p}) +@item sm1.deRham([@var{f},@var{v}]|proc=@var{p}) :: $B6u4V(B C^n - (the zero set of @var{f}=0) $B$N%I%i!<%`%3%[%b%m%872$No$KBgJQ$G$"$k(B. @item b-$B4X?t$N:,$r8zN($h$/2r@O$9$k$K$O(B, @code{ox_asir} $B$,(B @code{ox_sm1_forAsir} @@ -1092,24 +802,24 @@ mode. So, it is strongly recommended to execute the co $B$rMQ$$$F(B, @code{ox_asir} $B$H$NDL?.%b%8%e!<%k$r$"$i$+$8$a%m!<%I$7$F$*$/$H$h$$(B. $B$3$N%3%^%s%I$O(B @code{ox_asir_forAsir} $B$N%9%?!<%H;~$K<+F0E*$Kl9g(B - $B$,$"$k$N$G(B, $B%3%^%s%I(B @code{ox_shutdown(Sm1_proc);} $B$G(B, @code{ox_sm1_forAsir} + $B$,$"$k$N$G(B, $B%3%^%s%I(B @code{ox_shutdown(sm1.get_Sm1_proc());} $B$G(B, @code{ox_sm1_forAsir} $B$r0l;~(B shutdown $B$7$F%j%9%?!<%H$7$?J}$,0BA4$G$"$k(B. @end itemize */ /*&C-texi @example -[332] sm1_deRham([x^3-y^2,[x,y]]); +[332] sm1.deRham([x^3-y^2,[x,y]]); [1,1,0] -[333] sm1_deRham([x*(x-1),[x]]); +[333] sm1.deRham([x*(x-1),[x]]); [1,2] @end example */ /*&eg-texi @table @t @item Reference - @code{sm1_start}, @code{deRham} (sm1 command) + @code{sm1.start}, @code{deRham} (sm1 command) @item Algorithm: Oaku, Takayama, An algorithm for de Rham cohomology groups of the complement of an affine variety via D-module computation, @@ -1119,7 +829,7 @@ mode. So, it is strongly recommended to execute the co /*&jp-texi @table @t @item $B;2>H(B - @code{sm1_start}, @code{deRham} (sm1 command) + @code{sm1.start}, @code{deRham} (sm1 command) @item Algorithm: Oaku, Takayama, An algorithm for de Rham cohomology groups of the complement of an affine variety via D-module computation, @@ -1128,114 +838,16 @@ mode. So, it is strongly recommended to execute the co */ -def sm1_deRham(A) { - SM1_FIND_PROC(P); - P = sm1_check_server(P); - sm1(P," set_timer "); - sm1_push_int0(P,A); - sm1(P," deRham "); - B = sm1_pop(P); - sm1(P," set_timer "); - ox_check_errors2(P); - return(B); -} -def sm1_vlist(P) { - sm1(P," getvNamesC "); - B=ox_pop_cmo(P); - sm1(P," getvNamesC toAsirVar "); - C=ox_pop_cmo(P); - return([B,C,map(strtov,C)]); -} -/* [ sm1 names(string), asir names(string), asir names(var)] */ -/* Vlist = sm1_vlist(P); - sm1_push_poly0( x + 20*x, Vlist[2]); - sm1_pop_poly0(Vlist[2]); -*/ -/* ring of Differential operators */ -def sm1_ringD(V,W) { - SM1_FIND_PROC(P); - sm1(P," [ "); - if (type(V) == 7) { /* string */ - ox_push_cmo(P,V); - }else if (type(V) == 4) {/* list */ - V = map(rtostr,V); - ox_push_cmo(P,V); - sm1(P," from_records "); - }else { printf("Error: sm1_ringD"); return(-1); } - sm1(P," ring_of_differential_operators "); - if (type(W) != 0) { - sm1_push_int0(P,W); sm1(P," weight_vector "); - } - sm1(P," pstack "); - sm1(P," 0 ] define_ring getOrderMatrix {{(universalNumber) dc}map}map "); - ox_check_errors2(P); - M = ox_pop_cmo(P); - return([sm1_vlist(P)[2],M]); -} - -def sm1_expand_d(F) { - SM1_FIND_PROC(P); - ox_push_cmo(P,F); - sm1(P, " expand "); - return(ox_pop_cmo(P)); -} - -def sm1_mul_d(A,B) { - SM1_FIND_PROC(P); - ox_push_cmo(P,A); - ox_push_cmo(P,B); - sm1(P," mul "); - return(ox_pop_cmo(P)); -} - -def sm1_dehomogenize_d(A) { - SM1_FIND_PROC(P); - ox_push_cmo(P,A); - sm1(P," dehomogenize "); - return(ox_pop_cmo(P)); -} - -def sm1_homogenize_d(A) { - SM1_FIND_PROC(P); - ox_push_cmo(P,A); - sm1(P," homogenize "); - return(ox_pop_cmo(P)); -} - -def sm1_groebner_d(A) { - SM1_FIND_PROC(P); - ox_push_cmo(P,A); - sm1(P," groebner "); - return(ox_pop_cmo(P)); -} - -def sm1_reduction_d(F,G) { - SM1_FIND_PROC(P); - ox_push_cmo(P,F); - ox_push_cmo(P,G); - sm1(P," reduction "); - return(ox_pop_cmo(P)); -} - -def sm1_reduction_noH_d(F,G) { - SM1_FIND_PROC(P); - ox_push_cmo(P,F); - ox_push_cmo(P,G); - sm1(P," reduction-noH "); - return(ox_pop_cmo(P)); -} - - /*&eg-texi -@c sort-sm1_hilbert -@node sm1_hilbert,,, SM1 Functions -@subsection @code{sm1_hilbert} -@findex sm1_hilbert +@c sort-sm1.hilbert +@node sm1.hilbert,,, SM1 Functions +@subsection @code{sm1.hilbert} +@findex sm1.hilbert @findex hilbert_polynomial @table @t -@item sm1_hilbert([@var{f},@var{v}]|proc=@var{p}) +@item sm1.hilbert([@var{f},@var{v}]|proc=@var{p}) :: ask the server to compute the Hilbert polynomial for the set of polynomials @var{f}. @item hilbert_polynomial(@var{f},@var{v}) :: ask the server to compute the Hilbert polynomial for the set of polynomials @var{f}. @@ -1259,7 +871,7 @@ List degree is less than or equal to k and I is the ideal generated by the set of polynomials @var{f}. @item - Note for sm1_hilbert: + Note for sm1.hilbert: For an efficient computation, it is preferable that the set of polynomials @var{f} is a set of monomials. In fact, this function firstly compute a Grobner basis of @var{f}, and then @@ -1271,13 +883,13 @@ List @end itemize */ /*&jp-texi -@c sort-sm1_hilbert -@node sm1_hilbert,,, SM1 Functions -@subsection @code{sm1_hilbert} -@findex sm1_hilbert +@c sort-sm1.hilbert +@node sm1.hilbert,,, SM1 Functions +@subsection @code{sm1.hilbert} +@findex sm1.hilbert @findex hilbert_polynomial @table @t -@item sm1_hilbert([@var{f},@var{v}]|proc=@var{p}) +@item sm1.hilbert([@var{f},@var{v}]|proc=@var{p}) :: $BB?9`<0$N=89g(B @var{f} $B$N%R%k%Y%k%HB?9`<0$r7W;;$9$k(B. @item hilbert_polynomial(@var{f},@var{v}) :: $BB?9`<0$N=89g(B @var{f} $B$N%R%k%Y%k%HB?9`<0$r7W;;$9$k(B. @@ -1299,7 +911,7 @@ List h(k) = dim_Q F_k/I \cap F_k $B$3$3$G(B F_k $B$OH(B - @code{sm1_start}, @code{sm1_gb}, @code{longname} + @code{sm1.start}, @code{sm1.gb}, @code{longname} @end table */ -def sm1_hilbert(A) { - SM1_FIND_PROC(P); - P = sm1_check_server(P); - sm1(P,"[ "); - sm1_push_int0(P,A[0]); - sm1_push_int0(P,A[1]); - sm1(P," ] pgb /sm1_hilbert.gb set "); - sm1(P," sm1_hilbert.gb 0 get { init toString } map "); - sm1_push_int0(P,A[1]); - sm1(P, " hilbert "); - B = sm1_pop(P); - return(B[1]/fac(B[0])); -} /*&eg-texi -@c sort-sm1_genericAnn -@node sm1_genericAnn,,, SM1 Functions -@subsection @code{sm1_genericAnn} -@findex sm1_genericAnn +@c sort-sm1.genericAnn +@node sm1.genericAnn,,, SM1 Functions +@subsection @code{sm1.genericAnn} +@findex sm1.genericAnn @table @t -@item sm1_genericAnn([@var{f},@var{v}]|proc=@var{p}) +@item sm1.genericAnn([@var{f},@var{v}]|proc=@var{p}) :: It computes the annihilating ideal for @var{f}^s. @var{v} is the list of variables. Here, s is @var{v}[0] and @var{f} is a polynomial in the variables @code{rest}(@var{v}). @@ -1396,12 +995,12 @@ List @end itemize */ /*&jp-texi -@c sort-sm1_genericAnn -@node sm1_genericAnn,,, SM1 Functions -@subsection @code{sm1_genericAnn} -@findex sm1_genericAnn +@c sort-sm1.genericAnn +@node sm1.genericAnn,,, SM1 Functions +@subsection @code{sm1.genericAnn} +@findex sm1.genericAnn @table @t -@item sm1_genericAnn([@var{f},@var{v}]|proc=@var{p}) +@item sm1.genericAnn([@var{f},@var{v}]|proc=@var{p}) :: @var{f}^s $B$N$_$?$9HyJ,J}Dx<0A4BN$r$b$H$a$k(B. @var{v} $B$OJQ?t$N%j%9%H$G$"$k(B. $B$3$3$G(B, s $B$O(B @var{v}[0] $B$G$"$j(B, @var{f} $B$OJQ?t(B @code{rest}(@var{v}) $B>e$NB?9`<0$G$"$k(B. @@ -1427,48 +1026,32 @@ List */ /*&C-texi @example -[595] sm1_genericAnn([x^3+y^3+z^3,[s,x,y,z]]); +[595] sm1.genericAnn([x^3+y^3+z^3,[s,x,y,z]]); [-x*dx-y*dy-z*dz+3*s,z^2*dy-y^2*dz,z^2*dx-x^2*dz,y^2*dx-x^2*dy] @end example */ /*&eg-texi @table @t @item Reference - @code{sm1_start} + @code{sm1.start} @end table */ /*&jp-texi @table @t @item $B;2>H(B - @code{sm1_start} + @code{sm1.start} @end table */ -def sm1_genericAnn(F) { - SM1_FIND_PROC(P); - sm1_push_int0(P,F[0]); - sm1_push_int0(P,F[1]); - sm1(P, " genericAnn "); - B = sm1_pop(P); - return(B); -} -def sm1_tensor0(F) { - SM1_FIND_PROC(P); - sm1_push_int0(P,F); - sm1(P, " tensor0 "); - B = sm1_pop(P); - return(B); -} - /*&eg-texi -@c sort-sm1_wTensor0 -@node sm1_wTensor0,,, SM1 Functions -@subsection @code{sm1_wTensor0} -@findex sm1_wTensor0 +@c sort-sm1.wTensor0 +@node sm1.wTensor0,,, SM1 Functions +@subsection @code{sm1.wTensor0} +@findex sm1.wTensor0 @table @t -@item sm1_wTensor0([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p}) +@item sm1.wTensor0([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p}) :: It computes the D-module theoretic 0-th tensor product of @var{f} and @var{g}. @end table @@ -1491,7 +1074,7 @@ List @var{w} is a list of weights. The integer @var{w}[i] is the weight of the variable @var{v}[i]. @item - @code{sm1_wTensor0} calls @code{wRestriction0} of @code{ox_sm1}, + @code{sm1.wTensor0} calls @code{wRestriction0} of @code{ox_sm1}, which requires a generic weight vector @var{w} to compute the restriction. If @var{w} is not generic, the computation fails. @@ -1504,12 +1087,12 @@ the inputs @var{f} and @var{g} are left ideals of D. */ /*&jp-texi -@c sort-sm1_wTensor0 -@node sm1_wTensor0,,, SM1 Functions -@subsection @code{sm1_wTensor0} -@findex sm1_wTensor0 +@c sort-sm1.wTensor0 +@node sm1.wTensor0,,, SM1 Functions +@subsection @code{sm1.wTensor0} +@findex sm1.wTensor0 @table @t -@item sm1_wTensor0([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p}) +@item sm1.wTensor0([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p}) :: @var{f} $B$H(B @var{g} $B$N(B D-module $B$H$7$F$N(B 0 $BJN,$7$F$b$h$$(B. -@code{sm1_reduction_noH} $B$O(B, Weyl algebra $BMQ(B. +@code{sm1.reduction_noH} $B$O(B, Weyl algebra $BMQ(B. @item $BLa$jCM$OH(B - @code{sm1_start}, @code{sm1_find_proc}, @code{d_true_nf} + @code{sm1.start}, @code{d_true_nf} @end table */ -def sm1_reduction(A) { - /* Example: sm1_reduction(A|proc=10) */ - SM1_FIND_PROC(P); - /* check the arguments */ - if (type(A) != 4) { - error("sm1_reduction(A|proc=p): A must be a list."); - } - AA = [rtostr(A[0])]; - AA = append(AA,[ map(rtostr,A[1]) ]); - AA = append(AA, cdr(cdr(A))); - sm1(P," /reduction*.noH 0 def "); - sm1_push_int0(P,AA); - sm1(P," reduction* "); - ox_check_errors2(P); - return(sm1_pop(P)); -} -def sm1_reduction_noH(A) { - /* Example: sm1_reduction(A|proc=10) */ - SM1_FIND_PROC(P); - /* check the arguments */ - if (type(A) != 4) { - error("sm1_reduction_noH(A|proc=p): A must be a list."); - } - AA = [rtostr(A[0])]; - AA = append(AA,[ map(rtostr,A[1]) ]); - AA = append(AA, cdr(cdr(A))); - sm1(P," /reduction*.noH 1 def "); - sm1_push_int0(P,AA); - sm1(P," reduction* "); - ox_check_errors2(P); - return(sm1_pop(P)); -} - /*&eg-texi -@node sm1_xml_tree_to_prefix_string,,, SM1 Functions -@subsection @code{sm1_xml_tree_to_prefix_string} -@findex sm1_xml_tree_to_prefix_string +@node sm1.xml_tree_to_prefix_string,,, SM1 Functions +@subsection @code{sm1.xml_tree_to_prefix_string} +@findex sm1.xml_tree_to_prefix_string @table @t -@item sm1_xml_tree_to_prefix_string(@var{s}|proc=@var{p}) +@item sm1.xml_tree_to_prefix_string(@var{s}|proc=@var{p}) :: Translate OpenMath Tree Expression @var{s} in XML to a prefix notation. @end table @@ -1723,11 +1265,11 @@ command search path.) @end itemize */ /*&jp-texi -@node sm1_xml_tree_to_prefix_string,,, SM1 Functions -@subsection @code{sm1_xml_tree_to_prefix_string} -@findex sm1_xml_tree_to_prefix_string +@node sm1.xml_tree_to_prefix_string,,, SM1 Functions +@subsection @code{sm1.xml_tree_to_prefix_string} +@findex sm1.xml_tree_to_prefix_string @table @t -@item sm1_xml_tree_to_prefix_string(@var{s}|proc=@var{p}) +@item sm1.xml_tree_to_prefix_string(@var{s}|proc=@var{p}) :: XML $B$G=q$+$l$?(B OpenMath $B$NLZI=8=(B @var{s} $B$rA0CV5-K!$K$J$*$9(B. @end table @@ -1762,7 +1304,7 @@ Trying to connect to the server... Done. 1 0 -1 -[271] sm1_xml_tree_to_prefix_string(F); +[271] sm1.xml_tree_to_prefix_string(F); basic_plus(basic_times(basic_power(x,4),1),basic_times(basic_power(x,0),-1)) @end example */ @@ -1780,79 +1322,17 @@ basic_plus(basic_times(basic_power(x,4),1),basic_times */ -def sm1_xml_tree_to_prefix_string(A) { - SM1_FIND_PROC(P); - /* check the arguments */ - if (type(A) != 7) { - error("sm1_xml_tree_to_prefix_string(A|proc=p): A must be a string."); - } - ox_push_cmo(P,A); - sm1(P," xml_tree_to_prefix_string "); - ox_check_errors2(P); - return(ox_pop_cmo(P)); -} -def sm1_wbf(A) { - SM1_FIND_PROC(P); - /* check the arguments */ - if (type(A) != 4) { - error("sm1_wbf(A): A must be a list."); - } - if (length(A) != 3) { - error("sm1_wbf(A): A must be a list of the length 3."); - } - if (type(A[0]) != 4 || type(A[1]) != 4 || type(A[2]) != 4) { - error("sm1_wbf([A,B,C]): A, B, C must be a list."); - } - if (! (type(A[2][0]) == 7 || type(A[2][0]) == 2)) { - error("sm1_wbf([A,B,C]): C must be of a form [v-name, v-weight, ...]"); - } - sm1_push_int0(P,A); - sm1(P," wbf "); - ox_check_errors2(P); - return(sm1_pop(P)); -} -def sm1_wbfRoots(A) { - SM1_FIND_PROC(P); - /* check the arguments */ - if (type(A) != 4) { - error("sm1_wbfRoots(A): A must be a list."); - } - if (length(A) != 3) { - error("sm1_wbfRoots(A): A must be a list of the length 3."); - } - if (type(A[0]) != 4 || type(A[1]) != 4 || type(A[2]) != 4) { - error("sm1_wbfRoots([A,B,C]): A, B, C must be a list."); - } - if (! (type(A[2][0]) == 7 || type(A[2][0]) == 2)) { - error("sm1_wbfRoots([A,B,C]): C must be of a form [v-name, v-weight, ...]"); - } - sm1_push_int0(P,A); - sm1(P," wbfRoots "); - ox_check_errors2(P); - return(sm1_pop(P)); -} - - -def sm1_res_div(A) { - SM1_FIND_PROC(P); - sm1_push_int0(P,[[A[0],A[1]],A[2]]); - sm1(P," res*div "); - ox_check_errors2(P); - return(sm1_pop(P)); -} - - /*&eg-texi -@c sort-sm1_syz -@node sm1_syz,,, SM1 Functions -@node sm1_syz_d,,, SM1 Functions -@subsection @code{sm1_syz} -@findex sm1_syz -@findex sm1_syz_d +@c sort-sm1.syz +@node sm1.syz,,, SM1 Functions +@node sm1.syz_d,,, SM1 Functions +@subsection @code{sm1.syz} +@findex sm1.syz +@findex sm1.syz_d @table @t -@item sm1_syz([@var{f},@var{v},@var{w}]|proc=@var{p}) +@item sm1.syz([@var{f},@var{v},@var{w}]|proc=@var{p}) :: computes the syzygy of @var{f} in the ring of differential operators with the variable @var{v}. @end table @@ -1889,14 +1369,14 @@ In summary, @var{g} = @var{m} @var{f} and @end itemize */ /*&jp-texi -@c sort-sm1_syz -@node sm1_syz,,, SM1 Functions -@node sm1_syz_d,,, SM1 Functions -@subsection @code{sm1_syz} -@findex sm1_syz -@findex sm1_syz_d +@c sort-sm1.syz +@node sm1.syz,,, SM1 Functions +@node sm1.syz_d,,, SM1 Functions +@subsection @code{sm1.syz} +@findex sm1.syz +@findex sm1.syz_d @table @t -@item sm1_syz([@var{f},@var{v},@var{w}]|proc=@var{p}) +@item sm1.syz([@var{f},@var{v},@var{w}]|proc=@var{p}) :: @var{v} $B>e$NHyJ,:nMQAG4D$K$*$$$F(B @var{f} $B$N(B syzygy $B$r7W;;$9$k(B. @end table @@ -1933,7 +1413,7 @@ syzygy $B$G$"$k(B. */ /*&C-texi @example -[293] sm1_syz([[x*dx+y*dy-1,x*y*dx*dy-2],[x,y]]); +[293] sm1.syz([[x*dx+y*dy-1,x*y*dx*dy-2],[x,y]]); [[[y*x*dy*dx-2,-x*dx-y*dy+1]], generators of the syzygy [[[x*dx+y*dy-1],[y^2*dy^2+2]], grobner basis [[1,0],[y*dy,-1]], transformation matrix @@ -1942,7 +1422,7 @@ syzygy $B$G$"$k(B. */ /*&C-texi @example -[294]sm1_syz([[x^2*dx^2+x*dx+y^2*dy^2+y*dy-4,x*y*dx*dy-1],[x,y],[[dx,-1,x,1]]]); +[294]sm1.syz([[x^2*dx^2+x*dx+y^2*dy^2+y*dy-4,x*y*dx*dy-1],[x,y],[[dx,-1,x,1]]]); [[[y*x*dy*dx-1,-x^2*dx^2-x*dx-y^2*dy^2-y*dy+4]], generators of the syzygy [[[x^2*dx^2+h^2*x*dx+y^2*dy^2+h^2*y*dy-4*h^4],[y*x*dy*dx-h^4], GB [h^4*x*dx+y^3*dy^3+3*h^2*y^2*dy^2-3*h^4*y*dy]], @@ -1952,45 +1432,13 @@ syzygy $B$G$"$k(B. */ -def sm1_syz(A) { - SM1_FIND_PROC(P); - sm1_push_int0(P,A); - sm1(P," syz "); - ox_check_errors2(P); - return(sm1_pop(P)); -} -def sm1_res_solv(A) { - SM1_FIND_PROC(P); - sm1_push_int0(P,[[A[0],A[1]],A[2]]); - sm1(P," res*solv "); - ox_check_errors2(P); - return(sm1_pop(P)); -} - -def sm1_res_solv_h(A) { - SM1_FIND_PROC(P); - sm1_push_int0(P,[[A[0],A[1]],A[2]]); - sm1(P," res*solv*h "); - ox_check_errors2(P); - return(sm1_pop(P)); -} - - -def sm1_mul(A,B,V) { - SM1_FIND_PROC(P); - sm1_push_int0(P,[[A,B],V]); - sm1(P," res*mul "); - ox_check_errors2(P); - return(sm1_pop(P)); -} - /*&eg-texi -@node sm1_mul,,, SM1 Functions -@subsection @code{sm1_mul} -@findex sm1_mul +@node sm1.mul,,, SM1 Functions +@subsection @code{sm1.mul} +@findex sm1.mul @table @t -@item sm1_mul(@var{f},@var{g},@var{v}|proc=@var{p}) +@item sm1.mul(@var{f},@var{g},@var{v}|proc=@var{p}) :: ask the sm1 server to multiply @var{f} and @var{g} in the ring of differential operators over @var{v}. @end table @@ -2007,16 +1455,16 @@ List @itemize @bullet @item Ask the sm1 server to multiply @var{f} and @var{g} in the ring of differential operators over @var{v}. -@item @code{sm1_mul_h} is for homogenized Weyl algebra. +@item @code{sm1.mul_h} is for homogenized Weyl algebra. @end itemize */ /*&jp-texi -@node sm1_mul,,, SM1 Functions -@subsection @code{sm1_mul} -@findex sm1_mul +@node sm1.mul,,, SM1 Functions +@subsection @code{sm1.mul} +@findex sm1.mul @table @t -@item sm1_mul(@var{f},@var{g},@var{v}|proc=@var{p}) +@item sm1.mul(@var{f},@var{g},@var{v}|proc=@var{p}) :: sm1$B%5!<%P(B $B$K(B @var{f} $B$+$1$k(B @var{g} $B$r(B @var{v} $B>e$NHyJ,:nMQAG4D$G$d$C$F$/$l$k$h$&$KMj$`(B. @end table @@ -2035,18 +1483,18 @@ List @itemize @bullet @item sm1$B%5!<%P(B $B$K(B @var{f} $B$+$1$k(B @var{g} $B$r(B @var{v} $B>e$NHyJ,:nMQAG4D$G$d$C$F$/$l$k$h$&$KMj$`(B. -@item @code{sm1_mul_h} $B$O(B homogenized Weyl $BBe?tMQ(B. +@item @code{sm1.mul_h} $B$O(B homogenized Weyl $BBe?tMQ(B. @end itemize */ /*&C-texi @example -[277] sm1_mul(dx,x,[x]); +[277] sm1.mul(dx,x,[x]); x*dx+1 -[278] sm1_mul([x,y],[1,2],[x,y]); +[278] sm1.mul([x,y],[1,2],[x,y]); x+2*y -[279] sm1_mul([[1,2],[3,4]],[[x,y],[1,2]],[x,y]); +[279] sm1.mul([[1,2],[3,4]],[[x,y],[1,2]],[x,y]); [[x+2,y+4],[3*x+4,3*y+8]] @end example @@ -2054,133 +1502,13 @@ x+2*y -def sm1_mul_h(A,B,V) { - SM1_FIND_PROC(P); - sm1_push_int0(P,[[A,B],V]); - sm1(P," res*mul*h "); - ox_check_errors2(P); - return(sm1_pop(P)); -} -def sm1_adjoint(A,V) { - SM1_FIND_PROC(P); - sm1_push_int0(P,[A,V]); - sm1(P," res*adjoint "); - ox_check_errors2(P); - return(sm1_pop(P)); -} - -def transpose(A) { - if (type(A) == 4) { - N = length(A); M = length(A[0]); - B = newmat(N,M,A); - C = newmat(M,N); - for (I=0; I= 0) return(ntoint32(I)); - sm1(P," "+rtostr(I)+" "); - return(ox_pop_cmo(P)); -} -def sm1_to_ascii_array(S) { /* Use strtoascii */ - SM1_FIND_PROC(P); - ox_push_cmo(P,S); - sm1(P," (array) dc { (universalNumber) dc } map "); - return(ox_pop_cmo(P)); -} -def sm1_from_ascii_array(S) { /* Use asciitostr */ - SM1_FIND_PROC(P); - ox_push_cmo(P,S); - sm1(P," { (integer) dc (string) dc } map cat "); - return(ox_pop_cmo(P)); -} -/* -[288] sm1_to_ascii_array("Hello"); -[72,101,108,108,111] -[289] sm1_from_ascii_array(@@); -Hello -*/ -/* end of temporary functions */ - -def sm1_gkz(S) { - SM1_FIND_PROC(P); - A = S[0]; - B = S[1]; - AA = [ ]; - BB = [ ]; - for (I=0; IH(B - @code{sm_gb} + @code{sm.gb} @end table */