On the ring generated by an algebraic integer over the ring of rational integers Let $f(X) \in \mathbb{Z}[X]$ be a monic irreducible polynomial.
Let $\theta$ be a root of $f(X)$.
Let $A = \mathbb{Z}[\theta]$.
Let $p$ be a prime number.
Suppose $p$ does not divide the discriminant of $f(X)$.
By lying-over theorem, there exists a prime ideal $P$ of $A$ lying over $p$.
Is $A_P$ a discrete valuation ring?
If yes, how would you prove it?
 A: Let $f(X) \equiv g_1(X)...g_e(X)$ (mod $p$), where $g_1(X), ..., g_e(X)$ are monic irreducible mod $p$.
Since $f(X)$ mod $p$ has no multiple root, they are distict.
By this, $P = (p, g_i(\theta))$ for some i.
By my answer to this question, $A_P$ is a discrete valuation ring and we are done.
A: Let me try an elementary proof without any reference to other threads (or books) :).
We can write $A=\mathbb{Z}[X]/(f)$ and $P=\mathfrak{p}/(f)$, where $\mathfrak{p}$ is a prime ideal of $\mathbb{Z}[X]$ containing $f$ and whose contraction to $\mathbb{Z}$ is $p\mathbb{Z}$. Then $p\mathbb{Z}[X]+f\mathbb{Z}[X]\subset\mathfrak{p}$. Reducing all data modulo $p$ we get that $\overline{\mathfrak{p}}$ is a maximal ideal of $\mathbb{Z}_p[X]$, hence $\overline{\mathfrak{p}}$ is generated by a (single) irreducible polynomial. By writing $\overline{f}=\overline{f}_1\cdots\overline{f}_r$ with $\overline{f}_i\in\mathbb{Z}_p[X]$ (monic) irreducible polynomials and taking into account that $\overline{f}\in\overline{\mathfrak{p}}$ we get that there exists $j\in\{1,\dots,r\}$ such that $\overline{\mathfrak{p}}=(\overline{f}_j)$. Since $p\mathbb{Z}[X]+f_j\mathbb{Z}[X]\subset\mathfrak{p}$ and $p\mathbb{Z}[X]+f_j\mathbb{Z}[X]$ is a maximal ideal of $\mathbb{Z}[X]$ we get that $p\mathbb{Z}[X]+f_j\mathbb{Z}[X]=\mathfrak{p}$. Moreover, since $p$ does not divide the discriminant of $f$, the polynomials $\overline{f}_1,\dots,\overline{f}_r$ are distinct and this shows, in particular, that $\overline{f}_i\notin\overline{\mathfrak{p}}$ for $i\neq j$.
Now we prove that the maximal ideal of $A_P$ is principal, and therefore $A_P$ is a DVR. First note that $A_P\cong \mathbb{Z}[X]_{\mathfrak{p}}/f\mathbb{Z}[X]_{\mathfrak{p}}$ and its maximal ideal is ${\mathfrak{p}}\mathbb{Z}[X]_{\mathfrak{p}}/f\mathbb{Z}[X]_{\mathfrak{p}}$. Moreover, we have ${\mathfrak{p}}\mathbb{Z}[X]_{\mathfrak{p}}=p\mathbb{Z}[X]_{\mathfrak{p}}+f_j\mathbb{Z}[X]_{\mathfrak{p}}$. If we show that ${\mathfrak{p}}\mathbb{Z}[X]_{\mathfrak{p}}=p\mathbb{Z}[X]_{\mathfrak{p}}+f\mathbb{Z}[X]_{\mathfrak{p}}$, then the proof is done. Since $p\mathbb{Z}[X]+f\mathbb{Z}[X]\subset\mathfrak{p}$ we get $p\mathbb{Z}[X]_{\mathfrak{p}}+f\mathbb{Z}[X]_{\mathfrak{p}}\subset{\mathfrak{p}}\mathbb{Z}[X]_{\mathfrak{p}}$. It remains to show that $p\mathbb{Z}[X]_{\mathfrak{p}}+f_j\mathbb{Z}[X]_{\mathfrak{p}}\subset p\mathbb{Z}[X]_{\mathfrak{p}}+f\mathbb{Z}[X]_{\mathfrak{p}}$, that is, $f_j\in p\mathbb{Z}[X]_{\mathfrak{p}}+f\mathbb{Z}[X]_{\mathfrak{p}}$. But if we look back to $\overline{f}=\overline{f}_1\cdots\overline{f}_r$ and lift it to $\mathbb{Z}[X]$ we can write $f=f_jq+pr$ with $q,r\in\mathbb{Z}[X]$ and $q\notin\mathfrak{p}$ (since $q=\prod_{i\neq j}f_i$). This shows that $f_j\in p\mathbb{Z}[X]_{\mathfrak{p}}+f\mathbb{Z}[X]_{\mathfrak{p}}$. (For short, we proved that the maximal ideal of $A_P$ is generated by (the residue class of) $p$.)
Question. I would like to know if one can show directly (by using isomorphism theorems and other means) that $A_P$ is isomorphic to a DVR build with our data. I wanted to prove this, by I didn't find one. 
A: Suppose $P$ divides the conductor of $A$.
Then by my answer to this question, $P$ divides the discriminant of $f(X)$.
This is a contradiction.
Hence $P$ dose not divide the conductor.
Hence $A_P$ is integrally closed by the answer to this question.
Therefore $A_P$ is a discrete valuation ring.
