[BACK]Return to groebner.texi CVS log [TXT][DIR] Up to [local] / OpenXM / src / asir-doc / parts

Annotation of OpenXM/src/asir-doc/parts/groebner.texi, Revision 1.23

1.23    ! noro        1: @comment $OpenXM: OpenXM/src/asir-doc/parts/groebner.texi,v 1.22 2019/03/29 04:54:25 noro Exp $
1.2       noro        2: \BJP
1.1       noro        3: @node $B%0%l%V%J4pDl$N7W;;(B,,, Top
                      4: @chapter $B%0%l%V%J4pDl$N7W;;(B
1.2       noro        5: \E
                      6: \BEG
                      7: @node Groebner basis computation,,, Top
                      8: @chapter Groebner basis computation
                      9: \E
1.1       noro       10:
                     11: @menu
1.2       noro       12: \BJP
1.1       noro       13: * $BJ,;6I=8=B?9`<0(B::
                     14: * $B%U%!%$%k$NFI$_9~$_(B::
                     15: * $B4pK\E*$JH!?t(B::
                     16: * $B7W;;$*$h$SI=<($N@)8f(B::
                     17: * $B9`=g=x$N@_Dj(B::
1.13      noro       18: * Weight::
1.1       noro       19: * $BM-M}<0$r78?t$H$9$k%0%l%V%J4pDl7W;;(B::
                     20: * $B4pDlJQ49(B::
1.5       noro       21: * Weyl $BBe?t(B::
1.23    ! noro       22: * $BB?9`<04D>e$N2C72(B::
1.1       noro       23: * $B%0%l%V%J4pDl$K4X$9$kH!?t(B::
1.2       noro       24: \E
                     25: \BEG
                     26: * Distributed polynomial::
                     27: * Reading files::
                     28: * Fundamental functions::
                     29: * Controlling Groebner basis computations::
                     30: * Setting term orderings::
1.13      noro       31: * Weight::
1.2       noro       32: * Groebner basis computation with rational function coefficients::
                     33: * Change of ordering::
1.5       noro       34: * Weyl algebra::
1.23    ! noro       35: * Module over a polynomial ring::
1.2       noro       36: * Functions for Groebner basis computation::
                     37: \E
1.1       noro       38: @end menu
                     39:
1.2       noro       40: \BJP
1.1       noro       41: @node $BJ,;6I=8=B?9`<0(B,,, $B%0%l%V%J4pDl$N7W;;(B
                     42: @section $BJ,;6I=8=B?9`<0(B
1.2       noro       43: \E
                     44: \BEG
                     45: @node Distributed polynomial,,, Groebner basis computation
                     46: @section Distributed polynomial
                     47: \E
1.1       noro       48:
                     49: @noindent
1.2       noro       50: \BJP
1.1       noro       51: $BJ,;6I=8=B?9`<0$H$O(B, $BB?9`<0$NFbIt7A<0$N0l$D$G$"$k(B. $BDL>o$NB?9`<0(B
                     52: (@code{type} $B$,(B 2) $B$O(B, $B:F5"I=8=$H8F$P$l$k7A<0$GI=8=$5$l$F$$$k(B. $B$9$J$o(B
                     53: $B$A(B, $BFCDj$NJQ?t$r<gJQ?t$H$9$k(B 1 $BJQ?tB?9`<0$G(B, $B$=$NB>$NJQ?t$O(B, $B$=$N(B 1 $BJQ(B
                     54: $B?tB?9`<0$N78?t$K(B, $B<gJQ?t$r4^$^$J$$B?9`<0$H$7$F8=$l$k(B. $B$3$N78?t$,(B, $B$^$?(B,
                     55: $B$"$kJQ?t$r<gJQ?t$H$9$kB?9`<0$H$J$C$F$$$k$3$H$+$i:F5"I=8=$H8F$P$l$k(B.
1.2       noro       56: \E
                     57: \BEG
                     58: A distributed polynomial is a polynomial with a special internal
                     59: representation different from the ordinary one.
                     60:
                     61: An ordinary polynomial (having @code{type} 2) is internally represented
                     62: in a format, called recursive representation.
                     63: In fact, it is represented as an uni-variate polynomial with respect to
                     64: a fixed variable, called main variable of that polynomial,
                     65: where the other variables appear in the coefficients which may again
                     66: polynomials in such variables other than the previous main variable.
                     67: A polynomial in the coefficients is again represented as
                     68: an uni-variate polynomial in a certain fixed variable,
                     69: the main variable.  Thus, by this recursive structure of polynomial
                     70: representation, it is called the `recursive representation.'
                     71: \E
1.1       noro       72:
                     73: @iftex
                     74: @tex
1.2       noro       75: \JP $(x+y+z)^2 = 1 \cdot x^2 + (2 \cdot y + (2 \cdot z)) \cdot x + ((2 \cdot z) \cdot y + (1 \cdot z^2 ))$
                     76: \EG $(x+y+z)^2 = 1 \cdot x^2 + (2 \cdot y + (2 \cdot z)) \cdot x + ((2 \cdot z) \cdot y + (1 \cdot z^2 ))$
1.1       noro       77: @end tex
                     78: @end iftex
                     79: @ifinfo
                     80: @example
                     81: (x+y+z)^2 = 1 x^2 + (2 y + (2 z)) x + ((2 z) y + (1 z^2 ))
                     82: @end example
                     83: @end ifinfo
                     84:
                     85: @noindent
1.2       noro       86: \BJP
1.1       noro       87: $B$3$l$KBP$7(B, $BB?9`<0$r(B, $BJQ?t$NQQ@Q$H78?t$N@Q$NOB$H$7$FI=8=$7$?$b$N$rJ,;6(B
                     88: $BI=8=$H8F$V(B.
1.2       noro       89: \E
                     90: \BEG
                     91: On the other hand,
                     92: we call a representation the distributed representation of a polynomial,
                     93: if a polynomial is represented, according to its original meaning,
                     94: as a sum of monomials,
                     95: where a monomial is the product of power product of variables
                     96: and a coefficient.  We call a polynomial, represented in such an
                     97: internal format, a distributed polynomial. (This naming may sounds
                     98: something strange.)
                     99: \E
1.1       noro      100:
                    101: @iftex
                    102: @tex
1.2       noro      103: \JP $(x+y+z)^2 = 1 \cdot x^2 + 2 \cdot xy + 2 \cdot xz + 1 \cdot y^2 + 2 \cdot yz +1 \cdot z^2$
                    104: \EG $(x+y+z)^2 = 1 \cdot x^2 + 2 \cdot xy + 2 \cdot xz + 1 \cdot y^2 + 2 \cdot yz +1 \cdot z^2$
1.1       noro      105: @end tex
                    106: @end iftex
                    107: @ifinfo
                    108: @example
                    109: (x+y+z)^2 = 1 x^2 + 2 xy + 2 xz + 1 y^2 + 2 yz +1 z^2$
                    110: @end example
                    111: @end ifinfo
                    112:
                    113: @noindent
1.2       noro      114: \BJP
1.1       noro      115: $B%0%l%V%J4pDl7W;;$K$*$$$F$O(B, $BC19`<0$KCmL\$7$FA`:n$r9T$&$?$aB?9`<0$,J,;6I=8=(B
                    116: $B$5$l$F$$$kJ}$,$h$j8zN($N$h$$1i;;$,2DG=$K$J$k(B. $B$3$N$?$a(B, $BJ,;6I=8=B?9`<0$,(B,
                    117: $B<1JL;R(B 9 $B$N7?$H$7$F(B @b{Asir} $B$N%H%C%W%l%Y%k$+$iMxMQ2DG=$H$J$C$F$$$k(B.
                    118: $B$3$3$G(B, $B8e$N@bL@$N$?$a$K(B, $B$$$/$D$+$N8@MU$rDj5A$7$F$*$/(B.
1.2       noro      119: \E
                    120: \BEG
                    121: For computation of Groebner basis, efficient operation is expected if
                    122: polynomials are represented in a distributed representation,
                    123: because major operations for Groebner basis are performed with respect
                    124: to monomials.
                    125: From this view point, we provide the object type distributed polynomial
                    126: with its object identification number 9, and objects having such a type
                    127: are available by @b{Asir} language.
                    128:
                    129: Here, we provide several definitions for the later description.
                    130: \E
1.1       noro      131:
                    132: @table @b
1.2       noro      133: \BJP
1.1       noro      134: @item $B9`(B (term)
                    135: $BJQ?t$NQQ@Q(B. $B$9$J$o$A(B, $B78?t(B 1 $B$NC19`<0$N$3$H(B. @b{Asir} $B$K$*$$$F$O(B,
1.2       noro      136: \E
                    137: \BEG
                    138: @item term
                    139: The power product of variables, i.e., a monomial with coefficient 1.
                    140: In an @b{Asir} session, it is displayed in the form like
                    141: \E
1.1       noro      142:
                    143: @example
                    144: <<0,1,2,3,4>>
                    145: @end example
                    146:
1.2       noro      147: \BJP
1.1       noro      148: $B$H$$$&7A$GI=<($5$l(B, $B$^$?(B, $B$3$N7A$GF~NO2DG=$G$"$k(B. $B$3$NNc$O(B, 5 $BJQ?t$N9`(B
                    149: $B$r<($9(B. $B3FJQ?t$r(B @code{a}, @code{b}, @code{c}, @code{d}, @code{e} $B$H$9$k$H(B
                    150: $B$3$N9`$O(B @code{b*c^2*d^3*e^4} $B$rI=$9(B.
1.2       noro      151: \E
                    152: \BEG
                    153: and also can be input in such a form.
                    154: This example shows a term in 5 variables.  If we assume the 5 variables
                    155: as @code{a}, @code{b}, @code{c}, @code{d}, and @code{e},
                    156: the term represents @code{b*c^2*d^3*e^4} in the ordinary expression.
                    157: \E
1.1       noro      158:
1.2       noro      159: \BJP
1.1       noro      160: @item $B9`=g=x(B (term order)
                    161: $BJ,;6I=8=B?9`<0$K$*$1$k9`$O(B, $B<!$N@-<A$rK~$?$9A4=g=x$K$h$j@0Ns$5$l$k(B.
1.2       noro      162: \E
                    163: \BEG
                    164: @item term order
                    165: Terms are ordered according to a total order with the following properties.
                    166: \E
1.1       noro      167:
                    168: @enumerate
                    169: @item
1.2       noro      170: \JP $BG$0U$N9`(B @code{t} $B$KBP$7(B @code{t} > 1
                    171: \EG For all @code{t} @code{t} > 1.
1.1       noro      172:
                    173: @item
1.2       noro      174: \JP @code{t}, @code{s}, @code{u} $B$r9`$H$9$k;~(B, @code{t} > @code{s} $B$J$i$P(B @code{tu} > @code{su}
                    175: \EG For all @code{t}, @code{s}, @code{u} @code{t} > @code{s} implies @code{tu} > @code{su}.
1.1       noro      176: @end enumerate
                    177:
1.2       noro      178: \BJP
1.1       noro      179: $B$3$N@-<A$rK~$?$9A4=g=x$r9`=g=x$H8F$V(B. $B$3$N=g=x$OJQ?t=g=x(B ($BJQ?t$N%j%9%H(B)
                    180: $B$H9`=g=x7?(B ($B?t(B, $B%j%9%H$^$?$O9TNs(B) $B$K$h$j;XDj$5$l$k(B.
1.2       noro      181: \E
                    182: \BEG
                    183: Such a total order is called a term ordering. A term ordering is specified
                    184: by a variable ordering (a list of variables) and a type of term ordering
                    185: (an integer, a list or a matrix).
                    186: \E
1.1       noro      187:
1.2       noro      188: \BJP
1.1       noro      189: @item $BC19`<0(B (monomial)
                    190: $B9`$H78?t$N@Q(B.
1.2       noro      191: \E
                    192: \BEG
                    193: @item monomial
                    194: The product of a term and a coefficient.
                    195: In an @b{Asir} session, it is displayed in the form like
                    196: \E
1.1       noro      197:
                    198: @example
                    199: 2*<<0,1,2,3,4>>
                    200: @end example
                    201:
1.2       noro      202: \JP $B$H$$$&7A$GI=<($5$l(B, $B$^$?(B, $B$3$N7A$GF~NO2DG=$G$"$k(B.
                    203: \EG and also can be input in such a form.
1.1       noro      204:
1.2       noro      205: \BJP
1.19      noro      206: @item $BF,9`(B (head term)
1.1       noro      207: @itemx $BF,C19`<0(B (head monomial)
                    208: @itemx $BF,78?t(B (head coefficient)
                    209: $BJ,;6I=8=B?9`<0$K$*$1$k3FC19`<0$O(B, $B9`=g=x$K$h$j@0Ns$5$l$k(B. $B$3$N;~=g(B
                    210: $B=x:GBg$NC19`<0$rF,C19`<0(B, $B$=$l$K8=$l$k9`(B, $B78?t$r$=$l$>$lF,9`(B, $BF,78?t(B
                    211: $B$H8F$V(B.
1.2       noro      212: \E
                    213: \BEG
1.19      noro      214: @item head term
1.2       noro      215: @itemx head monomial
                    216: @itemx head coefficient
                    217:
                    218: Monomials in a distributed polynomial is sorted by a total order.
                    219: In such representation, we call the monomial that is maximum
                    220: with respect to the order the head monomial, and its term and coefficient
                    221: the head term and the head coefficient respectively.
                    222: \E
1.1       noro      223: @end table
                    224:
1.20      takayama  225: @noindent
                    226: ChangeLog
                    227: @itemize @bullet
                    228: \BJP
                    229: @item $BJ,;6I=8=B?9`<0$OG$0U$N%*%V%8%'%/%H$r78?t$K$b$F$k$h$&$K$J$C$?(B.
                    230: $B$^$?2C72$N(Bk$B@.J,$NMWAG$r<!$N7A<0(B <<d0,d1,...:k>> $B$GI=8=$9$k$h$&$K$J$C$?(B (2017-08-31).
                    231: \E
                    232: \BEG
                    233: @item Distributed polynomials accept objects as coefficients.
                    234: The k-th element of a free module is expressed as <<d0,d1,...:k>> (2017-08-31).
                    235: \E
                    236: @item
                    237: 1.15 algnum.c,
                    238: 1.53 ctrl.c,
                    239: 1.66 dp-supp.c,
                    240: 1.105 dp.c,
                    241: 1.73 gr.c,
                    242: 1.4 reduct.c,
                    243: 1.16 _distm.c,
                    244: 1.17 dalg.c,
                    245: 1.52 dist.c,
                    246: 1.20 distm.c,
                    247: 1.8  gmpq.c,
                    248: 1.238 engine/nd.c,
                    249: 1.102  ca.h,
                    250: 1.411  version.h,
                    251: 1.28 cpexpr.c,
                    252: 1.42 pexpr.c,
                    253: 1.20 pexpr_body.c,
                    254: 1.40 spexpr.c,
                    255: 1.27 arith.c,
                    256: 1.77 eval.c,
                    257: 1.56 parse.h,
                    258: 1.37 parse.y,
                    259: 1.8 stdio.c,
                    260: 1.31 plotf.c
                    261: @end itemize
                    262:
1.2       noro      263: \BJP
1.1       noro      264: @node $B%U%!%$%k$NFI$_9~$_(B,,, $B%0%l%V%J4pDl$N7W;;(B
                    265: @section $B%U%!%$%k$NFI$_9~$_(B
1.2       noro      266: \E
                    267: \BEG
                    268: @node Reading files,,, Groebner basis computation
                    269: @section Reading files
                    270: \E
1.1       noro      271:
                    272: @noindent
1.2       noro      273: \BJP
1.1       noro      274: $B%0%l%V%J4pDl$r7W;;$9$k$?$a$N4pK\E*$JH!?t$O(B @code{dp_gr_main()} $B$*$h$S(B
1.5       noro      275: @code{dp_gr_mod_main()}, @code{dp_gr_f_main()}
                    276:  $B$J$k(B 3 $B$D$NAH$_9~$_H!?t$G$"$k$,(B, $BDL>o$O(B, $B%Q%i%a%?(B
1.1       noro      277: $B@_Dj$J$I$r9T$C$?$N$A$3$l$i$r8F$S=P$9%f!<%6H!?t$rMQ$$$k$N$,JXMx$G$"$k(B.
                    278: $B$3$l$i$N%f!<%6H!?t$O(B, $B%U%!%$%k(B @samp{gr} $B$r(B @code{load()} $B$K$h$jFI(B
                    279: $B$_9~$`$3$H$K$h$j;HMQ2DG=$H$J$k(B. @samp{gr} $B$O(B, @b{Asir} $B$NI8=`(B
1.5       noro      280: $B%i%$%V%i%j%G%#%l%/%H%j$KCV$+$l$F$$$k(B.
1.2       noro      281: \E
                    282: \BEG
1.5       noro      283: Facilities for computing Groebner bases are
                    284: @code{dp_gr_main()}, @code{dp_gr_mod_main()}and @code{dp_gr_f_main()}.
                    285: To call these functions,
                    286: it is necessary to set several parameters correctly and it is convenient
                    287: to use a set of interface functions provided in the library file
                    288: @samp{gr}.
1.2       noro      289: The facilities will be ready to use after you load the package by
                    290: @code{load()}.  The package @samp{gr} is placed in the standard library
1.5       noro      291: directory of @b{Asir}.
1.2       noro      292: \E
1.1       noro      293:
                    294: @example
                    295: [0] load("gr")$
                    296: @end example
                    297:
1.2       noro      298: \BJP
1.1       noro      299: @node $B4pK\E*$JH!?t(B,,, $B%0%l%V%J4pDl$N7W;;(B
                    300: @section $B4pK\E*$JH!?t(B
1.2       noro      301: \E
                    302: \BEG
                    303: @node Fundamental functions,,, Groebner basis computation
                    304: @section Fundamental functions
                    305: \E
1.1       noro      306:
                    307: @noindent
1.2       noro      308: \BJP
1.1       noro      309: @samp{gr} $B$G$O?tB?$/$NH!?t$,Dj5A$5$l$F$$$k$,(B, $BD>@\(B
                    310: $B%0%l%V%J4pDl$r7W;;$9$k$?$a$N%H%C%W%l%Y%k$O<!$N(B 3 $B$D$G$"$k(B.
                    311: $B0J2<$G(B, @var{plist} $B$OB?9`<0$N%j%9%H(B, @var{vlist} $B$OJQ?t(B ($BITDj85(B) $B$N%j%9%H(B,
                    312: @var{order} $B$OJQ?t=g=x7?(B, @var{p} $B$O(B @code{2^27} $BL$K~$NAG?t$G$"$k(B.
1.2       noro      313: \E
                    314: \BEG
                    315: There are many functions and options defined in the package @samp{gr}.
                    316: Usually not so many of them are used.  Top level functions for Groebner
                    317: basis computation are the following three functions.
                    318:
                    319: In the following description, @var{plist}, @var{vlist}, @var{order}
                    320: and @var{p} stand for  a list of polynomials,  a list of variables
                    321: (indeterminates), a type of term ordering and a prime less than
                    322: @code{2^27} respectively.
                    323: \E
1.1       noro      324:
                    325: @table @code
                    326: @item gr(@var{plist},@var{vlist},@var{order})
                    327:
1.2       noro      328: \BJP
1.1       noro      329: Gebauer-Moeller $B$K$h$k(B useless pair elimination criteria, sugar
                    330: strategy $B$*$h$S(B Traverso $B$K$h$k(B trace-lifting $B$rMQ$$$?(B Buchberger $B%"%k(B
                    331: $B%4%j%:%`$K$h$kM-M}?t78?t%0%l%V%J4pDl7W;;H!?t(B. $B0lHL$K$O$3$NH!?t$rMQ$$$k(B.
1.2       noro      332: \E
                    333: \BEG
                    334: Function that computes Groebner bases over the rationals. The
                    335: algorithm is Buchberger algorithm with useless pair elimination
                    336: criteria by Gebauer-Moeller, sugar strategy and trace-lifting by
                    337: Traverso. For ordinary computation, this function is used.
                    338: \E
1.1       noro      339:
                    340: @item hgr(@var{plist},@var{vlist},@var{order})
                    341:
1.2       noro      342: \BJP
1.1       noro      343: $BF~NOB?9`<0$r@F<!2=$7$?8e(B @code{gr()} $B$N%0%l%V%J4pDl8uJd@8@.It$K$h$j8u(B
                    344: $BJd@8@.$7(B, $BHs@F<!2=(B, interreduce $B$7$?$b$N$r(B @code{gr()} $B$N%0%l%V%J4pDl(B
                    345: $B%A%'%C%/It$G%A%'%C%/$9$k(B. 0 $B<!85%7%9%F%`(B ($B2r$N8D?t$,M-8B8D$NJ}Dx<07O(B)
                    346: $B$N>l9g(B, sugar strategy $B$,78?tKDD%$r0z$-5/$3$9>l9g$,$"$k(B. $B$3$N$h$&$J>l(B
                    347: $B9g(B, strategy $B$r@F<!2=$K$h$k(B strategy $B$KCV$-49$($k$3$H$K$h$j78?tKDD%$r(B
                    348: $BM^@)$9$k$3$H$,$G$-$k>l9g$,B?$$(B.
1.2       noro      349: \E
                    350: \BEG
                    351: After homogenizing the input polynomials a candidate of the \gr basis
                    352: is computed by trace-lifting. Then the candidate is dehomogenized and
                    353: checked whether it is indeed a Groebner basis of the input.  Sugar
                    354: strategy often causes intermediate coefficient swells.  It is
                    355: empirically known that the combination of homogenization and supresses
                    356: the swells for such cases.
                    357: \E
1.1       noro      358:
                    359: @item gr_mod(@var{plist},@var{vlist},@var{order},@var{p})
                    360:
1.2       noro      361: \BJP
1.1       noro      362: Gebauer-Moeller $B$K$h$k(B useless pair elimination criteria, sugar
                    363: strategy $B$*$h$S(B Buchberger $B%"%k%4%j%:%`$K$h$k(B GF(p) $B78?t%0%l%V%J4pDl7W(B
                    364: $B;;H!?t(B.
1.2       noro      365: \E
                    366: \BEG
                    367: Function that computes Groebner bases over GF(@var{p}). The same
                    368: algorithm as @code{gr()} is used.
                    369: \E
1.1       noro      370:
                    371: @end table
                    372:
1.2       noro      373: \BJP
1.1       noro      374: @node $B7W;;$*$h$SI=<($N@)8f(B,,, $B%0%l%V%J4pDl$N7W;;(B
                    375: @section $B7W;;$*$h$SI=<($N@)8f(B
1.2       noro      376: \E
                    377: \BEG
                    378: @node Controlling Groebner basis computations,,, Groebner basis computation
                    379: @section Controlling Groebner basis computations
                    380: \E
1.1       noro      381:
                    382: @noindent
1.2       noro      383: \BJP
1.1       noro      384: $B%0%l%V%J4pDl$N7W;;$K$*$$$F(B, $B$5$^$6$^$J%Q%i%a%?@_Dj$r9T$&$3$H$K$h$j7W;;(B,
                    385: $BI=<($r@)8f$9$k$3$H$,$G$-$k(B. $B$3$l$i$O(B, $BAH$_9~$_H!?t(B @code{dp_gr_flags()}
                    386: $B$K$h$j@_Dj;2>H$9$k$3$H$,$G$-$k(B. $BL50z?t$G(B @code{dp_gr_flags()} $B$r<B9T$9$k(B
                    387: $B$H(B, $B8=:_@_Dj$5$l$F$$$k%Q%i%a%?$,(B, $BL>A0$HCM$N%j%9%H$GJV$5$l$k(B.
1.2       noro      388: \E
                    389: \BEG
                    390: One can cotrol a Groebner basis computation by setting various parameters.
                    391: These parameters can be set and examined by a built-in function
                    392: @code{dp_gr_flags()}. Without argument it returns the current settings.
                    393: \E
1.1       noro      394:
                    395: @example
                    396: [100] dp_gr_flags();
1.5       noro      397: [Demand,0,NoSugar,0,NoCriB,0,NoGC,0,NoMC,0,NoRA,0,NoGCD,0,Top,0,
                    398: ShowMag,1,Print,1,Stat,0,Reverse,0,InterReduce,0,Multiple,0]
1.1       noro      399: [101]
                    400: @end example
                    401:
1.2       noro      402: \BJP
1.1       noro      403: $B0J2<$G(B, $B3F%Q%i%a%?$N0UL#$r@bL@$9$k(B. on $B$N>l9g$H$O(B, $B%Q%i%a%?$,(B 0 $B$G$J$$>l9g$r(B
                    404: $B$$$&(B. $B$3$l$i$N%Q%i%a%?$N=i4|CM$OA4$F(B 0 (off) $B$G$"$k(B.
1.2       noro      405: \E
                    406: \BEG
                    407: The return value is a list which contains the names of parameters and their
                    408: values. The meaning of the parameters are as follows. `on' means that the
                    409: parameter is not zero.
                    410: \E
1.1       noro      411:
                    412: @table @code
                    413: @item NoSugar
1.2       noro      414: \BJP
1.1       noro      415: on $B$N>l9g(B, sugar strategy $B$NBe$o$j$K(B Buchberger$B$N(B normal strategy $B$,MQ(B
                    416: $B$$$i$l$k(B.
1.2       noro      417: \E
                    418: \BEG
                    419: If `on', Buchberger's normal strategy is used instead of sugar strategy.
                    420: \E
1.1       noro      421:
                    422: @item NoCriB
1.2       noro      423: \JP on $B$N>l9g(B, $BITI,MWBP8!=P5,=`$N$&$A(B, $B5,=`(B B $B$rE,MQ$7$J$$(B.
                    424: \EG If `on', criterion B among the Gebauer-Moeller's criteria is not applied.
1.1       noro      425:
                    426: @item NoGC
1.2       noro      427: \JP on $B$N>l9g(B, $B7k2L$,%0%l%V%J4pDl$K$J$C$F$$$k$+$I$&$+$N%A%'%C%/$r9T$o$J$$(B.
                    428: \BEG
                    429: If `on', the check that a Groebner basis candidate is indeed a Groebner basis,
                    430: is not executed.
                    431: \E
1.1       noro      432:
                    433: @item NoMC
1.2       noro      434: \BJP
1.1       noro      435: on $B$N>l9g(B, $B7k2L$,F~NO%$%G%"%k$HF1Ey$N%$%G%"%k$G$"$k$+$I$&$+$N%A%'%C%/(B
                    436: $B$r9T$o$J$$(B.
1.2       noro      437: \E
                    438: \BEG
                    439: If `on', the check that the resulting polynomials generates the same ideal as
                    440: the ideal generated by the input, is not executed.
                    441: \E
1.1       noro      442:
                    443: @item NoRA
1.2       noro      444: \BJP
1.1       noro      445: on $B$N>l9g(B, $B7k2L$r(B reduced $B%0%l%V%J4pDl$K$9$k$?$a$N(B
                    446: interreduce $B$r9T$o$J$$(B.
1.2       noro      447: \E
                    448: \BEG
                    449: If `on', the interreduction, which makes the Groebner basis reduced, is not
                    450: executed.
                    451: \E
1.1       noro      452:
                    453: @item NoGCD
1.2       noro      454: \BJP
1.1       noro      455: on $B$N>l9g(B, $BM-M}<078?t$N%0%l%V%J4pDl7W;;$K$*$$$F(B, $B@8@.$5$l$?B?9`<0$N(B,
                    456: $B78?t$N(B content $B$r$H$i$J$$(B.
1.2       noro      457: \E
                    458: \BEG
                    459: If `on', content removals are not executed during a Groebner basis computation
                    460: over a rational function field.
                    461: \E
1.1       noro      462:
                    463: @item Top
1.2       noro      464: \JP on $B$N>l9g(B, normal form $B7W;;$K$*$$$FF,9`>C5n$N$_$r9T$&(B.
                    465: \EG If `on', Only the head term of the polynomial being reduced is reduced.
1.1       noro      466:
1.2       noro      467: @comment @item Interreduce
                    468: @comment \BJP
                    469: @comment on $B$N>l9g(B, $BB?9`<0$r@8@.$9$kKh$K(B, $B$=$l$^$G@8@.$5$l$?4pDl$r$=$NB?9`<0$K(B
                    470: @comment $B$h$k(B normal form $B$GCV$-49$($k(B.
                    471: @comment \E
                    472: @comment \BEG
                    473: @comment If `on', intermediate basis elements are reduced by using a newly generated
                    474: @comment basis element.
                    475: @comment \E
1.1       noro      476:
                    477: @item Reverse
1.2       noro      478: \BJP
1.1       noro      479: on $B$N>l9g(B, normal form $B7W;;$N:]$N(B reducer $B$r(B, $B?7$7$/@8@.$5$l$?$b$N$rM%(B
                    480: $B@h$7$FA*$V(B.
1.2       noro      481: \E
                    482: \BEG
                    483: If `on', the selection strategy of reducer in a normal form computation
                    484: is such that a newer reducer is used first.
                    485: \E
1.1       noro      486:
                    487: @item Print
1.2       noro      488: \JP on $B$N>l9g(B, $B%0%l%V%J4pDl7W;;$NESCf$K$*$1$k$5$^$6$^$J>pJs$rI=<($9$k(B.
                    489: \BEG
                    490: If `on', various informations during a Groebner basis computation is
                    491: displayed.
                    492: \E
1.1       noro      493:
1.7       noro      494: @item PrintShort
                    495: \JP on $B$G!"(BPrint $B$,(B off $B$N>l9g(B, $B%0%l%V%J4pDl7W;;$NESCf$N>pJs$rC;=L7A$GI=<($9$k(B.
                    496: \BEG
                    497: If `on' and Print is `off', short information during a Groebner basis computation is
                    498: displayed.
                    499: \E
                    500:
1.1       noro      501: @item Stat
1.2       noro      502: \BJP
1.1       noro      503: on $B$G(B @code{Print} $B$,(B off $B$J$i$P(B, @code{Print} $B$,(B on $B$N$H$-I=<($5(B
                    504: $B$l$k%G!<%?$NFb(B, $B=87W%G!<%?$N$_$,I=<($5$l$k(B.
1.2       noro      505: \E
                    506: \BEG
                    507: If `on', a summary of informations is shown after a Groebner basis
                    508: computation. Note that the summary is always shown if @code{Print} is `on'.
                    509: \E
1.1       noro      510:
                    511: @item ShowMag
1.2       noro      512: \BJP
1.1       noro      513: on $B$G(B @code{Print} $B$,(B on $B$J$i$P(B, $B@8@.$,@8@.$5$l$kKh$K(B, $B$=$NB?9`<0$N(B
                    514: $B78?t$N%S%C%HD9$NOB$rI=<($7(B, $B:G8e$K(B, $B$=$l$i$NOB$N:GBgCM$rI=<($9$k(B.
1.2       noro      515: \E
                    516: \BEG
                    517: If `on' and @code{Print} is `on', the sum of bit length of
                    518: coefficients of a generated basis element, which we call @var{magnitude},
                    519: is shown after every normal computation.  After comleting the
                    520: computation the maximal value among the sums is shown.
                    521: \E
1.1       noro      522:
1.7       noro      523: @item Content
                    524: @itemx Multiple
1.2       noro      525: \BJP
1.7       noro      526: 0 $B$G$J$$M-M}?t$N;~(B, $BM-M}?t>e$N@55,7A7W;;$K$*$$$F(B, $B78?t$N%S%C%HD9$NOB$,(B
                    527: @code{Content} $BG\$K$J$k$4$H$K78?tA4BN$N(B GCD $B$,7W;;$5$l(B, $B$=$N(B GCD $B$G(B
                    528: $B3d$C$?B?9`<0$r4JLs$9$k(B. @code{Content} $B$,(B 1 $B$J$i$P(B, $B4JLs$9$k$4$H$K(B
                    529: GCD $B7W;;$,9T$o$l0lHL$K$O8zN($,0-$/$J$k$,(B, @code{Content} $B$r(B 2 $BDxEY(B
1.1       noro      530: $B$H$9$k$H(B, $B5pBg$J@0?t$,78?t$K8=$l$k>l9g(B, $B8zN($,NI$/$J$k>l9g$,$"$k(B.
1.7       noro      531: backward compatibility $B$N$?$a!"(B@code{Multiple} $B$G@0?tCM$r;XDj$G$-$k(B.
1.2       noro      532: \E
                    533: \BEG
1.7       noro      534: If a non-zero rational number, in a normal form computation
1.2       noro      535: over the rationals, the integer content of the polynomial being
1.7       noro      536: reduced is removed when its magnitude becomes @code{Content} times
1.2       noro      537: larger than a registered value, which is set to the magnitude of the
                    538: input polynomial. After each content removal the registered value is
1.7       noro      539: set to the magnitude of the resulting polynomial. @code{Content} is
1.2       noro      540: equal to 1, the simiplification is done after every normal form computation.
1.7       noro      541: It is empirically known that it is often efficient to set @code{Content} to 2
1.2       noro      542: for the case where large integers appear during the computation.
1.7       noro      543: An integer value can be set by the keyword @code{Multiple} for
                    544: backward compatibility.
1.2       noro      545: \E
1.1       noro      546:
                    547: @item Demand
1.2       noro      548:
                    549: \BJP
1.1       noro      550: $B@5Ev$J%G%#%l%/%H%jL>(B ($BJ8;zNs(B) $B$rCM$K;}$D$H$-(B, $B@8@.$5$l$?B?9`<0$O%a%b%j(B
                    551: $BCf$K$*$+$l$:(B, $B$=$N%G%#%l%/%H%jCf$K%P%$%J%j%G!<%?$H$7$FCV$+$l(B, $B$=$NB?9`(B
                    552: $B<0$rMQ$$$k(B normal form $B7W;;$N:](B, $B<+F0E*$K%a%b%jCf$K%m!<%I$5$l$k(B. $B3FB?(B
                    553: $B9`<0$O(B, $BFbIt$G$N%$%s%G%C%/%9$r%U%!%$%kL>$K;}$D%U%!%$%k$K3JG<$5$l$k(B.
                    554: $B$3$3$G;XDj$5$l$?%G%#%l%/%H%j$K=q$+$l$?%U%!%$%k$O<+F0E*$K$O>C5n$5$l$J$$(B
                    555: $B$?$a(B, $B%f!<%6$,@UG$$r;}$C$F>C5n$9$kI,MW$,$"$k(B.
1.2       noro      556: \E
                    557: \BEG
                    558: If the value (a character string) is a valid directory name, then
                    559: generated basis elements are put in the directory and are loaded on
                    560: demand during normal form computations.  Each elements is saved in the
                    561: binary form and its name coincides with the index internally used in
                    562: the computation. These binary files are not removed automatically
                    563: and one should remove them by hand.
                    564: \E
1.1       noro      565: @end table
                    566:
                    567: @noindent
1.2       noro      568: \JP @code{Print} $B$,(B 0 $B$G$J$$>l9g<!$N$h$&$J%G!<%?$,I=<($5$l$k(B.
                    569: \EG If @code{Print} is `on', the following informations are shown.
1.1       noro      570:
                    571: @example
                    572: [93] gr(cyclic(4),[c0,c1,c2,c3],0)$
                    573: mod= 99999989, eval = []
                    574: (0)(0)<<0,2,0,0>>(2,3),nb=2,nab=5,rp=2,sugar=2,mag=4
                    575: (0)(0)<<0,1,2,0>>(1,2),nb=3,nab=6,rp=2,sugar=3,mag=4
                    576: (0)(0)<<0,1,1,2>>(0,1),nb=4,nab=7,rp=3,sugar=4,mag=6
                    577: .
                    578: (0)(0)<<0,0,3,2>>(5,6),nb=5,nab=8,rp=2,sugar=5,mag=4
                    579: (0)(0)<<0,1,0,4>>(4,6),nb=6,nab=9,rp=3,sugar=5,mag=4
                    580: (0)(0)<<0,0,2,4>>(6,8),nb=7,nab=10,rp=4,sugar=6,mag=6
                    581: ....gb done
                    582: reduceall
                    583: .......
                    584: membercheck
                    585: (0,0)(0,0)(0,0)(0,0)
                    586: gbcheck total 8 pairs
                    587: ........
1.5       noro      588: UP=(0,0)SP=(0,0)SPM=(0,0)NF=(0,0)NFM=(0.010002,0)ZNFM=(0.010002,0)
                    589: PZ=(0,0)NP=(0,0)MP=(0,0)RA=(0,0)MC=(0,0)GC=(0,0)T=40,B=0 M=8 F=6
                    590: D=12 ZR=5 NZR=6 Max_mag=6
1.1       noro      591: [94]
                    592: @end example
                    593:
                    594: @noindent
1.2       noro      595: \BJP
1.1       noro      596: $B:G=i$KI=<($5$l$k(B @code{mod}, @code{eval} $B$O(B, trace-lifting $B$GMQ$$$i$l$kK!(B
                    597: $B$G$"$k(B. @code{mod} $B$OAG?t(B, @code{eval} $B$OM-M}<078?t$N>l9g$KMQ$$$i$l$k(B
                    598: $B?t$N%j%9%H$G$"$k(B.
1.2       noro      599: \E
                    600: \BEG
                    601: In this example @code{mod} and @code{eval} indicate moduli used in
                    602: trace-lifting. @code{mod} is a prime and @code{eval} is a list of integers
                    603: used for evaluation when the ground field is a field of rational functions.
                    604: \E
1.1       noro      605:
                    606: @noindent
1.2       noro      607: \JP $B7W;;ESCf$GB?9`<0$,@8@.$5$l$kKh$K<!$N7A$N%G!<%?$,I=<($5$l$k(B.
                    608: \EG The following information is shown after every normal form computation.
1.1       noro      609:
                    610: @example
                    611: (TNF)(TCONT)HT(INDEX),nb=NB,nab=NAB,rp=RP,sugar=S,mag=M
                    612: @end example
                    613:
                    614: @noindent
1.2       noro      615: \JP $B$=$l$i$N0UL#$O<!$NDL$j(B.
                    616: \EG Meaning of each component is as follows.
1.1       noro      617:
                    618: @table @code
1.2       noro      619: \BJP
1.1       noro      620: @item TNF
1.2       noro      621:
1.1       noro      622: normal form $B7W;;;~4V(B ($BIC(B)
                    623:
                    624: @item TCONT
1.2       noro      625:
1.1       noro      626: content $B7W;;;~4V(B ($BIC(B)
                    627:
                    628: @item HT
1.2       noro      629:
1.1       noro      630: $B@8@.$5$l$?B?9`<0$NF,9`(B
                    631:
                    632: @item INDEX
1.2       noro      633:
1.1       noro      634: S-$BB?9`<0$r9=@.$9$kB?9`<0$N%$%s%G%C%/%9$N%Z%"(B
                    635:
                    636: @item NB
1.2       noro      637:
1.1       noro      638: $B8=:_$N(B, $B>iD9@-$r=|$$$?4pDl$N?t(B
                    639:
                    640: @item NAB
1.2       noro      641:
1.1       noro      642: $B8=:_$^$G$K@8@.$5$l$?4pDl$N?t(B
                    643:
                    644: @item RP
1.2       noro      645:
1.1       noro      646: $B;D$j$N%Z%"$N?t(B
                    647:
                    648: @item S
1.2       noro      649:
1.1       noro      650: $B@8@.$5$l$?B?9`<0$N(B sugar $B$NCM(B
                    651:
                    652: @item M
1.2       noro      653:
1.1       noro      654: $B@8@.$5$l$?B?9`<0$N78?t$N%S%C%HD9$NOB(B (@code{ShowMag} $B$,(B on $B$N;~$KI=<($5$l$k(B. )
1.2       noro      655: \E
                    656: \BEG
                    657: @item TNF
                    658:
                    659: CPU time for normal form computation (second)
                    660:
                    661: @item TCONT
                    662:
                    663: CPU time for content removal(second)
                    664:
                    665: @item HT
                    666:
                    667: Head term of the generated basis element
                    668:
                    669: @item INDEX
                    670:
                    671: Pair of indices which corresponds to the reduced S-polynomial
                    672:
                    673: @item NB
                    674:
                    675: Number of basis elements after removing redundancy
                    676:
                    677: @item NAB
                    678:
                    679: Number of all the basis elements
                    680:
                    681: @item RP
                    682:
                    683: Number of remaining pairs
                    684:
                    685: @item S
                    686:
                    687: Sugar of the generated basis element
                    688:
                    689: @item M
                    690:
                    691: Magnitude of the genrated basis element (shown if @code{ShowMag} is `on'.)
                    692: \E
1.1       noro      693: @end table
                    694:
                    695: @noindent
1.2       noro      696: \BJP
1.1       noro      697: $B:G8e$K(B, $B=87W%G!<%?$,I=<($5$l$k(B. $B0UL#$O<!$NDL$j(B.
                    698: ($B;~4V$NI=<($K$*$$$F(B, $B?t;z$,(B 2 $B$D$"$k$b$N$O(B, $B7W;;;~4V$H(B GC $B;~4V$N%Z%"$G$"$k(B.)
1.2       noro      699: \E
                    700: \BEG
                    701: The summary of the informations shown after a Groebner basis
                    702: computation is as follows.  If a component shows timings and it
                    703: contains two numbers, they are a pair of time for computation and time
                    704: for garbage colection.
                    705: \E
1.1       noro      706:
                    707: @table @code
1.2       noro      708: \BJP
1.1       noro      709: @item UP
1.2       noro      710:
1.1       noro      711: $B%Z%"$N%j%9%H$NA`:n$K$+$+$C$?;~4V(B
                    712:
                    713: @item SP
1.2       noro      714:
1.1       noro      715: $BM-M}?t>e$N(B S-$BB?9`<07W;;;~4V(B
                    716:
                    717: @item SPM
1.2       noro      718:
1.1       noro      719: $BM-8BBN>e$N(B S-$BB?9`<07W;;;~4V(B
                    720:
                    721: @item NF
1.2       noro      722:
1.1       noro      723: $BM-M}?t>e$N(B normal form $B7W;;;~4V(B
                    724:
                    725: @item NFM
1.2       noro      726:
1.1       noro      727: $BM-8BBN>e$N(B normal form $B7W;;;~4V(B
                    728:
                    729: @item ZNFM
1.2       noro      730:
1.1       noro      731: @code{NFM} $B$NFb(B, 0 $B$X$N(B reduction $B$K$+$+$C$?;~4V(B
                    732:
                    733: @item PZ
1.2       noro      734:
1.1       noro      735: content $B7W;;;~4V(B
                    736:
                    737: @item NP
1.2       noro      738:
1.1       noro      739: $BM-M}?t78?tB?9`<0$N78?t$KBP$9$k>jM>1i;;$N7W;;;~4V(B
                    740:
                    741: @item MP
1.2       noro      742:
1.1       noro      743: S-$BB?9`<0$r@8@.$9$k%Z%"$NA*Br$K$+$+$C$?;~4V(B
                    744:
                    745: @item RA
1.2       noro      746:
1.1       noro      747: interreduce $B7W;;;~4V(B
                    748:
                    749: @item MC
1.2       noro      750:
1.1       noro      751: trace-lifting $B$K$*$1$k(B, $BF~NOB?9`<0$N%a%s%P%7%C%W7W;;;~4V(B
                    752:
                    753: @item GC
1.2       noro      754:
1.1       noro      755: $B7k2L$N%0%l%V%J4pDl8uJd$N%0%l%V%J4pDl%A%'%C%/;~4V(B
                    756:
                    757: @item T
1.2       noro      758:
1.1       noro      759: $B@8@.$5$l$?%Z%"$N?t(B
                    760:
                    761: @item B, M, F, D
1.2       noro      762:
1.1       noro      763: $B3F(B criterion $B$K$h$j=|$+$l$?%Z%"$N?t(B
                    764:
                    765: @item ZR
1.2       noro      766:
1.1       noro      767: 0 $B$K(B reduce $B$5$l$?%Z%"$N?t(B
                    768:
                    769: @item NZR
1.2       noro      770:
1.1       noro      771: 0 $B$G$J$$B?9`<0$K(B reduce $B$5$l$?%Z%"$N?t(B
                    772:
                    773: @item Max_mag
1.2       noro      774:
1.1       noro      775: $B@8@.$5$l$?B?9`<0$N(B, $B78?t$N%S%C%HD9$NOB$N:GBgCM(B
1.2       noro      776: \E
                    777: \BEG
                    778: @item UP
                    779:
                    780: Time to manipulate the list of critical pairs
                    781:
                    782: @item SP
                    783:
                    784: Time to compute S-polynomials over the rationals
                    785:
                    786: @item SPM
                    787:
                    788: Time to compute S-polynomials over a finite field
                    789:
                    790: @item NF
                    791:
                    792: Time to compute normal forms over the rationals
                    793:
                    794: @item NFM
                    795:
                    796: Time to compute normal forms over a finite field
                    797:
                    798: @item ZNFM
                    799:
                    800: Time for zero reductions in @code{NFM}
                    801:
                    802: @item PZ
                    803:
                    804: Time to remove integer contets
                    805:
                    806: @item NP
                    807:
                    808: Time to compute remainders for coefficients of polynomials with coeffieints
                    809: in the rationals
                    810:
                    811: @item MP
                    812:
                    813: Time to select pairs from which S-polynomials are computed
                    814:
                    815: @item RA
                    816:
                    817: Time to interreduce the Groebner basis candidate
                    818:
                    819: @item MC
1.1       noro      820:
1.2       noro      821: Time to check that each input polynomial is a member of the ideal
                    822: generated by the Groebner basis candidate.
                    823:
                    824: @item GC
                    825:
                    826: Time to check that the Groebner basis candidate is a Groebner basis
                    827:
                    828: @item T
                    829:
                    830: Number of critical pairs generated
                    831:
                    832: @item B, M, F, D
                    833:
                    834: Number of critical pairs removed by using each criterion
                    835:
                    836: @item ZR
                    837:
                    838: Number of S-polynomials reduced to 0
                    839:
                    840: @item NZR
                    841:
                    842: Number of S-polynomials reduced to non-zero results
                    843:
                    844: @item Max_mag
                    845:
                    846: Maximal magnitude among all the generated polynomials
                    847: \E
1.1       noro      848: @end table
                    849:
1.2       noro      850: \BJP
1.1       noro      851: @node $B9`=g=x$N@_Dj(B,,, $B%0%l%V%J4pDl$N7W;;(B
                    852: @section $B9`=g=x$N@_Dj(B
1.2       noro      853: \E
                    854: \BEG
                    855: @node Setting term orderings,,, Groebner basis computation
                    856: @section Setting term orderings
                    857: \E
1.1       noro      858:
                    859: @noindent
1.2       noro      860: \BJP
1.1       noro      861: $B9`$OFbIt$G$O(B, $B3FJQ?t$K4X$9$k;X?t$r@.J,$H$9$k@0?t%Y%/%H%k$H$7$FI=8=$5$l(B
                    862: $B$k(B. $BB?9`<0$rJ,;6I=8=B?9`<0$KJQ49$9$k:](B, $B3FJQ?t$,$I$N@.J,$KBP1~$9$k$+$r(B
                    863: $B;XDj$9$k$N$,(B, $BJQ?t%j%9%H$G$"$k(B. $B$5$i$K(B, $B$=$l$i@0?t%Y%/%H%k$NA4=g=x$r(B
                    864: $B;XDj$9$k$N$,9`=g=x$N7?$G$"$k(B. $B9`=g=x7?$O(B, $B?t(B, $B?t$N%j%9%H$"$k$$$O(B
                    865: $B9TNs$GI=8=$5$l$k(B.
1.2       noro      866: \E
                    867: \BEG
                    868: A term is internally represented as an integer vector whose components
                    869: are exponents with respect to variables. A variable list specifies the
                    870: correspondences between variables and components. A type of term ordering
                    871: specifies a total order for integer vectors. A type of term ordering is
                    872: represented by an integer, a list of integer or matrices.
                    873: \E
1.1       noro      874:
                    875: @noindent
1.2       noro      876: \JP $B4pK\E*$J9`=g=x7?$H$7$F<!$N(B 3 $B$D$,$"$k(B.
                    877: \EG There are following three fundamental types.
1.1       noro      878:
                    879: @table @code
1.2       noro      880: \JP @item 0 (DegRevLex; @b{$BA4<!?t5U<-=q<0=g=x(B})
                    881: \EG @item 0 (DegRevLex; @b{total degree reverse lexicographic ordering})
1.1       noro      882:
1.2       noro      883: \BJP
1.1       noro      884: $B0lHL$K(B, $B$3$N=g=x$K$h$k%0%l%V%J4pDl7W;;$,:G$b9bB.$G$"$k(B. $B$?$@$7(B,
                    885: $BJ}Dx<0$r2r$/$H$$$&L\E*$KMQ$$$k$3$H$O(B, $B0lHL$K$O$G$-$J$$(B. $B$3$N(B
                    886: $B=g=x$K$h$k%0%l%V%J4pDl$O(B, $B2r$N8D?t$N7W;;(B, $B%$%G%"%k$N%a%s%P%7%C%W$d(B,
                    887: $BB>$NJQ?t=g=x$X$N4pDlJQ49$N$?$a$N%=!<%9$H$7$FMQ$$$i$l$k(B.
1.2       noro      888: \E
                    889: \BEG
                    890: In general, computation by this ordering shows the fastest speed
                    891: in most Groebner basis computations.
                    892: However, for the purpose to solve polynomial equations, this type
                    893: of ordering is, in general, not so suitable.
                    894: The Groebner bases obtained by this ordering is used for computing
                    895: the number of solutions, solving ideal membership problem and seeds
                    896: for conversion to other Groebner bases under different ordering.
                    897: \E
1.1       noro      898:
1.2       noro      899: \JP @item 1 (DegLex; @b{$BA4<!?t<-=q<0=g=x(B})
                    900: \EG @item 1 (DegLex; @b{total degree lexicographic ordering})
1.1       noro      901:
1.2       noro      902: \BJP
1.1       noro      903: $B$3$N=g=x$b(B, $B<-=q<0=g=x$KHf$Y$F9bB.$K%0%l%V%J4pDl$r5a$a$k$3$H$,$G$-$k$,(B,
                    904: @code{DegRevLex} $B$HF1MMD>@\$=$N7k2L$rMQ$$$k$3$H$O:$Fq$G$"$k(B. $B$7$+$7(B,
                    905: $B<-=q<0=g=x$N%0%l%V%J4pDl$r5a$a$k:]$K(B, $B@F<!2=8e$K$3$N=g=x$G%0%l%V%J4pDl(B
                    906: $B$r5a$a$F$$$k(B.
1.2       noro      907: \E
                    908: \BEG
                    909: By this type term ordering, Groebner bases are obtained fairly faster
                    910: than Lex (lexicographic) ordering, too.
                    911: Alike the @code{DegRevLex} ordering, the result, in general, cannot directly
                    912: be used for solving polynomial equations.
                    913: It is used, however, in such a way
                    914: that a Groebner basis is computed in this ordering after homogenization
                    915: to obtain the final lexicographic Groebner basis.
                    916: \E
1.1       noro      917:
1.2       noro      918: \JP @item 2 (Lex; @b{$B<-=q<0=g=x(B})
                    919: \EG @item 2 (Lex; @b{lexicographic ordering})
1.1       noro      920:
1.2       noro      921: \BJP
1.1       noro      922: $B$3$N=g=x$K$h$k%0%l%V%J4pDl$O(B, $BJ}Dx<0$r2r$/>l9g$K:GE,$N7A$N4pDl$rM?$($k$,(B
                    923: $B7W;;;~4V$,$+$+$j2a$.$k$N$,FqE@$G$"$k(B. $BFC$K(B, $B2r$,M-8B8D$N>l9g(B, $B7k2L$N(B
                    924: $B78?t$,6K$a$FD9Bg$JB?G\D9?t$K$J$k>l9g$,B?$$(B. $B$3$N>l9g(B, @code{gr()},
                    925: @code{hgr()} $B$K$h$k7W;;$,6K$a$FM-8z$K$J$k>l9g$,B?$$(B.
1.2       noro      926: \E
                    927: \BEG
                    928: Groebner bases computed by this ordering give the most convenient
                    929: Groebner bases for solving the polynomial equations.
                    930: The only and serious shortcoming is the enormously long computation
                    931: time.
                    932: It is often observed that the number coefficients of the result becomes
                    933: very very long integers, especially if the ideal is 0-dimensional.
                    934: For such a case, it is empirically true for many cases
                    935: that i.e., computation by
                    936: @code{gr()} and/or @code{hgr()} may be quite effective.
                    937: \E
1.1       noro      938: @end table
                    939:
                    940: @noindent
1.2       noro      941: \BJP
1.1       noro      942: $B$3$l$i$rAH$_9g$o$;$F%j%9%H$G;XDj$9$k$3$H$K$h$j(B, $BMM!9$J>C5n=g=x$,;XDj$G$-$k(B.
                    943: $B$3$l$O(B,
1.2       noro      944: \E
                    945: \BEG
                    946: By combining these fundamental orderingl into a list, one can make
                    947: various term ordering called elimination orderings.
                    948: \E
1.1       noro      949:
                    950: @code{[[O1,L1],[O2,L2],...]}
                    951:
                    952: @noindent
1.2       noro      953: \BJP
1.1       noro      954: $B$G;XDj$5$l$k(B. @code{Oi} $B$O(B 0, 1, 2 $B$N$$$:$l$+$G(B, @code{Li} $B$OJQ?t$N8D(B
                    955: $B?t$rI=$9(B. $B$3$N;XDj$O(B, $BJQ?t$r@hF,$+$i(B @code{L1}, @code{L2} , ...$B8D(B
                    956: $B$:$D$NAH$KJ,$1(B, $B$=$l$>$l$NJQ?t$K4X$7(B, $B=g$K(B @code{O1}, @code{O2},
                    957: ...$B$N9`=g=x7?$GBg>.$,7hDj$9$k$^$GHf3S$9$k$3$H$r0UL#$9$k(B. $B$3$N7?$N(B
                    958: $B=g=x$O0lHL$K>C5n=g=x$H8F$P$l$k(B.
1.2       noro      959: \E
                    960: \BEG
                    961: In this example @code{Oi} indicates 0, 1 or 2 and @code{Li} indicates
                    962: the number of variables subject to the correspoinding orderings.
                    963: This specification means the following.
                    964:
                    965: The variable list is separated into sub lists from left to right where
                    966: the @code{i}-th list contains @code{Li} members and it corresponds to
                    967: the ordering of type @code{Oi}. The result of a comparison is equal
                    968: to that for the leftmost different sub components. This type of ordering
                    969: is called an elimination ordering.
                    970: \E
1.1       noro      971:
                    972: @noindent
1.2       noro      973: \BJP
1.1       noro      974: $B$5$i$K(B, $B9TNs$K$h$j9`=g=x$r;XDj$9$k$3$H$,$G$-$k(B. $B0lHL$K(B, @code{n} $B9T(B
                    975: @code{m} $BNs$N<B?t9TNs(B @code{M} $B$,<!$N@-<A$r;}$D$H$9$k(B.
1.2       noro      976: \E
                    977: \BEG
                    978: Furthermore one can specify a term ordering by a matix.
                    979: Suppose that a real @code{n}, @code{m} matrix @code{M} has the
                    980: following properties.
                    981: \E
1.1       noro      982:
                    983: @enumerate
                    984: @item
1.2       noro      985: \JP $BD9$5(B @code{m} $B$N@0?t%Y%/%H%k(B @code{v} $B$KBP$7(B @code{Mv=0} $B$H(B @code{v=0} $B$OF1CM(B.
                    986: \BEG
                    987: For all integer verctors @code{v} of length @code{m} @code{Mv=0} is equivalent
                    988: to @code{v=0}.
                    989: \E
1.1       noro      990:
                    991: @item
1.2       noro      992: \BJP
1.1       noro      993: $BHsIi@.J,$r;}$DD9$5(B @code{m} $B$N(B 0 $B$G$J$$@0?t%Y%/%H%k(B @code{v} $B$KBP$7(B,
                    994: @code{Mv} $B$N(B 0 $B$G$J$$:G=i$N@.J,$OHsIi(B.
1.2       noro      995: \E
                    996: \BEG
                    997: For all non-negative integer vectors @code{v} the first non-zero component
                    998: of @code{Mv} is non-negative.
                    999: \E
1.1       noro     1000: @end enumerate
                   1001:
                   1002: @noindent
1.2       noro     1003: \BJP
1.1       noro     1004: $B$3$N;~(B, 2 $B$D$N%Y%/%H%k(B @code{t}, @code{s} $B$KBP$7(B,
                   1005: @code{t>s} $B$r(B, @code{M(t-s)} $B$N(B 0 $B$G$J$$:G=i$N@.J,$,HsIi(B,
                   1006: $B$GDj5A$9$k$3$H$K$h$j9`=g=x$,Dj5A$G$-$k(B.
1.2       noro     1007: \E
                   1008: \BEG
                   1009: Then we can define a term ordering such that, for two vectors
                   1010: @code{t}, @code{s}, @code{t>s} means that the first non-zero component
                   1011: of @code{M(t-s)} is non-negative.
                   1012: \E
1.1       noro     1013:
                   1014: @noindent
1.2       noro     1015: \BJP
1.1       noro     1016: $B9`=g=x7?$O(B, @code{gr()} $B$J$I$N0z?t$H$7$F;XDj$5$l$kB>(B, $BAH$_9~$_H!?t(B
                   1017: @code{dp_ord()} $B$G;XDj$5$l(B, $B$5$^$6$^$JH!?t$N<B9T$N:]$K;2>H$5$l$k(B.
1.2       noro     1018: \E
                   1019: \BEG
                   1020: Types of term orderings are used as arguments of functions such as
                   1021: @code{gr()}. It is also set internally by @code{dp_ord()} and is used
                   1022: during executions of various functions.
                   1023: \E
1.1       noro     1024:
                   1025: @noindent
1.2       noro     1026: \BJP
1.1       noro     1027: $B$3$l$i$N=g=x$N6qBNE*$JDj5A$*$h$S%0%l%V%J4pDl$K4X$9$k99$K>\$7$$2r@b$O(B
                   1028: @code{[Becker,Weispfenning]} $B$J$I$r;2>H$N$3$H(B.
1.2       noro     1029: \E
                   1030: \BEG
                   1031: For concrete definitions of term ordering and more information
                   1032: about Groebner basis, refer to, for example, the book
                   1033: @code{[Becker,Weispfenning]}.
                   1034: \E
1.1       noro     1035:
                   1036: @noindent
1.2       noro     1037: \JP $B9`=g=x7?$N@_Dj$NB>$K(B, $BJQ?t$N=g=x<+BN$b7W;;;~4V$KBg$-$J1F6A$rM?$($k(B.
                   1038: \BEG
                   1039: Note that the variable ordering have strong effects on the computation
                   1040: time as well as the choice of types of term orderings.
                   1041: \E
1.1       noro     1042:
                   1043: @example
                   1044: [90] B=[x^10-t,x^8-z,x^31-x^6-x-y]$
                   1045: [91] gr(B,[x,y,z,t],2);
                   1046: [x^2-2*y^7+(-41*t^2-13*t-1)*y^2+(2*t^17-12*t^14+42*t^12+30*t^11-168*t^9
                   1047: -40*t^8+70*t^7+252*t^6+30*t^5-140*t^4-168*t^3+2*t^2-12*t+16)*z^2*y
                   1048: +(-12*t^16+72*t^13-28*t^11-180*t^10+112*t^8+240*t^7+28*t^6-127*t^5
                   1049: -167*t^4-55*t^3+30*t^2+58*t-15)*z^4,
1.5       noro     1050: (y+t^2*z^2)*x+y^7+(20*t^2+6*t+1)*y^2+(-t^17+6*t^14-21*t^12-15*t^11
                   1051: +84*t^9+20*t^8-35*t^7-126*t^6-15*t^5+70*t^4+84*t^3-t^2+5*t-9)*z^2*y
                   1052: +(6*t^16-36*t^13+14*t^11+90*t^10-56*t^8-120*t^7-14*t^6+64*t^5+84*t^4
                   1053: +27*t^3-16*t^2-30*t+7)*z^4,
                   1054: (t^3-1)*x-y^6+(-6*t^13+24*t^10-20*t^8-36*t^7+40*t^5+24*t^4-6*t^3-20*t^2
                   1055: -6*t-1)*y+(t^17-6*t^14+9*t^12+15*t^11-36*t^9-20*t^8-5*t^7+54*t^6+15*t^5
                   1056: +10*t^4-36*t^3-11*t^2-5*t+9)*z^2,
1.1       noro     1057: -y^8-8*t*y^3+16*z^2*y^2+(-8*t^16+48*t^13-56*t^11-120*t^10+224*t^8+160*t^7
1.5       noro     1058: -56*t^6-336*t^5-112*t^4+112*t^3+224*t^2+24*t-56)*z^4*y+(t^24-8*t^21
                   1059: +20*t^19+28*t^18-120*t^16-56*t^15+14*t^14+300*t^13+70*t^12-56*t^11
                   1060: -400*t^10-84*t^9+84*t^8+268*t^7+84*t^6-56*t^5-63*t^4-36*t^3+46*t^2
                   1061: -12*t+1)*z,2*t*y^5+z*y^2+(-2*t^11+8*t^8-20*t^6-12*t^5+40*t^3+8*t^2
                   1062: -10*t-20)*z^3*y+8*t^14-32*t^11+48*t^8-t^7-32*t^5-6*t^4+9*t^2-t,
1.1       noro     1063: -z*y^3+(t^7-2*t^4+3*t^2+t)*y+(-2*t^6+4*t^3+2*t-2)*z^2,
1.5       noro     1064: 2*t^2*y^3+z^2*y^2+(-2*t^5+4*t^2-6)*z^4*y
                   1065: +(4*t^8-t^7-8*t^5+2*t^4-4*t^3+5*t^2-t)*z,
1.1       noro     1066: z^3*y^2+2*t^3*y+(-t^7+2*t^4+t^2-t)*z^2,
                   1067: -t*z*y^2-2*z^3*y+t^8-2*t^5-t^3+t^2,
1.5       noro     1068: -t^3*y^2-2*t^2*z^2*y+(t^6-2*t^3-t+1)*z^4,z^5-t^4]
1.1       noro     1069: [93] gr(B,[t,z,y,x],2);
                   1070: [x^10-t,x^8-z,x^31-x^6-x-y]
                   1071: @end example
                   1072:
                   1073: @noindent
1.2       noro     1074: \BJP
1.1       noro     1075: $BJQ?t=g=x(B @code{[x,y,z,t]} $B$K$*$1$k%0%l%V%J4pDl$O(B, $B4pDl$N?t$bB?$/(B, $B$=$l$>$l$N(B
                   1076: $B<0$bBg$-$$(B. $B$7$+$7(B, $B=g=x(B @code{[t,z,y,x]} $B$K$b$H$G$O(B, @code{B} $B$,$9$G$K(B
                   1077: $B%0%l%V%J4pDl$H$J$C$F$$$k(B. $BBg;(GD$K$$$($P(B, $B<-=q<0=g=x$G%0%l%V%J4pDl$r5a$a$k(B
                   1078: $B$3$H$O(B, $B:8B&$N(B ($B=g=x$N9b$$(B) $BJQ?t$r(B, $B1&B&$N(B ($B=g=x$NDc$$(B) $BJQ?t$G=q$-I=$9(B
                   1079: $B$3$H$G$"$j(B, $B$3$NNc$N>l9g$O(B, @code{t},  @code{z}, @code{y} $B$,4{$K(B
                   1080: @code{x} $B$GI=$5$l$F$$$k$3$H$+$i$3$N$h$&$J6KC<$J7k2L$H$J$C$?$o$1$G$"$k(B.
                   1081: $B<B:]$K8=$l$k7W;;$K$*$$$F$O(B, $B$3$N$h$&$KA*$V$Y$-JQ?t=g=x$,L@$i$+$G$"$k(B
                   1082: $B$3$H$O>/$J$/(B, $B;n9T:x8m$,I,MW$J>l9g$b$"$k(B.
1.2       noro     1083: \E
                   1084: \BEG
                   1085: As you see in the above example, the Groebner base under variable
                   1086: ordering @code{[x,y,z,t]} has a lot of bases and each base itself is
                   1087: large.  Under variable ordering @code{[t,z,y,x]}, however, @code{B} itself
                   1088: is already the Groebner basis.
                   1089: Roughly speaking, to obtain a Groebner base under the lexicographic
                   1090: ordering is to express the variables on the left (having higher order)
                   1091: in terms of variables on the right (having lower order).
                   1092: In the example, variables @code{t},  @code{z}, and @code{y} are already
                   1093: expressed by variable @code{x}, and the above explanation justifies
                   1094: such a drastic experimental results.
                   1095: In practice, however, optimum ordering for variables may not known
                   1096: beforehand, and some heuristic trial may be inevitable.
1.13      noro     1097: \E
                   1098:
                   1099: \BJP
                   1100: @node Weight ,,, $B%0%l%V%J4pDl$N7W;;(B
                   1101: @section Weight
                   1102: \E
                   1103: \BEG
                   1104: @node Weight,,, Groebner basis computation
                   1105: @section Weight
                   1106: \E
                   1107: \BJP
                   1108: $BA0@a$G>R2p$7$?9`=g=x$O(B, $B3FJQ?t$K(B weight ($B=E$_(B) $B$r@_Dj$9$k$3$H$G(B
                   1109: $B$h$j0lHLE*$J$b$N$H$J$k(B.
                   1110: \E
                   1111: \BEG
1.14      noro     1112: Term orderings introduced in the previous section can be generalized
1.13      noro     1113: by setting a weight for each variable.
                   1114: \E
                   1115: @example
                   1116: [0] dp_td(<<1,1,1>>);
                   1117: 3
                   1118: [1] dp_set_weight([1,2,3])$
                   1119: [2] dp_td(<<1,1,1>>);
                   1120: 6
                   1121: @end example
                   1122: \BJP
                   1123: $BC19`<0$NA4<!?t$r7W;;$9$k:](B, $B%G%U%)%k%H$G$O(B
                   1124: $B3FJQ?t$N;X?t$NOB$rA4<!?t$H$9$k(B. $B$3$l$O3FJQ?t$N(B weight $B$r(B 1 $B$H(B
                   1125: $B9M$($F$$$k$3$H$KAjEv$9$k(B. $B$3$NNc$G$O(B, $BBh0l(B, $BBhFs(B, $BBh;0JQ?t$N(B
                   1126: weight $B$r$=$l$>$l(B 1,2,3 $B$H;XDj$7$F$$$k(B. $B$3$N$?$a(B, @code{<<1,1,1>>}
                   1127: $B$NA4<!?t(B ($B0J2<$G$O$3$l$rC19`<0$N(B weight $B$H8F$V(B) $B$,(B @code{1*1+1*2+1*3=6} $B$H$J$k(B.
                   1128: weight $B$r@_Dj$9$k$3$H$G(B, $BF1$89`=g=x7?$N$b$H$G0[$J$k9`=g=x$,Dj5A$G$-$k(B.
                   1129: $BNc$($P(B, weight $B$r$&$^$/@_Dj$9$k$3$H$G(B, $BB?9`<0$r(B weighted homogeneous
                   1130: $B$K$9$k$3$H$,$G$-$k>l9g$,$"$k(B.
                   1131: \E
                   1132: \BEG
                   1133: By default, the total degree of a monomial is equal to
                   1134: the sum of all exponents. This means that the weight for each variable
                   1135: is set to 1.
                   1136: In this example, the weights for the first, the second and the third
                   1137: variable are set to 1, 2 and 3 respectively.
                   1138: Therefore the total degree of @code{<<1,1,1>>} under this weight,
                   1139: which is called the weight of the monomial, is @code{1*1+1*2+1*3=6}.
1.14      noro     1140: By setting weights, different term orderings can be set under a type of
                   1141: term ordeing. In some case a polynomial can
                   1142: be made weighted homogeneous by setting an appropriate weight.
1.13      noro     1143: \E
                   1144:
                   1145: \BJP
                   1146: $B3FJQ?t$KBP$9$k(B weight $B$r$^$H$a$?$b$N$r(B weight vector $B$H8F$V(B.
                   1147: $B$9$Y$F$N@.J,$,@5$G$"$j(B, $B%0%l%V%J4pDl7W;;$K$*$$$F(B, $BA4<!?t$N(B
                   1148: $BBe$o$j$KMQ$$$i$l$k$b$N$rFC$K(B sugar weight $B$H8F$V$3$H$K$9$k(B.
                   1149: sugar strategy $B$K$*$$$F(B, $BA4<!?t$NBe$o$j$K;H$o$l$k$+$i$G$"$k(B.
                   1150: $B0lJ}$G(B, $B3F@.J,$,I,$:$7$b@5$H$O8B$i$J$$(B weight vector $B$O(B,
                   1151: sugar weight $B$H$7$F@_Dj$9$k$3$H$O$G$-$J$$$,(B, $B9`=g=x$N0lHL2=$K$O(B
                   1152: $BM-MQ$G$"$k(B. $B$3$l$i$O(B, $B9TNs$K$h$k9`=g=x$N@_Dj$K$9$G$K8=$l$F(B
                   1153: $B$$$k(B. $B$9$J$o$A(B, $B9`=g=x$rDj5A$9$k9TNs$N3F9T$,(B, $B0l$D$N(B weight vector
                   1154: $B$H8+$J$5$l$k(B. $B$^$?(B, $B%V%m%C%/=g=x$O(B, $B3F%V%m%C%/$N(B
                   1155: $BJQ?t$KBP1~$9$k@.J,$N$_(B 1 $B$GB>$O(B 0 $B$N(B weight vector $B$K$h$kHf3S$r(B
                   1156: $B:G=i$K9T$C$F$+$i(B, $B3F%V%m%C%/Kh$N(B tie breaking $B$r9T$&$3$H$KAjEv$9$k(B.
                   1157: \E
                   1158:
                   1159: \BEG
                   1160: A list of weights for all variables is called a weight vector.
                   1161: A weight vector is called a sugar weight vector if
                   1162: its elements are all positive and it is used for computing
                   1163: a weighted total degree of a monomial, because such a weight
                   1164: is used instead of total degree in sugar strategy.
                   1165: On the other hand, a weight vector whose elements are not necessarily
                   1166: positive cannot be set as a sugar weight, but it is useful for
                   1167: generalizing term order. In fact, such a weight vector already
                   1168: appeared in a matrix order. That is, each row of a matrix defining
                   1169: a term order is regarded as a weight vector. A block order
                   1170: is also considered as a refinement of comparison by weight vectors.
                   1171: It compares two terms by using a weight vector whose elements
                   1172: corresponding to variables in a block is 1 and 0 otherwise,
                   1173: then it applies a tie breaker.
1.14      noro     1174: \E
                   1175:
                   1176: \BJP
                   1177: weight vector $B$N@_Dj$O(B @code{dp_set_weight()} $B$G9T$&$3$H$,$G$-$k(B
                   1178: $B$,(B, $B9`=g=x$r;XDj$9$k:]$NB>$N%Q%i%a%?(B ($B9`=g=x7?(B, $BJQ?t=g=x(B) $B$H(B
                   1179: $B$^$H$a$F@_Dj$G$-$k$3$H$,K>$^$7$$(B. $B$3$N$?$a(B, $B<!$N$h$&$J7A$G$b(B
                   1180: $B9`=g=x$,;XDj$G$-$k(B.
                   1181: \E
                   1182: \BEG
                   1183: A weight vector can be set by using @code{dp_set_weight()}.
                   1184: However it is more preferable if a weight vector can be set
                   1185: together with other parapmeters such as a type of term ordering
                   1186: and a variable order. This is realized as follows.
                   1187: \E
1.13      noro     1188:
1.14      noro     1189: @example
                   1190: [64] B=[x+y+z-6,x*y+y*z+z*x-11,x*y*z-6]$
                   1191: [65] dp_gr_main(B|v=[x,y,z],sugarweight=[3,2,1],order=0);
                   1192: [z^3-6*z^2+11*z-6,x+y+z-6,-y^2+(-z+6)*y-z^2+6*z-11]
                   1193: [66] dp_gr_main(B|v=[y,z,x],order=[[1,1,0],[0,1,0],[0,0,1]]);
                   1194: [x^3-6*x^2+11*x-6,x+y+z-6,-x^2+(-y+6)*x-y^2+6*y-11]
                   1195: [67] dp_gr_main(B|v=[y,z,x],order=[[x,1,y,2,z,3]]);
                   1196: [x+y+z-6,x^3-6*x^2+11*x-6,-x^2+(-y+6)*x-y^2+6*y-11]
                   1197: @end example
                   1198:
                   1199: \BJP
                   1200: $B$$$:$l$NNc$K$*$$$F$b(B, $B9`=g=x$O(B option $B$H$7$F;XDj$5$l$F$$$k(B.
                   1201: $B:G=i$NNc$G$O(B @code{v} $B$K$h$jJQ?t=g=x$r(B, @code{sugarweight} $B$K$h$j(B
                   1202: sugar weight vector $B$r(B, @code{order}$B$K$h$j9`=g=x7?$r;XDj$7$F$$$k(B.
                   1203: $BFs$DL\$NNc$K$*$1$k(B @code{order} $B$N;XDj$O(B matrix order $B$HF1MM$G$"$k(B.
                   1204: $B$9$J$o$A(B, $B;XDj$5$l$?(B weight vector $B$r:8$+$i=g$K;H$C$F(B weight $B$NHf3S(B
                   1205: $B$r9T$&(B. $B;0$DL\$NNc$bF1MM$G$"$k$,(B, $B$3$3$G$O(B weight vector $B$NMWAG$r(B
                   1206: $BJQ?tKh$K;XDj$7$F$$$k(B. $B;XDj$,$J$$$b$N$O(B 0 $B$H$J$k(B. $B;0$DL\$NNc$G$O(B,
                   1207: @code{order} $B$K$h$k;XDj$G$O9`=g=x$,7hDj$7$J$$(B. $B$3$N>l9g$K$O(B,
                   1208: tie breaker $B$H$7$FA4<!?t5U<-=q<0=g=x$,<+F0E*$K@_Dj$5$l$k(B.
                   1209: $B$3$N;XDjJ}K!$O(B, @code{dp_gr_main}, @code{dp_gr_mod_main} $B$J$I(B
                   1210: $B$NAH$_9~$_4X?t$G$N$_2DG=$G$"$j(B, @code{gr} $B$J$I$N%f!<%6Dj5A4X?t(B
                   1211: $B$G$OL$BP1~$G$"$k(B.
                   1212: \E
                   1213: \BEG
                   1214: In each example, a term ordering is specified as options.
                   1215: In the first example, a variable order, a sugar weight vector
                   1216: and a type of term ordering are specified by options @code{v},
                   1217: @code{sugarweight} and @code{order} respectively.
                   1218: In the second example, an option @code{order} is used
                   1219: to set a matrix ordering. That is, the specified weight vectors
                   1220: are used from left to right for comparing terms.
                   1221: The third example shows a variant of specifying a weight vector,
                   1222: where each component of a weight vector is specified variable by variable,
                   1223: and unspecified components are set to zero. In this example,
                   1224: a term order is not determined only by the specified weight vector.
                   1225: In such a case a tie breaker by the graded reverse lexicographic ordering
                   1226: is set automatically.
                   1227: This type of a term ordering specification can be applied only to builtin
                   1228: functions such as @code{dp_gr_main()}, @code{dp_gr_mod_main()}, not to
                   1229: user defined functions such as @code{gr()}.
1.2       noro     1230: \E
1.1       noro     1231:
1.2       noro     1232: \BJP
1.1       noro     1233: @node $BM-M}<0$r78?t$H$9$k%0%l%V%J4pDl7W;;(B,,, $B%0%l%V%J4pDl$N7W;;(B
                   1234: @section $BM-M}<0$r78?t$H$9$k%0%l%V%J4pDl7W;;(B
1.2       noro     1235: \E
                   1236: \BEG
                   1237: @node Groebner basis computation with rational function coefficients,,, Groebner basis computation
                   1238: @section Groebner basis computation with rational function coefficients
                   1239: \E
1.1       noro     1240:
                   1241: @noindent
1.2       noro     1242: \BJP
1.1       noro     1243: @code{gr()} $B$J$I$N%H%C%W%l%Y%kH!?t$O(B, $B$$$:$l$b(B, $BF~NOB?9`<0%j%9%H$K(B
                   1244: $B8=$l$kJQ?t(B ($BITDj85(B) $B$H(B, $BJQ?t%j%9%H$K8=$l$kJQ?t$rHf3S$7$F(B, $BJQ?t%j%9%H$K(B
                   1245: $B$J$$JQ?t$,F~NOB?9`<0$K8=$l$F$$$k>l9g$K$O(B, $B<+F0E*$K(B, $B$=$NJQ?t$r(B, $B78?t(B
                   1246: $BBN$N85$H$7$F07$&(B.
1.2       noro     1247: \E
                   1248: \BEG
                   1249: Such variables that appear within the input polynomials but
                   1250: not appearing in the input variable list are automatically treated
                   1251: as elements in the coefficient field
                   1252: by top level functions, such as @code{gr()}.
                   1253: \E
1.1       noro     1254:
                   1255: @example
                   1256: [64] gr([a*x+b*y-c,d*x+e*y-f],[x,y],2);
                   1257: [(-e*a+d*b)*x-f*b+e*c,(-e*a+d*b)*y+f*a-d*c]
                   1258: @end example
                   1259:
                   1260: @noindent
1.2       noro     1261: \BJP
1.1       noro     1262: $B$3$NNc$G$O(B, @code{a}, @code{b}, @code{c}, @code{d} $B$,78?tBN$N85$H$7$F(B
                   1263: $B07$o$l$k(B. $B$9$J$o$A(B, $BM-M}H!?tBN(B
                   1264: @b{F} = @b{Q}(@code{a},@code{b},@code{c},@code{d}) $B>e$N(B 2 $BJQ?tB?9`<04D(B
                   1265: @b{F}[@code{x},@code{y}] $B$K$*$1$k%0%l%V%J4pDl$r5a$a$k$3$H$K$J$k(B.
                   1266: $BCm0U$9$Y$-$3$H$O(B,
                   1267: $B78?t$,BN$H$7$F07$o$l$F$$$k$3$H$G$"$k(B. $B$9$J$o$A(B, $B78?t$N4V$KB?9`<0(B
                   1268: $B$H$7$F$N6&DL0x;R$,$"$C$?>l9g$K$O(B, $B7k2L$+$i$=$N0x;R$O=|$+$l$F$$$k(B
                   1269: $B$?$a(B, $BM-M}?tBN>e$NB?9`<04D>e$NLdBj$H$7$F9M$($?>l9g$N7k2L$H$O0lHL(B
                   1270: $B$K$O0[$J$k(B. $B$^$?(B, $B<g$H$7$F7W;;8zN(>e$NLdBj$N$?$a(B, $BJ,;6I=8=B?9`<0(B
                   1271: $B$N78?t$H$7$F<B:]$K5v$5$l$k$N$OB?9`<0$^$G$G$"$k(B. $B$9$J$o$A(B, $BJ,Jl$r(B
                   1272: $B;}$DM-M}<0$OJ,;6I=8=B?9`<0$N78?t$H$7$F$O5v$5$l$J$$(B.
1.2       noro     1273: \E
                   1274: \BEG
                   1275: In this example, variables @code{a}, @code{b}, @code{c}, and @code{d}
                   1276: are treated as elements in the coefficient field.
                   1277: In this case, a Groebner basis is computed
                   1278: on a bi-variate polynomial ring
                   1279: @b{F}[@code{x},@code{y}]
                   1280: over rational function field
                   1281:  @b{F} = @b{Q}(@code{a},@code{b},@code{c},@code{d}).
                   1282: Notice that coefficients are considered as a member in a field.
                   1283: As a consequence, polynomial factors common to the coefficients
                   1284: are removed so that the result, in general, is different from
                   1285: the result that would be obtained when the problem is considered
                   1286: as a computation of Groebner basis over a polynomial ring
                   1287: with rational function coefficients.
                   1288: And note that coefficients of a distributed polynomial are limited
                   1289: to numbers and polynomials because of efficiency.
                   1290: \E
1.1       noro     1291:
1.2       noro     1292: \BJP
1.1       noro     1293: @node $B4pDlJQ49(B,,, $B%0%l%V%J4pDl$N7W;;(B
                   1294: @section $B4pDlJQ49(B
1.2       noro     1295: \E
                   1296: \BEG
                   1297: @node Change of ordering,,, Groebner basis computation
                   1298: @section Change of orderng
                   1299: \E
1.1       noro     1300:
                   1301: @noindent
1.2       noro     1302: \BJP
1.1       noro     1303: $B<-=q<0=g=x$N%0%l%V%J4pDl$r5a$a$k>l9g(B, $BD>@\(B @code{gr()} $B$J$I$r5/F0$9$k(B
                   1304: $B$h$j(B, $B0lC6B>$N=g=x(B ($BNc$($PA4<!?t5U<-=q<0=g=x(B) $B$N%0%l%V%J4pDl$r7W;;$7$F(B,
                   1305: $B$=$l$rF~NO$H$7$F<-=q<0=g=x$N%0%l%V%J4pDl$r7W;;$9$kJ}$,8zN($,$h$$>l9g(B
                   1306: $B$,$"$k(B. $B$^$?(B, $BF~NO$,2?$i$+$N=g=x$G$N%0%l%V%J4pDl$K$J$C$F$$$k>l9g(B, $B4pDl(B
                   1307: $BJQ49$H8F$P$l$kJ}K!$K$h$j(B, Buchberger $B%"%k%4%j%:%`$K$h$i$:$K8zN(NI$/(B
                   1308: $B<-=q<0=g=x$N%0%l%V%J4pDl$,7W;;$G$-$k>l9g$,$"$k(B. $B$3$N$h$&$JL\E*$N$?$a$N(B
                   1309: $BH!?t$,(B, $B%f!<%6Dj5AH!?t$H$7$F(B @samp{gr} $B$K$$$/$D$+Dj5A$5$l$F$$$k(B.
                   1310: $B0J2<$N(B 2 $B$D$NH!?t$O(B, $BJQ?t=g=x(B @var{vlist1}, $B9`=g=x7?(B @var{order} $B$G(B
                   1311: $B4{$K%0%l%V%J4pDl$H$J$C$F$$$kB?9`<0%j%9%H(B @var{gbase} $B$r(B, $BJQ?t=g=x(B
                   1312: @var{vlist2} $B$K$*$1$k<-=q<0=g=x$N%0%l%V%J4pDl$KJQ49$9$kH!?t$G$"$k(B.
1.2       noro     1313: \E
                   1314: \BEG
                   1315: When we compute a lex order Groebner basis, it is often efficient to
                   1316: compute it via Groebner basis with respect to another order such as
                   1317: degree reverse lex order, rather than to compute it directory by
                   1318: @code{gr()} etc. If we know that an input is a Groebner basis with
                   1319: respect to an order, we can apply special methods called change of
                   1320: ordering for a Groebner basis computation with respect to another
                   1321: order, without using Buchberger algorithm. The following two functions
                   1322: are ones for change of ordering such that they convert a Groebner
                   1323: basis @var{gbase} with respect to the variable order @var{vlist1} and
                   1324: the order type @var{order} into a lex Groebner basis with respect
                   1325: to the variable order @var{vlist2}.
                   1326: \E
1.1       noro     1327:
                   1328: @table @code
                   1329: @item tolex(@var{gbase},@var{vlist1},@var{order},@var{vlist2})
                   1330:
1.2       noro     1331: \BJP
1.1       noro     1332: $B$3$NH!?t$O(B, @var{gbase} $B$,M-M}?tBN>e$N%7%9%F%`$N>l9g$K$N$_;HMQ2DG=$G$"$k(B.
                   1333: $B$3$NH!?t$O(B, $B<-=q<0=g=x$N%0%l%V%J4pDl$r(B, $BM-8BBN>e$G7W;;$5$l$?%0%l%V%J4pDl(B
                   1334: $B$r?w7?$H$7$F(B, $BL$Dj78?tK!$*$h$S(B Hensel $B9=@.$K$h$j5a$a$k$b$N$G$"$k(B.
1.2       noro     1335: \E
                   1336: \BEG
                   1337: This function can be used only when @var{gbase} is an ideal over the
                   1338: rationals.  The input @var{gbase} must be a Groebner basis with respect
                   1339: to the variable order @var{vlist1} and the order type @var{order}. Moreover
                   1340: the ideal generated by @var{gbase} must be zero-dimensional.
                   1341: This computes the lex Groebner basis of @var{gbase}
                   1342: by using the modular change of ordering algorithm. The algorithm first
                   1343: computes the lex Groebner basis over a finite field. Then each element
                   1344: in the lex Groebner basis over the rationals is computed with undetermined
                   1345: coefficient method and linear equation solving by Hensel lifting.
                   1346: \E
1.1       noro     1347:
                   1348: @item tolex_tl(@var{gbase},@var{vlist1},@var{order},@var{vlist2},@var{homo})
                   1349:
1.2       noro     1350: \BJP
1.1       noro     1351: $B$3$NH!?t$O(B, $B<-=q<0=g=x$N%0%l%V%J4pDl$r(B Buchberger $B%"%k%4%j%:%`$K$h$j5a(B
                   1352: $B$a$k$b$N$G$"$k$,(B, $BF~NO$,$"$k=g=x$K$*$1$k%0%l%V%J4pDl$G$"$k>l9g$N(B
                   1353: trace-lifting$B$K$*$1$k%0%l%V%J4pDl8uJd$NF,9`(B, $BF,78?t$N@-<A$rMxMQ$7$F(B,
                   1354: $B:G=*E*$J%0%l%V%J4pDl%A%'%C%/(B, $B%$%G%"%k%a%s%P%7%C%W%A%'%C%/$r>JN,$7$F$$(B
                   1355: $B$k$?$a(B, $BC1$K(BBuchberger $B%"%k%4%j%:%`$r7+$jJV$9$h$j8zN($h$/7W;;$G$-$k(B.
                   1356: $B99$K(B, $BF~NO$,(B 0 $B<!85%7%9%F%`$N>l9g(B, $B<+F0E*$K$b$&(B 1 $B$D$NCf4VE*$J9`=g=x$r(B
                   1357: $B7PM3$7$F<-=q<0=g=x$N%0%l%V%J4pDl$r7W;;$9$k(B. $BB?$/$N>l9g(B, $B$3$NJ}K!$O(B,
                   1358: $BD>@\<-=q<0=g=x$N7W;;$r9T$&$h$j8zN($,$h$$(B. ($B$b$A$m$sNc30$"$j(B. )
                   1359: $B0z?t(B @var{homo} $B$,(B 0 $B$G$J$$;~(B, @code{hgr()} $B$HF1MM$K@F<!2=$r7PM3$7$F(B
                   1360: $B7W;;$r9T$&(B.
1.2       noro     1361: \E
                   1362: \BEG
                   1363: This function computes the lex Groebner basis of @var{gbase}.  The
                   1364: input @var{gbase} must be a Groebner basis with respect to the
                   1365: variable order @var{vlist1} and the order type @var{order}.
                   1366: Buchberger algorithm with trace lifting is used to compute the lex
                   1367: Groebner basis, however the Groebner basis check and the ideal
                   1368: membership check can be omitted by using several properties derived
                   1369: from the fact that the input is a Groebner basis. So it is more
                   1370: efficient than simple repetition of Buchberger algorithm. If the input
                   1371: is zero-dimensional, this function inserts automatically a computation
                   1372: of Groebner basis with respect to an elimination order, which makes
                   1373: the whole computation more efficient for many cases. If @var{homo} is
                   1374: not equal to 0, homogenization is used in each step.
                   1375: \E
1.1       noro     1376: @end table
                   1377:
                   1378: @noindent
1.2       noro     1379: \BJP
1.1       noro     1380: $B$=$NB>(B, 0 $B<!85%7%9%F%`$KBP$7(B, $BM?$($i$l$?B?9`<0$N:G>.B?9`<0$r5a$a$k(B
                   1381: $BH!?t(B, 0 $B<!85%7%9%F%`$N2r$r(B, $B$h$j%3%s%Q%/%H$KI=8=$9$k$?$a$NH!?t$J$I$,(B
                   1382: @samp{gr} $B$GDj5A$5$l$F$$$k(B. $B$3$l$i$K$D$$$F$O8D!9$NH!?t$N@bL@$r;2>H$N$3$H(B.
1.2       noro     1383: \E
                   1384: \BEG
                   1385: For zero-dimensional systems, there are several fuctions to
                   1386: compute the minimal polynomial of a polynomial and or a more compact
                   1387: representation for zeros of the system. They are all defined in @samp{gr}.
                   1388: Refer to the sections for each functions.
                   1389: \E
1.1       noro     1390:
1.2       noro     1391: \BJP
1.6       noro     1392: @node Weyl $BBe?t(B,,, $B%0%l%V%J4pDl$N7W;;(B
                   1393: @section Weyl $BBe?t(B
                   1394: \E
                   1395: \BEG
                   1396: @node Weyl algebra,,, Groebner basis computation
                   1397: @section Weyl algebra
                   1398: \E
                   1399:
                   1400: @noindent
                   1401:
                   1402: \BJP
                   1403: $B$3$l$^$G$O(B, $BDL>o$N2D49$JB?9`<04D$K$*$1$k%0%l%V%J4pDl7W;;$K$D$$$F(B
                   1404: $B=R$Y$F$-$?$,(B, $B%0%l%V%J4pDl$NM}O@$O(B, $B$"$k>r7o$rK~$?$9Hs2D49$J(B
                   1405: $B4D$K$b3HD%$G$-$k(B. $B$3$N$h$&$J4D$NCf$G(B, $B1~MQ>e$b=EMW$J(B,
                   1406: Weyl $BBe?t(B, $B$9$J$o$AB?9`<04D>e$NHyJ,:nMQAG4D$N1i;;$*$h$S(B
                   1407: $B%0%l%V%J4pDl7W;;$,(B Risa/Asir $B$K<BAu$5$l$F$$$k(B.
                   1408:
                   1409: $BBN(B @code{K} $B>e$N(B @code{n} $B<!85(B Weyl $BBe?t(B
                   1410: @code{D=K<x1,@dots{},xn,D1,@dots{},Dn>} $B$O(B
                   1411: \E
                   1412:
                   1413: \BEG
                   1414: So far we have explained Groebner basis computation in
                   1415: commutative polynomial rings. However Groebner basis can be
                   1416: considered in more general non-commutative rings.
                   1417: Weyl algebra is one of such rings and
                   1418: Risa/Asir implements fundamental operations
                   1419: in Weyl algebra and Groebner basis computation in Weyl algebra.
                   1420:
                   1421: The @code{n} dimensional Weyl algebra over a field @code{K},
                   1422: @code{D=K<x1,@dots{},xn,D1,@dots{},Dn>} is a non-commutative
                   1423: algebra which has the following fundamental relations:
                   1424: \E
                   1425:
                   1426: @code{xi*xj-xj*xi=0}, @code{Di*Dj-Dj*Di=0}, @code{Di*xj-xj*Di=0} (@code{i!=j}),
                   1427: @code{Di*xi-xi*Di=1}
                   1428:
                   1429: \BJP
                   1430: $B$H$$$&4pK\4X78$r;}$D4D$G$"$k(B. @code{D} $B$O(B $BB?9`<04D(B @code{K[x1,@dots{},xn]} $B$r78?t(B
                   1431: $B$H$9$kHyJ,:nMQAG4D$G(B,  @code{Di} $B$O(B @code{xi} $B$K$h$kHyJ,$rI=$9(B. $B8r494X78$K$h$j(B,
                   1432: @code{D} $B$N85$O(B, @code{x1^i1*@dots{}*xn^in*D1^j1*@dots{}*Dn^jn} $B$J$kC19`(B
                   1433: $B<0$N(B @code{K} $B@~7A7k9g$H$7$F=q$-I=$9$3$H$,$G$-$k(B.
                   1434: Risa/Asir $B$K$*$$$F$O(B, $B$3$NC19`<0$r(B, $B2D49$JB?9`<0$HF1MM$K(B
                   1435: @code{<<i1,@dots{},in,j1,@dots{},jn>>} $B$GI=$9(B. $B$9$J$o$A(B, @code{D} $B$N85$b(B
                   1436: $BJ,;6I=8=B?9`<0$H$7$FI=$5$l$k(B. $B2C8:;;$O(B, $B2D49$N>l9g$HF1MM$K(B, @code{+}, @code{-}
                   1437: $B$K$h$j(B
                   1438: $B<B9T$G$-$k$,(B, $B>h;;$O(B, $BHs2D49@-$r9MN8$7$F(B @code{dp_weyl_mul()} $B$H$$$&4X?t(B
                   1439: $B$K$h$j<B9T$9$k(B.
                   1440: \E
                   1441:
                   1442: \BEG
                   1443: @code{D} is the ring of differential operators whose coefficients
                   1444: are polynomials in @code{K[x1,@dots{},xn]} and
                   1445: @code{Di} denotes the differentiation with respect to  @code{xi}.
                   1446: According to the commutation relation,
                   1447: elements of @code{D} can be represented as a @code{K}-linear combination
                   1448: of monomials @code{x1^i1*@dots{}*xn^in*D1^j1*@dots{}*Dn^jn}.
                   1449: In Risa/Asir, this type of monomial is represented
                   1450: by @code{<<i1,@dots{},in,j1,@dots{},jn>>} as in the case of commutative
                   1451: polynomial.
                   1452: That is, elements of @code{D} are represented by distributed polynomials.
                   1453: Addition and subtraction can be done by @code{+}, @code{-},
                   1454: but multiplication is done by calling @code{dp_weyl_mul()} because of
                   1455: the non-commutativity of @code{D}.
                   1456: \E
                   1457:
                   1458: @example
                   1459: [0] A=<<1,2,2,1>>;
                   1460: (1)*<<1,2,2,1>>
                   1461: [1] B=<<2,1,1,2>>;
                   1462: (1)*<<2,1,1,2>>
                   1463: [2] A*B;
                   1464: (1)*<<3,3,3,3>>
                   1465: [3] dp_weyl_mul(A,B);
                   1466: (1)*<<3,3,3,3>>+(1)*<<3,2,3,2>>+(4)*<<2,3,2,3>>+(4)*<<2,2,2,2>>
                   1467: +(2)*<<1,3,1,3>>+(2)*<<1,2,1,2>>
                   1468: @end example
                   1469:
                   1470: \BJP
                   1471: $B%0%l%V%J4pDl7W;;$K$D$$$F$b(B, Weyl $BBe?t@lMQ$N4X?t$H$7$F(B,
                   1472: $B<!$N4X?t$,MQ0U$7$F$"$k(B.
                   1473: \E
                   1474: \BEG
                   1475: The following functions are avilable for Groebner basis computation
                   1476: in Weyl algebra:
                   1477: \E
                   1478: @code{dp_weyl_gr_main()},
                   1479: @code{dp_weyl_gr_mod_main()},
                   1480: @code{dp_weyl_gr_f_main()},
                   1481: @code{dp_weyl_f4_main()},
                   1482: @code{dp_weyl_f4_mod_main()}.
                   1483: \BJP
                   1484: $B$^$?(B, $B1~MQ$H$7$F(B, global b $B4X?t$N7W;;$,<BAu$5$l$F$$$k(B.
                   1485: \E
                   1486: \BEG
                   1487: Computation of the global b function is implemented as an application.
                   1488: \E
                   1489:
                   1490: \BJP
1.23    ! noro     1491: @node $BB?9`<04D>e$N2C72(B,,, $B%0%l%V%J4pDl$N7W;;(B
        !          1492: @section $BB?9`<04D>e$N2C72(B
        !          1493: \E
        !          1494: \BEG
        !          1495: @node Module over a polynomial ring,,, Groebner basis computation
        !          1496: @section Module over a polynomial ring
        !          1497: \E
        !          1498:
        !          1499: @noindent
        !          1500:
        !          1501: \BJP
        !          1502: $BB?9`<04D>e$N<+M32C72$N85$O(B, $B2C72C19`<0(B te_i $B$N@~7?OB$H$7$FFbItI=8=$5$l$k(B.
        !          1503: $B$3$3$G(B t $B$OB?9`<04D$NC19`<0(B, e_i $B$O<+M32C72$NI8=`4pDl$G$"$k(B. $B2C72C19`<0$O(B, $BB?9`<04D$NC19`<0(B
        !          1504: $B$K0LCV(B i $B$rDI2C$7$?(B @code{<<a,b,...,c:i>>} $B$GI=$9(B. $B2C72B?9`<0(B, $B$9$J$o$A2C72C19`<0$N@~7?OB$O(B,
        !          1505: $B@_Dj$5$l$F$$$k2C729`=g=x$K$7$?$,$C$F9_=g$K@0Ns$5$l$k(B. $B2C729`=g=x$K$O0J2<$N(B3$B<oN`$,$"$k(B.
        !          1506:
        !          1507: @table @code
        !          1508: @item TOP $B=g=x(B
        !          1509:
        !          1510: $B$3$l$O(B, te_i > se_j $B$H$J$k$N$O(B t>s $B$^$?$O(B (t=s $B$+$D(B i<j) $B$H$J$k$h$&$J9`=g=x$G$"$k(B. $B$3$3$G(B,
        !          1511: t, s $B$NHf3S$OB?9`<04D$K@_Dj$5$l$F$$$k=g=x$G9T$&(B.
        !          1512: $B$3$N7?$N=g=x$O(B, @code{dp_ord([0,Ord])} $B$K(B
        !          1513: $B$h$j@_Dj$9$k(B. $B$3$3$G(B, @code{Ord} $B$OB?9`<04D$N=g=x7?$G$"$k(B.
        !          1514:
        !          1515: @item POT $B=g=x(B
        !          1516:
        !          1517: $B$3$l$O(B, te_i > se_j $B$H$J$k$N$O(B i<j $B$^$?$O(B (i=j $B$+$D(B t>s) $B$H$J$k$h$&$J9`=g=x$G$"$k(B. $B$3$3$G(B,
        !          1518: t, s $B$NHf3S$OB?9`<04D$K@_Dj$5$l$F$$$k=g=x$G9T$&(B.
        !          1519: $B$3$N7?$N=g=x$O(B, @code{dp_ord([1,Ord])} $B$K(B
        !          1520: $B$h$j@_Dj$9$k(B. $B$3$3$G(B, @code{Ord} $B$OB?9`<04D$N=g=x7?$G$"$k(B.
        !          1521:
        !          1522: @item Schreyer $B7?=g=x(B
        !          1523:
        !          1524: $B3FI8=`4pDl(B e_i $B$KBP$7(B, $BJL$N<+M32C72$N2C72C19`<0(B T_i $B$,M?$($i$l$F$$$F(B, te_i > se_j $B$H$J$k$N$O(B
        !          1525: tT_i > sT_j $B$^$?$O(B (tT_i=sT_j $B$+$D(B i<j) $B$H$J$k$h$&$J9`=g=x$G$"$k(B. $B$3$3$G(B tT_i, sT_j $B$N(B
        !          1526: $BHf3S$O(B, $B$3$l$i$,=jB0$9$k<+M32C72$K@_Dj$5$l$F$$$k=g=x$G9T$&(B.
        !          1527: $B$3$N7?$N=g=x$O(B, $BDL>o:F5"E*$K@_Dj$5$l$k(B. $B$9$J$o$A(B, T_i $B$,=jB0$9$k<+M32C72$N=g=x$b(B Schreyer $B7?(B
        !          1528: $B$G$"$k$+(B, $B$^$?$O%\%H%`$H$J$k(B TOP, POT $B$J$I$N9`=g=x$H$J$k(B.
        !          1529: $B$3$N7?$N=g=x$O(B @code{dpm_set_schreyer([H_1,H_2,...])} $B$K$h$j;XDj$9$k(B. $B$3$3$G(B,
        !          1530: @code{H_i=[T_1,T_2,...]} $B$O2C72C19`<0$N%j%9%H$G(B, @code{[H_2,...]} $B$GDj5A$5$l$k(B Schreyer $B7?9`=g=x$r(B
        !          1531: @code{tT_i} $B$i$KE,MQ$9$k$H$$$&0UL#$G$"$k(B.
        !          1532: @end table
        !          1533:
        !          1534: $B2C72B?9`<0$rF~NO$9$kJ}K!$H$7$F$O(B, @code{<<a,b,...:i>>} $B$J$k7A<0$GD>@\F~NO$9$kB>$K(B,
        !          1535: $BB?9`<0%j%9%H$r:n$j(B, @code{dpm_ltod()} $B$K$h$jJQ49$9$kJ}K!$b$"$k(B.
        !          1536: \E
        !          1537: \BEG
        !          1538: not yet
        !          1539: \E
        !          1540:
        !          1541: \BJP
1.1       noro     1542: @node $B%0%l%V%J4pDl$K4X$9$kH!?t(B,,, $B%0%l%V%J4pDl$N7W;;(B
                   1543: @section $B%0%l%V%J4pDl$K4X$9$kH!?t(B
1.2       noro     1544: \E
                   1545: \BEG
                   1546: @node Functions for Groebner basis computation,,, Groebner basis computation
                   1547: @section Functions for Groebner basis computation
                   1548: \E
1.1       noro     1549:
                   1550: @menu
                   1551: * gr hgr gr_mod::
                   1552: * lex_hensel lex_tl tolex tolex_d tolex_tl::
                   1553: * lex_hensel_gsl tolex_gsl tolex_gsl_d::
                   1554: * gr_minipoly minipoly::
                   1555: * tolexm minipolym::
1.6       noro     1556: * dp_gr_main dp_gr_mod_main dp_gr_f_main dp_weyl_gr_main dp_weyl_gr_mod_main dp_weyl_gr_f_main::
                   1557: * dp_f4_main dp_f4_mod_main dp_weyl_f4_main dp_weyl_f4_mod_main::
1.17      noro     1558: * nd_gr nd_gr_trace nd_f4 nd_f4_trace nd_weyl_gr nd_weyl_gr_trace::
1.22      noro     1559: * nd_gr_postproc nd_weyl_gr_postproc::
1.1       noro     1560: * dp_gr_flags dp_gr_print::
                   1561: * dp_ord::
1.18      noro     1562: * dp_set_weight dp_set_top_weight dp_weyl_set_weight::
1.1       noro     1563: * dp_ptod::
                   1564: * dp_dtop::
                   1565: * dp_mod dp_rat::
                   1566: * dp_homo dp_dehomo::
                   1567: * dp_ptozp dp_prim::
1.18      noro     1568: * dp_nf dp_nf_mod dp_true_nf dp_true_nf_mod dp_weyl_nf dp_weyl_nf_mod::
1.1       noro     1569: * dp_hm dp_ht dp_hc dp_rest::
1.23    ! noro     1570: * dpm_hm dpm_ht dpm_hc dpm_hp dpm_rest::
1.1       noro     1571: * dp_td dp_sugar::
                   1572: * dp_lcm::
                   1573: * dp_redble::
                   1574: * dp_subd::
                   1575: * dp_mbase::
                   1576: * dp_mag::
                   1577: * dp_red dp_red_mod::
                   1578: * dp_sp dp_sp_mod::
                   1579: * p_nf p_nf_mod p_true_nf p_true_nf_mod ::
                   1580: * p_terms::
                   1581: * gb_comp::
                   1582: * katsura hkatsura cyclic hcyclic::
                   1583: * dp_vtoe dp_etov::
                   1584: * lex_hensel_gsl tolex_gsl tolex_gsl_d::
1.3       noro     1585: * primadec primedec::
1.5       noro     1586: * primedec_mod::
1.10      noro     1587: * bfunction bfct generic_bfct ann ann0::
1.1       noro     1588: @end menu
                   1589:
1.2       noro     1590: \JP @node gr hgr gr_mod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   1591: \EG @node gr hgr gr_mod,,, Functions for Groebner basis computation
1.1       noro     1592: @subsection @code{gr}, @code{hgr}, @code{gr_mod}, @code{dgr}
                   1593: @findex gr
                   1594: @findex hgr
                   1595: @findex gr_mod
                   1596: @findex dgr
                   1597:
                   1598: @table @t
                   1599: @item gr(@var{plist},@var{vlist},@var{order})
                   1600: @itemx hgr(@var{plist},@var{vlist},@var{order})
                   1601: @itemx gr_mod(@var{plist},@var{vlist},@var{order},@var{p})
                   1602: @itemx dgr(@var{plist},@var{vlist},@var{order},@var{procs})
1.2       noro     1603: \JP :: $B%0%l%V%J4pDl$N7W;;(B
                   1604: \EG :: Groebner basis computation
1.1       noro     1605: @end table
                   1606:
                   1607: @table @var
                   1608: @item return
1.2       noro     1609: \JP $B%j%9%H(B
                   1610: \EG list
1.4       noro     1611: @item plist  vlist  procs
1.2       noro     1612: \JP $B%j%9%H(B
                   1613: \EG list
1.1       noro     1614: @item order
1.2       noro     1615: \JP $B?t(B, $B%j%9%H$^$?$O9TNs(B
                   1616: \EG number, list or matrix
1.1       noro     1617: @item p
1.2       noro     1618: \JP 2^27 $BL$K~$NAG?t(B
                   1619: \EG prime less than 2^27
1.1       noro     1620: @end table
                   1621:
                   1622: @itemize @bullet
1.2       noro     1623: \BJP
1.1       noro     1624: @item
                   1625: $BI8=`%i%$%V%i%j$N(B @samp{gr} $B$GDj5A$5$l$F$$$k(B.
                   1626: @item
1.21      takayama 1627: gr $B$rL>A0$K4^$`4X?t$O8=:_%a%s%F$5$l$F$$$J$$(B. @code{nd_gr}$B7O$N4X?t$rBe$o$j$KMxMQ$9$Y$-$G$"$k(B(@fref{nd_gr nd_gr_trace nd_f4 nd_f4_trace nd_weyl_gr nd_weyl_gr_trace}).
                   1628: @item
1.1       noro     1629: $B$$$:$l$b(B, $BB?9`<0%j%9%H(B @var{plist} $B$N(B, $BJQ?t=g=x(B @var{vlist}, $B9`=g=x7?(B
                   1630: @var{order} $B$K4X$9$k%0%l%V%J4pDl$r5a$a$k(B. @code{gr()}, @code{hgr()}
                   1631: $B$O(B $BM-M}?t78?t(B, @code{gr_mod()} $B$O(B GF(@var{p}) $B78?t$H$7$F7W;;$9$k(B.
                   1632: @item
                   1633: @var{vlist} $B$OITDj85$N%j%9%H(B. @var{vlist} $B$K8=$l$J$$ITDj85$O(B,
                   1634: $B78?tBN$KB0$9$k$H8+$J$5$l$k(B.
                   1635: @item
                   1636: @code{gr()}, trace-lifting ($B%b%8%e%i1i;;$rMQ$$$?9bB.2=(B) $B$*$h$S(B sugar
                   1637: strategy $B$K$h$k7W;;(B, @code{hgr()} $B$O(B trace-lifting $B$*$h$S(B
                   1638: $B@F<!2=$K$h$k(B $B6:@5$5$l$?(B sugar strategy $B$K$h$k7W;;$r9T$&(B.
                   1639: @item
1.16      fujiwara 1640: @code{dgr()} $B$O(B, @code{gr()}, @code{hgr()} $B$r(B
1.1       noro     1641: $B;R%W%m%;%9%j%9%H(B @var{procs} $B$N(B 2 $B$D$N%W%m%;%9$K$h$jF1;~$K7W;;$5$;(B,
                   1642: $B@h$K7k2L$rJV$7$?J}$N7k2L$rJV$9(B. $B7k2L$OF10l$G$"$k$,(B, $B$I$A$i$NJ}K!$,(B
                   1643: $B9bB.$+0lHL$K$OITL@$N$?$a(B, $B<B:]$N7P2a;~4V$rC;=L$9$k$N$KM-8z$G$"$k(B.
                   1644: @item
                   1645: @code{dgr()} $B$GI=<($5$l$k;~4V$O(B, $B$3$NH!?t$,<B9T$5$l$F$$$k%W%m%;%9$G$N(B
                   1646: CPU $B;~4V$G$"$j(B, $B$3$NH!?t$N>l9g$O$[$H$s$IDL?.$N$?$a$N;~4V$G$"$k(B.
1.12      takayama 1647: @item
                   1648: $BB?9`<0%j%9%H(B @var{plist} $B$NMWAG$,J,;6I=8=B?9`<0$N>l9g$O(B
                   1649: $B7k2L$bJ,;6I=8=B?9`<0$N%j%9%H$G$"$k(B.
                   1650: $B$3$N>l9g(B, $B0z?t$NJ,;6B?9`<0$OM?$($i$l$?=g=x$K=>$$(B @code{dp_sort} $B$G(B
                   1651: $B%=!<%H$5$l$F$+$i7W;;$5$l$k(B.
                   1652: $BB?9`<0%j%9%H$NMWAG$,J,;6I=8=B?9`<0$N>l9g$b(B
                   1653: $BJQ?t$N?tJ,$NITDj85$N%j%9%H$r(B @var{vlist} $B0z?t$H$7$FM?$($J$$$H$$$1$J$$(B
                   1654: ($B%@%_!<(B).
1.2       noro     1655: \E
                   1656: \BEG
                   1657: @item
                   1658: These functions are defined in @samp{gr} in the standard library
                   1659: directory.
1.21      takayama 1660: @item
                   1661: Functions of which names contains gr are obsolted.
                   1662: Functions of @code{nd_gr} families should be used (@fref{nd_gr nd_gr_trace nd_f4 nd_f4_trace nd_weyl_gr nd_weyl_gr_trace}).
1.2       noro     1663: @item
                   1664: They compute a Groebner basis of a polynomial list @var{plist} with
                   1665: respect to the variable order @var{vlist} and the order type @var{order}.
                   1666: @code{gr()} and @code{hgr()} compute a Groebner basis over the rationals
                   1667: and @code{gr_mod} computes over GF(@var{p}).
                   1668: @item
                   1669: Variables not included in @var{vlist} are regarded as
                   1670: included in the ground field.
                   1671: @item
                   1672: @code{gr()} uses trace-lifting (an improvement by modular computation)
                   1673:  and sugar strategy.
                   1674: @code{hgr()} uses trace-lifting and a cured sugar strategy
                   1675: by using homogenization.
                   1676: @item
                   1677: @code{dgr()} executes @code{gr()}, @code{dgr()} simultaneously on
                   1678: two process in a child process list @var{procs} and returns
                   1679: the result obtained first. The results returned from both the process
                   1680: should be equal, but it is not known in advance which method is faster.
                   1681: Therefore this function is useful to reduce the actual elapsed time.
                   1682: @item
                   1683: The CPU time shown after an exection of @code{dgr()} indicates
                   1684: that of the master process, and most of the time corresponds to the time
                   1685: for communication.
1.12      takayama 1686: @item
                   1687: When the elements of @var{plist} are distributed polynomials,
                   1688: the result is also a list of distributed polynomials.
                   1689: In this case, firstly  the elements of @var{plist} is sorted by @code{dp_sort}
                   1690: and the Grobner basis computation is started.
                   1691: Variables must be given in @var{vlist} even in this case
                   1692: (these variables are dummy).
1.2       noro     1693: \E
1.1       noro     1694: @end itemize
                   1695:
                   1696: @example
                   1697: [0] load("gr")$
                   1698: [64] load("cyclic")$
                   1699: [74] G=gr(cyclic(5),[c0,c1,c2,c3,c4],2);
                   1700: [c4^15+122*c4^10-122*c4^5-1,...]
                   1701: [75] GM=gr_mod(cyclic(5),[c0,c1,c2,c3,c4],2,31991)$
                   1702: 24628*c4^15+29453*c4^10+2538*c4^5+7363
                   1703: [76] (G[0]*24628-GM[0])%31991;
                   1704: 0
                   1705: @end example
                   1706:
                   1707: @table @t
1.2       noro     1708: \JP @item $B;2>H(B
                   1709: \EG @item References
1.6       noro     1710: @fref{dp_gr_main dp_gr_mod_main dp_gr_f_main dp_weyl_gr_main dp_weyl_gr_mod_main dp_weyl_gr_f_main},
1.1       noro     1711: @fref{dp_ord}.
                   1712: @end table
                   1713:
1.2       noro     1714: \JP @node lex_hensel lex_tl tolex tolex_d tolex_tl,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   1715: \EG @node lex_hensel lex_tl tolex tolex_d tolex_tl,,, Functions for Groebner basis computation
1.1       noro     1716: @subsection @code{lex_hensel}, @code{lex_tl}, @code{tolex}, @code{tolex_d}, @code{tolex_tl}
                   1717: @findex lex_hensel
                   1718: @findex lex_tl
                   1719: @findex tolex
                   1720: @findex tolex_d
                   1721: @findex tolex_tl
                   1722:
                   1723: @table @t
                   1724: @item lex_hensel(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{homo})
                   1725: @itemx lex_tl(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{homo})
1.2       noro     1726: \JP :: $B4pDlJQ49$K$h$k<-=q<0=g=x%0%l%V%J4pDl$N7W;;(B
                   1727: \EG:: Groebner basis computation with respect to a lex order by change of ordering
1.1       noro     1728: @item tolex(@var{plist},@var{vlist1},@var{order},@var{vlist2})
                   1729: @itemx tolex_d(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{procs})
                   1730: @itemx tolex_tl(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{homo})
1.2       noro     1731: \JP :: $B%0%l%V%J4pDl$rF~NO$H$9$k(B, $B4pDlJQ49$K$h$k<-=q<0=g=x%0%l%V%J4pDl$N7W;;(B
                   1732: \EG :: Groebner basis computation with respect to a lex order by change of ordering, starting from a Groebner basis
1.1       noro     1733: @end table
                   1734:
                   1735: @table @var
                   1736: @item return
1.2       noro     1737: \JP $B%j%9%H(B
                   1738: \EG list
1.4       noro     1739: @item plist  vlist1  vlist2  procs
1.2       noro     1740: \JP $B%j%9%H(B
                   1741: \EG list
1.1       noro     1742: @item order
1.2       noro     1743: \JP $B?t(B, $B%j%9%H$^$?$O9TNs(B
                   1744: \EG number, list or matrix
1.1       noro     1745: @item homo
1.2       noro     1746: \JP $B%U%i%0(B
                   1747: \EG flag
1.1       noro     1748: @end table
                   1749:
                   1750: @itemize @bullet
1.2       noro     1751: \BJP
1.1       noro     1752: @item
                   1753: $BI8=`%i%$%V%i%j$N(B @samp{gr} $B$GDj5A$5$l$F$$$k(B.
                   1754: @item
                   1755: @code{lex_hensel()}, @code{lex_tl()} $B$O(B,
                   1756: $BB?9`<0%j%9%H(B @var{plist} $B$N(B, $BJQ?t=g=x(B @var{vlist1}, $B9`=g=x7?(B
                   1757: @var{order} $B$K4X$9$k%0%l%V%J4pDl$r5a$a(B, $B$=$l$r(B, $BJQ?t=g=x(B @var{vlist2}
                   1758: $B$N<-=q<0=g=x%0%l%V%J4pDl$KJQ49$9$k(B.
                   1759: @item
                   1760: @code{tolex()}, @code{tolex_tl()} $B$O(B,
                   1761: $BJQ?t=g=x(B @var{vlist1}, $B9`=g=x7?(B @var{order} $B$K4X$9$k%0%l%V%J4pDl$G$"$k(B
                   1762: $BB?9`<0%j%9%H(B @var{plist} $B$rJQ?t=g=x(B @var{vlist2} $B$N<-=q<0=g=x%0%l%V%J(B
                   1763: $B4pDl$KJQ49$9$k(B.
                   1764: @code{tolex_d()} $B$O(B, @code{tolex()} $B$K$*$1$k(B, $B3F4pDl$N7W;;$r(B, $B;R%W%m%;%9(B
                   1765: $B%j%9%H(B @var{procs} $B$N3F%W%m%;%9$KJ,;67W;;$5$;$k(B.
                   1766: @item
                   1767: @code{lex_hensel()}, @code{lex_tl()} $B$K$*$$$F$O(B, $B<-=q<0=g=x%0%l%V%J4pDl$N(B
                   1768: $B7W;;$O<!$N$h$&$K9T$o$l$k(B. (@code{[Noro,Yokoyama]} $B;2>H(B.)
                   1769: @enumerate
                   1770: @item
                   1771: @var{vlist1}, @var{order} $B$K4X$9$k%0%l%V%J4pDl(B @var{G0} $B$r7W;;$9$k(B.
                   1772: (@code{lex_hensel()} $B$N$_(B. )
                   1773: @item
                   1774: @var{G0} $B$N3F85$N(B @var{vlist2} $B$K4X$9$k<-=q<0=g=x$K$*$1$kF,78?t$r3d$i$J$$(B
                   1775: $B$h$&$JAG?t(B @var{p} $B$rA*$S(B, GF(@var{p}) $B>e$G$N<-=q<0=g=x%0%l%V%J4pDl(B
                   1776: @var{Gp} $B$r7W;;$9$k(B.
                   1777: @item
                   1778: @var{Gp} $B$K8=$l$k$9$Y$F$N9`$N(B, @var{G0} $B$K4X$9$k@55,7A(B @var{NF} $B$r7W;;$9$k(B.
                   1779: @item
                   1780: @var{Gp} $B$N3F85(B @var{f} $B$K$D$-(B, @var{f} $B$N78?t$rL$Dj78?t$G(B,
                   1781: @var{f} $B$N3F9`$rBP1~$9$k(B @var{NF} $B$N85$GCV$-49$((B, $B3F9`$N78?t$r(B 0 $B$HCV$$$?(B,
                   1782: $BL$Dj78?t$K4X$9$k@~7AJ}Dx<07O(B @var{Lf} $B$r:n$k(B.
                   1783: @item
                   1784: @var{Lf} $B$,(B, $BK!(B @var{p} $B$G0l0U2r$r;}$D$3$H$rMQ$$$F(B @var{Lf} $B$N2r$r(B
                   1785: $BK!(B @var{p}$B$N2r$+$i(B Hensel $B9=@.$K$h$j5a$a$k(B.
                   1786: @item
                   1787: $B$9$Y$F$N(B @var{Gp} $B$N85$K$D$-@~7AJ}Dx<0$,2r$1$?$i$=$N2rA4BN$,5a$a$k(B
                   1788: $B<-=q<0=g=x$G$N%0%l%V%J4pDl(B. $B$b$7$I$l$+$N@~7AJ}Dx<0$N5a2r$K<:GT$7$?$i(B,
                   1789: @var{p} $B$r$H$jD>$7$F$d$jD>$9(B.
                   1790: @end enumerate
                   1791:
                   1792: @item
                   1793: @code{lex_tl()}, @code{tolex_tl()} $B$K$*$$$F$O(B, $B<-=q<0=g=x%0%l%V%J4pDl$N(B
                   1794: $B7W;;$O<!$N$h$&$K9T$o$l$k(B.
                   1795:
                   1796: @enumerate
                   1797: @item
                   1798: @var{vlist1}, @var{order} $B$K4X$9$k%0%l%V%J4pDl(B @var{G0} $B$r7W;;$9$k(B.
                   1799: (@code{lex_hensel()} $B$N$_(B. )
                   1800: @item
                   1801: @var{G0} $B$,(B 0 $B<!85%7%9%F%`$G$J$$$H$-(B, @var{G0} $B$rF~NO$H$7$F(B,
                   1802: @var{G0} $B$N3F85$N(B @var{vlist2} $B$K4X$9$k<-=q<0=g=x$K$*$1$kF,78?t$r3d$i$J$$(B
                   1803: $B$h$&$JAG?t(B @var{p} $B$rA*$S(B, @var{p} $B$rMQ$$$?(B trace-lifting $B$K$h$j<-=q<0(B
                   1804: $B=g=x$N%0%l%V%J4pDl8uJd$r5a$a(B, $B$b$75a$^$C$?$J$i%A%'%C%/$J$7$K$=$l$,5a$a$k(B
                   1805: $B%0%l%V%J4pDl$H$J$k(B. $B$b$7<:GT$7$?$i(B, @var{p} $B$r$H$jD>$7$F$d$jD>$9(B.
                   1806: @item
                   1807: @var{G0} $B$,(B 0 $B<!85%7%9%F%`$N$H$-(B, @var{G0} $B$rF~NO$H$7$F(B,
                   1808: $B$^$:(B, @var{vlist2} $B$N:G8e$NJQ?t0J30$r>C5n$9$k>C5n=g=x$K$h$j(B
                   1809: $B%0%l%V%J4pDl(B @var{G1} $B$r7W;;$7(B, $B$=$l$+$i<-=q<0=g=x$N%0%l%V%J4pDl$r(B
                   1810: $B7W;;$9$k(B. $B$=$N:](B, $B3F%9%F%C%W$G$O(B, $BF~NO$N3F85$N(B, $B5a$a$k=g=x$K$*$1$k(B
                   1811: $BF,78?t$r3d$i$J$$AG?t$rMQ$$$?(B trace-lifting $B$G%0%l%V%J4pDl8uJd$r5a$a(B,
                   1812: $B$b$75a$^$C$?$i%A%'%C%/$J$7$K$=$l$,$=$N=g=x$G$N%0%l%V%J4pDl$H$J$k(B.
                   1813: @end enumerate
                   1814:
                   1815: @item
                   1816: $BM-M}<078?t$N7W;;$O(B, @code{lex_tl()}, @code{tolex_tl()} $B$N$_<u$1IU$1$k(B.
                   1817: @item
                   1818: @code{homo} $B$,(B 0 $B$G$J$$>l9g(B, $BFbIt$G5/F0$5$l$k(B Buchberger $B%"%k%4%j%:%`$K(B
                   1819: $B$*$$$F(B, $B@F<!2=$,9T$o$l$k(B.
                   1820: @item
                   1821: @code{tolex_d()} $B$GI=<($5$l$k;~4V$O(B, $B$3$NH!?t$,<B9T$5$l$F$$$k%W%m%;%9$K(B
                   1822: $B$*$$$F9T$o$l$?7W;;$KBP1~$7$F$$$F(B, $B;R%W%m%;%9$K$*$1$k;~4V$O4^$^$l$J$$(B.
1.2       noro     1823: \E
                   1824: \BEG
                   1825: @item
                   1826: These functions are defined in @samp{gr} in the standard library
                   1827: directory.
                   1828: @item
                   1829: @code{lex_hensel()} and @code{lex_tl()} first compute a Groebner basis
                   1830: with respect to the variable order @var{vlist1} and the order type @var{order}.
                   1831: Then the Groebner basis is converted into a lex order Groebner basis
                   1832: with respect to the varable order @var{vlist2}.
                   1833: @item
                   1834: @code{tolex()} and @code{tolex_tl()} convert a Groebner basis @var{plist}
                   1835: with respect to the variable order @var{vlist1} and the order type @var{order}
                   1836: into a lex order Groebner basis
                   1837: with respect to the varable order @var{vlist2}.
                   1838: @code{tolex_d()} does computations of basis elements in @code{tolex()}
                   1839: in parallel on the processes in a child process list @var{procs}.
                   1840: @item
                   1841: In @code{lex_hensel()} and @code{tolex_hensel()} a lex order Groebner basis
                   1842: is computed as follows.(Refer to @code{[Noro,Yokoyama]}.)
                   1843: @enumerate
                   1844: @item
                   1845: Compute a Groebner basis @var{G0} with respect to @var{vlist1} and @var{order}.
                   1846: (Only in @code{lex_hensel()}. )
                   1847: @item
                   1848: Choose a prime which does not divide head coefficients of elements in @var{G0}
                   1849: with respect to @var{vlist1} and @var{order}. Then compute a lex order
                   1850: Groebner basis @var{Gp} over GF(@var{p}) with respect to @var{vlist2}.
                   1851: @item
                   1852: Compute @var{NF}, the set of all the normal forms with respect to
                   1853: @var{G0} of terms appearing in @var{Gp}.
                   1854: @item
                   1855: For each element @var{f} in @var{Gp}, replace coefficients and terms in @var{f}
                   1856: with undetermined coefficients and the corresponding polynomials in @var{NF}
                   1857: respectively, and generate a system of liear equation @var{Lf} by equating
                   1858: the coefficients of terms in the replaced polynomial with 0.
                   1859: @item
                   1860: Solve @var{Lf} by Hensel lifting, starting from the unique mod @var{p}
                   1861: solution.
                   1862: @item
                   1863: If all the linear equations generated from the elements in @var{Gp}
                   1864: could be solved, then the set of solutions corresponds to a lex order
                   1865: Groebner basis. Otherwise redo the whole process with another @var{p}.
                   1866: @end enumerate
                   1867:
                   1868: @item
                   1869: In @code{lex_tl()} and @code{tolex_tl()} a lex order Groebner basis
                   1870: is computed as follows.(Refer to @code{[Noro,Yokoyama]}.)
                   1871:
                   1872: @enumerate
                   1873: @item
                   1874: Compute a Groebner basis @var{G0} with respect to @var{vlist1} and @var{order}.
                   1875: (Only in @code{lex_tl()}. )
                   1876: @item
                   1877: If @var{G0} is not zero-dimensional, choose a prime which does not divide
                   1878: head coefficients of elements in @var{G0} with respect to @var{vlist1} and
                   1879: @var{order}. Then compute a candidate of a lex order Groebner basis
                   1880: via trace lifting with @var{p}. If it succeeds the candidate is indeed
                   1881: a lex order Groebner basis without any check. Otherwise redo the whole
                   1882: process with another @var{p}.
                   1883: @item
                   1884:
                   1885: If @var{G0} is zero-dimensional, starting from @var{G0},
                   1886: compute a Groebner basis @var{G1} with respect to an elimination order
                   1887: to eliminate variables other than the last varibale in @var{vlist2}.
                   1888: Then compute a lex order Groebner basis stating from @var{G1}. These
                   1889: computations are done by trace lifting and the selection of a mudulus
                   1890: @var{p} is the same as in non zero-dimensional cases.
                   1891: @end enumerate
                   1892:
                   1893: @item
                   1894: Computations with rational function coefficients can be done only by
                   1895: @code{lex_tl()} and @code{tolex_tl()}.
                   1896: @item
                   1897: If @code{homo} is not equal to 0, homogenization is used in Buchberger
                   1898: algorithm.
                   1899: @item
                   1900: The CPU time shown after an execution of @code{tolex_d()} indicates
                   1901: that of the master process, and it does not include the time in child
                   1902: processes.
                   1903: \E
1.1       noro     1904: @end itemize
                   1905:
                   1906: @example
                   1907: [78] K=katsura(5)$
                   1908: 30msec + gc : 20msec
                   1909: [79] V=[u5,u4,u3,u2,u1,u0]$
                   1910: 0msec
                   1911: [80] G0=hgr(K,V,2)$
                   1912: 91.558sec + gc : 15.583sec
                   1913: [81] G1=lex_hensel(K,V,0,V,0)$
                   1914: 49.049sec + gc : 9.961sec
                   1915: [82] G2=lex_tl(K,V,0,V,1)$
                   1916: 31.186sec + gc : 3.500sec
                   1917: [83] gb_comp(G0,G1);
                   1918: 1
                   1919: 10msec
                   1920: [84] gb_comp(G0,G2);
                   1921: 1
                   1922: @end example
                   1923:
                   1924: @table @t
1.2       noro     1925: \JP @item $B;2>H(B
                   1926: \EG @item References
1.6       noro     1927: @fref{dp_gr_main dp_gr_mod_main dp_gr_f_main dp_weyl_gr_main dp_weyl_gr_mod_main dp_weyl_gr_f_main},
1.2       noro     1928: \JP @fref{dp_ord}, @fref{$BJ,;67W;;(B}
                   1929: \EG @fref{dp_ord}, @fref{Distributed computation}
1.1       noro     1930: @end table
                   1931:
1.2       noro     1932: \JP @node lex_hensel_gsl tolex_gsl tolex_gsl_d,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   1933: \EG @node lex_hensel_gsl tolex_gsl tolex_gsl_d,,, Functions for Groebner basis computation
1.1       noro     1934: @subsection @code{lex_hensel_gsl}, @code{tolex_gsl}, @code{tolex_gsl_d}
                   1935: @findex lex_hensel_gsl
                   1936: @findex tolex_gsl
                   1937: @findex tolex_gsl_d
                   1938:
                   1939: @table @t
                   1940: @item lex_hensel_gsl(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{homo})
1.2       noro     1941: \JP :: GSL $B7A<0$N%$%G%"%k4pDl$N7W;;(B
                   1942: \EG ::Computation of an GSL form ideal basis
1.8       noro     1943: @item tolex_gsl(@var{plist},@var{vlist1},@var{order},@var{vlist2})
                   1944: @itemx tolex_gsl_d(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{procs})
1.2       noro     1945: \JP :: $B%0%l%V%J4pDl$rF~NO$H$9$k(B, GSL $B7A<0$N%$%G%"%k4pDl$N7W;;(B
                   1946: \EG :: Computation of an GSL form ideal basis stating from a Groebner basis
1.1       noro     1947: @end table
                   1948:
                   1949: @table @var
                   1950: @item return
1.2       noro     1951: \JP $B%j%9%H(B
                   1952: \EG list
1.4       noro     1953: @item plist  vlist1  vlist2  procs
1.2       noro     1954: \JP $B%j%9%H(B
                   1955: \EG list
1.1       noro     1956: @item order
1.2       noro     1957: \JP $B?t(B, $B%j%9%H$^$?$O9TNs(B
                   1958: \EG number, list or matrix
1.1       noro     1959: @item homo
1.2       noro     1960: \JP $B%U%i%0(B
                   1961: \EG flag
1.1       noro     1962: @end table
                   1963:
                   1964: @itemize @bullet
1.2       noro     1965: \BJP
1.1       noro     1966: @item
                   1967: @code{lex_hensel_gsl()} $B$O(B @code{lex_hensel()} $B$N(B, @code{tolex_gsl()} $B$O(B
                   1968: @code{tolex()} $B$NJQ<o$G(B, $B7k2L$N$_$,0[$J$k(B.
                   1969: @code{tolex_gsl_d()} $B$O(B, $B4pDl7W;;$r(B, @code{procs} $B$G;XDj$5$l$k;R%W%m%;%9$K(B
                   1970: $BJ,;67W;;$5$;$k(B.
                   1971: @item
                   1972: $BF~NO$,(B 0 $B<!85%7%9%F%`$G(B, $B$=$N<-=q<0=g=x%0%l%V%J4pDl$,(B
                   1973: @code{[f0,x1-f1,...,xn-fn]} (@code{f0},...,@code{fn} $B$O(B
                   1974: @code{x0} $B$N(B 1 $BJQ?tB?9`<0(B) $B$J$k7A(B ($B$3$l$r(B SL $B7A<0$H8F$V(B) $B$r;}$D>l9g(B,
                   1975: @code{[[x1,g1,d1],...,[xn,gn,dn],[x0,f0,f0']]} $B$J$k%j%9%H(B ($B$3$l$r(B GSL $B7A<0$H8F$V(B)
                   1976: $B$rJV$9(B.
1.2       noro     1977: $B$3$3$G(B, @code{gi} $B$O(B, @code{di*f0'*fi-gi} $B$,(B @code{f0} $B$G3d$j@Z$l$k$h$&$J(B
1.1       noro     1978: @code{x0} $B$N(B1 $BJQ?tB?9`<0$G(B,
                   1979: $B2r$O(B @code{f0(x0)=0} $B$J$k(B @code{x0} $B$KBP$7(B, @code{[x1=g1/(d1*f0'),...,xn=gn/(dn*f0')]}
                   1980: $B$H$J$k(B. $B<-=q<0=g=x%0%l%V%J4pDl$,>e$N$h$&$J7A$G$J$$>l9g(B, @code{tolex()} $B$K(B
                   1981: $B$h$kDL>o$N%0%l%V%J4pDl$rJV$9(B.
                   1982: @item
                   1983: GSL $B7A<0$K$h$jI=$5$l$k4pDl$O%0%l%V%J4pDl$G$O$J$$$,(B, $B0lHL$K78?t$,(B SL $B7A<0(B
                   1984: $B$N%0%l%V%J4pDl$h$jHs>o$K>.$5$$$?$a7W;;$bB.$/(B, $B2r$b5a$a$d$9$$(B.
                   1985: @code{tolex_gsl_d()} $B$GI=<($5$l$k;~4V$O(B, $B$3$NH!?t$,<B9T$5$l$F$$$k%W%m%;%9$K(B
                   1986: $B$*$$$F9T$o$l$?7W;;$KBP1~$7$F$$$F(B, $B;R%W%m%;%9$K$*$1$k;~4V$O4^$^$l$J$$(B.
1.2       noro     1987: \E
                   1988: \BEG
                   1989: @item
                   1990: @code{lex_hensel_gsl()} and @code{lex_hensel()} are variants of
                   1991: @code{tolex_gsl()} and @code{tolex()} respectively. The results are
                   1992: Groebner basis or a kind of ideal basis, called GSL form.
                   1993: @code{tolex_gsl_d()} does basis computations in parallel on child
                   1994: processes specified in @code{procs}.
                   1995:
                   1996: @item
                   1997: If the input is zero-dimensional and a lex order Groebner basis has
                   1998: the form @code{[f0,x1-f1,...,xn-fn]} (@code{f0},...,@code{fn} are
                   1999: univariate polynomials of @code{x0}; SL form), then this these
                   2000: functions return a list such as
                   2001: @code{[[x1,g1,d1],...,[xn,gn,dn],[x0,f0,f0']]} (GSL form).  In this list
                   2002: @code{gi} is a univariate polynomial of @code{x0} such that
                   2003: @code{di*f0'*fi-gi} divides @code{f0} and the roots of the input ideal is
                   2004: @code{[x1=g1/(d1*f0'),...,xn=gn/(dn*f0')]} for @code{x0}
                   2005: such that @code{f0(x0)=0}.
                   2006: If the lex order Groebner basis does not have the above form,
                   2007: these functions return
                   2008: a lex order Groebner basis computed by @code{tolex()}.
                   2009: @item
                   2010: Though an ideal basis represented as GSL form is not a Groebner basis
                   2011: we can expect that the coefficients are much smaller than those in a Groebner
                   2012: basis and that the computation is efficient.
                   2013: The CPU time shown after an execution of @code{tolex_gsl_d()} indicates
                   2014: that of the master process, and it does not include the time in child
                   2015: processes.
                   2016: \E
1.1       noro     2017: @end itemize
                   2018:
                   2019: @example
                   2020: [103] K=katsura(5)$
                   2021: [104] V=[u5,u4,u3,u2,u1,u0]$
                   2022: [105] G0=gr(K,V,0)$
                   2023: [106] GSL=tolex_gsl(G0,V,0,V)$
                   2024: [107] GSL[0];
                   2025: [u1,8635837421130477667200000000*u0^31-...]
                   2026: [108] GSL[1];
                   2027: [u2,10352277157007342793600000000*u0^31-...]
                   2028: [109] GSL[5];
1.5       noro     2029: [u0,11771021876193064124640000000*u0^32-...,
                   2030: 376672700038178051988480000000*u0^31-...]
1.1       noro     2031: @end example
                   2032:
                   2033: @table @t
1.2       noro     2034: \JP @item $B;2>H(B
                   2035: \EG @item References
1.1       noro     2036: @fref{lex_hensel lex_tl tolex tolex_d tolex_tl},
1.2       noro     2037: \JP @fref{$BJ,;67W;;(B}
                   2038: \EG @fref{Distributed computation}
1.1       noro     2039: @end table
                   2040:
1.2       noro     2041: \JP @node gr_minipoly minipoly,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   2042: \EG @node gr_minipoly minipoly,,, Functions for Groebner basis computation
1.1       noro     2043: @subsection @code{gr_minipoly}, @code{minipoly}
                   2044: @findex gr_minipoly
                   2045: @findex minipoly
                   2046:
                   2047: @table @t
                   2048: @item gr_minipoly(@var{plist},@var{vlist},@var{order},@var{poly},@var{v},@var{homo})
1.2       noro     2049: \JP :: $BB?9`<0$N(B, $B%$%G%"%k$rK!$H$7$?:G>.B?9`<0$N7W;;(B
                   2050: \EG :: Computation of the minimal polynomial of a polynomial modulo an ideal
1.1       noro     2051: @item minipoly(@var{plist},@var{vlist},@var{order},@var{poly},@var{v})
1.2       noro     2052: \JP :: $B%0%l%V%J4pDl$rF~NO$H$9$k(B, $BB?9`<0$N:G>.B?9`<0$N7W;;(B
                   2053: \EG :: Computation of the minimal polynomial of a polynomial modulo an ideal
1.1       noro     2054: @end table
                   2055:
                   2056: @table @var
                   2057: @item return
1.2       noro     2058: \JP $BB?9`<0(B
                   2059: \EG polynomial
1.4       noro     2060: @item plist  vlist
1.2       noro     2061: \JP $B%j%9%H(B
                   2062: \EG list
1.1       noro     2063: @item order
1.2       noro     2064: \JP $B?t(B, $B%j%9%H$^$?$O9TNs(B
                   2065: \EG number, list or matrix
1.1       noro     2066: @item poly
1.2       noro     2067: \JP $BB?9`<0(B
                   2068: \EG polynomial
1.1       noro     2069: @item v
1.2       noro     2070: \JP $BITDj85(B
                   2071: \EG indeterminate
1.1       noro     2072: @item homo
1.2       noro     2073: \JP $B%U%i%0(B
                   2074: \EG flag
1.1       noro     2075: @end table
                   2076:
                   2077: @itemize @bullet
1.2       noro     2078: \BJP
1.1       noro     2079: @item
                   2080: @code{gr_minipoly()} $B$O%0%l%V%J4pDl$N7W;;$+$i9T$$(B, @code{minipoly()} $B$O(B
                   2081: $BF~NO$r%0%l%V%J4pDl$H$_$J$9(B.
                   2082: @item
                   2083: $B%$%G%"%k(B I $B$,BN(B K $B>e$NB?9`<04D(B K[X] $B$N(B 0 $B<!85%$%G%"%k$N;~(B,
                   2084: K[@var{v}] $B$N85(B f(@var{v}) $B$K(B f(@var{p}) mod I $B$rBP1~$5$;$k(B
                   2085: $B4D=`F17?$N3K$O(B 0 $B$G$J$$B?9`<0$K$h$j@8@.$5$l$k(B. $B$3$N@8@.85$r(B @var{p}
                   2086: $B$N(B, $BK!(B @var{I} $B$G$N:G>.B?9`<0$H8F$V(B.
                   2087: @item
                   2088: @code{gr_minipoly()}, @code{minipoly()} $B$O(B, $BB?9`<0(B @var{p} $B$N:G>.B?9`<0(B
                   2089: $B$r5a$a(B, @var{v} $B$rJQ?t$H$9$kB?9`<0$H$7$FJV$9(B.
                   2090: @item
                   2091: $B:G>.B?9`<0$O(B, $B%0%l%V%J4pDl$N(B 1 $B$D$N85$H$7$F7W;;$9$k$3$H$b$G$-$k$,(B,
                   2092: $B:G>.B?9`<0$N$_$r5a$a$?$$>l9g(B, @code{minipoly()}, @code{gr_minipoly()} $B$O(B
                   2093: $B%0%l%V%J4pDl$rMQ$$$kJ}K!$KHf$Y$F8zN($,$h$$(B.
                   2094: @item
                   2095: @code{gr_minipoly()} $B$K;XDj$9$k9`=g=x$H$7$F$O(B, $BDL>oA4<!?t5U<-=q<0=g=x$r(B
                   2096: $BMQ$$$k(B.
1.2       noro     2097: \E
                   2098: \BEG
                   2099: @item
                   2100: @code{gr_minipoly()} begins by computing a Groebner basis.
                   2101: @code{minipoly()} regards an input as a Groebner basis with respect to
                   2102: the variable order @var{vlist} and the order type @var{order}.
                   2103: @item
                   2104: Let K be a field. If an ideal @var{I} in K[X] is zero-dimensional, then, for
                   2105: a polynomial @var{p} in K[X], the kernel of a homomorphism from
                   2106: K[@var{v}] to K[X]/@var{I} which maps f(@var{v}) to f(@var{p}) mod @var{I}
                   2107: is generated by a polynomial. The generator is called the minimal polynomial
                   2108: of @var{p} modulo @var{I}.
                   2109: @item
                   2110: @code{gr_minipoly()} and @code{minipoly()} computes the minimal polynomial
                   2111: of a polynomial @var{p} and returns it as a polynomial of @var{v}.
                   2112: @item
                   2113: The minimal polynomial can be computed as an element of a Groebner basis.
                   2114: But if we are only interested in the minimal polynomial,
                   2115: @code{minipoly()} and @code{gr_minipoly()} can compute it more efficiently
                   2116: than methods using Groebner basis computation.
                   2117: @item
                   2118: It is recommended to use a degree reverse lex order as a term order
                   2119: for @code{gr_minipoly()}.
                   2120: \E
1.1       noro     2121: @end itemize
                   2122:
                   2123: @example
                   2124: [117] G=tolex(G0,V,0,V)$
                   2125: 43.818sec + gc : 11.202sec
                   2126: [118] GSL=tolex_gsl(G0,V,0,V)$
                   2127: 17.123sec + gc : 2.590sec
                   2128: [119] MP=minipoly(G0,V,0,u0,z)$
                   2129: 4.370sec + gc : 780msec
                   2130: @end example
                   2131:
                   2132: @table @t
1.2       noro     2133: \JP @item $B;2>H(B
                   2134: \EG @item References
1.1       noro     2135: @fref{lex_hensel lex_tl tolex tolex_d tolex_tl}.
                   2136: @end table
                   2137:
1.2       noro     2138: \JP @node tolexm minipolym,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   2139: \EG @node tolexm minipolym,,, Functions for Groebner basis computation
1.1       noro     2140: @subsection @code{tolexm}, @code{minipolym}
                   2141: @findex tolexm
                   2142: @findex minipolym
                   2143:
                   2144: @table @t
                   2145: @item tolexm(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{mod})
1.2       noro     2146: \JP :: $BK!(B @var{mod} $B$G$N4pDlJQ49$K$h$k%0%l%V%J4pDl7W;;(B
                   2147: \EG :: Groebner basis computation modulo @var{mod} by change of ordering.
1.1       noro     2148: @item minipolym(@var{plist},@var{vlist1},@var{order},@var{poly},@var{v},@var{mod})
1.2       noro     2149: \JP :: $BK!(B @var{mod} $B$G$N%0%l%V%J4pDl$K$h$kB?9`<0$N:G>.B?9`<0$N7W;;(B
                   2150: \EG :: Minimal polynomial computation modulo @var{mod} the same method as
1.1       noro     2151: @end table
                   2152:
                   2153: @table @var
                   2154: @item return
1.2       noro     2155: \JP @code{tolexm()} : $B%j%9%H(B, @code{minipolym()} : $BB?9`<0(B
                   2156: \EG @code{tolexm()} : list, @code{minipolym()} : polynomial
1.4       noro     2157: @item plist  vlist1  vlist2
1.2       noro     2158: \JP $B%j%9%H(B
                   2159: \EG list
1.1       noro     2160: @item order
1.2       noro     2161: \JP $B?t(B, $B%j%9%H$^$?$O9TNs(B
                   2162: \EG number, list or matrix
1.1       noro     2163: @item mod
1.2       noro     2164: \JP $BAG?t(B
                   2165: \EG prime
1.1       noro     2166: @end table
                   2167:
                   2168: @itemize @bullet
1.2       noro     2169: \BJP
1.1       noro     2170: @item
                   2171: $BF~NO(B @var{plist} $B$O$$$:$l$b(B $BJQ?t=g=x(B @var{vlist1}, $B9`=g=x7?(B @var{order},
                   2172: $BK!(B @var{mod} $B$K$*$1$k%0%l%V%J4pDl$G$J$1$l$P$J$i$J$$(B.
                   2173: @item
                   2174: @code{minipolym()} $B$O(B @code{minipoly} $B$KBP1~$9$k7W;;$rK!(B @var{mod}$B$G9T$&(B.
                   2175: @item
                   2176: @code{tolexm()} $B$O(B FGLM $BK!$K$h$k4pDlJQ49$K$h$j(B @var{vlist2},
                   2177: $B<-=q<0=g=x$K$h$k%0%l%V%J4pDl$r7W;;$9$k(B.
1.2       noro     2178: \E
                   2179: \BEG
                   2180: @item
                   2181: An input @var{plist} must be a Groebner basis modulo @var{mod}
                   2182: with respect to the variable order @var{vlist1} and the order type @var{order}.
                   2183: @item
                   2184: @code{minipolym()} executes the same computation as in @code{minipoly}.
                   2185: @item
                   2186: @code{tolexm()} computes a lex order Groebner basis modulo @var{mod}
                   2187: with respect to the variable order @var{vlist2}, by using FGLM algorithm.
                   2188: \E
1.1       noro     2189: @end itemize
                   2190:
                   2191: @example
                   2192: [197] tolexm(G0,V,0,V,31991);
                   2193: [8271*u0^31+10435*u0^30+816*u0^29+26809*u0^28+...,...]
                   2194: [198] minipolym(G0,V,0,u0,z,31991);
                   2195: z^32+11405*z^31+20868*z^30+21602*z^29+...
                   2196: @end example
                   2197:
                   2198: @table @t
1.2       noro     2199: \JP @item $B;2>H(B
                   2200: \EG @item References
1.1       noro     2201: @fref{lex_hensel lex_tl tolex tolex_d tolex_tl},
                   2202: @fref{gr_minipoly minipoly}.
                   2203: @end table
                   2204:
1.6       noro     2205: \JP @node dp_gr_main dp_gr_mod_main dp_gr_f_main dp_weyl_gr_main dp_weyl_gr_mod_main dp_weyl_gr_f_main,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   2206: \EG @node dp_gr_main dp_gr_mod_main dp_gr_f_main dp_weyl_gr_main dp_weyl_gr_mod_main dp_weyl_gr_f_main,,, Functions for Groebner basis computation
                   2207: @subsection @code{dp_gr_main}, @code{dp_gr_mod_main}, @code{dp_gr_f_main}, @code{dp_weyl_gr_main}, @code{dp_weyl_gr_mod_main}, @code{dp_weyl_gr_f_main}
1.1       noro     2208: @findex dp_gr_main
                   2209: @findex dp_gr_mod_main
1.5       noro     2210: @findex dp_gr_f_main
1.6       noro     2211: @findex dp_weyl_gr_main
                   2212: @findex dp_weyl_gr_mod_main
                   2213: @findex dp_weyl_gr_f_main
1.1       noro     2214:
                   2215: @table @t
                   2216: @item dp_gr_main(@var{plist},@var{vlist},@var{homo},@var{modular},@var{order})
                   2217: @itemx dp_gr_mod_main(@var{plist},@var{vlist},@var{homo},@var{modular},@var{order})
1.5       noro     2218: @itemx dp_gr_f_main(@var{plist},@var{vlist},@var{homo},@var{order})
1.6       noro     2219: @itemx dp_weyl_gr_main(@var{plist},@var{vlist},@var{homo},@var{modular},@var{order})
                   2220: @itemx dp_weyl_gr_mod_main(@var{plist},@var{vlist},@var{homo},@var{modular},@var{order})
                   2221: @itemx dp_weyl_gr_f_main(@var{plist},@var{vlist},@var{homo},@var{order})
1.2       noro     2222: \JP :: $B%0%l%V%J4pDl$N7W;;(B ($BAH$_9~$_H!?t(B)
                   2223: \EG :: Groebner basis computation (built-in functions)
1.1       noro     2224: @end table
                   2225:
                   2226: @table @var
                   2227: @item return
1.2       noro     2228: \JP $B%j%9%H(B
                   2229: \EG list
1.4       noro     2230: @item plist  vlist
1.2       noro     2231: \JP $B%j%9%H(B
                   2232: \EG list
1.1       noro     2233: @item order
1.2       noro     2234: \JP $B?t(B, $B%j%9%H$^$?$O9TNs(B
                   2235: \EG number, list or matrix
1.1       noro     2236: @item homo
1.2       noro     2237: \JP $B%U%i%0(B
                   2238: \EG flag
1.1       noro     2239: @item modular
1.2       noro     2240: \JP $B%U%i%0$^$?$OAG?t(B
                   2241: \EG flag or prime
1.1       noro     2242: @end table
                   2243:
                   2244: @itemize @bullet
1.2       noro     2245: \BJP
1.1       noro     2246: @item
                   2247: $B$3$l$i$NH!?t$O(B, $B%0%l%V%J4pDl7W;;$N4pK\E*AH$_9~$_H!?t$G$"$j(B, @code{gr()},
                   2248: @code{hgr()}, @code{gr_mod()} $B$J$I$O$9$Y$F$3$l$i$NH!?t$r8F$S=P$7$F7W;;(B
1.6       noro     2249: $B$r9T$C$F$$$k(B. $B4X?tL>$K(B weyl $B$,F~$C$F$$$k$b$N$O(B, Weyl $BBe?t>e$N7W;;(B
                   2250: $B$N$?$a$N4X?t$G$"$k(B.
1.1       noro     2251: @item
1.6       noro     2252: @code{dp_gr_f_main()}, @code{dp_weyl_f_main()} $B$O(B, $B<o!9$NM-8BBN>e$N%0%l%V%J4pDl$r7W;;$9$k(B
1.5       noro     2253: $B>l9g$KMQ$$$k(B. $BF~NO$O(B, $B$"$i$+$8$a(B, @code{simp_ff()} $B$J$I$G(B,
                   2254: $B9M$($kM-8BBN>e$K<M1F$5$l$F$$$kI,MW$,$"$k(B.
                   2255: @item
1.1       noro     2256: $B%U%i%0(B @var{homo} $B$,(B 0 $B$G$J$$;~(B, $BF~NO$r@F<!2=$7$F$+$i(B Buchberger $B%"%k%4%j%:%`(B
                   2257: $B$r<B9T$9$k(B.
                   2258: @item
                   2259: @code{dp_gr_mod_main()} $B$KBP$7$F$O(B, @var{modular} $B$O(B, GF(@var{modular}) $B>e(B
                   2260: $B$G$N7W;;$r0UL#$9$k(B.
                   2261: @code{dp_gr_main()} $B$KBP$7$F$O(B, @var{modular} $B$O<!$N$h$&$J0UL#$r;}$D(B.
                   2262: @enumerate
                   2263: @item
                   2264: @var{modular} $B$,(B 1 $B$N;~(B, trace-lifting $B$K$h$k7W;;$r9T$&(B. $BAG?t$O(B
                   2265: @code{lprime(0)} $B$+$i=g$K@.8y$9$k$^$G(B @code{lprime()} $B$r8F$S=P$7$F@8@.$9$k(B.
                   2266: @item
                   2267: @var{modular} $B$,(B 2 $B0J>e$N<+A3?t$N;~(B, $B$=$NCM$rAG?t$H$_$J$7$F(B trace-lifting
                   2268: $B$r9T$&(B. $B$=$NAG?t$G<:GT$7$?>l9g(B, 0 $B$rJV$9(B.
                   2269: @item
                   2270: @var{modular} $B$,Ii$N>l9g(B,
                   2271: @var{-modular} $B$KBP$7$F>e=R$N5,B'$,E,MQ$5$l$k$,(B, trace-lifting $B$N:G=*(B
                   2272: $BCJ3,$N%0%l%V%J4pDl%A%'%C%/$H%$%G%"%k%a%s%P%7%C%W%A%'%C%/$,>JN,$5$l$k(B.
                   2273: @end enumerate
                   2274:
                   2275: @item
                   2276: @code{gr(P,V,O)} $B$O(B @code{dp_gr_main(P,V,0,1,O)}, @code{hgr(P,V,O)} $B$O(B
                   2277: @code{dp_gr_main(P,V,1,1,O)}, @code{gr_mod(P,V,O,M)} $B$O(B
                   2278: @code{dp_gr_mod_main(P,V,0,M,O)} $B$r$=$l$>$l<B9T$9$k(B.
                   2279: @item
                   2280: @var{homo}, @var{modular} $B$NB>$K(B, @code{dp_gr_flags()} $B$G@_Dj$5$l$k(B
                   2281: $B$5$^$6$^$J%U%i%0$K$h$j7W;;$,@)8f$5$l$k(B.
1.2       noro     2282: \E
                   2283: \BEG
                   2284: @item
                   2285: These functions are fundamental built-in functions for Groebner basis
                   2286: computation and @code{gr()},@code{hgr()} and @code{gr_mod()}
1.6       noro     2287: are all interfaces to these functions. Functions whose names
                   2288: contain weyl are those for computation in Weyl algebra.
1.2       noro     2289: @item
1.6       noro     2290: @code{dp_gr_f_main()} and @code{dp_weyl_gr_f_main()}
                   2291: are functions for Groebner basis computation
1.5       noro     2292: over various finite fields. Coefficients of input polynomials
                   2293: must be converted to elements of a finite field
                   2294: currently specified by @code{setmod_ff()}.
                   2295: @item
1.2       noro     2296: If @var{homo} is not equal to 0, homogenization is applied before entering
                   2297: Buchberger algorithm
                   2298: @item
                   2299: For @code{dp_gr_mod_main()}, @var{modular} means a computation over
                   2300: GF(@var{modular}).
                   2301: For @code{dp_gr_main()}, @var{modular} has the following mean.
                   2302: @enumerate
                   2303: @item
                   2304: If @var{modular} is 1 , trace lifting is used. Primes for trace lifting
                   2305: are generated by @code{lprime()}, starting from @code{lprime(0)}, until
                   2306: the computation succeeds.
                   2307: @item
                   2308: If @var{modular} is an integer  greater than 1, the integer is regarded as a
                   2309: prime and trace lifting is executed by using the prime. If the computation
                   2310: fails then 0 is returned.
                   2311: @item
                   2312: If @var{modular} is negative, the above rule is applied for @var{-modular}
                   2313: but the Groebner basis check and ideal-membership check are omitted in
                   2314: the last stage of trace lifting.
                   2315: @end enumerate
                   2316:
                   2317: @item
                   2318: @code{gr(P,V,O)}, @code{hgr(P,V,O)} and @code{gr_mod(P,V,O,M)} execute
                   2319: @code{dp_gr_main(P,V,0,1,O)}, @code{dp_gr_main(P,V,1,1,O)}
                   2320: and @code{dp_gr_mod_main(P,V,0,M,O)} respectively.
                   2321: @item
                   2322: Actual computation is controlled by various parameters set by
                   2323: @code{dp_gr_flags()}, other then by @var{homo} and @var{modular}.
                   2324: \E
1.1       noro     2325: @end itemize
                   2326:
                   2327: @table @t
1.2       noro     2328: \JP @item $B;2>H(B
                   2329: \EG @item References
1.1       noro     2330: @fref{dp_ord},
                   2331: @fref{dp_gr_flags dp_gr_print},
                   2332: @fref{gr hgr gr_mod},
1.5       noro     2333: @fref{setmod_ff},
1.2       noro     2334: \JP @fref{$B7W;;$*$h$SI=<($N@)8f(B}.
                   2335: \EG @fref{Controlling Groebner basis computations}
1.1       noro     2336: @end table
                   2337:
1.6       noro     2338: \JP @node dp_f4_main dp_f4_mod_main dp_weyl_f4_main dp_weyl_f4_mod_main,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   2339: \EG @node dp_f4_main dp_f4_mod_main dp_weyl_f4_main dp_weyl_f4_mod_main,,, Functions for Groebner basis computation
                   2340: @subsection @code{dp_f4_main}, @code{dp_f4_mod_main}, @code{dp_weyl_f4_main}, @code{dp_weyl_f4_mod_main}
1.1       noro     2341: @findex dp_f4_main
                   2342: @findex dp_f4_mod_main
1.6       noro     2343: @findex dp_weyl_f4_main
                   2344: @findex dp_weyl_f4_mod_main
1.1       noro     2345:
                   2346: @table @t
                   2347: @item dp_f4_main(@var{plist},@var{vlist},@var{order})
                   2348: @itemx dp_f4_mod_main(@var{plist},@var{vlist},@var{order})
1.6       noro     2349: @itemx dp_weyl_f4_main(@var{plist},@var{vlist},@var{order})
                   2350: @itemx dp_weyl_f4_mod_main(@var{plist},@var{vlist},@var{order})
1.2       noro     2351: \JP :: F4 $B%"%k%4%j%:%`$K$h$k%0%l%V%J4pDl$N7W;;(B ($BAH$_9~$_H!?t(B)
                   2352: \EG :: Groebner basis computation by F4 algorithm (built-in functions)
1.1       noro     2353: @end table
                   2354:
                   2355: @table @var
                   2356: @item return
1.2       noro     2357: \JP $B%j%9%H(B
                   2358: \EG list
1.4       noro     2359: @item plist  vlist
1.2       noro     2360: \JP $B%j%9%H(B
                   2361: \EG list
1.1       noro     2362: @item order
1.2       noro     2363: \JP $B?t(B, $B%j%9%H$^$?$O9TNs(B
                   2364: \EG number, list or matrix
1.1       noro     2365: @end table
                   2366:
                   2367: @itemize @bullet
1.2       noro     2368: \BJP
1.1       noro     2369: @item
                   2370: F4 $B%"%k%4%j%:%`$K$h$j%0%l%V%J4pDl$N7W;;$r9T$&(B.
                   2371: @item
                   2372: F4 $B%"%k%4%j%:%`$O(B, J.C. Faugere $B$K$h$jDs>'$5$l$??7@$Be%0%l%V%J4pDl(B
                   2373: $B;;K!$G$"$j(B, $BK\<BAu$O(B, $BCf9q>jM>DjM}$K$h$k@~7AJ}Dx<05a2r$rMQ$$$?(B
                   2374: $B;n83E*$J<BAu$G$"$k(B.
                   2375: @item
1.6       noro     2376: $B@F<!2=$N0z?t$,$J$$$3$H$r=|$1$P(B, $B0z?t$*$h$SF0:n$O$=$l$>$l(B
                   2377: @code{dp_gr_main()}, @code{dp_gr_mod_main()},
                   2378: @code{dp_weyl_gr_main()}, @code{dp_weyl_gr_mod_main()}
1.1       noro     2379: $B$HF1MM$G$"$k(B.
1.2       noro     2380: \E
                   2381: \BEG
                   2382: @item
                   2383: These functions compute Groebner bases by F4 algorithm.
                   2384: @item
                   2385: F4 is a new generation algorithm for Groebner basis computation
                   2386: invented by J.C. Faugere. The current implementation of @code{dp_f4_main()}
                   2387: uses Chinese Remainder theorem and not highly optimized.
                   2388: @item
                   2389: Arguments and actions are the same as those of
1.6       noro     2390: @code{dp_gr_main()}, @code{dp_gr_mod_main()},
                   2391: @code{dp_weyl_gr_main()}, @code{dp_weyl_gr_mod_main()},
                   2392: except for lack of the argument for controlling homogenization.
1.2       noro     2393: \E
1.1       noro     2394: @end itemize
                   2395:
                   2396: @table @t
1.2       noro     2397: \JP @item $B;2>H(B
                   2398: \EG @item References
1.1       noro     2399: @fref{dp_ord},
                   2400: @fref{dp_gr_flags dp_gr_print},
                   2401: @fref{gr hgr gr_mod},
1.15      noro     2402: \JP @fref{$B7W;;$*$h$SI=<($N@)8f(B}.
                   2403: \EG @fref{Controlling Groebner basis computations}
                   2404: @end table
                   2405:
1.17      noro     2406: \JP @node nd_gr nd_gr_trace nd_f4 nd_f4_trace nd_weyl_gr nd_weyl_gr_trace,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   2407: \EG @node nd_gr nd_gr_trace nd_f4 nd_f4_trace nd_weyl_gr nd_weyl_gr_trace,,, Functions for Groebner basis computation
                   2408: @subsection @code{nd_gr}, @code{nd_gr_trace}, @code{nd_f4}, @code{nd_f4_trace}, @code{nd_weyl_gr}, @code{nd_weyl_gr_trace}
1.15      noro     2409: @findex nd_gr
                   2410: @findex nd_gr_trace
                   2411: @findex nd_f4
1.17      noro     2412: @findex nd_f4_trace
1.15      noro     2413: @findex nd_weyl_gr
                   2414: @findex nd_weyl_gr_trace
                   2415:
                   2416: @table @t
1.23    ! noro     2417: @item nd_gr(@var{plist},@var{vlist},@var{p},@var{order}[|@var{option=value,...}])
        !          2418: @itemx nd_gr_trace(@var{plist},@var{vlist},@var{homo},@var{p},@var{order}[|@var{option=value,...}])
        !          2419: @itemx nd_f4(@var{plist},@var{vlist},@var{modular},@var{order}[|@var{option=value,...}])
        !          2420: @itemx nd_f4_trace(@var{plist},@var{vlist},@var{homo},@var{p},@var{order}[|@var{option=value,...}])
        !          2421: @itemx nd_weyl_gr(@var{plist},@var{vlist},@var{p},@var{order}[|@var{option=value,...}])
        !          2422: @itemx nd_weyl_gr_trace(@var{plist},@var{vlist},@var{homo},@var{p},@var{order}[|@var{option=value,...}])
1.15      noro     2423: \JP :: $B%0%l%V%J4pDl$N7W;;(B ($BAH$_9~$_H!?t(B)
                   2424: \EG :: Groebner basis computation (built-in functions)
                   2425: @end table
                   2426:
                   2427: @table @var
                   2428: @item return
                   2429: \JP $B%j%9%H(B
                   2430: \EG list
                   2431: @item plist  vlist
                   2432: \JP $B%j%9%H(B
                   2433: \EG list
                   2434: @item order
                   2435: \JP $B?t(B, $B%j%9%H$^$?$O9TNs(B
                   2436: \EG number, list or matrix
                   2437: @item homo
                   2438: \JP $B%U%i%0(B
                   2439: \EG flag
                   2440: @item modular
                   2441: \JP $B%U%i%0$^$?$OAG?t(B
                   2442: \EG flag or prime
                   2443: @end table
                   2444:
                   2445: \BJP
                   2446: @itemize @bullet
                   2447: @item
                   2448: $B$3$l$i$NH!?t$O(B, $B%0%l%V%J4pDl7W;;AH$_9~$_4X?t$N?7<BAu$G$"$k(B.
                   2449: @item @code{nd_gr} $B$O(B, @code{p} $B$,(B 0 $B$N$H$-M-M}?tBN>e$N(B Buchberger
                   2450: $B%"%k%4%j%:%`$r<B9T$9$k(B. @code{p} $B$,(B 2 $B0J>e$N<+A3?t$N$H$-(B, GF(p) $B>e$N(B
                   2451: Buchberger $B%"%k%4%j%:%`$r<B9T$9$k(B.
1.17      noro     2452: @item @code{nd_gr_trace} $B$*$h$S(B @code{nd_f4_trace}
                   2453: $B$OM-M}?tBN>e$G(B trace $B%"%k%4%j%:%`$r<B9T$9$k(B.
1.18      noro     2454: @var{p} $B$,(B 0 $B$^$?$O(B 1 $B$N$H$-(B, $B<+F0E*$KA*$P$l$?AG?t$rMQ$$$F(B, $B@.8y$9$k(B
1.15      noro     2455: $B$^$G(B trace $B%"%k%4%j%:%`$r<B9T$9$k(B.
1.18      noro     2456: @var{p} $B$,(B 2 $B0J>e$N$H$-(B, trace $B$O(BGF(p) $B>e$G7W;;$5$l$k(B. trace $B%"%k%4%j%:%`(B
                   2457: $B$,<:GT$7$?>l9g(B 0 $B$,JV$5$l$k(B. @var{p} $B$,Ii$N>l9g(B, $B%0%l%V%J4pDl%A%'%C%/$O(B
                   2458: $B9T$o$J$$(B. $B$3$N>l9g(B, @var{p} $B$,(B -1 $B$J$i$P<+F0E*$KA*$P$l$?AG?t$,(B,
1.17      noro     2459: $B$=$l0J30$O;XDj$5$l$?AG?t$rMQ$$$F%0%l%V%J4pDl8uJd$N7W;;$,9T$o$l$k(B.
                   2460: @code{nd_f4_trace} $B$O(B, $B3FA4<!?t$K$D$$$F(B, $B$"$kM-8BBN>e$G(B F4 $B%"%k%4%j%:%`(B
                   2461: $B$G9T$C$?7k2L$r$b$H$K(B, $B$=$NM-8BBN>e$G(B 0 $B$G$J$$4pDl$rM?$($k(B S-$BB?9`<0$N$_$r(B
                   2462: $BMQ$$$F9TNs@8@.$r9T$$(B, $B$=$NA4<!?t$K$*$1$k4pDl$r@8@.$9$kJ}K!$G$"$k(B. $BF@$i$l$k(B
                   2463: $BB?9`<0=89g$O$d$O$j%0%l%V%J4pDl8uJd$G$"$j(B, @code{nd_gr_trace} $B$HF1MM$N(B
                   2464: $B%A%'%C%/$,9T$o$l$k(B.
1.15      noro     2465: @item
1.17      noro     2466: @code{nd_f4} $B$O(B @code{modular} $B$,(B 0 $B$N$H$-M-M}?tBN>e$N(B, @code{modular} $B$,(B
                   2467: $B%^%7%s%5%$%:AG?t$N$H$-M-8BBN>e$N(B F4 $B%"%k%4%j%:%`$r<B9T$9$k(B.
1.15      noro     2468: @item
1.18      noro     2469: @var{plist} $B$,B?9`<0%j%9%H$N>l9g(B, @var{plist}$B$G@8@.$5$l$k%$%G%"%k$N%0%l%V%J!<4pDl$,(B
                   2470: $B7W;;$5$l$k(B. @var{plist} $B$,B?9`<0%j%9%H$N%j%9%H$N>l9g(B, $B3FMWAG$OB?9`<04D>e$N<+M32C72$N85$H8+$J$5$l(B,
                   2471: $B$3$l$i$,@8@.$9$kItJ,2C72$N%0%l%V%J!<4pDl$,7W;;$5$l$k(B. $B8e<T$N>l9g(B, $B9`=g=x$O2C72$KBP$9$k9`=g=x$r(B
                   2472: $B;XDj$9$kI,MW$,$"$k(B. $B$3$l$O(B @var{[s,ord]} $B$N7A$G;XDj$9$k(B. @var{s} $B$,(B 0 $B$J$i$P(B TOP (Term Over Position),
                   2473: 1 $B$J$i$P(B POT (Position Over Term) $B$r0UL#$7(B, @var{ord} $B$OB?9`<04D$NC19`<0$KBP$9$k9`=g=x$G$"$k(B.
                   2474: @item
1.15      noro     2475: @code{nd_weyl_gr}, @code{nd_weyl_gr_trace} $B$O(B Weyl $BBe?tMQ$G$"$k(B.
                   2476: @item
1.18      noro     2477: @code{f4} $B7O4X?t0J30$O$9$Y$FM-M}4X?t78?t$N7W;;$,2DG=$G$"$k(B.
1.15      noro     2478: @item
                   2479: $B0lHL$K(B @code{dp_gr_main}, @code{dp_gr_mod_main} $B$h$j9bB.$G$"$k$,(B,
                   2480: $BFC$KM-8BBN>e$N>l9g82Cx$G$"$k(B.
1.23    ! noro     2481: @item
        !          2482: $B0J2<$N%*%W%7%g%s$,;XDj$G$-$k(B.
        !          2483: @table @code
        !          2484: @item homo
        !          2485: 1 $B$N$H$-(B, $B@F<!2=$r7PM3$7$F7W;;$9$k(B. (@code{nd_gr}, @code{nd_f4} $B$N$_(B)
        !          2486: @item dp
        !          2487: 1 $B$N$H$-(B, $BJ,;6I=8=B?9`<0(B ($B2C72$N>l9g$K$O2C72B?9`<0(B) $B$r7k2L$H$7$FJV$9(B.
        !          2488: @item nora
        !          2489: 1 $B$N$H$-(B, $B7k2L$NAj8_4JLs$r9T$o$J$$(B.
        !          2490: @end table
1.15      noro     2491: @end itemize
                   2492: \E
                   2493:
                   2494: \BEG
                   2495: @itemize @bullet
                   2496: @item
                   2497: These functions are new implementations for computing Groebner bases.
                   2498: @item @code{nd_gr} executes Buchberger algorithm over the rationals
                   2499: if  @code{p} is 0, and that over GF(p) if @code{p} is a prime.
                   2500: @item @code{nd_gr_trace} executes the trace algorithm over the rationals.
                   2501: If @code{p} is 0 or 1, the trace algorithm is executed until it succeeds
                   2502: by using automatically chosen primes.
                   2503: If @code{p} a positive prime,
                   2504: the trace is comuted over GF(p).
                   2505: If the trace algorithm fails 0 is returned.
                   2506: If @code{p} is negative,
                   2507: the Groebner basis check and ideal-membership check are omitted.
                   2508: In this case, an automatically chosen prime if @code{p} is 1,
                   2509: otherwise the specified prime is used to compute a Groebner basis
                   2510: candidate.
1.17      noro     2511: Execution of @code{nd_f4_trace} is done as follows:
                   2512: For each total degree, an F4-reduction of S-polynomials over a finite field
                   2513: is done, and S-polynomials which give non-zero basis elements are gathered.
                   2514: Then F4-reduction over Q is done for the gathered S-polynomials.
                   2515: The obtained polynomial set is a Groebner basis candidate and the same
                   2516: check procedure as in the case of @code{nd_gr_trace} is done.
                   2517: @item
                   2518: @code{nd_f4} executes F4 algorithm over Q if @code{modular} is equal to 0,
                   2519: or over a finite field GF(@code{modular})
                   2520: if @code{modular} is a prime number of machine size (<2^29).
1.18      noro     2521: If @var{plist} is a list of polynomials, then a Groebner basis of the ideal generated by @var{plist}
                   2522: is computed. If @var{plist} is a list of lists of polynomials, then each list of polynomials are regarded
                   2523: as an element of a free module over a polynomial ring and a Groebner basis of the sub-module generated by @var{plist}
                   2524: in the free module. In the latter case a term order in the free module should be specified.
                   2525: This is specified by @var{[s,ord]}. If @var{s} is 0 then it means TOP (Term Over Position).
                   2526: If @var{s} is 1 then it means POT 1 (Position Over Term). @var{ord} is a term order in the base polynomial ring.
1.15      noro     2527: @item
                   2528: @code{nd_weyl_gr}, @code{nd_weyl_gr_trace} are for Weyl algebra computation.
                   2529: @item
1.18      noro     2530: Functions except for F4 related ones can handle rational coeffient cases.
1.15      noro     2531: @item
                   2532: In general these functions are more efficient than
                   2533: @code{dp_gr_main}, @code{dp_gr_mod_main}, especially over finite fields.
1.23    ! noro     2534: @item
        !          2535: The fallowing options can be specified.
        !          2536: @table @code
        !          2537: @item homo
        !          2538: If set to 1, the computation is done via homogenization. (only for @code{nd_gr} and @code{nd_f4})
        !          2539: @item dp
        !          2540: If set to 1, the functions return a list of distributed polynomials (a list of
        !          2541: module polynomials when the input is a sub-module).
        !          2542: @item nora
        !          2543: If set to 1, the inter-reduction is not performed.
        !          2544: @end table
1.15      noro     2545: @end itemize
                   2546: \E
                   2547:
                   2548: @example
                   2549: [38] load("cyclic")$
                   2550: [49] C=cyclic(7)$
                   2551: [50] V=vars(C)$
                   2552: [51] cputime(1)$
                   2553: [52] dp_gr_mod_main(C,V,0,31991,0)$
                   2554: 26.06sec + gc : 0.313sec(26.4sec)
                   2555: [53] nd_gr(C,V,31991,0)$
                   2556: ndv_alloc=1477188
                   2557: 5.737sec + gc : 0.1837sec(5.921sec)
                   2558: [54] dp_f4_mod_main(C,V,31991,0)$
                   2559: 3.51sec + gc : 0.7109sec(4.221sec)
                   2560: [55] nd_f4(C,V,31991,0)$
                   2561: 1.906sec + gc : 0.126sec(2.032sec)
                   2562: @end example
                   2563:
                   2564: @table @t
                   2565: \JP @item $B;2>H(B
                   2566: \EG @item References
                   2567: @fref{dp_ord},
                   2568: @fref{dp_gr_flags dp_gr_print},
1.2       noro     2569: \JP @fref{$B7W;;$*$h$SI=<($N@)8f(B}.
                   2570: \EG @fref{Controlling Groebner basis computations}
1.1       noro     2571: @end table
                   2572:
1.22      noro     2573: \JP @node nd_gr_postproc nd_weyl_gr_postproc,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   2574: \EG @node nd_gr_postproc nd_weyl_gr_postproc,,, Functions for Groebner basis computation
                   2575: @subsection @code{nd_gr_postproc}, @code{nd_weyl_gr_postproc}
                   2576: @findex nd_gr_postproc
                   2577: @findex nd_weyl_gr_postproc
                   2578:
                   2579: @table @t
                   2580: @item nd_gr_postproc(@var{plist},@var{vlist},@var{p},@var{order},@var{check})
                   2581: @itemx nd_weyl_gr_postproc(@var{plist},@var{vlist},@var{p},@var{order},@var{check})
                   2582: \JP :: $B%0%l%V%J4pDl8uJd$N%A%'%C%/$*$h$SAj8_4JLs(B
                   2583: \EG :: Check of Groebner basis candidate and inter-reduction
                   2584: @end table
                   2585:
                   2586: @table @var
                   2587: @item return
                   2588: \JP $B%j%9%H(B $B$^$?$O(B 0
                   2589: \EG list or 0
                   2590: @item plist  vlist
                   2591: \JP $B%j%9%H(B
                   2592: \EG list
                   2593: @item p
                   2594: \JP $BAG?t$^$?$O(B 0
                   2595: \EG prime or 0
                   2596: @item order
                   2597: \JP $B?t(B, $B%j%9%H$^$?$O9TNs(B
                   2598: \EG number, list or matrix
                   2599: @item check
                   2600: \JP 0 $B$^$?$O(B 1
                   2601: \EG 0 or 1
                   2602: @end table
                   2603:
                   2604: @itemize @bullet
                   2605: \BJP
                   2606: @item
                   2607: $B%0%l%V%J4pDl(B($B8uJd(B)$B$NAj8_4JLs$r9T$&(B.
                   2608: @item
                   2609: @code{nd_weyl_gr_postproc} $B$O(B Weyl $BBe?tMQ$G$"$k(B.
                   2610: @item
                   2611: @var{check=1} $B$N>l9g(B, @var{plist} $B$,(B, @var{vlist}, @var{p}, @var{order} $B$G;XDj$5$l$kB?9`<04D(B, $B9`=g=x$G%0%l%V%J!<4pDl$K$J$C$F$$$k$+(B
                   2612: $B$N%A%'%C%/$b9T$&(B.
                   2613: @item
                   2614: $B@F<!2=$7$F7W;;$7$?%0%l%V%J!<4pDl$rHs@F<!2=$7$?$b$N$rAj8_4JLs$r9T$&(B, CRT $B$G7W;;$7$?%0%l%V%J!<4pDl8uJd$N%A%'%C%/$r9T$&$J$I$N>l9g$KMQ$$$k(B.
                   2615: \E
                   2616: \BEG
                   2617: @item
                   2618: Perform the inter-reduction for a Groebner basis (candidate).
                   2619: @item
                   2620: @code{nd_weyl_gr_postproc} is for Weyl algebra.
                   2621: @item
                   2622: If @var{check=1} then the check whether @var{plist} is a Groebner basis with respect to a term order in a polynomial ring
                   2623: or Weyl algebra specified by @var{vlist}, @var{p} and @var{order}.
                   2624: @item
                   2625: This function is used for inter-reduction of a non-reduced Groebner basis that is obtained by dehomogenizing a Groebner basis
                   2626: computed via homogenization, or Groebner basis check of a Groebner basis candidate computed by CRT.
                   2627: \E
                   2628: @end itemize
                   2629:
                   2630: @example
                   2631: afo
                   2632: @end example
                   2633:
1.2       noro     2634: \JP @node dp_gr_flags dp_gr_print,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   2635: \EG @node dp_gr_flags dp_gr_print,,, Functions for Groebner basis computation
1.1       noro     2636: @subsection @code{dp_gr_flags}, @code{dp_gr_print}
                   2637: @findex dp_gr_flags
                   2638: @findex dp_gr_print
                   2639:
                   2640: @table @t
                   2641: @item dp_gr_flags([@var{list}])
1.7       noro     2642: @itemx dp_gr_print([@var{i}])
1.2       noro     2643: \JP :: $B7W;;$*$h$SI=<(MQ%Q%i%a%?$N@_Dj(B, $B;2>H(B
                   2644: \BEG :: Set and show various parameters for cotrolling computations
                   2645: and showing informations.
                   2646: \E
1.1       noro     2647: @end table
                   2648:
                   2649: @table @var
                   2650: @item return
1.2       noro     2651: \JP $B@_DjCM(B
                   2652: \EG value currently set
1.1       noro     2653: @item list
1.2       noro     2654: \JP $B%j%9%H(B
                   2655: \EG list
1.7       noro     2656: @item i
                   2657: \JP $B@0?t(B
                   2658: \EG integer
1.1       noro     2659: @end table
                   2660:
                   2661: @itemize @bullet
1.2       noro     2662: \BJP
1.1       noro     2663: @item
1.5       noro     2664: @code{dp_gr_main()}, @code{dp_gr_mod_main()}, @code{dp_gr_f_main()}  $B<B9T;~$K$*$1$k$5$^$6$^(B
1.1       noro     2665: $B$J%Q%i%a%?$r@_Dj(B, $B;2>H$9$k(B.
                   2666: @item
                   2667: $B0z?t$,$J$$>l9g(B, $B8=:_$N@_Dj$,JV$5$l$k(B.
                   2668: @item
                   2669: $B0z?t$O(B, @code{["Print",1,"NoSugar",1,...]} $B$J$k7A$N%j%9%H$G(B, $B:8$+$i=g$K(B
                   2670: $B@_Dj$5$l$k(B. $B%Q%i%a%?L>$OJ8;zNs$GM?$($kI,MW$,$"$k(B.
                   2671: @item
1.7       noro     2672: @code{dp_gr_print()} $B$O(B, $BFC$K%Q%i%a%?(B @code{Print}, @code{PrintShort} $B$NCM$rD>@\@_Dj(B, $B;2>H(B
                   2673: $B$G$-$k(B. $B@_Dj$5$l$kCM$O<!$NDL$j$G$"$k!#(B
                   2674: @table @var
                   2675: @item i=0
                   2676: @code{Print=0}, @code{PrintShort=0}
                   2677: @item i=1
                   2678: @code{Print=1}, @code{PrintShort=0}
                   2679: @item i=2
                   2680: @code{Print=0}, @code{PrintShort=1}
                   2681: @end table
                   2682: $B$3$l$O(B, @code{dp_gr_main()} $B$J$I$r%5%V%k!<%A%s$H$7$FMQ$$$k%f!<%6(B
                   2683: $BH!?t$K$*$$$F(B, $B$=$N%5%V%k!<%A%s$,Cf4V>pJs$NI=<((B
1.1       noro     2684: $B$r9T$&:]$K(B, $B?WB.$K%U%i%0$r8+$k$3$H$,$G$-$k$h$&$KMQ0U$5$l$F$$$k(B.
1.2       noro     2685: \E
                   2686: \BEG
                   2687: @item
                   2688: @code{dp_gr_flags()} sets and shows various parameters for Groebner basis
                   2689:  computation.
                   2690: @item
                   2691: If no argument is specified the current settings are returned.
                   2692: @item
                   2693: Arguments must be specified as a list such as
                   2694:  @code{["Print",1,"NoSugar",1,...]}. Names of parameters must be character
                   2695: strings.
                   2696: @item
                   2697: @code{dp_gr_print()} is used to set and show the value of a parameter
1.7       noro     2698: @code{Print} and @code{PrintShort}.
                   2699: @table @var
                   2700: @item i=0
                   2701: @code{Print=0}, @code{PrintShort=0}
                   2702: @item i=1
                   2703: @code{Print=1}, @code{PrintShort=0}
                   2704: @item i=2
                   2705: @code{Print=0}, @code{PrintShort=1}
                   2706: @end table
                   2707: This functions is prepared to get quickly the value
                   2708: when a user defined function calling @code{dp_gr_main()} etc.
1.2       noro     2709: uses the value as a flag for showing intermediate informations.
                   2710: \E
1.1       noro     2711: @end itemize
                   2712:
                   2713: @table @t
1.2       noro     2714: \JP @item $B;2>H(B
                   2715: \EG @item References
                   2716: \JP @fref{$B7W;;$*$h$SI=<($N@)8f(B}
                   2717: \EG @fref{Controlling Groebner basis computations}
1.1       noro     2718: @end table
                   2719:
1.2       noro     2720: \JP @node dp_ord,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   2721: \EG @node dp_ord,,, Functions for Groebner basis computation
1.1       noro     2722: @subsection @code{dp_ord}
                   2723: @findex dp_ord
                   2724:
                   2725: @table @t
                   2726: @item dp_ord([@var{order}])
1.2       noro     2727: \JP :: $BJQ?t=g=x7?$N@_Dj(B, $B;2>H(B
                   2728: \EG :: Set and show the ordering type.
1.1       noro     2729: @end table
                   2730:
                   2731: @table @var
                   2732: @item return
1.2       noro     2733: \JP $BJQ?t=g=x7?(B ($B?t(B, $B%j%9%H$^$?$O9TNs(B)
                   2734: \EG ordering type (number, list or matrix)
1.1       noro     2735: @item order
1.2       noro     2736: \JP $B?t(B, $B%j%9%H$^$?$O9TNs(B
                   2737: \EG number, list or matrix
1.1       noro     2738: @end table
                   2739:
                   2740: @itemize @bullet
1.2       noro     2741: \BJP
1.1       noro     2742: @item
                   2743: $B0z?t$,$"$k;~(B, $BJQ?t=g=x7?$r(B @var{order} $B$K@_Dj$9$k(B. $B0z?t$,$J$$;~(B,
                   2744: $B8=:_@_Dj$5$l$F$$$kJQ?t=g=x7?$rJV$9(B.
                   2745:
                   2746: @item
                   2747: $BJ,;6I=8=B?9`<0$K4X$9$kH!?t(B, $B1i;;$O0z?t$H$7$FJQ?t=g=x7?$r$H$k$b$N$H$H$i$J$$$b$N(B
                   2748: $B$,$"$j(B, $B$H$i$J$$$b$N$K4X$7$F$O(B, $B$=$N;~E@$G@_Dj$5$l$F$$$kCM$rMQ$$$F7W;;$,(B
                   2749: $B9T$o$l$k(B.
                   2750:
                   2751: @item
                   2752: @code{gr()} $B$J$I(B, $B0z?t$H$7$FJQ?t=g=x7?$r$H$k$b$N$O(B, $BFbIt$G(B @code{dp_ord()}
                   2753: $B$r8F$S=P$7(B, $BJQ?t=g=x7?$r@_Dj$9$k(B. $B$3$N@_Dj$O(B, $B7W;;=*N;8e$b@8$-;D$k(B.
                   2754:
                   2755: @item
                   2756: $BJ,;6I=8=B?9`<0$N;MB'1i;;$b(B, $B@_Dj$5$l$F$$$kCM$rMQ$$$F7W;;$5$l$k(B. $B=>$C$F(B,
                   2757: $B$=$NB?9`<0$,@8@.$5$l$?;~E@$K$*$1$kJQ?t=g=x7?$,(B, $B;MB'1i;;;~$K@5$7$/@_Dj(B
                   2758: $B$5$l$F$$$J$1$l$P$J$i$J$$(B. $B$^$?(B, $B1i;;BP>]$H$J$kB?9`<0$O(B, $BF10l$NJQ?t=g=x(B
                   2759: $B7?$K4p$E$$$F@8@.$5$l$?$b$N$G$J$1$l$P$J$i$J$$(B.
                   2760:
                   2761: @item
                   2762: $B%H%C%W%l%Y%kH!?t0J30$NH!?t$rD>@\8F$S=P$9>l9g$K$O(B, $B$3$NH!?t$K$h$j(B
                   2763: $BJQ?t=g=x7?$r@5$7$/@_Dj$7$J$1$l$P$J$i$J$$(B.
1.23    ! noro     2764:
        !          2765: @item
        !          2766: $B0z?t$,%j%9%H$N>l9g(B, $B<+M32C72$K$*$1$k9`=g=x7?$r@_Dj$9$k(B. $B0z?t$,(B@code{[0,Ord]} $B$N>l9g(B,
        !          2767: $BB?9`<04D>e$G(B @code{Ord} $B$G;XDj$5$l$k9`=g=x$K4p$E$/(B TOP $B=g=x(B, $B0z?t$,(B @code{[1,Ord]} $B$N>l9g(B
        !          2768: OPT $B=g=x$r@_Dj$9$k(B.
        !          2769:
1.2       noro     2770: \E
                   2771: \BEG
                   2772: @item
                   2773: If an argument is specified, the function
                   2774: sets the current ordering type to @var{order}.
                   2775: If no argument is specified, the function returns the ordering
                   2776: type currently set.
                   2777:
                   2778: @item
                   2779: There are two types of functions concerning distributed polynomial,
                   2780: functions which take a ordering type and those which don't take it.
                   2781: The latter ones use the current setting.
                   2782:
                   2783: @item
                   2784: Functions such as @code{gr()}, which need a ordering type as an argument,
                   2785: call @code{dp_ord()} internally during the execution.
                   2786: The setting remains after the execution.
                   2787:
                   2788: Fundamental arithmetics for distributed polynomial also use the current
                   2789: setting. Therefore, when such arithmetics for distributed polynomials
                   2790: are done, the current setting must coincide with the ordering type
                   2791: which was used upon the creation of the polynomials. It is assumed
                   2792: that such polynomials were generated under the same ordering type.
                   2793:
                   2794: @item
                   2795: Type of term ordering must be correctly set by this function
                   2796: when functions other than top level functions are called directly.
1.23    ! noro     2797:
        !          2798: @item
        !          2799: If the argument is a list, then an ordering type in a free module is set.
        !          2800: If the argument is @code{[0,Ord]} then a TOP ordering based on the ordering type specified
        !          2801: by @code{Ord} is set.
        !          2802: If the argument is @code{[1,Ord]} then a POT ordering is set.
1.2       noro     2803: \E
1.1       noro     2804: @end itemize
                   2805:
                   2806: @example
                   2807: [19] dp_ord(0)$
                   2808: [20] <<1,2,3>>+<<3,1,1>>;
                   2809: (1)*<<1,2,3>>+(1)*<<3,1,1>>
                   2810: [21] dp_ord(2)$
                   2811: [22] <<1,2,3>>+<<3,1,1>>;
                   2812: (1)*<<3,1,1>>+(1)*<<1,2,3>>
                   2813: @end example
                   2814:
                   2815: @table @t
1.2       noro     2816: \JP @item $B;2>H(B
                   2817: \EG @item References
                   2818: \JP @fref{$B9`=g=x$N@_Dj(B}
                   2819: \EG @fref{Setting term orderings}
1.1       noro     2820: @end table
                   2821:
1.18      noro     2822: \JP @node dp_set_weight dp_set_top_weight dp_weyl_set_weight,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   2823: \EG @node dp_set_weight dp_set_top_weight dp_weyl_set_weight,,, Functions for Groebner basis computation
                   2824: @subsection @code{dp_set_weight}, @code{dp_set_top_weight}, @code{dp_weyl_set_weight}
                   2825: @findex dp_set_weight
                   2826: @findex dp_set_top_weight
                   2827: @findex dp_weyl_set_weight
                   2828:
                   2829: @table @t
                   2830: @item dp_set_weight([@var{weight}])
                   2831: \JP :: sugar weight $B$N@_Dj(B, $B;2>H(B
                   2832: \EG :: Set and show the sugar weight.
                   2833: @item dp_set_top_weight([@var{weight}])
                   2834: \JP :: top weight $B$N@_Dj(B, $B;2>H(B
                   2835: \EG :: Set and show the top weight.
                   2836: @item dp_weyl_set_weight([@var{weight}])
                   2837: \JP :: weyl weight $B$N@_Dj(B, $B;2>H(B
                   2838: \EG :: Set and show the weyl weight.
                   2839: @end table
                   2840:
                   2841: @table @var
                   2842: @item return
                   2843: \JP $B%Y%/%H%k(B
                   2844: \EG a vector
                   2845: @item weight
                   2846: \JP $B@0?t$N%j%9%H$^$?$O%Y%/%H%k(B
                   2847: \EG a list or vector of integers
                   2848: @end table
                   2849:
                   2850: @itemize @bullet
                   2851: \BJP
                   2852: @item
                   2853: @code{dp_set_weight} $B$O(B sugar weight $B$r(B @var{weight} $B$K@_Dj$9$k(B. $B0z?t$,$J$$;~(B,
                   2854: $B8=:_@_Dj$5$l$F$$$k(B sugar weight $B$rJV$9(B. sugar weight $B$O@5@0?t$r@.J,$H$9$k%Y%/%H%k$G(B,
                   2855: $B3FJQ?t$N=E$_$rI=$9(B. $B<!?t$D$-=g=x$K$*$$$F(B, $BC19`<0$N<!?t$r7W;;$9$k:]$KMQ$$$i$l$k(B.
                   2856: $B@F<!2=JQ?tMQ$K(B, $BKvHx$K(B 1 $B$rIU$12C$($F$*$/$H0BA4$G$"$k(B.
                   2857: @item
                   2858: @code{dp_set_top_weight} $B$O(B top weight $B$r(B @var{weight} $B$K@_Dj$9$k(B. $B0z?t$,$J$$;~(B,
                   2859: $B8=:_@_Dj$5$l$F$$$k(B top weight $B$rJV$9(B. top weight $B$,@_Dj$5$l$F$$$k$H$-(B,
                   2860: $B$^$:(B top weight $B$K$h$kC19`<0Hf3S$r@h$K9T$&(B. tie breaker $B$H$7$F8=:_@_Dj$5$l$F$$$k(B
                   2861: $B9`=g=x$,MQ$$$i$l$k$,(B, $B$3$NHf3S$K$O(B top weight $B$OMQ$$$i$l$J$$(B.
                   2862:
                   2863: @item
                   2864: @code{dp_weyl_set_weight} $B$O(B weyl weight $B$r(B @var{weight} $B$K@_Dj$9$k(B. $B0z?t$,$J$$;~(B,
                   2865: $B8=:_@_Dj$5$l$F$$$k(B weyl weight $B$rJV$9(B. weyl weight w $B$r@_Dj$9$k$H(B,
                   2866: $B9`=g=x7?(B 11 $B$G$N7W;;$K$*$$$F(B, (-w,w) $B$r(B top weight, tie breaker $B$r(B graded reverse lex
                   2867: $B$H$7$?9`=g=x$,@_Dj$5$l$k(B.
                   2868: \E
                   2869: \BEG
                   2870: @item
                   2871: @code{dp_set_weight} sets the sugar weight=@var{weight}. It returns the current sugar weight.
                   2872: A sugar weight is a vector with positive integer components and it represents the weights of variables.
                   2873: It is used for computing the weight of a monomial in a graded ordering.
                   2874: It is recommended to append a component 1 at the end of the weight vector for a homogenizing variable.
                   2875: @item
                   2876: @code{dp_set_top_weight} sets the top weight=@var{weight}. It returns the current top weight.
                   2877: It a top weight is set, the weights of monomials under the top weight are firstly compared.
                   2878: If the the weights are equal then the current term ordering is applied as a tie breaker, but
                   2879: the top weight is not used in the tie breaker.
                   2880:
                   2881: @item
                   2882: @code{dp_weyl_set_weight} sets the weyl weigh=@var{weight}. It returns the current weyl weight.
                   2883: If a weyl weight w is set, in the comparsion by the term order type 11, a term order with
                   2884: the top weight=(-w,w) and the tie breaker=graded reverse lex is applied.
                   2885: \E
                   2886: @end itemize
                   2887:
                   2888: @table @t
                   2889: \JP @item $B;2>H(B
                   2890: \EG @item References
                   2891: @fref{Weight}
                   2892: @end table
                   2893:
                   2894:
1.2       noro     2895: \JP @node dp_ptod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   2896: \EG @node dp_ptod,,, Functions for Groebner basis computation
1.1       noro     2897: @subsection @code{dp_ptod}
                   2898: @findex dp_ptod
                   2899:
                   2900: @table @t
                   2901: @item dp_ptod(@var{poly},@var{vlist})
1.2       noro     2902: \JP :: $BB?9`<0$rJ,;6I=8=B?9`<0$KJQ49$9$k(B.
                   2903: \EG :: Converts an ordinary polynomial into a distributed polynomial.
1.1       noro     2904: @end table
                   2905:
                   2906: @table @var
                   2907: @item return
1.2       noro     2908: \JP $BJ,;6I=8=B?9`<0(B
                   2909: \EG distributed polynomial
1.1       noro     2910: @item poly
1.2       noro     2911: \JP $BB?9`<0(B
                   2912: \EG polynomial
1.1       noro     2913: @item vlist
1.2       noro     2914: \JP $B%j%9%H(B
                   2915: \EG list
1.1       noro     2916: @end table
                   2917:
                   2918: @itemize @bullet
1.2       noro     2919: \BJP
1.1       noro     2920: @item
                   2921: $BJQ?t=g=x(B @var{vlist} $B$*$h$S8=:_$NJQ?t=g=x7?$K=>$C$FJ,;6I=8=B?9`<0$KJQ49$9$k(B.
                   2922: @item
                   2923: @var{vlist} $B$K4^$^$l$J$$ITDj85$O(B, $B78?tBN$KB0$9$k$H$7$FJQ49$5$l$k(B.
1.2       noro     2924: \E
                   2925: \BEG
                   2926: @item
                   2927: According to the variable ordering @var{vlist} and current
                   2928: type of term ordering, this function converts an ordinary
                   2929: polynomial into a distributed polynomial.
                   2930: @item
                   2931: Indeterminates not included in @var{vlist} are regarded to belong to
                   2932: the coefficient field.
                   2933: \E
1.1       noro     2934: @end itemize
                   2935:
                   2936: @example
                   2937: [50] dp_ord(0);
                   2938: 1
                   2939: [51] dp_ptod((x+y+z)^2,[x,y,z]);
                   2940: (1)*<<2,0,0>>+(2)*<<1,1,0>>+(1)*<<0,2,0>>+(2)*<<1,0,1>>+(2)*<<0,1,1>>
                   2941: +(1)*<<0,0,2>>
                   2942: [52] dp_ptod((x+y+z)^2,[x,y]);
1.5       noro     2943: (1)*<<2,0>>+(2)*<<1,1>>+(1)*<<0,2>>+(2*z)*<<1,0>>+(2*z)*<<0,1>>
                   2944: +(z^2)*<<0,0>>
1.1       noro     2945: @end example
                   2946:
                   2947: @table @t
1.2       noro     2948: \JP @item $B;2>H(B
                   2949: \EG @item References
1.1       noro     2950: @fref{dp_dtop},
                   2951: @fref{dp_ord}.
                   2952: @end table
                   2953:
1.23    ! noro     2954: \JP @node dpm_dptodpm,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
        !          2955: \EG @node dpm_dptodpm,,, Functions for Groebner basis computation
        !          2956: @subsection @code{dpm_dptodpm}
        !          2957: @findex dpm_dptodpm
        !          2958:
        !          2959: @table @t
        !          2960: @item dpm_dptodpm(@var{dpoly},@var{pos})
        !          2961: \JP :: $BJ,;6I=8=B?9`<0$r2C72B?9`<0$KJQ49$9$k(B.
        !          2962: \EG :: Converts a distributed polynomial into a module polynomial.
        !          2963: @end table
        !          2964:
        !          2965: @table @var
        !          2966: @item return
        !          2967: \JP $B2C72B?9`<0(B
        !          2968: \EG module polynomial
        !          2969: @item dpoly
        !          2970: \JP $BJ,;6I=8=B?9`<0(B
        !          2971: \EG distributed polynomial
        !          2972: @item pos
        !          2973: \JP $B@5@0?t(B
        !          2974: \EG positive integer
        !          2975: @end table
        !          2976:
        !          2977: @itemize @bullet
        !          2978: \BJP
        !          2979: @item
        !          2980: $BJ,;6I=8=B?9`<0$r2C72B?9`<0$KJQ49$9$k(B.
        !          2981: @item
        !          2982: $B=PNO$O2C72B?9`<0(B @code{dpoly e_pos} $B$G$"$k(B.
        !          2983: \E
        !          2984: \BEG
        !          2985: @item
        !          2986: This function converts a distributed polynomial into a module polynomial.
        !          2987: @item
        !          2988: The output is @code{dpoly e_pos}.
        !          2989: \E
        !          2990: @end itemize
        !          2991:
        !          2992: @example
        !          2993: [50] dp_ord([0,0])$
        !          2994: [51] D=dp_ptod((x+y+z)^2,[x,y,z]);
        !          2995: (1)*<<2,0,0>>+(2)*<<1,1,0>>+(1)*<<0,2,0>>+(2)*<<1,0,1>>+(2)*<<0,1,1>>
        !          2996: +(1)*<<0,0,2>>
        !          2997: [52] dp_dptodpm(D,2);
        !          2998: (1)*<<2,0,0:2>>+(2)*<<1,1,0:2>>+(1)*<<0,2,0:2>>+(2)*<<1,0,1:2>>
        !          2999: +(2)*<<0,1,1:2>>+(1)*<<0,0,2:2>>
        !          3000: @end example
        !          3001:
        !          3002: @table @t
        !          3003: \JP @item $B;2>H(B
        !          3004: \EG @item References
        !          3005: @fref{dp_ptod},
        !          3006: @fref{dp_ord}.
        !          3007: @end table
        !          3008:
        !          3009: \JP @node dpm_ltod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
        !          3010: \EG @node dpm_ltod,,, Functions for Groebner basis computation
        !          3011: @subsection @code{dpm_ltod}
        !          3012: @findex dpm_ltod
        !          3013:
        !          3014: @table @t
        !          3015: @item dpm_dptodpm(@var{plist},@var{vlist})
        !          3016: \JP :: $BB?9`<0%j%9%H$r2C72B?9`<0$KJQ49$9$k(B.
        !          3017: \EG :: Converts a list of polynomials into a module polynomial.
        !          3018: @end table
        !          3019:
        !          3020: @table @var
        !          3021: @item return
        !          3022: \JP $B2C72B?9`<0(B
        !          3023: \EG module polynomial
        !          3024: @item plist
        !          3025: \JP $BB?9`<0%j%9%H(B
        !          3026: \EG list of polynomials
        !          3027: @item vlist
        !          3028: \JP $BJQ?t%j%9%H(B
        !          3029: \EG list of variables
        !          3030: @end table
        !          3031:
        !          3032: @itemize @bullet
        !          3033: \BJP
        !          3034: @item
        !          3035: $BB?9`<0%j%9%H$r2C72B?9`<0$KJQ49$9$k(B.
        !          3036: @item
        !          3037: @code{[p1,...,pm]} $B$O(B @code{p1 e1+...+pm em} $B$KJQ49$5$l$k(B.
        !          3038: \E
        !          3039: \BEG
        !          3040: @item
        !          3041: This function converts a list of polynomials into a module polynomial.
        !          3042: @item
        !          3043: @code{[p1,...,pm]} is converted into @code{p1 e1+...+pm em}.
        !          3044: \E
        !          3045: @end itemize
        !          3046:
        !          3047: @example
        !          3048: [2126] dp_ord([0,0])$
        !          3049: [2127] dpm_ltod([x^2+y^2,x,y-z],[x,y,z]);
        !          3050: (1)*<<2,0,0:1>>+(1)*<<0,2,0:1>>+(1)*<<1,0,0:2>>+(1)*<<0,1,0:3>>
        !          3051: +(-1)*<<0,0,1:3>>
        !          3052: @end example
        !          3053:
        !          3054: @table @t
        !          3055: \JP @item $B;2>H(B
        !          3056: \EG @item References
        !          3057: @fref{dpm_dtol},
        !          3058: @fref{dp_ord}.
        !          3059: @end table
        !          3060:
        !          3061: \JP @node dpm_dtol,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
        !          3062: \EG @node dpm_dtol,,, Functions for Groebner basis computation
        !          3063: @subsection @code{dpm_dtol}
        !          3064: @findex dpm_dtol
        !          3065:
        !          3066: @table @t
        !          3067: @item dpm_dptodpm(@var{poly},@var{vlist})
        !          3068: \JP :: $B2C72B?9`<0$rB?9`<0%j%9%H$KJQ49$9$k(B.
        !          3069: \EG :: Converts a module polynomial into a list of polynomials.
        !          3070: @end table
        !          3071:
        !          3072: @table @var
        !          3073: @item return
        !          3074: \JP $BB?9`<0%j%9%H(B
        !          3075: \EG list of polynomials
        !          3076: @item poly
        !          3077: \JP $B2C72B?9`<0(B
        !          3078: \EG module polynomial
        !          3079: @item vlist
        !          3080: \JP $BJQ?t%j%9%H(B
        !          3081: \EG list of variables
        !          3082: @end table
        !          3083:
        !          3084: @itemize @bullet
        !          3085: \BJP
        !          3086: @item
        !          3087: $B2C72B?9`<0$rB?9`<0%j%9%H$KJQ49$9$k(B.
        !          3088: @item
        !          3089: @code{p1 e1+...+pm em} $B$O(B @code{[p1,...,pm]} $B$KJQ49$5$l$k(B.
        !          3090: @item
        !          3091: $B=PNO%j%9%H$ND9$5$O(B, @code{poly} $B$K4^$^$l$kI8=`4pDl$N:GBg%$%s%G%C%/%9$H$J$k(B.
        !          3092: \E
        !          3093: \BEG
        !          3094: @item
        !          3095: This function converts a module polynomial into a list of polynomials.
        !          3096: @item
        !          3097: @code{p1 e1+...+pm em} is converted into @code{[p1,...,pm]}.
        !          3098: @item
        !          3099: The length of the output list is equal to the largest index among those of the standard bases
        !          3100: containd in @code{poly}.
        !          3101: \E
        !          3102: @end itemize
        !          3103:
        !          3104: @example
        !          3105: [2126] dp_ord([0,0])$
        !          3106: [2127] D=(1)*<<2,0,0:1>>+(1)*<<0,2,0:1>>+(1)*<<1,0,0:2>>+(1)*<<0,1,0:3>>
        !          3107: +(-1)*<<0,0,1:3>>$
        !          3108: [2128] dpm_dtol(D,[x,y,z]);
        !          3109: [x^2+y^2,x,y-z]
        !          3110: @end example
        !          3111:
        !          3112: @table @t
        !          3113: \JP @item $B;2>H(B
        !          3114: \EG @item References
        !          3115: @fref{dpm_ltod},
        !          3116: @fref{dp_ord}.
        !          3117: @end table
        !          3118:
1.2       noro     3119: \JP @node dp_dtop,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   3120: \EG @node dp_dtop,,, Functions for Groebner basis computation
1.1       noro     3121: @subsection @code{dp_dtop}
                   3122: @findex dp_dtop
                   3123:
                   3124: @table @t
                   3125: @item dp_dtop(@var{dpoly},@var{vlist})
1.2       noro     3126: \JP :: $BJ,;6I=8=B?9`<0$rB?9`<0$KJQ49$9$k(B.
                   3127: \EG :: Converts a distributed polynomial into an ordinary polynomial.
1.1       noro     3128: @end table
                   3129:
                   3130: @table @var
                   3131: @item return
1.2       noro     3132: \JP $BB?9`<0(B
                   3133: \EG polynomial
1.1       noro     3134: @item dpoly
1.2       noro     3135: \JP $BJ,;6I=8=B?9`<0(B
                   3136: \EG distributed polynomial
1.1       noro     3137: @item vlist
1.2       noro     3138: \JP $B%j%9%H(B
                   3139: \EG list
1.1       noro     3140: @end table
                   3141:
                   3142: @itemize @bullet
1.2       noro     3143: \BJP
1.1       noro     3144: @item
                   3145: $BJ,;6I=8=B?9`<0$r(B, $BM?$($i$l$?ITDj85%j%9%H$rMQ$$$FB?9`<0$KJQ49$9$k(B.
                   3146: @item
                   3147: $BITDj85%j%9%H$O(B, $BD9$5J,;6I=8=B?9`<0$NJQ?t$N8D?t$H0lCW$7$F$$$l$P2?$G$b$h$$(B.
1.2       noro     3148: \E
                   3149: \BEG
                   3150: @item
                   3151: This function converts a distributed polynomial into an ordinary polynomial
                   3152: according to a list of indeterminates @var{vlist}.
                   3153: @item
                   3154: @var{vlist} is such a list that its length coincides with the number of
                   3155: variables of @var{dpoly}.
                   3156: \E
1.1       noro     3157: @end itemize
                   3158:
                   3159: @example
                   3160: [53] T=dp_ptod((x+y+z)^2,[x,y]);
1.5       noro     3161: (1)*<<2,0>>+(2)*<<1,1>>+(1)*<<0,2>>+(2*z)*<<1,0>>+(2*z)*<<0,1>>
                   3162: +(z^2)*<<0,0>>
1.1       noro     3163: [54] P=dp_dtop(T,[a,b]);
                   3164: z^2+(2*a+2*b)*z+a^2+2*b*a+b^2
                   3165: @end example
                   3166:
1.2       noro     3167: \JP @node dp_mod dp_rat,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   3168: \EG @node dp_mod dp_rat,,, Functions for Groebner basis computation
1.1       noro     3169: @subsection @code{dp_mod}, @code{dp_rat}
                   3170: @findex dp_mod
                   3171: @findex dp_rat
                   3172:
                   3173: @table @t
                   3174: @item dp_mod(@var{p},@var{mod},@var{subst})
1.2       noro     3175: \JP :: $BM-M}?t78?tJ,;6I=8=B?9`<0$NM-8BBN78?t$X$NJQ49(B
                   3176: \EG :: Converts a disributed polynomial into one with coefficients in a finite field.
1.1       noro     3177: @item dp_rat(@var{p})
1.2       noro     3178: \JP :: $BM-8BBN78?tJ,;6I=8=B?9`<0$NM-M}?t78?t$X$NJQ49(B
                   3179: \BEG
                   3180: :: Converts a distributed polynomial with coefficients in a finite field into
                   3181: one with coefficients in the rationals.
                   3182: \E
1.1       noro     3183: @end table
                   3184:
                   3185: @table @var
                   3186: @item return
1.2       noro     3187: \JP $BJ,;6I=8=B?9`<0(B
                   3188: \EG distributed polynomial
1.1       noro     3189: @item p
1.2       noro     3190: \JP $BJ,;6I=8=B?9`<0(B
                   3191: \EG distributed polynomial
1.1       noro     3192: @item mod
1.2       noro     3193: \JP $BAG?t(B
                   3194: \EG prime
1.1       noro     3195: @item subst
1.2       noro     3196: \JP $B%j%9%H(B
                   3197: \EG list
1.1       noro     3198: @end table
                   3199:
                   3200: @itemize @bullet
1.2       noro     3201: \BJP
1.1       noro     3202: @item
                   3203: @code{dp_nf_mod()}, @code{dp_true_nf_mod()} $B$O(B, $BF~NO$H$7$FM-8BBN78?t$N(B
                   3204: $BJ,;6I=8=B?9`<0$rI,MW$H$9$k(B. $B$3$N$h$&$J>l9g(B, @code{dp_mod()} $B$K$h$j(B
                   3205: $BM-M}?t78?tJ,;6I=8=B?9`<0$rJQ49$7$FMQ$$$k$3$H$,$G$-$k(B. $B$^$?(B, $BF@$i$l$?(B
                   3206: $B7k2L$O(B, $BM-8BBN78?tB?9`<0$H$O1i;;$G$-$k$,(B, $BM-M}?t78?tB?9`<0$H$O1i;;$G$-$J$$(B
                   3207: $B$?$a(B, @code{dp_rat()} $B$K$h$jJQ49$9$kI,MW$,$"$k(B.
                   3208: @item
                   3209: $BM-8BBN78?t$N1i;;$K$*$$$F$O(B, $B$"$i$+$8$a(B @code{setmod()} $B$K$h$jM-8BBN$N85$N(B
                   3210: $B8D?t$r;XDj$7$F$*$/I,MW$,$"$k(B.
                   3211: @item
                   3212: @var{subst} $B$O(B, $B78?t$,M-M}<0$N>l9g(B, $B$=$NM-M}<0$NJQ?t$K$"$i$+$8$a?t$rBeF~(B
                   3213: $B$7$?8eM-8BBN78?t$KJQ49$9$k$H$$$&A`:n$r9T$&:]$N(B, $BBeF~CM$r;XDj$9$k$b$N$G(B,
                   3214: @code{[[@var{var},@var{value}],...]} $B$N7A$N%j%9%H$G$"$k(B.
1.2       noro     3215: \E
                   3216: \BEG
                   3217: @item
                   3218: @code{dp_nf_mod()} and @code{dp_true_nf_mod()} require
                   3219: distributed polynomials with coefficients in a finite field as arguments.
                   3220: @code{dp_mod()} is used to convert distributed polynomials with rational
                   3221: number coefficients into appropriate ones.
                   3222: Polynomials with coefficients in a finite field
                   3223: cannot be used as inputs of operations with polynomials
                   3224: with rational number coefficients. @code{dp_rat()} is used for such cases.
                   3225: @item
                   3226: The ground finite field must be set in advance by using @code{setmod()}.
                   3227: @item
                   3228: @var{subst} is such a list as @code{[[@var{var},@var{value}],...]}.
                   3229: This is valid when the ground field of the input polynomial is a
                   3230: rational function field. @var{var}'s are variables in the ground field and
                   3231: the list means that @var{value} is substituted for @var{var} before
                   3232: converting the coefficients into elements of a finite field.
                   3233: \E
1.1       noro     3234: @end itemize
                   3235:
                   3236: @example
                   3237: @end example
                   3238:
                   3239: @table @t
1.2       noro     3240: \JP @item $B;2>H(B
                   3241: \EG @item References
1.18      noro     3242: @fref{dp_nf dp_nf_mod dp_true_nf dp_true_nf_mod dp_weyl_nf dp_weyl_nf_mod},
1.1       noro     3243: @fref{subst psubst},
                   3244: @fref{setmod}.
                   3245: @end table
                   3246:
1.2       noro     3247: \JP @node dp_homo dp_dehomo,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   3248: \EG @node dp_homo dp_dehomo,,, Functions for Groebner basis computation
1.1       noro     3249: @subsection @code{dp_homo}, @code{dp_dehomo}
                   3250: @findex dp_homo
                   3251: @findex dp_dehomo
                   3252:
                   3253: @table @t
                   3254: @item dp_homo(@var{dpoly})
1.2       noro     3255: \JP :: $BJ,;6I=8=B?9`<0$N@F<!2=(B
                   3256: \EG :: Homogenize a distributed polynomial
1.1       noro     3257: @item dp_dehomo(@var{dpoly})
1.2       noro     3258: \JP :: $B@F<!J,;6I=8=B?9`<0$NHs@F<!2=(B
                   3259: \EG :: Dehomogenize a homogenious distributed polynomial
1.1       noro     3260: @end table
                   3261:
                   3262: @table @var
                   3263: @item return
1.2       noro     3264: \JP $BJ,;6I=8=B?9`<0(B
                   3265: \EG distributed polynomial
1.1       noro     3266: @item dpoly
1.2       noro     3267: \JP $BJ,;6I=8=B?9`<0(B
                   3268: \EG distributed polynomial
1.1       noro     3269: @end table
                   3270:
                   3271: @itemize @bullet
1.2       noro     3272: \BJP
1.1       noro     3273: @item
                   3274: @code{dp_homo()} $B$O(B, @var{dpoly} $B$N(B $B3F9`(B @var{t} $B$K$D$$$F(B, $B;X?t%Y%/%H%k$ND9$5$r(B
                   3275: 1 $B?-$P$7(B, $B:G8e$N@.J,$NCM$r(B @var{d}-@code{deg(@var{t})}
                   3276: (@var{d} $B$O(B @var{dpoly} $B$NA4<!?t(B) $B$H$7$?J,;6I=8=B?9`<0$rJV$9(B.
                   3277: @item
                   3278: @code{dp_dehomo()} $B$O(B, @var{dpoly} $B$N3F9`$K$D$$$F(B, $B;X?t%Y%/%H%k$N:G8e$N@.J,(B
                   3279: $B$r<h$j=|$$$?J,;6B?9`<0$rJV$9(B.
                   3280: @item
                   3281: $B$$$:$l$b(B, $B@8@.$5$l$?B?9`<0$rMQ$$$?1i;;$r9T$&>l9g(B, $B$=$l$i$KE,9g$9$k9`=g=x$r(B
                   3282: $B@5$7$/@_Dj$9$kI,MW$,$"$k(B.
                   3283: @item
                   3284: @code{hgr()} $B$J$I$K$*$$$F(B, $BFbItE*$KMQ$$$i$l$F$$$k(B.
1.2       noro     3285: \E
                   3286: \BEG
                   3287: @item
                   3288: @code{dp_homo()} makes a copy of @var{dpoly}, extends
                   3289: the length of the exponent vector of each term @var{t} in the copy by 1,
                   3290: and sets the value of the newly appended
                   3291: component to @var{d}-@code{deg(@var{t})}, where @var{d} is the total
                   3292: degree of @var{dpoly}.
                   3293: @item
                   3294: @code{dp_dehomo()} make a copy of @var{dpoly} and removes the last component
                   3295: of each terms in the copy.
                   3296: @item
                   3297: Appropriate term orderings must be set when the results are used as inputs
                   3298: of some operations.
                   3299: @item
                   3300: These are used internally in @code{hgr()} etc.
                   3301: \E
1.1       noro     3302: @end itemize
                   3303:
                   3304: @example
                   3305: [202] X=<<1,2,3>>+3*<<1,2,1>>;
                   3306: (1)*<<1,2,3>>+(3)*<<1,2,1>>
                   3307: [203] dp_homo(X);
                   3308: (1)*<<1,2,3,0>>+(3)*<<1,2,1,2>>
                   3309: [204] dp_dehomo(@@);
                   3310: (1)*<<1,2,3>>+(3)*<<1,2,1>>
                   3311: @end example
                   3312:
                   3313: @table @t
1.2       noro     3314: \JP @item $B;2>H(B
                   3315: \EG @item References
1.1       noro     3316: @fref{gr hgr gr_mod}.
                   3317: @end table
                   3318:
1.2       noro     3319: \JP @node dp_ptozp dp_prim,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   3320: \EG @node dp_ptozp dp_prim,,, Functions for Groebner basis computation
1.1       noro     3321: @subsection @code{dp_ptozp}, @code{dp_prim}
                   3322: @findex dp_ptozp
                   3323: @findex dp_prim
                   3324:
                   3325: @table @t
                   3326: @item dp_ptozp(@var{dpoly})
1.2       noro     3327: \JP :: $BDj?tG\$7$F78?t$r@0?t78?t$+$D78?t$N@0?t(B GCD $B$r(B 1 $B$K$9$k(B.
                   3328: \BEG
                   3329: :: Converts a distributed polynomial @var{poly} with rational coefficients
                   3330: into an integral distributed polynomial such that GCD of all its coefficients
                   3331: is 1.
                   3332: \E
1.19      noro     3333: @item dp_prim(@var{dpoly})
1.2       noro     3334: \JP :: $BM-M}<0G\$7$F78?t$r@0?t78?tB?9`<078?t$+$D78?t$NB?9`<0(B GCD $B$r(B 1 $B$K$9$k(B.
                   3335: \BEG
                   3336: :: Converts a distributed polynomial @var{poly} with rational function
                   3337: coefficients into an integral distributed polynomial such that polynomial
                   3338: GCD of all its coefficients is 1.
                   3339: \E
1.1       noro     3340: @end table
                   3341:
                   3342: @table @var
                   3343: @item return
1.2       noro     3344: \JP $BJ,;6I=8=B?9`<0(B
                   3345: \EG distributed polynomial
1.1       noro     3346: @item dpoly
1.2       noro     3347: \JP $BJ,;6I=8=B?9`<0(B
                   3348: \EG distributed polynomial
1.1       noro     3349: @end table
                   3350:
                   3351: @itemize @bullet
1.2       noro     3352: \BJP
1.1       noro     3353: @item
                   3354: @code{dp_ptozp()} $B$O(B,  @code{ptozp()} $B$KAjEv$9$kA`:n$rJ,;6I=8=B?9`<0$K(B
                   3355: $BBP$7$F9T$&(B. $B78?t$,B?9`<0$r4^$`>l9g(B, $B78?t$K4^$^$l$kB?9`<06&DL0x;R$O(B
                   3356: $B<h$j=|$+$J$$(B.
                   3357: @item
                   3358: @code{dp_prim()} $B$O(B, $B78?t$,B?9`<0$r4^$`>l9g(B, $B78?t$K4^$^$l$kB?9`<06&DL0x;R(B
                   3359: $B$r<h$j=|$/(B.
1.2       noro     3360: \E
                   3361: \BEG
                   3362: @item
                   3363: @code{dp_ptozp()} executes the same operation as @code{ptozp()} for
                   3364: a distributed polynomial. If the coefficients include polynomials,
                   3365: polynomial contents included in the coefficients are not removed.
                   3366: @item
                   3367: @code{dp_prim()} removes polynomial contents.
                   3368: \E
1.1       noro     3369: @end itemize
                   3370:
                   3371: @example
                   3372: [208] X=dp_ptod(3*(x-y)*(y-z)*(z-x),[x]);
                   3373: (-3*y+3*z)*<<2>>+(3*y^2-3*z^2)*<<1>>+(-3*z*y^2+3*z^2*y)*<<0>>
                   3374: [209] dp_ptozp(X);
                   3375: (-y+z)*<<2>>+(y^2-z^2)*<<1>>+(-z*y^2+z^2*y)*<<0>>
                   3376: [210] dp_prim(X);
                   3377: (1)*<<2>>+(-y-z)*<<1>>+(z*y)*<<0>>
                   3378: @end example
                   3379:
                   3380: @table @t
1.2       noro     3381: \JP @item $B;2>H(B
                   3382: \EG @item References
1.1       noro     3383: @fref{ptozp}.
                   3384: @end table
                   3385:
1.18      noro     3386: \JP @node dp_nf dp_nf_mod dp_true_nf dp_true_nf_mod dp_weyl_nf dp_weyl_nf_mod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   3387: \EG @node dp_nf dp_nf_mod dp_true_nf dp_true_nf_mod dp_weyl_nf dp_weyl_nf_mod,,, Functions for Groebner basis computation
1.1       noro     3388: @subsection @code{dp_nf}, @code{dp_nf_mod}, @code{dp_true_nf}, @code{dp_true_nf_mod}
                   3389: @findex dp_nf
                   3390: @findex  dp_true_nf
                   3391: @findex dp_nf_mod
                   3392: @findex  dp_true_nf_mod
1.18      noro     3393: @findex dp_weyl_nf
                   3394: @findex dp_weyl_nf_mod
1.1       noro     3395:
                   3396: @table @t
                   3397: @item dp_nf(@var{indexlist},@var{dpoly},@var{dpolyarray},@var{fullreduce})
1.18      noro     3398: @item dp_weyl_nf(@var{indexlist},@var{dpoly},@var{dpolyarray},@var{fullreduce})
1.1       noro     3399: @item dp_nf_mod(@var{indexlist},@var{dpoly},@var{dpolyarray},@var{fullreduce},@var{mod})
1.18      noro     3400: @item dp_weyl_nf_mod(@var{indexlist},@var{dpoly},@var{dpolyarray},@var{fullreduce},@var{mod})
1.2       noro     3401: \JP :: $BJ,;6I=8=B?9`<0$N@55,7A$r5a$a$k(B. ($B7k2L$ODj?tG\$5$l$F$$$k2DG=@-$"$j(B)
1.1       noro     3402:
1.2       noro     3403: \BEG
                   3404: :: Computes the normal form of a distributed polynomial.
                   3405: (The result may be multiplied by a constant in the ground field.)
                   3406: \E
1.1       noro     3407: @item dp_true_nf(@var{indexlist},@var{dpoly},@var{dpolyarray},@var{fullreduce})
                   3408: @item dp_true_nf_mod(@var{indexlist},@var{dpoly},@var{dpolyarray},@var{fullreduce},@var{mod})
1.2       noro     3409: \JP :: $BJ,;6I=8=B?9`<0$N@55,7A$r5a$a$k(B. ($B??$N7k2L$r(B @code{[$BJ,;R(B, $BJ,Jl(B]} $B$N7A$GJV$9(B)
                   3410: \BEG
                   3411: :: Computes the normal form of a distributed polynomial. (The true result
                   3412: is returned in such a list as @code{[numerator, denominator]})
                   3413: \E
1.1       noro     3414: @end table
                   3415:
                   3416: @table @var
                   3417: @item return
1.2       noro     3418: \JP @code{dp_nf()} : $BJ,;6I=8=B?9`<0(B, @code{dp_true_nf()} : $B%j%9%H(B
                   3419: \EG @code{dp_nf()} : distributed polynomial, @code{dp_true_nf()} : list
1.1       noro     3420: @item indexlist
1.2       noro     3421: \JP $B%j%9%H(B
                   3422: \EG list
1.1       noro     3423: @item dpoly
1.2       noro     3424: \JP $BJ,;6I=8=B?9`<0(B
                   3425: \EG distributed polynomial
1.1       noro     3426: @item dpolyarray
1.2       noro     3427: \JP $BG[Ns(B
                   3428: \EG array of distributed polynomial
1.1       noro     3429: @item fullreduce
1.2       noro     3430: \JP $B%U%i%0(B
                   3431: \EG flag
1.1       noro     3432: @item mod
1.2       noro     3433: \JP $BAG?t(B
                   3434: \EG prime
1.1       noro     3435: @end table
                   3436:
                   3437: @itemize @bullet
1.2       noro     3438: \BJP
1.1       noro     3439: @item
                   3440: $BJ,;6I=8=B?9`<0(B @var{dpoly} $B$N@55,7A$r5a$a$k(B.
                   3441: @item
1.18      noro     3442: $BL>A0$K(B weyl $B$r4^$`4X?t$O%o%$%kBe?t$K$*$1$k@55,7A7W;;$r9T$&(B. $B0J2<$N@bL@$O(B weyl $B$r4^$`$b$N$KBP$7$F$bF1MM$K@.N)$9$k(B.
                   3443: @item
1.1       noro     3444: @code{dp_nf_mod()}, @code{dp_true_nf_mod()} $B$NF~NO$O(B, @code{dp_mod()} $B$J$I(B
                   3445: $B$K$h$j(B, $BM-8BBN>e$NJ,;6I=8=B?9`<0$K$J$C$F$$$J$1$l$P$J$i$J$$(B.
                   3446: @item
                   3447: $B7k2L$KM-M}?t(B, $BM-M}<0$,4^$^$l$k$N$rHr$1$k$?$a(B, @code{dp_nf()} $B$O(B
                   3448: $B??$NCM$NDj?tG\$NCM$rJV$9(B. $BM-M}<078?t$N>l9g$N(B @code{dp_nf_mod()} $B$bF1MM(B
                   3449: $B$G$"$k$,(B, $B78?tBN$,M-8BBN$N>l9g(B @code{dp_nf_mod()} $B$O??$NCM$rJV$9(B.
                   3450: @item
                   3451: @code{dp_true_nf()}, @code{dp_true_nf_mod()} $B$O(B,
                   3452: @code{[@var{nm},@var{dn}]} $B$J$k7A$N%j%9%H$rJV$9(B.
                   3453: $B$?$@$7(B, @var{nm} $B$O78?t$KJ,?t(B, $BM-M}<0$r4^$^$J$$J,;6I=8=B?9`<0(B, @var{dn} $B$O(B
                   3454: $B?t$^$?$OB?9`<0$G(B @var{nm}/@var{dn} $B$,??$NCM$H$J$k(B.
                   3455: @item
                   3456: @var{dpolyarray} $B$OJ,;6I=8=B?9`<0$rMWAG$H$9$k%Y%/%H%k(B,
                   3457: @var{indexlist} $B$O@55,2=7W;;$KMQ$$$k(B @var{dpolyarray} $B$NMWAG$N%$%s%G%C%/%9(B
                   3458: $B$N%j%9%H(B.
                   3459: @item
                   3460: @var{fullreduce} $B$,(B 0 $B$G$J$$$H$-A4$F$N9`$KBP$7$F4JLs$r9T$&(B. @var{fullreduce}
                   3461: $B$,(B 0 $B$N$H$-F,9`$N$_$KBP$7$F4JLs$r9T$&(B.
                   3462: @item
                   3463: @var{indexlist} $B$G;XDj$5$l$?B?9`<0$O(B, $BA0$NJ}$N$b$N$,M%@hE*$K;H$o$l$k(B.
                   3464: @item
                   3465: $B0lHL$K$O(B @var{indexlist} $B$NM?$(J}$K$h$jH!?t$NCM$O0[$J$k2DG=@-$,$"$k$,(B,
                   3466: $B%0%l%V%J4pDl$KBP$7$F$O0l0UE*$KDj$^$k(B.
                   3467: @item
                   3468: $BJ,;6I=8=$G$J$$8GDj$5$l$?B?9`<0=89g$K$h$k@55,7A$rB??t5a$a$kI,MW$,$"$k>l9g(B
                   3469: $B$KJXMx$G$"$k(B. $BC10l$N1i;;$K4X$7$F$O(B, @code{p_nf}, @code{p_true_nf} $B$r(B
                   3470: $BMQ$$$k$H$h$$(B.
1.2       noro     3471: \E
                   3472: \BEG
                   3473: @item
                   3474: Computes the normal form of a distributed polynomial.
                   3475: @item
1.18      noro     3476: Functions whose name contain @code{weyl} compute normal forms in Weyl algebra. The description below also applies to
                   3477: the functions for Weyl algebra.
                   3478: @item
1.2       noro     3479: @code{dp_nf_mod()} and @code{dp_true_nf_mod()} require
                   3480: distributed polynomials with coefficients in a finite field as arguments.
                   3481: @item
                   3482: The result of @code{dp_nf()} may be multiplied by a constant in the
                   3483: ground field in order to make the result integral. The same is true
                   3484: for @code{dp_nf_mod()}, but it returns the true normal form if
                   3485: the ground field is a finite field.
                   3486: @item
                   3487: @code{dp_true_nf()} and @code{dp_true_nf_mod()} return
                   3488: such a list as @code{[@var{nm},@var{dn}]}.
                   3489: Here @var{nm} is a distributed polynomial whose coefficients are integral
                   3490: in the ground field, @var{dn} is an integral element in the ground
                   3491: field and @var{nm}/@var{dn} is the true normal form.
                   3492: @item
                   3493: @var{dpolyarray} is a vector whose components are distributed polynomials
                   3494: and @var{indexlist} is a list of indices which is used for the normal form
                   3495: computation.
                   3496: @item
                   3497: When argument @var{fullreduce} has non-zero value,
                   3498: all terms are reduced. When it has value 0,
                   3499: only the head term is reduced.
                   3500: @item
                   3501: As for the polynomials specified by @var{indexlist}, one specified by
                   3502: an index placed at the preceding position has priority to be selected.
                   3503: @item
                   3504: In general, the result of the function may be different depending on
                   3505: @var{indexlist}.  However, the result is unique for Groebner bases.
                   3506: @item
                   3507: These functions are useful when a fixed non-distributed polynomial set
                   3508: is used as a set of reducers to compute normal forms of many polynomials.
                   3509: For single computation @code{p_nf} and @code{p_true_nf} are sufficient.
                   3510: \E
1.1       noro     3511: @end itemize
                   3512:
                   3513: @example
                   3514: [0] load("gr")$
                   3515: [64] load("katsura")$
                   3516: [69] K=katsura(4)$
                   3517: [70] dp_ord(2)$
                   3518: [71] V=[u0,u1,u2,u3,u4]$
                   3519: [72] DP1=newvect(length(K),map(dp_ptod,K,V))$
                   3520: [73] G=gr(K,V,2)$
                   3521: [74] DP2=newvect(length(G),map(dp_ptod,G,V))$
                   3522: [75] T=dp_ptod((u0-u1+u2-u3+u4)^2,V)$
                   3523: [76] dp_dtop(dp_nf([0,1,2,3,4],T,DP1,1),V);
1.5       noro     3524: u4^2+(6*u3+2*u2+6*u1-2)*u4+9*u3^2+(6*u2+18*u1-6)*u3+u2^2
                   3525: +(6*u1-2)*u2+9*u1^2-6*u1+1
1.1       noro     3526: [77] dp_dtop(dp_nf([4,3,2,1,0],T,DP1,1),V);
                   3527: -5*u4^2+(-4*u3-4*u2-4*u1)*u4-u3^2-3*u3-u2^2+(2*u1-1)*u2-2*u1^2-3*u1+1
                   3528: [78] dp_dtop(dp_nf([0,1,2,3,4],T,DP2,1),V);
1.5       noro     3529: -11380879768451657780886122972730785203470970010204714556333530492210
                   3530: 456775930005716505560062087150928400876150217079820311439477560587583
                   3531: 488*u4^15+...
1.1       noro     3532: [79] dp_dtop(dp_nf([4,3,2,1,0],T,DP2,1),V);
1.5       noro     3533: -11380879768451657780886122972730785203470970010204714556333530492210
                   3534: 456775930005716505560062087150928400876150217079820311439477560587583
                   3535: 488*u4^15+...
1.1       noro     3536: [80] @@78==@@79;
                   3537: 1
                   3538: @end example
                   3539:
                   3540: @table @t
1.2       noro     3541: \JP @item $B;2>H(B
                   3542: \EG @item References
1.1       noro     3543: @fref{dp_dtop},
                   3544: @fref{dp_ord},
                   3545: @fref{dp_mod dp_rat},
                   3546: @fref{p_nf p_nf_mod p_true_nf p_true_nf_mod}.
                   3547: @end table
                   3548:
1.23    ! noro     3549: \JP @node dpm_nf dpm_nf_and_quotient,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
        !          3550: \EG @node dpm_nf dpm_nf_and_quotient,,, Functions for Groebner basis computation
        !          3551: @subsection @code{dpm_nf}, @code{dpm_nf_and_quotient}
        !          3552: @findex dpm_nf
        !          3553: @findex dpm_nf_and_quotient
        !          3554:
        !          3555: @table @t
        !          3556: @item dpm_nf([@var{indexlist},]@var{dpoly},@var{dpolyarray},@var{fullreduce})
        !          3557: \JP :: $B2C72B?9`<0$N@55,7A$r5a$a$k(B. ($B7k2L$ODj?tG\$5$l$F$$$k2DG=@-$"$j(B)
        !          3558:
        !          3559: \BEG
        !          3560: :: Computes the normal form of a module polynomial.
        !          3561: (The result may be multiplied by a constant in the ground field.)
        !          3562: \E
        !          3563: @item dpm_nf_and_quotient([@var{indexlist},]@var{dpoly},@var{dpolyarray})
        !          3564: \JP :: $B2C72B?9`<0$N@55,7A$H>&$r5a$a$k(B.
        !          3565: \BEG
        !          3566: :: Computes the normal form of a module polynomial and the quotient.
        !          3567: \E
        !          3568: @end table
        !          3569:
        !          3570: @table @var
        !          3571: @item return
        !          3572: \JP @code{dpm_nf()} : $B2C72B?9`<0(B, @code{dpm_nf_and_quotient()} : $B%j%9%H(B
        !          3573: \EG @code{dpm_nf()} : module polynomial, @code{dpm_nf_and_quotient()} : list
        !          3574: @item indexlist
        !          3575: \JP $B%j%9%H(B
        !          3576: \EG list
        !          3577: @item dpoly
        !          3578: \JP $B2C72B?9`<0(B
        !          3579: \EG module polynomial
        !          3580: @item dpolyarray
        !          3581: \JP $BG[Ns(B
        !          3582: \EG array of module polynomial
        !          3583: @end table
        !          3584:
        !          3585: @itemize @bullet
        !          3586: \BJP
        !          3587: @item
        !          3588: $B2C72B?9`<0(B @var{dpoly} $B$N@55,7A$r5a$a$k(B.
        !          3589: @item
        !          3590: $B7k2L$KM-M}?t(B, $BM-M}<0$,4^$^$l$k$N$rHr$1$k$?$a(B, @code{dpm_nf()} $B$O(B
        !          3591: $B??$NCM$NDj?tG\$NCM$rJV$9(B.
        !          3592: @item
        !          3593: @var{dpolyarray} $B$O2C72B?9`<0$rMWAG$H$9$k%Y%/%H%k(B,
        !          3594: @var{indexlist} $B$O@55,2=7W;;$KMQ$$$k(B @var{dpolyarray} $B$NMWAG$N%$%s%G%C%/%9(B
        !          3595: @item
        !          3596: @var{indexlist} $B$,M?$($i$l$F$$$k>l9g(B, @var{dpolyarray} $B$NCf$G(B, @var{indexlist} $B$G;XDj$5$l$?$b$N$N$_$,(B, $BA0$NJ}$+$iM%@hE*$K;H$o$l$k(B.
        !          3597: @var{indexlist} $B$,M?$($i$l$F$$$J$$>l9g$K$O(B, @var{dpolyarray} $B$NCf$NA4$F$NB?9`<0$,A0$NJ}$+$iM%@hE*$K;H$o$l$k(B.
        !          3598: @item
        !          3599: @code{dpm_nf_and_quotient()} $B$O(B,
        !          3600: @code{[@var{nm},@var{dn},@var{quo}]} $B$J$k7A$N%j%9%H$rJV$9(B.
        !          3601: $B$?$@$7(B, @var{nm} $B$O78?t$KJ,?t$r4^$^$J$$2C72B?9`<0(B, @var{dn} $B$O(B
        !          3602: $B?t$^$?$OB?9`<0$G(B @var{nm}/@var{dn} $B$,??$NCM$H$J$k(B.
        !          3603: @var{quo} $B$O=|;;$N>&$rI=$9G[Ns$G(B, @var{dn}@var{dpoly}=@var{nm}+@var{quo[0]dpolyarray[0]+...} $B$,@.$jN)$D(B.
        !          3604: $B$N%j%9%H(B.
        !          3605: @item
        !          3606: @var{fullreduce} $B$,(B 0 $B$G$J$$$H$-A4$F$N9`$KBP$7$F4JLs$r9T$&(B. @var{fullreduce}
        !          3607: $B$,(B 0 $B$N$H$-F,9`$N$_$KBP$7$F4JLs$r9T$&(B.
        !          3608: \E
        !          3609: \BEG
        !          3610: @item
        !          3611: Computes the normal form of a module polynomial.
        !          3612: @item
        !          3613: The result of @code{dpm_nf()} may be multiplied by a constant in the
        !          3614: ground field in order to make the result integral.
        !          3615: @item
        !          3616: @var{dpolyarray} is a vector whose components are module polynomials
        !          3617: and @var{indexlist} is a list of indices which is used for the normal form
        !          3618: computation.
        !          3619: @item
        !          3620: If @var{indexlist} is given, only the polynomials in @var{dpolyarray} specified in @var{indexlist}
        !          3621: is used in the division. An index placed at the preceding position has priority to be selected.
        !          3622: If @var{indexlist} is not given, all the polynomials in @var{dpolyarray} are used.
        !          3623: @item
        !          3624: @code{dpm_nf_and_quotient()} returns
        !          3625: such a list as @code{[@var{nm},@var{dn},@var{quo}]}.
        !          3626: Here @var{nm} is a module polynomial whose coefficients are integral
        !          3627: in the ground field, @var{dn} is an integral element in the ground
        !          3628: field and @var{nm}/@var{dn} is the true normal form.
        !          3629: @var{quo} is an array containing the quotients of the division satisfying
        !          3630: @var{dn}@var{dpoly}=@var{nm}+@var{quo[0]dpolyarray[0]+...}.
        !          3631: @item
        !          3632: When argument @var{fullreduce} has non-zero value,
        !          3633: all terms are reduced. When it has value 0,
        !          3634: only the head term is reduced.
        !          3635: \E
        !          3636: @end itemize
        !          3637:
        !          3638: @example
        !          3639: [2126] dp_ord([1,0])$
        !          3640: [2127] S=ltov([(1)*<<0,0,2,0:1>>+(1)*<<0,0,1,1:1>>+(1)*<<0,0,0,2:1>>
        !          3641: +(-1)*<<3,0,0,0:2>>+(-1)*<<0,0,2,1:2>>+(-1)*<<0,0,1,2:2>>
        !          3642: +(1)*<<3,0,1,0:3>>+(1)*<<3,0,0,1:3>>+(1)*<<0,0,2,2:3>>,
        !          3643: (-1)*<<0,1,0,0:1>>+(-1)*<<0,0,1,0:1>>+(-1)*<<0,0,0,1:1>>
        !          3644: +(-1)*<<3,0,0,0:3>>+(1)*<<0,1,1,1:3>>,(1)*<<0,1,0,0:2>>
        !          3645: +(1)*<<0,0,1,0:2>>+(1)*<<0,0,0,1:2>>+(-1)*<<0,1,1,0:3>>
        !          3646: +(-1)*<<0,1,0,1:3>>+(-1)*<<0,0,1,1:3>>])$
        !          3647: [2128] U=dpm_sp(S[0],S[1]);
        !          3648: (1)*<<0,0,3,0:1>>+(-1)*<<0,1,1,1:1>>+(1)*<<0,0,2,1:1>>
        !          3649: +(-1)*<<0,1,0,2:1>>+(1)*<<3,1,0,0:2>>+(1)*<<0,1,2,1:2>>
        !          3650: +(1)*<<0,1,1,2:2>>+(-1)*<<3,1,1,0:3>>+(1)*<<3,0,2,0:3>>
        !          3651: +(-1)*<<3,1,0,1:3>>+(-1)*<<0,1,3,1:3>>+(-1)*<<0,1,2,2:3>>
        !          3652: [2129] dpm_nf(U,S,1);
        !          3653: 0
        !          3654: [2130] L=dpm_nf_and_quotient(U,S)$
        !          3655: [2131] Q=L[2]$
        !          3656: [2132] D=L[1]$
        !          3657: [2133] D*U-(Q[1]*S[1]+Q[2]*S[2]);
        !          3658: 0
        !          3659: @end example
        !          3660:
        !          3661: @table @t
        !          3662: \JP @item $B;2>H(B
        !          3663: \EG @item References
        !          3664: @fref{dpm_sp},
        !          3665: @fref{dp_ord}.
        !          3666: @end table
        !          3667:
        !          3668:
1.2       noro     3669: \JP @node dp_hm dp_ht dp_hc dp_rest,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   3670: \EG @node dp_hm dp_ht dp_hc dp_rest,,, Functions for Groebner basis computation
1.1       noro     3671: @subsection @code{dp_hm}, @code{dp_ht}, @code{dp_hc}, @code{dp_rest}
                   3672: @findex dp_hm
                   3673: @findex dp_ht
                   3674: @findex dp_hc
                   3675: @findex dp_rest
                   3676:
                   3677: @table @t
                   3678: @item dp_hm(@var{dpoly})
1.2       noro     3679: \JP :: $BF,C19`<0$r<h$j=P$9(B.
                   3680: \EG :: Gets the head monomial.
1.1       noro     3681: @item dp_ht(@var{dpoly})
1.2       noro     3682: \JP :: $BF,9`$r<h$j=P$9(B.
                   3683: \EG :: Gets the head term.
1.1       noro     3684: @item dp_hc(@var{dpoly})
1.2       noro     3685: \JP :: $BF,78?t$r<h$j=P$9(B.
                   3686: \EG :: Gets the head coefficient.
1.1       noro     3687: @item dp_rest(@var{dpoly})
1.2       noro     3688: \JP :: $BF,C19`<0$r<h$j=|$$$?;D$j$rJV$9(B.
                   3689: \EG :: Gets the remainder of the polynomial where the head monomial is removed.
1.1       noro     3690: @end table
                   3691:
                   3692: @table @var
1.2       noro     3693: \BJP
1.1       noro     3694: @item return
                   3695: @code{dp_hm()}, @code{dp_ht()}, @code{dp_rest()} : $BJ,;6I=8=B?9`<0(B,
                   3696: @code{dp_hc()} : $B?t$^$?$OB?9`<0(B
                   3697: @item dpoly
                   3698: $BJ,;6I=8=B?9`<0(B
1.2       noro     3699: \E
                   3700: \BEG
                   3701: @item return
                   3702: @code{dp_hm()}, @code{dp_ht()}, @code{dp_rest()} : distributed polynomial
                   3703: @code{dp_hc()} : number or polynomial
                   3704: @item dpoly
                   3705: distributed polynomial
                   3706: \E
1.1       noro     3707: @end table
                   3708:
                   3709: @itemize @bullet
1.2       noro     3710: \BJP
1.1       noro     3711: @item
                   3712: $B$3$l$i$O(B, $BJ,;6I=8=B?9`<0$N3FItJ,$r<h$j=P$9$?$a$NH!?t$G$"$k(B.
                   3713: @item
                   3714: $BJ,;6I=8=B?9`<0(B @var{p} $B$KBP$7<!$,@.$jN)$D(B.
1.2       noro     3715: \E
                   3716: \BEG
                   3717: @item
                   3718: These are used to get various parts of a distributed polynomial.
                   3719: @item
                   3720: The next equations hold for a distributed polynomial @var{p}.
                   3721: \E
1.1       noro     3722: @table @code
                   3723: @item @var{p} = dp_hm(@var{p}) + dp_rest(@var{p})
                   3724: @item dp_hm(@var{p}) = dp_hc(@var{p}) dp_ht(@var{p})
                   3725: @end table
                   3726: @end itemize
                   3727:
                   3728: @example
                   3729: [87] dp_ord(0)$
                   3730: [88] X=ptozp((a46^2+7/10*a46+7/48)*u3^4-50/27*a46^2-35/27*a46-49/216)$
                   3731: [89] T=dp_ptod(X,[u3,u4,a46])$
                   3732: [90] dp_hm(T);
                   3733: (2160)*<<4,0,2>>
                   3734: [91] dp_ht(T);
                   3735: (1)*<<4,0,2>>
                   3736: [92] dp_hc(T);
                   3737: 2160
                   3738: [93] dp_rest(T);
                   3739: (1512)*<<4,0,1>>+(315)*<<4,0,0>>+(-4000)*<<0,0,2>>+(-2800)*<<0,0,1>>
                   3740: +(-490)*<<0,0,0>>
                   3741: @end example
                   3742:
1.23    ! noro     3743: \JP @node dpm_hm dpm_ht dpm_hc dpm_hp dpm_rest,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
        !          3744: \EG @node dpm_hm dpm_ht dpm_hc dpm_hp dpm_rest,,, Functions for Groebner basis computation
        !          3745: @subsection @code{dpm_hm}, @code{dpm_ht}, @code{dpm_hc}, @code{dpm_hp}, @code{dpm_rest}
        !          3746: @findex dpm_hm
        !          3747: @findex dpm_ht
        !          3748: @findex dpm_hc
        !          3749: @findex dpm_hp
        !          3750: @findex dpm_rest
        !          3751:
        !          3752: @table @t
        !          3753: @item dpm_hm(@var{dpoly})
        !          3754: \JP :: $B2C72B?9`<0$NF,C19`<0$r<h$j=P$9(B.
        !          3755: \EG :: Gets the head monomial of a module polynomial.
        !          3756: @item dpm_ht(@var{dpoly})
        !          3757: \JP :: $B2C72B?9`<0$NF,9`$r<h$j=P$9(B.
        !          3758: \EG :: Gets the head term of a module polynomial.
        !          3759: @item dpm_hc(@var{dpoly})
        !          3760: \JP :: $B2C72B?9`<0$NF,78?t$r<h$j=P$9(B.
        !          3761: \EG :: Gets the head coefficient of a module polynomial.
        !          3762: @item dpm_hp(@var{dpoly})
        !          3763: \JP :: $B2C72B?9`<0$NF,0LCV$r<h$j=P$9(B.
        !          3764: \EG :: Gets the head position of a module polynomial.
        !          3765: @item dpm_rest(@var{dpoly})
        !          3766: \JP :: $B2C72B?9`<0$NF,C19`<0$r<h$j=|$$$?;D$j$rJV$9(B.
        !          3767: \EG :: Gets the remainder of a module polynomial where the head monomial is removed.
        !          3768: @end table
        !          3769:
        !          3770: @table @var
        !          3771: \BJP
        !          3772: @item return
        !          3773: @code{dp_hm()}, @code{dp_ht()}, @code{dp_rest()} : $B2C72B?9`<0(B,
        !          3774: @code{dp_hc()} : $B?t$^$?$OB?9`<0(B
        !          3775: @item dpoly
        !          3776: $B2C72B?9`<0(B
        !          3777: \E
        !          3778: \BEG
        !          3779: @item return
        !          3780: @code{dpm_hm()}, @code{dpm_ht()}, @code{dpm_rest()} : module polynomial
        !          3781: @code{dpm_hc()} : monomial
        !          3782: @item dpoly
        !          3783: distributed polynomial
        !          3784: \E
        !          3785: @end table
        !          3786:
        !          3787: @itemize @bullet
        !          3788: \BJP
        !          3789: @item
        !          3790: $B$3$l$i$O(B, $B2C72B?9`<0$N3FItJ,$r<h$j=P$9$?$a$NH!?t$G$"$k(B.
        !          3791: @item
        !          3792: @code{dpm_hc()} $B$O(B, @code{dpm_hm()} $B$N(B, $BI8=`4pDl$K4X$9$k78?t$G$"$kC19`<0$rJV$9(B.
        !          3793: $B%9%+%i!<78?t$r<h$j=P$9$K$O(B, $B$5$i$K(B @code{dp_hc()} $B$r<B9T$9$k(B.
        !          3794: @item
        !          3795: @code{dpm_hp()} $B$O(B, $BF,2C72C19`<0$K4^$^$l$kI8=`4pDl$N%$%s%G%C%/%9$rJV$9(B.
        !          3796: \E
        !          3797: \BEG
        !          3798: @item
        !          3799: These are used to get various parts of a module polynomial.
        !          3800: @item
        !          3801: @code{dpm_hc()} returns the monomial that is the coefficient of @code{dpm_hm()} with respect to the
        !          3802: standard base.
        !          3803: For getting its scalar coefficient apply @code{dp_hc()}.
        !          3804: @item
        !          3805: @code{dpm_hp()} returns the index of the standard base conteind in the head module monomial.
        !          3806: \E
        !          3807: @end itemize
        !          3808:
        !          3809: @example
        !          3810: [2126] dp_ord([1,0]);
        !          3811: [1,0]
        !          3812: [2127] F=2*<<1,2,0:2>>-3*<<1,0,2:3>>+<<2,1,0:2>>;
        !          3813: (1)*<<2,1,0:2>>+(2)*<<1,2,0:2>>+(-3)*<<1,0,2:3>>
        !          3814: [2128] M=dpm_hm(F);
        !          3815: (1)*<<2,1,0:2>>
        !          3816: [2129] C=dpm_hc(F);
        !          3817: (1)*<<2,1,0>>
        !          3818: [2130] R=dpm_rest(F);
        !          3819: (2)*<<1,2,0:2>>+(-3)*<<1,0,2:3>>
        !          3820: [2131] dpm_hp(F);
        !          3821: 2
        !          3822: @end example
        !          3823:
        !          3824:
1.2       noro     3825: \JP @node dp_td dp_sugar,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   3826: \EG @node dp_td dp_sugar,,, Functions for Groebner basis computation
1.1       noro     3827: @subsection @code{dp_td}, @code{dp_sugar}
                   3828: @findex dp_td
                   3829: @findex dp_sugar
                   3830:
                   3831: @table @t
                   3832: @item dp_td(@var{dpoly})
1.2       noro     3833: \JP :: $BF,9`$NA4<!?t$rJV$9(B.
                   3834: \EG :: Gets the total degree of the head term.
1.1       noro     3835: @item dp_sugar(@var{dpoly})
1.2       noro     3836: \JP :: $BB?9`<0$N(B @code{sugar} $B$rJV$9(B.
                   3837: \EG :: Gets the @code{sugar} of a polynomial.
1.1       noro     3838: @end table
                   3839:
                   3840: @table @var
                   3841: @item return
1.2       noro     3842: \JP $B<+A3?t(B
                   3843: \EG non-negative integer
1.1       noro     3844: @item dpoly
1.2       noro     3845: \JP $BJ,;6I=8=B?9`<0(B
                   3846: \EG distributed polynomial
1.1       noro     3847: @item onoff
1.2       noro     3848: \JP $B%U%i%0(B
                   3849: \EG flag
1.1       noro     3850: @end table
                   3851:
                   3852: @itemize @bullet
1.2       noro     3853: \BJP
1.1       noro     3854: @item
                   3855: @code{dp_td()} $B$O(B, $BF,9`$NA4<!?t(B, $B$9$J$o$A3FJQ?t$N;X?t$NOB$rJV$9(B.
                   3856: @item
                   3857: $BJ,;6I=8=B?9`<0$,@8@.$5$l$k$H(B, @code{sugar} $B$H8F$P$l$k$"$k@0?t$,IUM?(B
                   3858: $B$5$l$k(B. $B$3$NCM$O(B $B2>A[E*$K@F<!2=$7$F7W;;$7$?>l9g$K7k2L$,;}$DA4<!?t$NCM$H$J$k(B.
                   3859: @item
                   3860: @code{sugar} $B$O(B, $B%0%l%V%J4pDl7W;;$K$*$1$k@55,2=BP$NA*Br$N%9%H%i%F%8$r(B
                   3861: $B7hDj$9$k$?$a$N=EMW$J;X?K$H$J$k(B.
1.2       noro     3862: \E
                   3863: \BEG
                   3864: @item
                   3865: Function @code{dp_td()} returns the total degree of the head term,
                   3866: i.e., the sum of all exponent of variables in that term.
                   3867: @item
                   3868: Upon creation of a distributed polynomial, an integer called @code{sugar}
                   3869: is associated.  This value is
                   3870: the total degree of the virtually homogenized one of the original
                   3871: polynomial.
                   3872: @item
                   3873: The quantity @code{sugar} is an important guide to determine the
                   3874: selection strategy of critical pairs in Groebner basis computation.
                   3875: \E
1.1       noro     3876: @end itemize
                   3877:
                   3878: @example
                   3879: [74] dp_ord(0)$
                   3880: [75] X=<<1,2>>+<<0,1>>$
                   3881: [76] Y=<<1,2>>+<<1,0>>$
                   3882: [77] Z=X-Y;
                   3883: (-1)*<<1,0>>+(1)*<<0,1>>
                   3884: [78] dp_sugar(T);
                   3885: 3
                   3886: @end example
                   3887:
1.2       noro     3888: \JP @node dp_lcm,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   3889: \EG @node dp_lcm,,, Functions for Groebner basis computation
1.1       noro     3890: @subsection @code{dp_lcm}
                   3891: @findex dp_lcm
                   3892:
                   3893: @table @t
                   3894: @item dp_lcm(@var{dpoly1},@var{dpoly2})
1.2       noro     3895: \JP :: $B:G>.8xG\9`$rJV$9(B.
                   3896: \EG :: Returns the least common multiple of the head terms of the given two polynomials.
1.1       noro     3897: @end table
                   3898:
                   3899: @table @var
                   3900: @item return
1.2       noro     3901: \JP $BJ,;6I=8=B?9`<0(B
                   3902: \EG distributed polynomial
1.4       noro     3903: @item dpoly1  dpoly2
1.2       noro     3904: \JP $BJ,;6I=8=B?9`<0(B
                   3905: \EG distributed polynomial
1.1       noro     3906: @end table
                   3907:
                   3908: @itemize @bullet
1.2       noro     3909: \BJP
1.1       noro     3910: @item
                   3911: $B$=$l$>$l$N0z?t$NF,9`$N:G>.8xG\9`$rJV$9(B. $B78?t$O(B 1 $B$G$"$k(B.
1.2       noro     3912: \E
                   3913: \BEG
                   3914: @item
                   3915: Returns the least common multiple of the head terms of the given
                   3916: two polynomials, where coefficient is always set to 1.
                   3917: \E
1.1       noro     3918: @end itemize
                   3919:
                   3920: @example
                   3921: [100] dp_lcm(<<1,2,3,4,5>>,<<5,4,3,2,1>>);
                   3922: (1)*<<5,4,3,4,5>>
                   3923: @end example
                   3924:
                   3925: @table @t
1.2       noro     3926: \JP @item $B;2>H(B
                   3927: \EG @item References
1.1       noro     3928: @fref{p_nf p_nf_mod p_true_nf p_true_nf_mod}.
                   3929: @end table
                   3930:
1.2       noro     3931: \JP @node dp_redble,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   3932: \EG @node dp_redble,,, Functions for Groebner basis computation
1.1       noro     3933: @subsection @code{dp_redble}
                   3934: @findex dp_redble
                   3935:
                   3936: @table @t
                   3937: @item dp_redble(@var{dpoly1},@var{dpoly2})
1.2       noro     3938: \JP :: $BF,9`$I$&$7$,@0=|2DG=$+$I$&$+D4$Y$k(B.
                   3939: \EG :: Checks whether one head term is divisible by the other head term.
1.1       noro     3940: @end table
                   3941:
                   3942: @table @var
                   3943: @item return
1.2       noro     3944: \JP $B@0?t(B
                   3945: \EG integer
1.4       noro     3946: @item dpoly1  dpoly2
1.2       noro     3947: \JP $BJ,;6I=8=B?9`<0(B
                   3948: \EG distributed polynomial
1.1       noro     3949: @end table
                   3950:
                   3951: @itemize @bullet
1.2       noro     3952: \BJP
1.1       noro     3953: @item
                   3954: @var{dpoly1} $B$NF,9`$,(B @var{dpoly2} $B$NF,9`$G3d$j@Z$l$l$P(B 1, $B3d$j@Z$l$J$1$l$P(B
                   3955: 0 $B$rJV$9(B.
                   3956: @item
                   3957: $BB?9`<0$N4JLs$r9T$&:](B, $B$I$N9`$r4JLs$G$-$k$+$rC5$9$N$KMQ$$$k(B.
1.2       noro     3958: \E
                   3959: \BEG
                   3960: @item
                   3961: Returns 1 if the head term of @var{dpoly2} divides the head term of
                   3962: @var{dpoly1}; otherwise 0.
                   3963: @item
                   3964: Used for finding candidate terms at reduction of polynomials.
                   3965: \E
1.1       noro     3966: @end itemize
                   3967:
                   3968: @example
                   3969: [148] C;
                   3970: (1)*<<1,1,1,0,0>>+(1)*<<0,1,1,1,0>>+(1)*<<1,1,0,0,1>>+(1)*<<1,0,0,1,1>>
                   3971: [149] T;
                   3972: (3)*<<2,1,0,0,0>>+(3)*<<1,2,0,0,0>>+(1)*<<0,3,0,0,0>>+(6)*<<1,1,1,0,0>>
                   3973: [150] for ( ; T; T = dp_rest(T)) print(dp_redble(T,C));
                   3974: 0
                   3975: 0
                   3976: 0
                   3977: 1
                   3978: @end example
                   3979:
                   3980: @table @t
1.2       noro     3981: \JP @item $B;2>H(B
                   3982: \EG @item References
1.1       noro     3983: @fref{dp_red dp_red_mod}.
                   3984: @end table
                   3985:
1.23    ! noro     3986: \JP @node dpm_redble,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
        !          3987: \EG @node dpm_redble,,, Functions for Groebner basis computation
        !          3988: @subsection @code{dpm_redble}
        !          3989: @findex dpm_redble
        !          3990:
        !          3991: @table @t
        !          3992: @item dpm_redble(@var{dpoly1},@var{dpoly2})
        !          3993: \JP :: $BF,9`$I$&$7$,@0=|2DG=$+$I$&$+D4$Y$k(B.
        !          3994: \EG :: Checks whether one head term is divisible by the other head term.
        !          3995: @end table
        !          3996:
        !          3997: @table @var
        !          3998: @item return
        !          3999: \JP $B@0?t(B
        !          4000: \EG integer
        !          4001: @item dpoly1  dpoly2
        !          4002: \JP $B2C72B?9`<0(B
        !          4003: \EG module polynomial
        !          4004: @end table
        !          4005:
        !          4006: @itemize @bullet
        !          4007: \BJP
        !          4008: @item
        !          4009: @var{dpoly1} $B$NF,9`$,(B @var{dpoly2} $B$NF,9`$G3d$j@Z$l$l$P(B 1, $B3d$j@Z$l$J$1$l$P(B
        !          4010: 0 $B$rJV$9(B.
        !          4011: @item
        !          4012: $BB?9`<0$N4JLs$r9T$&:](B, $B$I$N9`$r4JLs$G$-$k$+$rC5$9$N$KMQ$$$k(B.
        !          4013: \E
        !          4014: \BEG
        !          4015: @item
        !          4016: Returns 1 if the head term of @var{dpoly2} divides the head term of
        !          4017: @var{dpoly1}; otherwise 0.
        !          4018: @item
        !          4019: Used for finding candidate terms at reduction of polynomials.
        !          4020: \E
        !          4021: @end itemize
        !          4022:
1.2       noro     4023: \JP @node dp_subd,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   4024: \EG @node dp_subd,,, Functions for Groebner basis computation
1.1       noro     4025: @subsection @code{dp_subd}
                   4026: @findex dp_subd
                   4027:
                   4028: @table @t
                   4029: @item dp_subd(@var{dpoly1},@var{dpoly2})
1.2       noro     4030: \JP :: $BF,9`$N>&C19`<0$rJV$9(B.
                   4031: \EG :: Returns the quotient monomial of the head terms.
1.1       noro     4032: @end table
                   4033:
                   4034: @table @var
                   4035: @item return
1.2       noro     4036: \JP $BJ,;6I=8=B?9`<0(B
                   4037: \EG distributed polynomial
1.4       noro     4038: @item dpoly1  dpoly2
1.2       noro     4039: \JP $BJ,;6I=8=B?9`<0(B
                   4040: \EG distributed polynomial
1.1       noro     4041: @end table
                   4042:
                   4043: @itemize @bullet
1.2       noro     4044: \BJP
1.1       noro     4045: @item
                   4046: @code{dp_ht(@var{dpoly1})/dp_ht(@var{dpoly2})} $B$r5a$a$k(B. $B7k2L$N78?t$O(B 1
                   4047: $B$G$"$k(B.
                   4048: @item
                   4049: $B3d$j@Z$l$k$3$H$,$"$i$+$8$a$o$+$C$F$$$kI,MW$,$"$k(B.
1.2       noro     4050: \E
                   4051: \BEG
                   4052: @item
                   4053: Gets @code{dp_ht(@var{dpoly1})/dp_ht(@var{dpoly2})}.
                   4054: The coefficient of the result is always set to 1.
                   4055: @item
                   4056: Divisibility assumed.
                   4057: \E
1.1       noro     4058: @end itemize
                   4059:
                   4060: @example
                   4061: [162] dp_subd(<<1,2,3,4,5>>,<<1,1,2,3,4>>);
                   4062: (1)*<<0,1,1,1,1>>
                   4063: @end example
                   4064:
                   4065: @table @t
1.2       noro     4066: \JP @item $B;2>H(B
                   4067: \EG @item References
1.1       noro     4068: @fref{dp_red dp_red_mod}.
                   4069: @end table
                   4070:
1.2       noro     4071: \JP @node dp_vtoe dp_etov,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   4072: \EG @node dp_vtoe dp_etov,,, Functions for Groebner basis computation
1.1       noro     4073: @subsection @code{dp_vtoe}, @code{dp_etov}
                   4074: @findex dp_vtoe
                   4075: @findex dp_etov
                   4076:
                   4077: @table @t
                   4078: @item dp_vtoe(@var{vect})
1.2       noro     4079: \JP :: $B;X?t%Y%/%H%k$r9`$KJQ49(B
                   4080: \EG :: Converts an exponent vector into a term.
1.1       noro     4081: @item dp_etov(@var{dpoly})
1.2       noro     4082: \JP :: $BF,9`$r;X?t%Y%/%H%k$KJQ49(B
                   4083: \EG :: Convert the head term of a distributed polynomial into an exponent vector.
1.1       noro     4084: @end table
                   4085:
                   4086: @table @var
                   4087: @item return
1.2       noro     4088: \JP @code{dp_vtoe} : $BJ,;6I=8=B?9`<0(B, @code{dp_etov} : $B%Y%/%H%k(B
                   4089: \EG @code{dp_vtoe} : distributed polynomial, @code{dp_etov} : vector
1.1       noro     4090: @item vect
1.2       noro     4091: \JP $B%Y%/%H%k(B
                   4092: \EG vector
1.1       noro     4093: @item dpoly
1.2       noro     4094: \JP $BJ,;6I=8=B?9`<0(B
                   4095: \EG distributed polynomial
1.1       noro     4096: @end table
                   4097:
                   4098: @itemize @bullet
1.2       noro     4099: \BJP
1.1       noro     4100: @item
                   4101: @code{dp_vtoe()} $B$O(B, $B%Y%/%H%k(B @var{vect} $B$r;X?t%Y%/%H%k$H$9$k9`$r@8@.$9$k(B.
                   4102: @item
                   4103: @code{dp_etov()} $B$O(B, $BJ,;6I=8=B?9`<0(B @code{dpoly} $B$NF,9`$N;X?t%Y%/%H%k$r(B
                   4104: $B%Y%/%H%k$KJQ49$9$k(B.
1.2       noro     4105: \E
                   4106: \BEG
                   4107: @item
                   4108: @code{dp_vtoe()} generates a term whose exponent vector is @var{vect}.
                   4109: @item
                   4110: @code{dp_etov()} generates a vector which is the exponent vector of the
                   4111: head term of @code{dpoly}.
                   4112: \E
1.1       noro     4113: @end itemize
                   4114:
                   4115: @example
                   4116: [211] X=<<1,2,3>>;
                   4117: (1)*<<1,2,3>>
                   4118: [212] V=dp_etov(X);
                   4119: [ 1 2 3 ]
                   4120: [213] V[2]++$
                   4121: [214] Y=dp_vtoe(V);
                   4122: (1)*<<1,2,4>>
                   4123: @end example
                   4124:
1.2       noro     4125: \JP @node dp_mbase,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   4126: \EG @node dp_mbase,,, Functions for Groebner basis computation
1.1       noro     4127: @subsection @code{dp_mbase}
                   4128: @findex dp_mbase
                   4129:
                   4130: @table @t
                   4131: @item dp_mbase(@var{dplist})
1.2       noro     4132: \JP :: monomial $B4pDl$N7W;;(B
                   4133: \EG :: Computes the monomial basis
1.1       noro     4134: @end table
                   4135:
                   4136: @table @var
                   4137: @item return
1.2       noro     4138: \JP $BJ,;6I=8=B?9`<0$N%j%9%H(B
                   4139: \EG list of distributed polynomial
1.1       noro     4140: @item dplist
1.2       noro     4141: \JP $BJ,;6I=8=B?9`<0$N%j%9%H(B
                   4142: \EG list of distributed polynomial
1.1       noro     4143: @end table
                   4144:
                   4145: @itemize @bullet
1.2       noro     4146: \BJP
1.1       noro     4147: @item
                   4148: $B$"$k=g=x$G%0%l%V%J4pDl$H$J$C$F$$$kB?9`<0=89g$N(B, $B$=$N=g=x$K4X$9$kJ,;6I=8=(B
                   4149: $B$G$"$k(B @var{dplist} $B$K$D$$$F(B,
                   4150: @var{dplist} $B$,(B K[X] $BCf$G@8@.$9$k%$%G%"%k(B I $B$,(B 0 $B<!85$N;~(B,
                   4151: K $B>eM-8B<!85@~7A6u4V$G$"$k(B K[X]/I $B$N(B monomial $B$K$h$k4pDl$r5a$a$k(B.
                   4152: @item
                   4153: $BF@$i$l$?4pDl$N8D?t$,(B, K[X]/I $B$N(B K-$B@~7A6u4V$H$7$F$N<!85$KEy$7$$(B.
1.2       noro     4154: \E
                   4155: \BEG
                   4156: @item
                   4157: Assuming that @var{dplist} is a list of distributed polynomials which
                   4158: is a Groebner basis with respect to the current ordering type and
                   4159: that the ideal @var{I} generated by @var{dplist} in K[X] is zero-dimensional,
                   4160: this function computes the monomial basis of a finite dimenstional K-vector
                   4161: space K[X]/I.
                   4162: @item
                   4163: The number of elements in the monomial basis is equal to the
                   4164: K-dimenstion of K[X]/I.
                   4165: \E
1.1       noro     4166: @end itemize
                   4167:
                   4168: @example
                   4169: [215] K=katsura(5)$
                   4170: [216] V=[u5,u4,u3,u2,u1,u0]$
                   4171: [217] G0=gr(K,V,0)$
                   4172: [218] H=map(dp_ptod,G0,V)$
                   4173: [219] map(dp_ptod,dp_mbase(H),V)$
                   4174: [u0^5,u4*u0^3,u3*u0^3,u2*u0^3,u1*u0^3,u0^4,u3^2*u0,u2*u3*u0,u1*u3*u0,
                   4175: u1*u2*u0,u1^2*u0,u4*u0^2,u3*u0^2,u2*u0^2,u1*u0^2,u0^3,u3^2,u2*u3,u1*u3,
                   4176: u1*u2,u1^2,u4*u0,u3*u0,u2*u0,u1*u0,u0^2,u4,u3,u2,u1,u0,1]
                   4177: @end example
                   4178:
                   4179: @table @t
1.2       noro     4180: \JP @item $B;2>H(B
                   4181: \EG @item References
1.1       noro     4182: @fref{gr hgr gr_mod}.
                   4183: @end table
                   4184:
1.2       noro     4185: \JP @node dp_mag,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   4186: \EG @node dp_mag,,, Functions for Groebner basis computation
1.1       noro     4187: @subsection @code{dp_mag}
                   4188: @findex dp_mag
                   4189:
                   4190: @table @t
                   4191: @item dp_mag(@var{p})
1.2       noro     4192: \JP :: $B78?t$N%S%C%HD9$NOB$rJV$9(B
                   4193: \EG :: Computes the sum of bit lengths of coefficients of a distributed polynomial.
1.1       noro     4194: @end table
                   4195:
                   4196: @table @var
                   4197: @item return
1.2       noro     4198: \JP $B?t(B
                   4199: \EG integer
1.1       noro     4200: @item p
1.2       noro     4201: \JP $BJ,;6I=8=B?9`<0(B
                   4202: \EG distributed polynomial
1.1       noro     4203: @end table
                   4204:
                   4205: @itemize @bullet
1.2       noro     4206: \BJP
1.1       noro     4207: @item
                   4208: $BJ,;6I=8=B?9`<0$N78?t$K8=$l$kM-M}?t$K$D$-(B, $B$=$NJ,JlJ,;R(B ($B@0?t$N>l9g$OJ,;R(B)
                   4209: $B$N%S%C%HD9$NAmOB$rJV$9(B.
                   4210: @item
                   4211: $BBP>]$H$J$kB?9`<0$NBg$-$5$NL\0B$H$7$FM-8z$G$"$k(B. $BFC$K(B, 0 $B<!85%7%9%F%`$K$*$$$F$O(B
                   4212: $B78?tKDD%$,LdBj$H$J$j(B, $BESCf@8@.$5$l$kB?9`<0$,78?tKDD%$r5/$3$7$F$$$k$+$I$&$+(B
                   4213: $B$NH=Dj$KLrN)$D(B.
                   4214: @item
                   4215: @code{dp_gr_flags()} $B$G(B, @code{ShowMag}, @code{Print} $B$r(B on $B$K$9$k$3$H$K$h$j(B
                   4216: $BESCf@8@.$5$l$kB?9`<0$K$?$$$9$k(B @code{dp_mag()} $B$NCM$r8+$k$3$H$,$G$-$k(B.
1.2       noro     4217: \E
                   4218: \BEG
                   4219: @item
                   4220: This function computes the sum of bit lengths of coefficients of a
                   4221: distributed polynomial @var{p}. If a coefficient is non integral,
                   4222: the sum of bit lengths of the numerator and the denominator is taken.
                   4223: @item
                   4224: This is a measure of the size of a polynomial. Especially for
                   4225: zero-dimensional system coefficient swells are often serious and
                   4226: the returned value is useful to detect such swells.
                   4227: @item
                   4228: If @code{ShowMag} and @code{Print} for @code{dp_gr_flags()} are on,
                   4229: values of @code{dp_mag()} for intermediate basis elements are shown.
                   4230: \E
1.1       noro     4231: @end itemize
                   4232:
                   4233: @example
                   4234: [221] X=dp_ptod((x+2*y)^10,[x,y])$
                   4235: [222] dp_mag(X);
                   4236: 115
                   4237: @end example
                   4238:
                   4239: @table @t
1.2       noro     4240: \JP @item $B;2>H(B
                   4241: \EG @item References
1.1       noro     4242: @fref{dp_gr_flags dp_gr_print}.
                   4243: @end table
                   4244:
1.2       noro     4245: \JP @node dp_red dp_red_mod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   4246: \EG @node dp_red dp_red_mod,,, Functions for Groebner basis computation
1.1       noro     4247: @subsection @code{dp_red}, @code{dp_red_mod}
                   4248: @findex dp_red
                   4249: @findex dp_red_mod
                   4250:
                   4251: @table @t
                   4252: @item dp_red(@var{dpoly1},@var{dpoly2},@var{dpoly3})
                   4253: @item dp_red_mod(@var{dpoly1},@var{dpoly2},@var{dpoly3},@var{mod})
1.2       noro     4254: \JP :: $B0l2s$N4JLsA`:n(B
                   4255: \EG :: Single reduction operation
1.1       noro     4256: @end table
                   4257:
                   4258: @table @var
                   4259: @item return
1.2       noro     4260: \JP $B%j%9%H(B
                   4261: \EG list
1.4       noro     4262: @item dpoly1  dpoly2  dpoly3
1.2       noro     4263: \JP $BJ,;6I=8=B?9`<0(B
                   4264: \EG distributed polynomial
1.1       noro     4265: @item vlist
1.2       noro     4266: \JP $B%j%9%H(B
                   4267: \EG list
1.1       noro     4268: @item mod
1.2       noro     4269: \JP $BAG?t(B
                   4270: \EG prime
1.1       noro     4271: @end table
                   4272:
                   4273: @itemize @bullet
1.2       noro     4274: \BJP
1.1       noro     4275: @item
                   4276: @var{dpoly1} + @var{dpoly2} $B$J$kJ,;6I=8=B?9`<0$r(B @var{dpoly3} $B$G(B
                   4277: 1 $B2s4JLs$9$k(B.
                   4278: @item
                   4279: @code{dp_red_mod()} $B$NF~NO$O(B, $BA4$FM-8BBN78?t$KJQ49$5$l$F$$$kI,MW$,$"$k(B.
                   4280: @item
                   4281: $B4JLs$5$l$k9`$O(B @var{dpoly2} $B$NF,9`$G$"$k(B. $B=>$C$F(B, @var{dpoly2} $B$N(B
                   4282: $BF,9`$,(B @var{dpoly3} $B$NF,9`$G3d$j@Z$l$k$3$H$,$"$i$+$8$a$o$+$C$F$$$J$1$l$P(B
                   4283: $B$J$i$J$$(B.
                   4284: @item
                   4285: $B0z?t$,@0?t78?t$N;~(B, $B4JLs$O(B, $BJ,?t$,8=$l$J$$$h$&(B, $B@0?t(B @var{a}, @var{b},
1.4       noro     4286: $B9`(B @var{t} $B$K$h$j(B @var{a}(@var{dpoly1} + @var{dpoly2})-@var{bt} @var{dpoly3} $B$H$7$F7W;;$5$l$k(B.
1.1       noro     4287: @item
                   4288: $B7k2L$O(B, @code{[@var{a dpoly1},@var{a dpoly2 - bt dpoly3}]} $B$J$k%j%9%H$G$"$k(B.
1.2       noro     4289: \E
                   4290: \BEG
                   4291: @item
                   4292: Reduces a distributed polynomial, @var{dpoly1} + @var{dpoly2},
                   4293: by @var{dpoly3} for single time.
                   4294: @item
                   4295: An input for @code{dp_red_mod()} must be converted into a distributed
                   4296: polynomial with coefficients in a finite field.
                   4297: @item
                   4298: This implies that
                   4299: the divisibility of the head term of @var{dpoly2} by the head term of
                   4300: @var{dpoly3} is assumed.
                   4301: @item
                   4302: When integral coefficients, computation is so carefully performed that
                   4303: no rational operations appear in the reduction procedure.
                   4304: It is computed for integers @var{a} and @var{b}, and a term @var{t} as:
1.4       noro     4305: @var{a}(@var{dpoly1} + @var{dpoly2})-@var{bt} @var{dpoly3}.
1.2       noro     4306: @item
                   4307: The result is a list @code{[@var{a dpoly1},@var{a dpoly2 - bt dpoly3}]}.
                   4308: \E
1.1       noro     4309: @end itemize
                   4310:
                   4311: @example
                   4312: [157] D=(3)*<<2,1,0,0,0>>+(3)*<<1,2,0,0,0>>+(1)*<<0,3,0,0,0>>;
                   4313: (3)*<<2,1,0,0,0>>+(3)*<<1,2,0,0,0>>+(1)*<<0,3,0,0,0>>
                   4314: [158] R=(6)*<<1,1,1,0,0>>;
                   4315: (6)*<<1,1,1,0,0>>
                   4316: [159] C=12*<<1,1,1,0,0>>+(1)*<<0,1,1,1,0>>+(1)*<<1,1,0,0,1>>;
                   4317: (12)*<<1,1,1,0,0>>+(1)*<<0,1,1,1,0>>+(1)*<<1,1,0,0,1>>
                   4318: [160] dp_red(D,R,C);
1.5       noro     4319: [(6)*<<2,1,0,0,0>>+(6)*<<1,2,0,0,0>>+(2)*<<0,3,0,0,0>>,
                   4320: (-1)*<<0,1,1,1,0>>+(-1)*<<1,1,0,0,1>>]
1.1       noro     4321: @end example
                   4322:
                   4323: @table @t
1.2       noro     4324: \JP @item $B;2>H(B
                   4325: \EG @item References
1.1       noro     4326: @fref{dp_mod dp_rat}.
                   4327: @end table
                   4328:
1.2       noro     4329: \JP @node dp_sp dp_sp_mod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   4330: \EG @node dp_sp dp_sp_mod,,, Functions for Groebner basis computation
1.1       noro     4331: @subsection @code{dp_sp}, @code{dp_sp_mod}
                   4332: @findex dp_sp
                   4333: @findex dp_sp_mod
                   4334:
                   4335: @table @t
                   4336: @item dp_sp(@var{dpoly1},@var{dpoly2})
                   4337: @item dp_sp_mod(@var{dpoly1},@var{dpoly2},@var{mod})
1.2       noro     4338: \JP :: S-$BB?9`<0$N7W;;(B
                   4339: \EG :: Computation of an S-polynomial
1.1       noro     4340: @end table
                   4341:
                   4342: @table @var
                   4343: @item return
1.2       noro     4344: \JP $BJ,;6I=8=B?9`<0(B
                   4345: \EG distributed polynomial
1.4       noro     4346: @item dpoly1  dpoly2
1.2       noro     4347: \JP $BJ,;6I=8=B?9`<0(B
                   4348: \EG distributed polynomial
1.1       noro     4349: @item mod
1.2       noro     4350: \JP $BAG?t(B
                   4351: \EG prime
1.1       noro     4352: @end table
                   4353:
                   4354: @itemize @bullet
1.2       noro     4355: \BJP
1.1       noro     4356: @item
                   4357: @var{dpoly1}, @var{dpoly2} $B$N(B S-$BB?9`<0$r7W;;$9$k(B.
                   4358: @item
                   4359: @code{dp_sp_mod()} $B$NF~NO$O(B, $BA4$FM-8BBN78?t$KJQ49$5$l$F$$$kI,MW$,$"$k(B.
                   4360: @item
                   4361: $B7k2L$KM-M}?t(B, $BM-M}<0$,F~$k$N$rHr$1$k$?$a(B, $B7k2L$,Dj?tG\(B, $B$"$k$$$OB?9`<0(B
                   4362: $BG\$5$l$F$$$k2DG=@-$,$"$k(B.
1.2       noro     4363: \E
                   4364: \BEG
                   4365: @item
                   4366: This function computes the S-polynomial of @var{dpoly1} and @var{dpoly2}.
                   4367: @item
                   4368: Inputs of @code{dp_sp_mod()} must be polynomials with coefficients in a
                   4369: finite field.
                   4370: @item
                   4371: The result may be multiplied by a constant in the ground field in order to
                   4372: make the result integral.
                   4373: \E
1.1       noro     4374: @end itemize
                   4375:
                   4376: @example
                   4377: [227] X=dp_ptod(x^2*y+x*y,[x,y]);
                   4378: (1)*<<2,1>>+(1)*<<1,1>>
                   4379: [228] Y=dp_ptod(x*y^2+x*y,[x,y]);
                   4380: (1)*<<1,2>>+(1)*<<1,1>>
                   4381: [229] dp_sp(X,Y);
                   4382: (-1)*<<2,1>>+(1)*<<1,2>>
                   4383: @end example
                   4384:
                   4385: @table @t
1.2       noro     4386: \JP @item $B;2>H(B
                   4387: \EG @item References
1.1       noro     4388: @fref{dp_mod dp_rat}.
                   4389: @end table
1.23    ! noro     4390:
        !          4391: \JP @node dpm_sp,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
        !          4392: \EG @node dmp_sp,,, Functions for Groebner basis computation
        !          4393: @subsection @code{dpm_sp}
        !          4394: @findex dpm_sp
        !          4395:
        !          4396: @table @t
        !          4397: @item dpm_sp(@var{dpoly1},@var{dpoly2}[|coef=1])
        !          4398: \JP :: S-$BB?9`<0$N7W;;(B
        !          4399: \EG :: Computation of an S-polynomial
        !          4400: @end table
        !          4401:
        !          4402: @table @var
        !          4403: @item return
        !          4404: \JP $B2C72B?9`<0$^$?$O%j%9%H(B
        !          4405: \EG module polynomial or list
        !          4406: @item dpoly1  dpoly2
        !          4407: \JP $B2C72B?9`<0(B
        !          4408: \EG module polynomial
        !          4409: \JP $BJ,;6I=8=B?9`<0(B
        !          4410: @end table
        !          4411:
        !          4412: @itemize @bullet
        !          4413: \BJP
        !          4414: @item
        !          4415: @var{dpoly1}, @var{dpoly2} $B$N(B S-$BB?9`<0$r7W;;$9$k(B.
        !          4416: @item
        !          4417: $B%*%W%7%g%s(B @var{coef=1} $B$,;XDj$5$l$F$$$k>l9g(B, @code{[S,t1,t2]} $B$J$k%j%9%H$rJV$9(B.
        !          4418: $B$3$3$G(B, @code{t1}, @code{t2} $B$O(BS-$BB?9`<0$r:n$k:]$N78?tC19`<0$G(B @code{S=t1 dpoly1-t2 dpoly2}
        !          4419: $B$rK~$?$9(B.
        !          4420: \E
        !          4421: \BEG
        !          4422: @item
        !          4423: This function computes the S-polynomial of @var{dpoly1} and @var{dpoly2}.
        !          4424: @item
        !          4425: If an option @var{coef=1} is specified, it returns a list @code{[S,t1,t2]},
        !          4426: where @code{S} is the S-polynmial and @code{t1}, @code{t2} are monomials satisfying @code{S=t1 dpoly1-t2 dpoly2}.
        !          4427: \E
        !          4428: @end itemize
        !          4429:
1.2       noro     4430: \JP @node p_nf p_nf_mod p_true_nf p_true_nf_mod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   4431: \EG @node p_nf p_nf_mod p_true_nf p_true_nf_mod,,, Functions for Groebner basis computation
1.1       noro     4432: @subsection @code{p_nf}, @code{p_nf_mod}, @code{p_true_nf}, @code{p_true_nf_mod}
                   4433: @findex p_nf
                   4434: @findex p_nf_mod
                   4435: @findex p_true_nf
                   4436: @findex p_true_nf_mod
                   4437:
                   4438: @table @t
                   4439: @item p_nf(@var{poly},@var{plist},@var{vlist},@var{order})
                   4440: @itemx p_nf_mod(@var{poly},@var{plist},@var{vlist},@var{order},@var{mod})
1.2       noro     4441: \JP :: $BI=8=B?9`<0$N@55,7A$r5a$a$k(B. ($B7k2L$ODj?tG\$5$l$F$$$k2DG=@-$"$j(B)
                   4442: \BEG
                   4443: :: Computes the normal form of the given polynomial.
                   4444: (The result may be multiplied by a constant.)
                   4445: \E
1.1       noro     4446: @item p_true_nf(@var{poly},@var{plist},@var{vlist},@var{order})
                   4447: @itemx p_true_nf_mod(@var{poly},@var{plist},@var{vlist},@var{order},@var{mod})
1.2       noro     4448: \JP :: $BI=8=B?9`<0$N@55,7A$r5a$a$k(B. ($B??$N7k2L$r(B @code{[$BJ,;R(B, $BJ,Jl(B]} $B$N7A$GJV$9(B)
                   4449: \BEG
                   4450: :: Computes the normal form of the given polynomial. (The result is returned
                   4451: as a form of @code{[numerator, denominator]})
                   4452: \E
1.1       noro     4453: @end table
                   4454:
                   4455: @table @var
                   4456: @item return
1.2       noro     4457: \JP @code{p_nf} : $BB?9`<0(B, @code{p_true_nf} : $B%j%9%H(B
                   4458: \EG @code{p_nf} : polynomial, @code{p_true_nf} : list
1.1       noro     4459: @item poly
1.2       noro     4460: \JP $BB?9`<0(B
                   4461: \EG polynomial
1.4       noro     4462: @item plist vlist
1.2       noro     4463: \JP $B%j%9%H(B
                   4464: \EG list
1.1       noro     4465: @item order
1.2       noro     4466: \JP $B?t(B, $B%j%9%H$^$?$O9TNs(B
                   4467: \EG number, list or matrix
1.1       noro     4468: @item mod
1.2       noro     4469: \JP $BAG?t(B
                   4470: \EG prime
1.1       noro     4471: @end table
                   4472:
                   4473: @itemize @bullet
1.2       noro     4474: \BJP
1.1       noro     4475: @item
                   4476: @samp{gr} $B$GDj5A$5$l$F$$$k(B.
                   4477: @item
                   4478: $BB?9`<0$N(B, $BB?9`<0%j%9%H$K$h$k@55,7A$r5a$a$k(B.
                   4479: @item
                   4480: @code{dp_nf()}, @code{dp_true_nf()}, @code{dp_nf_mod()}, @code{dp_true_nf_mod}
                   4481: $B$KBP$9$k%$%s%?%U%'!<%9$G$"$k(B.
                   4482: @item
                   4483: @var{poly} $B$*$h$S(B @var{plist} $B$O(B, $BJQ?t=g=x(B @var{vlist} $B$*$h$S(B
                   4484: $BJQ?t=g=x7?(B @var{otype} $B$K=>$C$FJ,;6I=8=B?9`<0$KJQ49$5$l(B,
                   4485: @code{dp_nf()}, @code{dp_true_nf()}, @code{dp_nf_mod()},
                   4486: @code{dp_true_nf_mod()} $B$KEO$5$l$k(B.
                   4487: @item
                   4488: @code{dp_nf()}, @code{dp_true_nf()}, @code{dp_nf_mod()},
                   4489: @code{dp_true_nf_mod()} $B$O(B @var{fullreduce} $B$,(B 1 $B$G8F$S=P$5$l$k(B.
                   4490: @item
                   4491: $B7k2L$OB?9`<0$KJQ49$5$l$F=PNO$5$l$k(B.
                   4492: @item
                   4493: @code{p_true_nf()}, @code{p_true_nf_mod()} $B$N=PNO$K4X$7$F$O(B,
                   4494: @code{dp_true_nf()}, @code{dp_true_nf_mod()} $B$N9`$r;2>H(B.
1.2       noro     4495: \E
                   4496: \BEG
                   4497: @item
                   4498: Defined in the package @samp{gr}.
                   4499: @item
                   4500: Obtains the normal form of a polynomial by a polynomial list.
                   4501: @item
                   4502: These are interfaces to @code{dp_nf()}, @code{dp_true_nf()}, @code{dp_nf_mod()},
                   4503:  @code{dp_true_nf_mod}
                   4504: @item
                   4505: The polynomial @var{poly} and the polynomials in @var{plist} is
                   4506: converted, according to the variable ordering @var{vlist} and
                   4507: type of term ordering @var{otype}, into their distributed polynomial
                   4508: counterparts and passed to @code{dp_nf()}.
                   4509: @item
                   4510: @code{dp_nf()}, @code{dp_true_nf()}, @code{dp_nf_mod()} and
                   4511: @code{dp_true_nf_mod()}
                   4512: is called with value 1 for @var{fullreduce}.
                   4513: @item
                   4514: The result is converted back into an ordinary polynomial.
                   4515: @item
                   4516: As for @code{p_true_nf()}, @code{p_true_nf_mod()}
                   4517: refer to @code{dp_true_nf()} and @code{dp_true_nf_mod()}.
                   4518: \E
1.1       noro     4519: @end itemize
                   4520:
                   4521: @example
                   4522: [79] K = katsura(5)$
                   4523: [80] V = [u5,u4,u3,u2,u1,u0]$
                   4524: [81] G = hgr(K,V,2)$
                   4525: [82] p_nf(K[1],G,V,2);
                   4526: 0
                   4527: [83] L = p_true_nf(K[1]+1,G,V,2);
                   4528: [-1503...,-1503...]
                   4529: [84] L[0]/L[1];
                   4530: 1
                   4531: @end example
                   4532:
                   4533: @table @t
1.2       noro     4534: \JP @item $B;2>H(B
                   4535: \EG @item References
1.1       noro     4536: @fref{dp_ptod},
                   4537: @fref{dp_dtop},
                   4538: @fref{dp_ord},
1.19      noro     4539: @fref{dp_nf dp_nf_mod dp_true_nf dp_true_nf_mod dp_weyl_nf dp_weyl_nf_mod}.
1.1       noro     4540: @end table
                   4541:
1.2       noro     4542: \JP @node p_terms,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   4543: \EG @node p_terms,,, Functions for Groebner basis computation
1.1       noro     4544: @subsection @code{p_terms}
                   4545: @findex p_terms
                   4546:
                   4547: @table @t
                   4548: @item p_terms(@var{poly},@var{vlist},@var{order})
1.2       noro     4549: \JP :: $BB?9`<0$K$"$i$o$l$kC19`$r%j%9%H$K$9$k(B.
                   4550: \EG :: Monomials appearing in the given polynomial is collected into a list.
1.1       noro     4551: @end table
                   4552:
                   4553: @table @var
                   4554: @item return
1.2       noro     4555: \JP $B%j%9%H(B
                   4556: \EG list
1.1       noro     4557: @item poly
1.2       noro     4558: \JP $BB?9`<0(B
                   4559: \EG polynomial
1.1       noro     4560: @item vlist
1.2       noro     4561: \JP $B%j%9%H(B
                   4562: \EG list
1.1       noro     4563: @item order
1.2       noro     4564: \JP $B?t(B, $B%j%9%H$^$?$O9TNs(B
                   4565: \EG number, list or matrix
1.1       noro     4566: @end table
                   4567:
                   4568: @itemize @bullet
1.2       noro     4569: \BJP
1.1       noro     4570: @item
                   4571: @samp{gr} $B$GDj5A$5$l$F$$$k(B.
                   4572: @item
                   4573: $BB?9`<0$rC19`$KE83+$7$?;~$K8=$l$k9`$r%j%9%H$K$7$FJV$9(B.
                   4574: @var{vlist} $B$*$h$S(B @var{order} $B$K$h$jDj$^$k9`=g=x$K$h$j(B, $B=g=x$N9b$$$b$N(B
                   4575: $B$,%j%9%H$N@hF,$KMh$k$h$&$K%=!<%H$5$l$k(B.
                   4576: @item
                   4577: $B%0%l%V%J4pDl$O$7$P$7$P78?t$,5pBg$K$J$k$?$a(B, $B<B:]$K$I$N9`$,8=$l$F(B
                   4578: $B$$$k$N$+$r8+$k$?$a$J$I$KMQ$$$k(B.
1.2       noro     4579: \E
                   4580: \BEG
                   4581: @item
                   4582: Defined in the package @samp{gr}.
                   4583: @item
                   4584: This returns a list which contains all non-zero monomials in the given
                   4585: polynomial.  The monomials are ordered according to the current
                   4586: type of term ordering and @var{vlist}.
                   4587: @item
                   4588: Since polynomials in a Groebner base often have very large coefficients,
                   4589: examining a polynomial as it is may sometimes be difficult to perform.
                   4590: For such a case, this function enables to examine which term is really
                   4591: exists.
                   4592: \E
1.1       noro     4593: @end itemize
                   4594:
                   4595: @example
                   4596: [233] G=gr(katsura(5),[u5,u4,u3,u2,u1,u0],2)$
                   4597: [234] p_terms(G[0],[u5,u4,u3,u2,u1,u0],2);
1.5       noro     4598: [u5,u0^31,u0^30,u0^29,u0^28,u0^27,u0^26,u0^25,u0^24,u0^23,u0^22,
                   4599: u0^21,u0^20,u0^19,u0^18,u0^17,u0^16,u0^15,u0^14,u0^13,u0^12,u0^11,
                   4600: u0^10,u0^9,u0^8,u0^7,u0^6,u0^5,u0^4,u0^3,u0^2,u0,1]
1.1       noro     4601: @end example
                   4602:
1.2       noro     4603: \JP @node gb_comp,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   4604: \EG @node gb_comp,,, Functions for Groebner basis computation
1.1       noro     4605: @subsection @code{gb_comp}
                   4606: @findex gb_comp
                   4607:
                   4608: @table @t
                   4609: @item gb_comp(@var{plist1}, @var{plist2})
1.2       noro     4610: \JP :: $BB?9`<0%j%9%H$,(B, $BId9f$r=|$$$F=89g$H$7$FEy$7$$$+$I$&$+D4$Y$k(B.
                   4611: \EG :: Checks whether two polynomial lists are equal or not as a set
1.1       noro     4612: @end table
                   4613:
                   4614: @table @var
1.2       noro     4615: \JP @item return 0 $B$^$?$O(B 1
                   4616: \EG @item return 0 or 1
1.4       noro     4617: @item plist1  plist2
1.1       noro     4618: @end table
                   4619:
                   4620: @itemize @bullet
1.2       noro     4621: \BJP
1.1       noro     4622: @item
                   4623: @var{plist1}, @var{plist2} $B$K$D$$$F(B, $BId9f$r=|$$$F=89g$H$7$FEy$7$$$+$I$&$+(B
                   4624: $BD4$Y$k(B.
                   4625: @item
                   4626: $B0[$J$kJ}K!$G5a$a$?%0%l%V%J4pDl$O(B, $B4pDl$N=g=x(B, $BId9f$,0[$J$k>l9g$,$"$j(B,
                   4627: $B$=$l$i$,Ey$7$$$+$I$&$+$rD4$Y$k$?$a$KMQ$$$k(B.
1.2       noro     4628: \E
                   4629: \BEG
                   4630: @item
                   4631: This function checks whether @var{plist1} and @var{plist2} are equal or
                   4632: not as a set .
                   4633: @item
                   4634: For the same input and the same term ordering different
                   4635: functions for Groebner basis computations may produce different outputs
                   4636: as lists. This function compares such lists whether they are equal
                   4637: as a generating set of an ideal.
                   4638: \E
1.1       noro     4639: @end itemize
                   4640:
                   4641: @example
                   4642: [243] C=cyclic(6)$
                   4643: [244] V=[c0,c1,c2,c3,c4,c5]$
                   4644: [245] G0=gr(C,V,0)$
                   4645: [246] G=tolex(G0,V,0,V)$
                   4646: [247] GG=lex_tl(C,V,0,V,0)$
                   4647: [248] gb_comp(G,GG);
                   4648: 1
                   4649: @end example
                   4650:
1.2       noro     4651: \JP @node katsura hkatsura cyclic hcyclic,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   4652: \EG @node katsura hkatsura cyclic hcyclic,,, Functions for Groebner basis computation
1.1       noro     4653: @subsection @code{katsura}, @code{hkatsura}, @code{cyclic}, @code{hcyclic}
                   4654: @findex katsura
                   4655: @findex hkatsura
                   4656: @findex cyclic
                   4657: @findex hcyclic
                   4658:
                   4659: @table @t
                   4660: @item katsura(@var{n})
                   4661: @item hkatsura(@var{n})
                   4662: @item cyclic(@var{n})
                   4663: @item hcyclic(@var{n})
1.2       noro     4664: \JP :: $BB?9`<0%j%9%H$N@8@.(B
                   4665: \EG :: Generates a polynomial list of standard benchmark.
1.1       noro     4666: @end table
                   4667:
                   4668: @table @var
                   4669: @item return
1.2       noro     4670: \JP $B%j%9%H(B
                   4671: \EG list
1.1       noro     4672: @item n
1.2       noro     4673: \JP $B@0?t(B
                   4674: \EG integer
1.1       noro     4675: @end table
                   4676:
                   4677: @itemize @bullet
1.2       noro     4678: \BJP
1.1       noro     4679: @item
                   4680: @code{katsura()} $B$O(B @samp{katsura}, @code{cyclic()} $B$O(B @samp{cyclic}
                   4681: $B$GDj5A$5$l$F$$$k(B.
                   4682: @item
                   4683: $B%0%l%V%J4pDl7W;;$G$7$P$7$P%F%9%H(B, $B%Y%s%A%^!<%/$KMQ$$$i$l$k(B @code{katsura},
                   4684: @code{cyclic} $B$*$h$S$=$N@F<!2=$r@8@.$9$k(B.
                   4685: @item
                   4686: @code{cyclic} $B$O(B @code{Arnborg}, @code{Lazard}, @code{Davenport} $B$J$I$N(B
                   4687: $BL>$G8F$P$l$k$3$H$b$"$k(B.
1.2       noro     4688: \E
                   4689: \BEG
                   4690: @item
                   4691: Function @code{katsura()} is defined in @samp{katsura}, and
                   4692: function @code{cyclic()} in  @samp{cyclic}.
                   4693: @item
                   4694: These functions generate a series of polynomial sets, respectively,
                   4695: which are often used for testing and bench marking:
                   4696: @code{katsura}, @code{cyclic} and their homogenized versions.
                   4697: @item
                   4698: Polynomial set @code{cyclic} is sometimes called by other name:
                   4699: @code{Arnborg}, @code{Lazard}, and @code{Davenport}.
                   4700: \E
1.1       noro     4701: @end itemize
                   4702:
                   4703: @example
                   4704: [74] load("katsura")$
                   4705: [79] load("cyclic")$
                   4706: [89] katsura(5);
                   4707: [u0+2*u4+2*u3+2*u2+2*u1+2*u5-1,2*u4*u0-u4+2*u1*u3+u2^2+2*u5*u1,
1.5       noro     4708: 2*u3*u0+2*u1*u4-u3+(2*u1+2*u5)*u2,2*u2*u0+2*u2*u4+(2*u1+2*u5)*u3
                   4709: -u2+u1^2,2*u1*u0+(2*u3+2*u5)*u4+2*u2*u3+2*u1*u2-u1,
1.1       noro     4710: u0^2-u0+2*u4^2+2*u3^2+2*u2^2+2*u1^2+2*u5^2]
                   4711: [90] hkatsura(5);
                   4712: [-t+u0+2*u4+2*u3+2*u2+2*u1+2*u5,
                   4713: -u4*t+2*u4*u0+2*u1*u3+u2^2+2*u5*u1,-u3*t+2*u3*u0+2*u1*u4+(2*u1+2*u5)*u2,
                   4714: -u2*t+2*u2*u0+2*u2*u4+(2*u1+2*u5)*u3+u1^2,
                   4715: -u1*t+2*u1*u0+(2*u3+2*u5)*u4+2*u2*u3+2*u1*u2,
                   4716: -u0*t+u0^2+2*u4^2+2*u3^2+2*u2^2+2*u1^2+2*u5^2]
                   4717: [91] cyclic(6);
                   4718: [c5*c4*c3*c2*c1*c0-1,
                   4719: ((((c4+c5)*c3+c5*c4)*c2+c5*c4*c3)*c1+c5*c4*c3*c2)*c0+c5*c4*c3*c2*c1,
                   4720: (((c3+c5)*c2+c5*c4)*c1+c5*c4*c3)*c0+c4*c3*c2*c1+c5*c4*c3*c2,
                   4721: ((c2+c5)*c1+c5*c4)*c0+c3*c2*c1+c4*c3*c2+c5*c4*c3,
                   4722: (c1+c5)*c0+c2*c1+c3*c2+c4*c3+c5*c4,c0+c1+c2+c3+c4+c5]
                   4723: [92] hcyclic(6);
                   4724: [-c^6+c5*c4*c3*c2*c1*c0,
                   4725: ((((c4+c5)*c3+c5*c4)*c2+c5*c4*c3)*c1+c5*c4*c3*c2)*c0+c5*c4*c3*c2*c1,
                   4726: (((c3+c5)*c2+c5*c4)*c1+c5*c4*c3)*c0+c4*c3*c2*c1+c5*c4*c3*c2,
                   4727: ((c2+c5)*c1+c5*c4)*c0+c3*c2*c1+c4*c3*c2+c5*c4*c3,
                   4728: (c1+c5)*c0+c2*c1+c3*c2+c4*c3+c5*c4,c0+c1+c2+c3+c4+c5]
                   4729: @end example
                   4730:
                   4731: @table @t
1.2       noro     4732: \JP @item $B;2>H(B
                   4733: \EG @item References
1.1       noro     4734: @fref{dp_dtop}.
                   4735: @end table
                   4736:
1.3       noro     4737: \JP @node primadec primedec,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   4738: \EG @node primadec primedec,,, Functions for Groebner basis computation
                   4739: @subsection @code{primadec}, @code{primedec}
                   4740: @findex primadec
                   4741: @findex primedec
                   4742:
                   4743: @table @t
                   4744: @item primadec(@var{plist},@var{vlist})
                   4745: @item primedec(@var{plist},@var{vlist})
                   4746: \JP :: $B%$%G%"%k$NJ,2r(B
                   4747: \EG :: Computes decompositions of ideals.
                   4748: @end table
                   4749:
                   4750: @table @var
                   4751: @item return
                   4752: @itemx plist
                   4753: \JP $BB?9`<0%j%9%H(B
                   4754: \EG list of polynomials
                   4755: @item vlist
                   4756: \JP $BJQ?t%j%9%H(B
                   4757: \EG list of variables
                   4758: @end table
                   4759:
                   4760: @itemize @bullet
                   4761: \BJP
                   4762: @item
                   4763: @code{primadec()}, @code{primedec} $B$O(B @samp{primdec} $B$GDj5A$5$l$F$$$k(B.
                   4764: @item
                   4765: @code{primadec()}, @code{primedec()} $B$O$=$l$>$lM-M}?tBN>e$G$N%$%G%"%k$N(B
                   4766: $B=`AGJ,2r(B, $B:,4p$NAG%$%G%"%kJ,2r$r9T$&(B.
                   4767: @item
                   4768: $B0z?t$OB?9`<0%j%9%H$*$h$SJQ?t%j%9%H$G$"$k(B. $BB?9`<0$OM-M}?t78?t$N$_$,5v$5$l$k(B.
                   4769: @item
                   4770: @code{primadec} $B$O(B @code{[$B=`AG@.J,(B, $BIUB0AG%$%G%"%k(B]} $B$N%j%9%H$rJV$9(B.
                   4771: @item
                   4772: @code{primadec} $B$O(B $BAG0x;R$N%j%9%H$rJV$9(B.
                   4773: @item
                   4774: $B7k2L$K$*$$$F(B, $BB?9`<0%j%9%H$H$7$FI=<($5$l$F$$$k3F%$%G%"%k$OA4$F(B
                   4775: $B%0%l%V%J4pDl$G$"$k(B. $BBP1~$9$k9`=g=x$O(B, $B$=$l$>$l(B
                   4776: $BJQ?t(B @code{PRIMAORD}, @code{PRIMEORD} $B$K3JG<$5$l$F$$$k(B.
                   4777: @item
                   4778: @code{primadec} $B$O(B @code{[Shimoyama,Yokoyama]} $B$N=`AGJ,2r%"%k%4%j%:%`(B
                   4779: $B$r<BAu$7$F$$$k(B.
                   4780: @item
                   4781: $B$b$7AG0x;R$N$_$r5a$a$?$$$J$i(B, @code{primedec} $B$r;H$&J}$,$h$$(B.
                   4782: $B$3$l$O(B, $BF~NO%$%G%"%k$,:,4p%$%G%"%k$G$J$$>l9g$K(B, @code{primadec}
                   4783: $B$N7W;;$KM>J,$J%3%9%H$,I,MW$H$J$k>l9g$,$"$k$+$i$G$"$k(B.
                   4784: \E
                   4785: \BEG
                   4786: @item
                   4787: Function @code{primadec()} and @code{primedec} are defined in @samp{primdec}.
                   4788: @item
                   4789: @code{primadec()}, @code{primedec()} are the function for primary
                   4790: ideal decomposition and prime decomposition of the radical over the
                   4791: rationals respectively.
                   4792: @item
                   4793: The arguments are a list of polynomials and a list of variables.
                   4794: These functions accept ideals with rational function coefficients only.
                   4795: @item
                   4796: @code{primadec} returns the list of pair lists consisting a primary component
                   4797: and its associated prime.
                   4798: @item
                   4799: @code{primedec} returns the list of prime components.
                   4800: @item
                   4801: Each component is a Groebner basis and the corresponding term order
                   4802: is indicated by the global variables @code{PRIMAORD}, @code{PRIMEORD}
                   4803: respectively.
                   4804: @item
                   4805: @code{primadec} implements the primary decompostion algorithm
                   4806: in @code{[Shimoyama,Yokoyama]}.
                   4807: @item
                   4808: If one only wants to know the prime components of an ideal, then
                   4809: use @code{primedec} because @code{primadec} may need additional costs
                   4810: if an input ideal is not radical.
                   4811: \E
                   4812: @end itemize
                   4813:
                   4814: @example
                   4815: [84] load("primdec")$
                   4816: [102] primedec([p*q*x-q^2*y^2+q^2*y,-p^2*x^2+p^2*x+p*q*y,
                   4817: (q^3*y^4-2*q^3*y^3+q^3*y^2)*x-q^3*y^4+q^3*y^3,
                   4818: -q^3*y^4+2*q^3*y^3+(-q^3+p*q^2)*y^2],[p,q,x,y]);
                   4819: [[y,x],[y,p],[x,q],[q,p],[x-1,q],[y-1,p],[(y-1)*x-y,q*y^2-2*q*y-p+q]]
                   4820: [103] primadec([x,z*y,w*y^2,w^2*y-z^3,y^3],[x,y,z,w]);
                   4821: [[[x,z*y,y^2,w^2*y-z^3],[z,y,x]],[[w,x,z*y,z^3,y^3],[w,z,y,x]]]
                   4822: @end example
                   4823:
                   4824: @table @t
                   4825: \JP @item $B;2>H(B
                   4826: \EG @item References
                   4827: @fref{fctr sqfr},
                   4828: \JP @fref{$B9`=g=x$N@_Dj(B}.
                   4829: \EG @fref{Setting term orderings}.
                   4830: @end table
1.5       noro     4831:
                   4832: \JP @node primedec_mod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   4833: \EG @node primedec_mod,,, Functions for Groebner basis computation
                   4834: @subsection @code{primedec_mod}
                   4835: @findex primedec_mod
                   4836:
                   4837: @table @t
                   4838: @item primedec_mod(@var{plist},@var{vlist},@var{ord},@var{mod},@var{strategy})
                   4839: \JP :: $B%$%G%"%k$NJ,2r(B
                   4840: \EG :: Computes decompositions of ideals over small finite fields.
                   4841: @end table
                   4842:
                   4843: @table @var
                   4844: @item return
                   4845: @itemx plist
                   4846: \JP $BB?9`<0%j%9%H(B
                   4847: \EG list of polynomials
                   4848: @item vlist
                   4849: \JP $BJQ?t%j%9%H(B
                   4850: \EG list of variables
                   4851: @item ord
                   4852: \JP $B?t(B, $B%j%9%H$^$?$O9TNs(B
                   4853: \EG number, list or matrix
                   4854: @item mod
                   4855: \JP $B@5@0?t(B
                   4856: \EG positive integer
                   4857: @item strategy
                   4858: \JP $B@0?t(B
                   4859: \EG integer
                   4860: @end table
                   4861:
                   4862: @itemize @bullet
                   4863: \BJP
                   4864: @item
                   4865: @code{primedec_mod()} $B$O(B @samp{primdec_mod}
                   4866: $B$GDj5A$5$l$F$$$k(B. @code{[Yokoyama]} $B$NAG%$%G%"%kJ,2r%"%k%4%j%:%`(B
                   4867: $B$r<BAu$7$F$$$k(B.
                   4868: @item
                   4869: @code{primedec_mod()} $B$OM-8BBN>e$G$N%$%G%"%k$N(B
                   4870: $B:,4p$NAG%$%G%"%kJ,2r$r9T$$(B, $BAG%$%G%"%k$N%j%9%H$rJV$9(B.
                   4871: @item
                   4872: @code{primedec_mod()} $B$O(B, GF(@var{mod}) $B>e$G$NJ,2r$rM?$($k(B.
                   4873: $B7k2L$N3F@.J,$N@8@.85$O(B, $B@0?t78?tB?9`<0$G$"$k(B.
                   4874: @item
                   4875: $B7k2L$K$*$$$F(B, $BB?9`<0%j%9%H$H$7$FI=<($5$l$F$$$k3F%$%G%"%k$OA4$F(B
                   4876: [@var{vlist},@var{ord}] $B$G;XDj$5$l$k9`=g=x$K4X$9$k%0%l%V%J4pDl$G$"$k(B.
                   4877: @item
                   4878: @var{strategy} $B$,(B 0 $B$G$J$$$H$-(B, incremental $B$K(B component $B$N6&DL(B
                   4879: $BItJ,$r7W;;$9$k$3$H$K$h$k(B early termination $B$r9T$&(B. $B0lHL$K(B,
                   4880: $B%$%G%"%k$N<!85$,9b$$>l9g$KM-8z$@$,(B, 0 $B<!85$N>l9g$J$I(B, $B<!85$,>.$5$$(B
                   4881: $B>l9g$K$O(B overhead $B$,Bg$-$$>l9g$,$"$k(B.
1.7       noro     4882: @item
                   4883: $B7W;;ESCf$GFbIt>pJs$r8+$?$$>l9g$K$O!"(B
                   4884: $BA0$b$C$F(B @code{dp_gr_print(2)} $B$r<B9T$7$F$*$1$P$h$$(B.
1.5       noro     4885: \E
                   4886: \BEG
                   4887: @item
                   4888: Function @code{primedec_mod()}
                   4889: is defined in @samp{primdec_mod} and implements the prime decomposition
                   4890: algorithm in @code{[Yokoyama]}.
                   4891: @item
                   4892: @code{primedec_mod()}
                   4893: is the function for prime ideal decomposition
                   4894: of the radical of a polynomial ideal over small finite field,
                   4895: and they return a list of prime ideals, which are associated primes
                   4896: of the input ideal.
                   4897: @item
                   4898: @code{primedec_mod()} gives the decomposition over GF(@var{mod}).
                   4899: The generators of each resulting component consists of integral polynomials.
                   4900: @item
                   4901: Each resulting component is a Groebner basis with respect to
                   4902: a term order specified by [@var{vlist},@var{ord}].
                   4903: @item
                   4904: If @var{strategy} is non zero, then the early termination strategy
                   4905: is tried by computing the intersection of obtained components
                   4906: incrementally. In general, this strategy is useful when the krull
                   4907: dimension of the ideal is high, but it may add some overhead
                   4908: if the dimension is small.
1.7       noro     4909: @item
                   4910: If you want to see internal information during the computation,
                   4911: execute @code{dp_gr_print(2)} in advance.
1.5       noro     4912: \E
                   4913: @end itemize
                   4914:
                   4915: @example
                   4916: [0] load("primdec_mod")$
                   4917: [246] PP444=[x^8+x^2+t,y^8+y^2+t,z^8+z^2+t]$
                   4918: [247] primedec_mod(PP444,[x,y,z,t],0,2,1);
                   4919: [[y+z,x+z,z^8+z^2+t],[x+y,y^2+y+z^2+z+1,z^8+z^2+t],
                   4920: [y+z+1,x+z+1,z^8+z^2+t],[x+z,y^2+y+z^2+z+1,z^8+z^2+t],
                   4921: [y+z,x^2+x+z^2+z+1,z^8+z^2+t],[y+z+1,x^2+x+z^2+z+1,z^8+z^2+t],
                   4922: [x+z+1,y^2+y+z^2+z+1,z^8+z^2+t],[y+z+1,x+z,z^8+z^2+t],
                   4923: [x+y+1,y^2+y+z^2+z+1,z^8+z^2+t],[y+z,x+z+1,z^8+z^2+t]]
                   4924: [248]
                   4925: @end example
                   4926:
                   4927: @table @t
                   4928: \JP @item $B;2>H(B
                   4929: \EG @item References
                   4930: @fref{modfctr},
1.6       noro     4931: @fref{dp_gr_main dp_gr_mod_main dp_gr_f_main dp_weyl_gr_main dp_weyl_gr_mod_main dp_weyl_gr_f_main},
1.5       noro     4932: \JP @fref{$B9`=g=x$N@_Dj(B}.
1.7       noro     4933: \EG @fref{Setting term orderings},
                   4934: @fref{dp_gr_flags dp_gr_print}.
1.5       noro     4935: @end table
                   4936:
1.10      noro     4937: \JP @node bfunction bfct generic_bfct ann ann0,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
                   4938: \EG @node bfunction bfct generic_bfct ann ann0,,, Functions for Groebner basis computation
                   4939: @subsection @code{bfunction}, @code{bfct}, @code{generic_bfct}, @code{ann}, @code{ann0}
1.6       noro     4940: @findex bfunction
1.9       noro     4941: @findex bfct
1.6       noro     4942: @findex generic_bfct
1.10      noro     4943: @findex ann
                   4944: @findex ann0
1.5       noro     4945:
1.6       noro     4946: @table @t
                   4947: @item bfunction(@var{f})
1.10      noro     4948: @itemx bfct(@var{f})
                   4949: @itemx generic_bfct(@var{plist},@var{vlist},@var{dvlist},@var{weight})
                   4950: \JP :: @var{b} $B4X?t$N7W;;(B
                   4951: \EG :: Computes the global @var{b} function of a polynomial or an ideal
                   4952: @item ann(@var{f})
                   4953: @itemx ann0(@var{f})
                   4954: \JP :: $BB?9`<0$N%Y%-$N(B annihilator $B$N7W;;(B
                   4955: \EG :: Computes the annihilator of a power of polynomial
1.6       noro     4956: @end table
1.10      noro     4957:
1.6       noro     4958: @table @var
                   4959: @item return
1.10      noro     4960: \JP $BB?9`<0$^$?$O%j%9%H(B
                   4961: \EG polynomial or list
                   4962: @item f
1.6       noro     4963: \JP $BB?9`<0(B
                   4964: \EG polynomial
                   4965: @item plist
                   4966: \JP $BB?9`<0%j%9%H(B
                   4967: \EG list of polynomials
                   4968: @item vlist dvlist
                   4969: \JP $BJQ?t%j%9%H(B
                   4970: \EG list of variables
                   4971: @end table
1.5       noro     4972:
1.6       noro     4973: @itemize @bullet
                   4974: \BJP
                   4975: @item @samp{bfct} $B$GDj5A$5$l$F$$$k(B.
1.10      noro     4976: @item @code{bfunction(@var{f})}, @code{bfct(@var{f})} $B$OB?9`<0(B @var{f} $B$N(B global @var{b} $B4X?t(B @code{b(s)} $B$r(B
1.6       noro     4977: $B7W;;$9$k(B. @code{b(s)} $B$O(B, Weyl $BBe?t(B @code{D} $B>e$N0lJQ?tB?9`<04D(B @code{D[s]}
                   4978: $B$N85(B @code{P(x,s)} $B$,B8:_$7$F(B, @code{P(x,s)f^(s+1)=b(s)f^s} $B$rK~$?$9$h$&$J(B
                   4979: $BB?9`<0(B @code{b(s)} $B$NCf$G(B, $B<!?t$,:G$bDc$$$b$N$G$"$k(B.
                   4980: @item @code{generic_bfct(@var{f},@var{vlist},@var{dvlist},@var{weight})}
                   4981: $B$O(B, @var{plist} $B$G@8@.$5$l$k(B @code{D} $B$N:8%$%G%"%k(B @code{I} $B$N(B,
1.10      noro     4982: $B%&%'%$%H(B @var{weight} $B$K4X$9$k(B global @var{b} $B4X?t$r7W;;$9$k(B.
1.6       noro     4983: @var{vlist} $B$O(B @code{x}-$BJQ?t(B, @var{vlist} $B$OBP1~$9$k(B @code{D}-$BJQ?t(B
                   4984: $B$r=g$KJB$Y$k(B.
1.9       noro     4985: @item @code{bfunction} $B$H(B @code{bfct} $B$G$OMQ$$$F$$$k%"%k%4%j%:%`$,(B
1.11      noro     4986: $B0[$J$k(B. $B$I$A$i$,9bB.$+$OF~NO$K$h$k(B.
1.10      noro     4987: @item @code{ann(@var{f})} $B$O(B, @code{@var{f}^s} $B$N(B annihilator ideal
                   4988: $B$N@8@.7O$rJV$9(B. @code{ann(@var{f})} $B$O(B, @code{[@var{a},@var{list}]}
                   4989: $B$J$k%j%9%H$rJV$9(B. $B$3$3$G(B, @var{a} $B$O(B @var{f} $B$N(B @var{b} $B4X?t$N:G>.@0?t:,(B,
                   4990: @var{list} $B$O(B @code{ann(@var{f})} $B$N7k2L$N(B @code{s}$ $B$K(B, @var{a} $B$r(B
                   4991: $BBeF~$7$?$b$N$G$"$k(B.
1.7       noro     4992: @item $B>\:Y$K$D$$$F$O(B, [Saito,Sturmfels,Takayama] $B$r8+$h(B.
1.6       noro     4993: \E
                   4994: \BEG
                   4995: @item These functions are defined in @samp{bfct}.
1.10      noro     4996: @item @code{bfunction(@var{f})} and @code{bfct(@var{f})} compute the global @var{b}-function @code{b(s)} of
1.6       noro     4997: a polynomial @var{f}.
                   4998: @code{b(s)} is a polynomial of the minimal degree
                   4999: such that there exists @code{P(x,s)} in D[s], which is a polynomial
                   5000: ring over Weyl algebra @code{D}, and @code{P(x,s)f^(s+1)=b(s)f^s} holds.
                   5001: @item @code{generic_bfct(@var{f},@var{vlist},@var{dvlist},@var{weight})}
1.10      noro     5002: computes the global @var{b}-function of a left ideal @code{I} in @code{D}
1.6       noro     5003: generated by @var{plist}, with respect to @var{weight}.
                   5004: @var{vlist} is the list of @code{x}-variables,
                   5005: @var{vlist} is the list of corresponding @code{D}-variables.
1.9       noro     5006: @item @code{bfunction(@var{f})} and @code{bfct(@var{f})} implement
                   5007: different algorithms and the efficiency depends on inputs.
1.10      noro     5008: @item @code{ann(@var{f})} returns the generator set of the annihilator
                   5009: ideal of @code{@var{f}^s}.
                   5010: @code{ann(@var{f})} returns a list @code{[@var{a},@var{list}]},
                   5011: where @var{a} is the minimal integral root of the global @var{b}-function
                   5012: of @var{f}, and @var{list} is a list of polynomials obtained by
                   5013: substituting @code{s} in @code{ann(@var{f})} with @var{a}.
1.7       noro     5014: @item See [Saito,Sturmfels,Takayama] for the details.
1.6       noro     5015: \E
                   5016: @end itemize
                   5017:
                   5018: @example
                   5019: [0] load("bfct")$
                   5020: [216] bfunction(x^3+y^3+z^3+x^2*y^2*z^2+x*y*z);
                   5021: -9*s^5-63*s^4-173*s^3-233*s^2-154*s-40
                   5022: [217] fctr(@@);
                   5023: [[-1,1],[s+2,1],[3*s+4,1],[3*s+5,1],[s+1,2]]
                   5024: [218] F = [4*x^3*dt+y*z*dt+dx,x*z*dt+4*y^3*dt+dy,
                   5025: x*y*dt+5*z^4*dt+dz,-x^4-z*y*x-y^4-z^5+t]$
                   5026: [219] generic_bfct(F,[t,z,y,x],[dt,dz,dy,dx],[1,0,0,0]);
                   5027: 20000*s^10-70000*s^9+101750*s^8-79375*s^7+35768*s^6-9277*s^5
                   5028: +1278*s^4-72*s^3
1.10      noro     5029: [220] P=x^3-y^2$
                   5030: [221] ann(P);
                   5031: [2*dy*x+3*dx*y^2,-3*dx*x-2*dy*y+6*s]
                   5032: [222] ann0(P);
                   5033: [-1,[2*dy*x+3*dx*y^2,-3*dx*x-2*dy*y-6]]
1.6       noro     5034: @end example
                   5035:
                   5036: @table @t
                   5037: \JP @item $B;2>H(B
                   5038: \EG @item References
                   5039: \JP @fref{Weyl $BBe?t(B}.
                   5040: \EG @fref{Weyl algebra}.
                   5041: @end table
1.5       noro     5042:

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