The Galois group acts on prime factors of an ideal of an integer ring as a permutation? Let $K/\mathbb{Q}$ be a number field extension with ring of integers $\mathcal{O}_K$. Let $Gal(K/\mathbb{Q})$ be the Galois group of this extension, and  for a rational prime $p\in\mathbb{Z}$ consider the ideal $p \mathcal{O}_K$. It can be shown that $p\mathcal{O}_K$ factorizes as a product of prime ideals in $\mathcal{O}_K$, ie we have $$p\mathcal{O}_K = \prod_{i=1}^g \mathfrak{p}_i^{e_{\mathfrak{p}_i}}$$
This factorization is unique up to permutation of terms. I have a couple of questions regarding the action of $Gal(K/\mathbb{Q})$ on the set of prime ideals $S= \{\mathfrak{p}_i: i =1,...,g\}$:


*

*Why does the Galois group give a group action on this set? 

*Assuming that we have a group action is it true that its elements act as permutations of S? 


For (1), consider a prime $p\in\mathbb{Z}$ and let $\mathfrak{p}$ be a prime over p in $\mathcal{O}_K$. Take any $\sigma \in Gal(K/\mathbb{Q})$, then $\sigma(\mathfrak{p})\cap\mathbb{Z} \subset \mathbb{Z}$, and so $\sigma(\mathfrak{p}) \cap \mathbb{Z} = \mathfrak{p} \cap \mathbb{Z}$ as $\sigma$ fixes $\mathbb{Q}$. Hence we see that $\sigma(\mathfrak{p})$ is a prime ideal in $\mathcal{O}_K$ over $p\in\mathbb{Z}$. How to proceed from here?
For (2) it would suffice to show that any $\sigma \in Gal(K/\mathbb{Q})$ is injective. So suppose that $\mathfrak{p}_i \neq \mathfrak{p}_j$ are two prime ideals of $\mathcal{O}_K$, such that $\sigma(\mathfrak{p}_i) = \sigma(\mathfrak{p}_j)$. Then as $\sigma(\mathfrak{p}_i)$ is an ideal in $\mathcal{O}_K$, and so it is a fractional ideal, an inverse ideal $\sigma(\mathfrak{p}_i)^{-1}$ exists. Multiplying the above equation by this inverse gives $\mathcal{O}_K = \sigma(\mathfrak{p}_i) \sigma(\mathfrak{p}_i)^{-1} = \sigma(\mathfrak{p}_j)\sigma(\mathfrak{p}_i)^{-1}$. Now as $\sigma$ commutes with products, it also commutes with inverses, and so $\sigma(\mathfrak{p}_i)^{-1} = \sigma(\mathfrak{p}_i^{-1})$. Hence we find $\mathcal{O}_K = \sigma(\mathfrak{p}_j \mathfrak{p}_i^{-1})$. Now, I am a little confused if I can conclude from here that $\mathfrak{p}_j\mathfrak{p}_i^{-1} = \mathcal{O}_K$?  
Are my above two attempts correct? How can I finish them?
 A: For part $1$: you have a group action given by $\cdot : \operatorname{Gal}(K/\Bbb Q) \times S \to S : \sigma \cdot \mathfrak{p}_i = \sigma(\mathfrak{p}_i)$.
Clearly $\operatorname{id}\cdot \mathfrak{p}_i = \mathfrak{p}_i$ and given $\sigma_1, \sigma_2 \in \operatorname{Gal}(K/\Bbb Q)$ you have $(\sigma_1 \circ \sigma_2) \cdot \mathfrak{p}_i = \sigma_1(\sigma_2(\mathfrak{p}_i))$. Note that $\sigma_2(\mathfrak{p}_i)\in S$ because if $ab \in \sigma_2(\mathfrak{p}_i)$ then $\sigma_2^{-1}(ab) \in \mathfrak{p}_i$. Since $\sigma_2$ is a homomorphism we have $\sigma_2^{-1}(a)\sigma_2^{-1}(b) \in \mathfrak{p}_i$, and since this is a prime ideal we have $\sigma_2^{-1}(a) \in \mathfrak{p}_i$ or $\sigma_2^{-1}(b) \in \mathfrak{p}_i$, and hence $a \in \sigma_2(\mathfrak{p}_i)$ or $b \in \sigma_2(\mathfrak{p}_i)$.
For part 2: we show that this action is transitive on the primes of $K$ lying over $p$ (i.e. that the action of $\operatorname{Gal}(K/\Bbb Q)$ just moves the primes around).
Suppose that $\mathfrak{p}_i$ and $\mathfrak{p}_j$ are not conjugate by an element of $\operatorname{Gal}(K/\Bbb Q)$ so that for all $\sigma$, $\sigma(\mathfrak{p}_i) \neq \mathfrak{p}_j$. By the Chinese remainder theorem we can find a $\beta \in \mathfrak{p}_i$ such that $\beta \notin \mathfrak{p}_j$ for any $j \neq i$. Let $b = N\beta = \prod_{\sigma \in \operatorname{Gal}(K/\Bbb Q)} \sigma(\beta)$. Then $b \in \Bbb Z \cap \mathfrak{p}_i = p\mathcal{O}_K$. Now, for all $\sigma \in \operatorname{Gal}(K/\Bbb Q)$ we have $\beta \notin \sigma^{-1}(\mathfrak{p}_j)$ and so $\sigma(\beta) \notin \mathfrak{p}_j$. But we showed that $b \in p\mathcal{O}_K \subset \mathfrak{p}_j$ (since $\mathfrak{p}_j \mid p$) and since $b$ is a product of the $\sigma(\beta)$, this contradicts the primality of $\mathfrak{p}_j$, so it must be that there is some $\sigma \in \operatorname{Gal}(K/\Bbb Q)$ such that $\sigma(\mathfrak{p}_i) = \mathfrak{p}_j$.
