[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.4

1.4     ! takayama    1: /*$OpenXM: OpenXM/src/asir-contrib/packages/doc/sm1/sm1.oxw,v 1.3 2010/02/06 00:50:32 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
                    514: @item sm1.gb([@var{f},@var{v},@var{w}]|proc=@var{p},sorted=@var{q},dehomogenize=@var{r})
                    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).
                    562: @end itemize
                    563: */
                    564: /*&ja
                    565: @c sort-sm1.gb
                    566: @node sm1.gb,,, SM1 Functions
                    567: @subsection @code{sm1.gb}
                    568: @findex sm1.gb
                    569: @findex sm1.gb_d
                    570: @table @t
                    571: @item sm1.gb([@var{f},@var{v},@var{w}]|proc=@var{p},sorted=@var{q},dehomogenize=@var{r})
                    572: ::  @var{v} $B>e$NHyJ,:nMQAG4D$K$*$$$F(B @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B.
                    573: @item sm1.gb_d([@var{f},@var{v},@var{w}]|proc=@var{p})
                    574: ::  @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.
                    575: @end table
                    576:
                    577: @table @var
                    578: @item return
                    579: $B%j%9%H(B
                    580: @item p, q, r
                    581: $B?t(B
                    582: @item f, v, w
                    583: $B%j%9%H(B
                    584: @end table
                    585:
                    586: @itemize @bullet
                    587: @item
                    588:    @var{v} $B>e$NHyJ,:nMQAG4D$K$*$$$F(B @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B.
                    589: @item
                    590:    Weight $B%Y%/%H%k(B @var{w} $B$O>JN,$7$F$h$$(B.
                    591:    $B>JN,$7$?>l9g(B, graded reverse lexicographic order $B$r$D$+$C$F(B
                    592:    $B%V%l%V%J4pDl$r7W;;$9$k(B.
                    593: @item
                    594:    @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
                    595:   ( @var{w} $B$,$J$$$H$-(B ) $B$^$?$O(B $B%$%K%7%!%kB?9`<0(B ( @var{w} $B$,M?$($i$?$H$-(B)
                    596:   $B$N%j%9%H$G$"$k(B.
                    597: @item
                    598:    @code{sm1.gb_d} $B$O7k2L$rJ,;6B?9`<0$N%j%9%H$GLa$9(B.
                    599:     $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.
                    600:    $BLa$jCM$O(B
                    601:     [$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]
                    602:    $B$G$"$k(B.
                    603: @item
                    604:    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).
                    605: $BF1<!2=JQ?t(B @code{h} $B$,7k2L$K2C$o$k(B.
                    606: @item $B%*%W%7%g%J%kJQ?t(B @var{q} $B$,%;%C%H$5$l$F$$$k$H$-$O(B,
                    607:     3 $BHVL\$NLa$jCM$H$7$F(B, $B%0%l%V%J4pDl$*$h$S%$%K%7%!%k$N%j%9%H$,(B
                    608:     $BM?$($i$l$?=g=x$G%=!<%H$5$l$?%b%N%_%"%k$NOB$H$7$FLa$5$l$k(B.
                    609:     $B$$$^$N$H$3$m$3$NB?9`<0$O(B, $BJ8;zNs$GI=8=$5$l$k(B.
                    610:     $B%*%W%7%g%J%kJQ?t(B @var{r} $B$,%;%C%H$5$l$F$$$k$H$-$O(B,
                    611:     $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).
                    612: @end itemize
                    613: */
                    614: /*&C
                    615: @example
                    616: [293] sm1.gb([[x*dx+y*dy-1,x*y*dx*dy-2],[x,y]]);
                    617: [[x*dx+y*dy-1,y^2*dy^2+2],[x*dx,y^2*dy^2]]
                    618: @end example
                    619: */
                    620: /*&en
                    621: In the example above,
                    622: @tex the set $\{ x \partial_x + y \partial_y -1,
                    623:                  y^2 \partial_y^2+2\}$
                    624: is the Gr\"obner basis of the input with respect to the
                    625: graded reverse lexicographic order such that
                    626: $ 1 \leq \partial_y \leq \partial_x \leq y \leq x \leq \cdots$.
                    627: The set $\{x \partial_x, y^2 \partial_y\}$ is the leading monomials
                    628: (the initial monominals) of the Gr\"obner basis.
                    629: @end tex
                    630: */
                    631: /*&ja
                    632: $B>e$NNc$K$*$$$F(B,
                    633: @tex $B=89g(B $\{ x \partial_x + y \partial_y -1,
                    634:                  y^2 \partial_y^2+2\}$
                    635: $B$O(B
                    636: $ 1 \leq \partial_y \leq \partial_x \leq y \leq x \leq \cdots$
                    637: $B$G$"$k$h$&$J(B
                    638: graded reverse lexicographic order $B$K4X$9$k%0%l%V%J4pDl$G$"$k(B.
                    639: $B=89g(B $\{x \partial_x, y^2 \partial_y\}$ $B$O%0%l%V%J4pDl$N3F85$K(B
                    640: $BBP$9$k(B leading monomial (initial monomial) $B$G$"$k(B.
                    641: @end tex
                    642: */
                    643: /*&C
                    644: @example
                    645: [294] sm1.gb([[dx^2+dy^2-4,dx*dy-1],[x,y],[[dx,50,dy,2,x,1]]]);
                    646: [[dx+dy^3-4*dy,-dy^4+4*dy^2-1],[dx,-dy^4]]
                    647: @end example
                    648: */
                    649: /*&en
                    650: In the example above, two monomials
                    651: @tex
                    652: $m = x^a y^b \partial_x^c \partial_y^d$ and
                    653: $m' = x^{a'} y^{b'} \partial_x^{c'} \partial_y^{d'}$
                    654: are firstly compared by the weight vector
                    655: {\tt (dx,dy,x,y) = (50,2,1,0)}
                    656: (i.e., $m$ is larger than $m'$ if $50c+2d+a > 50c'+2d'+a'$)
                    657: and when the comparison is tie, then these are
                    658: compared by the reverse lexicographic order
                    659: (i.e., if $50c+2d+a = 50c'+2d'+a'$, then use the reverse lexicogrpahic order).
                    660: @end tex
                    661: */
                    662: /*&ja
                    663: $B>e$NNc$K$*$$$FFs$D$N%b%N%_%"%k(B
                    664: @tex
                    665: $m = x^a y^b \partial_x^c \partial_y^d$ $B$*$h$S(B
                    666: $m' = x^{a'} y^{b'} \partial_x^{c'} \partial_y^{d'}$
                    667: $B$O:G=i$K(B weight vector
                    668: {\tt (dx,dy,x,y) = (50,2,1,0)} $B$rMQ$$$FHf3S$5$l$k(B
                    669: ($B$D$^$j(B $m$ $B$O(B $50c+2d+a > 50c'+2d'+a'$ $B$N$H$-(B
                    670:  $m'$ $B$h$jBg$-$$(B )
                    671: $B<!$K$3$NHf3S$G>!Ii$,$D$+$J$$$H$-$O(B reverse lexicographic order $B$GHf3S$5$l$k(B
                    672: ($B$D$^$j(B $50c+2d+a = 50c'+2d'+a'$ $B$N$H$-(B reverse lexicographic order $B$GHf3S(B
                    673: $B$5$l$k(B).
                    674: @end tex
                    675: */
                    676: /*&C
                    677: @example
                    678: [294] F=sm1.gb([[dx^2+dy^2-4,dx*dy-1],[x,y],[[dx,50,dy,2,x,1]]]|sorted=1);
                    679:       map(print,F[2][0])$
                    680:       map(print,F[2][1])$
                    681: @end example
                    682: */
                    683: /*&C
                    684: @example
                    685: [595]
                    686:    sm1.gb([["dx*(x*dx +y*dy-2)-1","dy*(x*dx + y*dy -2)-1"],
                    687:              [x,y],[[dx,1,x,-1],[dy,1]]]);
                    688:
                    689: [[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],
                    690:  [x*dx^2+(y*dy-h^2)*dx,x*dy*dx+y*dy^2-h^2*dy-h^3,h^3*dx]]
                    691:
                    692: [596]
                    693:    sm1.gb_d([["dx (x dx +y dy-2)-1","dy (x dx + y dy -2)-1"],
                    694:              "x,y",[[dx,1,x,-1],[dy,1]]]);
                    695: [[[e0,x,y,H,E,dx,dy,h],
                    696:  [[0,-1,0,0,0,1,0,0],[0,0,0,0,0,0,1,0],[1,0,0,0,0,0,0,0],
                    697:   [0,1,1,1,1,1,1,0],[0,0,0,0,0,0,-1,0],[0,0,0,0,0,-1,0,0],
                    698:   [0,0,0,0,-1,0,0,0],[0,0,0,-1,0,0,0,0],[0,0,-1,0,0,0,0,0],
                    699:   [0,0,0,0,0,0,0,1]]],
                    700: [[(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)*
                    701: <<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
                    702: ,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
                    703: ,1,3>>],
                    704:  [(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)*<
                    705: <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
                    706: ,0,0,0,0,3>>,(1)*<<0,0,0,0,0,1,0,3>>]]]
                    707: @end example
                    708: */
                    709:
                    710: /*&en
                    711: @table @t
                    712: @item Reference
                    713:     @code{sm1.reduction}, @code{sm1.rat_to_p}
                    714: @end table
                    715: */
                    716: /*&ja
                    717: @table @t
                    718: @item $B;2>H(B
                    719:     @code{sm1.reduction}, @code{sm1.rat_to_p}
                    720: @end table
                    721: */
                    722:
                    723:
                    724:
                    725: /*&en
                    726: @c sort-sm1.deRham
                    727: @node sm1.deRham,,, SM1 Functions
                    728: @subsection @code{sm1.deRham}
                    729: @findex sm1.deRham
                    730: @table @t
                    731: @item sm1.deRham([@var{f},@var{v}]|proc=@var{p})
                    732: ::  ask the server to evaluate the dimensions of the de Rham cohomology  groups
                    733: of C^n - (the zero set of @var{f}=0).
                    734: @end table
                    735:
                    736: @table @var
                    737: @item return
                    738: List
                    739: @item p
                    740: Number
                    741: @item f
                    742: String or polynomial
                    743: @item v
                    744: List
                    745: @end table
                    746:
                    747: @itemize @bullet
                    748: @item  It returns the dimensions of the de Rham cohomology groups
                    749:     of X = C^n \ V(@var{f}).
                    750:    In other words,  it returns
                    751:       [dim H^0(X,C), dim H^1(X,C), dim H^2(X,C), ..., dim H^n(X,C)].
                    752: @item   @var{v} is a list of variables. n = @code{length(@var{v})}.
                    753: @item
                    754:    @code{sm1.deRham} requires huge computer resources.
                    755:     For example, @code{sm1.deRham(0,[x*y*z*(x+y+z-1)*(x-y),[x,y,z]])}
                    756:     is already very hard.
                    757: @item
                    758:  To efficiently analyze the roots of b-function, @code{ox_asir} should be used
                    759:   from @code{ox_sm1_forAsir}.
                    760:     It is recommended to load the communication module for @code{ox_asir}
                    761:     by the command @*
                    762:    @code{sm1(0,"[(parse) (oxasir.sm1) pushfile] extension");}
                    763:  This command is automatically executed when @code{ox_sm1_forAsir} is started.
                    764: @item If you make an interruption to the function @code{sm1.deRham}
                    765: by @code{ox_reset(sm1.get_Sm1_proc());}, the server might get out of the standard
                    766: mode. So, it is strongly recommended to execute the command
                    767: @code{ox_shutdown(sm1.get_Sm1_proc());} to interrupt and restart the server.
                    768: @end itemize
                    769: */
                    770: /*&ja
                    771: @c sort-sm1.deRham
                    772: @node sm1.deRham,,, SM1 Functions
                    773: @subsection @code{sm1.deRham}
                    774: @findex sm1.deRham
                    775: @table @t
                    776: @item sm1.deRham([@var{f},@var{v}]|proc=@var{p})
                    777: ::  $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.
                    778: @end table
                    779:
                    780: @table @var
                    781: @item return
                    782: $B%j%9%H(B
                    783: @item p
                    784: $B?t(B
                    785: @item f
                    786: $BJ8;zNs(B $B$^$?$O(B $BB?9`<0(B
                    787: @item v
                    788: $B%j%9%H(B
                    789: @end table
                    790:
                    791: @itemize @bullet
                    792: @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.
                    793:    $B$9$J$o$A(B,
                    794:    [dim H^0(X,C), dim H^1(X,C), dim H^2(X,C), ..., dim H^n(X,C)]
                    795:    $B$rLa$9(B.
                    796: @item   @var{v} $B$OJQ?t$N%j%9%H(B. n = @code{length(@var{v})} $B$G$"$k(B.
                    797: @item
                    798:    @code{sm1.deRham} $B$O7W;;5!$N;q8;$rBgNL$K;HMQ$9$k(B.
                    799:     $B$?$H$($P(B @code{sm1.deRham(0,[x*y*z*(x+y+z-1)*(x-y),[x,y,z]])}
                    800:    $B$N7W;;$9$i$9$G$KHs>o$KBgJQ$G$"$k(B.
                    801: @item
                    802:   b-$B4X?t$N:,$r8zN($h$/2r@O$9$k$K$O(B, @code{ox_asir} $B$,(B @code{ox_sm1_forAsir}
                    803:   $B$h$j;HMQ$5$l$k$Y$-$G$"$k(B.  $B%3%^%s%I(B @*
                    804:    @code{sm1(0,"[(parse) (oxasir.sm1) pushfile] extension");}
                    805:    $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.
                    806:    $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.
                    807: @item
                    808:   @code{sm1.deRham} $B$r(B @code{ox_reset(sm1.get_Sm1_proc());} $B$GCfCG$9$k$H(B,
                    809:   $B0J8e(B sm1 $B%5!<%P$,HsI8=`%b!<%I$KF~$jM=4|$7$J$$F0:n$r$9$k>l9g(B
                    810:   $B$,$"$k$N$G(B, $B%3%^%s%I(B @code{ox_shutdown(sm1.get_Sm1_proc());} $B$G(B, @code{ox_sm1_forAsir}
                    811:   $B$r0l;~(B shutdown $B$7$F%j%9%?!<%H$7$?J}$,0BA4$G$"$k(B.
                    812: @end itemize
                    813: */
                    814: /*&C
                    815: @example
                    816: [332] sm1.deRham([x^3-y^2,[x,y]]);
                    817: [1,1,0]
                    818: [333] sm1.deRham([x*(x-1),[x]]);
                    819: [1,2]
                    820: @end example
                    821: */
                    822: /*&en
                    823: @table @t
                    824: @item Reference
                    825:     @code{sm1.start}, @code{deRham} (sm1 command)
                    826: @item Algorithm:
                    827:     Oaku, Takayama, An algorithm for de Rham cohomology groups of the
                    828:     complement of an affine variety via D-module computation,
                    829:     Journal of pure and applied algebra 139 (1999), 201--233.
                    830: @end table
                    831: */
                    832: /*&ja
                    833: @table @t
                    834: @item $B;2>H(B
                    835:     @code{sm1.start}, @code{deRham} (sm1 command)
                    836: @item Algorithm:
                    837:     Oaku, Takayama, An algorithm for de Rham cohomology groups of the
                    838:     complement of an affine variety via D-module computation,
                    839:     Journal of pure and applied algebra 139 (1999), 201--233.
                    840: @end table
                    841: */
                    842:
                    843:
                    844:
                    845:
                    846: /*&en
                    847: @c sort-sm1.hilbert
                    848: @node sm1.hilbert,,, SM1 Functions
                    849: @subsection @code{sm1.hilbert}
                    850: @findex sm1.hilbert
                    851: @findex hilbert_polynomial
                    852: @table @t
                    853: @item sm1.hilbert([@var{f},@var{v}]|proc=@var{p})
                    854: ::  ask the server to compute the Hilbert polynomial for the set of polynomials @var{f}.
                    855: @item hilbert_polynomial(@var{f},@var{v})
                    856: ::  ask the server to compute the Hilbert polynomial for the set of polynomials @var{f}.
                    857: @end table
                    858:
                    859: @table @var
                    860: @item return
                    861: Polynomial
                    862: @item p
                    863: Number
                    864: @item f, v
                    865: List
                    866: @end table
                    867:
                    868: @itemize @bullet
                    869: @item  It returns the Hilbert polynomial h(k) of the set of polynomials
                    870:     @var{f}
                    871:     with respect to the set of variables @var{v}.
                    872: @item
                    873:     h(k) = dim_Q F_k/I \cap F_k  where F_k the set of polynomials of which
                    874:     degree is less than or equal to k and I is the ideal generated by the
                    875:     set of polynomials @var{f}.
                    876: @item
                    877:    Note for sm1.hilbert:
                    878:    For an efficient computation, it is preferable that
                    879:    the set of polynomials @var{f} is a set of monomials.
                    880:    In fact, this function firstly compute a Grobner basis of @var{f}, and then
                    881:    compute the Hilbert polynomial of the initial monomials of the basis.
                    882:    If the input @var{f} is already a Grobner
                    883:    basis, a Grobner basis is recomputed in this function,
                    884:    which is a waste of time and Grobner basis computation in the ring of
                    885:    polynomials in @code{sm1} is  slower than in @code{asir}.
                    886: @end itemize
                    887: */
                    888: /*&ja
                    889: @c sort-sm1.hilbert
                    890: @node sm1.hilbert,,, SM1 Functions
                    891: @subsection @code{sm1.hilbert}
                    892: @findex sm1.hilbert
                    893: @findex hilbert_polynomial
                    894: @table @t
                    895: @item sm1.hilbert([@var{f},@var{v}]|proc=@var{p})
                    896: :: $BB?9`<0$N=89g(B @var{f} $B$N%R%k%Y%k%HB?9`<0$r7W;;$9$k(B.
                    897: @item hilbert_polynomial(@var{f},@var{v})
                    898: :: $BB?9`<0$N=89g(B @var{f} $B$N%R%k%Y%k%HB?9`<0$r7W;;$9$k(B.
                    899: @end table
                    900:
                    901: @table @var
                    902: @item return
                    903: $BB?9`<0(B
                    904: @item p
                    905: $B?t(B
                    906: @item f, v
                    907: $B%j%9%H(B
                    908: @end table
                    909:
                    910: @itemize @bullet
                    911: @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)
                    912:    $B$r7W;;$9$k(B.
                    913: @item
                    914:     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
                    915:     $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.
                    916: @item
                    917:    sm1.hilbert $B$K$+$s$9$k%N!<%H(B:
                    918:    $B8zN($h$/7W;;$9$k$K$O(B @var{f} $B$O%b%N%_%"%k$N=89g$K$7$?J}$,$$$$(B.
                    919:    $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
                    920:    monomial $BC#$N%R%k%Y%k%HB?9`<0$r7W;;$9$k(B.
                    921:   $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
                    922:    $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
                    923:   $BB?9`<0%0%l%V%J4pDl7W;;$O(B @code{asir} $B$h$jCY$$(B.
                    924: @end itemize
                    925: */
                    926:
                    927: /*&C
                    928: @example
                    929:
                    930: [346] load("katsura")$
                    931: [351] A=hilbert_polynomial(katsura(5),[u0,u1,u2,u3,u4,u5]);
                    932: 32
                    933:
                    934: @end example
                    935:
                    936: @example
                    937: [279] load("katsura")$
                    938: [280] A=gr(katsura(5),[u0,u1,u2,u3,u4,u5],0)$
                    939: [281] dp_ord();
                    940: 0
                    941: [282] B=map(dp_ht,map(dp_ptod,A,[u0,u1,u2,u3,u4,u5]));
                    942: [(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>>,
                    943:  (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>>,
                    944:  (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>>,
                    945:   (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>>,
                    946:   (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>>,
                    947:  (1)*<<0,1,0,0,0,4>>,(1)*<<0,0,0,0,0,6>>]
                    948: [283] C=map(dp_dtop,B,[u0,u1,u2,u3,u4,u5]);
                    949: [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,
                    950:  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,
                    951:  u5^4*u2,u5^4*u1,u5^6]
                    952: [284] sm1.hilbert([C,[u0,u1,u2,u3,u4,u5]]);
                    953: 32
                    954: @end example
                    955: */
                    956:
                    957: /*&en
                    958: @table @t
                    959: @item Reference
                    960:     @code{sm1.start}, @code{sm1.gb}, @code{longname}
                    961: @end table
                    962: */
                    963: /*&ja
                    964: @table @t
                    965: @item $B;2>H(B
                    966:     @code{sm1.start}, @code{sm1.gb}, @code{longname}
                    967: @end table
                    968: */
                    969:
                    970:
                    971: /*&en
                    972: @c sort-sm1.genericAnn
                    973: @node sm1.genericAnn,,, SM1 Functions
                    974: @subsection @code{sm1.genericAnn}
                    975: @findex sm1.genericAnn
                    976: @table @t
                    977: @item sm1.genericAnn([@var{f},@var{v}]|proc=@var{p})
                    978: ::  It computes  the annihilating ideal for @var{f}^s.
                    979:     @var{v} is the list of variables.  Here, s is @var{v}[0] and
                    980:     @var{f} is a polynomial in the variables @code{rest}(@var{v}).
                    981: @end table
                    982:
                    983: @table @var
                    984: @item return
                    985: List
                    986: @item p
                    987: Number
                    988: @item f
                    989: Polynomial
                    990: @item v
                    991: List
                    992: @end table
                    993:
                    994: @itemize @bullet
                    995: @item  This function computes  the annihilating ideal for @var{f}^s.
                    996:     @var{v} is the list of variables.  Here, s is @var{v}[0] and
                    997:     @var{f} is a polynomial in the variables @code{rest}(@var{v}).
                    998: @end itemize
                    999: */
                   1000: /*&ja
                   1001: @c sort-sm1.genericAnn
                   1002: @node sm1.genericAnn,,, SM1 Functions
                   1003: @subsection @code{sm1.genericAnn}
                   1004: @findex sm1.genericAnn
                   1005: @table @t
                   1006: @item sm1.genericAnn([@var{f},@var{v}]|proc=@var{p})
                   1007: ::  @var{f}^s $B$N$_$?$9HyJ,J}Dx<0A4BN$r$b$H$a$k(B.
                   1008:     @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,
                   1009:     @var{f} $B$OJQ?t(B @code{rest}(@var{v}) $B>e$NB?9`<0$G$"$k(B.
                   1010: @end table
                   1011:
                   1012: @table @var
                   1013: @item return
                   1014: $B%j%9%H(B
                   1015: @item p
                   1016: $B?t(B
                   1017: @item f
                   1018: $BB?9`<0(B
                   1019: @item v
                   1020: $B%j%9%H(B
                   1021: @end table
                   1022:
                   1023: @itemize @bullet
                   1024: @item $B$3$NH!?t$O(B,
                   1025:   @var{f}^s $B$N$_$?$9HyJ,J}Dx<0A4BN$r$b$H$a$k(B.
                   1026:     @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,
                   1027:     @var{f} $B$OJQ?t(B @code{rest}(@var{v}) $B>e$NB?9`<0$G$"$k(B.
                   1028: @end itemize
                   1029: */
                   1030: /*&C
                   1031: @example
                   1032: [595] sm1.genericAnn([x^3+y^3+z^3,[s,x,y,z]]);
                   1033: [-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]
                   1034: @end example
                   1035: */
                   1036: /*&en
                   1037: @table @t
                   1038: @item Reference
                   1039:     @code{sm1.start}
                   1040: @end table
                   1041: */
                   1042: /*&ja
                   1043: @table @t
                   1044: @item $B;2>H(B
                   1045:     @code{sm1.start}
                   1046: @end table
                   1047: */
                   1048:
                   1049:
                   1050:
                   1051: /*&en
                   1052: @c sort-sm1.wTensor0
                   1053: @node sm1.wTensor0,,, SM1 Functions
                   1054: @subsection @code{sm1.wTensor0}
                   1055: @findex sm1.wTensor0
                   1056: @table @t
                   1057: @item sm1.wTensor0([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})
                   1058: ::   It computes the D-module theoretic 0-th tensor product
                   1059:     of @var{f} and @var{g}.
                   1060: @end table
                   1061:
                   1062: @table @var
                   1063: @item return
                   1064: List
                   1065: @item p
                   1066: Number
                   1067: @item f, g, v, w
                   1068: List
                   1069: @end table
                   1070:
                   1071: @itemize @bullet
                   1072: @item
                   1073:    It returns the D-module theoretic 0-th tensor product
                   1074:    of @var{f} and @var{g}.
                   1075: @item
                   1076:   @var{v} is a list of variables.
                   1077:   @var{w} is a list of weights.  The integer @var{w}[i] is
                   1078:   the weight of the variable @var{v}[i].
                   1079: @item
                   1080:    @code{sm1.wTensor0} calls @code{wRestriction0} of @code{ox_sm1},
                   1081:    which requires a generic weight
                   1082:     vector @var{w} to compute the restriction.
                   1083:     If @var{w} is not generic, the computation fails.
                   1084: @item Let F and G be solutions of @var{f} and @var{g} respectively.
                   1085: Intuitively speaking, the 0-th tensor product is a system of
                   1086: differential equations which annihilates the function FG.
                   1087: @item The answer is a submodule of a free module D^r in general even if
                   1088: the inputs @var{f} and @var{g} are left ideals of D.
                   1089: @end itemize
                   1090: */
                   1091:
                   1092: /*&ja
                   1093: @c sort-sm1.wTensor0
                   1094: @node sm1.wTensor0,,, SM1 Functions
                   1095: @subsection @code{sm1.wTensor0}
                   1096: @findex sm1.wTensor0
                   1097: @table @t
                   1098: @item sm1.wTensor0([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})
                   1099: ::   @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
                   1100: $B7W;;$9$k(B.
                   1101: @end table
                   1102:
                   1103: @table @var
                   1104: @item return
                   1105: $B%j%9%H(B
                   1106: @item p
                   1107: $B?t(B
                   1108: @item f, g, v, w
                   1109: $B%j%9%H(B
                   1110: @end table
                   1111:
                   1112: @itemize @bullet
                   1113: @item
                   1114:    @var{f} $B$H(B @var{g} $B$N(B
                   1115:    D-$B2C72$H$7$F$N(B 0 $B<!%F%s%=%k@Q$r7W;;$9$k(B.
                   1116: @item
                   1117:   @var{v} $B$OJQ?t$N%j%9%H$G$"$k(B.
                   1118:   @var{w} $B$O(B weight $B$N%j%9%H$G$"$k(B.
                   1119:   $B@0?t(B @var{w}[i] $B$OJQ?t(B @var{v}[i] $B$N(B weight $B$G$"$k(B.
                   1120: @item
                   1121:    @code{sm1.wTensor0} $B$O(B @code{ox_sm1} $B$N(B @code{wRestriction0}
                   1122:    $B$r$h$s$G$$$k(B.
                   1123:   @code{wRestriction0} $B$O(B, generic $B$J(B weight $B%Y%/%H%k(B @var{w}
                   1124:   $B$r$b$H$K$7$F@)8B$r7W;;$7$F$$$k(B.
                   1125:   Weight $B%Y%/%H%k(B @var{w} $B$,(B generic $B$G$J$$$H7W;;$,%(%i!<$GDd;_$9$k(B.
                   1126: @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.
                   1127: $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.
                   1128: @item $BF~NO(B @var{f}, @var{g} $B$,(B D $B$N:8%$%G%"%k$G$"$C$F$b(B,
                   1129: $B0lHL$K(B, $B=PNO$O<+M32C72(B D^r $B$NItJ,2C72$G$"$k(B.
                   1130: @end itemize
                   1131: */
                   1132: /*&C
                   1133: @example
                   1134: [258]  sm1.wTensor0([[x*dx -1, y*dy -4],[dx+dy,dx-dy^2],[x,y],[1,2]]);
                   1135: [[-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],
                   1136:  [-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],
                   1137:  [y^2*dy^2+(-y^2-8*y)*dy+4*y+20]]
                   1138: @end example
                   1139: */
                   1140:
                   1141:
                   1142:
                   1143: /*&en
                   1144: @c sort-sm1.reduction
                   1145: @node sm1.reduction,,, SM1 Functions
                   1146: @subsection @code{sm1.reduction}
                   1147: @findex sm1.reduction
                   1148: @table @t
                   1149: @item sm1.reduction([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})
                   1150: ::
                   1151: @end table
                   1152:
                   1153: @table @var
                   1154: @item return
                   1155: List
                   1156: @item f
                   1157: Polynomial
                   1158: @item g, v, w
                   1159: List
                   1160: @item p
                   1161: Number  (the process number of ox_sm1)
                   1162: @end table
                   1163:
                   1164: @itemize @bullet
                   1165: @item  It reduces @var{f} by the set of polynomial @var{g}
                   1166: in the homogenized Weyl algebra; it applies the
                   1167: division algorithm to @var{f}. The set of variables is @var{v} and
                   1168: @var{w} is weight vectors to determine the order, which can be ommited.
                   1169: @code{sm1.reduction_noH} is for the Weyl algebra.
                   1170: @item The return value is of the form
                   1171: [r,c0,[c1,...,cm],[g1,...gm]] where @var{g}=[g1, ..., gm] and
                   1172: c0 f + c1 g1 + ... + cm gm = r.
                   1173: r/c0 is the normal form.
                   1174: @item The function reduction reduces reducible terms that appear
                   1175: in lower order terms.
                   1176: @item  The functions
                   1177: sm1.reduction_d(P,F,G) and sm1.reduction_noH_d(P,F,G)
                   1178: are for distributed polynomials.
                   1179: @end itemize
                   1180: */
                   1181: /*&ja
                   1182: @node sm1.reduction,,, SM1 Functions
                   1183: @subsection @code{sm1.reduction}
                   1184: @findex sm1.reduction
                   1185: @table @t
                   1186: @item sm1.reduction([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})
                   1187: ::
                   1188: @end table
                   1189:
                   1190: @table @var
                   1191: @item return
                   1192: $B%j%9%H(B
                   1193: @item f
                   1194: $BB?9`<0(B
                   1195: @item g, v, w
                   1196: $B%j%9%H(B
                   1197: @item p
                   1198: $B?t(B  (ox_sm1 $B$N%W%m%;%9HV9f(B)
                   1199: @end table
                   1200:
                   1201: @itemize @bullet
                   1202: @item  $B$3$NH!?t$O(B @var{f} $B$r(B homogenized $B%o%$%kBe?t$K$*$$$F(B,
                   1203: $BB?9`<0=89g(B @var{g} $B$G4JC12=(B (reduce) $B$9$k(B; $B$D$^$j(B,
                   1204: $B$3$NH!?t$O(B, @var{f} $B$K3d;;%"%k%4%j%:%`$rE,MQ$9$k(B.
                   1205: $BJQ?t=89g$O(B @var{v} $B$G;XDj$9$k(B.
                   1206: @var{w} $B$O=g=x$r;XDj$9$k$?$a$N(B $B%&%(%$%H%Y%/%H%k$G$"$j(B,
                   1207: $B>JN,$7$F$b$h$$(B.
                   1208: @code{sm1.reduction_noH} $B$O(B, Weyl algebra $BMQ(B.
                   1209: @item $BLa$jCM$O<!$N7A$r$7$F$$$k(B:
                   1210: [r,c0,[c1,...,cm],g] $B$3$3$G(B @var{g}=[g1, ..., gm] $B$G$"$j(B,
                   1211: c0 f + c1 g1 + ... + cm gm = r
                   1212: $B$,$J$j$?$D(B.
                   1213: r/c0 $B$,(B normal form $B$G$"$k(B.
                   1214: @item $B$3$NH!?t$O(B, $BDc<!9`$K$"$i$o$l$k(B reducible $B$J9`$b4JC12=$9$k(B.
                   1215: @item  $BH!?t(B
                   1216: sm1.reduction_d(P,F,G) $B$*$h$S(B sm1.reduction_noH_d(P,F,G)
                   1217: $B$O(B, $BJ,;6B?9`<0MQ$G$"$k(B.
                   1218: @end itemize
                   1219: */
                   1220: /*&C
                   1221: @example
                   1222: [259] sm1.reduction([x^2+y^2-4,[y^4-4*y^2+1,x+y^3-4*y],[x,y]]);
                   1223: [x^2+y^2-4,1,[0,0],[y^4-4*y^2+1,x+y^3-4*y]]
                   1224: [260] sm1.reduction([x^2+y^2-4,[y^4-4*y^2+1,x+y^3-4*y],[x,y],[[x,1]]]);
                   1225: [0,1,[-y^2+4,-x+y^3-4*y],[y^4-4*y^2+1,x+y^3-4*y]]
                   1226: @end example
                   1227: */
                   1228: /*&en
                   1229: @table @t
                   1230: @item Reference
                   1231:     @code{sm1.start}, @code{d_true_nf}
                   1232: @end table
                   1233: */
                   1234: /*&ja
                   1235: @table @t
                   1236: @item $B;2>H(B
                   1237:     @code{sm1.start}, @code{d_true_nf}
                   1238: @end table
                   1239: */
                   1240:
                   1241:
                   1242: /*&en
                   1243: @node sm1.xml_tree_to_prefix_string,,, SM1 Functions
                   1244: @subsection @code{sm1.xml_tree_to_prefix_string}
                   1245: @findex sm1.xml_tree_to_prefix_string
                   1246: @table @t
                   1247: @item sm1.xml_tree_to_prefix_string(@var{s}|proc=@var{p})
                   1248: :: Translate OpenMath Tree Expression @var{s} in XML to a prefix notation.
                   1249: @end table
                   1250:
                   1251: @table @var
                   1252: @item return
                   1253: String
                   1254: @item p
                   1255: Number
                   1256: @item s
                   1257: String
                   1258: @end table
                   1259:
                   1260: @itemize @bullet
                   1261: @item  It translate OpenMath Tree Expression @var{s} in XML to a prefix notation.
                   1262: @item This function should be moved to om_* in a future.
                   1263: @item @code{om_xml_to_cmo(OpenMath Tree Expression)} returns CMO_TREE.
                   1264: asir has not yet understood this CMO.
                   1265: @item @code{java} execution environment is required.
                   1266: (For example, @code{/usr/local/jdk1.1.8/bin} should be in the
                   1267: command search path.)
                   1268: @end itemize
                   1269: */
                   1270: /*&ja
                   1271: @node sm1.xml_tree_to_prefix_string,,, SM1 Functions
                   1272: @subsection @code{sm1.xml_tree_to_prefix_string}
                   1273: @findex sm1.xml_tree_to_prefix_string
                   1274: @table @t
                   1275: @item sm1.xml_tree_to_prefix_string(@var{s}|proc=@var{p})
                   1276: :: XML $B$G=q$+$l$?(B OpenMath $B$NLZI=8=(B @var{s} $B$rA0CV5-K!$K$J$*$9(B.
                   1277: @end table
                   1278:
                   1279: @table @var
                   1280: @item return
                   1281: String
                   1282: @item p
                   1283: Number
                   1284: @item s
                   1285: String
                   1286: @end table
                   1287:
                   1288: @itemize @bullet
                   1289: @item XML $B$G=q$+$l$?(B OpenMath $B$NLZI=8=(B @var{s} $B$rA0CV5-K!$K$J$*$9(B.
                   1290: @item $B$3$NH!?t$O(B om_* $B$K>-Mh0\$9$Y$-$G$"$k(B.
                   1291: @item @code{om_xml_to_cmo(OpenMath Tree Expression)} $B$O(B CMO_TREE
                   1292: $B$rLa$9(B. @code{asir} $B$O$3$N(B CMO $B$r$^$@%5%]!<%H$7$F$$$J$$(B.
                   1293: @item @code{java} $B$N<B9T4D6-$,I,MW(B.
                   1294: ($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.)
                   1295: @end itemize
                   1296: */
                   1297: /*&C
                   1298: @example
                   1299: [263] load("om");
                   1300: 1
                   1301: [270] F=om_xml(x^4-1);
                   1302: control: wait OX
                   1303: Trying to connect to the server... Done.
                   1304: <OMOBJ><OMA><OMS name="plus" cd="basic"/><OMA>
                   1305: <OMS name="times" cd="basic"/><OMA>
                   1306: <OMS name="power" cd="basic"/><OMV name="x"/><OMI>4</OMI></OMA>
                   1307: <OMI>1</OMI></OMA><OMA><OMS name="times" cd="basic"/><OMA>
                   1308: <OMS name="power" cd="basic"/><OMV name="x"/><OMI>0</OMI></OMA>
                   1309: <OMI>-1</OMI></OMA></OMA></OMOBJ>
                   1310: [271] sm1.xml_tree_to_prefix_string(F);
                   1311: basic_plus(basic_times(basic_power(x,4),1),basic_times(basic_power(x,0),-1))
                   1312: @end example
                   1313: */
                   1314: /*&en
                   1315: @table @t
                   1316: @item Reference
                   1317:     @code{om_*}, @code{OpenXM/src/OpenMath}, @code{eval_str}
                   1318: @end table
                   1319: */
                   1320: /*&ja
                   1321: @table @t
                   1322: @item $B;2>H(B
                   1323:     @code{om_*}, @code{OpenXM/src/OpenMath},  @code{eval_str}
                   1324: @end table
                   1325: */
                   1326:
                   1327:
                   1328:
                   1329:
                   1330: /*&en
                   1331: @c sort-sm1.syz
                   1332: @node sm1.syz,,, SM1 Functions
                   1333: @subsection @code{sm1.syz}
                   1334: @findex sm1.syz
                   1335: @findex sm1.syz_d
                   1336: @table @t
                   1337: @item sm1.syz([@var{f},@var{v},@var{w}]|proc=@var{p})
                   1338: ::  computes the syzygy of @var{f} in the ring of differential
                   1339: operators with the variable @var{v}.
                   1340: @end table
                   1341:
                   1342: @table @var
                   1343: @item return
                   1344: List
                   1345: @item p
                   1346: Number
                   1347: @item f, v, w
                   1348: List
                   1349: @end table
                   1350:
                   1351: @itemize @bullet
                   1352: @item
                   1353: The return values is of the form
                   1354: [@var{s},[@var{g}, @var{m}, @var{t}]].
                   1355: Here @var{s} is the syzygy of @var{f} in the ring of differential
                   1356: operators with the variable @var{v}.
                   1357: @var{g} is a Groebner basis of @var{f} with the weight vector @var{w},
                   1358: and @var{m} is a matrix that translates the input matrix @var{f} to the Gr\"obner
                   1359: basis @var{g}.
                   1360: @var{t} is the syzygy of the Gr\"obner basis @var{g}.
                   1361: In summary, @var{g} = @var{m} @var{f} and
                   1362: @var{s} @var{f} = 0 hold as matrices.
                   1363: @item
                   1364:    The weight vectors are given by @var{w}, which can be omitted.
                   1365:     If @var{w} is not given,
                   1366:     the graded reverse lexicographic order will be used to compute Grobner basis.
                   1367: @item
                   1368:    When a non-term order is given, the Grobner basis is computed in
                   1369:    the homogenized Weyl algebra  (See Section 1.2 of the book of SST).
                   1370:    The homogenization variable h is automatically added.
                   1371: @end itemize
                   1372: */
                   1373: /*&ja
                   1374: @c sort-sm1.syz
                   1375: @node sm1.syz,,, SM1 Functions
                   1376: @subsection @code{sm1.syz}
                   1377: @findex sm1.syz
                   1378: @findex sm1.syz_d
                   1379: @table @t
                   1380: @item sm1.syz([@var{f},@var{v},@var{w}]|proc=@var{p})
                   1381: ::  @var{v} $B>e$NHyJ,:nMQAG4D$K$*$$$F(B @var{f} $B$N(B syzygy $B$r7W;;$9$k(B.
                   1382: @end table
                   1383:
                   1384: @table @var
                   1385: @item return
                   1386: $B%j%9%H(B
                   1387: @item p
                   1388: $B?t(B
                   1389: @item f, v, w
                   1390: $B%j%9%H(B
                   1391: @end table
                   1392:
                   1393: @itemize @bullet
                   1394: @item
                   1395: $BLa$jCM$O<!$N7A$r$7$F$$$k(B:
                   1396: [@var{s},[@var{g}, @var{m}, @var{t}]].
                   1397: $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
                   1398: syzygy $B$G$"$k(B.
                   1399: @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.
                   1400: @var{m} $B$OF~NO9TNs(B @var{f} $B$r%0%l%V%J4pDl(B
                   1401: @var{g} $B$XJQ49$9$k9TNs$G$"$k(B.
                   1402: @var{t} $B$O%0%l%V%J4pDl(B @var{g} $B$N(B syzygy $B$G$"$k(B.
                   1403: $B$^$H$a$k$H(B, $B<!$NEy<0$,$J$j$?$D(B:
                   1404: @var{g} = @var{m} @var{f} ,
                   1405: @var{s} @var{f} = 0.
                   1406: @item
                   1407:    Weight $B%Y%/%H%k(B @var{w} $B$O>JN,$7$F$h$$(B.
                   1408:    $B>JN,$7$?>l9g(B, graded reverse lexicographic order $B$r$D$+$C$F(B
                   1409:    $B%V%l%V%J4pDl$r7W;;$9$k(B.
                   1410: @item
                   1411:    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).
                   1412: $BF1<!2=JQ?t(B @code{h} $B$,7k2L$K2C$o$k(B.
                   1413: @end itemize
                   1414: */
                   1415: /*&C
                   1416: @example
                   1417: [293] sm1.syz([[x*dx+y*dy-1,x*y*dx*dy-2],[x,y]]);
                   1418: [[[y*x*dy*dx-2,-x*dx-y*dy+1]],    generators of the syzygy
                   1419:  [[[x*dx+y*dy-1],[y^2*dy^2+2]],   grobner basis
                   1420:   [[1,0],[y*dy,-1]],              transformation matrix
                   1421:  [[y*x*dy*dx-2,-x*dx-y*dy+1]]]]
                   1422: @end example
                   1423: */
                   1424: /*&C
                   1425: @example
                   1426: [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]]]);
                   1427: [[[y*x*dy*dx-1,-x^2*dx^2-x*dx-y^2*dy^2-y*dy+4]], generators of the syzygy
                   1428:  [[[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
                   1429:   [h^4*x*dx+y^3*dy^3+3*h^2*y^2*dy^2-3*h^4*y*dy]],
                   1430:  [[1,0],[0,1],[y*dy,-x*dx]],     transformation matrix
                   1431:  [[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]]]]
                   1432: @end example
                   1433: */
                   1434:
                   1435:
                   1436:
                   1437: /*&en
                   1438: @node sm1.mul,,, SM1 Functions
                   1439: @subsection @code{sm1.mul}
                   1440: @findex sm1.mul
                   1441: @table @t
                   1442: @item sm1.mul(@var{f},@var{g},@var{v}|proc=@var{p})
                   1443: ::  ask the sm1 server to multiply @var{f} and @var{g} in the ring of differential operators over @var{v}.
                   1444: @end table
                   1445:
                   1446: @table @var
                   1447: @item return
                   1448: Polynomial or List
                   1449: @item p
                   1450: Number
                   1451: @item f, g
                   1452: Polynomial or List
                   1453: @item v
                   1454: List
                   1455: @end table
                   1456:
                   1457: @itemize @bullet
                   1458: @item Ask the sm1 server to multiply @var{f} and @var{g} in the ring of differential operators over @var{v}.
                   1459: @item @code{sm1.mul_h} is for homogenized Weyl algebra.
                   1460: @item BUG: @code{sm1.mul(p0*dp0,1,[p0])} returns
                   1461: @code{dp0*p0+1}.
                   1462: A variable order such that d-variables come after non-d-variables
                   1463: is necessary for the correct computation.
                   1464: @end itemize
                   1465: */
                   1466:
                   1467: /*&ja
                   1468: @node sm1.mul,,, SM1 Functions
                   1469: @subsection @code{sm1.mul}
                   1470: @findex sm1.mul
                   1471: @table @t
                   1472: @item sm1.mul(@var{f},@var{g},@var{v}|proc=@var{p})
                   1473: ::  sm1$B%5!<%P(B $B$K(B @var{f} $B$+$1$k(B @var{g} $B$r(B @var{v}
                   1474: $B>e$NHyJ,:nMQAG4D$G$d$C$F$/$l$k$h$&$KMj$`(B.
                   1475: @end table
                   1476:
                   1477: @table @var
                   1478: @item return
                   1479: $BB?9`<0$^$?$O%j%9%H(B
                   1480: @item p
                   1481: $B?t(B
                   1482: @item f, g
                   1483: $BB?9`<0$^$?$O%j%9%H(B
                   1484: @item v
                   1485: $B%j%9%H(B
                   1486: @end table
                   1487:
                   1488: @itemize @bullet
                   1489: @item   sm1$B%5!<%P(B $B$K(B @var{f} $B$+$1$k(B @var{g} $B$r(B @var{v}
                   1490: $B>e$NHyJ,:nMQAG4D$G$d$C$F$/$l$k$h$&$KMj$`(B.
                   1491: @item @code{sm1.mul_h} $B$O(B homogenized Weyl $BBe?tMQ(B.
                   1492: @item BUG: @code{sm1.mul(p0*dp0,1,[p0])} $B$O(B
                   1493: @code{dp0*p0+1} $B$rLa$9(B.
                   1494: 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.
                   1495: @end itemize
                   1496: */
                   1497:
                   1498: /*&C
                   1499:
                   1500: @example
                   1501: [277] sm1.mul(dx,x,[x]);
                   1502: x*dx+1
                   1503: [278] sm1.mul([x,y],[1,2],[x,y]);
                   1504: x+2*y
                   1505: [279] sm1.mul([[1,2],[3,4]],[[x,y],[1,2]],[x,y]);
                   1506: [[x+2,y+4],[3*x+4,3*y+8]]
                   1507: @end example
                   1508:
                   1509: */
                   1510:
                   1511:
                   1512:
                   1513:
                   1514: /*&en
                   1515: @node sm1.distraction,,, SM1 Functions
                   1516: @subsection @code{sm1.distraction}
                   1517: @findex sm1.distraction
                   1518: @table @t
                   1519: @item sm1.distraction([@var{f},@var{v},@var{x},@var{d},@var{s}]|proc=@var{p})
                   1520: ::  ask the @code{sm1} server to compute the distraction of @var{f}.
                   1521: @end table
                   1522:
                   1523: @table @var
                   1524: @item return
                   1525: List
                   1526: @item p
                   1527: Number
                   1528: @item f
                   1529: Polynomial
                   1530: @item v,x,d,s
                   1531: List
                   1532: @end table
                   1533:
                   1534: @itemize @bullet
                   1535: @item  It asks the @code{sm1} server of the descriptor number @var{p}
                   1536: to compute the distraction of  @var{f} in the ring of differential
                   1537: operators with variables @var{v}.
                   1538: @item @var{x} is a list of x-variables and @var{d} is that of d-variables
                   1539: to be distracted. @var{s} is a list of variables to express the distracted @var{f}.
                   1540: @item Distraction is roughly speaking to replace x*dx by a single variable x.
                   1541: See Saito, Sturmfels, Takayama : Grobner Deformations of Hypergeometric Differential Equations at page 68 for details.
                   1542: @end itemize
                   1543: */
                   1544:
                   1545: /*&ja
                   1546: @node sm1.distraction,,, SM1 Functions
                   1547:
                   1548: @subsection @code{sm1.distraction}
                   1549: @findex sm1.distraction
                   1550: @table @t
                   1551: @item sm1.distraction([@var{f},@var{v},@var{x},@var{d},@var{s}]|proc=@var{p})
                   1552: ::  @code{sm1} $B$K(B @var{f} $B$N(B distraction $B$r7W;;$7$F$b$i$&(B.
                   1553: @end table
                   1554:
                   1555: @table @var
                   1556: @item return
                   1557: $B%j%9%H(B
                   1558: @item p
                   1559: $B?t(B
                   1560: @item f
                   1561: $BB?9`<0(B
                   1562: @item v,x,d,s
                   1563: $B%j%9%H(B
                   1564: @end table
                   1565:
                   1566: @itemize @bullet
                   1567: @item  $B<1JL;R(B @var{p}  $B$N(B @code{sm1}  $B%5!<%P$K(B,
                   1568: @var{f} $B$N(B distraction $B$r(B @var{v} $B>e$NHyJ,:nMQAG4D$G7W;;$7$F$b$i$&(B.
                   1569: @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
                   1570: $B%j%9%H(B.  Distraction $B$7$?$i(B, @var{s} $B$rJQ?t$H$7$F7k2L$rI=$9(B.
                   1571: @item Distraction $B$H$$$&$N$O(B x*dx $B$r(B x $B$GCV$-49$($k$3$H$G$"$k(B.
                   1572: $B>\$7$/$O(B Saito, Sturmfels, Takayama : Grobner Deformations of Hypergeometric Differential Equations $B$N(B page 68 $B$r8+$h(B.
                   1573: @end itemize
                   1574: */
                   1575:
                   1576: /*&C
                   1577:
                   1578: @example
                   1579: [280] sm1.distraction([x*dx,[x],[x],[dx],[x]]);
                   1580: x
                   1581: [281] sm1.distraction([dx^2,[x],[x],[dx],[x]]);
                   1582: x^2-x
                   1583: [282] sm1.distraction([x^2,[x],[x],[dx],[x]]);
                   1584: x^2+3*x+2
                   1585: [283] fctr(@@);
                   1586: [[1,1],[x+1,1],[x+2,1]]
                   1587: [284] sm1.distraction([x*dx*y+x^2*dx^2*dy,[x,y],[x],[dx],[x]]);
                   1588: (x^2-x)*dy+x*y
                   1589: @end example
                   1590: */
                   1591:
                   1592: /*&en
                   1593: @table @t
                   1594: @item Reference
                   1595:     @code{distraction2(sm1)},
                   1596: @end table
                   1597: */
                   1598:
                   1599: /*&ja
                   1600: @table @t
                   1601: @item $B;2>H(B
                   1602:     @code{distraction2(sm1)},
                   1603: @end table
                   1604: */
                   1605:
                   1606:
                   1607:
                   1608: /*&en
                   1609: @node sm1.gkz,,, SM1 Functions
                   1610: @subsection @code{sm1.gkz}
                   1611: @findex sm1.gkz
                   1612: @table @t
                   1613: @item sm1.gkz([@var{A},@var{B}]|proc=@var{p})
                   1614: ::  Returns the GKZ system (A-hypergeometric system) associated to the matrix
                   1615: @var{A} with the parameter vector @var{B}.
                   1616: @end table
                   1617:
                   1618: @table @var
                   1619: @item return
                   1620: List
                   1621: @item p
                   1622: Number
                   1623: @item A, B
                   1624: List
                   1625: @end table
                   1626:
                   1627: @itemize @bullet
                   1628: @item Returns the GKZ hypergeometric system
                   1629: (A-hypergeometric system) associated to the matrix
                   1630: @end itemize
                   1631: */
                   1632:
                   1633: /*&ja
                   1634: @node sm1.gkz,,, SM1 Functions
                   1635: @subsection @code{sm1.gkz}
                   1636: @findex sm1.gkz
                   1637: @table @t
                   1638: @item sm1.gkz([@var{A},@var{B}]|proc=@var{p})
                   1639: ::  $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.
                   1640: @end table
                   1641:
                   1642: @table @var
                   1643: @item return
                   1644: $B%j%9%H(B
                   1645: @item p
                   1646: $B?t(B
                   1647: @item A, B
                   1648: $B%j%9%H(B
                   1649: @end table
                   1650:
                   1651: @itemize @bullet
                   1652: @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.
                   1653: @end itemize
                   1654: */
                   1655:
                   1656: /*&C
                   1657:
                   1658: @example
                   1659:
                   1660: [280] sm1.gkz([  [[1,1,1,1],[0,1,3,4]],  [0,2] ]);
                   1661: [[x4*dx4+x3*dx3+x2*dx2+x1*dx1,4*x4*dx4+3*x3*dx3+x2*dx2-2,
                   1662:  -dx1*dx4+dx2*dx3,-dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],
                   1663:  [x1,x2,x3,x4]]
                   1664:
                   1665: @end example
                   1666:
                   1667: */
                   1668:
1.2       takayama 1669: /*&en
                   1670: @node sm1.mgkz,,, SM1 Functions
                   1671: @subsection @code{sm1.mgkz}
                   1672: @findex sm1.mgkz
                   1673: @table @t
                   1674: @item sm1.mgkz([@var{A},@var{W},@var{B}]|proc=@var{p})
                   1675: ::  Returns the modified GKZ system (A-hypergeometric system) associated to the matrix
                   1676: @var{A} and the weight @var{w} with the parameter vector @var{B}.
                   1677: @end table
                   1678:
                   1679: @table @var
                   1680: @item return
                   1681: List
                   1682: @item p
                   1683: Number
                   1684: @item A, W, B
                   1685: List
                   1686: @end table
                   1687:
                   1688: @itemize @bullet
                   1689: @item Returns the modified GKZ hypergeometric system
                   1690: (A-hypergeometric system) associated to the matrix
                   1691: @item http://arxiv.org/abs/0707.0043
                   1692: @end itemize
                   1693: */
                   1694:
                   1695: /*&ja
                   1696: @node sm1.mgkz,,, SM1 Functions
                   1697: @subsection @code{sm1.mgkz}
                   1698: @findex sm1.mgkz
                   1699: @table @t
                   1700: @item sm1.mgkz([@var{A},@var{W},@var{B}]|proc=@var{p})
                   1701: ::  $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.
                   1702: @end table
                   1703:
                   1704: @table @var
                   1705: @item return
                   1706: $B%j%9%H(B
                   1707: @item p
                   1708: $B?t(B
                   1709: @item A, W, B
                   1710: $B%j%9%H(B
                   1711: @end table
                   1712:
                   1713: @itemize @bullet
                   1714: @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.
                   1715: @item http://arxiv.org/abs/0707.0043
                   1716: @end itemize
                   1717: */
                   1718:
                   1719: /*&C
                   1720:
                   1721: @example
                   1722:
                   1723: [280] sm1.mgkz([ [[1,2,3]], [1,2,1], [a/2]]);
                   1724: [[6*x3*dx3+4*x2*dx2+2*x1*dx1-a,-x4*dx4+x3*dx3+2*x2*dx2+x1*dx1,
                   1725:   -dx2+dx1^2,-x4^2*dx3+dx1*dx2],[x1,x2,x3,x4]]
                   1726:
                   1727: Modified A-hypergeometric system for
                   1728: A=(1,2,3), w=(1,2,1), beta=(a/2).
                   1729: @end example
                   1730:
                   1731: */
                   1732:
1.1       takayama 1733:
                   1734:
                   1735:
                   1736: /*&en
                   1737: @node sm1.appell1,,, SM1 Functions
                   1738: @subsection @code{sm1.appell1}
                   1739: @findex sm1.appell1
                   1740: @table @t
                   1741: @item sm1.appell1(@var{a}|proc=@var{p})
                   1742: ::  Returns the Appell hypergeometric system F_1 or F_D.
                   1743: @end table
                   1744:
                   1745: @table @var
                   1746: @item return
                   1747: List
                   1748: @item p
                   1749: Number
                   1750: @item a
                   1751: List
                   1752: @end table
                   1753:
                   1754: @itemize @bullet
                   1755: @item Returns the hypergeometric system for the Lauricella function
                   1756: F_D(a,b1,b2,...,bn,c;x1,...,xn)
                   1757: where @var{a} =(a,c,b1,...,bn).
                   1758: When n=2, the Lauricella function is called the Appell function F_1.
                   1759: The parameters a, c, b1, ..., bn may be rational numbers.
                   1760: @item It does not call sm1 function appell1. As a concequence,
                   1761: when parameters are rational or symbolic, this function also works
                   1762: as well as integral parameters.
                   1763: @end itemize
                   1764: */
                   1765:
                   1766: /*&ja
                   1767: @node sm1.appell1,,, SM1 Functions
                   1768: @subsection @code{sm1.appell1}
                   1769: @findex sm1.appell1
                   1770: @table @t
                   1771: @item sm1.appell1(@var{a}|proc=@var{p})
                   1772: :: F_1 $B$^$?$O(B F_D $B$KBP1~$9$kJ}Dx<07O$rLa$9(B.
                   1773: @end table
                   1774:
                   1775: @table @var
                   1776: @item return
                   1777: $B%j%9%H(B
                   1778: @item p
                   1779: $B?t(B
                   1780: @item a
                   1781: $B%j%9%H(B
                   1782: @end table
                   1783:
                   1784: @itemize @bullet
                   1785: @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
                   1786: F_D(a,b1,b2,...,bn,c;x1,...,xn)
                   1787: $B$N$_$?$9HyJ,J}Dx<07O$rLa$9(B. $B$3$3$G(B,
                   1788: @var{a} =(a,c,b1,...,bn).
                   1789: $B%Q%i%a!<%?$OM-M}?t$G$b$h$$(B.
                   1790: @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
                   1791: $B@5$7$/F0$/(B.
                   1792: @end itemize
                   1793: */
                   1794:
                   1795: /*&C
                   1796:
                   1797: @example
                   1798:
                   1799: [281] sm1.appell1([1,2,3,4]);
                   1800: [[((-x1+1)*x2*dx1-3*x2)*dx2+(-x1^2+x1)*dx1^2+(-5*x1+2)*dx1-3,
                   1801:   (-x2^2+x2)*dx2^2+((-x1*x2+x1)*dx1-6*x2+2)*dx2-4*x1*dx1-4,
                   1802:   ((-x2+x1)*dx1+3)*dx2-4*dx1],       equations
                   1803:  [x1,x2]]                            the list of variables
                   1804:
                   1805: [282] sm1.gb(@@);
                   1806: [[((-x2+x1)*dx1+3)*dx2-4*dx1,((-x1+1)*x2*dx1-3*x2)*dx2+(-x1^2+x1)*dx1^2
                   1807:   +(-5*x1+2)*dx1-3,(-x2^2+x2)*dx2^2+((-x2^2+x1)*dx1-3*x2+2)*dx2
                   1808:   +(-4*x2-4*x1)*dx1-4,
                   1809:   (x2^3+(-x1-1)*x2^2+x1*x2)*dx2^2+((-x1*x2+x1^2)*dx1+6*x2^2
                   1810:  +(-3*x1-2)*x2+2*x1)*dx2-4*x1^2*dx1+4*x2-4*x1],
                   1811:  [x1*dx1*dx2,-x1^2*dx1^2,-x2^2*dx1*dx2,-x1*x2^2*dx2^2]]
                   1812:
                   1813: [283] sm1.rank(sm1.appell1([1/2,3,5,-1/3]));
                   1814: 3
                   1815:
                   1816: [285] Mu=2$ Beta = 1/3$
                   1817: [287] sm1.rank(sm1.appell1([Mu+Beta,Mu+1,Beta,Beta,Beta]));
                   1818: 4
                   1819:
                   1820:
                   1821: @end example
                   1822:
                   1823: */
                   1824:
                   1825: /*&en
                   1826: @node sm1.appell4,,, SM1 Functions
                   1827: @subsection @code{sm1.appell4}
                   1828: @findex sm1.appell4
                   1829: @table @t
                   1830: @item sm1.appell4(@var{a}|proc=@var{p})
                   1831: ::  Returns the Appell hypergeometric system F_4 or F_C.
                   1832: @end table
                   1833:
                   1834: @table @var
                   1835: @item return
                   1836: List
                   1837: @item p
                   1838: Number
                   1839: @item a
                   1840: List
                   1841: @end table
                   1842:
                   1843: @itemize @bullet
                   1844: @item Returns the hypergeometric system for the Lauricella function
                   1845: F_4(a,b,c1,c2,...,cn;x1,...,xn)
                   1846: where @var{a} =(a,b,c1,...,cn).
                   1847: When n=2, the Lauricella function is called the Appell function F_4.
                   1848: The parameters a, b, c1, ..., cn may be rational numbers.
                   1849: @item @item It does not call sm1 function appell4. As a concequence,
                   1850: when parameters are rational or symbolic, this function also works
                   1851: as well as integral parameters.
                   1852: @end itemize
                   1853: */
                   1854:
                   1855: /*&ja
                   1856: @node sm1.appell4,,, SM1 Functions
                   1857: @subsection @code{sm1.appell4}
                   1858: @findex sm1.appell4
                   1859: @table @t
                   1860: @item sm1.appell4(@var{a}|proc=@var{p})
                   1861: :: F_4 $B$^$?$O(B F_C $B$KBP1~$9$kJ}Dx<07O$rLa$9(B.
                   1862: @end table
                   1863:
                   1864: @table @var
                   1865: @item return
                   1866: $B%j%9%H(B
                   1867: @item p
                   1868: $B?t(B
                   1869: @item a
                   1870: $B%j%9%H(B
                   1871: @end table
                   1872:
                   1873: @itemize @bullet
                   1874: @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
                   1875: F_C(a,b,c1,c2,...,cn;x1,...,xn)
                   1876: $B$N$_$?$9HyJ,J}Dx<07O$rLa$9(B. $B$3$3$G(B,
                   1877: @var{a} =(a,b,c1,...,cn).
                   1878: $B%Q%i%a!<%?$OM-M}?t$G$b$h$$(B.
                   1879: @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
                   1880: $B@5$7$/F0$/(B.
                   1881: @end itemize
                   1882: */
                   1883:
                   1884: /*&C
                   1885:
                   1886: @example
                   1887:
                   1888: [281] sm1.appell4([1,2,3,4]);
                   1889:   [[-x2^2*dx2^2+(-2*x1*x2*dx1-4*x2)*dx2+(-x1^2+x1)*dx1^2+(-4*x1+3)*dx1-2,
                   1890:   (-x2^2+x2)*dx2^2+(-2*x1*x2*dx1-4*x2+4)*dx2-x1^2*dx1^2-4*x1*dx1-2],
                   1891:                                                               equations
                   1892:     [x1,x2]]                                      the list of variables
                   1893:
                   1894: [282] sm1.rank(@@);
                   1895: 4
                   1896:
                   1897: @end example
                   1898:
                   1899: */
                   1900:
                   1901:
                   1902:
                   1903:
                   1904: /*&en
                   1905: @node sm1.rank,,, SM1 Functions
                   1906: @subsection @code{sm1.rank}
                   1907: @findex sm1.rank
                   1908: @table @t
                   1909: @item sm1.rank(@var{a}|proc=@var{p})
                   1910: ::  Returns the holonomic rank of the system of differential equations @var{a}.
                   1911: @end table
                   1912:
                   1913: @table @var
                   1914: @item return
                   1915: Number
                   1916: @item p
                   1917: Number
                   1918: @item a
                   1919: List
                   1920: @end table
                   1921:
                   1922: @itemize @bullet
                   1923: @item It evaluates the dimension of the space of holomorphic solutions
                   1924: at a generic point of the system of differential equations @var{a}.
                   1925: The dimension is called the holonomic rank.
                   1926: @item @var{a} is a list consisting of a list of differential equations and
                   1927: a list of variables.
                   1928: @item @code{sm1.rrank} returns the holonomic rank when @var{a} is regular
                   1929: holonomic. It is generally faster than @code{sm1.rank}.
                   1930: @end itemize
                   1931: */
                   1932:
                   1933: /*&ja
                   1934: @node sm1.rank,,, SM1 Functions
                   1935: @subsection @code{sm1.rank}
                   1936: @findex sm1.rank
                   1937: @table @t
                   1938: @item sm1.rank(@var{a}|proc=@var{p})
                   1939: ::  $BHyJ,J}Dx<07O(B @var{a} $B$N(B holonomic rank $B$rLa$9(B.
                   1940: @end table
                   1941:
                   1942: @table @var
                   1943: @item return
                   1944: $B?t(B
                   1945: @item p
                   1946: $B?t(B
                   1947: @item a
                   1948: $B%j%9%H(B
                   1949: @end table
                   1950:
                   1951: @itemize @bullet
                   1952: @item $BHyJ,J}Dx<07O(B @var{a} $B$N(B, generic point $B$G$N@5B'2r$N<!85$r(B
                   1953: $BLa$9(B. $B$3$N<!85$r(B, holonomic rank $B$H8F$V(B.
                   1954: @item @var{a} $B$OHyJ,:nMQAG$N%j%9%H$HJQ?t$N%j%9%H$h$j$J$k(B.
                   1955: @item  @var{a} $B$,(B regular holonomic $B$N$H$-$O(B @code{sm1.rrank}
                   1956: $B$b(B holonomic rank $B$rLa$9(B.
                   1957: $B$$$C$Q$s$K$3$N4X?t$NJ}$,(B @code{sm1.rank} $B$h$jAa$$(B.
                   1958: @end itemize
                   1959: */
                   1960:
                   1961: /*&C
                   1962:
                   1963: @example
                   1964:
                   1965: [284]  sm1.gkz([  [[1,1,1,1],[0,1,3,4]],  [0,2] ]);
                   1966: [[x4*dx4+x3*dx3+x2*dx2+x1*dx1,4*x4*dx4+3*x3*dx3+x2*dx2-2,
                   1967:   -dx1*dx4+dx2*dx3, -dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],
                   1968:  [x1,x2,x3,x4]]
                   1969: [285] sm1.rrank(@@);
                   1970: 4
                   1971:
                   1972: [286]  sm1.gkz([  [[1,1,1,1],[0,1,3,4]],  [1,2]]);
                   1973: [[x4*dx4+x3*dx3+x2*dx2+x1*dx1-1,4*x4*dx4+3*x3*dx3+x2*dx2-2,
                   1974:  -dx1*dx4+dx2*dx3,-dx2^2*dx4+dx1*dx3^2,dx1^2*dx3-dx2^3,-dx2*dx4^2+dx3^3],
                   1975:  [x1,x2,x3,x4]]
                   1976: [287] sm1.rrank(@@);
                   1977: 5
                   1978:
                   1979: @end example
                   1980:
                   1981: */
                   1982:
                   1983:
                   1984: /*&en
                   1985: @node sm1.auto_reduce,,, SM1 Functions
                   1986: @subsection @code{sm1.auto_reduce}
                   1987: @findex sm1.auto_reduce
                   1988: @table @t
                   1989: @item sm1.auto_reduce(@var{s}|proc=@var{p})
                   1990: ::  Set the flag "AutoReduce" to @var{s}.
                   1991: @end table
                   1992:
                   1993: @table @var
                   1994: @item return
                   1995: Number
                   1996: @item p
                   1997: Number
                   1998: @item s
                   1999: Number
                   2000: @end table
                   2001:
                   2002: @itemize @bullet
                   2003: @item  If @var{s} is 1, then all Grobner bases to be computed
                   2004: will be the reduced Grobner bases.
                   2005: @item If @var{s} is 0, then Grobner bases are not necessarily the reduced
                   2006: Grobner bases.  This is the default.
                   2007: @end itemize
                   2008: */
                   2009:
                   2010: /*&ja
                   2011: @node sm1.auto_reduce,,, SM1 Functions
                   2012: @subsection @code{sm1.auto_reduce}
                   2013: @findex sm1.auto_reduce
                   2014: @table @t
                   2015: @item sm1.auto_reduce(@var{s}|proc=@var{p})
                   2016: ::  $B%U%i%0(B "AutoReduce" $B$r(B @var{s} $B$K@_Dj(B.
                   2017: @end table
                   2018:
                   2019: @table @var
                   2020: @item $BLa$jCM(B
                   2021: $B?t(B
                   2022: @item p
                   2023: $B?t(B
                   2024: @item s
                   2025: $B?t(B
                   2026: @end table
                   2027:
                   2028: @itemize @bullet
                   2029: @item  @var{s} $B$,(B 1 $B$N$H$-(B, $B0J8e7W;;$5$l$k%0%l%V%J4pDl$O$9$Y$F(B,
                   2030: reduced $B%0%l%V%J4pDl$H$J$k(B.
                   2031: @item  @var{s} $B$,(B 0 $B$N$H$-(B, $B7W;;$5$l$k%0%l%V%J4pDl$O(B
                   2032: reduced $B%0%l%V%J4pDl$H$O$+$.$i$J$$(B. $B$3$A$i$,%G%U%)!<%k%H(B.
                   2033: @end itemize
                   2034: */
                   2035:
                   2036:
                   2037:
                   2038: /*&en
                   2039: @node sm1.slope,,, SM1 Functions
                   2040: @subsection @code{sm1.slope}
                   2041: @findex sm1.slope
                   2042: @table @t
                   2043: @item sm1.slope(@var{ii},@var{v},@var{f_filtration},@var{v_filtration}|proc=@var{p})
                   2044: ::  Returns the slopes of differential equations @var{ii}.
                   2045: @end table
                   2046:
                   2047: @table @var
                   2048: @item return
                   2049: List
                   2050: @item p
                   2051: Number
                   2052: @item ii
                   2053: List  (equations)
                   2054: @item v
                   2055: List  (variables)
                   2056: @item f_filtration
                   2057: List  (weight vector)
                   2058: @item v_filtration
                   2059: List (weight vector)
                   2060: @end table
                   2061:
                   2062: @itemize @bullet
                   2063: @item @code{sm1.slope} returns the (geometric) slopes
                   2064: of the system of differential equations @var{ii}
                   2065: along the hyperplane specified by
                   2066: the V filtration @var{v_filtration}.
                   2067: @item @var{v} is a list of variables.
                   2068: @item The return value is a list of lists.
                   2069: The first entry of each list is the slope and the second entry
                   2070: is the weight vector for which the microcharacteristic variety is
                   2071: not bihomogeneous.
                   2072: @end itemize
                   2073:
                   2074: @noindent
                   2075: Algorithm:
                   2076: see "A.Assi, F.J.Castro-Jimenez and J.M.Granger,
                   2077: How to calculate the slopes of a D-module, Compositio Math, 104, 1-17, 1996"
1.4     ! takayama 2078: Note that the signs of the slopes s' are negative, but the absolute values -s'
1.1       takayama 2079: of the slopes are returned.
1.4     ! takayama 2080: In other words, when pF+qV is the gap, -s'=q/p is returned.
        !          2081: Note that s=1-1/s' is called the slope in recent literatures. Solutions belongs to O(s).
        !          2082: The number s satisfies 1<= s.
        !          2083: 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)
        !          2084: in the Borel and Laplace transformations respectively.
1.1       takayama 2085:
                   2086: */
                   2087:
                   2088: /*&ja
                   2089: @node sm1.slope,,, SM1 Functions
                   2090: @subsection @code{sm1.slope}
                   2091: @findex sm1.slope
                   2092: @table @t
                   2093: @item sm1.slope(@var{ii},@var{v},@var{f_filtration},@var{v_filtration}|proc=@var{p})
                   2094: ::  $BHyJ,J}Dx<07O(B @var{ii} $B$N(B slope $B$rLa$9(B.
                   2095: @end table
                   2096:
                   2097: @table @var
                   2098: @item return
                   2099: $B?t(B
                   2100: @item p
                   2101: $B?t(B
                   2102: @item ii
                   2103: $B%j%9%H(B  ($BJ}Dx<0(B)
                   2104: @item v
                   2105: $B%j%9%H(B ($BJQ?t(B)
                   2106: @item f_filtration
                   2107: $B%j%9%H(B  (weight vector)
                   2108: @item v_filtration
                   2109: $B%j%9%H(B (weight vector)
                   2110: @end table
                   2111:
                   2112: @itemize @bullet
                   2113: @item @code{sm1.slope} $B$O(B
                   2114: $BHyJ,J}Dx<07O(B @var{ii} $B$N(B V filtration  @var{v_filtration}
                   2115: $B$G;XDj$9$kD6J?LL$K1h$C$F$N(B (geomeric) slope $B$r7W;;$9$k(B.
                   2116: @item @var{v} $B$OJQ?t$N%j%9%H(B.
                   2117: @item $BLa$jCM$O(B, $B%j%9%H$r@.J,$H$9$k%j%9%H$G$"$k(B.
                   2118: $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
                   2119: microcharacteristic variety $B$,(B bihomogeneous $B$G$J$$(B.
                   2120: @end itemize
                   2121:
                   2122: @noindent
                   2123: Algorithm:
                   2124: "A.Assi, F.J.Castro-Jimenez and J.M.Granger,
                   2125: How to calculate the slopes of a D-module, Compositio Math, 104, 1-17, 1996"
                   2126: $B$r$_$h(B.
1.4     ! takayama 2127: Slope s' $B$NK\Mh$NDj5A$G$O(B, $BId9f$,Ii$H$J$k$,(B, $B$3$N%W%m%0%i%`$O(B,
        !          2128: Slope $B$N@dBPCM(B -s' $B$rLa$9(B.
        !          2129: $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.
        !          2130: $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.
        !          2131: $B?t(B s $B$O(B 1<= s $B$rK~$9(B.
        !          2132: r=s-1=-1/s' $B$*$h$S(B kappa=1/r=-s' $B$G$"$k(B.
        !          2133: $B$3$l$i$N?t$O(BBorel and Laplace $BJQ49$K$*$$$F$=$l$>$l(B 1/Gamma(1+m*r) factor,
        !          2134: exp(-tau^kappa) $B9`$H$7$F;H$o$l$k(B.
1.1       takayama 2135: */
                   2136:
                   2137: /*&C
                   2138:
                   2139: @example
                   2140:
                   2141: [284] A= sm1.gkz([  [[1,2,3]],  [-3] ]);
                   2142:
                   2143:
                   2144: [285] sm1.slope(A[0],A[1],[0,0,0,1,1,1],[0,0,-1,0,0,1]);
                   2145:
                   2146: [286] A2 = sm1.gkz([ [[1,1,1,0],[2,-3,1,-3]], [1,0]]);
                   2147:      (* This is an interesting example given by Laura Matusevich,
                   2148:         June 9, 2001 *)
                   2149:
                   2150: [287] sm1.slope(A2[0],A2[1],[0,0,0,0,1,1,1,1],[0,0,0,-1,0,0,0,1]);
                   2151:
                   2152:
                   2153: @end example
                   2154:
                   2155: */
                   2156: /*&en
                   2157: @table @t
                   2158: @item Reference
                   2159:     @code{sm.gb}
                   2160: @end table
                   2161: */
                   2162: /*&ja
                   2163: @table @t
                   2164: @item $B;2>H(B
                   2165:     @code{sm.gb}
                   2166: @end table
                   2167: */
                   2168:
                   2169:
                   2170: /*&en
                   2171: @include sm1-auto.en
                   2172: */
                   2173:
                   2174: /*&ja
                   2175: @include sm1-auto.ja
                   2176: */
                   2177:
                   2178:
                   2179: end$
                   2180:

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