I'm working on the following problem, and would really appreciate some clarification.
Problem: Let $K$ be a number field with $[K:\mathbb{Q}] = n$ with ring of integers $\mathcal{O}_k$. Let $M$ be a $\mathbb{Z}$-submodule in $K$ with $\dim_n(M \otimes_\mathbb{Z} \mathbb{Q}) = n$. Why is $M$ free? Let $\alpha_1, \dots, \alpha_n$ be a $\mathbb{Z}$-basis of $M$. Show that the discriminant $d(M) := d(\alpha_1, \dots, \alpha_n) \in \mathbb{Z}$ and that it is independent of the choice of the basis.
It is clear to me that a $\mathbb{Z}$-basis of $M$ (if $M$ is free) is also a $\mathbb{Q}$-basis of $K$, thus we can talk about the discriminant. It is also clear to me that $d(M)$ must be independent of choice of basis. However I have two questions:
i.) Why does $M$ have to be free? It is torsion-free, so it would suffice to show that is is finitely generated (or to show that it is a finitely generated $\mathcal{O}_k$-module). But why is this the case?
ii.) Why does $d(M)$ have to be an element of $\mathbb{Z}$? Suppose we have the basis $\alpha_1, \dots, \alpha_n$ of $M$, then $\alpha_i = \displaystyle \frac{b_i}{c_i}$ for some $b_i \in \mathcal{O}_k, c_i \in \mathbb{Z}$. Then $$d(\alpha_1, \dots, \alpha_n) = \underbrace{d(b_1, \dots, b_n)}_{\in \mathbb{Z}} \cdot \det(A)^2$$, where $A$ is change of basis matrix, i.e. $\det(A) = \displaystyle\frac{1}{c_1 \cdot \cdots \cdot c_n}$. But $\displaystyle\frac{d(b_1, \dots, b_n)}{c_1^2 \cdot \cdots \cdot c_n^2}$ does not necessarily have to lie in $\mathbb{Z}$.
Thank you very much for any help and hints!