\documentclass[fleqn,leqno]{article}
\usepackage{hypertlabook}
\pdftitle{Answer}
\begin{popup}
\subsection*{Answer} Take $Input$ to be $\{n_{1}, \ldots, n_{k}\}$.
The correctness of algorithm $SetEuclid$ implies that it has some
reachable state in which the gcd of $Input$ is an element of $S$\@.
Since an invariant is true for all reachable states, the result follows
from this invariant: Every element of $S$ equals 
$\,i_{1}*n_{1} + \ldots + i_{k}*n_{k} $\,, for some integers 
$i_{1}$, \ldots, $i_{k}$.  It's easy to show that this is an invariant of
the algorithm.
\end{popup}
\makepopup