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]$, $K$ be its field of fractions. Let $p$ be a prime number. Suppose $p$ does not divide the discriminant of $f(X)$.
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_1(\theta))$ is a prime ideal of $A$.
Let $\Psi(\theta) = g_2(\theta)...g_e(\theta)$. Let $\alpha \in A$.
If $\Psi(θ)^n \alpha \equiv 0$ (mod $p^nA$), but not $\Psi(θ)^{n+1} \alpha \equiv 0$ (mod $p^{n+1}A$), we define ord$_P(\alpha$) = $n$. If there's no such $n$, we define ord$_P(\alpha$) = $\infty$.
My question: Is the following proposition correct? If yes, how would you prove this?
Proposition The following assertions hold.
(1) ord$_P$ can be extended to a unique discrete valuation of $K$ and its valuation ring is $A_P$.
(2) ord$_P(p$) = 1.
Motivation Let $m$ be the degree of $f(X)$. Let $\beta \in A$. $\beta$ can be written uniquely as $\beta = b_0 + b_1\theta + \dots + b_{m-1}\theta_{m-1}$, where $b_i \in \mathbb{Z}$. Hence $\beta \equiv 0$ (mod $p^nA$) if and only if $b_i \equiv 0$ (mod $p^n$) for $i = 0, \dots, m - 1$. Hence, when $\alpha \in A$ is given, it's rather easy to determine ord$_P(\alpha$). It's easy to see that ord$_P(\alpha) > 0$ if and only if $p$ divides the norm of $\alpha$. Therefore, if the norm of $\alpha$ is relatively prime to the discriminant of $f(X)$, we can compute the prime decomposition of $\alpha$.