So I constructed this proof that for any integers $a, c\text{ and }n$, with $n > 1$, if $a ≡ c \pmod n$ then for any integer $m, a^m ≡ c^m \pmod n$.
Proof:
$a ≡ c \pmod n$ implies that $a \bmod n = c \bmod n$
$a^m \bmod n = ((a \bmod n)^m) \bmod n.$
But $a \bmod n = c \bmod n$ (from step 1), and, thus, by substitution: $ ((a \bmod n)^m) \bmod n = ((c \bmod n)^m) \bmod n. $
- Finally, $((c \bmod n)^m) \bmod n = c^m \bmod n$, and, thus, $a^m \bmod n = c^m \bmod n$, which implies that $a^m ≡ c^m \pmod n$.
Is this proof valid?