Compactness in model theory

This is the second in a series of posts about model theory.

Last time we discussed the limitations of mathematical logic and how it leads to many worlds of mathematics, regardless of whatever system of rules we choose. This time, we will discuss a theorem known as compactness which allows us to do some powerful things in mathematics, as well as demonstrate some more limitations of first order logic.

To motivate this, let’s start with a theorem:

If every finite subgraph of an infinite graph is kk-colorable, then the entire graph is kk-colorable.

At first glance this is not obvious. But with compactness, we will be able to show this very easily.

Terminology

Before we dive into compactness, let me first informally define some terminology.

  1. A theory is a set of rules. It is a purely syntactic object.
  2. A model of a theory is a concrete mathematical object that satisfies the theory’s rules.

For example, the vector space axioms form the theory of vector spaces, and 3\mathbb R^3 is a model of this theory.

Compactness

Suppose we have an inconsistent theory. That means we may derive a contradiction. The important thing about a contradiction is that it is finite, as it is a proof of a false statement, and every proof is a finite sequence of steps. This means that the contradiction must reference a finite number of rules.

Therefore, if a theory is inconsistent, it has a finite inconsistent subtheory. Taking the converse of this statement, we get the following:

A theory is consistent if every finite subtheory is consistent.

How does this prove our theorem? Here is how we do it: given a graph GG, we construct a theory that describes kk-colorings of GG. If it is consistent, then Godel’s Completeness says GG is kk-colorable.

Let me be a little more descriptive: our theory describes functions from VV (the set of vertices of GG) to the set 1,,k{1, \dots, k}. For every edge (u,v)E(u, v) \in E (the set of edges of GG), we have the following rule: the color of uu must not equal the color of vv (more formally, f(u)f(v)f(u) \neq f(v)).

To show the consistency of this theory, we just need to show the consistency of every finite subtheory. Each finite subtheory only references a finite number of vertices, say SS. And by assumption, the finite subgraph SS is kk-colorable, so the finite theory has a model. Therefore, it must be consistent.

And we have just proved the theorem!

Upwards Lowenheim-Skolem

Aka: Blowing up models of a theory.

There is a theorem that roughly says the following:

If I have a theory TT and an infinite model MM of TT, then I can construct a model MM' of TT that is as big as I wish.

Here is how you prove it: consider the theory TT' that consists of the rules in TT, as well as some rules expressing “I have λ\lambda many elements, and all of them are distinct.” (Here λ\lambda is a cardinality.) The sentences we use to specify they are distinct is “element cic_i and element cjc_j are not equal” for every pair of elements ci,cjc_i, c_j whose existences we mandate.1

If we have a model of TT', then it is also a model of TT with λ\lambda many elements. By Godel’s Completeness, we just need to show TT' is consistent. And by compactness, we just need to appeal to finite subtheories.

Note that any finite subtheory references a finite number of elements cic_i. Therefore, all we need to do is have a finite number of distinct elements in our model of this finite subtheory. But since MM is infinite, it already does the trick.

Limitations of first-order logic

You may know about the Archimedean property of an ordered field, which states

A field FF is Archimedean if for every xFx \in F, there is some nn \in \mathbb N such that n>xn > x.

In English, it states that for every element of the field, there is a larger natural number. Most ordered fields you know are Archimedean; think the rationals and reals.

In propositional logic, we can write things such as “pqp \implies q”. First-order logic allows us to access the entire universe of our model: for instance, if we are working in the theory of ordered fields, then we can write statements such as “for all elements xx in our field FF, if xx is not 00, then xx has an inverse; furthermore, that inverse has the same sign as xx.”

The Archimedean property is what we call a “second-order property”. This is because we have two universes we are quantifying over: we are writing xF\forall x \in F, which is quantifying over FF (first-order), but then we have n\exists n \in \mathbb N, and quantifying over \mathbb N is not something you can do in first order logic.

You may try to express the Archimedean property in first order logic. You may even try to establish a theory with an infinite number of sentences that is equivalent to being Archimedean (i.e. if it is satisfied, then the ordered field is Archimedean, and if it is not satisfied, then the ordered field is not Archimedean). Both of these will fail. Is there a way to prove this?

It turns out Upwards Lowenheim Skolem gives us a very easy way to prove this. There is one important thing you need to know: every Archimedean field is isomorphic to a subfield of \mathbb R. In particular, this means that no Archimedean field has a bigger cardinality. Just take this fact for granted.

Great. Now assume for the sake of contradiction that there is some theory of Archimedean ordered fields. We have an infinite Archimedean ordered field: \mathbb R. Now blow it up to a model with cardinality larger than |||\mathbb R| that satisfies this theory, contradiction.

There are other properties that cannot be expressed in the language of first order logic. Two of them are the phrase “this field is algebraic” and “this ordering is a well-ordering”. And the way we prove neither of these are expressible is quite similar to the proof for the Archimedean property.


  1. This part is a little loosey-goosey: I have skipped over a lot of technical setup to make this series more approachable without talking precisely about what a “language” is in model theory. I chose to make this tradeoff because the point is to showcase some of the cooler, more easily accessible aspects of model theory without getting drowned in technicalities. There are a plethora of books that develop this subject in greater detail, so I will not tread the same path as them.↩︎