Element operations
Creation
#
gen
— Method.
gen(L::SimpleNumField) -> NumFieldElem
Given a simple number field over , this functions returns the class of , which is the canonical primitive element of over .
#
gens
— Method.
gens(L::NonSimpleNumField) -> Vector{NumFieldElem}
Given a non-simple number field over , this functions returns the list .
Elements can also be created by specifying the coordinates with respect to the basis of the number field:
(L::number_field)(c::Vector{NumFieldElem}) -> NumFieldElem
Given a number field of degree and a vector c
length , this constructs the element a
with coordinates(a) == c
.
julia> Qx, x = QQ["x"];
julia> K, a = number_field(x^2 - 2, "a");
julia> K([1, 2])
2*a + 1
julia> L, b = radical_extension(3, a, "b")
(Relative number field of degree 3 over number field, b)
julia> L([a, 1, 1//2])
1//2*b^2 + b + a
#
quadratic_defect
— Method.
quadratic_defect(a::Union{NumFieldElem,Rational,QQFieldElem}, p) -> Union{Inf, PosInf}
Returns the valuation of the quadratic defect of the element at , which can either be prime object or an infinite place of the parent of .
#
hilbert_symbol
— Method.
hilbert_symbol(a::NumFieldElem, b::NumFieldElem, p::AbsNumFieldOrderIdeal{AbsSimpleNumField, AbsSimpleNumFieldElem}) -> Int
Returns the local Hilbert symbol .
#
representation_matrix
— Method.
representation_matrix(a::NumFieldElem) -> MatElem
Returns the representation matrix of , that is, the matrix representing multiplication with with respect to the canonical basis of the parent of .
#
basis_matrix
— Method.
basis_matrix(v::Vector{NumFieldElem}) -> Mat
Given a vector of elements of a number field of degree , this function returns an matrix with entries in the base field of , where row contains the coefficients of with respect of the canonical basis of .
#
coefficients
— Method.
coefficients(a::SimpleNumFieldElem, i::Int) -> Vector{FieldElem}
Given a number field element a
of a simple number field extension L/K
, this function returns the coefficients of a
, when expanded in the canonical power basis of L
.
#
coordinates
— Method.
coordinates(x::NumFieldElem{T}) -> Vector{T}
Given an element in a number field , this function returns the coordinates of with respect to the basis of (the output of the 'basis' function).
#
absolute_coordinates
— Method.
absolute_coordinates(x::NumFieldElem{T}) -> Vector{T}
Given an element in a number field , this function returns the coordinates of with respect to the basis of over the rationals (the output of the absolute_basis
function).
#
coeff
— Method.
coeff(a::SimpleNumFieldElem, i::Int) -> FieldElem
Given a number field element a
of a simple number field extension L/K
, this function returns the i
-th coefficient of a
, when expanded in the canonical power basis of L
. The result is an element of K
.
#
valuation
— Method.
valuation(a::NumFieldElem, p::AbsNumFieldOrderIdeal{AbsSimpleNumField, AbsSimpleNumFieldElem}) -> ZZRingElem
Computes the -adic valuation of , that is, the largest such that is contained in .
#
torsion_unit_order
— Method.
torsion_unit_order(x::AbsSimpleNumFieldElem, n::Int)
Given a torsion unit together with a multiple of its order, compute the order of , that is, the smallest such that .
It is not checked whether is a torsion unit.
#
tr
— Method.
tr(a::NumFieldElem) -> NumFieldElem
Returns the trace of an element of a number field extension . This will be an element of .
#
absolute_tr
— Method.
absolute_tr(a::NumFieldElem) -> QQFieldElem
Given a number field element , returns the absolute trace of .
#
algebraic_split
— Method.
algebraic_split(a::AbsSimpleNumFieldElem) -> AbsSimpleNumFieldElem, AbsSimpleNumFieldElem
Writes the input as a quotient of two "small" algebraic integers.
Conjugates
#
conjugates
— Method.
conjugates(x::AbsSimpleNumFieldElem, C::AcbField) -> Vector{AcbFieldElem}
Compute the conjugates of as elements of type AcbFieldElem
. Recall that we order the complex conjugates such that for .
Let p
be the precision of C
, then every entry of the vector returned satisfies radius(real(y)) < 2^-p
and radius(imag(y)) < 2^-p
respectively.
#
conjugates
— Method.
conjugates(x::AbsSimpleNumFieldElem, abs_tol::Int) -> Vector{AcbFieldElem}
Compute the conjugates of as elements of type AcbFieldElem
. Recall that we order the complex conjugates such that for .
Every entry of the vector returned satisfies radius(real(y)) < 2^-abs_tol
and radius(imag(y)) < 2^-abs_tol
respectively.
#
conjugates_log
— Method.
conjugates_arb_log(x::AbsSimpleNumFieldElem, abs_tol::Int) -> Vector{ArbFieldElem}
Returns the elements as elements of type ArbFieldElem
with radius less then 2^-abs_tol
.
#
conjugates_real
— Method.
conjugates_arb_real(x::AbsSimpleNumFieldElem, abs_tol::Int) -> Vector{ArbFieldElem}
Compute the real conjugates of as elements of type ArbFieldElem
.
Every entry of the array returned satisfies radius(y) < 2^-abs_tol
.
#
conjugates_complex
— Method.
conjugates_complex(x::AbsSimpleNumFieldElem, abs_tol::Int) -> Vector{AcbFieldElem}
Compute the complex conjugates of as elements of type AcbFieldElem
. Recall that we order the complex conjugates such that for .
Every entry of the array returned satisfies radius(real(y)) < 2^-abs_tol
and radius(imag(y)) < 2^-abs_tol
.
#
conjugates_arb_log_normalise
— Method.
conjugates_arb_log_normalise(x::AbsSimpleNumFieldElem, p::Int = 10)
conjugates_arb_log_normalise(x::FacElem{AbsSimpleNumFieldElem, AbsSimpleNumField}, p::Int = 10)
The "normalised" logarithms, i.e. the array , so the (weighted) sum adds up to zero.
#
minkowski_map
— Method.
minkowski_map(a::AbsSimpleNumFieldElem, abs_tol::Int) -> Vector{ArbFieldElem}
Returns the image of under the Minkowski embedding. Every entry of the array returned is of type ArbFieldElem
with radius less then 2^(-abs_tol)
.
Predicates
#
is_integral
— Method.
is_integral(a::NumFieldElem) -> Bool
Returns whether is integral, that is, whether the minimal polynomial of has integral coefficients.
#
is_torsion_unit
— Method.
is_torsion_unit(x::AbsSimpleNumFieldElem, checkisunit::Bool = false) -> Bool
Returns whether is a torsion unit, that is, whether there exists such that .
If checkisunit
is true
, it is first checked whether is a unit of the maximal order of the number field is lying in.
#
is_local_norm
— Method.
is_local_norm(L::NumField, a::NumFieldElem, P)
Given a number field , an element and a prime ideal of , returns whether is a local norm at .
The number field must be a simple extension of degree 2.
#
is_norm_divisible
— Method.
is_norm_divisible(a::AbsSimpleNumFieldElem, n::ZZRingElem) -> Bool
Checks if the norm of is divisible by , assuming that the norm of is an integer.
#
is_norm
— Method.
is_norm(K::AbsSimpleNumField, a::ZZRingElem; extra::Vector{ZZRingElem}) -> Bool, AbsSimpleNumFieldElem
For a ZZRingElem , try to find s.th. holds. If successful, return true and , otherwise false and some element. In \testtt{extra} one can pass in additional prime numbers that are allowed to occur in the solution. This will then be supplemented. The element will be returned in factored form.
Invariants
#
norm
— Method.
norm(a::NumFieldElem) -> NumFieldElem
Returns the norm of an element of a number field extension . This will be an element of .
#
absolute_norm
— Method.
absolute_norm(a::NumFieldElem) -> QQFieldElem
Given a number field element , returns the absolute norm of .
#
minpoly
— Method.
minpoly(a::NumFieldElem) -> PolyRingElem
Given a number field element of a number field , this function returns the minimal polynomial of over the base field of .
#
absolute_minpoly
— Method.
absolute_minpoly(a::NumFieldElem) -> PolyRingElem
Given a number field element of a number field , this function returns the minimal polynomial of over the rationals .
#
charpoly
— Method.
charpoly(a::NumFieldElem) -> PolyRingElem
Given a number field element of a number field , this function returns the characteristic polynomial of over the base field of .
#
absolute_charpoly
— Method.
absolute_charpoly(a::NumFieldElem) -> PolyRingElem
Given a number field element of a number field , this function returns the characteristic polynomial of over the rationals .
#
norm
— Method.
norm(a::NumFieldElem, k::NumField) -> NumFieldElem
Returns the norm of an element of a number field with respect to a subfield of . This will be an element of .