Inmathematical logic, adefinable set is ann-aryrelation on thedomain of astructure whose elements satisfy someformula in thefirst-order language of that structure. Aset can be defined with or withoutparameters, which are elements of the domain that can be referenced in the formula defining the relation.
Let be a first-order language, an-structure with domain, a fixedsubset of, and anatural number. Then:
Let be the structure consisting of the natural numbers with the usual ordering. Then every natural number is definable in without parameters. The number is defined by the formula stating that there exist no elements less thanx:
and a natural number is defined by the formula stating that there exist exactly elements less thanx:
In contrast, one cannot define any specificinteger without parameters in the structure consisting of the integers with the usual ordering (see the section onautomorphisms below).
Let 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 thearithmetical sets, and are classified in thearithmetical hierarchy. If the structure is considered insecond-order logic instead of first-order logic, the definable sets of natural numbers in the resulting structure are classified in theanalytical hierarchy. These hierarchies reveal many relationships between definability in this structure andcomputability theory, and are also of interest indescriptive set theory.
Let be the structure consisting of thefield ofreal numbers[clarification needed]. 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:
Thus any is nonnegative if and only if. In conjunction with a formula that defines the additive inverse of a real number in, one can use to define the usual ordering in: for, set if and only if is nonnegative. The enlarged structure is called adefinitional 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.
Thetheory of hasquantifier elimination. Thus the definable sets areBoolean combinations of solutions to polynomial equalities and inequalities; these are calledsemi-algebraic sets. Generalizing this property of the real line leads to the study ofo-minimality.
An important result about definable sets is that they are preserved underautomorphisms which fix their parameter set.
This result can sometimes be used to classify the definable subsets of a given structure. For example, in the case of above, any translation of 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. In fact, since any two integers are carried to each other by a translation and its inverse, the only sets of integers definable in without parameters are the empty set and itself. In contrast, there are infinitely many definable sets of pairs (or indeedn-tuples for any fixedn > 1) of elements of: (in the casen = 2) Boolean combinations of the sets for. In particular, any automorphism (translation) preserves the "distance" between two elements.
TheTarski–Vaught test is used to characterize theelementary substructures of a given structure.