In many popular versions of axiomatic set theory, the **axiom schema of specification**,^{[1]} also known as the **axiom schema of separation** (*Aussonderung Axiom*),^{[2]} **subset axiom ^{[3]}** or

Some mathematicians call it the **axiom schema of comprehension**, although others use that term for ** unrestricted comprehension**, discussed below.

Because restricting comprehension avoided Russell's paradox, several mathematicians including Zermelo, Fraenkel, and Gödel considered it the most important axiom of set theory.^{[4]}

One instance of the schema is included for each formula in the language of set theory with as a free variable. So * does not occur free in .*^{[3]}^{[2]}^{[5]} In the formal language of set theory, the axiom schema is:

^{[3]}^{[1]}^{[5]}

or in words:

- Let be a formula. For every set there exists a set that consists of all the elements such that holds.
^{[3]}

Note that there is one axiom for every such predicate ; thus, this is an axiom schema.^{[3]}^{[1]}

To understand this axiom schema, note that the set * must be a subset of **A*. Thus, what the axiom schema is really saying is that, given a set * and a predicate , we can find a subset ** of **A* whose members are precisely the members of *A* that satisfy . By the axiom of extensionality this set is unique. We usually denote this set using set-builder notation as . Thus the essence of the axiom is:

- Every subclass of a set that is defined by a predicate is itself a set.

The preceding form of separation was introduced in 1930 by Thoralf Skolem as a refinement of a previous, non-first-order^{[6]} form by Zermelo.^{[7]} The axiom schema of specification is characteristic of systems of axiomatic set theory related to the usual set theory ZFC, but does not usually appear in radically different systems of alternative set theory. For example, New Foundations and positive set theory use different restrictions of the axiom of comprehension of naive set theory. The Alternative Set Theory of Vopenka makes a specific point of allowing proper subclasses of sets, called semisets. Even in systems related to ZFC, this scheme is sometimes restricted to formulas with bounded quantifiers, as in Kripke–Platek set theory with urelements.

The axiom schema of specification is implied by the axiom schema of replacement together with the axiom of empty set.^{[8]}^{[a]}

The *axiom schema of replacement* says that, if a function is definable by a formula , then for any set , there exists a set :

- .
^{[8]}

To derive the axiom schema of specification, let be a formula and a set, and define the function such that if is true and if is false, where such that is true. Then the set guaranteed by the axiom schema of replacement is precisely the set required in the axiom schema of specification. If does not exist, then in the axiom schema of specification is the empty set, whose existence (i.e., the axiom of empty set) is then needed.^{[8]}

For this reason, the axiom schema of specification is left out of some axiomatizations of ZF (Zermelo-Frankel) set theory,^{[9]} although some authors, despite the redundancy, include both.^{[10]} Regardless, the axiom schema of specification is notable because it was in Zermelo's original 1908 list of axioms, before Fraenkel invented the axiom of replacement in 1922.^{[9]} Additionally, if one takes ZFC set theory (i.e., ZF with the axiom of choice), removes the axiom of replacement and the axiom of collection, but keeps the axiom schema of specification, one gets the weaker system of axioms called **ZC** (i.e., Zermelo's axioms, plus the axiom of choice).^{[11]}

This section does not cite any sources. Please help improve this section by adding citations to reliable sources. Unsourced material may be challenged and removed. (June 2024) (Learn how and when to remove this message)

See also: Basic Law V |

The **axiom schema of unrestricted comprehension** reads:

that is:

There exists a set B whose members are precisely those objects that satisfy the predicate φ.

This set B is again unique, and is usually denoted as {`x` : `φ`(`x`, w_{1}, ..., `w`_{b})}.

This axiom schema was tacitly used in the early days of naive set theory, before a strict axiomatization was adopted. However, it was later discovered to lead directly to Russell's paradox, by taking `φ`(`x`) to be ¬(`x` ∈ `x`) (i.e., the property that set x is not a member of itself). Therefore, no useful axiomatization of set theory can use unrestricted comprehension. Passing from classical logic to intuitionistic logic does not help, as the proof of Russell's paradox is intuitionistically valid.

Accepting only the axiom schema of specification was the beginning of axiomatic set theory. Most of the other Zermelo–Fraenkel axioms (but not the axiom of extensionality, the axiom of regularity, or the axiom of choice) then became necessary to make up for some of what was lost by changing the axiom schema of comprehension to the axiom schema of specification – each of these axioms states that a certain set exists, and defines that set by giving a predicate for its members to satisfy, i.e. it is a special case of the axiom schema of comprehension.

It is also possible to prevent the schema from being inconsistent by restricting which formulae it can be applied to, such as only stratified formulae in New Foundations (see below) or only positive formulae (formulae with only conjunction, disjunction, quantification and atomic formulae) in positive set theory. Positive formulae, however, typically are unable to express certain things that most theories can; for instance, there is no complement or relative complement in positive set theory.

This section does not cite any sources. Please help improve this section by adding citations to reliable sources. Unsourced material may be challenged and removed. (June 2024) (Learn how and when to remove this message)

In von Neumann–Bernays–Gödel set theory, a distinction is made between sets and classes. A class C is a set if and only if it belongs to some class E. In this theory, there is a theorem schema that reads

that is,

There is a class D such that any class C is a member of D if and only if C is a set that satisfies P.

provided that the quantifiers in the predicate P are restricted to sets.

This theorem schema is itself a restricted form of comprehension, which avoids Russell's paradox because of the requirement that C be a set. Then specification for sets themselves can be written as a single axiom

that is,

Given any class D and any set A, there is a set B whose members are precisely those classes that are members of both A and D.

or even more simply

In this axiom, the predicate P is replaced by the class D, which can be quantified over. Another simpler axiom which achieves the same effect is

that is,

A subclass of a set is a set.

This section does not cite any sources. Please help improve this section by adding citations to reliable sources. Unsourced material may be challenged and removed. (June 2024) (Learn how and when to remove this message)

In a typed language where we can quantify over predicates, the axiom schema of specification becomes a simple axiom. This is much the same trick as was used in the NBG axioms of the previous section, where the predicate was replaced by a class that was then quantified over.

In second-order logic and higher-order logic with higher-order semantics, the axiom of specification is a logical validity and does not need to be explicitly included in a theory.

In the New Foundations approach to set theory pioneered by W. V. O. Quine, the axiom of comprehension for a given predicate takes the unrestricted form, but the predicates that may be used in the schema are themselves restricted. The predicate (C is not in C) is forbidden, because the same symbol C appears on both sides of the membership symbol (and so at different "relative types"); thus, Russell's paradox is avoided. However, by taking `P`(`C`) to be (`C` = `C`), which is allowed, we can form a set of all sets. For details, see stratification.