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::NumberField)(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 = NumberField(x^2 - 2, "a");
julia> K([1, 2])
2*a + 1
julia> L, b = radical_extension(3, a, "b")
(Relative number field with defining polynomial x^3 - a
over Number field over Rational Field with defining polynomial x^2 - 2, b)
julia> L([a, 1, 1//2])
1//2*b^2 + b + a
#
quadratic_defect — Method.
quadratic_defect(a::Union{NumFieldElem,Rational,fmpq}, 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::NfOrdIdl) -> 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::NfOrdIdl) -> fmpz
Computes the -adic valuation of , that is, the largest such that is contained in .
#
torsion_unit_order — Method.
torsion_unit_order(x::nf_elem, 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) -> fmpq
Given a number field element , returns the absolute trace of .
#
algebraic_split — Method.
algebraic_split(a::nf_elem) -> nf_elem, nf_elem
Writes the input as a quotient of two "small" algebraic integers.
Conjugates
#
conjugates — Method.
conjugates(x::nf_elem, C::AcbField) -> Vector{acb}
Compute the conjugates of as elements of type acb. 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::nf_elem, abs_tol::Int) -> Vector{acb}
Compute the conjugates of as elements of type acb. 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::nf_elem, abs_tol::Int) -> Vector{arb}
Returns the elements as elements of type arb with radius less then 2^-abs_tol.
#
conjugates_real — Method.
conjugates_arb_real(x::nf_elem, abs_tol::Int) -> Vector{arb}
Compute the real conjugates of as elements of type arb.
Every entry of the array returned satisfies radius(y) < 2^-abs_tol.
#
conjugates_complex — Method.
conjugates_complex(x::nf_elem, abs_tol::Int) -> Vector{acb}
Compute the complex conjugates of as elements of type acb. 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::nf_elem, p::Int = 10)
conjugates_arb_log_normalise(x::FacElem{nf_elem, AnticNumberField}, p::Int = 10)
The "normalised" logarithms, i.e. the array , so the (weighted) sum adds up to zero.
#
minkowski_map — Method.
minkowski_map(a::nf_elem, abs_tol::Int) -> Vector{arb}
Returns the image of under the Minkowski embedding. Every entry of the array returned is of type arb 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::nf_elem, 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::nf_elem, n::fmpz) -> Bool
Checks if the norm of is divisible by , assuming that the norm of is an integer.
#
is_norm — Method.
is_norm(K::AnticNumberField, a::fmpz; extra::Vector{fmpz}) -> Bool, nf_elem
For a fmpz , 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) -> fmpq
Given a number field element , returns the absolute norm of .
#
minpoly — Method.
minpoly(a::NumFieldElem) -> PolyElem
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) -> PolyElem
Given a number field element of a number field , this function returns the minimal polynomial of over the rationals .
#
charpoly — Method.
charpoly(a::NumFieldElem) -> PolyElem
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) -> PolyElem
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 .