Proving if $d_0$ is the smallest positive integer in $S$ then $d_0 = \gcd(a,b)$ I would appreciate hints to this. I've done part (a) but am unconfident.
Wondering how I could approach part (b)  
Question's comment
-- The aim of this question is to use the Division Algorithm and the definition of greatest common divisor (gcd) to show that $d_0 = \gcd(a,b)$.  
Question:
Let $a,b$ be integers, not both zero, let $S$ be the set of integers defined by
$$S = \{ ax + by | x,y \in \mathbb{Z}\}$$
and let $d_0$ be the smallest positive integer in the set $S$.
Prove:
a. If $s\in S$, then $d_0$ is a divisor of $s$.
b. $d_0$ is a divisor of both $a$ and $b$.
c. If $d$ is a divisor of both $a$ and $b$, then $d$ is a divisor of $d_0$.
d. $d_0 =\gcd(a,b),$ and hence there exists integers $x,y$ such that $ax + by = \gcd(a,b)$.  
Attempt:
Note I don't expect full (or any hints to the problem(s) as there are quite a bit, but I would just appreciate hints.
a. Let $s \in S$. Then $s = d_0 q + r$ for some $q,r \in \mathbb{Z}$.
By definition, $d_0 = ax_0 + by_0$ for some $x_0,y_0 \in \mathbb{Z}$.
$s = ax_s + by_s$ for some $x_s,y_s \in \mathbb{Z}$.
Hence, $$ax_s + by_s = q(ax_0 + by_0) + r\\
a(x_s - qx_0) + b(y_s - qy_0) = r.$$
Define $x_r:= x_s - qx_0 \in \mathbb{Z}$ and $y_r:= y_s - qy_0 \in \mathbb{Z}$.
Then this shows that $r \in S$ which implies $d_0 | s$.  
 A: a. I'm not quite sure how you can just conclude from $r\in S$ that $d_0|s$ holds. But you can easily do it. Due to the euclidean division you get either $r=0$, which would imply $d_0|s$, or $0<r<d_0$, which is a contradiction to the minimality of $d_0$.
b. Use the last statement and $a,b\in S$.
c. Because $d_0\in S$ there exist integers $x,y$ with $d_0=ax+by$. So if $d|a,b$, then also $d|ax+by=d_0.$
d. We already showed $d_0|a,b$, which impliess $d_0|gcd(a,b)$, by the definition of the gcd. But $gcd(a,b)|a,b$, which impliess using c. that $gcd(a,b)|d_0$. So we have two positive numbers and each divides the other one, meaning they are equal, i.e. $d_0=gcd(a,b).$
A: a Your proof is correct, but incomplete. When applying Euclidean division, $0 \leq r < d_0$. You show that $r \in S$, is positive and smaller than $d_0$ (which is smallest by definition) thus a contradiction. 
A: $(a)\ $ $\,d_0\nmid s\,$ $\,\Rightarrow\, 0 <  s\bmod d_0 < d_0\,$ is a smaller positive element of $S$, contra minimality of $d_0\,$ (notice  $\,s\bmod d_0 = s - k\, d_0\,$ for some integer $k\,$ so it lies in $S,\,$ i.e. $S$ is $\rm\color{#0a0}{closed\  under\ mod}$).
$(b)\ $ Applying prior to $\,s = a,b\in S\,$ yields $\,d_0\mid a,b,\,$ i.e. $\,d_0$ is a common divisor of $\,a,b$ 
$(c)\ \ d_0\in S\,\Rightarrow\, d_0 = \color{#c00}aj+\color{#c00}bk\,$  so $\,d\mid \color{#c00}{a,b}\,\Rightarrow\, d\mid d_0$  
$(d)\  \ d_0\,$ is a common divisor of $\,a,b$ by $(b),\,$ necessarily the greatest common divisor since by $(c),\,$ $\,d\mid a,b\,\Rightarrow\,d\mid d_0\,\Rightarrow\, d\le d_0.\,$ Therefore, by definition, $\,d_0 = \gcd(a,b).\,$ Furthermore, we deduce  from $\,d_0\in S\,$ said Bezout linear representation $\,\gcd(a,b) = ax+by.$
Remark $\ $ Said more concisely $\, a\Bbb Z + b\Bbb Z = d_0\Bbb Z\,\Rightarrow\, d_0 = \gcd(a,b).\,$ This viewpoint is clarified when one learns ideal theory. But one can understand this more conceptual viewpoint even without knowledge of ideals (or groups), see this answer (which greatly clarifies the essence of the matter).
