LibreCanon › Math
AI Canon. Written and cross-checked by AI reviewers against cited sources; not yet reviewed by a human. Errors are possible. What this means

Set theory and the foundations of mathematics

“A set is a collection of objects, considered as a single object” [1]. Starting from this idea and one rule for when two sets count as the same, the Open Logic Project’s Sets, Logic, Computation constructs ordered pairs, relations, orders, equivalence classes, trees and functions, and functions in turn “can be identified with certain relations”, meaning sets of pairs [32]. As for what mathematical objects finally are, “set theory provides one answer (there are others)” [39]. The account below draws on the book’s first three chapters. How big infinite sets are (the book’s chapter 4) is covered in Infinity: countable, uncountable, and Cantor’s diagonal, and the techniques for proving claims about sets in Mathematical proof: the methods and why they work. The book says plainly that its set theory is naive, and this article stops at the paradox at the end of its first chapter, which shows why a naive theory falls short [12].

Extensionality: a set is its elements

“It does not matter how we specify the set, or how we order its elements, or indeed how many times we count its elements. All that matters are what its elements are.” This is the principle of extensionality: A = B exactly when the two sets have the same members, each member of either belonging to the other [1]. So naming a member twice, or naming b before a, still gives the set {a, b}, and 1, 2, 3 written backwards or with repeats still gives {1, 2, 3} [1, 2]. One way to name a set is to list what is in it; another is to give a property its members share, written {x : φ(x)}, “the set of x’s such that φ(x)”; extensionality “guarantees that there is always only one set of x’s such that φ(x)”, so that {6} and the set of perfect numbers between 0 and 10 are the same set [2]. It also supplies the standard way to prove that two sets are equal: show that each one contains the other [2].

Subsets and power sets. A ⊆ B, read “A is a subset of B”, holds when B contains every member of A; if in addition A ≠ B, A is a proper subset. Each set is included in itself, and the empty set ∅ is included in every set [3]. Being a member and being a subset are distinct relations, but both can hold at once: {0} is a member of {0, {0}} and also a subset of it [3]. Because the subset condition is one half of the test for extensionality, A = B exactly when A ⊆ B and B ⊆ A [3]. The power set ℘(A) collects every subset of A; {a, b, c} has eight subsets [4].

The named sets. The natural numbers ℕ = {0, 1, 2, …}, the integers ℤ, the rationals ℚ and the reals ℝ each sit as a proper subset inside the next, though “it is less obvious that ℚ ⊊ ℝ, i.e., that there are some real numbers which are not rational” [4, 5]. The book also uses A*, all strings of finite length built from an alphabet A (the empty string among them), and A^ω, the infinite sequences [5].

Operations. A ∪ B, the union, contains whatever is in A or in B, with no member counted twice; A ∩ B, the intersection, contains what is in both, and the sets are disjoint if it has no members; A \ B, the difference, contains the members of A that B lacks [6, 7, 9]. Applied to a set of sets, the union gathers the members of its members and the intersection keeps only what all of them share; for the three sets {a, d}, {a, b} and {a, d, e}, the union is {a, b, d, e} and the intersection is {a} [8].

Order out of unordered sets

“It follows from extensionality that sets have no order to their elements. So if we want to represent order, we use ordered pairs” ⟨x, y⟩, required to satisfy ⟨a, b⟩ = ⟨c, d⟩ exactly when a = c and b = d [9]. The construction the book names after Wiener and Kuratowski makes such a pair out of nothing but sets, taking as ⟨a, b⟩ the set whose members are {a} and {a, b} [10]. A triple is a pair whose first component is itself a pair, ⟨⟨x, y⟩, z⟩, and longer n-tuples are built the same way [10]. The Cartesian product A × B contains every pair whose first component comes from A and whose second comes from B; A × A is written A², and with n elements in A and m in B, A × B has n·m, which the book shows by laying the pairs out in a grid [10, 11]. Since a word over an alphabet is a sequence, A* = {∅} ∪ A ∪ A² ∪ A³ ∪ … [11].

Relations are sets of pairs

On ℕ, “less than” can be identified with the set of pairs ⟨n, m⟩ for which n < m, “without any loss of information”; going the other way, every set of pairs of numbers is some relation on numbers. The book therefore defines a binary relation on A to be any subset of A², and writes Rxy for ⟨x, y⟩ ∈ R [13]. If the pairs are set out in a grid, the identity relation Id_A runs along the diagonal, “less than” fills the part above it and “greater than” the part below [13, 14]. “According to our definition any subset of A² is a relation on A, regardless of how unnatural or contrived it seems”: the empty relation counts, so does the universal relation A², and so does, say, the set of pairs ⟨n, m⟩ in which n exceeds 5 or the product of m and n is at least 34 [14].

The properties. R is reflexive when Rxx holds for all x; transitive when Rxy together with Ryz yields Rxz; symmetric when Rxy yields Ryx; anti-symmetric when Rxy together with Ryx yields x = y; connected when, of any two different elements, one is related to the other; irreflexive when Rxx holds for no x; asymmetric when Rxy and Ryx are never true together [15, 16]. The book warns that anti-symmetry does not demand Rxx, “so an anti-symmetric relation can be reflexive, but it is not the case that every anti-symmetric relation is reflexive”; that failing to be symmetric is not the same as being anti-symmetric, and “a relation can be both symmetric and anti-symmetric at the same time (e.g., the identity relation is)” [15]; and that on a set with members, an irreflexive relation is never reflexive and an asymmetric one is always anti-symmetric, yet some relations are neither reflexive nor irreflexive, and some anti-symmetric ones are not asymmetric [16].

Equivalence relations. Relations with all three properties, reflexivity, symmetry and transitivity, are equivalence relations, and such a relation “chunks up” its domain: the class [x]_R gathers each y with Rxy, and collecting all these classes gives the quotient A/R [16]. The book proves that Rxy is true exactly when [x]_R = [y]_R, which “vindicates the definition” [16, 17]. Congruence modulo n, where for a, b and n ∈ ℤ⁺, a ≡ₙ b means a − b = kn for some integer k, is an equivalence relation, and ℕ/≡ₙ has precisely n members, one class for each remainder from 0 up to n − 1 [17].

Orders. A preorder is reflexive and transitive; add anti-symmetry and it is a partial order; add connectedness as well and it is a linear (total) order [18]. Every order of one kind is also of the kinds before it, “but the converses don’t hold”. On a set with two or more members the universal relation is a preorder and not a partial order. On strings, “no longer than” is a connected preorder and not a partial order: 01 and 10 are each no longer than the other, yet they differ. On a set of sets, ⊆ is a partial order that is “not in general a linear order”. Divisibility partially orders ℕ without ordering it linearly; on ℤ it is merely a preorder, because 1 and −1 each divide the other [18]. Strict orders are transitive, irreflexive and asymmetric, and a connected one is a strict linear order: < as against ≤, ⊊ as against ⊆. A strict order with the diagonal added is a partial order, a partial order with the diagonal taken out is a strict order, and linearity survives in both directions [19, 20]. A strict linear order has a property much like extensionality: if, for all x in A, x < a and x < b are true together or false together, then a = b [20].

Graphs and trees. A directed graph consists of vertices V and edges E ⊆ V²; “a graph just is a set together with a relation on that set”, except that a graph is allowed vertices with no edges [20, 21]. A tree is a partial order with a single least element, its root, in which the part below any node is well-ordered, so that each nonempty subset there has a least member; it follows that every node except the root has no more than one predecessor, which the book takes to mean an immediate parent, an element beneath it with no other element between [22, 23]. Ordered by extension, the finite binary strings make an infinite tree in which every node has finitely many children, and the finite sequences of natural numbers one in which nodes have infinitely many [24]. Kőnig’s lemma says that an infinite tree with finite branching contains an infinite branch [24].

Operations on relations. The inverse of R turns every pair around; the relative product R | S relates x to z if there is a y with Rxy and Syz; restricting R to A leaves R ∩ A²; and applying R to A gives R[A], the set of every y with Rxy for some x in A. Take the successor relation on ℤ: its inverse is the predecessor relation, its relative product with itself relates x to x + 2, and its transitive closure, the union of its finite relative powers, is <, which becomes ≤ when the diagonal is added [25].

Functions

A function f : A → B “is a mapping of each element of A to an element of B”; A is its domain, B its codomain, and its range is the part of B that it actually reaches. “In this mathematical, abstract sense, a function is a black box: what matters is only what output is paired with what input, not the method for calculating the output” [26]. Multiplying two naturals is a function on pairs; sending n to a real number whose square is n is not one, because a positive integer has two square roots; giving every student a final grade defines a function, while giving every student their parents does not [27]. The rules x + 1 and x + 2 − 1 define one and the same function, which rests on “a principle of extensionality for functions”: f = g whenever f(x) = g(x) for every x, “provided that f and g share the same domain and codomain” [28]. When a function is defined case by case, the cases have to cover everything and must not overlap, which “in some cases … will require a proof” [28, 29].

Surjections, injections, bijections. A surjective function leaves no element of its codomain unreached; any function gives a surjection onto its own range. It is injective when distinct arguments always get distinct values; to prove this, assume f(x) = f(y) and conclude that x = y. A bijection is both, and bijections are “one-to-one correspondences” [29, 30, 31]. On ℕ, a constant function is neither; the identity is both; the successor function is injective without being surjective; and halving and rounding up is surjective without being injective [30].

Functions as relations. Together, the pairs ⟨x, f(x)⟩ make up the graph of f; conversely, a relation that is functional (no x relates to two distinct y) and total (each x relates to some y) is the graph of some function [31, 32]. “Because of this close connection between functions and their graphs, we can think of a function simply as its graph. In other words, functions can be identified with certain relations, i.e., with certain sets of tuples” [32].

Inverses. Call g : B → A an inverse of f if each undoes the other: g followed by f returns every y unchanged, and f followed by g returns every x unchanged. Whether f can be undone “may depend on the domain and codomain”: on ℤ, g(y) = y − 1 reverses f(x) = x + 1, but “it does not define a function ℕ → ℕ, since g(0) ∉ ℕ” [33]. Defining g(y) as “the x such that f(x) = y” works only if each y has exactly one such x, “in other words, for g to be defined, f must be both injective and surjective” [33, 34]. Taken separately: an injection has a left inverse and a surjection has a right inverse [34]. (Our note: the book’s proof of the left inverse picks an element of A for the values outside the range. If A is empty and B is not, an injective f has no left inverse at all, since there is no function from B to the empty set; the book does not say so.) The proof for the right inverse picks, for every y, a single x with f(x) = y, and here the book’s footnote is candid: “that this is always possible is actually not obvious — the possibility of making these choices is simply assumed as an axiom. In other words, this proposition assumes the so-called Axiom of Choice, an issue we will gloss over”, though the axiom is not needed “in many specific cases”, such as a domain that is ℕ or finite, or a bijective f [35]. A bijection has an inverse that works on both sides, no function has more than one inverse, and the bijection an injective function induces onto its range has an inverse that, “by a very minor abuse of notation”, is called the inverse of f [35, 36].

Composition and partial functions. In the composition g ∘ f, f is applied first and g second, “the analogue of the operation of relative product on relations”; the range of f has to fall within the domain of g [36]. A partial function gives each element of A no more than one element of B; where it gives none, f(x) is undefined, and what was earlier just called a function is a total function. On the reals, 1/x is partial, with no value at 0 [37]. A relation that never relates one x to two different y is a partial function’s graph, and of a total one if the relation is serial as well [38].

Russell’s paradox, and why this theory is called naive

All that extensionality “really licenses” is this: “if there is a set whose members are all and only the φ’s, then there is only one such set.” So {x : φ(x)} picks out a unique set “if it exists”, and “crucially, not every property lends itself to comprehension. That is, some properties do not define sets. If they all did, then we would run into outright contradictions” [11]. A set can belong to another set, and “nothing about the idea of a set seems to rule” out a set belonging to itself. Take the property of not belonging to oneself, and call R the collection {x : x ∉ x}. Is R a set? It is not: if R existed, R ∈ R would hold exactly when R ∉ R, which is contradictory [12]. The book goes through both cases. If R ∈ R, then R lacks the property that defines R, so R ∉ R; if R ∉ R, then R has that property, so R ∈ R [12].

Escaping the paradox “would need to lay down axioms which give us very precise conditions for stating when sets exist (and when they don’t). The set theory sketched in this chapter doesn’t do this. It’s genuinely naïve. It tells you only that sets obey extensionality and that, if you have some sets, you can form their union, intersection, etc. It is possible to develop set theory more rigorously than this” [12]. These chapters do not give that more rigorous treatment, and neither does this article.

Not covered here

Axiomatic set theory and which axioms rule out Russell’s set; the sizes of sets, enumerations and Cantor’s theorem (chapter 4); the proofs the book leaves as problems, including that the power set of an n-element set has 2ⁿ elements and that the Wiener–Kuratowski pair behaves as a pair; and any claim about set theory’s history, which these chapters do not discuss.

Sources

  • [1]Open Logic Project, Sets, Logic, Computation, §1.1, p. 2 (sets and elements; Definition 1.1, Extensionality; {a, a, b}). View at source ↗
  • [2]Same, §1.1, p. 3 (Examples 1.2–1.4; abstraction notation; the method for proving equality). View at source ↗
  • [3]Same, §1.2, p. 4 (Definition 1.5; Examples 1.6 and 1.7; Proposition 1.8). View at source ↗
  • [4]Same, §1.2–1.3, p. 5 (Definition 1.10, power set; Example 1.11; Example 1.12, the named sets). View at source ↗
  • [5]Same, §1.3, p. 6 (ℕ ⊊ ℤ ⊊ ℚ ⊊ ℝ, “less obvious”; strings; infinite sequences). View at source ↗
  • [6]Same, §1.4, p. 7 (Definition 1.15, union; Example 1.16). View at source ↗
  • [7]Same, §1.4, p. 8 (Definition 1.17, intersection; disjoint; Example 1.18). View at source ↗
  • [8]Same, §1.4, p. 9 (Definitions 1.19 and 1.20; Example 1.21). View at source ↗
  • [9]Same, §1.4–1.5, p. 10 (Definition 1.22, difference; ordered pairs and their identity condition). View at source ↗
  • [10]Same, §1.5, p. 11 (Definition 1.23, Wiener–Kuratowski; tuples; Definition 1.24, Cartesian product; Example 1.26; Proposition 1.27). View at source ↗
  • [11]Same, §1.5–1.6, p. 12 (the grid proof; words; Russell’s paradox introduced, “not every property lends itself to comprehension”). View at source ↗
  • [12]Same, §1.6, pp. 13–14 (self-membership; Theorem 1.29 and proof; the slow walk-through; “genuinely naïve”). View at source ↗
  • [13]Same, §2.1, pp. 16–17 (relations as sets of pairs; Definition 2.1; Example 2.2, the grid and the identity relation). View at source ↗
  • [14]Same, §2.1, p. 18 (less than, greater than; “regardless of how unnatural or contrived”; empty and universal relations). View at source ↗
  • [15]Same, §2.2, p. 19 (Definitions 2.3–2.8; the cautions on anti-symmetry). View at source ↗
  • [16]Same, §2.2–2.3, p. 20 (Definition 2.9, asymmetry; the note on nonempty A; Definitions 2.10 and 2.11, equivalence relations and classes). View at source ↗
  • [17]Same, §2.3, p. 21 (Proposition 2.12 and proof; Example 2.13, modular arithmetic). View at source ↗
  • [18]Same, §2.4, p. 22 (Definitions 2.14–2.16; Examples 2.17–2.20). View at source ↗
  • [19]Same, §2.4, p. 23 (Example 2.21; Definitions 2.22 and 2.23; Example 2.24; Proposition 2.25). View at source ↗
  • [20]Same, §2.4–2.5, p. 24 (Proposition 2.26; Proposition 2.27; graphs introduced). View at source ↗
  • [21]Same, §2.5, p. 25 (Definition 2.28; “a graph just is a set together with a relation”). View at source ↗
  • [22]Same, §2.6, pp. 26–27 (trees in logic; least element; well-ordered; Definition 2.30; Definition 2.31). View at source ↗
  • [23]Same, §2.6, p. 27 (Proposition 2.32 and proof). View at source ↗
  • [24]Same, §2.6, p. 28 (Definitions 2.33 and 2.34; Examples 2.35 and 2.36; Proposition 2.37, Kőnig’s lemma). View at source ↗
  • [25]Same, §2.7, p. 29 (Definition 2.38; Example 2.39; Definition 2.40, transitive closure; Example 2.41). View at source ↗
  • [26]Same, §3.1, p. 32 (functions; “black box”; Definition 3.1; range). View at source ↗
  • [27]Same, §3.1, p. 33 (Examples 3.2–3.4). View at source ↗
  • [28]Same, §3.1, p. 34 (Examples 3.5 and 3.6; extensionality for functions; Example 3.7 begun). View at source ↗
  • [29]Same, §3.1–3.2, p. 35 (cases exhaustive and exclusive; Definition 3.8, surjective; the induced surjection). View at source ↗
  • [30]Same, §3.2, p. 36 (Definition 3.9, injective; Example 3.10). View at source ↗
  • [31]Same, §3.2–3.3, p. 37 (Definition 3.11, bijection; Definition 3.12, graph). View at source ↗
  • [32]Same, §3.3, p. 38 (Proposition 3.13; “functions can be identified with certain relations”; Definition 3.14). View at source ↗
  • [33]Same, §3.3–3.4, p. 39 (application and image; inverses, x + 1 on ℤ versus ℕ; Definition 3.15; the scare-quoted candidate). View at source ↗
  • [34]Same, §3.4, p. 40 (“injective and surjective”; Proposition 3.16, left inverse, and proof; Proposition 3.17 begun). View at source ↗
  • [35]Same, §3.4, p. 41 (Proposition 3.17 concluded; Proposition 3.18; the induced bijection; Proposition 3.19; the Axiom of Choice footnote). View at source ↗
  • [36]Same, §3.4–3.5, p. 42 (Proposition 3.20; Definition 3.21, composition; Example 3.22). View at source ↗
  • [37]Same, §3.6, p. 43 (Definition 3.23, partial functions; Examples 3.24 and 3.25). View at source ↗
  • [38]Same, §3.6, p. 44 (Definition 3.26; Proposition 3.27). View at source ↗
  • [39]Same, Preface, p. xiv (PDF p. 15): “Set theory provides one answer (there are others)”. View at source ↗

Wikipedia was not used as a source.

Works cited