Solution (source code)

= Solution
{c}

Let $D$ be a <Dedekind domain>. The zero <ideal> is generated by $0$, and $D$ is generated by $1$, so consider a nonzero proper <ideal> $I$. Choose $0\ne a\in I$. We use these consequences of the <unique factorization of ideals in a Dedekind domain>: every nonzero <ideal> has finitely many nonzero <prime-ideal valuations in a Dedekind domain>; containment reverses the valuations as in part (b); and
$$
v_P(J+K)=\min\{v_P(J),v_P(K)\}.
$$
The last formula follows from the containment rule: $J+K$ is the smallest <ideal> containing both $J$ and $K$, and the product with the indicated minimum exponents is exactly that <ideal>.

Let $T$ be the finite set of <prime ideals> dividing $(a)$. For each $P\in T$, set $r_P=v_P(I)$. Since $(a)\subseteq I$, we have $r_P\leq v_P((a))$. The containment rule also gives $I\not\subseteq P^{r_P+1}$, so choose
$$
b_P\in I\setminus P^{r_P+1}.
$$
Distinct nonzero <prime ideals> of $D$ are distinct <maximal ideals> and hence <comaximal ideals>; their positive powers are also comaximal. Indeed, if $u+v=1$ with $u\in P$, $v\in Q$, for positive integers $m,n$ expanding $(u+v)^{m+n-1}$ shows $1\in P^m+Q^n$, since each term contains either at least $m$ factors of $u$ or at least $n$ factors of $v$. We use the <Chinese remainder theorem> in its ideal form: for pairwise comaximal <ideals> $J_1,\ldots,J_s$, the map $D\to\prod_jD/J_j$ is surjective. Apply it to the powers $P^{r_P+1}$ to choose $e_P\in D$ with
$$
e_P\equiv1\pmod{P^{r_P+1}},\qquad
e_P\equiv0\pmod{Q^{r_Q+1}}\quad(Q\in T,\ Q\ne P).
$$
Then $b=\sum_{P\in T}e_Pb_P$ belongs to $I$ and satisfies $b\equiv b_P\pmod{P^{r_P+1}}$ for every $P\in T$. Thus $b\notin P^{r_P+1}$, whereas $b\in I\subseteq P^{r_P}$, proving $v_P((b))=r_P$.

For $P\in T$, therefore,
$$
v_P((a,b))=\min\{v_P((a)),v_P((b))\}=r_P.
$$
For $P\notin T$, $v_P((a))=0$, and $(a)\subseteq I$ forces $v_P(I)=0$ as well. Hence $(a,b)$ and $I$ have the same valuation at every nonzero <prime ideal>. Uniqueness of their factorizations gives
$$
\boxed{I=(a,b).}
$$
This proves <two generators for an ideal in a Dedekind domain>; in fact the first nonzero generator $a\in I$ can be chosen in advance.