Compactness Theorem

Theorem
Let $T$ be an $\mathcal{L}$-theory. Then $T$ is satisfiable if and only if every finite subset of $T$ is satisfiable.

Proof using Ultraproducts
The idea is to construct an ultraproduct using a purposefully selected ultrafilter and collection of models so that each sentence in $T$ will be realized as a result of Łoś's theorem.

Let $\Sigma$ be the set of finite subsets of $T$, and for each sentence $E\in T$, let $\uparrow (E)$ denote the collection $\{\sigma\in\Sigma\mid E\subseteq\sigma\}$ of finite subsets of $T$ containing $E$.

Since $\{\uparrow(E)\mid E\in T\}$ is a filter, there is an ultrafilter $\mathcal{U}$ on $\Sigma$ which contains it.

Since every finite subset of $T$ is satisfiable and hence has a model, we can associate to each $\sigma\in\Sigma$ a model $\mathcal{M}_\sigma\models\sigma$.

Let $\mathcal{M}$ be the ultraproduct $\displaystyle{\left(\prod_{\sigma\in\Sigma}\mathcal{M}_\sigma\right)/\mathcal{U}}$.

We verify that $\mathcal{M}$ is a model of $T$:

Suppose $E\in T$.

Since $E\in\sigma$ implies that $\mathcal{M}_\sigma \models E$ by choice of $\mathcal{M}_\sigma$, it follows that $\uparrow (E)\subseteq \{\sigma\in\Sigma \mid\mathcal{M}_\sigma \models E\}$.

By choice of the ultrafilter $\mathcal{U}$, this means that $\{\sigma\in\Sigma \mid\mathcal{M}_\sigma \models E\}$ is in $\mathcal{U}$.

Thus, by Łoś's theorem, the ultraproduct $\mathcal{M}$ satisfies $E$.

Proof using Gödel's Completeness Theorem
This proof is by contraposition. The idea is to exploit the finiteness of proofs and the relation between satisfiability and deducibility to show that if $T$ is not satisfiable, then it must have a finite subset which can be used to prove to a contradiction.

Suppose $T$ is not satisfiable.

Since $T$ has no models, it vacuously follows that $T\models \phi\wedge\neg\phi$ for some sentence $\phi$. By Gödel's Completeness Theorem, this implies that $\phi\wedge\neg\phi$ is deducible from $T$. But, any deduction from $T$ involves only finitely many sentences from $T$, so this means that there is a finite subset $\Delta$ of $T$ such that $\phi\wedge\neg\phi$ is deducible from $\Delta$.

By Soundness of First-Order Logic, this means that $\Delta\models\phi\wedge\neg\phi$. Thus, $\Delta$ is not satisfiable.