class property galois.FieldArray.primitive_element : FieldArray

A primitive element \(\alpha\) of the Galois field \(\mathrm{GF}(p^m)\).

Notes

A primitive element is a multiplicative generator of the field, such that \(\mathrm{GF}(p^m) = \{0, 1, \alpha, \alpha^2, \dots, \alpha^{p^m - 2}\}\). A primitive element is a root of the primitive polynomial \(f(x)\), such that \(f(\alpha) = 0\) over \(\mathrm{GF}(p^m)\).

Examples

The smallest primitive element of the prime field \(\mathrm{GF}(31)\).

In [1]: GF = galois.GF(31)

In [2]: GF.primitive_element
Out[2]: GF(3, order=31)
In [3]: GF = galois.GF(31, repr="power")

In [4]: GF.primitive_element
Out[4]: GF(α, order=31)

The smallest primitive element of the extension field \(\mathrm{GF}(5^2)\).

In [5]: GF = galois.GF(5**2)

In [6]: GF.primitive_element
Out[6]: GF(5, order=5^2)
In [7]: GF = galois.GF(5**2, repr="poly")

In [8]: GF.primitive_element
Out[8]: GF(α, order=5^2)
In [9]: GF = galois.GF(5**2, repr="power")

In [10]: GF.primitive_element
Out[10]: GF(α, order=5^2)