Set theory provides a language for collecting objects, comparing collections, and building new ones. Here naive set theory means an informal development of the set constructions used in ordinary mathematics. We state their meaning and practise proofs without first presenting a complete list of axioms. It does not mean that every imaginable description is automatically allowed to define a set.
There are different axiomatic frameworks, including ZF, ZFC, and NBG. Their approaches to sets, classes, and existence assumptions differ. This chapter uses only elementary set constructions; the comparison is an optional exploration at the end. Relations and Order later introduces NBG classes before developing relations and orders. The Open Logic set-theory text provides a companion path from elementary sets toward axiomatic foundations [1][1] T. Button, Set Theory. Open Logic Project, 2026. Fall 2021 course text, revised July 2026. https://builds.openlogicproject.org/courses/set-theory/settheory-screen.pdf.
Membership, equality, and notation
A set is determined by its elements. Write for membership and for nonmembership. Listing the elements ignores order and repetition: . A membership condition must have a precise mathematical meaning; this does not guarantee an algorithm deciding membership for every possible input.
The extensionality principle says that sets with the same elements are equal:
We use , along with . Set-builder notation normally selects from a specified set, as in
The domain is part of the description. For example, has two elements, while is empty.
For real , intervals are sets selected by inequalities:
Parentheses exclude an endpoint; square brackets include it. Thus includes but not .
Elements, subsets, and the empty set
means that every element of belongs to . A proper subset, written , additionally requires .
Membership compares an object with a set; inclusion compares the elements of two sets. If , then and , but . A set can itself be an element of another set, so the level of braces matters.
The empty set has no elements. For every set , : a counterexample would need to belong to the empty set. This does not imply . Also, and differ: the latter has one element.
The power set contains all subsets of . For a finite set , its cardinality is the number of its elements.
For ,
If , every element has two independent membership choices when building a subset, so . For , there is still one subset, namely . Infinite cardinality requires further theory; the elementary finite-counting arguments here should not be applied as subtraction rules for infinite sizes.
Comparing size: finite, infinite, and countable
Counting a finite set gives a natural number. To compare sizes more generally, pair the elements of two sets so that every element on either side has exactly one partner. Such a pairing is called a bijection; its formal mapping definition comes in Functions and Mappings. Two sets are equinumerous, written , when such a pairing exists. No ordering of the elements is required.
For , let . Thus , and for the set is .
A set is finite if it can be paired bijectively with for some ; then . A set is infinite if it is not finite. In particular, the empty set is finite, with size zero.
The natural numbers form an infinite set: any nonempty finite collection of natural numbers has a largest member, while has no largest member. The nonnegative even integers can nevertheless be paired with all of by pairing with . Every even integer appears exactly once. Thus a proper subset of an infinite set can have the same cardinality as the whole set; finite intuition about “fewer elements” needs care.
A set is countably infinite if it is equinumerous with . In this collection, countable means finite or countably infinite. A set that is not countable is uncountable.
Some authors use “countable” only for the infinite case, so check the convention when changing texts. Our convention includes the empty set. A countably infinite set admits a list indexed by that reaches every element exactly once. An uncountable set admits no such exhaustive list, even if repetitions are allowed.
| Kind | Examples | What must be established |
|---|---|---|
| Finite | , | A bijection with some |
| Countably infinite | , , , | A bijection with |
| Uncountable | , , | Impossibility of a countable listing |
These examples are not all immediate from the definitions. Number Systems, Algorithms, and Recursion gives explicit listings of the integers and rationals, and a diagonal proof for the reals. The power-set example is an exploration below. The distinctions are established here so later chapters can use them consistently [2][2] E. Lehman, F. T. Leighton, and A. R. Meyer, Mathematics for Computer Science. MIT OpenCourseWare, 2015. Revised May 18, 2015; infinite sets, recursive data, and invariants. https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-spring-2015/mit6_042js15_textbook.pdf.
Being bounded or having points close together does not decide countability: is bounded but uncountable, whereas is countable despite having another rational between any two distinct rationals. “Can be listed” is a mathematical existence claim, not automatically a claim that a computer can generate the list.
Operations within a specified universe
Fix a set such that every set under discussion is a subset of . The complement of is . Changing changes the complement; is a local universe of discourse, not a set of absolutely every mathematical object.
| Operation | Membership condition |
|---|---|
| or | |
| and | |
| and | |
| belongs to exactly one of |
The symmetric difference satisfies . Two sets are disjoint when their intersection is empty.
For , and , the intersection is , the union is , the difference is , and . Reversing the difference changes the result: .
Prove identities by following an arbitrary element
To prove , take arbitrary and show . To prove equality, establish both inclusions or give a chain of equivalent membership conditions. To disprove an inclusion, give one element belonging to the first set but not the second. These are applications of the proof methods developed earlier.
For arbitrary ,
The middle equivalence is the distributive law of logic. Extensionality therefore gives the set identity.
Let and take . Then exactly when and , which is exactly membership in . Hence . No element outside belongs to either side, so the comparison covers the full sets.
The companion laws can be checked in the same way:
| Family | Identities |
|---|---|
| Commutativity | , |
| Associativity | ; likewise for |
| Idempotence | , |
| Absorption | , |
| Complement | , , |
A diagram can suggest an identity, but the membership proof establishes it for arbitrary sets. The correspondence with logical connectives also explains the connection to Boolean algebra.
Families, partitions, and finite counting
An indexed family associates a set with each index. It may contain repeated sets at different indices. Membership in its union requires membership in at least one ; membership in its intersection requires membership in every .
For a family of subsets of a fixed , we adopt
The first has no witness, and the second imposes no condition on an element of . The second equation uses the specified universe convention; it is not an unrestricted claim that a universal set exists.
A partition of is a family of nonempty, pairwise disjoint blocks whose union is . For instance, partitions ; does not, because the blocks overlap at .
For finite , split their union into the three disjoint regions , , and . Counting each region once yields
The subtraction corrects the double count of the intersection. This is the two-set inclusion-exclusion principle.
Ordered pairs and Cartesian products
An ordered pair obeys exactly when and . Its order matters, unlike that of a two-element set. The Cartesian product is
If are finite, ; if either is empty, the product is empty. Usually , although swapping coordinates gives a natural correspondence between them. The sets and contain ordered pairs and triples of real numbers. This is the language needed for multivariable functions, not a requirement that all functions have real-valued inputs.
Why unrestricted comprehension fails
Suppose every condition defined a set, with no restriction on its source collection. Then we could form the Russell collection as a set. Asking whether would give
a contradiction. The issue is the unrestricted set-existence assumption, not a difficult membership calculation.
Axiomatic theories restrict which collections are sets. ZF and ZFC use sets as their objects and constrain set formation; NBG additionally treats classes explicitly, including proper classes that are not sets. We do not need the full axiom lists for the constructions above. The comparison exercises below and the later NBG introduction provide the next step [1][1] T. Button, Set Theory. Open Logic Project, 2026. Fall 2021 course text, revised July 2026. https://builds.openlogicproject.org/courses/set-theory/settheory-screen.pdf, [3][3] T. Banakh, “Classical Set Theory: Theory of Sets and Classes,” arXiv:2006.01613, 2026. Version 6, August 15, 2026; NBG sets, classes, and class existence. https://arxiv.org/abs/2006.01613.
Core exercises
Let . Decide whether , , , and hold. Find and .
Show solution
The first three statements are true. The fourth is false because . There are two elements of , so its power set has four elements. An element of can itself be a set without its own elements automatically belonging to .
Prove .
Show solution
Membership on the left means , , and . On the right it means and . Once is known, the last condition is equivalent to . Thus the two membership conditions agree.
Show that .
Show solution
Every belongs to the right set. Conversely, for any integer , choose ; then . The two inclusions establish equality, and the second explicitly constructs the witnesses.
Let be finite with , , and . Find and . Explain the disjoint regions used.
Show solution
The union has elements. Its three regions have sizes . The symmetric difference keeps only the two outer regions, so it has elements. If a region is empty, omit it when calling the resulting family a partition, since partition blocks must be nonempty.
Classify , , , and as finite or countably infinite. Which are countable under our convention?
Show solution
Their respective sizes are , , countably infinite, and . All four sets are countable. The singleton contains one element, even though that element is itself an infinite set.
Let . Show that is countably infinite even though every element lies in .
Show solution
Pair with . Every element of appears by its definition. Equal values imply equal positive denominators and hence equal indices, so there is no repetition. This is a bijective pairing with . Boundedness concerns numerical order, not how many elements a set has.
Exploration: compare frameworks without changing the core course
Suppose someone claims to list every subset of as , allowing repetitions. Consider
Explain why the list misses , and why this proves that is uncountable.
Discussion guide
For each , the sets and disagree about whether is a member: exactly when . Thus for every , although is a subset of . Every proposed list therefore misses a subset. A nonempty finite collection could be listed with repetitions, so this rules out finite as well as countably infinite cardinality.
This diagonal construction is legitimate: is selected from the already given set . Unlike unrestricted Russell comprehension, it does not assume a set of all sets. The contradiction refutes the proposed exhaustive list, not the existence of .
Using the suggested readings, compare what the three names refer to and how they discuss a collection such as “all sets.” Do not attempt a proof of their consistency or relative strength.
Discussion guide
ZF is Zermelo–Fraenkel set theory. ZFC adds the axiom of choice. Both quantify over sets; definable classes may be discussed as notation without making every such class a set. NBG has an explicit framework for sets and classes, with proper classes unable to be elements. Authors vary in whether choice or global choice is included in their NBG convention, so check the chosen axiom list before comparing theories. Neither approach accepts a set of all sets.
The practical difference to notice is how existence and collection size are controlled, not which theory is supposedly the next “difficulty level.”
For a given set , consider . Explain why this restricted construction does not produce the unrestricted Russell contradiction. What would happen if ?
Discussion guide
Separation selects a subset of the already given set . If , then its defining condition would imply if and only if , a contradiction. Thus . This is a conclusion about what cannot contain, not a contradiction in the restricted construction. It also shows why no set can contain every set.
Why can the same set carry different order relations without changing from ZFC to NBG? Where does the later chapter’s use of classes enter?
Discussion guide
An order relation is additional structure on a collection; for a set it can be represented by a subset of . Changing that relation does not change the background axioms governing sets. The later chapter uses NBG to discuss classes and larger constructions, then studies particular relations and orders within that framework. The axiomatic background and the chosen order are separate choices.
Continue with Functions and Mappings for correspondences between sets. Return to Relations and Order when ready to study classes, equivalence relations, and order structure more systematically.
References
- [2] E. Lehman, F. T. Leighton, and A. R. Meyer, Mathematics for Computer Science. MIT OpenCourseWare, 2015. Revised May 18, 2015; infinite sets, recursive data, and invariants. https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-spring-2015/mit6_042js15_textbook.pdf ↩
- [3] T. Banakh, “Classical Set Theory: Theory of Sets and Classes,” arXiv:2006.01613, 2026. Version 6, August 15, 2026; NBG sets, classes, and class existence. https://arxiv.org/abs/2006.01613 ↩
Comments