version 1.3, 2000/03/10 07:18:40 |
version 1.8, 2007/02/15 02:41:38 |
|
|
@comment $OpenXM: OpenXM/src/asir-doc/parts/algnum.texi,v 1.2 1999/12/21 02:47:30 noro Exp $ |
@comment $OpenXM: OpenXM/src/asir-doc/parts/algnum.texi,v 1.7 2003/04/20 08:01:24 noro Exp $ |
\BJP |
\BJP |
@node $BBe?tE*?t$K4X$9$k1i;;(B,,, Top |
@node $BBe?tE*?t$K4X$9$k1i;;(B,,, Top |
@chapter $BBe?tE*?t$K4X$9$k1i;;(B |
@chapter $BBe?tE*?t$K4X$9$k1i;;(B |
|
|
@menu |
@menu |
\BJP |
\BJP |
* $BBe?tE*?t$NI=8=(B:: |
* $BBe?tE*?t$NI=8=(B:: |
|
* $BJ,;6B?9`<0$K$h$kBe?tE*?t$NI=8=(B:: |
* $BBe?tE*?t$N1i;;(B:: |
* $BBe?tE*?t$N1i;;(B:: |
* $BBe?tBN>e$G$N(B 1 $BJQ?tB?9`<0$N1i;;(B:: |
* $BBe?tBN>e$G$N(B 1 $BJQ?tB?9`<0$N1i;;(B:: |
* $BBe?tE*?t$K4X$9$kH!?t$N$^$H$a(B:: |
* $BBe?tE*?t$K4X$9$kH!?t$N$^$H$a(B:: |
\E |
\E |
\BEG |
\BEG |
* Representation of algebraic numbers:: |
* Representation of algebraic numbers:: |
|
* Representation of algebraic numbers by distributed polynomials:: |
* Operations over algebraic numbers:: |
* Operations over algebraic numbers:: |
* Operations for uni-variate polynomials over an algebraic number field:: |
* Operations for uni-variate polynomials over an algebraic number field:: |
* Summary of functions for algebraic numbers:: |
* Summary of functions for algebraic numbers:: |
|
|
[100] |
[100] |
@end example |
@end example |
|
|
|
|
|
@example |
|
@end example |
|
|
\BJP |
\BJP |
@node $BBe?tE*?t$N1i;;(B,,, $BBe?tE*?t$K4X$9$k1i;;(B |
@node $BBe?tE*?t$N1i;;(B,,, $BBe?tE*?t$K4X$9$k1i;;(B |
@section $BBe?tE*?t$N1i;;(B |
@section $BBe?tE*?t$N1i;;(B |
Line 410 into the @b{root} by @code{rattoalgp()} function. |
|
Line 416 into the @b{root} by @code{rattoalgp()} function. |
|
|
|
@example |
@example |
[88] rattoalgp(S,[alg(0)]); |
[88] rattoalgp(S,[alg(0)]); |
(((#0+2)/(#0+2))*t#1^2+((#0^2+2*#0)/(#0+2))*t#1+((2*#0^2+4*#0)/(#0+2)))*x |
(((#0+2)/(#0+2))*t#1^2+((#0^2+2*#0)/(#0+2))*t#1 |
+((1)/(#0+2))*t#1+((1)/(#0+2)) |
+((2*#0^2+4*#0)/(#0+2)))*x+((1)/(#0+2))*t#1+((1)/(#0+2)) |
[89] rattoalgp(S,[alg(0),alg(1)]); |
[89] rattoalgp(S,[alg(0),alg(1)]); |
(((#0^3+6*#0^2+12*#0+8)*#1^2+(#0^4+6*#0^3+12*#0^2+8*#0)*#1+2*#0^4+12*#0^3 |
(((#0^3+6*#0^2+12*#0+8)*#1^2+(#0^4+6*#0^3+12*#0^2+8*#0)*#1 |
+24*#0^2+16*#0)/(#0^3+6*#0^2+12*#0+8))*x+(((#0+2)*#1+#0+2)/(#0^2+4*#0+4)) |
+2*#0^4+12*#0^3+24*#0^2+16*#0)/(#0^3+6*#0^2+12*#0+8))*x |
|
+(((#0+2)*#1+#0+2)/(#0^2+4*#0+4)) |
[90] rattoalgp(S,[alg(1),alg(0)]); |
[90] rattoalgp(S,[alg(1),alg(0)]); |
(((#0+2)*#1^2+(#0^2+2*#0)*#1+2*#0^2+4*#0)/(#0+2))*x+((#1+1)/(#0+2)) |
(((#0+2)*#1^2+(#0^2+2*#0)*#1+2*#0^2+4*#0)/(#0+2))*x |
|
+((#1+1)/(#0+2)) |
[91] simpalg(@@89); |
[91] simpalg(@@89); |
(#1^2+#0*#1+2*#0)*x+((-1/5*#0+2/5)*#1-1/5*#0+2/5) |
(#1^2+#0*#1+2*#0)*x+((-1/5*#0+2/5)*#1-1/5*#0+2/5) |
[92] simpalg(@@90); |
[92] simpalg(@@90); |
Line 444 used for your own simplification. |
|
Line 452 used for your own simplification. |
|
\E |
\E |
|
|
\BJP |
\BJP |
|
@node $BJ,;6B?9`<0$K$h$kBe?tE*?t$NI=8=(B,,, $BBe?tE*?t$K4X$9$k1i;;(B |
|
@section $BJ,;6B?9`<0$K$h$kBe?tE*?t$NI=8=(B |
|
\E |
|
\BEG |
|
@node Representation of algebraic numbers by distributed polynomials,,, Algebraic numbers |
|
@section Representation of algebraic numbers by distributed polynomials |
|
\E |
|
|
|
@noindent |
|
\BJP |
|
$BA0@a$G=R$Y$?$h$&$K(B, @code{root} $B$r4^$`Be?tE*?t$KBP$9$k4JC12=$O(B |
|
$B%f!<%6$NH=CG$G9T$&I,MW$,$"$k(B. $B$3$l$KBP$7(B, $B$3$3$G2r@b$9$k$b$&0l$D$NBe?tE*?t$N(B |
|
$BI=8=$K$D$$$F$O(B, $B2C8:>h=|(B, $B%Y%-$J$I$r9T$C$?$"$H<+F0E*$K4JC12=$,9T$o$l$k(B. |
|
$B$3$NI=8=$O(B, $BC`<!3HBg$N>l9g$KFC$K8zN($h$/7W;;$,9T$o$l$k$h$&@_7W$5$l$F$*$j(B, |
|
$B%0%l%V%J!<4pDl4X78$N4X?t$K$*$1$k78?tBN$H$7$FMQ$$$k$3$H$,$G$-$k(B. $B$3$NI=8=$O(B |
|
$BFbItE*$K$O(B, @code{DAlg} $B$H8F$P$l$k%*%V%8%'%/%H$H$7$FDj5A$5$l$F$$$k(B. |
|
@code{DAlg} $B$OJ,?t<0$N7A$GJ];}$5$l$k(B. $BJ,Jl$O@0?t(B, $BJ,;R$O@0?t78?t$NJ,;6B?9`<0$G$"$k(B. |
|
\E |
|
\BEG |
|
Simplification of algebraic numbers containing @code{root} |
|
is not done automatically and should be done by users. |
|
There is another representation of algebraic numbers, for which the |
|
results of fundamental operations are automatically simplified. |
|
This representations are designed so that operations are efficiently |
|
performed especially when the field is a successive extension and |
|
it can be used as a ground field for Groebner basis related functions. |
|
Internally an algebraic number of this type is defined as an object |
|
called @code{DAlg}. A @code{DAlg} is represented as a fraction. The |
|
denominator is an integer and the numerator is a distributed polynomial |
|
with integral coefficients. |
|
\E |
|
|
|
\BJP |
|
@code{DAlg} $B$O!$(B@code{set_field()} $B$K$h$j$"$i$+$8$a@_Dj$5$l$?Be?tBN$N(B |
|
$B85$H$7$F@8@.$5$l$k(B. $B@8@.J}K!$O(B, @code{newalg()} $B$G@8@.$5$l$?Be?tE*?t$r(B |
|
$B4^$`?t$+$i(B @code{algtodalg()} $B$GJQ49$9$k(B, $B$"$k$$$OJ,;6B?9`<0$+$iD>@\(B |
|
@code{dptodalg()} $B$GJQ49$9$k!$$N(B 2 $BDL$j$"$k(B. |
|
$B0lC6(B @code{DAlg} $B7A<0$KJQ49$5$l$l$P(B, $B1i;;8e$K<+F0E*$K4JC12=$5$l$k(B. |
|
\E |
|
\BEG |
|
@code{DAlg} is generated as an element of an algebraic number field |
|
set by @code{set_field()}. There are two methods to generate a @code{DAlg}. |
|
@code{algtodalg()} converts an algebraic number containing @code{root} |
|
to @code{DAlg}. @code{dptodalg()} directly converts a distributed polynomial to |
|
@code{DAlg}. |
|
\E |
|
@example |
|
[0] A=newalg(x^2+1); |
|
(#0) |
|
[1] B=newalg(x^3+A*x+A); |
|
(#1) |
|
[2] set_field([B,A]); |
|
0 |
|
[3] C=algtodalg(A+B); |
|
((1)*<<1,0>>+(1)*<<0,1>>) |
|
[4] C^5; |
|
((-11)*<<2,1>>+(5)*<<2,0>>+(10)*<<1,1>>+(9)*<<1,0>>+(11)*<<0,1>> |
|
+(-1)*<<0,0>>) |
|
[5] 1/C; |
|
((2)*<<2,1>>+(-1)*<<2,0>>+(1)*<<1,1>>+(2)*<<1,0>>+(-3)*<<0,1>> |
|
+(-1)*<<0,0>>)/5 |
|
@end example |
|
\BJP |
|
$B$3$NNc$G$O(B, Q(a,b) (a^2+1=0, b^3+ab+b=0) $B$K$*$$$F(B, (a+b)^5 $B$*$h$S(B 1/(a+b) $B$r(B |
|
$B7W;;(B ($B4JC12=(B) $B$7$F$$$k(B. $BJ,;R$G$"$kJ,;6B?9`<0$NI=<($O(B, $BJ,;6B?9`<0$NI=<($r$=$N$^$^N.MQ$7$F$$$k(B. |
|
\E |
|
\BEG |
|
In this example Q(a,b) (a^2+1=0, b^3+ab+b=0) is set as the current ground field, |
|
and (a+b)^5 and 1/(a+b) are simplified in the field. The numerators of the results |
|
are printed as distributed polynomials. |
|
\E |
|
|
|
\BJP |
@node $BBe?tBN>e$G$N(B 1 $BJQ?tB?9`<0$N1i;;(B,,, $BBe?tE*?t$K4X$9$k1i;;(B |
@node $BBe?tBN>e$G$N(B 1 $BJQ?tB?9`<0$N1i;;(B,,, $BBe?tE*?t$K4X$9$k1i;;(B |
@section $BBe?tBN>e$G$N(B 1 $BJQ?tB?9`<0$N1i;;(B |
@section $BBe?tBN>e$G$N(B 1 $BJQ?tB?9`<0$N1i;;(B |
\E |
\E |
Line 499 where the ground field is a multiple extension. |
|
Line 580 where the ground field is a multiple extension. |
|
(#0) |
(#0) |
[64] B=newalg(75*s^2+(10*A^7-175*A^4-470*A)*s+3*A^8-45*A^5-261*A^2); |
[64] B=newalg(75*s^2+(10*A^7-175*A^4-470*A)*s+3*A^8-45*A^5-261*A^2); |
(#1) |
(#1) |
[65] P1=75*x^2+(150*B+10*A^7-175*A^4-395*A)*x+(75*B^2+(10*A^7-175*A^4-395*A)*B |
[65] P1=75*x^2+(150*B+10*A^7-175*A^4-395*A)*x |
+13*A^8-220*A^5-581*A^2)$ |
+(75*B^2+(10*A^7-175*A^4-395*A)*B+13*A^8-220*A^5-581*A^2)$ |
[66] P2=x^2+A*x+A^2$ |
[66] P2=x^2+A*x+A^2$ |
[67] cr_gcda(P1,P2); |
[67] cr_gcda(P1,P2); |
27*x+((#0^6-19*#0^3-65)*#1-#0^7+19*#0^4+38*#0) |
27*x+((#0^6-19*#0^3-65)*#1-#0^7+19*#0^4+38*#0) |
Line 531 The function to do this factorization is @code{asq()}. |
|
Line 612 The function to do this factorization is @code{asq()}. |
|
[116] A=newalg(x^2+x+1); |
[116] A=newalg(x^2+x+1); |
(#4) |
(#4) |
[117] T=simpalg((x+A+1)*(x^2-2*A-3)^2*(x^3-x-A)^2); |
[117] T=simpalg((x+A+1)*(x^2-2*A-3)^2*(x^3-x-A)^2); |
x^11+(#4+1)*x^10+(-4*#4-8)*x^9+(-10*#4-4)*x^8+(16*#4+20)*x^7+(24*#4-6)*x^6 |
x^11+(#4+1)*x^10+(-4*#4-8)*x^9+(-10*#4-4)*x^8+(16*#4+20)*x^7 |
+(-29*#4-31)*x^5+(-15*#4+28)*x^4+(38*#4+29)*x^3+(#4-23)*x^2+(-21*#4-7)*x |
+(24*#4-6)*x^6+(-29*#4-31)*x^5+(-15*#4+28)*x^4+(38*#4+29)*x^3 |
+(3*#4+8) |
+(#4-23)*x^2+(-21*#4-7)*x+(3*#4+8) |
[118] asq(T); |
[118] asq(T); |
[[x^5+(-2*#4-4)*x^3+(-#4)*x^2+(2*#4+3)*x+(#4-2),2],[x+(#4+1),1]] |
[[x^5+(-2*#4-4)*x^3+(-#4)*x^2+(2*#4+3)*x+(#4-2),2],[x+(#4+1),1]] |
@end example |
@end example |
Line 641 The function is @code{sp()}. |
|
Line 722 The function is @code{sp()}. |
|
|
|
@example |
@example |
[103] sp(x^5-2); |
[103] sp(x^5-2); |
[[x+(-#1),2*x+(#0^3*#1^3+#0^4*#1^2+2*#1+2*#0),2*x+(-#0^4*#1^2),2*x |
[[x+(-#1),2*x+(#0^3*#1^3+#0^4*#1^2+2*#1+2*#0),2*x+(-#0^4*#1^2), |
+(-#0^3*#1^3),x+(-#0)],[[(#1),t#1^4+t#0*t#1^3+t#0^2*t#1^2+t#0^3*t#1+t#0^4], |
2*x+(-#0^3*#1^3),x+(-#0)], |
[(#0),t#0^5-2]]] |
[[(#1),t#1^4+t#0*t#1^3+t#0^2*t#1^2+t#0^3*t#1+t#0^4],[(#0),t#0^5-2]]] |
@end example |
@end example |
|
|
@noindent |
@noindent |
Line 706 may yield a polynomial which differs by a constant. |
|
Line 787 may yield a polynomial which differs by a constant. |
|
* rattoalgp:: |
* rattoalgp:: |
* cr_gcda:: |
* cr_gcda:: |
* sp_norm:: |
* sp_norm:: |
* asq af:: |
* asq af af_noalg:: |
* sp:: |
* sp sp_noalg:: |
|
* set_field:: |
|
* algtodalg dalgtoalg dptodalg dalgtodp:: |
@end menu |
@end menu |
|
|
\JP @node newalg,,, $BBe?tE*?t$K4X$9$kH!?t$N$^$H$a(B |
\JP @node newalg,,, $BBe?tE*?t$K4X$9$kH!?t$N$^$H$a(B |
Line 1083 substitutes a @b{root} for the associated indeterminat |
|
Line 1166 substitutes a @b{root} for the associated indeterminat |
|
@item return |
@item return |
\JP $BB?9`<0(B |
\JP $BB?9`<0(B |
\EG polynomial |
\EG polynomial |
@item poly1, poly2 |
@item poly1 poly2 |
\JP $BB?9`<0(B |
\JP $BB?9`<0(B |
\EG polynomial |
\EG polynomial |
@end table |
@end table |
|
|
@table @t |
@table @t |
\JP @item $B;2>H(B |
\JP @item $B;2>H(B |
\EG @item Reference |
\EG @item Reference |
@fref{gr hgr gr_mod}, @fref{asq af} |
@fref{gr hgr gr_mod}, @fref{asq af af_noalg} |
@end table |
@end table |
|
|
\JP @node sp_norm,,, $BBe?tE*?t$K4X$9$kH!?t$N$^$H$a(B |
\JP @node sp_norm,,, $BBe?tE*?t$K4X$9$kH!?t$N$^$H$a(B |
Line 1192 x^12+2*x^8+5*x^4+1 |
|
Line 1275 x^12+2*x^8+5*x^4+1 |
|
@table @t |
@table @t |
\JP @item $B;2>H(B |
\JP @item $B;2>H(B |
\EG @item Reference |
\EG @item Reference |
@fref{res}, @fref{asq af} |
@fref{res}, @fref{asq af af_noalg} |
@end table |
@end table |
|
|
\JP @node asq af,,, $BBe?tE*?t$K4X$9$kH!?t$N$^$H$a(B |
\JP @node asq af af_noalg,,, $BBe?tE*?t$K4X$9$kH!?t$N$^$H$a(B |
\EG @node asq af,,, Summary of functions for algebraic numbers |
\EG @node asq af af_noalg,,, Summary of functions for algebraic numbers |
@subsection @code{asq}, @code{af} |
@subsection @code{asq}, @code{af}, @code{af_noalg} |
@findex asq |
@findex asq |
@findex af |
@findex af |
|
@findex af_noalg |
|
|
@table @t |
@table @t |
@item asq(@var{poly}) |
@item asq(@var{poly}) |
Line 1209 x^12+2*x^8+5*x^4+1 |
|
Line 1293 x^12+2*x^8+5*x^4+1 |
|
algebraic number field. |
algebraic number field. |
\E |
\E |
@item af(@var{poly},@var{alglist}) |
@item af(@var{poly},@var{alglist}) |
|
@itemx af_noalg(@var{poly},@var{defpolylist}) |
\JP :: $BBe?tBN>e$N(B 1 $BJQ?tB?9`<0$N0x?tJ,2r(B |
\JP :: $BBe?tBN>e$N(B 1 $BJQ?tB?9`<0$N0x?tJ,2r(B |
\BEG |
\BEG |
:: Factorization of polynomial @var{poly} over an |
:: Factorization of polynomial @var{poly} over an |
Line 1226 algebraic number field. |
|
Line 1311 algebraic number field. |
|
@item alglist |
@item alglist |
\JP @code{root} $B$N%j%9%H(B |
\JP @code{root} $B$N%j%9%H(B |
\EG @code{root} list |
\EG @code{root} list |
|
@item defpolylist |
|
\JP @code{root} $B$rI=$9ITDj85$HDj5AB?9`<0$N%Z%"$N%j%9%H(B |
|
\EG @code{root} list of pairs of an indeterminate and a polynomial |
@end table |
@end table |
|
|
@itemize @bullet |
@itemize @bullet |
Line 1263 In the second argument @code{alglist}, @b{root} define |
|
Line 1351 In the second argument @code{alglist}, @b{root} define |
|
first. |
first. |
\E |
\E |
@item |
@item |
\JP $B7k2L$O(B, $BDL>o$NL5J?J}J,2r(B, $B0x?tJ,2r$HF1MM(B [@b{$B0x;R(B}, @b{$B=EJ#EY(B}] $B$N%j%9%H$G$"$k(B. |
\BJP |
|
@code{af(F,AL)} $B$K$*$$$F(B, @code{AL} $B$OBe?tE*?t$N%j%9%H$G$"$j(B, $BM-M}?tBN$N(B |
|
$BBe?t3HBg$rI=$9(B. @code{AL=[An,...,A1]} $B$H=q$/$H$-(B, $B3F(B @code{Ak} $B$O(B, $B$=$l$h$j(B |
|
$B1&$K$"$kBe?tE*?t$r78?t$H$7$?(B, $B%b%K%C%/$JDj5AB?9`<0$GDj5A$5$l$F$$$J$1$l$P(B |
|
$B$J$i$J$$(B. |
|
\E |
\BEG |
\BEG |
|
In @code{af(F,AL)}, @code{AL} denotes a list of @code{roots} and it |
|
represents an algebraic number field. In @code{AL=[An,...,A1]} each |
|
@code{Ak} should be defined as a root of a defining polynomial |
|
whose coefficients are in @code{Q(A(k+1),...,An)}. |
|
\E |
|
|
|
@example |
|
[1] A1 = newalg(x^2+1); |
|
[2] A2 = newalg(x^2+A1); |
|
[3] A3 = newalg(x^2+A2*x+A1); |
|
[4] af(x^2+A2*x+A1,[A2,A1]); |
|
[[x^2+(#1)*x+(#0),1]] |
|
@end example |
|
|
|
\BJP |
|
@code{af_noalg} $B$G$O(B, @var{poly} $B$K4^$^$l$kBe?tE*?t(B @var{ai} $B$rITDj85(B @var{vi} |
|
$B$GCV$-49$($k(B. @code{defpolylist} $B$O(B, [[vn,dn(vn,...,v1)],...,[v1,d(v1)]] |
|
$B$J$k%j%9%H$G$"$k(B. $B$3$3$G(B @var{di}(vi,...,v1) $B$O(B @var{ai} $B$NDj5AB?9`<0$K$*$$$F(B |
|
$BBe?tE*?t$rA4$F(B @var{vj} $B$KCV$-49$($?$b$N$G$"$k(B. |
|
\E |
|
\BEG |
|
To call @code{sp_noalg}, one should replace each algebraic number |
|
@var{ai} in @var{poly} with an indeterminate @var{vi}. @code{defpolylist} |
|
is a list [[vn,dn(vn,...,v1)],...,[v1,d(v1)]]. In this expression |
|
@var{di}(vi,...,v1) is a defining polynomial of @var{ai} represented |
|
as a multivariate polynomial. |
|
\E |
|
|
|
@example |
|
[1] af_noalg(x^2+a2*x+a1,[[a2,a2^2+a1],[a1,a1^2+1]]); |
|
[[x^2+a2*x+a1,1]] |
|
@end example |
|
|
|
@item |
|
\BJP |
|
$B7k2L$O(B, $BDL>o$NL5J?J}J,2r(B, $B0x?tJ,2r$HF1MM(B [@b{$B0x;R(B}, @b{$B=EJ#EY(B}] |
|
$B$N%j%9%H$G$"$k(B. @code{af_noalg} $B$N>l9g(B, @b{$B0x;R(B} $B$K8=$l$kBe?tE*?t$O(B, |
|
@var{defpolylist} $B$K=>$C$FITDj85$KCV$-49$($i$l$k(B. |
|
\E |
|
\BEG |
The result is a list, as a result of usual factorization, whose elements |
The result is a list, as a result of usual factorization, whose elements |
is of the form [@b{factor}, @b{multiplicity}]. |
is of the form [@b{factor}, @b{multiplicity}]. |
|
In the result of @code{af_noalg}, algebraic numbers in @v{factor} are |
|
replaced by the indeterminates according to @var{defpolylist}. |
\E |
\E |
@item |
@item |
\JP $B=EJ#EY$r9~$a$?0x;R$NA4$F$N@Q$O(B, @var{poly} $B$HDj?tG\$N0c$$$,$"$jF@$k(B. |
\JP $B=EJ#EY$r9~$a$?0x;R$NA4$F$N@Q$O(B, @var{poly} $B$HDj?tG\$N0c$$$,$"$jF@$k(B. |
Line 1277 the input polynomial by a constant. |
|
Line 1412 the input polynomial by a constant. |
|
@end itemize |
@end itemize |
|
|
@example |
@example |
|
[98] A = newalg(t^2-2); |
|
(#0) |
[99] asq(-x^4+6*x^3+(2*alg(0)-9)*x^2+(-6*alg(0))*x-2); |
[99] asq(-x^4+6*x^3+(2*alg(0)-9)*x^2+(-6*alg(0))*x-2); |
[[-x^2+3*x+(#0),2]] |
[[-x^2+3*x+(#0),2]] |
[100] af(-x^2+3*x+alg(0),[alg(0)]); |
[100] af(-x^2+3*x+alg(0),[alg(0)]); |
[[x+(#0-1),1],[-x+(#0+2),1]] |
[[x+(#0-1),1],[-x+(#0+2),1]] |
|
[101] af_noalg(-x^2+3*x+a,[[a,x^2-2]]); |
|
[[x+a-1,1],[-x+a+2,1]] |
@end example |
@end example |
|
|
@table @t |
@table @t |
Line 1289 the input polynomial by a constant. |
|
Line 1428 the input polynomial by a constant. |
|
@fref{cr_gcda}, @fref{fctr sqfr} |
@fref{cr_gcda}, @fref{fctr sqfr} |
@end table |
@end table |
|
|
\JP @node sp,,, $BBe?tE*?t$K4X$9$kH!?t$N$^$H$a(B |
\JP @node sp sp_noalg,,, $BBe?tE*?t$K4X$9$kH!?t$N$^$H$a(B |
\EG @node sp,,, Summary of functions for algebraic numbers |
\EG @node sp sp_noalg,,, Summary of functions for algebraic numbers |
@subsection @code{sp} |
@subsection @code{sp}, @code{sp_noalg} |
@findex sp |
@findex sp |
|
|
@table @t |
@table @t |
@item sp(@var{poly}) |
@item sp(@var{poly}) |
|
@itemx sp_noalg(@var{poly}) |
\JP :: $B:G>.J,2rBN$r5a$a$k(B. |
\JP :: $B:G>.J,2rBN$r5a$a$k(B. |
\EG :: Finds the splitting field of polynomial @var{poly} and splits. |
\EG :: Finds the splitting field of polynomial @var{poly} and splits. |
@end table |
@end table |
Line 1326 over the field. |
|
Line 1466 over the field. |
|
@item |
@item |
\BJP |
\BJP |
$B7k2L$O(B, @var{poly} $B$N0x;R$N%j%9%H$H(B, $B:G>.J,2rBN$N(B, $BC`<!3HBg$K$h$kI=8=(B |
$B7k2L$O(B, @var{poly} $B$N0x;R$N%j%9%H$H(B, $B:G>.J,2rBN$N(B, $BC`<!3HBg$K$h$kI=8=(B |
$B$+$i$J$k%j%9%H$G$"$k(B. |
$B$+$i$J$k%j%9%H$G$"$k(B. @code{sp_noalg} $B$G$O(B, $BA4$F$NBe?tE*?t$,(B, $BBP1~$9$k(B |
|
$BITDj85(B ($BB($A(B @code{#i} $B$KBP$9$k(B @code{t#i}) $B$KCV$-49$($i$l$k(B. $B$3$l$K(B |
|
$B$h$j(B, @code{sp_noalg} $B$N=PNO$O(B, $B@0?t78?tB?JQ?tB?9`<0$N%j%9%H$H$J$k(B. |
\E |
\E |
\BEG |
\BEG |
The result consists of a two element list: The first element is |
The result consists of a two element list: The first element is |
the list of all linear factors of @var{poly}; the second element is |
the list of all linear factors of @var{poly}; the second element is |
a list which represents the successive extension of the field. |
a list which represents the successive extension of the field. |
|
In the result of @code{sp_noalg} all the algebraic numbers are replaced |
|
by the special indeterminate associated with it, that is @code{t#i} |
|
for @code{#i}. By this operation the result of @code{sp_noalg} |
|
is a list containing only integral polynomials. |
\E |
\E |
@item |
@item |
\BJP |
\BJP |
Line 1342 a list which represents the successive extension of th |
|
Line 1488 a list which represents the successive extension of th |
|
\E |
\E |
\BEG |
\BEG |
The splitting field is represented as a list of pairs of form |
The splitting field is represented as a list of pairs of form |
@code{[root,algptorat(defpoly(root))]}. |
@code{[root,} @code{algptorat(defpoly(root))]}. |
In more detail, the list is interpreted as a representation |
In more detail, the list is interpreted as a representation |
of successive extension obtained by adjoining @b{root}'s |
of successive extension obtained by adjoining @b{root}'s |
to the rational number field. Adjoining is performed from the right |
to the rational number field. Adjoining is performed from the right |
Line 1369 the builtin function @code{res()} is always used. |
|
Line 1515 the builtin function @code{res()} is always used. |
|
|
|
@example |
@example |
[101] L=sp(x^9-54); |
[101] L=sp(x^9-54); |
[[x+(-#2),-54*x+(#1^6*#2^4),54*x+(#1^6*#2^4+54*#2),54*x+(-#1^8*#2^2), |
[[x+(-#2),-54*x+(#1^6*#2^4),54*x+(#1^6*#2^4+54*#2), |
-54*x+(#1^5*#2^5),54*x+(#1^5*#2^5+#1^8*#2^2),-54*x+(-#1^7*#2^3-54*#1), |
54*x+(-#1^8*#2^2),-54*x+(#1^5*#2^5),54*x+(#1^5*#2^5+#1^8*#2^2), |
54*x+(-#1^7*#2^3),x+(-#1)],[[(#2),t#2^6+t#1^3*t#2^3+t#1^6],[(#1),t#1^9-54]]] |
-54*x+(-#1^7*#2^3-54*#1),54*x+(-#1^7*#2^3),x+(-#1)], |
|
[[(#2),t#2^6+t#1^3*t#2^3+t#1^6],[(#1),t#1^9-54]]] |
[102] for(I=0,M=1;I<9;I++)M*=L[0][I]; |
[102] for(I=0,M=1;I<9;I++)M*=L[0][I]; |
[111] M=simpalg(M); |
[111] M=simpalg(M); |
-1338925209984*x^9+72301961339136 |
-1338925209984*x^9+72301961339136 |
Line 1382 the builtin function @code{res()} is always used. |
|
Line 1529 the builtin function @code{res()} is always used. |
|
@table @t |
@table @t |
\JP @item $B;2>H(B |
\JP @item $B;2>H(B |
\EG @item Reference |
\EG @item Reference |
@fref{asq af}, @fref{defpoly}, @fref{algptorat}, @fref{sp_norm}. |
@fref{asq af af_noalg}, @fref{defpoly}, @fref{algptorat}, @fref{sp_norm}. |
@end table |
@end table |
|
|
|
\JP @node set_field,,, $BBe?tE*?t$K4X$9$kH!?t$N$^$H$a(B |
|
\EG @node set_field,,, Summary of functions for algebraic numbers |
|
@subsection @code{set_field} |
|
@findex set_field |
|
|
|
@table @t |
|
@item set_field(@var{rootlist}) |
|
\JP :: $BBe?tBN$r4pACBN$H$7$F@_Dj$9$k(B. |
|
\EG :: Set an algebraic number field as the currernt ground field. |
|
@end table |
|
|
|
@table @var |
|
@item return |
|
0 |
|
@item rootlist |
|
\JP @code{root} $B$N%j%9%H(B |
|
\EG A list of @code{root} |
|
@end table |
|
|
|
@itemize @bullet |
|
@item |
|
\JP @code{root} $B$N%j%9%H(B @var{rootlist} $B$G@8@.$5$l$kBe?tBN$r4pACBN$H$7$F@_Dj$9$k(B. |
|
\BEG |
|
@code{set_field()} sets an algebraic number field generated by @code{root} in |
|
@var{rootlist} over Q. |
|
\E |
|
@item |
|
\BJP |
|
@code{root} $B$OFbItE*$K=g=x$E$1$i$l$F$$$k$N$G(B, @var{rootlist} $B$O=89g$H$7$F;XDj(B |
|
$B$9$l$P$h$$(B. ($B=g=x$O5$$K$7$J$/$F$h$$(B.) |
|
\E |
|
\BEG |
|
You don't care about the order of @code{root} in @var{rootlist}, because |
|
@code{root} are automatically ordered internally. |
|
\E |
|
@end itemize |
|
|
|
@example |
|
[0] A=newalg(x^2+1); |
|
(#0) |
|
[1] B=newalg(x^3+A); |
|
(#1) |
|
[2] C=newalg(x^4+B); |
|
(#1) |
|
[3] set_field([C,B,A]); |
|
0 |
|
@end example |
|
|
|
@table @t |
|
\JP @item $B;2>H(B |
|
\EG @item Reference |
|
@fref{algtodalg dalgtoalg dptodalg dalgtodp} |
|
@end table |
|
|
|
\JP @node algtodalg dalgtoalg dptodalg dalgtodp,,, $BBe?tE*?t$K4X$9$kH!?t$N$^$H$a(B |
|
\EG @node algtodalg dalgtoalg dptodalg dalgtodp,,, Summary of functions for algebraic numbers |
|
@subsection @code{algtodalg}, @code{dalgtoalg}, @code{dptodalg}, @code{dalgtodp} |
|
@findex algtodalg |
|
@findex dalgtoalg |
|
@findex dpodalg |
|
@findex dalgtodp |
|
|
|
@table @t |
|
@item algtodalg(@var{alg}) |
|
\JP :: $BBe?tE*?t(B @var{alg} $B$r(B @code{DAlg} $B$KJQ49$9$k(B. |
|
\EG :: Converts an algebraic number @var{alg} to a @code{DAlg}. |
|
@item dalgtoalg(@var{dalg}) |
|
\JP :: @code{DAlg} @code{dalg} $B$rBe?tE*?t$KJQ49$9$k(B. |
|
\EG :: Converts a @code{DAlg} @code{dalg} to an algebraic number. |
|
@item dptodalg(@var{dp}) |
|
\JP :: $BJ,;6B?9`<0(B @var{dp} $B$r(B @code{DAlg} $B$KJQ49$9$k(B. |
|
\EG :: Converts an algebraic number @var{alg} to a @code{DAlg}. |
|
@item dalgtodp(@var{dalg}) |
|
\JP :: @code{DAlg} @code{dalg} $B$rJ,;6B?9`<0$KJQ49$9$k(B. |
|
\EG :: Converts a @code{DAlg} @code{dalg} to an algebraic number. |
|
@end table |
|
|
|
@table @var |
|
@item return |
|
\JP $BBe?tE*?t(B, @code{DAlg} $B$^$?$O(B [$BJ,;6B?9`<0(B,$BJ,Jl(B] $B$J$k%j%9%H(B |
|
\EG An algebraic number, a @code{DAlg} or a list [distributed polynomial,denominator] |
|
@item alg |
|
\JP @code{root} $B$r4^$`Be?tE*?t(B |
|
\EG an algebraic number containing @code{root} |
|
@item dp |
|
\JP $BM-M}?t78?tJ,;6B?9`<0(B |
|
\EG a distributed polynomial over Q |
|
@end table |
|
|
|
@itemize @bullet |
|
@item |
|
\JP @code{root} $B$r4^$`Be?tE*?t(B, @code{DAlg} $B$*$h$SJ,;6B?9`<04V$NJQ49$r9T$&(B. |
|
\BEG |
|
These functions are converters between @code{DAlg} and an algebraic number |
|
containing @code{root}, or a distributed polynomial. |
|
\E |
|
@item |
|
\BJP |
|
@code{DAlg} $B$,B0$9$Y$-Be?tBN$O(B, @code{set_field()} $B$K$h$j(B |
|
$B$"$i$+$8$a@_Dj$7$F$*$/I,MW$,$"$k(B. |
|
\E |
|
\BEG |
|
A ground field to which a @code{DAlg} belongs must be set by @code{set_field()} |
|
in advance. |
|
\E |
|
@item |
|
\BJP |
|
@code{dalgtodp()} $B$O(B, $BJ,;R$G$"$k@0?t78?tJ,;6B?9`<0$H(B, $BJ,Jl$G$"$k@0?t$rMWAG$K;}$D(B |
|
$B%j%9%H$rJV$9(B. |
|
\E |
|
\BEG |
|
@code{dalgtodp()} returns a list containing the numerator (a distributed polynomial) |
|
and the denominator (an integer). |
|
\E |
|
@item |
|
\BJP |
|
@code{algtodalg()}, @code{dptodalg()} $B$O4JC12=$5$l$?7k2L$rJV$9(B. |
|
\E |
|
\BEG |
|
@code{algtodalg()}, @code{dptodalg()} return the simplified result. |
|
\E |
|
@end itemize |
|
|
|
@example |
|
[0] A=newalg(x^2+1); |
|
(#0) |
|
[1] B=newalg(x^3+A*x+A); |
|
(#1) |
|
[2] set_field([B,A]); |
|
0 |
|
[3] C=algtodalg((A+B)^10); |
|
((408)*<<2,1>>+(103)*<<2,0>>+(-36)*<<1,1>>+(-446)*<<1,0>> |
|
+(-332)*<<0,1>>+(-218)*<<0,0>>) |
|
[4] dalgtoalg(C); |
|
((408*#0+103)*#1^2+(-36*#0-446)*#1-332*#0-218) |
|
[5] D=dptodalg(<<10,10>>/10+2*<<5,5>>+1/3*<<0,0>>); |
|
((-9)*<<2,1>>+(57)*<<2,0>>+(-63)*<<1,1>>+(-12)*<<1,0>> |
|
+(-60)*<<0,1>>+(1)*<<0,0>>)/30 |
|
[6] dalgtodp(D); |
|
[(-9)*<<2,1>>+(57)*<<2,0>>+(-63)*<<1,1>>+(-12)*<<1,0>> |
|
+(-60)*<<0,1>>+(1)*<<0,0>>,30] |
|
@end example |
|
|
|
@table @t |
|
\JP @item $B;2>H(B |
|
\EG @item Reference |
|
@fref{set_field} |
|
@end table |