Valuation ring of $K(\alpha)$ is $A[\alpha]$? Let $A$ be a complete DVR with fraction field $K$ and residue field $k$, let $l$ be a finite separable extension of $k$, then $l=k(\bar\alpha)$ for some $\bar\alpha\in l$ whose minimal polynomial $\bar g\in k[x]$ is monic, irreducible and separable. Let $g\in A[x]$ be any lift of $\bar g$ that is monic, then $g$ is also irreducible and separable.

Define $L:= K[x]/(g(x))=K(\alpha)$, where $\alpha$ is the image of $x$ in $K[x]/(g(x))$, then $L$ has valuation ring $B$ which equals to $A[\alpha]$.
Why is $B$, the valuation ring of $L = K(\alpha)$, equal to $A[\alpha]$?

I know since $A$ is a complete DVR, $B$ is the integral closure of $A$ is $L$, so $A[\alpha]\subset B$, but I don't know the other inclusion.
p.s. It is found in one step in the proof in a course manual, that if $A$ is a complete DVR with fraction field $K$ and residue field $k$, then there's a correspondence between unramified extensions  $L/K$ and separable extensions $l\,/\,k$.
 A: The reason is quite simple.
First we show $l$ is indeed the residual field $B/\mathfrak{P}$, temporarily let $l'$ denote the residual field. Then $[l':k]\leq [L:K]$. Also $$\alpha \in L\implies \bar{\alpha} \in l' \implies l=k(\bar{\alpha}) \subset l'$$
Hence $[l':l]\geq 1$. If $[l':l]>1$, then $[l:k] \leq [L:K]/[l':l] < [L:K]$, contradicting to $[L:K]=[l:k]$. Therefore $l=l'$.

Let $n=[L:K]=[l:k]$, $\mathfrak{P}$ be the prime ideal in $L$ and $v$ the valuation on $K$. Suppose $$k_0 + k_1 \alpha + \cdots + k_{n-1} \alpha^{n-1} \in B \qquad k_i\in K$$
If there is some $k_i$ such that $v(k_i)<0$, let this $i$ be such that $v(k_i)$ is minimal. Dividing both sides by $k_i$ gives
$$a_0 + a_1 \alpha + \cdots + a_{n-1} \alpha^{n-1} \in \mathfrak{P} \qquad v(a_j)\geq 0,a_i=1$$
this says $\{1,\bar{\alpha},\cdots,\bar{\alpha}^{n-1}\}$ are linearly dependent over $k$, a contradiction.
A: Thanks for @pisco that done most of the work for me, though due to subtle detail of notations(like different definitions of $\bar\alpha$), I will accept his and write my commentary here.
Let $\hat\alpha$ be the image of $\alpha$ in $B/\mathfrak P$, then by construction of $g$, $\bar g(\hat\alpha) = 0$, since $\bar g$ is irreducible by assumption, $\hat\alpha\neq 0$ in $B/\mathfrak P$, so $\alpha\notin \mathfrak P$ hence $B=A[\alpha]$.
p.s. We have $n=[k(\hat\alpha):k] \leq [B/\mathfrak P : k]\leq [L:K] = n$, so $B/\mathfrak P =k(\hat\alpha) \approx k(\bar\alpha) = l.$
