Let $a$ and $n$ be integers such that $n >0$ and $gcd(a,n)=1$. Then $a^{\phi(n)}\equiv 1$ (mod $n$). (with $\phi(n)$ being the Euler function)
Proof:
Since $|U(n)|=\phi(n)$ and $a\in U(n)$ because $gcd(a,n)=1$, then $a^{\phi(n)}=a^{|U(n)|}=1$ for all $a\in U(n)$. Then $n|(a^{\phi(n)}-1)$. Then $a^{\phi(n)}\equiv 1$ (mod $n$).
This was the proof given in class, and we did not discuss any Euler quotient. So how do I deduce that $n|(a^{\phi(n)}-1)$? I cannot find the connection.
That proof seems straight forward to me.
Let $U(n)$ be the set of units modulo $n$ that is $U(n)=\{k \in Z_{n}| \gcd(k,n) = 1\}$.
$|U(n)| = \phi(n)$, of course.
And under multiplication $U(n)$ is a group.
Pf: $1 \in U(n)$ and $1*k = k$. If $k \in U(n)$ then by Bezout, there are $p, q$ so that $pk + mn = 1$ and thus $pk \equiv 1 \mod n$ and as an equivalency class $p$ is the inverse of $k$. And $p$ must be relatively prime to $n$ or else $pk + mn$ could not be $1$. So every element of $U(n)$ has an inverse. QED.
Using the notation of $[m]$ to be the equivalence class of the integer $m$ we get: $|U(n)| = \phi(n)$. Then for any $[a] \in U(n)$, by Legrange's Theorem, we have $[a]^{|U(n)|} = [a]^{\phi(n)}=[a^{\phi(n)}]=[1]$ under the group operation.
But the group operation is nothing more than multiplication of equivalency classes. So $a^{\phi(n)} \equiv 1 \mod n$. and that's that.
The proof took an extra step that for $[a], [b] \in U(n)$ to say that $[a] = [b]$ means that $n| (b- a)$. I don't see that that step makes things any easier of clearer. In fact I think it muddies things.