I am learning more about how to use ultrafilters by using them to prove several of the typical results which appear as applications of propositional (or first-order) compactness.
Generally speaking, as I try to work out the proofs, I begin to see that ultrafilters produce precise descriptions/specifications of certain desirable objects (in the sense of what we want to prove) in a way that the ultrafilter lists the (set-theoretic) properties that we want our hypothetical object to have. This is similar to what we do when we define the propositional atoms and the set of sentences encoding what we want to prove, and then proceed to showing satisfiability.
For example, consider the graph coloring theorem of De Bruijn–Erdős.
A graph $\Gamma$ is $k$-colorable if and only if every finite subgraph of $\Gamma$ is $k$-colorable.
Where $\Gamma=(G,\mathcal{A})$ (G is the set of vertices and $\mathcal{A}$ the binary relation definiting the edges), $k$ is a positive integer and a $k$-coloring of $\Gamma$ is a function $f:G\rightarrow \{c_{1},\ldots,c_{k}\}$ such that $f(u)\neq f(v)$ whenever $(u,v)\in \mathcal{A}$ (adjacent vertices have different colors).
Consider the $\Leftarrow$ implication, i.e. assume that every finite subgraph of $\Gamma$ is $k$-colorable.
Via propositional compactness: We define a language $L$ to consist of propositional atoms $p_{vi}$, for each vertex $v$ and each $1\leq i\leq k$. Intuitively, $p_{vi}$ expresses vertex $v$ gets color $c_{i}$ when true. Then we define $S$ to be the set of $L$-formulas:
- $(p_{v1}\vee\ldots\vee p_{vk})$ for all vertices $v\in G$.
- $\neg(p_{vi}\wedge p_{vj})$ for all $v\in G$ and $1 \leq i<j\leq k$.
- $\neg(p_{ui}\wedge p_{vi})$ for all $(u,v)\in \mathcal{A}$ and $1\leq i\leq k$.
And away we go proving finite satisfiability so that compactness will give us a truth valuation $v$ satisfying $S$, which we then use to define $k$-coloring $f$ of $\Gamma$ by $$f(v) = c_{i}\text{ iff }v(p_{vi})=\top.$$
Via ultrafilters: We consider the set $C$ of all functions $f:G\to\{c_{1},\ldots,c_{n}\}$, and for each finite set of vertices $H\subseteq G$ we let $$A_{H}=\{f\in F:f_{H}\text{ is a $k$-coloring of $\Gamma_{H}$}\},$$ where $\Gamma_{H}=(H,\mathcal{A}|_{H})$ denotes the finite subgraph of $\Gamma$ obtained by restricting $\mathcal{A}$ to $H$. Then we let $$F=\{X\in\mathcal{P}(C):A_{H}\subseteq X\text{ for some finite $H\subseteq G$}\}$$
Then $F$ is a filter on $\mathcal{P}(C)$ and it can be extended to an ultrafilter $U$ via the ultrafilter theorem. If for each vertex $v\in G$ and $1\leq i\leq k$ we let $$P_{vi}=\{f\in C:f(v)=c_{i}\}$$ the ultrafilter allows us to show that
- For any $v\in G$ there is some $1\leq i\leq k$ such that $P_{vi}\neq\emptyset$.
- For any $v\in G$ and $1\leq i<j\leq k$ we have $P_{vi}\cap P_{vj}=\emptyset$.
- For each $v\in G$ and $1\leq i<j\leq n$ $P_{vi}\sqcup \bar{P}_{vi}=C$, where $\sqcup$ denotes disjoint union and $\bar{P}_{vi}=\{f\in S:f(v)\neq c_{i}\}$. Hence, for each $v\in G$ and $1\leq i\leq k$ either $P_{vi}\in U$ or $\bar{P}_{vi}\in U$.
Therefore, the ultrafilter gives us the $k$-coloring, since 1-3 above show that for each $v\in G$ there is a unique $i_{v}$ such that $P_{vi_{v}}\in U$, effectively defininig a $k$-coloring of $\Gamma$ by $$f(v) = c_{i}\text{ iff } P_{vi}\in U$$ in which case $f(v)=i_{v}$.
The suggestive relationship between the propositional atoms $p_{vi}$ and the sets $P_{vi}$ is clear. Moreover, so is the relationship between 1-3 defininig the propositional theory $S$ and 1-3 of the ultrafilter approach. Hence, in a rough, imprecise sense, I can see that the ultrafilter $U$ "is" the theory $S$. The ultrafilter is like a truth-tester of what we want, playing the role of $v$. That is $$P_{vi}\in U\text{ iff }v(p_{vi})=\top.$$
That is, the desired $k$-coloring of $\Gamma$ will be given by $v$ (satisfying $S$) or equivalently by $U$.
Questions: What is the precise relationship between propositional or first-order (satisfiable) theories and ultrafilters? Since logical compactness and the ultrafilter theorem are $\mathsf{ZF}$-equivalent, is there a standard way of "translating" a proof via logical compactness into a proof via ultrafilters, and vice versa?
I would be very appreciative if standard references are provided, as I am learning all of this on my own, with only online access.
The relationship is Boolean algebras
Let $A, B$ be boolean algebras with $\phi:A\to B$ a surjective homomorphism. The corresponding filter is $F_\phi=\{a\in A: \phi(a) = 1_B$}. If $B\simeq\{0, 1\}$ then $F_\phi$ is an ultrafilter.
Conversely, let $F$ be a filter in $A$. You can construct a quotient algebra $B=A/F$ from this. The equivalence relation on $A$ to construct the quotient is $$a_1 \equiv_F a_2 \iff ((a_1 \land a_2)\lor (\neg a_1 \land \neg a_2))\in F$$ In particular $a\equiv_F 1_A \iff (a\land 1_A)\in F\iff a\in F$. The quotient map $\phi_F: A\to A/F$ is simply the map sending each element to its equivalence class. If $F$ is an ultrafilter then $A/F\simeq \{0,1\}$.
Now let $S$ be a set of propositional atoms. Let $A(S)$ be the free boolean algebra on $S$. To say that some theory $T\subseteq A(S)$ has a model is equivalent to saying there is a homomorphism $\psi:A(S)\to\{0,1\}$ such that $\psi(t)=1$ for all $t \in T$. This is equivalent to saying there is an ultrafilter containing $T$. By the ultrafilter lemma, this is equivalent to saying there is some filter containing $T$. This in turn is equivalent to saying that $T$ is a filter sub-base. A filter sub-base is a collection that satisfies the 'finite meet property' - i.e. if $u_1,\dots,u_n\in T$ then $u_1\land\dots\land u_n \ne 0$. Since it is apparent that $T$ has the 'finite meet property' iff every finite subset of $T$ has the 'finite meet property' - the compactness theorem is equivalent to the ultrafilter lemma.
For completion of terminology - A filter base is a subset that is closed under finite meets and does not contain zero. If $T$ is a filter subbase then the collection of all finite meets of members of $T$ is a filter base. If $T$ is a filter base then the set $\{x: \exists t\in T\; t\lor x = x$} is a filter. It is the smallest filter containing the filter base (or subbase) you start from. Notice that $t\lor x=x \iff t\le x$ is the order relation in a Boolean algebra.
Edit: the argument in the 2nd to last paragraph shows that ultrafilter lemma $\implies$ compactness theorem. The opposite direction needs more work. If $F$ is a filter, it satisfies the 'finite meet property'. It is enough to show that any $\psi = \phi_1\land\dots\land\phi_n \ne 0$ has a model. This is a theorem of boolean algebra on finitely many atomic propositions that a formula that is not a contradiction has a satisfying assignment. It is proved by induction on the number of atomic propositions (or length of the formula) by showing a formula can be converted to disjunctive normal form. In DNF - if the formula is not zero, the satisying assignments can be read directly from the conjunctions that join to make it up. Finally, any finite subset of $F$ has a model so by compactness $F$ has a model which is equivalent to saying $F$ is contained in an ultrafilter.