# Semigroup structure of principal ideals (under products) in a Dedekind domain

Specifically, let $$R$$ be our Dedakind domain, I am trying to show that the structure of the principal ideals is that of a free abelian semigroup (isomorphic to $$\mathbb{N}\times\mathbb{N}\times\cdots$$) $$\iff$$ $$R$$ is a PID.

Now I know in this case PID $$\iff$$ UFD. So I suppose that having ideal $$(a) = (x_1)(x_2) = (y_1)(y_2)$$ where $$x_i$$ and $$y_i$$ are irreducible and $$x_i\neq y_j$$ must come into play. But I can't really see how to make this relevant as this reasoning would also apply to the group of fractional principal ideals, which must be free abelian since it's a subgroup of a the free abelian group of ideals (freeness coming from unique factorization into primes). I can't even see in the abstract how a sub-semigroup (subset closed under the associative operation) of a free abelian semi-group could not also be free abelian.

Any guidance would be much appreciated. By the way I am trying to work through Number Fields by Marcus and this is part of problem 31 from chapter 3, just in case that helps with answering. Thanks.

After posting I think I understand. Funny how that works. Anyway first we must be more precise about what is a free abelian semigroup: including $$0\in\mathbb{N}$$ a free abelian semigroup is something isomorphic to $$\mathbb{N}\times\mathbb{N}\times\cdots\backslash \{(0,0,0,\cdots)\}$$.
Anyway, going back to the non-unique factorization, let $$a=x_1x_2=y_1y_2$$ be two different factorizations into irreducible elements so we have $$(a)=(x_1)(x_2)=(y_1)(y_2)$$. Since the $$x_i$$ (and $$y_i$$) are irreducible, than as elements of our semigroup they cannot be written as a product of other elements. So if we have a free abelian semigroup on our hands, the elements $$(x_1)$$, $$(x_2)$$, $$(y_1)$$ and $$(y_2)$$ must be "basis" elements. That is, they must map to elements like $$(1,0,0,0,0,\cdots)$$, $$(0,1,0,0,0,\cdots)$$ etc. This is not the case in a free abelian group since things can always be written as the product of other elements (e.g. $$(x_1) = (a)(x_2)^{-1}$$ in the group of principal fractional ideals) which is what was tripping me up before I think.
Anyway, with $$(x_1)$$, $$(x_2)$$, $$(y_1)$$ and $$(y_2)$$ as "basis" elements we have a contradiction since $$(a)$$ has multiple descriptions in terms of basis elements which never could happen in a free abelian semi-group: we have the relation $$(x_1)(x_2)=(y_1)(y_2)$$.