property galois.Poly.is_monic : bool

Returns whether the polynomial is monic, meaning its highest-degree coefficient is one.

Examples

A monic polynomial over \(\mathrm{GF}(7)\).

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

In [2]: p = galois.Poly([1, 0, 4, 5], field=GF); p
Out[2]: Poly(x^3 + 4x + 5, GF(7))

In [3]: p.is_monic
Out[3]: True

A non-monic polynomial over \(\mathrm{GF}(7)\).

In [4]: GF = galois.GF(7)

In [5]: p = galois.Poly([3, 0, 4, 5], field=GF); p
Out[5]: Poly(3x^3 + 4x + 5, GF(7))

In [6]: p.is_monic
Out[6]: False