I'm currently reading a text (Thomas W. Judson, Abstract Algebra - Theory and Applications) where the author proofs the theorem that every subgroup of a cyclic group is cyclic. The proof goes as follows:
The main tools used in this proof are the division algorithm and the Principle of Well-Ordering. Let $G$ be a cyclic group generated by a and suppose that $H$ is a subgroup of $G$. If $H = {e}$, then trivially $H$ is cyclic. Suppose that $H$ contains some other element $g$ distinct from the identity. Then $g$ can be written as an for some integer $n$. We can assume that $n > 0$.
Let $m$ be the smallest natural number such that $a^m \in H$. Such an $m$ exists by the Principle of Well-Ordering. We claim that $h = a^m$ is a generator for $H$. We must show that every $h' \in H$ can be written as a power of $h$.
Since $h' \in H$ and $H$ is a subgroup of $G$, $h' = a^k$ for some positive integer $k$. Using the division algorithm, we can find numbers $q$ and $r$ such that $k = mq + r$ where $0 \leq r < m$; hence, $$a^k = a^{mq+r}= (a^m)^qa^r = h^qa^r$$ So $a^r = a^kh^{-q}$. Since $a^k$ and $h^q$ are in $H$, $a^r$ must also be in $H$. However, $m$ was the smallest positive number such that $a^m$ was in $H$; consequently, $\mathbf{r = 0}$ and so $k = mq$. Therefore, $$h' = a^k = a^{mq} = h^q$$ and $H$ is generated by $h$.
I am trying to understand why one should set $r$ to $0$ if $m$ was the least element.
Since $m$ is a natural number, would setting $r$ to $0$ contradict $m$ being the least natural number, since $0 < m$? Or is the purpose of setting $r$ to $0$ to assign a non-natural value to $r$ for some reason?