# Function fields

Function fields are implemented via the Singular n_transExt type for prime fields of any characteristic.

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

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

LibraryElement typeParent type
Singularn_transExtSingular.N_FField

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

## Function field functionality

Singular.jl function fields provide all the functionality for fields described by AbstractAlgebra.jl.

https://nemocas.github.io/AbstractAlgebra.jl/latest/field

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

### Constructors

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

Singular.FunctionFieldMethod
FunctionField(F::Singular.Field, S::Vector{String})
FunctionField(F::Singular.Field, S::Vector{Symbol})

Returns a tuple $K, a$ consisting of a function field $K$ over the field $F$ with transcendence basis stored in the array $S$.

source
Singular.FunctionFieldMethod
FunctionField(F::Singular.Field, S::Vector{String})
FunctionField(F::Singular.Field, S::Vector{Symbol})

Returns a tuple $K, a$ consisting of a function field $K$ over the field $F$ with transcendence basis stored in the array $S$.

source

In case the user does not want to specify a transcendence basis the following constructor can be used.

Singular.FunctionFieldMethod
FunctionField(F::Singular.Field, n::Int)

Returns a tuple $K, a$ consisting of a function field $K$ over the field $F$ with transcendence degree $n$ and transcendence basis $a1, ..., an$.

source

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

F(n::fmpz)

Coerce a Flint integer value into the field.

Examples

F1, (a, b, c) = FunctionField(QQ, ["a", "b", "c"])

x1 = a*b + c

F2, (a1, a2, a3) = FunctionField(Fp(5), 3)

x2 = a1^5 + a2*a3^4

### Basic manipulation

Singular.n_transExt_to_spolyMethod
n_transExt_to_spoly(x::n_transExt; parent::PolyRing)

Returns the numerator of x as a polynomial in a polynomial ring with at least as many variables as the transcendence degree of parent(x). If a ring parent is given to the function, it will be the parent ring of the output.

source

Examples

F1, (a, b, c) = FunctionField(QQ, ["a", "b", "c"])
x = F1(5)*a
y = a^2 *b+a*b+b^2

is_unit(x)
char = characteristic(F1)
d = transcendence_degree(F1)

S, = PolynomialRing(QQ, ["a", "b", "c"])

p = n_transExt_to_spoly(y, parent_ring = S)

F2, = FunctionField(Fp(7), 4)
B = transcendence_basis(F2)