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

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

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