[BACK]Return to sm1.oxweave CVS log [TXT][DIR] Up to [local] / OpenXM / src / asir-contrib / packages / doc

Diff for /OpenXM/src/asir-contrib/packages/doc/Attic/sm1.oxweave between version 1.5 and 1.9

version 1.5, 2002/08/11 08:39:47 version 1.9, 2003/05/19 05:15:52
Line 1 
Line 1 
 /*$OpenXM: OpenXM/src/asir-contrib/packages/doc/sm1.oxweave,v 1.4 2002/07/14 13:14:37 takayama Exp $ */  /*$OpenXM: OpenXM/src/asir-contrib/packages/doc/sm1.oxweave,v 1.8 2003/05/18 02:20:21 takayama Exp $ */
   
 /*&C-texi  /*&C-texi
 @c DO NOT EDIT THIS FILE   oxphc.texi  @c DO NOT EDIT THIS FILE   oxphc.texi
 */  */
   /*&C-texi
   @node SM1 Functions,,, Top
   */
 /*&jp-texi  /*&jp-texi
 @node SM1 $BH!?t(B,,, Top  
 @chapter SM1 $BH!?t(B  @chapter SM1 $BH!?t(B
   
 $B$3$N@a$G$O(B sm1 $B$N(B ox $B%5!<%P(B @code{ox_sm1_forAsir}  $B$3$N@a$G$O(B sm1 $B$N(B ox $B%5!<%P(B @code{ox_sm1_forAsir}
Line 31  $X$ $B$OJ?LL$KFs$D$N7j$r$"$1$?6u4V$G$"$k$N$G(B, $BE
Line 33  $X$ $B$OJ?LL$KFs$D$N7j$r$"$1$?6u4V$G$"$k$N$G(B, $BE
 @end tex  @end tex
 */  */
 /*&eg-texi  /*&eg-texi
 @node SM1 Functions,,, Top  
 @chapter SM1 Functions  @chapter SM1 Functions
   
 This chapter describes  interface functions for  This chapter describes  interface functions for
Line 71  cohomology groups.
Line 72  cohomology groups.
   
 @include opening.texi  @include opening.texi
   
 [283] sm1_deRham([x*(x-1),[x]]);  [283] sm1.deRham([x*(x-1),[x]]);
 [1,2]  [1,2]
 @end example  @end example
 */  */
Line 84  Grobner Deformations of Hypergeometric Differential Eq
Line 85  Grobner Deformations of Hypergeometric Differential Eq
 1999, Springer.  1999, Springer.
 See the appendix.  See the appendix.
 */  */
   
   /*
   @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::
   @end menu
   */
   
 /*&jp-texi  /*&jp-texi
 @section @code{ox_sm1_forAsir} $B%5!<%P(B  @section @code{ox_sm1_forAsir} $B%5!<%P(B
 */  */
Line 92  See the appendix.
Line 120  See the appendix.
 */  */
   
 /*&eg-texi  /*&eg-texi
 @menu  
 * ox_sm1_forAsir::  
 @end menu  
 @node ox_sm1_forAsir,,, Top  @node ox_sm1_forAsir,,, Top
 @subsection @code{ox_sm1_forAsir}  @subsection @code{ox_sm1_forAsir}
 @findex ox_sm1_forAsir  @findex ox_sm1_forAsir
Line 105  See the appendix.
Line 130  See the appendix.
 @itemize @bullet  @itemize @bullet
 @item  @item
    @code{ox_sm1_forAsir} is the @code{sm1} server started from asir     @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,  @*      In the standard setting,  @*
     @code{ox_sm1_forAsir} =      @code{ox_sm1_forAsir} =
          @file{$(OpenXM_HOME)/lib/sm1/bin/ox_sm1}           @file{$(OpenXM_HOME)/lib/sm1/bin/ox_sm1}
Line 126  to build your own server by reading @code{sm1} macros.
Line 151  to build your own server by reading @code{sm1} macros.
 @end itemize  @end itemize
 */  */
 /*&jp-texi  /*&jp-texi
 @menu  
 * ox_sm1_forAsir::  
 @end menu  
 @node ox_sm1_forAsir,,, Top  @node ox_sm1_forAsir,,, Top
 @subsection @code{ox_sm1_forAsir}  @subsection @code{ox_sm1_forAsir}
 @findex ox_sm1_forAsir  @findex ox_sm1_forAsir
Line 139  to build your own server by reading @code{sm1} macros.
Line 161  to build your own server by reading @code{sm1} macros.
 @itemize @bullet  @itemize @bullet
 @item  @item
    $B%5!<%P(B @code{ox_sm1_forAsir} $B$O(B @code{asir} $B$h$j%3%^%s%I(B     $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, @*      $BI8=`E*@_Dj$G$O(B, @*
     @code{ox_sm1_forAsir} =      @code{ox_sm1_forAsir} =
Line 161  to build your own server by reading @code{sm1} macros.
Line 183  to build your own server by reading @code{sm1} macros.
 @end itemize  @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  /*&jp-texi
 @section $BH!?t0lMw(B  @section $BH!?t0lMw(B
Line 184  def sm1_check_server(P) {
Line 192  def sm1_check_server(P) {
 */  */
   
 /*&eg-texi  /*&eg-texi
 @c sort-sm1_start  @c sort-sm1.start
 @menu  @node sm1.start,,, SM1 Functions
 * sm1_start::  @subsection @code{sm1.start}
 @end menu  @findex sm1.start
 @node sm1_start,,, SM1 Functions  
 @subsection @code{sm1_start}  
 @findex sm1_start  
 @table @t  @table @t
 @item sm1_start()  @item sm1.start()
 ::  Start  @code{ox_sm1_forAsir} on the localhost.  ::  Start  @code{ox_sm1_forAsir} on the localhost.
 @end table  @end table
   
Line 223  for computation in @code{sm1}.
Line 228  for computation in @code{sm1}.
 and @code{x0}, ..., @code{x20}, @code{y0}, ..., @code{y20},  and @code{x0}, ..., @code{x20}, @code{y0}, ..., @code{y20},
 @code{z0}, ..., @code{z20} can be used as variables for ring of  @code{z0}, ..., @code{z20} can be used as variables for ring of
 differential operators in default. (cf. @code{Sm1_ord_list} in @code{sm1}).  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  @end itemize
 */  */
 /*&jp-texi  /*&jp-texi
 @c sort-sm1_start  @c sort-sm1.start
 @menu  @node sm1.start,,, SM1 Functions
 * sm1_start::  @subsection @code{sm1.start}
 @end menu  @findex sm1.start
 @node sm1_start,,, SM1 $BH!?t(B  
 @subsection @code{sm1_start}  
 @findex sm1_start  
 @table @t  @table @t
 @item sm1_start()  @item sm1.start()
 ::  localhost $B$G(B  @code{ox_sm1_forAsir} $B$r%9%?!<%H$9$k(B.  ::  localhost $B$G(B  @code{ox_sm1_forAsir} $B$r%9%?!<%H$9$k(B.
 @end table  @end table
   
Line 266  differential operators in default. (cf. @code{Sm1_ord_
Line 270  differential operators in default. (cf. @code{Sm1_ord_
 $B$=$l$+$i(B, @code{x0}, ..., @code{x20}, @code{y0}, ..., @code{y20},  $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  @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}).  $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  @end itemize
 */  */
 /*&C-texi  /*&C-texi
Line 279  differential operators in default. (cf. @code{Sm1_ord_
Line 284  differential operators in default. (cf. @code{Sm1_ord_
 a*da  a*da
 [262] cc*dcc;  [262] cc*dcc;
 dcc*cc  dcc*cc
 [263] sm1_mul(da,a,[a]);  [263] sm1.mul(da,a,[a]);
 a*da+1  a*da+1
 [264] sm1_mul(a,da,[a]);  [264] sm1.mul(a,da,[a]);
 a*da  a*da
 @end example  @end example
 */  */
 /*&eg-texi  /*&eg-texi
 @table @t  @table @t
 @item Reference  @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}      @code{ord}
 @end table  @end table
 */  */
 /*&jp-texi  /*&jp-texi
 @table @t  @table @t
 @item $B;2>H(B  @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}      @code{ord}
 @end table  @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  /*&eg-texi
 @c sort-sm1  @c sort-sm1
 @menu  
 * sm1::  
 @end menu  
 @node sm1,,, SM1 Functions  @node sm1,,, SM1 Functions
 @subsection @code{sm1}  @subsection @code{sm1}
 @findex sm1  @findex sm1
Line 355  String
Line 329  String
 @itemize @bullet  @itemize @bullet
 @item  It asks the @code{sm1} server of the descriptor number @var{p}  @item  It asks the @code{sm1} server of the descriptor number @var{p}
 to execute the command string @var{s}.  to execute the command string @var{s}.
   (In the next example, the descriptor number is 0.)
 @end itemize  @end itemize
 */  */
 /*&jp-texi  /*&jp-texi
 @menu  @node sm1,,, SM1 Functions
 * sm1::  
 @end menu  
 @node sm1,,, SM1 $BH!?t(B  
 @subsection @code{sm1}  @subsection @code{sm1}
 @findex sm1  @findex sm1
 @table @t  @table @t
Line 381  to execute the command string @var{s}.
Line 353  to execute the command string @var{s}.
 @itemize @bullet  @itemize @bullet
 @item  $B<1JLHV9f(B @var{p} $B$N(B @code{sm1} $B%5!<%P$K(B  @item  $B<1JLHV9f(B @var{p} $B$N(B @code{sm1} $B%5!<%P$K(B
 $B%3%^%s%INs(B @var{s} $B$r<B9T$7$F$/$l$k$h$&$KMj$`(B.  $B%3%^%s%INs(B @var{s} $B$r<B9T$7$F$/$l$k$h$&$KMj$`(B.
    ($B<!$NNc$G$O(B, $B<1JLHV9f(B 0)
 @end itemize  @end itemize
 */  */
 /*&C-texi  /*&C-texi
Line 402  def sm1(P,F) {
Line 375  def sm1(P,F) {
 /*&jp-texi  /*&jp-texi
 @table @t  @table @t
 @item $B;2>H(B  @item $B;2>H(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  @end table
 */  */
 /*&eg-texi  /*&eg-texi
 @table @t  @table @t
 @item Reference  @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  @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  /*&eg-texi
 @c sort-sm1_push_int0  @c sort-sm1.push_int0
 @menu  @node sm1.push_int0,,, SM1 Functions
 * sm1_push_int0::  @subsection @code{sm1.push_int0}
 @end menu  @findex sm1.push_int0
 @node sm1_push_int0,,, SM1 Functions  
 @subsection @code{sm1_push_int0}  
 @findex sm1_push_int0  
 @table @t  @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}.  ::   push the object @var{f} to the server with the descriptor number @var{p}.
 @end table  @end table
   
Line 558  Note that @code{ox_push_cmo(@var{p},1234)} send the bi
Line 425  Note that @code{ox_push_cmo(@var{p},1234)} send the bi
 @end itemize  @end itemize
 */  */
 /*&jp-texi  /*&jp-texi
 @c sort-sm1_push_int0  @c sort-sm1.push_int0
 @menu  @node sm1.push_int0,,, SM1 Functions
 * sm1_push_int0::  @subsection @code{sm1.push_int0}
 @end menu  @findex sm1.push_int0
 @node sm1_push_int0,,, SM1 $BH!?t(B  
 @subsection @code{sm1_push_int0}  
 @findex sm1_push_int0  
 @table @t  @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.  ::   $B%*%V%8%'%/%H(B @var{f} $B$r<1JL;R(B @var{p} $B$N%5!<%P$XAw$k(B.
 @end table  @end table
   
Line 597  Note that @code{ox_push_cmo(@var{p},1234)} send the bi
Line 461  Note that @code{ox_push_cmo(@var{p},1234)} send the bi
 */  */
 /*&C  /*&C
 @example  @example
 [219] P=sm1_start();  [219] P=sm1.start();
 0  0
 [220] sm1_push_int0(P,x*dx+1);  [220] sm1.push_int0(P,x*dx+1);
 0  0
 [221] A=ox_pop_cmo(P);  [221] A=ox_pop_cmo(P);
 x*dx+1  x*dx+1
Line 608  x*dx+1
Line 472  x*dx+1
 @end example  @end example
   
 @example  @example
 [271] sm1_push_int0(0,[x*(x-1),[x]]);  [271] sm1.push_int0(0,[x*(x-1),[x]]);
 0  0
 [272] ox_execute_string(0," deRham ");  [272] ox_execute_string(0," deRham ");
 0  0
Line 630  x*dx+1
Line 494  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; I<N; I++) {  
     if (!(type(A[I]) == 0 || type(A[I]) == 1 || type(A[I]) == 2 ||  
           type(A[I]) == 7 || type(A[I]) == 9)) {  
       return(0);  
     }  
   }  
   return(1);  
 }  
   
 def sm1_isListOfVar(A) {  
   if (type(A) == 7) return(1); /* "x,y" */  
   if (type(A) != 4) return(0);  
   N = length(A);  
   for (I=0; I<N; I++) {  
     if (!(type(A[I]) == 2 ||  type(A[I]) == 7 )) {  
       return(0);  
     }  
   }  
   return(1);  
 }  
   
 /*&eg-texi  /*&eg-texi
 @c sort-sm1_gb  @c sort-sm1.gb
 @menu  @node sm1.gb,,, SM1 Functions
 * sm1_gb::  @node sm1.gb_d,,, SM1 Functions
 @end menu  @subsection @code{sm1.gb}
 @node sm1_gb,,, SM1 Functions  @findex sm1.gb
 @node sm1_gb_d,,, SM1 Functions  @findex sm1.gb_d
 @subsection @code{sm1_gb}  
 @findex sm1_gb  
 @findex sm1_gb_d  
 @table @t  @table @t
 @item sm1_gb([@var{f},@var{v},@var{w}]|proc=@var{p},sorted=@var{q},dehomogenize=@var{r})  @item sm1.gb([@var{f},@var{v},@var{w}]|proc=@var{p},sorted=@var{q},dehomogenize=@var{r})
 ::  computes the Grobner basis of @var{f} in the ring of differential  ::  computes the Grobner basis of @var{f} in the ring of differential
 operators with the variable @var{v}.  operators with the variable @var{v}.
 @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})
 ::  computes the Grobner basis of @var{f} in the ring of differential  ::  computes the Grobner basis of @var{f} in the ring of differential
 operators with the variable @var{v}.  operators with the variable @var{v}.
 The result will be returned as a list of distributed polynomials.  The result will be returned as a list of distributed polynomials.
Line 790  List
Line 530  List
     If @var{w} is not given,      If @var{w} is not given,
     the graded reverse lexicographic order will be used to compute Grobner basis.      the graded reverse lexicographic order will be used to compute Grobner basis.
 @item  @item
    The return value of @code{sm1_gb}     The return value of @code{sm1.gb}
     is the list of the Grobner basis of @var{f} and the initial      is the list of the Grobner basis of @var{f} and the initial
     terms (when @var{w} is not given) or initial ideal (when @var{w} is given).      terms (when @var{w} is not given) or initial ideal (when @var{w} is given).
 @item  @item
    @code{sm1_gb_d} returns the results by a list of distributed polynomials.     @code{sm1.gb_d} returns the results by a list of distributed polynomials.
     Monomials in each distributed polynomial are ordered in the given order.      Monomials in each distributed polynomial are ordered in the given order.
     The return value consists of      The return value consists of
     [variable names, order matrix, grobner basis in districuted polynomials,      [variable names, order matrix, grobner basis in districuted polynomials,
Line 804  List
Line 544  List
    the homogenized Weyl algebra  (See Section 1.2 of the book of SST).     the homogenized Weyl algebra  (See Section 1.2 of the book of SST).
    The homogenization variable h is automatically added.     The homogenization variable h is automatically added.
 @item  @item
    When the optional variable @var{q} is set, @code{sm1_gb} returns,     When the optional variable @var{q} is set, @code{sm1.gb} returns,
    as the third return value, a list of     as the third return value, a list of
    the Grobner basis and the initial ideal     the Grobner basis and the initial ideal
    with sums of monomials sorted by the given order.     with sums of monomials sorted by the given order.
Line 814  List
Line 554  List
 @end itemize  @end itemize
 */  */
 /*&jp-texi  /*&jp-texi
 @c sort-sm1_gb  @c sort-sm1.gb
 @menu  @node sm1.gb,,, SM1 Functions
 * sm1_gb::  @node sm1.gb_d,,, SM1 Functions
 @end menu  @subsection @code{sm1.gb}
 @node sm1_gb,,, SM1 $BH!?t(B  @findex sm1.gb
 @node sm1_gb_d,,, SM1 $BH!?t(B  @findex sm1.gb_d
 @subsection @code{sm1_gb}  
 @findex sm1_gb  
 @findex sm1_gb_d  
 @table @t  @table @t
 @item sm1_gb([@var{f},@var{v},@var{w}]|proc=@var{p},sorted=@var{q},dehomogenize=@var{r})  @item sm1.gb([@var{f},@var{v},@var{w}]|proc=@var{p},sorted=@var{q},dehomogenize=@var{r})
 ::  @var{v} $B>e$NHyJ,:nMQAG4D$K$*$$$F(B @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B.  ::  @var{v} $B>e$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.  ::  @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  @end table
   
Line 847  List
Line 584  List
    $B>JN,$7$?>l9g(B, graded reverse lexicographic order $B$r$D$+$C$F(B     $B>JN,$7$?>l9g(B, graded reverse lexicographic order $B$r$D$+$C$F(B
    $B%V%l%V%J4pDl$r7W;;$9$k(B.     $B%V%l%V%J4pDl$r7W;;$9$k(B.
 @item  @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)    ( @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.    $B$N%j%9%H$G$"$k(B.
 @item  @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.      $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     $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]      [$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]
Line 869  List
Line 606  List
 */  */
 /*&C-texi  /*&C-texi
 @example  @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]]  [[x*dx+y*dy-1,y^2*dy^2+2],[x*dx,y^2*dy^2]]
 @end example  @end example
 */  */
Line 898  graded reverse lexicographic order $B$K4X$9$k%0%l%V%J
Line 635  graded reverse lexicographic order $B$K4X$9$k%0%l%V%J
 */  */
 /*&C-texi  /*&C-texi
 @example  @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]]  [[dx+dy^3-4*dy,-dy^4+4*dy^2-1],[dx,-dy^4]]
 @end example  @end example
 */  */
Line 931  $m' = x^{a'} y^{b'} \partial_x^{c'} \partial_y^{d'}$
Line 668  $m' = x^{a'} y^{b'} \partial_x^{c'} \partial_y^{d'}$
 */  */
 /*&C-texi  /*&C-texi
 @example  @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][0])$
       map(print,F[2][1])$        map(print,F[2][1])$
 @end example  @end example
Line 939  $m' = x^{a'} y^{b'} \partial_x^{c'} \partial_y^{d'}$
Line 676  $m' = x^{a'} y^{b'} \partial_x^{c'} \partial_y^{d'}$
 /*&C-texi  /*&C-texi
 @example  @example
 [595]  [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,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-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]]   [x*dx^2+(y*dy-h^2)*dx,x*dy*dx+y*dy^2-h^2*dy-h^3,h^3*dx]]
   
 [596]  [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]]]);               "x,y",[[dx,1,x,-1],[dy,1]]]);
 [[[e0,x,y,H,E,dx,dy,h],  [[[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],   [[0,-1,0,0,0,1,0,0],[0,0,0,0,0,0,1,0],[1,0,0,0,0,0,0,0],
Line 966  $m' = x^{a'} y^{b'} \partial_x^{c'} \partial_y^{d'}$
Line 703  $m' = x^{a'} y^{b'} \partial_x^{c'} \partial_y^{d'}$
 /*&eg-texi  /*&eg-texi
 @table @t  @table @t
 @item Reference  @item Reference
     @code{sm1_reduction}, @code{sm1_rat_to_p}      @code{sm1.reduction}, @code{sm1.rat_to_p}
 @end table  @end table
 */  */
 /*&jp-texi  /*&jp-texi
 @table @t  @table @t
 @item $B;2>H(B  @item $B;2>H(B
     @code{sm1_reduction}, @code{sm1_rat_to_p}      @code{sm1.reduction}, @code{sm1.rat_to_p}
 @end table  @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  /*&eg-texi
 @c sort-sm1_deRham  @c sort-sm1.deRham
 @menu  @node sm1.deRham,,, SM1 Functions
 * sm1_deRham::  @subsection @code{sm1.deRham}
 @end menu  @findex sm1.deRham
 @node sm1_deRham,,, SM1 Functions  
 @subsection @code{sm1_deRham}  
 @findex sm1_deRham  
 @table @t  @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  ::  ask the server to evaluate the dimensions of the de Rham cohomology  groups
 of C^n - (the zero set of @var{f}=0).  of C^n - (the zero set of @var{f}=0).
 @end table  @end table
Line 1043  List
Line 744  List
       [dim H^0(X,C), dim H^1(X,C), dim H^2(X,C), ..., dim H^n(X,C)].        [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   @var{v} is a list of variables. n = @code{length(@var{v})}.
 @item  @item
    @code{sm1_deRham} requires huge computer resources.     @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]])}      For example, @code{sm1.deRham(0,[x*y*z*(x+y+z-1)*(x-y),[x,y,z]])}
     is already very hard.      is already very hard.
 @item  @item
  To efficiently analyze the roots of b-function, @code{ox_asir} should be used   To efficiently analyze the roots of b-function, @code{ox_asir} should be used
Line 1053  List
Line 754  List
     by the command @*      by the command @*
    @code{sm1(0,"[(parse) (oxasir.sm1) pushfile] extension");}     @code{sm1(0,"[(parse) (oxasir.sm1) pushfile] extension");}
  This command is automatically executed when @code{ox_sm1_forAsir} is started.   This command is automatically executed when @code{ox_sm1_forAsir} is started.
 @item If you make an interruption to the function @code{sm1_deRham}  @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  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  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  @end itemize
 */  */
 /*&jp-texi  /*&jp-texi
 @c sort-sm1_deRham  @c sort-sm1.deRham
 @menu  @node sm1.deRham,,, SM1 Functions
 * sm1_deRham::  @subsection @code{sm1.deRham}
 @end menu  @findex sm1.deRham
 @node sm1_deRham,,, SM1 $BH!?t(B  
 @subsection @code{sm1_deRham}  
 @findex sm1_deRham  
 @table @t  @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$N<!85$r7W;;$7$F$/$l$k$h$&$K%5!<%P$KMj$`(B.  ::  $B6u4V(B C^n - (the zero set of @var{f}=0) $B$N%I%i!<%`%3%[%b%m%872$N<!85$r7W;;$7$F$/$l$k$h$&$K%5!<%P$KMj$`(B.
 @end table  @end table
   
Line 1090  mode. So, it is strongly recommended to execute the co
Line 788  mode. So, it is strongly recommended to execute the co
    $B$rLa$9(B.     $B$rLa$9(B.
 @item   @var{v} $B$OJQ?t$N%j%9%H(B. n = @code{length(@var{v})} $B$G$"$k(B.  @item   @var{v} $B$OJQ?t$N%j%9%H(B. n = @code{length(@var{v})} $B$G$"$k(B.
 @item  @item
    @code{sm1_deRham} $B$O7W;;5!$N;q8;$rBgNL$K;HMQ$9$k(B.     @code{sm1.deRham} $B$O7W;;5!$N;q8;$rBgNL$K;HMQ$9$k(B.
     $B$?$H$($P(B @code{sm1_deRham(0,[x*y*z*(x+y+z-1)*(x-y),[x,y,z]])}      $B$?$H$($P(B @code{sm1.deRham(0,[x*y*z*(x+y+z-1)*(x-y),[x,y,z]])}
    $B$N7W;;$9$i$9$G$KHs>o$KBgJQ$G$"$k(B.     $B$N7W;;$9$i$9$G$KHs>o$KBgJQ$G$"$k(B.
 @item  @item
   b-$B4X?t$N:,$r8zN($h$/2r@O$9$k$K$O(B, @code{ox_asir} $B$,(B @code{ox_sm1_forAsir}    b-$B4X?t$N:,$r8zN($h$/2r@O$9$k$K$O(B, @code{ox_asir} $B$,(B @code{ox_sm1_forAsir}
Line 1100  mode. So, it is strongly recommended to execute the co
Line 798  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$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*$K<B9T$5$l$F$$$k(B.     $B$3$N%3%^%s%I$O(B @code{ox_asir_forAsir} $B$N%9%?!<%H;~$K<+F0E*$K<B9T$5$l$F$$$k(B.
 @item  @item
   @code{sm1_deRham} $B$r(B @code{ox_reset(Sm1_proc);} $B$GCfCG$9$k$H(B,    @code{sm1.deRham} $B$r(B @code{ox_reset(sm1.get_Sm1_proc());} $B$GCfCG$9$k$H(B,
   $B0J8e(B sm1 $B%5!<%P$,HsI8=`%b!<%I$KF~$jM=4|$7$J$$F0:n$r$9$k>l9g(B    $B0J8e(B sm1 $B%5!<%P$,HsI8=`%b!<%I$KF~$jM=4|$7$J$$F0:n$r$9$k>l9g(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.    $B$r0l;~(B shutdown $B$7$F%j%9%?!<%H$7$?J}$,0BA4$G$"$k(B.
 @end itemize  @end itemize
 */  */
 /*&C-texi  /*&C-texi
 @example  @example
 [332] sm1_deRham([x^3-y^2,[x,y]]);  [332] sm1.deRham([x^3-y^2,[x,y]]);
 [1,1,0]  [1,1,0]
 [333] sm1_deRham([x*(x-1),[x]]);  [333] sm1.deRham([x*(x-1),[x]]);
 [1,2]  [1,2]
 @end example  @end example
 */  */
 /*&eg-texi  /*&eg-texi
 @table @t  @table @t
 @item Reference  @item Reference
     @code{sm1_start}, @code{deRham} (sm1 command)      @code{sm1.start}, @code{deRham} (sm1 command)
 @item Algorithm:  @item Algorithm:
     Oaku, Takayama, An algorithm for de Rham cohomology groups of the      Oaku, Takayama, An algorithm for de Rham cohomology groups of the
     complement of an affine variety via D-module computation,      complement of an affine variety via D-module computation,
Line 1127  mode. So, it is strongly recommended to execute the co
Line 825  mode. So, it is strongly recommended to execute the co
 /*&jp-texi  /*&jp-texi
 @table @t  @table @t
 @item $B;2>H(B  @item $B;2>H(B
     @code{sm1_start}, @code{deRham} (sm1 command)      @code{sm1.start}, @code{deRham} (sm1 command)
 @item Algorithm:  @item Algorithm:
     Oaku, Takayama, An algorithm for de Rham cohomology groups of the      Oaku, Takayama, An algorithm for de Rham cohomology groups of the
     complement of an affine variety via D-module computation,      complement of an affine variety via D-module computation,
Line 1136  mode. So, it is strongly recommended to execute the co
Line 834  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  /*&eg-texi
 @c sort-sm1_hilbert  @c sort-sm1.hilbert
 @menu  @node sm1.hilbert,,, SM1 Functions
 * sm1_hilbert::  @subsection @code{sm1.hilbert}
 * hilbert_polynomial::  @findex sm1.hilbert
 @end menu  
 @node sm1_hilbert,,, SM1 Functions  
 @subsection @code{sm1_hilbert}  
 @findex sm1_hilbert  
 @findex hilbert_polynomial  @findex hilbert_polynomial
 @table @t  @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}.  ::  ask the server to compute the Hilbert polynomial for the set of polynomials @var{f}.
 @item hilbert_polynomial(@var{f},@var{v})  @item hilbert_polynomial(@var{f},@var{v})
 ::  ask the server to compute the Hilbert polynomial for the set of polynomials @var{f}.  ::  ask the server to compute the Hilbert polynomial for the set of polynomials @var{f}.
Line 1271  List
Line 867  List
     degree is less than or equal to k and I is the ideal generated by the      degree is less than or equal to k and I is the ideal generated by the
     set of polynomials @var{f}.      set of polynomials @var{f}.
 @item  @item
    Note for sm1_hilbert:     Note for sm1.hilbert:
    For an efficient computation, it is preferable that     For an efficient computation, it is preferable that
    the set of polynomials @var{f} is a set of monomials.     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     In fact, this function firstly compute a Grobner basis of @var{f}, and then
Line 1283  List
Line 879  List
 @end itemize  @end itemize
 */  */
 /*&jp-texi  /*&jp-texi
 @c sort-sm1_hilbert  @c sort-sm1.hilbert
 @menu  @node sm1.hilbert,,, SM1 Functions
 * sm1_hilbert::  @subsection @code{sm1.hilbert}
 * hilbert_polynomial::  @findex sm1.hilbert
 @end menu  
 @node sm1_hilbert,,, SM1 $BH!?t(B  
 @subsection @code{sm1_hilbert}  
 @findex sm1_hilbert  
 @findex hilbert_polynomial  @findex hilbert_polynomial
 @table @t  @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.  :: $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})  @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.  :: $BB?9`<0$N=89g(B @var{f} $B$N%R%k%Y%k%HB?9`<0$r7W;;$9$k(B.
Line 1315  List
Line 907  List
     h(k) = dim_Q F_k/I \cap F_k  $B$3$3$G(B F_k $B$O<!?t$,(B k $B0J2<$G$"$k$h$&$J(B      h(k) = dim_Q F_k/I \cap F_k  $B$3$3$G(B F_k $B$O<!?t$,(B k $B0J2<$G$"$k$h$&$J(B
     $BB?9`<0$N=89g$G$"$k(B. I $B$OB?9`<0$N=89g(B @var{f} $B$G@8@.$5$l$k%$%G%"%k$G$"$k(B.      $BB?9`<0$N=89g$G$"$k(B. I $B$OB?9`<0$N=89g(B @var{f} $B$G@8@.$5$l$k%$%G%"%k$G$"$k(B.
 @item  @item
    sm1_hilbert $B$K$+$s$9$k%N!<%H(B:     sm1.hilbert $B$K$+$s$9$k%N!<%H(B:
    $B8zN($h$/7W;;$9$k$K$O(B @var{f} $B$O%b%N%_%"%k$N=89g$K$7$?J}$,$$$$(B.     $B8zN($h$/7W;;$9$k$K$O(B @var{f} $B$O%b%N%_%"%k$N=89g$K$7$?J}$,$$$$(B.
    $B<B:](B, $B$3$NH!?t$O$^$:(B @var{f} $B$N%0%l%V%J4pDl$r7W;;$7(B, $B$=$l$+$i$=$N(B initial     $B<B:](B, $B$3$NH!?t$O$^$:(B @var{f} $B$N%0%l%V%J4pDl$r7W;;$7(B, $B$=$l$+$i$=$N(B initial
    monomial $BC#$N%R%k%Y%k%HB?9`<0$r7W;;$9$k(B.     monomial $BC#$N%R%k%Y%k%HB?9`<0$r7W;;$9$k(B.
Line 1350  List
Line 942  List
 [u0,u3^2,u3*u2,u2^2,u2*u1,u1^2,u5*u4*u3,u4^2*u3,u4^2*u2,u4^2*u1,u4*u3*u1,  [u0,u3^2,u3*u2,u2^2,u2*u1,u1^2,u5*u4*u3,u4^2*u3,u4^2*u2,u4^2*u1,u4*u3*u1,
  u5^2*u4^2,u5^2*u4*u2,u5^2*u4*u1,u5^2*u3*u1,u5*u4^3,u4^4,u5^4*u4,u5^4*u3,   u5^2*u4^2,u5^2*u4*u2,u5^2*u4*u1,u5^2*u3*u1,u5*u4^3,u4^4,u5^4*u4,u5^4*u3,
  u5^4*u2,u5^4*u1,u5^6]   u5^4*u2,u5^4*u1,u5^6]
 [284] sm1_hilbert([C,[u0,u1,u2,u3,u4,u5]]);  [284] sm1.hilbert([C,[u0,u1,u2,u3,u4,u5]]);
 32  32
 @end example  @end example
 */  */
Line 1358  List
Line 950  List
 /*&eg-texi  /*&eg-texi
 @table @t  @table @t
 @item Reference  @item Reference
     @code{sm1_start}, @code{sm1_gb}, @code{longname}      @code{sm1.start}, @code{sm1.gb}, @code{longname}
 @end table  @end table
 */  */
 /*&jp-texi  /*&jp-texi
 @table @t  @table @t
 @item $B;2>H(B  @item $B;2>H(B
     @code{sm1_start}, @code{sm1_gb}, @code{longname}      @code{sm1.start}, @code{sm1.gb}, @code{longname}
 @end table  @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  /*&eg-texi
 @c sort-sm1_genericAnn  @c sort-sm1.genericAnn
 @menu  @node sm1.genericAnn,,, SM1 Functions
 * sm1_genericAnn::  @subsection @code{sm1.genericAnn}
 @end menu  @findex sm1.genericAnn
 @node sm1_genericAnn,,, SM1 Functions  
 @subsection @code{sm1_genericAnn}  
 @findex sm1_genericAnn  
 @table @t  @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.  ::  It computes  the annihilating ideal for @var{f}^s.
     @var{v} is the list of variables.  Here, s is @var{v}[0] and      @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}).      @var{f} is a polynomial in the variables @code{rest}(@var{v}).
Line 1415  List
Line 991  List
 @end itemize  @end itemize
 */  */
 /*&jp-texi  /*&jp-texi
 @c sort-sm1_genericAnn  @c sort-sm1.genericAnn
 @menu  @node sm1.genericAnn,,, SM1 Functions
 * sm1_genericAnn::  @subsection @code{sm1.genericAnn}
 @end menu  @findex sm1.genericAnn
 @node sm1_genericAnn,,, SM1 $BH!?t(B  
 @subsection @code{sm1_genericAnn}  
 @findex sm1_genericAnn  
 @table @t  @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{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{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.      @var{f} $B$OJQ?t(B @code{rest}(@var{v}) $B>e$NB?9`<0$G$"$k(B.
Line 1449  List
Line 1022  List
 */  */
 /*&C-texi  /*&C-texi
 @example  @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]  [-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  @end example
 */  */
 /*&eg-texi  /*&eg-texi
 @table @t  @table @t
 @item Reference  @item Reference
     @code{sm1_start}      @code{sm1.start}
 @end table  @end table
 */  */
 /*&jp-texi  /*&jp-texi
 @table @t  @table @t
 @item $B;2>H(B  @item $B;2>H(B
     @code{sm1_start}      @code{sm1.start}
 @end table  @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  /*&eg-texi
 @c sort-sm1_wTensor0  @c sort-sm1.wTensor0
 @menu  @node sm1.wTensor0,,, SM1 Functions
 * sm1_wTensor0::  @subsection @code{sm1.wTensor0}
 @end menu  @findex sm1.wTensor0
 @node sm1_wTensor0,,, SM1 Functions  
 @subsection @code{sm1_wTensor0}  
 @findex sm1_wTensor0  
 @table @t  @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  ::   It computes the D-module theoretic 0-th tensor product
     of @var{f} and @var{g}.      of @var{f} and @var{g}.
 @end table  @end table
Line 1516  List
Line 1070  List
   @var{w} is a list of weights.  The integer @var{w}[i] is    @var{w} is a list of weights.  The integer @var{w}[i] is
   the weight of the variable @var{v}[i].    the weight of the variable @var{v}[i].
 @item  @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     which requires a generic weight
     vector @var{w} to compute the restriction.      vector @var{w} to compute the restriction.
     If @var{w} is not generic, the computation fails.      If @var{w} is not generic, the computation fails.
Line 1529  the inputs @var{f} and @var{g} are left ideals of D.
Line 1083  the inputs @var{f} and @var{g} are left ideals of D.
 */  */
   
 /*&jp-texi  /*&jp-texi
 @c sort-sm1_wTensor0  @c sort-sm1.wTensor0
 @menu  @node sm1.wTensor0,,, SM1 Functions
 * sm1_wTensor0::  @subsection @code{sm1.wTensor0}
 @end menu  @findex sm1.wTensor0
 @node sm1_wTensor0,,, SM1 $BH!?t(B  
 @subsection @code{sm1_wTensor0}  
 @findex sm1_wTensor0  
 @table @t  @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 $B<!%F%s%=%k@Q$r(B  ::   @var{f} $B$H(B @var{g} $B$N(B D-module $B$H$7$F$N(B 0 $B<!%F%s%=%k@Q$r(B
 $B7W;;$9$k(B.  $B7W;;$9$k(B.
 @end table  @end table
Line 1560  the inputs @var{f} and @var{g} are left ideals of D.
Line 1111  the inputs @var{f} and @var{g} are left ideals of D.
   @var{w} $B$O(B weight $B$N%j%9%H$G$"$k(B.    @var{w} $B$O(B weight $B$N%j%9%H$G$"$k(B.
   $B@0?t(B @var{w}[i] $B$OJQ?t(B @var{v}[i] $B$N(B weight $B$G$"$k(B.    $B@0?t(B @var{w}[i] $B$OJQ?t(B @var{v}[i] $B$N(B weight $B$G$"$k(B.
 @item  @item
    @code{sm1_wTensor0} $B$O(B @code{ox_sm1} $B$N(B @code{wRestriction0}     @code{sm1.wTensor0} $B$O(B @code{ox_sm1} $B$N(B @code{wRestriction0}
    $B$r$h$s$G$$$k(B.     $B$r$h$s$G$$$k(B.
   @code{wRestriction0} $B$O(B, generic $B$J(B weight $B%Y%/%H%k(B @var{w}    @code{wRestriction0} $B$O(B, generic $B$J(B weight $B%Y%/%H%k(B @var{w}
   $B$r$b$H$K$7$F@)8B$r7W;;$7$F$$$k(B.    $B$r$b$H$K$7$F@)8B$r7W;;$7$F$$$k(B.
Line 1573  the inputs @var{f} and @var{g} are left ideals of D.
Line 1124  the inputs @var{f} and @var{g} are left ideals of D.
 */  */
 /*&C-texi  /*&C-texi
 @example  @example
 [258]  sm1_wTensor0([[x*dx -1, y*dy -4],[dx+dy,dx-dy^2],[x,y],[1,2]]);  [258]  sm1.wTensor0([[x*dx -1, y*dy -4],[dx+dy,dx-dy^2],[x,y],[1,2]]);
 [[-y*x*dx-y*x*dy+4*x+y],[5*x*dx^2+5*x*dx+2*y*dy^2+(-2*y-6)*dy+3],  [[-y*x*dx-y*x*dy+4*x+y],[5*x*dx^2+5*x*dx+2*y*dy^2+(-2*y-6)*dy+3],
  [-25*x*dx+(-5*y*x-2*y^2)*dy^2+((5*y+15)*x+2*y^2+16*y)*dy-20*x-8*y-15],   [-25*x*dx+(-5*y*x-2*y^2)*dy^2+((5*y+15)*x+2*y^2+16*y)*dy-20*x-8*y-15],
  [y^2*dy^2+(-y^2-8*y)*dy+4*y+20]]   [y^2*dy^2+(-y^2-8*y)*dy+4*y+20]]
Line 1581  the inputs @var{f} and @var{g} are left ideals of D.
Line 1132  the inputs @var{f} and @var{g} are left ideals of D.
 */  */
   
   
 def sm1_wTensor0(F) {  
   SM1_FIND_PROC(P);  
   sm1_push_int0(P,F);  
   sm1(P, " wTensor0 ");  
   B = sm1_pop(P);  
   return(B);  
 }  
   
   
 /*&eg-texi  /*&eg-texi
 @c sort-sm1_reduction  @c sort-sm1.reduction
 @menu  @node sm1.reduction,,, SM1 Functions
 * sm1_reduction::  @subsection @code{sm1.reduction}
 @end menu  @findex sm1.reduction
 @node sm1_reduction,,, SM1 Functions  
 @subsection @code{sm1_reduction}  
 @findex sm1_reduction  
 @table @t  @table @t
 @item sm1_reduction([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})  @item sm1.reduction([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})
 ::  ::
 @end table  @end table
   
Line 1619  Number  (the process number of ox_sm1)
Line 1159  Number  (the process number of ox_sm1)
 in the homogenized Weyl algebra; it applies the  in the homogenized Weyl algebra; it applies the
 division algorithm to @var{f}. The set of variables is @var{v} and  division algorithm to @var{f}. The set of variables is @var{v} and
 @var{w} is weight vectors to determine the order, which can be ommited.  @var{w} is weight vectors to determine the order, which can be ommited.
 @code{sm1_reduction_noH} is for the Weyl algebra.  @code{sm1.reduction_noH} is for the Weyl algebra.
 @item The return value is of the form  @item The return value is of the form
 [r,c0,[c1,...,cm],[g1,...gm]] where @var{g}=[g1, ..., gm] and  [r,c0,[c1,...,cm],[g1,...gm]] where @var{g}=[g1, ..., gm] and
 r/c0 + c1 g1 + ... + cm gm = 0.  c0 f + c1 g1 + ... + cm gm = r.
 r/c0 is the normal form.  r/c0 is the normal form.
 @item The function reduction reduces reducible terms that appear  @item The function reduction reduces reducible terms that appear
 in lower order terms.  in lower order terms.
 @item  The functions  @item  The functions
 sm1_reduction_d(P,F,G) and sm1_reduction_noH_d(P,F,G)  sm1.reduction_d(P,F,G) and sm1.reduction_noH_d(P,F,G)
 are for distributed polynomials.  are for distributed polynomials.
 @end itemize  @end itemize
 */  */
 /*&jp-texi  /*&jp-texi
 @menu  @node sm1.reduction,,, SM1 Functions
 * sm1_reduction::  @subsection @code{sm1.reduction}
 @end menu  @findex sm1.reduction
 @node sm1_reduction,,, SM1 $BH!?t(B  
 @subsection @code{sm1_reduction}  
 @findex sm1_reduction  
 @table @t  @table @t
 @item sm1_reduction([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})  @item sm1.reduction([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})
 ::  ::
 @end table  @end table
   
Line 1661  are for distributed polynomials.
Line 1198  are for distributed polynomials.
 $BJQ?t=89g$O(B @var{v} $B$G;XDj$9$k(B.  $BJQ?t=89g$O(B @var{v} $B$G;XDj$9$k(B.
 @var{w} $B$O=g=x$r;XDj$9$k$?$a$N(B $B%&%(%$%H%Y%/%H%k$G$"$j(B,  @var{w} $B$O=g=x$r;XDj$9$k$?$a$N(B $B%&%(%$%H%Y%/%H%k$G$"$j(B,
 $B>JN,$7$F$b$h$$(B.  $B>JN,$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$O<!$N7A$r$7$F$$$k(B:  @item $BLa$jCM$O<!$N7A$r$7$F$$$k(B:
 [r,c0,[c1,...,cm],[g1,...gm]] $B$3$3$G(B @var{g}=[g1, ..., gm] $B$G$"$j(B,  [r,c0,[c1,...,cm],g] $B$3$3$G(B @var{g}=[g1, ..., gm] $B$G$"$j(B,
 r/c0 + c1 g1 + ... + cm gm = 0  c0 f + c1 g1 + ... + cm gm = r
 $B$,$J$j$?$D(B.  $B$,$J$j$?$D(B.
 r/c0 $B$,(B normal form $B$G$"$k(B.  r/c0 $B$,(B normal form $B$G$"$k(B.
 @item $B$3$NH!?t$O(B, $BDc<!9`$K$"$i$o$l$k(B reducible $B$J9`$b4JC12=$9$k(B.  @item $B$3$NH!?t$O(B, $BDc<!9`$K$"$i$o$l$k(B reducible $B$J9`$b4JC12=$9$k(B.
 @item  $BH!?t(B  @item  $BH!?t(B
 sm1_reduction_d(P,F,G) $B$*$h$S(B sm1_reduction_noH_d(P,F,G)  sm1.reduction_d(P,F,G) $B$*$h$S(B sm1.reduction_noH_d(P,F,G)
 $B$O(B, $BJ,;6B?9`<0MQ$G$"$k(B.  $B$O(B, $BJ,;6B?9`<0MQ$G$"$k(B.
 @end itemize  @end itemize
 */  */
 /*&C-texi  /*&C-texi
 @example  @example
 [259] sm1_reduction([x^2+y^2-4,[y^4-4*y^2+1,x+y^3-4*y],[x,y]]);  [259] sm1.reduction([x^2+y^2-4,[y^4-4*y^2+1,x+y^3-4*y],[x,y]]);
 [x^2+y^2-4,1,[0,0],[x+y^3-4*y,y^4-4*y^2+1]]  [x^2+y^2-4,1,[0,0],[y^4-4*y^2+1,x+y^3-4*y]]
 [260] sm1_reduction([x^2+y^2-4,[y^4-4*y^2+1,x+y^3-4*y],[x,y],[[x,1]]]);  [260] sm1.reduction([x^2+y^2-4,[y^4-4*y^2+1,x+y^3-4*y],[x,y],[[x,1]]]);
 [0,1,[-y^2+4,-x+y^3-4*y],[x+y^3-4*y,y^4-4*y^2+1]]  [0,1,[-y^2+4,-x+y^3-4*y],[y^4-4*y^2+1,x+y^3-4*y]]
 @end example  @end example
 */  */
 /*&eg-texi  /*&eg-texi
 @table @t  @table @t
 @item Reference  @item Reference
     @code{sm1_start}, @code{sm1_find_proc}, @code{d_true_nf}      @code{sm1.start}, @code{Sm1_find_proc}, @code{d_true_nf}
 @end table  @end table
 */  */
 /*&jp-texi  /*&jp-texi
 @table @t  @table @t
 @item $B;2>H(B  @item $B;2>H(B
     @code{sm1_start}, @code{sm1_find_proc}, @code{d_true_nf}      @code{sm1.start}, @code{sm1_find_proc}, @code{d_true_nf}
 @end table  @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  /*&eg-texi
 @menu  @node sm1.xml_tree_to_prefix_string,,, SM1 Functions
 * sm1_xml_tree_to_prefix_string::  @subsection @code{sm1.xml_tree_to_prefix_string}
 @end menu  @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  @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.  :: Translate OpenMath Tree Expression @var{s} in XML to a prefix notation.
 @end table  @end table
   
Line 1760  command search path.)
Line 1261  command search path.)
 @end itemize  @end itemize
 */  */
 /*&jp-texi  /*&jp-texi
 @menu  @node sm1.xml_tree_to_prefix_string,,, SM1 Functions
 * sm1_xml_tree_to_prefix_string::  @subsection @code{sm1.xml_tree_to_prefix_string}
 @end menu  @findex sm1.xml_tree_to_prefix_string
 @node sm1_xml_tree_to_prefix_string,,, SM1 $BH!?t(B  
 @subsection @code{sm1_xml_tree_to_prefix_string}  
 @findex sm1_xml_tree_to_prefix_string  
 @table @t  @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.  :: XML $B$G=q$+$l$?(B OpenMath $B$NLZI=8=(B @var{s} $B$rA0CV5-K!$K$J$*$9(B.
 @end table  @end table
   
Line 1802  Trying to connect to the server... Done.
Line 1300  Trying to connect to the server... Done.
 <OMI>1</OMI></OMA><OMA><OMS name="times" cd="basic"/><OMA>  <OMI>1</OMI></OMA><OMA><OMS name="times" cd="basic"/><OMA>
 <OMS name="power" cd="basic"/><OMV name="x"/><OMI>0</OMI></OMA>  <OMS name="power" cd="basic"/><OMV name="x"/><OMI>0</OMI></OMA>
 <OMI>-1</OMI></OMA></OMA></OMOBJ>  <OMI>-1</OMI></OMA></OMA></OMOBJ>
 [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))  basic_plus(basic_times(basic_power(x,4),1),basic_times(basic_power(x,0),-1))
 @end example  @end example
 */  */
Line 1820  basic_plus(basic_times(basic_power(x,4),1),basic_times
Line 1318  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  /*&eg-texi
 @c sort-sm1_syz  @c sort-sm1.syz
 @menu  @node sm1.syz,,, SM1 Functions
 * sm1_syz::  @node sm1.syz_d,,, SM1 Functions
 @end menu  @subsection @code{sm1.syz}
 @node sm1_syz,,, SM1 Functions  @findex sm1.syz
 @node sm1_syz_d,,, SM1 Functions  @findex sm1.syz_d
 @subsection @code{sm1_syz}  
 @findex sm1_syz  
 @findex sm1_syz_d  
 @table @t  @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  ::  computes the syzygy of @var{f} in the ring of differential
 operators with the variable @var{v}.  operators with the variable @var{v}.
 @end table  @end table
Line 1932  In summary, @var{g} = @var{m} @var{f} and
Line 1365  In summary, @var{g} = @var{m} @var{f} and
 @end itemize  @end itemize
 */  */
 /*&jp-texi  /*&jp-texi
 @c sort-sm1_syz  @c sort-sm1.syz
 @menu  @node sm1.syz,,, SM1 Functions
 * sm1_syz::  @node sm1.syz_d,,, SM1 Functions
 @end menu  @subsection @code{sm1.syz}
 @node sm1_syz,,, SM1 $BH!?t(B  @findex sm1.syz
 @node sm1_syz_d,,, SM1 $BH!?t(B  @findex sm1.syz_d
 @subsection @code{sm1_syz}  
 @findex sm1_syz  
 @findex sm1_syz_d  
 @table @t  @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.  ::  @var{v} $B>e$NHyJ,:nMQAG4D$K$*$$$F(B @var{f} $B$N(B syzygy $B$r7W;;$9$k(B.
 @end table  @end table
   
Line 1979  syzygy $B$G$"$k(B.
Line 1409  syzygy $B$G$"$k(B.
 */  */
 /*&C-texi  /*&C-texi
 @example  @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  [[[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   [[[x*dx+y*dy-1],[y^2*dy^2+2]],   grobner basis
   [[1,0],[y*dy,-1]],              transformation matrix    [[1,0],[y*dy,-1]],              transformation matrix
Line 1988  syzygy $B$G$"$k(B.
Line 1418  syzygy $B$G$"$k(B.
 */  */
 /*&C-texi  /*&C-texi
 @example  @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  [[[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   [[[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]],    [h^4*x*dx+y^3*dy^3+3*h^2*y^2*dy^2-3*h^4*y*dy]],
Line 1998  syzygy $B$G$"$k(B.
Line 1428  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  /*&eg-texi
 @menu  @node sm1.mul,,, SM1 Functions
 * sm1_mul::  @subsection @code{sm1.mul}
 @end menu  @findex sm1.mul
 @node sm1_mul,,, SM1 Functions  
 @subsection @code{sm1_mul}  
 @findex sm1_mul  
 @table @t  @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}.  ::  ask the sm1 server to multiply @var{f} and @var{g} in the ring of differential operators over @var{v}.
 @end table  @end table
   
Line 2056  List
Line 1451  List
   
 @itemize @bullet  @itemize @bullet
 @item Ask the sm1 server to multiply @var{f} and @var{g} in the ring of differential operators over @var{v}.  @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  @end itemize
 */  */
   
 /*&jp-texi  /*&jp-texi
 @menu  @node sm1.mul,,, SM1 Functions
 * sm1_mul::  @subsection @code{sm1.mul}
 @end menu  @findex sm1.mul
 @node sm1_mul,,, SM1 $BH!?t(B  
 @subsection @code{sm1_mul}  
 @findex sm1_mul  
 @table @t  @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}  ::  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.  $B>e$NHyJ,:nMQAG4D$G$d$C$F$/$l$k$h$&$KMj$`(B.
 @end table  @end table
Line 2087  List
Line 1479  List
 @itemize @bullet  @itemize @bullet
 @item   sm1$B%5!<%P(B $B$K(B @var{f} $B$+$1$k(B @var{g} $B$r(B @var{v}  @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.  $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  @end itemize
 */  */
   
 /*&C-texi  /*&C-texi
   
 @example  @example
 [277] sm1_mul(dx,x,[x]);  [277] sm1.mul(dx,x,[x]);
 x*dx+1  x*dx+1
 [278] sm1_mul([x,y],[1,2],[x,y]);  [278] sm1.mul([x,y],[1,2],[x,y]);
 x+2*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]]  [[x+2,y+4],[3*x+4,3*y+8]]
 @end example  @end example
   
Line 2106  x+2*y
Line 1498  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<N; I++) {  
       for (J=0; J<M; J++) {  
         C[J][I] = B[I][J];  
       }  
     }  
     D = newvect(M);  
     for (J=0; J<M; J++) {  
       D[J] = C[J];  
     }  
     return(map(vtol,vtol(D)));  
   }else{  
     print(A)$  
     error("tranpose: traspose for this argument has not been implemented.");  
   }  
 }  
   
 def sm1_resol1(A) {  
   SM1_FIND_PROC(P);  
   sm1_push_int0(P,A);  
   sm1(P," res*resol1 ");  
   ox_check_errors2(P);  
   return(sm1_pop(P));  
 }  
   
   
 def sm1_gcd_aux(A,B) {  
   if (type(A) == 1 && type(B) == 1) return(igcd(A,B));  
   else return(gcd(A,B));  
 }  
   
 def sm1_lcm_aux(V) {  /* sm1_lcm_aux([3,5,6]); */  
   N = length(V);  
   if (N == 0) return(0);  
   if (N == 1) return(V[0]);  
   L = V[0];  
   for (I=1; I<N; I++) {  
     L = red(L*V[I]/sm1_gcd_aux(L,V[I]));  
   }  
   return(L);  
 }  
   
 def sm1_mul_v(V,S) {  
   if (type(V) == 4) {  
     return(map(sm1_mul_v,V,S));  
   } else {  
     return(V*S);  
   }  
 }  
   
 def sm1_div_v(V,S) {  
   if (type(V) == 4) {  
     return(map(sm1_div_v,V,S));  
   } else {  
     return(V/S);  
   }  
 }  
   
   
 def sm1_rat_to_p_aux(T) {  /* cf. sm1_rat2plist2 */  
   T = red(T);  
   T1 = nm(T); T1a = ptozp(T1);  
   T1b = red(T1a/T1);  
   T2 = dn(T);  
   return([T1a*dn(T1b),T2*nm(T1b)]);  
 }  
   
 def sm1_denom_aux0(A) {  
   return(A[1]);  
 }  
 def sm1_num_aux0(P) {  
   return(P[0]);  
 }  
   
 def sm1_rat_to_p(T) {  
   if (type(T) == 4) {  
      A = map(sm1_rat_to_p,T);  
      D = map(sm1_denom_aux0,A);  
      N = map(sm1_num_aux0,A);  
      L = sm1_lcm_aux(D);  
      B = newvect(length(N));  
      for (I=0; I<length(N); I++) {  
        B[I] = sm1_mul_v(N[I],L/D[I]);  
      }  
      return([vtol(B),L]);  
   }else{  
      return(sm1_rat_to_p_aux(T));  
   }  
 }  
   
   
   
 /* ---------------------------------------------- */  
 def sm1_distraction(A) {  
   SM1_FIND_PROC(P);  
   sm1_push_int0(P,A);  
   sm1(P," distraction2* ");  
   ox_check_errors2(P);  
   return(sm1_pop(P));  
 }  
   
 /*&eg-texi  /*&eg-texi
 @menu  @node sm1.distraction,,, SM1 Functions
 * sm1_distraction::  @subsection @code{sm1.distraction}
 @end menu  @findex sm1.distraction
 @node sm1_distraction,,, SM1 Functions  
 @subsection @code{sm1_distraction}  
 @findex sm1_distraction  
 @table @t  @table @t
 @item sm1_distraction([@var{f},@var{v},@var{x},@var{d},@var{s}]|proc=@var{p})  @item sm1.distraction([@var{f},@var{v},@var{x},@var{d},@var{s}]|proc=@var{p})
 ::  ask the @code{sm1} server to compute the distraction of @var{f}.  ::  ask the @code{sm1} server to compute the distraction of @var{f}.
 @end table  @end table
   
Line 2262  See Saito, Sturmfels, Takayama : Grobner Deformations 
Line 1531  See Saito, Sturmfels, Takayama : Grobner Deformations 
 */  */
   
 /*&jp-texi  /*&jp-texi
 @menu  @node sm1.distraction,,, SM1 Functions
 * sm1_distraction::  
 @end menu  
 @node sm1_distraction,,, SM1 $BH!?t(B  
   
 @subsection @code{sm1_distraction}  @subsection @code{sm1.distraction}
 @findex sm1_distraction  @findex sm1.distraction
 @table @t  @table @t
 @item sm1_distraction([@var{f},@var{v},@var{x},@var{d},@var{s}]|proc=@var{p})  @item sm1.distraction([@var{f},@var{v},@var{x},@var{d},@var{s}]|proc=@var{p})
 ::  @code{sm1} $B$K(B @var{f} $B$N(B distraction $B$r7W;;$7$F$b$i$&(B.  ::  @code{sm1} $B$K(B @var{f} $B$N(B distraction $B$r7W;;$7$F$b$i$&(B.
 @end table  @end table
   
Line 2298  See Saito, Sturmfels, Takayama : Grobner Deformations 
Line 1564  See Saito, Sturmfels, Takayama : Grobner Deformations 
 /*&C-texi  /*&C-texi
   
 @example  @example
 [280] sm1_distraction([x*dx,[x],[x],[dx],[x]]);  [280] sm1.distraction([x*dx,[x],[x],[dx],[x]]);
 x  x
 [281] sm1_distraction([dx^2,[x],[x],[dx],[x]]);  [281] sm1.distraction([dx^2,[x],[x],[dx],[x]]);
 x^2-x  x^2-x
 [282] sm1_distraction([x^2,[x],[x],[dx],[x]]);  [282] sm1.distraction([x^2,[x],[x],[dx],[x]]);
 x^2+3*x+2  x^2+3*x+2
 [283] fctr(@@);  [283] fctr(@@);
 [[1,1],[x+1,1],[x+2,1]]  [[1,1],[x+1,1],[x+2,1]]
 [284] sm1_distraction([x*dx*y+x^2*dx^2*dy,[x,y],[x],[dx],[x]]);  [284] sm1.distraction([x*dx*y+x^2*dx^2*dy,[x,y],[x],[dx],[x]]);
 (x^2-x)*dy+x*y  (x^2-x)*dy+x*y
 @end example  @end example
 */  */
Line 2325  x^2+3*x+2
Line 1591  x^2+3*x+2
 @end table  @end table
 */  */
   
 /* Temporary functions */  
 /* Use this function for a while to wait a fix of asir. */  
 def sm1_ntoint32(I) {   /* Fixed */  
   SM1_FIND_PROC(P);  
   if (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; I<length(A); I++) {  
     AA = append(AA,[map(ntoint32,A[I])]);  
     BB = append(BB,[ntoint32(0)]);  
   }  
   sm1(P,"[ ");  
   sm1_push_int0(P,AA);  
   sm1_push_int0(P,BB);  
   sm1(P," ] gkz ");  
   ox_check_errors2(P);  
   R = sm1_pop(P);  
   RR0 = map(eval_str,R[0]);  
   RR1 = map(eval_str,R[1]);  
   RR3 = [ ];  
   for (I=0; I<length(B); I++) {  
     RR3 = append(RR3,[ sm1_rat_to_p(RR0[I]-B[I])[0] ]);  
   }  
   for (I=length(B); I<length(RR0); I++) {  
     RR3 = append(RR3,[RR0[I]]);  
   }  
   return([RR3,RR1]);  
 }  
   
   
 /*&eg-texi  /*&eg-texi
 @menu  @node sm1.gkz,,, SM1 Functions
 * sm1_gkz::  @subsection @code{sm1.gkz}
 @end menu  @findex sm1.gkz
 @node sm1_gkz,,, SM1 Functions  
 @subsection @code{sm1_gkz}  
 @findex sm1_gkz  
 @table @t  @table @t
 @item sm1_gkz([@var{A},@var{B}]|proc=@var{p})  @item sm1.gkz([@var{A},@var{B}]|proc=@var{p})
 ::  Returns the GKZ system (A-hypergeometric system) associated to the matrix  ::  Returns the GKZ system (A-hypergeometric system) associated to the matrix
 @var{A} with the parameter vector @var{B}.  @var{A} with the parameter vector @var{B}.
 @end table  @end table
Line 2413  List
Line 1619  List
 */  */
   
 /*&jp-texi  /*&jp-texi
 @menu  @node sm1.gkz,,, SM1 Functions
 * sm1_gkz::  @subsection @code{sm1.gkz}
 @end menu  @findex sm1.gkz
 @node sm1_gkz,,, SM1 $BH!?t(B  
 @subsection @code{sm1_gkz}  
 @findex sm1_gkz  
 @table @t  @table @t
 @item sm1_gkz([@var{A},@var{B}]|proc=@var{p})  @item sm1.gkz([@var{A},@var{B}]|proc=@var{p})
 ::  $B9TNs(B @var{A} $B$H%Q%i%a!<%?(B @var{B} $B$KIU?o$7$?(B GKZ $B7O(B (A-hypergeometric system) $B$r$b$I$9(B.  ::  $B9TNs(B @var{A} $B$H%Q%i%a!<%?(B @var{B} $B$KIU?o$7$?(B GKZ $B7O(B (A-hypergeometric system) $B$r$b$I$9(B.
 @end table  @end table
   
Line 2442  List
Line 1645  List
   
 @example  @example
   
 [280] sm1_gkz([  [[1,1,1,1],[0,1,3,4]],  [0,2] ]);  [280] sm1.gkz([  [[1,1,1,1],[0,1,3,4]],  [0,2] ]);
 [[x4*dx4+x3*dx3+x2*dx2+x1*dx1,4*x4*dx4+3*x3*dx3+x2*dx2-2,  [[x4*dx4+x3*dx3+x2*dx2+x1*dx1,4*x4*dx4+3*x3*dx3+x2*dx2-2,
  -dx1*dx4+dx2*dx3,-dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],   -dx1*dx4+dx2*dx3,-dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],
  [x1,x2,x3,x4]]   [x1,x2,x3,x4]]
Line 2452  List
Line 1655  List
 */  */
   
   
 def sm1_appell1(S) {  
   N = length(S)-2;  
   B = cdr(cdr(S));  
   A = S[0];  
   C = S[1];  
   V = [ ];  
   for (I=0; I<N; I++) {  
     V = append(V,[sm1aux_x(I+1)]);  
   }  
   Ans = [ ];  
   Euler = 0;  
   for (I=0; I<N; I++) {  
     Euler = sm1aux_x(I+1)*sm1aux_dx(I+1) + Euler;  
   }  
   for (I=0; I<N; I++) {  
     T = sm1_mul(sm1aux_dx(I+1), Euler+C-1,V)-  
         sm1_mul(Euler+A, sm1aux_x(I+1)*sm1aux_dx(I+1)+B[I],V);  
     /* Tmp=sm1_rat_to_p(T);  
     print(Tmp[0]/Tmp[1]-T)$ */  
     T = sm1_rat_to_p(T)[0];  
     Ans = append(Ans,[T]);  
   }  
   for (I=0; I<N; I++) {  
     for (J=I+1; J<N; J++) {  
       T = (sm1aux_x(I+1)-sm1aux_x(J+1))*sm1aux_dx(I+1)*sm1aux_dx(J+1)  
          - B[J]*sm1aux_dx(I+1) + B[I]*sm1aux_dx(J+1);  
       /* Tmp=sm1_rat_to_p(T);  
       print(Tmp[0]/Tmp[1]-T)$ */  
       T = sm1_rat_to_p(T)[0];  
       Ans = append(Ans,[T]);  
     }  
   }  
   return([Ans,V]);  
 }  
   
   
 def sm1aux_dx(I) {  
   return(strtov("dx"+rtostr(I)));  
 }  
 def sm1aux_x(I) {  
   return(strtov("x"+rtostr(I)));  
 }  
   
   
   
 /*&eg-texi  /*&eg-texi
 @menu  @node sm1.appell1,,, SM1 Functions
 * sm1_appell1::  @subsection @code{sm1.appell1}
 @end menu  @findex sm1.appell1
 @node sm1_appell1,,, SM1 Functions  
 @subsection @code{sm1_appell1}  
 @findex sm1_appell1  
 @table @t  @table @t
 @item sm1_appell1(@var{a}|proc=@var{p})  @item sm1.appell1(@var{a}|proc=@var{p})
 ::  Returns the Appell hypergeometric system F_1 or F_D.  ::  Returns the Appell hypergeometric system F_1 or F_D.
 @end table  @end table
   
Line 2528  The parameters a, c, b1, ..., bn may be rational numbe
Line 1685  The parameters a, c, b1, ..., bn may be rational numbe
 */  */
   
 /*&jp-texi  /*&jp-texi
 @menu  @node sm1.appell1,,, SM1 Functions
 * sm1_appell1::  @subsection @code{sm1.appell1}
 @end menu  @findex sm1.appell1
 @node sm1_appell1,,, SM1 $BH!?t(B  
 @subsection @code{sm1_appell1}  
 @findex sm1_appell1  
 @table @t  @table @t
 @item sm1_appell1(@var{a}|proc=@var{p})  @item sm1.appell1(@var{a}|proc=@var{p})
 :: F_1 $B$^$?$O(B F_D $B$KBP1~$9$kJ}Dx<07O$rLa$9(B.  :: F_1 $B$^$?$O(B F_D $B$KBP1~$9$kJ}Dx<07O$rLa$9(B.
 @end table  @end table
   
Line 2561  F_D(a,b1,b2,...,bn,c;x1,...,xn)
Line 1715  F_D(a,b1,b2,...,bn,c;x1,...,xn)
   
 @example  @example
   
 [281] sm1_appell1([1,2,3,4]);  [281] sm1.appell1([1,2,3,4]);
 [[((-x1+1)*x2*dx1-3*x2)*dx2+(-x1^2+x1)*dx1^2+(-5*x1+2)*dx1-3,  [[((-x1+1)*x2*dx1-3*x2)*dx2+(-x1^2+x1)*dx1^2+(-5*x1+2)*dx1-3,
   (-x2^2+x2)*dx2^2+((-x1*x2+x1)*dx1-6*x2+2)*dx2-4*x1*dx1-4,    (-x2^2+x2)*dx2^2+((-x1*x2+x1)*dx1-6*x2+2)*dx2-4*x1*dx1-4,
   ((-x2+x1)*dx1+3)*dx2-4*dx1],       equations    ((-x2+x1)*dx1+3)*dx2-4*dx1],       equations
  [x1,x2]]                            the list of variables   [x1,x2]]                            the list of variables
   
 [282] sm1_gb(@@);  [282] sm1.gb(@@);
 [[((-x2+x1)*dx1+3)*dx2-4*dx1,((-x1+1)*x2*dx1-3*x2)*dx2+(-x1^2+x1)*dx1^2  [[((-x2+x1)*dx1+3)*dx2-4*dx1,((-x1+1)*x2*dx1-3*x2)*dx2+(-x1^2+x1)*dx1^2
   +(-5*x1+2)*dx1-3,(-x2^2+x2)*dx2^2+((-x2^2+x1)*dx1-3*x2+2)*dx2    +(-5*x1+2)*dx1-3,(-x2^2+x2)*dx2^2+((-x2^2+x1)*dx1-3*x2+2)*dx2
   +(-4*x2-4*x1)*dx1-4,    +(-4*x2-4*x1)*dx1-4,
Line 2575  F_D(a,b1,b2,...,bn,c;x1,...,xn)
Line 1729  F_D(a,b1,b2,...,bn,c;x1,...,xn)
  +(-3*x1-2)*x2+2*x1)*dx2-4*x1^2*dx1+4*x2-4*x1],   +(-3*x1-2)*x2+2*x1)*dx2-4*x1^2*dx1+4*x2-4*x1],
  [x1*dx1*dx2,-x1^2*dx1^2,-x2^2*dx1*dx2,-x1*x2^2*dx2^2]]   [x1*dx1*dx2,-x1^2*dx1^2,-x2^2*dx1*dx2,-x1*x2^2*dx2^2]]
   
 [283] sm1_rank(sm1_appell1([1/2,3,5,-1/3]));  [283] sm1.rank(sm1.appell1([1/2,3,5,-1/3]));
 1  1
   
 [285] Mu=2$ Beta = 1/3$  [285] Mu=2$ Beta = 1/3$
 [287] sm1_rank(sm1_appell1([Mu+Beta,Mu+1,Beta,Beta,Beta]));  [287] sm1.rank(sm1.appell1([Mu+Beta,Mu+1,Beta,Beta,Beta]));
 4  4
   
   
Line 2587  F_D(a,b1,b2,...,bn,c;x1,...,xn)
Line 1741  F_D(a,b1,b2,...,bn,c;x1,...,xn)
   
 */  */
   
 def sm1_appell4(S) {  
   N = length(S)-2;  
   B = cdr(cdr(S));  
   A = S[0];  
   C = S[1];  
   V = [ ];  
   for (I=0; I<N; I++) {  
     V = append(V,[sm1aux_x(I+1)]);  
   }  
   Ans = [ ];  
   Euler = 0;  
   for (I=0; I<N; I++) {  
     Euler = sm1aux_x(I+1)*sm1aux_dx(I+1) + Euler;  
   }  
   for (I=0; I<N; I++) {  
     T = sm1_mul(sm1aux_dx(I+1), sm1aux_x(I+1)*sm1aux_dx(I+1)+B[I]-1,V)-  
         sm1_mul(Euler+A,Euler+C,V);  
     /* Tmp=sm1_rat_to_p(T);  
     print(Tmp[0]/Tmp[1]-T)$ */  
     T = sm1_rat_to_p(T)[0];  
     Ans = append(Ans,[T]);  
   }  
   return([Ans,V]);  
 }  
   
 /*&eg-texi  /*&eg-texi
 @menu  @node sm1.appell4,,, SM1 Functions
 * sm1_appell4::  @subsection @code{sm1.appell4}
 @end menu  @findex sm1.appell4
 @node sm1_appell4,,, SM1 Functions  
 @subsection @code{sm1_appell4}  
 @findex sm1_appell4  
 @table @t  @table @t
 @item sm1_appell4(@var{a}|proc=@var{p})  @item sm1.appell4(@var{a}|proc=@var{p})
 ::  Returns the Appell hypergeometric system F_4 or F_C.  ::  Returns the Appell hypergeometric system F_4 or F_C.
 @end table  @end table
   
Line 2643  The parameters a, b, c1, ..., cn may be rational numbe
Line 1769  The parameters a, b, c1, ..., cn may be rational numbe
 */  */
   
 /*&jp-texi  /*&jp-texi
 @menu  @node sm1.appell4,,, SM1 Functions
 * sm1_appell4::  @subsection @code{sm1.appell4}
 @end menu  @findex sm1.appell4
 @node sm1_appell4,,, SM1 $BH!?t(B  
 @subsection @code{sm1_appell4}  
 @findex sm1_appell4  
 @table @t  @table @t
 @item sm1_appell4(@var{a}|proc=@var{p})  @item sm1.appell4(@var{a}|proc=@var{p})
 :: F_4 $B$^$?$O(B F_C $B$KBP1~$9$kJ}Dx<07O$rLa$9(B.  :: F_4 $B$^$?$O(B F_C $B$KBP1~$9$kJ}Dx<07O$rLa$9(B.
 @end table  @end table
   
Line 2676  F_C(a,b,c1,c2,...,cn;x1,...,xn)
Line 1799  F_C(a,b,c1,c2,...,cn;x1,...,xn)
   
 @example  @example
   
 [281] sm1_appell4([1,2,3,4]);  [281] sm1.appell4([1,2,3,4]);
   [[-x2^2*dx2^2+(-2*x1*x2*dx1-4*x2)*dx2+(-x1^2+x1)*dx1^2+(-4*x1+3)*dx1-2,    [[-x2^2*dx2^2+(-2*x1*x2*dx1-4*x2)*dx2+(-x1^2+x1)*dx1^2+(-4*x1+3)*dx1-2,
   (-x2^2+x2)*dx2^2+(-2*x1*x2*dx1-4*x2+4)*dx2-x1^2*dx1^2-4*x1*dx1-2],    (-x2^2+x2)*dx2^2+(-2*x1*x2*dx1-4*x2+4)*dx2-x1^2*dx1^2-4*x1*dx1-2],
                                                               equations                                                                equations
     [x1,x2]]                                      the list of variables      [x1,x2]]                                      the list of variables
   
 [282] sm1_rank(@@);  [282] sm1.rank(@@);
 4  4
   
 @end example  @end example
Line 2690  F_C(a,b,c1,c2,...,cn;x1,...,xn)
Line 1813  F_C(a,b,c1,c2,...,cn;x1,...,xn)
 */  */
   
   
 def sm1_rank(A) {  
   SM1_FIND_PROC(P);  
   sm1_push_int0(P,A);  
   sm1(P," rank toString .. ");  
   ox_check_errors2(P);  
   R = sm1_pop(P);  
   return(R);  
 }  
   
 def sm1_rrank(A) {  
   SM1_FIND_PROC(P);  
   sm1_push_int0(P,A);  
   sm1(P," rrank toString .. ");  
   ox_check_errors2(P);  
   R = sm1_pop(P);  
   return(R);  
 }  
   
   
 /*&eg-texi  /*&eg-texi
 @menu  @node sm1.rank,,, SM1 Functions
 * sm1_rank::  @subsection @code{sm1.rank}
 @end menu  @findex sm1.rank
 @node sm1_rank,,, SM1 Functions  
 @subsection @code{sm1_rank}  
 @findex sm1_rank  
 @table @t  @table @t
 @item sm1_rank(@var{a}|proc=@var{p})  @item sm1.rank(@var{a}|proc=@var{p})
 ::  Returns the holonomic rank of the system of differential equations @var{a}.  ::  Returns the holonomic rank of the system of differential equations @var{a}.
 @end table  @end table
   
Line 2736  at a generic point of the system of differential equat
Line 1839  at a generic point of the system of differential equat
 The dimension is called the holonomic rank.  The dimension is called the holonomic rank.
 @item @var{a} is a list consisting of a list of differential equations and  @item @var{a} is a list consisting of a list of differential equations and
 a list of variables.  a list of variables.
 @item @code{sm1_rrank} returns the holonomic rank when @var{a} is regular  @item @code{sm1.rrank} returns the holonomic rank when @var{a} is regular
 holonomic. It is generally faster than @code{sm1_rank}.  holonomic. It is generally faster than @code{sm1.rank}.
 @end itemize  @end itemize
 */  */
   
 /*&jp-texi  /*&jp-texi
 @menu  @node sm1.rank,,, SM1 Functions
 * sm1_rank::  @subsection @code{sm1.rank}
 @end menu  @findex sm1.rank
 @node sm1_rank,,, SM1 $BH!?t(B  
 @subsection @code{sm1_rank}  
 @findex sm1_rank  
 @table @t  @table @t
 @item sm1_rank(@var{a}|proc=@var{p})  @item sm1.rank(@var{a}|proc=@var{p})
 ::  $BHyJ,J}Dx<07O(B @var{a} $B$N(B holonomic rank $B$rLa$9(B.  ::  $BHyJ,J}Dx<07O(B @var{a} $B$N(B holonomic rank $B$rLa$9(B.
 @end table  @end table
   
Line 2766  holonomic. It is generally faster than @code{sm1_rank}
Line 1866  holonomic. It is generally faster than @code{sm1_rank}
 @item $BHyJ,J}Dx<07O(B @var{a} $B$N(B, generic point $B$G$N@5B'2r$N<!85$r(B  @item $BHyJ,J}Dx<07O(B @var{a} $B$N(B, generic point $B$G$N@5B'2r$N<!85$r(B
 $BLa$9(B. $B$3$N<!85$r(B, holonomic rank $B$H8F$V(B.  $BLa$9(B. $B$3$N<!85$r(B, holonomic rank $B$H8F$V(B.
 @item @var{a} $B$OHyJ,:nMQAG$N%j%9%H$HJQ?t$N%j%9%H$h$j$J$k(B.  @item @var{a} $B$OHyJ,:nMQAG$N%j%9%H$HJQ?t$N%j%9%H$h$j$J$k(B.
 @item  @var{a} $B$,(B regular holonomic $B$N$H$-$O(B @code{sm1_rrank}  @item  @var{a} $B$,(B regular holonomic $B$N$H$-$O(B @code{sm1.rrank}
 $B$b(B holonomic rank $B$rLa$9(B.  $B$b(B holonomic rank $B$rLa$9(B.
 $B$$$C$Q$s$K$3$N4X?t$NJ}$,(B @code{sm1_rank} $B$h$jAa$$(B.  $B$$$C$Q$s$K$3$N4X?t$NJ}$,(B @code{sm1.rank} $B$h$jAa$$(B.
 @end itemize  @end itemize
 */  */
   
Line 2776  holonomic. It is generally faster than @code{sm1_rank}
Line 1876  holonomic. It is generally faster than @code{sm1_rank}
   
 @example  @example
   
 [284]  sm1_gkz([  [[1,1,1,1],[0,1,3,4]],  [0,2] ]);  [284]  sm1.gkz([  [[1,1,1,1],[0,1,3,4]],  [0,2] ]);
 [[x4*dx4+x3*dx3+x2*dx2+x1*dx1,4*x4*dx4+3*x3*dx3+x2*dx2-2,  [[x4*dx4+x3*dx3+x2*dx2+x1*dx1,4*x4*dx4+3*x3*dx3+x2*dx2-2,
   -dx1*dx4+dx2*dx3, -dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],    -dx1*dx4+dx2*dx3, -dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],
  [x1,x2,x3,x4]]   [x1,x2,x3,x4]]
 [285] sm1_rrank(@@);  [285] sm1.rrank(@@);
 4  4
   
 [286]  sm1_gkz([  [[1,1,1,1],[0,1,3,4]],  [1,2]]);  [286]  sm1.gkz([  [[1,1,1,1],[0,1,3,4]],  [1,2]]);
 [[x4*dx4+x3*dx3+x2*dx2+x1*dx1-1,4*x4*dx4+3*x3*dx3+x2*dx2-2,  [[x4*dx4+x3*dx3+x2*dx2+x1*dx1-1,4*x4*dx4+3*x3*dx3+x2*dx2-2,
  -dx1*dx4+dx2*dx3,-dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],   -dx1*dx4+dx2*dx3,-dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],
  [x1,x2,x3,x4]]   [x1,x2,x3,x4]]
 [287] sm1_rrank(@@);  [287] sm1.rrank(@@);
 5  5
   
 @end example  @end example
   
 */  */
   
 def sm1_auto_reduce(T) {  
   SM1_FIND_PROC(P);  
   sm1(P,"[(AutoReduce) "+rtostr(T)+" ] system_variable ");  
   ox_check_errors2(P);  
   R = sm1_pop(P);  
   return(R);  
 }  
   
 /*&eg-texi  /*&eg-texi
 @menu  @node sm1.auto_reduce,,, SM1 Functions
 * sm1_auto_reduce::  @subsection @code{sm1.auto_reduce}
 @end menu  @findex sm1.auto_reduce
 @node sm1_auto_reduce,,, SM1 Functions  
 @subsection @code{sm1_auto_reduce}  
 @findex sm1_auto_reduce  
 @table @t  @table @t
 @item sm1_auto_reduce(@var{s}|proc=@var{p})  @item sm1.auto_reduce(@var{s}|proc=@var{p})
 ::  Set the flag "AutoReduce" to @var{s}.  ::  Set the flag "AutoReduce" to @var{s}.
 @end table  @end table
   
Line 2832  Grobner bases.  This is the default.
Line 1922  Grobner bases.  This is the default.
 */  */
   
 /*&jp-texi  /*&jp-texi
 @menu  @node sm1.auto_reduce,,, SM1 Functions
 * sm1_auto_reduce::  @subsection @code{sm1.auto_reduce}
 @end menu  @findex sm1.auto_reduce
 @node sm1_auto_reduce,,, SM1 $BH!?t(B  
 @subsection @code{sm1_auto_reduce}  
 @findex sm1_auto_reduce  
 @table @t  @table @t
 @item sm1_auto_reduce(@var{s}|proc=@var{p})  @item sm1.auto_reduce(@var{s}|proc=@var{p})
 ::  $B%U%i%0(B "AutoReduce" $B$r(B @var{s} $B$K@_Dj(B.  ::  $B%U%i%0(B "AutoReduce" $B$r(B @var{s} $B$K@_Dj(B.
 @end table  @end table
   
Line 2861  reduced $B%0%l%V%J4pDl$H$O$+$.$i$J$$(B. $B$3$A$i$,%
Line 1948  reduced $B%0%l%V%J4pDl$H$O$+$.$i$J$$(B. $B$3$A$i$,%
 */  */
   
   
 def sm1_slope(II,V,FF,VF) {  
   SM1_FIND_PROC(P);  
   A =[II,V,FF,VF];  
   sm1_push_int0(P,A);  
   sm1(P," slope toString ");  
   ox_check_errors2(P);  
   R = eval_str(sm1_pop(P));  
   return(R);  
 }  
   
   
 /*&eg-texi  /*&eg-texi
 @menu  @node sm1.slope,,, SM1 Functions
 * sm1_slope::  @subsection @code{sm1.slope}
 @end menu  @findex sm1.slope
 @node sm1_slope,,, SM1 Functions  
 @subsection @code{sm1_slope}  
 @findex sm1_slope  
 @table @t  @table @t
 @item sm1_slope(@var{ii},@var{v},@var{f_filtration},@var{v_filtration}|proc=@var{p})  @item sm1.slope(@var{ii},@var{v},@var{f_filtration},@var{v_filtration}|proc=@var{p})
 ::  Returns the slopes of differential equations @var{ii}.  ::  Returns the slopes of differential equations @var{ii}.
 @end table  @end table
   
Line 2900  List (weight vector)
Line 1974  List (weight vector)
 @end table  @end table
   
 @itemize @bullet  @itemize @bullet
 @item @code{sm1_slope} returns the (geometric) slopes  @item @code{sm1.slope} returns the (geometric) slopes
 of the system of differential equations @var{ii}  of the system of differential equations @var{ii}
 along the hyperplane specified by  along the hyperplane specified by
 the V filtration @var{v_filtration}.  the V filtration @var{v_filtration}.
Line 2921  of the slopes are returned.
Line 1995  of the slopes are returned.
 */  */
   
 /*&jp-texi  /*&jp-texi
 @menu  @node sm1.slope,,, SM1 Functions
 * sm1_slope::  @subsection @code{sm1.slope}
 @end menu  @findex sm1.slope
 @node sm1_slope,,, SM1 $BH!?t(B  
 @subsection @code{sm1_slope}  
 @findex sm1_slope  
 @table @t  @table @t
 @item sm1_slope(@var{ii},@var{v},@var{f_filtration},@var{v_filtration}|proc=@var{p})  @item sm1.slope(@var{ii},@var{v},@var{f_filtration},@var{v_filtration}|proc=@var{p})
 ::  $BHyJ,J}Dx<07O(B @var{ii} $B$N(B slope $B$rLa$9(B.  ::  $BHyJ,J}Dx<07O(B @var{ii} $B$N(B slope $B$rLa$9(B.
 @end table  @end table
   
Line 2948  of the slopes are returned.
Line 2019  of the slopes are returned.
 @end table  @end table
   
 @itemize @bullet  @itemize @bullet
 @item @code{sm1_slope} $B$O(B  @item @code{sm1.slope} $B$O(B
 $BHyJ,J}Dx<07O(B @var{ii} $B$N(B V filtration  @var{v_filtration}  $BHyJ,J}Dx<07O(B @var{ii} $B$N(B V filtration  @var{v_filtration}
 $B$G;XDj$9$kD6J?LL$K1h$C$F$N(B (geomeric) slope $B$r7W;;$9$k(B.  $B$G;XDj$9$kD6J?LL$K1h$C$F$N(B (geomeric) slope $B$r7W;;$9$k(B.
 @item @var{v} $B$OJQ?t$N%j%9%H(B.  @item @var{v} $B$OJQ?t$N%j%9%H(B.
Line 2970  Slope $B$N@dBPCM$rLa$9(B.
Line 2041  Slope $B$N@dBPCM$rLa$9(B.
   
 @example  @example
   
 [284] A= sm1_gkz([  [[1,2,3]],  [-3] ]);  [284] A= sm1.gkz([  [[1,2,3]],  [-3] ]);
   
   
 [285] sm1_slope(A[0],A[1],[0,0,0,1,1,1],[0,0,-1,0,0,1]);  [285] sm1.slope(A[0],A[1],[0,0,0,1,1,1],[0,0,-1,0,0,1]);
   
 [286] A2 = sm1_gkz([ [[1,1,1,0],[2,-3,1,-3]], [1,0]]);  [286] A2 = sm1.gkz([ [[1,1,1,0],[2,-3,1,-3]], [1,0]]);
      (* This is an interesting example given by Laura Matusevich,       (* This is an interesting example given by Laura Matusevich,
         June 9, 2001 *)          June 9, 2001 *)
   
 [287] sm1_slope(A2[0],A2[1],[0,0,0,0,1,1,1,1],[0,0,0,-1,0,0,0,1]);  [287] sm1.slope(A2[0],A2[1],[0,0,0,0,1,1,1,1],[0,0,0,-1,0,0,0,1]);
   
   
 @end example  @end example

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.9

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