Set Equality and Extensionality
When are two sets the same set? This question sounds trivial until you try to answer it. Consider sets built in different ways — say, the set of even prime numbers. Compare it with the set containing only the number 2. Both descriptions pick out exactly one object. Intuition insists they are "the same set." But nothing in the mere idea of a "collection" explains why. Specifically, why should how you describe a set be irrelevant to what the set is? The Axiom of Extensionality is the foundational commitment that settles this. It declares that a set is completely determined by its members, nothing more and nothing less. This matters because set theory is meant to serve as a universal foundation for mathematics. A foundation needs an unambiguous criterion of identity. Without extensionality, "" and "" could in principle denote different objects. Arithmetic built from sets could depend on bookkeeping choices. The very notion of a mathematical object would become unstable. Extensionality removes this ambiguity by fiat: content, not description, is destiny. The technique that flows directly from this axiom is the mutual inclusion method of proving . Show every element of lies in . Then show every element of lies in . This converts an equality of sets — a single global claim — into two separate claims. Each claim concerns arbitrary elements, provable by direct, element-by-element reasoning. It is the workhorse method behind essentially every set identity you will ever prove. This article gives the precise statement of the Axiom of Extensionality. It proves the mutual-inclusion criterion for set equality as a direct consequence. It works through two genuinely asymmetric examples. It also examines what fails if extensionality is weakened. It builds directly on Subsets and Set Inclusion. It sets up the machinery needed for Union and Intersection. It also prepares for the general craft of Proving Set Identities.
- The Axiom of Extensionality says: two sets are equal exactly when they have the same elements.
- Sets are identified purely by membership — order, repetition, and method of description are irrelevant.
- The mutual inclusion technique proves by proving and separately.
- This converts a "for all sets" statement into two "for all elements" statements, each amenable to direct proof.
- Extensionality is what makes well-defined: any two properties with the same extension yield the same set.
- Key idea: a set has no identity beyond its membership, so proving equality is proving mutual membership.
Where this lives today
Extensionality and the mutual-inclusion method are not museum pieces; they are load-bearing walls in modern mathematics and computing.
Mathematical logic and foundations. Every axiomatic development of mathematics from set theory — real numbers as Dedekind cuts or Cauchy sequence classes, ordered pairs as Kuratowski pairs, functions as sets of ordered pairs — implicitly relies on extensionality to guarantee that these constructions, once their membership conditions match, really are the same mathematical object regardless of construction route.
Computer science and formal verification. Proof assistants such as Coq, Agda, Lean, and Isabelle must decide when two data structures (finite sets, in particular) count as equal; "set extensionality" principles in these systems mirror exactly the axiom here, and mutual-inclusion is the standard tactic (often literally called `Set.Subset.antisymm` or similar) used to discharge equality goals about sets, finsets, and related structures.
Abstract algebra and topology. Verifying that two subgroups, subspaces, ideals, or topologies coincide is routinely done by mutual inclusion: show every element/generator of one lies in the other and vice versa. This is the direct generalization of the technique introduced here to richer algebraic and topological settings.
Database theory and semantics of programming languages. Relational databases model tables as sets of tuples; query equivalence (two SQL queries always returning the "same" result set) is formally a set-equality question resolved by mutual inclusion of the resulting tuple-sets, up to the semantics chosen for duplicates.
Combinatorics and discrete mathematics. Bijective and double-counting proofs of identities between finite sets frequently reduce, at the bookkeeping level, to showing two finite sets are equal (or in bijection) via explicit mutual inclusion or explicit element correspondence, connecting directly forward to the identity-proving toolbox developed in Proving Set Identities and to the operations studied in Union and Intersection.
Ask the tutor: If but I can't find an element of that's missing from , does that already prove , or do I still need a general argument for ?
Axiom of Extensionality. For all sets and ,
In words: two sets are equal if and only if they have exactly the same elements.
Equivalent formulation via inclusion. Recall that means . The biconditional (for all ) is logically equivalent to the conjunction of and (for all ), i.e. to . Hence Extensionality is equivalent to:
This equivalence is the formal basis of the mutual inclusion method, proved as a theorem below.
Intuition
Think of a set as a bag whose only property is which items are in it — not the color of the bag, not the order the items were dropped in, not how many times you happened to mention an item while describing it. Extensionality is the axiom that makes this metaphor precise and forces it to be the whole story: nothing about a set is extra baggage beyond its membership. Two bags with the same contents are declared, by fiat, to be the same bag. This has an immediate practical consequence. Suppose you want to show but and are given by different-looking definitions — say and . You cannot directly "see" that these are equal; you must unfold the definition of equality. Extensionality tells you that unfolding is precisely: check that every element satisfying one description satisfies the other, in both directions. This double-containment strategy is what turns an abstract, seemingly holistic claim ("these two sets, as wholes, coincide") into two very concrete, local claims ("take an arbitrary element of ..." and "take an arbitrary element of ..."). A useful picture is two overlapping regions in a Venn-diagram-like universe, where equality means the regions are literally the same region — no sliver of one sticking out beyond the other in either direction.
The right side of the figure is the proof strategy itself: two separate inclusion arrows, pointing in opposite directions, whose conjunction — not either one alone — pins down full equality.
Let and be sets. Then
We assume the Axiom of Extensionality: . We assume the definition of subset: . We prove the biconditional in both directions. The technique throughout is direct proof plus elementary predicate logic (unfolding quantifiers and biconditionals).
() Suppose . By Extensionality, . Claim : let be arbitrary with . Since holds, in particular , and from together with the left-to-right direction of this biconditional we get . Since was arbitrary, , i.e. . Claim : let be arbitrary with . Again holds for this , and from together with the right-to-left direction of the biconditional we get . Since was arbitrary, . Hence and , as required.
() Suppose and . We must show , and then invoke Extensionality to conclude . Let be arbitrary.
- If , then since (i.e. ), instantiating at this gives . So .
- If , then since (i.e. ), instantiating at this gives . So .
Combining the two implications, . Since was arbitrary, . By the Axiom of Extensionality, this universally quantified biconditional is exactly the condition for . Hence . Both directions are established, so .
∎1. Reflexivity of via : For any set , (immediate from the definition of , taking the hypothesis and concluding by identity), so by the theorem . 2. Antisymmetry of : The theorem, read left to right, says precisely that is antisymmetric: . This is the standard order-theoretic fact that makes the collection of sets into a partial order. 3. Proof template: To prove for arbitrary sets , it suffices to give two sub-proofs: (a) an arbitrary implies ; (b) an arbitrary implies . This is the template used in every worked example below and throughout Proving Set Identities.
(1) By the definition of , holds iff , and is an instance of the logical law , true for every proposition . Hence holds for every set ; taking in the Mutual Inclusion Criterion gives . (2) This is exactly the left-to-right direction of the biconditional already proved in the Mutual Inclusion Criterion, restated as an inference rather than an equivalence; no further argument is needed beyond citing that half of the proof. (3) This restates the right-to-left direction of the Mutual Inclusion Criterion as a proof strategy: to establish the hypothesis of that direction ( and ), one proves each inclusion by the direct-proof method for universally quantified conditionals, i.e. by fixing an arbitrary element and tracing the implication.
∎Worked examples
Example 1 (arithmetic sets defined by different predicates). Let
These look like different rules, so equality is not obvious by inspection. We prove by mutual inclusion. Step 1: . Let be arbitrary. Then , so for some integer . Since , we have ; since , we have . Hence is divisible by both and , so . As was arbitrary, . Step 2: . Let be arbitrary. Then and . Since , and and are both divisors of with , it follows that their product divides (this is the standard fact that if two coprime integers each divide , their product divides ; concretely, for some integer , and since with , we get , so for some integer , giving ). Hence , so . As was arbitrary, . By Steps 1 and 2 and the Mutual Inclusion Criterion, . Notice the asymmetry: Step 1 was a two-line direct computation, while Step 2 genuinely used the coprimality of and — had we instead compared "divisible by " with "divisible by and by ," the corresponding "Step 2" argument would fail, since and are not coprime ( itself is divisible by 2 and 6 but not 4), illustrating that the two inclusion proofs really are logically independent tasks, not mirror images of each other.
Example 2 (a set-builder identity with an asymmetric structure). Let and define
We prove . Step 1: . Let be arbitrary. By definition of , , is even, and . Since and is even, . Combined with , the possibility is excluded, so . As was arbitrary, . Step 2: . Let be arbitrary, so ; we check each of the four cases directly (a finite case analysis is a legitimate direct proof when the domain is finite and small). In each case , is even, and . Hence in every case . As was arbitrary, . By the Mutual Inclusion Criterion, . Here the asymmetry is structural rather than computational: Step 1 required unpacking a compound condition ("even and " restricted to ) into an explicit list and then trimming it, while Step 2 was a finite verification over an explicitly given four-element set — genuinely different proof shapes, not a copy-paste of one direction into the other.
The Mutual Inclusion Criterion has two hypotheses joined by "and": and . Suppose we (incorrectly) tried to conclude from alone, discarding the requirement . Take
Certainly : every element of (namely and ) is an element of . If one-directional inclusion sufficed for equality, we would be forced to conclude . But by Extensionality, would require . Test : we have (true) but is false (the elements of are exactly and , and is neither). So the biconditional fails at , hence is false, hence by Extensionality . This confirms concretely that can hold while : here is a strict subset relation. The missing hypothesis is not a redundant technicality — it is precisely what rules out having "extra" elements beyond , which is exactly what happened here with the extra element . Both inclusions are jointly necessary; neither alone is sufficient, and this example shows the failure occurs already in the smallest possible way — a single extra element.
Scope, edge cases & common traps
| Situation | What to check | Common pitfall |
|---|---|---|
| Proving for infinite or abstractly defined sets | Both directions, each via an arbitrary-element argument | Proving only and declaring victory |
| Sets given by different set-builder predicates | Unfold both predicates explicitly before comparing | Assuming "looks similar" implies "is equal" |
| Sets with repeated listing, e.g. vs. | Extensionality only cares about membership, not multiplicity | Treating as "different" from |
| Sets with different orderings, e.g. vs. | Membership sets are identical, so the sets are equal | Thinking order matters (it matters for tuples, not sets) |
| Empty set uniqueness | Vacuous inclusion holds for all | Forgetting that needs no case check |
| Proving | Exhibit one with false | Trying to prove non-equality via one-directional subset failure alone without naming a witness |
The mathematician behind it
Origins · 1 minErnst Zermelo and how this was discovered
Ernst Zermelo was a German mathematician who, in the early 1900s, undertook the project of placing Georg Cantor's set theory on a rigorous axiomatic footing after Bertrand Russell's paradox exposed contradictions in naive comprehension. Zermelo's 1908 axiom system — later refined by Abraham Fraenkel and Thoralf Skolem into what is now called Zermelo–Fraenkel (ZF) set theory — included an axiom of extensionality essentially in the form given here, asserting that sets with the same elements are identical. This single axiom fixed, once and for all, the criterion of identity for the objects the rest of the theory would build: numbers, functions, relations, and eventually all of ordinary mathematics as encoded within set theory.
Is the Axiom of Extensionality provable from other axioms, or is it truly primitive?
In standard formulations of ZF(C) set theory, Extensionality is taken as a primitive axiom, not derived from the others. It cannot be proved from axioms like Pairing, Union, or Power Set, because those axioms only assert the existence of certain sets; none of them, by itself, forces two sets with identical elements to be literally the same object. Some alternative foundations (e.g. certain type-theoretic or non-well-founded set theories) modify or replace extensionality, which shows it is an independent, non-redundant commitment. It is universally adopted because rejecting it would make "the set with elements " ambiguous, undermining the entire enterprise of using sets as a uniform foundation.
Does extensionality mean sets can never have "extra structure" beyond their elements?
Yes, and this is exactly the point. A set, as a mathematical object, carries no information beyond its membership. Two definitions, however differently phrased, that pick out the same collection of elements name the same set. Ordered pairs, sequences, and multisets are different mathematical objects precisely because they need to encode order or multiplicity; they are built (via encodings like Kuratowski's ) so that this extra information is recoverable from the underlying plain-set membership structure, without weakening extensionality itself.
How is this different from proving A ⊆ B alone?
Proving only shows every element of is in ; it leaves open whether has additional elements not in . Set equality is a strictly stronger claim requiring no asymmetry in either direction. The counterexample in this article (, ) shows can hold with . Only when you also establish — ruling out any such extra elements — can you invoke the Mutual Inclusion Criterion and conclude full equality.
Can mutual inclusion fail to be the easiest method for some equalities?
Sometimes a direct algebraic manipulation of set-builder conditions (using logical equivalences on the defining predicates) is faster than splitting into two separate inclusion proofs, especially for equalities like De Morgan's laws for sets. But mutual inclusion is the most universally applicable method: it always works, requires no cleverness beyond fixing an arbitrary element, and is the default fallback whenever a slicker algebraic identity isn't immediately visible. Many textbooks (and this one) teach mutual inclusion first precisely because it is algorithm-like and rarely gets stuck.
Does extensionality apply to proper classes as well as sets?
In systems like NBG or MK class theory that distinguish sets from proper classes (collections too large to be sets, such as "the collection of all sets"), an analogous extensionality principle is typically adopted for classes: two classes are equal iff they have the same members. Within pure ZF(C), which does not formally include proper classes as objects, extensionality is stated only for sets, but informal class-builder notation used in practice (e.g. "the class of all groups") is generally understood to obey the same membership-determines-identity principle.
Why does the empty set's uniqueness follow from extensionality?
Suppose and are both sets with no elements. Then vacuously, holds, because the hypothesis is never true, making each conditional true vacuously; hence . Symmetrically . By the Mutual Inclusion Criterion (itself a consequence of Extensionality), . This is why we may speak of "the" empty set, a fact used constantly alongside Subsets and Set Inclusion.
Is mutual inclusion the only way to prove a set equality?
No — other valid methods include direct manipulation of set-builder predicates using logical equivalences (rewriting "" as an equivalent logical formula and matching it to "" in one pass), using previously established set identities as lemmas (as will be developed for unions and intersections in Union and Intersection), or exhibiting an explicit bijection in contexts about cardinality rather than literal set equality. Mutual inclusion remains the most fundamental and universally taught method because it reduces directly to the axiom of extensionality without any extra machinery.