ARNUM.TEX 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. \documentstyle[11pt,reduce]{article}
  2. \title{Algebraic Number Fields}
  3. \date{}
  4. \author{Eberhard Schr\"{u}fer \\
  5. Institute SCAI.Alg \\
  6. German National Research Center for Information Technology (GMD) \\
  7. Schloss Birlinghoven \\
  8. D-53754 Sankt Augustin \\
  9. Germany \\[0.05in]
  10. Email: schruefer@gmd.de}
  11. \begin{document}
  12. \maketitle
  13. \index{algebraic number fields}
  14. \index{algebraic numbers}
  15. \index{ARNUM package}
  16. Algebraic numbers are the solutions of an irreducible polynomial over
  17. some ground domain. \index{i} The algebraic number $i$ (imaginary
  18. unit), \index{imaginary unit} for example, would be defined by the
  19. polynomial $i^2 + 1$. The arithmetic of algebraic number $s$ can be
  20. viewed as a polynomial arithmetic modulo the defining polynomial.
  21. Given a defining polynomial for an algebraic number $a$
  22. \begin{eqnarray*}
  23. a^n ~ + ~ {p _{n-1}} {a ^ {n -1}} ~ + ~ ... ~ + ~ {p_0}
  24. \end{eqnarray*}
  25. All algebraic numbers which can be built up from $a$ are then of the form:
  26. \begin{eqnarray*}
  27. {r_{n-1}} {a ^{n-1}} ~+~ {r_{n-2}} {a ^{n-2}} ~+~ ... ~+~ {r_0}
  28. \end{eqnarray*}
  29. where the $r_j$'s are rational numbers.
  30. \index{+ ! algebraic numbers}
  31. The operation of addition is defined by
  32. \begin{eqnarray*}
  33. ({r_{n-1}} {a ^{n-1}} ~+~ {r_{n-2}} {a ^{n-2}} ~+~ ...) ~ + ~
  34. ({s_{n-1}} {a ^{n-1}} ~+~ {s_{n-2}} {a ^{n-2}} ~+~ ...) ~ = \\
  35. ({r_{n-1}+s_{n-1}}) {a ^{n-1}} ~+~ ({r_{n-2}+s_{n-2}}) {a ^{n-2}} ~+~ ...
  36. \end{eqnarray*}
  37. \index{* ! algebraic numbers}
  38. Multiplication of two algebraic numbers can be performed by normal
  39. polynomial multiplication followed by a reduction of the result with the
  40. help of the defining polynomial.
  41. \begin{eqnarray*}
  42. ({r_{n-1}} {a ^{n-1}} + {r_{n-2}} {a ^{n-2}} + ...) ~ \times ~
  43. ({s_{n-1}} {a ^{n-1}} + {s_{n-2}} {a ^{n-2}} + ...) = \\
  44. {r_{n-1}} {s ^{n-1}}{a^{2n-2}} + ... ~ {\bf modulo} ~
  45. a^n ~ + ~ {p _{n-1}} {a ^ {n -1}} ~ + ~ ... ~ + ~ {p_0} \\
  46. = ~~~{q_{n-1}} a^{n-1} ~ + ~ {q _{n-2}} {a ^ {n -2}} ~ + ~ ...
  47. \end{eqnarray*}
  48. \index{/ ! algebraic numbers}
  49. Division of two algebraic numbers r and s yields another algebraic number q.
  50. $ \frac{r}{s} = q$ or $ r = q s $.
  51. The last equation written out explicitly reads
  52. \begin{eqnarray*}
  53. \lefteqn{({r_{n-1}} {a^{n-1}} + {r_{n-2}} {a^{n-2}} + \ldots)} \\
  54. & = & ({q_{n-1}} {a^{n-1}} + {q_{n-2}} {a^{n-2}} + \ldots) \times
  55. ({s_{n-1}} {a^{n-1}} + {s_{n-2}} {a^{n-2}} + \ldots) \\
  56. & & {\bf modulo} (a^n + {p _{n-1}} {a^{n -1}} + \ldots) \\
  57. & = & ({t_{n-1}} {a^{n-1}} + {t_{n-2}} {a^{n-2}} + \ldots)
  58. \end{eqnarray*}
  59. The $t_i$ are linear in the $q_j$. Equating equal powers of $a$ yields a
  60. linear system for the quotient coefficients $q_j$.
  61. With this, all field operations for the algebraic numbers are available. The
  62. translation into algorithms is straightforward. For an implementation we
  63. have to decide on a data structure for an algebraic number. We have chosen
  64. the representation REDUCE normally uses for polynomials, the so-called
  65. standard form. Since our polynomials have in general rational coefficients,
  66. we must allow for a rational number domain inside the algebraic number.
  67. \begin{tabbing}
  68. \s{algebraic number} ::= \\
  69. \hspace{.25in} \= {\tt :ar:} . \s{univariate polynomial over the rationals}
  70. \\[0.05in]
  71. \s{univariate polynomial over the rationals} ::= \\
  72. \> \s{variable} .** \s{ldeg} .* \s{rational} .+ \s{reductum} \\[0.05in]
  73. \s{ldeg} ::= integer \\[0.3in]
  74. \s{rational} ::= \\
  75. \> {\tt :rn:} . \s{integer numerator} . \s{integer denominator} :
  76. integer \\[0.05in]
  77. \s{reductum} ::= \s{univariate polynomial} : \s{rational} : nil
  78. \end{tabbing}
  79. This representation allows us to use the REDUCE functions for adding and
  80. multiplying polynomials on the tail of the tagged algebraic number. Also,
  81. the routines for solving linear equations can easily be used for the
  82. calculation of quotients. We are still left with the problem of
  83. introducing a particular algebraic number. In the current version this is
  84. done by giving the defining polynomial to the statement {\bf defpoly}. The
  85. \index{DEFPOLY statement}
  86. algebraic number sqrt(2), for example, can be introduced by
  87. \begin{verbatim}
  88. defpoly sqrt2**2 - 2;
  89. \end{verbatim}
  90. This statement associates a simplification function for the
  91. translation of the variable in the defining polynomial into its tagged
  92. internal form and also generates a power reduction rule used by the
  93. operations {\bf times} and {\bf quotient} for the reduction of their
  94. result modulo the defining polynomial. A basis for the representation
  95. of an algebraic number is also set up by the statement. In the
  96. working version, the basis is a list of powers of the indeterminate of
  97. the defining polynomial up to one less then its degree. Experiments
  98. with integral bases, however, have been very encouraging, and these
  99. bases might be available in a later version. If the defining
  100. polynomial is not monic, it will be made so by an appropriate
  101. substitution.
  102. \example \index{ARNUM package ! example}
  103. \begin{verbatim}
  104. defpoly sqrt2**2-2;
  105. 1/(sqrt2+1);
  106. sqrt2 - 1
  107. (x**2+2*sqrt2*x+2)/(x+sqrt2);
  108. x + sqrt2
  109. on gcd;
  110. (x**3+(sqrt2-2)*x**2-(2*sqrt2+3)*x-3*sqrt2)/(x**2-2);
  111. 2
  112. (x - 2*x - 3)/(x - sqrt2)
  113. off gcd;
  114. sqrt(x**2-2*sqrt2*x*y+2*y**2);
  115. abs(x - sqrt2*y)
  116. \end{verbatim}
  117. Until now we have dealt with only a single algebraic number. In practice
  118. this is not sufficient as very often several algebraic numbers appear in an
  119. expression. There are two possibilities for handling this: one can use
  120. multivariate extensions \cite{Davenport:81} or one can construct a defining
  121. polynomial that contains all specified extensions. This package implements
  122. the latter case (the so called primitive representation). The algorithm we
  123. use for the construction of the primitive element is the same as given by
  124. Trager \cite{Trager:76}. In the implementation, multiple extensions can be
  125. given as a list of equations to the statement {\bf defpoly}, which, among other
  126. things, adds the new extension to the previously defined one. All
  127. algebraic numbers are then expressed in terms of the primitive element.
  128. \example\index{ARNUM package ! example}
  129. \begin{verbatim}
  130. defpoly sqrt2**2-2,cbrt5**3-5;
  131. *** defining polynomial for primitive element:
  132. 6 4 3 2
  133. a1 - 6*a1 - 10*a1 + 12*a1 - 60*a1 + 17
  134. sqrt2;
  135. 5 4 3 2
  136. 48/1187*a1 + 45/1187*a1 - 320/1187*a1 - 780/1187*a1 +
  137. 735/1187*a1 - 1820/1187
  138. sqrt2**2;
  139. 2
  140. \end{verbatim}
  141. \newpage
  142. We can provide factorization of polynomials over the algebraic number
  143. domain by using Trager's algorithm. The polynomial to be factored is first
  144. mapped to a polynomial over the integers by computing the norm of the
  145. polynomial, which is the resultant with respect to the primitive element of
  146. the polynomial and the defining polynomial. After factoring over the
  147. integers, the factors over the algebraic number field are recovered by GCD
  148. calculations.
  149. \example\index{ARNUM package ! example}
  150. \begin{verbatim}
  151. defpoly a**2-5;
  152. on factor;
  153. x**2 + x - 1;
  154. (x + (1/2*a + 1/2))*(x - (1/2*a - 1/2))
  155. \end{verbatim}
  156. \index{SPLIT\_FIELD function}
  157. We have also incorporated a function {\bf split\_field} for the calculation
  158. of a primitive element of minimal degree for which a given polynomial splits
  159. into linear factors. The algorithm as described in Trager's article is
  160. essentially a repeated primitive element calculation.
  161. \example\index{ARNUM package ! example}
  162. \begin{verbatim}
  163. split_field(x**3-3*x+7);
  164. *** Splitting field is generated by:
  165. 6 4 2
  166. a2 - 18*a2 + 81*a2 + 1215
  167. 4 2
  168. {1/126*a2 - 5/42*a2 - 1/2*a2 + 2/7,
  169. 4 2
  170. - (1/63*a2 - 5/21*a2 + 4/7),
  171. 4 2
  172. 1/126*a2 - 5/42*a2 + 1/2*a2 + 2/7}
  173. for each j in ws product (x-j);
  174. 3
  175. x - 3*x + 7
  176. \end{verbatim}
  177. A more complete description can be found in \cite{Bradford:86}.
  178. \bibliography{arnum}
  179. \bibliographystyle{plain}
  180. \end{document}