Localization arguments in Dedekind domains I am reading Serre's Local Fields, and have questions about the text. Specifically, pages 11 and 12.
1) Consider a Dedekind domain. We want to show that all fractional ideals are invertible. Serre claims that because the image of a fractional ideal under every localization by prime ideals is invertible, that the fractional ideal itself must be invertible. I do not see why this is.
2) In the same way, he argues "by localization" that because the image of an ideal $\mathfrak{a}$ under the localization $A_\mathfrak{p}$ has the form $\mathfrak{p}^{{v_p(\mathfrak{a}})}$, where $v_{\mathfrak{p}}$ is the valuation, and because the exponents are zero except for a finite number of ideals, that $\mathfrak{a}$ factors into a finite number of prime ideals. Again, I do not see how to carry out the details of this argument.
Thanks for the help.
 A: For (1), let $I$ be a non-zero ideal of a Dedekind domain $R$ with fraction field $K$. Let $I^{-1}=\{r\in K:rI\subseteq R\}$. Then $I^{-1}$ is a fractional ideal and $I$ is invertible if and only if $II^{-1}=R$ (in general one has from the definitions that $II^{-1}\subseteq R$). You can verify that localization at a prime $\mathfrak{p}\in\mathrm{mSpec}(R)$ commutes with products of fractional ideals and with formation of $I^{-1}$, that is, upon identifying $R_\mathfrak{p}$ with a subring of $K$, $(I^{-1})_\mathfrak{p}=(I_\mathfrak{p})^{-1}$. Now, local invertibility means $(II^{-1})_\mathfrak{p}=I_\mathfrak{p}(I_\mathfrak{p})^{-1}=R_\mathfrak{p}$ for all $\mathfrak{p}\in\mathrm{mSpec}(R)$. If $N$ and $M$ are $R$-modules with $N\subseteq M$ and $N_\mathfrak{p}=M_\mathfrak{p}$ for all $\mathfrak{p}$ maximal, then $N=M$. So, using this, you get $II^{-1}=R$. So $I$ is invertible. Since principal fractional ideals are obviously invertible and every fractional ideal differs (multiplicatively) from an integral ideal by a principal ideal, it follows that all fractional ideals are invertible.
For (2), take an ideal $I$. You have $I_\mathfrak{p}=(\mathfrak{p}R_\mathfrak{p})^{v_\mathfrak{p}(I)}$, where $v_\mathfrak{p}(I)$ is defined by this equation (using that $R_\mathfrak{p}$ is a discrete valuation ring for all maximal $\mathfrak{p}$). Put $J=\prod_\mathfrak{p}\mathfrak{p}^{v_\mathfrak{p}(I)}$, the product over all maximal ideals of $R$ (granting the fact that $v_\mathfrak{p}(I)$ is non-zero for only finitely many maximal ideals). Compare the localizations of these two ideals. You'll see that $I_\mathfrak{p}=J_\mathfrak{p}$ for all $\mathfrak{p}\in\mathrm{mSpec}(R)$. This implies $I=J$.
EDIT: In answer to the questions posed in the comments, let $r\in I$ and consider the ideal $I^\prime$ of $s\in R$ with $sr\in J$. Because $r/1\in I_\mathfrak{p}=J_\mathfrak{p}$, we have $r/1=t/s$ for $t\in J$ and $s\notin\mathfrak{p}$. So $sr=t\in J$, and thus $s\in I^\prime$. It follows that $I^\prime$ is not contained in any maximal ideal of $R$, so it must be all of $R$. Thus $1\in I^\prime$, so $r=1r\in J$, and thus $I\subseteq J$. By symmetry, $J\subseteq I$ as well. The same argument works for general $R$-modules. This is a standard fact about localizations. For the other question, in the argument I gave, I was assuming $I$ to be an integral ideal throughout, so I had to say something about general fractional ideals at the end. However, the argument applies without change for an arbitrary fractional ideal $I$. 
