I recommend that you do a full proof. You're on the right track, for the most part, but some of your conclusions are incorrect. For example, what if $m=2$ and $n=-2$? Also, a full proof will allow you to show that you've found a sufficient and necessary condition for such an epimorphism to exist. You've only (heuristically) claimed that it's sufficient, so far.
Please feel free to add any proof attempts to your post. We'll be glad to look through it to check your reasoning.
Added: I will go over your proof attempt and address some issues, first. Next, I will try to clear up some misunderstandings that it seems you are having with the definitions. Finally, I will outline an alternative approach that will work.
I claim that for there to be an epimorphism from $\frac{\Bbb Z}{n\Bbb Z}→\frac{\Bbb Z}{m\Bbb Z},$ $m$ must divide $n.$
I'm not sure this is what you mean to say. What this means is that if there is such an epimorphism, then $m$ divides $n.$ You seem to be trying to prove the converse, though.
Such an epimorphism is that $\phi:\frac{\mathbb{Z}}{n\mathbb{Z}}\to\frac{\mathbb{Z}}{m\mathbb{Z}}$ where $\phi(x)=y$ (with $x\in \frac{\mathbb{Z}}{n\mathbb{Z}}, y\in \frac{\mathbb{Z}}{m\mathbb{Z}}$) where $y\equiv x\pmod{m}$.
Well, right off the bat, we run into an issue. What does it mean for such $x$ and $y$ to be equivalent mod $m$? It's natural to talk about integers in this way, but equivalence classes? We can't do that in general.
First, we must prove this is a homomorphism.
I would recommend that you first prove that it is well-defined, since we are working with equivalence classes. So, for one thing, you'd need to show that, given $x\in\frac{\Bbb Z}{n\Bbb Z},$ there is some $y\in\frac{\Bbb Z}{m\Bbb Z}$ such that $y\equiv x\pmod{m}$ (whatever that means, if anything). Then, you would need to explain how to choose from among such $y$ for a given $x,$ or justify that there is exactly one such $y,$ or you have defined a relation, but not a function.
Take two elements $x_1,x_2\in\frac{\mathbb{Z}}{n\mathbb{Z}}$. Thus, $\phi(x_1x_2)=(x_1+x_2)\pmod{m}$ and $\phi(x_1)\phi(x_2)=(x_1)\pmod{m}+(x_2)\pmod{m}$, so this is a homomorphism.
Here, we have some notational issues. On the left-hand side, it seems that you're treating both $\frac{\Bbb Z}{m\Bbb Z}$ and $\frac{\Bbb Z}{n\Bbb Z}$ as multiplicative groups, but on the right-hand side, you seem to be treating $\frac{\Bbb Z}{m\Bbb Z}$ as an additive group. Bad idea to change notation midstream!
Now, to prove this is an epimorphism, i.e. that it is onto. For each element in $\frac{\mathbb{Z}}{m\mathbb{Z}}$, it must have some unique pre-image in $\frac{\mathbb{Z}}{n\mathbb{Z}}$.
There is no need for uniqueness, unless you're trying to prove that it is also a monomorphism, i.e.: one-to-one.
Take some element $y\in \frac{\mathbb{Z}}{m\mathbb{Z}}$. Thus $y\equiv x\pmod{m}$,
Here, you've pulled an $x$ out of midair. How do you know such an $x$ exists?
so possible values of the pre-image of $y$ are $x=y, y+m, y+2m ....$, or $y= x-m, x-2m, ....$.
You seem to be treating $x,$ $y,$ and $m$ like the same kind of object, here, but one is an integer, one is an equivalence class mod $m,$ and one is an equivalence class mod $n$. Be careful!
As a final note, observe that you never used your hypothesis.
Now for some definitions and notation.
Given $k\in\Bbb Z,$ the elements of $\frac{\Bbb Z}{k\Bbb Z}$ are equivalence classes modulo $k$. That is:
- the elements of $\frac{\Bbb Z}{k\Bbb Z}$ are non-empty sets of integers,
- every integer lies in exactly one such set,
- given $A\in\frac{\Bbb Z}{k\Bbb Z}$ and any $x\in A,$ we have that $y\equiv x\pmod{k}$ if and only if $y\in A.$
Many texts will denote equivalence classes with bars--using $\overline x$ to denote the set of integers $y$ such that $y\equiv x\pmod{k}$, for example. Here, though, we are working with two (potentially) different modular structures, so we should make sure we can keep them straight. To that end, I will use the following notation:
Given $x,k\in\Bbb Z,$ let $[x]_k$ be the set of all $y\in\Bbb Z$ such that $y\equiv x\pmod k.$
So, for our purposes, note that the elements of $\frac{\Bbb Z}{m\Bbb Z}$ can all be written in the form $[x]_m$ for some $x\in\Bbb Z,$ and the elements of $\frac{\Bbb Z}{n\Bbb Z}$ can all be written in the form $[x]_n$ for some $x\in\Bbb Z.$
Now, we define an operation $+_k$ on $\frac{\Bbb Z}{k\Bbb Z}$ as follows.
Given $A,B\in\frac{\Bbb Z}{k\Bbb Z},$ we put $A+_kB:=[x+y]_k,$ where $x\in A$ and $y\in B.$
In particular, then, for any $k,x,y\in\Bbb Z,$ we have $[x]_k+_k[y]_k=[x+y]_k.$ We have to be careful, though! We didn't specify how to choose $x\in A$ and $y\in B,$ so this need not be well-defined! You should be able to prove, though, that if $x,x'\in A$ and $y,y'\in B,$ then $[x+y]_k=[x'+y']_k,$ so we're okay.
At last, we're ready to proceed! (If any of the above definitions or notation throw you, let me know.)
Here's the approach you seem to be going for.
Suppose that $m,n\in\Bbb Z$ such that $m\mid n.$ We show that there is an epimorphism $\frac{\Bbb Z}{n\Bbb Z}\to\frac{\Bbb Z}{m\Bbb Z}.$ In particular, let $\phi\bigl([x]_n\bigr)=[x]_m.$
We first prove that this is well-defined. Suppose $[x]_n=[x']_n.$ We must show that $[x]_m=[x']_m.$ By definition, since $[x]_n=[x']_n,$ then $x'\equiv x\pmod n,$ meaning that $n\mid(x'-x).$ Then $m\mid(x'-x)$ (why?), so $x'\equiv x\pmod m,$ and so $[x]_m=[x']_m,$ as desired.
Readily, we have $\phi\bigl([x_1]_n+_n[x_2]_n\bigr)=\phi\bigl([x_1]_n\bigr)+_m\phi\bigl([x_2]_n\bigr)$ (why?), and so $\phi$ is a homomorphism.
Finally, take any $B\in\frac{\Bbb Z}{m\Bbb Z},$ and any $x\in B,$ so that $B=[x]_m=\phi\bigl([x]_n\bigr),$ whence $\phi$ is onto.
See if you can justify the steps above.
Now, if you are actually trying to show that $m\mid n$ is a necessary condition for such an epimorphism to exist, let me know, and I will make adjustments.