Elements

Elements

Elements in orders have two representations: they can be viewed as elements in the $Z^n$ giving the coefficients wrt to the order basis where they are elements in. On the other hand, as every order is in a field, they also have a representation as number field elements. Since, asymptotically, operations are more efficient in the field (due to fast polynomial arithmetic) than in the order, the primary representation is that as a field element.

Creation

Elements are constructed either as linear combinations of basis elements or via explicit coercion. Elements will be of type NfOrdElem, the type if actually parametrized by the type of the surrounding field and the type of the field elements. E.g. the type of any element in any order of an absolute simple field will be NfAbsOrdElem{AnticNumberField,nf_elem}

Hecke.NfAbsOrdType.

  (O::NfOrd)(a::Union{fmpz, Integer}) -> NfAbsOrdElem

Given an element $a$ of type fmpz or Integer, this function coerces the element into $\mathcal O$. It will be checked that $a$ is contained in $\mathcal O$ if and only if check is true.


  (O::NfOrd)(arr::Array{fmpz, 1})

Returns the element of $\mathcal O$ with coefficient vector arr.


  (O::NfOrd)() -> NfAbsOrdElem

This function constructs a new element of $\mathcal O$ which is set to $0$.

Basic properties

Base.parentMethod.

parent(a::NfAbsOrdElem) -> NfOrd

Returns the order of which $a$ is an element.

parent(g::perm{T}) where T = PermGroup

Return the parent of the permutation g.

julia> G = PermutationGroup(5); g = perm([3,4,5,2,1])
(1,3,5)(2,4)

julia> parent(g) == G
true
parent(a::AbstractAlgebra.MatElem{T}, cached::Bool = true) where T <: RingElement

Return the parent object of the given matrix.

parent(a::AbstractAlgebra.MatAlgElem{T}, cached::Bool = true) where T <: RingElement

Return the parent object of the given matrix.

Hecke.elem_in_nfMethod.

elem_in_nf(a::NfAbsOrdElem) -> nf_elem

Returns the element $a$ considered as an element of the ambient number field.


elem_in_basis(a::NfAbsOrdElem) -> Array{fmpz, 1}

Returns the coefficient vector of $a$.


  elem_in_basis(a::NfRelOrdElem{T}) -> Vector{T}

Returns the coefficient vector of $a$.


discriminant(B::Array{NfAbsOrdElem, 1}) -> fmpz

Returns the discriminant of the family $B$.

Base.:==Method.

==(x::NfAbsOrdElem, y::NfAbsOrdElem) -> Bool

Returns whether $x$ and $y$ are equal.

Base.zeroMethod.

zero(O::NfOrd) -> NfAbsOrdElem

Returns the zero element of $\mathcal O$.

Base.oneMethod.

one(O::NfOrd) -> NfAbsOrdElem

Returns the one element of $\mathcal O$.

Base.iszeroMethod.

iszero(a::NfOrd) -> Bool

Tests if $a$ is zero.

Base.isoneMethod.

isone(a::NfOrd) -> Bool

Tests if $a$ is one.

Arithmetic

Base.:-Method.

-(x::NfAbsOrdElem) -> NfAbsOrdElem

Returns the additive inverse of $x$.

-(A::SMat, B::SMat) -> SMat

Return the difference $A - B$.

-(A::SRow, B::SRow) -> SRow

Returns the difference of $A$ and $B$.

-(a::AbstractAlgebra.ResElem{T}, b::AbstractAlgebra.ResElem{T}) where {T <: RingElement}

Return $a - b$.

-(a::AbstractAlgebra.ResElem{T}, b::T) where {T <: RingElem}

Return $a - b$.

-(a::T, b::AbstractAlgebra.ResElem{T}) where {T <: RingElem}

Return $a - b$.

-(a::AbstractAlgebra.ResFieldElem{T}, b::AbstractAlgebra.ResFieldElem{T}) where {T <: RingElement}

Return $a - b$.

-(a::AbstractAlgebra.ResFieldElem{T}, b::T) where {T <: RingElem}

Return $a - b$.

-(a::T, b::AbstractAlgebra.ResFieldElem{T}) where {T <: RingElem}

Return $a - b$.

-(a::AbstractAlgebra.PolyElem{T}, b::AbstractAlgebra.PolyElem{T}) where {T <: RingElement}

Return $a - b$.

-(a::AbstractAlgebra.NCPolyElem{T}, b::AbstractAlgebra.NCPolyElem{T}) where {T <: NCRingElem}

Return $a - b$.

-(a::AbstractAlgebra.RelSeriesElem{T}, b::AbstractAlgebra.RelSeriesElem{T}) where {T <: RingElement}

Return $a - b$.

-(a::AbstractAlgebra.AbsSeriesElem{T}, b::AbstractAlgebra.AbsSeriesElem{T}) where {T <: RingElement}

Return $a - b$.

-(a::Generic.LaurentSeriesElem{T}, b::Generic.LaurentSeriesElem{T}) where {T <: RingElement}

Return $a - b$.

-(x::Generic.MatrixElem{T}, y::Generic.MatrixElem{T}) where {T <: RingElement}

Return $a - b$.

-(x::T, y::Generic.MatrixElem{T}) where {T <: RingElem}

Return $S(x) - y$ where $S$ is the parent of $y$.

-(x::Generic.MatrixElem{T}, y::T) where {T <: RingElem}

Return $x - S(y)$, where $S$ is the parent of $a$.

-(a::AbstractAlgebra.FracElem{T}, b::AbstractAlgebra.FracElem{T}) where {T <: RingElem}

Return $a - b$.

-(a::AbstractAlgebra.FracElem{T}, b::T) where {T <: RingElem}

Return $a - b$.

-(a::T, b::AbstractAlgebra.FracElem{T}) where {T <: RingElem}

Return $a - b$.

Base.:+Method.

+(x::NfAbsOrdElem, y::NfAbsOrdElem) -> NfAbsOrdElem

Returns $x + y$.

Base.:-Method.

-(x::NfAbsOrdElem, y::NfAbsOrdElem) -> NfAbsOrdElem

Returns $x - y$.

Base.:*Method.

*(x::NfAbsOrdElem, y::NfAbsOrdElem) -> NfAbsOrdElem

Returns $x \cdot y$.

Base.:^Method.

^(x::NfAbsOrdElem, y::Union{fmpz, Int})

Returns $x^y$.

Base.modMethod.

mod(a::NfAbsOrdElem, m::Union{fmpz, Int}) -> NfAbsOrdElem

Reduces the coefficient vector of $a$ modulo $m$ and returns the corresponding element. The coefficient vector of the result will have entries $x$ with $0 \leq x \leq m$.

Base.powermodMethod.

powermod(a::NfAbsOrdElem, i::fmpz, m::Integer) -> NfAbsOrdElem

Returns the element $a^i$ modulo $m$.

Miscallenous


representation_matrix(a::NfAbsOrdElem) -> fmpz_mat

Returns the representation matrix of the element $a$.


representation_matrix(a::NfAbsOrdElem, K::AnticNumberField) -> FakeFmpqMat

Returns the representation matrix of the element $a$ considered as an element of the ambient number field $K$. It is assumed that $K$ is the ambient number field of the order of $a$.


representation_matrix(a::NfAbsOrdElem, K::AnticNumberField) -> FakeFmpqMat

Returns the representation matrix of the element $a$ considered as an element of the ambient number field $K$. It is assumed that $K$ is the ambient number field of the order of $a$.

LinearAlgebra.trMethod.

tr(a::NfAbsOrdElem) -> fmpz

Returns the trace of $a$.

LinearAlgebra.normMethod.

norm(a::NfAbsOrdElem) -> fmpz

Returns the norm of $a$.


norm(A::NfAbsOrdIdl) -> fmpz

Returns the norm of $A$, that is, the cardinality of $\mathcal O/A$, where $\mathcal O$ is the order of $A$.


norm(a::NfRelOrdIdl) -> NfOrdIdl

Returns the norm of $a$.


norm(a::NfRelOrdFracIdl{T, S}) -> S

Returns the norm of $a$

Base.randMethod.

rand(O::NfOrd, n::Union{Integer, fmpz}) -> NfAbsOrdElem

Computes a coefficient vector with entries uniformly distributed in $\{-n,\dotsc,-1,0,1,\dotsc,n\}$ and returns the corresponding element of the order $\mathcal O$.


minkowski_map(a::NfAbsOrdElem, abs_tol::Int) -> Array{arb, 1}

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


conjugates_arb(x::NfAbsOrdElem, abs_tol::Int) -> Array{acb, 1}

Compute the the conjugates of x as elements of type acb. Recall that we order the complex conjugates $\sigma_{r+1}(x),...,\sigma_{r+2s}(x)$ such that $\sigma_{i}(x) = \overline{\sigma_{i + s}(x)}$ for $r + 2 \leq i \leq r + s$.

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


conjugates_arb_log(x::NfAbsOrdElem, abs_tol::Int) -> Array{arb, 1}

Returns the elements $(\log(\lvert \sigma_1(x) \rvert),\dotsc,\log(\lvert\sigma_r(x) \rvert), \dotsc,2\log(\lvert \sigma_{r+1}(x) \rvert),\dotsc, 2\log(\lvert \sigma_{r+s}(x)\rvert))$ as elements of type arb radius less then 2^-abs_tol.

Hecke.t2Method.

t2(x::NfAbsOrdElem, abs_tol::Int = 32) -> arb

Return the $T_2$-norm of $x$. The radius of the result will be less than 2^-abs_tol.

minpoly(a::NfAbsOrdElem) -> fmpz_poly

minpoly(a::NfAbsOrdElem, FlintZZ) -> fmpz_poly

The minimal polynomial of $a$.

minpoly(S::Ring, M::MatElem{T}, charpoly_only::Bool = false) where {T <: RingElement}

Returns the minimal polynomial $p$ of the matrix $M$. The polynomial ring $S$ of the resulting polynomial must be supplied and the matrix must be square.

minpoly(S::Ring, M::MatAlgElem{T}, charpoly_only::Bool = false) where {T <: RingElement}

Returns the minimal polynomial $p$ of the matrix $M$. The polynomial ring $S$ of the resulting polynomial must be supplied and the matrix must be square.

charpoly(a::NfAbsOrdElem) -> fmpz_poly

charpoly(a::NfAbsOrdElem, FlintZZ) -> fmpz_poly

The characteristic polynomial of $a$.

charpoly(V::Ring, Y::Generic.MatrixElem{T}) where {T <: RingElement}

Returns the characteristic polynomial $p$ of the matrix $M$. The polynomial ring $R$ of the resulting polynomial must be supplied and the matrix is assumed to be square.