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

Annotation of OpenXM/src/asir-contrib/packages/doc/sm1.oxweave, Revision 1.8

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

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