# Extension of rings of integers always locally free

In his answer to this question, Andrea claims that if $A \subset B$ is an extension of rings of integers of number fields, $B$ is locally free over $A$.

How can one prove this?

Furthermore, I am looking for an example (with $A$ and $B$ as above) where $B$ is not a free $A$-module (in case $A = \mathbb{Z}$, $B$ is always free over $A$, since it is a finitely generated, torsion-free $\mathbb{Z}$-module).

-

The extension $A\subseteq B$ is always finite (because $B$ is finite over $\mathbf{Z}$). Since $B$ is a torsion-free $A$-module, it is $A$-flat (since $A$ is Dedekind). Over a Noetherian ring, finite flat is the same as finite locally free.
The result I'm using states that for a general ring $A$ and an $A$-module $M$, $M$ is finitely presented and flat iff finite projective iff finite locally free. A proof can be found, e.g., in our own Pete Clark's notes on commutative algebra (I think). It can also be found in the Stacks Project chapter on commutative algebra, although I don't know the exact location right now. Note that here, locally free means for each prime $\mathfrak{p}$ of $A$, there exists $f\notin\mathfrak{p}$ with $M_f$ free over $A_f$. So this is Zariski locally free, which is generally stronger than free stalks, – Keenan Kidwell Sep 4 '12 at 22:16