SM1 Functions
*************

This chapter describes  interface functions for sm1 ox server ox_sm1_forAsir. These interface functions are defined in the file sm1. The file sm1 is

at $(OpenXM_HOME)/lib/asir/contrib-packages. The system sm1 is a system to compute in the ring of differential operators. Many constructions of invariants in the computational algebraic geometry reduce to constructions in the ring of differential operators. Documents on sm1 are in the directory OpenXM/doc/kan96xx.

All the coefficients of input polynomials should be integers for most functions in this section. Other functions accept rational numbers as inputs and it will be explicitely noted in each explanation of these functions.

          [file opening.texi not included]

     [283] sm1.deRham([x*(x-1),[x]]);
     [1,2]

The author of sm1 : Nobuki Takayama, takayama@math.sci.kobe-u.ac.jp

The author of sm1 packages : Toshinori Oaku, oaku@twcu.ac.jp

Reference: [SST] Saito, M., Sturmfels, B., Takayama, N., Grobner Deformations of Hypergeometric Differential Equations, 1999, Springer. See the appendix.

ox_sm1_forAsir Server
=====================

ox_sm1_forAsir
--------------

ox_sm1_forAsir
     ::  sm1 server for asir.

  * ox_sm1_forAsir is the sm1 server started from asir by the command sm1.start. In the standard setting,

     ox_sm1_forAsir = $(OpenXM_HOME)/lib/sm1/bin/ox_sm1 + $(OpenXM_HOME)/lib/sm1/callsm1.sm1   (macro file)

     + $(OpenXM_HOME)/lib/sm1/callsm1b.sm1  (macro file)

     The macro files callsm1.sm1 and callsm1b.sm1 are searched from current directory, $(LOAD_SM1_PATH), $(OpenXM_HOME)/lib/sm1, /usr/local/lib/sm1 in this order.

  * Note for programmers:  See the files $(OpenXM_HOME)/src/kxx/oxserver00.c, $(OpenXM_HOME)/src/kxx/sm1stackmachine.c to build your own server by reading sm1 macros.

Functions
=========

sm1.start
---------

sm1.start()
     ::  Start  ox_sm1_forAsir on the localhost.

return
     Integer

  * Start ox_sm1_forAsir on the localhost. It returns the descriptor of ox_sm1_forAsir.

  * Set Xm_noX = 1 to start ox_sm1_forAsir without a debug window.

  * You might have to set suitable orders of variable by the command ord.  For example, when you are working in the ring of differential operators on the variable x and dx (dx stands for ), sm1 server assumes that the variable dx is collected to the right and the variable x is collected to the left in the printed expression. In the example below, you  must not use the variable cc for computation in sm1.

  * The variables from a to z except d and o and x0, ..., x20, y0, ..., y20, z0, ..., z20 can be used as variables for ring of differential operators in default. (cf. Sm1_ord_list in sm1).

  * The descriptor is stored in static Sm1_proc. The descriptor can be obtained by the function sm1.get_Sm1_proc().

     [260] ord([da,a,db,b]);
     [da,a,db,b,dx,dy,dz,x,y,z,dt,ds,t,s,u,v,w,
     ......... omit ..................
     ]
     [261] a*da;
     a*da
     [262] cc*dcc;
     dcc*cc
     [263] sm1.mul(da,a,[a]);
     a*da+1
     [264] sm1.mul(a,da,[a]);
     a*da

Reference
     ox_launch, sm1.push_int0, sm1.push_poly0, ord

sm1.sm1
-------

sm1.sm1(P,S)
     ::  ask the sm1 server to execute the command string S.

return
     Void

p
     Number

s
     String

  * It asks the sm1 server of the descriptor number P to execute the command string S. (In the next example, the descriptor number is 0.)

     [261] sm1.sm1(0," ( (x-1)^2 ) . ");
     0
     [262] ox_pop_string(0);
     x^2-2*x+1
     [263] sm1.sm1(0," [(x*(x-1))  [(x)]] deRham ");
     0
     [264] ox_pop_string(0);
     [1 , 2]

Reference
     sm1.start, ox_push_int0, sm1.push_poly0, sm1.get_Sm1_proc().

sm1.push_int0
-------------

sm1.push_int0(P,F)
     ::   push the object F to the server with the descriptor number P.

return
     Void

p
     Number

f
     Object

  * When type(F) is 2 (recursive polynomial), F is converted to a string (type == 7) and is sent to the server by ox_push_cmo.

  * When type(F) is 0 (zero), it is translated to the 32 bit integer zero on the server. Note that ox_push_cmo(P,0) sends CMO_NULL to the server. In other words, the server does not get the 32 bit integer 0 nor the bignum 0.

  * sm1 integers are classfied into the 32 bit integer and the bignum. When type(F) is 1 (number), it is translated to the 32 bit integer on the server. Note that ox_push_cmo(P,1234) send the bignum 1234 to the sm1 server.

  * In other cases,  ox_push_cmo is called without data conversion.

Reference
     ox_push_cmo

sm1.gb
------

sm1.gb([F,V,W]|proc=P,sorted=Q,dehomogenize=R)
     ::  computes the Grobner basis of F in the ring of differential operators with the variable V.

sm1.gb_d([F,V,W]|proc=P)
     ::  computes the Grobner basis of F in the ring of differential operators with the variable V. The result will be returned as a list of distributed polynomials.

return
     List

p, q, r
     Number

f, v, w
     List

  * It returns the Grobner basis of the set of polynomials F in the ring of deferential operators with the variables V.

  * The weight vectors are given by W, which can be omitted. If W is not given, the graded reverse lexicographic order will be used to compute Grobner basis.

  * The return value of sm1.gb is the list of the Grobner basis of F and the initial terms (when W is not given) or initial ideal (when W is given).

  * sm1.gb_d returns the results by a list of distributed polynomials. Monomials in each distributed polynomial are ordered in the given order. The return value consists of [variable names, order matrix, grobner basis in districuted polynomials, initial monomials or initial polynomials].

  * When a non-term order is given, the Grobner basis is computed in the homogenized Weyl algebra  (See Section 1.2 of the book of SST). The homogenization variable h is automatically added.

  * When the optional variable Q is set, sm1.gb returns, as the third return value, a list of the Grobner basis and the initial ideal with sums of monomials sorted by the given order. Each polynomial is expressed as a string temporally for now. When the optional variable R is set to one, the polynomials are dehomogenized (,i.e., h is set to 1).

     [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]]

In the example above,

     [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]]

In the example above, two monomials

     [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])$

     [595]
        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"],
                  "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],
       [0,1,1,1,1,1,1,0],[0,0,0,0,0,0,-1,0],[0,0,0,0,0,-1,0,0],
       [0,0,0,0,-1,0,0,0],[0,0,0,-1,0,0,0,0],[0,0,-1,0,0,0,0,0],
       [0,0,0,0,0,0,0,1]]],
     [[(1)*<<0,0,1,0,0,1,1,0>>+(1)*<<0,1,0,0,0,2,0,0>>+(-1)*<<0,0,0,0,0,1,0,2>>+(-1)*
     <<0,0,0,0,0,0,0,3>>,(1)*<<0,0,1,0,0,0,2,0>>+(1)*<<0,1,0,0,0,1,1,0>>+(-1)*<<0,0,0
     ,0,0,0,1,2>>+(-1)*<<0,0,0,0,0,0,0,3>>,(1)*<<0,0,0,0,0,1,0,3>>+(-1)*<<0,0,0,0,0,0
     ,1,3>>],
      [(1)*<<0,0,1,0,0,1,1,0>>+(1)*<<0,1,0,0,0,2,0,0>>+(-1)*<<0,0,0,0,0,1,0,2>>,(1)*<
     <0,0,1,0,0,0,2,0>>+(1)*<<0,1,0,0,0,1,1,0>>+(-1)*<<0,0,0,0,0,0,1,2>>+(-1)*<<0,0,0
     ,0,0,0,0,3>>,(1)*<<0,0,0,0,0,1,0,3>>]]]

Reference
     sm1.reduction, sm1.rat_to_p

sm1.deRham
----------

sm1.deRham([F,V]|proc=P)
     ::  ask the server to evaluate the dimensions of the de Rham cohomology  groups of C^n - (the zero set of F=0).

return
     List

p
     Number

f
     String or polynomial

v
     List

  * It returns the dimensions of the de Rham cohomology groups of X = C^n \ V(F). In other words,  it returns [dim H^0(X,C), dim H^1(X,C), dim H^2(X,C), ..., dim H^n(X,C)].

  * V is a list of variables. n = length(V).

  * sm1.deRham requires huge computer resources. For example, sm1.deRham(0,[x*y*z*(x+y+z-1)*(x-y),[x,y,z]]) is already very hard.

  * To efficiently analyze the roots of b-function, ox_asir should be used from ox_sm1_forAsir. It is recommended to load the communication module for ox_asir by the command

     sm1(0,"[(parse) (oxasir.sm1) pushfile] extension"); This command is automatically executed when ox_sm1_forAsir is started.

  * If you make an interruption to the function sm1.deRham by ox_reset(sm1.get_Sm1_proc());, the server might get out of the standard mode. So, it is strongly recommended to execute the command ox_shutdown(sm1.get_Sm1_proc()); to interrupt and restart the server.

     [332] sm1.deRham([x^3-y^2,[x,y]]);
     [1,1,0]
     [333] sm1.deRham([x*(x-1),[x]]);
     [1,2]

Reference
     sm1.start, deRham (sm1 command)

Algorithm:
     Oaku, Takayama, An algorithm for de Rham cohomology groups of the complement of an affine variety via D-module computation, Journal of pure and applied algebra 139 (1999), 201--233.

sm1.hilbert
-----------

sm1.hilbert([F,V]|proc=P)
     ::  ask the server to compute the Hilbert polynomial for the set of polynomials F.

hilbert_polynomial(F,V)
     ::  ask the server to compute the Hilbert polynomial for the set of polynomials F.

return
     Polynomial

p
     Number

f, v
     List

  * It returns the Hilbert polynomial h(k) of the set of polynomials F with respect to the set of variables V.

  * h(k) = dim_Q F_k/I \cap F_k  where F_k the set of polynomials of which degree is less than or equal to k and I is the ideal generated by the set of polynomials F.

  * Note for sm1.hilbert: For an efficient computation, it is preferable that the set of polynomials F is a set of monomials. In fact, this function firstly compute a Grobner basis of F, and then compute the Hilbert polynomial of the initial monomials of the basis. If the input F is already a Grobner basis, a Grobner basis is recomputed in this function, which is a waste of time and Grobner basis computation in the ring of polynomials in sm1 is  slower than in asir.

     [346] load("katsura")$
     [351] A=hilbert_polynomial(katsura(5),[u0,u1,u2,u3,u4,u5]);
     32

     [279] load("katsura")$
     [280] A=gr(katsura(5),[u0,u1,u2,u3,u4,u5],0)$
     [281] dp_ord();
     0
     [282] B=map(dp_ht,map(dp_ptod,A,[u0,u1,u2,u3,u4,u5]));
     [(1)*<<1,0,0,0,0,0>>,(1)*<<0,0,0,2,0,0>>,(1)*<<0,0,1,1,0,0>>,(1)*<<0,0,2,0,0,0>>,
      (1)*<<0,1,1,0,0,0>>,(1)*<<0,2,0,0,0,0>>,(1)*<<0,0,0,1,1,1>>,(1)*<<0,0,0,1,2,0>>,
      (1)*<<0,0,1,0,2,0>>,(1)*<<0,1,0,0,2,0>>,(1)*<<0,1,0,1,1,0>>,(1)*<<0,0,0,0,2,2>>,
       (1)*<<0,0,1,0,1,2>>,(1)*<<0,1,0,0,1,2>>,(1)*<<0,1,0,1,0,2>>,(1)*<<0,0,0,0,3,1>>,
       (1)*<<0,0,0,0,4,0>>,(1)*<<0,0,0,0,1,4>>,(1)*<<0,0,0,1,0,4>>,(1)*<<0,0,1,0,0,4>>,
      (1)*<<0,1,0,0,0,4>>,(1)*<<0,0,0,0,0,6>>]
     [283] C=map(dp_dtop,B,[u0,u1,u2,u3,u4,u5]);
     [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^4*u2,u5^4*u1,u5^6]
     [284] sm1.hilbert([C,[u0,u1,u2,u3,u4,u5]]);
     32

Reference
     sm1.start, sm1.gb, longname

sm1.genericAnn
--------------

sm1.genericAnn([F,V]|proc=P)
     ::  It computes  the annihilating ideal for F^s. V is the list of variables.  Here, s is V[0] and F is a polynomial in the variables rest(V).

return
     List

p
     Number

f
     Polynomial

v
     List

  * This function computes  the annihilating ideal for F^s. V is the list of variables.  Here, s is V[0] and F is a polynomial in the variables rest(V).

     [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]

Reference
     sm1.start

sm1.wTensor0
------------

sm1.wTensor0([F,G,V,W]|proc=P)
     ::   It computes the D-module theoretic 0-th tensor product of F and G.

return
     List

p
     Number

f, g, v, w
     List

  * It returns the D-module theoretic 0-th tensor product of F and G.

  * V is a list of variables. W is a list of weights.  The integer W[i] is the weight of the variable V[i].

  * sm1.wTensor0 calls wRestriction0 of ox_sm1, which requires a generic weight vector W to compute the restriction. If W is not generic, the computation fails.

  * Let F and G be solutions of F and G respectively. Intuitively speaking, the 0-th tensor product is a system of differential equations which annihilates the function FG.

  * The answer is a submodule of a free module D^r in general even if the inputs F and G are left ideals of D.

     [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],
      [-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]]

sm1.reduction
-------------

sm1.reduction([F,G,V,W]|proc=P)
     ::

return
     List

f
     Polynomial

g, v, w
     List

p
     Number  (the process number of ox_sm1)

  * It reduces F by the set of polynomial G in the homogenized Weyl algebra; it applies the division algorithm to F. The set of variables is V and W is weight vectors to determine the order, which can be ommited. sm1.reduction_noH is for the Weyl algebra.

  * The return value is of the form [r,c0,[c1,...,cm],[g1,...gm]] where G=[g1, ..., gm] and c0 f + c1 g1 + ... + cm gm = r. r/c0 is the normal form.

  * The function reduction reduces reducible terms that appear in lower order terms.

  * The functions sm1.reduction_d(P,F,G) and sm1.reduction_noH_d(P,F,G) are for distributed polynomials.

     [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],[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]]]);
     [0,1,[-y^2+4,-x+y^3-4*y],[y^4-4*y^2+1,x+y^3-4*y]]

Reference
     sm1.start, d_true_nf

sm1.xml_tree_to_prefix_string
-----------------------------

sm1.xml_tree_to_prefix_string(S|proc=P)
     :: Translate OpenMath Tree Expression S in XML to a prefix notation.

return
     String

p
     Number

s
     String

  * It translate OpenMath Tree Expression S in XML to a prefix notation.

  * This function should be moved to om_* in a future.

  * om_xml_to_cmo(OpenMath Tree Expression) returns CMO_TREE. asir has not yet understood this CMO.

  * java execution environment is required. (For example, /usr/local/jdk1.1.8/bin should be in the command search path.)

     [263] load("om");
     1
     [270] F=om_xml(x^4-1);
     control: wait OX
     Trying to connect to the server... Done.
     <OMOBJ><OMA><OMS name="plus" cd="basic"/><OMA>
     <OMS name="times" cd="basic"/><OMA>
     <OMS name="power" cd="basic"/><OMV name="x"/><OMI>4</OMI></OMA>
     <OMI>1</OMI></OMA><OMA><OMS name="times" cd="basic"/><OMA>
     <OMS name="power" cd="basic"/><OMV name="x"/><OMI>0</OMI></OMA>
     <OMI>-1</OMI></OMA></OMA></OMOBJ>
     [271] sm1.xml_tree_to_prefix_string(F);
     basic_plus(basic_times(basic_power(x,4),1),basic_times(basic_power(x,0),-1))

Reference
     om_*, OpenXM/src/OpenMath, eval_str

sm1.syz
-------

sm1.syz([F,V,W]|proc=P)
     ::  computes the syzygy of F in the ring of differential operators with the variable V.

return
     List

p
     Number

f, v, w
     List

  * The return values is of the form [S,[G, M, T]]. Here S is the syzygy of F in the ring of differential operators with the variable V. G is a Groebner basis of F with the weight vector W, and M is a matrix that translates the input matrix F to the Gr\"obner basis G. T is the syzygy of the Gr\"obner basis G. In summary, G = M F and S F = 0 hold as matrices.

  * The weight vectors are given by W, which can be omitted. If W is not given, the graded reverse lexicographic order will be used to compute Grobner basis.

  * When a non-term order is given, the Grobner basis is computed in the homogenized Weyl algebra  (See Section 1.2 of the book of SST). The homogenization variable h is automatically added.

     [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
      [[y*x*dy*dx-2,-x*dx-y*dy+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]],
      [[1,0],[0,1],[y*dy,-x*dx]],     transformation matrix
      [[y*x*dy*dx-h^4,-x^2*dx^2-h^2*x*dx-y^2*dy^2-h^2*y*dy+4*h^4]]]]

sm1.mul
-------

sm1.mul(F,G,V|proc=P)
     ::  ask the sm1 server to multiply F and G in the ring of differential operators over V.

return
     Polynomial or List

p
     Number

f, g
     Polynomial or List

v
     List

  * Ask the sm1 server to multiply F and G in the ring of differential operators over V.

  * sm1.mul_h is for homogenized Weyl algebra.

     [277] sm1.mul(dx,x,[x]);
     x*dx+1
     [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]);
     [[x+2,y+4],[3*x+4,3*y+8]]

sm1.distraction
---------------

sm1.distraction([F,V,X,D,S]|proc=P)
     ::  ask the sm1 server to compute the distraction of F.

return
     List

p
     Number

f
     Polynomial

v,x,d,s
     List

  * It asks the sm1 server of the descriptor number P to compute the distraction of  F in the ring of differential operators with variables V.

  * X is a list of x-variables and D is that of d-variables to be distracted. S is a list of variables to express the distracted F.

  * Distraction is roughly speaking to replace x*dx by a single variable x. See Saito, Sturmfels, Takayama : Grobner Deformations of Hypergeometric Differential Equations at page 68 for details.

     [280] sm1.distraction([x*dx,[x],[x],[dx],[x]]);
     x
     [281] sm1.distraction([dx^2,[x],[x],[dx],[x]]);
     x^2-x
     [282] sm1.distraction([x^2,[x],[x],[dx],[x]]);
     x^2+3*x+2
     [283] fctr(@);
     [[1,1],[x+1,1],[x+2,1]]
     [284] sm1.distraction([x*dx*y+x^2*dx^2*dy,[x,y],[x],[dx],[x]]);
     (x^2-x)*dy+x*y

Reference
     distraction2(sm1),

sm1.gkz
-------

sm1.gkz([A,B]|proc=P)
     ::  Returns the GKZ system (A-hypergeometric system) associated to the matrix A with the parameter vector B.

return
     List

p
     Number

A, B
     List

  * Returns the GKZ hypergeometric system (A-hypergeometric system) associated to the matrix

     [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,
      -dx1*dx4+dx2*dx3,-dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],
      [x1,x2,x3,x4]]

sm1.appell1
-----------

sm1.appell1(A|proc=P)
     ::  Returns the Appell hypergeometric system F_1 or F_D.

return
     List

p
     Number

a
     List

  * Returns the hypergeometric system for the Lauricella function F_D(a,b1,b2,...,bn,c;x1,...,xn) where A =(a,c,b1,...,bn). When n=2, the Lauricella function is called the Appell function F_1. The parameters a, c, b1, ..., bn may be rational numbers.

     [281] sm1.appell1([1,2,3,4]);
     [[((-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+x1)*dx1+3)*dx2-4*dx1],       equations
      [x1,x2]]                            the list of variables

     [282] sm1.gb(@);
     [[((-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
       +(-4*x2-4*x1)*dx1-4,
       (x2^3+(-x1-1)*x2^2+x1*x2)*dx2^2+((-x1*x2+x1^2)*dx1+6*x2^2
      +(-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]]

     [283] sm1.rank(sm1.appell1([1/2,3,5,-1/3]));
     1

     [285] Mu=2$ Beta = 1/3$
     [287] sm1.rank(sm1.appell1([Mu+Beta,Mu+1,Beta,Beta,Beta]));
     4

sm1.appell4
-----------

sm1.appell4(A|proc=P)
     ::  Returns the Appell hypergeometric system F_4 or F_C.

return
     List

p
     Number

a
     List

  * Returns the hypergeometric system for the Lauricella function F_4(a,b,c1,c2,...,cn;x1,...,xn) where A =(a,b,c1,...,cn). When n=2, the Lauricella function is called the Appell function F_4. The parameters a, b, c1, ..., cn may be rational numbers.

     [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+x2)*dx2^2+(-2*x1*x2*dx1-4*x2+4)*dx2-x1^2*dx1^2-4*x1*dx1-2],
                                                                   equations
         [x1,x2]]                                      the list of variables

     [282] sm1.rank(@);
     4

sm1.rank
--------

sm1.rank(A|proc=P)
     ::  Returns the holonomic rank of the system of differential equations A.

return
     Number

p
     Number

a
     List

  * It evaluates the dimension of the space of holomorphic solutions at a generic point of the system of differential equations A. The dimension is called the holonomic rank.

  * A is a list consisting of a list of differential equations and a list of variables.

  * sm1.rrank returns the holonomic rank when A is regular holonomic. It is generally faster than sm1.rank.

     [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,
       -dx1*dx4+dx2*dx3, -dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],
      [x1,x2,x3,x4]]
     [285] sm1.rrank(@);
     4

     [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,
      -dx1*dx4+dx2*dx3,-dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],
      [x1,x2,x3,x4]]
     [287] sm1.rrank(@);
     5

sm1.auto_reduce
---------------

sm1.auto_reduce(S|proc=P)
     ::  Set the flag "AutoReduce" to S.

return
     Number

p
     Number

s
     Number

  * If S is 1, then all Grobner bases to be computed will be the reduced Grobner bases.

  * If S is 0, then Grobner bases are not necessarily the reduced Grobner bases.  This is the default.

sm1.slope
---------

sm1.slope(II,V,F_FILTRATION,V_FILTRATION|proc=P)
     ::  Returns the slopes of differential equations II.

return
     List

p
     Number

ii
     List  (equations)

v
     List  (variables)

f_filtration
     List  (weight vector)

v_filtration
     List (weight vector)

  * sm1.slope returns the (geometric) slopes of the system of differential equations II along the hyperplane specified by the V filtration V_FILTRATION.

  * V is a list of variables.

  * The return value is a list of lists. The first entry of each list is the slope and the second entry is the weight vector for which the microcharacteristic variety is not bihomogeneous.

Algorithm: see "A.Assi, F.J.Castro-Jimenez and J.M.Granger, How to calculate the slopes of a D-module, Compositio Math, 104, 1-17, 1996" Note that the signs of the slopes are negative, but the absolute values of the slopes are returned.

     [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]);

     [286] A2 = sm1.gkz([ [[1,1,1,0],[2,-3,1,-3]], [1,0]]);
          (* This is an interesting example given by Laura Matusevich,
             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]);

Reference
     sm.gb

     [file sm1-auto-en.texi not included]