I am trying to prove that if $g.c.d.(a, m) = 1$ then $a^{\phi(m)} \equiv 1 (\textbf{mod }m). $
I have defined the following sets:
Let set $\textbf{A}$ be the set of prime integers $<$ m
Let set $\textbf{B}$ be the set of prime integers $<$ m multiplied by a
I am having trouble proving that set B is a permutation of set A. I have proven that every element in set B is going to be unique (mod m). But how do I guarantee that these integers are going to be equivalent to a number in set A?
My understanding is that if you were proving Fermat's theorem, you have m-1 unique numbers (mod m) and therefore, they have to be congruent to each other. But I do not understand how to prove it when there are only $\phi(m)$ numbers.
Hint: Instead of representing the map solely by its image, consider the function
$$f(x)=ax$$
in $\mathbb{Z}_m$, where $a\in A$, and $A$ is (as you defined it) the set of primitive residues $\bmod m$.
You want to show that $f$ is a bijection from $A$ to $A$. To do this, first show the following:
Now, show that it is injective, i.e.that
Any injective (you might have heard this called "one-to-one") function from a finite set to itself is a bijection, so from there you will be done.