An ultraproduct is a mathematical construction, of which the ultrapower (defined below) is a special case. Ultraproducts are used in abstract algebra to construct new fields from given ones, and in model theory, a branch of mathematical logic. In particular, it can be used in a "purely semantic" proof of the compactness theorem of first-order logic. One well-known use of ultraproducts is the construction of the hyperreal numbers by taking the ultraproduct of countably infinitely many copies of the field of real numbers.
The general method for getting ultraproducts uses an index set "I", a structure "M""i" for each element "i" of "I" (all of the same signature), and an ultrafilter "U" on "I". The usual choice is for "I" to be infinite and "U" to contain all cofinite subsets of "I". Otherwise the ultrafilter is principal, and the ultraproduct is isomorphic to one of the factors.
Algebraic operations on the Cartesian product
:
are defined in the usual way (for example, for a binary function +, ("a" + "b") "i" = "a""i" + "b""i" ), and an equivalence relation is defined by "a" ~ "b" if and only if
:
and the ultraproduct is the quotient set with regard to ~. The ultraproduct is therefore sometimes denoted by
:
One may define a finitely additive measure "m" on the index set "I" by saying "m"("A") = 1 if "A" ∈ "U" and = 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.
Other relations can be extended the same way: "a" "R" "b" if and only if
:
In particular, if every "M""i" is an ordered field, then so is the ultraproduct.
An ultrapower is an ultraproduct for which all the factors "M""i" are equal: