In :
using Hecke

Welcome to Nemo version 0.16.4-dev

Nemo comes with absolutely no warranty whatsoever

Welcome to

$\require{action}$
    _    _           _
| |  | |         | |
| |__| | ___  ___| | _____
|  __  |/ _ \/ __| |/ / _ \
| |  | |  __/ (__|   <  __/
|_|  |_|\___|\___|_|\_\___|

Version 0.7.3-dev ...
... which comes with absolutely no warranty whatsoever
(c) 2015-2019 by Claus Fieker, Tommy Hofmann and Carlo Sircana



Do define number fields, in general we need polynmials, so we define a polynomial ring, then a number field. $a$ will be the primitive element, hence a root of $x^2-10$

In :
Qx, x = FlintQQ["x"]
k, a = number_field(x^2-10)

Out:
($k$, $\alpha$)

To extend further, we need polynomials over $k$, then we can define an extension.

In :
kt,t = k["t"]

Out:
($kt$, $t$)
In :
K, b = number_field(t^3-a*t+a+1)

Out:
(Relative number field over
Number field over Rational Field with defining polynomial x^2-10
with defining polynomial t^3+(-_a)*t+(_a+1), _$) For many algorithm, finding a primitive element is important. The maps are the isomorphism between the relative and absolute fields and the embedding from$k$. In : Ka, m1, m2 = absolute_field(K)  Out: ($Ka$,$m1: Ka\to K$,$m2: k\to Ka$) To check that$m_2$is indeed the embedding, we veryify$m_2(a)^2 = 10$: In : m2(a)  Out:$-\frac{1}{2}x^{5} - \frac{1}{2}x^{4} - \frac{1}{2}x^{3} - \frac{1}{2}x^{2} + \frac{9}{2}x - \frac{11}{2}$In : ans^2  Out:$10$Given that we did not assign a name to the primitive element of$K_a$it is printed generically: In : preimage(m1, b)  Out:$x$Checking that is still satisfies the equation for$b$: In : ans^3-m2(a)*ans+m2(a)  Out:$-1$and some invariants.. In : norm(b), discriminant(K), norm(b, FlintQQ)  Out: ($-\alpha-1$,$-14\alpha-297$,$-9$) In addition to absolute and relative fields given via a polynomial (hence a primitive element) we also have {\em non-simple} fields, given via the roots of several polynomials. Note: the ideal defined by the polynomials needs to be maximal. This is not verified. In : k, g = number_field([x^2-3, x^2-5, x^2-7])  Out: (Non-simple number field with defining polynomials fmpq_mpoly[x1^2 - 3, x2^2 - 5, x3^2 - 7], NfAbsNSElem[_$1, _$2, _$3])
In :
g^2

Out:
3
In :
[x^2 for x = basis(k)]

Out:
$[1, 3, 5, 15, 7, 21, 35, 105]$

Similar to above, we can convert to a primitive representation:

In :
ks, ms = simple_extension(k)

Out:
($ks$, $ms: ks\to k$)
In :
ms\g

Out:
$\frac{3}{7552}\alpha^{7} - \frac{121}{7552}\alpha^{5} - \frac{663}{7552}\alpha^{3} + \frac{11405}{7552}\alpha$
In :
ans^2

Out:
$3$