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.NfAbsOrd — Type. (O::NfOrd)(a::Union{fmpz, Integer}) -> NfAbsOrdElemGiven an element $a$ of type
fmpzorInteger, this function coerces the element into $\mathcal O$. It will be checked that $a$ is contained in $\mathcal O$ if and only ifcheckistrue.
(O::NfOrd)(arr::Array{fmpz, 1})Returns the element of $\mathcal O$ with coefficient vector
arr.
(O::NfOrd)() -> NfAbsOrdElemThis function constructs a new element of $\mathcal O$ which is set to $0$.
Basic properties
Base.parent — Method.parent(a::NfAbsOrdElem) -> NfOrdReturns the order of which $a$ is an element.
parent(g::perm{T}) where T = PermGroupReturn 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
trueparent(a::AbstractAlgebra.MatElem{T}, cached::Bool = true) where T <: RingElementReturn the parent object of the given matrix.
parent(a::AbstractAlgebra.MatAlgElem{T}, cached::Bool = true) where T <: RingElementReturn the parent object of the given matrix.
Hecke.elem_in_nf — Method.elem_in_nf(a::NfAbsOrdElem) -> nf_elemReturns the element $a$ considered as an element of the ambient number field.
Hecke.elem_in_basis — Method.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$.
AbstractAlgebra.Generic.discriminant — Method.discriminant(B::Array{NfAbsOrdElem, 1}) -> fmpzReturns the discriminant of the family $B$.
Base.:== — Method.==(x::NfAbsOrdElem, y::NfAbsOrdElem) -> BoolReturns whether $x$ and $y$ are equal.
Base.zero — Method.zero(O::NfOrd) -> NfAbsOrdElemReturns the zero element of $\mathcal O$.
Base.one — Method.one(O::NfOrd) -> NfAbsOrdElemReturns the one element of $\mathcal O$.
Base.iszero — Method.iszero(a::NfOrd) -> BoolTests if $a$ is zero.
Base.isone — Method.isone(a::NfOrd) -> BoolTests if $a$ is one.
Arithmetic
Base.:- — Method.-(x::NfAbsOrdElem) -> NfAbsOrdElemReturns the additive inverse of $x$.
-(A::SMat, B::SMat) -> SMatReturn the difference $A - B$.
-(A::SRow, B::SRow) -> SRowReturns 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) -> NfAbsOrdElemReturns $x + y$.
Base.:- — Method.-(x::NfAbsOrdElem, y::NfAbsOrdElem) -> NfAbsOrdElemReturns $x - y$.
Base.:* — Method.*(x::NfAbsOrdElem, y::NfAbsOrdElem) -> NfAbsOrdElemReturns $x \cdot y$.
Base.:^ — Method.^(x::NfAbsOrdElem, y::Union{fmpz, Int})Returns $x^y$.
Base.mod — Method.mod(a::NfAbsOrdElem, m::Union{fmpz, Int}) -> NfAbsOrdElemReduces 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.powermod — Method.powermod(a::NfAbsOrdElem, i::fmpz, m::Integer) -> NfAbsOrdElemReturns the element $a^i$ modulo $m$.
Miscallenous
Nemo.representation_matrix — Method.representation_matrix(a::NfAbsOrdElem) -> fmpz_matReturns the representation matrix of the element $a$.
representation_matrix(a::NfAbsOrdElem, K::AnticNumberField) -> FakeFmpqMatReturns 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$.
Nemo.representation_matrix — Method.representation_matrix(a::NfAbsOrdElem, K::AnticNumberField) -> FakeFmpqMatReturns 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.tr — Method.tr(a::NfAbsOrdElem) -> fmpzReturns the trace of $a$.
LinearAlgebra.norm — Method.norm(a::NfAbsOrdElem) -> fmpzReturns the norm of $a$.
norm(A::NfAbsOrdIdl) -> fmpzReturns the norm of $A$, that is, the cardinality of $\mathcal O/A$, where $\mathcal O$ is the order of $A$.
norm(a::NfRelOrdIdl) -> NfOrdIdlReturns the norm of $a$.
norm(a::NfRelOrdFracIdl{T, S}) -> SReturns the norm of $a$
Base.rand — Method.rand(O::NfOrd, n::Union{Integer, fmpz}) -> NfAbsOrdElemComputes 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$.
Hecke.minkowski_map — Method.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
arbwith radius less then2^-abs_tol.
Hecke.conjugates_arb — Method.conjugates_arb(x::NfAbsOrdElem, abs_tol::Int) -> Array{acb, 1}Compute the the conjugates of
xas elements of typeacb. 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
yof the array returned satisfiesradius(real(y)) < 2^-abs_tol,radius(imag(y)) < 2^-abs_tolrespectively.
Hecke.conjugates_arb_log — Method.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
arbradius less then2^-abs_tol.
Hecke.t2 — Method.t2(x::NfAbsOrdElem, abs_tol::Int = 32) -> arbReturn the $T_2$-norm of $x$. The radius of the result will be less than
2^-abs_tol.
AbstractAlgebra.Generic.minpoly — Method.minpoly(a::NfAbsOrdElem) -> fmpz_poly
minpoly(a::NfAbsOrdElem, FlintZZ) -> fmpz_polyThe 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.
AbstractAlgebra.Generic.charpoly — Method.charpoly(a::NfAbsOrdElem) -> fmpz_poly
charpoly(a::NfAbsOrdElem, FlintZZ) -> fmpz_polyThe 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.