Proof of Proposition 2.12 in Neukirch ANT I'd like a reference or a direct proof of the following statement:

Let $K|\mathbb Q$ be a finite extension and consider the ring of  algebraic integers $\mathcal O_K$. Let $\mathfrak a\subseteq\mathfrak  a'$ be two finitely generated $\mathcal O_K$-submodules of $K$ (the external operation is the product in $K$). By a previous proposition we know that $\mathfrak a, \mathfrak  a'$ are two free $\mathbb Z$-modules.
claim: $(\mathfrak a':\mathfrak a)$ is the absolute value of the determinant of the base change matrix passing from a $\mathbb Z$-basis of $\mathfrak a$ to a $\mathbb Z$-basis of $\mathfrak a'$.

The author simply says: "this proof is part of the well-known theory of finitely generated $\mathbb Z$-modules".
Thank you in advance.
 A: Identifying $\mathfrak  a'$ as $\mathbb{Z}^n$, choose some basis $v_1,...,v_n\in\mathbb{Z}^n$ for $\mathfrak  a$, and let $A$ be the matrix with columns $v_i$. Choosing another basis for $\mathfrak  a$ is equivalent to multiplying $A$ from the right by the basis changing matrix which is in $GL_n(\mathbb{Z})$. Similarly, multiplying from the left corresponds to a basis change in $\mathfrak  a$. 
Prove to yourself that for any matrix $A$ over $\mathbb{Z}$, there are invertible matrices $P,Q$ in $GL_n(\mathbb{Z})$ such that $PAQ$ is diagonal. The determinant has not change, of course. The fact that the new matrix is diagonal means that you can find a basis $u_1,...,u_n$ for $\mathfrak  a'$ such that $d_1u_1 ,..., d_n u_n$ is a basis for $\mathfrak  a$ where the $d_i$ are the elements on the diagonal. Now it is easy to see that the quotient group is the product of $\mathbb{Z}_{d_i}$ which imply that the index is the product of the $d_i$ which is exactly the determinant.
A: This is the theory of modules over principal ideal domains. As for a concrete reference, chapter 12 (in particular section 12.1) of Dummit/Foote: Abstract Algebra, Wiley would be a reference, but probably most graduate level algebra textbooks would cover this topic.
Wikipedia has a page on this topic at
https://en.wikipedia.org/wiki/Structure_theorem_for_finitely_generated_modules_over_a_principal_ideal_domain
but it is more a reference than a learning resource.
