# Polynomial Mod Ideal

I have a polynomial $R\in\mathbb{Z}[x]$. I then define $R' = \frac{d}{dx}R$, and look at the splitting field of $R'$, $K$, an algebraic number field. Now, I want to find a prime ideal $\mathfrak{p}$ of $L$ of absolute degree 1 such that $R\mod\mathfrak{p}$ is irreducible.

To do this, I've set up:

```
p0, n = 5, 7
L = PolynomialRing(ZZ,'x')
R = L(x^n-p0^(n-1)x+p0)
Rprime = L(n*x^(n-1)-p0^(n-1))
K = NumberField(Rprime, 'z')
for P in K.primes_of_degree_one_iter():
<stuff>
```

I'm now trying ti find the right thing to do for <stuff>. Namely, how can I reduce the polynomial R with respect to the ideal P?

Let us do the above, and further insert some print:

The long list ends with:

`P`

is now the last entry, it is afractionalideal. We can factor it like:Please explain what should be done in this situation. I need one more comment to paste some code...

... continuation:

Now

`f`

is the last fractional ideal. Its gens are algebraic integers:and we may build

`K.quotient( f )`

, but this is maybe not wanted.Passing to ZZ / 71429 first, then modulo ... is what you want?

Also, note that

`K(R)`

has degree one,`-93750/7*z + 5`

, we need maybe a new`R`

in`K[]`

...I'm trying to implement Lemma 2.3 from Kedlaya's

A construction of polynomials with squarefree discriminants(I don't believe I can post links, its identifier on Arxiv is 1103.5728). This lemma says "Let $p_0$ be a prime not dividing $n(n−1)$. Then there exist infinitely many primes $p_1$ modulo which the polynomial $R(x) = x^n − p_0^{n−1}x + p_0$ is irreducible and its derivative $R′(x) = nx^{n−1} − p_0^{n−1}$ splits into distinct linear factors.The proof is:

"The polynomial $R′$ has splitting field $L = \mathbb{Q}(\zeta_n−1, n^{1/(n−1)})$, in which $p_0$ does not ramify because $p_0$ does not divide $n(n−1)$. Thus $R$ is an Eisenstein polynomial with respect to any prime above $p_0$ in $L$; in particular, $R$ is irreducible over $L$. By the Chebotarev density theorem, there exist infinitely many prime ideals of $L$ of absolute degree 1 modulo which $R$ is irreducible; the norm of any such prime ideal is the prime we want."

I'm not entirely sure what "absolute degree 1" means for a prime ideal, and if

`K.primes_of_degree_one_iter()`

is giving me something else (namely, fractional ideals), this could be the issue. Do you know how I could find prime ideals of $L$ of absolute degree 1?