# Reduction mod p of a polynomial

Hi everyone,

I have a question about the factorization of a polynomial modulo a prime ideal that I would like to help with.

Specifically, let $K$ be a number field (for my problem, we can assume that $K=\mathbb{Q}[i]$ or $K=\mathbb{Q}[\omega]$). I have a polynomial $f$ in $O_K[x]$ and a prime ideal $\mathfrak{p}$ in $O_K$ and I want to compute the factorization of $f$ over $O_K/\mathfrak{p}$.

When $K=\mathbb{Q}$, I use the following built-in function.

f=f.change_ring(GF(p))
f.factor()


I wonder whether we can do the same for a general number field.

-Tung

edit retag close merge delete

Sort by ยป oldest newest most voted

My collaborator finally figured out how to do this. For your interest, here is how we do it. Let K be the number field, P the prime ideal, and f the polynomial that we want to factor modulo P.

G = K.factor(P)[0][0].residue_field()
f.change_ring(G).factor()


Hope this helps if someone arrives at the same problem in the future.

more

You can accept your own answer to mark the question as solved.

( 2023-08-21 22:26:38 +0200 )edit