# Axiom of extensionality

The axiom of extensionality, also called the axiom of extent, is an axiom used in many forms of axiomatic set theory, such as Zermelo–Fraenkel set theory. The axiom defines what a set is. Informally, the axiom means that the two sets A and B are equal if and only if A and B have the same members.

## Etymology

The term extensionality, as used in 'Axiom of Extensionality' has its roots in logic. An intensional definition describes the necessary and sufficient conditions for a term to apply to an object. For example: "An even number is an integer which is divisible by 2." An extensional definition instead lists all objects where the term applies. For example: "An even number is any one of the following integers: 0, 2, 4, 6, 8..., -2, -4, -8..." In logic, the extension of a predicate is the set of all things for which the predicate is true.
The logical term was introduced to set theory in 1893, Gottlob Frege attempted to use this idea of an extension formally in his Basic Laws of Arithmetic (German: Grundgesetze der Arithmetik), where, if $F$ is a predicate, its extension $\varepsilon F$, is the set of all objects satisfying $F$. For example if $F(x)$ is "x is even" then $\varepsilon F$ is the set $\{\cdots ,-4,-2,0,2,4,\cdots \}$. In his work, he defined his infamous Basic Law V as:$\varepsilon F=\varepsilon G\equiv \forall x(F(x)\equiv G(x))$Stating that if two predicates have the same extensions (they are satisfied by the same set of objects) then they are logically equivalent, however, it was determined later that this axiom led to Russell's paradox. The first explicit statement of the modern Axiom of Extensionality was in 1908 by Ernst Zermelo in a paper on the well-ordering theorem, where he presented the first axiomatic set theory, now called Zermelo set theory, which became the basis of modern set theories. The specific term for "Extensionality" used by Zermelo was "Bestimmtheit".The specific English term "extensionality" only became common in mathematical and logical texts in the 1920s and 1930s, particularly with the formalization of logic and set theory by figures like Alfred Tarski and John von Neumann.

## In ZF set theory

In the formal language of the Zermelo–Fraenkel axioms, the axiom reads:
    $\forall x\forall y\,[\forall z\,(\left.z\in x\right.\leftrightarrow \left.z\in y\right.)\rightarrow x=y]$
or in words:
    If the sets $x$ and $y$ have the same members, then they are the same set.
In pure set theory, all members of sets are themselves sets, but not in set theory with urelements. The axiom's usefulness can be seen from the fact that, if one accepts that $\exists A\,\forall x\,(x\in A\iff \Phi (x))$, where $A$ is a set and $\Phi (x)$ is a formula that $x$ occurs free in but $A$ doesn't, then the axiom assures that there is a unique set $A$ whose members are precisely whatever objects (urelements or sets, as the case may be) satisfy the formula $\Phi (x)$.
The converse of the axiom, $\forall x\forall y\,[x=y\rightarrow \forall z\,(\left.z\in x\right.\leftrightarrow \left.z\in y\right.)]$, follows from the substitution property of equality. Despite this, the axiom is sometimes given directly as a biconditional, i.e., as $\forall x\forall y\,[\forall z\,(\left.z\in x\right.\leftrightarrow \left.z\in y\right.)\leftrightarrow x=y]$.

## In NF set theory

Quine's New Foundations (NF) set theory, in Quine's original presentations of it, treats the symbol $=$ for equality or identity as shorthand either for "if a set contains the left side of the equals sign as a member, then it also contains the right side of the equals sign as a member" (as defined in 1937), or for "an object is an element of the set on the left side of the equals sign if, and only if, it is also an element of the set on the right side of the equals sign" (as defined in 1951). That is, $x=y$ is treated as shorthand either for $\forall z\,\left.(x\in z\right.\rightarrow \left.y\in z\right.)$, as in the original 1937 paper, or for $\forall z\,\left.(z\in x\right.\leftrightarrow \left.z\in y\right.)$, as in Quine's Mathematical Logic (1951). The second version of the definition is exactly equivalent to the antecedent of the ZF axiom of extensionality, and the first version of the definition is still very similar to it. By contrast, however, the ZF set theory takes the symbol $=$ for identity or equality as a primitive symbol of the formal language, and defines the axiom of extensionality in terms of it. (In this paragraph, the statements of both versions of the definition were paraphrases, and quotation marks were only used to set the statements apart.)
In Quine's New Foundations for Mathematical Logic (1937), the original paper of NF, the name "principle of extensionality" is given to the postulate P1, $((x\subset y)\supset ((y\subset x)\supset (x=y)))$, which, for readability, may be restated as $x\subset y\rightarrow (y\subset x\rightarrow x=y)$. The definition D8, which defines the symbol $=$ for identity or equality, defines $(\alpha =\beta )$ as shorthand for $(\gamma )\,(\left.(\alpha \in \gamma \right.)\supset (\left.\beta \in \gamma \right.))$. In his Mathematical Logic (1951), having already developed quasi-quotation, Quine defines $\ulcorner \zeta =\eta \urcorner$ as shorthand for $\ulcorner (\alpha )\,(\left.\alpha \in \zeta \right.\;.\equiv \,.\,\left.\alpha \in \eta \right.)\urcorner$ (definition D10), and does not define an axiom or principle "of extensionality" at all.
Thomas Forster, however, ignores these fine distinctions, and considers NF to accept the axiom of extensionality in its ZF form.

## In ZU set theory

In the Scott–Potter (ZU) set theory, the "extensionality principle" $(\forall x)(\left.x\in a\right.\Leftrightarrow \left.x\in b\right.)\Rightarrow a=b$ is given as a theorem rather than an axiom, which is proved from the definition of a "collection".

## In set theory with ur-elements

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\in A$ makes no sense if $A$ is an ur-element, so the axiom of extensionality simply applies only to sets.
Alternatively, in untyped logic, we can require $B\in A$ to be false whenever $A$ is an ur-element. In this case, the usual axiom of extensionality would then imply that every ur-element is equal to the empty set. To avoid this consequence, we can modify the axiom of extensionality to apply only to nonempty sets, so that it reads:
    $\forall A\,\forall B\,(\exists X\,(X\in A)\implies [\forall Y\,(Y\in A\iff Y\in B)\implies A=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$ itself to be the only element of $A$ whenever $A$ is an ur-element. While this approach can serve to preserve the axiom of extensionality, the axiom of regularity will need an adjustment instead.