Is this valid?
If $a^n \equiv b^n \pmod n \Rightarrow a \equiv b \pmod n $
No,
$$a^n \equiv b^n \pmod n \Rightarrow a \equiv b \pmod n$$ is not valid.
As Tobias writes in the comments, take the counterexample $$n = 4, a = 1, b = 3$$
$$1^4 \equiv 3^4 \pmod 4 \iff 1\equiv 81\pmod 4 \not\Rightarrow 1\equiv 3 \pmod 4$$
If you add the additional restriction on $n$ that $n$ be prime, then the implication is true.
Copyright © 2021 JogjaFile Inc.
No,
As Tobias writes in the comments, take the counterexample $$n = 4, a = 1, b = 3$$
$$1^4 \equiv 3^4 \pmod 4 \iff 1\equiv 81\pmod 4 \not\Rightarrow 1\equiv 3 \pmod 4$$
If you add the additional restriction on $n$ that $n$ be prime, then the implication is true.