Adjoin the square root of 2.
{{{ N.=QQ[sqrt(2)] N }}} {{{ N.polynomial() }}} {{{ N.degree() }}} {{{ V = N.vector_space()[0] V }}}
A simple extension with a combination of the two roots.
{{{ K. = QQ[sqrt(2)+3*sqrt(3)] K }}} {{{ K.degree() }}}Adjoin roots individually (a tower results).
{{{ M.=QQ[sqrt(2),sqrt(3)] M }}} {{{ b, c }}} {{{ M.base_field() }}}“Flatten” the tower over the rationals.
{{{ L.${x}^{4} − 10{x}^{2} + 1 = {({x}^{2})}^{2} − 10{x}^{2} + 1$ has four roots, $ ±\sqrt{5 ± \sqrt{6}}$.
Factor this polynomial over L. First make the right ring of polynomials.
{{{ R.And the right polynomial.
{{{ poly = z^4-10*z^2+1 poly.parent() }}}And factor.
{{{ poly.factor() }}}Now factor the polynomial of the extension K, but in L.
{{{ polyK = z^4 - 58*z^2 + 625 }}} {{{ polyK.factor() }}}K and L are both vector spaces of degree 4 over the rationals, and it is easy to see that K is a subspace of L, so with facts from linear algebra we have K==L.
Minimal polynomial (over $\mathbf{Q}$) for $\sqrt{3} + \sqrt{7}$ is ${x}^{4} − 20{x}^{2} + 16$.
{{{ P.Now examine roots with symbolic routines. First define the algebraic element in question.
{{{ t = sqrt(3)+sqrt(7) }}} {{{ (t^3/4-5*t).expand() }}}
An extension by adjoining one root, then a factoriztion of th polynomial in the extension field.
{{{ A. = NumberField(p) Y.Add a root of the cubic factor, and then obtain a factorization.
{{{ B. = NumberField(y^3 + a*y^2 + a^2*y + a^3 + 1) Z.One more time, now based on the quadratic.
{{{ C.Notice how the fourth root is a simple function of the other three, a+b+c.
{{{ D.The degrees of the extension are, successively, 4, 3, and 2, with a product for the full tower equalling $4! = 24$.
{{{ D.degree() }}}
Numerator has root $ − 1$, so we remove linear factor.
{{{ var('x') p = ((x+2)^5 - 1)/(x+1) p_irr = p.simplify_rational() p_irr }}} {{{ G.Polynomial spits in the extension G.
{{{ Y.
$20$ degrees, or ${π\over 9} $ in radians, creates an extension of the rationals with a degree that is not a power of $2$, and hence is not constructible. A trisection of a $60$ degree angle is equivalent to creating a right triangle with unit hypotenuse and one side length equal to $\mathop{ cos}\nolimits \left ({π\over 9} \right )$.
{{{ T = QQ[cos(pi/9)] T }}} {{{ T.degree().log(2) in ZZ }}} {{{ }}}