This question is taken from exercise 2.5.2 in David Marker's Model Theory: An Introduction.
The question is:
Suppose that [a theory] $T$ has arbitrarily large finite models. Show that $T$ has an infinite model.
My first idea for how to prove this was to use an ultraproduct; the argument is shown below. One recommendation in this answer is to use compactness; this argument is also shown below. I'm curious if there are any other ways to prove this result.
What are some alternative ways to prove that $T$ has an infinite model besides using compactness or ultraproduct?
What follows is my attempt to prove this result using the two methods I listed.
This is my attempt to prove this result using ultraproduct.
The first idea that popped into my head for how to do this is to use the ultraproduct construction.
Let $a_1 < a_2 < \cdots $ be a strictly increasing sequence of positive integers.
Let $M_1, M_2, \cdots$ be a sequence of models of $T$ such that $|M_i| = |a_i|$.
Let $S$ be the set of all sequences of elements of $M_i$, i.e. sequences of the form $t_1, t_2, \cdots$ where $t_i \in M_i$.
I now define an equivalence relation $\simeq$.
$$ a \simeq b \iff (\exists n \mathop. \forall w > n \mathop. a_w = b_w) $$
For each function symbol $f$ in $T$, let the interpretation of $f$ be the componentwise application of $f$.
$$ f((t_1, t_2, \cdots), (t'_1, t'_2, \cdots), \cdots) = (f(t_1, t'_1, \cdots), f(t_2, t'_2, \cdots), \cdots) $$
Similarly, let $[\varphi]$ be $0$ if $\varphi$ is false and let $[\varphi]$ be $1$ if $\varphi$ is true.
Let $((t_1, t_2, \cdots), (t'_1, t'_2, \cdots), \cdots) \in R$ hold if and only if the following holds.
$$ \lim_{k \to \infty} [(t_k, t'_k, \cdots) \in R] = 1 $$
So, each function and relation symbol is defined on elements of $S$.
Let $S'$ be equal to $S / \simeq$. Note that $\simeq$ is a congruence with respect to the signature of $T$.
Let $M'$ be the model with universe $S'$ where each function and relation symbol of $T$ is defined by operating on canonical representatives of equivalence classes in $S'$.
This is my attempt to prove this result using compactness.
However, this question suggests an approach using compactness.
Let $\varphi^n$ be a sentence that is true of a structure $M$ if and only if $|M| \neq n$, call $n$ the index of $\varphi^n$.
Consider the theory $T' = T \cup \{ \varphi^1, \varphi^2, \cdots \}$.
Suppose $T'_0$ is a finite subset of $T'$. Let $m$ be the largest index of any $\varphi^\mathbb{N}$, or $1$ if there are no sentences from $\varphi^\mathbb{N}$ in $T'_0$.
By hypothesis, $T$ has a model $M$ of a size strictly greater than $m$. $M$ is a model of $T'_0$ as well since its cardinality isn't excluded by any sentence in $T'_0$.
Since every finite subset of $T'$ has a model, by compactness $T'$ has a model, call it $N$.
$N$ is infinite since its cardinality is not equal to any positive integer.