# Ultraproduct

The ultraproduct is a mathematical construction that appears mainly in abstract algebra and mathematical logic, in particular in model theory and set theory. An ultraproduct is a quotient of the direct product of a family of structures. All factors need to have the same signature. The ultrapower is the special case of this construction in which all factors are equal.
For example, ultrapowers can be used to construct new fields from given ones. The hyperreal numbers, an ultrapower of the real numbers, are a special case of this.
Some striking applications of ultraproducts include very elegant proofs of the compactness theorem and the completeness theorem, Keisler's ultrapower theorem, which gives an algebraic characterization of the semantic notion of elementary equivalence, and the Robinson–Zakon presentation of the use of superstructures and their monomorphisms to construct nonstandard models of analysis, leading to the growth of the area of nonstandard analysis, which was pioneered (as an application of the compactness theorem) by Abraham Robinson.

## Definition

The general method for getting ultraproducts uses an index set $I,$ a structure $M_{i}$ (assumed to be non-empty in this article) for each element $i\in I$ (all of the same signature), and an ultrafilter ${\mathcal {U}}$ on $I.$
For any two elements $a_{\bullet }=\left(a_{i}\right)_{i\in I}$ and $b_{\bullet }=\left(b_{i}\right)_{i\in I}$ of the Cartesian product ∏$_{i∈I}$M$_i$, {\textstyle {\textstyle \prod \limits _{i\in I}}M_{i}, } declare them to be ${\mathcal {U}}$-equivalent, written $a_{\bullet }\sim b_{\bullet }$ or $a_{\bullet }=_{\mathcal {U}}b_{\bullet },$ if and only if the set of indices $\left\{i\in I:a_{i}=b_{i}\right\}$ on which they agree is an element of ${\mathcal {U}};$ in symbols, $a_{\bullet }\sim b_{\bullet }\;\iff \;\left\{i\in I:a_{i}=b_{i}\right\}\in {\mathcal {U}},$ which compares components only relative to the ultrafilter ${\mathcal {U}}.$
This binary relation $\,\sim \,$ is an equivalence relation on the Cartesian product ${\textstyle \prod \limits _{i\in I}}M_{i}.$
The ultraproduct of $M_{\bullet }=\left(M_{i}\right)_{i\in I}$ modulo ${\mathcal {U}}$ is the quotient set of ${\textstyle \prod \limits _{i\in I}}M_{i}$ with respect to $\sim$ and is therefore sometimes denoted by ${\textstyle \prod \limits _{i\in I}}M_{i}\,/\,{\mathcal {U}}$ or ${\textstyle \prod }_{\mathcal {U}}\,M_{\bullet }.$
Explicitly, if the ${\mathcal {U}}$-equivalence class of an element $a\in {\textstyle \prod \limits _{i\in I}}M_{i}$ is denoted by $a_{\mathcal {U}}:={\big \x\in {\textstyle \prod \limits _{i\in I}}M_{i}\;:\;x\sim a{\big \}}$ then the ultraproduct is the set of all ${\mathcal {U}}$-equivalence classes ${\prod }_{\mathcal {U}}\,M_{\bullet }\;=\;\prod _{i\in I}M_{i}\,/\,{\mathcal {U}}\;:=\;\left\{a_{\mathcal {U}}\;:\;a\in {\textstyle \prod \limits _{i\in I}}M_{i}\right\}.$
Although ${\mathcal {U}}$ was assumed to be an ultrafilter, the construction above can be carried out more generally whenever ${\mathcal {U}}$ is merely a filter on $I,$ in which case the resulting quotient set ${\textstyle \prod \limits _{i\in I}}M_{i}/\,{\mathcal {U}}$ is called a reduced product.
When ${\mathcal {U}}$ is a principal ultrafilter (which happens if and only if ${\mathcal {U}}$ contains its kernel $\cap \,{\mathcal {U}}$) then the ultraproduct is isomorphic to one of the factors. And so usually, ${\mathcal {U}}$ is not a principal ultrafilter, which happens if and only if ${\mathcal {U}}$ is free (meaning $\cap \,{\mathcal {U}}=\varnothing$), or equivalently, if every cofinite subset of $I$ is an element of ${\mathcal {U}}.$ Since every ultrafilter on a finite set is principal, the index set $I$ is consequently also usually infinite.
The ultraproduct acts as a filter product space where elements are equal if they are equal only at the filtered components (non-filtered components are ignored under the equivalence). One may define a finitely additive measure $m$ on the index set $I$ by saying $m(A)=1$ if $A\in {\mathcal {U}}$ and $m(A)=0$ otherwise. Then two members of the Cartesian product are equivalent precisely if they are equal almost everywhere on the index set. The ultraproduct is the set of equivalence classes thus generated.
Finitary operations on the Cartesian product ${\textstyle \prod \limits _{i\in I}}M_{i}$ are defined pointwise (for example, if $+$ is a binary function then $a_{i}+b_{i}=(a+b)_{i}$). Other relations can be extended the same way: $R\left(a_{\mathcal {U}}^{1},\dots ,a_{\mathcal {U}}^{n}\right)~\iff ~\left\{i\in I:R^{M_{i}}\left(a_{i}^{1},\dots ,a_{i}^{n}\right)\right\}\in {\mathcal {U}},$ where $a_{\mathcal {U}}$ denotes the ${\mathcal {U}}$-equivalence class of $a$ with respect to $\sim .$ In particular, if every $M_{i}$ is an ordered field then so is the ultraproduct.

### Ultrapower

An ultrapower is an ultraproduct for which all the factors $M_{i}$ are equal. Explicitly, the ultrapower of a set $M$ modulo ${\mathcal {U}}$ is the ultraproduct ${\textstyle \prod \limits _{i\in I}}M_{i}\,/\,{\mathcal {U}}={\textstyle \prod }_{\mathcal {U}}\,M_{\bullet }$ of the indexed family $M_{\bullet }:=\left(M_{i}\right)_{i\in I}$ defined by $M_{i}:=M$ for every index $i\in I.$ The ultrapower may be denoted by ${\textstyle \prod }_{\mathcal {U}}\,M$ or (since ${\textstyle \prod \limits _{i\in I}}M$ is often denoted by $M^{I}$) by $M^{I}/{\mathcal {U}}~:=~\prod _{i\in I}M\,/\,{\mathcal {U}}\,$
For every $m\in M,$ let $(m)_{i\in I}$ denote the constant map $I\to M$ that is identically equal to $m.$ This constant map/tuple is an element of the Cartesian product $M^{I}={\textstyle \prod \limits _{i\in I}}M$ and so the assignment $m\mapsto (m)_{i\in I}$ defines a map $M\to {\textstyle \prod \limits _{i\in I}}M.$ The natural embedding of $M$ into ${\textstyle \prod }_{\mathcal {U}}\,M$ is the map $M\to {\textstyle \prod }_{\mathcal {U}}\,M$ that sends an element $m\in M$ to the ${\mathcal {U}}$-equivalence class of the constant tuple $(m)_{i\in I}.$

## Examples

The hyperreal numbers are the ultraproduct of one copy of the real numbers for every natural number, with regard to an ultrafilter over the natural numbers containing all cofinite sets. Their order is the extension of the order of the real numbers. For example, the sequence $\omega$ given by $\omega _{i}=i$ defines an equivalence class representing a hyperreal number that is greater than any real number.
Analogously, one can define nonstandard integers, nonstandard complex numbers, etc., by taking the ultraproduct of copies of the corresponding structures.
As an example of the carrying over of relations into the ultraproduct, consider the sequence $\psi$ defined by $\psi _{i}=2i.$ Because $\psi _{i}>\omega _{i}=i$ for all $i,$ it follows that the equivalence class of $\psi _{i}=2i$ is greater than the equivalence class of $\omega _{i}=i,$ so that it can be interpreted as an infinite number which is greater than the one originally constructed. However, let $\chi _{i}=i$ for $i$ not equal to $7,$ but $\chi _{7}=8.$ The set of indices on which $\omega$ and $\chi$ agree is a member of any ultrafilter (because $\omega$ and $\chi$ agree almost everywhere), so $\omega$ and $\chi$ belong to the same equivalence class.
In the theory of large cardinals, a standard construction is to take the ultraproduct of the whole set-theoretic universe with respect to some carefully chosen ultrafilter ${\mathcal {U}}.$ Properties of this ultrafilter ${\mathcal {U}}$ have a strong influence on (higher order) properties of the ultraproduct; for example, if ${\mathcal {U}}$ is $\sigma$-complete, then the ultraproduct will again be well-founded. (See measurable cardinal for the prototypical example.)

## Łoś's theorem

Łoś's theorem, also called the fundamental theorem of ultraproducts, is due to Jerzy Łoś (the surname is pronounced, approximately "wash"). It states that any first-order formula is true in the ultraproduct if and only if the set of indices $i$ such that the formula is true in $M_{i}$ is a member of ${\mathcal {U}}.$ More precisely:
Let $\sigma$ be a signature, ${\mathcal {U}}$ an ultrafilter over a set $I,$ and for each $i\in I$ let $M_{i}$ be a $\sigma$-structure. Let ${\textstyle \prod }_{\mathcal {U}}\,M_{\bullet }$ or ${\textstyle \prod \limits _{i\in I}}M_{i}/{\mathcal {U}}$ be the ultraproduct of the $M_{i}$ with respect to ${\mathcal {U}}.$ Then, for each $a^{1},\ldots ,a^{n}\in {\textstyle \prod \limits _{i\in I}}M_{i},$ where $a^{k}=\left(a_{i}^{k}\right)_{i\in I},$ and for every $\sigma$-formula $\phi ,$ ${\prod }_{\mathcal {U}}\,M_{\bullet }\models \phi \left[a_{\mathcal {U}}^{1},\ldots ,a_{\mathcal {U}}^{n}\right]~\iff ~\{i\in I:M_{i}\models \phi [a_{i}^{1},\ldots ,a_{i}^{n}]\}\in {\mathcal {U}}.$
The theorem is proved by induction on the complexity of the formula $\phi .$ The fact that ${\mathcal {U}}$ is an ultrafilter (and not just a filter) is used in the negation clause, and the axiom of choice is needed at the existential quantifier step. As an application, one obtains the transfer theorem for hyperreal fields.

### Examples

Let $R$ be a unary relation in the structure $M,$ and form the ultrapower of $M.$ Then the set $S=\{x\in M:Rx\}$ has an analog $^{*}S$ in the ultrapower, and first-order formulas involving $S$ are also valid for $^{*}S.$ For example, let $M$ be the reals, and let $Rx$ hold if $x$ is a rational number. Then in $M$ we can say that for any pair of rationals $x$ and $y,$ there exists another number $z$ such that $z$ is not rational, and $x<z<y.$ Since this can be translated into a first-order logical formula in the relevant formal language, Łoś's theorem implies that $^{*}S$ has the same property. That is, we can define a notion of the hyperrational numbers, which are a subset of the hyperreals, and they have the same first-order properties as the rationals.
Consider, however, the Archimedean property of the reals, which states that there is no real number $x$ such that $x>1,\;x>1+1,\;x>1+1+1,\ldots$ for every inequality in the infinite list. Łoś's theorem does not apply to the Archimedean property, because the Archimedean property cannot be stated in first-order logic. In fact, the Archimedean property is false for the hyperreals, as shown by the construction of the hyperreal number $\omega$ above.

## Direct limits of ultrapowers (ultralimits)

In model theory and set theory, the direct limit of a sequence of ultrapowers is often considered. In model theory, this construction can be referred to as an ultralimit or limiting ultrapower.
Beginning with a structure, $A_{0}$ and an ultrafilter, ${\mathcal {D}}_{0},$ form an ultrapower, $A_{1}.$ Then repeat the process to form $A_{2},$ and so forth. For each $n$ there is a canonical diagonal embedding $A_{n}\to A_{n+1}.$ At limit stages, such as $A_{\omega },$ form the direct limit of earlier stages. One may continue into the transfinite.

## Ultraproduct monad

The ultrafilter monad is the codensity monad of the inclusion of the category of finite sets into the category of all sets.
Similarly, the ultraproduct monad is the codensity monad of the inclusion of the category $\mathbf {FinFam}$ of finitely-indexed families of sets into the category $\mathbf {Fam}$ of all indexed families of sets. So in this sense, ultraproducts are categorically inevitable. Explicitly, an object of $\mathbf {Fam}$ consists of a non-empty index set $I$ and an indexed family $\left(M_{i}\right)_{i\in I}$ of sets. A morphism $\left(N_{i}\right)_{j\in J}\to \left(M_{i}\right)_{i\in I}$ between two objects consists of a function $\phi :I\to J$ between the index sets and a $J$-indexed family $\left(\phi _{j}\right)_{j\in J}$ of function $\phi _{j}:M_{\phi (j)}\to N_{j}.$ The category $\mathbf {FinFam}$ is a full subcategory of this category of $\mathbf {Fam}$ consisting of all objects $\left(M_{i}\right)_{i\in I}$ whose index set $I$ is finite. The codensity monad of the inclusion map $\mathbf {FinFam} \hookrightarrow \mathbf {Fam}$ is then, in essence, given by $\left(M_{i}\right)_{i\in I}~\mapsto ~\left(\prod _{i\in I}M_{i}\,/\,{\mathcal {U}}\right)_{{\mathcal {U}}\in U(I)}\,.$