=================================================================== RCS file: /home/cvs/OpenXM/src/asir-doc/parts/groebner.texi,v retrieving revision 1.1 retrieving revision 1.2 diff -u -p -r1.1 -r1.2 --- OpenXM/src/asir-doc/parts/groebner.texi 1999/12/08 05:47:44 1.1 +++ OpenXM/src/asir-doc/parts/groebner.texi 1999/12/21 02:47:31 1.2 @@ -1,7 +1,15 @@ +@comment $OpenXM$ +\BJP @node $B%0%l%V%J4pDl$N7W;;(B,,, Top @chapter $B%0%l%V%J4pDl$N7W;;(B +\E +\BEG +@node Groebner basis computation,,, Top +@chapter Groebner basis computation +\E @menu +\BJP * $BJ,;6I=8=B?9`<0(B:: * $B%U%!%$%k$NFI$_9~$_(B:: * $B4pK\E*$JH!?t(B:: @@ -10,22 +18,56 @@ * $BM-M}<0$r78?t$H$9$k%0%l%V%J4pDl7W;;(B:: * $B4pDlJQ49(B:: * $B%0%l%V%J4pDl$K4X$9$kH!?t(B:: +\E +\BEG +* Distributed polynomial:: +* Reading files:: +* Fundamental functions:: +* Controlling Groebner basis computations:: +* Setting term orderings:: +* Groebner basis computation with rational function coefficients:: +* Change of ordering:: +* Functions for Groebner basis computation:: +\E @end menu +\BJP @node $BJ,;6I=8=B?9`<0(B,,, $B%0%l%V%J4pDl$N7W;;(B @section $BJ,;6I=8=B?9`<0(B +\E +\BEG +@node Distributed polynomial,,, Groebner basis computation +@section Distributed polynomial +\E @noindent +\BJP $BJ,;6I=8=B?9`<0$H$O(B, $BB?9`<0$NFbIt7A<0$N0l$D$G$"$k(B. $BDL>o$NB?9`<0(B (@code{type} $B$,(B 2) $B$O(B, $B:F5"I=8=$H8F$P$l$k7A<0$GI=8=$5$l$F$$$k(B. $B$9$J$o(B $B$A(B, $BFCDj$NJQ?t$r$NJQ?t$O(B, $B$=$N(B 1 $BJQ(B $B?tB?9`<0$N78?t$K(B, $B> @end example +\BJP $B$H$$$&7A$GI=<($5$l(B, $B$^$?(B, $B$3$N7A$GF~NO2DG=$G$"$k(B. $B$3$NNc$O(B, 5 $BJQ?t$N9`(B $B$r<($9(B. $B3FJQ?t$r(B @code{a}, @code{b}, @code{c}, @code{d}, @code{e} $B$H$9$k$H(B $B$3$N9`$O(B @code{b*c^2*d^3*e^4} $B$rI=$9(B. +\E +\BEG +and also can be input in such a form. +This example shows a term in 5 variables. If we assume the 5 variables +as @code{a}, @code{b}, @code{c}, @code{d}, and @code{e}, +the term represents @code{b*c^2*d^3*e^4} in the ordinary expression. +\E +\BJP @item $B9`=g=x(B (term order) $BJ,;6I=8=B?9`<0$K$*$1$k9`$O(B, $B 1 +\JP $BG$0U$N9`(B @code{t} $B$KBP$7(B @code{t} > 1 +\EG For all @code{t} @code{t} > 1. @item -@code{t}, @code{s}, @code{u} $B$r9`$H$9$k;~(B, @code{t} > @code{s} $B$J$i$P(B -@code{tu} > @code{su} +\JP @code{t}, @code{s}, @code{u} $B$r9`$H$9$k;~(B, @code{t} > @code{s} $B$J$i$P(B @code{tu} > @code{su} +\EG For all @code{t}, @code{s}, @code{u} @code{t} > @code{s} implies @code{tu} > @code{su}. @end enumerate +\BJP $B$3$N@-> @end example -$B$H$$$&7A$GI=<($5$l(B, $B$^$?(B, $B$3$N7A$GF~NO2DG=$G$"$k(B. +\JP $B$H$$$&7A$GI=<($5$l(B, $B$^$?(B, $B$3$N7A$GF~NO2DG=$G$"$k(B. +\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,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 coefficient + +Monomials in a distributed polynomial is sorted by a total order. +In such representation, we call the monomial that is maximum +with respect to the order the head monomial, and its term and coefficient +the head term and the head coefficient respectively. +\E @end table +\BJP @node $B%U%!%$%k$NFI$_9~$_(B,,, $B%0%l%V%J4pDl$N7W;;(B @section $B%U%!%$%k$NFI$_9~$_(B +\E +\BEG +@node Reading files,,, Groebner basis computation +@section Reading files +\E @noindent +\BJP $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 $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. @@ -110,52 +234,119 @@ $(x+y+z)^2 = 1 \cdot x^2 + 2 \cdot xy + 2 \cdot xz + 1 $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$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 +\BEG +Facilities for computing Groebner bases are provided not by built-in +functions but by a set of user functions written in @b{Asir}. +The set of functions is provided as a file (sometimes called package), +named @samp{gr}. +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 +directory of @b{Asir}. Therefore, it is loaded simply by specifying +its file name, unless the environment variable @code{ASIR_LIBDIR} +is set to a non-standard one. +\E @example [0] load("gr")$ @end example +\BJP @node $B4pK\E*$JH!?t(B,,, $B%0%l%V%J4pDl$N7W;;(B @section $B4pK\E*$JH!?t(B +\E +\BEG +@node Fundamental functions,,, Groebner basis computation +@section Fundamental functions +\E @noindent +\BJP @samp{gr} $B$G$O?tB?$/$NH!?t$,Dj5A$5$l$F$$$k$,(B, $BD>@\(B $B%0%l%V%J4pDl$r7W;;$9$k$?$a$N%H%C%W%l%Y%k$Ol9g(B, sugar strategy $B$,78?tKDD%$r0z$-5/$3$9>l9g$,$"$k(B. $B$3$N$h$&$J>l(B $B9g(B, strategy $B$r@Fl9g$,B?$$(B. +\E +\BEG +After homogenizing the input polynomials a candidate of the \gr basis +is computed by trace-lifting. Then the candidate is dehomogenized and +checked whether it is indeed a Groebner basis of the input. Sugar +strategy often causes intermediate coefficient swells. It is +empirically known that the combination of homogenization and supresses +the swells for such cases. +\E @item gr_mod(@var{plist},@var{vlist},@var{order},@var{p}) +\BJP Gebauer-Moeller $B$K$h$k(B useless pair elimination criteria, sugar strategy $B$*$h$S(B Buchberger $B%"%k%4%j%:%`$K$h$k(B GF(p) $B78?t%0%l%V%J4pDl7W(B $B;;H!?t(B. +\E +\BEG +Function that computes Groebner bases over GF(@var{p}). The same +algorithm as @code{gr()} is used. +\E @end table +\BJP @node $B7W;;$*$h$SI=<($N@)8f(B,,, $B%0%l%V%J4pDl$N7W;;(B @section $B7W;;$*$h$SI=<($N@)8f(B +\E +\BEG +@node Controlling Groebner basis computations,,, Groebner basis computation +@section Controlling Groebner basis computations +\E @noindent +\BJP $B%0%l%V%J4pDl$N7W;;$K$*$$$F(B, $B$5$^$6$^$J%Q%i%a%?@_Dj$r9T$&$3$H$K$h$j7W;;(B, $BI=<($r@)8f$9$k$3$H$,$G$-$k(B. $B$3$l$i$O(B, $BAH$_9~$_H!?t(B @code{dp_gr_flags()} $B$K$h$j@_Dj;2>H$9$k$3$H$,$G$-$k(B. $BL50z?t$G(B @code{dp_gr_flags()} $B$rA0$HCM$N%j%9%H$GJV$5$l$k(B. +\E +\BEG +One can cotrol a Groebner basis computation by setting various parameters. +These parameters can be set and examined by a built-in function +@code{dp_gr_flags()}. Without argument it returns the current settings. +\E @example [100] dp_gr_flags(); @@ -164,73 +355,163 @@ Print,1,Stat,0,Reverse,0,InterReduce,0,Multiple,0] [101] @end example +\BJP $B0J2<$G(B, $B3F%Q%i%a%?$N0UL#$r@bL@$9$k(B. on $B$N>l9g$H$O(B, $B%Q%i%a%?$,(B 0 $B$G$J$$>l9g$r(B $B$$$&(B. $B$3$l$i$N%Q%i%a%?$N=i4|CM$OA4$F(B 0 (off) $B$G$"$k(B. +\E +\BEG +The return value is a list which contains the names of parameters and their +values. The meaning of the parameters are as follows. `on' means that the +parameter is not zero. +\E - @table @code @item NoSugar +\BJP on $B$N>l9g(B, sugar strategy $B$NBe$o$j$K(B Buchberger$B$N(B normal strategy $B$,MQ(B $B$$$i$l$k(B. +\E +\BEG +If `on', Buchberger's normal strategy is used instead of sugar strategy. +\E @item NoCriB -on $B$N>l9g(B, $BITI,MWBP8!=P5,=`$N$&$A(B, $B5,=`(B B $B$rE,MQ$7$J$$(B. +\JP on $B$N>l9g(B, $BITI,MWBP8!=P5,=`$N$&$A(B, $B5,=`(B B $B$rE,MQ$7$J$$(B. +\EG If `on', criterion B among the Gebauer-Moeller's criteria is not applied. @item NoGC -on $B$N>l9g(B, $B7k2L$,%0%l%V%J4pDl$K$J$C$F$$$k$+$I$&$+$N%A%'%C%/$r9T$o$J$$(B. +\JP on $B$N>l9g(B, $B7k2L$,%0%l%V%J4pDl$K$J$C$F$$$k$+$I$&$+$N%A%'%C%/$r9T$o$J$$(B. +\BEG +If `on', the check that a Groebner basis candidate is indeed a Groebner basis, +is not executed. +\E @item NoMC +\BJP on $B$N>l9g(B, $B7k2L$,F~NO%$%G%"%k$HF1Ey$N%$%G%"%k$G$"$k$+$I$&$+$N%A%'%C%/(B $B$r9T$o$J$$(B. +\E +\BEG +If `on', the check that the resulting polynomials generates the same ideal as +the ideal generated by the input, is not executed. +\E @item NoRA +\BJP on $B$N>l9g(B, $B7k2L$r(B reduced $B%0%l%V%J4pDl$K$9$k$?$a$N(B interreduce $B$r9T$o$J$$(B. +\E +\BEG +If `on', the interreduction, which makes the Groebner basis reduced, is not +executed. +\E @item NoGCD +\BJP on $B$N>l9g(B, $BM-M}<078?t$N%0%l%V%J4pDl7W;;$K$*$$$F(B, $B@8@.$5$l$?B?9`<0$N(B, $B78?t$N(B content $B$r$H$i$J$$(B. +\E +\BEG +If `on', content removals are not executed during a Groebner basis computation +over a rational function field. +\E @item Top -on $B$N>l9g(B, normal form $B7W;;$K$*$$$FF,9`>C5n$N$_$r9T$&(B. +\JP on $B$N>l9g(B, normal form $B7W;;$K$*$$$FF,9`>C5n$N$_$r9T$&(B. +\EG If `on', Only the head term of the polynomial being reduced is reduced. -@item Interreduce -on $B$N>l9g(B, $BB?9`<0$r@8@.$9$kKh$K(B, $B$=$l$^$G@8@.$5$l$?4pDl$r$=$NB?9`<0$K(B -$B$h$k(B normal form $B$GCV$-49$($k(B. +@comment @item Interreduce +@comment \BJP +@comment on $B$N>l9g(B, $BB?9`<0$r@8@.$9$kKh$K(B, $B$=$l$^$G@8@.$5$l$?4pDl$r$=$NB?9`<0$K(B +@comment $B$h$k(B normal form $B$GCV$-49$($k(B. +@comment \E +@comment \BEG +@comment If `on', intermediate basis elements are reduced by using a newly generated +@comment basis element. +@comment \E @item Reverse +\BJP on $B$N>l9g(B, normal form $B7W;;$N:]$N(B reducer $B$r(B, $B?7$7$/@8@.$5$l$?$b$N$rM%(B $B@h$7$FA*$V(B. +\E +\BEG +If `on', the selection strategy of reducer in a normal form computation +is such that a newer reducer is used first. +\E @item Print -on $B$N>l9g(B, $B%0%l%V%J4pDl7W;;$NESCf$K$*$1$k$5$^$6$^$J>pJs$rI=<($9$k(B. +\JP on $B$N>l9g(B, $B%0%l%V%J4pDl7W;;$NESCf$K$*$1$k$5$^$6$^$J>pJs$rI=<($9$k(B. +\BEG +If `on', various informations 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 $B$l$k%G!<%?$NFb(B, $B=87W%G!<%?$N$_$,I=<($5$l$k(B. +\E +\BEG +If `on', a summary of informations is shown after a Groebner basis +computation. Note that the summary is always shown if @code{Print} is `on'. +\E @item ShowMag +\BJP on $B$G(B @code{Print} $B$,(B on $B$J$i$P(B, $B@8@.$,@8@.$5$l$kKh$K(B, $B$=$NB?9`<0$N(B $B78?t$N%S%C%HD9$NOB$rI=<($7(B, $B:G8e$K(B, $B$=$l$i$NOB$N:GBgCM$rI=<($9$k(B. +\E +\BEG +If `on' and @code{Print} is `on', the sum of bit length of +coefficients of a generated basis element, which we call @var{magnitude}, +is shown after every normal computation. After comleting the +computation the maximal value among the sums is shown. +\E @item 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 $B$H$9$k$H(B, $B5pBg$J@0?t$,78?t$K8=$l$k>l9g(B, $B8zN($,NI$/$J$k>l9g$,$"$k(B. +\E +\BEG +If a non-zero integer, 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 +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 +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 +for the case where large integers appear during the computation. +\E @item Demand + +\BJP $B@5Ev$J%G%#%l%/%H%jL>(B ($BJ8;zNs(B) $B$rCM$K;}$D$H$-(B, $B@8@.$5$l$?B?9`<0$O%a%b%j(B $BCf$K$*$+$l$:(B, $B$=$N%G%#%l%/%H%jCf$K%P%$%J%j%G!<%?$H$7$FCV$+$l(B, $B$=$NB?9`(B $B<0$rMQ$$$k(B normal form $B7W;;$N:](B, $B<+F0E*$K%a%b%jCf$K%m!<%I$5$l$k(B. $B3FB?(B $B9`<0$O(B, $BFbIt$G$N%$%s%G%C%/%9$r%U%!%$%kL>$K;}$D%U%!%$%k$K3JG<$5$l$k(B. $B$3$3$G;XDj$5$l$?%G%#%l%/%H%j$K=q$+$l$?%U%!%$%k$O<+F0E*$K$O>C5n$5$l$J$$(B $B$?$a(B, $B%f!<%6$,@UG$$r;}$C$F>C5n$9$kI,MW$,$"$k(B. +\E +\BEG +If the value (a character string) is a valid directory name, then +generated basis elements are put in the directory and are loaded on +demand during normal form computations. Each elements is saved in the +binary form and its name coincides with the index internally used in +the computation. These binary files are not removed automatically +and one should remove them by hand. +\E @end table @noindent -@code{Print} $B$,(B 0 $B$G$J$$>l9gl9gl9g$KMQ$$$i$l$k(B $B?t$N%j%9%H$G$"$k(B. +\E +\BEG +In this example @code{mod} and @code{eval} indicate moduli used in +trace-lifting. @code{mod} is a prime and @code{eval} is a list of integers +used for evaluation when the ground field is a field of rational functions. +\E @noindent -$B7W;;ESCf$GB?9`<0$,@8@.$5$l$kKh$KiD9@-$r=|$$$?4pDl$N?t(B @item NAB + $B8=:_$^$G$K@8@.$5$l$?4pDl$N?t(B @item RP + $B;D$j$N%Z%"$N?t(B @item S + $B@8@.$5$l$?B?9`<0$N(B sugar $B$NCM(B @item M + $B@8@.$5$l$?B?9`<0$N78?t$N%S%C%HD9$NOB(B (@code{ShowMag} $B$,(B on $B$N;~$KI=<($5$l$k(B. ) +\E +\BEG +@item TNF + +CPU time for normal form computation (second) + +@item TCONT + +CPU time for content removal(second) + +@item HT + +Head term of the generated basis element + +@item INDEX + +Pair of indices which corresponds to the reduced S-polynomial + +@item NB + +Number of basis elements after removing redundancy + +@item NAB + +Number of all the basis elements + +@item RP + +Number of remaining pairs + +@item S + +Sugar of the generated basis element + +@item M + +Magnitude of the genrated basis element (shown if @code{ShowMag} is `on'.) +\E @end table @noindent +\BJP $B:G8e$K(B, $B=87W%G!<%?$,I=<($5$l$k(B. $B0UL#$Oe$N(B S-$BB?9`<07W;;;~4V(B @item SPM + $BM-8BBN>e$N(B S-$BB?9`<07W;;;~4V(B @item NF + $BM-M}?t>e$N(B normal form $B7W;;;~4V(B @item NFM + $BM-8BBN>e$N(B normal form $B7W;;;~4V(B @item ZNFM + @code{NFM} $B$NFb(B, 0 $B$X$N(B reduction $B$K$+$+$C$?;~4V(B @item PZ + content $B7W;;;~4V(B @item NP + $BM-M}?t78?tB?9`<0$N78?t$KBP$9$k>jM>1i;;$N7W;;;~4V(B @item MP + S-$BB?9`<0$r@8@.$9$k%Z%"$NA*Br$K$+$+$C$?;~4V(B @item RA + interreduce $B7W;;;~4V(B @item MC + trace-lifting $B$K$*$1$k(B, $BF~NOB?9`<0$N%a%s%P%7%C%W7W;;;~4V(B @item GC + $B7k2L$N%0%l%V%J4pDl8uJd$N%0%l%V%J4pDl%A%'%C%/;~4V(B @item T + $B@8@.$5$l$?%Z%"$N?t(B @item B, M, F, D + $B3F(B criterion $B$K$h$j=|$+$l$?%Z%"$N?t(B @item ZR + 0 $B$K(B reduce $B$5$l$?%Z%"$N?t(B @item NZR + 0 $B$G$J$$B?9`<0$K(B reduce $B$5$l$?%Z%"$N?t(B @item Max_mag + $B@8@.$5$l$?B?9`<0$N(B, $B78?t$N%S%C%HD9$NOB$N:GBgCM(B +\E +\BEG +@item UP +Time to manipulate the list of critical pairs + +@item SP + +Time to compute S-polynomials over the rationals + +@item SPM + +Time to compute S-polynomials over a finite field + +@item NF + +Time to compute normal forms over the rationals + +@item NFM + +Time to compute normal forms over a finite field + +@item ZNFM + +Time for zero reductions in @code{NFM} + +@item PZ + +Time to remove integer contets + +@item NP + +Time to compute remainders for coefficients of polynomials with coeffieints +in the rationals + +@item MP + +Time to select pairs from which S-polynomials are computed + +@item RA + +Time to interreduce the Groebner basis candidate + +@item MC + +Time to check that each input polynomial is a member of the ideal +generated by the Groebner basis candidate. + +@item GC + +Time to check that the Groebner basis candidate is a Groebner basis + +@item T + +Number of critical pairs generated + +@item B, M, F, D + +Number of critical pairs removed by using each criterion + +@item ZR + +Number of S-polynomials reduced to 0 + +@item NZR + +Number of S-polynomials reduced to non-zero results + +@item Max_mag + +Maximal magnitude among all the generated polynomials +\E @end table +\BJP @node $B9`=g=x$N@_Dj(B,,, $B%0%l%V%J4pDl$N7W;;(B @section $B9`=g=x$N@_Dj(B +\E +\BEG +@node Setting term orderings,,, Groebner basis computation +@section Setting term orderings +\E @noindent +\BJP $B9`$OFbIt$G$O(B, $B3FJQ?t$K4X$9$k;X?t$r@.J,$H$9$k@0?t%Y%/%H%k$H$7$FI=8=$5$l(B $B$k(B. $BB?9`<0$rJ,;6I=8=B?9`<0$KJQ49$9$k:](B, $B3FJQ?t$,$I$N@.J,$KBP1~$9$k$+$r(B $B;XDj$9$k$N$,(B, $BJQ?t%j%9%H$G$"$k(B. $B$5$i$K(B, $B$=$l$i@0?t%Y%/%H%k$NA4=g=x$r(B $B;XDj$9$k$N$,9`=g=x$N7?$G$"$k(B. $B9`=g=x7?$O(B, $B?t(B, $B?t$N%j%9%H$"$k$$$O(B $B9TNs$GI=8=$5$l$k(B. +\E +\BEG +A term is internally represented as an integer vector whose components +are exponents with respect to variables. A variable list specifies the +correspondences between variables and components. A type of term ordering +specifies a total order for integer vectors. A type of term ordering is +represented by an integer, a list of integer or matrices. +\E @noindent -$B4pK\E*$J9`=g=x7?$H$7$F$NJQ?t=g=x$X$N4pDlJQ49$N$?$a$N%=!<%9$H$7$FMQ$$$i$l$k(B. +\E +\BEG +In general, computation by this ordering shows the fastest speed +in most Groebner basis computations. +However, for the purpose to solve polynomial equations, this type +of ordering is, in general, not so suitable. +The Groebner bases obtained by this ordering is used for computing +the number of solutions, solving ideal membership problem and seeds +for conversion to other Groebner bases under different ordering. +\E -@item 1 (DegLex; @b{$BA4@\$=$N7k2L$rMQ$$$k$3$H$O:$Fq$G$"$k(B. $B$7$+$7(B, $B<-=q<0=g=x$N%0%l%V%J4pDl$r5a$a$k:]$K(B, $B@Fl9g$K:GE,$N7A$N4pDl$rM?$($k$,(B $B7W;;;~4V$,$+$+$j2a$.$k$N$,FqE@$G$"$k(B. $BFC$K(B, $B2r$,M-8B8D$N>l9g(B, $B7k2L$N(B $B78?t$,6K$a$FD9Bg$JB?G\D9?t$K$J$k>l9g$,B?$$(B. $B$3$N>l9g(B, @code{gr()}, @code{hgr()} $B$K$h$k7W;;$,6K$a$FM-8z$K$J$k>l9g$,B?$$(B. +\E +\BEG +Groebner bases computed by this ordering give the most convenient +Groebner bases for solving the polynomial equations. +The only and serious shortcoming is the enormously long computation +time. +It is often observed that the number coefficients of the result becomes +very very long integers, especially if the ideal is 0-dimensional. +For such a case, it is empirically true for many cases +that i.e., computation by +@code{gr()} and/or @code{hgr()} may be quite effective. +\E @end table @noindent +\BJP $B$3$l$i$rAH$_9g$o$;$F%j%9%H$G;XDj$9$k$3$H$K$h$j(B, $BMM!9$J>C5n=g=x$,;XDj$G$-$k(B. $B$3$l$O(B, +\E +\BEG +By combining these fundamental orderingl into a list, one can make +various term ordering called elimination orderings. +\E @code{[[O1,L1],[O2,L2],...]} @noindent +\BJP $B$G;XDj$5$l$k(B. @code{Oi} $B$O(B 0, 1, 2 $B$N$$$:$l$+$G(B, @code{Li} $B$OJQ?t$N8D(B $B?t$rI=$9(B. $B$3$N;XDj$O(B, $BJQ?t$r@hF,$+$i(B @code{L1}, @code{L2} , ...$B8D(B $B$:$D$NAH$KJ,$1(B, $B$=$l$>$l$NJQ?t$K4X$7(B, $B=g$K(B @code{O1}, @code{O2}, ...$B$N9`=g=x7?$GBg>.$,7hDj$9$k$^$GHf3S$9$k$3$H$r0UL#$9$k(B. $B$3$N7?$N(B $B=g=x$O0lHL$K>C5n=g=x$H8F$P$l$k(B. +\E +\BEG +In this example @code{Oi} indicates 0, 1 or 2 and @code{Li} indicates +the number of variables subject to the correspoinding orderings. +This specification means the following. + +The variable list is separated into sub lists from left to right where +the @code{i}-th list contains @code{Li} members and it corresponds to +the ordering of type @code{Oi}. The result of a comparison is equal +to that for the leftmost different sub components. This type of ordering +is called an elimination ordering. +\E @noindent +\BJP $B$5$i$K(B, $B9TNs$K$h$j9`=g=x$r;XDj$9$k$3$H$,$G$-$k(B. $B0lHL$K(B, @code{n} $B9T(B @code{m} $BNs$Ns} $B$r(B, @code{M(t-s)} $B$N(B 0 $B$G$J$$:G=i$N@.J,$,HsIi(B, $B$GDj5A$9$k$3$H$K$h$j9`=g=x$,Dj5A$G$-$k(B. +\E +\BEG +Then we can define a term ordering such that, for two vectors +@code{t}, @code{s}, @code{t>s} means that the first non-zero component +of @code{M(t-s)} is non-negative. +\E @noindent +\BJP $B9`=g=x7?$O(B, @code{gr()} $B$J$I$N0z?t$H$7$F;XDj$5$l$kB>(B, $BAH$_9~$_H!?t(B @code{dp_ord()} $B$G;XDj$5$l(B, $B$5$^$6$^$JH!?t$NH$5$l$k(B. +\E +\BEG +Types of term orderings are used as arguments of functions such as +@code{gr()}. It is also set internally by @code{dp_ord()} and is used +during executions of various functions. +\E @noindent +\BJP $B$3$l$i$N=g=x$N6qBNE*$JDj5A$*$h$S%0%l%V%J4pDl$K4X$9$k99$K>\$7$$2r@b$O(B @code{[Becker,Weispfenning]} $B$J$I$r;2>H$N$3$H(B. +\E +\BEG +For concrete definitions of term ordering and more information +about Groebner basis, refer to, for example, the book +@code{[Becker,Weispfenning]}. +\E @noindent -$B9`=g=x7?$N@_Dj$NB>$K(B, $BJQ?t$N=g=x<+BN$b7W;;;~4V$KBg$-$J1F6A$rM?$($k(B. +\JP $B9`=g=x7?$N@_Dj$NB>$K(B, $BJQ?t$N=g=x<+BN$b7W;;;~4V$KBg$-$J1F6A$rM?$($k(B. +\BEG +Note that the variable ordering have strong effects on the computation +time as well as the choice of types of term orderings. +\E @example [90] B=[x^10-t,x^8-z,x^31-x^6-x-y]$ @@ -466,6 +1015,7 @@ z^5-t^4] @end example @noindent +\BJP $BJQ?t=g=x(B @code{[x,y,z,t]} $B$K$*$1$k%0%l%V%J4pDl$O(B, $B4pDl$N?t$bB?$/(B, $B$=$l$>$l$N(B $B<0$bBg$-$$(B. $B$7$+$7(B, $B=g=x(B @code{[t,z,y,x]} $B$K$b$H$G$O(B, @code{B} $B$,$9$G$K(B $B%0%l%V%J4pDl$H$J$C$F$$$k(B. $BBg;(GD$K$$$($P(B, $B<-=q<0=g=x$G%0%l%V%J4pDl$r5a$a$k(B @@ -474,15 +1024,44 @@ z^5-t^4] @code{x} $B$GI=$5$l$F$$$k$3$H$+$i$3$N$h$&$J6KC<$J7k2L$H$J$C$?$o$1$G$"$k(B. $B/$J$/(B, $B;n9T:x8m$,I,MW$J>l9g$b$"$k(B. +\E +\BEG +As you see in the above example, the Groebner base under variable +ordering @code{[x,y,z,t]} has a lot of bases and each base itself is +large. Under variable ordering @code{[t,z,y,x]}, however, @code{B} itself +is already the Groebner basis. +Roughly speaking, to obtain a Groebner base under the lexicographic +ordering is to express the variables on the left (having higher order) +in terms of variables on the right (having lower order). +In the example, variables @code{t}, @code{z}, and @code{y} are already +expressed by variable @code{x}, and the above explanation justifies +such a drastic experimental results. +In practice, however, optimum ordering for variables may not known +beforehand, and some heuristic trial may be inevitable. +\E +\BJP @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 +\E +\BEG +@node Groebner basis computation with rational function coefficients,,, Groebner basis computation +@section Groebner basis computation with rational function coefficients +\E @noindent +\BJP @code{gr()} $B$J$I$N%H%C%W%l%Y%kH!?t$O(B, $B$$$:$l$b(B, $BF~NOB?9`<0%j%9%H$K(B $B8=$l$kJQ?t(B ($BITDj85(B) $B$H(B, $BJQ?t%j%9%H$K8=$l$kJQ?t$rHf3S$7$F(B, $BJQ?t%j%9%H$K(B $B$J$$JQ?t$,F~NOB?9`<0$K8=$l$F$$$k>l9g$K$O(B, $B<+F0E*$K(B, $B$=$NJQ?t$r(B, $B78?t(B $BBN$N85$H$7$F07$&(B. +\E +\BEG +Such variables that appear within the input polynomials but +not appearing in the input variable list are automatically treated +as elements in the coefficient field +by top level functions, such as @code{gr()}. +\E @example [64] gr([a*x+b*y-c,d*x+e*y-f],[x,y],2); @@ -490,6 +1069,7 @@ z^5-t^4] @end example @noindent +\BJP $B$3$NNc$G$O(B, @code{a}, @code{b}, @code{c}, @code{d} $B$,78?tBN$N85$H$7$F(B $B07$o$l$k(B. $B$9$J$o$A(B, $BM-M}H!?tBN(B @b{F} = @b{Q}(@code{a},@code{b},@code{c},@code{d}) $B>e$N(B 2 $BJQ?tB?9`<04D(B @@ -501,11 +1081,36 @@ z^5-t^4] $B$K$O0[$J$k(B. $B$^$?(B, $Be$NLdBj$N$?$a(B, $BJ,;6I=8=B?9`<0(B $B$N78?t$H$7$Fl9g(B, $BD>@\(B @code{gr()} $B$J$I$r5/F0$9$k(B $B$h$j(B, $B0lC6B>$N=g=x(B ($BNc$($PA4l9g(B @@ -516,16 +1121,44 @@ z^5-t^4] $B0J2<$N(B 2 $B$D$NH!?t$O(B, $BJQ?t=g=x(B @var{vlist1}, $B9`=g=x7?(B @var{order} $B$G(B $B4{$K%0%l%V%J4pDl$H$J$C$F$$$kB?9`<0%j%9%H(B @var{gbase} $B$r(B, $BJQ?t=g=x(B @var{vlist2} $B$K$*$1$k<-=q<0=g=x$N%0%l%V%J4pDl$KJQ49$9$kH!?t$G$"$k(B. +\E +\BEG +When we compute a lex order Groebner basis, it is often efficient to +compute it via Groebner basis with respect to another order such as +degree reverse lex order, rather than to compute it directory by +@code{gr()} etc. If we know that an input is a Groebner basis with +respect to an order, we can apply special methods called change of +ordering for a Groebner basis computation with respect to another +order, without using Buchberger algorithm. The following two functions +are ones for change of ordering such that they convert a Groebner +basis @var{gbase} with respect to the variable order @var{vlist1} and +the order type @var{order} into a lex Groebner basis with respect +to the variable order @var{vlist2}. +\E @table @code @item tolex(@var{gbase},@var{vlist1},@var{order},@var{vlist2}) +\BJP $B$3$NH!?t$O(B, @var{gbase} $B$,M-M}?tBN>e$N%7%9%F%`$N>l9g$K$N$_;HMQ2DG=$G$"$k(B. $B$3$NH!?t$O(B, $B<-=q<0=g=x$N%0%l%V%J4pDl$r(B, $BM-8BBN>e$G7W;;$5$l$?%0%l%V%J4pDl(B $B$r?w7?$H$7$F(B, $BL$Dj78?tK!$*$h$S(B Hensel $B9=@.$K$h$j5a$a$k$b$N$G$"$k(B. +\E +\BEG +This function can be used only when @var{gbase} is an ideal over the +rationals. The input @var{gbase} must be a Groebner basis with respect +to the variable order @var{vlist1} and the order type @var{order}. Moreover +the ideal generated by @var{gbase} must be zero-dimensional. +This computes the lex Groebner basis of @var{gbase} +by using the modular change of ordering algorithm. The algorithm first +computes the lex Groebner basis over a finite field. Then each element +in the lex Groebner basis over the rationals is computed with undetermined +coefficient method and linear equation solving by Hensel lifting. +\E @item tolex_tl(@var{gbase},@var{vlist1},@var{order},@var{vlist2},@var{homo}) +\BJP $B$3$NH!?t$O(B, $B<-=q<0=g=x$N%0%l%V%J4pDl$r(B Buchberger $B%"%k%4%j%:%`$K$h$j5a(B $B$a$k$b$N$G$"$k$,(B, $BF~NO$,$"$k=g=x$K$*$1$k%0%l%V%J4pDl$G$"$k>l9g$N(B trace-lifting$B$K$*$1$k%0%l%V%J4pDl8uJd$NF,9`(B, $BF,78?t$N@-@\<-=q<0=g=x$N7W;;$r9T$&$h$j8zN($,$h$$(B. ($B$b$A$m$sNc30$"$j(B. ) $B0z?t(B @var{homo} $B$,(B 0 $B$G$J$$;~(B, @code{hgr()} $B$HF1MM$K@F(B, 0 $B.B?9`<0$r5a$a$k(B $BH!?t(B, 0 $BH$N$3$H(B. +\E +\BEG +For zero-dimensional systems, there are several fuctions to +compute the minimal polynomial of a polynomial and or a more compact +representation for zeros of the system. They are all defined in @samp{gr}. +Refer to the sections for each functions. +\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 +\BEG +@node Functions for Groebner basis computation,,, Groebner basis computation +@section Functions for Groebner basis computation +\E @menu * gr hgr gr_mod:: @@ -580,7 +1241,8 @@ trace-lifting$B$K$*$1$k%0%l%V%J4pDl8uJd$NF,9`(B, $B * lex_hensel_gsl tolex_gsl tolex_gsl_d:: @end menu -@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 +\EG @node gr hgr gr_mod,,, Functions for Groebner basis computation @subsection @code{gr}, @code{hgr}, @code{gr_mod}, @code{dgr} @findex gr @findex hgr @@ -592,21 +1254,27 @@ trace-lifting$B$K$*$1$k%0%l%V%J4pDl8uJd$NF,9`(B, $B @itemx hgr(@var{plist},@var{vlist},@var{order}) @itemx gr_mod(@var{plist},@var{vlist},@var{order},@var{p}) @itemx dgr(@var{plist},@var{vlist},@var{order},@var{procs}) -:: $B%0%l%V%J4pDl$N7W;;(B +\JP :: $B%0%l%V%J4pDl$N7W;;(B +\EG :: Groebner basis computation @end table @table @var @item return -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item plist, vlist, procs -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item order -$B?t(B, $B%j%9%H$^$?$O9TNs(B +\JP $B?t(B, $B%j%9%H$^$?$O9TNs(B +\EG number, list or matrix @item p -2^27 $BL$K~$NAG?t(B +\JP 2^27 $BL$K~$NAG?t(B +\EG prime less than 2^27 @end table @itemize @bullet +\BJP @item $BI8=`%i%$%V%i%j$N(B @samp{gr} $B$GDj5A$5$l$F$$$k(B. @item @@ -628,6 +1296,35 @@ strategy $B$K$h$k7W;;(B, @code{hgr()} $B$O(B trace @item @code{dgr()} $B$GI=<($5$l$k;~4V$O(B, $B$3$NH!?t$,l9g$O$[$H$s$IDL?.$N$?$a$N;~4V$G$"$k(B. +\E +\BEG +@item +These functions are defined in @samp{gr} in the standard library +directory. +@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}. +@code{gr()} and @code{hgr()} compute a Groebner basis over the rationals +and @code{gr_mod} computes over GF(@var{p}). +@item +Variables not included in @var{vlist} are regarded as +included in the ground field. +@item +@code{gr()} uses trace-lifting (an improvement by modular computation) + and sugar strategy. +@code{hgr()} uses trace-lifting and a cured sugar strategy +by using homogenization. +@item +@code{dgr()} executes @code{gr()}, @code{dgr()} simultaneously on +two process in a child process list @var{procs} and returns +the result obtained first. The results returned from both the process +should be equal, but it is not known in advance which method is faster. +Therefore this function is useful to reduce the actual elapsed time. +@item +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. +\E @end itemize @example @@ -642,13 +1339,15 @@ CPU $B;~4V$G$"$j(B, $B$3$NH!?t$N>l9g$O$[$H$s$IDL?.$ @end example @table @t -@item $B;2>H(B +\JP @item $B;2>H(B +\EG @item References @comment @fref{dp_gr_main dp_gr_mod_main}, @fref{dp_gr_main dp_gr_mod_main}, @fref{dp_ord}. @end table -@node lex_hensel lex_tl tolex tolex_d tolex_tl,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\JP @node lex_hensel lex_tl tolex tolex_d tolex_tl,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node lex_hensel lex_tl tolex tolex_d tolex_tl,,, Functions for Groebner basis computation @subsection @code{lex_hensel}, @code{lex_tl}, @code{tolex}, @code{tolex_d}, @code{tolex_tl} @findex lex_hensel @findex lex_tl @@ -659,25 +1358,32 @@ CPU $B;~4V$G$"$j(B, $B$3$NH!?t$N>l9g$O$[$H$s$IDL?.$ @table @t @item lex_hensel(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{homo}) @itemx lex_tl(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{homo}) -:: $B4pDlJQ49$K$h$k<-=q<0=g=x%0%l%V%J4pDl$N7W;;(B +\JP :: $B4pDlJQ49$K$h$k<-=q<0=g=x%0%l%V%J4pDl$N7W;;(B +\EG:: Groebner basis computation with respect to a lex order by change of ordering @item tolex(@var{plist},@var{vlist1},@var{order},@var{vlist2}) @itemx tolex_d(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{procs}) @itemx tolex_tl(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{homo}) -:: $B%0%l%V%J4pDl$rF~NO$H$9$k(B, $B4pDlJQ49$K$h$k<-=q<0=g=x%0%l%V%J4pDl$N7W;;(B +\JP :: $B%0%l%V%J4pDl$rF~NO$H$9$k(B, $B4pDlJQ49$K$h$k<-=q<0=g=x%0%l%V%J4pDl$N7W;;(B +\EG :: Groebner basis computation with respect to a lex order by change of ordering, starting from a Groebner basis @end table @table @var @item return -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item plist, vlist1, vlist2, procs -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item order -$B?t(B, $B%j%9%H$^$?$O9TNs(B +\JP $B?t(B, $B%j%9%H$^$?$O9TNs(B +\EG number, list or matrix @item homo -$B%U%i%0(B +\JP $B%U%i%0(B +\EG flag @end table @itemize @bullet +\BJP @item $BI8=`%i%$%V%i%j$N(B @samp{gr} $B$GDj5A$5$l$F$$$k(B. @item @@ -695,7 +1401,6 @@ CPU $B;~4V$G$"$j(B, $B$3$NH!?t$N>l9g$O$[$H$s$IDL?.$ @item @code{lex_hensel()}, @code{lex_tl()} $B$K$*$$$F$O(B, $B<-=q<0=g=x%0%l%V%J4pDl$N(B $B7W;;$OH(B.) - @enumerate @item @var{vlist1}, @var{order} $B$K4X$9$k%0%l%V%J4pDl(B @var{G0} $B$r7W;;$9$k(B. @@ -750,6 +1455,87 @@ CPU $B;~4V$G$"$j(B, $B$3$NH!?t$N>l9g$O$[$H$s$IDL?.$ @item @code{tolex_d()} $B$GI=<($5$l$k;~4V$O(B, $B$3$NH!?t$,l9g$O$[$H$s$IDL?.$ @end example @table @t -@item $B;2>H(B +\JP @item $B;2>H(B +\EG @item References @fref{dp_gr_main dp_gr_mod_main}, -@fref{dp_ord}, @fref{$BJ,;67W;;(B} +\JP @fref{dp_ord}, @fref{$BJ,;67W;;(B} +\EG @fref{dp_ord}, @fref{Distributed computation} @end table -@node lex_hensel_gsl tolex_gsl tolex_gsl_d,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\JP @node lex_hensel_gsl tolex_gsl tolex_gsl_d,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node lex_hensel_gsl tolex_gsl tolex_gsl_d,,, Functions for Groebner basis computation @subsection @code{lex_hensel_gsl}, @code{tolex_gsl}, @code{tolex_gsl_d} @findex lex_hensel_gsl @findex tolex_gsl @@ -784,24 +1573,31 @@ CPU $B;~4V$G$"$j(B, $B$3$NH!?t$N>l9g$O$[$H$s$IDL?.$ @table @t @item lex_hensel_gsl(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{homo}) -:: 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 @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}) -:: $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 @end table @table @var @item return -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item plist, vlist1, vlist2, procs -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item order -$B?t(B, $B%j%9%H$^$?$O9TNs(B +\JP $B?t(B, $B%j%9%H$^$?$O9TNs(B +\EG number, list or matrix @item homo -$B%U%i%0(B +\JP $B%U%i%0(B +\EG flag @end table @itemize @bullet +\BJP @item @code{lex_hensel_gsl()} $B$O(B @code{lex_hensel()} $B$N(B, @code{tolex_gsl()} $B$O(B @code{tolex()} $B$NJQl9g$O$[$H$s$IDL?.$ @code{x0} $B$N(B 1 $BJQ?tB?9`<0(B) $B$J$k7A(B ($B$3$l$r(B SL $B7A<0$H8F$V(B) $B$r;}$D>l9g(B, @code{[[x1,g1,d1],...,[xn,gn,dn],[x0,f0,f0']]} $B$J$k%j%9%H(B ($B$3$l$r(B GSL $B7A<0$H8F$V(B) $B$rJV$9(B. -$B$3$3$G(B, @code{gi} $B$O(B, @code{f0'fi-gi} $B$,(B @code{f0} $B$G3d$j@Z$l$k$h$&$J(B +$B$3$3$G(B, @code{gi} $B$O(B, @code{di*f0'*fi-gi} $B$,(B @code{f0} $B$G3d$j@Z$l$k$h$&$J(B @code{x0} $B$N(B1 $BJQ?tB?9`<0$G(B, $B2r$O(B @code{f0(x0)=0} $B$J$k(B @code{x0} $B$KBP$7(B, @code{[x1=g1/(d1*f0'),...,xn=gn/(dn*f0')]} $B$H$J$k(B. $B<-=q<0=g=x%0%l%V%J4pDl$,>e$N$h$&$J7A$G$J$$>l9g(B, @code{tolex()} $B$K(B @@ -823,6 +1619,36 @@ GSL $B7A<0$K$h$jI=$5$l$k4pDl$O%0%l%V%J4pDl$G$O$J$$$, $B$N%0%l%V%J4pDl$h$jHs>o$K>.$5$$$?$a7W;;$bB.$/(B, $B2r$b5a$a$d$9$$(B. @code{tolex_gsl_d()} $B$GI=<($5$l$k;~4V$O(B, $B$3$NH!?t$,H(B +\JP @item $B;2>H(B +\EG @item References @fref{lex_hensel lex_tl tolex tolex_d tolex_tl}, -@fref{$BJ,;67W;;(B} +\JP @fref{$BJ,;67W;;(B} +\EG @fref{Distributed computation} @end table -@node gr_minipoly minipoly,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\JP @node gr_minipoly minipoly,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node gr_minipoly minipoly,,, Functions for Groebner basis computation @subsection @code{gr_minipoly}, @code{minipoly} @findex gr_minipoly @findex minipoly @table @t @item gr_minipoly(@var{plist},@var{vlist},@var{order},@var{poly},@var{v},@var{homo}) -:: $BB?9`<0$N(B, $B%$%G%"%k$rK!$H$7$?:G>.B?9`<0$N7W;;(B +\JP :: $BB?9`<0$N(B, $B%$%G%"%k$rK!$H$7$?:G>.B?9`<0$N7W;;(B +\EG :: Computation of the minimal polynomial of a polynomial modulo an ideal @item minipoly(@var{plist},@var{vlist},@var{order},@var{poly},@var{v}) -:: $B%0%l%V%J4pDl$rF~NO$H$9$k(B, $BB?9`<0$N:G>.B?9`<0$N7W;;(B +\JP :: $B%0%l%V%J4pDl$rF~NO$H$9$k(B, $BB?9`<0$N:G>.B?9`<0$N7W;;(B +\EG :: Computation of the minimal polynomial of a polynomial modulo an ideal @end table @table @var @item return -$BB?9`<0(B +\JP $BB?9`<0(B +\EG polynomial @item plist, vlist -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item order -$B?t(B, $B%j%9%H$^$?$O9TNs(B +\JP $B?t(B, $B%j%9%H$^$?$O9TNs(B +\EG number, list or matrix @item poly -$BB?9`<0(B +\JP $BB?9`<0(B +\EG polynomial @item v -$BITDj85(B +\JP $BITDj85(B +\EG indeterminate @item homo -$B%U%i%0(B +\JP $B%U%i%0(B +\EG flag @end table @itemize @bullet +\BJP @item @code{gr_minipoly()} $B$O%0%l%V%J4pDl$N7W;;$+$i9T$$(B, @code{minipoly()} $B$O(B $BF~NO$r%0%l%V%J4pDl$H$_$J$9(B. @@ -890,6 +1728,30 @@ K[@var{v}] $B$N85(B f(@var{v}) $B$K(B f(@var{p}) m @item @code{gr_minipoly()} $B$K;XDj$9$k9`=g=x$H$7$F$O(B, $BDL>oA4H(B +\JP @item $B;2>H(B +\EG @item References @fref{lex_hensel lex_tl tolex tolex_d tolex_tl}. @end table -@node tolexm minipolym,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\JP @node tolexm minipolym,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node tolexm minipolym,,, Functions for Groebner basis computation @subsection @code{tolexm}, @code{minipolym} @findex tolexm @findex minipolym @table @t @item tolexm(@var{plist},@var{vlist1},@var{order},@var{vlist2},@var{mod}) -:: $BK!(B @var{mod} $B$G$N4pDlJQ49$K$h$k%0%l%V%J4pDl7W;;(B +\JP :: $BK!(B @var{mod} $B$G$N4pDlJQ49$K$h$k%0%l%V%J4pDl7W;;(B +\EG :: Groebner basis computation modulo @var{mod} by change of ordering. @item minipolym(@var{plist},@var{vlist1},@var{order},@var{poly},@var{v},@var{mod}) -:: $BK!(B @var{mod} $B$G$N%0%l%V%J4pDl$K$h$kB?9`<0$N:G>.B?9`<0$N7W;;(B +\JP :: $BK!(B @var{mod} $B$G$N%0%l%V%J4pDl$K$h$kB?9`<0$N:G>.B?9`<0$N7W;;(B +\EG :: Minimal polynomial computation modulo @var{mod} the same method as @end table @table @var @item return -@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 @item plist, vlist1, vlist2 -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item order -$B?t(B, $B%j%9%H$^$?$O9TNs(B +\JP $B?t(B, $B%j%9%H$^$?$O9TNs(B +\EG number, list or matrix @item mod -$BAG?t(B +\JP $BAG?t(B +\EG prime @end table @itemize @bullet +\BJP @item $BF~NO(B @var{plist} $B$O$$$:$l$b(B $BJQ?t=g=x(B @var{vlist1}, $B9`=g=x7?(B @var{order}, $BK!(B @var{mod} $B$K$*$1$k%0%l%V%J4pDl$G$J$1$l$P$J$i$J$$(B. @@ -938,6 +1809,17 @@ K[@var{v}] $B$N85(B f(@var{v}) $B$K(B f(@var{p}) m @item @code{tolexm()} $B$O(B FGLM $BK!$K$h$k4pDlJQ49$K$h$j(B @var{vlist2}, $B<-=q<0=g=x$K$h$k%0%l%V%J4pDl$r7W;;$9$k(B. +\E +\BEG +@item +An input @var{plist} must be a Groebner basis modulo @var{mod} +with respect to the variable order @var{vlist1} and the order type @var{order}. +@item +@code{minipolym()} executes the same computation as in @code{minipoly}. +@item +@code{tolexm()} computes a lex order Groebner basis modulo @var{mod} +with respect to the variable order @var{vlist2}, by using FGLM algorithm. +\E @end itemize @example @@ -948,12 +1830,14 @@ z^32+11405*z^31+20868*z^30+21602*z^29+... @end example @table @t -@item $B;2>H(B +\JP @item $B;2>H(B +\EG @item References @fref{lex_hensel lex_tl tolex tolex_d tolex_tl}, @fref{gr_minipoly minipoly}. @end table -@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,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dp_gr_main dp_gr_mod_main,,, Functions for Groebner basis computation @subsection @code{dp_gr_main}, @code{dp_gr_mod_main} @findex dp_gr_main @findex dp_gr_mod_main @@ -961,23 +1845,30 @@ z^32+11405*z^31+20868*z^30+21602*z^29+... @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}) -:: $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) @end table @table @var @item return -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item plist, vlist -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item order -$B?t(B, $B%j%9%H$^$?$O9TNs(B +\JP $B?t(B, $B%j%9%H$^$?$O9TNs(B +\EG number, list or matrix @item homo -$B%U%i%0(B +\JP $B%U%i%0(B +\EG flag @item modular -$B%U%i%0$^$?$OAG?t(B +\JP $B%U%i%0$^$?$OAG?t(B +\EG flag or prime @end table @itemize @bullet +\BJP @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 @@ -1009,17 +1900,56 @@ z^32+11405*z^31+20868*z^30+21602*z^29+... @item @var{homo}, @var{modular} $B$NB>$K(B, @code{dp_gr_flags()} $B$G@_Dj$5$l$k(B $B$5$^$6$^$J%U%i%0$K$h$j7W;;$,@)8f$5$l$k(B. +\E +\BEG +@item +These functions are fundamental built-in functions for Groebner basis +computation and @code{gr()},@code{hgr()} and @code{gr_mod()} +are all interfaces to these functions. +@item +If @var{homo} is not equal to 0, homogenization is applied before entering +Buchberger algorithm +@item +For @code{dp_gr_mod_main()}, @var{modular} means a computation over +GF(@var{modular}). +For @code{dp_gr_main()}, @var{modular} has the following mean. +@enumerate +@item +If @var{modular} is 1 , trace lifting is used. Primes for trace lifting +are generated by @code{lprime()}, starting from @code{lprime(0)}, until +the computation succeeds. +@item +If @var{modular} is an integer greater than 1, the integer is regarded as a +prime and trace lifting is executed by using the prime. If the computation +fails then 0 is returned. +@item +If @var{modular} is negative, the above rule is applied for @var{-modular} +but the Groebner basis check and ideal-membership check are omitted in +the last stage of trace lifting. +@end enumerate + +@item +@code{gr(P,V,O)}, @code{hgr(P,V,O)} and @code{gr_mod(P,V,O,M)} execute +@code{dp_gr_main(P,V,0,1,O)}, @code{dp_gr_main(P,V,1,1,O)} +and @code{dp_gr_mod_main(P,V,0,M,O)} respectively. +@item +Actual computation is controlled by various parameters set by +@code{dp_gr_flags()}, other then by @var{homo} and @var{modular}. +\E @end itemize @table @t -@item $B;2>H(B +\JP @item $B;2>H(B +\EG @item References @fref{dp_ord}, @fref{dp_gr_flags dp_gr_print}, @fref{gr hgr gr_mod}, -@fref{$B7W;;$*$h$SI=<($N@)8f(B}. +\JP @fref{$B7W;;$*$h$SI=<($N@)8f(B}. +\EG @fref{Controlling Groebner basis computations} @end table -@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,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dp_f4_main dp_f4_mod_main,,, Functions for Groebner basis computation @subsection @code{dp_f4_main}, @code{dp_f4_mod_main} @findex dp_f4_main @findex dp_f4_mod_main @@ -1027,19 +1957,24 @@ z^32+11405*z^31+20868*z^30+21602*z^29+... @table @t @item dp_f4_main(@var{plist},@var{vlist},@var{order}) @itemx dp_f4_mod_main(@var{plist},@var{vlist},@var{order}) -:: 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) @end table @table @var @item return -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item plist, vlist -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item order -$B?t(B, $B%j%9%H$^$?$O9TNs(B +\JP $B?t(B, $B%j%9%H$^$?$O9TNs(B +\EG number, list or matrix @end table @itemize @bullet +\BJP @item F4 $B%"%k%4%j%:%`$K$h$j%0%l%V%J4pDl$N7W;;$r9T$&(B. @item @@ -1049,17 +1984,32 @@ F4 $B%"%k%4%j%:%`$O(B, J.C. Faugere $B$K$h$jDs>'$5$ @item $B0z?t$*$h$SF0:n$O$=$l$>$l(B @code{dp_gr_main()}, @code{dp_gr_mod_main()} $B$HF1MM$G$"$k(B. +\E +\BEG +@item +These functions compute Groebner bases by F4 algorithm. +@item +F4 is a new generation algorithm for Groebner basis computation +invented by J.C. Faugere. The current implementation of @code{dp_f4_main()} +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()}. +\E @end itemize @table @t -@item $B;2>H(B +\JP @item $B;2>H(B +\EG @item References @fref{dp_ord}, @fref{dp_gr_flags dp_gr_print}, @fref{gr hgr gr_mod}, -@fref{$B7W;;$*$h$SI=<($N@)8f(B}. +\JP @fref{$B7W;;$*$h$SI=<($N@)8f(B}. +\EG @fref{Controlling Groebner basis computations} @end table -@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 @subsection @code{dp_gr_flags}, @code{dp_gr_print} @findex dp_gr_flags @findex dp_gr_print @@ -1067,17 +2017,23 @@ F4 $B%"%k%4%j%:%`$O(B, J.C. Faugere $B$K$h$jDs>'$5$ @table @t @item dp_gr_flags([@var{list}]) @itemx dp_gr_print([@var{0|1}]) -:: $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 +and showing informations. +\E @end table @table @var @item return -$B@_DjCM(B +\JP $B@_DjCM(B +\EG value currently set @item list -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @end table @itemize @bullet +\BJP @item @code{dp_gr_main()}, @code{dp_gr_mod_main()} $BH$9$k(B. @@ -1091,30 +2047,54 @@ F4 $B%"%k%4%j%:%`$O(B, J.C. Faugere $B$K$h$jDs>'$5$ $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 $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 +@item +@code{dp_gr_flags()} sets and shows various parameters for Groebner basis + computation. +@item +If no argument is specified the current settings are returned. +@item +Arguments must be specified as a list such as + @code{["Print",1,"NoSugar",1,...]}. Names of parameters must be character +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. +uses the value as a flag for showing intermediate informations. +\E @end itemize @table @t -@item $B;2>H(B -@fref{$B7W;;$*$h$SI=<($N@)8f(B} +\JP @item $B;2>H(B +\EG @item References +\JP @fref{$B7W;;$*$h$SI=<($N@)8f(B} +\EG @fref{Controlling Groebner basis computations} @end table -@node dp_ord,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\JP @node dp_ord,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dp_ord,,, Functions for Groebner basis computation @subsection @code{dp_ord} @findex dp_ord @table @t @item dp_ord([@var{order}]) -:: $BJQ?t=g=x7?$N@_Dj(B, $B;2>H(B +\JP :: $BJQ?t=g=x7?$N@_Dj(B, $B;2>H(B +\EG :: Set and show the ordering type. @end table @table @var @item return -$BJQ?t=g=x7?(B ($B?t(B, $B%j%9%H$^$?$O9TNs(B) +\JP $BJQ?t=g=x7?(B ($B?t(B, $B%j%9%H$^$?$O9TNs(B) +\EG ordering type (number, list or matrix) @item order -$B?t(B, $B%j%9%H$^$?$O9TNs(B +\JP $B?t(B, $B%j%9%H$^$?$O9TNs(B +\EG number, list or matrix @end table @itemize @bullet +\BJP @item $B0z?t$,$"$k;~(B, $BJQ?t=g=x7?$r(B @var{order} $B$K@_Dj$9$k(B. $B0z?t$,$J$$;~(B, $B8=:_@_Dj$5$l$F$$$kJQ?t=g=x7?$rJV$9(B. @@ -1137,6 +2117,34 @@ F4 $B%"%k%4%j%:%`$O(B, J.C. Faugere $B$K$h$jDs>'$5$ @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. +\E +\BEG +@item +If an argument is specified, the function +sets the current ordering type to @var{order}. +If no argument is specified, the function returns the ordering +type currently set. + +@item +There are two types of functions concerning distributed polynomial, +functions which take a ordering type and those which don't take it. +The latter ones use the current setting. + +@item +Functions such as @code{gr()}, which need a ordering type as an argument, +call @code{dp_ord()} internally during the execution. +The setting remains after the execution. + +Fundamental arithmetics for distributed polynomial also use the current +setting. Therefore, when such arithmetics for distributed polynomials +are done, the current setting must coincide with the ordering type +which was used upon the creation of the polynomials. It is assumed +that such polynomials were generated under the same ordering type. + +@item +Type of term ordering must be correctly set by this function +when functions other than top level functions are called directly. +\E @end itemize @example @@ -1149,33 +2157,51 @@ F4 $B%"%k%4%j%:%`$O(B, J.C. Faugere $B$K$h$jDs>'$5$ @end example @table @t -@item $B;2>H(B -@fref{$B9`=g=x$N@_Dj(B} +\JP @item $B;2>H(B +\EG @item References +\JP @fref{$B9`=g=x$N@_Dj(B} +\EG @fref{Setting term orderings} @end table -@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 @subsection @code{dp_ptod} @findex dp_ptod @table @t @item dp_ptod(@var{poly},@var{vlist}) -:: $BB?9`<0$rJ,;6I=8=B?9`<0$KJQ49$9$k(B. +\JP :: $BB?9`<0$rJ,;6I=8=B?9`<0$KJQ49$9$k(B. +\EG :: Converts an ordinary polynomial into a distributed polynomial. @end table @table @var @item return -$BJ,;6I=8=B?9`<0(B +\JP $BJ,;6I=8=B?9`<0(B +\EG distributed polynomial @item poly -$BB?9`<0(B +\JP $BB?9`<0(B +\EG polynomial @item vlist -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @end table @itemize @bullet +\BJP @item $BJQ?t=g=x(B @var{vlist} $B$*$h$S8=:_$NJQ?t=g=x7?$K=>$C$FJ,;6I=8=B?9`<0$KJQ49$9$k(B. @item @var{vlist} $B$K4^$^$l$J$$ITDj85$O(B, $B78?tBN$KB0$9$k$H$7$FJQ49$5$l$k(B. +\E +\BEG +@item +According to the variable ordering @var{vlist} and current +type of term ordering, this function converts an ordinary +polynomial into a distributed polynomial. +@item +Indeterminates not included in @var{vlist} are regarded to belong to +the coefficient field. +\E @end itemize @example @@ -1189,34 +2215,50 @@ F4 $B%"%k%4%j%:%`$O(B, J.C. Faugere $B$K$h$jDs>'$5$ @end example @table @t -@item $B;2>H(B +\JP @item $B;2>H(B +\EG @item References @fref{dp_dtop}, @fref{dp_ord}. @end table -@node dp_dtop,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\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} @findex dp_dtop @table @t @item dp_dtop(@var{dpoly},@var{vlist}) -:: $BJ,;6I=8=B?9`<0$rB?9`<0$KJQ49$9$k(B. +\JP :: $BJ,;6I=8=B?9`<0$rB?9`<0$KJQ49$9$k(B. +\EG :: Converts a distributed polynomial into an ordinary polynomial. @end table @table @var @item return -$BB?9`<0(B +\JP $BB?9`<0(B +\EG polynomial @item dpoly -$BJ,;6I=8=B?9`<0(B +\JP $BJ,;6I=8=B?9`<0(B +\EG distributed polynomial @item vlist -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @end table @itemize @bullet +\BJP @item $BJ,;6I=8=B?9`<0$r(B, $BM?$($i$l$?ITDj85%j%9%H$rMQ$$$FB?9`<0$KJQ49$9$k(B. @item $BITDj85%j%9%H$O(B, $BD9$5J,;6I=8=B?9`<0$NJQ?t$N8D?t$H0lCW$7$F$$$l$P2?$G$b$h$$(B. +\E +\BEG +@item +This function converts a distributed polynomial into an ordinary polynomial +according to a list of indeterminates @var{vlist}. +@item +@var{vlist} is such a list that its length coincides with the number of +variables of @var{dpoly}. +\E @end itemize @example @@ -1226,30 +2268,41 @@ F4 $B%"%k%4%j%:%`$O(B, J.C. Faugere $B$K$h$jDs>'$5$ z^2+(2*a+2*b)*z+a^2+2*b*a+b^2 @end example -@node dp_mod dp_rat,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\JP @node dp_mod dp_rat,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dp_mod dp_rat,,, Functions for Groebner basis computation @subsection @code{dp_mod}, @code{dp_rat} @findex dp_mod @findex dp_rat @table @t @item dp_mod(@var{p},@var{mod},@var{subst}) -:: $BM-M}?t78?tJ,;6I=8=B?9`<0$NM-8BBN78?t$X$NJQ49(B +\JP :: $BM-M}?t78?tJ,;6I=8=B?9`<0$NM-8BBN78?t$X$NJQ49(B +\EG :: Converts a disributed polynomial into one with coefficients in a finite field. @item dp_rat(@var{p}) -:: $BM-8BBN78?tJ,;6I=8=B?9`<0$NM-M}?t78?t$X$NJQ49(B +\JP :: $BM-8BBN78?tJ,;6I=8=B?9`<0$NM-M}?t78?t$X$NJQ49(B +\BEG +:: Converts a distributed polynomial with coefficients in a finite field into +one with coefficients in the rationals. +\E @end table @table @var @item return -$BJ,;6I=8=B?9`<0(B +\JP $BJ,;6I=8=B?9`<0(B +\EG distributed polynomial @item p -$BJ,;6I=8=B?9`<0(B +\JP $BJ,;6I=8=B?9`<0(B +\EG distributed polynomial @item mod -$BAG?t(B +\JP $BAG?t(B +\EG prime @item subst -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @end table @itemize @bullet +\BJP @item @code{dp_nf_mod()}, @code{dp_true_nf_mod()} $B$O(B, $BF~NO$H$7$FM-8BBN78?t$N(B $BJ,;6I=8=B?9`<0$rI,MW$H$9$k(B. $B$3$N$h$&$J>l9g(B, @code{dp_mod()} $B$K$h$j(B @@ -1263,38 +2316,64 @@ z^2+(2*a+2*b)*z+a^2+2*b*a+b^2 @var{subst} $B$O(B, $B78?t$,M-M}<0$N>l9g(B, $B$=$NM-M}<0$NJQ?t$K$"$i$+$8$a?t$rBeF~(B $B$7$?8eM-8BBN78?t$KJQ49$9$k$H$$$&A`:n$r9T$&:]$N(B, $BBeF~CM$r;XDj$9$k$b$N$G(B, @code{[[@var{var},@var{value}],...]} $B$N7A$N%j%9%H$G$"$k(B. +\E +\BEG +@item +@code{dp_nf_mod()} and @code{dp_true_nf_mod()} require +distributed polynomials with coefficients in a finite field as arguments. +@code{dp_mod()} is used to convert distributed polynomials with rational +number coefficients into appropriate ones. +Polynomials with coefficients in a finite field +cannot be used as inputs of operations with polynomials +with rational number coefficients. @code{dp_rat()} is used for such cases. +@item +The ground finite field must be set in advance by using @code{setmod()}. +@item +@var{subst} is such a list as @code{[[@var{var},@var{value}],...]}. +This is valid when the ground field of the input polynomial is a +rational function field. @var{var}'s are variables in the ground field and +the list means that @var{value} is substituted for @var{var} before +converting the coefficients into elements of a finite field. +\E @end itemize @example @end example @table @t -@item $B;2>H(B +\JP @item $B;2>H(B +\EG @item References @fref{dp_nf dp_nf_mod dp_true_nf dp_true_nf_mod}, @fref{subst psubst}, @fref{setmod}. @end table -@node dp_homo dp_dehomo,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\JP @node dp_homo dp_dehomo,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dp_homo dp_dehomo,,, Functions for Groebner basis computation @subsection @code{dp_homo}, @code{dp_dehomo} @findex dp_homo @findex dp_dehomo @table @t @item dp_homo(@var{dpoly}) -:: $BJ,;6I=8=B?9`<0$N@FH(B +\JP @item $B;2>H(B +\EG @item References @fref{gr hgr gr_mod}. @end table -@node dp_ptozp dp_prim,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\JP @node dp_ptozp dp_prim,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dp_ptozp dp_prim,,, Functions for Groebner basis computation @subsection @code{dp_ptozp}, @code{dp_prim} @findex dp_ptozp @findex dp_prim @table @t @item dp_ptozp(@var{dpoly}) -:: $BDj?tG\$7$F78?t$r@0?t78?t$+$D78?t$N@0?t(B GCD $B$r(B 1 $B$K$9$k(B. +\JP :: $BDj?tG\$7$F78?t$r@0?t78?t$+$D78?t$N@0?t(B GCD $B$r(B 1 $B$K$9$k(B. +\BEG +:: Converts a distributed polynomial @var{poly} with rational coefficients +into an integral distributed polynomial such that GCD of all its coefficients +is 1. +\E @itemx dp_prim(@var{dpoly}) -:: $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. +\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 +coefficients into an integral distributed polynomial such that polynomial +GCD of all its coefficients is 1. +\E @end table @table @var @item return -$BJ,;6I=8=B?9`<0(B +\JP $BJ,;6I=8=B?9`<0(B +\EG distributed polynomial @item dpoly -$BJ,;6I=8=B?9`<0(B +\JP $BJ,;6I=8=B?9`<0(B +\EG distributed polynomial @end table @itemize @bullet +\BJP @item @code{dp_ptozp()} $B$O(B, @code{ptozp()} $B$KAjEv$9$kA`:n$rJ,;6I=8=B?9`<0$K(B $BBP$7$F9T$&(B. $B78?t$,B?9`<0$r4^$`>l9g(B, $B78?t$K4^$^$l$kB?9`<06&DL0x;R$O(B @@ -1350,6 +2461,15 @@ z^2+(2*a+2*b)*z+a^2+2*b*a+b^2 @item @code{dp_prim()} $B$O(B, $B78?t$,B?9`<0$r4^$`>l9g(B, $B78?t$K4^$^$l$kB?9`<06&DL0x;R(B $B$rH(B +\JP @item $B;2>H(B +\EG @item References @fref{ptozp}. @end table -@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,,, $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 @subsection @code{dp_nf}, @code{dp_nf_mod}, @code{dp_true_nf}, @code{dp_true_nf_mod} @findex dp_nf @findex dp_true_nf @@ -1376,29 +2498,44 @@ z^2+(2*a+2*b)*z+a^2+2*b*a+b^2 @table @t @item dp_nf(@var{indexlist},@var{dpoly},@var{dpolyarray},@var{fullreduce}) @item dp_nf_mod(@var{indexlist},@var{dpoly},@var{dpolyarray},@var{fullreduce},@var{mod}) -:: $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 +:: Computes the normal form of a distributed polynomial. +(The result may be multiplied by a constant in the ground field.) +\E @item dp_true_nf(@var{indexlist},@var{dpoly},@var{dpolyarray},@var{fullreduce}) @item dp_true_nf_mod(@var{indexlist},@var{dpoly},@var{dpolyarray},@var{fullreduce},@var{mod}) -:: $BJ,;6I=8=B?9`<0$N@55,7A$r5a$a$k(B. ($B??$N7k2L$r(B @code{[$BJ,;R(B, $BJ,Jl(B]} $B$N7A$GJV$9(B) +\JP :: $BJ,;6I=8=B?9`<0$N@55,7A$r5a$a$k(B. ($B??$N7k2L$r(B @code{[$BJ,;R(B, $BJ,Jl(B]} $B$N7A$GJV$9(B) +\BEG +:: Computes the normal form of a distributed polynomial. (The true result +is returned in such a list as @code{[numerator, denominator]}) +\E @end table @table @var @item return -@code{dp_nf()} : $BJ,;6I=8=B?9`<0(B, @code{dp_true_nf()} : $B%j%9%H(B +\JP @code{dp_nf()} : $BJ,;6I=8=B?9`<0(B, @code{dp_true_nf()} : $B%j%9%H(B +\EG @code{dp_nf()} : distributed polynomial, @code{dp_true_nf()} : list @item indexlist -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item dpoly -$BJ,;6I=8=B?9`<0(B +\JP $BJ,;6I=8=B?9`<0(B +\EG distributed polynomial @item dpolyarray -$BG[Ns(B +\JP $BG[Ns(B +\EG array of distributed polynomial @item fullreduce -$B%U%i%0(B +\JP $B%U%i%0(B +\EG flag @item mod -$BAG?t(B +\JP $BAG?t(B +\EG prime @end table @itemize @bullet +\BJP @item $BJ,;6I=8=B?9`<0(B @var{dpoly} $B$N@55,7A$r5a$a$k(B. @item @@ -1429,7 +2566,43 @@ z^2+(2*a+2*b)*z+a^2+2*b*a+b^2 $BJ,;6I=8=$G$J$$8GDj$5$l$?B?9`<0=89g$K$h$k@55,7A$rB??t5a$a$kI,MW$,$"$k>l9g(B $B$KJXMx$G$"$k(B. $BC10l$N1i;;$K4X$7$F$O(B, @code{p_nf}, @code{p_true_nf} $B$r(B $BMQ$$$k$H$h$$(B. - +\E +\BEG +@item +Computes the normal form of a distributed polynomial. +@item +@code{dp_nf_mod()} and @code{dp_true_nf_mod()} require +distributed polynomials with coefficients in a finite field as arguments. +@item +The result of @code{dp_nf()} may be multiplied by a constant in the +ground field in order to make the result integral. The same is true +for @code{dp_nf_mod()}, but it returns the true normal form if +the ground field is a finite field. +@item +@code{dp_true_nf()} and @code{dp_true_nf_mod()} return +such a list as @code{[@var{nm},@var{dn}]}. +Here @var{nm} is a distributed 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. +@item +@var{dpolyarray} is a vector whose components are distributed polynomials +and @var{indexlist} is a list of indices which is used for the normal form +computation. +@item +When argument @var{fullreduce} has non-zero value, +all terms are reduced. When it has value 0, +only the head term is reduced. +@item +As for the polynomials specified by @var{indexlist}, one specified by +an index placed at the preceding position has priority to be selected. +@item +In general, the result of the function may be different depending on +@var{indexlist}. However, the result is unique for Groebner bases. +@item +These functions are useful when a fixed non-distributed polynomial set +is used as a set of reducers to compute normal forms of many polynomials. +For single computation @code{p_nf} and @code{p_true_nf} are sufficient. +\E @end itemize @example @@ -1457,14 +2630,16 @@ u4^2+(6*u3+2*u2+6*u1-2)*u4+9*u3^2+(6*u2+18*u1-6)*u3+u2 @end example @table @t -@item $B;2>H(B +\JP @item $B;2>H(B +\EG @item References @fref{dp_dtop}, @fref{dp_ord}, @fref{dp_mod dp_rat}, @fref{p_nf p_nf_mod p_true_nf p_true_nf_mod}. @end table -@node dp_hm dp_ht dp_hc dp_rest,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\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} @findex dp_hm @findex dp_ht @@ -1473,28 +2648,49 @@ u4^2+(6*u3+2*u2+6*u1-2)*u4+9*u3^2+(6*u2+18*u1-6)*u3+u2 @table @t @item dp_hm(@var{dpoly}) -:: $BF,C19`<0$r> @end example -@node dp_td dp_sugar,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\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} @findex dp_td @findex dp_sugar @table @t @item dp_td(@var{dpoly}) -:: $BF,9`$NA4.8xG\9`$rJV$9(B. +\JP :: $B:G>.8xG\9`$rJV$9(B. +\EG :: Returns the least common multiple of the head terms of the given two polynomials. @end table @table @var @item return -$BJ,;6I=8=B?9`<0(B +\JP $BJ,;6I=8=B?9`<0(B +\EG distributed polynomial @item dpoly1, dpoly2 -$BJ,;6I=8=B?9`<0(B +\JP $BJ,;6I=8=B?9`<0(B +\EG distributed polynomial @end table @itemize @bullet +\BJP @item $B$=$l$>$l$N0z?t$NF,9`$N:G>.8xG\9`$rJV$9(B. $B78?t$O(B 1 $B$G$"$k(B. +\E +\BEG +@item +Returns the least common multiple of the head terms of the given +two polynomials, where coefficient is always set to 1. +\E @end itemize @example @@ -1585,32 +2813,46 @@ u4^2+(6*u3+2*u2+6*u1-2)*u4+9*u3^2+(6*u2+18*u1-6)*u3+u2 @end example @table @t -@item $B;2>H(B +\JP @item $B;2>H(B +\EG @item References @fref{p_nf p_nf_mod p_true_nf p_true_nf_mod}. @end table -@node dp_redble,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\JP @node dp_redble,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dp_redble,,, Functions for Groebner basis computation @subsection @code{dp_redble} @findex dp_redble @table @t @item dp_redble(@var{dpoly1},@var{dpoly2}) -:: $BF,9`$I$&$7$,@0=|2DG=$+$I$&$+D4$Y$k(B. +\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 -$B@0?t(B +\JP $B@0?t(B +\EG integer @item dpoly1, dpoly2 -$BJ,;6I=8=B?9`<0(B +\JP $BJ,;6I=8=B?9`<0(B +\EG distributed 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 @example @@ -1626,32 +2868,46 @@ u4^2+(6*u3+2*u2+6*u1-2)*u4+9*u3^2+(6*u2+18*u1-6)*u3+u2 @end example @table @t -@item $B;2>H(B +\JP @item $B;2>H(B +\EG @item References @fref{dp_red dp_red_mod}. @end table -@node dp_subd,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\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} @findex dp_subd @table @t @item dp_subd(@var{dpoly1},@var{dpoly2}) -:: $BF,9`$N>&C19`<0$rJV$9(B. +\JP :: $BF,9`$N>&C19`<0$rJV$9(B. +\EG :: Returns the quotient monomial of the head terms. @end table @table @var @item return -$BJ,;6I=8=B?9`<0(B +\JP $BJ,;6I=8=B?9`<0(B +\EG distributed polynomial @item dpoly1, dpoly2 -$BJ,;6I=8=B?9`<0(B +\JP $BJ,;6I=8=B?9`<0(B +\EG distributed polynomial @end table @itemize @bullet +\BJP @item @code{dp_ht(@var{dpoly1})/dp_ht(@var{dpoly2})} $B$r5a$a$k(B. $B7k2L$N78?t$O(B 1 $B$G$"$k(B. @item $B3d$j@Z$l$k$3$H$,$"$i$+$8$a$o$+$C$F$$$kI,MW$,$"$k(B. +\E +\BEG +@item +Gets @code{dp_ht(@var{dpoly1})/dp_ht(@var{dpoly2})}. +The coefficient of the result is always set to 1. +@item +Divisibility assumed. +\E @end itemize @example @@ -1660,37 +2916,53 @@ u4^2+(6*u3+2*u2+6*u1-2)*u4+9*u3^2+(6*u2+18*u1-6)*u3+u2 @end example @table @t -@item $B;2>H(B +\JP @item $B;2>H(B +\EG @item References @fref{dp_red dp_red_mod}. @end table -@node dp_vtoe dp_etov,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\JP @node dp_vtoe dp_etov,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dp_vtoe dp_etov,,, Functions for Groebner basis computation @subsection @code{dp_vtoe}, @code{dp_etov} @findex dp_vtoe @findex dp_etov @table @t @item dp_vtoe(@var{vect}) -:: $B;X?t%Y%/%H%k$r9`$KJQ49(B +\JP :: $B;X?t%Y%/%H%k$r9`$KJQ49(B +\EG :: Converts an exponent vector into a term. @item dp_etov(@var{dpoly}) -:: $BF,9`$r;X?t%Y%/%H%k$KJQ49(B +\JP :: $BF,9`$r;X?t%Y%/%H%k$KJQ49(B +\EG :: Convert the head term of a distributed polynomial into an exponent vector. @end table @table @var @item return -@code{dp_vtoe} : $BJ,;6I=8=B?9`<0(B, @code{dp_etov} : $B%Y%/%H%k(B +\JP @code{dp_vtoe} : $BJ,;6I=8=B?9`<0(B, @code{dp_etov} : $B%Y%/%H%k(B +\EG @code{dp_vtoe} : distributed polynomial, @code{dp_etov} : vector @item vect -$B%Y%/%H%k(B +\JP $B%Y%/%H%k(B +\EG vector @item dpoly -$BJ,;6I=8=B?9`<0(B +\JP $BJ,;6I=8=B?9`<0(B +\EG distributed polynomial @end table @itemize @bullet +\BJP @item @code{dp_vtoe()} $B$O(B, $B%Y%/%H%k(B @var{vect} $B$r;X?t%Y%/%H%k$H$9$k9`$r@8@.$9$k(B. @item @code{dp_etov()} $B$O(B, $BJ,;6I=8=B?9`<0(B @code{dpoly} $B$NF,9`$N;X?t%Y%/%H%k$r(B $B%Y%/%H%k$KJQ49$9$k(B. +\E +\BEG +@item +@code{dp_vtoe()} generates a term whose exponent vector is @var{vect}. +@item +@code{dp_etov()} generates a vector which is the exponent vector of the +head term of @code{dpoly}. +\E @end itemize @example @@ -1703,23 +2975,28 @@ u4^2+(6*u3+2*u2+6*u1-2)*u4+9*u3^2+(6*u2+18*u1-6)*u3+u2 (1)*<<1,2,4>> @end example -@node dp_mbase,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\JP @node dp_mbase,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dp_mbase,,, Functions for Groebner basis computation @subsection @code{dp_mbase} @findex dp_mbase @table @t @item dp_mbase(@var{dplist}) -:: monomial $B4pDl$N7W;;(B +\JP :: monomial $B4pDl$N7W;;(B +\EG :: Computes the monomial basis @end table @table @var @item return -$BJ,;6I=8=B?9`<0$N%j%9%H(B +\JP $BJ,;6I=8=B?9`<0$N%j%9%H(B +\EG list of distributed polynomial @item dplist -$BJ,;6I=8=B?9`<0$N%j%9%H(B +\JP $BJ,;6I=8=B?9`<0$N%j%9%H(B +\EG list of distributed polynomial @end table @itemize @bullet +\BJP @item $B$"$k=g=x$G%0%l%V%J4pDl$H$J$C$F$$$kB?9`<0=89g$N(B, $B$=$N=g=x$K4X$9$kJ,;6I=8=(B $B$G$"$k(B @var{dplist} $B$K$D$$$F(B, @@ -1727,6 +3004,18 @@ u4^2+(6*u3+2*u2+6*u1-2)*u4+9*u3^2+(6*u2+18*u1-6)*u3+u2 K $B>eM-8BH(B +\JP @item $B;2>H(B +\EG @item References @fref{gr hgr gr_mod}. @end table -@node dp_mag,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\JP @node dp_mag,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dp_mag,,, Functions for Groebner basis computation @subsection @code{dp_mag} @findex dp_mag @table @t @item dp_mag(@var{p}) -:: $B78?t$N%S%C%HD9$NOB$rJV$9(B +\JP :: $B78?t$N%S%C%HD9$NOB$rJV$9(B +\EG :: Computes the sum of bit lengths of coefficients of a distributed polynomial. @end table @table @var @item return -$B?t(B +\JP $B?t(B +\EG integer @item p -$BJ,;6I=8=B?9`<0(B +\JP $BJ,;6I=8=B?9`<0(B +\EG distributed polynomial @end table @itemize @bullet +\BJP @item $BJ,;6I=8=B?9`<0$N78?t$K8=$l$kM-M}?t$K$D$-(B, $B$=$NJ,JlJ,;R(B ($B@0?t$N>l9g$OJ,;R(B) $B$N%S%C%HD9$NAmOB$rJV$9(B. @@ -1772,6 +3067,20 @@ u1*u2,u1^2,u4*u0,u3*u0,u2*u0,u1*u0,u0^2,u4,u3,u2,u1,u0 @item @code{dp_gr_flags()} $B$G(B, @code{ShowMag}, @code{Print} $B$r(B on $B$K$9$k$3$H$K$h$j(B $BESCf@8@.$5$l$kB?9`<0$K$?$$$9$k(B @code{dp_mag()} $B$NCM$r8+$k$3$H$,$G$-$k(B. +\E +\BEG +@item +This function computes the sum of bit lengths of coefficients of a +distributed polynomial @var{p}. If a coefficient is non integral, +the sum of bit lengths of the numerator and the denominator is taken. +@item +This is a measure of the size of a polynomial. Especially for +zero-dimensional system coefficient swells are often serious and +the returned value is useful to detect such swells. +@item +If @code{ShowMag} and @code{Print} for @code{dp_gr_flags()} are on, +values of @code{dp_mag()} for intermediate basis elements are shown. +\E @end itemize @example @@ -1781,11 +3090,13 @@ u1*u2,u1^2,u4*u0,u3*u0,u2*u0,u1*u0,u0^2,u4,u3,u2,u1,u0 @end example @table @t -@item $B;2>H(B +\JP @item $B;2>H(B +\EG @item References @fref{dp_gr_flags dp_gr_print}. @end table -@node dp_red dp_red_mod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\JP @node dp_red dp_red_mod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dp_red dp_red_mod,,, Functions for Groebner basis computation @subsection @code{dp_red}, @code{dp_red_mod} @findex dp_red @findex dp_red_mod @@ -1793,21 +3104,27 @@ u1*u2,u1^2,u4*u0,u3*u0,u2*u0,u1*u0,u0^2,u4,u3,u2,u1,u0 @table @t @item dp_red(@var{dpoly1},@var{dpoly2},@var{dpoly3}) @item dp_red_mod(@var{dpoly1},@var{dpoly2},@var{dpoly3},@var{mod}) -:: $B0l2s$N4JLsA`:n(B +\JP :: $B0l2s$N4JLsA`:n(B +\EG :: Single reduction operation @end table @table @var @item return -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item dpoly1, dpoly2, dpoly3 -$BJ,;6I=8=B?9`<0(B +\JP $BJ,;6I=8=B?9`<0(B +\EG distributed polynomial @item vlist -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item mod -$BAG?t(B +\JP $BAG?t(B +\EG prime @end table @itemize @bullet +\BJP @item @var{dpoly1} + @var{dpoly2} $B$J$kJ,;6I=8=B?9`<0$r(B @var{dpoly3} $B$G(B 1 $B2s4JLs$9$k(B. @@ -1822,6 +3139,26 @@ u1*u2,u1^2,u4*u0,u3*u0,u2*u0,u1*u0,u0^2,u4,u3,u2,u1,u0 $B9`(B @var{t} $B$K$h$j(B @var{a(dpoly1 + dpoly2)-bt dpoly3} $B$H$7$F7W;;$5$l$k(B. @item $B7k2L$O(B, @code{[@var{a dpoly1},@var{a dpoly2 - bt dpoly3}]} $B$J$k%j%9%H$G$"$k(B. +\E +\BEG +@item +Reduces a distributed polynomial, @var{dpoly1} + @var{dpoly2}, +by @var{dpoly3} for single time. +@item +An input for @code{dp_red_mod()} must be converted into a distributed +polynomial with coefficients in a finite field. +@item +This implies that +the divisibility of the head term of @var{dpoly2} by the head term of +@var{dpoly3} is assumed. +@item +When integral coefficients, computation is so carefully performed that +no rational operations appear in the reduction procedure. +It is computed for integers @var{a} and @var{b}, and a term @var{t} as: +@var{a(dpoly1 + dpoly2)-bt dpoly3}. +@item +The result is a list @code{[@var{a dpoly1},@var{a dpoly2 - bt dpoly3}]}. +\E @end itemize @example @@ -1837,11 +3174,13 @@ u1*u2,u1^2,u4*u0,u3*u0,u2*u0,u1*u0,u0^2,u4,u3,u2,u1,u0 @end example @table @t -@item $B;2>H(B +\JP @item $B;2>H(B +\EG @item References @fref{dp_mod dp_rat}. @end table -@node dp_sp dp_sp_mod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\JP @node dp_sp dp_sp_mod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node dp_sp dp_sp_mod,,, Functions for Groebner basis computation @subsection @code{dp_sp}, @code{dp_sp_mod} @findex dp_sp @findex dp_sp_mod @@ -1849,19 +3188,24 @@ u1*u2,u1^2,u4*u0,u3*u0,u2*u0,u1*u0,u0^2,u4,u3,u2,u1,u0 @table @t @item dp_sp(@var{dpoly1},@var{dpoly2}) @item dp_sp_mod(@var{dpoly1},@var{dpoly2},@var{mod}) -:: S-$BB?9`<0$N7W;;(B +\JP :: S-$BB?9`<0$N7W;;(B +\EG :: Computation of an S-polynomial @end table @table @var @item return -$BJ,;6I=8=B?9`<0(B +\JP $BJ,;6I=8=B?9`<0(B +\EG distributed polynomial @item dpoly1, dpoly2 -$BJ,;6I=8=B?9`<0(B +\JP $BJ,;6I=8=B?9`<0(B +\EG distributed polynomial @item mod -$BAG?t(B +\JP $BAG?t(B +\EG prime @end table @itemize @bullet +\BJP @item @var{dpoly1}, @var{dpoly2} $B$N(B S-$BB?9`<0$r7W;;$9$k(B. @item @@ -1869,6 +3213,17 @@ u1*u2,u1^2,u4*u0,u3*u0,u2*u0,u1*u0,u0^2,u4,u3,u2,u1,u0 @item $B7k2L$KM-M}?t(B, $BM-M}<0$,F~$k$N$rHr$1$k$?$a(B, $B7k2L$,Dj?tG\(B, $B$"$k$$$OB?9`<0(B $BG\$5$l$F$$$k2DG=@-$,$"$k(B. +\E +\BEG +@item +This function computes the S-polynomial of @var{dpoly1} and @var{dpoly2}. +@item +Inputs of @code{dp_sp_mod()} must be polynomials with coefficients in a +finite field. +@item +The result may be multiplied by a constant in the ground field in order to +make the result integral. +\E @end itemize @example @@ -1881,10 +3236,12 @@ u1*u2,u1^2,u4*u0,u3*u0,u2*u0,u1*u0,u0^2,u4,u3,u2,u1,u0 @end example @table @t -@item $B;2>H(B +\JP @item $B;2>H(B +\EG @item References @fref{dp_mod dp_rat}. @end table -@node p_nf p_nf_mod p_true_nf p_true_nf_mod,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\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} @findex p_nf @findex p_nf_mod @@ -1894,26 +3251,40 @@ u1*u2,u1^2,u4*u0,u3*u0,u2*u0,u1*u0,u0^2,u4,u3,u2,u1,u0 @table @t @item p_nf(@var{poly},@var{plist},@var{vlist},@var{order}) @itemx p_nf_mod(@var{poly},@var{plist},@var{vlist},@var{order},@var{mod}) -:: $BI=8=B?9`<0$N@55,7A$r5a$a$k(B. ($B7k2L$ODj?tG\$5$l$F$$$k2DG=@-$"$j(B) +\JP :: $BI=8=B?9`<0$N@55,7A$r5a$a$k(B. ($B7k2L$ODj?tG\$5$l$F$$$k2DG=@-$"$j(B) +\BEG +:: Computes the normal form of the given polynomial. +(The result may be multiplied by a constant.) +\E @item p_true_nf(@var{poly},@var{plist},@var{vlist},@var{order}) @itemx p_true_nf_mod(@var{poly},@var{plist},@var{vlist},@var{order},@var{mod}) -:: $BI=8=B?9`<0$N@55,7A$r5a$a$k(B. ($B??$N7k2L$r(B @code{[$BJ,;R(B, $BJ,Jl(B]} $B$N7A$GJV$9(B) +\JP :: $BI=8=B?9`<0$N@55,7A$r5a$a$k(B. ($B??$N7k2L$r(B @code{[$BJ,;R(B, $BJ,Jl(B]} $B$N7A$GJV$9(B) +\BEG +:: Computes the normal form of the given polynomial. (The result is returned +as a form of @code{[numerator, denominator]}) +\E @end table @table @var @item return -@code{p_nf} : $BB?9`<0(B, @code{p_true_nf} : $B%j%9%H(B +\JP @code{p_nf} : $BB?9`<0(B, @code{p_true_nf} : $B%j%9%H(B +\EG @code{p_nf} : polynomial, @code{p_true_nf} : list @item poly -$BB?9`<0(B +\JP $BB?9`<0(B +\EG polynomial @item plist,vlist -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item order -$B?t(B, $B%j%9%H$^$?$O9TNs(B +\JP $B?t(B, $B%j%9%H$^$?$O9TNs(B +\EG number, list or matrix @item mod -$BAG?t(B +\JP $BAG?t(B +\EG prime @end table @itemize @bullet +\BJP @item @samp{gr} $B$GDj5A$5$l$F$$$k(B. @item @@ -1934,6 +3305,30 @@ u1*u2,u1^2,u4*u0,u3*u0,u2*u0,u1*u0,u0^2,u4,u3,u2,u1,u0 @item @code{p_true_nf()}, @code{p_true_nf_mod()} $B$N=PNO$K4X$7$F$O(B, @code{dp_true_nf()}, @code{dp_true_nf_mod()} $B$N9`$r;2>H(B. +\E +\BEG +@item +Defined in the package @samp{gr}. +@item +Obtains the normal form of a polynomial by a polynomial list. +@item +These are interfaces to @code{dp_nf()}, @code{dp_true_nf()}, @code{dp_nf_mod()}, + @code{dp_true_nf_mod} +@item +The polynomial @var{poly} and the polynomials in @var{plist} is +converted, according to the variable ordering @var{vlist} and +type of term ordering @var{otype}, into their distributed polynomial +counterparts and passed to @code{dp_nf()}. +@item +@code{dp_nf()}, @code{dp_true_nf()}, @code{dp_nf_mod()} and +@code{dp_true_nf_mod()} +is called with value 1 for @var{fullreduce}. +@item +The result is converted back into an ordinary polynomial. +@item +As for @code{p_true_nf()}, @code{p_true_nf_mod()} +refer to @code{dp_true_nf()} and @code{dp_true_nf_mod()}. +\E @end itemize @example @@ -1949,34 +3344,42 @@ u1*u2,u1^2,u4*u0,u3*u0,u2*u0,u1*u0,u0^2,u4,u3,u2,u1,u0 @end example @table @t -@item $B;2>H(B +\JP @item $B;2>H(B +\EG @item References @fref{dp_ptod}, @fref{dp_dtop}, @fref{dp_ord}, @fref{dp_nf dp_nf_mod dp_true_nf dp_true_nf_mod}. @end table -@node p_terms,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\JP @node p_terms,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node p_terms,,, Functions for Groebner basis computation @subsection @code{p_terms} @findex p_terms @table @t @item p_terms(@var{poly},@var{vlist},@var{order}) -:: $BB?9`<0$K$"$i$o$l$kC19`$r%j%9%H$K$9$k(B. +\JP :: $BB?9`<0$K$"$i$o$l$kC19`$r%j%9%H$K$9$k(B. +\EG :: Monomials appearing in the given polynomial is collected into a list. @end table @table @var @item return -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item poly -$BB?9`<0(B +\JP $BB?9`<0(B +\EG polynomial @item vlist -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item order -$B?t(B, $B%j%9%H$^$?$O9TNs(B +\JP $B?t(B, $B%j%9%H$^$?$O9TNs(B +\EG number, list or matrix @end table @itemize @bullet +\BJP @item @samp{gr} $B$GDj5A$5$l$F$$$k(B. @item @@ -1986,6 +3389,20 @@ u1*u2,u1^2,u4*u0,u3*u0,u2*u0,u1*u0,u0^2,u4,u3,u2,u1,u0 @item $B%0%l%V%J4pDl$O$7$P$7$P78?t$,5pBg$K$J$k$?$a(B, $Bl9g$,$"$j(B, $B$=$l$i$,Ey$7$$$+$I$&$+$rD4$Y$k$?$a$KMQ$$$k(B. +\E +\BEG +@item +This function checks whether @var{plist1} and @var{plist2} are equal or +not as a set . +@item +For the same input and the same term ordering different +functions for Groebner basis computations may produce different outputs +as lists. This function compares such lists whether they are equal +as a generating set of an ideal. +\E @end itemize @example @@ -2029,7 +3461,8 @@ u0^6,u0^5,u0^4,u0^3,u0^2,u0,1] 1 @end example -@node katsura hkatsura cyclic hcyclic,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\JP @node katsura hkatsura cyclic hcyclic,,, $B%0%l%V%J4pDl$K4X$9$kH!?t(B +\EG @node katsura hkatsura cyclic hcyclic,,, Functions for Groebner basis computation @subsection @code{katsura}, @code{hkatsura}, @code{cyclic}, @code{hcyclic} @findex katsura @findex hkatsura @@ -2041,17 +3474,21 @@ u0^6,u0^5,u0^4,u0^3,u0^2,u0,1] @item hkatsura(@var{n}) @item cyclic(@var{n}) @item hcyclic(@var{n}) -:: $BB?9`<0%j%9%H$N@8@.(B +\JP :: $BB?9`<0%j%9%H$N@8@.(B +\EG :: Generates a polynomial list of standard benchmark. @end table @table @var @item return -$B%j%9%H(B +\JP $B%j%9%H(B +\EG list @item n -$B@0?t(B +\JP $B@0?t(B +\EG integer @end table @itemize @bullet +\BJP @item @code{katsura()} $B$O(B @samp{katsura}, @code{cyclic()} $B$O(B @samp{cyclic} $B$GDj5A$5$l$F$$$k(B. @@ -2061,6 +3498,19 @@ u0^6,u0^5,u0^4,u0^3,u0^2,u0,1] @item @code{cyclic} $B$O(B @code{Arnborg}, @code{Lazard}, @code{Davenport} $B$J$I$N(B $BL>$G8F$P$l$k$3$H$b$"$k(B. +\E +\BEG +@item +Function @code{katsura()} is defined in @samp{katsura}, and +function @code{cyclic()} in @samp{cyclic}. +@item +These functions generate a series of polynomial sets, respectively, +which are often used for testing and bench marking: +@code{katsura}, @code{cyclic} and their homogenized versions. +@item +Polynomial set @code{cyclic} is sometimes called by other name: +@code{Arnborg}, @code{Lazard}, and @code{Davenport}. +\E @end itemize @example @@ -2092,7 +3542,8 @@ u0^2-u0+2*u4^2+2*u3^2+2*u2^2+2*u1^2+2*u5^2] @end example @table @t -@item $B;2>H(B +\JP @item $B;2>H(B +\EG @item References @fref{dp_dtop}. @end table