Wilson's theorem. #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file contains a proof of Wilson's theorem.
The heavy lifting is mostly done by the previous wilsons_lemma
,
but here we also prove the other logical direction.
This could be generalized to similar results about finite abelian groups.
References #
TODO #
- Give
wilsons_lemma
a descriptive name.
@[simp]
theorem
zmod.prod_Ico_one_prime
(p : ℕ)
[fact (nat.prime p)] :
(finset.Ico 1 p).prod (λ (x : ℕ), ↑x) = -1