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

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

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