Is my proof of Euler's theorem correct ?
Euler's Theorem. For any positive integers $a$ and $m$, if $\gcd(a,m)=1$, then $$a^{\phi(m)}\equiv 1\pmod{m}.$$ Proof. Let $r_1, r_2, r_3, \dots, r_{\phi(m)}$ be the integers less than or equal to $m$ that are relatively prime to it. The integers $$(1)\qquad ar_1, ar_2, ar_3, \dots, ar_{\phi(m)}$$ are congruent to $$(2)\qquad r_1, r_2, r_3, \dots, r_{\phi(m)}$$ in some order. The reason behind this is that if, say for some $1\leq k\leq \phi(m)$, $ar_k$ is congruent to some least residue $j$ modulo $m$ where $\gcd(m,j)>1$, then that would imply either $\gcd(m, r_k)>1$ or $\gcd(m, a)> 1$, both of which contradict our initial assumption. To show that (1) are congruent to all the integers in (2), suppose that $$ar_j\equiv ar_i\pmod{m}$$ Since $\gcd(a,m)=1$ and $r_j$ and $r_k$ are least residues, it follows that $$r_j\equiv r_i\pmod{m}$$ $$r_j=r_m.$$ Multiplying all the integers in (1), we obtain $$a^{\phi(m)}r_1r_2r_3\dots r_{\phi(m)}\equiv r_1r_2r_3\dots r_{\phi(m)}\pmod{m}.$$ Since $\gcd(r_1r_2\dots r_{\phi(m)}, m)=1$, we can cancel the common factor to get $$a^{\phi(m)}=1\pmod{m}.\quad\square$$