D=2: Proof 1 (proof of prime QR sufficiency)

This proof builds on that if $$p=8n\pm1$$ is a prime number, then there must be an integer m such that $$m^2-2$$ is divisible by p (described already); it also uses the fact that $$\Z[\sqrt{2}]$$ is a unique factorization domain (because they are a Euclidean domain). Since p ∈ Z does not divide either of the $$\Z[\sqrt{2}]$$ elements $$m + \sqrt{2}$$ and $$m - \sqrt{2}$$ (as it does not divide their parts of $$\sqrt{2}$$), but it does divide their product $$m^2 -2$$, it follows that $$p$$ cannot be a prime element in $$\Z[\sqrt{2}]$$. We must therefore have a nontrivial factorization of p in $$\Z[\sqrt{2}]$$, which in view of the norm can have only two factors (since the norm is multiplicative, and $$p^2 = N(p)$$, there can only be up to two factors of p), so it must be of the form $$p = (x+y\sqrt{2})(x-y\sqrt{2})$$ for some integers $$x$$ and $$y$$. This immediately yields that $$p = x^2 -2y^2$$.