=================================================================== RCS file: /home/cvs/OpenXM/src/asir-doc/parts/groebner.texi,v retrieving revision 1.5 retrieving revision 1.23 diff -u -p -r1.5 -r1.23 --- OpenXM/src/asir-doc/parts/groebner.texi 2003/04/20 08:01:25 1.5 +++ OpenXM/src/asir-doc/parts/groebner.texi 2019/09/13 09:31:00 1.23 @@ -1,4 +1,4 @@ -@comment $OpenXM: OpenXM/src/asir-doc/parts/groebner.texi,v 1.4 2003/04/19 15:44:56 noro Exp $ +@comment $OpenXM: OpenXM/src/asir-doc/parts/groebner.texi,v 1.22 2019/03/29 04:54:25 noro Exp $ \BJP @node $B%0%l%V%J4pDl$N7W;;(B,,, Top @chapter $B%0%l%V%J4pDl$N7W;;(B @@ -15,9 +15,11 @@ * $B4pK\E*$JH!?t(B:: * $B7W;;$*$h$SI=<($N@)8f(B:: * $B9`=g=x$N@_Dj(B:: +* Weight:: * $BM-M}<0$r78?t$H$9$k%0%l%V%J4pDl7W;;(B:: * $B4pDlJQ49(B:: * Weyl $BBe?t(B:: +* $BB?9`<04D>e$N2C72(B:: * $B%0%l%V%J4pDl$K4X$9$kH!?t(B:: \E \BEG @@ -26,9 +28,11 @@ * Fundamental functions:: * Controlling Groebner basis computations:: * Setting term orderings:: +* Weight:: * Groebner basis computation with rational function coefficients:: * Change of ordering:: * Weyl algebra:: +* Module over a polynomial ring:: * Functions for Groebner basis computation:: \E @end menu @@ -199,16 +203,16 @@ In an @b{Asir} session, it is displayed in the form li \EG and also can be input in such a form. \BJP -@itemx $BF,C19`<0(B (head monomial) @item $BF,9`(B (head term) +@itemx $BF,C19`<0(B (head monomial) @itemx $BF,78?t(B (head coefficient) $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 $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 $B$H8F$V(B. \E \BEG -@itemx head monomial @item head term +@itemx head monomial @itemx head coefficient Monomials in a distributed polynomial is sorted by a total order. @@ -218,7 +222,45 @@ the head term and the head coefficient respectively. \E @end table +@noindent +ChangeLog +@itemize @bullet \BJP +@item $BJ,;6I=8=B?9`<0$OG$0U$N%*%V%8%'%/%H$r78?t$K$b$F$k$h$&$K$J$C$?(B. +$B$^$?2C72$N(Bk$B@.J,$NMWAG$r> $B$GI=8=$9$k$h$&$K$J$C$?(B (2017-08-31). +\E +\BEG +@item Distributed polynomials accept objects as coefficients. +The k-th element of a free module is expressed as <> (2017-08-31). +\E +@item +1.15 algnum.c, +1.53 ctrl.c, +1.66 dp-supp.c, +1.105 dp.c, +1.73 gr.c, +1.4 reduct.c, +1.16 _distm.c, +1.17 dalg.c, +1.52 dist.c, +1.20 distm.c, +1.8 gmpq.c, +1.238 engine/nd.c, +1.102 ca.h, +1.411 version.h, +1.28 cpexpr.c, +1.42 pexpr.c, +1.20 pexpr_body.c, +1.40 spexpr.c, +1.27 arith.c, +1.77 eval.c, +1.56 parse.h, +1.37 parse.y, +1.8 stdio.c, +1.31 plotf.c +@end itemize + +\BJP @node $B%U%!%$%k$NFI$_9~$_(B,,, $B%0%l%V%J4pDl$N7W;;(B @section $B%U%!%$%k$NFI$_9~$_(B \E @@ -449,6 +491,13 @@ If `on', various informations during a Groebner basis displayed. \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 \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 @@ -471,24 +520,28 @@ is shown after every normal computation. After comlet computation the maximal value among the sums is shown. \E -@item Multiple +@item Content +@itemx Multiple \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 -@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 -$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 -GCD $B7W;;$,9T$o$l0lHL$K$O8zN($,0-$/$J$k$,(B, @code{Multiple} $B$r(B 2 $BDxEY(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{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{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{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. +backward compatibility $B$N$?$a!"(B@code{Multiple} $B$G@0?tCM$r;XDj$G$-$k(B. \E \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 -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 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. -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. +An integer value can be set by the keyword @code{Multiple} for +backward compatibility. \E @item Demand @@ -1044,6 +1097,139 @@ beforehand, and some heuristic trial may be inevitable \E \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$l(B 1,2,3 $B$H;XDj$7$F$$$k(B. $B$3$N$?$a(B, @code{<<1,1,1>>} +$B$NA4l9g$,$"$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$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, $Bl9g$K$O(B, +tie breaker $B$H$7$FA4o$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$Ke$N(B @code{n} $B} $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} 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{<>} $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 +$Bh;;$O(B, $BHs2D49@-$r9MN8$7$F(B @code{dp_weyl_mul()} $B$H$$$&4X?t(B +$B$K$h$j>} 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, +$Be$N2C72(B,,, $B%0%l%V%J4pDl$N7W;;(B +@section $BB?9`<04D>e$N2C72(B +\E +\BEG +@node Module over a polynomial ring,,, Groebner basis computation +@section Module over a polynomial ring +\E + +@noindent + +\BJP +$BB?9`<04D>e$N<+M32C72$N85$O(B, $B2C72C19`<0(B te_i $B$N@~7?OB$H$7$FFbItI=8=$5$l$k(B. +$B$3$3$G(B t $B$OB?9`<04D$NC19`<0(B, e_i $B$O<+M32C72$NI8=`4pDl$G$"$k(B. $B2C72C19`<0$O(B, $BB?9`<04D$NC19`<0(B +$B$K0LCV(B i $B$rDI2C$7$?(B @code{<>} $B$GI=$9(B. $B2C72B?9`<0(B, $B$9$J$o$A2C72C19`<0$N@~7?OB$O(B, +$B@_Dj$5$l$F$$$k2C729`=g=x$K$7$?$,$C$F9_=g$K@0Ns$5$l$k(B. $B2C729`=g=x$K$O0J2<$N(B3$B se_j $B$H$J$k$N$O(B t>s $B$^$?$O(B (t=s $B$+$D(B i se_j $B$H$J$k$N$O(B is) $B$H$J$k$h$&$J9`=g=x$G$"$k(B. $B$3$3$G(B, +t, s $B$NHf3S$OB?9`<04D$K@_Dj$5$l$F$$$k=g=x$G9T$&(B. +$B$3$N7?$N=g=x$O(B, @code{dp_ord([1,Ord])} $B$K(B +$B$h$j@_Dj$9$k(B. $B$3$3$G(B, @code{Ord} $B$OB?9`<04D$N=g=x7?$G$"$k(B. + +@item Schreyer $B7?=g=x(B + +$B3FI8=`4pDl(B e_i $B$KBP$7(B, $BJL$N<+M32C72$N2C72C19`<0(B T_i $B$,M?$($i$l$F$$$F(B, te_i > se_j $B$H$J$k$N$O(B +tT_i > sT_j $B$^$?$O(B (tT_i=sT_j $B$+$D(B io:F5"E*$K@_Dj$5$l$k(B. $B$9$J$o$A(B, T_i $B$,=jB0$9$k<+M32C72$N=g=x$b(B Schreyer $B7?(B +$B$G$"$k$+(B, $B$^$?$O%\%H%`$H$J$k(B TOP, POT $B$J$I$N9`=g=x$H$J$k(B. +$B$3$N7?$N=g=x$O(B @code{dpm_set_schreyer([H_1,H_2,...])} $B$K$h$j;XDj$9$k(B. $B$3$3$G(B, +@code{H_i=[T_1,T_2,...]} $B$O2C72C19`<0$N%j%9%H$G(B, @code{[H_2,...]} $B$GDj5A$5$l$k(B Schreyer $B7?9`=g=x$r(B +@code{tT_i} $B$i$KE,MQ$9$k$H$$$&0UL#$G$"$k(B. +@end table + +$B2C72B?9`<0$rF~NO$9$kJ}K!$H$7$F$O(B, @code{<>} $B$J$k7A<0$GD>@\F~NO$9$kB>$K(B, +$BB?9`<0%j%9%H$r:n$j(B, @code{dpm_ltod()} $B$K$h$jJQ49$9$kJ}K!$b$"$k(B. +\E +\BEG +not yet +\E + +\BJP @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 \E @@ -1217,17 +1553,21 @@ Refer to the sections for each functions. * lex_hensel_gsl tolex_gsl tolex_gsl_d:: * gr_minipoly minipoly:: * tolexm minipolym:: -* dp_gr_main dp_gr_mod_main dp_gr_f_main:: -* dp_f4_main dp_f4_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_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:: +* nd_gr_postproc nd_weyl_gr_postproc:: * dp_gr_flags dp_gr_print:: * dp_ord:: +* dp_set_weight dp_set_top_weight dp_weyl_set_weight:: * dp_ptod:: * dp_dtop:: * dp_mod dp_rat:: * dp_homo dp_dehomo:: * 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:: +* dpm_hm dpm_ht dpm_hc dpm_hp dpm_rest:: * dp_td dp_sugar:: * dp_lcm:: * dp_redble:: @@ -1244,6 +1584,7 @@ Refer to the sections for each functions. * lex_hensel_gsl tolex_gsl tolex_gsl_d:: * primadec primedec:: * primedec_mod:: +* bfunction bfct generic_bfct ann ann0:: @end menu \JP @node gr hgr gr_mod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B @@ -1283,6 +1624,8 @@ Refer to the sections for each functions. @item $BI8=`%i%$%V%i%j$N(B @samp{gr} $B$GDj5A$5$l$F$$$k(B. @item +gr $B$rL>A0$K4^$`4X?t$O8=:_%a%s%F$5$l$F$$$J$$(B. @code{nd_gr}$B7O$N4X?t$rBe$o$j$KMxMQ$9$Y$-$G$"$k(B(@fref{nd_gr nd_gr_trace nd_f4 nd_f4_trace nd_weyl_gr nd_weyl_gr_trace}). +@item $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 @var{order} $B$K4X$9$k%0%l%V%J4pDl$r5a$a$k(B. @code{gr()}, @code{hgr()} $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. @@ -1294,18 +1637,29 @@ Refer to the sections for each functions. strategy $B$K$h$k7W;;(B, @code{hgr()} $B$O(B trace-lifting $B$*$h$S(B $B@Fl9g$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 \BEG @item These functions are defined in @samp{gr} in the standard library directory. +@item +Functions of which names contains gr are obsolted. +Functions of @code{nd_gr} families should be used (@fref{nd_gr nd_gr_trace nd_f4 nd_f4_trace nd_weyl_gr nd_weyl_gr_trace}). @item They compute a Groebner basis of a polynomial list @var{plist} with respect to the variable order @var{vlist} and the order type @var{order}. @@ -1329,6 +1683,13 @@ Therefore this function is useful to reduce the actual 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 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 @end itemize @@ -1346,8 +1707,7 @@ for communication. @table @t \JP @item $B;2>H(B \EG @item References -@comment @fref{dp_gr_main dp_gr_mod_main dp_gr_f_main}, -@fref{dp_gr_main dp_gr_mod_main dp_gr_f_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_ord}. @end table @@ -1564,7 +1924,7 @@ processes. @table @t \JP @item $B;2>H(B \EG @item References -@fref{dp_gr_main dp_gr_mod_main dp_gr_f_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} \EG @fref{dp_ord}, @fref{Distributed computation} @end table @@ -1580,8 +1940,8 @@ processes. @item lex_hensel_gsl(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{homo}) \JP :: GSL $B7A<0$N%$%G%"%k4pDl$N7W;;(B \EG ::Computation of an GSL form ideal basis -@item tolex_gsl(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{homo}) -@itemx tolex_gsl_d(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{homo},@var{procs}) +@item tolex_gsl(@var{plist},@var{vlist1},@var{order},@var{vlist2}) +@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 \EG :: Computation of an GSL form ideal basis stating from a Groebner basis @end table @@ -1842,17 +2202,23 @@ z^32+11405*z^31+20868*z^30+21602*z^29+... @fref{gr_minipoly minipoly}. @end table -\JP @node dp_gr_main dp_gr_mod_main dp_gr_f_main,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B -\EG @node dp_gr_main dp_gr_mod_main dp_gr_f_main,,, Functions for Groebner basis computation -@subsection @code{dp_gr_main}, @code{dp_gr_mod_main}, @code{dp_gr_f_main} +\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 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}, @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_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 @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_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) \EG :: Groebner basis computation (built-in functions) @end table @@ -1880,9 +2246,10 @@ z^32+11405*z^31+20868*z^30+21602*z^29+... @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()}, @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 -@code{dp_gr_f_main()} $B$O(B, $Be$N%0%l%V%J4pDl$r7W;;$9$k(B +@code{dp_gr_f_main()}, @code{dp_weyl_f_main()} $B$O(B, $Be$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'$5$ $B;;K!$G$"$j(B, $BK\jM>DjM}$K$h$k@~7AJ}Dx<05a2r$rMQ$$$?(B $B;n83E*$J$l(B @code{dp_gr_main()}, @code{dp_gr_mod_main()} +$B@F$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. \E \BEG @@ -2012,7 +2387,9 @@ invented by J.C. Faugere. The current implementation o uses Chinese Remainder theorem and not highly optimized. @item 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 @end itemize @@ -2026,6 +2403,234 @@ Arguments and actions are the same as those of \EG @fref{Controlling Groebner basis computations} @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}[|@var{option=value,...}]) +@itemx nd_gr_trace(@var{plist},@var{vlist},@var{homo},@var{p},@var{order}[|@var{option=value,...}]) +@itemx nd_f4(@var{plist},@var{vlist},@var{modular},@var{order}[|@var{option=value,...}]) +@itemx nd_f4_trace(@var{plist},@var{vlist},@var{homo},@var{p},@var{order}[|@var{option=value,...}]) +@itemx nd_weyl_gr(@var{plist},@var{vlist},@var{p},@var{order}[|@var{option=value,...}]) +@itemx nd_weyl_gr_trace(@var{plist},@var{vlist},@var{homo},@var{p},@var{order}[|@var{option=value,...}]) +\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?7e$N(B Buchberger +$B%"%k%4%j%:%`$re$N<+A3?t$N$H$-(B, GF(p) $B>e$N(B +Buchberger $B%"%k%4%j%:%`$re$G(B trace $B%"%k%4%j%:%`$re$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, $B3FA4e$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$=$NA4e$N(B, @code{modular} $B$,(B +$B%^%7%s%5%$%:AG?t$N$H$-M-8BBN>e$N(B F4 $B%"%k%4%j%:%`$rl9g(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. $B8el9g(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. +@item +$B0J2<$N%*%W%7%g%s$,;XDj$G$-$k(B. +@table @code +@item homo +1 $B$N$H$-(B, $B@Fl9g$K$O2C72B?9`<0(B) $B$r7k2L$H$7$FJV$9(B. +@item nora +1 $B$N$H$-(B, $B7k2L$NAj8_4JLs$r9T$o$J$$(B. +@end table +@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. +@item +The fallowing options can be specified. +@table @code +@item homo +If set to 1, the computation is done via homogenization. (only for @code{nd_gr} and @code{nd_f4}) +@item dp +If set to 1, the functions return a list of distributed polynomials (a list of +module polynomials when the input is a sub-module). +@item nora +If set to 1, the inter-reduction is not performed. +@end table +@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 nd_gr_postproc nd_weyl_gr_postproc,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node nd_gr_postproc nd_weyl_gr_postproc,,, Functions for Groebner basis computation +@subsection @code{nd_gr_postproc}, @code{nd_weyl_gr_postproc} +@findex nd_gr_postproc +@findex nd_weyl_gr_postproc + +@table @t +@item nd_gr_postproc(@var{plist},@var{vlist},@var{p},@var{order},@var{check}) +@itemx nd_weyl_gr_postproc(@var{plist},@var{vlist},@var{p},@var{order},@var{check}) +\JP :: $B%0%l%V%J4pDl8uJd$N%A%'%C%/$*$h$SAj8_4JLs(B +\EG :: Check of Groebner basis candidate and inter-reduction +@end table + +@table @var +@item return +\JP $B%j%9%H(B $B$^$?$O(B 0 +\EG list or 0 +@item plist vlist +\JP $B%j%9%H(B +\EG list +@item p +\JP $BAG?t$^$?$O(B 0 +\EG prime or 0 +@item order +\JP $B?t(B, $B%j%9%H$^$?$O9TNs(B +\EG number, list or matrix +@item check +\JP 0 $B$^$?$O(B 1 +\EG 0 or 1 +@end table + +@itemize @bullet +\BJP +@item +$B%0%l%V%J4pDl(B($B8uJd(B)$B$NAj8_4JLs$r9T$&(B. +@item +@code{nd_weyl_gr_postproc} $B$O(B Weyl $BBe?tMQ$G$"$k(B. +@item +@var{check=1} $B$N>l9g(B, @var{plist} $B$,(B, @var{vlist}, @var{p}, @var{order} $B$G;XDj$5$l$kB?9`<04D(B, $B9`=g=x$G%0%l%V%J!<4pDl$K$J$C$F$$$k$+(B +$B$N%A%'%C%/$b9T$&(B. +@item +$B@Fl9g$KMQ$$$k(B. +\E +\BEG +@item +Perform the inter-reduction for a Groebner basis (candidate). +@item +@code{nd_weyl_gr_postproc} is for Weyl algebra. +@item +If @var{check=1} then the check whether @var{plist} is a Groebner basis with respect to a term order in a polynomial ring +or Weyl algebra specified by @var{vlist}, @var{p} and @var{order}. +@item +This function is used for inter-reduction of a non-reduced Groebner basis that is obtained by dehomogenizing a Groebner basis +computed via homogenization, or Groebner basis check of a Groebner basis candidate computed by CRT. +\E +@end itemize + +@example +afo +@end example + \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 @subsection @code{dp_gr_flags}, @code{dp_gr_print} @@ -2034,7 +2639,7 @@ Arguments and actions are the same as those of @table @t @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 \BEG :: Set and show various parameters for cotrolling computations and showing informations. @@ -2048,6 +2653,9 @@ and showing informations. @item list \JP $B%j%9%H(B \EG list +@item i +\JP $B@0?t(B +\EG integer @end table @itemize @bullet @@ -2061,9 +2669,18 @@ 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 $B@_Dj$5$l$k(B. $B%Q%i%a%?L>$OJ8;zNs$GM?$($kI,MW$,$"$k(B. @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 -$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 -$BH!?t$K$*$$$F(B, @code{Print} $B$NCM$r8+$F(B, $B$=$N%5%V%k!<%A%s$,Cf4V>pJs$NI=<((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@_Dj$5$l$kCM$OpJs$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. \E \BEG @@ -2078,8 +2695,17 @@ Arguments must be specified as a list such as strings. @item @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} when a user defined function calling @code{dp_gr_main()} etc. +@code{Print} and @code{PrintShort}. +@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. \E @end itemize @@ -2135,6 +2761,12 @@ uses the value as a flag for showing intermediate info @item $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 $BJQ?t=g=x7?$r@5$7$/@_Dj$7$J$1$l$P$J$i$J$$(B. + +@item +$B0z?t$,%j%9%H$N>l9g(B, $B<+M32C72$K$*$1$k9`=g=x7?$r@_Dj$9$k(B. $B0z?t$,(B@code{[0,Ord]} $B$N>l9g(B, +$BB?9`<04D>e$G(B @code{Ord} $B$G;XDj$5$l$k9`=g=x$K4p$E$/(B TOP $B=g=x(B, $B0z?t$,(B @code{[1,Ord]} $B$N>l9g(B +OPT $B=g=x$r@_Dj$9$k(B. + \E \BEG @item @@ -2162,6 +2794,12 @@ that such polynomials were generated under the same or @item Type of term ordering must be correctly set by this function when functions other than top level functions are called directly. + +@item +If the argument is a list, then an ordering type in a free module is set. +If the argument is @code{[0,Ord]} then a TOP ordering based on the ordering type specified +by @code{Ord} is set. +If the argument is @code{[1,Ord]} then a POT ordering is set. \E @end itemize @@ -2181,6 +2819,79 @@ when functions other than top level functions are call \EG @fref{Setting term orderings} @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. $BH(B +\EG @item References +@fref{Weight} +@end table + + \JP @node dp_ptod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B \EG @node dp_ptod,,, Functions for Groebner basis computation @subsection @code{dp_ptod} @@ -2240,6 +2951,171 @@ the coefficient field. @fref{dp_ord}. @end table +\JP @node dpm_dptodpm,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dpm_dptodpm,,, Functions for Groebner basis computation +@subsection @code{dpm_dptodpm} +@findex dpm_dptodpm + +@table @t +@item dpm_dptodpm(@var{dpoly},@var{pos}) +\JP :: $BJ,;6I=8=B?9`<0$r2C72B?9`<0$KJQ49$9$k(B. +\EG :: Converts a distributed polynomial into a module polynomial. +@end table + +@table @var +@item return +\JP $B2C72B?9`<0(B +\EG module polynomial +@item dpoly +\JP $BJ,;6I=8=B?9`<0(B +\EG distributed polynomial +@item pos +\JP $B@5@0?t(B +\EG positive integer +@end table + +@itemize @bullet +\BJP +@item +$BJ,;6I=8=B?9`<0$r2C72B?9`<0$KJQ49$9$k(B. +@item +$B=PNO$O2C72B?9`<0(B @code{dpoly e_pos} $B$G$"$k(B. +\E +\BEG +@item +This function converts a distributed polynomial into a module polynomial. +@item +The output is @code{dpoly e_pos}. +\E +@end itemize + +@example +[50] dp_ord([0,0])$ +[51] D=dp_ptod((x+y+z)^2,[x,y,z]); +(1)*<<2,0,0>>+(2)*<<1,1,0>>+(1)*<<0,2,0>>+(2)*<<1,0,1>>+(2)*<<0,1,1>> ++(1)*<<0,0,2>> +[52] dp_dptodpm(D,2); +(1)*<<2,0,0:2>>+(2)*<<1,1,0:2>>+(1)*<<0,2,0:2>>+(2)*<<1,0,1:2>> ++(2)*<<0,1,1:2>>+(1)*<<0,0,2:2>> +@end example + +@table @t +\JP @item $B;2>H(B +\EG @item References +@fref{dp_ptod}, +@fref{dp_ord}. +@end table + +\JP @node dpm_ltod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dpm_ltod,,, Functions for Groebner basis computation +@subsection @code{dpm_ltod} +@findex dpm_ltod + +@table @t +@item dpm_dptodpm(@var{plist},@var{vlist}) +\JP :: $BB?9`<0%j%9%H$r2C72B?9`<0$KJQ49$9$k(B. +\EG :: Converts a list of polynomials into a module polynomial. +@end table + +@table @var +@item return +\JP $B2C72B?9`<0(B +\EG module polynomial +@item 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 +$BB?9`<0%j%9%H$r2C72B?9`<0$KJQ49$9$k(B. +@item +@code{[p1,...,pm]} $B$O(B @code{p1 e1+...+pm em} $B$KJQ49$5$l$k(B. +\E +\BEG +@item +This function converts a list of polynomials into a module polynomial. +@item +@code{[p1,...,pm]} is converted into @code{p1 e1+...+pm em}. +\E +@end itemize + +@example +[2126] dp_ord([0,0])$ +[2127] dpm_ltod([x^2+y^2,x,y-z],[x,y,z]); +(1)*<<2,0,0:1>>+(1)*<<0,2,0:1>>+(1)*<<1,0,0:2>>+(1)*<<0,1,0:3>> ++(-1)*<<0,0,1:3>> +@end example + +@table @t +\JP @item $B;2>H(B +\EG @item References +@fref{dpm_dtol}, +@fref{dp_ord}. +@end table + +\JP @node dpm_dtol,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dpm_dtol,,, Functions for Groebner basis computation +@subsection @code{dpm_dtol} +@findex dpm_dtol + +@table @t +@item dpm_dptodpm(@var{poly},@var{vlist}) +\JP :: $B2C72B?9`<0$rB?9`<0%j%9%H$KJQ49$9$k(B. +\EG :: Converts a module polynomial into a list of polynomials. +@end table + +@table @var +@item return +\JP $BB?9`<0%j%9%H(B +\EG list of polynomials +@item poly +\JP $B2C72B?9`<0(B +\EG module polynomial +@item vlist +\JP $BJQ?t%j%9%H(B +\EG list of variables +@end table + +@itemize @bullet +\BJP +@item +$B2C72B?9`<0$rB?9`<0%j%9%H$KJQ49$9$k(B. +@item +@code{p1 e1+...+pm em} $B$O(B @code{[p1,...,pm]} $B$KJQ49$5$l$k(B. +@item +$B=PNO%j%9%H$ND9$5$O(B, @code{poly} $B$K4^$^$l$kI8=`4pDl$N:GBg%$%s%G%C%/%9$H$J$k(B. +\E +\BEG +@item +This function converts a module polynomial into a list of polynomials. +@item +@code{p1 e1+...+pm em} is converted into @code{[p1,...,pm]}. +@item +The length of the output list is equal to the largest index among those of the standard bases +containd in @code{poly}. +\E +@end itemize + +@example +[2126] dp_ord([0,0])$ +[2127] D=(1)*<<2,0,0:1>>+(1)*<<0,2,0:1>>+(1)*<<1,0,0:2>>+(1)*<<0,1,0:3>> ++(-1)*<<0,0,1:3>>$ +[2128] dpm_dtol(D,[x,y,z]); +[x^2+y^2,x,y-z] +@end example + +@table @t +\JP @item $B;2>H(B +\EG @item References +@fref{dpm_ltod}, +@fref{dp_ord}. +@end table + \JP @node dp_dtop,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B \EG @node dp_dtop,,, Functions for Groebner basis computation @subsection @code{dp_dtop} @@ -2363,7 +3239,7 @@ converting the coefficients into elements of a finite @table @t \JP @item $B;2>H(B \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{setmod}. @end table @@ -2454,7 +3330,7 @@ These are used internally in @code{hgr()} etc. into an integral distributed polynomial such that GCD of all its coefficients is 1. \E -@itemx dp_prim(@var{dpoly}) +@item dp_prim(@var{dpoly}) \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. \BEG :: Converts a distributed polynomial @var{poly} with rational function @@ -2507,17 +3383,21 @@ polynomial contents included in the coefficients are n @fref{ptozp}. @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 -\EG @node dp_nf dp_nf_mod dp_true_nf dp_true_nf_mod,,, Functions for Groebner basis computation +\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 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} @findex dp_nf @findex dp_true_nf @findex dp_nf_mod @findex dp_true_nf_mod +@findex dp_weyl_nf +@findex dp_weyl_nf_mod @table @t @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_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) \BEG @@ -2559,6 +3439,8 @@ is returned in such a list as @code{[numerator, denomi @item $BJ,;6I=8=B?9`<0(B @var{dpoly} $B$N@55,7A$r5a$a$k(B. @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 $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 @@ -2591,6 +3473,9 @@ is returned in such a list as @code{[numerator, denomi @item Computes the normal form of a distributed polynomial. @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 distributed polynomials with coefficients in a finite field as arguments. @item @@ -2661,6 +3546,126 @@ u4^2+(6*u3+2*u2+6*u1-2)*u4+9*u3^2+(6*u2+18*u1-6)*u3+u2 @fref{p_nf p_nf_mod p_true_nf p_true_nf_mod}. @end table +\JP @node dpm_nf dpm_nf_and_quotient,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dpm_nf dpm_nf_and_quotient,,, Functions for Groebner basis computation +@subsection @code{dpm_nf}, @code{dpm_nf_and_quotient} +@findex dpm_nf +@findex dpm_nf_and_quotient + +@table @t +@item dpm_nf([@var{indexlist},]@var{dpoly},@var{dpolyarray},@var{fullreduce}) +\JP :: $B2C72B?9`<0$N@55,7A$r5a$a$k(B. ($B7k2L$ODj?tG\$5$l$F$$$k2DG=@-$"$j(B) + +\BEG +:: Computes the normal form of a module polynomial. +(The result may be multiplied by a constant in the ground field.) +\E +@item dpm_nf_and_quotient([@var{indexlist},]@var{dpoly},@var{dpolyarray}) +\JP :: $B2C72B?9`<0$N@55,7A$H>&$r5a$a$k(B. +\BEG +:: Computes the normal form of a module polynomial and the quotient. +\E +@end table + +@table @var +@item return +\JP @code{dpm_nf()} : $B2C72B?9`<0(B, @code{dpm_nf_and_quotient()} : $B%j%9%H(B +\EG @code{dpm_nf()} : module polynomial, @code{dpm_nf_and_quotient()} : list +@item indexlist +\JP $B%j%9%H(B +\EG list +@item dpoly +\JP $B2C72B?9`<0(B +\EG module polynomial +@item dpolyarray +\JP $BG[Ns(B +\EG array of module polynomial +@end table + +@itemize @bullet +\BJP +@item +$B2C72B?9`<0(B @var{dpoly} $B$N@55,7A$r5a$a$k(B. +@item +$B7k2L$KM-M}?t(B, $BM-M}<0$,4^$^$l$k$N$rHr$1$k$?$a(B, @code{dpm_nf()} $B$O(B +$B??$NCM$NDj?tG\$NCM$rJV$9(B. +@item +@var{dpolyarray} $B$O2C72B?9`<0$rMWAG$H$9$k%Y%/%H%k(B, +@var{indexlist} $B$O@55,2=7W;;$KMQ$$$k(B @var{dpolyarray} $B$NMWAG$N%$%s%G%C%/%9(B +@item +@var{indexlist} $B$,M?$($i$l$F$$$k>l9g(B, @var{dpolyarray} $B$NCf$G(B, @var{indexlist} $B$G;XDj$5$l$?$b$N$N$_$,(B, $BA0$NJ}$+$iM%@hE*$K;H$o$l$k(B. +@var{indexlist} $B$,M?$($i$l$F$$$J$$>l9g$K$O(B, @var{dpolyarray} $B$NCf$NA4$F$NB?9`<0$,A0$NJ}$+$iM%@hE*$K;H$o$l$k(B. +@item +@code{dpm_nf_and_quotient()} $B$O(B, +@code{[@var{nm},@var{dn},@var{quo}]} $B$J$k7A$N%j%9%H$rJV$9(B. +$B$?$@$7(B, @var{nm} $B$O78?t$KJ,?t$r4^$^$J$$2C72B?9`<0(B, @var{dn} $B$O(B +$B?t$^$?$OB?9`<0$G(B @var{nm}/@var{dn} $B$,??$NCM$H$J$k(B. +@var{quo} $B$O=|;;$N>&$rI=$9G[Ns$G(B, @var{dn}@var{dpoly}=@var{nm}+@var{quo[0]dpolyarray[0]+...} $B$,@.$jN)$D(B. +$B$N%j%9%H(B. +@item +@var{fullreduce} $B$,(B 0 $B$G$J$$$H$-A4$F$N9`$KBP$7$F4JLs$r9T$&(B. @var{fullreduce} +$B$,(B 0 $B$N$H$-F,9`$N$_$KBP$7$F4JLs$r9T$&(B. +\E +\BEG +@item +Computes the normal form of a module polynomial. +@item +The result of @code{dpm_nf()} may be multiplied by a constant in the +ground field in order to make the result integral. +@item +@var{dpolyarray} is a vector whose components are module polynomials +and @var{indexlist} is a list of indices which is used for the normal form +computation. +@item +If @var{indexlist} is given, only the polynomials in @var{dpolyarray} specified in @var{indexlist} +is used in the division. An index placed at the preceding position has priority to be selected. +If @var{indexlist} is not given, all the polynomials in @var{dpolyarray} are used. +@item +@code{dpm_nf_and_quotient()} returns +such a list as @code{[@var{nm},@var{dn},@var{quo}]}. +Here @var{nm} is a module polynomial whose coefficients are integral +in the ground field, @var{dn} is an integral element in the ground +field and @var{nm}/@var{dn} is the true normal form. +@var{quo} is an array containing the quotients of the division satisfying +@var{dn}@var{dpoly}=@var{nm}+@var{quo[0]dpolyarray[0]+...}. +@item +When argument @var{fullreduce} has non-zero value, +all terms are reduced. When it has value 0, +only the head term is reduced. +\E +@end itemize + +@example +[2126] dp_ord([1,0])$ +[2127] S=ltov([(1)*<<0,0,2,0:1>>+(1)*<<0,0,1,1:1>>+(1)*<<0,0,0,2:1>> ++(-1)*<<3,0,0,0:2>>+(-1)*<<0,0,2,1:2>>+(-1)*<<0,0,1,2:2>> ++(1)*<<3,0,1,0:3>>+(1)*<<3,0,0,1:3>>+(1)*<<0,0,2,2:3>>, +(-1)*<<0,1,0,0:1>>+(-1)*<<0,0,1,0:1>>+(-1)*<<0,0,0,1:1>> ++(-1)*<<3,0,0,0:3>>+(1)*<<0,1,1,1:3>>,(1)*<<0,1,0,0:2>> ++(1)*<<0,0,1,0:2>>+(1)*<<0,0,0,1:2>>+(-1)*<<0,1,1,0:3>> ++(-1)*<<0,1,0,1:3>>+(-1)*<<0,0,1,1:3>>])$ +[2128] U=dpm_sp(S[0],S[1]); +(1)*<<0,0,3,0:1>>+(-1)*<<0,1,1,1:1>>+(1)*<<0,0,2,1:1>> ++(-1)*<<0,1,0,2:1>>+(1)*<<3,1,0,0:2>>+(1)*<<0,1,2,1:2>> ++(1)*<<0,1,1,2:2>>+(-1)*<<3,1,1,0:3>>+(1)*<<3,0,2,0:3>> ++(-1)*<<3,1,0,1:3>>+(-1)*<<0,1,3,1:3>>+(-1)*<<0,1,2,2:3>> +[2129] dpm_nf(U,S,1); +0 +[2130] L=dpm_nf_and_quotient(U,S)$ +[2131] Q=L[2]$ +[2132] D=L[1]$ +[2133] D*U-(Q[1]*S[1]+Q[2]*S[2]); +0 +@end example + +@table @t +\JP @item $B;2>H(B +\EG @item References +@fref{dpm_sp}, +@fref{dp_ord}. +@end table + + \JP @node dp_hm dp_ht dp_hc dp_rest,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B \EG @node dp_hm dp_ht dp_hc dp_rest,,, Functions for Groebner basis computation @subsection @code{dp_hm}, @code{dp_ht}, @code{dp_hc}, @code{dp_rest} @@ -2735,6 +3740,88 @@ The next equations hold for a distributed polynomial @ +(-490)*<<0,0,0>> @end example +\JP @node dpm_hm dpm_ht dpm_hc dpm_hp dpm_rest,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dpm_hm dpm_ht dpm_hc dpm_hp dpm_rest,,, Functions for Groebner basis computation +@subsection @code{dpm_hm}, @code{dpm_ht}, @code{dpm_hc}, @code{dpm_hp}, @code{dpm_rest} +@findex dpm_hm +@findex dpm_ht +@findex dpm_hc +@findex dpm_hp +@findex dpm_rest + +@table @t +@item dpm_hm(@var{dpoly}) +\JP :: $B2C72B?9`<0$NF,C19`<0$r>-3*<<1,0,2:3>>+<<2,1,0:2>>; +(1)*<<2,1,0:2>>+(2)*<<1,2,0:2>>+(-3)*<<1,0,2:3>> +[2128] M=dpm_hm(F); +(1)*<<2,1,0:2>> +[2129] C=dpm_hc(F); +(1)*<<2,1,0>> +[2130] R=dpm_rest(F); +(2)*<<1,2,0:2>>+(-3)*<<1,0,2:3>> +[2131] dpm_hp(F); +2 +@end example + + \JP @node dp_td dp_sugar,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B \EG @node dp_td dp_sugar,,, Functions for Groebner basis computation @subsection @code{dp_td}, @code{dp_sugar} @@ -2896,6 +3983,43 @@ Used for finding candidate terms at reduction of polyn @fref{dp_red dp_red_mod}. @end table +\JP @node dpm_redble,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dpm_redble,,, Functions for Groebner basis computation +@subsection @code{dpm_redble} +@findex dpm_redble + +@table @t +@item dpm_redble(@var{dpoly1},@var{dpoly2}) +\JP :: $BF,9`$I$&$7$,@0=|2DG=$+$I$&$+D4$Y$k(B. +\EG :: Checks whether one head term is divisible by the other head term. +@end table + +@table @var +@item return +\JP $B@0?t(B +\EG integer +@item dpoly1 dpoly2 +\JP $B2C72B?9`<0(B +\EG module polynomial +@end table + +@itemize @bullet +\BJP +@item +@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 +0 $B$rJV$9(B. +@item +$BB?9`<0$N4JLs$r9T$&:](B, $B$I$N9`$r4JLs$G$-$k$+$rC5$9$N$KMQ$$$k(B. +\E +\BEG +@item +Returns 1 if the head term of @var{dpoly2} divides the head term of +@var{dpoly1}; otherwise 0. +@item +Used for finding candidate terms at reduction of polynomials. +\E +@end itemize + \JP @node dp_subd,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B \EG @node dp_subd,,, Functions for Groebner basis computation @subsection @code{dp_subd} @@ -3263,6 +4387,46 @@ make the result integral. \EG @item References @fref{dp_mod dp_rat}. @end table + +\JP @node dpm_sp,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dmp_sp,,, Functions for Groebner basis computation +@subsection @code{dpm_sp} +@findex dpm_sp + +@table @t +@item dpm_sp(@var{dpoly1},@var{dpoly2}[|coef=1]) +\JP :: S-$BB?9`<0$N7W;;(B +\EG :: Computation of an S-polynomial +@end table + +@table @var +@item return +\JP $B2C72B?9`<0$^$?$O%j%9%H(B +\EG module polynomial or list +@item dpoly1 dpoly2 +\JP $B2C72B?9`<0(B +\EG module polynomial +\JP $BJ,;6I=8=B?9`<0(B +@end table + +@itemize @bullet +\BJP +@item +@var{dpoly1}, @var{dpoly2} $B$N(B S-$BB?9`<0$r7W;;$9$k(B. +@item +$B%*%W%7%g%s(B @var{coef=1} $B$,;XDj$5$l$F$$$k>l9g(B, @code{[S,t1,t2]} $B$J$k%j%9%H$rJV$9(B. +$B$3$3$G(B, @code{t1}, @code{t2} $B$O(BS-$BB?9`<0$r:n$k:]$N78?tC19`<0$G(B @code{S=t1 dpoly1-t2 dpoly2} +$B$rK~$?$9(B. +\E +\BEG +@item +This function computes the S-polynomial of @var{dpoly1} and @var{dpoly2}. +@item +If an option @var{coef=1} is specified, it returns a list @code{[S,t1,t2]}, +where @code{S} is the S-polynmial and @code{t1}, @code{t2} are monomials satisfying @code{S=t1 dpoly1-t2 dpoly2}. +\E +@end itemize + \JP @node p_nf p_nf_mod p_true_nf p_true_nf_mod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B \EG @node p_nf p_nf_mod p_true_nf p_true_nf_mod,,, Functions for Groebner basis computation @subsection @code{p_nf}, @code{p_nf_mod}, @code{p_true_nf}, @code{p_true_nf_mod} @@ -3372,7 +4536,7 @@ refer to @code{dp_true_nf()} and @code{dp_true_nf_mod( @fref{dp_ptod}, @fref{dp_dtop}, @fref{dp_ord}, -@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}. @end table \JP @node p_terms,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B @@ -3665,105 +4829,6 @@ if an input ideal is not radical. \EG @fref{Setting term orderings}. @end table -\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$Ke$N(B @code{n} $B} $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} 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{<>} $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 -$Bh;;$O(B, $BHs2D49@-$r9MN8$7$F(B @code{dp_weyl_mul()} $B$H$$$&4X?t(B -$B$K$h$j>} 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, -$Bl9g$KM-8z$@$,(B, 0 $Bl9g$J$I(B, $B.$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$rH(B \EG @item References @fref{modfctr}, -@fref{dp_gr_main dp_gr_mod_main dp_gr_f_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{$B9`=g=x$N@_Dj(B}. -\EG @fref{Setting term orderings}. +\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.@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