I have a question about the application of CRT in a proof of following thread: Dedekind domain with a finite number of prime ideals is principal
The claim is that a Dedekind domain with a finite number of prime ideals is already principal:
In his answer @pki uses following argument:
Let $R$ be a Dedekind ring and assume that the prime ideals are $\mathfrak{p}_1,\ldots,\mathfrak{p}_n$. Then $\mathfrak{p}_1^2,\mathfrak{p}_2,\ldots,\mathfrak{p}_n$ are coprime. Pick an element $\pi \in \mathfrak{p}_1\setminus \mathfrak{p}_1^2$ and by CRT you can find an $x\in R$ s.t.
$$ x\equiv \pi\,(\textrm{mod } \mathfrak{p}_1^2),\;\; x\equiv 1\,(\textrm{mod } \mathfrak{p}_k),\; k=2,\ldots,n $$
Factoring we must have $(x)=\mathfrak{p}_1$ (???)
Indeed the CRT provides a $x$ such that $ x\equiv \pi\,(\textrm{mod } \mathfrak{p}_1^2),\;\; x\equiv 1\,(\textrm{mod } \mathfrak{p}_k),\; k=2,\ldots,n $ holds.
But why we get $(x)=\mathfrak{p}_1$?
Factoring just implies $(\bar{x}) = \mathfrak{p}_1/ \mathfrak{p}_1^2$. How to deduce $(x)=\mathfrak{p}_1$?
First $\newcommand{\pp}{\mathfrak{p}}\newcommand{\mm}{\mathfrak{m}}(x)=\pp_1^{e_1}\cdots \pp_n^{e_n}$ for some $e_i\in\newcommand{\NN}{\mathbb{N}}\NN$. If $e_i \ge 1$ for $i\ge 2$, then $x\in(x)\subset \pp_i$, however, $x\equiv 1 \pmod{\pp_i}$, so this is impossible. Hence $(x)=\pp_1^{e_1}$, for some $e_1\ge 1$ (since $(x)\subset \pp_1$ by assumption, so $(x)\ne (1)$). However, $x\not\in \pp_1^2$ either, so $x\in(x)=\pp_1^{e_1}$ forces $e_1=1$. Thus $(x)=\pp_1$ as desired.