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

Diff for /OpenXM/src/asir-doc/parts/groebner.texi between version 1.2 and 1.18

version 1.2, 1999/12/21 02:47:31 version 1.18, 2016/03/24 20:58:50
Line 1 
Line 1 
 @comment $OpenXM$  @comment $OpenXM: OpenXM/src/asir-doc/parts/groebner.texi,v 1.17 2006/09/06 23:53:31 noro Exp $
 \BJP  \BJP
 @node $B%0%l%V%J4pDl$N7W;;(B,,, Top  @node $B%0%l%V%J4pDl$N7W;;(B,,, Top
 @chapter $B%0%l%V%J4pDl$N7W;;(B  @chapter $B%0%l%V%J4pDl$N7W;;(B
Line 15 
Line 15 
 * $B4pK\E*$JH!?t(B::  * $B4pK\E*$JH!?t(B::
 * $B7W;;$*$h$SI=<($N@)8f(B::  * $B7W;;$*$h$SI=<($N@)8f(B::
 * $B9`=g=x$N@_Dj(B::  * $B9`=g=x$N@_Dj(B::
   * Weight::
 * $BM-M}<0$r78?t$H$9$k%0%l%V%J4pDl7W;;(B::  * $BM-M}<0$r78?t$H$9$k%0%l%V%J4pDl7W;;(B::
 * $B4pDlJQ49(B::  * $B4pDlJQ49(B::
   * Weyl $BBe?t(B::
 * $B%0%l%V%J4pDl$K4X$9$kH!?t(B::  * $B%0%l%V%J4pDl$K4X$9$kH!?t(B::
 \E  \E
 \BEG  \BEG
Line 25 
Line 27 
 * Fundamental functions::  * Fundamental functions::
 * Controlling Groebner basis computations::  * Controlling Groebner basis computations::
 * Setting term orderings::  * Setting term orderings::
   * Weight::
 * Groebner basis computation with rational function coefficients::  * Groebner basis computation with rational function coefficients::
 * Change of ordering::  * Change of ordering::
   * Weyl algebra::
 * Functions for Groebner basis computation::  * Functions for Groebner basis computation::
 \E  \E
 @end menu  @end menu
Line 228  the head term and the head coefficient respectively.
Line 232  the head term and the head coefficient respectively.
 @noindent  @noindent
 \BJP  \BJP
 $B%0%l%V%J4pDl$r7W;;$9$k$?$a$N4pK\E*$JH!?t$O(B @code{dp_gr_main()} $B$*$h$S(B  $B%0%l%V%J4pDl$r7W;;$9$k$?$a$N4pK\E*$JH!?t$O(B @code{dp_gr_main()} $B$*$h$S(B
 @code{dp_gr_mod_main()} $B$J$k(B 2 $B$D$NAH$_9~$_H!?t$G$"$k$,(B, $BDL>o$O(B, $B%Q%i%a%?(B  @code{dp_gr_mod_main()}, @code{dp_gr_f_main()}
    $B$J$k(B 3 $B$D$NAH$_9~$_H!?t$G$"$k$,(B, $BDL>o$O(B, $B%Q%i%a%?(B
 $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.  $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.
 $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  $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
 $B$_9~$`$3$H$K$h$j;HMQ2DG=$H$J$k(B. @samp{gr} $B$O(B, @b{Asir} $B$NI8=`(B  $B$_9~$`$3$H$K$h$j;HMQ2DG=$H$J$k(B. @samp{gr} $B$O(B, @b{Asir} $B$NI8=`(B
 $B%i%$%V%i%j%G%#%l%/%H%j$KCV$+$l$F$$$k(B. $B$h$C$F(B, $B4D6-JQ?t(B @code{ASIR_LIBDIR}  $B%i%$%V%i%j%G%#%l%/%H%j$KCV$+$l$F$$$k(B.
 $B$rFC$K0[$J$k%Q%9$K@_Dj$7$J$$8B$j(B, $B%U%!%$%kL>$N$_$GFI$_9~$`$3$H$,$G$-$k(B.  
 \E  \E
 \BEG  \BEG
 Facilities for computing Groebner bases are provided not by built-in  Facilities for computing Groebner bases are
 functions but by a set of user functions written in @b{Asir}.  @code{dp_gr_main()}, @code{dp_gr_mod_main()}and @code{dp_gr_f_main()}.
 The set of functions is provided as a file (sometimes called package),  To call these functions,
 named @samp{gr}.  it is necessary to set several parameters correctly and it is convenient
   to use a set of interface functions provided in the library file
   @samp{gr}.
 The facilities will be ready to use after you load the package by  The facilities will be ready to use after you load the package by
 @code{load()}.  The package @samp{gr} is placed in the standard library  @code{load()}.  The package @samp{gr} is placed in the standard library
 directory of @b{Asir}.  Therefore, it is loaded simply by specifying  directory of @b{Asir}.
 its file name, unless the environment variable @code{ASIR_LIBDIR}  
 is set to a non-standard one.  
 \E  \E
   
 @example  @example
Line 350  These parameters can be set and examined by a built-in
Line 354  These parameters can be set and examined by a built-in
   
 @example  @example
 [100] dp_gr_flags();  [100] dp_gr_flags();
 [Demand,0,NoSugar,0,NoCriB,0,NoGC,0,NoMC,0,NoRA,0,NoGCD,0,Top,0,ShowMag,1,  [Demand,0,NoSugar,0,NoCriB,0,NoGC,0,NoMC,0,NoRA,0,NoGCD,0,Top,0,
 Print,1,Stat,0,Reverse,0,InterReduce,0,Multiple,0]  ShowMag,1,Print,1,Stat,0,Reverse,0,InterReduce,0,Multiple,0]
 [101]  [101]
 @end example  @end example
   
Line 447  If `on', various informations during a Groebner basis 
Line 451  If `on', various informations during a Groebner basis 
 displayed.  displayed.
 \E  \E
   
   @item PrintShort
   \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.
   \BEG
   If `on' and Print is `off', short information during a Groebner basis computation is
   displayed.
   \E
   
 @item Stat  @item Stat
 \BJP  \BJP
 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  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
Line 469  is shown after every normal computation.  After comlet
Line 480  is shown after every normal computation.  After comlet
 computation the maximal value among the sums is shown.  computation the maximal value among the sums is shown.
 \E  \E
   
 @item Multiple  @item Content
   @itemx Multiple
 \BJP  \BJP
 0 $B$G$J$$@0?t$N;~(B, $BM-M}?t>e$N@55,7A7W;;$K$*$$$F(B, $B78?t$N%S%C%HD9$NOB$,(B  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
 @code{Multiple} $BG\$K$J$k$4$H$K78?tA4BN$N(B GCD $B$,7W;;$5$l(B, $B$=$N(B GCD $B$G(B  @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
 $B3d$C$?B?9`<0$r4JLs$9$k(B. @code{Multiple} $B$,(B 1 $B$J$i$P(B, $B4JLs$9$k$4$H$K(B  $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
 GCD $B7W;;$,9T$o$l0lHL$K$O8zN($,0-$/$J$k$,(B, @code{Multiple} $B$r(B 2 $BDxEY(B  GCD $B7W;;$,9T$o$l0lHL$K$O8zN($,0-$/$J$k$,(B, @code{Content} $B$r(B 2 $BDxEY(B
 $B$H$9$k$H(B, $B5pBg$J@0?t$,78?t$K8=$l$k>l9g(B, $B8zN($,NI$/$J$k>l9g$,$"$k(B.  $B$H$9$k$H(B, $B5pBg$J@0?t$,78?t$K8=$l$k>l9g(B, $B8zN($,NI$/$J$k>l9g$,$"$k(B.
   backward compatibility $B$N$?$a!"(B@code{Multiple} $B$G@0?tCM$r;XDj$G$-$k(B.
 \E  \E
 \BEG  \BEG
 If a non-zero integer, in a normal form computation  If a non-zero rational number, in a normal form computation
 over the rationals, the integer content of the polynomial being  over the rationals, the integer content of the polynomial being
 reduced is removed when its magnitude becomes @code{Multiple} times  reduced is removed when its magnitude becomes @code{Content} times
 larger than a registered value, which is set to the magnitude of the  larger than a registered value, which is set to the magnitude of the
 input polynomial. After each content removal the registered value is  input polynomial. After each content removal the registered value is
 set to the magnitude of the resulting polynomial. @code{Multiple} is  set to the magnitude of the resulting polynomial. @code{Content} is
 equal to 1, the simiplification is done after every normal form computation.  equal to 1, the simiplification is done after every normal form computation.
 It is empirically known that it is often efficient to set @code{Multiple} to 2  It is empirically known that it is often efficient to set @code{Content} to 2
 for the case where large integers appear during the computation.  for the case where large integers appear during the computation.
   An integer value can be set by the keyword @code{Multiple} for
   backward compatibility.
 \E  \E
   
 @item Demand  @item Demand
Line 530  membercheck
Line 545  membercheck
 (0,0)(0,0)(0,0)(0,0)  (0,0)(0,0)(0,0)(0,0)
 gbcheck total 8 pairs  gbcheck total 8 pairs
 ........  ........
 UP=(0,0)SP=(0,0)SPM=(0,0)NF=(0,0)NFM=(0.010002,0)ZNFM=(0.010002,0)PZ=(0,0)  UP=(0,0)SP=(0,0)SPM=(0,0)NF=(0,0)NFM=(0.010002,0)ZNFM=(0.010002,0)
 NP=(0,0)MP=(0,0)RA=(0,0)MC=(0,0)GC=(0,0)T=40,B=0 M=8 F=6 D=12 ZR=5 NZR=6  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
 Max_mag=6  D=12 ZR=5 NZR=6 Max_mag=6
 [94]  [94]
 @end example  @end example
   
Line 992  time as well as the choice of types of term orderings.
Line 1007  time as well as the choice of types of term orderings.
 -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  -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
 +(-12*t^16+72*t^13-28*t^11-180*t^10+112*t^8+240*t^7+28*t^6-127*t^5  +(-12*t^16+72*t^13-28*t^11-180*t^10+112*t^8+240*t^7+28*t^6-127*t^5
 -167*t^4-55*t^3+30*t^2+58*t-15)*z^4,  -167*t^4-55*t^3+30*t^2+58*t-15)*z^4,
 (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+84*t^9  (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
 +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+(6*t^16-36*t^13  +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
 +14*t^11+90*t^10-56*t^8-120*t^7-14*t^6+64*t^5+84*t^4+27*t^3-16*t^2-30*t+7)*z^4,  +(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
 (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-6*t-1)*y  +27*t^3-16*t^2-30*t+7)*z^4,
 +(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+10*t^4-36*t^3  (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
 -11*t^2-5*t+9)*z^2,  -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
   +10*t^4-36*t^3-11*t^2-5*t+9)*z^2,
 -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  -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
 -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+20*t^19  -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
 +28*t^18-120*t^16-56*t^15+14*t^14+300*t^13+70*t^12-56*t^11-400*t^10-84*t^9  +20*t^19+28*t^18-120*t^16-56*t^15+14*t^14+300*t^13+70*t^12-56*t^11
 +84*t^8+268*t^7+84*t^6-56*t^5-63*t^4-36*t^3+46*t^2-12*t+1)*z,  -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
 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-10*t-20)*z^3*y+8*t^14  -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
 -32*t^11+48*t^8-t^7-32*t^5-6*t^4+9*t^2-t,  -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,
 -z*y^3+(t^7-2*t^4+3*t^2+t)*y+(-2*t^6+4*t^3+2*t-2)*z^2,  -z*y^3+(t^7-2*t^4+3*t^2+t)*y+(-2*t^6+4*t^3+2*t-2)*z^2,
 2*t^2*y^3+z^2*y^2+(-2*t^5+4*t^2-6)*z^4*y+(4*t^8-t^7-8*t^5+2*t^4-4*t^3+5*t^2-t)*z,  2*t^2*y^3+z^2*y^2+(-2*t^5+4*t^2-6)*z^4*y
   +(4*t^8-t^7-8*t^5+2*t^4-4*t^3+5*t^2-t)*z,
 z^3*y^2+2*t^3*y+(-t^7+2*t^4+t^2-t)*z^2,  z^3*y^2+2*t^3*y+(-t^7+2*t^4+t^2-t)*z^2,
 -t*z*y^2-2*z^3*y+t^8-2*t^5-t^3+t^2,  -t*z*y^2-2*z^3*y+t^8-2*t^5-t^3+t^2,
 -t^3*y^2-2*t^2*z^2*y+(t^6-2*t^3-t+1)*z^4,  -t^3*y^2-2*t^2*z^2*y+(t^6-2*t^3-t+1)*z^4,z^5-t^4]
 z^5-t^4]  
 [93] gr(B,[t,z,y,x],2);  [93] gr(B,[t,z,y,x],2);
 [x^10-t,x^8-z,x^31-x^6-x-y]  [x^10-t,x^8-z,x^31-x^6-x-y]
 @end example  @end example
Line 1041  beforehand, and some heuristic trial may be inevitable
Line 1057  beforehand, and some heuristic trial may be inevitable
 \E  \E
   
 \BJP  \BJP
   @node Weight ,,, $B%0%l%V%J4pDl$N7W;;(B
   @section Weight
   \E
   \BEG
   @node Weight,,, Groebner basis computation
   @section Weight
   \E
   \BJP
   $BA0@a$G>R2p$7$?9`=g=x$O(B, $B3FJQ?t$K(B weight ($B=E$_(B) $B$r@_Dj$9$k$3$H$G(B
   $B$h$j0lHLE*$J$b$N$H$J$k(B.
   \E
   \BEG
   Term orderings introduced in the previous section can be generalized
   by setting a weight for each variable.
   \E
   @example
   [0] dp_td(<<1,1,1>>);
   3
   [1] dp_set_weight([1,2,3])$
   [2] dp_td(<<1,1,1>>);
   6
   @end example
   \BJP
   $BC19`<0$NA4<!?t$r7W;;$9$k:](B, $B%G%U%)%k%H$G$O(B
   $B3FJQ?t$N;X?t$NOB$rA4<!?t$H$9$k(B. $B$3$l$O3FJQ?t$N(B weight $B$r(B 1 $B$H(B
   $B9M$($F$$$k$3$H$KAjEv$9$k(B. $B$3$NNc$G$O(B, $BBh0l(B, $BBhFs(B, $BBh;0JQ?t$N(B
   weight $B$r$=$l$>$l(B 1,2,3 $B$H;XDj$7$F$$$k(B. $B$3$N$?$a(B, @code{<<1,1,1>>}
   $B$NA4<!?t(B ($B0J2<$G$O$3$l$rC19`<0$N(B weight $B$H8F$V(B) $B$,(B @code{1*1+1*2+1*3=6} $B$H$J$k(B.
   weight $B$r@_Dj$9$k$3$H$G(B, $BF1$89`=g=x7?$N$b$H$G0[$J$k9`=g=x$,Dj5A$G$-$k(B.
   $BNc$($P(B, weight $B$r$&$^$/@_Dj$9$k$3$H$G(B, $BB?9`<0$r(B weighted homogeneous
   $B$K$9$k$3$H$,$G$-$k>l9g$,$"$k(B.
   \E
   \BEG
   By default, the total degree of a monomial is equal to
   the sum of all exponents. This means that the weight for each variable
   is set to 1.
   In this example, the weights for the first, the second and the third
   variable are set to 1, 2 and 3 respectively.
   Therefore the total degree of @code{<<1,1,1>>} under this weight,
   which is called the weight of the monomial, is @code{1*1+1*2+1*3=6}.
   By setting weights, different term orderings can be set under a type of
   term ordeing. In some case a polynomial can
   be made weighted homogeneous by setting an appropriate weight.
   \E
   
   \BJP
   $B3FJQ?t$KBP$9$k(B weight $B$r$^$H$a$?$b$N$r(B weight vector $B$H8F$V(B.
   $B$9$Y$F$N@.J,$,@5$G$"$j(B, $B%0%l%V%J4pDl7W;;$K$*$$$F(B, $BA4<!?t$N(B
   $BBe$o$j$KMQ$$$i$l$k$b$N$rFC$K(B sugar weight $B$H8F$V$3$H$K$9$k(B.
   sugar strategy $B$K$*$$$F(B, $BA4<!?t$NBe$o$j$K;H$o$l$k$+$i$G$"$k(B.
   $B0lJ}$G(B, $B3F@.J,$,I,$:$7$b@5$H$O8B$i$J$$(B weight vector $B$O(B,
   sugar weight $B$H$7$F@_Dj$9$k$3$H$O$G$-$J$$$,(B, $B9`=g=x$N0lHL2=$K$O(B
   $BM-MQ$G$"$k(B. $B$3$l$i$O(B, $B9TNs$K$h$k9`=g=x$N@_Dj$K$9$G$K8=$l$F(B
   $B$$$k(B. $B$9$J$o$A(B, $B9`=g=x$rDj5A$9$k9TNs$N3F9T$,(B, $B0l$D$N(B weight vector
   $B$H8+$J$5$l$k(B. $B$^$?(B, $B%V%m%C%/=g=x$O(B, $B3F%V%m%C%/$N(B
   $BJQ?t$KBP1~$9$k@.J,$N$_(B 1 $B$GB>$O(B 0 $B$N(B weight vector $B$K$h$kHf3S$r(B
   $B:G=i$K9T$C$F$+$i(B, $B3F%V%m%C%/Kh$N(B tie breaking $B$r9T$&$3$H$KAjEv$9$k(B.
   \E
   
   \BEG
   A list of weights for all variables is called a weight vector.
   A weight vector is called a sugar weight vector if
   its elements are all positive and it is used for computing
   a weighted total degree of a monomial, because such a weight
   is used instead of total degree in sugar strategy.
   On the other hand, a weight vector whose elements are not necessarily
   positive cannot be set as a sugar weight, but it is useful for
   generalizing term order. In fact, such a weight vector already
   appeared in a matrix order. That is, each row of a matrix defining
   a term order is regarded as a weight vector. A block order
   is also considered as a refinement of comparison by weight vectors.
   It compares two terms by using a weight vector whose elements
   corresponding to variables in a block is 1 and 0 otherwise,
   then it applies a tie breaker.
   \E
   
   \BJP
   weight vector $B$N@_Dj$O(B @code{dp_set_weight()} $B$G9T$&$3$H$,$G$-$k(B
   $B$,(B, $B9`=g=x$r;XDj$9$k:]$NB>$N%Q%i%a%?(B ($B9`=g=x7?(B, $BJQ?t=g=x(B) $B$H(B
   $B$^$H$a$F@_Dj$G$-$k$3$H$,K>$^$7$$(B. $B$3$N$?$a(B, $B<!$N$h$&$J7A$G$b(B
   $B9`=g=x$,;XDj$G$-$k(B.
   \E
   \BEG
   A weight vector can be set by using @code{dp_set_weight()}.
   However it is more preferable if a weight vector can be set
   together with other parapmeters such as a type of term ordering
   and a variable order. This is realized as follows.
   \E
   
   @example
   [64] B=[x+y+z-6,x*y+y*z+z*x-11,x*y*z-6]$
   [65] dp_gr_main(B|v=[x,y,z],sugarweight=[3,2,1],order=0);
   [z^3-6*z^2+11*z-6,x+y+z-6,-y^2+(-z+6)*y-z^2+6*z-11]
   [66] dp_gr_main(B|v=[y,z,x],order=[[1,1,0],[0,1,0],[0,0,1]]);
   [x^3-6*x^2+11*x-6,x+y+z-6,-x^2+(-y+6)*x-y^2+6*y-11]
   [67] dp_gr_main(B|v=[y,z,x],order=[[x,1,y,2,z,3]]);
   [x+y+z-6,x^3-6*x^2+11*x-6,-x^2+(-y+6)*x-y^2+6*y-11]
   @end example
   
   \BJP
   $B$$$:$l$NNc$K$*$$$F$b(B, $B9`=g=x$O(B option $B$H$7$F;XDj$5$l$F$$$k(B.
   $B:G=i$NNc$G$O(B @code{v} $B$K$h$jJQ?t=g=x$r(B, @code{sugarweight} $B$K$h$j(B
   sugar weight vector $B$r(B, @code{order}$B$K$h$j9`=g=x7?$r;XDj$7$F$$$k(B.
   $BFs$DL\$NNc$K$*$1$k(B @code{order} $B$N;XDj$O(B matrix order $B$HF1MM$G$"$k(B.
   $B$9$J$o$A(B, $B;XDj$5$l$?(B weight vector $B$r:8$+$i=g$K;H$C$F(B weight $B$NHf3S(B
   $B$r9T$&(B. $B;0$DL\$NNc$bF1MM$G$"$k$,(B, $B$3$3$G$O(B weight vector $B$NMWAG$r(B
   $BJQ?tKh$K;XDj$7$F$$$k(B. $B;XDj$,$J$$$b$N$O(B 0 $B$H$J$k(B. $B;0$DL\$NNc$G$O(B,
   @code{order} $B$K$h$k;XDj$G$O9`=g=x$,7hDj$7$J$$(B. $B$3$N>l9g$K$O(B,
   tie breaker $B$H$7$FA4<!?t5U<-=q<0=g=x$,<+F0E*$K@_Dj$5$l$k(B.
   $B$3$N;XDjJ}K!$O(B, @code{dp_gr_main}, @code{dp_gr_mod_main} $B$J$I(B
   $B$NAH$_9~$_4X?t$G$N$_2DG=$G$"$j(B, @code{gr} $B$J$I$N%f!<%6Dj5A4X?t(B
   $B$G$OL$BP1~$G$"$k(B.
   \E
   \BEG
   In each example, a term ordering is specified as options.
   In the first example, a variable order, a sugar weight vector
   and a type of term ordering are specified by options @code{v},
   @code{sugarweight} and @code{order} respectively.
   In the second example, an option @code{order} is used
   to set a matrix ordering. That is, the specified weight vectors
   are used from left to right for comparing terms.
   The third example shows a variant of specifying a weight vector,
   where each component of a weight vector is specified variable by variable,
   and unspecified components are set to zero. In this example,
   a term order is not determined only by the specified weight vector.
   In such a case a tie breaker by the graded reverse lexicographic ordering
   is set automatically.
   This type of a term ordering specification can be applied only to builtin
   functions such as @code{dp_gr_main()}, @code{dp_gr_mod_main()}, not to
   user defined functions such as @code{gr()}.
   \E
   
   \BJP
 @node $BM-M}<0$r78?t$H$9$k%0%l%V%J4pDl7W;;(B,,, $B%0%l%V%J4pDl$N7W;;(B  @node $BM-M}<0$r78?t$H$9$k%0%l%V%J4pDl7W;;(B,,, $B%0%l%V%J4pDl$N7W;;(B
 @section $BM-M}<0$r78?t$H$9$k%0%l%V%J4pDl7W;;(B  @section $BM-M}<0$r78?t$H$9$k%0%l%V%J4pDl7W;;(B
 \E  \E
Line 1200  Refer to the sections for each functions.
Line 1349  Refer to the sections for each functions.
 \E  \E
   
 \BJP  \BJP
   @node Weyl $BBe?t(B,,, $B%0%l%V%J4pDl$N7W;;(B
   @section Weyl $BBe?t(B
   \E
   \BEG
   @node Weyl algebra,,, Groebner basis computation
   @section Weyl algebra
   \E
   
   @noindent
   
   \BJP
   $B$3$l$^$G$O(B, $BDL>o$N2D49$JB?9`<04D$K$*$1$k%0%l%V%J4pDl7W;;$K$D$$$F(B
   $B=R$Y$F$-$?$,(B, $B%0%l%V%J4pDl$NM}O@$O(B, $B$"$k>r7o$rK~$?$9Hs2D49$J(B
   $B4D$K$b3HD%$G$-$k(B. $B$3$N$h$&$J4D$NCf$G(B, $B1~MQ>e$b=EMW$J(B,
   Weyl $BBe?t(B, $B$9$J$o$AB?9`<04D>e$NHyJ,:nMQAG4D$N1i;;$*$h$S(B
   $B%0%l%V%J4pDl7W;;$,(B Risa/Asir $B$K<BAu$5$l$F$$$k(B.
   
   $BBN(B @code{K} $B>e$N(B @code{n} $B<!85(B Weyl $BBe?t(B
   @code{D=K<x1,@dots{},xn,D1,@dots{},Dn>} $B$O(B
   \E
   
   \BEG
   So far we have explained Groebner basis computation in
   commutative polynomial rings. However Groebner basis can be
   considered in more general non-commutative rings.
   Weyl algebra is one of such rings and
   Risa/Asir implements fundamental operations
   in Weyl algebra and Groebner basis computation in Weyl algebra.
   
   The @code{n} dimensional Weyl algebra over a field @code{K},
   @code{D=K<x1,@dots{},xn,D1,@dots{},Dn>} is a non-commutative
   algebra which has the following fundamental relations:
   \E
   
   @code{xi*xj-xj*xi=0}, @code{Di*Dj-Dj*Di=0}, @code{Di*xj-xj*Di=0} (@code{i!=j}),
   @code{Di*xi-xi*Di=1}
   
   \BJP
   $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
   $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,
   @code{D} $B$N85$O(B, @code{x1^i1*@dots{}*xn^in*D1^j1*@dots{}*Dn^jn} $B$J$kC19`(B
   $B<0$N(B @code{K} $B@~7A7k9g$H$7$F=q$-I=$9$3$H$,$G$-$k(B.
   Risa/Asir $B$K$*$$$F$O(B, $B$3$NC19`<0$r(B, $B2D49$JB?9`<0$HF1MM$K(B
   @code{<<i1,@dots{},in,j1,@dots{},jn>>} $B$GI=$9(B. $B$9$J$o$A(B, @code{D} $B$N85$b(B
   $BJ,;6I=8=B?9`<0$H$7$FI=$5$l$k(B. $B2C8:;;$O(B, $B2D49$N>l9g$HF1MM$K(B, @code{+}, @code{-}
   $B$K$h$j(B
   $B<B9T$G$-$k$,(B, $B>h;;$O(B, $BHs2D49@-$r9MN8$7$F(B @code{dp_weyl_mul()} $B$H$$$&4X?t(B
   $B$K$h$j<B9T$9$k(B.
   \E
   
   \BEG
   @code{D} is the ring of differential operators whose coefficients
   are polynomials in @code{K[x1,@dots{},xn]} and
   @code{Di} denotes the differentiation with respect to  @code{xi}.
   According to the commutation relation,
   elements of @code{D} can be represented as a @code{K}-linear combination
   of monomials @code{x1^i1*@dots{}*xn^in*D1^j1*@dots{}*Dn^jn}.
   In Risa/Asir, this type of monomial is represented
   by @code{<<i1,@dots{},in,j1,@dots{},jn>>} as in the case of commutative
   polynomial.
   That is, elements of @code{D} are represented by distributed polynomials.
   Addition and subtraction can be done by @code{+}, @code{-},
   but multiplication is done by calling @code{dp_weyl_mul()} because of
   the non-commutativity of @code{D}.
   \E
   
   @example
   [0] A=<<1,2,2,1>>;
   (1)*<<1,2,2,1>>
   [1] B=<<2,1,1,2>>;
   (1)*<<2,1,1,2>>
   [2] A*B;
   (1)*<<3,3,3,3>>
   [3] dp_weyl_mul(A,B);
   (1)*<<3,3,3,3>>+(1)*<<3,2,3,2>>+(4)*<<2,3,2,3>>+(4)*<<2,2,2,2>>
   +(2)*<<1,3,1,3>>+(2)*<<1,2,1,2>>
   @end example
   
   \BJP
   $B%0%l%V%J4pDl7W;;$K$D$$$F$b(B, Weyl $BBe?t@lMQ$N4X?t$H$7$F(B,
   $B<!$N4X?t$,MQ0U$7$F$"$k(B.
   \E
   \BEG
   The following functions are avilable for Groebner basis computation
   in Weyl algebra:
   \E
   @code{dp_weyl_gr_main()},
   @code{dp_weyl_gr_mod_main()},
   @code{dp_weyl_gr_f_main()},
   @code{dp_weyl_f4_main()},
   @code{dp_weyl_f4_mod_main()}.
   \BJP
   $B$^$?(B, $B1~MQ$H$7$F(B, global b $B4X?t$N7W;;$,<BAu$5$l$F$$$k(B.
   \E
   \BEG
   Computation of the global b function is implemented as an application.
   \E
   
   \BJP
 @node $B%0%l%V%J4pDl$K4X$9$kH!?t(B,,, $B%0%l%V%J4pDl$N7W;;(B  @node $B%0%l%V%J4pDl$K4X$9$kH!?t(B,,, $B%0%l%V%J4pDl$N7W;;(B
 @section $B%0%l%V%J4pDl$K4X$9$kH!?t(B  @section $B%0%l%V%J4pDl$K4X$9$kH!?t(B
 \E  \E
Line 1214  Refer to the sections for each functions.
Line 1462  Refer to the sections for each functions.
 * lex_hensel_gsl tolex_gsl tolex_gsl_d::  * lex_hensel_gsl tolex_gsl tolex_gsl_d::
 * gr_minipoly minipoly::  * gr_minipoly minipoly::
 * tolexm minipolym::  * tolexm minipolym::
 * dp_gr_main dp_gr_mod_main::  * 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::
 * dp_f4_main dp_f4_mod_main::  * dp_f4_main dp_f4_mod_main dp_weyl_f4_main dp_weyl_f4_mod_main::
   * nd_gr nd_gr_trace nd_f4 nd_f4_trace nd_weyl_gr nd_weyl_gr_trace::
 * dp_gr_flags dp_gr_print::  * dp_gr_flags dp_gr_print::
 * dp_ord::  * dp_ord::
   * dp_set_weight dp_set_top_weight dp_weyl_set_weight::
 * dp_ptod::  * dp_ptod::
 * dp_dtop::  * dp_dtop::
 * dp_mod dp_rat::  * dp_mod dp_rat::
 * dp_homo dp_dehomo::  * dp_homo dp_dehomo::
 * dp_ptozp dp_prim::  * dp_ptozp dp_prim::
 * dp_nf dp_nf_mod dp_true_nf dp_true_nf_mod::  * dp_nf dp_nf_mod dp_true_nf dp_true_nf_mod dp_weyl_nf dp_weyl_nf_mod::
 * dp_hm dp_ht dp_hc dp_rest::  * dp_hm dp_ht dp_hc dp_rest::
 * dp_td dp_sugar::  * dp_td dp_sugar::
 * dp_lcm::  * dp_lcm::
Line 1239  Refer to the sections for each functions.
Line 1489  Refer to the sections for each functions.
 * katsura hkatsura cyclic hcyclic::  * katsura hkatsura cyclic hcyclic::
 * dp_vtoe dp_etov::  * dp_vtoe dp_etov::
 * lex_hensel_gsl tolex_gsl tolex_gsl_d::  * lex_hensel_gsl tolex_gsl tolex_gsl_d::
   * primadec primedec::
   * primedec_mod::
   * bfunction bfct generic_bfct ann ann0::
 @end menu  @end menu
   
 \JP @node gr hgr gr_mod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B  \JP @node gr hgr gr_mod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
Line 1262  Refer to the sections for each functions.
Line 1515  Refer to the sections for each functions.
 @item return  @item return
 \JP $B%j%9%H(B  \JP $B%j%9%H(B
 \EG list  \EG list
 @item plist, vlist, procs  @item plist  vlist  procs
 \JP $B%j%9%H(B  \JP $B%j%9%H(B
 \EG list  \EG list
 @item order  @item order
Line 1289  Refer to the sections for each functions.
Line 1542  Refer to the sections for each functions.
 strategy $B$K$h$k7W;;(B, @code{hgr()} $B$O(B trace-lifting $B$*$h$S(B  strategy $B$K$h$k7W;;(B, @code{hgr()} $B$O(B trace-lifting $B$*$h$S(B
 $B@F<!2=$K$h$k(B $B6:@5$5$l$?(B sugar strategy $B$K$h$k7W;;$r9T$&(B.  $B@F<!2=$K$h$k(B $B6:@5$5$l$?(B sugar strategy $B$K$h$k7W;;$r9T$&(B.
 @item  @item
 @code{dgr()} $B$O(B, @code{gr()}, @code{dgr()} $B$r(B  @code{dgr()} $B$O(B, @code{gr()}, @code{hgr()} $B$r(B
 $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,  $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,
 $B@h$K7k2L$rJV$7$?J}$N7k2L$rJV$9(B. $B7k2L$OF10l$G$"$k$,(B, $B$I$A$i$NJ}K!$,(B  $B@h$K7k2L$rJV$7$?J}$N7k2L$rJV$9(B. $B7k2L$OF10l$G$"$k$,(B, $B$I$A$i$NJ}K!$,(B
 $B9bB.$+0lHL$K$OITL@$N$?$a(B, $B<B:]$N7P2a;~4V$rC;=L$9$k$N$KM-8z$G$"$k(B.  $B9bB.$+0lHL$K$OITL@$N$?$a(B, $B<B:]$N7P2a;~4V$rC;=L$9$k$N$KM-8z$G$"$k(B.
 @item  @item
 @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  @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
 CPU $B;~4V$G$"$j(B, $B$3$NH!?t$N>l9g$O$[$H$s$IDL?.$N$?$a$N;~4V$G$"$k(B.  CPU $B;~4V$G$"$j(B, $B$3$NH!?t$N>l9g$O$[$H$s$IDL?.$N$?$a$N;~4V$G$"$k(B.
   @item
   $BB?9`<0%j%9%H(B @var{plist} $B$NMWAG$,J,;6I=8=B?9`<0$N>l9g$O(B
   $B7k2L$bJ,;6I=8=B?9`<0$N%j%9%H$G$"$k(B.
   $B$3$N>l9g(B, $B0z?t$NJ,;6B?9`<0$OM?$($i$l$?=g=x$K=>$$(B @code{dp_sort} $B$G(B
   $B%=!<%H$5$l$F$+$i7W;;$5$l$k(B.
   $BB?9`<0%j%9%H$NMWAG$,J,;6I=8=B?9`<0$N>l9g$b(B
   $BJQ?t$N?tJ,$NITDj85$N%j%9%H$r(B @var{vlist} $B0z?t$H$7$FM?$($J$$$H$$$1$J$$(B
   ($B%@%_!<(B).
 \E  \E
 \BEG  \BEG
 @item  @item
Line 1324  Therefore this function is useful to reduce the actual
Line 1585  Therefore this function is useful to reduce the actual
 The CPU time shown after an exection of @code{dgr()} indicates  The CPU time shown after an exection of @code{dgr()} indicates
 that of the master process, and most of the time corresponds to the time  that of the master process, and most of the time corresponds to the time
 for communication.  for communication.
   @item
   When the elements of @var{plist} are distributed polynomials,
   the result is also a list of distributed polynomials.
   In this case, firstly  the elements of @var{plist} is sorted by @code{dp_sort}
   and the Grobner basis computation is started.
   Variables must be given in @var{vlist} even in this case
   (these variables are dummy).
 \E  \E
 @end itemize  @end itemize
   
Line 1341  for communication.
Line 1609  for communication.
 @table @t  @table @t
 \JP @item $B;2>H(B  \JP @item $B;2>H(B
 \EG @item References  \EG @item References
 @comment @fref{dp_gr_main dp_gr_mod_main},  @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},
 @fref{dp_gr_main dp_gr_mod_main},  
 @fref{dp_ord}.  @fref{dp_ord}.
 @end table  @end table
   
Line 1371  for communication.
Line 1638  for communication.
 @item return  @item return
 \JP $B%j%9%H(B  \JP $B%j%9%H(B
 \EG list  \EG list
 @item plist, vlist1, vlist2, procs  @item plist  vlist1  vlist2  procs
 \JP $B%j%9%H(B  \JP $B%j%9%H(B
 \EG list  \EG list
 @item order  @item order
Line 1559  processes.
Line 1826  processes.
 @table @t  @table @t
 \JP @item $B;2>H(B  \JP @item $B;2>H(B
 \EG @item References  \EG @item References
 @fref{dp_gr_main dp_gr_mod_main},  @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},
 \JP @fref{dp_ord}, @fref{$BJ,;67W;;(B}  \JP @fref{dp_ord}, @fref{$BJ,;67W;;(B}
 \EG @fref{dp_ord}, @fref{Distributed computation}  \EG @fref{dp_ord}, @fref{Distributed computation}
 @end table  @end table
Line 1575  processes.
Line 1842  processes.
 @item lex_hensel_gsl(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{homo})  @item lex_hensel_gsl(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{homo})
 \JP :: GSL $B7A<0$N%$%G%"%k4pDl$N7W;;(B  \JP :: GSL $B7A<0$N%$%G%"%k4pDl$N7W;;(B
 \EG ::Computation of an GSL form ideal basis  \EG ::Computation of an GSL form ideal basis
 @item tolex_gsl(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{homo})  @item tolex_gsl(@var{plist},@var{vlist1},@var{order},@var{vlist2})
 @itemx tolex_gsl_d(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{homo},@var{procs})  @itemx tolex_gsl_d(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{procs})
 \JP :: $B%0%l%V%J4pDl$rF~NO$H$9$k(B, GSL $B7A<0$N%$%G%"%k4pDl$N7W;;(B  \JP :: $B%0%l%V%J4pDl$rF~NO$H$9$k(B, GSL $B7A<0$N%$%G%"%k4pDl$N7W;;(B
 \EG :: Computation of an GSL form ideal basis stating from a Groebner basis  \EG :: Computation of an GSL form ideal basis stating from a Groebner basis
 @end table  @end table
Line 1585  processes.
Line 1852  processes.
 @item return  @item return
 \JP $B%j%9%H(B  \JP $B%j%9%H(B
 \EG list  \EG list
 @item plist, vlist1, vlist2, procs  @item plist  vlist1  vlist2  procs
 \JP $B%j%9%H(B  \JP $B%j%9%H(B
 \EG list  \EG list
 @item order  @item order
Line 1661  processes.
Line 1928  processes.
 [108] GSL[1];  [108] GSL[1];
 [u2,10352277157007342793600000000*u0^31-...]  [u2,10352277157007342793600000000*u0^31-...]
 [109] GSL[5];  [109] GSL[5];
 [u0,11771021876193064124640000000*u0^32-...,376672700038178051988480000000*u0^31-...]  [u0,11771021876193064124640000000*u0^32-...,
   376672700038178051988480000000*u0^31-...]
 @end example  @end example
   
 @table @t  @table @t
Line 1691  processes.
Line 1959  processes.
 @item return  @item return
 \JP $BB?9`<0(B  \JP $BB?9`<0(B
 \EG polynomial  \EG polynomial
 @item plist, vlist  @item plist  vlist
 \JP $B%j%9%H(B  \JP $B%j%9%H(B
 \EG list  \EG list
 @item order  @item order
Line 1788  for @code{gr_minipoly()}.
Line 2056  for @code{gr_minipoly()}.
 @item return  @item return
 \JP @code{tolexm()} : $B%j%9%H(B, @code{minipolym()} : $BB?9`<0(B  \JP @code{tolexm()} : $B%j%9%H(B, @code{minipolym()} : $BB?9`<0(B
 \EG @code{tolexm()} : list, @code{minipolym()} : polynomial  \EG @code{tolexm()} : list, @code{minipolym()} : polynomial
 @item plist, vlist1, vlist2  @item plist  vlist1  vlist2
 \JP $B%j%9%H(B  \JP $B%j%9%H(B
 \EG list  \EG list
 @item order  @item order
Line 1836  z^32+11405*z^31+20868*z^30+21602*z^29+...
Line 2104  z^32+11405*z^31+20868*z^30+21602*z^29+...
 @fref{gr_minipoly minipoly}.  @fref{gr_minipoly minipoly}.
 @end table  @end table
   
 \JP @node dp_gr_main dp_gr_mod_main,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B  \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
 \EG @node dp_gr_main dp_gr_mod_main,,, Functions for Groebner basis computation  \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
 @subsection @code{dp_gr_main}, @code{dp_gr_mod_main}  @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}
 @findex dp_gr_main  @findex dp_gr_main
 @findex dp_gr_mod_main  @findex dp_gr_mod_main
   @findex dp_gr_f_main
   @findex dp_weyl_gr_main
   @findex dp_weyl_gr_mod_main
   @findex dp_weyl_gr_f_main
   
 @table @t  @table @t
 @item dp_gr_main(@var{plist},@var{vlist},@var{homo},@var{modular},@var{order})  @item dp_gr_main(@var{plist},@var{vlist},@var{homo},@var{modular},@var{order})
 @itemx dp_gr_mod_main(@var{plist},@var{vlist},@var{homo},@var{modular},@var{order})  @itemx dp_gr_mod_main(@var{plist},@var{vlist},@var{homo},@var{modular},@var{order})
   @itemx dp_gr_f_main(@var{plist},@var{vlist},@var{homo},@var{order})
   @itemx dp_weyl_gr_main(@var{plist},@var{vlist},@var{homo},@var{modular},@var{order})
   @itemx dp_weyl_gr_mod_main(@var{plist},@var{vlist},@var{homo},@var{modular},@var{order})
   @itemx dp_weyl_gr_f_main(@var{plist},@var{vlist},@var{homo},@var{order})
 \JP :: $B%0%l%V%J4pDl$N7W;;(B ($BAH$_9~$_H!?t(B)  \JP :: $B%0%l%V%J4pDl$N7W;;(B ($BAH$_9~$_H!?t(B)
 \EG :: Groebner basis computation (built-in functions)  \EG :: Groebner basis computation (built-in functions)
 @end table  @end table
Line 1853  z^32+11405*z^31+20868*z^30+21602*z^29+...
Line 2129  z^32+11405*z^31+20868*z^30+21602*z^29+...
 @item return  @item return
 \JP $B%j%9%H(B  \JP $B%j%9%H(B
 \EG list  \EG list
 @item plist, vlist  @item plist  vlist
 \JP $B%j%9%H(B  \JP $B%j%9%H(B
 \EG list  \EG list
 @item order  @item order
Line 1872  z^32+11405*z^31+20868*z^30+21602*z^29+...
Line 2148  z^32+11405*z^31+20868*z^30+21602*z^29+...
 @item  @item
 $B$3$l$i$NH!?t$O(B, $B%0%l%V%J4pDl7W;;$N4pK\E*AH$_9~$_H!?t$G$"$j(B, @code{gr()},  $B$3$l$i$NH!?t$O(B, $B%0%l%V%J4pDl7W;;$N4pK\E*AH$_9~$_H!?t$G$"$j(B, @code{gr()},
 @code{hgr()}, @code{gr_mod()} $B$J$I$O$9$Y$F$3$l$i$NH!?t$r8F$S=P$7$F7W;;(B  @code{hgr()}, @code{gr_mod()} $B$J$I$O$9$Y$F$3$l$i$NH!?t$r8F$S=P$7$F7W;;(B
 $B$r9T$C$F$$$k(B.  $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
   $B$N$?$a$N4X?t$G$"$k(B.
 @item  @item
   @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
   $B>l9g$KMQ$$$k(B. $BF~NO$O(B, $B$"$i$+$8$a(B, @code{simp_ff()} $B$J$I$G(B,
   $B9M$($kM-8BBN>e$K<M1F$5$l$F$$$kI,MW$,$"$k(B.
   @item
 $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  $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
 $B$r<B9T$9$k(B.  $B$r<B9T$9$k(B.
 @item  @item
Line 1905  z^32+11405*z^31+20868*z^30+21602*z^29+...
Line 2186  z^32+11405*z^31+20868*z^30+21602*z^29+...
 @item  @item
 These functions are fundamental built-in functions for Groebner basis  These functions are fundamental built-in functions for Groebner basis
 computation and @code{gr()},@code{hgr()} and @code{gr_mod()}  computation and @code{gr()},@code{hgr()} and @code{gr_mod()}
 are all interfaces to these functions.  are all interfaces to these functions. Functions whose names
   contain weyl are those for computation in Weyl algebra.
 @item  @item
   @code{dp_gr_f_main()} and @code{dp_weyl_gr_f_main()}
   are functions for Groebner basis computation
   over various finite fields. Coefficients of input polynomials
   must be converted to elements of a finite field
   currently specified by @code{setmod_ff()}.
   @item
 If @var{homo} is not equal to 0, homogenization is applied before entering  If @var{homo} is not equal to 0, homogenization is applied before entering
 Buchberger algorithm  Buchberger algorithm
 @item  @item
Line 1944  Actual computation is controlled by various parameters
Line 2232  Actual computation is controlled by various parameters
 @fref{dp_ord},  @fref{dp_ord},
 @fref{dp_gr_flags dp_gr_print},  @fref{dp_gr_flags dp_gr_print},
 @fref{gr hgr gr_mod},  @fref{gr hgr gr_mod},
   @fref{setmod_ff},
 \JP @fref{$B7W;;$*$h$SI=<($N@)8f(B}.  \JP @fref{$B7W;;$*$h$SI=<($N@)8f(B}.
 \EG @fref{Controlling Groebner basis computations}  \EG @fref{Controlling Groebner basis computations}
 @end table  @end table
   
 \JP @node dp_f4_main dp_f4_mod_main,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B  \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
 \EG @node dp_f4_main dp_f4_mod_main,,, Functions for Groebner basis computation  \EG @node dp_f4_main dp_f4_mod_main dp_weyl_f4_main dp_weyl_f4_mod_main,,, Functions for Groebner basis computation
 @subsection @code{dp_f4_main}, @code{dp_f4_mod_main}  @subsection @code{dp_f4_main}, @code{dp_f4_mod_main}, @code{dp_weyl_f4_main}, @code{dp_weyl_f4_mod_main}
 @findex dp_f4_main  @findex dp_f4_main
 @findex dp_f4_mod_main  @findex dp_f4_mod_main
   @findex dp_weyl_f4_main
   @findex dp_weyl_f4_mod_main
   
 @table @t  @table @t
 @item dp_f4_main(@var{plist},@var{vlist},@var{order})  @item dp_f4_main(@var{plist},@var{vlist},@var{order})
 @itemx dp_f4_mod_main(@var{plist},@var{vlist},@var{order})  @itemx dp_f4_mod_main(@var{plist},@var{vlist},@var{order})
   @itemx dp_weyl_f4_main(@var{plist},@var{vlist},@var{order})
   @itemx dp_weyl_f4_mod_main(@var{plist},@var{vlist},@var{order})
 \JP :: F4 $B%"%k%4%j%:%`$K$h$k%0%l%V%J4pDl$N7W;;(B ($BAH$_9~$_H!?t(B)  \JP :: F4 $B%"%k%4%j%:%`$K$h$k%0%l%V%J4pDl$N7W;;(B ($BAH$_9~$_H!?t(B)
 \EG :: Groebner basis computation by F4 algorithm (built-in functions)  \EG :: Groebner basis computation by F4 algorithm (built-in functions)
 @end table  @end table
Line 1965  Actual computation is controlled by various parameters
Line 2258  Actual computation is controlled by various parameters
 @item return  @item return
 \JP $B%j%9%H(B  \JP $B%j%9%H(B
 \EG list  \EG list
 @item plist, vlist  @item plist  vlist
 \JP $B%j%9%H(B  \JP $B%j%9%H(B
 \EG list  \EG list
 @item order  @item order
Line 1982  F4 $B%"%k%4%j%:%`$O(B, J.C. Faugere $B$K$h$jDs>'$5$
Line 2275  F4 $B%"%k%4%j%:%`$O(B, J.C. Faugere $B$K$h$jDs>'$5$
 $B;;K!$G$"$j(B, $BK\<BAu$O(B, $BCf9q>jM>DjM}$K$h$k@~7AJ}Dx<05a2r$rMQ$$$?(B  $B;;K!$G$"$j(B, $BK\<BAu$O(B, $BCf9q>jM>DjM}$K$h$k@~7AJ}Dx<05a2r$rMQ$$$?(B
 $B;n83E*$J<BAu$G$"$k(B.  $B;n83E*$J<BAu$G$"$k(B.
 @item  @item
 $B0z?t$*$h$SF0:n$O$=$l$>$l(B @code{dp_gr_main()}, @code{dp_gr_mod_main()}  $B@F<!2=$N0z?t$,$J$$$3$H$r=|$1$P(B, $B0z?t$*$h$SF0:n$O$=$l$>$l(B
   @code{dp_gr_main()}, @code{dp_gr_mod_main()},
   @code{dp_weyl_gr_main()}, @code{dp_weyl_gr_mod_main()}
 $B$HF1MM$G$"$k(B.  $B$HF1MM$G$"$k(B.
 \E  \E
 \BEG  \BEG
Line 1994  invented by J.C. Faugere. The current implementation o
Line 2289  invented by J.C. Faugere. The current implementation o
 uses Chinese Remainder theorem and not highly optimized.  uses Chinese Remainder theorem and not highly optimized.
 @item  @item
 Arguments and actions are the same as those of  Arguments and actions are the same as those of
 @code{dp_gr_main()}, @code{dp_gr_mod_main()}.  @code{dp_gr_main()}, @code{dp_gr_mod_main()},
   @code{dp_weyl_gr_main()}, @code{dp_weyl_gr_mod_main()},
   except for lack of the argument for controlling homogenization.
 \E  \E
 @end itemize  @end itemize
   
Line 2008  Arguments and actions are the same as those of 
Line 2305  Arguments and actions are the same as those of 
 \EG @fref{Controlling Groebner basis computations}  \EG @fref{Controlling Groebner basis computations}
 @end table  @end table
   
   \JP @node nd_gr nd_gr_trace nd_f4 nd_f4_trace nd_weyl_gr nd_weyl_gr_trace,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
   \EG @node nd_gr nd_gr_trace nd_f4 nd_f4_trace nd_weyl_gr nd_weyl_gr_trace,,, Functions for Groebner basis computation
   @subsection @code{nd_gr}, @code{nd_gr_trace}, @code{nd_f4}, @code{nd_f4_trace}, @code{nd_weyl_gr}, @code{nd_weyl_gr_trace}
   @findex nd_gr
   @findex nd_gr_trace
   @findex nd_f4
   @findex nd_f4_trace
   @findex nd_weyl_gr
   @findex nd_weyl_gr_trace
   
   @table @t
   @item nd_gr(@var{plist},@var{vlist},@var{p},@var{order})
   @itemx nd_gr_trace(@var{plist},@var{vlist},@var{homo},@var{p},@var{order})
   @itemx nd_f4(@var{plist},@var{vlist},@var{modular},@var{order})
   @itemx nd_f4_trace(@var{plist},@var{vlist},@var{homo},@var{p},@var{order})
   @item nd_weyl_gr(@var{plist},@var{vlist},@var{p},@var{order})
   @itemx nd_weyl_gr_trace(@var{plist},@var{vlist},@var{homo},@var{p},@var{order})
   \JP :: $B%0%l%V%J4pDl$N7W;;(B ($BAH$_9~$_H!?t(B)
   \EG :: Groebner basis computation (built-in functions)
   @end table
   
   @table @var
   @item return
   \JP $B%j%9%H(B
   \EG list
   @item plist  vlist
   \JP $B%j%9%H(B
   \EG list
   @item order
   \JP $B?t(B, $B%j%9%H$^$?$O9TNs(B
   \EG number, list or matrix
   @item homo
   \JP $B%U%i%0(B
   \EG flag
   @item modular
   \JP $B%U%i%0$^$?$OAG?t(B
   \EG flag or prime
   @end table
   
   \BJP
   @itemize @bullet
   @item
   $B$3$l$i$NH!?t$O(B, $B%0%l%V%J4pDl7W;;AH$_9~$_4X?t$N?7<BAu$G$"$k(B.
   @item @code{nd_gr} $B$O(B, @code{p} $B$,(B 0 $B$N$H$-M-M}?tBN>e$N(B Buchberger
   $B%"%k%4%j%:%`$r<B9T$9$k(B. @code{p} $B$,(B 2 $B0J>e$N<+A3?t$N$H$-(B, GF(p) $B>e$N(B
   Buchberger $B%"%k%4%j%:%`$r<B9T$9$k(B.
   @item @code{nd_gr_trace} $B$*$h$S(B @code{nd_f4_trace}
   $B$OM-M}?tBN>e$G(B trace $B%"%k%4%j%:%`$r<B9T$9$k(B.
   @var{p} $B$,(B 0 $B$^$?$O(B 1 $B$N$H$-(B, $B<+F0E*$KA*$P$l$?AG?t$rMQ$$$F(B, $B@.8y$9$k(B
   $B$^$G(B trace $B%"%k%4%j%:%`$r<B9T$9$k(B.
   @var{p} $B$,(B 2 $B0J>e$N$H$-(B, trace $B$O(BGF(p) $B>e$G7W;;$5$l$k(B. trace $B%"%k%4%j%:%`(B
   $B$,<:GT$7$?>l9g(B 0 $B$,JV$5$l$k(B. @var{p} $B$,Ii$N>l9g(B, $B%0%l%V%J4pDl%A%'%C%/$O(B
   $B9T$o$J$$(B. $B$3$N>l9g(B, @var{p} $B$,(B -1 $B$J$i$P<+F0E*$KA*$P$l$?AG?t$,(B,
   $B$=$l0J30$O;XDj$5$l$?AG?t$rMQ$$$F%0%l%V%J4pDl8uJd$N7W;;$,9T$o$l$k(B.
   @code{nd_f4_trace} $B$O(B, $B3FA4<!?t$K$D$$$F(B, $B$"$kM-8BBN>e$G(B F4 $B%"%k%4%j%:%`(B
   $B$G9T$C$?7k2L$r$b$H$K(B, $B$=$NM-8BBN>e$G(B 0 $B$G$J$$4pDl$rM?$($k(B S-$BB?9`<0$N$_$r(B
   $BMQ$$$F9TNs@8@.$r9T$$(B, $B$=$NA4<!?t$K$*$1$k4pDl$r@8@.$9$kJ}K!$G$"$k(B. $BF@$i$l$k(B
   $BB?9`<0=89g$O$d$O$j%0%l%V%J4pDl8uJd$G$"$j(B, @code{nd_gr_trace} $B$HF1MM$N(B
   $B%A%'%C%/$,9T$o$l$k(B.
   @item
   @code{nd_f4} $B$O(B @code{modular} $B$,(B 0 $B$N$H$-M-M}?tBN>e$N(B, @code{modular} $B$,(B
   $B%^%7%s%5%$%:AG?t$N$H$-M-8BBN>e$N(B F4 $B%"%k%4%j%:%`$r<B9T$9$k(B.
   @item
   @var{plist} $B$,B?9`<0%j%9%H$N>l9g(B, @var{plist}$B$G@8@.$5$l$k%$%G%"%k$N%0%l%V%J!<4pDl$,(B
   $B7W;;$5$l$k(B. @var{plist} $B$,B?9`<0%j%9%H$N%j%9%H$N>l9g(B, $B3FMWAG$OB?9`<04D>e$N<+M32C72$N85$H8+$J$5$l(B,
   $B$3$l$i$,@8@.$9$kItJ,2C72$N%0%l%V%J!<4pDl$,7W;;$5$l$k(B. $B8e<T$N>l9g(B, $B9`=g=x$O2C72$KBP$9$k9`=g=x$r(B
   $B;XDj$9$kI,MW$,$"$k(B. $B$3$l$O(B @var{[s,ord]} $B$N7A$G;XDj$9$k(B. @var{s} $B$,(B 0 $B$J$i$P(B TOP (Term Over Position),
   1 $B$J$i$P(B POT (Position Over Term) $B$r0UL#$7(B, @var{ord} $B$OB?9`<04D$NC19`<0$KBP$9$k9`=g=x$G$"$k(B.
   @item
   @code{nd_weyl_gr}, @code{nd_weyl_gr_trace} $B$O(B Weyl $BBe?tMQ$G$"$k(B.
   @item
   @code{f4} $B7O4X?t0J30$O$9$Y$FM-M}4X?t78?t$N7W;;$,2DG=$G$"$k(B.
   @item
   $B0lHL$K(B @code{dp_gr_main}, @code{dp_gr_mod_main} $B$h$j9bB.$G$"$k$,(B,
   $BFC$KM-8BBN>e$N>l9g82Cx$G$"$k(B.
   @end itemize
   \E
   
   \BEG
   @itemize @bullet
   @item
   These functions are new implementations for computing Groebner bases.
   @item @code{nd_gr} executes Buchberger algorithm over the rationals
   if  @code{p} is 0, and that over GF(p) if @code{p} is a prime.
   @item @code{nd_gr_trace} executes the trace algorithm over the rationals.
   If @code{p} is 0 or 1, the trace algorithm is executed until it succeeds
   by using automatically chosen primes.
   If @code{p} a positive prime,
   the trace is comuted over GF(p).
   If the trace algorithm fails 0 is returned.
   If @code{p} is negative,
   the Groebner basis check and ideal-membership check are omitted.
   In this case, an automatically chosen prime if @code{p} is 1,
   otherwise the specified prime is used to compute a Groebner basis
   candidate.
   Execution of @code{nd_f4_trace} is done as follows:
   For each total degree, an F4-reduction of S-polynomials over a finite field
   is done, and S-polynomials which give non-zero basis elements are gathered.
   Then F4-reduction over Q is done for the gathered S-polynomials.
   The obtained polynomial set is a Groebner basis candidate and the same
   check procedure as in the case of @code{nd_gr_trace} is done.
   @item
   @code{nd_f4} executes F4 algorithm over Q if @code{modular} is equal to 0,
   or over a finite field GF(@code{modular})
   if @code{modular} is a prime number of machine size (<2^29).
   If @var{plist} is a list of polynomials, then a Groebner basis of the ideal generated by @var{plist}
   is computed. If @var{plist} is a list of lists of polynomials, then each list of polynomials are regarded
   as an element of a free module over a polynomial ring and a Groebner basis of the sub-module generated by @var{plist}
   in the free module. In the latter case a term order in the free module should be specified.
   This is specified by @var{[s,ord]}. If @var{s} is 0 then it means TOP (Term Over Position).
   If @var{s} is 1 then it means POT 1 (Position Over Term). @var{ord} is a term order in the base polynomial ring.
   @item
   @code{nd_weyl_gr}, @code{nd_weyl_gr_trace} are for Weyl algebra computation.
   @item
   Functions except for F4 related ones can handle rational coeffient cases.
   @item
   In general these functions are more efficient than
   @code{dp_gr_main}, @code{dp_gr_mod_main}, especially over finite fields.
   @end itemize
   \E
   
   @example
   [38] load("cyclic")$
   [49] C=cyclic(7)$
   [50] V=vars(C)$
   [51] cputime(1)$
   [52] dp_gr_mod_main(C,V,0,31991,0)$
   26.06sec + gc : 0.313sec(26.4sec)
   [53] nd_gr(C,V,31991,0)$
   ndv_alloc=1477188
   5.737sec + gc : 0.1837sec(5.921sec)
   [54] dp_f4_mod_main(C,V,31991,0)$
   3.51sec + gc : 0.7109sec(4.221sec)
   [55] nd_f4(C,V,31991,0)$
   1.906sec + gc : 0.126sec(2.032sec)
   @end example
   
   @table @t
   \JP @item $B;2>H(B
   \EG @item References
   @fref{dp_ord},
   @fref{dp_gr_flags dp_gr_print},
   \JP @fref{$B7W;;$*$h$SI=<($N@)8f(B}.
   \EG @fref{Controlling Groebner basis computations}
   @end table
   
 \JP @node dp_gr_flags dp_gr_print,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B  \JP @node dp_gr_flags dp_gr_print,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
 \EG @node dp_gr_flags dp_gr_print,,, Functions for Groebner basis computation  \EG @node dp_gr_flags dp_gr_print,,, Functions for Groebner basis computation
 @subsection @code{dp_gr_flags}, @code{dp_gr_print}  @subsection @code{dp_gr_flags}, @code{dp_gr_print}
Line 2016  Arguments and actions are the same as those of 
Line 2459  Arguments and actions are the same as those of 
   
 @table @t  @table @t
 @item dp_gr_flags([@var{list}])  @item dp_gr_flags([@var{list}])
 @itemx dp_gr_print([@var{0|1}])  @itemx dp_gr_print([@var{i}])
 \JP :: $B7W;;$*$h$SI=<(MQ%Q%i%a%?$N@_Dj(B, $B;2>H(B  \JP :: $B7W;;$*$h$SI=<(MQ%Q%i%a%?$N@_Dj(B, $B;2>H(B
 \BEG :: Set and show various parameters for cotrolling computations  \BEG :: Set and show various parameters for cotrolling computations
 and showing informations.  and showing informations.
Line 2030  and showing informations.
Line 2473  and showing informations.
 @item list  @item list
 \JP $B%j%9%H(B  \JP $B%j%9%H(B
 \EG list  \EG list
   @item i
   \JP $B@0?t(B
   \EG integer
 @end table  @end table
   
 @itemize @bullet  @itemize @bullet
 \BJP  \BJP
 @item  @item
 @code{dp_gr_main()}, @code{dp_gr_mod_main()} $B<B9T;~$K$*$1$k$5$^$6$^(B  @code{dp_gr_main()}, @code{dp_gr_mod_main()}, @code{dp_gr_f_main()}  $B<B9T;~$K$*$1$k$5$^$6$^(B
 $B$J%Q%i%a%?$r@_Dj(B, $B;2>H$9$k(B.  $B$J%Q%i%a%?$r@_Dj(B, $B;2>H$9$k(B.
 @item  @item
 $B0z?t$,$J$$>l9g(B, $B8=:_$N@_Dj$,JV$5$l$k(B.  $B0z?t$,$J$$>l9g(B, $B8=:_$N@_Dj$,JV$5$l$k(B.
Line 2043  and showing informations.
Line 2489  and showing informations.
 $B0z?t$O(B, @code{["Print",1,"NoSugar",1,...]} $B$J$k7A$N%j%9%H$G(B, $B:8$+$i=g$K(B  $B0z?t$O(B, @code{["Print",1,"NoSugar",1,...]} $B$J$k7A$N%j%9%H$G(B, $B:8$+$i=g$K(B
 $B@_Dj$5$l$k(B. $B%Q%i%a%?L>$OJ8;zNs$GM?$($kI,MW$,$"$k(B.  $B@_Dj$5$l$k(B. $B%Q%i%a%?L>$OJ8;zNs$GM?$($kI,MW$,$"$k(B.
 @item  @item
 @code{dp_gr_print()} $B$O(B, $BFC$K%Q%i%a%?(B @code{Print} $B$NCM$rD>@\@_Dj(B, $B;2>H(B  @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
 $B$G$-$k(B. $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  $B$G$-$k(B. $B@_Dj$5$l$kCM$O<!$NDL$j$G$"$k!#(B
 $BH!?t$K$*$$$F(B, @code{Print} $B$NCM$r8+$F(B, $B$=$N%5%V%k!<%A%s$,Cf4V>pJs$NI=<((B  @table @var
   @item i=0
   @code{Print=0}, @code{PrintShort=0}
   @item i=1
   @code{Print=1}, @code{PrintShort=0}
   @item i=2
   @code{Print=0}, @code{PrintShort=1}
   @end table
   $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
   $BH!?t$K$*$$$F(B, $B$=$N%5%V%k!<%A%s$,Cf4V>pJs$NI=<((B
 $B$r9T$&:]$K(B, $B?WB.$K%U%i%0$r8+$k$3$H$,$G$-$k$h$&$KMQ0U$5$l$F$$$k(B.  $B$r9T$&:]$K(B, $B?WB.$K%U%i%0$r8+$k$3$H$,$G$-$k$h$&$KMQ0U$5$l$F$$$k(B.
 \E  \E
 \BEG  \BEG
Line 2060  Arguments must be specified as a list such as
Line 2515  Arguments must be specified as a list such as
 strings.  strings.
 @item  @item
 @code{dp_gr_print()} is used to set and show the value of a parameter  @code{dp_gr_print()} is used to set and show the value of a parameter
 @code{Print}. This functions is prepared to get quickly the value of  @code{Print} and @code{PrintShort}.
 @code{Print} when a user defined function calling @code{dp_gr_main()} etc.  @table @var
   @item i=0
   @code{Print=0}, @code{PrintShort=0}
   @item i=1
   @code{Print=1}, @code{PrintShort=0}
   @item i=2
   @code{Print=0}, @code{PrintShort=1}
   @end table
   This functions is prepared to get quickly the value
   when a user defined function calling @code{dp_gr_main()} etc.
 uses the value as a flag for showing intermediate informations.  uses the value as a flag for showing intermediate informations.
 \E  \E
 @end itemize  @end itemize
Line 2163  when functions other than top level functions are call
Line 2627  when functions other than top level functions are call
 \EG @fref{Setting term orderings}  \EG @fref{Setting term orderings}
 @end table  @end table
   
   \JP @node dp_set_weight dp_set_top_weight dp_weyl_set_weight,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
   \EG @node dp_set_weight dp_set_top_weight dp_weyl_set_weight,,, Functions for Groebner basis computation
   @subsection @code{dp_set_weight}, @code{dp_set_top_weight}, @code{dp_weyl_set_weight}
   @findex dp_set_weight
   @findex dp_set_top_weight
   @findex dp_weyl_set_weight
   
   @table @t
   @item dp_set_weight([@var{weight}])
   \JP :: sugar weight $B$N@_Dj(B, $B;2>H(B
   \EG :: Set and show the sugar weight.
   @item dp_set_top_weight([@var{weight}])
   \JP :: top weight $B$N@_Dj(B, $B;2>H(B
   \EG :: Set and show the top weight.
   @item dp_weyl_set_weight([@var{weight}])
   \JP :: weyl weight $B$N@_Dj(B, $B;2>H(B
   \EG :: Set and show the weyl weight.
   @end table
   
   @table @var
   @item return
   \JP $B%Y%/%H%k(B
   \EG a vector
   @item weight
   \JP $B@0?t$N%j%9%H$^$?$O%Y%/%H%k(B
   \EG a list or vector of integers
   @end table
   
   @itemize @bullet
   \BJP
   @item
   @code{dp_set_weight} $B$O(B sugar weight $B$r(B @var{weight} $B$K@_Dj$9$k(B. $B0z?t$,$J$$;~(B,
   $B8=:_@_Dj$5$l$F$$$k(B sugar weight $B$rJV$9(B. sugar weight $B$O@5@0?t$r@.J,$H$9$k%Y%/%H%k$G(B,
   $B3FJQ?t$N=E$_$rI=$9(B. $B<!?t$D$-=g=x$K$*$$$F(B, $BC19`<0$N<!?t$r7W;;$9$k:]$KMQ$$$i$l$k(B.
   $B@F<!2=JQ?tMQ$K(B, $BKvHx$K(B 1 $B$rIU$12C$($F$*$/$H0BA4$G$"$k(B.
   @item
   @code{dp_set_top_weight} $B$O(B top weight $B$r(B @var{weight} $B$K@_Dj$9$k(B. $B0z?t$,$J$$;~(B,
   $B8=:_@_Dj$5$l$F$$$k(B top weight $B$rJV$9(B. top weight $B$,@_Dj$5$l$F$$$k$H$-(B,
   $B$^$:(B top weight $B$K$h$kC19`<0Hf3S$r@h$K9T$&(B. tie breaker $B$H$7$F8=:_@_Dj$5$l$F$$$k(B
   $B9`=g=x$,MQ$$$i$l$k$,(B, $B$3$NHf3S$K$O(B top weight $B$OMQ$$$i$l$J$$(B.
   
   @item
   @code{dp_weyl_set_weight} $B$O(B weyl weight $B$r(B @var{weight} $B$K@_Dj$9$k(B. $B0z?t$,$J$$;~(B,
   $B8=:_@_Dj$5$l$F$$$k(B weyl weight $B$rJV$9(B. weyl weight w $B$r@_Dj$9$k$H(B,
   $B9`=g=x7?(B 11 $B$G$N7W;;$K$*$$$F(B, (-w,w) $B$r(B top weight, tie breaker $B$r(B graded reverse lex
   $B$H$7$?9`=g=x$,@_Dj$5$l$k(B.
   \E
   \BEG
   @item
   @code{dp_set_weight} sets the sugar weight=@var{weight}. It returns the current sugar weight.
   A sugar weight is a vector with positive integer components and it represents the weights of variables.
   It is used for computing the weight of a monomial in a graded ordering.
   It is recommended to append a component 1 at the end of the weight vector for a homogenizing variable.
   @item
   @code{dp_set_top_weight} sets the top weight=@var{weight}. It returns the current top weight.
   It a top weight is set, the weights of monomials under the top weight are firstly compared.
   If the the weights are equal then the current term ordering is applied as a tie breaker, but
   the top weight is not used in the tie breaker.
   
   @item
   @code{dp_weyl_set_weight} sets the weyl weigh=@var{weight}. It returns the current weyl weight.
   If a weyl weight w is set, in the comparsion by the term order type 11, a term order with
   the top weight=(-w,w) and the tie breaker=graded reverse lex is applied.
   \E
   @end itemize
   
   @table @t
   \JP @item $B;2>H(B
   \EG @item References
   @fref{Weight}
   @end table
   
   
 \JP @node dp_ptod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B  \JP @node dp_ptod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
 \EG @node dp_ptod,,, Functions for Groebner basis computation  \EG @node dp_ptod,,, Functions for Groebner basis computation
 @subsection @code{dp_ptod}  @subsection @code{dp_ptod}
Line 2211  the coefficient field.
Line 2748  the coefficient field.
 (1)*<<2,0,0>>+(2)*<<1,1,0>>+(1)*<<0,2,0>>+(2)*<<1,0,1>>+(2)*<<0,1,1>>  (1)*<<2,0,0>>+(2)*<<1,1,0>>+(1)*<<0,2,0>>+(2)*<<1,0,1>>+(2)*<<0,1,1>>
 +(1)*<<0,0,2>>  +(1)*<<0,0,2>>
 [52] dp_ptod((x+y+z)^2,[x,y]);  [52] dp_ptod((x+y+z)^2,[x,y]);
 (1)*<<2,0>>+(2)*<<1,1>>+(1)*<<0,2>>+(2*z)*<<1,0>>+(2*z)*<<0,1>>+(z^2)*<<0,0>>  (1)*<<2,0>>+(2)*<<1,1>>+(1)*<<0,2>>+(2*z)*<<1,0>>+(2*z)*<<0,1>>
   +(z^2)*<<0,0>>
 @end example  @end example
   
 @table @t  @table @t
Line 2263  variables of @var{dpoly}.
Line 2801  variables of @var{dpoly}.
   
 @example  @example
 [53] T=dp_ptod((x+y+z)^2,[x,y]);  [53] T=dp_ptod((x+y+z)^2,[x,y]);
 (1)*<<2,0>>+(2)*<<1,1>>+(1)*<<0,2>>+(2*z)*<<1,0>>+(2*z)*<<0,1>>+(z^2)*<<0,0>>  (1)*<<2,0>>+(2)*<<1,1>>+(1)*<<0,2>>+(2*z)*<<1,0>>+(2*z)*<<0,1>>
   +(z^2)*<<0,0>>
 [54] P=dp_dtop(T,[a,b]);  [54] P=dp_dtop(T,[a,b]);
 z^2+(2*a+2*b)*z+a^2+2*b*a+b^2  z^2+(2*a+2*b)*z+a^2+2*b*a+b^2
 @end example  @end example
Line 2343  converting the coefficients into elements of a finite 
Line 2882  converting the coefficients into elements of a finite 
 @table @t  @table @t
 \JP @item $B;2>H(B  \JP @item $B;2>H(B
 \EG @item References  \EG @item References
 @fref{dp_nf dp_nf_mod dp_true_nf dp_true_nf_mod},  @fref{dp_nf dp_nf_mod dp_true_nf dp_true_nf_mod dp_weyl_nf dp_weyl_nf_mod},
 @fref{subst psubst},  @fref{subst psubst},
 @fref{setmod}.  @fref{setmod}.
 @end table  @end table
Line 2487  polynomial contents included in the coefficients are n
Line 3026  polynomial contents included in the coefficients are n
 @fref{ptozp}.  @fref{ptozp}.
 @end table  @end table
   
 \JP @node dp_nf dp_nf_mod dp_true_nf dp_true_nf_mod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B  \JP @node dp_nf dp_nf_mod dp_true_nf dp_true_nf_mod dp_weyl_nf dp_weyl_nf_mod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
 \EG @node dp_nf dp_nf_mod dp_true_nf dp_true_nf_mod,,, Functions for Groebner basis computation  \EG @node dp_nf dp_nf_mod dp_true_nf dp_true_nf_mod dp_weyl_nf dp_weyl_nf_mod,,, Functions for Groebner basis computation
 @subsection @code{dp_nf}, @code{dp_nf_mod}, @code{dp_true_nf}, @code{dp_true_nf_mod}  @subsection @code{dp_nf}, @code{dp_nf_mod}, @code{dp_true_nf}, @code{dp_true_nf_mod}
 @findex dp_nf  @findex dp_nf
 @findex  dp_true_nf  @findex  dp_true_nf
 @findex dp_nf_mod  @findex dp_nf_mod
 @findex  dp_true_nf_mod  @findex  dp_true_nf_mod
   @findex dp_weyl_nf
   @findex dp_weyl_nf_mod
   
 @table @t  @table @t
 @item dp_nf(@var{indexlist},@var{dpoly},@var{dpolyarray},@var{fullreduce})  @item dp_nf(@var{indexlist},@var{dpoly},@var{dpolyarray},@var{fullreduce})
   @item dp_weyl_nf(@var{indexlist},@var{dpoly},@var{dpolyarray},@var{fullreduce})
 @item dp_nf_mod(@var{indexlist},@var{dpoly},@var{dpolyarray},@var{fullreduce},@var{mod})  @item dp_nf_mod(@var{indexlist},@var{dpoly},@var{dpolyarray},@var{fullreduce},@var{mod})
   @item dp_weyl_nf_mod(@var{indexlist},@var{dpoly},@var{dpolyarray},@var{fullreduce},@var{mod})
 \JP :: $BJ,;6I=8=B?9`<0$N@55,7A$r5a$a$k(B. ($B7k2L$ODj?tG\$5$l$F$$$k2DG=@-$"$j(B)  \JP :: $BJ,;6I=8=B?9`<0$N@55,7A$r5a$a$k(B. ($B7k2L$ODj?tG\$5$l$F$$$k2DG=@-$"$j(B)
   
 \BEG  \BEG
Line 2539  is returned in such a list as @code{[numerator, denomi
Line 3082  is returned in such a list as @code{[numerator, denomi
 @item  @item
 $BJ,;6I=8=B?9`<0(B @var{dpoly} $B$N@55,7A$r5a$a$k(B.  $BJ,;6I=8=B?9`<0(B @var{dpoly} $B$N@55,7A$r5a$a$k(B.
 @item  @item
   $BL>A0$K(B weyl $B$r4^$`4X?t$O%o%$%kBe?t$K$*$1$k@55,7A7W;;$r9T$&(B. $B0J2<$N@bL@$O(B weyl $B$r4^$`$b$N$KBP$7$F$bF1MM$K@.N)$9$k(B.
   @item
 @code{dp_nf_mod()}, @code{dp_true_nf_mod()} $B$NF~NO$O(B, @code{dp_mod()} $B$J$I(B  @code{dp_nf_mod()}, @code{dp_true_nf_mod()} $B$NF~NO$O(B, @code{dp_mod()} $B$J$I(B
 $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.  $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.
 @item  @item
Line 2571  is returned in such a list as @code{[numerator, denomi
Line 3116  is returned in such a list as @code{[numerator, denomi
 @item  @item
 Computes the normal form of a distributed polynomial.  Computes the normal form of a distributed polynomial.
 @item  @item
   Functions whose name contain @code{weyl} compute normal forms in Weyl algebra. The description below also applies to
   the functions for Weyl algebra.
   @item
 @code{dp_nf_mod()} and @code{dp_true_nf_mod()} require  @code{dp_nf_mod()} and @code{dp_true_nf_mod()} require
 distributed polynomials with coefficients in a finite field as arguments.  distributed polynomials with coefficients in a finite field as arguments.
 @item  @item
Line 2616  For single computation @code{p_nf} and @code{p_true_nf
Line 3164  For single computation @code{p_nf} and @code{p_true_nf
 [74] DP2=newvect(length(G),map(dp_ptod,G,V))$  [74] DP2=newvect(length(G),map(dp_ptod,G,V))$
 [75] T=dp_ptod((u0-u1+u2-u3+u4)^2,V)$  [75] T=dp_ptod((u0-u1+u2-u3+u4)^2,V)$
 [76] dp_dtop(dp_nf([0,1,2,3,4],T,DP1,1),V);  [76] dp_dtop(dp_nf([0,1,2,3,4],T,DP1,1),V);
 u4^2+(6*u3+2*u2+6*u1-2)*u4+9*u3^2+(6*u2+18*u1-6)*u3+u2^2+(6*u1-2)*u2+9*u1^2-6*u1+1  u4^2+(6*u3+2*u2+6*u1-2)*u4+9*u3^2+(6*u2+18*u1-6)*u3+u2^2
   +(6*u1-2)*u2+9*u1^2-6*u1+1
 [77] dp_dtop(dp_nf([4,3,2,1,0],T,DP1,1),V);  [77] dp_dtop(dp_nf([4,3,2,1,0],T,DP1,1),V);
 -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  -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
 [78] dp_dtop(dp_nf([0,1,2,3,4],T,DP2,1),V);  [78] dp_dtop(dp_nf([0,1,2,3,4],T,DP2,1),V);
 -1138087976845165778088612297273078520347097001020471455633353049221045677593  -11380879768451657780886122972730785203470970010204714556333530492210
 0005716505560062087150928400876150217079820311439477560587583488*u4^15+...  456775930005716505560062087150928400876150217079820311439477560587583
   488*u4^15+...
 [79] dp_dtop(dp_nf([4,3,2,1,0],T,DP2,1),V);  [79] dp_dtop(dp_nf([4,3,2,1,0],T,DP2,1),V);
 -1138087976845165778088612297273078520347097001020471455633353049221045677593  -11380879768451657780886122972730785203470970010204714556333530492210
 0005716505560062087150928400876150217079820311439477560587583488*u4^15+...  456775930005716505560062087150928400876150217079820311439477560587583
   488*u4^15+...
 [80] @@78==@@79;  [80] @@78==@@79;
 1  1
 @end example  @end example
Line 2790  selection strategy of critical pairs in Groebner basis
Line 3341  selection strategy of critical pairs in Groebner basis
 @item return  @item return
 \JP $BJ,;6I=8=B?9`<0(B  \JP $BJ,;6I=8=B?9`<0(B
 \EG distributed polynomial  \EG distributed polynomial
 @item dpoly1, dpoly2  @item dpoly1  dpoly2
 \JP $BJ,;6I=8=B?9`<0(B  \JP $BJ,;6I=8=B?9`<0(B
 \EG distributed polynomial  \EG distributed polynomial
 @end table  @end table
Line 2833  two polynomials, where coefficient is always set to 1.
Line 3384  two polynomials, where coefficient is always set to 1.
 @item return  @item return
 \JP $B@0?t(B  \JP $B@0?t(B
 \EG integer  \EG integer
 @item dpoly1, dpoly2  @item dpoly1  dpoly2
 \JP $BJ,;6I=8=B?9`<0(B  \JP $BJ,;6I=8=B?9`<0(B
 \EG distributed polynomial  \EG distributed polynomial
 @end table  @end table
Line 2888  Used for finding candidate terms at reduction of polyn
Line 3439  Used for finding candidate terms at reduction of polyn
 @item return  @item return
 \JP $BJ,;6I=8=B?9`<0(B  \JP $BJ,;6I=8=B?9`<0(B
 \EG distributed polynomial  \EG distributed polynomial
 @item dpoly1, dpoly2  @item dpoly1  dpoly2
 \JP $BJ,;6I=8=B?9`<0(B  \JP $BJ,;6I=8=B?9`<0(B
 \EG distributed polynomial  \EG distributed polynomial
 @end table  @end table
Line 3112  values of @code{dp_mag()} for intermediate basis eleme
Line 3663  values of @code{dp_mag()} for intermediate basis eleme
 @item return  @item return
 \JP $B%j%9%H(B  \JP $B%j%9%H(B
 \EG list  \EG list
 @item dpoly1, dpoly2, dpoly3  @item dpoly1  dpoly2  dpoly3
 \JP $BJ,;6I=8=B?9`<0(B  \JP $BJ,;6I=8=B?9`<0(B
 \EG distributed polynomial  \EG distributed polynomial
 @item vlist  @item vlist
Line 3136  values of @code{dp_mag()} for intermediate basis eleme
Line 3687  values of @code{dp_mag()} for intermediate basis eleme
 $B$J$i$J$$(B.  $B$J$i$J$$(B.
 @item  @item
 $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},  $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},
 $B9`(B @var{t} $B$K$h$j(B @var{a(dpoly1 + dpoly2)-bt dpoly3} $B$H$7$F7W;;$5$l$k(B.  $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.
 @item  @item
 $B7k2L$O(B, @code{[@var{a dpoly1},@var{a dpoly2 - bt dpoly3}]} $B$J$k%j%9%H$G$"$k(B.  $B7k2L$O(B, @code{[@var{a dpoly1},@var{a dpoly2 - bt dpoly3}]} $B$J$k%j%9%H$G$"$k(B.
 \E  \E
Line 3155  the divisibility of the head term of @var{dpoly2} by t
Line 3706  the divisibility of the head term of @var{dpoly2} by t
 When integral coefficients, computation is so carefully performed that  When integral coefficients, computation is so carefully performed that
 no rational operations appear in the reduction procedure.  no rational operations appear in the reduction procedure.
 It is computed for integers @var{a} and @var{b}, and a term @var{t} as:  It is computed for integers @var{a} and @var{b}, and a term @var{t} as:
 @var{a(dpoly1 + dpoly2)-bt dpoly3}.  @var{a}(@var{dpoly1} + @var{dpoly2})-@var{bt} @var{dpoly3}.
 @item  @item
 The result is a list @code{[@var{a dpoly1},@var{a dpoly2 - bt dpoly3}]}.  The result is a list @code{[@var{a dpoly1},@var{a dpoly2 - bt dpoly3}]}.
 \E  \E
Line 3169  The result is a list @code{[@var{a dpoly1},@var{a dpol
Line 3720  The result is a list @code{[@var{a dpoly1},@var{a dpol
 [159] C=12*<<1,1,1,0,0>>+(1)*<<0,1,1,1,0>>+(1)*<<1,1,0,0,1>>;  [159] C=12*<<1,1,1,0,0>>+(1)*<<0,1,1,1,0>>+(1)*<<1,1,0,0,1>>;
 (12)*<<1,1,1,0,0>>+(1)*<<0,1,1,1,0>>+(1)*<<1,1,0,0,1>>  (12)*<<1,1,1,0,0>>+(1)*<<0,1,1,1,0>>+(1)*<<1,1,0,0,1>>
 [160] dp_red(D,R,C);  [160] dp_red(D,R,C);
 [(6)*<<2,1,0,0,0>>+(6)*<<1,2,0,0,0>>+(2)*<<0,3,0,0,0>>,(-1)*<<0,1,1,1,0>>  [(6)*<<2,1,0,0,0>>+(6)*<<1,2,0,0,0>>+(2)*<<0,3,0,0,0>>,
 +(-1)*<<1,1,0,0,1>>]  (-1)*<<0,1,1,1,0>>+(-1)*<<1,1,0,0,1>>]
 @end example  @end example
   
 @table @t  @table @t
Line 3196  The result is a list @code{[@var{a dpoly1},@var{a dpol
Line 3747  The result is a list @code{[@var{a dpoly1},@var{a dpol
 @item return  @item return
 \JP $BJ,;6I=8=B?9`<0(B  \JP $BJ,;6I=8=B?9`<0(B
 \EG distributed polynomial  \EG distributed polynomial
 @item dpoly1, dpoly2  @item dpoly1  dpoly2
 \JP $BJ,;6I=8=B?9`<0(B  \JP $BJ,;6I=8=B?9`<0(B
 \EG distributed polynomial  \EG distributed polynomial
 @item mod  @item mod
Line 3272  as a form of @code{[numerator, denominator]})
Line 3823  as a form of @code{[numerator, denominator]})
 @item poly  @item poly
 \JP $BB?9`<0(B  \JP $BB?9`<0(B
 \EG polynomial  \EG polynomial
 @item plist,vlist  @item plist vlist
 \JP $B%j%9%H(B  \JP $B%j%9%H(B
 \EG list  \EG list
 @item order  @item order
Line 3408  exists.
Line 3959  exists.
 @example  @example
 [233] G=gr(katsura(5),[u5,u4,u3,u2,u1,u0],2)$  [233] G=gr(katsura(5),[u5,u4,u3,u2,u1,u0],2)$
 [234] p_terms(G[0],[u5,u4,u3,u2,u1,u0],2);  [234] p_terms(G[0],[u5,u4,u3,u2,u1,u0],2);
 [u5,u0^31,u0^30,u0^29,u0^28,u0^27,u0^26,u0^25,u0^24,u0^23,u0^22,u0^21,u0^20,  [u5,u0^31,u0^30,u0^29,u0^28,u0^27,u0^26,u0^25,u0^24,u0^23,u0^22,
 u0^19,u0^18,u0^17,u0^16,u0^15,u0^14,u0^13,u0^12,u0^11,u0^10,u0^9,u0^8,u0^7,  u0^21,u0^20,u0^19,u0^18,u0^17,u0^16,u0^15,u0^14,u0^13,u0^12,u0^11,
 u0^6,u0^5,u0^4,u0^3,u0^2,u0,1]  u0^10,u0^9,u0^8,u0^7,u0^6,u0^5,u0^4,u0^3,u0^2,u0,1]
 @end example  @end example
   
 \JP @node gb_comp,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B  \JP @node gb_comp,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
Line 3427  u0^6,u0^5,u0^4,u0^3,u0^2,u0,1]
Line 3978  u0^6,u0^5,u0^4,u0^3,u0^2,u0,1]
 @table @var  @table @var
 \JP @item return 0 $B$^$?$O(B 1  \JP @item return 0 $B$^$?$O(B 1
 \EG @item return 0 or 1  \EG @item return 0 or 1
 @item plist1, plist2  @item plist1  plist2
 @end table  @end table
   
 @itemize @bullet  @itemize @bullet
Line 3518  Polynomial set @code{cyclic} is sometimes called by ot
Line 4069  Polynomial set @code{cyclic} is sometimes called by ot
 [79] load("cyclic")$  [79] load("cyclic")$
 [89] katsura(5);  [89] katsura(5);
 [u0+2*u4+2*u3+2*u2+2*u1+2*u5-1,2*u4*u0-u4+2*u1*u3+u2^2+2*u5*u1,  [u0+2*u4+2*u3+2*u2+2*u1+2*u5-1,2*u4*u0-u4+2*u1*u3+u2^2+2*u5*u1,
 2*u3*u0+2*u1*u4-u3+(2*u1+2*u5)*u2,2*u2*u0+2*u2*u4+(2*u1+2*u5)*u3-u2+u1^2,  2*u3*u0+2*u1*u4-u3+(2*u1+2*u5)*u2,2*u2*u0+2*u2*u4+(2*u1+2*u5)*u3
 2*u1*u0+(2*u3+2*u5)*u4+2*u2*u3+2*u1*u2-u1,  -u2+u1^2,2*u1*u0+(2*u3+2*u5)*u4+2*u2*u3+2*u1*u2-u1,
 u0^2-u0+2*u4^2+2*u3^2+2*u2^2+2*u1^2+2*u5^2]  u0^2-u0+2*u4^2+2*u3^2+2*u2^2+2*u1^2+2*u5^2]
 [90] hkatsura(5);  [90] hkatsura(5);
 [-t+u0+2*u4+2*u3+2*u2+2*u1+2*u5,  [-t+u0+2*u4+2*u3+2*u2+2*u1+2*u5,
Line 3545  u0^2-u0+2*u4^2+2*u3^2+2*u2^2+2*u1^2+2*u5^2]
Line 4096  u0^2-u0+2*u4^2+2*u3^2+2*u2^2+2*u1^2+2*u5^2]
 \JP @item $B;2>H(B  \JP @item $B;2>H(B
 \EG @item References  \EG @item References
 @fref{dp_dtop}.  @fref{dp_dtop}.
   @end table
   
   \JP @node primadec primedec,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
   \EG @node primadec primedec,,, Functions for Groebner basis computation
   @subsection @code{primadec}, @code{primedec}
   @findex primadec
   @findex primedec
   
   @table @t
   @item primadec(@var{plist},@var{vlist})
   @item primedec(@var{plist},@var{vlist})
   \JP :: $B%$%G%"%k$NJ,2r(B
   \EG :: Computes decompositions of ideals.
   @end table
   
   @table @var
   @item return
   @itemx plist
   \JP $BB?9`<0%j%9%H(B
   \EG list of polynomials
   @item vlist
   \JP $BJQ?t%j%9%H(B
   \EG list of variables
   @end table
   
   @itemize @bullet
   \BJP
   @item
   @code{primadec()}, @code{primedec} $B$O(B @samp{primdec} $B$GDj5A$5$l$F$$$k(B.
   @item
   @code{primadec()}, @code{primedec()} $B$O$=$l$>$lM-M}?tBN>e$G$N%$%G%"%k$N(B
   $B=`AGJ,2r(B, $B:,4p$NAG%$%G%"%kJ,2r$r9T$&(B.
   @item
   $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.
   @item
   @code{primadec} $B$O(B @code{[$B=`AG@.J,(B, $BIUB0AG%$%G%"%k(B]} $B$N%j%9%H$rJV$9(B.
   @item
   @code{primadec} $B$O(B $BAG0x;R$N%j%9%H$rJV$9(B.
   @item
   $B7k2L$K$*$$$F(B, $BB?9`<0%j%9%H$H$7$FI=<($5$l$F$$$k3F%$%G%"%k$OA4$F(B
   $B%0%l%V%J4pDl$G$"$k(B. $BBP1~$9$k9`=g=x$O(B, $B$=$l$>$l(B
   $BJQ?t(B @code{PRIMAORD}, @code{PRIMEORD} $B$K3JG<$5$l$F$$$k(B.
   @item
   @code{primadec} $B$O(B @code{[Shimoyama,Yokoyama]} $B$N=`AGJ,2r%"%k%4%j%:%`(B
   $B$r<BAu$7$F$$$k(B.
   @item
   $B$b$7AG0x;R$N$_$r5a$a$?$$$J$i(B, @code{primedec} $B$r;H$&J}$,$h$$(B.
   $B$3$l$O(B, $BF~NO%$%G%"%k$,:,4p%$%G%"%k$G$J$$>l9g$K(B, @code{primadec}
   $B$N7W;;$KM>J,$J%3%9%H$,I,MW$H$J$k>l9g$,$"$k$+$i$G$"$k(B.
   \E
   \BEG
   @item
   Function @code{primadec()} and @code{primedec} are defined in @samp{primdec}.
   @item
   @code{primadec()}, @code{primedec()} are the function for primary
   ideal decomposition and prime decomposition of the radical over the
   rationals respectively.
   @item
   The arguments are a list of polynomials and a list of variables.
   These functions accept ideals with rational function coefficients only.
   @item
   @code{primadec} returns the list of pair lists consisting a primary component
   and its associated prime.
   @item
   @code{primedec} returns the list of prime components.
   @item
   Each component is a Groebner basis and the corresponding term order
   is indicated by the global variables @code{PRIMAORD}, @code{PRIMEORD}
   respectively.
   @item
   @code{primadec} implements the primary decompostion algorithm
   in @code{[Shimoyama,Yokoyama]}.
   @item
   If one only wants to know the prime components of an ideal, then
   use @code{primedec} because @code{primadec} may need additional costs
   if an input ideal is not radical.
   \E
   @end itemize
   
   @example
   [84] load("primdec")$
   [102] primedec([p*q*x-q^2*y^2+q^2*y,-p^2*x^2+p^2*x+p*q*y,
   (q^3*y^4-2*q^3*y^3+q^3*y^2)*x-q^3*y^4+q^3*y^3,
   -q^3*y^4+2*q^3*y^3+(-q^3+p*q^2)*y^2],[p,q,x,y]);
   [[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]]
   [103] primadec([x,z*y,w*y^2,w^2*y-z^3,y^3],[x,y,z,w]);
   [[[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]]]
   @end example
   
   @table @t
   \JP @item $B;2>H(B
   \EG @item References
   @fref{fctr sqfr},
   \JP @fref{$B9`=g=x$N@_Dj(B}.
   \EG @fref{Setting term orderings}.
   @end table
   
   \JP @node primedec_mod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
   \EG @node primedec_mod,,, Functions for Groebner basis computation
   @subsection @code{primedec_mod}
   @findex primedec_mod
   
   @table @t
   @item primedec_mod(@var{plist},@var{vlist},@var{ord},@var{mod},@var{strategy})
   \JP :: $B%$%G%"%k$NJ,2r(B
   \EG :: Computes decompositions of ideals over small finite fields.
   @end table
   
   @table @var
   @item return
   @itemx plist
   \JP $BB?9`<0%j%9%H(B
   \EG list of polynomials
   @item vlist
   \JP $BJQ?t%j%9%H(B
   \EG list of variables
   @item ord
   \JP $B?t(B, $B%j%9%H$^$?$O9TNs(B
   \EG number, list or matrix
   @item mod
   \JP $B@5@0?t(B
   \EG positive integer
   @item strategy
   \JP $B@0?t(B
   \EG integer
   @end table
   
   @itemize @bullet
   \BJP
   @item
   @code{primedec_mod()} $B$O(B @samp{primdec_mod}
   $B$GDj5A$5$l$F$$$k(B. @code{[Yokoyama]} $B$NAG%$%G%"%kJ,2r%"%k%4%j%:%`(B
   $B$r<BAu$7$F$$$k(B.
   @item
   @code{primedec_mod()} $B$OM-8BBN>e$G$N%$%G%"%k$N(B
   $B:,4p$NAG%$%G%"%kJ,2r$r9T$$(B, $BAG%$%G%"%k$N%j%9%H$rJV$9(B.
   @item
   @code{primedec_mod()} $B$O(B, GF(@var{mod}) $B>e$G$NJ,2r$rM?$($k(B.
   $B7k2L$N3F@.J,$N@8@.85$O(B, $B@0?t78?tB?9`<0$G$"$k(B.
   @item
   $B7k2L$K$*$$$F(B, $BB?9`<0%j%9%H$H$7$FI=<($5$l$F$$$k3F%$%G%"%k$OA4$F(B
   [@var{vlist},@var{ord}] $B$G;XDj$5$l$k9`=g=x$K4X$9$k%0%l%V%J4pDl$G$"$k(B.
   @item
   @var{strategy} $B$,(B 0 $B$G$J$$$H$-(B, incremental $B$K(B component $B$N6&DL(B
   $BItJ,$r7W;;$9$k$3$H$K$h$k(B early termination $B$r9T$&(B. $B0lHL$K(B,
   $B%$%G%"%k$N<!85$,9b$$>l9g$KM-8z$@$,(B, 0 $B<!85$N>l9g$J$I(B, $B<!85$,>.$5$$(B
   $B>l9g$K$O(B overhead $B$,Bg$-$$>l9g$,$"$k(B.
   @item
   $B7W;;ESCf$GFbIt>pJs$r8+$?$$>l9g$K$O!"(B
   $BA0$b$C$F(B @code{dp_gr_print(2)} $B$r<B9T$7$F$*$1$P$h$$(B.
   \E
   \BEG
   @item
   Function @code{primedec_mod()}
   is defined in @samp{primdec_mod} and implements the prime decomposition
   algorithm in @code{[Yokoyama]}.
   @item
   @code{primedec_mod()}
   is the function for prime ideal decomposition
   of the radical of a polynomial ideal over small finite field,
   and they return a list of prime ideals, which are associated primes
   of the input ideal.
   @item
   @code{primedec_mod()} gives the decomposition over GF(@var{mod}).
   The generators of each resulting component consists of integral polynomials.
   @item
   Each resulting component is a Groebner basis with respect to
   a term order specified by [@var{vlist},@var{ord}].
   @item
   If @var{strategy} is non zero, then the early termination strategy
   is tried by computing the intersection of obtained components
   incrementally. In general, this strategy is useful when the krull
   dimension of the ideal is high, but it may add some overhead
   if the dimension is small.
   @item
   If you want to see internal information during the computation,
   execute @code{dp_gr_print(2)} in advance.
   \E
   @end itemize
   
   @example
   [0] load("primdec_mod")$
   [246] PP444=[x^8+x^2+t,y^8+y^2+t,z^8+z^2+t]$
   [247] primedec_mod(PP444,[x,y,z,t],0,2,1);
   [[y+z,x+z,z^8+z^2+t],[x+y,y^2+y+z^2+z+1,z^8+z^2+t],
   [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],
   [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],
   [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],
   [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]]
   [248]
   @end example
   
   @table @t
   \JP @item $B;2>H(B
   \EG @item References
   @fref{modfctr},
   @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},
   \JP @fref{$B9`=g=x$N@_Dj(B}.
   \EG @fref{Setting term orderings},
   @fref{dp_gr_flags dp_gr_print}.
   @end table
   
   \JP @node bfunction bfct generic_bfct ann ann0,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B
   \EG @node bfunction bfct generic_bfct ann ann0,,, Functions for Groebner basis computation
   @subsection @code{bfunction}, @code{bfct}, @code{generic_bfct}, @code{ann}, @code{ann0}
   @findex bfunction
   @findex bfct
   @findex generic_bfct
   @findex ann
   @findex ann0
   
   @table @t
   @item bfunction(@var{f})
   @itemx bfct(@var{f})
   @itemx generic_bfct(@var{plist},@var{vlist},@var{dvlist},@var{weight})
   \JP :: @var{b} $B4X?t$N7W;;(B
   \EG :: Computes the global @var{b} function of a polynomial or an ideal
   @item ann(@var{f})
   @itemx ann0(@var{f})
   \JP :: $BB?9`<0$N%Y%-$N(B annihilator $B$N7W;;(B
   \EG :: Computes the annihilator of a power of polynomial
   @end table
   
   @table @var
   @item return
   \JP $BB?9`<0$^$?$O%j%9%H(B
   \EG polynomial or list
   @item f
   \JP $BB?9`<0(B
   \EG polynomial
   @item plist
   \JP $BB?9`<0%j%9%H(B
   \EG list of polynomials
   @item vlist dvlist
   \JP $BJQ?t%j%9%H(B
   \EG list of variables
   @end table
   
   @itemize @bullet
   \BJP
   @item @samp{bfct} $B$GDj5A$5$l$F$$$k(B.
   @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
   $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]}
   $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
   $BB?9`<0(B @code{b(s)} $B$NCf$G(B, $B<!?t$,:G$bDc$$$b$N$G$"$k(B.
   @item @code{generic_bfct(@var{f},@var{vlist},@var{dvlist},@var{weight})}
   $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,
   $B%&%'%$%H(B @var{weight} $B$K4X$9$k(B global @var{b} $B4X?t$r7W;;$9$k(B.
   @var{vlist} $B$O(B @code{x}-$BJQ?t(B, @var{vlist} $B$OBP1~$9$k(B @code{D}-$BJQ?t(B
   $B$r=g$KJB$Y$k(B.
   @item @code{bfunction} $B$H(B @code{bfct} $B$G$OMQ$$$F$$$k%"%k%4%j%:%`$,(B
   $B0[$J$k(B. $B$I$A$i$,9bB.$+$OF~NO$K$h$k(B.
   @item @code{ann(@var{f})} $B$O(B, @code{@var{f}^s} $B$N(B annihilator ideal
   $B$N@8@.7O$rJV$9(B. @code{ann(@var{f})} $B$O(B, @code{[@var{a},@var{list}]}
   $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,
   @var{list} $B$O(B @code{ann(@var{f})} $B$N7k2L$N(B @code{s}$ $B$K(B, @var{a} $B$r(B
   $BBeF~$7$?$b$N$G$"$k(B.
   @item $B>\:Y$K$D$$$F$O(B, [Saito,Sturmfels,Takayama] $B$r8+$h(B.
   \E
   \BEG
   @item These functions are defined in @samp{bfct}.
   @item @code{bfunction(@var{f})} and @code{bfct(@var{f})} compute the global @var{b}-function @code{b(s)} of
   a polynomial @var{f}.
   @code{b(s)} is a polynomial of the minimal degree
   such that there exists @code{P(x,s)} in D[s], which is a polynomial
   ring over Weyl algebra @code{D}, and @code{P(x,s)f^(s+1)=b(s)f^s} holds.
   @item @code{generic_bfct(@var{f},@var{vlist},@var{dvlist},@var{weight})}
   computes the global @var{b}-function of a left ideal @code{I} in @code{D}
   generated by @var{plist}, with respect to @var{weight}.
   @var{vlist} is the list of @code{x}-variables,
   @var{vlist} is the list of corresponding @code{D}-variables.
   @item @code{bfunction(@var{f})} and @code{bfct(@var{f})} implement
   different algorithms and the efficiency depends on inputs.
   @item @code{ann(@var{f})} returns the generator set of the annihilator
   ideal of @code{@var{f}^s}.
   @code{ann(@var{f})} returns a list @code{[@var{a},@var{list}]},
   where @var{a} is the minimal integral root of the global @var{b}-function
   of @var{f}, and @var{list} is a list of polynomials obtained by
   substituting @code{s} in @code{ann(@var{f})} with @var{a}.
   @item See [Saito,Sturmfels,Takayama] for the details.
   \E
   @end itemize
   
   @example
   [0] load("bfct")$
   [216] bfunction(x^3+y^3+z^3+x^2*y^2*z^2+x*y*z);
   -9*s^5-63*s^4-173*s^3-233*s^2-154*s-40
   [217] fctr(@@);
   [[-1,1],[s+2,1],[3*s+4,1],[3*s+5,1],[s+1,2]]
   [218] F = [4*x^3*dt+y*z*dt+dx,x*z*dt+4*y^3*dt+dy,
   x*y*dt+5*z^4*dt+dz,-x^4-z*y*x-y^4-z^5+t]$
   [219] generic_bfct(F,[t,z,y,x],[dt,dz,dy,dx],[1,0,0,0]);
   20000*s^10-70000*s^9+101750*s^8-79375*s^7+35768*s^6-9277*s^5
   +1278*s^4-72*s^3
   [220] P=x^3-y^2$
   [221] ann(P);
   [2*dy*x+3*dx*y^2,-3*dx*x-2*dy*y+6*s]
   [222] ann0(P);
   [-1,[2*dy*x+3*dx*y^2,-3*dx*x-2*dy*y-6]]
   @end example
   
   @table @t
   \JP @item $B;2>H(B
   \EG @item References
   \JP @fref{Weyl $BBe?t(B}.
   \EG @fref{Weyl algebra}.
 @end table  @end table
   

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.18

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