Set-Builder Notation and Specification

How do you write down "the set of all even integers between 10 and 100"? You want to do this without listing ninety numbers by hand. This is the concrete question that set-builder notation answers. It is one of the first tools every student of mathematics must master. The idea matters for a clear reason. Almost every set encountered beyond the simplest finite lists fits this pattern. This includes solution sets of equations and domains of functions. It also includes collections satisfying algebraic or logical conditions. These are described not by enumeration but by a defining property. Learning to read and write {x:P(x)}\{x : P(x)\} correctly matters greatly. It means learning to translate between the language of logic (predicates, quantifiers) and the language of sets. This translation underlies essentially all of higher mathematics. The big picture is simple. There are exactly two honest ways to specify a set. You can list its elements, or describe a property that its elements share. The first method, roster notation, is finite and concrete. But it is useless for infinite or large sets. The second, set-builder notation, is the general-purpose tool. However, it comes with a subtlety. This subtlety took mathematicians decades to fully tame. Not every "property" P(x)P(x) can be used to carve out a set from nothing. Doing so risks contradiction. This is the lesson of Russell's paradox. It leads to the axiom schema of Specification (also called Separation, or Aussonderung). This axiom restricts set-builder notation in an important way. It only allows carving subsets out of an already-given set. It does not allow conjuring a set out of thin air. This article gives the precise syntax and semantics of set-builder notation. It states and proves the basic theorem that specification always produces a well-defined set. It shows why unrestricted comprehension fails. It also works through examples that build fluency in reading and writing such expressions. Along the way we connect set-builder notation to its logical scaffolding. This scaffolding includes the notion of a predicate, quantifiers, and membership. The notation is thus understood as a derived convenience, not a primitive act of magic. By the end, you should be able to write set-builder definitions correctly. You should be able to translate between roster and set-builder forms. You should recognize when a "definition" is actually ill-formed or paradoxical. And you should see how this single idea seeds later topics. These include Subsets and Set Inclusion and The Empty Set.

Key takeaways
  • Sets can be specified by roster notation (listing elements) or set-builder notation {x:P(x)}\{x : P(x)\} (a defining property).
  • Set-builder notation really has two forms: unrestricted {x:P(x)}\{x : P(x)\} and restricted {x∈A:P(x)}\{x \in A : P(x)\}, and only the restricted form is safe in general.
  • The Axiom of Specification guarantees that {x∈A:P(x)}\{x \in A : P(x)\} is a genuine set for any set AA and any property PP.
  • Russell's paradox shows unrestricted comprehension {x:P(x)}\{x : P(x)\} over "everything" leads to contradiction — this is why restriction to a prior set AA is essential.
  • Membership in a set-builder set is a biconditional: y∈{x∈A:P(x)}  ⟺  (y∈A∧P(y))y \in \{x \in A : P(x)\} \iff (y \in A \wedge P(y)).
  • Careful reading of set-builder notation requires identifying the bound variable, the domain of quantification, and the defining condition separately.
  • Key idea: a set-builder expression is not a definition of a new mathematical universe but a filter applied to a set you already have.

Where this lives today

Set-builder notation is not a museum piece confined to introductory logic courses — it is the working vocabulary of virtually every branch of mathematics and its applications. In real analysis, sets like {x∈R:∣x−a∣<ε}\{x \in \mathbb{R} : |x - a| < \varepsilon\} define neighborhoods and underlie the ε\varepsilon–δ\delta formulation of limits and continuity. In linear algebra, the kernel of a linear map TT is defined by exactly this pattern, ker⁡T={v∈V:T(v)=0}\ker T = \{v \in V : T(v) = 0\}, and subspaces generally are specified as solution sets of linear conditions. In probability and statistics, events are subsets of a sample space Ω\Omega carved out by conditions, e.g. {ω∈Ω:X(ω)≤t}\{\omega \in \Omega : X(\omega) \le t\}, the basic building block of a random variable's distribution function. In computer science, set-builder notation underlies database query languages (SQL's `SELECT ... WHERE` clause is literally a restricted-comprehension operation over a table, mirroring {x∈A:P(x)}\{x \in A : P(x)\}), and list comprehensions in languages such as Python and Haskell are directly modeled on set-builder syntax. In cryptography, key spaces and valid-message sets are frequently defined by number-theoretic conditions in exactly this form, e.g. {x∈Zn∗:gcd⁡(x,n)=1}\{x \in \mathbb{Z}_n^* : \gcd(x,n)=1\}. Finally, in mathematical logic and computability theory, the entire theory of definability — which sets of numbers can be picked out by a formula in a given language — is a deep generalization of the elementary question this article addresses: for which properties PP, and relative to which ambient sets, does {x∈A:P(x)}\{x \in A : P(x)\} single out an interesting or decidable subset?

Ask the tutor: Why does restricting comprehension to {x∈A:P(x)}\{x \in A : P(x)\} block Russell's paradox even though the same property P(x)≡x∉xP(x) \equiv x \notin x is allowed?

DefinitionRoster Notation and Set-Builder Notation

Let AA be a set (assumed to already exist) and let P(x)P(x) be a property (a formula, in the sense of first-order logic, with one free variable xx, possibly with other parameters fixed) such that for every object yy, the sentence P(y)P(y) is either true or false.

Roster notation. For finitely many objects a1,a2,…,ana_1, a_2, \ldots, a_n, the expression

{a1,a2,…,an}\{a_1, a_2, \ldots, a_n\}

denotes the set whose elements are exactly a1,…,ana_1, \ldots, a_n; that is, for every object yy,

y∈{a1,…,an}  ⟺  (y=a1∨y=a2∨⋯∨y=an).y \in \{a_1, \ldots, a_n\} \iff (y = a_1 \vee y = a_2 \vee \cdots \vee y = a_n).

Restricted set-builder notation (Specification). Given a set AA and a property PP, the expression

{x∈A:P(x)}\{x \in A : P(x)\}

denotes the set whose elements are exactly the elements of AA that satisfy PP; that is, for every object yy,

y∈{x∈A:P(x)}  ⟺  (y∈A∧P(y)).y \in \{x \in A : P(x)\} \iff \big(y \in A \wedge P(y)\big).

(Some authors write {x∈A∣P(x)}\{x \in A \mid P(x)\}; the colon and vertical bar are interchangeable notation for "such that.")

Unrestricted set-builder notation. The expression

{x:P(x)}\{x : P(x)\}

is meant to denote the collection of all objects xx (in the entire mathematical universe) satisfying P(x)P(x), with the intended defining property

y∈{x:P(x)}  ⟺  P(y).y \in \{x : P(x)\} \iff P(y).

As we will prove, this unrestricted form does not always denote a set — it may fail to exist, or its assumed existence may produce a contradiction. It is a notational scheme, legitimate only when independently justified (for example, when it can be rewritten in restricted form relative to some known set AA).

Intuition

Think of a set AA as a room full of objects, and a property P(x)P(x) as a spotlight that can be shone on any object in the room to reveal whether it "lights up" (true) or stays dark (false). The set-builder expression {x∈A:P(x)}\{x \in A : P(x)\} is simply: walk around the room, and put into a bag every object that lights up. Crucially, you need the room (AA) to already exist before you can walk around it. You cannot shine a spotlight on "everything that could possibly exist" — there is no such room, and pretending there is leads to nonsense, as Russell's paradox will show. Reading a set-builder expression is a three-step parsing exercise. In {x∈A:P(x)}\{x \in A : P(x)\}, identify: (1) the bound variable xx, a dummy symbol with no meaning outside the braces; (2) the domain AA, the pre-existing set being filtered; (3) the condition P(x)P(x), a statement that becomes true or false once you substitute a specific object for xx. Changing the name of the bound variable changes nothing: {x∈A:P(x)}\{x \in A : P(x)\} and {t∈A:P(t)}\{t \in A : P(t)\} are the identical set. This is exactly analogous to the dummy variable in ∫01f(x) dx=∫01f(t) dt\int_0^1 f(x)\,dx = \int_0^1 f(t)\,dt.

Figure
Filtering a domain set AA down to {x∈A:P(x)}\{x \in A : P(x)\}
A 2 4 7 6 9 8 3 A = {2,3,4,6,7,8,9}, P(x): "x is even" 4 6 8 {x∈A:P(x)}

The dashed region inside AA marks exactly those elements for which the spotlight P(x)P(x) lit up; the boxed set on the right is the resulting set-builder set, containing 4,6,84, 6, 8 and nothing else. Notice that the notation makes no claim about why 4,6,84,6,8 are even — it simply packages the extension of the property (the collection of things satisfying it) as a set.

TheoremSpecification / Separation

Let AA be a set, and let P(x)P(x) be a property (a formula of one free variable xx, with parameters allowed to be fixed sets). Then there exists a set BB such that for every object yy,

y∈B  ⟺  (y∈A∧P(y)).y \in B \iff \big( y \in A \wedge P(y) \big).

Moreover, this set BB is unique, and we denote it B={x∈A:P(x)}B = \{x \in A : P(x)\}.

Proof

Existence. This is not proved from more basic set-theoretic principles; rather, it is postulated as an axiom (schema) of set theory, the Axiom of Specification (Separation, Aussonderung), one instance for each property PP: > For every set AA, there exists a set BB such that for all yy, y∈B  ⟺  (y∈A∧P(y))y \in B \iff (y \in A \wedge P(y)). This is legitimate as a foundational axiom because it only asserts the existence of a subcollection of an already-existing set AA — it does not assert that an arbitrary description picks out a set from the entire universe of all objects. (Contrast this with the unrestricted scheme discussed in the theorem below, which is inconsistent.) We take existence as given by this axiom for the remainder of the proof, and prove only uniqueness, which is a genuine deduction from the more basic Sets and Membership principle of Extensionality: two sets with exactly the same elements are equal.

Uniqueness. Suppose BB and B′B' both satisfy the defining biconditional:

y∈B  ⟺  (y∈A∧P(y)),y∈B′  ⟺  (y∈A∧P(y))y \in B \iff (y \in A \wedge P(y)), \qquad y \in B' \iff (y \in A \wedge P(y))

for every object yy. We show B=B′B = B' by Extensionality, i.e. by showing y∈B  ⟺  y∈B′y \in B \iff y \in B' for every yy. Fix an arbitrary object yy. Then:

y∈B  ⟺  (y∈A∧P(y))  ⟺  y∈B′.y \in B \iff (y \in A \wedge P(y)) \iff y \in B'.

The first biconditional holds because BB satisfies the defining property; the second holds because B′B' does, read in reverse. Since yy was arbitrary, we have shown

∀y (y∈B  ⟺  y∈B′),\forall y \,\big( y \in B \iff y \in B' \big),

and by Extensionality this gives B=B′B = B'. ■\blacksquare

∎

The proof technique used above is a direct combination of an existence axiom with the Extensionality principle to secure uniqueness — the standard two-step pattern ("an axiom gives existence; extensionality gives uniqueness") that recurs throughout axiomatic set theory whenever a new set-forming operation is introduced.

LemmaMembership Criterion

For any set AA, property PP, and object yy:

y∈{x∈A:P(x)}  ⟺  y∈A and P(y) is true.y \in \{x \in A : P(x)\} \iff y \in A \text{ and } P(y) \text{ is true}.

In particular, {x∈A:P(x)}⊆A\{x \in A : P(x)\} \subseteq A (every element of the set-builder set is an element of AA).

Proof

This is immediate from the defining biconditional in the Specification theorem: by definition {x∈A:P(x)}\{x \in A : P(x)\} is the unique set BB with y∈B  ⟺  (y∈A∧P(y))y \in B \iff (y \in A \wedge P(y)) for all yy. The subset claim follows because if y∈{x∈A:P(x)}y \in \{x \in A: P(x)\} then in particular y∈Ay \in A, by the left conjunct of the biconditional (this anticipates the formal treatment of ⊆\subseteq in Subsets and Set Inclusion). ■\blacksquare

∎
TheoremRussell's Paradox: Unrestricted Comprehension is Inconsistent

There is no set RR satisfying, for every object yy,

y∈R  ⟺  y∉y.y \in R \iff y \notin y.

Consequently, the unrestricted comprehension scheme — the assumption that for every property P(x)P(x) there exists a set {x:P(x)}\{x : P(x)\} with y∈{x:P(x)}  ⟺  P(y)y \in \{x: P(x)\} \iff P(y) for all yy — is inconsistent, and must be rejected as a foundational principle. In particular, "the set of all sets" and "the set of all sets not containing themselves" do not exist.

Proof

We argue by contradiction (reductio ad absurdum), the classical technique Russell used in 1901–1902. Suppose, for contradiction, that such a set RR exists, satisfying

∀y (y∈R  ⟺  y∉y).(∗)\forall y\, \big( y \in R \iff y \notin y \big). \tag{$\ast$}

Since (∗)(\ast) holds for every object yy, it holds in particular when we instantiate y:=Ry := R (this is a legitimate substitution because RR, having been assumed to exist, is itself an object, hence eligible to play the role of yy). Substituting gives:

R∈R  ⟺  R∉R.R \in R \iff R \notin R.

Now examine the two cases exhaustively, using the law of excluded middle (either R∈RR \in R or R∉RR \notin R, and not both). Case 1: R∈RR \in R. Then by the biconditional (left-to-right direction is not what we need; we use that R∈RR \in R is the left side, so by the biconditional the right side R∉RR \notin R must also hold). So R∈RR \in R implies R∉RR \notin R. Combined with the case hypothesis R∈RR \in R, we obtain both R∈RR \in R and R∉RR \notin R, a direct contradiction. Case 2: R∉RR \notin R. Then by the biconditional (right side holds, so left side holds too), R∈RR \in R. Combined with the case hypothesis R∉RR \notin R, we again obtain both R∈RR \in R and R∉RR \notin R, a contradiction. In both exhaustive cases we derive a contradiction. Since one of the two cases must hold (excluded middle) and each leads to contradiction, the original assumption — that RR exists satisfying (∗)(\ast) — must be false. Hence no such set RR exists.

Consequence for unrestricted comprehension. Suppose the unrestricted comprehension scheme held: for every property P(x)P(x) there is a set {x:P(x)}\{x : P(x)\} with y∈{x:P(x)}  ⟺  P(y)y \in \{x:P(x)\} \iff P(y) for all yy. Apply this to the property P(x):≡(x∉x)P(x) :\equiv (x \notin x). Then the scheme would produce a set R:={x:x∉x}R := \{x : x \notin x\} satisfying y∈R  ⟺  y∉yy \in R \iff y \notin y for all yy — exactly the set RR we just proved cannot exist. This is a contradiction, so the unrestricted comprehension scheme must be false (inconsistent) as a general principle. ■\blacksquare

∎

Notice precisely where restricted Specification escapes this paradox: applying Specification to the property P(x):≡(x∉x)P(x) :\equiv (x \notin x) relative to a fixed set AA produces {x∈A:x∉x}\{x \in A : x \notin x\}, and the proof above shows only that this set cannot equal AA itself (i.e., it cannot be that A={x∈A:x∉x}A = \{x \in A : x \notin x\} satisfies membership for all objects yy, only for y∈Ay \in A) — the diagonal argument stalls because we only ever get to instantiate y:=Ay := A if A∈AA \in A is itself in question, and the conclusion is merely that {x∈A:x∉x}∉A\{x \in A : x \notin x\} \notin A, which is perfectly consistent, not paradoxical. (This subtler fact is essentially the content of the standard proof that no set contains all sets, foreshadowed here and made precise once The Empty Set and further axioms are available.)

Worked examples

Example 1 — Translating a number-theoretic condition into set-builder form, and back. Let A={1,2,3,…,30}A = \{1,2,3,\ldots, 30\} (a finite set of integers), and let P(x)P(x) be the property "xx is divisible by 3 or xx is divisible by 7, but not both." Step 1: Unpack the property logically. Write D3(x)D_3(x) for "3∣x3 \mid x" and D7(x)D_7(x) for "7∣x7 \mid x". "Divisible by 3 or 7 but not both" is the exclusive or:

P(x):≡(D3(x)∨D7(x))∧¬(D3(x)∧D7(x)).P(x) :\equiv \big(D_3(x) \vee D_7(x)\big) \wedge \neg\big(D_3(x) \wedge D_7(x)\big).

Step 2: Determine, for each y∈Ay \in A, whether P(y)P(y) holds. Multiples of 33 in AA: 3,6,9,12,15,18,21,24,27,303,6,9,12,15,18,21,24,27,30. Multiples of 77 in AA: 7,14,21,287,14,21,28. Multiples of both (i.e. of 2121) in AA: just 2121. So the multiples of 33 or 77 are {3,6,7,9,12,14,15,18,21,24,27,28,30}\{3,6,7,9,12,14,15,18,21,24,27,28,30\} (13 numbers), and we must remove the one number, 2121, divisible by both, since PP requires exclusive or. Step 3: Write the roster form.

{x∈A:P(x)}={3,6,7,9,12,14,15,18,24,27,28,30}.\{x \in A : P(x)\} = \{3,6,7,9,12,14,15,18,24,27,28,30\}.

This set has 1212 elements. Let us double check by inclusion–exclusion: multiples of 3 in AA: 1010; multiples of 7 in AA: 44; multiples of 21 in AA: 11. Multiples of 3 or 7: 10+4−1=1310 + 4 - 1 = 13. Exclusive or removes the double-counted overlap entirely (not just once), so exclusive-or count =13−2(1)=11= 13 - 2(1) = 11? Let's recompute carefully rather than trust a memorized formula. The exclusive-or set is (multiples of 3 only) ∪\cup (multiples of 7 only). Multiples of 3 only: multiples of 3 minus multiples of 21, i.e. 10−1=910 - 1 = 9 numbers. Multiples of 7 only: multiples of 7 minus multiples of 21, i.e. 4−1=34 - 1 = 3 numbers. These two groups are disjoint (one is divisible by 3 and not 7, the other by 7 and not 3), so the total is 9+3=129 + 3 = 12, matching our direct list of 1212 elements above. Good — the direct enumeration and the counting argument agree, confirming ∣{x∈A:P(x)}∣=12|\{x\in A: P(x)\}| = 12. Step 4 — reading the notation. The bound variable is xx; the domain is A={1,…,30}A = \{1,\ldots,30\}; the condition is the exclusive-or statement P(x)P(x). Renaming the bound variable, {x∈A:P(x)}={n∈A:P(n)}\{x \in A : P(x)\} = \{n \in A : P(n)\} — identical set, different dummy letter.

Example 2 — A set-builder definition with a free parameter, and checking well-definedness. Fix a real number kk and let A=RA = \mathbb{R} (the set of real numbers — itself constructed via more advanced axioms, but here simply assumed available as a set to specify from, as is standard once real numbers have been built). Define

Sk={x∈R:x2−(k+1)x+k=0}.S_k = \{x \in \mathbb{R} : x^2 - (k+1)x + k = 0\}.

Here P(x):≡(x2−(k+1)x+k=0)P(x) :\equiv \big(x^2 - (k+1)x + k = 0\big) is a property with parameter kk: for each fixed real number kk, P(x)P(x) is a genuine one-free-variable predicate in xx, so Specification applies and SkS_k is a legitimate set for every value of kk. Solve to find SkS_k explicitly. Factor the quadratic:

x2−(k+1)x+k=(x−1)(x−k),x^2 - (k+1)x + k = (x-1)(x-k),

which one verifies by expanding: (x−1)(x−k)=x2−kx−x+k=x2−(k+1)x+k(x-1)(x-k) = x^2 - kx - x + k = x^2 - (k+1)x + k. ✓. So P(x)P(x) holds iff x=1x = 1 or x=kx = k. Hence:

  • If k≠1k \neq 1: the two roots 11 and kk are distinct, so Sk={1,k}S_k = \{1, k\}, a two-element set.
  • If k=1k = 1: the quadratic becomes (x−1)2=0(x-1)^2 = 0, whose only root is x=1x=1 (with multiplicity two, but a set does not record multiplicity), so S1={1}S_1 = \{1\}, a one-element set.

Why this matters for reading set-builder notation. The expression {x∈R:x2−(k+1)x+k=0}\{x \in \mathbb{R} : x^2-(k+1)x+k=0\} looks like it should "obviously" have two elements because it comes from a quadratic, but a careless reader might write Sk={1,k}S_k = \{1,k\} unconditionally and get the wrong answer (indeed, an ill-defined roster listing, since {1,1}\{1,1\} and {1}\{1\} denote the same set, but a student might mistakely think S1S_1 has two elements). The set-builder definition is always well-defined by the Specification theorem regardless of kk; it is only the roster re-description {1,k}\{1,k\} that requires a case split at k=1k=1 to state correctly. This illustrates that set-builder notation is often more robust and less error-prone than trying to force a roster form onto a parametrized family. Numerical check at k=5k = 5: S5={x∈R:x2−6x+5=0}={x:(x−1)(x−5)=0}={1,5}S_5 = \{x \in \mathbb{R}: x^2 - 6x + 5 = 0\} = \{x : (x-1)(x-5) = 0\} = \{1,5\}. Direct substitution: 12−6(1)+5=1−6+5=01^2 - 6(1)+5 = 1-6+5=0 ✓, and 52−6(5)+5=25−30+5=05^2 - 6(5)+5 = 25-30+5=0 ✓. Both check out, confirming S5={1,5}S_5=\{1,5\} correctly by the general formula with k=5≠1k=5 \neq 1.

CounterexampleDropping the requirement of a prior set AA breaks Specification

The Specification theorem requires that B={x∈A:P(x)}B = \{x \in A : P(x)\} be built from an already-existing set AA. If we drop this hypothesis and instead permit the unrestricted scheme

{x:P(x)}withy∈{x:P(x)}  ⟺  P(y) for all y,\{x : P(x)\} \quad \text{with} \quad y \in \{x:P(x)\} \iff P(y) \text{ for all } y,

with no reference to any prior set AA, the conclusion of the theorem (that this always defines a set) fails outright. Take P(x):≡(x∉x)P(x) :\equiv (x \notin x), exactly as in the proof of Russell's Paradox above. If unrestricted comprehension were valid, it would produce a set

R={x:x∉x}R = \{x : x \notin x\}

satisfying y∈R  ⟺  y∉yy \in R \iff y \notin y for every object yy. We proved rigorously above (by cases on R∈RR\in R versus R∉RR \notin R, using excluded middle) that no such RR can exist: assuming it does yields both R∈RR \in R and R∉RR \notin R simultaneously, a contradiction. Contrast this with restricted Specification: for any fixed set AA, the set {x∈A:x∉x}\{x \in A : x \notin x\} does exist perfectly well (Specification guarantees it), and the paradox never triggers, because the argument would require testing membership of AA in AA for all sets, whereas restricted Specification only ever quantifies yy over the pre-given AA, not over "everything." This single missing hypothesis — "relative to a fixed prior set AA" — is exactly the fault line between a safe, provably-existing construction and an inconsistent one.

Scope, edge cases & common traps

SituationWhat to watch for
A=∅A = \varnothing{x∈∅:P(x)}=∅\{x \in \varnothing : P(x)\} = \varnothing regardless of PP, since there is no y∈∅y \in \varnothing to test — vacuously the smallest possible result (foreshadows The Empty Set).
P(x)P(x) true for all x∈Ax \in A{x∈A:P(x)}=A\{x \in A : P(x)\} = A exactly; useful sanity check when a property is a tautology on AA.
P(x)P(x) false for all x∈Ax \in A{x∈A:P(x)}=∅\{x \in A : P(x)\} = \varnothing; another sanity check.
Bound variable reused as a "parameter" nameNever let the bound variable coincide with a free parameter already in scope (e.g. writing {x∈A:x∈x}\{x \in A : x \in x\} meaning something about a fixed set also named xx) — this is a naming collision, not a mathematical subtlety, but it causes real errors.
Roster notation for infinite sets{1,2,3,…}\{1, 2, 3, \ldots\} is informal shorthand; the only fully rigorous specification of an infinite set of this kind is set-builder form relative to a known set, e.g. {n∈N:n≥1}\{n \in \mathbb{N} : n \geq 1\}.
Omitting the domain AA "for brevity"Writing {x:P(x)}\{x : P(x)\} when you mean {x∈A:P(x)}\{x \in A : P(x)\} for some contextually understood AA is common and usually harmless — but it is only rigorous once that implicit AA is identified; treat it as shorthand, never as literal unrestricted comprehension.

The mathematician behind it

Origins · 1 minErnst Zermelo and how this was discovered
EZ
Ernst Zermelo
1871–1953 · Foundations of set theory, University of Göttingen and University of Zürich

Ernst Friedrich Ferdinand Zermelo was a German mathematician whose work in the first decade of the twentieth century transformed set theory from Georg Cantor's intuitive "naive" framework into a rigorous axiomatic system. Reacting directly to the paradoxes then threatening the foundations of mathematics — most famously Russell's paradox — Zermelo isolated the precise axiom needed to keep the enormously useful idea of "defining a set by a property" while blocking the contradictions. His 1908 axiom of Aussonderung (Separation/Specification) is exactly the restricted comprehension principle presented in this article: a property may only be used to carve a subset out of a set that is already known to exist, never to conjure a set from the unrestricted universe of all objects. This single restriction, together with the rest of Zermelo's axioms (later refined by Abraham Fraenkel and Thoralf Skolem into what is now called Zermelo–Fraenkel set theory, ZF), remains the standard foundation on which essentially all of modern mathematics is built.

History
- 1874 — Georg Cantor begins developing set theory informally, working with sets defined by arbitrary properties ("naive comprehension").
- 1901 — Bertrand Russell discovers the paradox of the set of all sets not containing themselves, while examining Cantor's and Frege's foundational work.
- 1902 — Russell communicates the paradox to Gottlob Frege, undermining Frege's Grundgesetze der Arithmetik just as its second volume was going to press.
- 1908 — Ernst Zermelo publishes his axiomatization of set theory, including the Axiom of Separation (Aussonderung), restricting comprehension to subsets of existing sets.
- 1922 — Abraham Fraenkel and Thoralf Skolem independently sharpen and extend Zermelo's system (adding Replacement and clarifying the precise logical form of "property"), yielding the Zermelo–Fraenkel (ZF) axioms used today.
What is the difference between "{x:P(x)}\{x : P(x)\}" and "{x∈A:P(x)}\{x \in A : P(x)\}"?

The second form is always rigorously justified: given any set AA and property PP, the Axiom of Specification guarantees that {x∈A:P(x)}\{x \in A : P(x)\} exists as a genuine set, consisting exactly of the elements of AA satisfying PP. The first form, {x:P(x)}\{x : P(x)\}, quantifies over the entire universe of all objects with no restriction to a prior set, and is only legitimate when it can be shown (usually by rewriting it as a restricted expression relative to some understood ambient set) to actually pick out a set; taken completely literally for arbitrary PP, it is inconsistent, as Russell's paradox demonstrates. In everyday practice, {x:P(x)}\{x : P(x)\} is common informal shorthand where context supplies the domain.

Can the property P(x)P(x) in {x∈A:P(x)}\{x \in A : P(x)\} mention other sets besides xx and AA?

Yes. P(x)P(x) may involve additional fixed sets or parameters, such as another set BB, a real number kk, or a function ff, as long as these are already-existing objects fixed in advance (not further bound variables ranging freely). For instance, {x∈A:x∈B}\{x \in A : x \in B\} (which defines the intersection A∩BA \cap B) and {x∈R:x2=k}\{x \in \mathbb{R} : x^2 = k\} (with kk a fixed real parameter) are both legitimate uses of Specification. The only genuine restriction is that, for each fixed choice of the parameters, PP becomes an honest one-free-variable predicate in xx, true or false for each candidate value.

Does the choice of bound variable letter ever matter?

No — the bound variable is a dummy symbol, exactly as in ∑i=1ni2\sum_{i=1}^n i^2 versus ∑k=1nk2\sum_{k=1}^n k^2. The sets {x∈A:P(x)}\{x \in A : P(x)\}, {y∈A:P(y)}\{y \in A : P(y)\}, and {t∈A:P(t)}\{t \in A : P(t)\} are all literally the same set, since membership is determined identically in each case: an object zz belongs to any of them exactly when z∈Az \in A and P(z)P(z) holds. The only caveat is to avoid choosing a bound-variable letter that clashes with a parameter or free variable already fixed in the surrounding context, since that would create ambiguity in reading the formula, not a mathematical difference in the set defined.

Why can't we just define "the set of all sets" using set-builder notation?

If VV denoted "the set of all sets," it would in particular contain itself as an element (V∈VV \in V, since VV is a set), and Specification would let us form R={x∈V:x∉x}R = \{x \in V : x \notin x\}. One can show (by essentially the Russell's paradox argument, adapted to ask whether R∈RR \in R) that this leads to a contradiction once you also assume R∈VR \in V, which holds precisely because VV contains every set. Because assuming a "set of all sets" leads to contradiction, standard set theory (ZF) simply proves no such set exists — "too many things" to safely collect into one set, a phenomenon studied further under the heading of proper classes.

How does set-builder notation relate to logical quantifiers?

Very directly: the assertion "y∈{x∈A:P(x)}y \in \{x \in A : P(x)\}" is by definition equivalent to the logical statement "y∈A∧P(y)y \in A \wedge P(y)," so building a set via Specification is really just packaging a predicate (built from quantifiers, connectives, and relations like ∈\in and ==) into an object you can then manipulate as a set — take its cardinality, intersect it with other sets, and so on. Conversely, statements about set-builder sets translate back into quantified logical statements: "every element of {x∈A:P(x)}\{x \in A : P(x)\} has property QQ" translates to ∀x (x∈A∧P(x)→Q(x))\forall x \, (x \in A \wedge P(x) \to Q(x)). This translation is the core skill developed by working with the notation.

Is {x∈A:P(x)}\{x \in A : P(x)\} always a subset of AA, and can it equal AA?

Yes to both. By the Membership Criterion lemma proved above, every element of {x∈A:P(x)}\{x \in A : P(x)\} is, by definition, an element of AA, so {x∈A:P(x)}⊆A\{x \in A : P(x)\} \subseteq A always (this containment relationship is developed fully in Subsets and Set Inclusion). Equality {x∈A:P(x)}=A\{x \in A : P(x)\} = A holds exactly when P(x)P(x) is true for every single element of AA — that is, when the filtering condition happens not to remove anything. At the other extreme, if P(x)P(x) is false for every element of AA, the result is the empty set, ∅\varnothing, discussed further in The Empty Set.

What is the practical difference between roster notation and set-builder notation for finite sets?

For a small finite set, roster notation {a1,…,an}\{a_1,\ldots,a_n\} is often more transparent since you can see every element at a glance, while set-builder notation {x∈A:P(x)}\{x \in A : P(x)\} communicates why those elements belong together, via the property PP. The two are logically interchangeable whenever the roster list happens to be exactly the elements satisfying some describable property, but set-builder notation becomes indispensable once the set is too large to list, is infinite, or its defining property is the mathematically important content (for instance, "solutions of an equation" is far more informative than a bare list of numbers).

Before this

Where this leads