# Constructing Nearfields

There are two types of finite nearfield: the *regular* nearfields of Dickson and the *irregular* nearfields of Zassenhaus. In order to accommodate both types Magma has a ‘virtual type’ `Nfd` and types `NfdDck` and `NfdZss` which inherit from `Nfd`.

## Dickson Nearfields

In order to begin exploring `Nfd` types in Magma we need a way to create instances of nearfields and their elements. As already mentioned there is a large class of nearfields first described by L. E. Dickson [[Dickson, 1905](../../references.md#cite-dickson-1905a), [Dickson, 1905](../../references.md#cite-dickson-1905b)] in 1905 and in this section we describe how to construct them in Magma.

The nearfields resulting from this construction will be called *Dickson* (or *regular*) nearfields.

If $p$ is a prime and if the positive integers $h$ and $v$ satisfy

- *if* $r$ *is a prime or* $4$ *and if* $r$ *divides* $v$*, then* $r$ *divides* $p^h-1$

then $(p,h,v)$ is a *Dickson triple*.

If we write $q = p^h$, the condition above is equivalent to

- *All prime factors of* $v$ *divide* $q-1$ *and* $q\equiv 3 \bmod 4$ *implies* $v \not\equiv 0 \bmod 4$*.*

We call $(q,v)$ a *Dickson pair*.

### `DicksonPairs(p, hlo, hhi, vlo, vhi): RngIntElt, RngIntElt, RngIntElt, RngIntElt, RngIntElt -> SeqEnum`

The list of Dickson pairs $(q, v)$ for prime $p$, where *hlo* and *hhi* are the lower and upper bounds on $h$ and where *vlo* and *vhi* are the lower and upper bounds on $v$.

### `DicksonPairs(p, h1, v1): RngIntElt, RngIntElt, RngIntElt -> SeqEnum`

The list of Dickson pairs $(p^h, v)$ for the prime $p$, where $h1$ and $v1$ are upper bounds on $h$ and $v$.

### `DicksonTriples(p, hb, vb): RngIntElt, RngIntElt, RngIntElt -> SeqEnum`

The list of Dickson triples $(p,h,v)$ for the prime $p$, where $hb$ and $vb$ are bounds on $h$ and $v$.

### `Example: dicksonpairs (ex-d7494c)`

For each Dickson pair (equivalently Dickson triple), there is at least one Dickson nearfield.

```magma
> DicksonPairs(5,3,4,4,5);
[
    [ 125, 4 ],
    [ 625, 4 ]
]
> DicksonPairs(5,4,5);
[
    [ 5, 1 ],
    [ 5, 2 ],
    [ 5, 4 ],
    [ 25, 1 ],
    [ 25, 2 ],
    [ 25, 3 ],
    [ 25, 4 ],
    [ 125, 1 ],
    [ 125, 2 ],
    [ 125, 4 ],
    [ 625, 1 ],
    [ 625, 2 ],
    [ 625, 3 ],
    [ 625, 4 ]
]
> DicksonTriples(5,4,5);
[
    [ 5, 1, 1 ],
    [ 5, 1, 2 ],
    [ 5, 1, 4 ],
    [ 5, 2, 1 ],
    [ 5, 2, 2 ],
    [ 5, 2, 3 ],
    [ 5, 2, 4 ],
    [ 5, 3, 1 ],
    [ 5, 3, 2 ],
    [ 5, 3, 4 ],
    [ 5, 4, 1 ],
    [ 5, 4, 2 ],
    [ 5, 4, 3 ],
    [ 5, 4, 4 ]
]

```

The isomorphism type of a Dickson nearfield depends on the choice of primitive element of the underlying Galois field. It has been shown by Lüneburg [[Lüneburg, 1971](../../references.md#cite-luneburg-1971)] that if $\phi$ is the Euler phi-function and $g$ is the order of $p$ modulo $v$, there are $\phi(v)/g$ isomorphism classes of Dickson nearfields with the same Dickson triple $(p,h,v)$.

The default nearfield will use the ‘standard’ primitive element of the field. The other variants with the same Dickson pair can be obtained by providing an integer $s$ coprime to $v$. Internally this is converted to a suitable integer $e$ coprime to $q^v -1$ such that $s\equiv e \pmod v$.

### `NumberOfVariants(q, v): RngIntElt, RngIntElt -> RngIntElt`

The number of non-isomorphic nearfields with Dickson pair $(q,v)$.

### `NumberOfVariants(N): NfdDck -> RngIntElt`

The number of variants of the Dickson nearfield $N$.

### `VariantRepresentatives(q, v): RngIntElt, RngIntElt -> SeqEnum`

Representatives for the variant parameter of nearfields with Dickson pair $(q,v)$.

### `Example: variants (ex-20e6ea)`

For each Dickson pair there can be several variants. The variant representative can be used when constructing the corresponding Dickson nearfield.

```magma
> NumberOfVariants(625,4);
2
> VariantRepresentatives(625,4);
[ 1, 3 ]

```

### `DicksonNearfield(q, v : parameters): RngIntElt, RngIntElt -> NfdDck`

```magma
Variant      : RngIntElt                    Default: 1
LargeMatrices: BoolElt                      Default: false
```

Create a Dickson nearfield from the Dickson pair $(q,v)$. The `Variant` parameter is an integer $s$ which can be used to specify the choice of primitive element (see the discussion following the intrinsic `DicksonTriples`). The parameter `LargeMatrices` is used only when the group of units of the nearfield is requested. The default is to represent the group of units as a matrix group defined over the kernel of the nearfield. But if `LargeMatrices` is `true`, the matrices are defined over the prime field.

### `Example: dickson (ex-da0033)`

As indicated in the previous example, up to isomorphism, there are two Dickson nearfields with Dickson pair $(625,4)$.

```magma
> D := DicksonNearfield(625,4);
> D3 := DicksonNearfield(625,4 : Variant := 3);
> D5 := DicksonNearfield(625,4 : Variant := 5);
> D eq D3;
false
> D3 eq D5;
false
> D eq D5;
true
> D;
Nearfield D of Dickson type defined by the pair (625, 4)
Order = 152587890625

```

## Zassenhaus Nearfields

It was shown by Zassenhaus [[Zassenhaus, 1935](../../references.md#cite-zassenhaus-1935b)] that in addition to the regular nearfields there are seven *irregular* nearfields. Zassenhaus gave constructions but did not prove their uniqueness. The proofs in [[Zassenhaus, 1935](../../references.md#cite-zassenhaus-1935b)] are known to contain gaps. Perhaps the most reliable account of the existence and uniqueness of the irregular nearfields is the PhD thesis of Dancs-Groves [[Groves, 1974](../../references.md#cite-dancs-1974)].

The seven finite nearfields which are not Dickson nearfields are the *Zassenhaus* nearfields.

Zassenhaus nearfields can be distinguished from regular nearfields by the fact that the multiplicative group of a finite nearfield $N$ is metacyclic if and only if $N$ is regular.

As a consequence, a Zassenhaus nearfield cannot occur as a subfield of a Dickson nearfield.

### `ZassenhausNearfield(n): RngIntElt -> NfdZss`

Creates the $n$th Zassenhaus nearfield.

### `Example: zassenhaus (ex-af8523)`

The orders of the Zassenhaus nearfields are $5^2$, $11^2$, $7^2$, $23^2$, $11^2$, $29^2$ and $59^2$.

```magma
> for n := 1 to 7 do ZassenhausNearfield(n); end for;
Irregular nearfield Z with Zassenhaus number 1
Order = 25
Irregular nearfield Z with Zassenhaus number 2
Order = 121
Irregular nearfield Z with Zassenhaus number 3
Order = 49
Irregular nearfield Z with Zassenhaus number 4
Order = 529
Irregular nearfield Z with Zassenhaus number 5
Order = 121
Irregular nearfield Z with Zassenhaus number 6
Order = 841
Irregular nearfield Z with Zassenhaus number 7
Order = 3481

```
