## Creation

Order(B::Array{nf_elem, 1}, check::Bool = true) -> NfOrd

Returns the order with -basis . If `check`

is set, it is checked whether defines an order.

Order(K::AnticNumberField, A::FakeFmpqMat, check::Bool = true) -> NfOrd

Returns the order which has basis matrix with respect to the power basis of . If `check`

is set, it is checked whether defines an order.

Order(A::NfOrdFracIdl) -> NfOrd

Returns the fractional ideal as an order of the ambient number field.

Order(K::NfRel, M::PMat) -> NfRelOrd

Returns the order which has basis pseudo-matrix with respect to the power basis of .

EquationOrder(K::AnticNumberField) -> NfOrd

Returns the equation order of the number field .

MaximalOrder(K::AnticNumberField) -> NfOrd

Returns the maximal order of . **Example**

julia> Qx, x = FlintQQ["x"] julia> K, a = NumberField(x^3 + 2, "a") julia> O = MaximalOrder(K)

MaximalOrder(K::NfOrd) -> NfOrd

Returns the maximal order of .

### Example

julia> Qx, x = PolynomialRing(FlintQQ, "x"); julia> K, a = NumberField(x^2 - 2, "a"); julia> O = EquationOrder(K) Order of Number field over Rational Field with defining polynomial x^2 - 2 with Z-basis Hecke.NfOrdElem[1, a]

## Basic properties

parent(O::NfOrd) -> NfOrdSet

Returns the parent of , that is, the set of orders of the ambient number field.

isequation_order(O::NfOrd) -> Bool

Returns whether is the equation order of the ambient number field.

signature(O::NfOrd) -> Tuple{Int, Int}

Returns the signature of the ambient number field of .

nf(O::NfOrd) -> AnticNumberField

Returns the ambient number field of .

degree(O::NfOrd) -> Int

Returns the degree of .

basis(O::NfOrd) -> Array{NfOrdElem, 1}

Returns the -basis of .

basis(A::NfOrdIdl) -> Array{NfOrdElem, 1}

Returns the basis of A.

basis(O::NfOrd, K::AnticNumberField) -> Array{nf_elem, 1}

Returns the -basis elements of as elements of the ambient number field.

basis_mat(O::NfOrd) -> FakeFmpqMat

Returns the basis matrix of with respect to the power basis of the ambient number field.

basis_mat(A::NfOrdIdl) -> fmpz_mat

Returns the basis matrix of .

basis_mat(O::NfRelOrd{T, S}) -> Generic.Mat{T}

Returns the basis matrix of with respect to the power basis of the ambient number field.

basis_mat(a::NfRelOrdIdl{T, S}) -> Generic.Mat{T}

Returns the basis matrix of .

basis_mat_inv(O::NfOrd) -> FakeFmpqMat

Returns the inverse of the basis matrix of .

basis_mat_inv(A::NfOrdIdl) -> fmpz_mat

Returns the inverse basis matrix of .

basis_mat_inv(O::NfRelOrd{T, S}) -> Generic.Mat{T}

Returns the inverse of the basis matrix of .

basis_mat_inv(a::NfRelOrdIdl{T, S}) -> Generic.Mat{T}

Returns the inverse of the basis matrix of .

discriminant(O::NfOrd) -> fmpz

Returns the discriminant of .

gen_index(O::NfOrd) -> fmpq

Returns the generalized index of with respect to the equation order of the ambient number field.

index(O::NfOrd) -> fmpz

Assuming that the order contains the equation order of the ambient number field, this function returns the index .

isindex_divisor(O::NfOrd, d::fmpz) -> Bool isindex_divisor(O::NfOrd, d::Int) -> Bool

Returns whether is a divisor of the index of . It is assumed that contains the equation order of the ambient number field.

minkowski_mat(O::NfOrd, abs_tol::Int = 64) -> arb_mat

Returns the Minkowski matrix of . Thus if has degree , then the result is a matrix in . The entries of the matrix are real balls of type `arb`

with radius less then `2^-abs_tol`

.

in(a::nf_elem, O::NfOrd) -> Bool

Checks whether lies in .

den(a::nf_elem, O::NfOrd) -> fmpz

Returns the smallest positive integer such that is contained in .

norm_change_const(O::NfOrd) -> (Float64, Float64)

Returns such that for all we have and , where is the -basis of .

trace_matrix(O::NfOrd) -> fmpz_mat

Returns the trace matrix of `\mathcal O`

, that is, the matrix .

+(R::NfOrd, S::NfOrd) -> NfOrd

Given two orders , of , this function returns the smallest order containing both and . It is assumed that , contain the ambient equation order and have coprime index.

poverorder(O::NfOrd, p::fmpz) -> NfOrd poverorder(O::NfOrd, p::Integer) -> NfOrd

This function tries to find an order that is locally larger than at the prime : If divides the index , this function will return an order such that . Otherwise is returned.

pmaximal_overorder(O::NfOrd, p::fmpz) -> NfOrd pmaximal_overorder(O::NfOrd, p::Integer) -> NfOrd

This function finds a -maximal order containing . That is, the index is not dividible by .

## Elements

### Creation

(O::NfOrd)(::nf_elem)

### Basic properties

parent(a::NfOrdElem) -> NfOrd

Returns the order of which is an element.

elem_in_nf(a::NfOrdElem) -> nf_elem

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

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

Returns the coefficient vector of .

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

Returns the discriminant of the family .

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

Returns whether and are equal.

zero(O::NfOrd) -> NfOrdElem

Returns the zero element of .

one(O::NfOrd) -> NfOrdElem

Returns the one element of .

iszero(a::NfOrd) -> Bool

Tests if is zero.

isone(a::NfOrd) -> Bool

Tests if is one.

### Arithmetic

-(x::NfOrdElem) -> NfOrdElem

Returns the additive inverse of .

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

Returns .

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

Returns .

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

Returns .

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

Returns .

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

Reduces the coefficient vector of modulo and returns the corresponding element. The coefficient vector of the result will have entries with .

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

Returns the element modulo .

### Miscallenous

representation_mat(a::NfOrdElem) -> fmpz_mat

Returns the representation matrix of the element .

representation_mat(a::NfOrdElem, K::AnticNumberField) -> FakeFmpqMat

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

trace(a::NfOrdElem) -> fmpz

Returns the trace of .

norm(a::NfOrdElem) -> fmpz

Returns the norm of .

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

Computes a coefficient vector with entries uniformly distributed in and returns the corresponding element of the order .

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

Returns the image of under the Minkowski embedding. Every entry of the array returned is of type

`arb`

with radius less then`2^-abs_tol`

.

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

Compute the the conjugates of

`x`

as elements of type`acb`

. Recall that we order the complex conjugates such that for .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::NfOrdElem, abs_tol::Int) -> Array{arb, 1}

Returns the elements as elements of type

`arb`

radius less then`2^-abs_tol`

.

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

Return the -norm of . The radius of the result will be less than

`2^-abs_tol`

.

## Ideals

### Creation

ideal(O::NfOrd, a::Int) -> NfOrdIdl

Returns the ideal of which is generated by .

ideal(O::NfOrd, a::fmpz) -> NfOrdIdl

Returns the ideal of which is generated by .

ideal(O::NfOrd, x::fmpz_mat, check::Bool = false) -> NfOrdIdl

Creates the ideal of with basis matrix . If check is set, then it is checked whether defines an ideal (expensive).

ideal(O::NfOrd, x::NfOrdElem) -> NfOrdIdl

Creates the principal ideal of .

ring_of_multipliers(I::NfOrdIdl) -> NfOrd

Computes the order , which is the set of all with .

*(O::NfOrd, x::NfOrdElem) -> NfOrdIdl *(x::NfOrdElem, O::NfOrd) -> NfOrdIdl

Returns the principal ideal of .

### Arithmetic

==(x::NfOrdIdl, y::NfOrdIdl)

Returns whether and are equal.

+(x::NfOrdIdl, y::NfOrdIdl)

Returns .

*(x::NfOrdIdl, y::NfOrdIdl)

Returns .

intersection(x::NfOrdIdl, y::NfOrdIdl) -> NfOrdIdl lcm(x::NfOrdIdl, y::NfOrdIdl) -> NfOrdIdl

Returns .

### Miscaellenous

parent(I::NfOrdIdl) -> NfOrd

Returns the order of .

basis(O::NfOrd) -> Array{NfOrdElem, 1}

Returns the -basis of .

basis(A::NfOrdIdl) -> Array{NfOrdElem, 1}

Returns the basis of A.

basis_mat(O::NfOrd) -> FakeFmpqMat

Returns the basis matrix of with respect to the power basis of the ambient number field.

basis_mat(A::NfOrdIdl) -> fmpz_mat

Returns the basis matrix of .

basis_mat(O::NfRelOrd{T, S}) -> Generic.Mat{T}

Returns the basis matrix of with respect to the power basis of the ambient number field.

basis_mat(a::NfRelOrdIdl{T, S}) -> Generic.Mat{T}

Returns the basis matrix of .

basis_mat_inv(O::NfOrd) -> FakeFmpqMat

Returns the inverse of the basis matrix of .

basis_mat_inv(A::NfOrdIdl) -> fmpz_mat

Returns the inverse basis matrix of .

basis_mat_inv(O::NfRelOrd{T, S}) -> Generic.Mat{T}

Returns the inverse of the basis matrix of .

basis_mat_inv(a::NfRelOrdIdl{T, S}) -> Generic.Mat{T}

Returns the inverse of the basis matrix of .

minimum(A::NfOrdIdl) -> fmpz

Returns the smallest nonnegative element in .

norm(A::NfOrdIdl) -> fmpz

Returns the norm of , that is, the cardinality of , where is the order of .

norm(a::NfRelOrdIdl) -> NfOrdIdl

Returns the norm of .

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

Returns the norm of

in(x::NfOrdElem, y::NfOrdIdl) in(x::nf_elem, y::NfOrdIdl) in(x::fmpz, y::NfOrdIdl)

Returns whether is contained in .

idempotents(x::NfOrdIdl, y::NfOrdIdl) -> NfOrdElem, NfOrdElem

Returns a tuple

`(e, f)`

consisting of elements`e in x`

,`f in y`

such that`1 = e + f`

.If the ideals are not coprime, an error is raised.

mod(x::NfOrdElem, I::NfOrdIdl)

Returns the unique element of the ambient order of with and the following property: If are the diagonal entries of the unique HNF basis matrix of and is the coefficient vector of , then for .

pradical(O::NfOrd, p::fmpz) -> NfOrdIdl

Given a prime number , this function returns the -radical of , which is just . It is not checked that is prime.

## Fractional ideals

### Creation

frac_ideal(::NfOrd, ::fmpz_mat) frac_ideal(::NfOrd, ::fmpz_mat, ::fmpz) frac_ideal(::NfOrd, ::FakeFmpqMat) frac_ideal(::NfOrd, ::NfOrdIdl) frac_ideal(::NfOrd, ::NfOrdIdl, ::fmpz) frac_ideal(::NfOrd, ::nf_elem) frac_ideal(::NfOrd, ::NfOrdElem)

### Arithmetic

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

Returns whether and are equal.

### Miscaellenous

order(::NfOrdFracIdl) basis_mat(::NfOrdFracIdl) basis_mat_inv(::NfOrdFracIdl) basis(::NfOrdFracIdl) norm(::NfOrdFracIdl)