Obstruction to norm-minus-one units from a prime congruent to three modulo four (source code)

= Obstruction to norm-minus-one units from a prime congruent to three modulo four

If a squarefree positive $d$ has a prime divisor $p\equiv3\pmod4$, a <unit> of norm $-1$ in $\mathbb Q(\sqrt d)$ would give $a^2-db^2=-4$ for integers $a,b$. Modulo $p$ this makes $-1$ a <quadratic residue>, which is impossible. The obstruction is sufficient, not a full criterion for negative-norm units.