# Related Structures

## Parent and Category

Function fields form the Magma category `FldFun` and function field orders form the Magma category `RngFunOrd`. The notional power structures exist as parents of function fields and their orders but allow no operations.

### `Category(F): FldFun -> Cat`

### `Category(O): RngFunOrd -> Cat`

### `Parent(F): FldFun -> Pow`

### `Parent(O): RngFunOrd -> Pow`

## Other Related Structures

More interesting related structures (than above) are listed below.

### `PrimeRing(F): FldFun -> Rng`

### `PrimeField(F): FldFun -> Rng`

### `PrimeRing(O): RngFunOrd -> Rng`

The prime field of the function field $F$ or the order $O$ (prime ring of the constant field).

### `ConstantField(F): FldFunG -> Rng`

### `DefiningConstantField(F): FldFunG -> Rng`

The constant field $k$, where $F = k(x, \alpha)$.

### `ExactConstantField(F): FldFunG -> Rng, Map`

The exact constant field of the algebraic function field $F/k$, i.e. the algebraic closure in $F$ of the constant field $k$ of $F$, together with the inclusion map.

### `BaseRing(F): FldFun -> Rng`

### `BaseField(F): FldFun -> Rng`

### `CoefficientRing(F): FldFun -> Rng`

### `CoefficientField(F): FldFun -> Rng`

The rational function field $k(x)$ if the function field $F$ is an extension of $k(x)$ and $k$ if $F$ is an extension of $k$. If $F$ is an extension of another algebraic function field then this field will be returned.

### `ISABaseField(F, G): Fld, Fld -> BoolElt`

Applies to more general fields within Magma than function fields. Returns whether $G$ is amongst the recursively defined base fields of $F$.

### `BaseRing(O): RngFunOrd -> Rng`

### `CoefficientRing(O): RngFunOrd -> Rng`

The polynomial algebra $k[x]$ if the order $O$ is finite or the degree valuation ring if $O$ is infinite. If $O$ is an extension of another order of an algebraic function field this order will be returned.

### `BaseRing(FF): FldFunOrd -> Rng`

### `BaseField(FF): FldFunOrd -> Rng`

### `CoefficientRing(FF): FldFunOrd -> Rng`

### `CoefficientField(FF): FldFunOrd -> Rng`

Given a field of fractions $FF$ of an order $O$ return the field of fractions of the coefficient ring of $O$.

### `SubOrder(O): RngFunOrd -> RngFunOrd`

For a non equation order $O$ returns the order which $O$ was created as a transformation of. This order is one transformation closer to the equation order.

### `FunctionField(O): RngFunOrd -> FldFun`

The function field which $O$ is an order of.

### `FieldOfFractions(O): RngFunOrd -> FldFunOrd`

### `FieldOfFractions(FF): FldFunOrd -> FldFunOrd`

### `FieldOfFractions(F): FldFun -> FldFun`

Given an order $O$, this function returns the field of fractions, a field with the same basis as $O$. On a function field or a field of fractions this function is trivial.

### `Order(FF): FldFunOrd -> RngFunOrd`

Given a field of fractions $FF$ return the order $O$ which is the ring of integers of $FF$.

### `RationalExtensionRepresentation(F): FldFunG -> FldFun`

The function field $F$ represented as an extension of a rational function field. This function gives the representation of function fields $F/k$ as finite extensions.

### `AbsoluteOrder(O): RngFunOrd -> RngFunOrd`

The order $O$ as an extension of its bottom coefficient ring, (i.e. the order of the `RationalExtensionRepresentation` of the field of fractions of $O$ corresponding to $O$).

### `AbsoluteFunctionField(F): FldFunG -> FldFunG`

The function field $F$ expressed as an extension of its constant field.

### `UnderlyingRing(F): FldFunG -> FldFunG`

### `UnderlyingField(F): FldFunG -> FldFunG`

### `UnderlyingRing(F, R): FldFunG, Rng -> FldFunG`

### `UnderlyingField(F, R): FldFunG, Rng -> FldFunG`

Return the underlying ring of the function field $F$ over $R$. This is $F$ expressed as an extension of $R$. If $R$ is not given then it is taken to be the coefficient field of the coefficient field of $F$. The field $R$ must appear in the tower of coefficient fields under $F$.

### `Embed(F, L, a): FldFun, FldFun, FldFunElt`

### `Embed(F, L, s): FldFun, FldFun, [FldFunElt]`

Install the embedding of $F$ into $L$ with the image(s) of the primitive element(s) of $F$ being the element $a$ in $L$ or the images in $s$ in $L$.

### `HasEmbedding(O1, O2): RngFunOrd, RngFunOrd -> Bool`

```magma
Print: RngIntElt                    Default: 0
```

Return whether there is an embedding of $O1$ into $O2$ already installed. For information about the installed embedding set the `Print` parameter $> 0$ with higher values providing more information than lower.

### `CanComputeEmbedding(O1, O2): RngFunOrd, RngFunOrd -> Bool`

```magma
Print: RngIntElt                    Default: 0
```

Return whether an embedding of $O1$ into $O2$ can be computed. For information about the installed embedding set the `Print` parameter $> 0$ with higher values providing more information than lower.

### `Places(F): FldFunG -> PlcFun`

The set of places of the algebraic function field $F/k$.

### `DivisorGroup(F): FldFun -> DivFun`

The group of divisors of the algebraic function field $F/k$.

### `DifferentialSpace(F): FldFun -> DiffFun`

The space of differentials of the algebraic function field $F/k$.

### `Example: Related Structures (ex-a0477f)`

```magma
> R<x> := FunctionField(GF(5));
> P<y> := PolynomialRing(R);
> f := y^3 + (4*x^3 + 4*x^2 + 2*x + 2)*y^2 + (3*x + 3)*y + 2;
> F<alpha> := FunctionField(f);
> ConstantField(F);
Finite field of size 5
> CoefficientField(F);
Univariate rational function field over GF(5)
Variables: x
> CoefficientRing(MaximalOrderFinite(F));
Univariate Polynomial Ring in x over GF(5)
> FieldOfFractions(IntegralClosure(ValuationRing(R), F));
Algebraic function field defined over Univariate rational function field over
GF(5)
Variables: x by
y^3 + (4*x^3 + 4*x^2 + 2*x + 2)*y^2 + (3*x + 3)*y + 2
> Order(IntegralClosure(ValuationRing(R), F),
>     MatrixAlgebra(CoefficientRing(MaximalOrderInfinite(F)), 3)!4,
>     CoefficientRing(MaximalOrderInfinite(F))!1);
Maximal Order of F over Valuation ring of Univariate rational function field
over GF(5) with generator 1/x
> SubOrder($1);
Maximal Order of F over Valuation ring of Univariate rational function field
over GF(5) with generator 1/x
> Places(F);
Set of places of F
> DivisorGroup(F);
Divisor group of F

```

### `Example: Related Structures Rat Ext (ex-efbad3)`

Output from `UnderlyingRing` is shown.

```magma
> PF<x> := PolynomialRing(GF(31, 3));
> P<y> := PolynomialRing(PF);
> FF1<b> := ext<FieldOfFractions(PF) | y^2 - x^3 + 1>;
> P<y> := PolynomialRing(FF1);
> FF2<d> := ext<FF1 | y^3 - b*x*y - 1>;
> RationalExtensionRepresentation(FF2);
Algebraic function field defined over Univariate rational function field over
GF(31^3) by
y^6 + 29*y^3 + (30*x^5 + x^2)*y^2 + 1
> UnderlyingRing(FF2);
Algebraic function field defined over Univariate rational function field over
GF(31^3) by
y^6 + 29*y^3 + (30*x^5 + x^2)*y^2 + 1
> UnderlyingRing(FF2, FieldOfFractions(PF));
Algebraic function field defined over GF(31^3) by
$.1^6 + 29*$.1^3 + 30*$.1^2*$.2^5 + $.1^2*$.2^2 + 1

```

### `WeilRestriction(E, n): FldFun, RngIntElt -> FldFun, UserProgram`

```magma
Reduction: BoolElt                    Default: true
verbose  : WeilRes                    Default: Verbose : 1
```

A hyperelliptic function field in the Weil restriction over ${\bf F}_{q}$ of the elliptic function field $E$: $y^2 + xy + x^3 + ax^2 + b$ defined over ${\bf F}_{q^n}$ where $q$ is a power of $2$. Also returns a function which can be used to map a place (not a pole or zero of $x$) of $F$ into a divisor of the result. See [[P. Gaudry and Smart, 2000](../../references.md#cite-ghs)]. `Reduction` indicates whether a (possibly quite expensive) reduction step is performed at the end of the computation. It defaults to `true`.

### `ConstantFieldExtension(F, E): FldFun, Rng -> FldFun, Map`

Return the function field with constant field $E$ which contains the function field $F$. The ring $E$ must cover the constant field of $F$. If $E$ is contained in the exact constant field of $F$ then $F$ and the new field will be isomorphic.

### `Example: cfe (ex-01df8e)`

Changing the constant field to the exact constant field is shown below.

```magma
> P<x> := PolynomialRing(Rationals());
> P<y> := PolynomialRing(P);
> F<c> := FunctionField(y^6 + y + 2);
> E<a> := ExactConstantField(F);
> C, r := ConstantFieldExtension(F, E);
> r(c);
1/16*(a^5 + 4*a^4 + 6*a^3 + 4*a^2 + a)
> $1 @@ r;
c
> e := Random(C, 2);
> e @@ r;
1/2*x*c^5 - 3*x*c^4 + (-12*x + 8)*c^3 + (-16*x + 24)*c^2 + (-8*x + 16)*c - 1
> r($1);
1/2*(-a^5 - a^2 + a)*$.1 + a^5 + a^4 - a^3 - a^2 - 1

```

### `MonicModel(F): FldFun -> FldFun`

Given an algebraic function field $F$ return a function field which is isomorphic to $F$ and defined by a monic polynomial.

### `Reduce(O): RngFunOrd -> RngFunOrd`

Given an order $O$ belonging to a function field $F$, this function returns the order obtained by applying size-reduction to the basis of $O$.

### `Localization(O, p): RngFunOrd, RngFunOrdIdl -> RngVal, Map`

Given an order $O$ of an algebraic function field and a prime ideal $p$ of $O$, return the localization of $O$ at $p$ and the map from $O$ into the localization.
