galois.irreducible_polys¶
- galois.irreducible_polys(characteristic, degree)¶
Returns all monic irreducible polynomials \(f(x)\) over \(\mathrm{GF}(p)\) with degree \(m\).
- Parameters
- Returns
All degree-\(m\) monic irreducible polynomials over \(\mathrm{GF}(p)\).
- Return type
Notes
If \(f(x)\) is an irreducible polynomial over \(\mathrm{GF}(p)\) and \(a \in \mathrm{GF}(p) \backslash \{0\}\), then \(a \cdot f(x)\) is also irreducible. In addition to other applications, \(f(x)\) produces the field extension \(\mathrm{GF}(p^m)\) of \(\mathrm{GF}(p)\).
Examples
All monic irreducible polynomials over \(\mathrm{GF}(2)\) with degree \(5\).
In [1]: galois.irreducible_polys(2, 5) Out[1]: [Poly(x^5 + x^2 + 1, GF(2)), Poly(x^5 + x^3 + 1, GF(2)), Poly(x^5 + x^3 + x^2 + x + 1, GF(2)), Poly(x^5 + x^4 + x^2 + x + 1, GF(2)), Poly(x^5 + x^4 + x^3 + x + 1, GF(2)), Poly(x^5 + x^4 + x^3 + x^2 + 1, GF(2))]