I have trouble to understand how to generalize the definition of the discriminant $Disc(B/A)$ where $A$ is the ring of integer in some number field $K$ and $B$ the integral closure in some finite extension $L$ of $K$.
In some lecture notes (J.S. Milne) it written that it is possible to define $Disc(B/A)$ as an ideal without assuming $B$ to be a free $A$-module. Let $p$ be an ideal in $A$, and let $S=A-p$. Then $S^{-1}A=A_p$ is principal, and so we can define $Disc(S^{-1}B/S^{-1}A)$ It is a power $(pA_p)^{m(p)}$ of $pA_p$.
Then arguing that the index $m(p)$ is non zero only for a finite number of $p$ he defines $Disc(B/A)$ as the product of ideal
$$Disc(B/A)= \Pi p^{m(p)}$$
My question is that I don't see how to justify that the index is non zero for only a finite number of prime ideal $p$
Thank you in advance
Choose a basis $e_{1},\ldots,e_{n}$ for $L/K$. After muliplying through by an element of $A$, we may suppose that the $e_{i}$ lie in $B$ (see Proposition 2.6 of the notes). Every prime dividing Disc$(B/A)$ divides $D(e_{1},\ldots,e_{n})$, and so there are only finitely many.