1 | | Currently, every finite field implementation (integers mod ''p'', Givaro, NTL, PARI) has its own code for constructing an irreducible polynomial when given a string as the `modulus` keyword. Here is a patch that creates methods `PolynomialRing_dense_{finite_field,mod_p}.irreducible_element(n, algorithm=None)`. In a separate ticket, the `FiniteField` constructor will be adapted to call this function. |

| 1 | Currently, every finite field implementation (integers mod ''p'', Givaro, NTL, PARI) has its own code for constructing an irreducible polynomial when given a string as the `modulus` keyword. Here is a patch that creates methods `PolynomialRing_dense_{finite_field,mod_p}.irreducible_element(n, algorithm=None)`. In a separate ticket (#14833), the `FiniteField` constructor is adapted to call this function. |

| 2 | |

| 3 | The default choice is now deterministic: Conway polynomials if available, otherwise lexicographically first (via NTL/GF2E) in characteristic 2, Adleman-Lenstra (via PARI) in characteristic > 2. |