Documentation

Mathlib.Data.ZMod.Factorial

Facts about factorials in ZMod #

We collect facts about factorials in context of modular arithmetic.

Main statements #

See also #

For the prime case and involving factorial rather than descFactorial, see Wilson's theorem:

theorem ZMod.cast_descFactorial {n : } {p : } (h : n p) :
((p - 1).descFactorial n) = (-1) ^ n * n.factorial