# Is being principal a local property?

Let $R$ be a number ring and a Dedekind domain. We have the following result:

For every ideal $I\subset R$ $$I = \bigcap_P I_P$$ where $I_P$ denotes the localization of $I$ at $P$ and the intersection is taken over all the prime ideals $P$ of $R$.

My question is: Can we deduce from this that if $I_P$ is principal in $R_P$ for every prime ideal $P$ of $R$, then $I$ itself is principal? Or stated differently, is being principal a local property?

-

Yes I forgot to write Dedekind domain. I need to prove that a Dedekind domain which is also a UFD is a PID... it is driving me crazy! By the way of course is $R$ is a PID then $I$ is principal! ;-) –  Abramo Oct 13 '12 at 16:51