Introduction
By definition, a number field is a finite extension of the rationals
In Hecke, a number field
We support two presentations for an extension
as a quotient
, where is an irreducible polynomial (i.e. a simple extension), or as a quotient
, where are appropriate choices of univariate polynomials making a field (i.e. a non-simple extension).
In both cases we refer to
Info
By the Primitive Element Theorem, any finite separable extension
Absolute and Relative Extensions
A useful dichotomy comes from the origin of the base field in the definition of a number field
There are (at least) four concrete types that can be used in the implementation of a number field:
AbsSimpleNumFieldfor absolute simple number fields, AbsNonSimpleNumFieldfor absolute non-simple number fields, RelSimpleNumFieldfor simple relative extensions, RelNonSimpleNumFieldfor non-simple relative extensions.
Example
We can construct an absolute simple quadratic field
julia> K, a = quadratic_field(5)
(Real quadratic field defined by x^2 - 5, sqrt(5))
julia> Kx, x = K["x"]
(Univariate polynomial ring in x over K, x)
julia> L, b = number_field([x^2-2, x^2-3], "b")
(Relative non-simple number field of degree 4 over K, RelNonSimpleNumFieldElem{AbsSimpleNumFieldElem}[b1, b2])
julia> typeof(K)
AbsSimpleNumField
julia> typeof(L)
RelNonSimpleNumField{AbsSimpleNumFieldElem}Both the absolute and relative simple number field types are concrete subtypes of the abstract type SimpleNumField{T} parametrized by the element type T of the associated base field. Both absolute and relative non-simple number field types are subtypes of the abstract type NonSimpleNumField{T} parametrized similarly. These types are themselves subtypes of the abstract parametrized type NumField{T}.
Thus a (simplified) graph of the type tree for number fields is:
NumField{QQFieldElem} NumField{T}
├── NonSimpleNumField{QQFieldElem} ├── NonSimpleNumField{T}
│ └── AbsNonSimpleNumField │ └── RelNonSimpleNumField
└── SimpleNumField{QQFieldElem} └── SimpleNumField{T}
└── AbsSimpleNumField └── RelSimpleNumFieldElements of fields implemented by one of these concrete types have a similar type but with an Elem suffix (e.g. an element of an absolute simple number field of type AbsSimpleNumField has type AbsSimpleNumFieldElem).
