[step:Identify the positive generator as the greatest common divisor]
We show that the integer $d$ constructed above is $\gcd(a_1,\dots,a_n)$. For each $i \in \{1,\dots,n\}$, the integer $a_i$ lies in $I=d\mathbb{Z}$, so $d \mid a_i$. Thus $d$ is a common divisor of $a_1,\dots,a_n$.
Now let $e \in \mathbb{Z}$ be any common divisor of $a_1,\dots,a_n$. For every choice of integers $x_1,\dots,x_n \in \mathbb{Z}$, the divisibility assumptions $e \mid a_i$ imply
\begin{align*}
e \mid \sum_{i=1}^{n} a_i x_i.
\end{align*}
Since $d \in I$, there exist $y_1,\dots,y_n \in \mathbb{Z}$ such that
\begin{align*}
d = \sum_{i=1}^{n} a_i y_i.
\end{align*}
Therefore $e \mid d$. Hence every common divisor of $a_1,\dots,a_n$ divides $d$, while $d$ itself is a nonnegative common divisor. By the definition of the greatest common divisor,
\begin{align*}
d = \gcd(a_1,\dots,a_n).
\end{align*}
[/step]