This is a lemma from Rotman's book Advanced Modern Algebra:
Let $a$ and $b$ be integers (and so are $q$ and $r$). I need to prove that if $b = qa + r$, then $\gcd(a,b) = \gcd(r,a)$.
Not sure how to approach the proof.
This is a lemma from Rotman's book Advanced Modern Algebra:
Let $a$ and $b$ be integers (and so are $q$ and $r$). I need to prove that if $b = qa + r$, then $\gcd(a,b) = \gcd(r,a)$.
Not sure how to approach the proof.
Note : At first we consider the simpler case $r=0$. I will note $D(x,y)$ the set of the common divisors of $x$ and $y$.
Case 1 : If $r=0$, then $b=aq$ so $gcd(a,b)=a$.
Case 2 : If $r \neq 0$. Let $d$ a common divisor of $a$ and $b$, $r=b-aq$, so $d$ divides $r$. So $d$ is a common divisor of $a$ and $r$. $D(a,b) \subseteq D(a,r)$.
Let $e$ a common divisor of $a$ and $r$, $b = aq+r$, so $e$ divides $b$. So $e$ is a common divisor of $a$ and $b$. $D(a,r) \subseteq D(a,b)$.
So $D(a,b)=D(a,r)$. The largest element of $D(a,b)$ is also the largest element of $D(a,r)$. So $gcd(a,r)=gcd(b,a)$.