A question regarding independence modulo a prime ideal of a number ring The following exercise is taken from Marcus' Number Fields and I have no clue on how to start this. I'd prefer to not be given a full answer, just a few hints on how to get started.

Let $P$ be a prime ideal of $O_K$ and $Q$ be a prime ideal of $O_L$ with $Q$ lying over $P$ for some number fields $K\subset L$ and $[L:K]=n$. Suppose $\alpha_1,...,\alpha_n$ are independent modulo $P$, then show that $\alpha_1,...,\alpha_n$ form a basis for $L$ over $K$. (Exercise 3.36(a)) 

The book suggests using the following lemma:
Let $A$ and $B$ be nonzero ideals in a Dedekind domain $R$, with $B\subset A$, and $A\ne R$. Then there is $ \gamma \in K :\gamma B \subset R$ and $ \gamma B\not \subset A $.
Definition. Call a set of elements of $S$ independent mod $P$ iff the corresponding elements in $S/PS$ are linearly independent over $R/P$. 
 A: We want to show that $\alpha_1,\dots,\alpha_n$ are linearly independent over $K$, equivalently over $R$. Suppose $a_1\alpha_1+\cdots+a_n\alpha_n=0$ with $a_i\in R$ not all $0$. Then $\hat a_1\bar\alpha_1+\cdots+\hat a_n\bar\alpha_n=\bar 0$ in $S/PS$, so $\hat a_i=\hat 0$ (in $R/P$) for all $i$, that is, $a_i\in P$ for all $i$. Set $B=(a_1,\dots,a_n)$. Note that $B\ne(0)$ and then we can apply the invoked lemma for $B\subset P$: there is $\gamma\in K$ such that $\gamma B\subset R$, and $\gamma B\not\subset P$. It follows that there is $j$ such that $\gamma a_j\notin P$. Now replace $a_i$ by $\gamma a_i$ for all $i$ and reach a contradiction.
A: Here's the sketch of a solution which doesn't use the hint you mentioned.  It might not be a very enlightening approach, so you may want to seek another answer.  Let me know if you have any questions.  I'm using Marcus's notation ($S$ is the ring of integers of $L$, $R$ is that of $K$).
(1) The localization $R_P$ is a local ring with unique maximal ideal $P_P = \{ \frac{p}{s} : p \in P, s \in R \setminus P\}$.  The localization of $S$ at the multiplicatively closed set $R \setminus P$, denoted $S_P$, is the integral closure of $R_P$ in $L$.  $S_P$ is a free $R_P$-module of rank $n$.
(2) Let $k$ the field $R/P$, or $R_P/P_P$ (these fields are isomorphic in an obvious way, so let's just call them the same field).  Then $S/PS$ and $S_P/P_PS_P$ are isomorphic as vector spaces over $k$, the isomorphism being the obvious one.
(3) $S_P/P_PS_P$, or $S/PS$, is a vector space of dimension $n$ over $k$.
(4) One version of Nakayama's lemma states that if $A$ is a local ring with unique maximal ideal $\mathfrak m$, and $M$ is a finitely generated $A$-module, then $M/ \mathfrak m M$ is a finite dimensional vector space over $A/\mathfrak m$, and a collection $x_1, ... , x_t \in M$ spans $M$ as an $A$-module if and only if the images of $x_1, ..., x_t$  in $M/ \mathfrak m M$ span $M/ \mathfrak m M$ as a vector space over $A/ \mathfrak m$.
(5) By hypothesis, the images of $\alpha_1, ... , \alpha_n$ in $S/PS$ are linearly independent over $R/P$.  Hence the images of these things in $S_P/P_PS_P$ are linearly independent over $R_P/P_P$.  Hence they are a basis for $S_P/P_PS_P$ by (3).  Now apply Nakayama's lemma with $M = S_P$, $A = R_P$, and $\mathfrak m = P_P$.  
