I started learning number theory, specifically modular arithmetic, and need help to understand the last equivalence in the following example :
$$561 \mid 128^{561} - 128 \iff 128^{561} \equiv128 \pmod{561} \iff (2^7)^{561} = 2^{3927} \equiv 2^7 \pmod{561}$$ $$\iff 2^{3920} \equiv 1 \pmod{561}.$$
As I said, I don't understand the very last equivalence, specifically why are we able to "divide" by $2^7$ (and why division is allowed if we are truly dividing)?