Prove onto homomorphism between $Z_n/ \rightarrow Z_k$ where $k | n$
Define $\phi:Z_n -> Z_k$
$\phi(x)=x\mod k \; \; \forall x \in Z_n$
Let $x=y$ $\Rightarrow x \mod k = y\mod k \Rightarrow \phi(x)=\phi(y) $
Therefore well defined
Now $\phi(a +_n b) = \phi(r) = r \mod k\; \; \;$ where $a+b = r \mod n$
now, $n|a+b-r \Rightarrow k|a+b-r \Rightarrow a+b=r \mod k \Rightarrow a +_k b = r$
Also $\phi(a)=a \mod k$
$\phi(b)=b \mod k$
$\phi(a) +_k \phi(b)= (a \mod k) +_k (b \mod k) = (a+_k b) \mod k = r \mod k =\phi(a+_n b)$
therefore homomorphism
now, $\forall y \in Z_k, \exists y \in Z_n \; such \; that \phi(y)= y \mod k = y $
therefore onto
Is this proof correct ?
I particularly want to ask is the definition of my $\phi$ valid? I am asking this because I restricted the set of input values to $Z_n$ to make my proof simpler. So it this still valid ?
This proof is correct. $\phi $ is valid. But you have written various simple steps but at one point where you said there exists $y \in k$ such that $\phi (y) = y$. You have not made it clear. Although it is correct.