Skip to content

Element operations

Creation

# genMethod.

gen(L::SimpleNumField) -> NumFieldElem

Given a simple number field over , this functions returns the class of , which is the canonical primitive element of over .

source

# gensMethod.

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

Given a non-simple number field over , this functions returns the list .

source

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_defectMethod.

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 .

source

# hilbert_symbolMethod.

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

Returns the local Hilbert symbol .

source

# representation_matrixMethod.

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 .

source

# basis_matrixMethod.

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 .

source

# coefficientsMethod.

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

# coordinatesMethod.

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).

source

# absolute_coordinatesMethod.

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).

source

# coeffMethod.

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

# valuationMethod.

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

Computes the -adic valuation of , that is, the largest such that is contained in .

source

# torsion_unit_orderMethod.

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.

source

# trMethod.

tr(a::NumFieldElem) -> NumFieldElem

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

source

# absolute_trMethod.

absolute_tr(a::NumFieldElem) -> QQFieldElem

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

source

# algebraic_splitMethod.

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

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

source

Conjugates

# conjugatesMethod.

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.

source

# conjugatesMethod.

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.

source

# conjugates_logMethod.

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.

source

# conjugates_realMethod.

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.

source

# conjugates_complexMethod.

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.

source

# conjugates_arb_log_normaliseMethod.

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.

source

# minkowski_mapMethod.

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).

source

Predicates

# is_integralMethod.

is_integral(a::NumFieldElem) -> Bool

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

source

# is_torsion_unitMethod.

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.

source

# is_local_normMethod.

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.

source

# is_norm_divisibleMethod.

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

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

source

# is_normMethod.

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.

source

Invariants

# normMethod.

norm(a::NumFieldElem) -> NumFieldElem

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

source

# absolute_normMethod.

absolute_norm(a::NumFieldElem) -> QQFieldElem

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

source

# minpolyMethod.

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 .

source

# absolute_minpolyMethod.

absolute_minpoly(a::NumFieldElem) -> PolyRingElem

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

source

# charpolyMethod.

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 .

source

# absolute_charpolyMethod.

absolute_charpoly(a::NumFieldElem) -> PolyRingElem

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

source

# normMethod.

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 .

source