Homomorphism well defined Q: Let $m,n$ be natural numbers. Suppose $m\mid n$. Define $\theta\colon \mathbb{Z}_n \to \mathbb{Z}_m$ by $\theta([a]_n)=[a]_m$.
Show that theta is well defined.
I know if $m\mid n$ then there exists an integer say $x$, such that $n=xm$.
I think I have to show that the output is the same.
I know we can rewrite $[a]_n=a+Pn$ where P is an integer
And $[a]_m=a+Qm$ where $Q$ is an integer.
But still don't know how to show it.
 A: First of all $[a] = [b]$ in some ring $\mathbb{Z_d}$ iff $d$ divides $a-b$. Now if $[a] = [b] \in \mathbb{Z_n}$ then $n$ divides $a-b$ $\Rightarrow m$ divides $a-b$ (since $m$ divides $n$) and therefore $[a] = [b]$ in $\mathbb{Z_m}$. This shows that the homomorphism is well defined.
A: You can't write $[a]_n=a+Pn$ for $P\in\mathbb{Z}$, but you can write any element of $[a]_n$ as $a+Pn$ for some $P\in\mathbb{Z}$ (and indeed $[a]_n$ is the set of elements of this form).
In particular, $[a]_n=[a+Pn]_n$ for any $P\in\mathbb{Z}$.
The point is that the value $\theta([a]_n)$ was defined using the representative $a$ for the set $[a]_n$, but if the map is to be well-defined it shouldn't depend on this choice. What you need to show is that if $[a]_n=[b]_n$ (i.e. $b=a+Pn$ for some $P\in\mathbb{Z}$) then $\theta([a]_n)=\theta([b]_n)$, else your function does not take a unique value on the input $[a]_n$.
The proof then reduces to writing out the definitions of $\theta([a]_n)$ and $\theta([a+Pn]_n)$ and showing that they agree.
