# Definable set

In mathematical logic, a definable set is an n-ary relation on the domain of a structure whose elements are precisely those elements satisfying some formula in the first-order language of that structure. A set can be defined with or without parameters, which are elements of the domain that can be referenced in the formula defining the relation.

## Definition

Let ${\displaystyle {\mathcal {L}}}$ be a first-order language, ${\displaystyle {\mathcal {M}}}$ an ${\displaystyle {\mathcal {L}}}$-structure with domain ${\displaystyle M}$, ${\displaystyle X}$ a fixed subset of ${\displaystyle M}$, and ${\displaystyle m}$ a natural number. Then:

• A set ${\displaystyle A\subseteq M^{m}}$ is definable in ${\displaystyle {\mathcal {M}}}$ with parameters from ${\displaystyle X}$ if and only if there exists a formula ${\displaystyle \varphi [x_{1},\ldots ,x_{m},y_{1},\ldots ,y_{n}]}$ and elements ${\displaystyle b_{1},\ldots ,b_{n}\in X}$ such that for all ${\displaystyle a_{1},\ldots ,a_{m}\in M}$,
${\displaystyle (a_{1},\ldots ,a_{m})\in A}$ if and only if ${\displaystyle {\mathcal {M}}\models \varphi [a_{1},\ldots ,a_{m},b_{1},\ldots ,b_{n}]}$
The bracket notation here indicates the semantic evaluation of the free variables in the formula.
• A set ${\displaystyle A}$ is definable in ${\displaystyle {\mathcal {M}}}$ without parameters if it is definable in ${\displaystyle {\mathcal {M}}}$ with parameters from the empty set (that is, with no parameters in the defining formula).
• A function is definable in ${\displaystyle {\mathcal {M}}}$ (with parameters) if its graph is definable (with those parameters) in ${\displaystyle {\mathcal {M}}}$.
• An element ${\displaystyle a}$ is definable in ${\displaystyle {\mathcal {M}}}$ (with parameters) if the singleton set ${\displaystyle \{a\}}$ is definable in ${\displaystyle {\mathcal {M}}}$ (with those parameters).

## Examples

### The natural numbers with only the order relation

Let ${\displaystyle {\mathcal {N}}=(\mathbb {N} ,<)}$ be the structure consisting of the natural numbers with the usual ordering. Then every natural number is definable in ${\displaystyle {\mathcal {N}}}$ without parameters. The number ${\displaystyle 0}$ is defined by the formula ${\displaystyle \varphi (x)}$ stating that there exist no elements less than x:

${\displaystyle \varphi =\neg \exists y(y

and a natural ${\displaystyle n>0}$ is defined by the formula ${\displaystyle \varphi (x)}$ stating there exist exactly ${\displaystyle n}$ elements less than x:

${\displaystyle \varphi =\exists x_{0}\cdots \exists x_{n-1}(x_{0}

In contrast, one cannot define any specific integer without parameters in the structure ${\displaystyle {\mathcal {Z}}=(\mathbb {Z} ,<)}$ consisting of the integers with the usual ordering (see the section on automorphisms below).

### The natural numbers with their arithmetical operations

Let ${\displaystyle {\mathcal {N}}=(\mathbb {N} ,+,\cdot ,<)}$ be the first-order structure consisting of the natural numbers and their usual arithmetic operations and order relation. The sets definable in this structure are known as the arithmetical sets, and are classified in the arithmetical hierarchy. If the structure is considered in second-order logic instead of first-order logic, the definable sets of natural numbers in the resulting structure are classified in the analytical hierarchy. These hierarchies reveal many relationships between definability in this structure and computability theory, and are also of interest in descriptive set theory.

### The field of real numbers

Let ${\displaystyle {\mathcal {R}}=(\mathbb {R} ,0,1,+,\cdot )}$ be the structure consisting of the field of real numbers. Although the usual ordering relation is not directly included in the structure, there is a formula that defines the set of nonnegative reals, since these are the only reals that possess square roots:

${\displaystyle \varphi =\exists y(y\cdot y\equiv x).}$

Thus any ${\displaystyle a\in \mathbb {R} }$ is nonnegative if and only if ${\displaystyle {\mathcal {R}}\models \varphi [a]}$. In conjunction with a formula that defines the additive inverse of a real number in ${\displaystyle {\mathcal {R}}}$, one can use ${\displaystyle \varphi }$ to define the usual ordering in ${\displaystyle {\mathcal {R}}}$: for ${\displaystyle a,b\in \mathbb {R} }$, set ${\displaystyle a\leq b}$ if and only if ${\displaystyle b-a}$ is nonnegative. The enlarged structure ${\displaystyle {\mathcal {R}}^{\leq }=(\mathbb {R} ,0,1,+,\cdot ,\leq )}$s is called a definitional extension of the original structure. It has the same expressive power as the original structure, in the sense that a set is definable over the enlarged structure from a set of parameters if and only if it is definable over the original structure from that same set of parameters.

The theory of ${\displaystyle {\mathcal {R}}^{\leq }}$ has quantifier elimination. Thus the definable sets are Boolean combinations of solutions to polynomial equalities and inequalities; these are called semi-algebraic sets. Generalizing this property of the real line leads to the study of o-minimality.

## Invariance under automorphisms

An important result about definable sets is that they are preserved under automorphisms.

Let ${\displaystyle {\mathcal {M}}}$ be an ${\displaystyle {\mathcal {L}}}$-structure with domain ${\displaystyle M}$, ${\displaystyle X\subseteq M}$, and ${\displaystyle A\subseteq M^{m}}$ definable in ${\displaystyle {\mathcal {M}}}$ with parameters from ${\displaystyle X}$. Let ${\displaystyle \pi :M\to M}$ be an automorphism of ${\displaystyle {\mathcal {M}}}$ which is the identity on ${\displaystyle X}$. Then for all ${\displaystyle a_{1},\ldots ,a_{m}\in M}$,
${\displaystyle (a_{1},\ldots ,a_{m})\in A}$ if and only if ${\displaystyle (\pi (a_{1}),\ldots ,\pi (a_{m}))\in A}$

This result can sometimes be used to classify the definable subsets of a given structure. For example, in the case of ${\displaystyle {\mathcal {Z}}=(\mathbb {Z} ,<)}$ above, any translation of ${\displaystyle {\mathcal {Z}}}$ is an automorphism preserving the empty set of parameters, and thus it is impossible to define any particular integer in this structure without parameters in ${\displaystyle {\mathcal {Z}}}$. In fact, since any two integers are carried to each other by a translation and its inverse, the only sets of integers definable in ${\displaystyle {\mathcal {Z}}}$ without parameters are the empty set and ${\displaystyle \mathbb {Z} }$ itself. In contrast, there are infinitely many definable sets of pairs (or indeed n-tuples for any fixed n>1) of elements of ${\displaystyle {\mathcal {Z}}}$, since any automorphism (translation) preserves the "distance" between two elements.