Definition:Ultraproduct

Definition
Let $\mathcal L$ be a first-order language and let $I$ be an infinite set.

Let $\mathcal U$ be an ultrafilter on $I$.

Let $\mathcal M_i$ be an $\mathcal L$-structure for each $i\in I$

The ultraproduct:
 * $\mathcal M := \displaystyle \left({\prod_{i \mathop \in I} \mathcal M_i }\right) / \mathcal U$

is an $\mathcal L$-structure defined as follows:


 * $(1): \quad$ The universe of $\mathcal M$:

Let $X$ be the cartesian product:
 * $\prod_{i \mathop \in I} \mathcal M_i$

Define an equivalence relation $\sim$ on $X$ by:
 * $\left({a_i}\right)_{i \mathop \in I} \sim \left({b_i}\right)_{i \mathop \in I}$ $\left\{ {i \in I: a_i = b_i}\right \} \in \mathcal U$

The universe of $\mathcal M$ is the set of equivalence classes of $X$ modulo $\sim$.

These are essentially sequences taken modulo the equivalence relation above, and are sometimes denoted $\left({m_i}\right)_\mathcal U$.


 * $(2): \quad$ Interpretation of non-logical symbols of $\mathcal L$ in $\mathcal M$:

For each constant symbol $c$, we define $c^\mathcal M$ to be $\left({c^{\mathcal M_i} }\right)_\mathcal U$.

For each $n$-ary function symbol $f$, we define $f^\mathcal M$ by setting:
 * $f^\mathcal M \left({\left({m_{1, i} }\right)_\mathcal U, \dotsc, \left({m_{n, i} }\right)_\mathcal U}\right)$

to be:
 * $\left({f^{\mathcal M_i} \left({m_{1, i}, \dotsc, m_{n, i} }\right)}\right)_\mathcal U$

For each $n$-ary relation symbol $R$, we define $R^\mathcal M$ to be the set of $n$-tuples:
 * $\left({\left({m_{1, i} }\right)_\mathcal U, \dots, \left({m_{n, i} }\right)_\mathcal U}\right)$ from $\mathcal M$

such that:
 * $\left\{ {i \in I: \left({m_{1, i}, \dotsc, m_{n, i} }\right) \in R^\mathcal M_i}\right\} \in \mathcal U$