A set is denoted as a brace-delimited, comma-separated list of member sets. The set with no members, known as the empty or null set, is denoted as \emptyset.
The language of set theory uses as a foundation the first-order predicate logic with equality. Set variables are denoted by lower-case Roman letters, such as x and y.
Expressions in the set language are constructed from set variables and first-order logic, and are called formulas. Formulas in the basic language are denoted by lower-case Greek letters, such as \phi and \psi.
A free variable of a formula is a variable which has not been quantified, and so can be substituted for any value. A formula with free variables says something about each specific value over which those variables can vary.
A bound variable of a formula is a variable which has been quantified, and so the range of values over which the variable varies is constrained. A formula with no free variables makes a statement about the universe which the language describes. Such a formula is called a sentence.
When a formula with free variables is used as an axiom or a theorem, it is meant that the formula holds for all possible values given to its free variables. Therefore, the formula \exists z ( z = x \cup y ) is taken to mean \forall x \forall y \exists z ( z = x \cup y ).
The set language comprises the following quantifiers, relations, and connectives:
Symbol
Quantifier
Derivation
\exists
Existential
primitive
\exists!
Unique existential
\exists! x (\phi) \iff \exists x \forall y (\phi (y) \iff y = x)
\forall
Universal
\forall x (\phi) \iff \lnot \exists x (\lnot \phi)
A set can be constructed from any formula (of the language of set theory) \phi.
The axiom of comprehension is an axiom schema, with which instances of the axiom are constructed by letting the free variable \phi vary over all possible formulas.
This axiom is inconsistent. A refutation of an inconsistent instance of the axiom of comprehension is called an antinomy. The simplest possible such antinomy is Russel’s antinomy:
\lnot \exists y \forall x (x \in y \iff x \notin x)
This says that there is no such set which contains all sets which do not contain themselves.
Russel’s antinomy can be proven by contradiction. Suppose y is a set such that \forall x (x \in y \iff x \notin x), then, since what holds for every x must necessarily hold in particular for y, we have y \in y \iff y \notin y, a contradiction.
The existence of antinomies show that not every collection of sets is, in itself, a set. To avoid the antinomies, we take as sets only the collections of objects which are specifiable in the set language.
If there does exist a y such that \forall x (x \in y \iff \phi(x)) then this y is unique, via the axiom of extensionality.
A class is a general specifiable collection, which may or may not be a set. Class notation adds no expressive power to our set language, it only serves to make the language more concise.
A class x is the class of all objects for which a given formula \phi (x) holds, denoted as \{ x : \phi (x)\}. This is called a class term. The formula \phi (x) can optionally contain free variables other than x, these are called parameters. Different values of the parameters may yield different classes. For example, the class \{ x : x \in \mathbb{N} \land x < y \} is a class with no members if y=0, and has a single member if y=1.
All sets are classes, because a class is a specifiable collection and all sets are specifiable. The set y is the class \{ x : x \in y \}.
Extended language
Basic language
Description
y \in \{ x : \phi (x) \}
\phi (y)
Membership of a set in a class
\{ x : \phi (x) \} = \{ y : \psi (y) \}
\forall z ( \phi (z) \iff \psi (z) )
Equivalence of two classes
x = \{ y : \phi (y) \}, \{ y : \phi (y) \} = x
\forall z ( z \in x \iff \phi (z))
Equivalence of a set and a class
\{ x : \phi (x) \} \in \{ y : \psi (y) \}
\exists z ( z = \{ x : \phi (x) \} \land z \in \{ y : \psi (y) \})
Membership of a class in a class
\{ x : \phi (x) \} \in y
\exists z ( z = \{ x : \phi (x) \} \land z \in y)
Membership of a class in a set
Class variables are represented by upper-case Roman letters, and are used to show that a formula holds for all classes (in other words, for a general class). We are restricted from using quantifiers to bind class variables, because this would introduce semantics that are unrepresentable in the underlying basic language, so all class variables must appear in formulas as free variables.
Upper-case Greek letters stand for general class formulas. A class variable A is equivalent to the class term \{ x : \Phi (x) \}, for all class formulas \Phi.
A relation R(\frak{a_{1}, ..., a_{n}}) is defined as R(\frak{a_{1}, ..., a_{n}}) \iff \Phi(\frak{a_{1}, ..., a_{n}}), where \Phi is a formula with no free variables other than \frak{a_{1}, ..., a_{n}}.
Let \Phi(\frak a_{1}, ..., a_{n}, \rm y) be a formula with no free variables other than \frak a_{1}, ..., a_{n}, \rm y, such that \exists! y \Phi(\frak a_{1}, ..., a_{n}, \rm y)
A function always returns exactly one set, when passed the same variables (via axiom of extensionality).