Fermat's Little Theorem
- mcs.utm.utoronto.ca/~tholden/SET.pdf
- If
is prime and then - L2
- Coprime
- Then that implies that
- Linearity of mod means
- L3
- See that
and have the same Cardinality.
- See that
- L4
- If we do
- Then we can factor out
and get the factorial of
- If we do
- Example to prove line 1:
- Try this for some
- If we multiply these by
(or ) we get the same numbers, but maybe in a different order
- Consider
not prime - Then one of the elements won't have a multiplicative inverse
- We could get two of the same elements?
- When you are not prime, you don't get back the same numbers
- See that
works but not any other. - This is because
, they're coprime. - If
is prime, then it's coprime to basically everything. If we say , then it's coprime to everything.
- Try this for some
- Line 2:
- This is the proof for the claim in line 1.
- Indeed the statement
does the trick to prove 'no two elements from lie in the same equivalence class ' must've been the same number - Same like an injectivity proof
- This is an injective function basically.
- Define
- Where
- This is an injective map
- Because they're the same cardinality, it's injective
it's bijective.
- Prove
if - Since
is prime, the only two divisors are and - Then either
or - For the sake of contradiction suppose it's
- This means
is a multiple of - So then
which is a contradiction of our assumption
- You can cancel out the
s if they're coprime. - Proving that
- By assumption
- So
- If
and are coprime, then must divide because - So
is a multiple of - So then
which prove
- By assumption
- Line 3:
has elements, has elements - Then
- We can use the fact that
is injective, same Cardinality, so it's bijective, so same cardinality. - So multiplying non-zero elements together will give the same result.
- Line 4:
- Multiply
on the left side - Multiply
on the right side - Example:
- When
- Multiply the non-zero
- When
- Multiply
- Line 5:
- To divide by
, the - For the sake of contradiction, suppose
- Then
- Since
divides the product, it must divide one of those numbers. - So
for some - This is a contradiction because
is prime and everything in is less than
- Then