I came across this theorem:
For all integers a,b,c and m>0, if d = GCD(c,m) then a*c ≡ b*c (mod m) iff a ≡ b (mod m/d).
The =>proof states this:
a*c ≡ b*c (mod m) => m|(a-b)*c
=> m/d | (a-b)*c/d
=> m/d | (a-b)
=> a ≡ b (mod m/d)
I don't understand how to go from step 2 to step 3. The proof states that this is possible because m/d and c/d are coprime. To me this means GCD(m/d, c/d) = 1 but how does this cancel out the whole term?
If $\frac{m}{d} | (a-b)\frac{c}{d}$ and $GCD(\frac{m}{d}, \frac{c}{d}) = 1$, then $\frac{m}{d}$ must divide $a-b$, because $\frac{m}{d}$ and $\frac{c}{d}$ have no primes in common.
If you still don't have it clear, express $\frac{m}{d}$ and $\frac{c}{d}$ as a product of primes, and see that they can't have primes in common in their factorization, and therefore $\frac{m}{d}$ must divide $a-b$.