Skip to content

Element operations

Creation

gen Method
julia
gen(L::SimpleNumField) -> NumFieldElem

Given a simple number field L=K[x]/(f) over K, this functions returns the class of x, which is the canonical primitive element of L over K.

source

gens Method
julia
gens(L::NonSimpleNumField) -> Vector{NumFieldElem}

Given a non-simple number field L=K[x1,,xn]/(f1,,fn) over K, this functions returns the list x¯1,,x¯n.

source

Elements can also be created by specifying the coordinates with respect to the basis of the number field:

julia
    (L::number_field)(c::Vector{NumFieldElem}) -> NumFieldElem

Given a number field L/K of degree d and a vector c length d, this constructs the element a with coordinates(a) == c.

julia
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
julia
quadratic_defect(a::Union{NumFieldElem,Rational,QQFieldElem}, p) -> Union{Inf, PosInf}

Returns the valuation of the quadratic defect of the element a at p, which can either be prime object or an infinite place of the parent of a.

source

hilbert_symbol Method
julia
hilbert_symbol(a::NumFieldElem, b::NumFieldElem, p::AbsNumFieldOrderIdeal{AbsSimpleNumField, AbsSimpleNumFieldElem}) -> Int

Returns the local Hilbert symbol (a,b)p.

source

representation_matrix Method
julia
representation_matrix(a::NumFieldElem) -> MatElem

Returns the representation matrix of a, that is, the matrix representing multiplication with a with respect to the canonical basis of the parent of a.

source

basis_matrix Method
julia
basis_matrix(v::Vector{NumFieldElem}) -> Mat

Given a vector v of n elements of a number field K of degree d, this function returns an n×d matrix with entries in the base field of K, where row i contains the coefficients of v[i] with respect of the canonical basis of K.

source

coefficients Method
julia
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.

source

coordinates Method
julia
coordinates(x::NumFieldElem{T}) -> Vector{T}

Given an element x in a number field K, this function returns the coordinates of x with respect to the basis of K (the output of the 'basis' function).

source

absolute_coordinates Method
julia
absolute_coordinates(x::NumFieldElem{T}) -> Vector{T}

Given an element x in a number field K, this function returns the coordinates of x with respect to the basis of K over the rationals (the output of the absolute_basis function).

source

coeff Method
julia
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.

source

valuation Method
julia
valuation(a::NumFieldElem, p::AbsNumFieldOrderIdeal{AbsSimpleNumField, AbsSimpleNumFieldElem}) -> ZZRingElem

Computes the p-adic valuation of a, that is, the largest i such that a is contained in pi.

source

torsion_unit_order Method
julia
torsion_unit_order(x::AbsSimpleNumFieldElem, n::Int)

Given a torsion unit x together with a multiple n of its order, compute the order of x, that is, the smallest kZ1 such that xk=1.

It is not checked whether x is a torsion unit.

source

tr Method
julia
tr(a::NumFieldElem) -> NumFieldElem

Returns the trace of an element a of a number field extension L/K. This will be an element of K.

source

absolute_tr Method
julia
absolute_tr(a::NumFieldElem) -> QQFieldElem

Given a number field element a, returns the absolute trace of a.

source

algebraic_split Method
julia
algebraic_split(a::AbsSimpleNumFieldElem) -> AbsSimpleNumFieldElem, AbsSimpleNumFieldElem

Writes the input as a quotient of two "small" algebraic integers.

source

Conjugates

conjugates Method
julia
conjugates(x::AbsSimpleNumFieldElem, C::AcbField) -> Vector{AcbFieldElem}

Compute the conjugates of x as elements of type AcbFieldElem. Recall that we order the complex conjugates σr+1(x),...,σr+2s(x) such that σi(x)=σi+s(x) for r+1ir+s.

Let p be the precision of C, then every entry y of the vector returned satisfies radius(real(y)) < 2^-p and radius(imag(y)) < 2^-p respectively.

source

conjugates Method
julia
conjugates(x::AbsSimpleNumFieldElem, abs_tol::Int) -> Vector{AcbFieldElem}

Compute the conjugates of x as elements of type AcbFieldElem. Recall that we order the complex conjugates σr+1(x),...,σr+2s(x) such that σi(x)=σi+s(x) for r+1ir+s.

Every entry y of the vector returned satisfies radius(real(y)) < 2^-abs_tol and radius(imag(y)) < 2^-abs_tol respectively.

source

conjugates_log Method
julia
conjugates_arb_log(x::AbsSimpleNumFieldElem, abs_tol::Int) -> Vector{ArbFieldElem}

Returns the elements (log(|σ1(x)|),,log(|σr(x)|),,2log(|σr+1(x)|),,2log(|σr+s(x)|)) as elements of type ArbFieldElem with radius less then 2^-abs_tol.

source

conjugates_real Method
julia
conjugates_arb_real(x::AbsSimpleNumFieldElem, abs_tol::Int) -> Vector{ArbFieldElem}

Compute the real conjugates of x as elements of type ArbFieldElem.

Every entry y of the array returned satisfies radius(y) < 2^-abs_tol.

source

conjugates_complex Method
julia
conjugates_complex(x::AbsSimpleNumFieldElem, abs_tol::Int) -> Vector{AcbFieldElem}

Compute the complex conjugates of x as elements of type AcbFieldElem. Recall that we order the complex conjugates σr+1(x),...,σr+2s(x) such that σi(x)=σi+s(x) for r+1ir+s.

Every entry y of the array returned satisfies radius(real(y)) < 2^-abs_tol and radius(imag(y)) < 2^-abs_tol.

source

conjugates_arb_log_normalise Method
julia
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 cilog|x(i)|1/nlog|N(x)|, so the (weighted) sum adds up to zero.

source

minkowski_map Method
julia
minkowski_map(a::AbsSimpleNumFieldElem, abs_tol::Int) -> Vector{ArbFieldElem}

Returns the image of a under the Minkowski embedding. Every entry of the array returned is of type ArbFieldElem with radius less then 2^(-abs_tol).

source

Predicates

is_integral Method
julia
is_integral(a::NumFieldElem) -> Bool

Returns whether a is integral, that is, whether the minimal polynomial of a has integral coefficients.

source

is_torsion_unit Method
julia
is_torsion_unit(x::AbsSimpleNumFieldElem, checkisunit::Bool = false) -> Bool

Returns whether x is a torsion unit, that is, whether there exists n such that xn=1.

If checkisunit is true, it is first checked whether x is a unit of the maximal order of the number field x is lying in.

source

is_local_norm Method
julia
is_local_norm(L::NumField, a::NumFieldElem, P)

Given a number field L/K, an element aK and a prime ideal P of K, returns whether a is a local norm at P.

The number field L/K must be a simple extension of degree 2.

source

is_norm_divisible Method
julia
is_norm_divisible(a::AbsSimpleNumFieldElem, n::ZZRingElem) -> Bool

Checks if the norm of a is divisible by n, assuming that the norm of a is an integer.

source

is_norm Method
julia
is_norm(K::AbsSimpleNumField, a::ZZRingElem; extra::Vector{ZZRingElem}) -> Bool, AbsSimpleNumFieldElem

For a ZZRingElem a, try to find TK s.th. N(T)=a holds. If successful, return true and T, 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.

source

Invariants

norm Method
julia
norm(a::NumFieldElem) -> NumFieldElem

Returns the norm of an element a of a number field extension L/K. This will be an element of K.

source

absolute_norm Method
julia
absolute_norm(a::NumFieldElem) -> QQFieldElem

Given a number field element a, returns the absolute norm of a.

source

minpoly Method
julia
minpoly(a::NumFieldElem) -> PolyRingElem

Given a number field element a of a number field K, this function returns the minimal polynomial of a over the base field of K.

source

absolute_minpoly Method
julia
absolute_minpoly(a::NumFieldElem) -> PolyRingElem

Given a number field element a of a number field K, this function returns the minimal polynomial of a over the rationals Q.

source

charpoly Method
julia
charpoly(a::NumFieldElem) -> PolyRingElem

Given a number field element a of a number field K, this function returns the characteristic polynomial of a over the base field of K.

source

absolute_charpoly Method
julia
absolute_charpoly(a::NumFieldElem) -> PolyRingElem

Given a number field element a of a number field K, this function returns the characteristic polynomial of a over the rationals Q.

source

norm Method
julia
norm(a::NumFieldElem, k::NumField) -> NumFieldElem

Returns the norm of an element a of a number field L with respect to a subfield k of L. This will be an element of k.

source