Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Project: Math 582b
Views: 2495

Defining Number Fields -- part 2

William Stein

Jan 11, 2016

Part 2: Relative number fields

Frequently number fields are naturally defined as a tower (or as a compositum of other number fields). First let's consider an extension of number fields. Things work just like before, but you define a second polynomial ring over the first number field.

Let's first define K=Q(2)K=\QQ(\sqrt{2}), then M=K(2+3)M=K(\sqrt{\sqrt{2} + 3}).

R.<x> = QQ[] K.<alpha> = NumberField(x^2 - 2) K
Number Field in alpha with defining polynomial x^2 - 2
# Make a polynomial ring in one variable "y" over K: S.<y> = K[] S
Univariate Polynomial Ring in y over Number Field in alpha with defining polynomial x^2 - 2
# Finally define M: M.<beta> = NumberField(y^2 - (alpha + 3)) M
Number Field in beta with defining polynomial y^2 - alpha - 3 over its base field
beta^2
alpha + 3

Elements of KK will automatically convert into elements of MM. (This is actually really general and complicated, under the hood, and took years of work to do in the right generality. Sage is the biggest and most sophisticated implementation of this sort of "coercion model" functionality.)

alpha.parent()
Number Field in alpha with defining polynomial x^2 - 2
beta.parent()
Number Field in beta with defining polynomial y^2 - alpha - 3 over its base field
(1/5).parent()
Rational Field
1 + alpha + beta + 1/5
beta + alpha + 6/5

Exercise right now: Construct K(1+2+33)K(\sqrt[3]{1 + \sqrt{\sqrt{2} + 3}}) as an extension of MM.

︠184ec9e7-71c4-4357-a917-277f659d20ad︠ ︠b2458d01-c28b-4491-bafe-3627bc5de04f︠ ︠07063ba8-7ff8-4f47-b607-e9271099202ci︠ %md ## Inspiration: Magma The user interface for making number fields in Sage is motivated by how things work in Magma. See, e.g., https://magma.maths.usyd.edu.au/magma/handbook/number_fields and here is an example:

Inspiration: Magma

The user interface for making number fields in Sage is motivated by how things work in Magma.

See, e.g., https://magma.maths.usyd.edu.au/magma/handbook/number_fields

and here is an example:

%magma R<x> := PolynomialRing(RationalField()); print R;
Univariate Polynomial Ring in x over Rational Field
%magma K<alpha> := NumberField(x^2 - 2); K
Number Field with defining polynomial x^2 - 2 over the Rational Field
%magma S<y> := PolynomialRing(K); S
Univariate Polynomial Ring in y over K
%magma M<beta> := NumberField(y^2 - (alpha + 3)); print M
Number Field with defining polynomial y^2 - alpha - 3 over K
%magma print (beta^2)
alpha + 3
%magma // Of course this *does* work fine in Magma: print 1 + alpha + beta + 1/5
beta + 1/5*(5*alpha + 6)

Compositums

You can also make number fields as compositums of existing number fields:

K.<a> = NumberField(x^2 + 2); K M.<b> = NumberField(x^2 - 3); M
Number Field in a with defining polynomial x^2 + 2 Number Field in b with defining polynomial x^2 - 3
K.composite_fields(M)
[Number Field in ab with defining polynomial x^4 - 2*x^2 + 25]

Composite fields outputs a list because there can be more than one composite of fields, in case there are multiple embeddings of the field into Q\overline{\QQ}.

Exercise right now: explicitly compute an example in which K.composite_fields(M) is a list of length bigger than 1?

# do it here ︠cfbb7f52-cf94-4ea0-8c8f-b10392e36bea︠ ︠79a6fd7d-b1da-473f-8e49-8b710f7a2e54︠ ︠1fc32204-ec13-40fb-a09c-7c33ca979fd6i︠ %md You can also just give several polynomials to construct a choice of compositum:

You can also just give several polynomials to construct a choice of compositum:

K.<a,b> = NumberField([x^2 + 2, x^3 - 3]) K
Number Field in a with defining polynomial x^2 + 2 over its base field
a^2
-2
b^3
3

Other things to think about next time:

  • Speed of arithmetic in absolute fields

  • Finding an optimized representation for a number field

  • Speed of arithmetic in relative fields

  • Going from a relative extention to an absolute extension.

︠10650cd9-54fb-4c83-903c-5b7870a9dbd5︠