If $a^x \equiv a^y \pmod{m}$, does this imply $x \equiv y \pmod{\varphi(m)}$? I know that $x \equiv y \pmod{\varphi(m)} \implies a^x \equiv a^y \pmod{m}$, so I was wondering if the converse also holds. If it does not hold in general, then are there any conditions where it does (such as assuming $(a, m)=1$)?
*Here $\varphi$ denotes the Euler totient function.
Edit: I see that the answer is no. However, the reason I was wondering about this is that I was watching this (https://youtu.be/f1oO9dEkqso?t=1386) lecture and don't know why else would Prof. Borcherds claim that $a_i \equiv 1 \pmod{p_{i}^{k_i}}$ is solvable if $\varphi(p_{i}^{k_i}) \mid n$ if the property in question is not true. In other words, how else is what's written justified?
 A: No it does not. A trivial example is $a = 1$. Slightly non-trivial examples can be found whenever $\operatorname{ord}_m(a) \ne \varphi(m)$. (But it does hold when $\operatorname{ord}_m(a) = \varphi(m)$).
For example, $\operatorname{ord}_7 (2) = 3 \ne \varphi(7)$. Hence $2^1 \equiv 2^4 \pmod 7$ (and $\gcd(2,7) = 1$) but $1 \ne 4 \pmod 6$.
EDIT: In the context of the YouTube lecture, we are trying to find a smaller $n \le \varphi(m)$ such that $a^n \equiv 1 \pmod m$ holds whenever $\gcd(a,m)=1$ (hinting at the Carmichael Function perhaps?). To do this the prime factorization of $m$ was considered, and the relation $a^n \equiv 1 \pmod {p^k}$ holds whenever $\varphi(p^k) \mid n$ holds. The converse was never asserted. (Although if one considers all $a$, there would be elements of multiplicative order $\varphi (p^k)$, called the primitive roots, but it is not needed here.)
A: I've had a look at the video. In it, Prof. Borcherds never uses the converse you are mentioning, and is instead using just the statement in the "ordinary" direction. The essence is: if you break $m$ into primes, $m=p_1^{k_1}p_2^{k_2}\cdots$, and then, if you set:
$$n=\text{lcm}(\varphi(p_1^{k_1}),\varphi(p_2^{k_2}),\ldots)$$
then $n\le \varphi(p_1^{k_1})\cdot\varphi(p_2^{k_2})\cdots=\varphi(m)$ (lcm is at most as big as the product!), and most often this inequality is strict, yet each $\phi(p_i^{k_i})\mid n$, so, as per Euler's theorem, for each $a$ coprime with $m$ we have:
$$a^n\equiv 1\pmod {p_i^{k_1}}$$
and thus, for each $a$, we have $a^n\equiv 1\pmod m$.
A: take $m=8$ and $a=2$, so $\phi(m)=4$ and $2^{3}\equiv2^{4}\equiv0(mod8)$ yet $3\not \equiv4(mod4)$
