I'm having trouble understanding this theorem:
If $g$ is a primitive root of $m$, then the remainders modulo $m$ of $g,g^2,...,g^{\varphi (m)}$ are the $\varphi (m)$ natural numbers that are relatively prime with $m$.
The proof goes like this:
$g$ is a primitive root, so $\gcd(g,m) = 1 \implies \gcd(g^k,m) = 1 \text{ for } \ k = 1,...,\varphi(m)$. We also know that $g^j \equiv g^k \text{ (mod } m)$ is equivalent to $j \equiv k \text{ (mod } \varphi(m))$, so those remainders are unique.
I think it says that we have $\varphi(m)$ numbers, being $g^1,...,g^{\varphi(m)}$, relatively prime with $m$ and dividing each of those with $m$ yields a different remainder. I don't see where it implies that those remainders are relatively prime to $m$. Perhaps I could understand it if there was a proof of the statement "the remainder of $a$ divided by $b$ with $a$ and $b$ relatively prime, is a prime number" but I don't even know if this is true. So can someone help me with this proof?
Thank you!