I am reading George E. Andrews' Number Theory and am at the portion where he proves Euclid's Division Lemma.
The lemma states that
For any integers $k (k>0)$ and $j$, there exist unique integers $q$ and $r$ such that $0≤r<k$ and $j=qk+r.$
I am having difficulty understanding the final part of the proof, where the uniqueness of $q$ and $r$ when $j < 0$ is proven.
By this point it has been established that the lemma is true for $j>1$ because by the basis representation theorem, $j$ has a unique representation to the base $k$
$$j=a_sk^s+a_{s-1}k^{s-1}+...+a_1k+a_0$$ $$=k(a_sk^{s-1}+a_{s-1}k^{s-2}+...+a_1)+a_0$$ $$=kq+r$$Where $0≤r=a_0<k$.
Supposing a second pair $q'$ and $r'$ exists, there is a representation for $q'$ to the base $k$:
$$q'=b_tk^t+b_{t-1}k^{t-1}+...+b_1k+b_0.$$Thus,
$$j=kq'+r'$$ $$=b_tk^{t+1}+b_{t-1}k^t+...+b_1k^2+b_0k+r'.$$But,
$$j=a_sk^s+a_{s-1}k^{s-1}+...+a_1k+a_0.$$By the uniqueness of the representation of $j$ to base $k$, the following may be gleaned: $r'=r=a_0, \ a_{i+1}=b_i, \ \text{and} \ t=s-1$. Therefore,
$$q'=b_tk^t+...+b_1k+b_0$$ $$=a_sk^{a-s}+...+a_2k+a_1$$ $$=q.$$Therefore the lemma is true when $j>0$. And if $j=0, \ q=r=0$ is the only possible solution where $0≤r<k$. It is left to prove that the lemma is true when $j<0$.
Here we run into my issue. He writes,
If $j<0$, then $-j>0$, and there exist unique integers $q'' \ \text{and} \ r''$ such that $$-j=kq''+r''.$$If $r''=0$, then $j=k(-q'')$; thus we may take $q=-q'' \ \text{and} \ r=0$.
If $r''\neq 0$, then
$$j=-kq''-r''$$ $$=k(-q''-1)+(k-r''),$$and we may take $q=-q''-1, \ \text{and} \ r=k-r''$.
In either case, $q$ and $r$ satisfy equation $j=kq+r$. Uniqueness for negative $j$ follows from uniqueness for $-j$, which is then positive.
I understand the reason for using the equation $-j=kq''+r''$, since it has already been established that when the equation is greater than $0$, there exists unique integers $q''$ and $r''$. This is useful because it is equivalent to $j=-kq''-r''$, so if there exists unique integers $q''$ and $r''$ for $-j$, they must also exist for $j$, and so we may conclude that the lemma is true when $j<0$, correct? But this raises the question, why doesn't the proof end there? I am missing something.
There is a reason why we treat cases $r'' \neq 0$ and $r''=0$ separately. Why is that?
Furthermore, how is the fact that in the former case $q=-q''$ and $r=r''=0$ relevant to the proof? And in the latter case, how do $q=-q''-1$ and $r=k-r''$ satisfy the equation $j=kq+r$?
Finally, the phrasing of the last sentence is confusing:
Uniqueness for negative $j$ follows from uniqueness for $-j$, which is then positive.
It seems as if "negative $j$" and "$-j$" are different things, otherwise the statement would be begging the question. But what then is "negative $j$?" The "$j$" from the equation $j=kq+r$ multiplied by $-1$? I assume "$-j$" is from the equation $-j=kq''+r''.$
I realize I have asked a great many questions and probably have not been clear enough in stating my confusions. I am very new to number theory and am learning it independently, so I am very prone to misunderstanding the content. This is the only place I can reliably go for clarification. My apologies for the length of this question, I have tried to be as specific as possible to avoid miscommunication.