I tried to prove it with linear combination.
Also other information,
- $h*\gcd(m, n)=h*am+h*bn$
- At each iteration $i$, $y_i=x_iq+r$
- Last iteration $t$, so $x_t=\gcd(m, n)$.
Base case: Iteration t. $x_t=h_t*\gcd(m, n)=h_t*am+h_t*bn$. Last iteration, $x_t=\gcd(m, n)$, so $h_t = 1$. Hence, $\gcd(m, n)=am+bn$
I don't know how to prove that m, n are positive integers and a, b are integer.
Assume iteration k, $x_k=h_k*\gcd(m, n)=h_k*am+h_k*bn$, for some integer h, $x_k$ is a multiple of gcd.
We need to prove $x_{k+1}=h_{k+1}*\gcd(m, n)=h_{k+1}*am+h_{k+1}*bn$.
I don't know is that correct, if it is wrong, please tell me
Also, I don't know is this prove correct.