[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
newalg
:: Creates a new root.
algebraic number (root)
polynomial
[0] A0=newalg(x^2-2); (#0)
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
defpoly
:: Returns the defining polynomial of root alg.
polynomial
algebraic number (root
)
#n
,
then the main variable of its defining polynomial is
t#n
.
[1] defpoly(A0); t#0^2-2
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
alg
:: Returns a root which correspond to the index i.
algebraic number (root
)
integer
#i
, a root.
#i
cannot be input directly,
this function provides an alternative way: input alg(i)
.
[2] x+#0; syntax error 0 [3] alg(0); (#0)
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
algv
:: Returns the associated indeterminate with alg(i)
.
polynomial
integer
t#i
t#i
cannot be input directly,
it is input by algv(i)
.
[4] var(defpoly(A0)); t#0 [5] t#0; syntax error 0 [6] algv(0); t#0
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
simpalg
:: Simplifies algebraic numbers in a rational expression.
rational expression
rational expression
[7] simpalg((1+A0)/(1-A0)); simpalg undefined return to toplevel [7] load("sp")$ [46] simpalg((1+A0)/(1-A0)); (-2*#0-3) [47] simpalg((2-A0)/(2+A0)*x^2-1/(3+A0)); (-2*#0+3)*x^2+(1/7*#0-3/7) [48] simpalg((x+1/(A0-1))/(x-1/(A0+1))); (x+(#0+1))/(x+(-#0+1))
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
algptorat
:: Substitutes the associated indeterminate for every root
polynomial
polynomial
t#n
for every root #n
in a polynomial.
[49] algptorat((-2*alg(0)+3)*x^2+(1/7*alg(0)-3/7)); (-2*t#0+3)*x^2+1/7*t#0-3/7
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
rattoalgp
:: Substitutes a root for the associated indeterminate with the root.
polynomial
polynomial
list
rattoalgp()
substitutes a root for the associated indeterminate of the root.
[51] rattoalgp((-2*algv(0)+3)*x^2+(1/7*algv(0)-3/7),[alg(0)]); (-2*#0+3)*x^2+(1/7*#0-3/7)
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
cr_gcda
:: GCD of two uni-variate polynomials over an algebraic number field.
polynomial
polynomial
[76] X=x^6+3*x^5+6*x^4+x^3-3*x^2+12*x+16$ [77] Y=x^6+6*x^5+24*x^4+8*x^3-48*x^2+384*x+1024$ [78] A=newalg(X); (#0) [79] cr_gcda(X,subst(Y,x,x+A)); x+(-#0)
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
sp_norm
:: Norm computation over an algebraic number field.
polynomial
The main variable of poly
univariate polynomial
root
root
list
USE_RES
to 1, the builtin function
res()
is always used.
[0] load("sp")$ [39] A0=newalg(x^2+1)$ [40] A1=newalg(x^2+A0)$ [41] sp_norm(A1,x,x^3+A0*x+A1,[A1,A0]); x^6+(2*#0)*x^4+(#0^2)*x^2+(#0) [42] sp_norm(A0,x,@@,[A0]); x^12+2*x^8+5*x^4+1
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
asq
, af
, af_noalg
:: Square-free factorization of polynomial poly over an algebraic number field.
:: Factorization of polynomial poly over an algebraic number field.
list
polynomial
root
list
root
list of pairs of an indeterminate and a polynomial
cr_gcda()
is invoked.
af()
requires the specification of base field,
i.e., list of root’s for its second argument.
alglist
, root defined last must come
first.
af(F,AL)
, AL
denotes a list of roots
and it
represents an algebraic number field. In AL=[An,...,A1]
each
Ak
should be defined as a root of a defining polynomial
whose coefficients are in Q(A(k+1),...,An)
.
[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]]
To call sp_noalg
, one should replace each algebraic number
ai in poly with an indeterminate vi. defpolylist
is a list [[vn,dn(vn,...,v1)],...,[v1,d(v1)]]. In this expression
di(vi,...,v1) is a defining polynomial of ai represented
as a multivariate polynomial.
[1] af_noalg(x^2+a2*x+a1,[[a2,a2^2+a1],[a1,a1^2+1]]); [[x^2+a2*x+a1,1]]
af_noalg
, algebraic numbers in factor< are
replaced by the indeterminates according to defpolylist.
[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); [[-x^2+3*x+(#0),2]] [100] af(-x^2+3*x+alg(0),[alg(0)]); [[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]]
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
sp
, sp_noalg
:: Finds the splitting field of polynomial poly and splits.
list
polynomial
sp_noalg
all the algebraic numbers are replaced
by the special indeterminate associated with it, that is t#i
for #i
. By this operation the result of sp_noalg
is a list containing only integral polynomials.
[root,
algptorat(defpoly(root))]
.
In more detail, the list is interpreted as a representation
of successive extension obtained by adjoining root’s
to the rational number field. Adjoining is performed from the right
root to the left.
sp()
invokes sp_norm()
internally. Computation of norm
is done by several methods according to the situation but the algorithm
selection is not always optimal and a simple resultant computation is
often superior to the other methods.
By setting the global variable USE_RES
to 1,
the builtin function res()
is always used.
[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),-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^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]; [111] M=simpalg(M); -1338925209984*x^9+72301961339136 [112] ptozp(M); -x^9+54
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
set_field
:: Set an algebraic number field as the currernt ground field.
0
A list of root
set_field()
sets an algebraic number field generated by root
in
rootlist over Q.
root
in rootlist, because
root
are automatically ordered internally.
[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
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
algtodalg
, dalgtoalg
, dptodalg
, dalgtodp
:: Converts an algebraic number alg to a DAlg
.
:: Converts a DAlg
dalg
to an algebraic number.
:: Converts an algebraic number alg to a DAlg
.
:: Converts a DAlg
dalg
to an algebraic number.
An algebraic number, a DAlg
or a list [distributed polynomial,denominator]
an algebraic number containing root
a distributed polynomial over Q
DAlg
and an algebraic number
containing root
, or a distributed polynomial.
DAlg
belongs must be set by set_field()
in advance.
dalgtodp()
returns a list containing the numerator (a distributed polynomial)
and the denominator (an integer).
algtodalg()
, dptodalg()
return the simplified result.
[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]
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] |
This document was generated on July 15, 2024 using texi2html 5.0.