# Finite fields

Finite fields are implemented via the Singular n_GF type for any characteristic and degree contained in the Singular Conway tables.

The associated finite field is represented by a parent object which can be constructed by a call to the FiniteField constructor.

The types of the parent objects and elements of the associated finite fields are given in the following table according to the library providing them.

LibraryElement typeParent type
Singularn_GFSingular.N_GField

All finite field element types belong directly to the abstract type FieldElem and all the parent object types belong to the abstract type Field.

## Finite field functionality

Singular.jl finite fields implement the Field interface of AbstractAlgebra.jl.

https://nemocas.github.io/AbstractAlgebra.jl/fields.html

Below, we describe the functionality that is specific to Singular finite field and not already listed at the given link.

### Constructors

The following constructors are available to create finite fields and their elements.

Singular.FiniteFieldMethod
FiniteField(p::Int, n::Int, S::VarName; cached=true)

Return a tuple K, a consisting of a finite field K of characteristic $p$ and degree $n$, and its generator a. The string used to print the generator is given by S. If the finite field is not listed in the Conway tables included in Singular, an error will be raised. By default, finite fields are cached globally, so that there is only one finite field in the system with given characteristic, degree and string. If this is not the desired behaviour, one can pass false for the optional cached parameter.

source

Given a finite field $R$, we also have the following coercions in addition to the standard ones expected.

R(n::ZZRingElem)

Coerce a Flint integer value into the field.

### Basic manipulation

Examples

julia> R,w = FiniteField(7, 2, "w")
(Finite Field of Characteristic 7 and degree 2, w)

julia> w^48 == 1
true

julia> a = R(5)
w^40

julia> is_unit(a)
true

julia> c = characteristic(R)
7

julia> d = degree(R)
2