In axiomatic set theory and the branches of logic, mathematics, and computer science which rely upon it, the axiom of extensionality is one of the axioms of Zermelo–Fraenkel set theory. Informally, the axiom means that the two sets A and B are equal if and only if A and B have the same members.
In the formal language of the Zermelo–Fraenkel axioms, the axiom reads:
\forallA\forallB(\forallX(X\inA\iffX\inB)\impliesA=B)
or in words:
Given any set A and any set B, if for every set X, X is a member of A if and only if X is a member of B, then A is equal to B.
(It is not really essential that X here be a set - but in ZF, everything is. See Ur-elements below for when this is violated.)
The converse of this axiom,
\forallA\forallB(A=B\implies\forallX(X\inA\iffX\inB)),
To understand this axiom, note that the clause in parentheses in the symbolic statement above states that A and B have precisely the same members. Thus, the axiom is really saying that two sets are equal if and only if they have precisely the same members.One may also interpret this axiom as:
A set is determined uniquely by its members.
The axiom of extensionality can be used with any statement of the form
\existsA\forallX(X\inA\iffP(X))
A
P
A
The axiom of extensionality is generally uncontroversial in set-theoretical foundations of mathematics, and it or an equivalent appears in just about any alternative axiomatisation of set theory.However, it may require modifications for some purposes, as below.
The axiom given above assumes that equality is a primitive symbol in predicate logic.Some treatments of axiomatic set theory prefer to do without this, and instead treat the above statement not as an axiom but as a definition of equality.[1] Then it is necessary to include the usual axioms of equality from predicate logic as axioms about this defined symbol. Most of the axioms of equality still follow from the definition; the remaining one is the substitution property,
\forallA\forallB(\forallX(X\inA\iffX\inB)\implies\forallY(A\inY\iffB\inY)),
An ur-element is a member of a set that is not itself a set.In the Zermelo–Fraenkel axioms, there are no ur-elements, but they are included in some alternative axiomatisations of set theory.Ur-elements can be treated as a different logical type from sets; in this case,
B\inA
A
Alternatively, in untyped logic, we can require
B\inA
A
\forallA\forallB(\existsX(X\inA)\implies[\forallY(Y\inA\iffY\inB)\impliesA=B]).
That is:
Given any set A and any set B, if A is a nonempty set (that is, if there exists a member X of A), then if A and B have precisely the same members, then they are equal.
Yet another alternative in untyped logic is to define
A
A
A