I came across several different proofs of Fermat's little theorem and in all of them what I ask to prove in this question is either used as an axiom(just a statement without any proofs) or just proven not very correctly(just an example of how this works with different numbers).
The main proof that I rely on is from an 8th grade textbook(which I currently learn algebra with), so I'm not sure, maybe it's not proven deliberately to free the proof of the Fermat's theorem from any redundant complications for 8th graders, but I can't understand the whole proof without understanding how to prove that when $ac ≡ bc (mod \space m)$, and $GCD(c, m) = 1$, then $a ≡ b (mod \space m)$.
I tried to prove it myself, but not sure if it works:
- $ac ≡ bc (mod \space m) \implies c(a - b) ≡ 0(mod \space m)$
- Since $GCD(c, m) = 1$ $\implies$ $c$ doesn't help to get a number that would divide $m$ $\implies$ $c(a - b) ≡ 0(mod \space m) \implies a ≡ b(mod \space m)$. And it's never true if $c$ and $m$ are not coprime.
Is this proof sufficient? If not, how to do it correctly?