Assume not every ideal $A$ has a prime factorisation. Let $A$ be such an ideal with $N(A)$ is minimal. There exists a maximal (hence prime) ideal $P_1$ containing $A$, and so $P_1 ∣ A$; hence there is an ideal $C$ with $A=P_1 C$.

If $A=C$ then $P_1 C=C=C 𝒪_K$ and $P_1=𝒪_K$, by cancellation. This is clearly impossible. Hence $A ⊂ C$, and by the definition of the norm we have $N(A)=N(C)[C: A]>N(C)$. Hence, by our minimality assumption for $A$, one can factor $C$ into prime ideals as $C=P_2 … P_r$ (or $C=𝒪_K$ and $A=P_1$). Therefore $A=P_1 … P_2$, a contradiction. Hence every proper non-zero ideal has a prime factorisation. Suppose \[ A=P_1 P_2 … P_r=Q_1 Q_2 … Q_s . \] Now $P_1 ∣ Q_1 … Q_s$. Let $k$ be minimal such that $P_1 ∣ Q_1 … Q_k$. If $k=1$ then $P_1 ∣ Q_1$. If $k>1$ then $P_1 ∣(Q_1 … Q_{k-1}) Q_k$, but $P_1$ does not divide $Q_1 … Q_{k-1}$. Since $P_1$ is prime, we must have $P_1 ∣ Q_k$. We therefore have $P_1 ∣ Q_k$ in either case. Since $Q_k$ is maximal this implies that $P_1=Q_k$. Without loss of generality we take $k=1$ and then, by the cancellation lemma, we have $P_2 … P_r=Q_2 … Q_s$. We may now repeat the process until every $P_i$ has been shown to equal some $Q_j$.

If $A=C$ then $P_1 C=C=C 𝒪_K$ and $P_1=𝒪_K$, by cancellation. This is clearly impossible. Hence $A ⊂ C$, and by the definition of the norm we have $N(A)=N(C)[C: A]>N(C)$. Hence, by our minimality assumption for $A$, one can factor $C$ into prime ideals as $C=P_2 … P_r$ (or $C=𝒪_K$ and $A=P_1$). Therefore $A=P_1 … P_2$, a contradiction. Hence every proper non-zero ideal has a prime factorisation. Suppose \[ A=P_1 P_2 … P_r=Q_1 Q_2 … Q_s . \] Now $P_1 ∣ Q_1 … Q_s$. Let $k$ be minimal such that $P_1 ∣ Q_1 … Q_k$. If $k=1$ then $P_1 ∣ Q_1$. If $k>1$ then $P_1 ∣(Q_1 … Q_{k-1}) Q_k$, but $P_1$ does not divide $Q_1 … Q_{k-1}$. Since $P_1$ is prime, we must have $P_1 ∣ Q_k$. We therefore have $P_1 ∣ Q_k$ in either case. Since $Q_k$ is maximal this implies that $P_1=Q_k$. Without loss of generality we take $k=1$ and then, by the cancellation lemma, we have $P_2 … P_r=Q_2 … Q_s$. We may now repeat the process until every $P_i$ has been shown to equal some $Q_j$.

- Show that, for any positive integer $n$, every non-trivial proper ideal of $𝒪_K / P^n$ is of the form $P^i / P^n$ for some $i<n$.
- For any $i<n$, show that there exists an element $π ∈ P^i ∖ P^{i+1}$. Show that $P^i=(π)+P^{i+1}$. Show that, for any $r ⩾ 1, P^i=(π)+P^{i+r}$. Hence or otherwise deduce that $P^i / P^n$ is a principal ideal of $𝒪_K / P^n$.
- Let $I$ be any non-zero proper ideal of $𝒪_K$. Show that $𝒪_K / I$ is a principal ideal domain. Deduce that $I$ is generated by at most two elements.

Let $R$ be any integral domain.

If $I$ is an ideal of $R$ then any ideal of $R / I$ is of the form $J / I$, where $J$ is an ideal of $R$ which contains $I$.

(Chinese Remainder Theorem) If $I_1, I_2$ are coprime ideals of $R$ then $R / I_1 I_2$ is isomorphic to $R / I_1 × R / I_2$.

- We know (using the given result about rings) that any ideal of $𝒪_K / P^n$ is of the form $J / P^n$, where $J$ is an ideal of $𝒪_K$ such that $J ⊇ P^n$. It follows that $J ∣ P^n$ (by the theorem "to contain is to divide"), and so by Unique Factorisation of Ideals, $J=P^i$, for some $i ⩽ n$, and indeed $i<n$, since it is a proper ideal.
- Note that $P^i ∣ P^{i+1}$ so that $P^{i+1} ⊆ P^i$ (by the theorem "to contain is to divide"); also, $P^i ≠ P^{i+1}$ (since otherwise, by cancellation, $P=𝒪_K$, contradicting that $P$ is a prime ideal). Hence there exists $π ∈ P^i \backslash P^{i+1}$. Then $P^{i+1} ⊊(π)+P^{i+1} ⊆ P^i$. But there is no ideal strictly between $P^{i+1}$ and $P^i$ (since otherwise any such $I$ would satisfy $P^i|I| P^{i+1}$ which would force $I=P^i$ or $I=P^{i+1}$, since $P$ is a prime ideal). Hence $P^i=(π)+P^{i+1}$. Then \[ P^i=(π)+P^{i+1}=(π)+P P^i=(π)+P\left((π)+P^{i+1}\right) ⊆(π)+P^{i+2}, \] and $(π)+P^{i+2} ⊆ P^i$ (since $(π) ⊆ P^i$ and $P^{i+2} ⊆ P^i$). Hence $P^i=(π)+P^{i+2}$. Continuing inductively, we see that $P^i=(π)+P^{i+r}$, for any $r ⩾ 1$. In particular, $P^i=(π)+P^n$, so that $P^i / P^n=(π+P^n)$ is a principal ideal of $𝒪_K / P^n$.
- By UFI (part (a) of the question), we can write $I=P_1^{n_1} … P_k^{n_k}$, where $P_1, …, P_k$ are distinct prime ideals, so that $P_1^{n_1}, …, P_k^{n_k}$ are coprime ideals. Let $R=𝒪_K / I$ and let $R_i=𝒪_K / P_i^{n_i}$ for each $i$. By the Chinese Remainder Theorem, $R$ is isomorphic to $R_1 × … × R_k$. From (ii), we know that each $R_i$ is a PID. Let $J$ be any ideal of $R_1 × … × R_k$. Define $J_i=π_i(J)$, where $π$ is the $i$ th projection map. Then $J_i$ is an ideal of $R_i$ and so is of the form $(r_i)$ for some $r_i ∈ R_i$. But then $J=J_1 × … × J_k$, which is $(r_1, …, r_k)$, a principal ideal. Hence $R=𝒪_K / I$ is a PID, as required.

Let $I$ be any non-zero proper ideal of $𝒪_K$. Then there must exists a nonzero element $x ∈ I$. Then $I /(x)$ is an ideal of $𝒪_K /(x)$ and so must be a principal ideal of the form $(y+(x))$, for some $y ∈ 𝒪_K$. Hence $I=(x)+(y)=(x, y)$ is generated by at most two elements.