The question is as follows:

Define a relation ~ onZ_{p}where p is an odd prime, as follows: [a]_{p}~ [b]_{p}if 2^{i}a=b mod p for some i inN. show that ~ is an equivalence relation onZ_{p}

I know that to show an equivalence relation you have to show the reflexive, symmetric and transitive properties hold.

reflexive: [a]_{p}~ [a]_{p}2^{i}a=a mod p this is true since any multiple of a consequence class is equal to itself

symmetric: [a]_{p}~ [b]_{p}, [b]_{p}~ [a]_{p}I know that I need to show that 2^{i}a=b mod p and 2^{i}b=a mod p but I am unsure if the logic is sound.

2^{i}a=b mod p then 2^{i}a = pq + b for some integer q

2^{i}a - b = pq so p|(2^{i}a - b) however p is an odd prime so it can not divide 2^{i}so p|(a - b) and p|(b - a) then p|(2^{i}b - a)

then 2^{i}b - a = pq so 2^{i}b=a mod p

Transitive: [a]_{p}~ [b]_{p}[b]_{p}~ [c]_{p}[a]_{p}~ [c]_{p}2^{i}a=b mod p and 2^{i}b=c mod p then 2^{i}a=c mod p

2^{i}a = pq + b and 2^{i}b = pr + c for integers q, r

then 2^{i}a + 2^{i}b = pq + pr + c+ b

2^{i}(a + b) - (c + b) = p(q + r)

so p divides the LHS but as in the above argument p does not divide 2^{i}so p|[(a + b) - (c + b)]

so p|(a - c) then p|(2^{i}a - c) so 2^{i}a - c = p(q + r) so 2^{i}a=c mod p

have I done enough to prove the relation and is my arguments logically sound?