Number Fields
Introduction
This chapter deals with number fields. Number fields, in Hecke, come in several different types:
AnticNumberField
: a finite simple extension of the rational numbers $Q$NfAbsNS
: a finite extension of $Q$ given by several polynomials.
We will refer to this as a non-simple field - even though mathematically we can find a primitive elements.
NfRel
: a finite simple extension of a number field. This is actually parametried by the (element) type of the coefficient field. The complete type of an extension of an absolute field (AnticNumberField
) isNfRel{nf_elem}
. The next extension thus will beNfRel{NfRelElem{nf_elem}}
.NfRel_ns
: extensions of number fields given by several polynomials. This too will be refered to as a non-simple field.
The simple types AnticNumberField
and NfRel
are also calle simple fields in the rest of this document, NfRel
and NfRel_ns
are referred to as relative extensions while AnticNumberField
and NfAbsNS
are called absolute.
Internally, simple fields are essentially just (univariate) polynomial quotients in a dense representation, while non-simple fields are multivariate quotient rings, thus have a sparse presentation. In general, simple fields allow much faster arithmetic, while the non-simple fields give easy access to large degree fields.
Absolute Simple Fields
The most basic number field type is that of AnticNumberField
. Internally this is essentially represented as a unvariate quotient with the arithmetic provided by the antic-c-library and implemented in Nemo.
Creation
Number fields are mostly created using NumberField
, but also using number_field
.
Many of the constructors have arguments of type Symbol
or AbstractString
, if used, they define the appearance in printing, and printing only. The named parameter check
can be true
or false, the default being
true`. This parameter controlls is the polynomial defining the number field is tested for irreducibility or not. Given that this can be potentially very time consuiming if the degree if large, one can omit this test. Note however, that the behaviour of Hecke is undefined if a reducible polynomial is used to define a field.
The named boolean parameter cached
is inherited from the underlying Nemo system. Two number fields defined using the same polynomial from the identical polynomial ring and the same (identical) symbol/ string will be identical if cached == true
and different if cached == false
.
Nemo.NumberField
— Method.NumberField(f::fmpq_poly; cached::Bool = true, check::Bool = true)
The number field Q[x]/f generated by f.
Hecke.cyclotomic_field
— Method.cyclotomic_field(n::Int) -> AnticNumberField, nf_elem
The $n$-th cyclotomic field defined by the $n$-the cyclotomic polynomial.
Hecke.wildanger_field
— Method.wildanger_field(n::Int, B::fmpz) -> AnticNumberField, nf_elem
wildanger_field(n::Int, B::Integer) -> AnticNumberField, nf_elem
Returns the field with defining polynomial $x^n + \sum_{i=0}^{n-1} (-1)^{n-i}Bx^i$. These fields tend to have non-trivial class groups.
Hecke.pure_extension
— Method.pure_extension(n::Int, gen::Integer; cached::Bool = true, check::Bool = true) -> AnticNumberField, nf_elem
pure_extension(n::Int, gen::fmpz; cached::Bool = true, check::Bool = true) -> AnticNumberField, nf_elem
The number field with defining polynomial $x^n-gen$.
Example
julia> Qx, x = PolynomialRing(FlintQQ, "x");
julia> K, a = NumberField(x^2 - 10, "a");
Absolute Non-Simple Fields
Creation
Nemo.NumberField
— Function.number_field(f::Array{fmpq_poly, 1}, s::String="_\$") -> NfAbsNS
Let $f = (f_1, \ldots, f_n)$ be univariate rational polynomials, then we construct
The ideal bust be maximal, however, this is not tested.
Example
julia> Qx, x = PolynomialRing(FlintQQ, "x");
julia> K, g = number_field([x^2-2, x^2-3, x^2-5])
(Non-simple number field with defining polynomials fmpq_mpoly[_$1^2 - 2, _$2^2 - 3, _$3^2 - 5], NfAbsNSElem[_$1, _$2, _$3])
julia> g[1]^2
2
julia> minpoly(g[1] + g[2])
x^4-10*x^2+1
Conversion
Hecke.simple_extension
— Method.simple_extension(K::NfAbsNS) -> AnticNumberField, Map
For a non-simple extension $K$ of $Q$, find a primitive element and thus an isomorphic simple extension of $Q$. The map realises this isomorphism.
Simple Relative Fields
Creation
Nemo.NumberField
— Method.NumberField(f::Generic.Poly{T}, s::String; cached::Bool = false, check::Bool = false) where T
Given an irreducible polynomial $f$ over some number field $K$, create the field $K[t]/f$. $f$ must be irreducible - although this is not tested.
NumberField(f::Generic.Poly{T}; cached::Bool = false, check::Bool = false) where T
Given an irreducible polynomial $f$ over some number field $K$, create the field $K[t]/f$. $f$ must be irreducible - although this is not tested.
number_field(f::Array{Generic.Poly{T}, 1}, s::String="_\$") where T -> NfRel_ns
Given polynomials $f = (f_1, \ldots, f_n)$ over some number field $k$, construct $K = k[t_1, \ldots, t_n]/\langle f_1(t_1), \ldots, f_n(t_n)\rangle$ The ideal in the quotient must be maximal - although this is not tested.
Nemo.NumberField
— Method.NumberField(f::Generic.Poly{T}, s::String; cached::Bool = false, check::Bool = false) where T
Given an irreducible polynomial $f$ over some number field $K$, create the field $K[t]/f$. $f$ must be irreducible - although this is not tested.
Conversion
Hecke.absolute_field
— Method.absolute_field(K::NfRel{nf_elem}, cached::Bool = false) -> AnticNumberField, Map, Map
Given an extension $K/k/Q$, find an isomorphic extensino of $Q$.
absolute_field(K::NfRel{NfRelElem}, cached::Bool = false) -> NfRel, Map, Map
Given an extension $E/K/k$, find an isomorphic extension of $k$. In a tower, only the top-most steps are collapsed.
Hecke.absolute_field
— Method.absolute_field(K::NfRel{NfRelElem}, cached::Bool = false) -> NfRel, Map, Map
Given an extension $E/K/k$, find an isomorphic extension of $k$. In a tower, only the top-most steps are collapsed.
Non-Simple Relative Fields
Creation
Nemo.NumberField
— Method.number_field(f::Array{Generic.Poly{T}, 1}, s::String="_\$") where T -> NfRel_ns
Given polynomials $f = (f_1, \ldots, f_n)$ over some number field $k$, construct $K = k[t_1, \ldots, t_n]/\langle f_1(t_1), \ldots, f_n(t_n)\rangle$ The ideal in the quotient must be maximal - although this is not tested.
Conversion
Hecke.simple_extension
— Method.simple_extension(K::NfRel_ns{nf_elem}) -> NfRel, Map
Compute a simple field L as an extension of the base field of K and an isomorphism between L and K
Hecke.simple_extension
— Method.simple_extension(K::NfRel_ns{nf_elem}, FlintQQ) -> AnticNumberField, Map, Map
absolute_field(K::NfRel_ns{nf_elem}) -> AnticNumberField, Map, Map
Compute an isomorphic field as an extension of $Q$ together with the isomorphism (1st map) and the embedding of the base field (2nd map).
Implicit Relative Extensions
Given two absolute fields $K$ and $k$ as well as an embedding $\phi:k \to K$ we can regard $K$ as an extension on $k$, hence invariante of $K$ can be investigated relative to $k$ rathern than over $Q$. Here we list functions achieving this without actually computing $K$ as an extension of $k$.
Base.minimum
— Method.minimum(m::T, I::NfOrdIdl) where T <: Map{AnticNumberField, AnticNumberField} -> NfOrdIdl
Given an embedding $m:k\to K$ of number fields and an integral ideal in $K$, find the intersect $I \cap \Z_k$.
LinearAlgebra.norm
— Method.norm(m::T, I::NfOrdIdl) where T <: Map{AnticNumberField, AnticNumberField} -> NfOrdIdl
Given an embedding $m:k\to K$ of number fields and an integral ideal in $K$, find the norm $N_{K/k}(I)$.
LinearAlgebra.norm
— Method.norm(m::T, a::nf_elem) where T <: Map{AnticNumberField, AnticNumberField} -> nf_elem
Given an embedding $m:k\to K$ of number fields and an element in $K$, find the norm $N_{K/k}(a)$.
AbstractAlgebra.Generic.discriminant
— Method.discriminant(m::Map, R::NfOrd) -> NfOrdIdl
The discriminant ideal of $R$ over the maximal order of the domain of the map $m$, that is, the ideal generated by all norms of differents of elements in $R$.
Hecke.NfAbsOrdIdlSet
— Type.(::NfAbsOrdIdlSet)(m::Map, I::NfOrdIdl) -> NfOrdIdl
Given an embedding $m:k\to K$ of number fields and an ideal $I$ in $k$, find the ideal above $I$ in $K$.
Invariants
AbstractAlgebra.Generic.degree
— Method.degree(a::AnticNumberField)
Return the degree of the given number field, i.e. the degree of its defining polynomial.
Hecke.basis
— Method.basis(K::AnticNumberField) -> Vector{nf_elem}
Returns the power basis of $K$, that is, the elements $1,a,\dotsc,a^{d - 1}$, where $d$ is the degree of $K$.
AbstractAlgebra.Generic.discriminant
— Method.discriminant(K::AnticNumberField) -> fmpq
discriminant(K::NfRel) ->
The discriminant of the defining polynomial of $K$ {\bf not} the discriminant of the maximal order.
Elements
Creation
Nemo.AnticNumberField
— Type.(a::AnticNumberField)()
Return an empty (0) element.
(a::AnticNumberField)(c::Int)
Return $c$ as an element in $a$.
Invariants
LinearAlgebra.norm
— Method.norm(a::nf_elem)
Return the absolute norm of $a$. The result will be a rational number.
AbstractAlgebra.Generic.minpoly
— Method.minpoly(a::nf_elem) -> fmpq_poly
The minimal polynomial of a.
minpoly(S::Ring, M::MatElem{T}, charpoly_only::Bool = false) where {T <: FieldElement}
Returns the minimal polynomial $p$ of the matrix $M$. The polynomial ring $S$ of the resulting polynomial must be supplied and the matrix must be square.
minpoly(S::Ring, M::MatElem{T}, charpoly_only::Bool = false) where {T <: RingElement}
Returns the minimal polynomial $p$ of the matrix $M$. The polynomial ring $S$ of the resulting polynomial must be supplied and the matrix must be square.
minpoly(S::Ring, M::MatAlgElem{T}, charpoly_only::Bool = false) where {T <: RingElement}
Returns the minimal polynomial $p$ of the matrix $M$. The polynomial ring $S$ of the resulting polynomial must be supplied and the matrix must be square.
AbstractAlgebra.Generic.charpoly
— Method.charpoly(a::nf_elem) -> fmpq_poly
The characteristic polynomial of a.
charpoly(V::Ring, Y::Generic.MatrixElem{T}) where {T <: RingElement}
Returns the characteristic polynomial $p$ of the matrix $M$. The polynomial ring $R$ of the resulting polynomial must be supplied and the matrix is assumed to be square.
Base.denominator
— Method.denominator(a::nf_elem)
Return the denominator of the polynomial representation of the given number field element.
Base.numerator
— Method.numerator(a::nf_elem) -> nf_elem
For an element $a\in K = Q[t]/f$ write $a$ as $b/d$ with $b\in Z[t]$, $\deg(a) = \deg(b)$ and $d>0$ minimal in $Z$. This function returns $b$.
AbstractAlgebra.Generic.isunit
— Method.isunit(a::nf_elem)
Return
true
if the given number field element is invertible, i.e. nonzero, otherwise returnfalse
.