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

1.14    ! ohara       1: /*$OpenXM: OpenXM/src/asir-contrib/packages/doc/sm1.oxweave,v 1.13 2003/07/28 01:36:36 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
1.11      takayama    8:
1.6       takayama    9: */
1.14    ! ohara      10: /*&ja
1.1       takayama   11: @chapter SM1 $BH!?t(B
                     12:
                     13: $B$3$N@a$G$O(B sm1 $B$N(B ox $B%5!<%P(B @code{ox_sm1_forAsir}
                     14: $B$H$N%$%s%?%U%'!<%94X?t$r2r@b$9$k(B.
                     15: $B$3$l$i$N4X?t$O%U%!%$%k(B  @file{sm1} $B$GDj5A$5$l$F$$$k(B.
                     16: @file{sm1} $B$O(B @file{$(OpenXM_HOME)/lib/asir-contrib} $B$K$"$k(B.
                     17: $B%7%9%F%`(B @code{sm1} $B$OHyJ,:nMQAG4D$G7W;;$9$k$?$a$N%7%9%F%`$G$"$k(B.
                     18: $B7W;;Be?t4v2?$N$$$m$$$m$JITJQNL$N7W;;$,HyJ,:nMQAG$N7W;;$K5"Ce$9$k(B.
                     19: @code{sm1} $B$K$D$$$F$NJ8=q$O(B @code{OpenXM/doc/kan96xx} $B$K$"$k(B.
                     20:
                     21: $B$H$3$KCG$j$,$J$$$+$.$j$3$N@a$N$9$Y$F$N4X?t$O(B,
                     22: $BM-M}?t78?t$N<0$rF~NO$H$7$F$&$1$D$1$J$$(B.
                     23: $B$9$Y$F$NB?9`<0$N78?t$O@0?t$G$J$$$H$$$1$J$$(B.
                     24:
                     25: @tex
                     26: $B6u4V(B
                     27: $X:={\bf C} \setminus \{ 0, 1 \} = {\bf C} \setminus V(x(x-1))$
                     28: $B$N%I%i!<%`%3%[%b%m%872C#$N<!85$r7W;;$7$F$_$h$&(B.
                     29: $X$ $B$OJ?LL$KFs$D$N7j$r$"$1$?6u4V$G$"$k$N$G(B, $BE@(B $x=0$, $x=1$ $B$N$^$o$j$r(B
                     30: $B$^$o$kFs$D$N%k!<%W$,(B1$B<!85$N%[%b%m%8!<72$N6u4V$r$O$k(B.
                     31: $B$7$?$,$C$F(B, 1$B<!85%I%i!<%`%3%[%b%m%872$N<!85$O(B $2$ $B$G$"$k(B.
                     32: @code{sm1} $B$O(B $0$ $B<!85$N%3%[%b%m%872$N<!85$*$h$S(B $1$ $B<!85$N%3%[%b%m%872$N(B
                     33: $B<!85$rEz$($k(B.
                     34: @end tex
                     35: */
1.14    ! ohara      36: /*&en
1.1       takayama   37: @chapter SM1 Functions
                     38:
                     39: This chapter describes  interface functions for
                     40: sm1 ox server @code{ox_sm1_forAsir}.
                     41: These interface functions are defined in the file @file{sm1}.
                     42: The file @file{sm1} is @*
                     43: at @file{$(OpenXM_HOME)/lib/asir/contrib-packages}.
                     44: The system @code{sm1} is a system to compute in the ring of differential
                     45: operators.
                     46: Many constructions of invariants
                     47: in the computational algebraic geometry reduce
                     48: to constructions in the ring of differential operators.
                     49: Documents on @code{sm1} are in
                     50: the directory @code{OpenXM/doc/kan96xx}.
                     51:
                     52: All the coefficients of input polynomials should be
                     53: integers for most functions in this section.
                     54: Other functions accept rational numbers as inputs
                     55: and it will be explicitely noted in each explanation
                     56: of these functions.
                     57:
                     58:
                     59:
                     60: @tex
                     61: Let us evaluate the dimensions of the de Rham cohomology groups
                     62: of
                     63: $X:={\bf C} \setminus \{ 0, 1 \} = {\bf C} \setminus V(x(x-1))$.
                     64: The space $X$ is a two punctured plane, so two loops that encircles the
                     65: points $x=0$ and $x=1$ respectively spans the first homology group.
                     66: Hence, the dimension of the first de Rham cohomology group is $2$.
                     67: @code{sm1} answers the dimensions of the 0th and the first
                     68: cohomology groups.
                     69: @end tex
                     70: */
                     71: /*&C-texi
                     72: @example
                     73:
1.5       takayama   74: @include opening.texi
1.1       takayama   75:
1.8       takayama   76: [283] sm1.deRham([x*(x-1),[x]]);
1.1       takayama   77: [1,2]
                     78: @end example
                     79: */
                     80: /*&C-texi
                     81: @noindent
                     82: The author of @code{sm1} : Nobuki Takayama, @code{takayama@@math.sci.kobe-u.ac.jp} @*
                     83: The author of sm1 packages : Toshinori Oaku, @code{oaku@@twcu.ac.jp} @*
                     84: Reference: [SST] Saito, M., Sturmfels, B., Takayama, N.,
                     85: Grobner Deformations of Hypergeometric Differential Equations,
                     86: 1999, Springer.
                     87: See the appendix.
                     88: */
1.6       takayama   89:
1.11      takayama   90: /*&C-texi
1.6       takayama   91: @menu
                     92: * ox_sm1_forAsir::
1.8       takayama   93: * sm1.start::
1.10      takayama   94: * sm1.sm1::
1.8       takayama   95: * sm1.push_int0::
                     96: * sm1.gb::
                     97: * sm1.deRham::
                     98: * sm1.hilbert::
                     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.11      takayama  112: * sm1.ahg::
                    113: * sm1.bfunction::
                    114: * sm1.generalized_bfunction::
                    115: * sm1.restriction::
                    116: * sm1.saturation::
1.6       takayama  117: @end menu
                    118: */
                    119:
1.14    ! ohara     120: /*&ja
1.1       takayama  121: @section @code{ox_sm1_forAsir} $B%5!<%P(B
                    122: */
1.14    ! ohara     123: /*&en
1.1       takayama  124: @section @code{ox_sm1_forAsir} Server
                    125: */
                    126:
1.14    ! ohara     127: /*&en
1.11      takayama  128: @node ox_sm1_forAsir,,, SM1 Functions
1.1       takayama  129: @subsection @code{ox_sm1_forAsir}
                    130: @findex ox_sm1_forAsir
                    131: @table @t
                    132: @item ox_sm1_forAsir
                    133: ::  @code{sm1} server for @code{asir}.
                    134: @end table
                    135: @itemize @bullet
                    136: @item
                    137:    @code{ox_sm1_forAsir} is the @code{sm1} server started from asir
1.8       takayama  138:     by the command @code{sm1.start}.
1.1       takayama  139:     In the standard setting,  @*
                    140:     @code{ox_sm1_forAsir} =
                    141:          @file{$(OpenXM_HOME)/lib/sm1/bin/ox_sm1}
                    142:        +
                    143:          @file{$(OpenXM_HOME)/lib/sm1/callsm1.sm1}   (macro file) @*
                    144:        +
                    145:          @file{$(OpenXM_HOME)/lib/sm1/callsm1b.sm1}  (macro file) @*
                    146:    The macro files @file{callsm1.sm1} and @file{callsm1b.sm1}
                    147:    are searched from
                    148:    current directory, @code{$(LOAD_SM1_PATH)},
                    149:    @code{$(OpenXM_HOME)/lib/sm1},
                    150:    @code{/usr/local/lib/sm1}
                    151:    in this order.
                    152: @item Note for programmers:  See the files
                    153:     @file{$(OpenXM_HOME)/src/kxx/oxserver00.c},
                    154:     @file{$(OpenXM_HOME)/src/kxx/sm1stackmachine.c}
                    155: to build your own server by reading @code{sm1} macros.
                    156: @end itemize
                    157: */
1.14    ! ohara     158: /*&ja
1.11      takayama  159: @node ox_sm1_forAsir,,, SM1 Functions
1.1       takayama  160: @subsection @code{ox_sm1_forAsir}
                    161: @findex ox_sm1_forAsir
                    162: @table @t
                    163: @item ox_sm1_forAsir
                    164: ::  @code{asir} $B$N$?$a$N(B @code{sm1} $B%5!<%P(B.
                    165: @end table
                    166: @itemize @bullet
                    167: @item
                    168:    $B%5!<%P(B @code{ox_sm1_forAsir} $B$O(B @code{asir} $B$h$j%3%^%s%I(B
1.8       takayama  169:     @code{sm1.start} $B$G5/F0$5$l$k(B @code{sm1} $B%5!<%P$G$"$k(B.
1.1       takayama  170:
                    171:     $BI8=`E*@_Dj$G$O(B, @*
                    172:     @code{ox_sm1_forAsir} =
                    173:          @file{$(OpenXM_HOME)/lib/sm1/bin/ox_sm1}
                    174:        +
                    175:          @file{$(OpenXM_HOME)/lib/sm1/callsm1.sm1}   (macro file) @*
                    176:        +
                    177:          @file{$(OpenXM_HOME)/lib/sm1/callsm1b.sm1}  (macro file) @*
                    178:   $B$G$"$j(B, $B$3$l$i$N%^%/%m%U%!%$%k$O(B, $B0lHL$K$O(B
                    179:    current directory, @code{$(LOAD_SM1_PATH)},
                    180:    @code{$(OpenXM_HOME)/lib/sm1},
                    181:    @code{/usr/local/lib/sm1}
                    182:     $B$N=gHV$G$5$,$5$l$k(B.
                    183: @item $B%W%m%0%i%^!<$N$?$a$N%N!<%H(B:
                    184: @code{sm1} $B%^%/%m$rFI$_9~$s$G<+J,FH<+$N%5!<%P$r:n$k$K$O(B
                    185:     $B<!$N%U%!%$%k$b8+$h(B
                    186:     @file{$(OpenXM_HOME)/src/kxx/oxserver00.c},
                    187:     @file{$(OpenXM_HOME)/src/kxx/sm1stackmachine.c}
                    188: @end itemize
                    189: */
                    190:
                    191:
1.14    ! ohara     192: /*&ja
1.1       takayama  193: @section $BH!?t0lMw(B
                    194: */
1.14    ! ohara     195: /*&en
1.1       takayama  196: @section Functions
                    197: */
                    198:
1.14    ! ohara     199: /*&en
1.8       takayama  200: @c sort-sm1.start
                    201: @node sm1.start,,, SM1 Functions
                    202: @subsection @code{sm1.start}
                    203: @findex sm1.start
1.1       takayama  204: @table @t
1.8       takayama  205: @item sm1.start()
1.1       takayama  206: ::  Start  @code{ox_sm1_forAsir} on the localhost.
                    207: @end table
                    208:
                    209: @table @var
                    210: @item return
                    211: Integer
                    212: @end table
                    213:
                    214: @itemize @bullet
                    215: @item Start @code{ox_sm1_forAsir} on the localhost.
                    216:     It returns the descriptor of @code{ox_sm1_forAsir}.
                    217: @item Set @code{Xm_noX = 1} to start @code{ox_sm1_forAsir}
                    218: without a debug window.
                    219: @item You might have to set suitable orders of variable by the command
                    220: @code{ord}.  For example,
                    221: when you are working in the
                    222: ring of differential operators on the variable @code{x} and @code{dx}
                    223: (@code{dx} stands for
                    224: @tex $\partial/\partial x$
                    225: @end tex
                    226: ),
                    227: @code{sm1} server assumes that
                    228: the variable @code{dx} is collected to the right and the variable
                    229: @code{x} is collected to the left in the printed expression.
                    230: In the example below, you  must not use the variable @code{cc}
                    231: for computation in @code{sm1}.
                    232: @item The variables from @code{a} to @code{z} except @code{d} and @code{o}
                    233: and @code{x0}, ..., @code{x20}, @code{y0}, ..., @code{y20},
                    234: @code{z0}, ..., @code{z20} can be used as variables for ring of
                    235: differential operators in default. (cf. @code{Sm1_ord_list} in @code{sm1}).
1.8       takayama  236: @item The descriptor is stored in @code{static Sm1_proc}.
                    237: The descriptor can be obtained by the function
                    238: @code{sm1.get_Sm1_proc()}.
1.1       takayama  239: @end itemize
                    240: */
1.14    ! ohara     241: /*&ja
1.8       takayama  242: @c sort-sm1.start
                    243: @node sm1.start,,, SM1 Functions
                    244: @subsection @code{sm1.start}
                    245: @findex sm1.start
1.1       takayama  246: @table @t
1.8       takayama  247: @item sm1.start()
1.1       takayama  248: ::  localhost $B$G(B  @code{ox_sm1_forAsir} $B$r%9%?!<%H$9$k(B.
                    249: @end table
                    250:
                    251: @table @var
                    252: @item return
                    253: $B@0?t(B
                    254: @end table
                    255:
                    256: @itemize @bullet
                    257: @item localhost $B$G(B @code{ox_sm1_forAsir} $B$r%9%?!<%H$9$k(B.
                    258: $B%5!<%P(B @code{ox_sm1_forAsir} $B$N<1JLHV9f$rLa$9(B.
                    259: @item @code{Xm_noX = 1} $B$H$*$/$H%5!<%P(B @code{ox_sm1_forAsir} $B$r%G%P%C%0MQ$N(B
                    260: $B%&%#%s%I%&$J$7$K5/F0$G$-$k(B.
                    261: @item $B%3%^%s%I(B @code{ord} $B$rMQ$$$FJQ?t=g=x$r@5$7$/@_Dj$7$F$*$/I,MW$,(B
                    262: $B$"$k(B.
                    263: $B$?$H$($P(B,
                    264: $BJQ?t(B @code{x} $B$H(B @code{dx} $B>e$NHyJ,:nMQAG4D(B
                    265: (@code{dx} $B$O(B
                    266: @tex $\partial/\partial x$
                    267: @end tex
                    268: $B$KBP1~(B)
                    269: $B$G7W;;$7$F$$$k$H$-(B,
                    270: @code{sm1} $B%5!<%P$O<0$r0u:~$7$?$H$-(B,
                    271: $BJQ?t(B @code{dx} $B$O1&B&$K=8$a$lJQ?t(B
                    272: @code{x} $B$O:8B&$K$"$D$a$i$l$F$$$k$H2>Dj$7$F$$$k(B.
                    273: $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.
                    274: @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,
                    275: $B$=$l$+$i(B, @code{x0}, ..., @code{x20}, @code{y0}, ..., @code{y20},
                    276: @code{z0}, ..., @code{z20} $B$O(B, $B%G%U%)!<%k%H$GHyJ,:nMQAG4D$NJQ?t$H$7$F(B
                    277: $B;H$($k(B (cf. @code{Sm1_ord_list} in @code{sm1}).
1.8       takayama  278: @item $B<1JLHV9f$O(B @code{static Sm1_proc} $B$K3JG<$5$l$k(B.
                    279: $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  280: @end itemize
                    281: */
                    282: /*&C-texi
                    283: @example
                    284: [260] ord([da,a,db,b]);
                    285: [da,a,db,b,dx,dy,dz,x,y,z,dt,ds,t,s,u,v,w,
                    286: ......... omit ..................
                    287: ]
                    288: [261] a*da;
                    289: a*da
                    290: [262] cc*dcc;
                    291: dcc*cc
1.8       takayama  292: [263] sm1.mul(da,a,[a]);
1.1       takayama  293: a*da+1
1.8       takayama  294: [264] sm1.mul(a,da,[a]);
1.1       takayama  295: a*da
                    296: @end example
                    297: */
1.14    ! ohara     298: /*&en
1.1       takayama  299: @table @t
                    300: @item Reference
1.8       takayama  301:     @code{ox_launch}, @code{sm1.push_int0}, @code{sm1.push_poly0},
1.1       takayama  302:     @code{ord}
                    303: @end table
                    304: */
1.14    ! ohara     305: /*&ja
1.1       takayama  306: @table @t
                    307: @item $B;2>H(B
1.8       takayama  308:     @code{ox_launch}, @code{sm1.push_int0}, @code{sm1.push_poly0},
1.1       takayama  309:     @code{ord}
                    310: @end table
                    311: */
                    312:
                    313:
                    314:
1.14    ! ohara     315: /*&en
1.1       takayama  316: @c sort-sm1
1.10      takayama  317: @node sm1.sm1,,, SM1 Functions
                    318: @subsection @code{sm1.sm1}
                    319: @findex sm1.sm1
1.1       takayama  320: @table @t
1.10      takayama  321: @item sm1.sm1(@var{p},@var{s})
1.1       takayama  322: ::  ask the @code{sm1} server to execute the command string @var{s}.
                    323: @end table
                    324:
                    325: @table @var
                    326: @item return
                    327: Void
                    328: @item p
                    329: Number
                    330: @item s
                    331: String
                    332: @end table
                    333:
                    334: @itemize @bullet
                    335: @item  It asks the @code{sm1} server of the descriptor number @var{p}
                    336: to execute the command string @var{s}.
1.9       takayama  337: (In the next example, the descriptor number is 0.)
1.1       takayama  338: @end itemize
                    339: */
1.14    ! ohara     340: /*&ja
1.10      takayama  341: @node sm1.sm1,,, SM1 Functions
                    342: @subsection @code{sm1.sm1}
                    343: @findex sm1.sm1
1.1       takayama  344: @table @t
1.10      takayama  345: @item sm1.sm1(@var{p},@var{s})
1.1       takayama  346: ::  $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.
                    347: @end table
                    348:
                    349: @table @var
                    350: @item return
                    351: $B$J$7(B
                    352: @item p
                    353: $B?t(B
                    354: @item s
                    355: $BJ8;zNs(B
                    356: @end table
                    357:
                    358: @itemize @bullet
                    359: @item  $B<1JLHV9f(B @var{p} $B$N(B @code{sm1} $B%5!<%P$K(B
                    360: $B%3%^%s%INs(B @var{s} $B$r<B9T$7$F$/$l$k$h$&$KMj$`(B.
1.9       takayama  361:  ($B<!$NNc$G$O(B, $B<1JLHV9f(B 0)
1.1       takayama  362: @end itemize
                    363: */
                    364: /*&C-texi
                    365: @example
1.10      takayama  366: [261] sm1.sm1(0," ( (x-1)^2 ) . ");
1.1       takayama  367: 0
                    368: [262] ox_pop_string(0);
                    369: x^2-2*x+1
1.10      takayama  370: [263] sm1.sm1(0," [(x*(x-1))  [(x)]] deRham ");
1.1       takayama  371: 0
                    372: [264] ox_pop_string(0);
                    373: [1 , 2]
                    374: @end example
                    375: */
1.10      takayama  376:
1.14    ! ohara     377: /*&ja
1.1       takayama  378: @table @t
                    379: @item $B;2>H(B
1.8       takayama  380:     @code{sm1.start}, @code{ox_push_int0}, @code{sm1.push_poly0}, @code{sm1.get_Sm1_proc()}.
1.1       takayama  381: @end table
                    382: */
1.14    ! ohara     383: /*&en
1.1       takayama  384: @table @t
                    385: @item Reference
1.8       takayama  386:     @code{sm1.start}, @code{ox_push_int0}, @code{sm1.push_poly0}, @code{sm1.get_Sm1_proc()}.
1.1       takayama  387: @end table
                    388: */
                    389:
                    390:
1.14    ! ohara     391: /*&en
1.8       takayama  392: @c sort-sm1.push_int0
                    393: @node sm1.push_int0,,, SM1 Functions
                    394: @subsection @code{sm1.push_int0}
                    395: @findex sm1.push_int0
1.1       takayama  396: @table @t
1.8       takayama  397: @item sm1.push_int0(@var{p},@var{f})
1.1       takayama  398: ::   push the object @var{f} to the server with the descriptor number @var{p}.
                    399: @end table
                    400:
                    401: @table @var
                    402: @item return
                    403: Void
                    404: @item p
                    405: Number
                    406: @item f
                    407: Object
                    408: @end table
                    409:
                    410: @itemize @bullet
                    411: @item When @code{type(@var{f})} is 2 (recursive polynomial),
                    412:     @var{f} is converted to a string (type == 7)
                    413:     and is sent to the server by @code{ox_push_cmo}.
                    414: @item When @code{type(@var{f})} is 0 (zero),
                    415:      it is translated to the 32 bit integer zero
                    416:     on the server.
                    417:     Note that @code{ox_push_cmo(@var{p},0)} sends @code{CMO_NULL} to the server.
                    418: In other words, the server does not get the 32 bit integer 0 nor
                    419: the bignum 0.
                    420: @item  @code{sm1} integers are classfied into the 32 bit integer and
                    421: the bignum.
                    422: When @code{type(@var{f})} is 1 (number), it is translated to the
                    423: 32 bit integer on the server.
                    424: Note that @code{ox_push_cmo(@var{p},1234)} send the bignum 1234 to the
                    425: @code{sm1} server.
                    426: @item In other cases,  @code{ox_push_cmo} is called without data conversion.
                    427: @end itemize
                    428: */
1.14    ! ohara     429: /*&ja
1.8       takayama  430: @c sort-sm1.push_int0
                    431: @node sm1.push_int0,,, SM1 Functions
                    432: @subsection @code{sm1.push_int0}
                    433: @findex sm1.push_int0
1.1       takayama  434: @table @t
1.8       takayama  435: @item sm1.push_int0(@var{p},@var{f})
1.1       takayama  436: ::   $B%*%V%8%'%/%H(B @var{f} $B$r<1JL;R(B @var{p} $B$N%5!<%P$XAw$k(B.
                    437: @end table
                    438:
                    439: @table @var
                    440: @item return
                    441: $B$J$7(B
                    442: @item p
                    443: $B?t(B
                    444: @item f
                    445: $B%*%V%8%'%/%H(B
                    446: @end table
                    447:
                    448: @itemize @bullet
                    449: @item @code{type(@var{f})} $B$,(B 2 ($B:F5"B?9`<0(B) $B$N$H$-(B,
                    450:     @var{f} $B$OJ8;zNs(B (type == 7) $B$KJQ49$5$l$F(B,
                    451:     @code{ox_push_cmo} $B$rMQ$$$F%5!<%P$XAw$i$l$k(B.
                    452: @item @code{type(@var{f})} $B$,(B 0 (zero) $B$N$H$-$O(B,
                    453:     $B%5!<%P>e$G$O(B, 32 bit $B@0?t$H2r<a$5$l$k(B.
                    454:     $B$J$*(B @code{ox_push_cmo(P,0)} $B$O%5!<%P$KBP$7$F(B @code{CMO_NULL}
                    455: $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.
                    456: @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.
                    457: @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
                    458: $B$*$/$k(B.
                    459: @code{ox_push_cmo(@var{p},1234)} $B$O(B bignum $B$N(B 1234 $B$r(B
                    460: @code{sm1} $B%5!<%P$K$*$/$k$3$H$KCm0U$7$h$&(B.
                    461: @item $B$=$NB>$N>l9g$K$O(B  @code{ox_push_cmo} $B$r%G!<%?7?$NJQ49$J$7$K8F$S=P$9(B.
                    462: @end itemize
                    463: */
                    464: /*&C
                    465: @example
1.8       takayama  466: [219] P=sm1.start();
1.1       takayama  467: 0
1.8       takayama  468: [220] sm1.push_int0(P,x*dx+1);
1.1       takayama  469: 0
                    470: [221] A=ox_pop_cmo(P);
                    471: x*dx+1
                    472: [223] type(A);
                    473: 7   (string)
                    474: @end example
                    475:
                    476: @example
1.8       takayama  477: [271] sm1.push_int0(0,[x*(x-1),[x]]);
1.1       takayama  478: 0
                    479: [272] ox_execute_string(0," deRham ");
                    480: 0
                    481: [273] ox_pop_cmo(0);
                    482: [1,2]
                    483: @end example
                    484: */
1.14    ! ohara     485: /*&en
1.1       takayama  486: @table @t
                    487: @item Reference
                    488:     @code{ox_push_cmo}
                    489: @end table
                    490: */
1.14    ! ohara     491: /*&ja
1.1       takayama  492: @table @t
                    493: @item Reference
                    494:     @code{ox_push_cmo}
                    495: @end table
                    496: */
                    497:
                    498:
                    499:
1.14    ! ohara     500: /*&en
1.8       takayama  501: @c sort-sm1.gb
                    502: @node sm1.gb,,, SM1 Functions
                    503: @subsection @code{sm1.gb}
                    504: @findex sm1.gb
                    505: @findex sm1.gb_d
1.1       takayama  506: @table @t
1.8       takayama  507: @item sm1.gb([@var{f},@var{v},@var{w}]|proc=@var{p},sorted=@var{q},dehomogenize=@var{r})
1.1       takayama  508: ::  computes the Grobner basis of @var{f} in the ring of differential
                    509: operators with the variable @var{v}.
1.8       takayama  510: @item sm1.gb_d([@var{f},@var{v},@var{w}]|proc=@var{p})
1.1       takayama  511: ::  computes the Grobner basis of @var{f} in the ring of differential
                    512: operators with the variable @var{v}.
                    513: The result will be returned as a list of distributed polynomials.
                    514: @end table
                    515:
                    516: @table @var
                    517: @item return
                    518: List
1.3       takayama  519: @item p, q, r
1.1       takayama  520: Number
                    521: @item f, v, w
                    522: List
                    523: @end table
                    524:
                    525: @itemize @bullet
                    526: @item
                    527:    It returns the Grobner basis of the set of polynomials @var{f}
                    528:    in the ring of deferential operators with the variables @var{v}.
                    529: @item
                    530:    The weight vectors are given by @var{w}, which can be omitted.
                    531:     If @var{w} is not given,
                    532:     the graded reverse lexicographic order will be used to compute Grobner basis.
                    533: @item
1.8       takayama  534:    The return value of @code{sm1.gb}
1.1       takayama  535:     is the list of the Grobner basis of @var{f} and the initial
                    536:     terms (when @var{w} is not given) or initial ideal (when @var{w} is given).
                    537: @item
1.8       takayama  538:    @code{sm1.gb_d} returns the results by a list of distributed polynomials.
1.1       takayama  539:     Monomials in each distributed polynomial are ordered in the given order.
                    540:     The return value consists of
                    541:     [variable names, order matrix, grobner basis in districuted polynomials,
                    542:      initial monomials or initial polynomials].
                    543: @item
                    544:    When a non-term order is given, the Grobner basis is computed in
                    545:    the homogenized Weyl algebra  (See Section 1.2 of the book of SST).
                    546:    The homogenization variable h is automatically added.
1.2       takayama  547: @item
1.8       takayama  548:    When the optional variable @var{q} is set, @code{sm1.gb} returns,
1.2       takayama  549:    as the third return value, a list of
                    550:    the Grobner basis and the initial ideal
                    551:    with sums of monomials sorted by the given order.
                    552:    Each polynomial is expressed as a string temporally for now.
1.3       takayama  553:    When the optional variable @var{r} is set to one,
                    554:    the polynomials are dehomogenized (,i.e., h is set to 1).
1.1       takayama  555: @end itemize
                    556: */
1.14    ! ohara     557: /*&ja
1.8       takayama  558: @c sort-sm1.gb
                    559: @node sm1.gb,,, SM1 Functions
                    560: @subsection @code{sm1.gb}
                    561: @findex sm1.gb
                    562: @findex sm1.gb_d
1.1       takayama  563: @table @t
1.8       takayama  564: @item sm1.gb([@var{f},@var{v},@var{w}]|proc=@var{p},sorted=@var{q},dehomogenize=@var{r})
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.
1.8       takayama  566: @item sm1.gb_d([@var{f},@var{v},@var{w}]|proc=@var{p})
1.1       takayama  567: ::  @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.
                    568: @end table
                    569:
                    570: @table @var
                    571: @item return
                    572: $B%j%9%H(B
1.3       takayama  573: @item p, q, r
1.1       takayama  574: $B?t(B
                    575: @item f, v, w
                    576: $B%j%9%H(B
                    577: @end table
                    578:
                    579: @itemize @bullet
                    580: @item
                    581:    @var{v} $B>e$NHyJ,:nMQAG4D$K$*$$$F(B @var{f} $B$N%0%l%V%J4pDl$r7W;;$9$k(B.
                    582: @item
                    583:    Weight $B%Y%/%H%k(B @var{w} $B$O>JN,$7$F$h$$(B.
                    584:    $B>JN,$7$?>l9g(B, graded reverse lexicographic order $B$r$D$+$C$F(B
                    585:    $B%V%l%V%J4pDl$r7W;;$9$k(B.
                    586: @item
1.8       takayama  587:    @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  588:   ( @var{w} $B$,$J$$$H$-(B ) $B$^$?$O(B $B%$%K%7%!%kB?9`<0(B ( @var{w} $B$,M?$($i$?$H$-(B)
                    589:   $B$N%j%9%H$G$"$k(B.
                    590: @item
1.8       takayama  591:    @code{sm1.gb_d} $B$O7k2L$rJ,;6B?9`<0$N%j%9%H$GLa$9(B.
1.1       takayama  592:     $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.
                    593:    $BLa$jCM$O(B
                    594:     [$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]
                    595:    $B$G$"$k(B.
                    596: @item
                    597:    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).
                    598: $BF1<!2=JQ?t(B @code{h} $B$,7k2L$K2C$o$k(B.
1.2       takayama  599: @item $B%*%W%7%g%J%kJQ?t(B @var{q} $B$,%;%C%H$5$l$F$$$k$H$-$O(B,
                    600:     3 $BHVL\$NLa$jCM$H$7$F(B, $B%0%l%V%J4pDl$*$h$S%$%K%7%!%k$N%j%9%H$,(B
                    601:     $BM?$($i$l$?=g=x$G%=!<%H$5$l$?%b%N%_%"%k$NOB$H$7$FLa$5$l$k(B.
                    602:     $B$$$^$N$H$3$m$3$NB?9`<0$O(B, $BJ8;zNs$GI=8=$5$l$k(B.
1.3       takayama  603:     $B%*%W%7%g%J%kJQ?t(B @var{r} $B$,%;%C%H$5$l$F$$$k$H$-$O(B,
                    604:     $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  605: @end itemize
                    606: */
                    607: /*&C-texi
                    608: @example
1.8       takayama  609: [293] sm1.gb([[x*dx+y*dy-1,x*y*dx*dy-2],[x,y]]);
1.1       takayama  610: [[x*dx+y*dy-1,y^2*dy^2+2],[x*dx,y^2*dy^2]]
                    611: @end example
                    612: */
1.14    ! ohara     613: /*&en
1.1       takayama  614: In the example above,
                    615: @tex the set $\{ x \partial_x + y \partial_y -1,
                    616:                  y^2 \partial_y^2+2\}$
                    617: is the Gr\"obner basis of the input with respect to the
                    618: graded reverse lexicographic order such that
                    619: $ 1 \leq \partial_y \leq \partial_x \leq y \leq x \leq \cdots$.
                    620: The set $\{x \partial_x, y^2 \partial_y\}$ is the leading monomials
                    621: (the initial monominals) of the Gr\"obner basis.
                    622: @end tex
                    623: */
1.14    ! ohara     624: /*&ja
1.1       takayama  625: $B>e$NNc$K$*$$$F(B,
                    626: @tex $B=89g(B $\{ x \partial_x + y \partial_y -1,
                    627:                  y^2 \partial_y^2+2\}$
                    628: $B$O(B
                    629: $ 1 \leq \partial_y \leq \partial_x \leq y \leq x \leq \cdots$
                    630: $B$G$"$k$h$&$J(B
                    631: graded reverse lexicographic order $B$K4X$9$k%0%l%V%J4pDl$G$"$k(B.
                    632: $B=89g(B $\{x \partial_x, y^2 \partial_y\}$ $B$O%0%l%V%J4pDl$N3F85$K(B
                    633: $BBP$9$k(B leading monomial (initial monomial) $B$G$"$k(B.
                    634: @end tex
                    635: */
                    636: /*&C-texi
                    637: @example
1.8       takayama  638: [294] sm1.gb([[dx^2+dy^2-4,dx*dy-1],[x,y],[[dx,50,dy,2,x,1]]]);
1.1       takayama  639: [[dx+dy^3-4*dy,-dy^4+4*dy^2-1],[dx,-dy^4]]
                    640: @end example
                    641: */
1.14    ! ohara     642: /*&en
1.1       takayama  643: In the example above, two monomials
                    644: @tex
                    645: $m = x^a y^b \partial_x^c \partial_y^d$ and
                    646: $m' = x^{a'} y^{b'} \partial_x^{c'} \partial_y^{d'}$
                    647: are firstly compared by the weight vector
                    648: {\tt (dx,dy,x,y) = (50,2,1,0)}
                    649: (i.e., $m$ is larger than $m'$ if $50c+2d+a > 50c'+2d'+a'$)
                    650: and when the comparison is tie, then these are
                    651: compared by the reverse lexicographic order
                    652: (i.e., if $50c+2d+a = 50c'+2d'+a'$, then use the reverse lexicogrpahic order).
                    653: @end tex
                    654: */
1.14    ! ohara     655: /*&ja
1.1       takayama  656: $B>e$NNc$K$*$$$FFs$D$N%b%N%_%"%k(B
                    657: @tex
                    658: $m = x^a y^b \partial_x^c \partial_y^d$ $B$*$h$S(B
                    659: $m' = x^{a'} y^{b'} \partial_x^{c'} \partial_y^{d'}$
                    660: $B$O:G=i$K(B weight vector
                    661: {\tt (dx,dy,x,y) = (50,2,1,0)} $B$rMQ$$$FHf3S$5$l$k(B
                    662: ($B$D$^$j(B $m$ $B$O(B $50c+2d+a > 50c'+2d'+a'$ $B$N$H$-(B
                    663:  $m'$ $B$h$jBg$-$$(B )
                    664: $B<!$K$3$NHf3S$G>!Ii$,$D$+$J$$$H$-$O(B reverse lexicographic order $B$GHf3S$5$l$k(B
                    665: ($B$D$^$j(B $50c+2d+a = 50c'+2d'+a'$ $B$N$H$-(B reverse lexicographic order $B$GHf3S(B
                    666: $B$5$l$k(B).
                    667: @end tex
1.2       takayama  668: */
                    669: /*&C-texi
                    670: @example
1.8       takayama  671: [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  672:       map(print,F[2][0])$
                    673:       map(print,F[2][1])$
                    674: @end example
1.1       takayama  675: */
                    676: /*&C-texi
                    677: @example
                    678: [595]
1.8       takayama  679:    sm1.gb([["dx*(x*dx +y*dy-2)-1","dy*(x*dx + y*dy -2)-1"],
1.1       takayama  680:              [x,y],[[dx,1,x,-1],[dy,1]]]);
                    681:
                    682: [[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],
                    683:  [x*dx^2+(y*dy-h^2)*dx,x*dy*dx+y*dy^2-h^2*dy-h^3,h^3*dx]]
                    684:
                    685: [596]
1.8       takayama  686:    sm1.gb_d([["dx (x dx +y dy-2)-1","dy (x dx + y dy -2)-1"],
1.1       takayama  687:              "x,y",[[dx,1,x,-1],[dy,1]]]);
                    688: [[[e0,x,y,H,E,dx,dy,h],
                    689:  [[0,-1,0,0,0,1,0,0],[0,0,0,0,0,0,1,0],[1,0,0,0,0,0,0,0],
                    690:   [0,1,1,1,1,1,1,0],[0,0,0,0,0,0,-1,0],[0,0,0,0,0,-1,0,0],
                    691:   [0,0,0,0,-1,0,0,0],[0,0,0,-1,0,0,0,0],[0,0,-1,0,0,0,0,0],
                    692:   [0,0,0,0,0,0,0,1]]],
                    693: [[(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)*
                    694: <<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
                    695: ,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
                    696: ,1,3>>],
                    697:  [(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)*<
                    698: <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
                    699: ,0,0,0,0,3>>,(1)*<<0,0,0,0,0,1,0,3>>]]]
                    700: @end example
                    701: */
                    702:
1.14    ! ohara     703: /*&en
1.1       takayama  704: @table @t
                    705: @item Reference
1.8       takayama  706:     @code{sm1.reduction}, @code{sm1.rat_to_p}
1.1       takayama  707: @end table
                    708: */
1.14    ! ohara     709: /*&ja
1.1       takayama  710: @table @t
                    711: @item $B;2>H(B
1.8       takayama  712:     @code{sm1.reduction}, @code{sm1.rat_to_p}
1.1       takayama  713: @end table
                    714: */
                    715:
                    716:
                    717:
1.14    ! ohara     718: /*&en
1.8       takayama  719: @c sort-sm1.deRham
                    720: @node sm1.deRham,,, SM1 Functions
                    721: @subsection @code{sm1.deRham}
                    722: @findex sm1.deRham
1.1       takayama  723: @table @t
1.8       takayama  724: @item sm1.deRham([@var{f},@var{v}]|proc=@var{p})
1.1       takayama  725: ::  ask the server to evaluate the dimensions of the de Rham cohomology  groups
                    726: of C^n - (the zero set of @var{f}=0).
                    727: @end table
                    728:
                    729: @table @var
                    730: @item return
                    731: List
                    732: @item p
                    733: Number
                    734: @item f
                    735: String or polynomial
                    736: @item v
                    737: List
                    738: @end table
                    739:
                    740: @itemize @bullet
                    741: @item  It returns the dimensions of the de Rham cohomology groups
                    742:     of X = C^n \ V(@var{f}).
                    743:    In other words,  it returns
                    744:       [dim H^0(X,C), dim H^1(X,C), dim H^2(X,C), ..., dim H^n(X,C)].
                    745: @item   @var{v} is a list of variables. n = @code{length(@var{v})}.
                    746: @item
1.8       takayama  747:    @code{sm1.deRham} requires huge computer resources.
                    748:     For example, @code{sm1.deRham(0,[x*y*z*(x+y+z-1)*(x-y),[x,y,z]])}
1.1       takayama  749:     is already very hard.
                    750: @item
                    751:  To efficiently analyze the roots of b-function, @code{ox_asir} should be used
                    752:   from @code{ox_sm1_forAsir}.
                    753:     It is recommended to load the communication module for @code{ox_asir}
                    754:     by the command @*
                    755:    @code{sm1(0,"[(parse) (oxasir.sm1) pushfile] extension");}
                    756:  This command is automatically executed when @code{ox_sm1_forAsir} is started.
1.8       takayama  757: @item If you make an interruption to the function @code{sm1.deRham}
                    758: by @code{ox_reset(sm1.get_Sm1_proc());}, the server might get out of the standard
1.1       takayama  759: mode. So, it is strongly recommended to execute the command
1.8       takayama  760: @code{ox_shutdown(sm1.get_Sm1_proc());} to interrupt and restart the server.
1.1       takayama  761: @end itemize
                    762: */
1.14    ! ohara     763: /*&ja
1.8       takayama  764: @c sort-sm1.deRham
                    765: @node sm1.deRham,,, SM1 Functions
                    766: @subsection @code{sm1.deRham}
                    767: @findex sm1.deRham
1.1       takayama  768: @table @t
1.8       takayama  769: @item sm1.deRham([@var{f},@var{v}]|proc=@var{p})
1.1       takayama  770: ::  $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.
                    771: @end table
                    772:
                    773: @table @var
                    774: @item return
                    775: $B%j%9%H(B
                    776: @item p
                    777: $B?t(B
                    778: @item f
                    779: $BJ8;zNs(B $B$^$?$O(B $BB?9`<0(B
                    780: @item v
                    781: $B%j%9%H(B
                    782: @end table
                    783:
                    784: @itemize @bullet
                    785: @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.
                    786:    $B$9$J$o$A(B,
                    787:    [dim H^0(X,C), dim H^1(X,C), dim H^2(X,C), ..., dim H^n(X,C)]
                    788:    $B$rLa$9(B.
                    789: @item   @var{v} $B$OJQ?t$N%j%9%H(B. n = @code{length(@var{v})} $B$G$"$k(B.
                    790: @item
1.8       takayama  791:    @code{sm1.deRham} $B$O7W;;5!$N;q8;$rBgNL$K;HMQ$9$k(B.
                    792:     $B$?$H$($P(B @code{sm1.deRham(0,[x*y*z*(x+y+z-1)*(x-y),[x,y,z]])}
1.1       takayama  793:    $B$N7W;;$9$i$9$G$KHs>o$KBgJQ$G$"$k(B.
                    794: @item
                    795:   b-$B4X?t$N:,$r8zN($h$/2r@O$9$k$K$O(B, @code{ox_asir} $B$,(B @code{ox_sm1_forAsir}
                    796:   $B$h$j;HMQ$5$l$k$Y$-$G$"$k(B.  $B%3%^%s%I(B @*
                    797:    @code{sm1(0,"[(parse) (oxasir.sm1) pushfile] extension");}
                    798:    $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.
                    799:    $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.
                    800: @item
1.8       takayama  801:   @code{sm1.deRham} $B$r(B @code{ox_reset(sm1.get_Sm1_proc());} $B$GCfCG$9$k$H(B,
1.1       takayama  802:   $B0J8e(B sm1 $B%5!<%P$,HsI8=`%b!<%I$KF~$jM=4|$7$J$$F0:n$r$9$k>l9g(B
1.8       takayama  803:   $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  804:   $B$r0l;~(B shutdown $B$7$F%j%9%?!<%H$7$?J}$,0BA4$G$"$k(B.
                    805: @end itemize
                    806: */
                    807: /*&C-texi
                    808: @example
1.8       takayama  809: [332] sm1.deRham([x^3-y^2,[x,y]]);
1.1       takayama  810: [1,1,0]
1.8       takayama  811: [333] sm1.deRham([x*(x-1),[x]]);
1.1       takayama  812: [1,2]
                    813: @end example
                    814: */
1.14    ! ohara     815: /*&en
1.1       takayama  816: @table @t
                    817: @item Reference
1.8       takayama  818:     @code{sm1.start}, @code{deRham} (sm1 command)
1.5       takayama  819: @item Algorithm:
1.1       takayama  820:     Oaku, Takayama, An algorithm for de Rham cohomology groups of the
                    821:     complement of an affine variety via D-module computation,
                    822:     Journal of pure and applied algebra 139 (1999), 201--233.
                    823: @end table
                    824: */
1.14    ! ohara     825: /*&ja
1.1       takayama  826: @table @t
                    827: @item $B;2>H(B
1.8       takayama  828:     @code{sm1.start}, @code{deRham} (sm1 command)
1.5       takayama  829: @item Algorithm:
1.1       takayama  830:     Oaku, Takayama, An algorithm for de Rham cohomology groups of the
                    831:     complement of an affine variety via D-module computation,
                    832:     Journal of pure and applied algebra 139 (1999), 201--233.
                    833: @end table
                    834: */
                    835:
                    836:
                    837:
                    838:
1.14    ! ohara     839: /*&en
1.8       takayama  840: @c sort-sm1.hilbert
                    841: @node sm1.hilbert,,, SM1 Functions
                    842: @subsection @code{sm1.hilbert}
                    843: @findex sm1.hilbert
1.1       takayama  844: @findex hilbert_polynomial
                    845: @table @t
1.8       takayama  846: @item sm1.hilbert([@var{f},@var{v}]|proc=@var{p})
1.1       takayama  847: ::  ask the server to compute the Hilbert polynomial for the set of polynomials @var{f}.
                    848: @item hilbert_polynomial(@var{f},@var{v})
                    849: ::  ask the server to compute the Hilbert polynomial for the set of polynomials @var{f}.
                    850: @end table
                    851:
                    852: @table @var
                    853: @item return
                    854: Polynomial
                    855: @item p
                    856: Number
                    857: @item f, v
                    858: List
                    859: @end table
                    860:
                    861: @itemize @bullet
                    862: @item  It returns the Hilbert polynomial h(k) of the set of polynomials
                    863:     @var{f}
                    864:     with respect to the set of variables @var{v}.
                    865: @item
                    866:     h(k) = dim_Q F_k/I \cap F_k  where F_k the set of polynomials of which
                    867:     degree is less than or equal to k and I is the ideal generated by the
                    868:     set of polynomials @var{f}.
                    869: @item
1.8       takayama  870:    Note for sm1.hilbert:
1.1       takayama  871:    For an efficient computation, it is preferable that
                    872:    the set of polynomials @var{f} is a set of monomials.
                    873:    In fact, this function firstly compute a Grobner basis of @var{f}, and then
                    874:    compute the Hilbert polynomial of the initial monomials of the basis.
                    875:    If the input @var{f} is already a Grobner
                    876:    basis, a Grobner basis is recomputed in this function,
                    877:    which is a waste of time and Grobner basis computation in the ring of
                    878:    polynomials in @code{sm1} is  slower than in @code{asir}.
                    879: @end itemize
                    880: */
1.14    ! ohara     881: /*&ja
1.8       takayama  882: @c sort-sm1.hilbert
                    883: @node sm1.hilbert,,, SM1 Functions
                    884: @subsection @code{sm1.hilbert}
                    885: @findex sm1.hilbert
1.1       takayama  886: @findex hilbert_polynomial
                    887: @table @t
1.8       takayama  888: @item sm1.hilbert([@var{f},@var{v}]|proc=@var{p})
1.1       takayama  889: :: $BB?9`<0$N=89g(B @var{f} $B$N%R%k%Y%k%HB?9`<0$r7W;;$9$k(B.
                    890: @item hilbert_polynomial(@var{f},@var{v})
                    891: :: $BB?9`<0$N=89g(B @var{f} $B$N%R%k%Y%k%HB?9`<0$r7W;;$9$k(B.
                    892: @end table
                    893:
                    894: @table @var
                    895: @item return
                    896: $BB?9`<0(B
                    897: @item p
                    898: $B?t(B
                    899: @item f, v
                    900: $B%j%9%H(B
                    901: @end table
                    902:
                    903: @itemize @bullet
                    904: @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)
                    905:    $B$r7W;;$9$k(B.
                    906: @item
                    907:     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
                    908:     $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.
                    909: @item
1.8       takayama  910:    sm1.hilbert $B$K$+$s$9$k%N!<%H(B:
1.1       takayama  911:    $B8zN($h$/7W;;$9$k$K$O(B @var{f} $B$O%b%N%_%"%k$N=89g$K$7$?J}$,$$$$(B.
                    912:    $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
                    913:    monomial $BC#$N%R%k%Y%k%HB?9`<0$r7W;;$9$k(B.
                    914:   $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
                    915:    $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
                    916:   $BB?9`<0%0%l%V%J4pDl7W;;$O(B @code{asir} $B$h$jCY$$(B.
                    917: @end itemize
                    918: */
                    919:
                    920: /*&C-texi
                    921: @example
                    922:
                    923: [346] load("katsura")$
                    924: [351] A=hilbert_polynomial(katsura(5),[u0,u1,u2,u3,u4,u5]);
                    925: 32
                    926:
                    927: @end example
                    928:
                    929: @example
                    930: [279] load("katsura")$
                    931: [280] A=gr(katsura(5),[u0,u1,u2,u3,u4,u5],0)$
                    932: [281] dp_ord();
                    933: 0
                    934: [282] B=map(dp_ht,map(dp_ptod,A,[u0,u1,u2,u3,u4,u5]));
                    935: [(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>>,
                    936:  (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>>,
                    937:  (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>>,
                    938:   (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>>,
                    939:   (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>>,
                    940:  (1)*<<0,1,0,0,0,4>>,(1)*<<0,0,0,0,0,6>>]
                    941: [283] C=map(dp_dtop,B,[u0,u1,u2,u3,u4,u5]);
                    942: [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,
                    943:  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,
                    944:  u5^4*u2,u5^4*u1,u5^6]
1.8       takayama  945: [284] sm1.hilbert([C,[u0,u1,u2,u3,u4,u5]]);
1.1       takayama  946: 32
                    947: @end example
                    948: */
                    949:
1.14    ! ohara     950: /*&en
1.1       takayama  951: @table @t
                    952: @item Reference
1.8       takayama  953:     @code{sm1.start}, @code{sm1.gb}, @code{longname}
1.1       takayama  954: @end table
                    955: */
1.14    ! ohara     956: /*&ja
1.1       takayama  957: @table @t
                    958: @item $B;2>H(B
1.8       takayama  959:     @code{sm1.start}, @code{sm1.gb}, @code{longname}
1.1       takayama  960: @end table
                    961: */
                    962:
                    963:
1.14    ! ohara     964: /*&en
1.8       takayama  965: @c sort-sm1.genericAnn
                    966: @node sm1.genericAnn,,, SM1 Functions
                    967: @subsection @code{sm1.genericAnn}
                    968: @findex sm1.genericAnn
1.1       takayama  969: @table @t
1.8       takayama  970: @item sm1.genericAnn([@var{f},@var{v}]|proc=@var{p})
1.1       takayama  971: ::  It computes  the annihilating ideal for @var{f}^s.
                    972:     @var{v} is the list of variables.  Here, s is @var{v}[0] and
                    973:     @var{f} is a polynomial in the variables @code{rest}(@var{v}).
                    974: @end table
                    975:
                    976: @table @var
                    977: @item return
                    978: List
                    979: @item p
                    980: Number
                    981: @item f
                    982: Polynomial
                    983: @item v
                    984: List
                    985: @end table
                    986:
                    987: @itemize @bullet
                    988: @item  This function computes  the annihilating ideal for @var{f}^s.
                    989:     @var{v} is the list of variables.  Here, s is @var{v}[0] and
                    990:     @var{f} is a polynomial in the variables @code{rest}(@var{v}).
                    991: @end itemize
                    992: */
1.14    ! ohara     993: /*&ja
1.8       takayama  994: @c sort-sm1.genericAnn
                    995: @node sm1.genericAnn,,, SM1 Functions
                    996: @subsection @code{sm1.genericAnn}
                    997: @findex sm1.genericAnn
1.1       takayama  998: @table @t
1.8       takayama  999: @item sm1.genericAnn([@var{f},@var{v}]|proc=@var{p})
1.1       takayama 1000: ::  @var{f}^s $B$N$_$?$9HyJ,J}Dx<0A4BN$r$b$H$a$k(B.
                   1001:     @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,
                   1002:     @var{f} $B$OJQ?t(B @code{rest}(@var{v}) $B>e$NB?9`<0$G$"$k(B.
                   1003: @end table
                   1004:
                   1005: @table @var
                   1006: @item return
                   1007: $B%j%9%H(B
                   1008: @item p
                   1009: $B?t(B
                   1010: @item f
                   1011: $BB?9`<0(B
                   1012: @item v
                   1013: $B%j%9%H(B
                   1014: @end table
                   1015:
                   1016: @itemize @bullet
                   1017: @item $B$3$NH!?t$O(B,
                   1018:   @var{f}^s $B$N$_$?$9HyJ,J}Dx<0A4BN$r$b$H$a$k(B.
                   1019:     @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,
                   1020:     @var{f} $B$OJQ?t(B @code{rest}(@var{v}) $B>e$NB?9`<0$G$"$k(B.
                   1021: @end itemize
                   1022: */
                   1023: /*&C-texi
                   1024: @example
1.8       takayama 1025: [595] sm1.genericAnn([x^3+y^3+z^3,[s,x,y,z]]);
1.1       takayama 1026: [-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]
                   1027: @end example
                   1028: */
1.14    ! ohara    1029: /*&en
1.1       takayama 1030: @table @t
                   1031: @item Reference
1.8       takayama 1032:     @code{sm1.start}
1.1       takayama 1033: @end table
                   1034: */
1.14    ! ohara    1035: /*&ja
1.1       takayama 1036: @table @t
                   1037: @item $B;2>H(B
1.8       takayama 1038:     @code{sm1.start}
1.1       takayama 1039: @end table
                   1040: */
                   1041:
                   1042:
                   1043:
1.14    ! ohara    1044: /*&en
1.8       takayama 1045: @c sort-sm1.wTensor0
                   1046: @node sm1.wTensor0,,, SM1 Functions
                   1047: @subsection @code{sm1.wTensor0}
                   1048: @findex sm1.wTensor0
1.1       takayama 1049: @table @t
1.8       takayama 1050: @item sm1.wTensor0([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})
1.1       takayama 1051: ::   It computes the D-module theoretic 0-th tensor product
                   1052:     of @var{f} and @var{g}.
                   1053: @end table
                   1054:
                   1055: @table @var
                   1056: @item return
                   1057: List
                   1058: @item p
                   1059: Number
                   1060: @item f, g, v, w
                   1061: List
                   1062: @end table
                   1063:
                   1064: @itemize @bullet
                   1065: @item
                   1066:    It returns the D-module theoretic 0-th tensor product
                   1067:    of @var{f} and @var{g}.
                   1068: @item
                   1069:   @var{v} is a list of variables.
                   1070:   @var{w} is a list of weights.  The integer @var{w}[i] is
                   1071:   the weight of the variable @var{v}[i].
                   1072: @item
1.8       takayama 1073:    @code{sm1.wTensor0} calls @code{wRestriction0} of @code{ox_sm1},
1.1       takayama 1074:    which requires a generic weight
                   1075:     vector @var{w} to compute the restriction.
                   1076:     If @var{w} is not generic, the computation fails.
                   1077: @item Let F and G be solutions of @var{f} and @var{g} respectively.
                   1078: Intuitively speaking, the 0-th tensor product is a system of
                   1079: differential equations which annihilates the function FG.
                   1080: @item The answer is a submodule of a free module D^r in general even if
                   1081: the inputs @var{f} and @var{g} are left ideals of D.
                   1082: @end itemize
                   1083: */
                   1084:
1.14    ! ohara    1085: /*&ja
1.8       takayama 1086: @c sort-sm1.wTensor0
                   1087: @node sm1.wTensor0,,, SM1 Functions
                   1088: @subsection @code{sm1.wTensor0}
                   1089: @findex sm1.wTensor0
1.1       takayama 1090: @table @t
1.8       takayama 1091: @item sm1.wTensor0([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})
1.1       takayama 1092: ::   @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
                   1093: $B7W;;$9$k(B.
                   1094: @end table
                   1095:
                   1096: @table @var
                   1097: @item return
                   1098: $B%j%9%H(B
                   1099: @item p
                   1100: $B?t(B
                   1101: @item f, g, v, w
                   1102: $B%j%9%H(B
                   1103: @end table
                   1104:
                   1105: @itemize @bullet
                   1106: @item
                   1107:    @var{f} $B$H(B @var{g} $B$N(B
                   1108:    D-$B2C72$H$7$F$N(B 0 $B<!%F%s%=%k@Q$r7W;;$9$k(B.
                   1109: @item
                   1110:   @var{v} $B$OJQ?t$N%j%9%H$G$"$k(B.
                   1111:   @var{w} $B$O(B weight $B$N%j%9%H$G$"$k(B.
                   1112:   $B@0?t(B @var{w}[i] $B$OJQ?t(B @var{v}[i] $B$N(B weight $B$G$"$k(B.
                   1113: @item
1.8       takayama 1114:    @code{sm1.wTensor0} $B$O(B @code{ox_sm1} $B$N(B @code{wRestriction0}
1.1       takayama 1115:    $B$r$h$s$G$$$k(B.
                   1116:   @code{wRestriction0} $B$O(B, generic $B$J(B weight $B%Y%/%H%k(B @var{w}
                   1117:   $B$r$b$H$K$7$F@)8B$r7W;;$7$F$$$k(B.
                   1118:   Weight $B%Y%/%H%k(B @var{w} $B$,(B generic $B$G$J$$$H7W;;$,%(%i!<$GDd;_$9$k(B.
                   1119: @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.
                   1120: $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.
                   1121: @item $BF~NO(B @var{f}, @var{g} $B$,(B D $B$N:8%$%G%"%k$G$"$C$F$b(B,
                   1122: $B0lHL$K(B, $B=PNO$O<+M32C72(B D^r $B$NItJ,2C72$G$"$k(B.
                   1123: @end itemize
                   1124: */
                   1125: /*&C-texi
                   1126: @example
1.8       takayama 1127: [258]  sm1.wTensor0([[x*dx -1, y*dy -4],[dx+dy,dx-dy^2],[x,y],[1,2]]);
1.1       takayama 1128: [[-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],
                   1129:  [-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],
                   1130:  [y^2*dy^2+(-y^2-8*y)*dy+4*y+20]]
                   1131: @end example
                   1132: */
                   1133:
                   1134:
                   1135:
1.14    ! ohara    1136: /*&en
1.8       takayama 1137: @c sort-sm1.reduction
                   1138: @node sm1.reduction,,, SM1 Functions
                   1139: @subsection @code{sm1.reduction}
                   1140: @findex sm1.reduction
1.1       takayama 1141: @table @t
1.8       takayama 1142: @item sm1.reduction([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})
1.1       takayama 1143: ::
                   1144: @end table
                   1145:
                   1146: @table @var
                   1147: @item return
                   1148: List
                   1149: @item f
                   1150: Polynomial
                   1151: @item g, v, w
                   1152: List
                   1153: @item p
                   1154: Number  (the process number of ox_sm1)
                   1155: @end table
                   1156:
                   1157: @itemize @bullet
                   1158: @item  It reduces @var{f} by the set of polynomial @var{g}
                   1159: in the homogenized Weyl algebra; it applies the
                   1160: division algorithm to @var{f}. The set of variables is @var{v} and
                   1161: @var{w} is weight vectors to determine the order, which can be ommited.
1.8       takayama 1162: @code{sm1.reduction_noH} is for the Weyl algebra.
1.1       takayama 1163: @item The return value is of the form
                   1164: [r,c0,[c1,...,cm],[g1,...gm]] where @var{g}=[g1, ..., gm] and
1.7       takayama 1165: c0 f + c1 g1 + ... + cm gm = r.
1.1       takayama 1166: r/c0 is the normal form.
                   1167: @item The function reduction reduces reducible terms that appear
                   1168: in lower order terms.
                   1169: @item  The functions
1.8       takayama 1170: sm1.reduction_d(P,F,G) and sm1.reduction_noH_d(P,F,G)
1.1       takayama 1171: are for distributed polynomials.
                   1172: @end itemize
                   1173: */
1.14    ! ohara    1174: /*&ja
1.8       takayama 1175: @node sm1.reduction,,, SM1 Functions
                   1176: @subsection @code{sm1.reduction}
                   1177: @findex sm1.reduction
1.1       takayama 1178: @table @t
1.8       takayama 1179: @item sm1.reduction([@var{f},@var{g},@var{v},@var{w}]|proc=@var{p})
1.1       takayama 1180: ::
                   1181: @end table
                   1182:
                   1183: @table @var
                   1184: @item return
                   1185: $B%j%9%H(B
                   1186: @item f
                   1187: $BB?9`<0(B
                   1188: @item g, v, w
                   1189: $B%j%9%H(B
                   1190: @item p
                   1191: $B?t(B  (ox_sm1 $B$N%W%m%;%9HV9f(B)
                   1192: @end table
                   1193:
                   1194: @itemize @bullet
                   1195: @item  $B$3$NH!?t$O(B @var{f} $B$r(B homogenized $B%o%$%kBe?t$K$*$$$F(B,
                   1196: $BB?9`<0=89g(B @var{g} $B$G4JC12=(B (reduce) $B$9$k(B; $B$D$^$j(B,
                   1197: $B$3$NH!?t$O(B, @var{f} $B$K3d;;%"%k%4%j%:%`$rE,MQ$9$k(B.
                   1198: $BJQ?t=89g$O(B @var{v} $B$G;XDj$9$k(B.
                   1199: @var{w} $B$O=g=x$r;XDj$9$k$?$a$N(B $B%&%(%$%H%Y%/%H%k$G$"$j(B,
                   1200: $B>JN,$7$F$b$h$$(B.
1.8       takayama 1201: @code{sm1.reduction_noH} $B$O(B, Weyl algebra $BMQ(B.
1.1       takayama 1202: @item $BLa$jCM$O<!$N7A$r$7$F$$$k(B:
1.7       takayama 1203: [r,c0,[c1,...,cm],g] $B$3$3$G(B @var{g}=[g1, ..., gm] $B$G$"$j(B,
                   1204: c0 f + c1 g1 + ... + cm gm = r
1.1       takayama 1205: $B$,$J$j$?$D(B.
                   1206: r/c0 $B$,(B normal form $B$G$"$k(B.
                   1207: @item $B$3$NH!?t$O(B, $BDc<!9`$K$"$i$o$l$k(B reducible $B$J9`$b4JC12=$9$k(B.
                   1208: @item  $BH!?t(B
1.8       takayama 1209: sm1.reduction_d(P,F,G) $B$*$h$S(B sm1.reduction_noH_d(P,F,G)
1.1       takayama 1210: $B$O(B, $BJ,;6B?9`<0MQ$G$"$k(B.
                   1211: @end itemize
                   1212: */
                   1213: /*&C-texi
                   1214: @example
1.8       takayama 1215: [259] sm1.reduction([x^2+y^2-4,[y^4-4*y^2+1,x+y^3-4*y],[x,y]]);
1.7       takayama 1216: [x^2+y^2-4,1,[0,0],[y^4-4*y^2+1,x+y^3-4*y]]
1.8       takayama 1217: [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 1218: [0,1,[-y^2+4,-x+y^3-4*y],[y^4-4*y^2+1,x+y^3-4*y]]
1.1       takayama 1219: @end example
                   1220: */
1.14    ! ohara    1221: /*&en
1.1       takayama 1222: @table @t
                   1223: @item Reference
1.10      takayama 1224:     @code{sm1.start}, @code{d_true_nf}
1.1       takayama 1225: @end table
                   1226: */
1.14    ! ohara    1227: /*&ja
1.1       takayama 1228: @table @t
                   1229: @item $B;2>H(B
1.10      takayama 1230:     @code{sm1.start}, @code{d_true_nf}
1.1       takayama 1231: @end table
                   1232: */
                   1233:
                   1234:
1.14    ! ohara    1235: /*&en
1.8       takayama 1236: @node sm1.xml_tree_to_prefix_string,,, SM1 Functions
                   1237: @subsection @code{sm1.xml_tree_to_prefix_string}
                   1238: @findex sm1.xml_tree_to_prefix_string
1.1       takayama 1239: @table @t
1.8       takayama 1240: @item sm1.xml_tree_to_prefix_string(@var{s}|proc=@var{p})
1.1       takayama 1241: :: Translate OpenMath Tree Expression @var{s} in XML to a prefix notation.
                   1242: @end table
                   1243:
                   1244: @table @var
                   1245: @item return
                   1246: String
                   1247: @item p
                   1248: Number
                   1249: @item s
                   1250: String
                   1251: @end table
                   1252:
                   1253: @itemize @bullet
                   1254: @item  It translate OpenMath Tree Expression @var{s} in XML to a prefix notation.
                   1255: @item This function should be moved to om_* in a future.
                   1256: @item @code{om_xml_to_cmo(OpenMath Tree Expression)} returns CMO_TREE.
                   1257: asir has not yet understood this CMO.
                   1258: @item @code{java} execution environment is required.
                   1259: (For example, @code{/usr/local/jdk1.1.8/bin} should be in the
                   1260: command search path.)
                   1261: @end itemize
                   1262: */
1.14    ! ohara    1263: /*&ja
1.8       takayama 1264: @node sm1.xml_tree_to_prefix_string,,, SM1 Functions
                   1265: @subsection @code{sm1.xml_tree_to_prefix_string}
                   1266: @findex sm1.xml_tree_to_prefix_string
1.1       takayama 1267: @table @t
1.8       takayama 1268: @item sm1.xml_tree_to_prefix_string(@var{s}|proc=@var{p})
1.1       takayama 1269: :: XML $B$G=q$+$l$?(B OpenMath $B$NLZI=8=(B @var{s} $B$rA0CV5-K!$K$J$*$9(B.
                   1270: @end table
                   1271:
                   1272: @table @var
                   1273: @item return
                   1274: String
                   1275: @item p
                   1276: Number
                   1277: @item s
                   1278: String
                   1279: @end table
                   1280:
                   1281: @itemize @bullet
                   1282: @item XML $B$G=q$+$l$?(B OpenMath $B$NLZI=8=(B @var{s} $B$rA0CV5-K!$K$J$*$9(B.
                   1283: @item $B$3$NH!?t$O(B om_* $B$K>-Mh0\$9$Y$-$G$"$k(B.
                   1284: @item @code{om_xml_to_cmo(OpenMath Tree Expression)} $B$O(B CMO_TREE
                   1285: $B$rLa$9(B. @code{asir} $B$O$3$N(B CMO $B$r$^$@%5%]!<%H$7$F$$$J$$(B.
                   1286: @item @code{java} $B$N<B9T4D6-$,I,MW(B.
                   1287: ($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.)
                   1288: @end itemize
                   1289: */
                   1290: /*&C-texi
                   1291: @example
                   1292: [263] load("om");
                   1293: 1
                   1294: [270] F=om_xml(x^4-1);
                   1295: control: wait OX
                   1296: Trying to connect to the server... Done.
                   1297: <OMOBJ><OMA><OMS name="plus" cd="basic"/><OMA>
                   1298: <OMS name="times" cd="basic"/><OMA>
                   1299: <OMS name="power" cd="basic"/><OMV name="x"/><OMI>4</OMI></OMA>
                   1300: <OMI>1</OMI></OMA><OMA><OMS name="times" cd="basic"/><OMA>
                   1301: <OMS name="power" cd="basic"/><OMV name="x"/><OMI>0</OMI></OMA>
                   1302: <OMI>-1</OMI></OMA></OMA></OMOBJ>
1.8       takayama 1303: [271] sm1.xml_tree_to_prefix_string(F);
1.1       takayama 1304: basic_plus(basic_times(basic_power(x,4),1),basic_times(basic_power(x,0),-1))
                   1305: @end example
                   1306: */
1.14    ! ohara    1307: /*&en
1.1       takayama 1308: @table @t
                   1309: @item Reference
                   1310:     @code{om_*}, @code{OpenXM/src/OpenMath}, @code{eval_str}
                   1311: @end table
                   1312: */
1.14    ! ohara    1313: /*&ja
1.1       takayama 1314: @table @t
                   1315: @item $B;2>H(B
                   1316:     @code{om_*}, @code{OpenXM/src/OpenMath},  @code{eval_str}
                   1317: @end table
                   1318: */
                   1319:
                   1320:
                   1321:
                   1322:
1.14    ! ohara    1323: /*&en
1.8       takayama 1324: @c sort-sm1.syz
                   1325: @node sm1.syz,,, SM1 Functions
                   1326: @subsection @code{sm1.syz}
                   1327: @findex sm1.syz
                   1328: @findex sm1.syz_d
1.1       takayama 1329: @table @t
1.8       takayama 1330: @item sm1.syz([@var{f},@var{v},@var{w}]|proc=@var{p})
1.1       takayama 1331: ::  computes the syzygy of @var{f} in the ring of differential
                   1332: operators with the variable @var{v}.
                   1333: @end table
                   1334:
                   1335: @table @var
                   1336: @item return
                   1337: List
                   1338: @item p
                   1339: Number
                   1340: @item f, v, w
                   1341: List
                   1342: @end table
                   1343:
                   1344: @itemize @bullet
                   1345: @item
                   1346: The return values is of the form
                   1347: [@var{s},[@var{g}, @var{m}, @var{t}]].
                   1348: Here @var{s} is the syzygy of @var{f} in the ring of differential
                   1349: operators with the variable @var{v}.
                   1350: @var{g} is a Groebner basis of @var{f} with the weight vector @var{w},
                   1351: and @var{m} is a matrix that translates the input matrix @var{f} to the Gr\"obner
1.12      takayama 1352: basis @var{g}.
1.1       takayama 1353: @var{t} is the syzygy of the Gr\"obner basis @var{g}.
                   1354: In summary, @var{g} = @var{m} @var{f} and
                   1355: @var{s} @var{f} = 0 hold as matrices.
                   1356: @item
                   1357:    The weight vectors are given by @var{w}, which can be omitted.
                   1358:     If @var{w} is not given,
                   1359:     the graded reverse lexicographic order will be used to compute Grobner basis.
                   1360: @item
                   1361:    When a non-term order is given, the Grobner basis is computed in
                   1362:    the homogenized Weyl algebra  (See Section 1.2 of the book of SST).
                   1363:    The homogenization variable h is automatically added.
                   1364: @end itemize
                   1365: */
1.14    ! ohara    1366: /*&ja
1.8       takayama 1367: @c sort-sm1.syz
                   1368: @node sm1.syz,,, 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:
1.14    ! ohara    1430: /*&en
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:
1.14    ! ohara    1456: /*&ja
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:
1.14    ! ohara    1500: /*&en
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:
1.14    ! ohara    1531: /*&ja
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:
1.14    ! ohara    1578: /*&en
1.1       takayama 1579: @table @t
                   1580: @item Reference
                   1581:     @code{distraction2(sm1)},
                   1582: @end table
                   1583: */
                   1584:
1.14    ! ohara    1585: /*&ja
1.1       takayama 1586: @table @t
                   1587: @item $B;2>H(B
                   1588:     @code{distraction2(sm1)},
                   1589: @end table
                   1590: */
                   1591:
                   1592:
                   1593:
1.14    ! ohara    1594: /*&en
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:
1.14    ! ohara    1619: /*&ja
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:
1.14    ! ohara    1658: /*&en
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:
1.14    ! ohara    1685: /*&ja
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:
1.14    ! ohara    1742: /*&en
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:
1.14    ! ohara    1769: /*&ja
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:
1.14    ! ohara    1816: /*&en
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:
1.14    ! ohara    1845: /*&ja
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:
1.14    ! ohara    1896: /*&en
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:
1.14    ! ohara    1922: /*&ja
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:
1.14    ! ohara    1950: /*&en
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:
1.14    ! ohara    1995: /*&ja
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: */
1.14    ! ohara    2057: /*&en
1.1       takayama 2058: @table @t
                   2059: @item Reference
1.10      takayama 2060:     @code{sm.gb}
1.1       takayama 2061: @end table
                   2062: */
1.14    ! ohara    2063: /*&ja
1.1       takayama 2064: @table @t
                   2065: @item $B;2>H(B
1.10      takayama 2066:     @code{sm.gb}
1.1       takayama 2067: @end table
1.4       takayama 2068: */
                   2069:
                   2070:
1.14    ! ohara    2071: /*&en
1.4       takayama 2072: @include sm1-auto-en.texi
                   2073: */
                   2074:
1.14    ! ohara    2075: /*&ja
1.4       takayama 2076: @include sm1-auto-ja.texi
1.1       takayama 2077: */
                   2078:
                   2079:
                   2080: end$
                   2081:

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