1.2  Sets, Subsets and Russell’s Paradox

Section 1.1 proved statements about integers straight from their definitions. Analysis needs the same for collections, and it talks about collections all the time: the set of upper bounds of a set of numbers, the set of points where a function is positive, the set of all formulas. This section says what a set is allowed to be, what it means for one set to lie inside another, and how sets are described. One new notion carries the weight, the subset; the rest is the vocabulary it needs.

We begin with the simplest possible idea of a set, and we will see it fail.

1.2.1. A naive idea, and what goes wrong with it

In everyday speech a collection is given by a property. “The students in this room”, “the even numbers”, “the prime numbers below 100”: in each case we say what an object must satisfy, and the collection is everything that satisfies it. The naive rule is:

For every property, there is a set whose elements are exactly the objects having that property.

It sounds harmless, and for the properties of everyday mathematics it gives the right answer. But a property may talk about sets themselves, and then the rule can be turned against itself. A set may be an element of another set: the set {N,Z} has two elements, and each of them is a set. So it makes sense to ask of a set x whether x∈x, and the property “x∉x” is a property like any other. Most sets we know have it: the set of even numbers is not an even number, so it is not an element of itself.

Apply the naive rule to this property. It promises a set R=the set of all x with x∉x. Now ask whether R∈R. By the way R was made, an object belongs to R exactly when it is not an element of itself; applied to the object R, this says R∈R exactly when R∉R. A statement that is equivalent to its own negation leads to a contradiction by the rules of Logic and Proof, Chapter 2 alone; lines 4–11 of the derivation after Russell’s theorem, at the end of this section, carry out exactly this argument, with an extra conjunct carried along. So the naive rule is contradictory: it cannot be part of mathematics.

This is Russell’s paradox. We hold it until the end of the section, where it becomes a theorem, Russell’s theorem, about the sets that do exist. First we set out what does work.

1.2.2. Sets and membership

We do not define “set” or “element”. They are the primitive notions of this chapter, in the way that “statement” was primitive in Logic and Proof, Chapter 1: we say how they are used, not what they are made of. A set is a collection of objects, its elements, and we write x∈A for “x is an element of A”, or “x belongs to A”, or “x lies in A”. Its negation is written x∉A. The objects may be numbers, or sets, or (later in this chapter) pairs and functions.

In the language of Logic and Proof, Chapter 5, “∈” is a two-place predicate: x∈A is a statement about the two objects x and A, true or false like x<y. So everything Logic and Proof, Chapter 5 says about predicates, quantifiers, and their rules applies to it unchanged. A statement such as “every element of A is positive” is ∀x(x∈A→x>0), which the bounded notation of Logic and Proof, Definition 5.1.1 shortens to ∀x∈A (x>0).

Two conventions fix what kind of objects we deal with. First, the number sets N, Z, Q, and R are given: we use them as familiar sets, with their school arithmetic and order, as Logic and Proof and Section 1.1 did. (Analysis on the Real Line, Chapter 1 turns the facts we use about R into consequences of axioms.) Second, numbers are not sets: a number has no elements, and no number is equal to a set. So 1≠{1}, and z∈5 is false for every z. Number Systems: From N to R, Chapters 1, 2 and 5 explain how numbers can be built out of sets; nothing in this volume depends on how that is done.

The single most important fact about sets is that a set is determined by its elements. It has no other features: no order in which the elements come, no count of how often each is listed, no color. Two sets with the same elements are the same set.

Definition 1.2.1 (Equality of Sets)

Sets A and B are equal, A=B, if and only if they have the same elements: ∀x(x∈A↔x∈B).

In words: every element of A is an element of B, and every element of B is an element of A. This principle is called extensionality: a set is fixed by its extension, the things it contains, and not by the words used to describe it. The sign = here is not new: it is the equality of Logic and Proof, Definition 5.7.1, “names of the same object”. The direction from A=B to the same elements is =E, with φ the formula x∈z and z the variable replaced (and symmetry, Logic and Proof, Proposition 5.7.1, for the way back from B to A). The converse direction is the principle just stated, that a set has no features beyond its elements; it is what lets an equation proved from “same elements” be used with =E like any other. The principle is an “if and only if”, so it is used in both directions: to prove A=B, prove the ∀ statement; from A=B, conclude x∈A↔x∈B for any x we like.

Sets with finitely many elements can be written by listing their elements between braces: {1,2,3} is the set whose elements are 1, 2, and 3, and nothing else. Extensionality has two immediate consequences for such lists.

  • Repetition does not matter. {1,1,2}={1,2}. An object x belongs to the left side exactly when x=1 or x=1 or x=2, and to the right side exactly when x=1 or x=2; the two conditions are equivalent, since “x=1 or x=1” says no more than “x=1”.
  • Order does not matter. {1,2}={2,1}. Here the two conditions are “x=1 or x=2” and “x=2 or x=1”, which are equivalent because ∨ commutes (Logic and Proof, Example (First derivations with “or”)).

Order and repetition are exactly what a list has and a set does not. When order matters we will need a different object, the ordered pair of Section 1.4.

A set with one element, {a}, is a singleton. A singleton and its element are different things: {1} is a set, and 1 is a number, so 1≠{1} by our convention. For sets the difference is just as real. The set {N} has exactly one element, namely N, while N has infinitely many; so they differ, by extensionality, as 2∈N and 2∉{N}.

Quick check. Are the sets {1,2,2,3}, {3,2,1}, and {1,{2},3} equal?

Solution. The first two are equal: each has exactly the elements 1, 2, 3, and repetition and order do not count. The third is different: its elements are 1, {2}, and 3. The number 2 lies in the first set, but not in the third, since 2≠1, 2≠3, and 2≠{2} (a number is not a set). So by Definition 1.2.1 the third set differs from the other two.

1.2.3. Subsets

Most statements about sets in analysis are not equalities but inclusions: every Cauchy sequence converges, every continuous function on [a,b] is bounded, every upper bound of a set is at least its supremum. Each has the shape “everything of this kind is also of that kind”. Before a definition, look at one such statement in the language of sets. The multiples of 6 and the multiples of 3 form sets S={…,−12,−6,0,6,12,…},T={…,−6,−3,0,3,6,…}, and every element of S is an element of T, because 6k=3⋅(2k). The sets are not equal (3∈T but 3∉S), yet one sits inside the other. This relation between sets deserves a name.

A set is a subset of another if everything in the first is also in the second.

Definition 1.2.2 (Subset)

Let A and B be sets. A is a subset of B, written A⊆B, if every element of A is an element of B: ∀x(x∈A→x∈B). We also say that A is contained in B, or that B contains A. If A⊆B and A≠B, then A is a proper subset of B, written A⊊B.

In words, clause by clause. The quantifier ∀x ranges over every object whatsoever, not over the elements of A only; the implication x∈A→x∈B restricts attention to the elements of A, and says nothing about objects outside A. With the bounded notation of Logic and Proof, Definition 5.1.1, the same condition is ∀x∈A (x∈B): “for every x in A, x is in B”. The symbol ⊆ allows equality, as ≤ does for numbers; the symbol ⊊ excludes it, as < does. This book never writes ⊂, which some books use for ⊆ and others for ⊊.

The definition is a ∀ around an →, and its rules are the rules of those two symbols. To prove A⊆B, we prove the ∀ statement: by the rule ∀I of Logic and Proof, Chapter 5 we open a box for an arbitrary x (in prose, “let x be arbitrary”), and inside it we prove x∈A→x∈B by →I (Logic and Proof, Definition 1.4.1): assume x∈A and reach x∈B. The two openings are always written together, as “let x∈A”. To use A⊆B, we apply ∀E (Logic and Proof, Chapter 5) at the element we care about, and then →E: from A⊆B and a∈A, conclude a∈B. This gives the first named move about sets.

We call this move element-chasing:

Example (Method: element-chasing)

Template. Begin “Let x∈A.” Unwind the definition of A to see what is known about x. Rewind the definition of B to see what must be shown, and reach it. End “Hence x∈B; since x was arbitrary, A⊆B.”

When to use it. The goal is an inclusion A⊆B, or any statement of the shape ∀x(x∈A→…).

The usual failure. Checking some elements of A and stopping, entry (N1) of Logic and Proof, Example (What is not allowed) (the second warning below shows it). Starting from x∈B instead, which proves the converse inclusion, entry (N5). Choosing a particular x, such as x=0, where an arbitrary one is needed.

Quick check. Write the first and the last sentence of an element-chasing proof that {n∈Z:4∣n}⊆{n∈Z:2∣n}. Then fill in the middle.

Solution. First: “Let n∈Z with 4∣n.” Last: “Since n was arbitrary, the inclusion holds.” Middle: by Definition 1.1.2, n=4k for some k∈Z. Then n=2(2k) with 2k∈Z, so 2∣n. (Or cite Proposition 1.1.1 with 2∣4.)

Here is the move three times: two ordinary inclusions, then the degenerate one. In each, the first sentence is the pair of openings, ∀I and →I, and the rest reaches x∈B.

Example (Three inclusions)
  • (a) Show that [1,2]⊆[0,3].
  • (b) Let S be the set of integer multiples of 6 and T the set of integer multiples of 3, as above. Show that S⊆T. By Definition 1.1.2, S consists of the integers x with 6∣x, and T of those with 3∣x.
  • (c) Let A be any set. Show that A⊆A.

Solution.

  • (a) Let x∈[1,2]. Then 1≤x≤2, by the meaning of the interval. Hence 0≤1≤x and x≤2≤3, so 0≤x≤3, that is, x∈[0,3]. Since x was arbitrary, [1,2]⊆[0,3].

  • (b) Let x∈S, that is, let x be an integer with 6∣x. By the definition of ∣, there is an integer k with x=6k; choose such a k (this is ∃E of Logic and Proof, Chapter 5, and the name k is new). Then x=3⋅(2k), and 2k is an integer, so 3∣x, with 2k as the witness (∃I). Hence x∈T. Since x was arbitrary, S⊆T.

  • (c) Let x∈A. Then x∈A. Since x was arbitrary, A⊆A. The box of →I opens on x∈A and closes on the same line; in a derivation it is the one-line box that proves x∈A→x∈A.

Part (c) is the degenerate case: every set is a subset of itself. It matters because it shows that ⊆ allows equality, and so “A⊆B” alone never tells us that B has anything A lacks. To say that A is a proper subset, A⊊B, we also need an element of B outside A. In part (b) that element is 3: it lies in T, not in S.

A nonexample by minimal change. Replace 6 by 4 and 3 by 6 in (b): is the set of multiples of 4 a subset of the set of multiples of 6? The first sentence of the proof still works (let x=4k), but the last step fails: 4k need not be 6 times an integer. One element is enough to show the failure: 4 is a multiple of 4, and it is not a multiple of 6. What fails is the clause “every element of A” of Definition 1.2.2; here it fails at the element 4.

That last observation is worth recording in symbols, because it is how every inclusion is refuted. By the negation laws of Logic and Proof, Chapter 6 (¬∀xφ is equivalent to ∃x¬φ, and ¬(φ→ψ) to φ∧¬ψ), A⊈Bmeans∃x(x∈A∧x∉B). To refute an inclusion, exhibit one element of the first set that is not in the second.

Why this definition. The definition says nothing about objects outside A; that is the implication doing its job. If the → were replaced by ∧, the condition ∀x(x∈A∧x∈B) would say that every object lies in A and in B, which is false for every set we will meet (Russell’s theorem at the end of this section shows that no set contains every set). This is the reason why a bounded “for every” always unfolds to an implication (Logic and Proof, Definition 5.1.1).

Warning. Element or subset? The symbols ∈ and ⊆ relate different things. x∈A says that x is one of the objects collected in A; B⊆A says that every object collected in B is also collected in A. For example 1∈{1} and {1}⊆{1}, but {1}∉{1}: the only element of {1} is the number 1, which is not the set {1}. And “1⊆{1}” is not a comparison worth making: 1 is a number, not a set, so the definition of ⊆ does not apply to it. Before writing either symbol, ask whether the thing on the left is one of the objects in the set on the right, or a collection of such objects.

Second readingAn element and a subset at once

Sometimes a set is both an element and a subset of the same set. In C={1,{1}}, the set {1} is an element (it is listed) and also a subset (its only element, 1, is listed too). Change one entry: in {1,2}, the set {1} is still a subset, but it is no longer an element, since the two elements are the numbers 1 and 2. Whether {1}∈D and whether {1}⊆D are two separate questions, and each is answered by looking at the elements of D.

Warning. Checking some elements proves nothing about all of them. To prove A⊆B, checking that a few elements of A lie in B is not enough, however many are checked. “The integers 0,12,24 and −12 are multiples of 4 and of 3” does not prove that the set of multiples of 4 is a subset of the set of multiples of 3, and that inclusion is false (4 is a witness). The error is entry (N1) of the catalogue of Logic and Proof, Chapter 8: verifying instances and concluding a ∀. The rule ∀I needs an arbitrary element, one about which nothing is known except that it lies in A.

Two inclusions make an equality

The first payoff of the definition connects it with equality. An equality of sets is an ↔ under a ∀, and by Logic and Proof, Proposition 2.4.1 an ↔ is two implications. So an equality should be two inclusions.

Proposition 1.2.1 (Equality Is Two Inclusions)

For all sets A and B, A=B if and only if A⊆B and B⊆A.

Idea. Unwind all three definitions. A=B is ∀x(x∈A↔x∈B); the right side is ∀x(x∈A→x∈B) and ∀x(x∈B→x∈A). Inside the ∀, the statements are P↔Q on one side and P→Q, Q→P on the other, with P the statement x∈A and Q the statement x∈B; Logic and Proof, Proposition 2.4.1 says exactly that these are interchangeable. So the proof is that proposition applied at an arbitrary x, once in each direction.

Proof. (⇒) Suppose A=B. Let x be arbitrary. By Definition 1.2.1, x∈A↔x∈B, so by the first half of Logic and Proof, Proposition 2.4.1 (with P the statement x∈A and Q the statement x∈B, used as a derived rule, Logic and Proof, Definition 2.3.1), x∈A→x∈B and x∈B→x∈A. Since x was arbitrary, ∀x(x∈A→x∈B) and ∀x(x∈B→x∈A); by Definition 1.2.2, A⊆B and B⊆A.

(⇐) Suppose A⊆B and B⊆A. Let x be arbitrary. By Definition 1.2.2, x∈A→x∈B and x∈B→x∈A, so by the second half of Logic and Proof, Proposition 2.4.1, x∈A↔x∈B. Since x was arbitrary, A=B by Definition 1.2.1.

The name of the proposition in words is antisymmetry of ⊆: as for ≤ on numbers, A⊆B and B⊆A together force equality. It licenses the move that proves almost every set identity in this chapter.

Example (Method: two inclusions)

Template. To prove A=B, write two paragraphs, labeled (⊆) and (⊇), each an element-chase (Example (Method: element-chasing)). The two paragraphs are separate boxes: neither uses the other’s assumption. To compute a set, first guess it from small cases, then prove the guess this way.

When to use it. A set equality that no known law gives at once. For “S=∅”, only (⊆) needs work.

The usual failure. Proving one inclusion only, or using the assumption of the (⊆) paragraph inside the (⊇) paragraph. Logic and Proof wrote such a proof in prose (Logic and Proof, Example (Two inclusions)).

Quick check. To prove {x∈R:x2=1}={−1,1}, which inclusion needs algebra, and which only a check?

Solution. (⊆) needs algebra: x2=1 gives (x−1)(x+1)=0, so x=1 or x=−1. (⊇) checks two cases: 12=1 and (−1)2=1.

Inclusions chain

The second payoff is that inclusions chain, as ≤ does.

Proposition 1.2.2 (Inclusion Is Transitive)

For all sets A, B, and C, if A⊆B and B⊆C, then A⊆C.

Idea (Scratch work). The goal A⊆C is a ∀ around an →, so the method of Example (Method: element-chasing) applies: let x∈A, and we must reach x∈C. Each hypothesis is a ∀ around an → too, and we use each at the same x. The table records the search, one move per row.

Givens Goal
A⊆B, B⊆C A⊆C
A⊆B, B⊆C, x∈A (x arbitrary) x∈C
…, x∈B (by A⊆B at x) x∈C: gap closed by B⊆C at x

The first hypothesis carries x from A into B, the second from B into C, and nothing else is needed.

Proof. Let x∈A. Since A⊆B, x∈B; since B⊆C, x∈C. Since x was arbitrary, A⊆C.

Second readingTransitivity, rule by rule

The proof above is level-3 prose. Here is the same proof at two lower levels: first as a derivation, then as prose in which each sentence carries its rule in brackets. (These are levels 0 and 2 of Logic and Proof, Chapter 8; from here on the book writes level-3 prose; after one more fully tagged proof, in Section 1.3, brackets appear only on the step a proof is about.)

Unwound by Definition 1.2.2, the hypotheses are ∀x(x∈A→x∈B) and ∀x(x∈B→x∈C), and the goal is ∀x(x∈A→x∈C). The following is a derivation of the goal from the hypotheses. The outer box, flagged x0, is the box of ∀I (Logic and Proof, Chapter 5); it has no assumption line.

1∀x(x∈A→x∈B)
2∀x(x∈B→x∈C)
3x0x0∈A
4x0∈A→x0∈B∀E 1
5x0∈B→E 4, 3
6x0∈B→x0∈C∀E 2
7x0∈C→E 6, 5
8x0∈A→x0∈C→I 3–7
9∀x(x∈A→x∈C)∀I 3–8

The same proof in prose, with each step’s rule in brackets:

Suppose A⊆B and B⊆C. Let x be arbitrary [∀I, opening], and suppose x∈A [→I, opening]. Since A⊆B, in particular x∈A→x∈B [∀E], so x∈B [→E]. Since B⊆C, in particular x∈B→x∈C [∀E], so x∈C [→E]. Hence x∈A→x∈C [→I, closing], and since x was arbitrary, A⊆C [∀I, closing].

This proves the proposition.

At level 3, the prose a mathematician writes, the same proof is one line: let x∈A; then x∈B since A⊆B, and x∈C since B⊆C. The silent steps are those Logic and Proof, Chapter 8’s convention allows: the two instances of ∀E at the obvious term x, and the two closing sentences. What may never be silent is the opening “let x∈A”, and the two citations, “since A⊆B” and “since B⊆C”.

Quick check. Let A={1,2}, B={1,2,3}, and C={1,3}. Which of the six statements A⊆B, B⊆A, A⊆C, C⊆A, B⊆C, C⊆B are true? For each false one, name a witness.

Solution. True: A⊆B and C⊆B (every listed element of A, and of C, is listed in B). False: B⊆A (witness 3∈B, 3∉A); A⊆C (witness 2); C⊆A (witness 3); B⊆C (witness 2). Both A and C are proper subsets of B, and neither of A, C is a subset of the other.

1.2.4. Describing sets: listing and specification

Listing works for a handful of elements. For a set such as “the real numbers whose square is less than 2” we need to describe the elements by a property, as the naive rule wanted. The repair of the naive rule is small but essential: we may cut a set out of a set we already have.

Definition 1.2.3 (Specification)

Let A be a set and P(x) a property of objects x. Then there is a set, written {x∈A:P(x)}, whose elements are exactly the elements of A that have the property P: for every y, y∈{x∈A:P(x)}⟺y∈A and P(y).

The notation is read “the set of x in A such that P(x)”; the colon is read “such that” (the book never writes a bar here, so that a bar stays free for divisibility and absolute value). The letter x is a bound variable, like the x of ∀x: {x∈A:P(x)} and {t∈A:P(t)} are the same set. The set A is the ambient set of the description, and every set-builder in this book has one, named or fixed by the context; a set written {f(a):a∈A} is the image of A under f (Section 1.7), and any other set the book defines is shown to exist by (W1)–(W6) where it is introduced. By Definition 1.2.1, the equivalence in the definition determines the set completely, so “the” set is justified.

In the language of the rules: to show that y belongs to {x∈A:P(x)}, show y∈A and P(y); from y∈{x∈A:P(x)}, conclude both. Each is one ↔E (Logic and Proof, Definition 2.4.1) with the definition, followed or preceded by ∧I or ∧E (Logic and Proof, Definition 1.2.5); at level 3 all of these are silent, and a proof simply writes “by definition” or nothing at all.

Specification is one of a short list of working rules that say which sets exist. We state them once, here, and use them from now on without comment.

  • (W1) Specification. For a set A and a property P, {x∈A:P(x)} is a set (Definition 1.2.3).
  • (W2) Listing. Any finitely many objects a1,…,an form a set {a1,…,an}, whose elements are exactly a1,…,an.
  • (W3) Unions. For sets A and B, there is a set whose elements are exactly the objects lying in A or in B; more generally, for a family of sets indexed by a set, there is a set whose elements are exactly the objects lying in at least one member of the family (Section 1.3).
  • (W4) Power sets. For a set X, the subsets of X form a set (Section 1.3).
  • (W5) Products. For sets A and B, the ordered pairs (a,b) with a∈A and b∈B form a set; more generally, for a set X and n∈N with n≥2, the n-tuples (x1,…,xn) with every xk∈X form a set (Section 1.4).
  • (W6) Numbers. N, Z, Q, and R are sets.

What matters here is what is missing from the list: there is no rule that collects all objects with a property, without an ambient set. The end of this section shows that such a rule would be contradictory.

Second readingWhere the working rules come from

These rules are enough for everything the book does with sets until Chapter 3, which adds one more: a principle for making infinitely many choices at once (Section 1.6 shows where it is first needed). They are not axioms in the formal sense, and we do not try to derive them from fewer principles; Number Systems: From N to R, Chapter 1 states the axioms of set theory behind them and shows how (W1)–(W5) and the set N follow from them, (W3) only for families of subsets of one given set (a family with no such ambient set needs a further axiom, which Axiomatic Set Theory adds), and Number Systems: From N to R, Chapters 2 and 5 build Z, Q and R, which completes (W6).

1.2.5. The empty set

Among all sets, one is special: the set with nothing in it. It turns up constantly: as the set of real solutions of x2=−1, as the intersection of two sets with nothing in common (Section 1.3), as the domain of a function with no inputs (Section 1.5). Without it, “the set of solutions” would not always name a set.

Definition 1.2.4 (Empty Set)

An empty set is a set with no elements: a set E such that ∀x(x∉E).

Such a set exists. Take any set we are given, say N, and collect its elements x with x≠x; by specification (Definition 1.2.3), this is a set, and since x=x for every x (=I, Logic and Proof, Definition 5.7.1), nothing has the property, so the set has no elements. There is also at most one empty set, which justifies the article “the”.

Proposition 1.2.3 (The Empty Set Is Unique)

If E and E′ are empty sets, then E=E′.

Proof. Let x be arbitrary. Since E and E′ are empty, x∉E and x∉E′. By Logic and Proof, Proposition 2.1.2, x∉E gives x∈E→x∈E′, and x∉E′ gives x∈E′→x∈E. So x∈E↔x∈E′ by Logic and Proof, Proposition 2.4.1. Since x was arbitrary, E=E′ by Definition 1.2.1.

We write ∅ for the empty set. The same vacuous truth gives its most useful property at once: ∅⊆A for every set A. Indeed, let x be arbitrary; x∉∅, so x∈∅→x∈A by Logic and Proof, Proposition 2.1.2; since x was arbitrary, ∅⊆A. In words: to refute ∅⊆A we would need an element of ∅ outside A, and ∅ has no elements at all.

The empty set is a set with no elements, and a set containing it is not empty. The set {∅} has exactly one element, namely ∅; so {∅}≠∅, with ∅ itself as the witness: ∅∈{∅} and ∅∉∅. A box containing an empty box is not an empty box.

Quick check.

  • (a) Is ∅⊆∅?
  • (b) Is ∅∈∅?
  • (c) Which of the sets ∅, {∅}, {{∅}} are equal?

Solution.

  • (a) Yes: ∅⊆A for every set A, and in particular for A=∅. (It also follows from A⊆A.)

  • (b) No: ∅ has no elements, so nothing, not even ∅, belongs to it.

  • (c) None. ∅ has no elements, and each of the other two has exactly one, so ∅ differs from both. The only element of {∅} is ∅, and the only element of {{∅}} is {∅}; these two elements are different by the first observation, so ∅∈{∅} but ∅∉{{∅}}, and the two sets differ by Definition 1.2.1.

1.2.6. Computing with set-builders

The next worked example shows how a set-builder is computed: we guess the answer, then prove the guess by two inclusions (Proposition 1.2.1).

Example (Computing sets given by a property)
  • (a) Show that {x∈Z:x2<5}={−2,−1,0,1,2}.
  • (b) Show that {x∈R:x2<0}=∅.

Solution.

  • (a) Write S for the left side. Scratch: the squares of 0, ±1, ±2 are below 5 and (±3)2=9 is not, so guess S={−2,…,2}. Then prove the guess by the method of Example (Method: two inclusions); (⊆) is the inclusion that needs an argument.

    (⊆) Let x∈S. Then x∈Z and x2<5, by Definition 1.2.3. We claim |x|≤2. Otherwise |x|≥3, since x is an integer, and then x2=|x|2≥9>5, which contradicts x2<5. So |x|≤2, and the integers with |x|≤2 are −2,−1,0,1,2. Hence x∈{−2,−1,0,1,2}.

    (⊇) Let x∈{−2,−1,0,1,2}. Then x is one of five integers, and we check each case: x2 is 4,1,0,1,4 respectively, and each is less than 5. So x∈Z and x2<5, that is, x∈S.

    By Proposition 1.2.1, S={−2,−1,0,1,2}.

  • (b) (⊆) Let x∈{x∈R:x2<0}. Then x is a real number with x2<0; but x2≥0 for every real x, a contradiction. So this case cannot occur, and x∈∅ holds in it vacuously (⊥E, Logic and Proof, Definition 2.1.1).

(⊇) ∅⊆{x∈R:x2<0}, because ∅ is a subset of every set.

By Proposition 1.2.1, the set is ∅. A set-builder with an impossible property is a legitimate description of ∅.

Second readingA finite list of cases is a proof

Two remarks on the example. In (a), the (⊇) direction is a proof by cases over a finite list, which is legitimate (the method of Example (Method: proof by cases)): the five cases exhaust the set, because the list says exactly which elements it has. That is quite different from the error of the second warning above, where finitely many cases were checked for an infinite set. In (b), the (⊇) direction is free, and only (⊆) needs an argument. For “S=∅” this is always so: the claim amounts to “S has no elements”.

1.2.7. Russell’s paradox as a theorem

We return to the contradiction of the opening. The naive rule failed on R= “all x with x∉x”. Specification allows only the version with an ambient set: for any set A, RA:={x∈A:x∉x} is a set, by (W1). What happens to the paradox now?

Theorem 1.2.4 (Russell’s Theorem)

For every set A, the set RA={x∈A:x∉x} is not an element of A. Hence there is no set of which every set is an element.

Try it first (five minutes): suppose RA∈A. Is RA∈RA? Try each answer in turn, and see where each one leads.

Idea. The attempt runs into the old paradox, but with one extra condition. If RA∈RA, then by specification RA∉RA: the first answer refutes itself. If RA∉RA, then specification puts RA into RA, provided RA∈A: the second answer refutes itself only under that proviso. So the two answers together are impossible exactly when RA∈A, and the conclusion is not a contradiction in mathematics but a fact: RA∉A.

We do not need to split into the two answers. The first answer is refuted outright, with no proviso, by ¬I (Logic and Proof, Definition 2.2.1); so RA∉RA holds whenever RA∈A. That fact, fed back into specification, gives RA∈RA, and the two collide.

Proof. Let A be a set, and write R for RA. By Definition 1.2.3, for every y, (∗)y∈R⟺y∈A and y∉y. Suppose R∈A, for ¬I. We first show R∉R. Suppose R∈R. Then by (∗) at y=R, R∈A and R∉R; in particular R∉R, which contradicts R∈R. Hence R∉R, by ¬I. Now R∈A and R∉R, so R∈R by (∗) read from right to left. This contradicts R∉R. Hence R∉A, by ¬I.

For the second claim, suppose U were a set of which every set is an element. By the first claim with A=U, the set RU is not an element of U; but RU is a set, so it is an element of U. This contradiction shows that no such U exists.

Second readingRussell’s theorem as a derivation

Here is the first part of the proof as a derivation, with (∗) as its premise, written as the universal statement it is, and R for RA:

1∀y(y∈R↔(y∈A∧y∉y))
2R∈A
3R∈R↔(R∈A∧R∉R)∀E 1
4R∈R
5R∈A∧R∉R↔E 3, 4
6R∉R∧E 5
7⊥¬E 4, 6
8R∉R¬I 4–7
9R∈A∧R∉R∧I 2, 8
10R∈R↔E 3, 9
11⊥¬E 10, 8
12R∉A¬I 2–11

Every rule in it is one of ∀E, ↔E, ∧E, ∧I, ¬E, and ¬I. There is no RAA, and no excluded middle: the inner box (lines 4–7) refutes one answer outright instead of splitting into two answers. This is worth noticing. The paradox is not an artifact of classical logic, and cannot be escaped by giving up a classical rule; it is a genuine contradiction in the naive rule, and the only repair is to change which sets exist.

What the theorem says about sets. Read with A arbitrary, the theorem says that no set contains everything: for every set A we have produced a set, RA, outside it. The naive rule “any property defines a set” is exactly specification without the phrase “x∈A”, and the theorem shows that the phrase cannot be dropped: with A ranging over “everything”, RA would be the paradoxical R. This is why every set-builder in this book has an ambient set, and why (W1)–(W6) contain no “set of all sets”. When we want “all objects with a property”, we first say where to look.

Russell’s theorem: contradiction about sets. Theorem 1.2.4 proves a negative statement, RA∉A, by the shape of the “not both” half of Theorem 1.1.2: suppose the statement to be refuted, RA∈A, and derive a contradiction; ¬I (Logic and Proof, Definition 2.2.1) then gives its negation, which is the goal. So the proof needs neither RAA nor excluded middle, as the derivation in the fold after the proof shows.

The argument has a shape that will return: a set built from A so that it disagrees with each candidate on the candidate itself. Chapter 3 proves by the same shape of argument that no function from a set X to the set of its subsets reaches every subset.

1.2.8. Exercises

A. Check your understanding

Exercise (A1)
  • (a) Negate “A⊆B” in symbols, and then in words, with the negation pushed through the quantifier and the implication.
  • (b) True or false: {1}∈{{1},2}; {1}⊆{{1},2}; ∅⊆∅; {∅}⊆{1}. Give a reason for each.
  • (c) List the elements of {n∈Z:0<n2≤9}.
  • (d) In an element-chasing proof of A⊆B, the first sentence is “let x∈A”. Which rule of logic gives its first clause, and which its second?

Solution.

  • (a) By Definition 1.2.2, A⊆B is ∀x(x∈A→x∈B). By the quantifier negation law of Logic and Proof, Chapter 6, its negation is equivalent to ∃x¬(x∈A→x∈B), and by the law for negated implications (also Logic and Proof, Chapter 6) to ∃x(x∈A∧x∉B). In words: some element of A is not an element of B.

  • (b) True: {1} is listed as an element of {{1},2}. False: the only element of {1} is 1, and 1∉{{1},2}, since 1≠{1} (a number is not a set) and 1≠2; so 1 is a witness. True: ∅ is a subset of every set. False: ∅∈{∅} but ∅∉{1}, since ∅≠1; so ∅ is a witness.

  • (c) {−3,−2,−1,1,2,3}. The integer 0 is excluded because 02=0 is not >0, and integers with |n|≥4 have n2≥16>9.

  • (d) “Let x∈A” opens two boxes. Its first clause, “let x be arbitrary”, is ∀I (Logic and Proof, Chapter 5); its second, “suppose x∈A”, is →I (Logic and Proof, Definition 1.4.1). The proof must then reach x∈B inside both boxes.

B. Practice

Exercise (B1: A set given by an equation)

Prove that {x∈R:x2−3x+2=0}={1,2}, by two inclusions.

Solution. Write S for the left side.

(⊆) Let x∈S. Then x is real and x2−3x+2=0. Since x2−3x+2=(x−1)(x−2), we have (x−1)(x−2)=0. A product of two real numbers is zero only if one of the factors is zero, so x−1=0 or x−2=0, that is, x=1 or x=2. In either case x∈{1,2}.

(⊇) Let x∈{1,2}, so x=1 or x=2. If x=1, then x2−3x+2=1−3+2=0. If x=2, then x2−3x+2=4−6+2=0. In either case x is a real number satisfying the equation, so x∈S.

By Proposition 1.2.1, S={1,2}.

Exercise (B2: A subset of the empty set)

Let A be a set with A⊆∅. Prove that A=∅.

Solution. We have A⊆∅ by hypothesis, and ∅⊆A because the empty set is a subset of every set. By Proposition 1.2.1, A=∅.

Directly: if x∈A, then x∈∅ because A⊆∅, which is impossible; so A has no elements, and it is the empty set by Proposition 1.2.3.

Exercise (B3: Equal or not?)

For each pair, determine whether the two sets are equal. Justify your answer: prove each equality, and give a witness element for each inequality.

  • (a) {x∈Z:4∣x} and {x∈Z:2∣x}.
  • (b) {x∈R:x2=4} and {−2,2}.
  • (c) {∅,{∅}} and {{∅},∅,∅}.
  • (d) {x∈Z:x2<2} and {x∈N:x<2}.

Solution.

  • (a) Not equal. The integer 2 lies in the second set (2=2⋅1) but not in the first, since 2=4k would need k=12, which is not an integer. (The first set is a proper subset of the second: x=4k gives x=2⋅(2k).)

  • (b) Equal. (⊆) If x is real with x2=4, then (x−2)(x+2)=x2−4=0, so x=2 or x=−2. (⊇) 22=4 and (−2)2=4.

  • (c) Equal. Both sets have exactly the elements ∅ and {∅}: an object lies in the first exactly when it is ∅ or {∅}, and in the second exactly when it is {∅} or ∅ or ∅. Order and repetition do not count.

  • (d) Not equal. The first set is {−1,0,1}: an integer with |x|≥2 has x2≥4, and (−1)2=1, 02=0, 12=1 are below 2. The second set is {0,1}, since N starts at 0. The witness −1 lies in the first set and not in the second (−1∉N).

Exercise (B4: Prove or disprove)

Prove each true statement, by two inclusions where it is an equality, and refute each false one with a concrete counterexample.

  • (a) {n∈Z:n=2k+1 for some k∈Z}={n∈Z:n=2k−1 for some k∈Z}.
  • (b) {n∈Z:2∣n and 4∣n}={n∈Z:8∣n}.
  • (c) {x∈R:x3=x}={−1,0,1}.
  • (d) For all sets A, B, C: if A⊆B and B⊈C, then A⊈C.
  • (e) For all sets A, B, C: if A⊆B, B⊆C and C⊆A, then A=C.

Solution.

  • (a) True. (⊆) Let n=2k+1 with k∈Z. Then n=2(k+1)−1, and k+1∈Z, so n lies in the right set. (⊇) Let n=2k−1 with k∈Z. Then n=2(k−1)+1, and k−1∈Z, so n lies in the left set. Each direction re-indexes the witness; both sets are the odd integers.

  • (b) False. The integer 4 lies in the left set, since 4=2⋅2 and 4=4⋅1. It does not lie in the right set: 4=8k has no integer solution k, because k≥1 gives 8k≥8 and k≤0 gives 8k≤0. (The left set is the set of multiples of 4.)

  • (c) True. For real x, x3−x=x(x−1)(x+1). (⊆) If x3=x, this product is 0, so one factor is 0, and x∈{0,1,−1}. (⊇) 03=0, 13=1 and (−1)3=−1.

  • (d) False. Take A=C=∅ and B={1}. Then A⊆B, and B⊈C with the witness 1; but A⊆C, since ∅⊆∅.

  • (e) True. From A⊆B and B⊆C, Proposition 1.2.2 gives A⊆C. Together with the hypothesis C⊆A, Proposition 1.2.1 gives A=C.

C. Going deeper

Exercise (C1: Every set has something outside it)

Let A be a set, and let RA={x∈A:x∉x} as in Theorem 1.2.4.

  • (a) Let A+ be the set whose elements are the elements of A together with the object RA (it exists by (W2) and (W3)). Show that A⊊A+.
  • (b) Deduce from Theorem 1.2.4 that no set A has the property “every subset of A is an element of A”.

Solution (Hint 1). In (a), a proper inclusion needs two things: the inclusion, and a witness in the larger set that is not in the smaller one. The theorem supplies the witness. In (b), look for a subset of A that the theorem says is not an element of A.

Solution (Hint 2). For (b): suppose, for ¬I, that every subset of A is an element of A. First show that RA⊆A.

Solution.

  • (a) First, A⊆A+: an element of A is an element of A+ by the description of A+. Second, A+≠A: the object RA lies in A+, and RA∉A by Theorem 1.2.4. So RA is a witness, and A⊊A+.

  • (b) Suppose, for ¬I, that A is a set such that every subset of A is an element of A. The set RA is a subset of A: if y∈RA, then y∈A (and y∉y) by Definition 1.2.3. So by the assumption, RA∈A, which contradicts Theorem 1.2.4. Hence no set has the property.

Part (a) says that no set is “as large as possible”: there is always a set with one more element. Part (b) rules out a set containing all of its own subsets; for instance, no set A has as its elements exactly the subsets of A.

Marking scheme. (10 points) - 2: (a) proves the inclusion A⊆A+ from the description of A+. - 3: (a) names RA as the witness to A+≠A, citing Theorem 1.2.4 for RA∉A. - 3: (b) proves RA⊆A by element-chasing through Definition 1.2.3. - 2: (b) combines the assumption with RA⊆A to get RA∈A, and cites the theorem for the contradiction.

Fatal errors (0 for the step): using “the set of all sets” or any set-builder without an ambient set; taking A+≠A as obvious “because an element was added” (if RA were already in A, nothing would have been added).

Exercise (C2: Antisymmetry for sets of sets)

Can there be sets A and B, whose elements are themselves sets, such that A⊆B, B⊆A, and A≠B? Explain why the answer does not depend on what the elements of A and B are.

Solution. No. By Proposition 1.2.1, A⊆B and B⊆A give A=B, for all sets A and B.

The answer does not depend on the elements, because nothing in the proof of Proposition 1.2.1 looks at them. The proof works with the statements x∈A and x∈B for an arbitrary object x, and uses only Definition 1.2.2, Definition 1.2.1, and the propositional law Logic and Proof, Proposition 2.4.1 applied to those two statements. Whether x is a number, a set, or a set of sets never enters. For example, with A={∅,{∅}} and B={{∅},∅}, the two inclusions hold and indeed A=B.

The point of the question is a habit: an element-chasing proof treats its element as a black box, and so it proves the statement for sets of anything at all.