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?