Solution (source code)

= Solution

If $T$ is <model-complete>, the inclusion of a <substructure of a first-order structure> $\mathcal A\subseteq\mathcal B$, both <first-order models> of $T$, is a <structure embedding> and hence elementary. Therefore $\mathcal A\preceq\mathcal B$.

Conversely, assume every such inclusion is elementary, and take any <structure embedding> $f:\mathcal A\to\mathcal B$ between <first-order models> of $T$. Its image $f[A]$, with the induced <first-order structure>, is a substructure of $\mathcal B$ isomorphic to $\mathcal A$, so it is itself a <first-order model> of $T$. By hypothesis $f[A]\preceq\mathcal B$. The <isomorphism> $\mathcal A\to f[A]$ preserves all <first-order formulas>, and composing it with this elementary inclusion shows that $f$ is an <elementary embedding>. Thus $\boxed{T\text{ is model-complete}\iff(\mathcal A\subseteq\mathcal B\models T\Rightarrow\mathcal A\preceq\mathcal B)}$.