Suppose that $a,b\in \mathbb{N}$ and our goal to find $\text{gcd}(a,b)$ and the most effective way to do that is the Euclidean algorithm. I know how the algorithm works but I'd like to understand thoroughly and that is why I created this topic because some moments are not crystal clear to me.
Suppose we are given two natural numbers $a,b\in \mathbb{N}$ and assume that $a>b$ with $a\nmid b$.
Step #0. Then there is the unique pair of integers $q_0, r_2$ such that $a=bq_0+r_2,$ where $0<r_2<b$. Let's introduce the new notation $r_0:=a$ and $r_1:=b$. Then
$$r_0=r_1q_0+r_2, \text{where} \ 0<r_2<r_1.$$
Step #1. Then we apply the same procedure to the pair $\{r_1,r_2\}$ and obtain that
$$r_1=r_2q_1+r_3, \text{where} \ 0\leq r_3<r_2.$$
If $r_3=0$ then $(a,b)=r_2$ and I know how to prove it.
If $r_3>0$ then we move on to the Step #2 where $r_2=r_3q_2+r_4$ with $0\leq r_4<r_3$.
Claim: On some step #m with $m\geq 1$ the remainder $r_{m+2}$ will vanish.
Proof: Suppose this is false. Then on any step #m the remained is nonzero, i.e. $r_{m+2}>0$. Then it is easy to show that $r_{n+2}\leq b-n-1$. Hence $0<r_{b+2}\leq -1<0$. But this is a contradiction.
Hence $\exists m\geq 1$ such that $r_{m+2}=0$. Then it implies that $r_{m+1}\neq 0$ (otherwise if $r_{m+1}=0$ then $r_m=\dots=r_1=0$, right? Can anyone show the rigorous proof of that? Probably the proof relies on induction).
Hence $r_{m+1}\mid r_m$ and $(a,b)=(b,r_2)=(r_1,r_2)=\dots=(r_m,r_{m+1})=r_{m+1}.$
Is my reasoning correct? If yes, can anyone explain the question which I've asked?
Thanks in advance!