Using Wilson's theorem, show that if $p$ is prime of the form $p=4n+1$ and if $y=(\frac {p-1}2)!$, then $y^2\equiv -1\mod p$.
My attempt: By Wilson, $(4n+1-1)!\equiv (4n+1-1) \mod p$,$(4n)!\equiv4n\mod p$. The statement we want to show is equivalent to $((2n)!)^2\equiv 4n\mod p$, which is transformed into $((2n)!)^2\equiv (4n)!\mod p$
I guess you should simply note that the non-zero classes modulo $p$ can be written as $$ 1, 2, \dots, \frac{p-1}{2}, -\frac{p-1}{2}, \dots, -2, -1.\tag{classes} $$ The point in taking $p \equiv 1 \pmod{4}$ being that there is an even number of minus signs in (classes).