gcd for $n$ numbers and a corollary 
  
*
  
*Show that if $d$ is the $\gcd$ of $a_1,a_2,\dots,a_n$. then $d=\sum t_ia_i$, where $t_i$ is in $\mathbb{Z}$, for all $i$ with $1\leq i\leq n$.
  

I thought in using induction, instead of generalizing the typical proof of using the Least Integer Axiom, but I can't see how to ge it.


  
*Show that $\gcd(a,b,c)$ is equal to $\gcd(a,\gcd(b,c))$.
  

Here I would like to ask if the proof is correct.
Set $f=\gcd(b,c)$, $d=\gcd(a,f)$. Therefore:
$$
d=s_1a+s_2f = s_1a+s_2(r_1b+r_2c)=s_1a+(s_2r_1)b+(s_2r_2)c,
$$ 
On the other hand, if $d$ is $\gcd(a,b,c)$, then
$$
d=t_1a+t_2b+t_3b.
$$
If we identify $t_2=s_2r_1$ and $t_3=s_2r_2$, then $d=gcd(a,b,c)=gcd(a,gcd(b,c))$. 
EDIT: Another approach.
Suppose $d=gcd(a,b,c)$, then $d|a$, $d|b$, $d|c$. Now, the $gcd$ of $b$ and $c$ is, say $f$. Since $d=gcd(a,b,c)$, then $f|d$, and thus $d|gcd(b,c)$.
Conversely, if $d=gcd(a,gcd(b,c))$, then $d|a$ and $d|gcd(b,c)$, then $d|b$ and $d|c$. Therefore $d=gcd(a,b,c)$.
 A: The set $ \,S\,$ of integers of form $ \,a_1\,x_1 + \cdots + a_n x_n,\ x_i\in \mathbb Z,\,$ is closed under subtraction so, by the Lemma, every positive $ \,k\in S\,$ is divisible by $ \,d = $ least positive $ \in S.\,$  Therefore $ \,a_i\in S$ $\,\Rightarrow\,$ $  d\mid a_i,\,$ i.e. $ \,d\,$ is a common divisor of all $ \,a_i,\,$ and greatest: $ \ c\mid a_i$ $\Rightarrow$ $ \,c\mid d = a_!\,x_1\!+\!\cdots\!+\!a_nx_n$ $\Rightarrow$ $ \,c\le d$   
Lemma $\ \ $ Let $\,  S\ne\emptyset \,$ be a set of integers $>0\,$ closed under subtraction $> 0,\,$ i.e. for all $ \,n,m\in S, \,$ $ \ n > m\ \Rightarrow\  n-m\, \in\, S.\,$  Then the least $ \:\ell\in S\,$ divides every element of $\,  S.$
Proof ${\bf\ 1}\,\  $ If not there is a least nonmultiple $ \,n\in S,\,$ contra  $ \,n-\ell \in S\,$ is a nonmultiple of $ \,\ell.$
Proof ${\bf\ 2}\, \,\ \   S\,$ closed under subtraction $ \,\Rightarrow\,S\,$ closed under remainder (mod), when it is $\ne 0,$ since mod is simply repeated subtraction, i.e. $ \ a\ mod\ b\, =\, a - k b\, =\, a\!-\!b\!-\!b\!-\cdots\! -\!b.\,$ Thus $ \,n\in S\,$ $\Rightarrow$ $ \, (n\ mod\ \ell) = 0,\,$ else it is in $\,  S\,$ and smaller than $ \,\ell,\,$ contra minimality of $ \,\ell.$ 
Remark $\ $ In a nutshell, two applications of induction yield the following inferences
$ \rm\begin{eqnarray} S\ closed\ under\ {\bf subtraction} &\:\Rightarrow\:&\rm S\ closed\ under\ {\bf mod} = remainder = repeated\ subtraction \\
&\:\Rightarrow\:&\rm S\ closed\ under\ {\bf gcd} = repeated\ mod\ (Euclid's\ algorithm) \end{eqnarray}$
Interpreted constructively, this yields the extended Euclidean algorithm for the gcd. 

For the GCD associative law see this answer. Hint: first prove the universal property of the gcd: $\ d\mid a_1,a_2,a_3,\ldots\! \iff d\mid (a_1,a_2,a_3,\ldots)\,$ using the above general Bezout Lemma.
A: You can assume your numbers are nonnegative. In this case, the relation
$$
a\mid b \qquad\textit{for}\qquad \text{there exists $c$ such that $b=ac$}
$$
is a partial order relation that defines a semilattice structure on $\mathbb{N}$. Indeed, $d=\gcd(a,b)$ has the property that


*

*$d\mid a$ and $d\mid b$

*for all $c$, if $c\mid a$ and $c\mid b$, then $c\mid d$


which means that $d$ is the greatest lower bound of $\{a,b\}$. Existence is guaranteed by Euclid’s algorithm.
Actually, this defines a lattice structure, where the least upper bound is the least common multiple.
Now, that $\gcd(a,\gcd(b,c))=\gcd(a,b,c)$ is easily shown with lattice techniques; more generally, you can prove by induction that
$$
\gcd(a_1,\dots,a_n,a_{n+1})=\gcd(\gcd(a_1,\dots,a_n),a_{n+1}) \tag{*}
$$
in the sense that the right-hand side is the greatest lower bound of $\{a_1,\dots,a_n,a_{n+1})$.
Over the natural numbers, there is the Bézout’s identity. The first statement can then be indeed proved by induction, using (*). The statement is obvious for $n=1$. Suppose it holds for $n$ numbers. Then
\begin{align}
\gcd(a_1,\dots,a_n,a_{n+1})
&=\gcd(\gcd(a_1,\dots,a_n),a_{n+1})\\
&=\gcd(r_1a_1+\dots+r_na_n,a_{n+1})\\
&=r(r_1a_1+\dots+r_na_n)+sa_{n+1}
\end{align}
which also shows how to find suitable integers:
$$
t_i=rr_i \quad (i=1,\dots,n),\qquad t_{n+1}=s
$$
