# Global Function Fields

In this section $F/k$ denotes a global function field.

## Functions relative to the Exact Constant Field

### `NumberOfPlacesOfDegreeOverExactConstantField(F, m): FldFun, RngIntElt -> RngIntElt`

### `NumberOfPlacesDegECF(F, m): FldFun, RngIntElt -> RngIntElt`

The number of places of degree $m$ of the global function field $F/k$. Contrary to the `Degree` function the degree is here taken over the respective exact constant fields.

### `NumberOfPlacesOfDegreeOneOverExactConstantField(F): FldFunG -> RngIntElt`

### `NumberOfPlacesOfDegreeOneECF(F): FldFunG -> RngIntElt`

The number of places of degree one in the global function field $F/k$. Contrary to the `Degree()` function the degree is here taken over the exact constant field.

### `NumberOfPlacesOfDegreeOneOverExactConstantField(F, m): FldFunG, RngIntElt -> RngIntElt`

### `NumberOfPlacesOfDegreeOneECF(F, m): FldFun, RngIntElt -> RngIntElt`

The number of places of degree one in the constant field extension of degree $m$ of the global function field $F/k$. Contrary to the `Degree()` function the degree is here taken over the respective exact constant fields.

### `SerreBound(F): FldFunG -> RngIntElt`

### `SerreBound(F, m): FldFunG, RngIntElt -> RngIntElt`

### `SerreBound(q, g): RngIntElt, RngIntElt -> RngIntElt`

The Serre bound on the number of places of degree one in a global function field of genus $g$ over the exact constant field of $q$ elements (of the global function field $F$, of the constant field extension of degree $m$ of $F$). Contrary to the `Degree()` function the degree is here taken over the respective exact constant fields.

### `IharaBound(F): FldFunG -> RngIntElt`

### `IharaBound(F, m): FldFunG, RngIntElt -> RngIntElt`

### `IharaBound(q, g): RngIntElt, RngIntElt -> RngIntElt`

The Ihara bound on the number of places of degree one in a global function field $F/k$ of genus $g$ over the exact constant field of $q$ elements (of the global function field $F$, of the constant field extension of degree $m$ of $F$). Contrary to the `Degree` function the degree is here taken over the respective exact constant fields.

### `NumberOfPlacesOfDegreeOneECFBound(F): FldFunG -> RngIntElt`

### `NumberOfPlacesOfDegreeOneOverExactConstantFieldBound(F): FldFunG -> RngIntElt`

### `NumberOfPlacesOfDegreeOneECFBound(F, m): FldFun, RngIntElt -> RngIntElt`

### `NumberOfPlacesOfDegreeOneOverExactConstantFieldBound(F, m): FldFunG, RngIntElt -> RngIntElt`

### `NumberOfPlacesOfDegreeOneECFBound(q, g): RngIntElt, RngIntElt -> RngIntElt`

### `NumberOfPlacesOfDegreeOneOverExactConstantFieldBound(q, g): RngIntElt, RngIntElt -> RngIntElt`

The minimum of the Serre and Ihara bound. Contrary to the `Degree` function the degree is here taken over the respective exact constant fields.

### `LPolynomial(F): FldFunG -> RngUPolElt`

The $L$-polynomial of the global function field $F/k$ (with respect to the exact constant field).

### `LPolynomial(F, m): FldFunG, RngIntElt -> RngUPolElt`

The $L$-polynomial of the constant field extension of degree $m$ of the global function field $F/k$ (with respect to the exact constant field).

### `ZetaFunction(F): FldFunG -> FldFunRatUElt`

The Zeta function of the global function field $F/k$ (with respect to the exact constant field).

### `ZetaFunction(F, m): FldFunG, RngIntElt -> FldFunRatUElt`

The Zeta function of the constant field extension of degree $m$ of the global function field $F/k$ (with respect to the exact constant field).

## Functions Relative to the Constant Field

### `Places(F, m): FldFunG, RngIntElt -> SeqEnum[PlcFunElt]`

A sequence containing the places of degree $m$ of the global function field $F/k$.

### `HasPlace(F, m): FldFunG, RngIntElt -> BoolElt, PlcFunElt`

Returns `true` and a place of degree $m$ if and only if there exists such a place in the global function field; `false` otherwise.

### `HasRandomPlace(F, m): FldFunG, RngIntElt -> BoolElt, PlcFunElt`

Returns `true` and a random place of degree $m$ in the global function field (`false` if there are none).

### `RandomPlace(F, m): FldFunG, RngIntElt -> PlcFunElt`

Returns a random place of degree $m$ in the global function field or throws an error if there is none.

### `Example: Global Function Fields (ex-8f580e)`

```magma
> Y<t> := PolynomialRing(Integers());
> R<x> := FunctionField(GF(9));
> P<y> := PolynomialRing(R);
> f := y^3 + y + x^5 + x + 1;
> F<alpha> := FunctionField(f);
> Genus(F);
4
> NumberOfPlacesDegECF(F, 1);
22
> NumberOfPlacesOfDegreeOneECFBound(F);
32
> HasRandomPlace(F, 2);
true (x^2 + $.1*x + 2, alpha + $.1^2*x + $.1^5)
> LPolynomial(F);
6561*t^8 + 8748*t^7 + 7290*t^6 + 3888*t^5 + 1539*t^4 + 432*t^3 + 90*t^2
    + 12*t + 1

```

### `Example: global1 (ex-9f3184)`

Some of the above functions are demonstrated for a global relative field.

```magma
> PF<x> := PolynomialRing(GF(13, 2));
> P<y> := PolynomialRing(PF);
> FF1<b> := ext<FieldOfFractions(PF) | y^2 - x>;
> P<y> := PolynomialRing(FF1);
> FF2<d> := ext<FF1 | y^3 - b>;
> RER_FF2 := RationalExtensionRepresentation(FF2);
> NumberOfPlacesOfDegreeOneECF(FF2) eq NumberOfPlacesOfDegreeOneECF(RER_FF2);
true
> SerreBound(FF2);
170
> NumberOfPlacesDegECF(FF2, 1);
170
> _, P := HasPlace(FF2, 1);
> P;
(x, (($.1^44*x + $.1^100)*b + ($.1^82*x + $.1^10))*d^2 + (($.1^85*x + $.1^67)*b
    + ($.1^107*x + $.1^130))*d + ($.1^26*x + $.1^69)*b + $.1^149*x)
> Degree(P) eq 1;
true
> LPolynomial(FF2, 2) eq LPolynomial(RER_FF2, 2);
true

```

## Functions related to Class Group

### `UnitRank(O): RngFunOrd -> RngIntElt`

Given a maximal ‘finite’ order $O$ in a global function field, return the unit rank of $O$.

### `UnitGroup(O): RngFunOrd -> GrpAb, Map`

The unit group of a ‘finite’ maximal order $O$ as an Abelian group and the map from the unit group into $O$. Also see [`IsUnitWithPreimage`](elements.md#function-orders-elements-isunitwithpreimage).

### `Regulator(O): RngFunOrd -> RngIntElt`

The regulator of the unit group of the ‘finite’ maximal order $O$.

### `PrincipalIdealMap(O): RngFunOrd -> Map`

The map from the multiplicative group of the field of fractions of $O$ to the group of fractional ideals of $O$ where $O$ is a ‘finite’ maximal order.

### `Example: Global Class Ex (ex-1591a6)`

Following on from the last example,

```magma
> EFF2F := EquationOrderFinite(FF2);
> G, m := UnitGroup(EFF2F);
> G;
Abelian Group isomorphic to Z/168
Defined on 1 generator
Relations:
    168*G.1 = 0
> m(Random(G));
[ [ $.1^120, 0 ], [ 0, 0 ], [ 0, 0 ] ]
> IsUnit($1);
true
> Regulator(EFF2F);
1

```

### `ClassGroup(F : parameters): FldFunG -> GrpAb, Map, Map`

```magma
DegreeBound     : RngIntElt                    Default: 
SizeBound       : RngIntElt                    Default: 
ReductionDivisor: DivFunElt                    Default: 
Proof           : BoolElt                      Default: 
```

The divisor class group of $F/k$ as an Abelian group, a map of representatives from the class group to the divisor group and the homomorphism from the divisor group onto the divisor class group. For a detailed description see [`ClassGroup`](divisors.md#function-divisors-classes-classgroup).

### `ClassGroup(O): RngFunOrd -> GrpAb, Map, Map`

The ideal class group of the ‘finite’ maximal order $O$ as an Abelian group, a map of representatives from the ideal class group to the group of fractional ideals and the homomorphism from the group of fractional ideals onto the ideal class group.

### `ClassGroupExactSequence(O): RngFunOrd -> Map, Map, Map`

Returns the maps in the center of the exact sequence $0 \rightarrow U \rightarrow F^\times \rightarrow Id \rightarrow Cl \rightarrow 0$ where $U$ is the unit group of $O$, $F^\times$ is the multiplicative group of the field of fractions of $O$, $Id$ is the group of fractional ideals of $O$ and $Cl$ is the class group of $O$ for a ‘finite’ maximal order $O$.

### `ClassGroupAbelianInvariants(F : parameters): FldFunG -> SeqEnum`

```magma
DegreeBound     : RngIntElt                    Default: 
SizeBound       : RngIntElt                    Default: 
ReductionDivisor: DivFunElt                    Default: 
Proof           : BoolElt                      Default: 
```

Computes a sequence of integers containing the Abelian invariants of the divisor class group of $F/k$. For a detailed description see [`ClassGroupAbelianInvariants`](divisors.md#function-divisors-classes-classgroupabelianinvariants).

### `ClassGroupAbelianInvariants(O): RngFunOrd -> SeqEnum`

Computes a sequence of integers containing the Abelian invariants of the ideal class group of the ‘finite’ maximal order $O$.

### `ClassNumber(F): FldFunG -> RngIntElt`

The order of the group of divisor classes of degree zero of $F/k$.

### `ClassNumber(O): RngFunOrd -> RngIntElt`

The order of the ideal class group of the ‘finite’ maximal order $O$.

### `Example: Class Group (ex-dd2e5e)`

An example of class groups of relative fields is shown.

```magma
> PF<x> := PolynomialRing(GF(13, 2));
> P<y> := PolynomialRing(PF);
> FF1<b> := ext<FieldOfFractions(PF) | y^2 - x>;
> P<y> := PolynomialRing(FF1);
> FF2<d> := ext<FF1 | y^3 - b : Check := false>;
> MFF2I := MaximalOrderInfinite(FF2);
> G, m, mi := ClassGroup(FF2);
> m(Random(G));
Divisor in reduced representation:
Divisor in ideal representation:
Fractional ideal of Maximal Equation Order of FF2 over Maximal Equation Order of
FF1 over Univariate Polynomial Ring in x over GF(13^2)
Generators:
1
($.1^60/x*b + $.1^57/x)*d^2 + ($.1^141/x*b + $.1^4/x)*d + $.1^80/x*b, Ideal of
MFF2I
Generators:
1
1,
-2,
6*(1/x, (($.1^132*x^2 + $.1^164*x + 12)/x^3*b + ($.1^85*x^2 + $.1^155*x +
    12)/x^3)*d^2 + (($.1^75*x^2 + $.1^81*x + 12)/x^3*b + ($.1^29*x^2 + $.1^155*x
    + 12)/x^3)*d + ($.1^163*x^2 + $.1^29*x + 12)/x^3*b + ($.1^141*x + 12)/x^2),
    (x)^2 * (1/x)^2
> mi(&+[Divisor(Random(FF2, 3)) : i in [1 .. 3]]);
0
> ClassNumber(FF2);
1

```

### `GlobalUnitGroup(F): FldFunG -> GrpAb, Map`

The group of global units of $F/k$, i. e. the multiplicative group of the exact constant field, as an Abelian group, together with the map into $F$. Also see [`IsGlobalUnit`](elements.md#function-field-elements-isglobalunit) and [`IsGlobalUnitWithPreimage`](elements.md#function-field-elements-isglobalunitwithpreimage).

### `ClassGroupPRank(F): FldFunG -> RngIntElt`

Compute the $p$-rank of the class group of $F/k$ where $p$ is the characteristic of $F/k$. For a detailed description see [`ClassGroupPRank`](divisors.md#function-divisors-classes-classgroupprank).

### `HasseWittInvariant(F): FldFunG -> RngIntElt`

Return the Hasse–Witt invariant of $F/k$. See [`HasseWittInvariant`](divisors.md#function-divisors-classes-hassewittinvariant) for a detailed description.

### `IndependentUnits(O): RngFunOrd -> SeqEnum[RngFunOrdElt]`

A sequence of independent units of the ‘finite’ maximal order $O$.

### `FundamentalUnits(O): RngFunOrd -> SeqEnum[RngFunOrdElt]`

A sequence of fundamental units of the ‘finite’ maximal order $O$.

### `Example: orders (ex-065c59)`

```magma
> R<x> := FunctionField(GF(3));
> P<y> := PolynomialRing(R);
> f := y^4 + x*y + x^4 + x + 1;
> F<a> := FunctionField(f);
> O := MaximalOrderFinite(F);
> Basis(O);
[ 1, a, a^2, a^3 ]
> Discriminant(O);
x^12 + x^3 + 1
> UnitRank(O);
1
> U := FundamentalUnits(O);
> U;
[ [ x^33 + x^31 + 2*x^30 + 2*x^28 + 2*x^27 + x^25 + 2*x^24 + x^22 + 2*x^19 +
    2*x^15 + x^10 + 2*x^9 + 2*x^7 + x^6 + 2*x + 2, x^32 + 2*x^30 + x^29 + 2*x^28
    + 2*x^27 + 2*x^26 + x^22 + x^21 + 2*x^19 + x^18 + x^17 + x^16 + x^13 + x^11
    + 2*x^10 + 2*x^9 + 2*x^3 + 1, x^29 + x^27 + 2*x^25 + 2*x^23 + x^22 + 2*x^21
    + x^20 + x^18 + 2*x^17 + x^16 + x^15 + 2*x^14 + x^11 + 2*x^10 + 2*x^4 + x,
    x^30 + 2*x^27 + x^24 + x^21 + 2*x^18 + x^9 + 2*x^6 + 2 ] ]
> Norm(U[1]);
1
> Regulator(O);
33

```
