Elements
Elements in orders have two representations: they can be viewed as elements in the $\mathbf 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 AbsNumFieldOrderElem, 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 AbsSimpleNumFieldOrderElem
AbsNumFieldOrder — Type (O::NumFieldOrder)(a::NumFieldElem, check::Bool = true) -> NumFieldOrderElemGiven an element $a$ of the ambient number field of $\mathcal O$, 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::NumFieldOrder)(a::NumFieldOrderElem, check::Bool = true) -> NumFieldOrderElemGiven an element $a$ of some order in the ambient number field of $\mathcal O$, 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::NumFieldOrder)(a::IntegerUnion) -> NumFieldOrderElemGiven an element $a$ of type ZZRingElem or Integer, this function coerces the element into $\mathcal O$.
(O::AbsNumFieldOrder)(arr::Vector{ZZRingElem})Returns the element of $\mathcal O$ with coefficient vector arr.
(O::AbsNumFieldOrder)(arr::Vector{Integer})Returns the element of $\mathcal O$ with coefficient vector arr.
Basic properties
parent — Methodparent(a::NumFieldOrderElem) -> NumFieldOrderReturns the order of which $a$ is an element.
parent(a::MatRingElem{T}) where T <: NCRingElementReturn the parent object of the given matrix.
elem_in_nf — Methodelem_in_nf(a::NumFieldOrderElem) -> NumFieldElemReturns the element $a$ considered as an element of the ambient number field.
coordinates — Methodcoordinates(a::AbsNumFieldOrderElem) -> Vector{ZZRingElem}Returns the coefficient vector of $a$ with respect to the basis of the order.
discriminant — Methoddiscriminant(B::Vector{NumFieldOrderElem})Returns the discriminant of the family $B$ of algebraic numbers, i.e. $det((tr(B[i]*B[j]))_{i, j})^2$.
discriminant(E::EllipticCurve) -> FieldElemReturn the discriminant of $E$.
discriminant(C::HypellCrv{T}) -> TCompute the discriminant of $C$.
discriminant(O::AlgssRelOrd)Returns the discriminant of $O$.
discriminant(g::Vector)Compute the product of all differences of distinct elements in the array.
== — Method==(x::NumFieldOrderElem, y::NumFieldOrderElem) -> BoolReturns whether $x$ and $y$ are equal.
Arithmetic
All the usual arithmetic operations are defined:
-(::NUmFieldOrdElem)+(::NumFieldOrderElem, ::NumFieldOrderElem)-(::NumFieldOrderElem, ::NumFieldOrderElem)*(::NumFieldOrderElem, ::NumFieldOrderElem)^(::NumFieldOrderElem, ::Int)mod(::AbsNumFieldOrderElem, ::Int)mod_sym(::NumFieldOrderElem, ::ZZRingElem)powermod(::AbsNumFieldOrderElem, ::ZZRingElem, ::Int)
Miscellaneous
representation_matrix — Methodrepresentation_matrix(a::AbsNumFieldOrderElem) -> ZZMatrixReturns the representation matrix of the element $a$.
representation_matrix — Methodrepresentation_matrix(a::AbsNumFieldOrderElem, K::AbsSimpleNumField) -> 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$.
tr — Methodtr(a::NumFieldOrderElem)Returns the trace of $a$ as an element of the base ring.
norm — Methodnorm(a::NumFieldOrderElem)Returns the norm of $a$ as an element in the base ring.
absolute_norm — Methodabsolute_norm(a::NumFieldOrderElem) -> ZZRingElemReturn the absolute norm as an integer.
absolute_tr — Methodabsolute_tr(a::NumFieldOrderElem) -> ZZRingElemReturn the absolute trace as an integer.
rand — Methodrand(O::AbsSimpleNumFieldOrder, n::IntegerUnion) -> AbsNumFieldOrderElemComputes 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 — Methodminkowski_map(a::NumFieldOrderElem, 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.
conjugates_arb — Methodconjugates_arb(x::NumFieldOrderElem, abs_tol::Int) -> Vector{AcbFieldElem}Compute the conjugates of $x$ as elements of type AcbFieldElem. 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 — Methodconjugates_arb_log(x::NumFieldOrderElem, abs_tol::Int) -> Vector{ArbFieldElem}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 ArbFieldElem radius less then 2^-abs_tol.
t2 — Methodt2(x::NumFieldOrderElem, abs_tol::Int = 32) -> ArbFieldElemReturn the $T_2$-norm of $x$. The radius of the result will be less than 2^-abs_tol.
minpoly — Methodminpoly([ZZPolyRing], a::AbsNumFieldOrderElem) -> ZZPolyRingElemThe minimal polynomial of $a$. The parent of the polynomial can be supplied as a first argument.
charpoly — Methodcharpoly([ZZPolyRing], a::AbsNumFieldOrderElem) -> ZZPolyRingElemThe characteristic polynomial of $a$. The parent of the polynomial can be supplied as a first argument.
factor — Methodfactor(a::AbsSimpleNumFieldOrderElem) -> Fac{AbsSimpleNumFieldOrderElem}Computes a factorization of $a$ into irreducible elements. The return value is a factorization fac, which satisfies a = unit(fac) * prod(p^e for (p, e) in fac).
The function requires that $a$ is non-zero and that all prime ideals containing $a$ are principal, which is for example satisfied if class group of the order of $a$ is trivial.
denominator — Methoddenominator(a::NumFieldElem, O::AbsSimpleNumFieldOrder) -> ZZRingElemReturns the smallest positive integer $k$ such that $k \cdot a$ is contained in $\mathcal O$.
discriminant — Methoddiscriminant(B::Vector{NumFieldOrderElem})Returns the discriminant of the family $B$ of algebraic numbers, i.e. $det((tr(B[i]*B[j]))_{i, j})^2$.
discriminant(E::EllipticCurve) -> FieldElemReturn the discriminant of $E$.
discriminant(C::HypellCrv{T}) -> TCompute the discriminant of $C$.
discriminant(O::AlgssRelOrd)Returns the discriminant of $O$.
discriminant(g::Vector)Compute the product of all differences of distinct elements in the array.