# quick question

Is there a theorem that states that if gcd(a,m)=1 and $a^x \equiv a^y (mod m)$, then $a^{x-y} \equiv 1(mod m)$?
I don’t know if there is a name for this theorem, but the result can be quite easily established by considering the multiplicative group of the units of the ring $\mathbb Z_m.$