Ideal prime to $f$ iff the norm of the ideal is relatively prime to $f$ I have been beating my head at it for the last two days but I don't understand the proof provided in the picture for the part (i) of the lemma. This David Cox book, Primes of the form $x^2+ny^2$, is giving me nightmares and I would be really grateful if somebody can explain the proof to me in detail unlike the heavily consolidated one in the book. 
All I want is somebody please explain me his proof in greater detail so that I understand it completely. Also can someone please suggest a good book with clear proofs for algebraic number theory? I do follow Alaca and Williams but the book is missing the good content like the Part 7 of Cox's 'Primes of the form $x^2+ny^2$'. The stuff I see in this book, I haven't seen them anywhere.
Thank you so much for your help. 
 A: For (i) The first equivalence is the definition of being surjective and the second holds because $\mathcal{O}/\mathfrak{a} $ is finite. Now the structure theorem for finite abelian groups tell us that
$\mathcal{O}/\mathfrak{a} \simeq \mathbb{Z}/d_1 \mathbb{Z} \times \ldots \times\mathbb{Z}/d_n \mathbb{Z} $
where $d_i \mid d_j$ for $1\leq i<j \leq n$, thus $m_f$ will be an isomorphism iff the corresponding multiplication by $f$ from  $\mathbb{Z}/d_1 \mathbb{Z} \times \ldots \times\mathbb{Z}/d_n \mathbb{Z} $ to itself is an isomorphism.
This happens iff $1\in \mathbb{Z}/d_1 \mathbb{Z} \times \ldots \times\mathbb{Z}/d_n \mathbb{Z} $ is in its image,i.e., if and only if for each $1\leq i\leq n$ there exist $n_i$ such that $f\cdot n_i \equiv 1 \;(\bmod\; d_i)$ which is the same as saying that $f$ is relatively prime to each $d_i$ or that is relatively prime to $N(\mathfrak{a})=d_1 \cdots d_n$.
For (ii) $\beta \mathfrak{a} \subset \mathfrak{a}$ implies $\beta \in \mathcal{O}_K$ because $\mathfrak{a}$ is a finitely generated  abelian group, the rest of the proof I think is clear enough (remember $f=[\mathcal{O}_K : \mathcal{O}]$  so $f \cdot\mathcal{O}_K \subset \mathcal{O}$ )  
