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\in I}\mathcal{M}_i \right)/\mathcal{U}}$ is an $\mathcal{L}$-structure defined as follows:


 * The universe of $\mathcal{M}$:

Let $X$ be the cartesian product $\prod_{i\in I}\mathcal{M}_i $.

Define an equivalence relation $\sim$ on $X$ by $(a_i)_{i\in I} \sim (b_i)_{i\in I}$ iff $\{i\in I\mid a_i = b_i \}\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 $(m_i)_\mathcal{U}$.


 * Interpretation of non-logical symbols of $\mathcal{L}$ in $\mathcal{M}$:

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

For each $n$-ary function symbol $f$, we define $f^\mathcal{M}$ by setting $f^\mathcal{M} ((m_{1,i})_\mathcal{U},\dots,(m_{n,i})_\mathcal{U})$ to be $(f^\mathcal{M_i} (m_{1,i},\dots,m_{n,i}))_\mathcal{U}$.

For each $n$-ary relation symbol $R$, we define $R^\mathcal{M}$ to be the set of $n$-tuples $((m_{1,i})_\mathcal{U},\dots,(m_{n,i})_\mathcal{U})$ from $\mathcal{M}$ such that $\{i\in I\mid (m_{1,i},\dots,m_{n,i})\in R^\mathcal{M}_i\}\in\mathcal{U}$.