classmethod galois.Poly.Identity(field: type[Array] | None = None) Self

Constructs the polynomial \(f(x) = x\) over \(\mathrm{GF}(p^m)\).

Parameters:
field: type[Array] | None = None

The Galois field \(\mathrm{GF}(p^m)\) the polynomial is over. The default is None which corresponds to GF2.

Returns:

The polynomial \(f(x) = x\).

Examples

Construct the identity polynomial over \(\mathrm{GF}(2)\).

In [1]: galois.Poly.Identity()
Out[1]: Poly(x, GF(2))

Construct the identity polynomial over \(\mathrm{GF}(3^5)\).

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

In [3]: galois.Poly.Identity(GF)
Out[3]: Poly(x, GF(3^5))