Simplifications
Some of the proofs of Fermat's little theorem given below depend on two simplifications.
The first is that we may assume that a is in the range 0 ≤ a ≤ p − 1. This is a simple consequence of the laws of modular arithmetic; we are simply saying that we may first reduce a modulo p.
Secondly, it suffices to prove that
for a in the range 1 ≤ a ≤ p − 1. Indeed, if (X) holds for such a, multiplying both sides by a yields the original form of the theorem,
On the other hand, if a equals zero, the theorem holds trivially.
Read more about this topic: Proofs Of Fermat's Little Theorem