# Understanding compactness theorem on modeling a sentence

$$T$$ is a theory and $$\phi$$ is a sentence with $$T \models \phi$$. I read notes with a quote like this:

By Compactness Theorem, a finite subset $$T_0 \subseteq T$$ has $$T_0 \models \phi$$.

I thought the Compactness Theorem was something like "a theory has a model iff every subset of the theory has a model". That is $$M \models T \implies M \models T_0$$. (I believe it follows from Completeness of FOL and proofs being finite). So how do we show the claim with compactness? I think it has something to do with $$\phi$$ being a sentence. If we replaced $$\phi$$ with an infinite theory $$T'$$ then we cannot claim $$T_0 \models T'$$.

Your statement of compactness is not quite right (your statement is true, just not very strong, since $$T$$ is a subset of itself!). A correct statement is: Let $$T$$ be a first-order theory. Then $$T$$ has a model if and only if every finite subset of $$T$$ has a model.
Now to your actual question. Since $$T \models \phi$$, the theory $$T \cup \{\neg\phi\}$$ has no models. Thus, by compactness, there is a finite subset $$\Delta \subseteq T \cup \{\neg\phi\}$$ that has no models. Let $$T_0 \subseteq T$$ be the finitely many sentences from $$T$$ that appear in $$\Delta$$. Then $$T_0 \cup \{\neg\phi\}$$ has no models, so every model of $$T_0$$ is not a model of $$\neg\phi$$, and hence $$T_0 \models \phi$$.
• I think I have reasoned that it does not matter if $\Delta$ picked contains or does not contain $\neg \phi$, correct?