This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / Add-ons & Links / Standard Packages / NumberTheory /


This package provides a function for computing primitive elements of multiple algebraic extensions of rationals.

Given algebraic numbers , , you can always find a single algebraic number such that each of , , can be expressed as a polynomial in with rational coefficients. The number is called a primitive element of the field extension (, , )/. In other words, an algebraic number is a primitive element of (, , )/ iff (, , ) = ().

The function PrimitiveElement takes a variable and a list of algebraic numbers , , and returns a primitive element of (, , )/, and a list of polynomials (), , () such that = () for all .

The primitive element of an algebraic extension of the rationals.

This loads the package.

In[1]:= <<NumberTheory`PrimitiveElement`

Here is a primitive element of (Sqrt[2], Sqrt[3])/, and a list of polynomials showing how to represent Sqrt[2] and Sqrt[3] in terms of the primitive element.

In[2]:= PrimitiveElement[z, {Sqrt[2], Sqrt[3]}]


This checks that the computed polynomials evaluated at the primitive element give Sqrt[2] and Sqrt[3].

In[3]:= RootReduce[%[[2]] /. z -> %[[1]]]