Prime splitting in imaginary squarefree quadratic field This appeared on my number theory final. I couldn't figure it out. 
The setup is: Let $K = \mathbb{Q}[\sqrt{-d}]$ be a quadratic number field, with $d = p_1...p_r$ a product of $r$ distinct odd primes. Furthermore, assume that $d \neq 3$.
I need help with how to approach the following:


*

*Let $P_i \in \mathcal{O}_K$ be a prime above $p_i$. Show that if $P_i$ is principal, then $K$ contains a root of $x^2 + p_i$.

*Suppose that $P_i$ are primes over $p_i$. Show that their classes in the class
group generate a subgroup isomorphic to $(\mathbb{Z}/2\mathbb{Z})^{r-1}$.


I know that all the ramified primes ideals have order 1 or 2 in the class group. I also know that it must be ramified to have order 2.
Any suggestions are greatly appreciated.
 A: If $ r =1 $ then both statements are trivially true, so assume $ r \ge 2 $. 
Each $ p_i $ is ramified in $ K $. If $ P_i = ( \gamma ) $ is principal, then from $ P_i^2 = p_i \mathcal{O}_K $ we get that $ \gamma^2 $ and $ p_i $ differ by a unit in $ \mathcal{O}_K $. The only imaginary quadratic fields with units other than $ \pm 1 $ are $ \mathbb{Q}(i) $ and $ \mathbb{Q}( \omega) $, which is not the case here. So $ \gamma^2 = p_i $ or $ \gamma^2 = -p_i $. The first case is not possible as $ \sqrt{p_i} \in K \implies K = \mathbb{Q} (\sqrt{p_i}) $, a contradiction. So we're in the second case, proving (1). (Actually, the second case implies that $ K = \mathbb{Q} (\sqrt{-p_i}) $, a contradiction again, showing that $ P_i $ can never be principal if $ r \ge 2 $.)
Define the homomorphism $ G = (\mathbb{Z}/2 \mathbb{Z})^r \rightarrow C_K $ by sending the $ 1 $ in $ i $-th place to the class of $ P_i $. The kernel of this map is precisely the order $ 2 $ subgroup generated by $ a = (1,1, \ldots, 1) $. This is really the same argument as before: If a product of primes $ J = P_{i_1} \cdots P_{i_k} = (\beta) $ is principal, with $ k < r $, then $ J^2 = (p_{i_1} \cdots p_{i_k}) \mathcal{O}_K $, i.e. $ \beta^2 = \pm p_{i_1} \cdots p_{i_k} $ which is not possible. $ I = P_1 \cdots P_r $ is indeed principal as $$ I^2 = (p_1 \cdots p_r) \mathcal{O}_K = d \mathcal{O}_K = ((\sqrt{-d}) \mathcal{O}_K)^2 $$ Therefore, the fractional ideal $ J = I^{-1} ((\sqrt{-d}) \mathcal{O}_K) $ satisfies $ J^2 = \mathcal{O}_K $ and in a Dedekind domain, this is only possible if $ J = \mathcal{O}_K $ (To see this, recall that $ J^{-1} $ is given explicitly by $ \{ x \in K | xJ \subset \mathcal{O}_K \} $). So $ I = (\sqrt{-d}) \mathcal{O}_K $ is principal and $ C_K $ contains a subgroup isomorphic to $ G/ \langle a \rangle $. This last group is isomorphic to $ (\mathbb{Z}/2 \mathbb{Z})^{r-1} $, proving (2).
