Theorem. The prime number $p$ is prime in $\mathbb{Q}(\sqrt{d})$ iff $d$ is not a quadratic residue modulo p.
Since this theorem has two directions, we have to prove two things. One way to do that is to assume that $d$ is quadratic residue, and to get the contradiction. My question is about the second part, about assuming that $p$ is not prime. I found the proof where it is said the following:
Assume that $p$ is not prime. Then, $p$ is not irreducible, so, there are $u,v \in \mathbb{Q}(\sqrt{d})$ such that $p=uv$ and $u,v$ are not unit elements. I won't continue writing this proof if it's not necessary, I have only one question: how come we concluded: $p$ is not prime $\Rightarrow$ $p$ is not irreducible? I know about the theorem that says that any prime in $\mathbb{Q}(\sqrt{d})$ is irreducible, but not vice versa. Can vice versa work in $\mathbb{Q}(\sqrt{d})$? Thank you.