I have a question about this exercise for my math study:
Let $d, n \in\mathbb{Z}_{>0}$ with $d\mid n$.
a) Prove that there is a homomorphism $g: (\mathbb{Z}/n\mathbb{Z})^*\rightarrow (\mathbb{Z}/d\mathbb{Z})^*$ and that $g(a \bmod n) = (a \bmod d)$ for every $a\in \mathbb{Z}$ with $\gcd(a, n) = 1$.
b) Prove that $g$ is surjective.
I also have to prove that the function $g$ is well-defined, and I have no idea how to prove that it is surjective. Your help would be very much appreciated, because I'm stucked here for a few days now.
Thanks in advance!
It seems the following.
It suffices to prove the surjectivity of the function $g$ only for the case $n=pd$, where $p$ is a prime number, because the initial homomorphism $g$ can be obtained as a composition of homomorphisms for such cases. The surjectivity of the function $g$ will be proved provided we show that for each integer $b$ which is coprime to $d$, there exists a number $a$, which is coprime to $n$ such that $a\equiv b(\operatorname{mod} d)$. If both numbers $b$ and $b+d$ are not coprime to $n$, then both of them are divided by $p$. Then $d$ is divided by $p$ too, which contradicts the coprimity of $b$ and $d$.