I am familiar with the following Euler Theorem: (Note: In the following ø(n) is the Euler function)
version i)
If gcd(x,n)=1, then $x^{ø(n)} = 1$ (mod n).
Version ii) However, I have seen the following version described as Eulers theorem too:
if $a = b$ (mod ø(n)), then $x^a = x^b$ (mod n) if gcd(x,n)=1.
My question is then, if they are equivalent, how can i show that version i) implies version ii) ? Thanks,