Element operations
Creation
We can return the generator
gen Method
gen(L::SimpleNumField) -> NumFieldElemGiven a simple number field
gens Method
gens(L::NonSimpleNumField) -> Vector{NumFieldElem}Given a non-simple number field
Elements can also be created by specifying the coordinates with respect to the basis of the number field:
(L::number_field)(c::Vector{NumFieldElem}) -> NumFieldElemGiven a number field c of elements from a with coordinates(a) == c.
julia> Qx, x = QQ["x"];
julia> K, a = number_field(x^2 - 2, "a");
julia> basis(K)
2-element Vector{AbsSimpleNumFieldElem}:
1
a
julia> K([1, 2])
2*a + 1
julia> L, b = radical_extension(3, a, "b")
(Relative number field of degree 3 over K, b)
julia> basis(L)
3-element Vector{Hecke.RelSimpleNumFieldElem{AbsSimpleNumFieldElem}}:
1
b
b^2
julia> L([a, 1, 1//2])
1//2*b^2 + b + aConversely, given an element
coordinates Method
coordinates(x::NumFieldElem{T}) -> Vector{T}Given an element
absolute_coordinates Method
absolute_coordinates(x::NumFieldElem{T}) -> Vector{T}Given an element absolute_basis function).
coefficients Method
coefficients(a::SimpleNumFieldElem) -> 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.
coeff Method
coeff(a::SimpleNumFieldElem, i::Int) -> FieldElemGiven 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.
Functions on elements
The following collections of functions all take as input an element of a number field, or a vector of such elements, possibly with some additional data.
Basis Dependent
Functions that depend on a basis:
representation_matrix Method
representation_matrix(a::NumFieldElem) -> MatElemReturns the representation matrix of
basis_matrix Method
basis_matrix(v::Vector{NumFieldElem}) -> MatGiven a vector
Invariants
Common invariants of an element:
norm Method
norm(a::NumFieldElem) -> NumFieldElemReturns the norm of an element
absolute_norm Method
absolute_norm(a::NumFieldElem) -> QQFieldElemGiven a number field element
norm Method
norm(a::NumFieldElem, k::NumField) -> NumFieldElemReturns the norm of an element
tr Method
tr(a::NumFieldElem) -> NumFieldElemReturns the trace of an element
absolute_tr Method
absolute_tr(a::NumFieldElem) -> QQFieldElemGiven a number field element
minpoly Method
minpoly(a::NumFieldElem) -> PolyRingElemGiven a number field element
absolute_minpoly Method
absolute_minpoly(a::NumFieldElem) -> PolyRingElemGiven a number field element
charpoly Method
charpoly(a::NumFieldElem) -> PolyRingElemGiven a number field element
absolute_charpoly Method
absolute_charpoly(a::NumFieldElem) -> PolyRingElemGiven a number field element
Predicates
is_integral Method
is_integral(a::NumFieldElem) -> BoolReturns whether
is_torsion_unit Method
is_torsion_unit(x::AbsSimpleNumFieldElem, checkisunit::Bool = false) -> BoolReturns whether
If checkisunit is true, it is first checked whether
is_local_norm Method
is_local_norm(L::NumField, a::NumFieldElem, P)Given a number field
The number field
is_norm_divisible Method
is_norm_divisible(a::AbsSimpleNumFieldElem, n::ZZRingElem) -> BoolChecks if the norm of
is_norm Method
is_norm(K::AbsSimpleNumField, a) -> Bool, AbsSimpleNumFieldElemFor
Conjugates
Given an absolute simple number field
conjugates Method
conjugates(x::AbsSimpleNumFieldElem, C::AcbField) -> Vector{AcbFieldElem}Compute the conjugates of AcbFieldElem. Recall that we order the complex conjugates
Let p be the precision of C, then every entry 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 AcbFieldElem. Recall that we order the complex conjugates
Every entry 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 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 ArbFieldElem.
Every entry radius(y) < 2^-abs_tol.
conjugates_complex Method
conjugates_complex(x::AbsSimpleNumFieldElem, abs_tol::Int) -> Vector{AcbFieldElem}Compute the complex conjugates of AcbFieldElem. Recall that we order the complex conjugates
Every entry 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
The
is called the Minkowski map (or Minkowski embedding). We provide a function that returns the image of an element under the Minkowski map.
minkowski_map Method
minkowski_map(a::AbsSimpleNumFieldElem, abs_tol::Int) -> Vector{ArbFieldElem}Returns the image of ArbFieldElem with radius less then 2^(-abs_tol).
Miscellaneous
quadratic_defect Method
quadratic_defect(a::Union{NumFieldElem,Rational,QQFieldElem}, p) -> Union{Inf, PosInf}Returns the valuation of the quadratic defect of the element
hilbert_symbol Method
hilbert_symbol(a::NumFieldElem, b::NumFieldElem, p::AbsNumFieldOrderIdeal{AbsSimpleNumField, AbsSimpleNumFieldElem}) -> IntReturns the local Hilbert symbol
valuation Method
valuation(a::NumFieldElem, p::AbsNumFieldOrderIdeal{AbsSimpleNumField, AbsSimpleNumFieldElem}) -> ZZRingElemComputes the
torsion_unit_order Method
torsion_unit_order(x::AbsSimpleNumFieldElem, n::Int)Given a torsion unit
It is not checked whether
algebraic_split Method
algebraic_split(a::AbsSimpleNumFieldElem) -> AbsSimpleNumFieldElem, AbsSimpleNumFieldElemWrites the input as a quotient of two "small" algebraic integers.
source