(***********************************************************************

                    Mathematica-Compatible Notebook

This notebook can be used on any computer system with Mathematica 4.0,
MathReader 4.0, or any compatible application. The data for the notebook 
starts with the line containing stars above.

To get the notebook into a Mathematica-compatible application, do one of 
the following:

* Save the data starting with the line of stars above into a file
  with a name ending in .nb, then open the file inside the application;

* Copy the data starting with the line of stars above to the
  clipboard, then use the Paste menu command inside the application.

Data for notebooks contains only printable 7-bit ASCII and can be
sent directly in email or through ftp in text mode.  Newlines can be
CR, LF or CRLF (Unix, Macintosh or MS-DOS style).

NOTE: If you modify the data for this notebook not in a Mathematica-
compatible application, you must delete the line below containing the 
word CacheID, otherwise Mathematica-compatible applications may try to 
use invalid cache data.

For more information on notebooks and Mathematica-compatible 
applications, contact Wolfram Research:
  web: http://www.wolfram.com
  email: info@wolfram.com
  phone: +1-217-398-0700 (U.S.)

Notebook reader applications are available free of charge from 
Wolfram Research.
***********************************************************************)

(*CacheID: 232*)


(*NotebookFileLineBreakTest
NotebookFileLineBreakTest*)
(*NotebookOptionsPosition[     12086,        379]*)
(*NotebookOutlinePosition[     14431,        455]*)
(*  CellTagsIndexPosition[     14220,        443]*)
(*WindowFrame->Normal*)



Notebook[{
Cell[TextData[{
  "NumberTheory",
  StyleBox["`", "MB"],
  "PrimitiveElement",
  StyleBox["`", "MB"]
}], "Subsection",
  CellTags->{"S5.70.1", "1.1"}],

Cell[TextData[{
  "This package provides a function for computing primitive elements of \
multiple algebraic extensions of rationals. \nGiven algebraic numbers ",
  Cell[BoxData[
      \(TraditionalForm\`a\_1\)], "InlineFormula"],
  ",\[ThinSpace]",
  Cell[BoxData[
      \(TraditionalForm\`\(\(\[Ellipsis]\)\(\ \)\)\)], "InlineFormula"],
  ",\[ThinSpace]",
  Cell[BoxData[
      \(TraditionalForm\`a\_n\)], "InlineFormula"],
  " you can always find a single algebraic number ",
  Cell[BoxData[
      \(TraditionalForm\`b\)], "InlineFormula"],
  " such that each of ",
  Cell[BoxData[
      \(TraditionalForm\`a\_1\)], "InlineFormula"],
  ",\[ThinSpace]",
  Cell[BoxData[
      \(TraditionalForm\`\(\(\[Ellipsis]\)\(\ \)\)\)], "InlineFormula"],
  ",\[ThinSpace]",
  Cell[BoxData[
      \(TraditionalForm\`a\_n\)], "InlineFormula"],
  " can be expressed as a polynomial in ",
  Cell[BoxData[
      \(TraditionalForm\`b\)], "InlineFormula"],
  " with rational coefficients. The number ",
  Cell[BoxData[
      \(TraditionalForm\`b\)], "InlineFormula"],
  " is called a primitive element of the field extension ",
  Cell[BoxData[
      FormBox[
        StyleBox["\<\"Q\"\>",
          "TB"], TraditionalForm]], "InlineFormula"],
  "(",
  Cell[BoxData[
      \(TraditionalForm\`a\_1\)], "InlineFormula"],
  ",\[ThinSpace]",
  Cell[BoxData[
      \(TraditionalForm\`\(\(\[Ellipsis]\)\(\ \)\)\)], "InlineFormula"],
  ",\[ThinSpace]",
  Cell[BoxData[
      \(TraditionalForm\`a\_n\)], "InlineFormula"],
  ")/",
  Cell[BoxData[
      FormBox[
        StyleBox["\<\"Q\"\>",
          "TB"], TraditionalForm]], "InlineFormula"],
  ". In other words, an algebraic number ",
  Cell[BoxData[
      \(TraditionalForm\`b\)], "InlineFormula"],
  " is a primitive element of ",
  Cell[BoxData[
      FormBox[
        StyleBox["\<\"Q\"\>",
          "TB"], TraditionalForm]], "InlineFormula"],
  "(",
  Cell[BoxData[
      \(TraditionalForm\`a\_1\)], "InlineFormula"],
  ",\[ThinSpace]",
  Cell[BoxData[
      \(TraditionalForm\`\(\(\[Ellipsis]\)\(\ \)\)\)], "InlineFormula"],
  ",\[ThinSpace]",
  Cell[BoxData[
      \(TraditionalForm\`a\_n\)], "InlineFormula"],
  ")/",
  Cell[BoxData[
      FormBox[
        StyleBox["\<\"Q\"\>",
          "TB"], TraditionalForm]], "InlineFormula"],
  " iff ",
  Cell[BoxData[
      FormBox[
        StyleBox["\<\"Q\"\>",
          "TB"], TraditionalForm]], "InlineFormula"],
  "(",
  Cell[BoxData[
      \(TraditionalForm\`a\_1\)], "InlineFormula"],
  ",\[ThinSpace]",
  Cell[BoxData[
      \(TraditionalForm\`\(\(\[Ellipsis]\)\(\ \)\)\)], "InlineFormula"],
  ",\[ThinSpace]",
  Cell[BoxData[
      \(TraditionalForm\`a\_n\)], "InlineFormula"],
  ") = ",
  Cell[BoxData[
      FormBox[
        StyleBox["\<\"Q\"\>",
          "TB"], TraditionalForm]], "InlineFormula"],
  "(",
  Cell[BoxData[
      \(TraditionalForm\`b\)], "InlineFormula"],
  "). \nThe function ",
  StyleBox["PrimitiveElement", "MR"],
  " takes a variable ",
  Cell[BoxData[
      \(TraditionalForm\`z\)], "InlineFormula"],
  " and a list of algebraic numbers ",
  Cell[BoxData[
      \(TraditionalForm\`a\_1\)], "InlineFormula"],
  ",\[ThinSpace]",
  Cell[BoxData[
      \(TraditionalForm\`\(\(\[Ellipsis]\)\(\ \)\)\)], "InlineFormula"],
  ",\[ThinSpace]",
  Cell[BoxData[
      \(TraditionalForm\`a\_n\)], "InlineFormula"],
  " and returns a primitive element ",
  Cell[BoxData[
      \(TraditionalForm\`b\)], "InlineFormula"],
  " of ",
  Cell[BoxData[
      FormBox[
        StyleBox["\<\"Q\"\>",
          "TB"], TraditionalForm]], "InlineFormula"],
  "(",
  Cell[BoxData[
      \(TraditionalForm\`a\_1\)], "InlineFormula"],
  ",\[ThinSpace]",
  Cell[BoxData[
      \(TraditionalForm\`\(\(\[Ellipsis]\)\(\ \)\)\)], "InlineFormula"],
  ",\[ThinSpace]",
  Cell[BoxData[
      \(TraditionalForm\`a\_n\)], "InlineFormula"],
  ")/",
  Cell[BoxData[
      FormBox[
        StyleBox["\<\"Q\"\>",
          "TB"], TraditionalForm]], "InlineFormula"],
  ", and a list of polynomials ",
  Cell[BoxData[
      \(TraditionalForm\`f\_1\)], "InlineFormula"],
  "(",
  Cell[BoxData[
      \(TraditionalForm\`z\)], "InlineFormula"],
  "),\[ThinSpace]",
  Cell[BoxData[
      \(TraditionalForm\`\(\(\[Ellipsis]\)\(\ \)\)\)], "InlineFormula"],
  ",\[ThinSpace]",
  Cell[BoxData[
      \(TraditionalForm\`f\_n\)], "InlineFormula"],
  "(",
  Cell[BoxData[
      \(TraditionalForm\`z\)], "InlineFormula"],
  ") such that ",
  Cell[BoxData[
      \(TraditionalForm\`a\_i\)], "InlineFormula"],
  " = ",
  Cell[BoxData[
      \(TraditionalForm\`f\_i\)], "InlineFormula"],
  "(",
  Cell[BoxData[
      \(TraditionalForm\`b\)], "InlineFormula"],
  ") for all ",
  Cell[BoxData[
      \(TraditionalForm\`i\)], "InlineFormula"],
  ". "
}], "Text",
  CellTags->{"S5.70.1", "1.2"}],

Cell[BoxData[
    FormBox[
      StyleBox[
        FrameBox[
          StyleBox[GridBox[{
                {
                  
                  RowBox[{"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"PrimitiveElement[\
\\\\\\\"\\\", \\\"MR\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\"z\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", 
                    StyleBox["{",
                      "InlineFormula"], 
                    StyleBox[
                      
                      SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"a\\\\\\\
\"\\\", \\\"TI\\\"]\\)\"\>", "1"],
                      
                      "InlineFormula"], \
"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\",...,\\\\\\\"\\\", \\\"MR\\\"]\\)\"\>", 
                    StyleBox[
                      
                      SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"a\\\\\\\
\"\\\", \\\"TI\\\"]\\)\"\>", "n"],
                      "InlineFormula"], 
                    StyleBox["}",
                      
                      "InlineFormula"], \
"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"]\\\\\\\"\\\", \\\"MR\\\"]\\) \"\>"}], 
                  RowBox[{"\<\"give a list \"\>", 
                    StyleBox["{",
                      
                      "InlineFormula"], \
"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"b\\\\\\\"\\\", \
\\\"TI\\\"]\\)\\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\"\\\", \\\"MR\\\"]\\) \
\"\>", 
                    StyleBox["{",
                      "InlineFormula"], 
                    StyleBox[
                      
                      SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"f\\\\\\\
\"\\\", \\\"TI\\\"]\\)\"\>", "1"],
                      
                      "InlineFormula"], \
"\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\",...,\\\\\\\"\\\", \\\"MR\\\"]\\)\"\>", 
                    StyleBox[
                      
                      SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"f\\\\\\\
\"\\\", \\\"TI\\\"]\\)\"\>", "n"],
                      "InlineFormula"], 
                    StyleBox["}",
                      "InlineFormula"], 
                    StyleBox["}",
                      
                      "InlineFormula"], "\<\" where \
\\!\\(\\*StyleBox[\\\"\\\\\\\"b\\\\\\\"\\\", \\\"TI\\\"]\\) is a primitive \
element for the extension of rationals by algebraic numbers \"\>", 
                    StyleBox[
                      
                      SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"a\\\\\\\
\"\\\", \\\"TI\\\"]\\)\"\>", "1"],
                      
                      "InlineFormula"], "\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\",\
\[Ellipsis]\\\\\\\"\\\", \\\"MR\\\"]\\) \\!\\(\\*StyleBox[\\\"\\\\\\\",\\\\\\\
\"\\\", \\\"MR\\\"]\\)\"\>", 
                    StyleBox[
                      
                      SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"a\\\\\\\
\"\\\", \\\"TI\\\"]\\)\"\>", "n"],
                      "InlineFormula"], "\<\", and \"\>", 
                    StyleBox[
                      
                      SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"f\\\\\\\
\"\\\", \\\"TI\\\"]\\)\"\>", "i"],
                      
                      "InlineFormula"], "\<\" is a polynomial in the variable \
\\!\\(\\*StyleBox[\\\"\\\\\\\"z\\\\\\\"\\\", \\\"TI\\\"]\\) representing \
\"\>", 
                    StyleBox[
                      
                      SubscriptBox["\<\"\\!\\(\\*StyleBox[\\\"\\\\\\\"a\\\\\\\
\"\\\", \\\"TI\\\"]\\)\"\>", "i"],
                      
                      "InlineFormula"], "\<\" in terms of the primitive \
element\"\>"}]}
                },
              ColumnAlignments->{Right, Left}],
            GridBoxOptions->{RowLines->False}]],
        "2ColumnBox"], TraditionalForm]], "Text",
  CellTags->{"S5.70.1", "1.3"}],

Cell["\<\
The primitive element of an algebraic extension of the rationals. \
\
\>", "Caption",
  CellTags->"S5.70.1"],

Cell["This loads the package. ", "MathCaption",
  CellTags->{"S5.70.1", "1.4"}],

Cell["<<NumberTheory`PrimitiveElement`", "Input",
  CellLabel->"In[1]:= ",
  CellTags->"S5.70.1"],

Cell[TextData[{
  "Here is a primitive element of ",
  Cell[BoxData[
      FormBox[
        StyleBox["\<\"Q\"\>",
          "TB"], TraditionalForm]], "InlineFormula"],
  "(",
  StyleBox["Sqrt[2]", "MR"],
  ", ",
  StyleBox["Sqrt[3]", "MR"],
  ")/",
  Cell[BoxData[
      FormBox[
        StyleBox["\<\"Q\"\>",
          "TB"], TraditionalForm]], "InlineFormula"],
  ", and a list of polynomials showing how to represent ",
  StyleBox["Sqrt[2]", "MR"],
  " and ",
  StyleBox["Sqrt[3]", "MR"],
  " in terms of the primitive element. "
}], "MathCaption",
  CellTags->{"S5.70.1", "1.5"}],

Cell[CellGroupData[{

Cell["PrimitiveElement[z, {Sqrt[2], Sqrt[3]}]", "Input",
  CellLabel->"In[2]:= ",
  CellTags->"S5.70.1"],

Cell[BoxData[
    \({Root[1 - 10\ #1\^2 + #1\^4 &, 
        4], {\(-\(\(9\ z\)\/2\)\) + z\^3\/2, \(11\ z\)\/2 - 
          z\^3\/2}}\)], "Output",
  CellLabel->"Out[2]= ",
  CellTags->"S5.70.1"]
}, Open  ]],

Cell[TextData[{
  "This checks that the computed polynomials evaluated at the primitive \
element give ",
  StyleBox["Sqrt[2]", "MR"],
  " and ",
  StyleBox["Sqrt[3]", "MR"],
  ". "
}], "MathCaption",
  CellTags->{"S5.70.1", "1.6"}],

Cell[CellGroupData[{

Cell["RootReduce[%[[2]] /. z -> %[[1]]]", "Input",
  CellLabel->"In[3]:= ",
  CellTags->"S5.70.1"],

Cell[BoxData[
    \({\@2, \@3}\)], "Output",
  CellLabel->"Out[3]= ",
  CellTags->"S5.70.1"]
}, Open  ]]
},
FrontEndVersion->"4.0 for X",
ScreenRectangle->{{0, 800}, {0, 600}},
WindowSize->{520, 455},
WindowMargins->{{140, Automatic}, {Automatic, 72}},
StyleDefinitions -> "HelpBrowser.nb"
]


(***********************************************************************
Cached data follows.  If you edit this Notebook file directly, not using
Mathematica, you must remove the line containing CacheID at the top of 
the file.  The cache data will then be recreated when you save this file 
from within Mathematica.
***********************************************************************)

(*CellTagsOutline
CellTagsIndex->{
  "S5.70.1"->{
    Cell[1717, 49, 150, 6, 70, "Subsection",
      CellTags->{"S5.70.1", "1.1"}],
    Cell[1870, 57, 4745, 157, 70, "Text",
      CellTags->{"S5.70.1", "1.2"}],
    Cell[6618, 216, 3772, 89, 70, "Text",
      CellTags->{"S5.70.1", "1.3"}],
    Cell[10393, 307, 118, 4, 70, "Caption",
      CellTags->"S5.70.1"],
    Cell[10514, 313, 79, 1, 70, "MathCaption",
      CellTags->{"S5.70.1", "1.4"}],
    Cell[10596, 316, 97, 2, 70, "Input",
      CellTags->"S5.70.1"],
    Cell[10696, 320, 583, 21, 70, "MathCaption",
      CellTags->{"S5.70.1", "1.5"}],
    Cell[11304, 345, 104, 2, 70, "Input",
      CellTags->"S5.70.1"],
    Cell[11411, 349, 194, 5, 70, "Output",
      CellTags->"S5.70.1"],
    Cell[11620, 357, 232, 8, 70, "MathCaption",
      CellTags->{"S5.70.1", "1.6"}],
    Cell[11877, 369, 98, 2, 70, "Input",
      CellTags->"S5.70.1"],
    Cell[11978, 373, 92, 3, 70, "Output",
      CellTags->"S5.70.1"]},
  "1.1"->{
    Cell[1717, 49, 150, 6, 70, "Subsection",
      CellTags->{"S5.70.1", "1.1"}]},
  "1.2"->{
    Cell[1870, 57, 4745, 157, 70, "Text",
      CellTags->{"S5.70.1", "1.2"}]},
  "1.3"->{
    Cell[6618, 216, 3772, 89, 70, "Text",
      CellTags->{"S5.70.1", "1.3"}]},
  "1.4"->{
    Cell[10514, 313, 79, 1, 70, "MathCaption",
      CellTags->{"S5.70.1", "1.4"}]},
  "1.5"->{
    Cell[10696, 320, 583, 21, 70, "MathCaption",
      CellTags->{"S5.70.1", "1.5"}]},
  "1.6"->{
    Cell[11620, 357, 232, 8, 70, "MathCaption",
      CellTags->{"S5.70.1", "1.6"}]}
  }
*)

(*CellTagsIndex
CellTagsIndex->{
  {"S5.70.1", 12711, 396},
  {"1.1", 13639, 421},
  {"1.2", 13733, 424},
  {"1.3", 13824, 427},
  {"1.4", 13915, 430},
  {"1.5", 14011, 433},
  {"1.6", 14109, 436}
  }
*)

(*NotebookFileOutline
Notebook[{
Cell[1717, 49, 150, 6, 70, "Subsection",
  CellTags->{"S5.70.1", "1.1"}],
Cell[1870, 57, 4745, 157, 70, "Text",
  CellTags->{"S5.70.1", "1.2"}],
Cell[6618, 216, 3772, 89, 70, "Text",
  CellTags->{"S5.70.1", "1.3"}],
Cell[10393, 307, 118, 4, 70, "Caption",
  CellTags->"S5.70.1"],
Cell[10514, 313, 79, 1, 70, "MathCaption",
  CellTags->{"S5.70.1", "1.4"}],
Cell[10596, 316, 97, 2, 70, "Input",
  CellTags->"S5.70.1"],
Cell[10696, 320, 583, 21, 70, "MathCaption",
  CellTags->{"S5.70.1", "1.5"}],

Cell[CellGroupData[{
Cell[11304, 345, 104, 2, 70, "Input",
  CellTags->"S5.70.1"],
Cell[11411, 349, 194, 5, 70, "Output",
  CellTags->"S5.70.1"]
}, Open  ]],
Cell[11620, 357, 232, 8, 70, "MathCaption",
  CellTags->{"S5.70.1", "1.6"}],

Cell[CellGroupData[{
Cell[11877, 369, 98, 2, 70, "Input",
  CellTags->"S5.70.1"],
Cell[11978, 373, 92, 3, 70, "Output",
  CellTags->"S5.70.1"]
}, Open  ]]
}
]
*)




(***********************************************************************
End of Mathematica Notebook file.
***********************************************************************)

