Let $m$ and $n$ be positive integers with $n$ dividing $m$. Prove that the natural surjective ring projection $\mathbf{Z}/m\mathbf{Z}\to\mathbf{Z}/n\mathbf{Z}$ is also surjective on the units: $(\mathbf{Z}/m\mathbf{Z})^{\times}\to(\mathbf{Z}/n\mathbf{Z})^{\times}$.
This problem is from Dummit and Foote, 7.6.7. I believe my proof is correct though perhaps quite long. I have seen other proofs that look much faster in the similar questions. Still, if someone could verify I would greatly appreciate it.
That natural projection $\pi:\mathbf{Z}/m\mathbf{Z}\to\mathbf{Z}/n\mathbf{Z} $ is defined by $\pi(k)\mapsto k \mod n$. This is indeed surjective as $0,1,2,\ldots, n-1$ map to themselves while the rest map to whatever.
Let $u$ be a unit in $\mathbf{Z}/\mathbf{nZ}$.That is, let $u$ be a positive integer smaller than and coprime with $n$. Let $n < m$ as if $n=m$ then $u$ $\pi(u)=u$. We need to find an integer $l$ such that $ln + u$ is less than $m$ and does not divide $m$. There exists a $d$ such that $dn = m$ because $n$ divides $m$. Consider $l = d-1$. Then $ln + u = (d-1)n + u = m - n + u$. This satisfies the first condition as $n > u$. Suppose it did not satisfy the second. Then there exists some $p$ such that $pm - pn + pu = m$. So $u = \frac{m}{p} - m + n$ and then $u \equiv \frac{m}{p} \mod n$. In other words, this fraction is an integer not divisible by $n$ (if it was then $u$ would not be coprime with $n$, contradicting that $u$ is a unit).
Now consider $\frac{m}{p}+n$. I claim that this is an integer less than $m$, does not divide $m$, and $\pi\left(\frac{m}{p} + n\right) = u$. The last assertion has already been shown. If the first was not true we would have \begin{align*} \frac{m}{p} + n &> m\\ m + pn &> pm \\ pn &> (p-1)m \\ \frac{p}{p-1} &> \frac{m}{n} \\ &\geq 2 \end{align*} which is absurd. Suppose that $\frac{m}{p}+n$ did divide $m$. So for some positive integer $q$ \begin{align*} \frac{qm}{p}+qn &= m \\ q\left(\frac{m}{p} - m + n + m \right) &= m \\ q(u+m) &= m \\ qu + qm &= m \end{align*} which is also absurd. So we see there are two possibilities: either $\pi(m-n+u) = u$ or if not then $\pi\left( \frac{m}{p}+n\right) = u$ (where $p$ is as specified before) and we are done as if the first argument divides $m$, the second one cannot.