Solution (source code)

= Solution

Let $T_\forall$ denote the <universal consequences of a theory>: all universal <first-order sentences> entailed by $T$. A <first-order structure> satisfies $T_\forall$ exactly when it embeds into a model of $T$, by the <compactness theorem> applied to its <diagram of a structure>.

The theory has <algebraically prime models> if, for every $\mathcal A\models T_\forall$, there are $\mathcal P\models T$ and a <structure embedding> $i:\mathcal A\to\mathcal P$ such that every <structure embedding> $j:\mathcal A\to\mathcal N$, $\mathcal N\models T$, factors as $j=h\circ i$ for some <structure embedding> $h:\mathcal P\to\mathcal N$. Neither $i$ nor $h$ is required to be elementary.

For $\mathcal M\subseteq\mathcal N$, <simple closure> means that every existential <quantifier-free formula> over $M$ which has a witness in $N$ has one in $M$:
$$
\mathcal N\models\exists x\,\theta(x,\bar a)\quad\Longrightarrow\quad
\mathcal M\models\exists x\,\theta(x,\bar a),\qquad \bar a\in M.
$$
Now take two models $\mathcal M,\mathcal N\models T$ with common <substructure> $\mathcal A$. Since $A$ embeds into $M$, it satisfies $T_\forall$. Choose its <algebraically prime extension> $\mathcal P$, and embed $P$ into both $M$ and $N$ over $A$.

If $\exists x\,\theta(x,\bar a)$ holds in $M$, the image of $P$ in $M$ is a model of $T$. The assumed <simple closure> of this image transfers a witness from $M$ into $P$. Its embedding into $N$ then transfers the <quantifier-free formula> and its witness into $N$. Thus the hypothesis of <QET1> is satisfied. \b[The second test follows: $T$ has <quantifier elimination>.]