I want to prove the first implication of Wilson's theorem, namely:
For a prime number $p \geq 5$: $$(p-1)! \equiv -1 \mod p$$
I already proved:
- $\forall 1 \leq n \leq p-1: \exists1 \leq k \leq p-1: n\cdot k \equiv1 \mod p$
- $\forall k \in \mathbb Z: (k^2 \equiv 1 \mod p \implies k \equiv \pm1 \mod p)$
How can I proceed from here?
Maybe write $(p-1)!$ as a product and show that two terms "cancel each other mod $p$" (using 1.). And show that there are a odd number of terms of the form described in 2. The product would then be congruent to $-1 \mod p$, but I don't really know how to fill the steps.