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

Annotation of OpenXM/src/asir-contrib/packages/doc/sm1/sm1.oxw, Revision 1.7

1.7     ! takayama    1: /*$OpenXM: OpenXM/src/asir-contrib/packages/doc/sm1/sm1.oxw,v 1.6 2019/08/31 06:36:28 takayama Exp $ */
1.1       takayama    2:
                      3: /*&C
                      4: @c DO NOT EDIT THIS FILE
                      5: */
                      6: /*&C
                      7: @node SM1 Functions,,, Top
                      8:
                      9: */
                     10: /*&ja
                     11: @chapter SM1 $BH!?t(B
                     12:
                     13: $B$3$N@a$G$O(B sm1 $B$N(B ox $B%5!<%P(B @code{ox_sm1_forAsir}
                     14: $B$H$N%$%s%?%U%'!<%94X?t$r2r@b$9$k(B.
                     15: $B$3$l$i$N4X?t$O%U%!%$%k(B  @file{sm1.rr} $B$GDj5A$5$l$F$$$k(B.
                     16: @file{sm1.rr} $B$O(B @file{$(OpenXM_HOME)/lib/asir-contrib} $B$K$"$k(B.
                     17: $B%7%9%F%`(B @code{sm1} $B$OHyJ,:nMQAG4D$G7W;;$9$k$?$a$N%7%9%F%`$G$"$k(B.
                     18: $B7W;;Be?t4v2?$N$$$m$$$m$JITJQNL$N7W;;$,HyJ,:nMQAG$N7W;;$K5"Ce$9$k(B.
                     19: @code{sm1} $B$K$D$$$F$NJ8=q$O(B @code{OpenXM/doc/kan96xx} $B$K$"$k(B.
                     20:
1.3       takayama   21: $B$J$*(B, sm1 server windows $BHG$O%P%$%J%jG[I[$7$F$$$J$$(B.
                     22: cygwin $B4D6-$G%=!<%9%3!<%I$+$i%3%s%Q%$%k$7(B, OpenXM/misc/packages/Windows
                     23: $B$K=>$$JQ99$r2C$($k$H(B sm1 $B%5!<%P$O(Bwindows $B$G$bF0:n$9$k(B.
                     24:
1.1       takayama   25: $B$H$3$KCG$j$,$J$$$+$.$j$3$N@a$N$9$Y$F$N4X?t$O(B,
                     26: $BM-M}?t78?t$N<0$rF~NO$H$7$F$&$1$D$1$J$$(B.
                     27: $B$9$Y$F$NB?9`<0$N78?t$O@0?t$G$J$$$H$$$1$J$$(B.
                     28:
                     29: @tex
                     30: $B6u4V(B
                     31: $X:={\bf C} \setminus \{ 0, 1 \} = {\bf C} \setminus V(x(x-1))$
                     32: $B$N%I%i!<%`%3%[%b%m%872C#$N<!85$r7W;;$7$F$_$h$&(B.
                     33: $X$ $B$OJ?LL$KFs$D$N7j$r$"$1$?6u4V$G$"$k$N$G(B, $BE@(B $x=0$, $x=1$ $B$N$^$o$j$r(B
                     34: $B$^$o$kFs$D$N%k!<%W$,(B1$B<!85$N%[%b%m%8!<72$N6u4V$r$O$k(B.
                     35: $B$7$?$,$C$F(B, 1$B<!85%I%i!<%`%3%[%b%m%872$N<!85$O(B $2$ $B$G$"$k(B.
                     36: @code{sm1} $B$O(B $0$ $B<!85$N%3%[%b%m%872$N<!85$*$h$S(B $1$ $B<!85$N%3%[%b%m%872$N(B
                     37: $B<!85$rEz$($k(B.
                     38: @end tex
                     39: */
                     40: /*&en
                     41: @chapter SM1 Functions
                     42:
                     43: This chapter describes  interface functions for
                     44: sm1 ox server @code{ox_sm1_forAsir}.
                     45: These interface functions are defined in the file @file{sm1.rr}.
                     46: The file @file{sm1.rr} is @*
                     47: at @file{$(OpenXM_HOME)/lib/asir/contrib-packages}.
                     48: The system @code{sm1} is a system to compute in the ring of differential
                     49: operators.
                     50: Many constructions of invariants
                     51: in the computational algebraic geometry reduce
                     52: to constructions in the ring of differential operators.
                     53: Documents on @code{sm1} are in
                     54: the directory @code{OpenXM/doc/kan96xx}.
                     55:
1.3       takayama   56: The sm1 server for windows is not distributed in the binary form.
                     57: If you need to run it, compile it under the cygwin environment
                     58: following the Makefile in OpenXM/misc/packages/Windows.
                     59:
1.1       takayama   60: All the coefficients of input polynomials should be
                     61: integers for most functions in this section.
                     62: Other functions accept rational numbers as inputs
                     63: and it will be explicitely noted in each explanation
                     64: of these functions.
                     65:
                     66:
                     67:
                     68: @tex
                     69: Let us evaluate the dimensions of the de Rham cohomology groups
                     70: of
                     71: $X:={\bf C} \setminus \{ 0, 1 \} = {\bf C} \setminus V(x(x-1))$.
                     72: The space $X$ is a two punctured plane, so two loops that encircles the
                     73: points $x=0$ and $x=1$ respectively spans the first homology group.
                     74: Hence, the dimension of the first de Rham cohomology group is $2$.
                     75: @code{sm1} answers the dimensions of the 0th and the first
                     76: cohomology groups.
                     77: @end tex
                     78: */
                     79: /*&C
                     80: @example
                     81:
                     82: [283] sm1.deRham([x*(x-1),[x]]);
                     83: [1,2]
                     84: @end example
                     85: */
                     86: /*&C
                     87: @noindent
                     88: The author of @code{sm1} : Nobuki Takayama, @code{takayama@@math.sci.kobe-u.ac.jp} @*
                     89: The author of sm1 packages : Toshinori Oaku, @code{oaku@@twcu.ac.jp} @*
                     90: Reference: [SST] Saito, M., Sturmfels, B., Takayama, N.,
                     91: Grobner Deformations of Hypergeometric Differential Equations,
                     92: 1999, Springer.
                     93: @url{http://www.math.kobe-u.ac.jp/KAN}
                     94: */
                     95:
                     96: /*&C
                     97: @menu
                     98: * ox_sm1_forAsir::
                     99: * sm1.start::
                    100: * sm1.sm1::
                    101: * sm1.push_int0::
                    102: * sm1.gb::
                    103: * sm1.deRham::
                    104: * sm1.hilbert::
                    105: * sm1.genericAnn::
                    106: * sm1.wTensor0::
                    107: * sm1.reduction::
                    108: * sm1.xml_tree_to_prefix_string::
                    109: * sm1.syz::
                    110: * sm1.mul::
                    111: * sm1.distraction::
                    112: * sm1.gkz::
1.2       takayama  113: * sm1.mgkz::
1.1       takayama  114: * sm1.appell1::
                    115: * sm1.appell4::
                    116: * sm1.rank::
                    117: * sm1.auto_reduce::
                    118: * sm1.slope::
                    119: * sm1.ahg::
                    120: * sm1.bfunction::
                    121: * sm1.generalized_bfunction::
                    122: * sm1.restriction::
                    123: * sm1.saturation::
                    124: @end menu
                    125: */
                    126:
                    127: /*&ja
                    128: @section @code{ox_sm1_forAsir} $B%5!<%P(B
                    129: */
                    130: /*&en
                    131: @section @code{ox_sm1_forAsir} Server
                    132: */
                    133:
                    134: /*&en
                    135: @node ox_sm1_forAsir,,, SM1 Functions
                    136: @subsection @code{ox_sm1_forAsir}
                    137: @findex ox_sm1_forAsir
                    138: @table @t
                    139: @item ox_sm1_forAsir
                    140: ::  @code{sm1} server for @code{asir}.
                    141: @end table
                    142: @itemize @bullet
                    143: @item
                    144:    @code{ox_sm1_forAsir} is the @code{sm1} server started from asir
                    145:     by the command @code{sm1.start}.
                    146:     In the standard setting,  @*
                    147:     @code{ox_sm1_forAsir} =
                    148:          @file{$(OpenXM_HOME)/lib/sm1/bin/ox_sm1}
                    149:        +
                    150:          @file{$(OpenXM_HOME)/lib/sm1/callsm1.sm1}   (macro file) @*
                    151:        +
                    152:          @file{$(OpenXM_HOME)/lib/sm1/callsm1b.sm1}  (macro file) @*
                    153:    The macro files @file{callsm1.sm1} and @file{callsm1b.sm1}
                    154:    are searched from
                    155:    current directory, @code{$(LOAD_SM1_PATH)},
                    156:    @code{$(OpenXM_HOME)/lib/sm1},
                    157:    @code{/usr/local/lib/sm1}
                    158:    in this order.
                    159: @item Note for programmers:  See the files
                    160:     @file{$(OpenXM_HOME)/src/kxx/oxserver00.c},
                    161:     @file{$(OpenXM_HOME)/src/kxx/sm1stackmachine.c}
                    162: to build your own server by reading @code{sm1} macros.
                    163: @end itemize
                    164: */
                    165: /*&ja
                    166: @node ox_sm1_forAsir,,, SM1 Functions
                    167: @subsection @code{ox_sm1_forAsir}
                    168: @findex ox_sm1_forAsir
                    169: @table @t
                    170: @item ox_sm1_forAsir
                    171: ::  @code{asir} $B$N$?$a$N(B @code{sm1} $B%5!<%P(B.
                    172: @end table
                    173: @itemize @bullet
                    174: @item
                    175:    $B%5!<%P(B @code{ox_sm1_forAsir} $B$O(B @code{asir} $B$h$j%3%^%s%I(B
                    176:     @code{sm1.start} $B$G5/F0$5$l$k(B @code{sm1} $B%5!<%P$G$"$k(B.
                    177:
                    178:     $BI8=`E*@_Dj$G$O(B, @*
                    179:     @code{ox_sm1_forAsir} =
                    180:          @file{$(OpenXM_HOME)/lib/sm1/bin/ox_sm1}
                    181:        +
                    182:          @file{$(OpenXM_HOME)/lib/sm1/callsm1.sm1}   (macro file) @*
                    183:        +
                    184:          @file{$(OpenXM_HOME)/lib/sm1/callsm1b.sm1}  (macro file) @*
                    185:   $B$G$"$j(B, $B$3$l$i$N%^%/%m%U%!%$%k$O(B, $B0lHL$K$O(B
                    186:    current directory, @code{$(LOAD_SM1_PATH)},
                    187:    @code{$(OpenXM_HOME)/lib/sm1},
                    188:    @code{/usr/local/lib/sm1}
                    189:     $B$N=gHV$G$5$,$5$l$k(B.
                    190: @item $B%W%m%0%i%^!<$N$?$a$N%N!<%H(B:
                    191: @code{sm1} $B%^%/%m$rFI$_9~$s$G<+J,FH<+$N%5!<%P$r:n$k$K$O(B
                    192:     $B<!$N%U%!%$%k$b8+$h(B
                    193:     @file{$(OpenXM_HOME)/src/kxx/oxserver00.c},
                    194:     @file{$(OpenXM_HOME)/src/kxx/sm1stackmachine.c}
                    195: @end itemize
                    196: */
                    197:
                    198:
                    199: /*&ja
                    200: @section $BH!?t0lMw(B
                    201: */
                    202: /*&en
                    203: @section Functions
                    204: */
                    205:
                    206: /*&en
                    207: @c sort-sm1.start
                    208: @node sm1.start,,, SM1 Functions
                    209: @subsection @code{sm1.start}
                    210: @findex sm1.start
                    211: @table @t
                    212: @item sm1.start()
                    213: ::  Start  @code{ox_sm1_forAsir} on the localhost.
                    214: @end table
                    215:
                    216: @table @var
                    217: @item return
                    218: Integer
                    219: @end table
                    220:
                    221: @itemize @bullet
                    222: @item Start @code{ox_sm1_forAsir} on the localhost.
                    223:     It returns the descriptor of @code{ox_sm1_forAsir}.
                    224: @item Set @code{Xm_noX = 1} to start @code{ox_sm1_forAsir}
                    225: without a debug window.
                    226: @item You might have to set suitable orders of variable by the command
                    227: @code{ord}.  For example,
                    228: when you are working in the
                    229: ring of differential operators on the variable @code{x} and @code{dx}
                    230: (@code{dx} stands for
                    231: @tex $\partial/\partial x$
                    232: @end tex
                    233: ),
                    234: @code{sm1} server assumes that
                    235: the variable @code{dx} is collected to the right and the variable
                    236: @code{x} is collected to the left in the printed expression.
                    237: In the example below, you  must not use the variable @code{cc}
                    238: for computation in @code{sm1}.
                    239: @item The variables from @code{a} to @code{z} except @code{d} and @code{o}
                    240: and @code{x0}, ..., @code{x20}, @code{y0}, ..., @code{y20},
                    241: @code{z0}, ..., @code{z20} can be used as variables for ring of
                    242: differential operators in default. (cf. @code{Sm1_ord_list} in @code{sm1}).
                    243: @item The descriptor is stored in @code{static Sm1_proc}.
                    244: The descriptor can be obtained by the function
                    245: @code{sm1.get_Sm1_proc()}.
                    246: @end itemize
                    247: */
                    248: /*&ja
                    249: @c sort-sm1.start
                    250: @node sm1.start,,, SM1 Functions
                    251: @subsection @code{sm1.start}
                    252: @findex sm1.start
                    253: @table @t
                    254: @item sm1.start()
                    255: ::  localhost $B$G(B  @code{ox_sm1_forAsir} $B$r%9%?!<%H$9$k(B.
                    256: @end table
                    257:
                    258: @table @var
                    259: @item return
                    260: $B@0?t(B
                    261: @end table
                    262:
                    263: @itemize @bullet
                    264: @item localhost $B$G(B @code{ox_sm1_forAsir} $B$r%9%?!<%H$9$k(B.
                    265: $B%5!<%P(B @code{ox_sm1_forAsir} $B$N<1JLHV9f$rLa$9(B.
                    266: @item @code{Xm_noX = 1} $B$H$*$/$H%5!<%P(B @code{ox_sm1_forAsir} $B$r%G%P%C%0MQ$N(B
                    267: $B%&%#%s%I%&$J$7$K5/F0$G$-$k(B.
                    268: @item $B%3%^%s%I(B @code{ord} $B$rMQ$$$FJQ?t=g=x$r@5$7$/@_Dj$7$F$*$/I,MW$,(B
                    269: $B$"$k(B.
                    270: $B$?$H$($P(B,
                    271: $BJQ?t(B @code{x} $B$H(B @code{dx} $B>e$NHyJ,:nMQAG4D(B
                    272: (@code{dx} $B$O(B
                    273: @tex $\partial/\partial x$
                    274: @end tex
                    275: $B$KBP1~(B)
                    276: $B$G7W;;$7$F$$$k$H$-(B,
                    277: @code{sm1} $B%5!<%P$O<0$r0u:~$7$?$H$-(B,
                    278: $BJQ?t(B @code{dx} $B$O1&B&$K=8$a$lJQ?t(B
                    279: @code{x} $B$O:8B&$K$"$D$a$i$l$F$$$k$H2>Dj$7$F$$$k(B.
                    280: $B<!$NNc$G$O(B, $BJQ?t(B @code{cc} $B$r(B @code{sm1} $B$G$N7W;;$N$?$a$KMQ$$$F$O$$$1$J$$(B.
                    281: @item @code{a} $B$h$j(B @code{z} $B$N$J$+$G(B,  @code{d} $B$H(B @code{o} $B$r=|$$$?$b$N(B,
                    282: $B$=$l$+$i(B, @code{x0}, ..., @code{x20}, @code{y0}, ..., @code{y20},
                    283: @code{z0}, ..., @code{z20} $B$O(B, $B%G%U%)!<%k%H$GHyJ,:nMQAG4D$NJQ?t$H$7$F(B
                    284: $B;H$($k(B (cf. @code{Sm1_ord_list} in @code{sm1}).
                    285: @item $B<1JLHV9f$O(B @code{static Sm1_proc} $B$K3JG<$5$l$k(B.
                    286: $B$3$N<1JLHV9f$O4X?t(B @code{sm1.get_Sm1_proc()} $B$G$H$j$@$9$3$H$,$G$-$k(B.
                    287: @end itemize
                    288: */
                    289: /*&C
                    290: @example
                    291: [260] ord([da,a,db,b]);
                    292: [da,a,db,b,dx,dy,dz,x,y,z,dt,ds,t,s,u,v,w,
                    293: ......... omit ..................
                    294: ]
                    295: [261] a*da;
                    296: a*da
                    297: [262] cc*dcc;
                    298: dcc*cc
                    299: [263] sm1.mul(da,a,[a]);
                    300: a*da+1
                    301: [264] sm1.mul(a,da,[a]);
                    302: a*da
                    303: @end example
                    304: */
                    305: /*&en
                    306: @table @t
                    307: @item Reference
                    308:     @code{ox_launch}, @code{sm1.push_int0}, @code{sm1.push_poly0},
                    309:     @code{ord}
                    310: @end table
                    311: */
                    312: /*&ja
                    313: @table @t
                    314: @item $B;2>H(B
                    315:     @code{ox_launch}, @code{sm1.push_int0}, @code{sm1.push_poly0},
                    316:     @code{ord}
                    317: @end table
                    318: */
                    319:
                    320:
                    321:
                    322: /*&en
                    323: @c sort-sm1
                    324: @node sm1.sm1,,, SM1 Functions
                    325: @subsection @code{sm1.sm1}
                    326: @findex sm1.sm1
                    327: @table @t
                    328: @item sm1.sm1(@var{p},@var{s})
                    329: ::  ask the @code{sm1} server to execute the command string @var{s}.
                    330: @end table
                    331:
                    332: @table @var
                    333: @item return
                    334: Void
                    335: @item p
                    336: Number
                    337: @item s
                    338: String
                    339: @end table
                    340:
                    341: @itemize @bullet
                    342: @item  It asks the @code{sm1} server of the descriptor number @var{p}
                    343: to execute the command string @var{s}.
                    344: (In the next example, the descriptor number is 0.)
                    345: @end itemize
                    346: */
                    347: /*&ja
                    348: @node sm1.sm1,,, SM1 Functions
                    349: @subsection @code{sm1.sm1}
                    350: @findex sm1.sm1
                    351: @table @t
                    352: @item sm1.sm1(@var{p},@var{s})
                    353: ::  $B%5!<%P(B @code{sm1} $B$K%3%^%s%INs(B @var{s} $B$r<B9T$7$F$/$l$k$h$&$K$?$N$`(B.
                    354: @end table
                    355:
                    356: @table @var
                    357: @item return
                    358: $B$J$7(B
                    359: @item p
                    360: $B?t(B
                    361: @item s
                    362: $BJ8;zNs(B
                    363: @end table
                    364:
                    365: @itemize @bullet
                    366: @item  $B<1JLHV9f(B @var{p} $B$N(B @code{sm1} $B%5!<%P$K(B
                    367: $B%3%^%s%INs(B @var{s} $B$r<B9T$7$F$/$l$k$h$&$KMj$`(B.
                    368:  ($B<!$NNc$G$O(B, $B<1JLHV9f(B 0)
                    369: @end itemize
                    370: */
                    371: /*&C
                    372: @example
                    373: [261] sm1.sm1(0," ( (x-1)^2 ) . ");
                    374: 0
                    375: [262] ox_pop_string(0);
                    376: x^2-2*x+1
                    377: [263] sm1.sm1(0," [(x*(x-1))  [(x)]] deRham ");
                    378: 0
                    379: [264] ox_pop_string(0);
                    380: [1 , 2]
                    381: @end example
                    382: */
                    383:
                    384: /*&ja
                    385: @table @t
                    386: @item $B;2>H(B
                    387:     @code{sm1.start}, @code{ox_push_int0}, @code{sm1.push_poly0}, @code{sm1.get_Sm1_proc()}.
                    388: @end table
                    389: */
                    390: /*&en
                    391: @table @t
                    392: @item Reference
                    393:     @code{sm1.start}, @code{ox_push_int0}, @code{sm1.push_poly0}, @code{sm1.get_Sm1_proc()}.
                    394: @end table
                    395: */
                    396:
                    397:
                    398: /*&en
                    399: @c sort-sm1.push_int0
                    400: @node sm1.push_int0,,, SM1 Functions
                    401: @subsection @code{sm1.push_int0}
                    402: @findex sm1.push_int0
                    403: @table @t
                    404: @item sm1.push_int0(@var{p},@var{f})
                    405: ::   push the object @var{f} to the server with the descriptor number @var{p}.
                    406: @end table
                    407:
                    408: @table @var
                    409: @item return
                    410: Void
                    411: @item p
                    412: Number
                    413: @item f
                    414: Object
                    415: @end table
                    416:
                    417: @itemize @bullet
                    418: @item When @code{type(@var{f})} is 2 (recursive polynomial),
                    419:     @var{f} is converted to a string (type == 7)
                    420:     and is sent to the server by @code{ox_push_cmo}.
                    421: @item When @code{type(@var{f})} is 0 (zero),
                    422:      it is translated to the 32 bit integer zero
                    423:     on the server.
                    424:     Note that @code{ox_push_cmo(@var{p},0)} sends @code{CMO_NULL} to the server.
                    425: In other words, the server does not get the 32 bit integer 0 nor
                    426: the bignum 0.
                    427: @item  @code{sm1} integers are classfied into the 32 bit integer and
                    428: the bignum.
                    429: When @code{type(@var{f})} is 1 (number), it is translated to the
                    430: 32 bit integer on the server.
                    431: Note that @code{ox_push_cmo(@var{p},1234)} send the bignum 1234 to the
                    432: @code{sm1} server.
                    433: @item In other cases,  @code{ox_push_cmo} is called without data conversion.
                    434: @end itemize
                    435: */
                    436: /*&ja
                    437: @c sort-sm1.push_int0
                    438: @node sm1.push_int0,,, SM1 Functions
                    439: @subsection @code{sm1.push_int0}
                    440: @findex sm1.push_int0
                    441: @table @t
                    442: @item sm1.push_int0(@var{p},@var{f})
                    443: ::   $B%*%V%8%'%/%H(B @var{f} $B$r<1JL;R(B @var{p} $B$N%5!<%P$XAw$k(B.
                    444: @end table
                    445:
                    446: @table @var
                    447: @item return
                    448: $B$J$7(B
                    449: @item p
                    450: $B?t(B
                    451: @item f
                    452: $B%*%V%8%'%/%H(B
                    453: @end table
                    454:
                    455: @itemize @bullet
                    456: @item @code{type(@var{f})} $B$,(B 2 ($B:F5"B?9`<0(B) $B$N$H$-(B,
                    457:     @var{f} $B$OJ8;zNs(B (type == 7) $B$KJQ49$5$l$F(B,
                    458:     @code{ox_push_cmo} $B$rMQ$$$F%5!<%P$XAw$i$l$k(B.
                    459: @item @code{type(@var{f})} $B$,(B 0 (zero) $B$N$H$-$O(B,
                    460:     $B%5!<%P>e$G$O(B, 32 bit $B@0?t$H2r<a$5$l$k(B.
                    461:     $B$J$*(B @code{ox_push_cmo(P,0)} $B$O%5!<%P$KBP$7$F(B @code{CMO_NULL}
                    462: $B$r$*$/$k$N$G(B, $B%5!<%PB&$G$O(B, 32 bit $B@0?t$r<u$1<h$k$o$1$G$O$J$$(B.
                    463: @item  @code{sm1} $B$N@0?t$O(B, 32 bit $B@0?t$H(B bignum $B$K$o$1$k$3$H$,$G$-$k(B.
                    464: @code{type(@var{f})} $B$,(B 1 ($B?t(B)$B$N$H$-(B, $B$3$N4X?t$O(B 32 bit integer $B$r%5!<%P$K(B
                    465: $B$*$/$k(B.
                    466: @code{ox_push_cmo(@var{p},1234)} $B$O(B bignum $B$N(B 1234 $B$r(B
                    467: @code{sm1} $B%5!<%P$K$*$/$k$3$H$KCm0U$7$h$&(B.
                    468: @item $B$=$NB>$N>l9g$K$O(B  @code{ox_push_cmo} $B$r%G!<%?7?$NJQ49$J$7$K8F$S=P$9(B.
                    469: @end itemize
                    470: */
                    471: /*&C
                    472: @example
                    473: [219] P=sm1.start();
                    474: 0
                    475: [220] sm1.push_int0(P,x*dx+1);
                    476: 0
                    477: [221] A=ox_pop_cmo(P);
                    478: x*dx+1
                    479: [223] type(A);
                    480: 7   (string)
                    481: @end example
                    482:
                    483: @example
                    484: [271] sm1.push_int0(0,[x*(x-1),[x]]);
                    485: 0
                    486: [272] ox_execute_string(0," deRham ");
                    487: 0
                    488: [273] ox_pop_cmo(0);
                    489: [1,2]
                    490: @end example
                    491: */
                    492: /*&en
                    493: @table @t
                    494: @item Reference
                    495:     @code{ox_push_cmo}
                    496: @end table
                    497: */
                    498: /*&ja
                    499: @table @t
                    500: @item Reference
                    501:     @code{ox_push_cmo}
                    502: @end table
                    503: */
                    504:
                    505:
                    506:
                    507: /*&en
                    508: @c sort-sm1.gb
                    509: @node sm1.gb,,, SM1 Functions
                    510: @subsection @code{sm1.gb}
                    511: @findex sm1.gb
                    512: @findex sm1.gb_d
                    513: @table @t
1.6       takayama  514: @item sm1.gb([@var{f},@var{v},@var{w}]|proc=@var{p},sorted=@var{q},dehomogenize=@var{r},needBack=@var{n})
1.1       takayama  515: ::  computes the Grobner basis of @var{f} in the ring of differential
                    516: operators with the variable @var{v}.
                    517: @item sm1.gb_d([@var{f},@var{v},@var{w}]|proc=@var{p})
                    518: ::  computes the Grobner basis of @var{f} in the ring of differential
                    519: operators with the variable @var{v}.
                    520: The result will be returned as a list of distributed polynomials.
                    521: @end table
                    522:
                    523: @table @var
                    524: @item return
                    525: List
                    526: @item p, q, r
                    527: Number
                    528: @item f, v, w
                    529: List
                    530: @end table
                    531:
                    532: @itemize @bullet
                    533: @item
                    534:    It returns the Grobner basis of the set of polynomials @var{f}
                    535:    in the ring of deferential operators with the variables @var{v}.
                    536: @item
                    537:    The weight vectors are given by @var{w}, which can be omitted.
                    538:     If @var{w} is not given,
                    539:     the graded reverse lexicographic order will be used to compute Grobner basis.
                    540: @item
                    541:    The return value of @code{sm1.gb}
                    542:     is the list of the Grobner basis of @var{f} and the initial
                    543:     terms (when @var{w} is not given) or initial ideal (when @var{w} is given).
                    544: @item
                    545:    @code{sm1.gb_d} returns the results by a list of distributed polynomials.
                    546:     Monomials in each distributed polynomial are ordered in the given order.
                    547:     The return value consists of
                    548:     [variable names, order matrix, grobner basis in districuted polynomials,
                    549:      initial monomials or initial polynomials].
                    550: @item
                    551:    When a non-term order is given, the Grobner basis is computed in
                    552:    the homogenized Weyl algebra  (See Section 1.2 of the book of SST).
                    553:    The homogenization variable h is automatically added.
                    554: @item
                    555:    When the optional variable @var{q} is set, @code{sm1.gb} returns,
                    556:    as the third return value, a list of
                    557:    the Grobner basis and the initial ideal
                    558:    with sums of monomials sorted by the given order.
                    559:    Each polynomial is expressed as a string temporally for now.
                    560:    When the optional variable @var{r} is set to one,
                    561:    the polynomials are dehomogenized (,i.e., h is set to 1).
1.5       takayama  562: @item If you want to have a reduced basis or compute the initial form ideal exactly,
                    563: execute sm1.auto_reduce(1) before executing this function.
1.7     ! takayama  564: @item When the needBack option @var{n} is 1, it returns the answer is a different format as [groebner basis,initial, gb,1,all,[groebner basis, backward transformation]]
1.1       takayama  565: @end itemize
                    566: */
                    567: /*&ja
                    568: @c sort-sm1.gb
                    569: @node sm1.gb,,, SM1 Functions
                    570: @subsection @code{sm1.gb}
                    571: @findex sm1.gb
                    572: @findex sm1.gb_d
                    573: @table @t
1.6       takayama  574: @item sm1.gb([@var{f},@var{v},@var{w}]|proc=@var{p},sorted=@var{q},dehomogenize=@var{r},needBack=@var{n})
1.1       takayama  575: ::  @var{v} $B>e$NHyJ,:nMQAG4D$K$*$$$F(B @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B.
                    576: @item sm1.gb_d([@var{f},@var{v},@var{w}]|proc=@var{p})
                    577: ::  @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.
                    578: @end table
                    579:
                    580: @table @var
                    581: @item return
                    582: $B%j%9%H(B
                    583: @item p, q, r
                    584: $B?t(B
                    585: @item f, v, w
                    586: $B%j%9%H(B
                    587: @end table
                    588:
                    589: @itemize @bullet
                    590: @item
                    591:    @var{v} $B>e$NHyJ,:nMQAG4D$K$*$$$F(B @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B.
                    592: @item
                    593:    Weight $B%Y%/%H%k(B @var{w} $B$O>JN,$7$F$h$$(B.
                    594:    $B>JN,$7$?>l9g(B, graded reverse lexicographic order $B$r$D$+$C$F(B
                    595:    $B%V%l%V%J4pDl$r7W;;$9$k(B.
                    596: @item
                    597:    @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
                    598:   ( @var{w} $B$,$J$$$H$-(B ) $B$^$?$O(B $B%$%K%7%!%kB?9`<0(B ( @var{w} $B$,M?$($i$?$H$-(B)
                    599:   $B$N%j%9%H$G$"$k(B.
                    600: @item
                    601:    @code{sm1.gb_d} $B$O7k2L$rJ,;6B?9`<0$N%j%9%H$GLa$9(B.
                    602:     $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.
                    603:    $BLa$jCM$O(B
                    604:     [$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]
                    605:    $B$G$"$k(B.
                    606: @item
                    607:    Term order $B$G$J$$=g=x$,M?$($i$l$?>l9g$O(B, $BF1<!2=%o%$%kBe?t$G%0%l%V%J4pDl$,7W;;$5$l$k(B (SST $B$NK\$N(B Section 1.2 $B$r8+$h(B).
                    608: $BF1<!2=JQ?t(B @code{h} $B$,7k2L$K2C$o$k(B.
                    609: @item $B%*%W%7%g%J%kJQ?t(B @var{q} $B$,%;%C%H$5$l$F$$$k$H$-$O(B,
                    610:     3 $BHVL\$NLa$jCM$H$7$F(B, $B%0%l%V%J4pDl$*$h$S%$%K%7%!%k$N%j%9%H$,(B
                    611:     $BM?$($i$l$?=g=x$G%=!<%H$5$l$?%b%N%_%"%k$NOB$H$7$FLa$5$l$k(B.
                    612:     $B$$$^$N$H$3$m$3$NB?9`<0$O(B, $BJ8;zNs$GI=8=$5$l$k(B.
                    613:     $B%*%W%7%g%J%kJQ?t(B @var{r} $B$,%;%C%H$5$l$F$$$k$H$-$O(B,
                    614:     $BLa$jB?9`<0$O(B dehomogenize $B$5$l$k(B ($B$9$J$o$A(B h $B$K(B 1 $B$,BeF~$5$l$k(B).
1.5       takayama  615: @item Reduced $B%0%l%V%J!<4pDl$^$?$O(B in_w $B$r7W;;$7$?$$$H$-$O(B, $B$3$N4X?t$N<B9T$NA0$K(B
                    616: sm1.auto_reduce(1) $B$r<B9T$7$F$*$/$3$H(B.
1.6       takayama  617: @item needBack $B%*%W%7%g%s$,(B 1 $B$N;~$O(B, $BB>$N>l9g$H$O0[$J$k7A<0(B
1.7     ! takayama  618: [groebner basis, initial, gb,1,all, [groebner basis, backward transformation]]
1.6       takayama  619: $B$GEz$($rLa$9(B. (sm1 $B$N(B getAttribute $B$r;2>H(B)
1.1       takayama  620: @end itemize
                    621: */
                    622: /*&C
                    623: @example
                    624: [293] sm1.gb([[x*dx+y*dy-1,x*y*dx*dy-2],[x,y]]);
                    625: [[x*dx+y*dy-1,y^2*dy^2+2],[x*dx,y^2*dy^2]]
                    626: @end example
                    627: */
                    628: /*&en
                    629: In the example above,
                    630: @tex the set $\{ x \partial_x + y \partial_y -1,
                    631:                  y^2 \partial_y^2+2\}$
                    632: is the Gr\"obner basis of the input with respect to the
                    633: graded reverse lexicographic order such that
                    634: $ 1 \leq \partial_y \leq \partial_x \leq y \leq x \leq \cdots$.
                    635: The set $\{x \partial_x, y^2 \partial_y\}$ is the leading monomials
                    636: (the initial monominals) of the Gr\"obner basis.
                    637: @end tex
                    638: */
                    639: /*&ja
                    640: $B>e$NNc$K$*$$$F(B,
                    641: @tex $B=89g(B $\{ x \partial_x + y \partial_y -1,
                    642:                  y^2 \partial_y^2+2\}$
                    643: $B$O(B
                    644: $ 1 \leq \partial_y \leq \partial_x \leq y \leq x \leq \cdots$
                    645: $B$G$"$k$h$&$J(B
                    646: graded reverse lexicographic order $B$K4X$9$k%0%l%V%J4pDl$G$"$k(B.
                    647: $B=89g(B $\{x \partial_x, y^2 \partial_y\}$ $B$O%0%l%V%J4pDl$N3F85$K(B
                    648: $BBP$9$k(B leading monomial (initial monomial) $B$G$"$k(B.
                    649: @end tex
                    650: */
                    651: /*&C
                    652: @example
                    653: [294] sm1.gb([[dx^2+dy^2-4,dx*dy-1],[x,y],[[dx,50,dy,2,x,1]]]);
                    654: [[dx+dy^3-4*dy,-dy^4+4*dy^2-1],[dx,-dy^4]]
                    655: @end example
                    656: */
                    657: /*&en
                    658: In the example above, two monomials
                    659: @tex
                    660: $m = x^a y^b \partial_x^c \partial_y^d$ and
                    661: $m' = x^{a'} y^{b'} \partial_x^{c'} \partial_y^{d'}$
                    662: are firstly compared by the weight vector
                    663: {\tt (dx,dy,x,y) = (50,2,1,0)}
                    664: (i.e., $m$ is larger than $m'$ if $50c+2d+a > 50c'+2d'+a'$)
                    665: and when the comparison is tie, then these are
                    666: compared by the reverse lexicographic order
                    667: (i.e., if $50c+2d+a = 50c'+2d'+a'$, then use the reverse lexicogrpahic order).
                    668: @end tex
                    669: */
                    670: /*&ja
                    671: $B>e$NNc$K$*$$$FFs$D$N%b%N%_%"%k(B
                    672: @tex
                    673: $m = x^a y^b \partial_x^c \partial_y^d$ $B$*$h$S(B
                    674: $m' = x^{a'} y^{b'} \partial_x^{c'} \partial_y^{d'}$
                    675: $B$O:G=i$K(B weight vector
                    676: {\tt (dx,dy,x,y) = (50,2,1,0)} $B$rMQ$$$FHf3S$5$l$k(B
                    677: ($B$D$^$j(B $m$ $B$O(B $50c+2d+a > 50c'+2d'+a'$ $B$N$H$-(B
                    678:  $m'$ $B$h$jBg$-$$(B )
                    679: $B<!$K$3$NHf3S$G>!Ii$,$D$+$J$$$H$-$O(B reverse lexicographic order $B$GHf3S$5$l$k(B
                    680: ($B$D$^$j(B $50c+2d+a = 50c'+2d'+a'$ $B$N$H$-(B reverse lexicographic order $B$GHf3S(B
                    681: $B$5$l$k(B).
                    682: @end tex
                    683: */
                    684: /*&C
                    685: @example
                    686: [294] F=sm1.gb([[dx^2+dy^2-4,dx*dy-1],[x,y],[[dx,50,dy,2,x,1]]]|sorted=1);
                    687:       map(print,F[2][0])$
                    688:       map(print,F[2][1])$
                    689: @end example
                    690: */
                    691: /*&C
                    692: @example
                    693: [595]
                    694:    sm1.gb([["dx*(x*dx +y*dy-2)-1","dy*(x*dx + y*dy -2)-1"],
                    695:              [x,y],[[dx,1,x,-1],[dy,1]]]);
                    696:
                    697: [[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],
                    698:  [x*dx^2+(y*dy-h^2)*dx,x*dy*dx+y*dy^2-h^2*dy-h^3,h^3*dx]]
                    699:
                    700: [596]
                    701:    sm1.gb_d([["dx (x dx +y dy-2)-1","dy (x dx + y dy -2)-1"],
                    702:              "x,y",[[dx,1,x,-1],[dy,1]]]);
                    703: [[[e0,x,y,H,E,dx,dy,h],
                    704:  [[0,-1,0,0,0,1,0,0],[0,0,0,0,0,0,1,0],[1,0,0,0,0,0,0,0],
                    705:   [0,1,1,1,1,1,1,0],[0,0,0,0,0,0,-1,0],[0,0,0,0,0,-1,0,0],
                    706:   [0,0,0,0,-1,0,0,0],[0,0,0,-1,0,0,0,0],[0,0,-1,0,0,0,0,0],
                    707:   [0,0,0,0,0,0,0,1]]],
                    708: [[(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)*
                    709: <<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
                    710: ,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
                    711: ,1,3>>],
                    712:  [(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)*<
                    713: <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
                    714: ,0,0,0,0,3>>,(1)*<<0,0,0,0,0,1,0,3>>]]]
                    715: @end example
                    716: */
1.6       takayama  717: /*&C
                    718: @example
                    719: [1834] sm1.gb([[dx^2-x,dx],[x]] | needBack=1);
1.7     ! takayama  720: [[dx,dx^2-x,1],[dx,dx^2,1],gb,1,all,[[dx,dx^2-x,1],[[0,1],[1,0],[-dx,dx^2-x]]]]
1.6       takayama  721: @end example
                    722: */
1.1       takayama  723:
                    724: /*&en
                    725: @table @t
                    726: @item Reference
1.5       takayama  727:     @code{sm1.auto_reduce}, @code{sm1.reduction}, @code{sm1.rat_to_p}
1.1       takayama  728: @end table
                    729: */
                    730: /*&ja
                    731: @table @t
                    732: @item $B;2>H(B
1.5       takayama  733:     @code{sm1.auto_reduce}, @code{sm1.reduction}, @code{sm1.rat_to_p}
1.1       takayama  734: @end table
                    735: */
                    736:
                    737:
                    738:
                    739: /*&en
                    740: @c sort-sm1.deRham
                    741: @node sm1.deRham,,, SM1 Functions
                    742: @subsection @code{sm1.deRham}
                    743: @findex sm1.deRham
                    744: @table @t
                    745: @item sm1.deRham([@var{f},@var{v}]|proc=@var{p})
                    746: ::  ask the server to evaluate the dimensions of the de Rham cohomology  groups
                    747: of C^n - (the zero set of @var{f}=0).
                    748: @end table
                    749:
                    750: @table @var
                    751: @item return
                    752: List
                    753: @item p
                    754: Number
                    755: @item f
                    756: String or polynomial
                    757: @item v
                    758: List
                    759: @end table
                    760:
                    761: @itemize @bullet
                    762: @item  It returns the dimensions of the de Rham cohomology groups
                    763:     of X = C^n \ V(@var{f}).
                    764:    In other words,  it returns
                    765:       [dim H^0(X,C), dim H^1(X,C), dim H^2(X,C), ..., dim H^n(X,C)].
                    766: @item   @var{v} is a list of variables. n = @code{length(@var{v})}.
                    767: @item
                    768:    @code{sm1.deRham} requires huge computer resources.
                    769:     For example, @code{sm1.deRham(0,[x*y*z*(x+y+z-1)*(x-y),[x,y,z]])}
                    770:     is already very hard.
                    771: @item
                    772:  To efficiently analyze the roots of b-function, @code{ox_asir} should be used
                    773:   from @code{ox_sm1_forAsir}.
                    774:     It is recommended to load the communication module for @code{ox_asir}
                    775:     by the command @*
                    776:    @code{sm1(0,"[(parse) (oxasir.sm1) pushfile] extension");}
                    777:  This command is automatically executed when @code{ox_sm1_forAsir} is started.
                    778: @item If you make an interruption to the function @code{sm1.deRham}
                    779: by @code{ox_reset(sm1.get_Sm1_proc());}, the server might get out of the standard
                    780: mode. So, it is strongly recommended to execute the command
                    781: @code{ox_shutdown(sm1.get_Sm1_proc());} to interrupt and restart the server.
                    782: @end itemize
                    783: */
                    784: /*&ja
                    785: @c sort-sm1.deRham
                    786: @node sm1.deRham,,, SM1 Functions
                    787: @subsection @code{sm1.deRham}
                    788: @findex sm1.deRham
                    789: @table @t
                    790: @item sm1.deRham([@var{f},@var{v}]|proc=@var{p})
                    791: ::  $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.
                    792: @end table
                    793:
                    794: @table @var
                    795: @item return
                    796: $B%j%9%H(B
                    797: @item p
                    798: $B?t(B
                    799: @item f
                    800: $BJ8;zNs(B $B$^$?$O(B $BB?9`<0(B
                    801: @item v
                    802: $B%j%9%H(B
                    803: @end table
                    804:
                    805: @itemize @bullet
                    806: @item $B$3$NH!?t$O6u4V(B X = C^n \ V(@var{f}) $B$N%I%i!<%`%3%[%b%m%872$N<!85$r7W;;$9$k(B.
                    807:    $B$9$J$o$A(B,
                    808:    [dim H^0(X,C), dim H^1(X,C), dim H^2(X,C), ..., dim H^n(X,C)]
                    809:    $B$rLa$9(B.
                    810: @item   @var{v} $B$OJQ?t$N%j%9%H(B. n = @code{length(@var{v})} $B$G$"$k(B.
                    811: @item
                    812:    @code{sm1.deRham} $B$O7W;;5!$N;q8;$rBgNL$K;HMQ$9$k(B.
                    813:     $B$?$H$($P(B @code{sm1.deRham(0,[x*y*z*(x+y+z-1)*(x-y),[x,y,z]])}
                    814:    $B$N7W;;$9$i$9$G$KHs>o$KBgJQ$G$"$k(B.
                    815: @item
                    816:   b-$B4X?t$N:,$r8zN($h$/2r@O$9$k$K$O(B, @code{ox_asir} $B$,(B @code{ox_sm1_forAsir}
                    817:   $B$h$j;HMQ$5$l$k$Y$-$G$"$k(B.  $B%3%^%s%I(B @*
                    818:    @code{sm1(0,"[(parse) (oxasir.sm1) pushfile] extension");}
                    819:    $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.
                    820:    $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.
                    821: @item
                    822:   @code{sm1.deRham} $B$r(B @code{ox_reset(sm1.get_Sm1_proc());} $B$GCfCG$9$k$H(B,
                    823:   $B0J8e(B sm1 $B%5!<%P$,HsI8=`%b!<%I$KF~$jM=4|$7$J$$F0:n$r$9$k>l9g(B
                    824:   $B$,$"$k$N$G(B, $B%3%^%s%I(B @code{ox_shutdown(sm1.get_Sm1_proc());} $B$G(B, @code{ox_sm1_forAsir}
                    825:   $B$r0l;~(B shutdown $B$7$F%j%9%?!<%H$7$?J}$,0BA4$G$"$k(B.
                    826: @end itemize
                    827: */
                    828: /*&C
                    829: @example
                    830: [332] sm1.deRham([x^3-y^2,[x,y]]);
                    831: [1,1,0]
                    832: [333] sm1.deRham([x*(x-1),[x]]);
                    833: [1,2]
                    834: @end example
                    835: */
                    836: /*&en
                    837: @table @t
                    838: @item Reference
                    839:     @code{sm1.start}, @code{deRham} (sm1 command)
                    840: @item Algorithm:
                    841:     Oaku, Takayama, An algorithm for de Rham cohomology groups of the
                    842:     complement of an affine variety via D-module computation,
                    843:     Journal of pure and applied algebra 139 (1999), 201--233.
                    844: @end table
                    845: */
                    846: /*&ja
                    847: @table @t
                    848: @item $B;2>H(B
                    849:     @code{sm1.start}, @code{deRham} (sm1 command)
                    850: @item Algorithm:
                    851:     Oaku, Takayama, An algorithm for de Rham cohomology groups of the
                    852:     complement of an affine variety via D-module computation,
                    853:     Journal of pure and applied algebra 139 (1999), 201--233.
                    854: @end table
                    855: */
                    856:
                    857:
                    858:
                    859:
                    860: /*&en
                    861: @c sort-sm1.hilbert
                    862: @node sm1.hilbert,,, SM1 Functions
                    863: @subsection @code{sm1.hilbert}
                    864: @findex sm1.hilbert
                    865: @findex hilbert_polynomial
                    866: @table @t
                    867: @item sm1.hilbert([@var{f},@var{v}]|proc=@var{p})
                    868: ::  ask the server to compute the Hilbert polynomial for the set of polynomials @var{f}.
                    869: @item hilbert_polynomial(@var{f},@var{v})
                    870: ::  ask the server to compute the Hilbert polynomial for the set of polynomials @var{f}.
                    871: @end table
                    872:
                    873: @table @var
                    874: @item return
                    875: Polynomial
                    876: @item p
                    877: Number
                    878: @item f, v
                    879: List
                    880: @end table
                    881:
                    882: @itemize @bullet
                    883: @item  It returns the Hilbert polynomial h(k) of the set of polynomials
                    884:     @var{f}
                    885:     with respect to the set of variables @var{v}.
                    886: @item
                    887:     h(k) = dim_Q F_k/I \cap F_k  where F_k the set of polynomials of which
                    888:     degree is less than or equal to k and I is the ideal generated by the
                    889:     set of polynomials @var{f}.
                    890: @item
                    891:    Note for sm1.hilbert:
                    892:    For an efficient computation, it is preferable that
                    893:    the set of polynomials @var{f} is a set of monomials.
                    894:    In fact, this function firstly compute a Grobner basis of @var{f}, and then
                    895:    compute the Hilbert polynomial of the initial monomials of the basis.
                    896:    If the input @var{f} is already a Grobner
                    897:    basis, a Grobner basis is recomputed in this function,
                    898:    which is a waste of time and Grobner basis computation in the ring of
                    899:    polynomials in @code{sm1} is  slower than in @code{asir}.
                    900: @end itemize
                    901: */
                    902: /*&ja
                    903: @c sort-sm1.hilbert
                    904: @node sm1.hilbert,,, SM1 Functions
                    905: @subsection @code{sm1.hilbert}
                    906: @findex sm1.hilbert
                    907: @findex hilbert_polynomial
                    908: @table @t
                    909: @item sm1.hilbert([@var{f},@var{v}]|proc=@var{p})
                    910: :: $BB?9`<0$N=89g(B @var{f} $B$N%R%k%Y%k%HB?9`<0$r7W;;$9$k(B.
                    911: @item hilbert_polynomial(@var{f},@var{v})
                    912: :: $BB?9`<0$N=89g(B @var{f} $B$N%R%k%Y%k%HB?9`<0$r7W;;$9$k(B.
                    913: @end table
                    914:
                    915: @table @var
                    916: @item return
                    917: $BB?9`<0(B
                    918: @item p
                    919: $B?t(B
                    920: @item f, v
                    921: $B%j%9%H(B
                    922: @end table
                    923:
                    924: @itemize @bullet
                    925: @item  $BB?9`<0$N=89g(B @var{f} $B$NJQ?t(B @var{v} $B$K$+$s$9$k%R%k%Y%k%HB?9`<0(B h(k)
                    926:    $B$r7W;;$9$k(B.
                    927: @item
                    928:     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
                    929:     $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.
                    930: @item
                    931:    sm1.hilbert $B$K$+$s$9$k%N!<%H(B:
                    932:    $B8zN($h$/7W;;$9$k$K$O(B @var{f} $B$O%b%N%_%"%k$N=89g$K$7$?J}$,$$$$(B.
                    933:    $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
                    934:    monomial $BC#$N%R%k%Y%k%HB?9`<0$r7W;;$9$k(B.
                    935:   $B$7$?$,$C$F(B, $BF~NO(B @var{f} $B$,$9$G$K%0%l%V%J4pDl$@$H$3$NH!?t$N$J$+$G$b$&0lEY(B
                    936:    $B%0%l%V%J4pDl$N7W;;$,$*$3$J$o$l$k(B. $B$3$l$O;~4V$NL5BL$G$"$k$7(B, @code{sm1} $B$N(B
                    937:   $BB?9`<0%0%l%V%J4pDl7W;;$O(B @code{asir} $B$h$jCY$$(B.
                    938: @end itemize
                    939: */
                    940:
                    941: /*&C
                    942: @example
                    943:
                    944: [346] load("katsura")$
                    945: [351] A=hilbert_polynomial(katsura(5),[u0,u1,u2,u3,u4,u5]);
                    946: 32
                    947:
                    948: @end example
                    949:
                    950: @example
                    951: [279] load("katsura")$
                    952: [280] A=gr(katsura(5),[u0,u1,u2,u3,u4,u5],0)$
                    953: [281] dp_ord();
                    954: 0
                    955: [282] B=map(dp_ht,map(dp_ptod,A,[u0,u1,u2,u3,u4,u5]));
                    956: [(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>>,
                    957:  (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>>,
                    958:  (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>>,
                    959:   (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>>,
                    960:   (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>>,
                    961:  (1)*<<0,1,0,0,0,4>>,(1)*<<0,0,0,0,0,6>>]
                    962: [283] C=map(dp_dtop,B,[u0,u1,u2,u3,u4,u5]);
                    963: [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,
                    964:  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,
                    965:  u5^4*u2,u5^4*u1,u5^6]
                    966: [284] sm1.hilbert([C,[u0,u1,u2,u3,u4,u5]]);
                    967: 32
                    968: @end example
                    969: */
                    970:
                    971: /*&en
                    972: @table @t
                    973: @item Reference
                    974:     @code{sm1.start}, @code{sm1.gb}, @code{longname}
                    975: @end table
                    976: */
                    977: /*&ja
                    978: @table @t
                    979: @item $B;2>H(B
                    980:     @code{sm1.start}, @code{sm1.gb}, @code{longname}
                    981: @end table
                    982: */
                    983:
                    984:
                    985: /*&en
                    986: @c sort-sm1.genericAnn
                    987: @node sm1.genericAnn,,, SM1 Functions
                    988: @subsection @code{sm1.genericAnn}
                    989: @findex sm1.genericAnn
                    990: @table @t
                    991: @item sm1.genericAnn([@var{f},@var{v}]|proc=@var{p})
                    992: ::  It computes  the annihilating ideal for @var{f}^s.
                    993:     @var{v} is the list of variables.  Here, s is @var{v}[0] and
                    994:     @var{f} is a polynomial in the variables @code{rest}(@var{v}).
                    995: @end table
                    996:
                    997: @table @var
                    998: @item return
                    999: List
                   1000: @item p
                   1001: Number
                   1002: @item f
                   1003: Polynomial
                   1004: @item v
                   1005: List
                   1006: @end table
                   1007:
                   1008: @itemize @bullet
                   1009: @item  This function computes  the annihilating ideal for @var{f}^s.
                   1010:     @var{v} is the list of variables.  Here, s is @var{v}[0] and
                   1011:     @var{f} is a polynomial in the variables @code{rest}(@var{v}).
                   1012: @end itemize
                   1013: */
                   1014: /*&ja
                   1015: @c sort-sm1.genericAnn
                   1016: @node sm1.genericAnn,,, SM1 Functions
                   1017: @subsection @code{sm1.genericAnn}
                   1018: @findex sm1.genericAnn
                   1019: @table @t
                   1020: @item sm1.genericAnn([@var{f},@var{v}]|proc=@var{p})
                   1021: ::  @var{f}^s $B$N$_$?$9HyJ,J}Dx<0A4BN$r$b$H$a$k(B.
                   1022:     @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,
                   1023:     @var{f} $B$OJQ?t(B @code{rest}(@var{v}) $B>e$NB?9`<0$G$"$k(B.
                   1024: @end table
                   1025:
                   1026: @table @var
                   1027: @item return
                   1028: $B%j%9%H(B
                   1029: @item p
                   1030: $B?t(B
                   1031: @item f
                   1032: $BB?9`<0(B
                   1033: @item v
                   1034: $B%j%9%H(B
                   1035: @end table
                   1036:
                   1037: @itemize @bullet
                   1038: @item $B$3$NH!?t$O(B,
                   1039:   @var{f}^s $B$N$_$?$9HyJ,J}Dx<0A4BN$r$b$H$a$k(B.
                   1040:     @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,
                   1041:     @var{f} $B$OJQ?t(B @code{rest}(@var{v}) $B>e$NB?9`<0$G$"$k(B.
                   1042: @end itemize
                   1043: */
                   1044: /*&C
                   1045: @example
                   1046: [595] sm1.genericAnn([x^3+y^3+z^3,[s,x,y,z]]);
                   1047: [-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]
                   1048: @end example
                   1049: */
                   1050: /*&en
                   1051: @table @t
                   1052: @item Reference
                   1053:     @code{sm1.start}
                   1054: @end table
                   1055: */
                   1056: /*&ja
                   1057: @table @t
                   1058: @item $B;2>H(B
                   1059:     @code{sm1.start}
                   1060: @end table
                   1061: */
                   1062:
                   1063:
                   1064:
                   1065: /*&en
                   1066: @c sort-sm1.wTensor0
                   1067: @node sm1.wTensor0,,, SM1 Functions
                   1068: @subsection @code{sm1.wTensor0}
                   1069: @findex sm1.wTensor0
                   1070: @table @t
                   1071: @item sm1.wTensor0([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})
                   1072: ::   It computes the D-module theoretic 0-th tensor product
                   1073:     of @var{f} and @var{g}.
                   1074: @end table
                   1075:
                   1076: @table @var
                   1077: @item return
                   1078: List
                   1079: @item p
                   1080: Number
                   1081: @item f, g, v, w
                   1082: List
                   1083: @end table
                   1084:
                   1085: @itemize @bullet
                   1086: @item
                   1087:    It returns the D-module theoretic 0-th tensor product
                   1088:    of @var{f} and @var{g}.
                   1089: @item
                   1090:   @var{v} is a list of variables.
                   1091:   @var{w} is a list of weights.  The integer @var{w}[i] is
                   1092:   the weight of the variable @var{v}[i].
                   1093: @item
                   1094:    @code{sm1.wTensor0} calls @code{wRestriction0} of @code{ox_sm1},
                   1095:    which requires a generic weight
                   1096:     vector @var{w} to compute the restriction.
                   1097:     If @var{w} is not generic, the computation fails.
                   1098: @item Let F and G be solutions of @var{f} and @var{g} respectively.
                   1099: Intuitively speaking, the 0-th tensor product is a system of
                   1100: differential equations which annihilates the function FG.
                   1101: @item The answer is a submodule of a free module D^r in general even if
                   1102: the inputs @var{f} and @var{g} are left ideals of D.
                   1103: @end itemize
                   1104: */
                   1105:
                   1106: /*&ja
                   1107: @c sort-sm1.wTensor0
                   1108: @node sm1.wTensor0,,, SM1 Functions
                   1109: @subsection @code{sm1.wTensor0}
                   1110: @findex sm1.wTensor0
                   1111: @table @t
                   1112: @item sm1.wTensor0([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})
                   1113: ::   @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
                   1114: $B7W;;$9$k(B.
                   1115: @end table
                   1116:
                   1117: @table @var
                   1118: @item return
                   1119: $B%j%9%H(B
                   1120: @item p
                   1121: $B?t(B
                   1122: @item f, g, v, w
                   1123: $B%j%9%H(B
                   1124: @end table
                   1125:
                   1126: @itemize @bullet
                   1127: @item
                   1128:    @var{f} $B$H(B @var{g} $B$N(B
                   1129:    D-$B2C72$H$7$F$N(B 0 $B<!%F%s%=%k@Q$r7W;;$9$k(B.
                   1130: @item
                   1131:   @var{v} $B$OJQ?t$N%j%9%H$G$"$k(B.
                   1132:   @var{w} $B$O(B weight $B$N%j%9%H$G$"$k(B.
                   1133:   $B@0?t(B @var{w}[i] $B$OJQ?t(B @var{v}[i] $B$N(B weight $B$G$"$k(B.
                   1134: @item
                   1135:    @code{sm1.wTensor0} $B$O(B @code{ox_sm1} $B$N(B @code{wRestriction0}
                   1136:    $B$r$h$s$G$$$k(B.
                   1137:   @code{wRestriction0} $B$O(B, generic $B$J(B weight $B%Y%/%H%k(B @var{w}
                   1138:   $B$r$b$H$K$7$F@)8B$r7W;;$7$F$$$k(B.
                   1139:   Weight $B%Y%/%H%k(B @var{w} $B$,(B generic $B$G$J$$$H7W;;$,%(%i!<$GDd;_$9$k(B.
                   1140: @item F $B$*$h$S(B G $B$r(B @var{f} $B$H(B  @var{g} $B$=$l$>$l$N2r$H$9$k(B.
                   1141: $BD>4QE*$K$$$($P(B, 0 $B<!$N%F%s%=%k@Q$O(B $B4X?t(B FG $B$N$_$?$9HyJ,J}Dx<07O$G$"$k(B.
                   1142: @item $BF~NO(B @var{f}, @var{g} $B$,(B D $B$N:8%$%G%"%k$G$"$C$F$b(B,
                   1143: $B0lHL$K(B, $B=PNO$O<+M32C72(B D^r $B$NItJ,2C72$G$"$k(B.
                   1144: @end itemize
                   1145: */
                   1146: /*&C
                   1147: @example
                   1148: [258]  sm1.wTensor0([[x*dx -1, y*dy -4],[dx+dy,dx-dy^2],[x,y],[1,2]]);
                   1149: [[-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],
                   1150:  [-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],
                   1151:  [y^2*dy^2+(-y^2-8*y)*dy+4*y+20]]
                   1152: @end example
                   1153: */
                   1154:
                   1155:
                   1156:
                   1157: /*&en
                   1158: @c sort-sm1.reduction
                   1159: @node sm1.reduction,,, SM1 Functions
                   1160: @subsection @code{sm1.reduction}
                   1161: @findex sm1.reduction
                   1162: @table @t
                   1163: @item sm1.reduction([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})
                   1164: ::
                   1165: @end table
                   1166:
                   1167: @table @var
                   1168: @item return
                   1169: List
                   1170: @item f
                   1171: Polynomial
                   1172: @item g, v, w
                   1173: List
                   1174: @item p
                   1175: Number  (the process number of ox_sm1)
                   1176: @end table
                   1177:
                   1178: @itemize @bullet
                   1179: @item  It reduces @var{f} by the set of polynomial @var{g}
                   1180: in the homogenized Weyl algebra; it applies the
                   1181: division algorithm to @var{f}. The set of variables is @var{v} and
                   1182: @var{w} is weight vectors to determine the order, which can be ommited.
                   1183: @code{sm1.reduction_noH} is for the Weyl algebra.
                   1184: @item The return value is of the form
                   1185: [r,c0,[c1,...,cm],[g1,...gm]] where @var{g}=[g1, ..., gm] and
                   1186: c0 f + c1 g1 + ... + cm gm = r.
                   1187: r/c0 is the normal form.
                   1188: @item The function reduction reduces reducible terms that appear
                   1189: in lower order terms.
                   1190: @item  The functions
                   1191: sm1.reduction_d(P,F,G) and sm1.reduction_noH_d(P,F,G)
                   1192: are for distributed polynomials.
                   1193: @end itemize
                   1194: */
                   1195: /*&ja
                   1196: @node sm1.reduction,,, SM1 Functions
                   1197: @subsection @code{sm1.reduction}
                   1198: @findex sm1.reduction
                   1199: @table @t
                   1200: @item sm1.reduction([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})
                   1201: ::
                   1202: @end table
                   1203:
                   1204: @table @var
                   1205: @item return
                   1206: $B%j%9%H(B
                   1207: @item f
                   1208: $BB?9`<0(B
                   1209: @item g, v, w
                   1210: $B%j%9%H(B
                   1211: @item p
                   1212: $B?t(B  (ox_sm1 $B$N%W%m%;%9HV9f(B)
                   1213: @end table
                   1214:
                   1215: @itemize @bullet
                   1216: @item  $B$3$NH!?t$O(B @var{f} $B$r(B homogenized $B%o%$%kBe?t$K$*$$$F(B,
                   1217: $BB?9`<0=89g(B @var{g} $B$G4JC12=(B (reduce) $B$9$k(B; $B$D$^$j(B,
                   1218: $B$3$NH!?t$O(B, @var{f} $B$K3d;;%"%k%4%j%:%`$rE,MQ$9$k(B.
                   1219: $BJQ?t=89g$O(B @var{v} $B$G;XDj$9$k(B.
                   1220: @var{w} $B$O=g=x$r;XDj$9$k$?$a$N(B $B%&%(%$%H%Y%/%H%k$G$"$j(B,
                   1221: $B>JN,$7$F$b$h$$(B.
                   1222: @code{sm1.reduction_noH} $B$O(B, Weyl algebra $BMQ(B.
                   1223: @item $BLa$jCM$O<!$N7A$r$7$F$$$k(B:
                   1224: [r,c0,[c1,...,cm],g] $B$3$3$G(B @var{g}=[g1, ..., gm] $B$G$"$j(B,
                   1225: c0 f + c1 g1 + ... + cm gm = r
                   1226: $B$,$J$j$?$D(B.
                   1227: r/c0 $B$,(B normal form $B$G$"$k(B.
                   1228: @item $B$3$NH!?t$O(B, $BDc<!9`$K$"$i$o$l$k(B reducible $B$J9`$b4JC12=$9$k(B.
                   1229: @item  $BH!?t(B
                   1230: sm1.reduction_d(P,F,G) $B$*$h$S(B sm1.reduction_noH_d(P,F,G)
                   1231: $B$O(B, $BJ,;6B?9`<0MQ$G$"$k(B.
                   1232: @end itemize
                   1233: */
                   1234: /*&C
                   1235: @example
                   1236: [259] sm1.reduction([x^2+y^2-4,[y^4-4*y^2+1,x+y^3-4*y],[x,y]]);
                   1237: [x^2+y^2-4,1,[0,0],[y^4-4*y^2+1,x+y^3-4*y]]
                   1238: [260] sm1.reduction([x^2+y^2-4,[y^4-4*y^2+1,x+y^3-4*y],[x,y],[[x,1]]]);
                   1239: [0,1,[-y^2+4,-x+y^3-4*y],[y^4-4*y^2+1,x+y^3-4*y]]
                   1240: @end example
                   1241: */
                   1242: /*&en
                   1243: @table @t
                   1244: @item Reference
                   1245:     @code{sm1.start}, @code{d_true_nf}
                   1246: @end table
                   1247: */
                   1248: /*&ja
                   1249: @table @t
                   1250: @item $B;2>H(B
                   1251:     @code{sm1.start}, @code{d_true_nf}
                   1252: @end table
                   1253: */
                   1254:
                   1255:
                   1256: /*&en
                   1257: @node sm1.xml_tree_to_prefix_string,,, SM1 Functions
                   1258: @subsection @code{sm1.xml_tree_to_prefix_string}
                   1259: @findex sm1.xml_tree_to_prefix_string
                   1260: @table @t
                   1261: @item sm1.xml_tree_to_prefix_string(@var{s}|proc=@var{p})
                   1262: :: Translate OpenMath Tree Expression @var{s} in XML to a prefix notation.
                   1263: @end table
                   1264:
                   1265: @table @var
                   1266: @item return
                   1267: String
                   1268: @item p
                   1269: Number
                   1270: @item s
                   1271: String
                   1272: @end table
                   1273:
                   1274: @itemize @bullet
                   1275: @item  It translate OpenMath Tree Expression @var{s} in XML to a prefix notation.
                   1276: @item This function should be moved to om_* in a future.
                   1277: @item @code{om_xml_to_cmo(OpenMath Tree Expression)} returns CMO_TREE.
                   1278: asir has not yet understood this CMO.
                   1279: @item @code{java} execution environment is required.
                   1280: (For example, @code{/usr/local/jdk1.1.8/bin} should be in the
                   1281: command search path.)
                   1282: @end itemize
                   1283: */
                   1284: /*&ja
                   1285: @node sm1.xml_tree_to_prefix_string,,, SM1 Functions
                   1286: @subsection @code{sm1.xml_tree_to_prefix_string}
                   1287: @findex sm1.xml_tree_to_prefix_string
                   1288: @table @t
                   1289: @item sm1.xml_tree_to_prefix_string(@var{s}|proc=@var{p})
                   1290: :: XML $B$G=q$+$l$?(B OpenMath $B$NLZI=8=(B @var{s} $B$rA0CV5-K!$K$J$*$9(B.
                   1291: @end table
                   1292:
                   1293: @table @var
                   1294: @item return
                   1295: String
                   1296: @item p
                   1297: Number
                   1298: @item s
                   1299: String
                   1300: @end table
                   1301:
                   1302: @itemize @bullet
                   1303: @item XML $B$G=q$+$l$?(B OpenMath $B$NLZI=8=(B @var{s} $B$rA0CV5-K!$K$J$*$9(B.
                   1304: @item $B$3$NH!?t$O(B om_* $B$K>-Mh0\$9$Y$-$G$"$k(B.
                   1305: @item @code{om_xml_to_cmo(OpenMath Tree Expression)} $B$O(B CMO_TREE
                   1306: $B$rLa$9(B. @code{asir} $B$O$3$N(B CMO $B$r$^$@%5%]!<%H$7$F$$$J$$(B.
                   1307: @item @code{java} $B$N<B9T4D6-$,I,MW(B.
                   1308: ($B$?$H$($P(B, /usr/local/jdk1.1.8/bin $B$r%3%^%s%I%5!<%A%Q%9$KF~$l$k$J$I(B.)
                   1309: @end itemize
                   1310: */
                   1311: /*&C
                   1312: @example
                   1313: [263] load("om");
                   1314: 1
                   1315: [270] F=om_xml(x^4-1);
                   1316: control: wait OX
                   1317: Trying to connect to the server... Done.
                   1318: <OMOBJ><OMA><OMS name="plus" cd="basic"/><OMA>
                   1319: <OMS name="times" cd="basic"/><OMA>
                   1320: <OMS name="power" cd="basic"/><OMV name="x"/><OMI>4</OMI></OMA>
                   1321: <OMI>1</OMI></OMA><OMA><OMS name="times" cd="basic"/><OMA>
                   1322: <OMS name="power" cd="basic"/><OMV name="x"/><OMI>0</OMI></OMA>
                   1323: <OMI>-1</OMI></OMA></OMA></OMOBJ>
                   1324: [271] sm1.xml_tree_to_prefix_string(F);
                   1325: basic_plus(basic_times(basic_power(x,4),1),basic_times(basic_power(x,0),-1))
                   1326: @end example
                   1327: */
                   1328: /*&en
                   1329: @table @t
                   1330: @item Reference
                   1331:     @code{om_*}, @code{OpenXM/src/OpenMath}, @code{eval_str}
                   1332: @end table
                   1333: */
                   1334: /*&ja
                   1335: @table @t
                   1336: @item $B;2>H(B
                   1337:     @code{om_*}, @code{OpenXM/src/OpenMath},  @code{eval_str}
                   1338: @end table
                   1339: */
                   1340:
                   1341:
                   1342:
                   1343:
                   1344: /*&en
                   1345: @c sort-sm1.syz
                   1346: @node sm1.syz,,, SM1 Functions
                   1347: @subsection @code{sm1.syz}
                   1348: @findex sm1.syz
                   1349: @findex sm1.syz_d
                   1350: @table @t
                   1351: @item sm1.syz([@var{f},@var{v},@var{w}]|proc=@var{p})
                   1352: ::  computes the syzygy of @var{f} in the ring of differential
                   1353: operators with the variable @var{v}.
                   1354: @end table
                   1355:
                   1356: @table @var
                   1357: @item return
                   1358: List
                   1359: @item p
                   1360: Number
                   1361: @item f, v, w
                   1362: List
                   1363: @end table
                   1364:
                   1365: @itemize @bullet
                   1366: @item
                   1367: The return values is of the form
                   1368: [@var{s},[@var{g}, @var{m}, @var{t}]].
                   1369: Here @var{s} is the syzygy of @var{f} in the ring of differential
                   1370: operators with the variable @var{v}.
                   1371: @var{g} is a Groebner basis of @var{f} with the weight vector @var{w},
                   1372: and @var{m} is a matrix that translates the input matrix @var{f} to the Gr\"obner
                   1373: basis @var{g}.
                   1374: @var{t} is the syzygy of the Gr\"obner basis @var{g}.
                   1375: In summary, @var{g} = @var{m} @var{f} and
                   1376: @var{s} @var{f} = 0 hold as matrices.
                   1377: @item
                   1378:    The weight vectors are given by @var{w}, which can be omitted.
                   1379:     If @var{w} is not given,
                   1380:     the graded reverse lexicographic order will be used to compute Grobner basis.
                   1381: @item
                   1382:    When a non-term order is given, the Grobner basis is computed in
                   1383:    the homogenized Weyl algebra  (See Section 1.2 of the book of SST).
                   1384:    The homogenization variable h is automatically added.
                   1385: @end itemize
                   1386: */
                   1387: /*&ja
                   1388: @c sort-sm1.syz
                   1389: @node sm1.syz,,, SM1 Functions
                   1390: @subsection @code{sm1.syz}
                   1391: @findex sm1.syz
                   1392: @findex sm1.syz_d
                   1393: @table @t
                   1394: @item sm1.syz([@var{f},@var{v},@var{w}]|proc=@var{p})
                   1395: ::  @var{v} $B>e$NHyJ,:nMQAG4D$K$*$$$F(B @var{f} $B$N(B syzygy $B$r7W;;$9$k(B.
                   1396: @end table
                   1397:
                   1398: @table @var
                   1399: @item return
                   1400: $B%j%9%H(B
                   1401: @item p
                   1402: $B?t(B
                   1403: @item f, v, w
                   1404: $B%j%9%H(B
                   1405: @end table
                   1406:
                   1407: @itemize @bullet
                   1408: @item
                   1409: $BLa$jCM$O<!$N7A$r$7$F$$$k(B:
                   1410: [@var{s},[@var{g}, @var{m}, @var{t}]].
                   1411: $B$3$3$G(B @var{s} $B$O(B @var{f} $B$N(B @var{v} $B$rJQ?t$H$9$kHyJ,:nMQAG4D$K$*$1$k(B
                   1412: syzygy $B$G$"$k(B.
                   1413: @var{g} $B$O(B @var{f} $B$N(B weight vector @var{w} $B$K4X$9$k%0%l%V%J4pDl$G$"$k(B.
                   1414: @var{m} $B$OF~NO9TNs(B @var{f} $B$r%0%l%V%J4pDl(B
                   1415: @var{g} $B$XJQ49$9$k9TNs$G$"$k(B.
                   1416: @var{t} $B$O%0%l%V%J4pDl(B @var{g} $B$N(B syzygy $B$G$"$k(B.
                   1417: $B$^$H$a$k$H(B, $B<!$NEy<0$,$J$j$?$D(B:
                   1418: @var{g} = @var{m} @var{f} ,
                   1419: @var{s} @var{f} = 0.
                   1420: @item
                   1421:    Weight $B%Y%/%H%k(B @var{w} $B$O>JN,$7$F$h$$(B.
                   1422:    $B>JN,$7$?>l9g(B, graded reverse lexicographic order $B$r$D$+$C$F(B
                   1423:    $B%V%l%V%J4pDl$r7W;;$9$k(B.
                   1424: @item
                   1425:    Term order $B$G$J$$=g=x$,M?$($i$l$?>l9g$O(B, $BF1<!2=%o%$%kBe?t$G%0%l%V%J4pDl$,7W;;$5$l$k(B (SST $B$NK\$N(B Section 1.2 $B$r8+$h(B).
                   1426: $BF1<!2=JQ?t(B @code{h} $B$,7k2L$K2C$o$k(B.
                   1427: @end itemize
                   1428: */
                   1429: /*&C
                   1430: @example
                   1431: [293] sm1.syz([[x*dx+y*dy-1,x*y*dx*dy-2],[x,y]]);
                   1432: [[[y*x*dy*dx-2,-x*dx-y*dy+1]],    generators of the syzygy
                   1433:  [[[x*dx+y*dy-1],[y^2*dy^2+2]],   grobner basis
                   1434:   [[1,0],[y*dy,-1]],              transformation matrix
                   1435:  [[y*x*dy*dx-2,-x*dx-y*dy+1]]]]
                   1436: @end example
                   1437: */
                   1438: /*&C
                   1439: @example
                   1440: [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]]]);
                   1441: [[[y*x*dy*dx-1,-x^2*dx^2-x*dx-y^2*dy^2-y*dy+4]], generators of the syzygy
                   1442:  [[[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
                   1443:   [h^4*x*dx+y^3*dy^3+3*h^2*y^2*dy^2-3*h^4*y*dy]],
                   1444:  [[1,0],[0,1],[y*dy,-x*dx]],     transformation matrix
                   1445:  [[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]]]]
                   1446: @end example
                   1447: */
                   1448:
                   1449:
                   1450:
                   1451: /*&en
                   1452: @node sm1.mul,,, SM1 Functions
                   1453: @subsection @code{sm1.mul}
                   1454: @findex sm1.mul
                   1455: @table @t
                   1456: @item sm1.mul(@var{f},@var{g},@var{v}|proc=@var{p})
                   1457: ::  ask the sm1 server to multiply @var{f} and @var{g} in the ring of differential operators over @var{v}.
                   1458: @end table
                   1459:
                   1460: @table @var
                   1461: @item return
                   1462: Polynomial or List
                   1463: @item p
                   1464: Number
                   1465: @item f, g
                   1466: Polynomial or List
                   1467: @item v
                   1468: List
                   1469: @end table
                   1470:
                   1471: @itemize @bullet
                   1472: @item Ask the sm1 server to multiply @var{f} and @var{g} in the ring of differential operators over @var{v}.
                   1473: @item @code{sm1.mul_h} is for homogenized Weyl algebra.
                   1474: @item BUG: @code{sm1.mul(p0*dp0,1,[p0])} returns
                   1475: @code{dp0*p0+1}.
                   1476: A variable order such that d-variables come after non-d-variables
                   1477: is necessary for the correct computation.
                   1478: @end itemize
                   1479: */
                   1480:
                   1481: /*&ja
                   1482: @node sm1.mul,,, SM1 Functions
                   1483: @subsection @code{sm1.mul}
                   1484: @findex sm1.mul
                   1485: @table @t
                   1486: @item sm1.mul(@var{f},@var{g},@var{v}|proc=@var{p})
                   1487: ::  sm1$B%5!<%P(B $B$K(B @var{f} $B$+$1$k(B @var{g} $B$r(B @var{v}
                   1488: $B>e$NHyJ,:nMQAG4D$G$d$C$F$/$l$k$h$&$KMj$`(B.
                   1489: @end table
                   1490:
                   1491: @table @var
                   1492: @item return
                   1493: $BB?9`<0$^$?$O%j%9%H(B
                   1494: @item p
                   1495: $B?t(B
                   1496: @item f, g
                   1497: $BB?9`<0$^$?$O%j%9%H(B
                   1498: @item v
                   1499: $B%j%9%H(B
                   1500: @end table
                   1501:
                   1502: @itemize @bullet
                   1503: @item   sm1$B%5!<%P(B $B$K(B @var{f} $B$+$1$k(B @var{g} $B$r(B @var{v}
                   1504: $B>e$NHyJ,:nMQAG4D$G$d$C$F$/$l$k$h$&$KMj$`(B.
                   1505: @item @code{sm1.mul_h} $B$O(B homogenized Weyl $BBe?tMQ(B.
                   1506: @item BUG: @code{sm1.mul(p0*dp0,1,[p0])} $B$O(B
                   1507: @code{dp0*p0+1} $B$rLa$9(B.
                   1508: d$BJQ?t$,8e$m$K$/$k$h$&$JJQ?t=g=x$,$O$$$C$F$$$J$$$H(B, $B$3$N4X?t$O@5$7$$Ez$($rLa$5$J$$(B.
                   1509: @end itemize
                   1510: */
                   1511:
                   1512: /*&C
                   1513:
                   1514: @example
                   1515: [277] sm1.mul(dx,x,[x]);
                   1516: x*dx+1
                   1517: [278] sm1.mul([x,y],[1,2],[x,y]);
                   1518: x+2*y
                   1519: [279] sm1.mul([[1,2],[3,4]],[[x,y],[1,2]],[x,y]);
                   1520: [[x+2,y+4],[3*x+4,3*y+8]]
                   1521: @end example
                   1522:
                   1523: */
                   1524:
                   1525:
                   1526:
                   1527:
                   1528: /*&en
                   1529: @node sm1.distraction,,, SM1 Functions
                   1530: @subsection @code{sm1.distraction}
                   1531: @findex sm1.distraction
                   1532: @table @t
                   1533: @item sm1.distraction([@var{f},@var{v},@var{x},@var{d},@var{s}]|proc=@var{p})
                   1534: ::  ask the @code{sm1} server to compute the distraction of @var{f}.
                   1535: @end table
                   1536:
                   1537: @table @var
                   1538: @item return
                   1539: List
                   1540: @item p
                   1541: Number
                   1542: @item f
                   1543: Polynomial
                   1544: @item v,x,d,s
                   1545: List
                   1546: @end table
                   1547:
                   1548: @itemize @bullet
                   1549: @item  It asks the @code{sm1} server of the descriptor number @var{p}
                   1550: to compute the distraction of  @var{f} in the ring of differential
                   1551: operators with variables @var{v}.
                   1552: @item @var{x} is a list of x-variables and @var{d} is that of d-variables
                   1553: to be distracted. @var{s} is a list of variables to express the distracted @var{f}.
                   1554: @item Distraction is roughly speaking to replace x*dx by a single variable x.
                   1555: See Saito, Sturmfels, Takayama : Grobner Deformations of Hypergeometric Differential Equations at page 68 for details.
                   1556: @end itemize
                   1557: */
                   1558:
                   1559: /*&ja
                   1560: @node sm1.distraction,,, SM1 Functions
                   1561:
                   1562: @subsection @code{sm1.distraction}
                   1563: @findex sm1.distraction
                   1564: @table @t
                   1565: @item sm1.distraction([@var{f},@var{v},@var{x},@var{d},@var{s}]|proc=@var{p})
                   1566: ::  @code{sm1} $B$K(B @var{f} $B$N(B distraction $B$r7W;;$7$F$b$i$&(B.
                   1567: @end table
                   1568:
                   1569: @table @var
                   1570: @item return
                   1571: $B%j%9%H(B
                   1572: @item p
                   1573: $B?t(B
                   1574: @item f
                   1575: $BB?9`<0(B
                   1576: @item v,x,d,s
                   1577: $B%j%9%H(B
                   1578: @end table
                   1579:
                   1580: @itemize @bullet
                   1581: @item  $B<1JL;R(B @var{p}  $B$N(B @code{sm1}  $B%5!<%P$K(B,
                   1582: @var{f} $B$N(B distraction $B$r(B @var{v} $B>e$NHyJ,:nMQAG4D$G7W;;$7$F$b$i$&(B.
                   1583: @item @var{x} , @var{d} $B$O(B, $B$=$l$>$l(B, distract $B$9$Y$-(B x $BJQ?t(B, d $BJQ?t$N(B
                   1584: $B%j%9%H(B.  Distraction $B$7$?$i(B, @var{s} $B$rJQ?t$H$7$F7k2L$rI=$9(B.
                   1585: @item Distraction $B$H$$$&$N$O(B x*dx $B$r(B x $B$GCV$-49$($k$3$H$G$"$k(B.
                   1586: $B>\$7$/$O(B Saito, Sturmfels, Takayama : Grobner Deformations of Hypergeometric Differential Equations $B$N(B page 68 $B$r8+$h(B.
                   1587: @end itemize
                   1588: */
                   1589:
                   1590: /*&C
                   1591:
                   1592: @example
                   1593: [280] sm1.distraction([x*dx,[x],[x],[dx],[x]]);
                   1594: x
                   1595: [281] sm1.distraction([dx^2,[x],[x],[dx],[x]]);
                   1596: x^2-x
                   1597: [282] sm1.distraction([x^2,[x],[x],[dx],[x]]);
                   1598: x^2+3*x+2
                   1599: [283] fctr(@@);
                   1600: [[1,1],[x+1,1],[x+2,1]]
                   1601: [284] sm1.distraction([x*dx*y+x^2*dx^2*dy,[x,y],[x],[dx],[x]]);
                   1602: (x^2-x)*dy+x*y
                   1603: @end example
                   1604: */
                   1605:
                   1606: /*&en
                   1607: @table @t
                   1608: @item Reference
                   1609:     @code{distraction2(sm1)},
                   1610: @end table
                   1611: */
                   1612:
                   1613: /*&ja
                   1614: @table @t
                   1615: @item $B;2>H(B
                   1616:     @code{distraction2(sm1)},
                   1617: @end table
                   1618: */
                   1619:
                   1620:
                   1621:
                   1622: /*&en
                   1623: @node sm1.gkz,,, SM1 Functions
                   1624: @subsection @code{sm1.gkz}
                   1625: @findex sm1.gkz
                   1626: @table @t
                   1627: @item sm1.gkz([@var{A},@var{B}]|proc=@var{p})
                   1628: ::  Returns the GKZ system (A-hypergeometric system) associated to the matrix
                   1629: @var{A} with the parameter vector @var{B}.
                   1630: @end table
                   1631:
                   1632: @table @var
                   1633: @item return
                   1634: List
                   1635: @item p
                   1636: Number
                   1637: @item A, B
                   1638: List
                   1639: @end table
                   1640:
                   1641: @itemize @bullet
                   1642: @item Returns the GKZ hypergeometric system
                   1643: (A-hypergeometric system) associated to the matrix
                   1644: @end itemize
                   1645: */
                   1646:
                   1647: /*&ja
                   1648: @node sm1.gkz,,, SM1 Functions
                   1649: @subsection @code{sm1.gkz}
                   1650: @findex sm1.gkz
                   1651: @table @t
                   1652: @item sm1.gkz([@var{A},@var{B}]|proc=@var{p})
                   1653: ::  $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.
                   1654: @end table
                   1655:
                   1656: @table @var
                   1657: @item return
                   1658: $B%j%9%H(B
                   1659: @item p
                   1660: $B?t(B
                   1661: @item A, B
                   1662: $B%j%9%H(B
                   1663: @end table
                   1664:
                   1665: @itemize @bullet
                   1666: @item  $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.
                   1667: @end itemize
                   1668: */
                   1669:
                   1670: /*&C
                   1671:
                   1672: @example
                   1673:
                   1674: [280] sm1.gkz([  [[1,1,1,1],[0,1,3,4]],  [0,2] ]);
                   1675: [[x4*dx4+x3*dx3+x2*dx2+x1*dx1,4*x4*dx4+3*x3*dx3+x2*dx2-2,
                   1676:  -dx1*dx4+dx2*dx3,-dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],
                   1677:  [x1,x2,x3,x4]]
                   1678:
                   1679: @end example
                   1680:
                   1681: */
                   1682:
1.2       takayama 1683: /*&en
                   1684: @node sm1.mgkz,,, SM1 Functions
                   1685: @subsection @code{sm1.mgkz}
                   1686: @findex sm1.mgkz
                   1687: @table @t
                   1688: @item sm1.mgkz([@var{A},@var{W},@var{B}]|proc=@var{p})
                   1689: ::  Returns the modified GKZ system (A-hypergeometric system) associated to the matrix
                   1690: @var{A} and the weight @var{w} with the parameter vector @var{B}.
                   1691: @end table
                   1692:
                   1693: @table @var
                   1694: @item return
                   1695: List
                   1696: @item p
                   1697: Number
                   1698: @item A, W, B
                   1699: List
                   1700: @end table
                   1701:
                   1702: @itemize @bullet
                   1703: @item Returns the modified GKZ hypergeometric system
                   1704: (A-hypergeometric system) associated to the matrix
                   1705: @item http://arxiv.org/abs/0707.0043
                   1706: @end itemize
                   1707: */
                   1708:
                   1709: /*&ja
                   1710: @node sm1.mgkz,,, SM1 Functions
                   1711: @subsection @code{sm1.mgkz}
                   1712: @findex sm1.mgkz
                   1713: @table @t
                   1714: @item sm1.mgkz([@var{A},@var{W},@var{B}]|proc=@var{p})
                   1715: ::  $B9TNs(B @var{A}, weight @var{W} $B$H%Q%i%a!<%?(B @var{B} $B$KIU?o$7$?(B modified GKZ $B7O(B (A-hypergeometric system) $B$r$b$I$9(B.
                   1716: @end table
                   1717:
                   1718: @table @var
                   1719: @item return
                   1720: $B%j%9%H(B
                   1721: @item p
                   1722: $B?t(B
                   1723: @item A, W, B
                   1724: $B%j%9%H(B
                   1725: @end table
                   1726:
                   1727: @itemize @bullet
                   1728: @item  $B9TNs(B @var{A}, weight vector @var{W} $B$H%Q%i%a!<%?(B @var{B} $B$KIU?o$7$?(B modified GKZ $B7O(B (A-hypergeometric system) $B$r$b$I$9(B.
                   1729: @item http://arxiv.org/abs/0707.0043
                   1730: @end itemize
                   1731: */
                   1732:
                   1733: /*&C
                   1734:
                   1735: @example
                   1736:
                   1737: [280] sm1.mgkz([ [[1,2,3]], [1,2,1], [a/2]]);
                   1738: [[6*x3*dx3+4*x2*dx2+2*x1*dx1-a,-x4*dx4+x3*dx3+2*x2*dx2+x1*dx1,
                   1739:   -dx2+dx1^2,-x4^2*dx3+dx1*dx2],[x1,x2,x3,x4]]
                   1740:
                   1741: Modified A-hypergeometric system for
                   1742: A=(1,2,3), w=(1,2,1), beta=(a/2).
                   1743: @end example
                   1744:
                   1745: */
                   1746:
1.1       takayama 1747:
                   1748:
                   1749:
                   1750: /*&en
                   1751: @node sm1.appell1,,, SM1 Functions
                   1752: @subsection @code{sm1.appell1}
                   1753: @findex sm1.appell1
                   1754: @table @t
                   1755: @item sm1.appell1(@var{a}|proc=@var{p})
                   1756: ::  Returns the Appell hypergeometric system F_1 or F_D.
                   1757: @end table
                   1758:
                   1759: @table @var
                   1760: @item return
                   1761: List
                   1762: @item p
                   1763: Number
                   1764: @item a
                   1765: List
                   1766: @end table
                   1767:
                   1768: @itemize @bullet
                   1769: @item Returns the hypergeometric system for the Lauricella function
                   1770: F_D(a,b1,b2,...,bn,c;x1,...,xn)
                   1771: where @var{a} =(a,c,b1,...,bn).
                   1772: When n=2, the Lauricella function is called the Appell function F_1.
                   1773: The parameters a, c, b1, ..., bn may be rational numbers.
                   1774: @item It does not call sm1 function appell1. As a concequence,
                   1775: when parameters are rational or symbolic, this function also works
                   1776: as well as integral parameters.
                   1777: @end itemize
                   1778: */
                   1779:
                   1780: /*&ja
                   1781: @node sm1.appell1,,, SM1 Functions
                   1782: @subsection @code{sm1.appell1}
                   1783: @findex sm1.appell1
                   1784: @table @t
                   1785: @item sm1.appell1(@var{a}|proc=@var{p})
                   1786: :: F_1 $B$^$?$O(B F_D $B$KBP1~$9$kJ}Dx<07O$rLa$9(B.
                   1787: @end table
                   1788:
                   1789: @table @var
                   1790: @item return
                   1791: $B%j%9%H(B
                   1792: @item p
                   1793: $B?t(B
                   1794: @item a
                   1795: $B%j%9%H(B
                   1796: @end table
                   1797:
                   1798: @itemize @bullet
                   1799: @item Appell $B$N4X?t(B F_1 $B$*$h$S(B $B$=$N(B n $BJQ?t2=$G$"$k(B Lauricella $B$N4X?t(B
                   1800: F_D(a,b1,b2,...,bn,c;x1,...,xn)
                   1801: $B$N$_$?$9HyJ,J}Dx<07O$rLa$9(B. $B$3$3$G(B,
                   1802: @var{a} =(a,c,b1,...,bn).
                   1803: $B%Q%i%a!<%?$OM-M}?t$G$b$h$$(B.
                   1804: @item sm1 $B$N4X?t(B appell1 $B$r$h$V$o$1$G$J$$$N$G(B, $B%Q%i%a!<%?$,M-M}?t$dJ8;z<0$N>l9g$b(B
                   1805: $B@5$7$/F0$/(B.
                   1806: @end itemize
                   1807: */
                   1808:
                   1809: /*&C
                   1810:
                   1811: @example
                   1812:
                   1813: [281] sm1.appell1([1,2,3,4]);
                   1814: [[((-x1+1)*x2*dx1-3*x2)*dx2+(-x1^2+x1)*dx1^2+(-5*x1+2)*dx1-3,
                   1815:   (-x2^2+x2)*dx2^2+((-x1*x2+x1)*dx1-6*x2+2)*dx2-4*x1*dx1-4,
                   1816:   ((-x2+x1)*dx1+3)*dx2-4*dx1],       equations
                   1817:  [x1,x2]]                            the list of variables
                   1818:
                   1819: [282] sm1.gb(@@);
                   1820: [[((-x2+x1)*dx1+3)*dx2-4*dx1,((-x1+1)*x2*dx1-3*x2)*dx2+(-x1^2+x1)*dx1^2
                   1821:   +(-5*x1+2)*dx1-3,(-x2^2+x2)*dx2^2+((-x2^2+x1)*dx1-3*x2+2)*dx2
                   1822:   +(-4*x2-4*x1)*dx1-4,
                   1823:   (x2^3+(-x1-1)*x2^2+x1*x2)*dx2^2+((-x1*x2+x1^2)*dx1+6*x2^2
                   1824:  +(-3*x1-2)*x2+2*x1)*dx2-4*x1^2*dx1+4*x2-4*x1],
                   1825:  [x1*dx1*dx2,-x1^2*dx1^2,-x2^2*dx1*dx2,-x1*x2^2*dx2^2]]
                   1826:
                   1827: [283] sm1.rank(sm1.appell1([1/2,3,5,-1/3]));
                   1828: 3
                   1829:
                   1830: [285] Mu=2$ Beta = 1/3$
                   1831: [287] sm1.rank(sm1.appell1([Mu+Beta,Mu+1,Beta,Beta,Beta]));
                   1832: 4
                   1833:
                   1834:
                   1835: @end example
                   1836:
                   1837: */
                   1838:
                   1839: /*&en
                   1840: @node sm1.appell4,,, SM1 Functions
                   1841: @subsection @code{sm1.appell4}
                   1842: @findex sm1.appell4
                   1843: @table @t
                   1844: @item sm1.appell4(@var{a}|proc=@var{p})
                   1845: ::  Returns the Appell hypergeometric system F_4 or F_C.
                   1846: @end table
                   1847:
                   1848: @table @var
                   1849: @item return
                   1850: List
                   1851: @item p
                   1852: Number
                   1853: @item a
                   1854: List
                   1855: @end table
                   1856:
                   1857: @itemize @bullet
                   1858: @item Returns the hypergeometric system for the Lauricella function
                   1859: F_4(a,b,c1,c2,...,cn;x1,...,xn)
                   1860: where @var{a} =(a,b,c1,...,cn).
                   1861: When n=2, the Lauricella function is called the Appell function F_4.
                   1862: The parameters a, b, c1, ..., cn may be rational numbers.
                   1863: @item @item It does not call sm1 function appell4. As a concequence,
                   1864: when parameters are rational or symbolic, this function also works
                   1865: as well as integral parameters.
                   1866: @end itemize
                   1867: */
                   1868:
                   1869: /*&ja
                   1870: @node sm1.appell4,,, SM1 Functions
                   1871: @subsection @code{sm1.appell4}
                   1872: @findex sm1.appell4
                   1873: @table @t
                   1874: @item sm1.appell4(@var{a}|proc=@var{p})
                   1875: :: F_4 $B$^$?$O(B F_C $B$KBP1~$9$kJ}Dx<07O$rLa$9(B.
                   1876: @end table
                   1877:
                   1878: @table @var
                   1879: @item return
                   1880: $B%j%9%H(B
                   1881: @item p
                   1882: $B?t(B
                   1883: @item a
                   1884: $B%j%9%H(B
                   1885: @end table
                   1886:
                   1887: @itemize @bullet
                   1888: @item Appell $B$N4X?t(B F_4 $B$*$h$S(B $B$=$N(B n $BJQ?t2=$G$"$k(B Lauricella $B$N4X?t(B
                   1889: F_C(a,b,c1,c2,...,cn;x1,...,xn)
                   1890: $B$N$_$?$9HyJ,J}Dx<07O$rLa$9(B. $B$3$3$G(B,
                   1891: @var{a} =(a,b,c1,...,cn).
                   1892: $B%Q%i%a!<%?$OM-M}?t$G$b$h$$(B.
                   1893: @item sm1 $B$N4X?t(B appell1 $B$r$h$V$o$1$G$J$$$N$G(B, $B%Q%i%a!<%?$,M-M}?t$dJ8;z<0$N>l9g$b(B
                   1894: $B@5$7$/F0$/(B.
                   1895: @end itemize
                   1896: */
                   1897:
                   1898: /*&C
                   1899:
                   1900: @example
                   1901:
                   1902: [281] sm1.appell4([1,2,3,4]);
                   1903:   [[-x2^2*dx2^2+(-2*x1*x2*dx1-4*x2)*dx2+(-x1^2+x1)*dx1^2+(-4*x1+3)*dx1-2,
                   1904:   (-x2^2+x2)*dx2^2+(-2*x1*x2*dx1-4*x2+4)*dx2-x1^2*dx1^2-4*x1*dx1-2],
                   1905:                                                               equations
                   1906:     [x1,x2]]                                      the list of variables
                   1907:
                   1908: [282] sm1.rank(@@);
                   1909: 4
                   1910:
                   1911: @end example
                   1912:
                   1913: */
                   1914:
                   1915:
                   1916:
                   1917:
                   1918: /*&en
                   1919: @node sm1.rank,,, SM1 Functions
                   1920: @subsection @code{sm1.rank}
                   1921: @findex sm1.rank
                   1922: @table @t
                   1923: @item sm1.rank(@var{a}|proc=@var{p})
                   1924: ::  Returns the holonomic rank of the system of differential equations @var{a}.
                   1925: @end table
                   1926:
                   1927: @table @var
                   1928: @item return
                   1929: Number
                   1930: @item p
                   1931: Number
                   1932: @item a
                   1933: List
                   1934: @end table
                   1935:
                   1936: @itemize @bullet
                   1937: @item It evaluates the dimension of the space of holomorphic solutions
                   1938: at a generic point of the system of differential equations @var{a}.
                   1939: The dimension is called the holonomic rank.
                   1940: @item @var{a} is a list consisting of a list of differential equations and
                   1941: a list of variables.
                   1942: @item @code{sm1.rrank} returns the holonomic rank when @var{a} is regular
                   1943: holonomic. It is generally faster than @code{sm1.rank}.
                   1944: @end itemize
                   1945: */
                   1946:
                   1947: /*&ja
                   1948: @node sm1.rank,,, SM1 Functions
                   1949: @subsection @code{sm1.rank}
                   1950: @findex sm1.rank
                   1951: @table @t
                   1952: @item sm1.rank(@var{a}|proc=@var{p})
                   1953: ::  $BHyJ,J}Dx<07O(B @var{a} $B$N(B holonomic rank $B$rLa$9(B.
                   1954: @end table
                   1955:
                   1956: @table @var
                   1957: @item return
                   1958: $B?t(B
                   1959: @item p
                   1960: $B?t(B
                   1961: @item a
                   1962: $B%j%9%H(B
                   1963: @end table
                   1964:
                   1965: @itemize @bullet
                   1966: @item $BHyJ,J}Dx<07O(B @var{a} $B$N(B, generic point $B$G$N@5B'2r$N<!85$r(B
                   1967: $BLa$9(B. $B$3$N<!85$r(B, holonomic rank $B$H8F$V(B.
                   1968: @item @var{a} $B$OHyJ,:nMQAG$N%j%9%H$HJQ?t$N%j%9%H$h$j$J$k(B.
                   1969: @item  @var{a} $B$,(B regular holonomic $B$N$H$-$O(B @code{sm1.rrank}
                   1970: $B$b(B holonomic rank $B$rLa$9(B.
                   1971: $B$$$C$Q$s$K$3$N4X?t$NJ}$,(B @code{sm1.rank} $B$h$jAa$$(B.
                   1972: @end itemize
                   1973: */
                   1974:
                   1975: /*&C
                   1976:
                   1977: @example
                   1978:
                   1979: [284]  sm1.gkz([  [[1,1,1,1],[0,1,3,4]],  [0,2] ]);
                   1980: [[x4*dx4+x3*dx3+x2*dx2+x1*dx1,4*x4*dx4+3*x3*dx3+x2*dx2-2,
                   1981:   -dx1*dx4+dx2*dx3, -dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],
                   1982:  [x1,x2,x3,x4]]
                   1983: [285] sm1.rrank(@@);
                   1984: 4
                   1985:
                   1986: [286]  sm1.gkz([  [[1,1,1,1],[0,1,3,4]],  [1,2]]);
                   1987: [[x4*dx4+x3*dx3+x2*dx2+x1*dx1-1,4*x4*dx4+3*x3*dx3+x2*dx2-2,
                   1988:  -dx1*dx4+dx2*dx3,-dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],
                   1989:  [x1,x2,x3,x4]]
                   1990: [287] sm1.rrank(@@);
                   1991: 5
                   1992:
                   1993: @end example
                   1994:
                   1995: */
                   1996:
                   1997:
                   1998: /*&en
                   1999: @node sm1.auto_reduce,,, SM1 Functions
                   2000: @subsection @code{sm1.auto_reduce}
                   2001: @findex sm1.auto_reduce
                   2002: @table @t
                   2003: @item sm1.auto_reduce(@var{s}|proc=@var{p})
                   2004: ::  Set the flag "AutoReduce" to @var{s}.
                   2005: @end table
                   2006:
                   2007: @table @var
                   2008: @item return
                   2009: Number
                   2010: @item p
                   2011: Number
                   2012: @item s
                   2013: Number
                   2014: @end table
                   2015:
                   2016: @itemize @bullet
                   2017: @item  If @var{s} is 1, then all Grobner bases to be computed
                   2018: will be the reduced Grobner bases.
                   2019: @item If @var{s} is 0, then Grobner bases are not necessarily the reduced
                   2020: Grobner bases.  This is the default.
                   2021: @end itemize
                   2022: */
                   2023:
                   2024: /*&ja
                   2025: @node sm1.auto_reduce,,, SM1 Functions
                   2026: @subsection @code{sm1.auto_reduce}
                   2027: @findex sm1.auto_reduce
                   2028: @table @t
                   2029: @item sm1.auto_reduce(@var{s}|proc=@var{p})
                   2030: ::  $B%U%i%0(B "AutoReduce" $B$r(B @var{s} $B$K@_Dj(B.
                   2031: @end table
                   2032:
                   2033: @table @var
                   2034: @item $BLa$jCM(B
                   2035: $B?t(B
                   2036: @item p
                   2037: $B?t(B
                   2038: @item s
                   2039: $B?t(B
                   2040: @end table
                   2041:
                   2042: @itemize @bullet
                   2043: @item  @var{s} $B$,(B 1 $B$N$H$-(B, $B0J8e7W;;$5$l$k%0%l%V%J4pDl$O$9$Y$F(B,
                   2044: reduced $B%0%l%V%J4pDl$H$J$k(B.
                   2045: @item  @var{s} $B$,(B 0 $B$N$H$-(B, $B7W;;$5$l$k%0%l%V%J4pDl$O(B
                   2046: reduced $B%0%l%V%J4pDl$H$O$+$.$i$J$$(B. $B$3$A$i$,%G%U%)!<%k%H(B.
                   2047: @end itemize
                   2048: */
                   2049:
                   2050:
                   2051:
                   2052: /*&en
                   2053: @node sm1.slope,,, SM1 Functions
                   2054: @subsection @code{sm1.slope}
                   2055: @findex sm1.slope
                   2056: @table @t
                   2057: @item sm1.slope(@var{ii},@var{v},@var{f_filtration},@var{v_filtration}|proc=@var{p})
                   2058: ::  Returns the slopes of differential equations @var{ii}.
                   2059: @end table
                   2060:
                   2061: @table @var
                   2062: @item return
                   2063: List
                   2064: @item p
                   2065: Number
                   2066: @item ii
                   2067: List  (equations)
                   2068: @item v
                   2069: List  (variables)
                   2070: @item f_filtration
                   2071: List  (weight vector)
                   2072: @item v_filtration
                   2073: List (weight vector)
                   2074: @end table
                   2075:
                   2076: @itemize @bullet
                   2077: @item @code{sm1.slope} returns the (geometric) slopes
                   2078: of the system of differential equations @var{ii}
                   2079: along the hyperplane specified by
                   2080: the V filtration @var{v_filtration}.
                   2081: @item @var{v} is a list of variables.
                   2082: @item The return value is a list of lists.
                   2083: The first entry of each list is the slope and the second entry
                   2084: is the weight vector for which the microcharacteristic variety is
                   2085: not bihomogeneous.
                   2086: @end itemize
                   2087:
                   2088: @noindent
                   2089: Algorithm:
                   2090: see "A.Assi, F.J.Castro-Jimenez and J.M.Granger,
                   2091: How to calculate the slopes of a D-module, Compositio Math, 104, 1-17, 1996"
1.4       takayama 2092: Note that the signs of the slopes s' are negative, but the absolute values -s'
1.1       takayama 2093: of the slopes are returned.
1.4       takayama 2094: In other words, when pF+qV is the gap, -s'=q/p is returned.
                   2095: Note that s=1-1/s' is called the slope in recent literatures. Solutions belongs to O(s).
                   2096: The number s satisfies 1<= s.
                   2097: We have r=s-1=-1/s', and kappa=1/r=-s', which is used 1/Gamma(1+m*r) factor and exp(-tau^kappa)
                   2098: in the Borel and Laplace transformations respectively.
1.1       takayama 2099:
                   2100: */
                   2101:
                   2102: /*&ja
                   2103: @node sm1.slope,,, SM1 Functions
                   2104: @subsection @code{sm1.slope}
                   2105: @findex sm1.slope
                   2106: @table @t
                   2107: @item sm1.slope(@var{ii},@var{v},@var{f_filtration},@var{v_filtration}|proc=@var{p})
                   2108: ::  $BHyJ,J}Dx<07O(B @var{ii} $B$N(B slope $B$rLa$9(B.
                   2109: @end table
                   2110:
                   2111: @table @var
                   2112: @item return
                   2113: $B?t(B
                   2114: @item p
                   2115: $B?t(B
                   2116: @item ii
                   2117: $B%j%9%H(B  ($BJ}Dx<0(B)
                   2118: @item v
                   2119: $B%j%9%H(B ($BJQ?t(B)
                   2120: @item f_filtration
                   2121: $B%j%9%H(B  (weight vector)
                   2122: @item v_filtration
                   2123: $B%j%9%H(B (weight vector)
                   2124: @end table
                   2125:
                   2126: @itemize @bullet
                   2127: @item @code{sm1.slope} $B$O(B
                   2128: $BHyJ,J}Dx<07O(B @var{ii} $B$N(B V filtration  @var{v_filtration}
                   2129: $B$G;XDj$9$kD6J?LL$K1h$C$F$N(B (geomeric) slope $B$r7W;;$9$k(B.
                   2130: @item @var{v} $B$OJQ?t$N%j%9%H(B.
                   2131: @item $BLa$jCM$O(B, $B%j%9%H$r@.J,$H$9$k%j%9%H$G$"$k(B.
                   2132: $B@.J,%j%9%H$NBh(B 1 $BMWAG$,(B slope, $BBh(B 2 $BMWAG$O(B, $B$=$N(B weight vector $B$KBP1~$9$k(B
                   2133: microcharacteristic variety $B$,(B bihomogeneous $B$G$J$$(B.
                   2134: @end itemize
                   2135:
                   2136: @noindent
                   2137: Algorithm:
                   2138: "A.Assi, F.J.Castro-Jimenez and J.M.Granger,
                   2139: How to calculate the slopes of a D-module, Compositio Math, 104, 1-17, 1996"
                   2140: $B$r$_$h(B.
1.4       takayama 2141: Slope s' $B$NK\Mh$NDj5A$G$O(B, $BId9f$,Ii$H$J$k$,(B, $B$3$N%W%m%0%i%`$O(B,
                   2142: Slope $B$N@dBPCM(B -s' $B$rLa$9(B.
                   2143: $B$D$^$j(B pF+qV $B$,(Bmicro$BFC@-B?MMBN$N(Bgap$B$G$"$k$H$-(B, -s'=q/p $B$rLa$9(B.
                   2144: $B:G6a$NJ88%$G$O(B s=1-1/s' $B$r(B slope $B$H8F$s$G$$$k(B. $B2r$O(B O(s) $B$KB0$9$k(B.
                   2145: $B?t(B s $B$O(B 1<= s $B$rK~$9(B.
                   2146: r=s-1=-1/s' $B$*$h$S(B kappa=1/r=-s' $B$G$"$k(B.
                   2147: $B$3$l$i$N?t$O(BBorel and Laplace $BJQ49$K$*$$$F$=$l$>$l(B 1/Gamma(1+m*r) factor,
                   2148: exp(-tau^kappa) $B9`$H$7$F;H$o$l$k(B.
1.1       takayama 2149: */
                   2150:
                   2151: /*&C
                   2152:
                   2153: @example
                   2154:
                   2155: [284] A= sm1.gkz([  [[1,2,3]],  [-3] ]);
                   2156:
                   2157:
                   2158: [285] sm1.slope(A[0],A[1],[0,0,0,1,1,1],[0,0,-1,0,0,1]);
                   2159:
                   2160: [286] A2 = sm1.gkz([ [[1,1,1,0],[2,-3,1,-3]], [1,0]]);
                   2161:      (* This is an interesting example given by Laura Matusevich,
                   2162:         June 9, 2001 *)
                   2163:
                   2164: [287] sm1.slope(A2[0],A2[1],[0,0,0,0,1,1,1,1],[0,0,0,-1,0,0,0,1]);
                   2165:
                   2166:
                   2167: @end example
                   2168:
                   2169: */
                   2170: /*&en
                   2171: @table @t
                   2172: @item Reference
                   2173:     @code{sm.gb}
                   2174: @end table
                   2175: */
                   2176: /*&ja
                   2177: @table @t
                   2178: @item $B;2>H(B
                   2179:     @code{sm.gb}
                   2180: @end table
                   2181: */
                   2182:
                   2183:
                   2184: /*&en
                   2185: @include sm1-auto.en
                   2186: */
                   2187:
                   2188: /*&ja
                   2189: @include sm1-auto.ja
                   2190: */
                   2191:
                   2192:
                   2193: end$
                   2194:

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