Element operations
Creation
gen Method
gen(L::SimpleNumField) -> NumFieldElem
Given 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}) -> NumFieldElem
Given a number field c
length 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
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
basis_matrix Method
basis_matrix(v::Vector{NumFieldElem}) -> Mat
Given a vector
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
absolute_coordinates Method
absolute_coordinates(x::NumFieldElem{T}) -> Vector{T}
Given an element 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
torsion_unit_order Method
torsion_unit_order(x::AbsSimpleNumFieldElem, n::Int)
Given a torsion unit
It is not checked whether
tr Method
tr(a::NumFieldElem) -> NumFieldElem
Returns the trace of an element
absolute_tr Method
absolute_tr(a::NumFieldElem) -> QQFieldElem
Given a number field element
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 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
minkowski_map Method
minkowski_map(a::AbsSimpleNumFieldElem, abs_tol::Int) -> Vector{ArbFieldElem}
Returns the image of ArbFieldElem
with radius less then 2^(-abs_tol)
.
Predicates
is_integral Method
is_integral(a::NumFieldElem) -> Bool
Returns whether
is_torsion_unit Method
is_torsion_unit(x::AbsSimpleNumFieldElem, checkisunit::Bool = false) -> Bool
Returns 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) -> Bool
Checks if the norm of
is_norm Method
is_norm(K::AbsSimpleNumField, a::ZZRingElem; extra::Vector{ZZRingElem}) -> Bool, AbsSimpleNumFieldElem
For a ZZRingElem
Invariants
norm Method
norm(a::NumFieldElem) -> NumFieldElem
Returns the norm of an element
absolute_norm Method
absolute_norm(a::NumFieldElem) -> QQFieldElem
Given a number field element
minpoly Method
minpoly(a::NumFieldElem) -> PolyRingElem
Given a number field element
absolute_minpoly Method
absolute_minpoly(a::NumFieldElem) -> PolyRingElem
Given a number field element
charpoly Method
charpoly(a::NumFieldElem) -> PolyRingElem
Given a number field element
absolute_charpoly Method
absolute_charpoly(a::NumFieldElem) -> PolyRingElem
Given a number field element