Is this a valid proof for $\gcd(a,b) = \gcd(b,r),\ r = a-bq$?

44 Views Asked by At

Let $ a \in \mathbb{N}$, $ b \in \mathbb{N}_0 $, $ r \in \mathbb{N}_0 $, $ q\in \mathbb{N} $ and $ b \leq a$ so that $$a = bq + r $$with $$ 0 \leq r \lt b$$

Proof:

Let $ D = \{d \in \mathbb{Z} \vert ~ d \mid a \text{ and } d \mid b \}$ and Let $ D' = \{d \in \mathbb{Z} \vert ~ d \mid b \text{ and } d \mid r \}$

Let $ x \in D $, so that $x \mid a$ and $x \mid b$:

$$ a = bq +r $$ $$ a - bq = r $$

So $x \mid a-bq=r$ so $x \mid r$

Let $$ x \in D', $$ so that $x \mid b$ and $x \mid r$:

$$ a = bq +r $$

So $x \mid b$ and $x \mid r$ but also $x \mid a$ and since $$ a \in D$$

$$ \gcd(a,b) = \gcd(b,r)$$

Any critique? Did i proved it somehow in a correct way? If not, could you show me what i did wrong or how to do it properly? Thanks in advance!