Source and provenance

These are all seven files in the frozen Sets source boundary, shown line by line and copied byte-for-byte for download. Formula records additionally retain exact line, column, byte-offset, delimiter, TeX, expression binding, speech, meaning, and native MathML data in the packaged authority ledgers.

content/sets-functions-relations/sets/sets.tex

24 lines; SHA-256 eea34d38bb52811468a0025d348457a0f4d3f44aae4b7cabb28551d6328e2785. Open the preserved source file.

  1. % Part: sets-functions-relations
  2. % Chapter: sets
  3. \documentclass[../../../include/open-logic-chapter]{subfiles}
  4. \begin{document}
  5. \olchapter{sfr}{set}{Sets}
  6. \olimport{basics}
  7. \olimport{subsets}
  8. \olimport{important-sets}
  9. \olimport{unions-and-intersections}
  10. \olimport{pairs-and-products}
  11. \olimport{russells-paradox}
  12. \OLEndChapterHook
  13. \end{document}

content/sets-functions-relations/sets/basics.tex

103 lines; SHA-256 8bc9151af0985e6e20c374aa38cddd1add7a8dffbabccc94b89f324f62c40f8c. Open the preserved source file.

  1. % Part: sets-functions-relations
  2. % Chapter: sets
  3. % Section: basics
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{sfr}{set}{bas}
  7. \olsection{Extensionality}
  8. A \emph{set} is a collection of objects, considered {as} a single
  9. object. The objects making up the set are called \emph{elements} or
  10. \emph{members} of the set. If $x$ is !!a{element} of a set~$A$, we
  11. write $x \in A$; if not, we write $x \notin A$. The set which has no
  12. !!{element}s is called the \emph{empty} set and
  13. denoted~``$\emptyset$''.
  14. \begin{explain}
  15. It does not matter how we \emph{specify} the set, or how we
  16. \emph{order} its !!{element}s, or indeed how \emph{many times} we
  17. count its !!{element}s. All that matters are what its !!{element}s
  18. are. We codify this in the following principle.
  19. \end{explain}
  20. \begin{defn}[Extensionality]
  21. If $A$ and $B$ are sets, then $A = B$ iff
  22. every !!{element} of~$A$ is also !!a{element} of~$B$, and vice
  23. versa.
  24. \end{defn}
  25. Extensionality licenses some notation. In general, when we have some
  26. objects $a_{1}$, \dots, $a_{n}$, then $\{a_{1}, \dots, a_{n}\}$ is
  27. \emph{the} set whose !!{element}s are $a_1, \ldots, a_n$. We emphasise
  28. the word ``\emph{the}'', since extensionality tells us that there can
  29. be only \emph{one} such set. Indeed, extensionality also licenses the
  30. following:
  31. \[
  32. \{a, a, b\} = \{a, b\} = \{b,a\}.
  33. \]
  34. This delivers on the point that, when we consider sets, we don't care
  35. about the order of their !!{element}s, or how many times they are
  36. specified.
  37. \begin{tagblock}{novice}
  38. \begin{ex}
  39. Whenever you have a bunch of objects, you can collect them together in
  40. a set. The set of Richard's siblings, for instance, is a set that
  41. contains one person, and we could write it as $S=\{\textrm{Ruth}\}$.
  42. The set of positive integers less than $4$ is $\{1, 2, 3\}$, but it
  43. can also be written as $\{3, 2, 1\}$ or even as $\{1, 2, 1, 2, 3\}$.
  44. These are all the same set, by extensionality. For every !!{element}
  45. of $\{1, 2, 3\}$ is also !!a{element} of $\{3, 2, 1\}$ (and of $\{1,
  46. 2, 1, 2, 3\}$), and vice versa.
  47. \end{ex}
  48. \end{tagblock}
  49. Frequently we'll specify a set by some property that its !!{element}s
  50. share. We'll use the following shorthand notation for that:
  51. $\Setabs{x}{\phi(x)}$, where the $\phi(x)$ stands for the property
  52. that~$x$ has to have in order to be counted among the !!{element}s of
  53. the set.
  54. \begin{tagblock}{novice}
  55. \begin{ex}
  56. In our example, we could have specified $S$ also as
  57. \[
  58. S = \Setabs{x}{x \text{ is a sibling of Richard}}.
  59. \]
  60. \end{ex}
  61. \end{tagblock}
  62. \begin{tagblock}{math}
  63. \begin{ex}
  64. A number is called \emph{perfect} iff it is equal to the sum of its
  65. proper divisors (i.e., numbers that evenly divide it but aren't
  66. identical to the number). For instance, $6$ is perfect because its
  67. proper divisors are $1$, $2$, and~$3$, and $6 = 1 + 2 + 3$. In fact,
  68. $6$ is the only positive integer less than $10$ that is perfect. So,
  69. using extensionality, we can say:
  70. \[
  71. \{6\} = \Setabs{x}{x\text{ is perfect and }0 \leq x \leq 10}
  72. \]
  73. We read the notation on the right as ``the set of $x$'s such that $x$
  74. is perfect and $0 \leq x \leq 10$''. The identity here confirms that,
  75. when we consider sets, we don't care about how they are specified.
  76. And, more generally, extensionality guarantees that there is always
  77. only one set of $x$'s such that $\phi(x)$.
  78. So, extensionality justifies calling
  79. $\Setabs{x}{\phi(x)}$ \emph{the} set of $x$'s such that~$\phi(x)$.
  80. \end{ex}
  81. \end{tagblock}
  82. Extensionality gives us a way for showing that sets are identical: to
  83. show that $A = B$, show that whenever $x \in A$ then also $x \in B$,
  84. and whenever $y \in B$ then also $y \in A$.
  85. \begin{prob}
  86. Prove that there is at most one empty set, i.e., show that if $A$ and $B$
  87. are sets without !!{element}s, then $A = B$.
  88. \end{prob}
  89. \end{document}

content/sets-functions-relations/sets/subsets.tex

103 lines; SHA-256 5d982f62c40325cf75da4517add45ca073e23fb9463cfb3adfb9aafbb8582e46. Open the preserved source file.

  1. % Part: sets-functions-relations
  2. % Chapter: sets
  3. % Section: subsets
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{sfr}{set}{sub}
  7. \olsection{Subsets and Power Sets}
  8. \begin{explain}
  9. We will often want to compare sets. And one obvious kind of comparison
  10. one might make is as follows: \emph{everything in one set is in the
  11. other too}. This situation is sufficiently important for us to
  12. introduce some new notation.
  13. \end{explain}
  14. \begin{defn}[Subset]
  15. If every !!{element} of a set $A$ is also !!a{element} of~$B$, then we
  16. say that $A$ is a \emph{subset} of~$B$, and write $A \subseteq B$. If
  17. $A$ is not a subset of~$B$ we write $A \not\subseteq B$.
  18. If $A \subseteq B$ but $A \neq B$, we write $A \subsetneq B$ and say
  19. that $A$ is a \emph{proper subset} of $B$.
  20. \end{defn}
  21. \begin{ex}
  22. Every set is a subset of itself, and $\emptyset$ is a subset of every
  23. set. The set of natural even numbers is a subset of the set of natural
  24. numbers. Also, $\{ a, b \} \subseteq \{ a, b, c \}$. But $\{ a, b, e
  25. \}$ is not a subset of $\{ a, b, c \}$.
  26. \end{ex}
  27. \begin{ex}
  28. The number $2$ is an !!{element} of the set of integers, whereas the
  29. set of even numbers is a subset of the set of integers. However, a set
  30. may happen to \emph{both} be !!a{element} and a subset of some other
  31. set, e.g., $\{0\} \in \{0, \{0\}\}$ and also $\{0\} \subseteq \{0,
  32. \{0\}\}$.
  33. \end{ex}
  34. Extensionality gives a criterion of identity for sets: $A = B$ iff
  35. every !!{element} of~$A$ is also !!a{element} of~$B$ and vice versa.
  36. The definition of ``subset'' defines $A \subseteq B$ precisely as the
  37. first half of this criterion: every !!{element} of~$A$ is also
  38. !!a{element} of~$B$. Of course the definition also applies if we
  39. switch $A$ and $B$: that is, $B \subseteq A$ iff every !!{element}
  40. of~$B$ is also !!a{element} of~$A$. And that, in turn, is exactly the
  41. ``vice versa'' part of extensionality. In other words, extensionality
  42. entails that sets are equal iff they are subsets of one another.
  43. \begin{prop}
  44. $A = B$ iff both $A \subseteq B$ and $B \subseteq A$.
  45. \end{prop}
  46. Now is also a good opportunity to introduce some further bits of
  47. helpful notation. In defining when $A$ is a subset of~$B$ we said that
  48. ``every !!{element} of~$A$ is \dots,'' and filled the ``$\dots$'' with
  49. ``!!a{element} of $B$''. But this is such a common \emph{shape} of
  50. expression that it will be helpful to introduce some formal notation
  51. for it.
  52. \begin{defn}\ollabel{forallxina}
  53. $(\forall x \in A)\phi$ abbreviates $\forall x(x \in A \lif
  54. \phi)$. Similarly, $(\exists x \in A)\phi$ abbreviates $\exists x(x
  55. \in A \land \phi)$.
  56. \end{defn}
  57. Using this notation, we can say that $A \subseteq B$ iff $(\forall
  58. x \in A)x \in B$.
  59. Now we move on to considering a certain kind of set: the set of all
  60. subsets of a given set.
  61. \begin{defn}[Power Set]
  62. The set consisting of all subsets of a set~$A$ is called the
  63. \emph{power set of}~$A$, written $\Pow{A}$.
  64. \[
  65. \Pow{A} = \Setabs{B}{B \subseteq A}
  66. \]
  67. \end{defn}
  68. \begin{ex}
  69. What are all the possible subsets of $\{ a, b, c \}$? They are:
  70. $\emptyset$, $\{a \}$, $\{b\}$, $\{c\}$, $\{a, b\}$, $\{a, c\}$, $\{b,
  71. c\}$, $\{a, b, c\}$. The set of all these subsets is
  72. $\Pow{\{a,b,c\}}$:
  73. \[
  74. \Pow{\{ a, b, c \}} = \{\emptyset, \{a \}, \{b\}, \{c\}, \{a, b\},
  75. \{b, c\}, \{a, c\}, \{a, b, c\}\}
  76. \]
  77. \end{ex}
  78. \begin{prob}
  79. List all subsets of $\{a, b, c, d\}$.
  80. \end{prob}
  81. \begin{prob}
  82. Show that if $A$ has $n$ !!{element}s, then $\Pow{A}$ has $2^n$
  83. !!{element}s.
  84. \end{prob}
  85. \end{document}

content/sets-functions-relations/sets/important-sets.tex

69 lines; SHA-256 b1b998cad3fa5aef48670f755245f86efe00b239d332a50e764147602405fb32. Open the preserved source file.

  1. % Part: sets-functions-relations
  2. % Chapter: sets
  3. % Section: important-sets
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{sfr}{set}{imp}
  7. \olsection{Some Important Sets}
  8. \begin{ex}
  9. We will mostly be dealing with sets whose !!{element}s are
  10. mathematical objects. Four such sets are important enough to have
  11. specific names:
  12. \begin{multline*}
  13. \Nat = \{0, 1, 2, 3, \ldots\} \\
  14. \shoveright{\text{the set of natural numbers}}\\
  15. \shoveleft{\Int = \{\ldots, -2, -1, 0, 1, 2, \ldots\}} \\
  16. \shoveright{\text{the set of integers}}\\
  17. \shoveleft{\Rat = \Setabs{\nicefrac{m}{n}}{m, n \in \Int\text{ and }n \neq 0}}\\
  18. \shoveright{\text{the set of rationals}}\\
  19. \shoveleft{\Real = (-\infty, \infty)}\\
  20. \text{the set of real numbers (the continuum)}
  21. \end{multline*}
  22. These are all \emph{infinite} sets, that is, they each have
  23. infinitely many !!{element}s.
  24. As we move through these sets, we are adding \emph{more} numbers to
  25. our stock. Indeed, it should be clear that $\Nat \subseteq \Int
  26. \subseteq \Rat \subseteq \Real$: after all, every natural number is an
  27. integer; every integer is a rational; and every rational is a real.
  28. Equally, it should be clear that $\Nat \subsetneq \Int \subsetneq
  29. \Rat$, since $-1$ is an integer but not a natural number, and
  30. $\nicefrac{1}{2}$ is rational but not integer. It is less obvious
  31. that $\Rat \subsetneq \Real$, i.e., that there are some real numbers
  32. which are not rational\oliflabeldef{sfr:arith:real:realline}{, but we'll
  33. return to this in \olref[arith][real]{realline}}{}.
  34. We'll sometimes also use the set of positive integers $\PosInt = \{1,
  35. 2, 3, \dots\}$ and the set containing just the first two natural
  36. numbers $\Bin = \{0, 1\}$.
  37. \end{ex}
  38. \begin{tagblock}{compsci}
  39. \begin{ex}[Strings]
  40. Another interesting example is the set $A^{*}$ of \emph{finite
  41. strings} over an alphabet $A$: any finite sequence of elements of~$A$
  42. is a string over $A$. We include the \emph{empty string $\Lambda$}
  43. among the strings over~$A$, for every alphabet~$A$. For instance,
  44. \begin{multline*}
  45. \Bin^*
  46. =\{\Lambda,0,1,00,01,10,11,\\
  47. 000,001,010,011,100,101,110,111,0000,\ldots\}.
  48. \end{multline*}
  49. If $x=x_{1}\ldots x_{n}\in A^{*}$is a string consisting of $n$
  50. ``letters'' from $A$, then we say \emph{length} of the string is~$n$
  51. and write $\len{x}=n$.
  52. \end{ex}
  53. \end{tagblock}
  54. \begin{ex}[Infinite sequences]
  55. For any set $A$ we may also consider the set~$A^\omega$ of infinite
  56. sequences of !!{element}s of~$A$. An infinite sequence
  57. $a_1a_2a_3a_4\dots$ consists of a one-way infinite list of objects,
  58. each one of which is !!a{element} of~$A$.
  59. \end{ex}
  60. \end{document}

content/sets-functions-relations/sets/unions-and-intersections.tex

174 lines; SHA-256 2ad0eec70308ceeff2a4158b2dee60e59a9b1cf9268fc95c4bb1da05f65ad60d. Open the preserved source file.

  1. % Part: sets-functions-relations
  2. % Chapter: sets
  3. % Section: unions-and-intersections
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{sfr}{set}{uni}
  7. \olsection{Unions and Intersections}
  8. \begin{explain}
  9. In \olref[sfr][set][bas]{sec}, we introduced definitions of sets by
  10. abstraction, i.e., definitions of the form $\Setabs{x}{\phi(x)}$.
  11. Here, we invoke some property~$\phi$, and this property can mention
  12. sets we've already defined. So for instance, if $A$ and~$B$ are sets,
  13. the set $\Setabs{x}{x \in A \lor x \in B}$ consists of all those
  14. objects which are !!{element}s of either $A$ or~$B$, i.e., it's the
  15. set that combines the !!{element}s of $A$ and~$B$. We can visualize
  16. this as in \olref{fig:union}, where the highlighted area indicates the
  17. !!{element}s of the two sets $A$ and~$B$ together.
  18. \begin{figure}
  19. \olasset{assets/diagrams/union.tikz}
  20. \caption{The union $A \cup B$ of two sets is set of !!{element}s of
  21. $A$ together with those of~$B$.}
  22. \ollabel{fig:union}
  23. \end{figure}
  24. This operation on sets---combining them---is very useful and common,
  25. and so we give it a formal name and a symbol.
  26. \end{explain}
  27. \begin{defn}[Union]
  28. The \emph{union} of two sets $A$ and $B$, written $A \cup B$, is the
  29. set of all things which are !!{element}s of $A$, $B$, or both.
  30. \[
  31. A \cup B = \Setabs{x}{x \in A \lor x \in B}
  32. \]
  33. \end{defn}
  34. \begin{ex}
  35. Since the multiplicity of !!{element}s doesn't matter, the union of two
  36. sets which have !!a{element} in common contains that !!{element} only once,
  37. e.g., $\{ a, b, c\} \cup \{ a, 0, 1\} = \{a, b, c, 0, 1\}$.
  38. The union of a set and one of its subsets is just the bigger set: $\{a,
  39. b, c \} \cup \{a \} = \{a, b, c\}$.
  40. The union of a set with the empty set is identical to the set: $\{a,
  41. b, c \} \cup \emptyset = \{a, b, c \}$.
  42. \end{ex}
  43. \begin{prob}
  44. Prove that if $A \subseteq B$, then $A \cup B = B$.
  45. \end{prob}
  46. \begin{explain}
  47. We can also consider a ``dual'' operation to union. This is the
  48. operation that forms the set of all !!{element}s that are !!{element}s
  49. of~$A$ and are also !!{element}s of~$B$. This operation is called
  50. \emph{intersection}, and can be depicted as in \olref{fig:intersection}.
  51. \begin{figure}
  52. \olasset{assets/diagrams/intersection.tikz}
  53. \caption{The intersection $A \cap B$ of two sets is the set of
  54. !!{element}s they have in common.}
  55. \ollabel{fig:intersection}
  56. \end{figure}
  57. \end{explain}
  58. \begin{defn}[Intersection]
  59. The \emph{intersection} of two sets $A$ and $B$, written $A \cap B$, is
  60. the set of all things which are !!{element}s of both $A$ and~$B$.
  61. \[
  62. A \cap B = \Setabs{x}{x \in A \land x \in B}
  63. \]
  64. Two sets are called \emph{disjoint} if their intersection is
  65. empty. This means they have no !!{element}s in common.
  66. \end{defn}
  67. \begin{ex}
  68. If two sets have no !!{element}s in common, their intersection is empty:
  69. $\{ a, b, c\} \cap \{ 0, 1\} = \emptyset$.
  70. If two sets do have !!{element}s in common, their intersection is the set of
  71. all those: $\{a, b, c \} \cap \{a, b, d \} = \{a, b\}$.
  72. The intersection of a set with one of its subsets is just the smaller
  73. set: $\{a, b, c\} \cap \{a, b\} = \{a, b\}$.
  74. The intersection of any set with the empty set is empty: $\{a, b, c \}
  75. \cap \emptyset = \emptyset$.
  76. \end{ex}
  77. \begin{prob}
  78. Prove rigorously that if $A \subseteq B$, then $A \cap B = A$.
  79. \end{prob}
  80. \begin{explain}
  81. We can also form the union or intersection of more than two
  82. sets. An elegant way of dealing with this in general is the
  83. following: suppose you collect all the sets you want to form the union
  84. (or intersection) of into a single set. Then we can define the union
  85. of all our original sets as the set of all objects which belong to at
  86. least one !!{element} of the set, and the intersection as the set of
  87. all objects which belong to every !!{element} of the set.
  88. \end{explain}
  89. \begin{defn}
  90. If $A$ is a set of sets, then $\bigcup A$ is the set of !!{element}s of
  91. !!{element}s of~$A$:
  92. \begin{align*}
  93. \bigcup A & = \Setabs{x}{x \text{ belongs to !!a{element} of } A},
  94. \text{ i.e.,}\\
  95. & = \Setabs{x}{\text{there is a } B \in A
  96. \text{ so that } x \in B}
  97. \end{align*}
  98. \end{defn}
  99. \begin{defn}
  100. If $A$ is a set of sets, then $\bigcap A$ is the set of objects which
  101. all elements of~$A$ have in common:
  102. \begin{align*}
  103. \bigcap A & = \Setabs{x}{x \text{ belongs to every !!{element} of } A},
  104. \text{ i.e.,}\\
  105. & = \Setabs{x}{\text{for all } B \in A, x \in B}
  106. \end{align*}
  107. \end{defn}
  108. \begin{ex}
  109. Suppose $A = \{ \{ a, b \}, \{ a, d, e \}, \{ a, d \} \}$.
  110. Then $\bigcup A = \{ a, b, d, e \}$ and $\bigcap A = \{ a \}$.
  111. \end{ex}
  112. \begin{prob}
  113. Show that if $A$ is a set and $A \in B$, then $A \subseteq \bigcup B$.
  114. \end{prob}
  115. We could also do the same for a sequence of sets $A_1$, $A_2$, \dots
  116. \begin{align*}
  117. \bigcup_i A_i & = \Setabs{x}{x \text{ belongs to one of the } A_i}\\
  118. \bigcap_i A_i & = \Setabs{x}{x \text{ belongs to every } A_i}.
  119. \end{align*}
  120. When we have an \emph{index} of sets, i.e., some set $I$ such that we
  121. are considering $A_i$ for each $i \in I$, we may also use these
  122. abbreviations:
  123. \begin{align*}
  124. \bigcup_{i \in I} A_i & = \bigcup \Setabs{A_i }{i \in I}\\
  125. \bigcap_{i \in I} A_i & = \bigcap\Setabs{A_i}{i \in I}
  126. \end{align*}
  127. Finally, we may want to think about the set of all !!{element}s in~$A$
  128. which are not in~$B$. We can depict this as in \olref{difference}.
  129. \begin{figure}
  130. \olasset{assets/diagrams/difference.tikz}
  131. \caption{The difference $A \setminus B$ of two sets is the set of
  132. those !!{element}s of~$A$ which are not also !!{element}s of~$B$.}
  133. \ollabel{difference}
  134. \end{figure}
  135. \begin{defn}[Difference]
  136. The \emph{set difference}~$A \setminus B$ is the set of all !!{element}s of
  137. $A$ which are not also !!{element}s of~$B$, i.e.,
  138. \[
  139. A\setminus B = \Setabs{x}{x\in A \text{ and } x \notin B}.
  140. \]
  141. \end{defn}
  142. \begin{prob}
  143. Prove that if $A \subsetneq B$, then $B \setminus A \neq \emptyset$.
  144. \end{prob}
  145. \end{document}

content/sets-functions-relations/sets/pairs-and-products.tex

129 lines; SHA-256 3db7f0241d387b49488f70e78062c24192b813873618f761565d97bd7249431c. Open the preserved source file.

  1. % Part: sets-functions-relations
  2. % Chapter: sets
  3. % Section: pairs-and-products
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{sfr}{set}{pai}
  7. \olsection{Pairs, Tuples, Cartesian Products}
  8. \begin{explain}
  9. It follows from extensionality that sets have no order to their
  10. elements. So if we want to represent order, we use \emph{ordered
  11. pairs} $\tuple{x, y}$. In an unordered pair $\{x, y\}$, the order does
  12. not matter: $\{x, y\} = \{y, x\}$. In an ordered pair, it does: if $x
  13. \neq y$, then $\tuple{x, y} \neq \tuple{y, x}$.
  14. How should we think about ordered pairs in set theory? Crucially, we
  15. want to preserve the idea that ordered pairs are identical iff they
  16. share the same first element and share the same second element, i.e.:
  17. \[
  18. \tuple{a, b}= \tuple{c, d}\text{ iff both }a = c \text{ and }b=d.
  19. \]
  20. We can define ordered pairs in set theory using the Wiener--Kuratowski
  21. definition.
  22. \end{explain}
  23. \begin{defn}[Ordered pair]\ollabel{wienerkuratowski}
  24. $\tuple{a, b} = \{\{a\}, \{a, b\}\}$.
  25. \end{defn}
  26. \begin{prob}
  27. Using \olref[sfr][set][pai]{wienerkuratowski}, prove that $\tuple{a,
  28. b}= \tuple{c, d}$ iff both $a = c$ and $b=d$.
  29. \end{prob}
  30. \begin{explain}
  31. Having fixed a definition of an ordered pair, we can use it to define
  32. further sets. For example, sometimes we also want ordered sequences of
  33. more than two objects, e.g., \emph{triples} $\tuple{x, y, z}$,
  34. \emph{quadruples} $\tuple{x, y, z, u}$, and so on. We can think of
  35. triples as special ordered pairs, where the first element is itself an
  36. ordered pair: $\tuple{x, y, z}$ is $\tuple{\tuple{x, y},z}$. The same
  37. is true for quadruples: $\tuple{x,y,z,u}$ is
  38. $\tuple{\tuple{\tuple{x,y},z},u}$, and so on. In general, we talk of
  39. \emph{ordered $n$-tuples} $\tuple{x_1, \dots, x_n}$.
  40. Certain sets of ordered pairs, or other ordered $n$-tuples, will be useful.
  41. \end{explain}
  42. \begin{defn}[Cartesian product]
  43. Given sets $A$ and $B$, their \emph{Cartesian product} $A \times B$ is
  44. defined by
  45. \[
  46. A \times B = \Setabs{\tuple{x, y}}{x \in A \text{ and } y \in B}.
  47. \]
  48. \end{defn}
  49. \begin{ex}
  50. If $A = \{0, 1\}$, and $B = \{1, a, b\}$, then their product is
  51. \[
  52. A \times B = \{ \tuple{0, 1}, \tuple{0, a}, \tuple{0, b},
  53. \tuple{1, 1}, \tuple{1, a}, \tuple{1, b} \}.
  54. \]
  55. \end{ex}
  56. \begin{ex}
  57. If $A$ is a set, the product of $A$ with itself, $A \times A$, is also
  58. written~$A^2$. It is the set of \emph{all} pairs $\tuple{x, y}$ with
  59. $x, y \in A$. The set of all triples $\tuple{x, y, z}$ is $A^3$, and
  60. so on. We can give a recursive definition:
  61. \begin{align*}
  62. A^1 & = A\\
  63. A^{k+1} & = A^k \times A
  64. \end{align*}
  65. \end{ex}
  66. \begin{prob}
  67. List all !!{element}s of $\{1, 2, 3\}^3$.
  68. \end{prob}
  69. \begin{prop}\ollabel{cardnmprod}
  70. If $A$ has $n$ !!{element}s and $B$ has $m$ !!{element}s, then $A
  71. \times B$ has $n\cdot m$ elements.
  72. \end{prop}
  73. \begin{proof}
  74. For every !!{element}~$x$ in~$A$, there are $m$ !!{element}s of the
  75. form $\tuple{x, y} \in A \times B$. Let $B_x = \Setabs{\tuple{x, y}}{y
  76. \in B}$. Since whenever $x_1 \neq x_2$, $\tuple{x_1, y} \neq
  77. \tuple{x_2, y}$, $B_{x_1} \cap B_{x_2} = \emptyset$. But if $A = \{x_1,
  78. \dots, x_n\}$, then $A \times B = B_{x_1} \cup \dots \cup B_{x_n}$, and so has
  79. $n\cdot m$ !!{element}s.
  80. To visualize this, arrange the !!{element}s of~$A \times B$ in a grid:
  81. \[
  82. \begin{array}{rcccc}
  83. B_{x_1} = & \{\tuple{x_1, y_1} & \tuple{x_1, y_2} & \dots & \tuple{x_1, y_m}\}\\
  84. B_{x_2} = & \{\tuple{x_2, y_1} & \tuple{x_2, y_2} & \dots & \tuple{x_2, y_m}\}\\
  85. \vdots & & \vdots\\
  86. B_{x_n} = & \{\tuple{x_n, y_1} & \tuple{x_n, y_2} & \dots & \tuple{x_n, y_m}\}
  87. \end{array}
  88. \]
  89. Since the $x_i$ are all different, and the $y_j$ are all different, no
  90. two of the pairs in this grid are the same, and there are $n\cdot m$
  91. of them.
  92. \end{proof}
  93. \begin{prob}
  94. Show, by induction on~$k$, that for all $k \ge 1$, if $A$ has $n$
  95. !!{element}s, then $A^k$ has $n^k$ !!{element}s.
  96. \end{prob}
  97. \begin{ex}
  98. If $A$ is a set, a \emph{word} over~$A$ is any sequence of
  99. !!{element}s of~$A$. A sequence can be thought of as an $n$-tuple of
  100. !!{element}s of~$A$. For instance, if $A = \{a, b, c\}$, then the
  101. sequence ``$bac$'' can be thought of as the triple~$\tuple{b, a, c}$.
  102. Words, i.e., sequences of symbols, are of crucial importance in
  103. computer science. By convention, we count !!{element}s of~$A$ as
  104. sequences of length~$1$, and $\emptyset$ as the sequence of length~$0$.
  105. The set of \emph{all} words over~$A$ then is
  106. \[
  107. A^* = \{\emptyset\} \cup A \cup A^2 \cup A^3 \cup \dots
  108. \]
  109. \end{ex}
  110. \end{document}

content/sets-functions-relations/sets/russells-paradox.tex

89 lines; SHA-256 9a76315cd0d9cf89d27e90a9b87138b1c95aea98e0d26de3fe12d897b8c4d10d. Open the preserved source file.

  1. % Part: sets-functions-relations
  2. % Chapter: sets
  3. % Section: russells-paradox
  4. \documentclass[../../../include/open-logic-section]{subfiles}
  5. \begin{document}
  6. \olfileid{sfr}{set}{rus}
  7. \olsection{Russell's Paradox}
  8. Extensionality licenses the notation $\Setabs{x}{\phi(x)}$, for
  9. \emph{the} set of $x$'s such that~$\phi(x)$. However, all that
  10. extensionality \emph{really} licenses is the following thought.
  11. \emph{If} there is a set whose members are all and only the $\phi$'s,
  12. \emph{then} there is only one such set. Otherwise put: having fixed
  13. some~$\phi$, the set $\Setabs{x}{\phi(x)}$ is unique, \emph{if it
  14. exists}.
  15. But this conditional is important!{} Crucially, not every property
  16. lends itself to \emph{comprehension}. That is, some properties do
  17. \emph{not} define sets. If they all did, then we would run into
  18. outright contradictions. The most famous example of this is Russell's
  19. Paradox.
  20. Sets may be !!{element}s of other sets---for instance, the power set
  21. of a set~$A$ is made up of sets. And so it makes sense to ask or
  22. investigate whether a set is !!a{element} of another set. Can a set be
  23. a member of itself? Nothing about the idea of a set seems to rule
  24. this out. For instance, if \emph{all} sets form a collection of
  25. objects, one might think that they can be collected into a single
  26. set---the set of all sets. And it, being a set, would be !!a{element}
  27. of the set of all sets.
  28. Russell's Paradox arises when we consider the property of not having
  29. itself as !!a{element}, of being \emph{non-self-membered}. What if we
  30. suppose that there is a set of all sets that do not have themselves as
  31. !!a{element}? Does
  32. \[
  33. R = \Setabs{x}{x \notin x}
  34. \]
  35. exist? It turns out that we can prove that it does not.
  36. \begin{thm}[Russell's Paradox]\ollabel{thm:russells-paradox}
  37. There is no set $R = \Setabs{x}{x \notin x}$.
  38. \end{thm}
  39. \begin{proof}
  40. If $R = \Setabs{x}{x \notin x}$ exists, then
  41. $R \in R$ iff $R \notin R$, which is a contradiction.
  42. \end{proof}
  43. \begin{tagblock}{novice}
  44. \begin{explain}
  45. Let's run through this proof more slowly. If $R$ exists, it makes sense to ask whether $R \in
  46. R$ or not. Suppose that indeed $R \in R$. Now, $R$~was defined as the set of all
  47. sets that are not !!{element}s of themselves. So, if $R \in R$,
  48. then $R$ does not itself have $R$'s defining property. But only sets
  49. that have this property are in~$R$, hence, $R$ cannot be !!a{element}
  50. of~$R$, i.e., $R \notin R$. But $R$ can't both be and not be
  51. !!a{element} of~$R$, so we have a contradiction.
  52. Since the assumption that $R \in R$ leads to a contradiction, we have
  53. $R \notin R$. But this also leads to a contradiction!{} For if $R
  54. \notin R$, then $R$ itself does have $R$'s defining property, and so $R$ would be
  55. !!a{element} of $R$ just like all the other non-self-membered sets.
  56. And again, it can't both not be and be !!a{element} of~$R$.
  57. \end{explain}
  58. \end{tagblock}
  59. \begin{digress}
  60. How do we set up a set theory which avoids falling into
  61. Russell's Paradox, i.e., which avoids making the \emph{inconsistent}
  62. claim that $R = \Setabs{x}{x \notin x}$ exists? Well, we would need to
  63. lay down axioms which give us very precise conditions for stating when
  64. sets exist (and when they don't).
  65. The set theory sketched in this chapter doesn't do this. It's
  66. \emph{genuinely na\"ive}. It tells you only that sets obey
  67. extensionality and that, if you have some sets, you can form their
  68. union, intersection, etc. It is possible to develop set theory more
  69. rigorously than this. \oliflabeldef{cumul:::part}{That rigour will be
  70. reserved for Part \olref[cumul][][]{part}. For now, we will proceed
  71. na\"ively, and carefully try to sidestep contradictions.}{}
  72. \end{digress}
  73. \end{document}