I asked this [question in MathStackExchange](https://math.stackexchange.com/questions/3842894/a-problem-about-an-unramified-prime-in-a-galois-extension), but I didn't receive any answer.


Let $K/\mathbb{Q}$ be a Galois extension of degree $n$, and denote its ring of integers by $\mathcal{O}\_K$. Let $\mathfrak{p}$ be an arbitrary prime ideal of $\mathcal{O}\_K$, which is unramified over $\mathbb{Z}$, and prime to $n!$. We will denote the residue field of $\mathfrak{p}$ by $\kappa(\mathfrak{p})$, its characteristic by $p$, and its residue degree by $f$. Let $x \in \mathcal{O}\_K$, and let $\bar{x}$ be its image in $\kappa(\mathfrak{p})$,
and assume that $P \in \mathbb{Z}[X]$ is a monic minimal polynomial of $\bar{x}$, such that $P(x) \in \mathfrak{p} \backslash \mathfrak{p}^2$, and $\deg(P)=f$.


(Q): Show that $\mathcal{O}\_K/\mathfrak{p}^2$ is generated by the image of $x$ over $\mathbb{Z}/p^2\mathbb{Z}$.




---


My attempts: Since $P$ has minimal degree among the polynomials which are vanishing $x$ module $\mathfrak{p}$, it should be irreducible over the field $\mathbb{Z}/p\mathbb{Z}$.
Therefore $1, x, \cdots, x^{f-1}$ are linearly independent over $\mathbb{Z}/p$.
Also, notice that $$\dfrac{\dfrac{\mathbb{Z}}{p\mathbb{Z}}}{P(X)} \equiv \dfrac{\mathbb{Z}}{p\mathbb{Z}} \oplus x \dfrac{\mathbb{Z}}{p\mathbb{Z}} \oplus \cdots \oplus x^{f-1}\dfrac{\mathbb{Z}}{p\mathbb{Z}}$$
is a field between $\dfrac{\mathbb{Z}}{p\mathbb{Z}}$ and $\dfrac{\mathcal{O}\_K}{\mathfrak{p}}$, with $\dfrac{\mathbb{Z}}{p\mathbb{Z}}$-degree equal to $f=[\dfrac{\mathcal{O}\_K}{\mathfrak{p}}:\dfrac{\mathbb{Z}}{p\mathbb{Z}}]$, so it should equal to $\dfrac{\mathcal{O}\_K}{\mathfrak{p}}$. So we can conclude that $\dfrac{\mathcal{O}\_K}{\mathfrak{p}}$ is generated by the image of $x$ over $\dfrac{\mathbb{Z}}{p\mathbb{Z}}$. (My proof of this fact may contain extra details; if so, please let me know). **But** I don't have any idea why $\mathcal{O}\_K/\mathfrak{p}^2$ is generated by the image of $x$ over $\mathbb{Z}/p^2\mathbb{Z}$?



> 
> I'm looking to figure out how, in this case, "the assumption $P(x) \in \mathfrak{p} \backslash \mathfrak{p}^2$" helps me solve the problem. I have this issue with similar problems; for instance, I had trouble dealing with **exercises 19-22 from chapter 4 of Marcus's Number Fields**. (In these exercises I had to deal with "the assumption $\pi \in Q \backslash Q^2$", finally I solved them after a long hard try and search). Also, I tried to look for some versions of Nakayama's lemma, but I have not succeeded.
> 
> 
> 



A problem about an unramified prime in a Galois extension
A set of representatives for $\mathcal{O}$ modulo $\mathfrak{p}$ is given by
$$S:=\{a\_0+a\_1x+\dotsb+a\_{f-1}x^{f-1}\ :\ a\_0,a\_1,\dotsc,a\_{f-1}\in\{0,1,\dotsc,p-1\}\}.$$
As $P(x)$ lies in $\mathfrak{p}\setminus\mathfrak{p}^2$, a set of representatives for $\mathfrak{p}$ modulo $\mathfrak{p}^2$ is given by
$$S\cdot P(x)=\{b\_0P(x)+b\_1xP(x)+\dotsb+b\_{f-1}x^{f-1}P(x)\ :\\ b\_0,b\_1,\dotsc,b\_{f-1}\in\{0,1,\dotsc,p-1\}\}.$$
Therefore, a set of representatives for $\mathcal{O}$ modulo $\mathfrak{p^2}$ is given by
$$S+S\cdot P(x)=\{a\_0+\dotsb+a\_{f-1}x^{f-1}+b\_0P(x)+\dotsb+b\_{f-1}x^{f-1}P(x)\ :\\ a\_0,b\_0,\dotsc,a\_{f-1},b\_{f-1}\in\{0,1,\dotsc,p-1\}\}.$$
In particular, $\mathcal{O}=\mathbb{Z}[x]+\mathfrak{p}^2$, and the result follows.


