Help needed in understanding proof: Every odd prime $p$ has exactly $(p-1)/2$ quadratic residues and $(p-1)/2$ quadratic nonresidues.
We assume there exist $k$ incongruent quadratic residues and each yield two solutions of the equation $x^2 \equiv a (\mod p)$. Also each of these solutions are incongruent, right ? So we have $2k$ solutions to quadratic congruences.
Then there are $p-1$ squares of the least residues, $1$ through $p-1$. But these need not be incongruent (consider $p = 7$ and $1^2, 6^2$). Then $2k = p-1$, why ?
Could someone explain to me in details what the reasoning is ?
