Chapter 1
Sets and Logic
[The universe] cannot be read until we have learnt the language and become familiar with the characters in which it is written. It is written in mathematical language . . . —Galileo Galilei (1564–1642) For the things of this world cannot be made known without a knowledge of mathematics. —Roger Bacon (1214–1294)
1
2
1. Sets and Logic
1.1. Sets A set is a collection of objects. The objects of the set are called the elements of the set. One way to specify a set is to list all the elements inside set brackets “{” and “}”. For example, {Alabama, Alaska, Arizona, Arkansas} is a set with 4 elements. We may also specify a set in words. The set given above could be specified by stating “the set of all U.S. states that start with the letter A”. It is convenient to give sets names, and conventionally, sets are named by capital letters. Thus, we may write 𝐴 = {Alabama, Alaska, Arizona, Arkansas}. Alabama is an element of 𝐴. Birmingham, Atlanta and Wyoming are not elements of 𝐴. The symbol for “is an element of” is ∈. Putting a slash through this symbol gives the symbol for “is not an element of”. Thus we may write Alabama ∈ 𝐴 Alaska ∈ 𝐴 Birmingham ∉ 𝐴 Atlanta ∉ 𝐴 and Wyoming ∉ 𝐴. Let us consider the set consisting of the natural numbers less than 6, and let us call this set 𝐵. The previous cumbersome sentence may be shortened to this: Let 𝐵 = {1, 2, 3, 4, 5}. Here we are listing the elements of 𝐵 in roster form rather than giving a verbal description of the elements. Counting down from 6, you may determine that the set of natural numbers less than 6 should be {5, 4, 3, 2, 1}. This is also correct. The elements of a set may be listed in any order. Thus, 𝐵 = {1, 2, 3, 4, 5} = {5, 4, 3, 2, 1} = {3, 5, 2, 1, 4}, and there are many more correct representations of the set 𝐵. Any set 𝑈 must be well-defined, that is, for every object 𝑥 there must be an unequivocal answer to the question “Is 𝑥 ∈ 𝑈?”. We may not always know the answer to this question, but we must know that an unequivocal answer exists. Consider the set 𝑇 of all living people who have an ancestor with the name Taylor. Are you a member of this set? Though you may not know the answer, you should recognize that there is an indisputable answer—either yes or no. The set of good books, however, is not a well-defined set. The answer to the question “Is War and Peace a good book?” may be subject to dispute. The usage of the word “good” is subjective, and this makes the word “good” an improper choice to use in specifying well-defined sets. Two sets are equal if they contain exactly the same elements. The set 𝐵 = 2 {4, 3, 1, 5, 2} and the set { 2 , √4, √9, 22 , 5} are equal since they contain exactly the same 2 elements, namely 1 = 2 , 2 = √4, 3 = √9, 4 = 22 , and 5. The set of kangaroos on the moon is a well-defined set which contains no elements. The set { } containing no elements is called the empty set or null set and is denoted ∅ or { }. A set is finite if there is a whole number that tells the number of elements in the set. The set 𝐵 = {1, 2, 3, 4, 5} is finite and the number of elements in 𝐵 is five. Definition 1.1.1. The cardinality of a finite set 𝑆 is the number of elements in the set 𝑆, and is denoted |𝑆|.
1.1. Sets
3
Counting the number of elements in a set may not be as easy as it sounds, especially if the set is described instead of listed. How many elements does the set of letters in the word “throughout” have? Stated another way, find the cardinality |𝐶| of the set 𝐶 = {𝑡, ℎ, 𝑟, 𝑜, 𝑢, 𝑔, ℎ, 𝑜, 𝑢, 𝑡}. To the question “Is 𝑟 ∈ 𝐶?”, we should answer “Yes”. To the question “Is 𝑡 ∈ 𝐶?”, we should answer “Yes, yes”. Though it is more emphatic, the affirmative outcome “Yes, yes,” is not different from the affirmative outcome “Yes”, so the element 𝑡 ∈ 𝐶 only counts as one element, despite the fact that we listed it twice. If we let 𝐷 be the set of letters in the word “trough”, then 𝐷 = {𝑡, 𝑟, 𝑜, 𝑢, 𝑔, ℎ}. The sets 𝐶 and 𝐷 have exactly the same elements, so 𝐶 = 𝐷, and thus |𝐶| = |𝐷| = 6. Repeated elements in a set should only be counted once. Recognizing the duplication is frequently more difficult than in this example. Sometimes we may not be able to count the elements of a finite set. The set 𝑇 of living people with an ancestor named Taylor is a finite set, and though we do not know the exact number of elements in 𝑇, we know |𝑇| can not exceed the current world population, and thus must be finite. If a set is not finite, it is infinite. The set of natural numbers, for example, is infinite. We will not be able to list all the elements of an infinite set, but we may indicate an infinite set by description or by listing several of the elements in a clear pattern followed by an ellipsis “. . .”. Some standard notation for some standard sets will illustrate this. The set of natural numbers = ℕ = {1, 2, 3, 4, . . .} The set of whole numbers = 𝕎 = {0, 1, 2, 3, . . .} The set of integers = ℤ = {0, 1, −1, 2, −2, 3, −3, . . .} = {. . . , −3, −2, −1, 0, 1, 2, 3, . . .} Another convenient way to specify a set symbolically is by set-builder notation, which we illustrate here. The notation {𝑥 ∣ 𝑥 ∈ ℕ and 𝑥 < 6} is read “the set of all 𝑥 such that 𝑥 ∈ ℕ and 𝑥 < 6.” In general, {𝑥 ∣ ∗ ∗ ∗ ∗ ∗ ∗ ∗} is read “the set of all 𝑥 such that 𝑥 satisfies the properties ∗ ∗ ∗ ∗ ∗ ∗ ∗ stated. Unknown elements of a set are conventionally denoted by lower case letters, such as the 𝑥 above. If the elements 𝑥 are to come from some specified set, we may include this information before the “pipe” symbol “ ∣ ”. The set {𝑥 ∣ 𝑥 ∈ ℕ and 𝑥 < 6} could be written as {𝑥 ∈ ℕ ∣ 𝑥 < 6} and read “the set of natural numbers 𝑥 such that 𝑥 < 6. This is the set 𝐵 = {1, 2, 3, 4, 5} we have seen earlier. We may now introduce the notation for two other frequently used infinite sets. The set of real numbers = ℝ = {𝑥 ∣ 𝑥 is a real number} 𝑎 The set of rational numbers = ℚ = { 𝑏 ∣ 𝑎, 𝑏 ∈ ℤ, 𝑏 ≠ 0} The set of rational numbers ℚ consists of ℚuotients of integers, with the usual restriction that division by 0 is not allowed. If we take an arbitrary set 𝑆 and remove some, none, or all of its elements, the set 𝑇 of remaining elements is called a subset of 𝑆, and we write 𝑇 ⊆ 𝑆. Formally, a set 𝑇 is a subset of 𝑆 if and only if every element of 𝑇 is also an element of 𝑆. If 𝑇 is a subset of 𝑆, then 𝑆 is a superset of 𝑇 and we may write 𝑆 ⊇ 𝑇. The notation 𝑇 ⊆ 𝑆 may also be
4
1. Sets and Logic
read “𝑇 is contained in 𝑆.” We will illustrate this notation with some examples. {red, white, blue}
⊆
{red, white, blue, green}
{1, 3, 5}
⊆
{1, 2, 3, 4, 5}
{2}
⊆
{1, 2, 3, 4, 5}
∅ = {}
⊆
{1, 2, 3, 4, 5}
{1, 2, 3, 4, 5}
⊆
{1, 2, 3, 4, 5}
{5, 6, 7}
⊈
{1, 2, 3, 4, 5}
The symbol “⊈” used in the last example above means “is not a subset of ”. It is critical to use the correct terminology and symbols for subsets and elements of a set. Observe that 3 ∈ {1, 3, 5} but 3 ⊈ {1, 3, 5}. Since 3 is not a set, it cannot be a subset of anything. Likewise, {3} ⊆ {1, 3, 5} but {3} ∉ {1, 3, 5}. If 𝑇 ⊆ 𝑆 but 𝑇 ≠ 𝑆, we say 𝑇 is a proper subset of 𝑆 and write 𝑇 ⊂ 𝑆. (Compare this notation to < and ≤.) While {1, 3} is a subset of {1, 2, 3, 4, 5}, denoted {1, 3} ⊆ {1, 2, 3, 4, 5}, we could be more explicit and say that it is a proper subset, denoted {1, 3} ⊂ {1, 2, 3, 4, 5}. Since {1, 2, 3, 4, 5} is a subset of itself but not a proper subset of itself, we could write {1, 2, 3, 4, 5} ⊆ {1, 2, 3, 4, 5} but {1, 2, 3, 4, 5} ⊄ {1, 2, 3, 4, 5}. Suppose 𝐴 ⊆ 𝐵 and 𝐵 ⊆ 𝐶. Then every element of 𝐴 is an element of 𝐵 and every element of 𝐵 is an element of 𝐶. It follows that every element of 𝐴 is an element of 𝐶, that is, 𝐴 ⊆ 𝐶. Thus, 𝐴 ⊆ 𝐵 and 𝐵 ⊆ 𝐶 implies 𝐴 ⊆ 𝐶. We may depict this situation using a Venn diagram as shown in Figure 1.1.1. Venn diagrams provide informal graphical illustrations of shared elements of several sets.
B A
C
Figure 1.1.1. If 𝐴 ⊆ 𝐵 and 𝐵 ⊆ 𝐶 then 𝐴 ⊆ 𝐶.
If 𝐴 ⊆ 𝐵 and 𝐵 ⊆ 𝐴, then every element of 𝐴 is an element of 𝐵 and every element of 𝐵 is an element of 𝐴. Thus, 𝐴 and 𝐵 have exactly the same elements, so 𝐴 = 𝐵. This is a standard way to show that two sets are equal: show 𝐴 is contained in 𝐵 and show 𝐵 is contained in 𝐴. (For example, see Example 1.2.2 in the next section.) Every set is a subset of itself, and the empty set ∅ is a subset of any set. Thus, for any set 𝑆, we have ∅ ⊆ 𝑆 ⊆ 𝑆. This seems to show that every set 𝑆 has at least two subsets, namely the empty set and itself. This is true unless 𝑆 = ∅, in which case these “two” subsets are really one and the same. We can properly state that every nonempty set 𝑆 has at least two subsets, namely ∅ and 𝑆. Counting the number of subsets a given set is an important problem which we will consider from several approaches in the chapters
1.1. Sets
5
that follow. Let us count all the subsets of a few small sets. To count them, we first need a systematic way to find all the subsets. Example 1.1.2. How many subsets does the set {1, 2} have? Solution. There is 1 subset of {1, 2} with zero elements: ∅. There are 2 subsets of {1, 2} with one element: {1} and {2}. There is 1 subset of {1, 2} with two elements: {1, 2}. This gives a total of 1 + 2 + 1 = 4 subsets of the two-element set {1, 2}.
□
Example 1.1.3. How many subsets does the set {1, 2, 3} have? Solution. There is 1 subset of {1, 2, 3} with zero elements: ∅. There are 3 subsets of {1, 2, 3} with one element: {1}, {2} and {3}. There are 3 subsets of {1, 2, 3} with two elements: {1, 2}, {1, 3}, and {2, 3}. There is 1 subset of {1, 2, 3} with three elements: {1, 2, 3}. This gives a total of 1 + 3 + 3 + 1 = 8 subsets of the three-element set {1, 2, 3}.
□
The elements of a set may take any form. That is, we may take sets of any kind of objects. We may form sets of words: {black, white}, or sets of letters {b, l, a, c, k, w, h, i, t, e}. We may form sets of numbers: {2, 4, 6, 8, 10}, or even sets of sets: { {2, 4, 6, 8, 10}, {3, 6, 9}, {4, 8}, {5, 10} }. To avoid confusion about the context of the word “set”, a set whose elements are sets will be called a collection of sets or a family of sets. Collections of sets are typically denoted with script capital letters. Thus, 𝒞 = { {2, 4, 6, 8, 10}, {3, 6, 9}, {4, 8}, {5, 10}, {6} } is a collection of five sets. We have {3, 6, 9} ∈ 𝒞, {4, 8} ∈ 𝒞, and {6} ∈ 𝒞 but 6 ∉ 𝒞, 3 ∉ 𝒞, {3} ∉ 𝒞, and {2, 4} ∉ 𝒞. A subcollection of a collection 𝒞 is a collection 𝒮 such that every set in the collection 𝒮 is also a set in the collection 𝒞. Thus, { {4, 8}, {5, 10} } ⊆ 𝒞 says that { {4, 8}, {5, 10} } is a subcollection of 𝒞. The definition of subcollection is precisely the definition of subset but with a shift of terminology to compensate for the fact that our “set” of “elements” is in this case called a “collection” of “sets”. Some other examples may clarify these definitions. Consider the collection of all subsets of {1, 2}. In Example 1.1.2 we found all the elements of this collection. The collection of all subsets of {1, 2} is { ∅, {1}, {2}, {1, 2} }. This is an important construction and has a special name. Definition 1.1.4. The collection of all subsets of a given set 𝑆 is called the power set of 𝑆, denoted 𝒫(𝑆). Thus, 𝒫(𝑆) = {𝐴 ∣ 𝐴 ⊆ 𝑆}. Example 1.1.3 shows that the power set of {1, 2, 3} is 𝒫({1, 2, 3}) = { ∅, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3} }. We may consider subcollections of 𝒫({1, 2, 3}) such as the collection 𝒟 of all subsets of {1, 2, 3} which contain the element 2: 𝒟 = {𝐴 ∈ 𝒫({1, 2, 3}) ∣ 2 ∈ 𝐴} = { {2}, {1, 2}, {2, 3}, {1, 2, 3} }. The collection ℱ of subsets of {1, 2, 3} which have cardinality 2 is ℱ = {𝐴 ∈ 𝒫({1, 2, 3}) ∣ |𝐴| = 2} = { {1, 2}, {1, 3}, {2, 3} }.
6
1. Sets and Logic
We have 𝒟 ⊆ 𝒫({1, 2, 3}) and ℱ ⊆ 𝒫({1, 2, 3}). Observe the distinction between “containing 2 elements” and “containing the element 2”. As with any set, we may consider the cardinality of a set of sets, i.e., of a collection. Here we have |𝒟| = 4, |ℱ| = 3 and |𝒫({1, 2, 3})| = 8. The following example will reinforce the importance of distinguishing between an element of a set and a subset of a set. Example 1.1.5. Let 𝐴 = {Alabama, Alaska, Arizona, Arkansas} 𝐸 = ∅ 𝐼 = {Illinois, Indiana, Iowa} 𝑂 = {Ohio, Oklahoma, Oregon}, and 𝑈 = {Utah}. Now if we let 𝒱 = {𝐴, 𝐸, 𝐼, 𝑂, 𝑈}, then 𝒱 is a collection of 5 sets and we have Alaska ∈ 𝐴 {Alaska, Arizona} ⊆ 𝐴 Alaska ∉ 𝒱 {Alaska, Arizona} ∉ 𝒱 {Alaska, Arizona} ⊈ 𝒱 𝐼 = {Illinois, Indiana, Iowa} ∈ 𝒱 𝐼 ⊈ 𝒱 {𝑂, 𝐸, 𝑈} ⊆ 𝒱 {𝐸, 𝑈} = {∅, {Utah}} ⊆ 𝒱 {𝑈} ⊆ 𝒱. Note that Utah ∈ 𝑈 and {Utah} ⊆ 𝑈 (in fact, {Utah} = 𝑈), but Utah ⊈ 𝑈. Furthermore, 𝑈 ∈ 𝒱 = {𝐴, 𝐸, 𝐼, 𝑂, 𝑈} and { {Utah} } = {𝑈} ⊆ 𝒱, but {Utah} = 𝑈 ⊈ 𝒱, Utah ⊈ 𝒱 and Utah ∉ 𝒱. There are also some subtleties involving the empty set in this example. From the definition of 𝒱, we see that 𝐸 = ∅ ∈ 𝒱. The empty set, however, is a subset of any set and, in particular, the empty collection is a subcollection of any collection. For our collection 𝒱, we have ∅ ⊆ 𝒱. Now we have shown that 𝐸 = ∅ ∈ 𝒱 and 𝐸 = ∅ ⊆ 𝒱. This is a rare occurrence. Only in extraordinary circumstances will an element of a set also be a subset of that set. Note that 𝐸 = ∅ ⊆ 𝒱 and also {𝐸} = {∅} ⊆ 𝒱, but ∅ ≠ {∅}. Generally 𝑥 ≠ {𝑥}, and there is no exception for 𝑥 = ∅. While ∅ has no elements, {∅} has one element, namely ∅. Before leaving this example, we should note that the collection 𝒱 of the five sets 𝐴, 𝐸, 𝐼, 𝑂 and 𝑈 is not the same as the set {Alabama, Alaska, Arizona, Arkansas, Illinois, Indiana, Iowa, Ohio, Oklahoma, Oregon, Utah} of the 11 states that start with a vowel. In the next section we will see that this latter set is the union of the collection 𝒱. Large collections of sets are often expressed using an “index” for each set. For example, suppose a certain class meets for 36 days. Let 𝑆 1 be the set of students present on the first day, 𝑆 2 be the set of students present on the second day, and in general, let 𝑆 𝑘 be the set of students present on the 𝑘-th day (𝑘 ∈ {1, 2, 3, . . . , 36}). The subscript 𝑘 is called the index (plural: indices). The collection 𝒮 of all the sets {𝑆 1 , 𝑆 2 , . . . , 𝑆 36 } may
1.1. Sets
7
be represented as an indexed collection using various notations: 𝒮
=
{𝑆 𝑘 ∣ 𝑘 = 1, 2, 3, . . . , 36}
=
{𝑆 𝑘 ∣ 𝑘 ∈ {1, 2, 3, . . . , 36}}
=
{𝑆 𝑘 ∣ 𝑘 ∈ 𝐼} where 𝐼 = {1, 2, 3, . . . , 36}
=
{𝑆 𝑘 }36 𝑘=1
=
{𝑆 𝑘 }𝑘∈𝐼 where 𝐼 = {1, 2, 3, . . . , 36}.
The index 𝑘 is a “dummy variable”—we could just as well use 𝑖, 𝑗, 𝜆, or any other symbol. The set of values that the index may assume is called the index set. In the example at hand, the index set is 𝐼 = {1, 2, 3, . . . , 36}.
Exercises 1. (a) True or false? {red, white, blue} = {white, blue, red}. (b) What is wrong with this statement: Red is the first element of the set {red, white, blue}? 2. Which has the larger cardinality? The set of letters in the word MISSISSIPPI or the set of letters in the word FLORIDA ? 3. Fill in the blank with the appropriate symbol, ∈ or ⊆. {1, 2, 3, 4} (a) {1, 2, 3} (b) 3 {1, 2, 3, 4} (c) {3} {1, 2, 3, 4} (d) {𝑎} {{𝑎}, {𝑏}, {𝑎, 𝑏}} (e) ∅ {{𝑎}, {𝑏}, {𝑎, 𝑏}} (f) {{𝑎}, {𝑏}} {{𝑎}, {𝑏}, {𝑎, 𝑏}} 4. Fill in the blanks below with the appropriate symbol ∈ or ⊆. Only if neither of these symbols applies, you may use ∉ or ⊈. (a) {𝑎} {𝑎, 𝑏, 𝑐} (b) a {𝑎, 𝑏, 𝑐} (c) {𝑎} {{𝑎}, {𝑏}, {𝑎, 𝑏}} (d) a {{𝑎}, {𝑏}, {𝑎, 𝑏}} {{𝑎}, {𝑏}, {𝑎, 𝑏}} (e) {{𝑎}} (f) {{𝑎}, {𝑎, 𝑏}} {{𝑎}, {𝑏}, {𝑎, 𝑏}} (g) {𝑎} 𝒫({𝑎, 𝑏, 𝑐}) (h) {{𝑎}, {𝑏, 𝑐}} 𝒫({𝑎, 𝑏, 𝑐}) (i) 𝒫({𝑎, 𝑏}) 𝒫({𝑎, 𝑏, 𝑐}) 5. Draw a Venn diagram showing the proper relationship between these sets: ℕ, ℚ, ℝ, 𝕎, ℤ. 6. (a) How many subsets does the empty set have? (b) How many subsets does the set {1} have?
8
1. Sets and Logic
(c) Noting the number of subsets of a two-element set and of a three-element set from Examples 1.1.2 and 1.1.3, how many subsets do you think a four-element set {1, 2, 3, 4} would have? (d) List all the subsets of the four-element set {1, 2, 3, 4}. (e) How many subsets do you think a five-element set would have? A six-element set? An 𝑛-element set? 7. Determine whether the sets below are well-defined or not. For each well-defined set, state whether it is finite or infinite. (a) The set of women pregnant with twins at some time during this year. (b) The set of kangaroos in Australia. (c) The set of tall buildings. (d) The set of grains of sand on the earth. (e) The set of even integers. (f) The set of hairs on the oldest living bear in the United States. (g) The collection of all subsets of the set of hairs on the oldest living bear in the United States. (h) The set of people who shook hands with George Washington. 8. (a) Are there well-defined sets in Exercise 7 for which we may not know the answer to the question “Is 𝑥 an element of this set?” for every object 𝑥? (b) Are there finite sets in Exercise 7 for which we do not know the cardinality? 9. Let 𝑆 1 = {𝑜, 𝑛, 𝑒}, 𝑆 2 = {𝑡, 𝑤, 𝑜}, 𝑆 3 = {𝑡, ℎ, 𝑟, 𝑒, 𝑒}, and so on. (a) Find all 𝑘 ∈ {1, 2, . . . , 10} with |𝑆 𝑘 | = 4. (b) Find distinct indices 𝑗, 𝑘 ∈ ℕ with 𝑆𝑗 = 𝑆 𝑘 . (c) Find the smallest value of 𝑘 ∈ ℕ with 𝑎 ∈ 𝑆 𝑘 . (d) Let 𝒮 = {𝑆 𝑘 }40 𝑘=1 . Determine whether the following statements are true or false. (i) 𝑆 13 = {𝑛, 𝑒, 𝑖, 𝑡, ℎ, 𝑒, 𝑟} (ii) {𝑛, 𝑒, 𝑡} ⊆ 𝑆 20 (iii) 𝑆 1 ∈ 𝒮 (iv) 𝑆 3 ⊆ 𝒮 (v) ∅ ∈ 𝒮 (vi) ∅ ⊂ 𝒮 (vii) ∅ ⊆ 𝒮 (viii) 𝑆 1 ⊆ 𝑆 11 (ix) 𝑆 1 ⊆ 𝑆 21 (x) 𝑆 1 ⊂ 𝑆 21 (xi) {𝑛, 𝑖, 𝑒} ∈ 𝒮 (xii) {{𝑓, 𝑜, 𝑢, 𝑟}} ⊆ 𝒮 (xiii) 𝑢 ∈ 𝑆 40 (xiv) 𝒫(𝑆 9 ) ⊆ 𝒫(𝑆 19 ) (xv) {𝑠, 𝑖} ∈ 𝒫(𝑆 6 ) (xvi) 𝑤 ∈ 𝒫(𝑆 2 ) 10. For 𝑘 ∈ {1, 2, . . . , 20}, let 𝐷𝑘 = {𝑥 ∣ 𝑥 is a prime number which divides 𝑘} and let 𝒟 = {𝐷𝑘 ∣ 𝑘 ∈ {1, 2, . . . , 20}}.
1.2. Set Operations
9
(a) Find 𝐷1 , 𝐷2 , 𝐷10 , and 𝐷20 . (b) True or False: (i) 𝐷2 ⊂ 𝐷10 (ii) 𝐷7 ⊆ 𝐷10 (iii) 𝐷10 ⊂ 𝐷20 (iv) ∅ ∈ 𝒟 (v) ∅ ⊂ 𝒟 (vi) 5 ∈ 𝒟 (vii) {5} ∈ 𝒟 (viii) {4, 5} ∈ 𝒟 (ix) {{3}} ⊆ 𝒟 (x) 𝒫(𝐷9 ) ⊆ 𝒫(𝐷6 ) (xi) 𝒫({3, 4}) ⊆ 𝒟 (xii) {2, 3} ∈ 𝒫(𝐷12 ) (c) Find |𝐷10 | and |𝐷19 |. (d) Find |𝒟|. 11. Give an example of an indexed collection 𝒮 = {𝑆 𝑘 }5𝑘=1 with |𝒮| = 3. 12. For which sets 𝐴 below is |𝐴| ∈ 𝐴? (a) 𝐴 = {1, 2, 3, 4} (b) 𝐴 = {5, 6, 7, 8} (c) 𝐴 = {1, 3, 5} (d) 𝐴 = {1, 3, 5, 7} 13. (a) If 𝐴 is a finite set and 𝐵 = {2, 3, |𝐴|}, what are the possible values of |𝐵|? (b) Find |𝐴| if 𝐴 = {2, 3, |𝐴|}.
1.2. Set Operations There are some standard set operations used to derive new sets from given sets.
Intersection and Union Given sets 𝑆 and 𝑇, the intersection of 𝑆 and 𝑇, denoted 𝑆 ∩ 𝑇, is the set of elements which are in both 𝑆 and 𝑇. The union of sets 𝑆 and 𝑇, denoted 𝑆 ∪ 𝑇, is the set of all points which are in either 𝑆 or 𝑇 or both. 𝑆∩𝑇
=
{𝑥 ∣ 𝑥 ∈ 𝑆 and 𝑥 ∈ 𝑇}
𝑆∪𝑇
=
{𝑥 ∣ 𝑥 ∈ 𝑆 or 𝑥 ∈ 𝑇}
It is clear from the definitions that for any sets 𝑆 and 𝑇, 𝑆 ∩ 𝑇 = 𝑇 ∩ 𝑆 and 𝑆 ∪ 𝑇 = 𝑇 ∪ 𝑆. The Venn diagrams in Figure 1.2.1 depict the sets 𝑆 and 𝑇, the intersection 𝑆 ∩ 𝑇 and the union 𝑆 ∪ 𝑇.
10
1. Sets and Logic
S
T
S
𝑆∩𝑇
T
𝑆∪𝑇
3rd Ave. Main Street
Intersection of 3rd Ave. and Main Street
European Union
Figure 1.2.1. Intersections and Unions. (EU map—Credit: PytyCzech / iStock / Getty Images Plus via Getty Images.)
For example, suppose 𝐴 = {1, 3, 5, 7}, 𝐵 = {3, 4, 5, 6} and 𝐶 = {2, 4}. Then we have 𝐴∩𝐵
=
{3, 5}
𝐴∪𝐵
=
{1, 3, 4, 5, 6, 7}
𝐴∩𝐶
=
∅
𝐴∪𝐶
=
{1, 2, 3, 4, 5, 7}
𝐵∩𝐶
=
{4}
𝐵∪𝐶
=
{2, 3, 4, 5, 6}
Two sets with no “overlap”, such as 𝐴 and 𝐶 above, are said to be disjoint. Formally, sets 𝑆 and 𝑇 are disjoint if 𝑆 ∩ 𝑇 = ∅. Let us consider another example. Let 𝑈 be the set of students enrolled at a university. In this example, we will only consider subsets of this set 𝑈. Such a set 𝑈 containing all the objects to be considered is called the universal set for the problem in question. Let 𝐻 = {𝑥 ∈ 𝑈 ∣ 𝑥 has black hair}. Let 𝐸 = {𝑥 ∈ 𝑈 ∣ 𝑥 has green eyes}. Now 𝐻 is the set of students with black hair and 𝐸 is the set of students with green eyes. 𝐻∩𝐸 𝐻∪𝐸
= {𝑥 ∈ 𝑈 ∣ 𝑥 ∈ 𝐻 and 𝑥 ∈ 𝐸} = the set of students with black hair and green eyes. = {𝑥 ∈ 𝑈 ∣ 𝑥 ∈ 𝐻 or 𝑥 ∈ 𝐸} = the set of students with black hair or green eyes.
1.2. Set Operations
11
Observe that those students with black hair and green eyes qualify to be an element of 𝐻 ∪ 𝐸 in two ways. If your server asks you if you would like french fries or a baked potato, he is using an “exclusive or”: he means you may select one or the other but not both. In mathematics, the word “or” is interpreted as an “inclusive or”, so saying “P or Q” means “P or Q or both”. If a student is admitted to the black-haired greeneyed student union 𝐻 ∪ 𝐸 because she has black hair, she will not be thrown out if she also happens to have green eyes. Recognizing that some students may qualify as a member of 𝐻 ∪ 𝐸 by two criteria is important in counting the number of elements in the union 𝐻 ∪ 𝐸. Suppose we know that the university has 127 black-haired students and 73 green-eyed students, that is, suppose |𝐻| = 127 and |𝐸| = 73. Without further information, we cannot determine the number |𝐻 ∪ 𝐸| of students with black hair and green eyes. If we simply add |𝐻| and |𝐸|, the dually qualified students—those with black hair and green eyes, that is, the elements of 𝐻 ∩ 𝐸—are counted twice. To find the correct answer, we must add |𝐻| and |𝐸| then subtract the number |𝐻 ∩𝐸| that were counted twice. Thus we have |𝐻 ∪ 𝐸| = |𝐻| + |𝐸| − |𝐻 ∩ 𝐸|.
H
E
Figure 1.2.2. |𝐻| + |𝐸| counts the elements of 𝐻 ∩ 𝐸 twice. To compensate, subtract |𝐻 ∩ 𝐸| once.
Without further information on the size of the overlap 𝐻 ∩ 𝐸, we may only find a possible range of values for |𝐻 ∪ 𝐸|. At one extreme, if 𝐻 and 𝐸 do not overlap at all— that is, if 𝐻 and 𝐸 are disjoint (Figure 1.2.3)—then there are no students with both black hair and blue eyes, so no one is counted twice and |𝐻 ∪ 𝐸|
H
=
|𝐻| + |𝐸| − |𝐻 ∩ 𝐸|
=
|𝐻| + |𝐸| − |∅|
=
127 + 73 − 0 = 200.
E
Figure 1.2.3. If 𝐻 and 𝐸 are disjoint, then |𝐻| + |𝐸| = |𝐻 ∪ 𝐸|.
12
1. Sets and Logic
At the other extreme, the largest overlap 𝐻 ∩ 𝐸 occurs if all 73 green-eyed students also have black hair. In this case, 𝐸 ⊆ 𝐻 so 𝐻 ∩ 𝐸 = 𝐸, and |𝐻 ∪ 𝐸|
=
|𝐻| + |𝐸| − |𝐻 ∩ 𝐸|
=
|𝐻| + |𝐸| − |𝐸|
=
|𝐻| = 127.
H E
Figure 1.2.4. If 𝐸 ⊆ 𝐻, then |𝐻 ∪ 𝐸| = |𝐻|.
Equivalently, if 𝐸 ⊆ 𝐻 (Figure 1.2.4), then 𝐻∪𝐸 = 𝐻 and therefore |𝐻∪𝐸| = |𝐻| = 127. Thus, if we only know |𝐻| = 127 and |𝐸| = 73, we may conclude that the intersection 𝐻 ∩ 𝐸 has 𝑛 elements for some 𝑛 satisfying 0 ≤ 𝑛 ≤ 73. The formula |𝐻 ∪ 𝐸| = |𝐻| + |𝐸| − |𝐻 ∩ 𝐸| now tells us that the union 𝐻 ∪ 𝐸 has from 127 to 200 elements. The exact answer can be determined only if we know |𝐻 ∩ 𝐸| exactly. If we determine that there are exactly 32 black-haired green-eyed students at the university, then we would know that |𝐻 ∪ 𝐸| = |𝐻| + |𝐸| − |𝐻 ∩ 𝐸| = 127 + 73 − 32 = 168. In the discussion above on |𝐻 ∪ 𝐸|, we implicitly encountered the fact that the number of elements of a subset 𝑇 of set 𝑆 cannot exceed the number of elements of 𝑆. That is, if 𝑇 ⊆ 𝑆, then |𝑇| ≤ |𝑆|. In particular, since 𝐻 ∩ 𝐸 ⊆ 𝐻 and 𝐻 ∩ 𝐸 ⊆ 𝐸, we have |𝐻 ∩ 𝐸| ≤ |𝐻| and |𝐻 ∩ 𝐸| ≤ |𝐸|. Similarly, since 𝐻 ⊆ 𝐻 ∪ 𝐸 and 𝐸 ⊆ 𝐻 ∪ 𝐸, we have |𝐻| ≤ |𝐻 ∪ 𝐸| and |𝐸| ≤ |𝐻 ∪ 𝐸|. We summarize our results here. Theorem 1.2.1. Suppose 𝑆 and 𝑇 are finite sets. Then (a) |𝑆 ∪ 𝑇| = |𝑆| + |𝑇| − |𝑆 ∩ 𝑇|. (b) If 𝑆 and 𝑇 are disjoint, then |𝑆 ∪ 𝑇| = |𝑆| + |𝑇|. (c) If 𝑆 ⊆ 𝑇, then |𝑆| ≤ |𝑇|. We may define the intersection or union of more than two sets. If 𝒞 = {𝑆 𝑖 ∣ 𝑖 ∈ 𝐼} is a collection of sets 𝑆 𝑖 indexed by the set 𝐼, then we define the intersection of the collection 𝒞 to be the intersection of all the sets in the collection: ⋂
𝒞=
⋂
𝑆 𝑖 = {𝑥 ∣ 𝑥 ∈ 𝑆 𝑖 for every 𝑖 ∈ 𝐼}.
𝑖∈𝐼
The intersection of a collection is thus the set of elements common to all of the sets in the collection.
1.2. Set Operations
13
The union of the collection 𝒞 = {𝑆 𝑖 ∣ 𝑖 ∈ 𝐼} is the union of all the sets in the collection: 𝒞= 𝑆 = {𝑥 ∣ 𝑥 ∈ 𝑆 𝑖 for at least one 𝑖 ∈ 𝐼}. ⋃ ⋃ 𝑖 𝑖∈𝐼
The union of a collection consists of all the points that belong to at least one of the sets in the collection. If the index set 𝐼 is finite, say 𝐼 = {1, 2, 3, . . . , 𝑛}, then we may write 𝑛
⋂
𝑆𝑖 =
𝑖∈𝐼
⋂
𝑆 𝑖 = 𝑆 1 ∩ 𝑆 2 ∩ 𝑆 3 ∩ ⋯ ∩ 𝑆𝑛
𝑖=1
and a similar notation holds for unions. We say that the sets of a collection {𝑆 𝑖 ∣ 𝑖 ∈ 𝐼} are mutually disjoint (or pairwise disjoint) if 𝑆 𝑖 ≠ 𝑆𝑗 implies 𝑆 𝑖 ∩ 𝑆𝑗 = ∅, or equivalently, if 𝑆 𝑖 ∩ 𝑆𝑗 ≠ ∅ implies 𝑆 𝑖 = 𝑆𝑗 . Thus, {𝑆 𝑖 ∣ 𝑖 ∈ 𝐼} is a collection of mutually disjoint sets if every pair of distinct sets in the collection is disjoint. A collection of sets {𝑆 𝑖 ∣ 𝑖 ∈ 𝐼} is called a nested collection if for any 𝑖, 𝑗 ∈ 𝐼, either 𝑆 𝑖 ⊆ 𝑆𝑗 or 𝑆𝑗 ⊆ 𝑆 𝑖 . Example 1.2.2. Given below are three collections of intervals on the real line. For each collection, determine whether the sets of the collection are mutually disjoint. Determine whether the collection is nested. Find the union of the collection and the intersection of the collection. 𝒜
=
{[𝑛, 𝑛 + 1) ∣ 𝑛 ∈ ℤ}
ℬ
=
𝒞
=
{(𝑛, 𝑛 + 2) ∣ 𝑛 ∈ ℤ} 1 1 {(− , 1 + ) ∣ 𝑛 ∈ ℕ} 𝑛 𝑛
Solution. The sets of 𝒜 are mutually disjoint, for if 𝑚 and 𝑛 are distinct integers, then the intervals [𝑚, 𝑚+1) and [𝑛, 𝑛+1) are disjoint. The sets of ℬ are not mutually disjoint since, for example, (1, 3) and (2, 4) are in ℬ but (1, 3) ∩ (2, 4) = (2, 3) ≠ ∅. The sets of 𝒞 are not mutually disjoint, for 0 is contained in the intersection of any pair of sets of 𝒞. Neither 𝒜 nor ℬ is a nested collection, for each contains pairs of nonempty disjoint sets. 𝒞 is a nested collection, for given any 𝑚, 𝑛 ∈ ℕ, we have either 𝑚 ≤ 𝑛 or 𝑛 ≤ 𝑚. 1 1 1 1 Without loss of generality, assume 𝑚 ≤ 𝑛. Then (− 𝑛 , 1 + 𝑛 ) ⊆ (− 𝑚 , 1 + 𝑚 ). As every real number 𝑥 is contained in the interval [𝑛, 𝑛+1) where 𝑛 is the greatest integer less than or equal to 𝑥, we see that ℝ ⊆ ⋃ 𝒜. On the other hand, since [𝑛, 𝑛 + 1) ⊆ ℝ for every integer 𝑛, we have ⋃ 𝒜 = ⋃𝑛∈ℤ [𝑛, 𝑛 + 1) ⊆ ℝ, and thus ⋃ 𝒜 = ℝ. Similarly, ⋃ ℬ = ℝ. As the intervals of the collection 𝒞 were nested with the intervals getting smaller as the indices increase, we find that the largest interval in 𝒞 corresponds to the smallest index. That is, every interval of 𝒞 is nested inside the first interval 1 1 (− 1 , 1 + 1 ) = (−1, 2). Thus, ⋃ 𝒞 = (−1, 2). Since both collections 𝒜 and ℬ contained pairs of disjoint intervals, we have ⋂ 𝒜 = ∅ = ⋂ ℬ. Since 𝒞 is a nested collection, ⋂ 𝒞 would equal the smallest interval of 𝒞 if 𝒞 had a smallest interval. However, 𝒞 has no smallest interval. It is easy to see that every
14
1. Sets and Logic
1
1
element of [0, 1] is contained in every interval (− 𝑛 , 1 + 𝑛 ) of 𝒞 and that every number outside of the interval [0, 1] is excluded from some interval of 𝒞. Thus, ⋂ 𝒞 = [0, 1]. □
Complements Suppose 𝐴 is the set of month names that contain an a, 𝑅 is the set of month names that contain an r and 𝑌 is the set of month names that contain a y. The universal set in this setting would be the set 𝑈 of all twelve month names, and we have 𝐴 𝑅
= {January, February, March, April, May, August} = {January, February, March, April, September, October, November, December} 𝑌 = {January, February, May, July} The intersection 𝐴 ∩ 𝑅 ∩ 𝑌 is the set of month names that contain an a, an r and a y, and thus 𝐴 ∩ 𝑅 ∩ 𝑌 = {January, February}. The union of 𝐴, 𝑅 and 𝑌 is 𝐴 ∪ 𝑅 ∪ 𝑌 = {January, February, March, April, May, July, September, October, November, December}. Observe the placement of the 12 months in the eight regions of the Venn in Figure 1.2.5.
U A August
March April
May
January February
July
Y
September October November December
R June
Figure 1.2.5. 𝐴 ∩ 𝑅 ∩ 𝑌 = {January, February}; 𝐴 ∪ 𝑅 ∪ 𝑌 = {January, February, March, April, May, July, August, September, October, November, December}.
In the previous example, the 11-element subset 𝐴 ∪ 𝑅 ∪ 𝑌 of the 12-element universal set 𝑈 could be described by specifying which element of 𝑈 was left out. The set of elements left out of a set 𝑆 is called the complement of the set 𝑆. Definition 1.2.3. If 𝑆 is any subset of the universal set 𝑈, then the complement of 𝑆 in 𝑈 (Figure 1.2.6), denoted 𝑆 𝑐 or 𝑈 ⧵ 𝑆, is the set 𝑆 𝑐 = 𝑈 ⧵ 𝑆 = {𝑥 ∈ 𝑈 ∣ 𝑥 ∉ 𝑆}. From the definition or the Venn diagram, it should be clear that (𝑆𝑐 )𝑐 = 𝑆.
1.2. Set Operations
15
U S
Figure 1.2.6. The complement of 𝑆 = 𝑆𝑐 = 𝑈 ⧵ 𝑆 is shaded.
The notation 𝑈 ⧵ 𝑆 has the advantage that it explicitly names the universal set, which we may want to alter or restrict at times. Suppose Alton moves to the gulf coast so he can catch and eat fresh oysters every month, except December and January, which are too cold for Alton. The set of months that Alton eats fresh oysters may be described as 𝑈 ⧵ {December, January} where 𝑈 is the universal set of the 12 months. However, once Alton learns from the locals that oysters should only be eaten in months with an r, the set of months that Alton eats fresh oysters may be described as 𝑅 ⧵ {December, January} where 𝑅 is the set of months which contain an r. Definition 1.2.4. The set 𝑅 ⧵ 𝑆 = {𝑥 ∈ 𝑅 ∣ 𝑥 ∉ 𝑆} is called the complement of 𝑆 in 𝑅. To emphasize that the set 𝑅 may not be the entire universal set, sometimes 𝑅 ⧵ 𝑆 is called the relative complement of 𝑆 in 𝑅. To find 𝑅 ⧵ 𝑆, we start with all the elements of 𝑅 and throw out any that are also in 𝑆 (Figure 1.2.7). For this reason, 𝑅 ⧵ 𝑆 is typically called a set difference. For example, if 𝑅 is the set of right-handed people and 𝑆 is the set of people under 5 feet tall, then 𝑅 ⧵ 𝑆 is the set of right-handed people who are 5 feet tall or taller.
R S
Figure 1.2.7. The set difference 𝑅 ⧵ 𝑆 is shaded.
It is easy to show that if 𝑅 and 𝑆 are subsets of the universal set 𝑈, then 𝑅 ⧵ 𝑆 = 𝑅 ∩ 𝑆𝑐 . The proof is left as an exercise. The set ℝ ⧵ ℚ = {𝑥 ∈ ℝ ∣ 𝑥 ∉ ℚ} is the set of real numbers that are not rational. This set is called the set of irrational numbers. Two important set-theoretic properties describing interactions of intersections, unions, and complements are given below. A more complete discussion and proofs of these statements will appear in Sections 1.4 and 1.5.
16
1. Sets and Logic
De Morgan’s Laws: If {𝑆 𝑖 }𝑖∈𝐼 is a collection of sets, then (
⋃
𝑆 𝑖 )𝑐 =
𝑖∈𝐼
(
⋂
⋂
(𝑆𝑐𝑖 ) and
𝑖∈𝐼
𝑆 𝑖 )𝑐 =
𝑖∈𝐼
(𝑆 𝑐 ). ⋃ 𝑖 𝑖∈𝐼
These may be stated as the complement of a union of sets is the intersection of the complements and the complement of an intersection of sets is the union of the complements. Distributive Laws: For sets 𝐴, 𝐵, and 𝐶, (𝐴 ∪ 𝐵) ∩ 𝐶 = (𝐴 ∩ 𝐶) ∪ (𝐵 ∩ 𝐶) and (𝐴 ∩ 𝐵) ∪ 𝐶 = (𝐴 ∪ 𝐶) ∩ (𝐵 ∪ 𝐶).
Cartesian Products Suppose you have three vehicles: a pickup, a Tesla, and a Jaguar. You have two options for Saturday evening entertainment: the opera or bowling. To decide what to drive and where to go, you must choose one element from the set 𝑉 = {pickup, Tesla, Jaguar} of vehicles and one element from the set 𝐸 = {opera, bowling} of excursion options. If you decide to drive the pickup, there remain two options for the excursion. We will list these two possible outcomes as ordered pairs (pickup, opera) and (pickup, bowling). Similarly, the other possible outcomes are (Tesla, opera), (Tesla, bowling), (Jaguar, opera), and (Jaguar, bowling). We can visualize the decision process and the possible outcomes by a tree diagram as shown in Figure 1.2.8.
Q
Q Q
opera pickup PP bowling Tesla
Q Q
opera PP bowling
opera Jaguar PP bowling
Figure 1.2.8. A tree diagram.
The set of outcomes is the six-element set {(pickup, opera), (pickup, bowling), (Tesla, opera), (Tesla, bowling), (Jaguar, opera), (Jaguar, bowling)} consisting of every possible ordered pair whose first coordinate is an element of 𝑉 and whose second coordinate is an element of 𝐸. This set is called the Cartesian product of the sets 𝑉 and 𝐸, denoted 𝑉 × 𝐸. The formal definition below is based on the concept of ordered pairs. Formally, ordered 𝑛-tuples are objects of form (𝑥1 , 𝑥2 , . . . , 𝑥𝑛 ) with (𝑥1 , 𝑥2 , . . . , 𝑥𝑛 ) = (𝑦1 , 𝑦2 , . . . , 𝑦𝑛 ) if and only if 𝑥𝑖 = 𝑦 𝑖 for each 𝑖 = 1, 2, . . . , 𝑛. If 𝑛 = 2
1.2. Set Operations
17
(respectively, 𝑛 = 3), we call the ordered 𝑛-tuple an ordered pair (respectively, ordered triple). Definition 1.2.5. The Cartesian product of two nonempty sets 𝐴 and 𝐵, denoted 𝐴×𝐵, is the set 𝐴 × 𝐵 = {(𝑎, 𝑏) ∣ 𝑎 ∈ 𝐴, 𝑏 ∈ 𝐵} of all ordered pairs whose first coordinate is an element of 𝐴 and whose second coordinate is an element of 𝐵. The most familiar Cartesian product is the product ℝ×ℝ = ℝ2 = {(𝑥, 𝑦) ∣ 𝑥, 𝑦 ∈ ℝ}. By considering “solution sets” of equations, we have a link between algebraic equations like 𝑦 = 3𝑥+1 and the geometric subset {(𝑥, 𝑦) ∈ ℝ2 ∣ 𝑦 = 3𝑥+1} of the plane. This link is the foundation of analytic geometry and was utilized by René Descartes (1596–1650), Pierre de Fermat (1601–1665), and others. Cartesian products are named in honor of René Descartes. In the example above, |𝑉| = 3, |𝐸| = 2, and |𝑉 × 𝐸| = 3 ⋅ 2 = 6. If 𝐴 and 𝐵 are any finite sets, we may count the elements of 𝐴 × 𝐵 = {(𝑎, 𝑏) ∣ 𝑎 ∈ 𝐴, 𝑏 ∈ 𝐵} by considering the tree diagram for 𝐴 × 𝐵. At the first branching, there is one limb for each element of 𝐴. At the second branching, we append |𝐵| limbs onto the end of each of the |𝐴| existing limbs. Thus, the total number of limb tips on the right of the tree diagram is |𝐵| ⋅ |𝐴| = |𝐴| ⋅ |𝐵|. This gives us the following result. Theorem 1.2.6. If 𝐴 and 𝐵 are nonempty finite sets, then |𝐴 × 𝐵| = |𝐴| ⋅ |𝐵|. A more formal proof of the theorem above will be given at the end of Section 1.3. Using “×” to represent multiplication of real numbers as well as the Cartesian product of sets, the result can be restated as |𝐴 × 𝐵| = |𝐴| × |𝐵|. Example 1.2.7. Jimmy and Stacy want to go to the movies on Wednesday, Thursday, Friday, or Saturday of next week. There are three movies playing at the cinema: an Action film, a Comedy, and a Horror film. How many possible outcomes do they have for the selection of a day and a movie? Draw a tree diagram to illustrate the possible outcomes. Solution. Jimmy and Stacy must choose a day from the set 𝐷 = {𝑊, 𝑇, 𝐹, 𝑆} and a movie from the set 𝑀 = {𝐴, 𝐶, 𝐻}. The set of all their possible outcomes is {(𝑑, 𝑚) ∣ 𝑑 ∈ 𝐷, 𝑚 ∈ 𝑀} = 𝐷 × 𝑀. Thus, they have |𝐷 × 𝑀| = |𝐷| ⋅ |𝑀| = 4 ⋅ 3 = 12 possible outcomes, as illustrated in the tree diagram of Figure 1.2.9. □ Extending the problem above, suppose that each of the movies has two showtimes each night—7 p.m. and 9 p.m. If Jimmy and Stacy wish to select a day, movie, and time, they must select one element from 𝐷 as above, one element form 𝑀 as above and one element from the set 𝑇 = {7, 9} of possible showtimes. Their selection will be an ordered triple (𝑑, 𝑚, 𝑡) where 𝑑 ∈ 𝐷, 𝑚 ∈ 𝑀, and 𝑡 ∈ 𝑇. The set of all such ordered triples is the Cartesian product of 𝐷, 𝑀, and 𝑇: 𝐷 × 𝑀 × 𝑇 = {(𝑑, 𝑚, 𝑡) ∣ 𝑑 ∈ 𝐷, 𝑚 ∈ 𝑀, 𝑡 ∈ 𝑇}.
18
1. Sets and Logic
A W C QQ QH A C TQ Q QH Q A Q A A Q Q A Q F C Q A Q A QH A A A A A S C Q Q QH Figure 1.2.9. Tree diagram for Example 1.2.7.
The elements of 𝐷 × 𝑀 × 𝑇 can be illustrated by a tree diagram with three branching stages (Figure 1.2.10). The first two branchings correspond to the selection of day and movie as shown in Example 1.2.7 above. Having selected a particular 𝑑 ∈ 𝐷 and a particular 𝑚 ∈ 𝑀, there are two time options, 7 or 9, and thus each existing branch forks into two branches at the third branching stage. The total number of (day, movie, time) options is 4 ⋅ 3 ⋅ 2 = 24. That is, |𝐷 × 𝑀 × 𝑇| = |𝐷| ⋅ |𝑀| ⋅ |𝑇|. Our motivation for defining Cartesian products of three sets and the method for counting the elements in a Cartesian product of three sets extend to Cartesian products of any finite number of sets. Definition 1.2.8. If 𝑆 1 , 𝑆 2 , . . . , 𝑆𝑛 are nonempty sets, then the Cartesian product 𝑆 1 × 𝑆 2 × ⋯ × 𝑆𝑛 is the set {(𝑠1 , 𝑠2 , . . . , 𝑠𝑛 ) ∣ 𝑠1 ∈ 𝑆 1 , 𝑠2 ∈ 𝑆 2 , . . . , 𝑠𝑛 ∈ 𝑆𝑛 } of all ordered 𝑛tuples whose 𝑘-th coordinate 𝑠𝑘 is an element of the 𝑘-th set 𝑆 𝑘 for each 𝑘 = 1, 2, . . . , 𝑛. 𝑛
We may denote the Cartesian product 𝑆 1 ×𝑆 2 ×⋯×𝑆𝑛 by the notation ∏𝑖=1 𝑆 𝑖 . The symbol ∏ is the Greek letter pi, corresponding to the first letter of the word product. 𝑛 This notation is comparable to the “sigma notation” ∑𝑖=1 𝑎𝑖 for the sum 𝑎1 +𝑎2 +⋯+𝑎𝑛 . Observe that the Greek sigma ∑ corresponds to the initial letter of the word sum. Theorem 1.2.9. If 𝑆 1 , 𝑆 2 , . . . , 𝑆𝑛 are nonempty finite sets, then |𝑆 1 × 𝑆 2 × . . . × 𝑆𝑛 | = |𝑆 1 | ⋅ |𝑆 2 | ⋅ ⋯ ⋅ |𝑆𝑛 |.
1.2. Set Operations
19
7 A PP 9 PP 7 WQ C 9 Q Q QHP 7 P 9 7 A PP 9 PP 7 T C Q 9 Q Q 7 QH PP 9 Q A Q 7 A PP 9 A Q Q A Q Q F A PP 7 C Q 9 A Q Q A 7 QH PP A 9 A A 7 A PP 9 A A A S PP 7 C Q 9 Q Q 7 QH PP 9 Figure 1.2.10. Tree diagram.
A formal proof of this theorem will be presented in Section 2.2. For now, it is enough to keep in mind our arguments based on what the tree diagram for the Cartesian product would look like. Observe that if 𝑛 = 2, the theorem reduces to Theorem 1.2.6. If 𝑆 1 = 𝑆 2 = ⋯ = 𝑆𝑛 = 𝑆, then the Cartesian product 𝑆 1 × 𝑆 2 × ⋯ × 𝑆𝑛 = 𝑆 ×𝑆×⋯×𝑆×𝑆 ⏟⎵⎵⎵⎵⏟⎵⎵⎵⎵⏟ 𝑛 factors
is denoted 𝑆 𝑛 . The familiar examples of ℝ2 = ℝ × ℝ = {(𝑥, 𝑦) ∣ 𝑥, 𝑦 ∈ ℝ} and ℝ3 = ℝ × ℝ × ℝ = {(𝑥, 𝑦, 𝑧) ∣ 𝑥, 𝑦, 𝑧 ∈ ℝ} follow this convention. If 𝑆 is a finite set, the theorem above implies |𝑆 𝑛 | = |𝑆|𝑛 .
Exercises 1. Let 𝐴 = {𝑛 ∈ ℤ ∶ 𝑛2 < 4} and 𝐵 = {𝑛 ∈ ℤ ∶ 0 ≤ 𝑛 < 3}. List the elements of the specified sets.
20
1. Sets and Logic
(a) 𝐴 (b) 𝐵 (c) 𝐴 ⧵ 𝐵 (d) 𝐴 × {3, 4} 2. Let 𝑆 = {1, 3, 5, 7, 9}, 𝑇 = {1, 2, 3, 4, 5}, and 𝑉 = {3, 6, 9}. List the elements of the specified sets. (a) 𝑆 ∩ 𝑇 (b) 𝑆 ∪ 𝑇 (c) 𝑆 ∩ 𝑉 (d) 𝑆 ∪ 𝑉 (e) (𝑇 ∩ 𝑉) ∪ 𝑆 (f) 𝑇 ∩ (𝑉 ∪ 𝑆) (g) 𝑉 × 𝑇 (h) 𝑉 × (𝑇 ∩ 𝑆) 3. Given that 𝐴 = {1, 2, 3} and 𝐵 = {1, 3, 5, 7}, list the elements of the specified sets. (a) 𝐴 ∪ 𝐵 (b) 𝐴 ⧵ 𝐵 (c) {2} × 𝐴 (d) 𝒫(𝐴 ∩ 𝐵) (e) |𝐵 × 𝒫(𝐴)| 4. Let 𝑈 be the set of 52 cards in a standard deck. (For a description of a standard deck, see the paragraph following Example 4.8.2.) Let 𝑆 be the set of spades, 𝐷 the set of diamonds, 𝐴 the set of aces, and 𝐾 the set of kings. Tell which cards belong to each set below, and find the cardinality of each set. (a) 𝐴 ∩ 𝐷 (b) 𝑆 ∩ 𝐷 (c) 𝐴 ∩ (𝑆 ∪ 𝐷) (d) (𝐴 ∪ 𝐾) ∩ (𝑆 ∪ 𝐷) (e) (𝐴 ∩ 𝑆) ∪ (𝐾 ∩ 𝐷) (f) 𝐷𝑐 (g) 𝐾 ∩ 𝑆 𝑐 (h) 𝐾 ∩ (𝑆 ∪ 𝐷)𝑐 (i) (𝐴 ∪ 𝐾)𝑐 ∩ 𝑆 (j) 𝐴 × 𝐾 (k) 𝐴 × 𝐾 𝑐 (l) 𝑆 × 𝑆 𝑐 (m) 𝑆 ⧵ 𝐾 (n) 𝐾 ⧵ 𝑆 (o) (𝐾 ⧵ 𝑆) × 𝑆 5. Let 𝑀3 = {3, 6, 9, 12, 15, . . .} and 𝑀5 = {5, 10, 15, 20, 25, . . .}. Describe (a) 𝑀3 ∩ 𝑀5 (b) 𝑀3 ⧵ 𝑀5 (c) ℕ ⧵ 𝑀3 (d) 𝑀3 ∪ 𝑀5
1.2. Set Operations
21
6. Find the sets indicated. (a) ({𝑎, 𝑏, 𝑐} ∪ {𝑏, 𝑐, 𝑑}) × ({𝑎, 𝑏, 𝑐} ⧵ {𝑏, 𝑐, 𝑑}) (b) {1, 2} ∪ 𝒫({1, 2}) (c) {1, 2} ∩ 𝒫({1, 2}) (d) 𝒫({1, 2, 3}) ⧵ 𝒫({1, 2}) 7. For each collection given below, determine whether the sets of the collection are mutually disjoint. Determine whether the collection is nested. Find the union of the collection and the intersection of the collection. (We use interval notation below: (𝑎, 𝑏) = {𝑥 ∈ ℝ ∣ 𝑎 < 𝑥 < 𝑏}.) 1 (a) 𝒜 = {( 𝑛 , 𝑛 + 1) ∣ 𝑛 ∈ ℕ} −1
(b) ℬ = {( 𝑛 , 𝑛) ∣ 𝑛 ∈ ℕ} (c) 𝒞 = {(𝑛, ∞) ∣ 𝑛 ∈ ℕ} (d) 𝒟 = {(𝑥, ∞) ∣ 𝑥 ∈ ℝ} (e) ℰ = {{𝑥 ∈ ℝ ∣ 𝑥2 < 𝑛} ∣ 𝑛 ∈ ℕ} 8. Let the collections 𝒜 through ℰ be defined as in Exercise 7. Determine whether the following statements are true or false. (a) ∅ ∈ 𝒜 (b) ∅ ⊆ 𝒜 (c) If 𝐵 is any element in ℬ, then 0 ∈ 𝐵 (d) ℬ ⊆ 𝒜 (e) 𝒞 ⊆ 𝒟 (f) 𝒜 ∩ ℰ = ∅ (g) ℬ ∩ ℰ = ∅ (h) (−2, 2) ⊆ ℰ (i) (−√3, √3) ∈ ℰ (j) ⋂ ℰ ∈ ℬ 9. For 𝑛 ∈ ℤ, let 𝐴𝑛 = {𝑛 + 1, 𝑛 + 2, 𝑛 + 3, 𝑛 + 4}. 2 (a) Find ⋃𝑛=0 𝐴𝑛 . 2
(b) Find ⋂𝑛=0 𝐴𝑛 . (c) Which values of 𝑘 ∈ ℕ make the collection {𝐴𝑘𝑛 ∶ 𝑛 ∈ ℤ} mutually disjoint? (d) Find all values of 𝑘 ∈ ℕ, if any, which make ⋃{𝐴𝑘𝑛 ∶ 𝑛 ∈ ℤ} = ℤ. 10. For each condition below, give a nested collection 𝒞 of distinct sets which meets the condition. (a) ⋂ 𝒞 = ∅ (b) ⋂ 𝒞 = [−1, 1] (c) ⋃ 𝒞 = [−2, 2] (d) ⋃ 𝒞 = ℝ 11. For each condition given in Exercise 10, give a mutually disjoint collection 𝒞 of distinct sets which meets the condition, or explain why no such collection is possible. 12. For 𝑖 > 0, let 𝑆 𝑖 = {𝑛 ∈ ℕ ∣ 𝑛 is odd, 0 < 𝑛 < 2𝑖} and consider the collections 𝒮 = {𝑆 𝑖 }𝑖∈{1,2,3,4} , 𝒯 = {𝑆 𝑖 }𝑖∈{ 1 ,1,𝑒,𝜋} , 𝒰 = {𝑆 𝑖 ∣ 𝑖 ∈ ℝ, 3 < 𝑖 < 8} = {𝑆 𝑖 }𝑖∈(3,8) , and 𝒱 = {𝑆 𝑖 }𝑖∈ℕ .
2
22
1. Sets and Logic
(a) Find |𝒮|, |𝒯|, and |𝒰|. (b) Find 𝒮 ∩ 𝒯. (c) Find ⋂ 𝒮 and ⋃ 𝒮. (d) Find ⋂ 𝒰 and ⋃ 𝒰. (e) Find ⋂ 𝒱 and ⋃ 𝒱. (f) Find 𝒮 ∩ 𝒰. (g) Are any of 𝒮, 𝒯, 𝒰, 𝒱 nested? Are any mutually disjoint? 13. Suppose 𝒞 is a collection which contains at least three distinct nonempty sets. (a) If 𝒞 is a mutually disjoint collection, must if follow that ⋂ 𝒞 = ∅? Justify your answer. (b) If ⋂ 𝒞 = ∅, must it follow that 𝒞 is a mutually disjoint collection? Justify your answer. 14. If 𝑅 and 𝑆 are subsets of the universal set 𝑈, show that 𝑅 ⧵ 𝑆 = 𝑅 ∩ 𝑆 𝑐 . 15. Show that 𝐴 × (𝐵 ∩ 𝐶) = (𝐴 × 𝐵) ∩ (𝐴 × 𝐶). 16. For any two finite sets 𝑆 and 𝑇, show that the average of |𝑆| and |𝑇| does not exceed |𝑆 ∪ 𝑇|. 17. Given a collection of sets {𝑆 𝑖 ∣ 𝑖 ∈ 𝐼}, is the condition that 𝑆 𝑖 ∩ 𝑆𝑗 ≠ ∅ implies 𝑖 = 𝑗 equivalent to the condition that 𝑆 𝑖 ∩ 𝑆𝑗 ≠ ∅ implies 𝑆 𝑖 = 𝑆𝑗 ? Explain. 18. At Scottsville Junior High, 43 eighth graders are taking Algebra, 32 are taking Spanish, and 7 are taking Algebra and Spanish. How many are taking Algebra or Spanish? 19. A craftsman produces 100 wooden trucks. He classifies the best ones as “premium quality” and charges a higher price for them. He first inspects the trucks for painting imperfections and excludes 31 trucks on this criterion. Then he inspects the remaining trucks for woodworking errors (wobbly wheels) and excludes 19 more. He remarks that more trucks had woodworking errors than painting irregularities. How can this be? 20. At a diner, the special consists of your choice of meatloaf or chicken, served with mashed potatoes and your choice of one vegetable from seven on the menu and one dessert from five on the menu. How many ways can you place an order for the special? 21. Four runners, A, B, C, and D, are in a race. Draw a tree diagram showing all the possible outcomes (with no ties). 22. For each room rented, a hotel records a three-symbol code consisting of a 1, 2, 3, or 4+ to specify the number of occupants, an S or N to specify smoking or nonsmoking, and an S or O to specify street-view or ocean view. How many different codes are there? Illustrate them with a tree diagram.
1.3. Partitions
23
23. Next semester, Luis wants to take only physics and chemistry on Mondays. Sections of physics are offered at 11:00, 12:00, 1:00, and 2:00 on Mondays, and Monday sections of chemistry are offered at 2:00, 3:00, and 4:00. Draw a tree diagram showing all possible outcomes for his Monday class schedule. 24. A combination lock has a dial with the numbers 1, 2, . . . , 60. To open the lock, you must turn the dial clockwise to a specified number, then turn the dial counterclockwise to a second specified number, then turn the dial clockwise to a third specified number. The specified numbers are called the combination key. (a) How many combination keys are possible? (b) How many combination keys are possible if the first and third numbers must be even?
1.3. Partitions Large sets are often divided into categories. The set of students at a large 4-year university is divided into the four categories freshman, sophomore, junior and senior. The set of cards in a standard deck is divided into the four suits: hearts, clubs, diamonds and spades. The set of animals is divided into vertebrates and invertebrates. The “categories” in these cases are mutually disjoint since no element can belong to more than one category. Together the categories make up the entire original set since every element of the original set falls into one of the categories. Each category is nonempty. A division of a set into categories satisfying these three conditions provides a partition of the set (Figure 1.3.1). Definition 1.3.1. A partition of a nonempty set 𝑆 is a collection 𝒞 = {𝐵𝑖 }𝑖∈𝐼 of nonempty mutually disjoint subsets of 𝑆 with ⋃𝑖∈𝐼 𝐵𝑖 = 𝑆. The sets 𝐵𝑖 ∈ 𝒞 are called the blocks of the partition. Example 1.3.2. The collection {{1, 2}, {3, 4, 5}, {6}} is a partition of the set 𝑆 = {1, 2, 3, 4, 5, 6} since the blocks 𝐵1 = {1, 2}, 𝐵2 = {3, 4, 5} and 𝐵3 = {6} are nonempty, mutually disjoint, and their union {1, 2} ∪ {3, 4, 5} ∪ {6} is 𝑆. Example 1.3.3. The set of capitals of the 50 U.S. states is partitioned into the set 𝐻 of state capitals in the Hawaii time zone, the set 𝐴 of state capitals in the Alaska time zone, the set 𝑃 of state capitals in the Pacific time zone, the set 𝑀 of state capitals in the Mountain time zone, the set 𝐶 of state capitals in the Central time zone, and the set 𝐸 of state capitals in the Eastern time zone. No state capital falls into more than one time zone, so the collection {𝐻, 𝐴, 𝑃, 𝑀, 𝐶, 𝐸} is mutually disjoint. The sets 𝐻, 𝐴, 𝑃, 𝑀, 𝐶 and 𝐸 are all nonempty. (Honolulu ∈ 𝐻, so 𝐻 ≠ ∅. The proofs that 𝐴, 𝑃, 𝑀, 𝐶 and 𝐸 are nonempty are left to the reader.) Finally, 𝐻 ∪ 𝐴 ∪ 𝑃 ∪ 𝑀 ∪ 𝐶 ∪ 𝐸 does give the set of all state capitals since each of the 50 state capitals is in one of the named time zones.
24
1. Sets and Logic
British
NY A M Soviet GER
French
American
French
Figure 1.3.1. After World War II, Germany was partitioned into four zones.
The example above would not work if we replaced “state capitals” by “states”, for some states are not contained in a single time zone. Example 1.3.4. At a county fair watermelon eating contest, participants under 10 years of age are to report to Tent A, participants 10 to 14 years of age are to report to Tent B, participants over 14 years of age are to report to Tent C and female participants are to report to Tent D. The sets of participants instructed to report to Tents A, B, C, and D does not form a partition of the participants: Female participants are instructed to report to two different tents, so the set of female participants is either empty or not disjoint from the other sets. Even if Tent D above were omitted, the remaining three sets still may not form a partition, for one of the sets could be empty. Partitions may provide an easy way to count the elements of a set 𝑆. Suppose 𝐵1 , 𝐵2 , . . . , 𝐵𝑛 are the distinct blocks of a partition of a finite set 𝑆. Since each block 𝐵𝑖 is nonempty, we have |𝐵𝑖 | > 0 for 𝑖 = 1, 2, . . . , 𝑛. Since the blocks are mutually disjoint, we have |𝐵1 ∪ 𝐵2 ∪ ⋯ ∪ 𝐵𝑛 | = |𝐵1 | + |𝐵2 | + ⋯ + |𝐵𝑛 |. Furthermore, since 𝐵1 ∪ 𝐵2 ∪ ⋯ ∪ 𝐵𝑛 = 𝑆, we have |𝐵1 | + |𝐵2 | + ⋯ + |𝐵𝑛 | = |𝑆|. This should not come as a surprise, but it is worth noting the exact steps in the verification. In Theorem 1.2.6, we saw that for finite nonempty sets 𝐴 and 𝐵, |𝐴 × 𝐵| = |𝐴| ⋅ |𝐵|. We justified this result by counting the number of paths through the tree diagram for 𝐴 × 𝐵. We now present a more formal proof, which essentially partitions the paths through the tree diagram into those starting from the first branch, those starting from the second branch, and so on.
1.3. Partitions
25
Proof of Theorem 1.2.6: If 𝐴 and 𝐵 are nonempty finite sets, then |𝐴 × 𝐵| = |𝐴| ⋅ |𝐵|. Suppose 𝐴 has 𝑛 distinct elements 𝑎1 , 𝑎2 , . . . , 𝑎𝑛 . Partition 𝐴 × 𝐵 into blocks 𝐶1 = {(𝑎1 , 𝑏) ∣ 𝑏 ∈ 𝐵}, 𝐶2 = {(𝑎2 , 𝑏) ∣ 𝑏 ∈ 𝐵}, . . . , 𝐶𝑛 = {(𝑎𝑛 , 𝑏) ∣ 𝑏 ∈ 𝐵}. We will check that this is indeed a partition. Since 𝐵 ≠ ∅, there is an element 𝑏0 ∈ 𝐵 and thus, for any 𝑘 = 1, 2, . . . , 𝑛, the block 𝐶𝑘 is nonempty since (𝑎𝑘 , 𝑏0 ) ∈ 𝐶𝑘 . The blocks are mutually disjoint, for if some element (𝑎, 𝑏) were in two different blocks 𝐶𝑗 and 𝐶𝑘 (𝑗 ≠ 𝑘), then this would say that the first coordinate 𝑎 of (𝑎, 𝑏) should equal both 𝑎𝑗 and 𝑎𝑘 , which can not happen since 𝑎𝑗 ≠ 𝑎𝑘 . Finally, (𝑎, 𝑏) ∈ 𝐴 × 𝐵 implies 𝑎 ∈ 𝐴 = {𝑎1 , 𝑎2 , . . . , 𝑎𝑛 } and thus (𝑎, 𝑏) = (𝑎𝑘 , 𝑏) ∈ 𝐶𝑘 for some 𝑘 ∈ {1, 2, . . . , 𝑛}. This shows that every element 𝑛 of 𝐴 × 𝐵 is in some block, that is, ⋃𝑖=1 𝐶𝑘 = 𝐴 × 𝐵. Thus, {𝐶𝑖 }𝑛𝑖=1 is a partition of 𝐴 × 𝐵. It now follows that |𝐴 × 𝐵| = |𝐶1 | + |𝐶2 | + ⋯ + |𝐶𝑛 |. But each block 𝐶𝑘 = {(𝑎𝑘 , 𝑏)}𝑏∈𝐵 is a set of distinct elements indexed by the set 𝐵 and therefore has the same cardinality as 𝐵. Substituting |𝐵| for each |𝐶𝑘 | above gives |𝐴 × 𝐵| = |𝐵| +⎵|𝐵| +⋯ |𝐵| = 𝑛|𝐵|. ⏟⎵⎵ ⎵⎵⏟⎵ ⎵⎵+ ⎵⎵⏟ 𝑛 times
□
Recalling that 𝑛 = |𝐴|, we have |𝐴 × 𝐵| = |𝐴| ⋅ |𝐵|.
Exercises 1. (a) Under what circumstances does the collection {𝑅, 𝑆 ⧵ 𝑅} form a partition of 𝑅 ∪ 𝑆? (b) Under what circumstances does the collection {𝐵𝑖 ∣ 𝑖 ∈ 𝐼} form a partition of ⋃𝑖∈𝐼 𝐵𝑖 ? 2. If {𝐵1 , 𝐵2 , 𝐵3 } is a partition of 𝑆 and 𝐵4 = 𝐵1 , is {𝐵1 , 𝐵2 , 𝐵3 , 𝐵4 } a partition of 𝑆? (See Exercise 17 of Section 1.2.) 3. Let 𝑆 be the set of solutions to the equation (𝑥 −1)(𝑥 −2)(𝑥 −3)(𝑥 −10) = 0. Which of the collections below are partitions of 𝑆? Justify your answers. (a) 𝒜 = {𝑆 ∩ (−∞, 2], 𝑆 ∩ [2, ∞)} (b) ℬ = {𝑆 ∩ (−∞, 4], 𝑆 ∩ [6, ∞)} (c) 𝒞 = {𝑆 ∩ (−∞, 3], 𝑆 ∩ (3, 6), 𝑆 ∩ [6, ∞)} 4. Let 𝐶 be the set of circles in the plane. Which of the collections below are a partition of 𝐶? Justify your answers. (a) {𝐴𝑛 }4𝑛=1 , where 𝐴𝑛 is the set of circles contained in the 𝑛-th quadrant of a plane (𝑛 = 1, 2, 3, 4). (b) {𝐿, 𝑆} where 𝐿 is the set of circles in the plane enclosing an area of 4 square meters or more and 𝑆 is the set of circles in the plane enclosing an area of less than 4 square meters. (c) {𝐵𝑛 ∶ 𝑛 ∈ ℕ}, where 𝐵𝑛 is the set of circles in the plane which contain exactly 𝑛 points of ℤ × {0}. 5. Are the following collections necessarily partitions of the indicated sets? Justify your answers.
26
1. Sets and Logic
(a) Let 𝑆 be the set of students at a university, and let 𝒞 = {𝐵0 , 𝐵1 , 𝐵2 , 𝐵3 , 𝐵4 , 𝐵5 } where 𝐵0 = the set of students with no credit cards, 𝐵1 = the set of students with exactly one credit card, 𝐵2 = the set of students with exactly two credit cards, 𝐵3 = the set of students with exactly three credit cards, 𝐵4 = the set of students with exactly four credit cards, 𝐵5 = the set of students with five or more credit cards. (b) Let 𝐵 be the set of books in the Library of Congress, and let 𝒞 = {𝑆, 𝐿} where 𝑆 is the set of books in the Library of Congress with fewer than 200 pages and 𝐿 is the set of books in the Library of Congress with 200 or more pages. (c) Let 𝐴 be the set of dresses, and let 𝒞 = {𝑆, 𝐷, 𝑃} where 𝑆 = the set of dresses with stripes, 𝐷 = the set of dresses with dots, 𝑃 = the set of dresses with no stripes. (d) Let 𝑆𝑇 be the set of 50 U.S. states, and let 𝒞 = {𝐴, 𝐵, 𝐶, . . . , 𝑍} where 𝐴 = the set of states starting with the letter 𝐴, 𝐵 = the set of states starting with the letter 𝐵, and so on. (e) Let 𝑄 be the set of quadrilaterals and let 𝒫 = {𝑅, 𝑆, 𝑇, 𝑂} where 𝑅 = the set of rectangles, 𝑆 = the set of squares, 𝑇 = the set of trapezoids, 𝑂 = 𝑄 ⧵ (𝑅 ∪ 𝑆 ∪ 𝑇). 6. For 𝑚 ∈ ℕ, let 𝐶𝑚 = {𝑥 ∈ ℝ ∣ 𝑚 − 1 ≤ 𝑥2 < 𝑚}. Is 𝒞 = {𝐶𝑚 ∣ 𝑚 ∈ ℕ} a partition of ℝ? 7. Repeat Exercise 6 replacing both occurrences of ℝ by ℕ. 8. For 𝑚 ∈ ℕ, let 𝐷𝑚 = {𝑘 ∈ ℕ ∶ (𝑚 − 1)3 < 𝑘 ≤ 𝑚3 }. Is 𝒟 = {𝐷𝑚 ∶ 𝑚 ∈ ℕ} a partition of ℕ? Justify your answer. 9. Determine which of the following collections form a partition of ℝ2 . (a) For 𝑏 ∈ ℝ, let 𝑙𝑏 = {(𝑥, 𝑦) ∈ ℝ2 ∣ 𝑦 = 𝑏}, and let 𝒞 = {𝑙𝑏 ∣ 𝑏 ∈ ℝ}. (b) For 𝑚 ∈ ℝ, let 𝐿𝑚 = {(𝑥, 𝑦) ∈ ℝ2 ∣ 𝑦 = 𝑚𝑥}, and let 𝒟 = {𝐿𝑚 ∣ 𝑚 ∈ ℝ}. (c) For 𝑡 ≥ 0, let 𝑆 𝑡 = {(𝑥, 𝑦) ∈ ℝ2 ∣ max{|𝑥|, |𝑦|} = 𝑡}, and let ℰ = {𝑆 𝑡 ∣ 𝑡 ∈ [0, ∞)}. (d) For 𝑟 ≥ 0, let 𝐶𝑟 = {(𝑥, 𝑦) ∈ ℝ2 ∣ 𝑥2 + 𝑦2 = 𝑟2 }, and let ℱ = {𝐶𝑟 ∣ 𝑟 ∈ [0, ∞)}. (e) For 𝑎 ∈ ℝ, let 𝑃𝑎 = {(𝑥, 𝑦) ∈ ℝ2 ∣ 𝑦 = 𝑎𝑥2 }, and let 𝒢 = {𝑃𝑎 ∣ 𝑎 ∈ ℝ}. (f) Let 𝕀 = ℝ ⧵ ℚ, and let ℋ = {ℚ × ℚ, ℚ × 𝕀, 𝕀 × ℚ}. 10. Give partitions of ℝ having (a) 1 block, (b) 2 blocks, (c) 3 blocks, (d) infinitely many blocks. 11. Let 𝑈 be the set of 52 cards in a standard deck. Give partitions of 𝑈 having (a) 2 blocks, (b) 4 blocks, (c) 11 blocks, (d) 52 blocks. 12. Assume ℬ = {𝐵𝑖 ∣ 𝑖 ∈ 𝐼} is a partition of [0, ∞). For 𝑖 ∈ 𝐼, define 𝐶𝑖 = {𝑥 ∈ ℝ ∣ 𝑥2 ∈ 𝐵𝑖 }. Verify that 𝒞 = {𝐶𝑖 ∣ 𝑖 ∈ 𝐼} is a partition of ℝ.
1.4. Logic and Truth Tables
27
13. If 𝒫 = {𝐵𝑗 ∣ 𝑗 ∈ 𝐽} is a partition of set 𝑆 and each block 𝐵𝑗 of this partition is further partitioned into 𝒬𝑗 = {𝐶𝑖 ∣ 𝑖 ∈ 𝐼𝑗 }, then the collection 𝒬 = ⋃𝑗∈𝐽 𝒬𝑗 of the blocks of the blocks of the partition 𝒫 forms a partition of the set 𝑆, and we say partition 𝒬 of 𝑆 is finer than partition 𝒫, or 𝒬 is a refinement of 𝒫, or partition 𝒫 is coarser than partition 𝒬. Two partitions 𝒞 and 𝒟 of a set 𝑆 are given. Determine whether 𝒞 is finer than 𝒟, 𝒟 is finer than 𝒞, or neither. 1 1 1 3 3 1 (a) 𝑆 = [0, 1]; 𝒞 = {[0, 2 ), [ 2 , 1]}, 𝒟 = {[0, 2 ), [ 2 , 4 ), [ 4 , 1]} (b) 𝑆 = ℕ; 𝒞 = {{even natural numbers}, {odd natural numbers}}, 𝒟 = {{even natural numbers < 99}, {even natural numbers > 99}, {odd natural numbers}}. (c) 𝑆 = ℝ; 𝒞 = {ℚ, ℝ ⧵ ℚ}, 𝒟 = {(−∞, 0), [0, ∞)}. (d) 𝑆 = ℝ; 𝒞 = {ℚ, ℝ ⧵ ℚ}, 𝒟 = {{𝑥} ∣ 𝑥 ∈ ℝ}. 14. Refer to the definition in Exercise 13. For each partition below, give a finer partition and give a partition which is neither finer nor coarser. (a) The partition 𝒫 = {{vertebrates}, {invertebrates}} of the set of living animals. (b) The partition 𝒞 of all triangles in the plane into the set of acute triangles, the set of right triangles, and the set of obtuse triangles. (c) The partition 𝒟 = {(−∞, 0), [0, ∞)} of ℝ. 15. Refer to the definition in Exercise 13. (a) Given any nonempty set 𝑆, show that the partition 𝒟 = {{𝑥} ∣ 𝑥 ∈ 𝑆} of 𝑆 into singleton sets (sets with one element) is finer than any partition of 𝑆. (b) What is the coarsest partition of a set 𝑆? (c) If 𝒫 and 𝒬 are partitions of set 𝑆 each having a finite number of blocks and if 𝒫 is finer than 𝒬, how do |𝒫| and |𝒬| compare? (d) If 𝒫 and 𝒬 are partitions of set 𝑆 each having a finite number of blocks if |𝒫| ≤ |𝒬|, does it follow that one of 𝒫 or 𝒬 is a refinement of the other? Explain. 𝑏
16. In calculus, the definite integral ∫𝑎 𝑓(𝑥)𝑑𝑥 of a nonnegative function represents the area under the curve 𝑦 = 𝑓(𝑥) over the interval 𝑥 ∈ [𝑎, 𝑏]. It is approximated by partitioning the interval [𝑎, 𝑏] into small subintervals, assuming 𝑓(𝑥) is constant over each subinterval, and summing the areas of the resulting rectangles. Calculus texts typically define a partition of an interval [𝑎, 𝑏] to be a set {𝑥0 , 𝑥1 , . . . , 𝑥𝑛 } of real numbers with 𝑎 = 𝑥0 < 𝑥1 < ⋯ < 𝑥𝑛 = 𝑏. Explain how such a set gives a partition of [𝑎, 𝑏] in the sense defined in this section.
1.4. Logic and Truth Tables Statements are sentences which are either true or false. We may denote statements by capital letters. The statement 𝑃 = Snow is frozen water is true. The statement 𝑄 = 1.72 is an integer
28
1. Sets and Logic
is false. The negation of a statement 𝑃, denoted ∼ 𝑃 and read “not P”, is the statement “𝑃 fails”, “𝑃 does not occur”, “𝑃 is false”, or “it is not the case that 𝑃 happens”. With 𝑃 as above, the negation of 𝑃 is
∼ 𝑃 = It is not the case that snow is frozen water,
or in plain English,
∼ 𝑃 = Snow is not frozen water.
Since 𝑃 was true, ∼ 𝑃 is false. The negation of the statement 𝑄 above is
∼ 𝑄 = It is not the case that 1.72 is an integer
or
∼ 𝑄 = 1.72 is not an integer.
Since 𝑄 was false, ∼ 𝑄 is true. The truth value of any statement 𝑃 is either “true” or “false”, depending upon whether the statement 𝑃 was true or false. Two statements are equivalent if they always have the same truth values. (For example, “x+5 = 8” is equivalent to “2x = 6”, for both are true if 𝑥 = 3 and false if 𝑥 ≠ 3.) A statement and its negation always have opposite truth values. That is, if 𝑃 is true then ∼ 𝑃 is false, and if 𝑃 is false then ∼ 𝑃 is true. Just as a double negative is positive, the negation of the negation of a statement 𝑃 is again 𝑃. That is, for any statement 𝑃, we have ∼ (∼ 𝑃) = 𝑃. For example, if 𝑃 is the statement “The pool is dry”, then ∼ 𝑃 = “The pool is not dry” and ∼ (∼ 𝑃) = “It is false that the pool is not dry” = “The pool is dry” = 𝑃. We may form compound statements by using the word and or or. If 𝑃 and 𝑄 are two input statements, the statement “𝑃 and 𝑄” is denoted 𝑃 ∧ 𝑄 and called the conjunction of statements 𝑃 and 𝑄. The statement “𝑃 or 𝑄” is denoted 𝑃 ∨ 𝑄 and is called the disjunction of statements 𝑃 and 𝑄. Statements which do not involve ∧, ∨, or ∼ are called simple statements. The examples below will illustrate this. For the statements 𝑃, 𝑄, and 𝑅 below, we give several other statements built from these using negation, conjunction, and disjunction.
1.4. Logic and Truth Tables
𝑃 𝑄 𝑅
29
= Milk contains fat. = Milk contains calcium. = Milk is green.
∼𝑃 = Milk contains no fat. ∼𝑄 = Milk contains no calcium. ∼𝑅 = Milk is not green. 𝑃 and 𝑄 = 𝑃∧𝑄 = Milk contains fat and calcium. 𝑃 and 𝑅 = 𝑃∧𝑅 = Milk contains fat and is green. 𝑃 and ∼ 𝑅 = 𝑃∧ ∼ 𝑅 = Milk contains fat and is not green. 𝑃 or 𝑄 = 𝑃∨𝑄 = Milk contains fat or calcium. 𝑃 or 𝑅 = 𝑃∨𝑅 = Milk contains fat or milk is green. ∼ 𝑄 or 𝑅 = ∼ 𝑄 ∨ 𝑅 = Milk contains no calcium or milk is green. 𝑃 or ∼ 𝑃 = 𝑃 ∨ ∼ 𝑃 = Milk contains fat or contains no fat. 𝑃 and ∼ 𝑃 = 𝑃 ∧ ∼ 𝑃 = Milk contains fat and contains no fat. The last two statements above are of special interest. For any statement 𝑃, either 𝑃 or ∼ 𝑃 must be true, so the statement “𝑃 or ∼ 𝑃” = 𝑃 ∨ ∼ 𝑃 must always be true. A statement such as 𝑃 ∨ ∼ 𝑃 which is always true is called a tautology. Also, it is impossible for both 𝑃 and ∼ 𝑃 to be true, so 𝑃∧ ∼ 𝑃 will always be false for any statement 𝑃. A statement such as 𝑃∧ ∼ 𝑃 which is always false is called a contradiction. Continuing our example, let us consider statements combining ∼, ∨, and ∧. The negation of 𝑃 ∧ 𝑅 is ∼ (𝑃 ∧ 𝑅) = It is not the case that (milk contains fat and is green). For 𝑃 ∧ 𝑅 to be true, both 𝑃 and 𝑅 must be true. The negation ∼ (𝑃 ∧ 𝑅) says it is not the case that both 𝑃 and 𝑅 are true. Observe that “not both 𝑃 and 𝑅” means one of 𝑃 or 𝑅 must fail. Thus, the statement for ∼ (𝑃 ∧ 𝑅) above may be rephrased as Either milk contains no fat or milk is not green. The words “both” and “either” are used above for emphasis. In mathematics, “Both 𝑃 and 𝑅” is equivalent to “𝑃 and 𝑅”, and “Either 𝑆 or 𝑇” is equivalent to “𝑆 or 𝑇”. Thus, the rephrased statement of ∼ (𝑃 ∧ 𝑅) above is ∼ (𝑃 ∧ 𝑅) = Milk contains no fat or milk is not green. = (∼ 𝑃) ∨ (∼ 𝑅) = ∼ 𝑃 ∨ ∼ 𝑅. The last equality above is based on precedence of operation conventions. Just as multiplication precedes addition in 3 ⋅ 4 + 2 ⋅ 3, negations precede conjunctions and disjunctions in logical statements. After negations are performed, conjunctions and disjunctions are performed from left to right. For the statements 𝑃 and 𝑅 as above, we have shown that ∼ (𝑃 ∧ 𝑅) is equivalent to the statement ∼ 𝑃 ∨ ∼ 𝑅. This holds for any statements 𝑃 and 𝑅. The formula ∼ (𝑃 ∧ 𝑅) = ∼ 𝑃 ∨ ∼ 𝑅 simply says that “Not both 𝑃 and 𝑅” is equivalent to “Either 𝑃 fails or 𝑄 fails”. Now let us consider the negation of an “or” statement, such as ∼ (𝑃 ∨ 𝑄). Since 𝑃 ∨ 𝑄 means “Either 𝑃 or 𝑄 occurs”, ∼ (𝑃 ∨ 𝑄) means “Not (either 𝑃 or 𝑄)”, or in better
30
1. Sets and Logic
English, “Neither 𝑃 nor 𝑄 occurs”. But “Neither 𝑃 nor 𝑄” means “Not 𝑃 and not 𝑄”, so ∼ (𝑃 ∨ 𝑄) = ∼ 𝑃∧ ∼ 𝑄. This holds for any statements 𝑃 and 𝑄. For the statements 𝑃 and 𝑄 as given in the last example, we have ∼ (𝑃 ∨ 𝑄) = It is not the case that (milk contains fat or calcium). For “𝑃 or 𝑄” to fail, both 𝑃 and 𝑄 must fail: ∼ (𝑃 ∨ 𝑄) = ∼ 𝑃∧ ∼ 𝑄 = Milk contains no fat and no calcium. The previous two paragraphs tell us how to negate an “and” statement and how to negate an “or” statement. These results are called De Morgan’s Laws, named for the British mathematician Augustus De Morgan (1806–1871). Theorem 1.4.1 (De Morgan’s Laws). For any statements 𝑃 and 𝑄, we have ∼ (𝑃 ∧ 𝑄) = ∼ 𝑃 ∨ ∼ 𝑄, and ∼ (𝑃 ∨ 𝑄) = ∼ 𝑃∧ ∼ 𝑄. Keep in mind what DeMorgan’s Laws say in ordinary language: Not both 𝑃 and 𝑄 means one or the other (or both) is lacking, so NOT (𝑃 and 𝑄) means NOT 𝑃 or NOT 𝑄. Similarly, NOT (𝑃 or 𝑄) means neither 𝑃 nor 𝑄, which is equivalent to (NOT 𝑃 and NOT 𝑄). DeMorgan’s Laws are most frequently stated in set theoretic terms as we will now illustrate. Consider the complement (𝐴 ∩ 𝐵)𝑐 of the set 𝐴 ∩ 𝐵. The following statements are equivalent: 𝑥 ∈ (𝐴 ∩ 𝐵)𝑐 𝑥∉𝐴∩𝐵 Definition of complement ∼ (𝑥 ∈ 𝐴 ∩ 𝐵) Definition of ∉ ∼ (𝑥 ∈ 𝐴 and 𝑥 ∈ 𝐵) Definition of ∩ ∼ (𝑥 ∈ 𝐴) or ∼ (𝑥 ∈ 𝐵) De Morgan’s Law 𝑥 ∉ 𝐴 or 𝑥 ∉ 𝐵 Definition of ∉ 𝑥 ∈ 𝐴𝑐 or 𝑥 ∈ 𝐵 𝑐 Definition of complement 𝑥 ∈ 𝐴𝑐 ∪ 𝐵 𝑐 Definition of ∪. Thus, 𝑥 ∈ (𝐴 ∩ 𝐵)𝑐 if and only if 𝑥 ∈ 𝐴𝑐 ∪ 𝐵 𝑐 , so the sets (𝐴 ∩ 𝐵)𝑐 and 𝐴𝑐 ∪ 𝐵 𝑐 have exactly the same elements—that is, (𝐴 ∩ 𝐵)𝑐 = 𝐴𝑐 ∪ 𝐵 𝑐 . A similar argument shows that (𝐴 ∪ 𝐵)𝑐 = 𝐴𝑐 ∩ 𝐵 𝑐 . We will formally state these results. Theorem 1.4.2 (De Morgan’s Laws for Sets). For any sets 𝐴 and 𝐵, we have (𝐴 ∩ 𝐵)𝑐 = 𝐴𝑐 ∪ 𝐵 𝑐 and (𝐴 ∪ 𝐵)𝑐 = 𝐴𝑐 ∩ 𝐵 𝑐 . The second set theoretic result above is suggested by the Venn diagrams shown in Figure 1.4.1. Suppose a friend tells you she is going to McGregor’s Restaurant to order either a hamburger and fries or a cheeseburger and fries. This could be restated by saying she
1.4. Logic and Truth Tables
A
B
31
∩
A
B
=
A
B
Figure 1.4.1. De Morgan’s Law: 𝐴𝑐 ∩ 𝐵 𝑐 = (𝐴 ∪ 𝐵)𝑐 .
will definitely order fries and will order either a hamburger or cheeseburger. This bit of common sense may be stated formally as (Hamburger and Fries) OR (Cheeseburger and Fries) = (Hamburger or Cheeseburger) and Fries, or (𝐻 ∧ 𝐹) ∨ (𝐶 ∧ 𝐹) = (𝐻 ∨ 𝐶) ∧ 𝐹. Observing that 𝐴 ∧ 𝐵 = 𝐵 ∧ 𝐴 and 𝐴 ∨ 𝐵 = 𝐵 ∨ 𝐴 for any statements 𝐴 and 𝐵, we may rearrange the equation above to get 𝐹 ∧ (𝐻 ∨ 𝐶) = (𝐹 ∧ 𝐻) ∨ (𝐹 ∧ 𝐶). This result holds not only for these statements 𝐹, 𝐻, and 𝐶, but for any statements 𝐴, 𝐵, and 𝐶: 𝐴 ∧ (𝐵 ∨ 𝐶) = (𝐴 ∧ 𝐵) ∨ (𝐴 ∧ 𝐶). This equation is referred to by saying that the operation ∧ distributes over the operation ∨. (Recall that the fact that 𝑎 ⋅ (𝑏 + 𝑐) = 𝑎 ⋅ 𝑏 + 𝑎 ⋅ 𝑐 for any real numbers 𝑎, 𝑏 and 𝑐 is referred to by saying that multiplication distributes over addition.) The paragraphs that follow show that we will not need to remember which of the operations ∧ or ∨ distributes over the other—each distributes over the other. Let us consider another example. Suppose Cayden has applied for two jobs for which he is qualified. The first job requires a major in mathematics or computer science (CS) and the second job requires a major in mathematics or physics. Since Cayden is qualified for both, we know his qualifications include (math or CS) and (math or physics). His possible majors may be illustrated in a tree diagram, as shown in Figure 1.4.2. Observe that three of the four outcomes on the right side of the tree diagram include math. Thus, either Cayden has a math major or the only remaining outcome, which is (CS and Physics). Thus, (Math or CS) and (Math or Physics) implies Math or (CS and Physics). It is easy to see that the latter statement implies the former, as well. This suggests that for any statements 𝑀, 𝐶, and 𝑃, (𝑀 ∨ 𝐶) ∧ (𝑀 ∨ 𝑃) = 𝑀 ∨ (𝐶 ∧ 𝑃).
32
1. Sets and Logic
Q
Math Math Q Q Q Physics Q
Q QQ
CS
6 Job 1 Qualifications
Q Q
Math Q Physics
6 Job 2 Qualifications
Figure 1.4.2. Possible majors.
We summarize the previous results. These distributive laws are most easily proved using truth tables, which is our next topic. Theorem 1.4.3 (Distributive Laws). For statements 𝐴, 𝐵, and 𝐶, (𝐴 ∨ 𝐵) ∧ 𝐶 = (𝐴 ∧ 𝐶) ∨ (𝐵 ∧ 𝐶) and (𝐴 ∧ 𝐵) ∨ 𝐶 = (𝐴 ∨ 𝐶) ∧ (𝐵 ∨ 𝐶). If 𝐴, 𝐵, and 𝐶 are sets, let 𝐴′ , 𝐵 ′ , and 𝐶 ′ be the statements 𝑥 ∈ 𝐴, 𝑥 ∈ 𝐵, and 𝑥 ∈ 𝐶, respectively. Applying the distributive laws stated above to the statements 𝐴′ , 𝐵′ , and 𝐶 ′ gives the distributive laws in the set theoretic form below. Theorem 1.4.4 (Distributive Laws for Sets). For sets 𝐴, 𝐵, and 𝐶, (𝐴 ∪ 𝐵) ∩ 𝐶 = (𝐴 ∩ 𝐶) ∪ (𝐵 ∩ 𝐶) and (𝐴 ∩ 𝐵) ∪ 𝐶 = (𝐴 ∪ 𝐶) ∩ (𝐵 ∪ 𝐶).
Truth Tables A convenient way to document common sense arguments as given above is to include the information in a truth table. Truth tables should not be used as a substitute for common sense, but may clarify some complicated logical situations. Truth tables list the truth values of statements. For compound statements built from simple statements using ∼, ∧, or ∨, we list one row for each possible configuration of truth values of all the simple statements. Let us first consider the truth table for ∼ 𝑃. Given an arbitrary statement 𝑃, it may be either true or false. We will list these two possible outcomes in the left column. The negation ∼ 𝑃 will have the opposite truth value from 𝑃. This is indicated in the truth table below.
1.4. Logic and Truth Tables
33
Truth table for ∼ 𝑃 𝑃 ∼𝑃 T F F T Given two statements 𝑃 and 𝑄, there are four possibilities for the sequence of truth values for 𝑃 and 𝑄. These four possibilities are listed in the left two columns of the truth tables below. Of the four possible truth value combinations, 𝑃 ∧ 𝑄 is true only when both 𝑃 and 𝑄 are true. This information appears in the third column of the truth table for 𝑃 ∧ 𝑄. Similarly, 𝑃 ∨ 𝑄 is true if either 𝑃 or 𝑄 (or both) is true. This information appears in the third column of the truth table for 𝑃 ∨ 𝑄 below. Truth table for 𝑃 ∧ 𝑄 𝑃 𝑄 T T T F F T F F
Truth table for 𝑃 ∨ 𝑄 𝑃 𝑄 T T T F F T F F
𝑃∧𝑄 T F F F
𝑃∨𝑄 T T T F
To construct a truth table for ∼ 𝑃 ∨ ∼ 𝑄, observe that ∼ 𝑃 ∨ ∼ 𝑄 is derived from the simple statements 𝑃 and 𝑄 by using “∼” and “∨”. We must start the truth table with all possible truth value outcomes for the pair of simple statements 𝑃 and 𝑄 in the left two columns. Before applying the disjunction ∨ to the statements ∼ 𝑃 and ∼ 𝑄, we need columns for ∼ 𝑃 and ∼ 𝑄. These are the third and fourth columns of the truth table below. The entries of the ∼ 𝑃 column are obtained by toggling the truth values of 𝑃, and the entries of the column for ∼ 𝑄 are obtained by toggling the truth values of 𝑄. Finally, the ∼ 𝑃 ∨ ∼ 𝑄 column is obtained by applying “∨” to the ∼ 𝑃 and ∼ 𝑄 columns.
Truth table for ∼ 𝑃 ∨ ∼ 𝑄 𝑃 𝑄 T T T F F T F F
∼𝑃 F F T T
∼𝑄 F T F T
∼ 𝑃∨ ∼ 𝑄 F T T T
We may extend the truth table above to contain truth values for other statements. If we wish to include a column for ∼ (𝑃 ∧ 𝑄), we must first include a column for 𝑃 ∧ 𝑄, then negate that column, as shown below.
34
1. Sets and Logic
Truth table for ∼ 𝑃 ∨ ∼ 𝑄 extended to include ∼ (𝑃 ∧ 𝑄) 𝑃 𝑄 T T T F F T F F
∼𝑃 F F T T
∼𝑄 F T F T
∼ 𝑃∨ ∼ 𝑄 F T T T
𝑃∧𝑄 T F F F
∼ (𝑃 ∧ 𝑄) F T T T
Observe that the column for ∼ 𝑃 ∨ ∼ 𝑄 and that for ∼ (𝑃 ∧ 𝑄) are identical. Regardless of the truth values of the input propositions 𝑃 and 𝑄, the truth values of ∼ 𝑃 ∨ ∼ 𝑄 and ∼ (𝑃 ∧ 𝑄) will always be the same. One may use this as a basis for the definition of logically equivalent statements. Two statements are logically equivalent if they produce identical truth values for all possible combinations of truth values for the input statements. Thus, the truth table above provides a proof of De Morgan’s Law ∼ (𝑃 ∧ 𝑄) = ∼ 𝑃 ∨ ∼ 𝑄. Example 1.4.5. Construct the truth table for 𝑃∧ ∼ 𝑃 and for 𝑃 ∨ ∼ 𝑃. Solution. This problem only involves one input statement 𝑃, which may be either true or false. Thus, we will need only two rows to list all the possible truth value outcomes of the input statement. We toggle the 𝑃 column to find the truth values of ∼ 𝑃 as recorded in the second column of the table below. The third and fourth columns of the table below are obtained by applying “∧” and “∨” to the 𝑃 and ∼ 𝑃 columns. Truth table for 𝑃∧ ∼ 𝑃 and 𝑃 ∨ ∼ 𝑃 𝑃 ∼𝑃 T F F T
𝑃∧ ∼ 𝑃 F F
𝑃∨ ∼ 𝑃 T T □
Recall that a statement that is false in any situation (that is, whose truth table column contains only F’s) is a contradiction, and a statement that is true in any situation (that is, whose truth table column contains only T’s) is a tautology. The truth table above illustrates the facts that 𝑃∧ ∼ 𝑃 is a contradiction and 𝑃 ∨ 𝑃 is a tautology. Example 1.4.6. Given statements 𝑃, 𝑄 and 𝑅, find the truth table for (𝑃∧ ∼ 𝑄) ∨ 𝑅. Solution. The set of ordered triples of truth values for the three simple statements 𝑃, 𝑄 and 𝑅 is the Cartesian product {𝑇𝑃 , 𝐹𝑃 } × {𝑇𝑄 , 𝐹𝑄 } × {𝑇𝑅 , 𝐹𝑅 }, and thus has 2 ⋅ 2 ⋅ 2 = 8 elements (see Theorem 1.2.9). This implies that we will need 8 rows to include all the possible “input truth values”. The left three columns of the table below show all these possibilities. (These rows may be listed in any order, but if you wish to compare two truth tables, it is convenient to have the “input truth values” listed in the same order in both tables.) Before constructing the column for (𝑃∧ ∼ 𝑄) ∨ 𝑅, we first need a column for 𝑃∧ ∼ 𝑄, and before this column can be constructed, we need a column for ∼ 𝑄. The columns are shown below.
1.4. Logic and Truth Tables
35
Truth table for (𝑃∧ ∼ 𝑄) ∨ 𝑅 𝑃 𝑄 T T T T T F T F F T F T F F F F
𝑅 T F T F T F T F
∼𝑄 F F T T F F T T
𝑃∧ ∼ 𝑄 F F T T F F F F
(𝑃∧ ∼ 𝑄) ∨ 𝑅 T F T T T F T F □
Exercises 1. Consider the statements 𝑆, 𝐺, and 𝐻 below. 𝑆 = Susan studies. 𝐺 = Susan gets good grades. 𝐻 = Susan gets help when needed. Write each of the following sentences symbolically. (a) Susan studies but does not get good grades. (b) Susan gets help when needed or she does not study. (c) It is not true that Susan studies and gets good grades. (d) Either Susan studies and gets good grades or Susan does not get help when needed. (e) Susan studies or does not study, and she gets good grades. (f) Susan studies, gets help when needed, and gets good grades. (g) Susan studies and gets help when needed or else she does not get good grades. 2. Consider the statements 𝑃, 𝑄, and 𝑅 below. 𝑃 = Presidential candidates must be 35 years of age or older. 𝑄 = Presidential candidates must be citizens of the U.S. 𝑅 = Presidential candidates must have $2 billion. Write the statements indicated below in words. (a) ∼ 𝑃 (b) 𝑃 ∧ 𝑄 (c) 𝑄 ∨ 𝑅 (d) ∼ (𝑄 ∨ 𝑅) (e) (𝑃 ∧ 𝑄) ∨ 𝑅 (f) ∼ (𝑃 ∧ 𝑄 ∧ 𝑅) (g) 𝑃∧ ∼ 𝑅 3. Consider the statements 𝑅, 𝑊, and 𝑀 below. 𝑅 = It rains. 𝑊 = Marco goes for a walk. 𝑀 = Marco goes to a movie.
36
1. Sets and Logic
Write each of the following statements symbolically. Negate each statement symbolically using De Morgan’s Laws and rewrite the negation in words. (a) It rains or Marco goes for a walk. (b) It does not rain and Marco goes for a walk. (c) It does not rain or Marco goes to a movie. (d) Marco does not got to a movie and it does not rain. 4. Use Theorem 1.4.1 to show that (𝐴 ∪ 𝐵)𝑐 = 𝐴𝑐 ∩ 𝐵 𝑐 for any sets 𝐴 and 𝐵. 5. Illustrate De Morgan’s Law (𝐴 ∩ 𝐵)𝑐 = 𝐴𝑐 ∪ 𝐵 𝑐 using Venn diagrams. 6. Use a truth table to verify the distributive property 𝐴 ∧ (𝐵 ∨ 𝐶) = (𝐴 ∧ 𝐵) ∨ (𝐴 ∧ 𝐶). 7. (a) Verify the equation ∼ (𝑃 ∧ 𝑄) ∧ ∼ 𝑄 = ∼ 𝑄 using a truth table. (b) Give a verbal justification for the equation in part (a). 8. (a) Verify the equation (𝑃 ∧ 𝑄)∨ ∼ 𝑃 = ∼ 𝑃 ∨ 𝑄 using a truth table. (b) Give a verbal justification for the equation in part (a). 9. Use a truth table to verify that (𝑃∧ ∼ 𝑄) ∨ (∼ 𝑃 ∧ 𝑄) ∨ (∼ 𝑃 ∨ 𝑄) is a tautology. 10. Shown below is a truth table with the column headings missing. Fill in column headings having the indicated truth values.
𝑃 𝑄 T T T F F T F F
? ? ? T F F T T T T F F F T F
? F F F T
? ? ? ? ? T T T F F T F T F T T T F T T T T T F T
11. Verify that (𝑃 ∧ 𝑄) ∨ (∼ 𝑃∧ ∼ 𝑄) = (𝑃∨ ∼ 𝑄) ∧ (𝑄∨ ∼ 𝑃). 12. Construct a truth table with columns for (𝑃∨𝑄)∧𝑅 and 𝑃∨(𝑄∧𝑅). Is the placement of the parentheses in 𝑃 ∨ 𝑄 ∧ 𝑅 important? 13. Verify that ∼ [(𝑃∨ ∼ 𝑄) ∧ 𝑅] = (∼ 𝑃 ∧ 𝑄) ∨ ∼ 𝑅.
1.5. Quantifiers
37
14. Shown below is a truth table with the column headings missing. Fill in column headings having the indicated truth values, using only 𝑃, 𝑄, 𝑅, ∧, and ∼. 𝑃 T T T T F F F F
𝑄 T T F F T T F F
𝑅 T F T F T F T F
? ? ? ? ? T F F T T F F F T T F F F T T F F T F T F F F T T F F F T T F F F T F F T F T T
1.5. Quantifiers If a statement involves a variable, the truth value of the statement may depend upon the value of the variable. For example, the statement “𝑥2 = 4” is true for the values 𝑥 = ±2 and false for all other values of 𝑥. Any such statement whose truth value depends upon the value of the variable in question is called a conditional statement. The statement “(𝑎 + 𝑏)2 = 𝑎2 + 2𝑎𝑏 + 𝑏2 ” is not a conditional statement—it is always true for any values of 𝑎 and 𝑏. Such a statement involving variables which is always true regardless of the choice of values for the variables is called an identity. With statements involving variables, we may want to quantify when the statement is valid. For the conditional statement “𝑥2 = 4”, we might state “There exist values of 𝑥 for which 𝑥2 = 4”. The fact that the statement “(𝑎 + 𝑏)2 = 𝑎2 + 2𝑎𝑏 + 𝑏2 ” is an identity might be stated as “For all values of 𝑎 and 𝑏, we have (𝑎 + 𝑏)2 = 𝑎2 + 2𝑎𝑏 + 𝑏2 ”. The phrases “there exist” and “for all” appear so frequently that we have special symbols for them: ∃ means there exists ∀ means for all, for every, or for each. The symbol ∃ is called the existential quantifier, and the symbol ∀ is called the universal quantifier. Let us see how they are used. Suppose {𝑆 𝑖 }𝑖∈𝐼 is a collection of sets. Recall that ⋂
𝑆 𝑖 = {𝑥 ∣ 𝑥 is an element of each of the sets 𝑆 𝑖 }
𝑖∈𝐼
and ⋃
𝑆 𝑖 = {𝑥 ∣ 𝑥 is an element of at least one of the sets 𝑆 𝑖 }.
𝑖∈𝐼
We may write these expressions using quantifiers. Observe that ⋂
𝑆𝑖
=
{𝑥 ∣ 𝑥 ∈ 𝑆 𝑖 for every 𝑖 ∈ 𝐼}
=
{𝑥 ∣ ∀𝑖 ∈ 𝐼 𝑥 ∈ 𝑆 𝑖 }
𝑖∈𝐼
38
1. Sets and Logic
and ⋃
𝑆𝑖
= {𝑥 ∣ there exists an index 𝑖 ∈ 𝐼 such that 𝑥 ∈ 𝑆 𝑖 }
𝑖∈𝐼
= {𝑥 ∣ ∃𝑖 ∈ 𝐼 such that 𝑥 ∈ 𝑆 𝑖 }. We may restate the fact that the equation 𝑥2 = −12 has no real solutions as “for any real number 𝑥, 𝑥2 ≠ −12”, or “∀𝑥 ∈ ℝ, 𝑥2 ≠ −12”. The statement ∀𝑛 ∈ ℕ ∃𝑚 ∈ ℕ such that 𝑚 > 𝑛 says that for every natural number 𝑛 there exists a natural number 𝑚 which is greater than 𝑛. This statement is true and is called the Archimedian property. Observe that a different choice of 𝑛 might require a different choice of 𝑚, but no matter what natural number 𝑛 we chose, there does exist a larger natural number 𝑚 (take 𝑚 = 𝑛 + 1, for example). For expressions involving more than one quantifier, we must be very careful to place the quantifiers in the correct order. The statement above is not the same as the statement ∃𝑚 ∈ ℕ such that ∀𝑛 ∈ ℕ, 𝑚 > 𝑛. This latter statement says there exists a natural number 𝑚 which is greater than every natural number. This is clearly false. Any candidate 𝑚 for the largest integer fails to meet the criterion of the statement above, for 𝑚 ≯ 𝑚. Thus, the order in which the quantifiers are placed is critical. If the first quantifier in a statement is ∃, we will call the statement a “∃–statement” (read “ ‘there exists’ statement”). Analogously, any statement whose first quantifier is ∀ will be called a “∀–statement” (read “ ‘for all’ statement”). To prove a ∃–statement, we need only exhibit one element that was claimed to exist. To prove the statement ∃𝑧 ∈ ℝ such that ∀𝑎 ∈ ℝ, 𝑧 + 𝑎 = 𝑎, we must only find a real number 𝑧 with the property that adding it to any other number 𝑎 gives a sum identically equal to 𝑎. Clearly 𝑧 = 0 is the number we need, for 0 + 𝑎 = 𝑎 for every real number 𝑎. Having found one element meeting the requirements called for, we have proved the statement above. (Because zero satisfies this property, zero is called the additive identity element.) Proving a ∀–statement requires verification for every possibility, and this is usually more difficult than proving a ∃–statement. For example, consider the statements Every passenger on the plane has a $10 bill. There is a passenger on the plane who has a $10 bill. If we let 𝑃 be the set of passengers on the plane, we may rephrase these statements as (1.1)
∀𝑝 ∈ 𝑃,
𝑝 has a $10 bill.
(1.2)
∃𝑝 ∈ 𝑃
such that 𝑝 has a $10 bill.
1.5. Quantifiers
39
Verifying the ∃–statement above can be accomplished by finding a single passenger with a $10 bill. You could approach the proof of the ∃–statement (1.2) by asking loudly on the plane “Does anyone have a $10 bill?” The verification of the ∀–statement (1.1), however, would require something much more difficult and intrusive than merely having one passenger exhibit a $10 bill. The verification of (1.1) would require having every passenger exhibit a $10 bill. Disproving a ∀–statement is much easier than proving a ∀–statement. All that it would take to show that the statement (1.1) is false would be a single passenger who did not have a $10 bill. That is, to disprove a ∀–statement, we only need to find a single counterexample, i.e., a single case where the claimed property fails. Disproving a statement means proving that the statement is false, or equivalently, proving the negation of the statement. To disprove the statement (1.1) above, we wish to prove It is not the case that (∀𝑝 ∈ 𝑃, 𝑝 has a $10 bill.), or ∼(∀𝑝 ∈ 𝑃, 𝑝 has a $10 bill). By our discussion above, these statements are equivalent to There exists a passenger who does NOT have a $10 bill, or ∃𝑝 ∈ 𝑃 such that ∼(𝑝 has a $10 bill). Summarizing, we have shown that ∼(∀𝑝 ∈ 𝑃, 𝑝 has a $10 bill) = ∃𝑝 ∈ 𝑃 such that ∼(𝑝 has a $10 bill.) Observe that the negation of this ∀–statement was a ∃–statement involving negation. Now let us consider what is required to disprove a ∃–statement, using the statement (1.2) as our example. To disprove statement (1.2) we must show that there does not exist a passenger on the plane with a $10 bill. In plain English, we would say we must show that NO passenger has a $10 bill. Equivalently, for every passenger 𝑝 on the plane, we must verify that passenger 𝑝 does not have a $10 bill. This may be written as ∀𝑝 ∈ 𝑃, ∼(𝑝 has a $10 bill). This statement is equivalent to disproving statement (1.2), that is, equivalent to the negation of statement (1.2). Thus we have ∼(∃𝑝 ∈ 𝑃 such that 𝑝 has a $10 bill) = ∀𝑝 ∈ 𝑃, ∼(𝑝 has a $10 bill). Observe that the negation of this ∃–statement was a ∀–statement involving negation. In general, suppose 𝑄 is any property (such as “has a $10 bill”). The statements “There exists an 𝑥 such that 𝑄 holds” and “For any 𝑥, 𝑄 holds” may be written as “∃𝑥 such that 𝑄” and “∀𝑥, 𝑄” respectively. The negations of these statements are given below. Negation of Quantified Statements: ∼ (∃𝑥 such that 𝑄)
=
∀𝑥, ∼ 𝑄
∼ (∀𝑥, 𝑄)
=
∃𝑥 such that ∼ 𝑄
40
1. Sets and Logic
Observe that the negation of any ∃–statement is a ∀–statement involving negation, and the negation of any ∀–statement is a ∃–statement involving negation. We have noted this for the particular statements given above. In words, the equations above simply say: To disprove that there exists 𝑥 such that 𝑄 holds, we must show that 𝑄 fails for all 𝑥. To disprove that 𝑄 holds for all 𝑥, we must only exhibit a single counterexample; that is, we need only find one 𝑥 for which 𝑄 fails. Example 1.5.1. Determine whether each statement below is true or false. Give the negation of each statement. (a) ∀𝑥 ∈ ℝ, 𝑥2 > 0 (b) ∀𝐴 ∈ 𝒫(ℚ), ∅ ⊆ 𝐴 (c) ∃𝑚 ∈ ℕ such that ∀𝑛 ∈ ℕ, 𝑚 ⋅ 𝑛 = 𝑛 Solution. (a) To disprove the statement that for any real number 𝑥, its square is positive, we would need to exhibit a real number 𝑥 whose square is not positive. There does exist a real number 𝑥 whose square is ≤ 0, namely 𝑥 = 0. Thus, the statement is false. ∼ (∀𝑥 ∈ ℝ, 𝑥2 > 0)
=
∃𝑥 ∈ ℝ such that ∼ (𝑥2 > 0)
=
∃𝑥 ∈ ℝ such that 𝑥2 ≤ 0.
(b) Recall that 𝒫(ℚ) is the collection of all subsets of the set ℚ, so saying 𝐴 ∈ 𝒫(ℚ) is equivalent to saying 𝐴 ⊆ ℚ. Now the statement (b) simply says ∀𝐴 ⊆ ℚ, ∅ ⊆ 𝐴, which is clearly true. The negation of (b) is ∼ (∀𝐴 ∈ 𝒫(ℚ), ∅ ⊆ 𝐴)
=
∃𝐴 ∈ 𝒫(ℚ) such that ∅ ⊈ 𝐴.
(c) Statement (c) says that there is some natural number 𝑚 with the property that its product with any natural number 𝑛 is identically 𝑛. To prove this ∃–statement, we need only exhibit such an element 𝑚. There does exist such an element 𝑚, called the multiplicative identity, and 𝑚 = 1. Thus, statement (c) is true. The negation of the ∃–statement (c) is the ∀–statement ∀𝑚 ∈ ℕ, ∼ (∀𝑛 ∈ ℕ, 𝑚 ⋅ 𝑛 = 𝑛). This last statement, however, may be taken further, for it contains (as a sub-problem) the negation of a ∀–statement. Performing this second negation, we have ∼ (∃𝑚 ∈ ℕ such that ∀𝑛 ∈ ℕ, 𝑚 ⋅ 𝑛 = 𝑛) = ∀𝑚 ∈ ℕ, ∼ (∀𝑛 ∈ ℕ, 𝑚 ⋅ 𝑛 = 𝑛) = ∀𝑚 ∈ ℕ, ∃𝑛 ∈ ℕ such that ∼ (𝑚 ⋅ 𝑛 = 𝑛) = ∀𝑚 ∈ ℕ, ∃𝑛 ∈ ℕ such that 𝑚 ⋅ 𝑛 ≠ 𝑛. □ We have stated De Morgan’s laws for two sets (Theorem 1.4.2). We are now ready to prove the results for arbitrary collections of sets. Theorem 1.5.2 (De Morgan’s Laws). If {𝑆 𝑖 }𝑖∈𝐼 is a collection of sets, then ( 𝑆 𝑖 )𝑐 = (𝑆𝑐 ) ⋃ ⋂ 𝑖 𝑖∈𝐼
𝑖∈𝐼
1.5. Quantifiers
41
and (
⋂
𝑆 𝑖 )𝑐 =
𝑖∈𝐼
(𝑆 𝑐 ). ⋃ 𝑖 𝑖∈𝐼
That is, the complement of a union of sets is the intersection of the complements, and the complement of an intersection of sets is the union of the complements. Proof. We will only prove the first statement. The following statements are equivalent. 𝑥 ∈ (⋃𝑖∈𝐼 𝑆 𝑖 )𝑐 𝑥 ∉ ⋃𝑖∈𝐼 𝑆 𝑖 Definition of complement ∼ (𝑥 ∈ ⋃𝑖∈𝐼 𝑆 𝑖 ) Definition of ∉ ∼ (∃𝑖 ∈ 𝐼 such that 𝑥 ∈ 𝑆 𝑖 ) Definition of ∪ ∀𝑖 ∈ 𝐼, ∼ (𝑥 ∈ 𝑆 𝑖 ) Negation ∀𝑖 ∈ 𝐼, 𝑥 ∉ 𝑆 𝑖 Definition of ∉ ∀𝑖 ∈ 𝐼, 𝑥 ∈ 𝑆 𝑐𝑖 Definition of complement 𝑥 ∈ ⋂𝑖∈𝐼 (𝑆 𝑐𝑖 ) Definition of ∩ Thus, the elements of (⋃𝑖∈𝐼 𝑆 𝑖 )𝑐 are exactly the elements of ⋂𝑖∈𝐼 (𝑆𝑐𝑖 ), so (
⋃
𝑆 𝑖 )𝑐 =
𝑖∈𝐼
(𝑆 𝑐 ). ⋂ 𝑖 𝑖∈𝐼
□
Exercises 1. Express the following statements in colloquial terms. (a) Let 𝐶 be the set of clouds, and for 𝑐 ∈ 𝐶, let 𝐿(𝑐) be the set of linings for 𝑐. Then ∀𝑐 ∈ 𝐶, ∃𝑙 ∈ 𝐿(𝑐) such that 𝑙 is silver. (b) Let ℱ be the collection of families and 𝐵 the set of black sheep. Then ∀𝐹 ∈ ℱ ∃𝑏 ∈ 𝐹 ∩ 𝐵. (c) Let 𝐺 be the set of good deeds and 𝑈 the set of unpunished deeds. Then ∀𝑑 ∈ 𝐺, 𝑑 ∉ 𝑈. a 2. Write each sentence below as a statement using ∀ or ∃. 1 (a) For every positive real number 𝜖, there is a natural number 𝑛 with 𝑛 < 𝜖. (b) Every even number greater than 2 is the product of an even number and a prime number. (c) For every positive real number 𝜖 there is a positive real number 𝛿 such that 𝑥2 < 𝜖 whenever |𝑥| < 𝛿. (d) There exists an integer 𝑚 with the property that for every integer 𝑥 there exists an integer 𝑦 with 𝑥𝑦 = 𝑚. (e) There is always some prime number strictly between any given natural number 𝑛 > 1 and its square. 3. Write the negation of each statement. (a) It is late and I am tired. (b) ∀𝑟 ∈ ℕ, √𝑟 ∈ ℕ or √𝑟 ∉ ℚ
42
1. Sets and Logic
(c) ∃𝑛 ∈ ℕ such that 3𝑛 = 𝑛2 (d) ∀𝑛 ∈ ℕ ∃𝑚 ∈ ℕ such that 𝑚𝑛 > 100 4. Determine whether each statement below is true or false. Give the negation of each statement. (a) ∀𝑥 ∈ ℝ ∃𝑦 ∈ ℝ such that 𝑦 < 𝑥 (b) ∀𝑥 ∈ ℕ ∃𝑦 ∈ ℕ such that 𝑦 < 𝑥 (c) ∃𝑥 ∈ ℝ such that ∀𝑦 ∈ ℝ, 𝑦 < 𝑥 (d) ∃𝑎 ∈ ℝ such that ∀𝑥 ∈ ℝ, sin 𝑎 ≥ sin 𝑥 5. Determine whether each statement below is true or false. Give the negation of each statement. (a) ∀𝑥 ∈ ℝ ∃𝑎 ∈ ℝ with |𝑥| < 𝑎 (b) ∃𝑎 ∈ ℝ such that ∀𝑥 ∈ ℕ, 𝑎 < 𝑥 (c) ∀𝑥 ∈ ℝ ∃𝑦 ∈ ℝ such that 𝑥𝑦 = 1 (d) ∃𝑏 ∈ ℝ such that ∀𝑎 ∈ ℕ, |𝑎 − 𝑏| ≤ 100 (e) ∀𝑎 ∈ ℝ, √𝑎2 = 𝑎. (f) ∀𝑎 ∈ [0, ∞), ∃𝑥 ∈ ℝ such that 𝑥2 = 𝑎 and −𝑥2 = 𝑎 6. Determine whether each statement below is true or false. Give the negation of each statement. 𝑦 (a) ∃𝑥 ∈ ℤ such that ∀𝑦 ∈ ℤ, 𝑥 ∈ ℤ 𝑏
(b) ∀𝑎 ∈ ℤ, ∃𝑏 ∈ ℤ such that 𝑎 ∈ ℤ 𝑣 (c) ∀𝑢 ∈ ℕ, ∃𝑣 ∈ ℕ ⧵ {𝑢} such that ᵆ ∈ ℕ ᵆ
(d) ∀𝑢 ∈ ℕ, ∃𝑣 ∈ ℕ ⧵ {𝑢} such that 𝑣 ∈ ℕ (e) ∀𝑎 ∈ ℕ, ∃𝑏, 𝑐 ∈ ℕ such that 𝑎𝑏 = 𝑐3 7. Determine whether each statement below is true or false. Give the negation of each statement. (a) ∀𝑥 < 0 ∃𝑦 < 0 such that 𝑥2 = −𝑦 (b) ∃𝑎 ∈ ℝ such that ∀𝑏 ∈ ℝ (𝑎 + 𝑏)2 = 𝑎2 + 𝑏2 (c) ∃𝑎 ∈ ℝ such that ∀𝑥 ∈ ℝ (𝑎 − 1)𝑥 = 𝑥 1 1 (d) ∀𝜖 > 0 ∃𝑁 ∈ ℕ such that ∀𝑚, 𝑛 ≥ 𝑁, || 𝑚 − 𝑛 || < 𝜖 8. Determine whether each statement below is true or false. Give the negation of each statement. (a) 𝒫({1, 2, 3, . . . , 𝑛}) ⊂ 𝒫(ℕ) ∀𝑛 ∈ ℕ (b) ∃𝑆 ⊆ ℝ such that ∀𝑘 ∈ ℕ, |(𝑘 − 1, 𝑘) ∩ 𝑆| = 1 (c) ∀𝑘 ∈ ℕ, ∃𝑆 ∈ 𝒫({1, 2, . . . , 𝑘}) such that 𝑆 ≠ ∅ and ∀𝑥, 𝑦 ∈ 𝑆, 𝑥 − 𝑦 is even (d) ∀𝑘 ∈ ℕ, ∃𝑆 ∈ 𝒫({1, 2, . . . , 𝑘}) such that 𝑆 ≠ ∅ and ∀𝑥, 𝑦 ∈ 𝑆, 𝑥 − 𝑦 is odd (e) ∀ set 𝑆, ∅ ⊂ 𝒫(𝑆) 9. Determine whether each statement below is true or false. Give the negation of each statement. (a) ∀𝑛 ∈ ℤ, [(𝑛 − 1)2 < 𝑛2 or 𝑛 ≤ 0] (b) ∃𝑥 ∈ ℝ such that [𝑥 < 5 and 𝑥2 > 5] (c) ∀𝑛 ∈ ℕ, [𝑛 = 1 or ∃𝑚 ∈ ℤ with 𝑚 ∈ (𝑛, 𝑛2 )] (d) ∃𝑥 ∈ ℝ such that ∀𝑚 ∈ ℕ, [𝑚 < 𝑥 or 𝑚 > 𝑥2 ] (e) ∀𝑟 > 0 ∃𝑛 ∈ ℤ such that [𝑛𝑟 < 3 and (𝑛 + 1)𝑟 ≥ 3]
1.6. Implications
43
10. Show that (⋂𝑖∈𝐼 𝑆 𝑖 )𝑐 = ⋃𝑖∈𝐼 (𝑆 𝑐𝑖 ) and justify each step. 11. A set 𝑆 of real numbers has the Archimedian property if and only if ∀𝑎, 𝑏 ∈ 𝑆, ∃𝑛 ∈ ℕ such that 𝑛𝑎 > 𝑏. (a) Write the negation of the defining statement for the Archimedian property of a set 𝑆. (b) Which of the following sets of numbers have the Archimedian property? (i) ℝ (ii) ℕ (iii) ℤ (iv) ℝ+ = {𝑥 ∈ ℝ ∣ 𝑥 > 0}
1.6. Implications “Then you should say what you mean,” the March Hare went on. “I do,” Alice hastily replied; “At least—at least I mean what I say—that’s the same thing, you know.” “Not the same thing a bit!” said the Hatter. “Why you might just as well say that ‘I see what I eat’ is the same thing as ‘I eat what I see’! ” —Lewis Carroll (1832–1898) A statement of the form “If 𝑃 then 𝑄” is called an implication. The implication “If 𝑃 then 𝑄” may be rephrased as “𝑃 implies 𝑄”, denoted 𝑃 ⇒ 𝑄, or as “𝑄 is implied by 𝑃”, denoted 𝑄 ⇐ 𝑃. In an implication 𝑃 ⇒ 𝑄, the statement 𝑃 is called the antecedent and the statement 𝑄 is called the consequence. Below are some implications. 2⏟ If ⏟ 𝑥⎵ =⎵⏟ 9 then antecedent
If
𝑥⏟ =5 antecedent
𝑥⎵ = −3 ⏟ ⏟⎵ ⏟ . consequence
then 𝑥 =⏟⎵ 78.6 ⏟2⎵⎵ ⎵⏟ . consequence
If pigs can⎵⏟ fly then 4⏟⎵ +⎵⏟⎵ 2 =⎵⏟ 42 . ⏟⎵⎵⏟⎵ antecedent
consequence
If 4⏟⎵ +⎵⏟⎵ 2 =⎵⏟ 42 then pigs can⎵⏟ fly . ⏟⎵⎵⏟⎵ antecedent
consequence
Some of these implications are true and some of them are not. Sometimes statements that do not look like implications can be rephrased as implications: My plants will die if they get no water. If my plants get no water, then they will die. All crows are black. If it is a crow, then it is black. You cannot go to the movie unless you clean your room. If you do not clean your room, then you cannot go to the movie. The path is muddy whenever it rains. If it rains, then the path is muddy.
44
1. Sets and Logic
The implication 𝑃 ⇒ 𝑄 is not the same as the implication 𝑄 ⇒ 𝑃: If you a lawyer can ⎵ read ⏟⎵⎵are ⎵⎵⏟⎵ ⎵⎵⎵⏟, then you ⏟⎵⎵⎵⏟⎵ ⎵⏟ . 𝑃
𝑃⇒𝑄
𝑄
If you can ⎵ read a lawyer ⏟⎵⎵⎵⏟⎵ ⎵⏟, then you ⏟⎵⎵are ⎵⎵⏟⎵ ⎵⎵⎵⏟ . 𝑄
𝑄⇒𝑃
𝑃
The converse of an implication 𝑃 ⇒ 𝑄 is the implication 𝑄 ⇒ 𝑃. If the antecedent and consequence are conditional statements, the truth value of an implication is independent of the truth value of its converse: An implication and its converse may both be true, both false, or one true and one false, depending on the statements 𝑃 and 𝑄 involved. The examples below will illustrate this. Implication: If 𝑥 + 2 = 5 then 𝑥 = 3. True Converse: If 𝑥 = 3 then 𝑥 + 2 = 5. True Implication: If 2𝑥 = 6 then 𝑥 = 5. Converse: If 𝑥 = 5 then 2𝑥 = 6.
False False
Implication: If 𝑥 = −3 then 𝑥2 = 9. Converse: If 𝑥2 = 9 then 𝑥 = −3.
True False (𝑥 might equal 3 or -3)
To provide examples of all possible outcomes of the truth values of an implication and its converse, we still need an implication that is false but whose converse is true. The implication below provides such an example. Compare it with the last implication above. Implication: If 𝑥2 = 9 then 𝑥 = −3. False Converse: If 𝑥 = −3 then 𝑥2 = 9. True This example illustrates that the converse of the converse of 𝑃 ⇒ 𝑄 is again 𝑃 ⇒ 𝑄. Furthermore, when using the word converse, we must be sure it is understood what implication we are taking the converse of. Since each of the statements 𝑃 ⇒ 𝑄 and 𝑄 ⇒ 𝑃 is the converse of the other, we may simply say that these statements are converses without going into the detail of which is the converse of which. It is important to recognize what an implication implies and what it does not. Let us return to the implication If you a lawyer can ⎵ read ⏟⎵⎵are ⎵⎵⏟⎵ ⎵⎵⎵⏟, then you ⏟⎵⎵⎵⏟⎵ ⎵⏟ . 𝑃
𝑄
Let us assume for now that this is a true implication. The implication says nothing about people who are not lawyers. Maybe they can read or maybe not. If you are not a lawyer—that is, if ∼ 𝑃—then the implication 𝑃 ⇒ 𝑄 tells us nothing. Similarly, if you can read, the implication above tells us nothing about your profession: maybe you are a lawyer or maybe not. The implication “If 𝑃 then 𝑄” should not be expected to provide any consequence if 𝑄 occurs. However, given the implication above, we can conclude something if you cannot read. Given a true implication 𝑃 ⇒ 𝑄, if 𝑄 does not occur
1.6. Implications
45
then 𝑃 could not have occurred (for had 𝑃 occurred, 𝑄 would have). In the example at hand, it follows that if you cannot read, then you are not a lawyer. Thus, if the implication 𝑃 ⇒ 𝑄 is true, then the implication (∼ 𝑄) ⇒ (∼ 𝑃) is also true. Our arguments above hold not only for the particular statements 𝑃 and 𝑄 given there, but for any statements 𝑃 and 𝑄. In the standard rules of precedence, negations (∼) are performed first, followed by conjunctions (∧) and disjunctions (∨) taken in order from left to right, and implications (⇒ or ⇐) are taken last. Thus, ∼ 𝑃 ∨ 𝑄 ⇒ 𝑅 ∧ ∼ 𝑆 is understood to mean ((∼ 𝑃) ∨ 𝑄) ⇒ (𝑅 ∧ (∼ 𝑆)). In the case at hand, (∼ 𝑄) ⇒ (∼ 𝑃) will be written ∼ 𝑄 ⇒ ∼ 𝑃. Definition 1.6.1. Given an implication 𝑃 ⇒ 𝑄, the implication ∼ 𝑄 ⇒ ∼ 𝑃 is called the contrapositive of 𝑃 ⇒ 𝑄. Note that the contrapositive of the contrapositive of 𝑃 ⇒ 𝑄 is the contrapositive of ∼ 𝑄 ⇒ ∼ 𝑃, which is ∼ (∼ 𝑃) ⇒ ∼ (∼ 𝑄). Since ∼ (∼ 𝑃) = 𝑃 and ∼ (∼ 𝑄) = 𝑄, we see that the contrapositive of the contrapositive of 𝑃 ⇒ 𝑄 is 𝑃 ⇒ 𝑄. We have shown that if any implication is true, then its contrapositive is true. Thus, if ∼ 𝑄 ⇒ ∼ 𝑃 is a true implication, then its contrapositive 𝑃 ⇒ 𝑄 is true. This shows that an implication 𝑃 ⇒ 𝑄 is true if and only if its contrapositive ∼ 𝑄 ⇒ ∼ 𝑃 is true. We have proved the following result. Theorem 1.6.2. An implication and its contrapositive are logically equivalent. Let us review our definitions. Implication: 𝑃 ⇒ 𝑄 Converse: 𝑄 ⇒ 𝑃 Contrapositive: ∼ 𝑄 ⇒ ∼ 𝑃 For those who love definitions, there is another related implication. Given an implication 𝑃 ⇒ 𝑄, the converse of its contrapositive is ∼ 𝑃 ⇒ ∼ 𝑄, and is called the inverse of 𝑃 ⇒ 𝑄. In applications, the converse and contrapositive are far more important than the inverse. Let us also note the following: The negation of the negation of 𝑃 is 𝑃, that is, ∼ (∼ 𝑃) = 𝑃. The converse of the converse of (𝑃 ⇒ 𝑄) is again (𝑃 ⇒ 𝑄). The contrapositive of the contrapositive of (𝑃 ⇒ 𝑄) is again (𝑃 ⇒ 𝑄). The inverse of the inverse of (𝑃 ⇒ 𝑄) is again (𝑃 ⇒ 𝑄). Example 1.6.3. Give the converse and contrapositive of the implications below. (a) If 1 + 1 = 3, then horses have feathers. (b) If it snows, then I do not swim. (c) If you touch the Trevi Fountain, then you are in Europe.
46
1. Sets and Logic
Solution. (a) Implication: If 1 + 1 = 3 then horses have feathers. Converse: If horses have feathers, then 1 + 1 = 3. Contrapositive: If horses do not have feathers then 1 + 1 ≠ 3. (b)
Implication: If it snows, then I do not swim. Converse: If I do not swim, then it snows. Contrapositive: If I swim, then it does not snow.
(c)
Implication: If you touch the Trevi Fountain, then you are in Europe. Converse: If you are in Europe, then you touch the Trevi Fountain. Contrapositive: If you are not in Europe, then you do not touch the Trevi Fountain.
□
We know that each of these implications has the same truth value as its contrapositive, but the truth value of the converse is linked to the particular statements 𝑃 and 𝑄 and may not be determined from the truth value of the implication 𝑃 ⇒ 𝑄. We have seen all this without discussing how to determine whether an implication 𝑃 ⇒ 𝑄 is true or false. In our discussion above, we assumed that the implication “If you are a lawyer, then you can read” was true. Is this implication really true? What would it take to show that this implication is false? The only way this particular implication could fail would be if there were a lawyer somewhere who cannot read. In general terms, an implication 𝑃 ⇒ 𝑄 will be false if and only if 𝑃 occurs yet 𝑄 fails—that is, if and only if 𝑃 is true yet 𝑄 is false. In determining the truth of an implication, remember that there is only one way it could be false: the antecedent (the “if part”) is true yet the consequence (the “then part”) fails. Consider the following example: If pigs can⎵⏟ fly, then 7⏟⎵⏟⎵⏟ + 2 = 9. ⏟⎵⎵⏟⎵ 𝑃
𝑄
There are three statements included above: the antecedent 𝑃, the consequence 𝑄 and the implication 𝑃 ⇒ 𝑄. In this implication, the antecedent 𝑃 = “pigs can fly” is false and the consequence 𝑄 = “7 + 2 = 9” is true. To determine whether the implication 𝑃 ⇒ 𝑄 is true, remember that the only way the implication can be false is if 𝑃 is true yet 𝑄 is false. In the example at hand, 𝑃 is never true, so the implication 𝑃 ⇒ 𝑄 never fails. This is a true implication. Thus, an implication 𝑃 ⇒ 𝑄 is automatically true if 𝑃 is always false. If 𝑃 is guaranteed to never happen, we can truthfully state that any consequence would follow if 𝑃 did happen. Thus, the implication If pigs can⎵⏟ fly, then 7⏟⎵ +⎵2⎵⏟⎵ = 483.9 ⎵⎵⏟ ⏟⎵⎵⏟⎵ 𝑃
𝑅
is a true implication. The consequence 7+2 = 483.9 is clearly false, but the implication 𝑃 ⇒ 𝑅 does not say 7 + 2 = 483.9 is true. The implication only says 7 + 2 = 483.9 would be true if pigs could fly. Since pigs cannot fly, the implication is not very applicable, but is true. The implication 𝑃 ⇒ 𝑅 would be false only if pigs could fly and 7 + 2 ≠ 483.9.
1.6. Implications
47
Let us address this issue of the truth of an implication using logical notation. To construct the truth table for the implication 𝑃 ⇒ 𝑄, we list all possible outcomes for the truth values of the input statements 𝑃 and 𝑄 in the left two columns. The implication 𝑃 ⇒ 𝑄 is false if and only if 𝑃 is true yet 𝑄 is false. This allows us to complete the third column in the truth table below. 𝑃 𝑄 𝑃⇒𝑄 T T T F T F F T T } If the antecedent 𝑃 fails, the implication F F T 𝑃 ⇒ 𝑄 is automatically true. The basic fact about what it takes for an implication to be false may be phrased logically as ∼ (𝑃 ⇒ 𝑄) = 𝑃∧ ∼ 𝑄. The implication 𝑃 ⇒ 𝑄 fails precisely when 𝑃 occurs but 𝑄 fails. We may verify that ∼ (𝑃 ⇒ 𝑄) = 𝑃∧ ∼ 𝑄 by constructing a truth table for these statements, as given below. 𝑃 𝑄 T T T F F T F F
𝑃⇒𝑄 T F T T
∼ (𝑃 ⇒ 𝑄) F T F F
∼𝑄 F T F T
𝑃∧ ∼ 𝑄 F T F F
Because the columns for ∼ (𝑃 ⇒ 𝑄) and 𝑃∧ ∼ 𝑄 are identical, this proves that these statements are logically equivalent. The most logically complex implications 𝑃 ⇒ 𝑄 are those in which the antecedent 𝑃 and consequence 𝑄 are conditional statements, and hence may take on different truth values. If 𝑃 and 𝑄 are conditional statements, the implication 𝑃 ⇒ 𝑄 is considered true only if the implication holds in all possible instances, and is considered false if there is a single instance in which the implication fails. For example, the implication 𝑥 = 5 ⇒ 𝑥2 = 0 does happen to be true in the instance that 𝑥 = 2, in which case the implication becomes 2 = 5 ⇒ 22 = 0. However, the implication is clearly false in the one suggested instance 𝑥 = 5, and hence the implication is a false implication. Indeed, since an implication 𝑃 ⇒ 𝑄 will be true in all instances in which 𝑃 is false, we need only consider the (naturally suggested) cases in which 𝑃 is true. Now let us compare an “if” statement with an “only if” statement. With 𝑃 and 𝑄
= I will try the escargot = You will try the escargot,
the statement “𝑃 if 𝑄” is (1.3)
I will try the escargot if you will,
48
1. Sets and Logic
and the statement “𝑃 only if 𝑄” is (1.4)
I will try the escargot only if you will.
Writing it in the standard if–then order, the statement (1.3) becomes If you will try the escargot then I will try the escargot. If 𝑄 then 𝑃 𝑄⇒𝑃
(1.3′ )
Under implication (1.3′ ), I still have the option to try the escargot myself even if you do not. Under implication (1.4), however, if you do not try the escargot, I have no option—I am obligated not to try the escargot. Thus, statement (1.4) is equivalent to If you will not try the escargot then I will not try the escargot. (1.4′ ) If ∼ 𝑄 then ∼ 𝑃 ∼𝑄⇒∼𝑃 Replacing this last implication by its contrapositive, which is logically equivalent, gives 𝑃⇒𝑄 (1.4″ ) Comparing statements (1.3) and (1.3′ ), we see that “𝑃 if 𝑄” is equivalent to (𝑄 ⇒ 𝑃), and comparing statements (1.4) and (1.4″ ), we see that “𝑃 only if 𝑄” is equivalent to (𝑃 ⇒ 𝑄). Similar reasoning shows that this holds for any statements 𝑃 and 𝑄: (𝑃 if 𝑄) = (if 𝑄 then 𝑃)
=
(𝑄 ⇒ 𝑃)
(𝑃 only if 𝑄)
=
(𝑃 ⇒ 𝑄)
In particular, note that “𝑃 if 𝑄” and “𝑃 only if 𝑄” are converses. We may argue that “𝑃 only if 𝑄” is (𝑃 ⇒ 𝑄) directly without phrasing the implication as its contrapositive. Suppose 𝑃 occurs only if 𝑄 does, and suppose we know that 𝑃 occurs. Then 𝑄 must have occurred. Thus, if “𝑃 only if 𝑄” is true, then “If 𝑃 then 𝑄” is true. Arguing the other direction, if the statement “If 𝑃 then 𝑄” is true, then clearly 𝑃 occurs only if 𝑄 does—that is, clearly “𝑃 only if 𝑄” is true. If 𝑃 implies 𝑄 and 𝑄 implies 𝑃, then 𝑃 and 𝑄 will have precisely the same truth values—either both true or both false. Thus, if 𝑃 ⇒ 𝑄 and 𝑄 ⇒ 𝑃, then 𝑃 and 𝑄 are logically equivalent. This situation may be described as (𝑃 ⇒ 𝑄) ∧ (𝑃 ⇐ 𝑄), or simply 𝑃 ⟺ 𝑄. Since “𝑃 ⇒ 𝑄” may be stated as “𝑃 only if 𝑄” and “𝑄 ⇒ 𝑃” may be stated as “𝑃 if 𝑄”, we may read 𝑃 ⟺ 𝑄 as “𝑃 if and only if 𝑄.” A common abbreviation for “if and only if” is “iff ”. It will be important to remember that 𝑃 ⟺ 𝑄 is a double implication: 𝑃 implies 𝑄 and 𝑃 is implied by 𝑄. If 𝑃 ⇒ 𝑄, then we say 𝑃 is a sufficient condition for 𝑄, and 𝑄 is a necessary condition for 𝑃. If 𝑅 is a necessary and sufficient condition for 𝑄, then 𝑅 ⟺ 𝑄. Example 1.6.4. A set 𝑆 of real numbers satisfies the Archimedian property if and only if ∀𝑎, 𝑏 ∈ 𝑆, ∃𝑛 ∈ ℕ such that 𝑛𝑎 > 𝑏.
1.6. Implications
49
Find necessary and sufficient conditions for a set 𝑆 ⊆ ℝ to satisfy the Archimedian property. Solution. If 𝑆 contains any number 𝑎 ≤ 0, then 𝑛𝑎 ≤ 𝑎 ∀𝑛 ∈ ℕ, so 𝑆 cannot have the Archimedian property. Thus, a necessary condition for 𝑆 to have the Archimedian property is that 𝑆 contain only positive elements. Furthermore, the condition that 𝑆 contain only positive elements is sufficient to ensure that 𝑆 has the Archimedian prop1 erty, for then if 𝑎, 𝑏 ∈ 𝑆 ⊆ (0, ∞), then there exists 𝑚 ∈ ℕ with 𝑎 > 𝑚 > 0, and for any 1
natural number 𝑛 > 𝑚𝑏 > 0 multiplication of the inequalities gives 𝑛𝑎 > (𝑚𝑏) 𝑚 = 𝑏. □ Example 1.6.5. Verify that (𝑥, 𝑦, 𝑧) = (𝑎, 𝑏, 𝑐) in ℝ3 if and only if 2 2 2 √(𝑥 − 𝑎) + (𝑦 − 𝑏) + (𝑧 − 𝑐) = 0.
Solution. To verify a double implication, we must verify each implication separately. (⇒): If (𝑥, 𝑦, 𝑧) = (𝑎, 𝑏, 𝑐), then 2 2 2 √(𝑥 − 𝑎) + (𝑦 − 𝑏) + (𝑧 − 𝑐) = √0 + 0 + 0 = 0.
(⇐): If √(𝑥 − 𝑎)2 + (𝑦 − 𝑏)2 + (𝑧 − 𝑐)2 = 0, then (𝑥−𝑎)2 +(𝑦−𝑏)2 +(𝑧−𝑐)2 = 0. A sum of three nonnegative numbers can be zero only if each of the three numbers is zero, and thus (𝑥 − 𝑎)2 = (𝑦 − 𝑏)2 = (𝑧 − 𝑐)2 = 0. It follows that (𝑥 − 𝑎) = (𝑦 − 𝑏) = (𝑧 − 𝑐) = 0, that is, 𝑥 = 𝑎, 𝑦 = 𝑏, and 𝑧 = 𝑐. □
Exercises 1. Write each statement as an implication. (a) I will not eat all those cookies without some milk. (b) You cannot vote unless you register. (c) My dog barks whenever she hears a siren. (d) All prime numbers greater than two are odd. Exercises 2–5 refer to the statements 𝐼, 𝐻, 𝑆, and 𝑈 below. 𝐼 = Interest rates go down. 𝐻 = More people buy houses. 𝑆 = The stock market goes up. 𝑈 = Unemployment goes up. 2. With 𝐼, 𝐻, 𝑆, and 𝑈 as above, write each implication, its converse, and its contrapositive in words. (a) 𝐼 ⇒ 𝑆 (b) ∼ 𝑈 ⇒ 𝐻 (c) 𝑆 ⇒ (𝐼 ∧ 𝐻) 3. With 𝐼, 𝐻, 𝑆, and 𝑈 as above, write each statement as a sentence. (a) 𝐻 ⇒ ∼ 𝑈
50
1. Sets and Logic
(b) 𝐼 ⟺ 𝐻 (c) 𝐼 ⇒ (𝐻∧ ∼ 𝑈) (d) (∼ 𝐻∧ ∼ 𝑆) ⇒ 𝑈 (e) ∼ (𝑆 ⇒ 𝑈) 4. Write each sentence in symbolic form, using 𝐼, 𝐻, 𝑆, and 𝑈 as above. (a) Interest rates go down only if unemployment goes up. (b) The stock market goes up if more people buy houses. (c) Unemployment does not go up if interest rates go down and more people buy houses. (d) If interest rates do not go down, the stock market does not go up. (e) If more people buy houses and unemployment does not go up, then the stock market goes up. (f) If unemployment goes up, more people buy houses only if interest rates go down. 5. With 𝐼, 𝐻, 𝑆, and 𝑈 as above, complete these sentences in words. (a) 𝑆 ⇒ 𝑈 is false if and only if . . . (b) The converse of 𝑆 ⇒ 𝑈 is false if and only if . . . (c) The contrapositive of ∼ 𝐼 ⇒ 𝑈 is false if and only if . . . 6. Find the converse and contrapositive of each implication below. (a) If my sister visits then we will eat out. (b) If you knock and I am in, then I will answer. 7. Find the converse of each implication below. Determine the truth value of each implication and its converse. Justify your answers. Assume all variables represent real numbers. (a) 𝑥2 = 4 only if 𝑥 = 2. (b) If 2𝑥 ≤ 𝑥, then 𝑥2 > 0. (c) If 2 is a prime number, then 22 = 4 is a prime number. (d) If 𝑥 is an integer then √𝑥 is an integer. (e) If every line has a 𝑦-intercept, then every line contains infinitely many points. (f) A line has undefined slope only if it is vertical. (g) 𝑥 = −5 only if 𝑥2 − 25 = 0. (h) 𝑥2 is positive only if 𝑥 is positive. 8. (a) Give necessary and sufficient conditions for 𝑥2 ∈ [4, 9]. (b) Give a necessary condition on 𝑥 which is not sufficient for 𝑥2 ∈ [4, 9]. (c) Give a sufficient condition on 𝑥 which is not necessary for 𝑥2 ∈ [4, 9]. 9. Suppose 𝑛 is a natural number with units digit 𝑑. (Thus, 𝑛 = 10𝑚 + 𝑑 for some nonnegative integers 𝑚, 𝑑 with 𝑑 ≤ 9.). (a) Give necessary and sufficient conditions on 𝑑 for 𝑛 to be divisible by 5. (b) Give a necessary condition on 𝑑 which is not sufficient for 𝑛 to be divisible by 5. (c) Give a sufficient condition on 𝑑 which is not necessary for 𝑛 to be divisible by 5.
1.6. Implications
51
10. (a) Find a sufficient condition on 𝑥 to make 𝑥 a solution to the inequality 𝑥 + √𝑥4 + 𝑥 + 1 ≥ 100. Is your condition necessary? Explain. (b) Find a necessary condition on 𝑐 for the implication 𝑎𝑐 = 𝑏𝑐 ⇒ 𝑎 = 𝑏 to be true for all 𝑎, 𝑏 ∈ ℝ. Is your condition sufficient? Explain. (c) Find a sufficient condition on 𝑚 to ensure that the line 𝑦 = 𝑚𝑥 + 𝑏 has an 𝑥-intercept. Is your condition necessary? Explain. (d) Find necessary and sufficient conditions on 𝑎 and 𝑏 to ensure that the equation 𝑎𝑥2 + 𝑏 = 0 has a real solution. 11. Find conditions which are (a) necessary but not sufficient, (b) sufficient but not necessary, and (c) necessary and sufficient for |𝑥 + 𝑦| = |𝑥|. 12. Find conditions which are (a) necessary but not sufficient, (b) sufficient but not necessary, and (c) necessary and sufficient for |𝑥 + 𝑦| = |𝑥| + |𝑦|. 13. Show that 𝐴 × 𝐵 is disjoint from 𝐵 × 𝐴 if and only if 𝐴 is disjoint from 𝐵. 14. Suppose 𝑅 ⊆ 𝐴 × 𝐴. (a) Find the contrapositive of the implication (𝑎, 𝑏) ∈ 𝑅 ∧ (𝑏, 𝑎) ∈ 𝑅 ⇒ 𝑎 = 𝑏. (b) Find the negation of the statement ∀𝑎, 𝑏 ∈ 𝐴, [(𝑎, 𝑏) ∈ 𝑅 ∧ (𝑏, 𝑎) ∈ 𝑅] ⇒ 𝑎 = 𝑏. (c) Find the negation of the statement ∀𝑎, 𝑏, 𝑐 ∈ 𝐴, [(𝑎, 𝑏) ∈ 𝑅 ∧ (𝑏, 𝑐) ∈ 𝑅] ⇒ (𝑎, 𝑐) ∈ 𝑅. 15. (a) Determine the truth value of this statement: Drinking Pepsi implies you are right-handed or drinking Pepsi implies you are not right-handed. (b) Construct a truth table for (𝑃 ⇒ 𝑅) ∨ (𝑃 ⇒ ∼ 𝑅).
16. (a) Construct a truth table with columns for the following statements: (i) 𝑃, (ii) 𝑄, (iii) 𝑃 ⇒ 𝑄, (iv) ∼ 𝑃 ⇒ 𝑄, (v) ∼ 𝑃 ∨ 𝑄, (vi) 𝑃 ∨ 𝑄, (vii) ∼ (𝑃 ⇒ ∼ 𝑄), and (viii) 𝑃 ∧ 𝑄. (b) Identify all pairs of equivalent statements from part (a). 17. Use truth tables to verify the following statements. (a) [(𝑃 ⇒ 𝑆) ∧ (𝑃 ⇒ 𝑅)] = [𝑃 ⇒ (𝑆 ∧ 𝑅)] (b) [(𝑃 ⇒ 𝑆) ∨ (𝑃 ⇒ 𝑅)] = [𝑃 ⇒ (𝑆 ∨ 𝑅)] (c) [(𝑃 ⇒ 𝑆) ∨ (𝑄 ⇒ 𝑆)] ≠ [(𝑃 ∨ 𝑄) ⇒ 𝑆] (d) [(𝑃 ⇒ 𝑆) ∨ (𝑄 ⇒ 𝑅)] ≠ [(𝑃 ∨ 𝑄) ⇒ (𝑆 ∨ 𝑅)]
Chapter 2
Proofs
All the measurements in the world are not the equivalent of a single theorem that produces a significant advance in our greatest of sciences. —Carl Friedrich Gauss (1777–1855) In questions of science, the authority of a thousand is not worth the humble reasoning of a single individual. —Galileo Galilei (1564–1642)
53
54
2. Proofs
2.1. Proof Techniques The familiar laws of algebra are not determined by opinion or fashion but are based upon solid mathematical proofs. A mathematical proof is a sequence of logical steps that unequivocally shows that a certain conclusion must follow from certain hypotheses. The sequence of logical implications which make up a proof must start with some statements or facts we assume. For example, to prove that a nondegenerate square has two diagonals, we must assume that the definition of diagonals of a nondegenerate square is known and furthermore, we must assume certain geometric axioms such as “there is a unique line through two distinct points”. In solving mathematical problems, including problems of proving a conjecture, there are three phases. First, one must understand the problem. This phase may include framing and posing the appropriate mathematical questions from the situation (“modeling” the problem). Interpreting the terminology and understanding definitions of all relevant terms will be required in this phase. Second, one must figure out how to solve the problem. For proofs, it may be helpful to consider some simple specific examples of the claim to gain insight into the general situation. Writing out the meanings of all given hypotheses and of the desired conclusion may assist in finding the appropriate logical links from the former to the latter. Finally, after determining the solution, the third phase is to carefully write the solution in a clear and correct style. For simple problems, these phases may overlap considerably.
Direct Proofs Mathematical proofs, like diamonds, are hard as well as clear, and will be touched with nothing but strict reasoning. —John Locke (1632–1704) We will first consider proofs in which the logical arguments lead directly from the hypotheses to the conclusion. Such a proof is called a direct proof. To prove that hypothesis 𝐴 implies conclusion 𝐵 by direct proof, assume 𝐴 holds and show that 𝐵 must follow. Example 2.1.1. Show that the product of any two odd integers is an odd integer. Solution. First, we should understand the statement. To do this, we must know that an odd integer is a number of form 2𝑘 + 1 where 𝑘 ∈ ℤ. A specific example of the claim may assist in understanding what is called for. The integers 3 and 13 are two specific odd integers. Their product 3 ⋅ 13 = 39 is odd. We are asked to show that if 𝑎 and 𝑏 are any two odd integers, then their product 𝑎𝑏 is odd. Now let us try to prove the statement. Your first attempt may not be a concise and clear proof. The concisely written proof must follow the “scratch work”. To show that the product of two odd integers is odd, we should start with two arbitrary odd integers, say 𝑎 and 𝑏. Because 𝑎 and 𝑏 are odd, we may write 𝑎 = 2𝑗 + 1 and 𝑏 = 2𝑘 + 1 where 𝑗 and 𝑘 are integers. Note that since 𝑎 may be different from 𝑏, we must use different variables 𝑗 and 𝑘 to represent them in the form 2𝑥 + 1. We are to show that the product
2.1. Proof Techniques
55
𝑎𝑏 of these two odd integers is odd, that is, we are to show that 𝑎𝑏 = 2𝑚 + 1 for some integer 𝑚. To conclude something about the product 𝑎𝑏, let us multiply 𝑎 and 𝑏 using their forms as odd integers. 𝑎𝑏
=
(2𝑗 + 1)(2𝑘 + 1)
= 4𝑗𝑘 + 2𝑗 + 2𝑘 + 1 = 2(2𝑗𝑘 + 𝑗 + 𝑘) + 1 You should recognize that the ingredients for a complete proof are now present. Since 𝑗, 𝑘 ∈ ℤ, it follows that 𝑚 = (2𝑗𝑘 + 𝑗 + 𝑘) is an integer and thus 𝑎𝑏 is of form 2𝑚 + 1 for some integer (namely, 𝑚 = 2𝑗𝑘 + 𝑗 + 𝑘). Now let us clean up the scratch work and write the proof. For reference, we will label the statement being proved as a theorem. Theorem 2.1.2. The product of two odd integers is an odd integer. Proof. Suppose 𝑎 and 𝑏 are odd integers. Then there exist integers 𝑗 and 𝑘 with 𝑎 = 2𝑗 + 1 and 𝑏 = 2𝑘 + 1. The product 𝑎𝑏 is 𝑎𝑏 =
(2𝑗 + 1)(2𝑘 + 1)
= 4𝑗𝑘 + 2𝑗 + 2𝑘 + 1 =
2(2𝑗𝑘 + 𝑗 + 𝑘) + 1
= 2𝑚 + 1 where 𝑚 = 2𝑗𝑘 + 𝑗 + 𝑘 ∈ ℤ. Thus, 𝑎𝑏 is odd.
□
Almost all statements to be proved can be phrased as implications: If the hypotheses 𝑃 are met, then the conclusion 𝑄 holds. Theorem 2.1.2 could be phrased as follows. If 𝑎 and 𝑏 are odd integers, then the product 𝑎𝑏 is an odd integer. A corollary to a theorem is a result whose proof consists mainly of an application of the theorem. For example, taking 𝑎 = 𝑏 in the restatement of Theorem 2.1.2 above immediately gives the corollary below. Corollary 2.1.3. If 𝑎 is an odd integer, then 𝑎2 is an odd integer. When proving theorems, one should ask if the techniques used might also prove stronger statements. For simple statements 𝑆 and 𝑊, we say 𝑆 is stronger than 𝑊 (or 𝑊 is weaker than 𝑆) if 𝑆 ⇒ 𝑊. The concept of stronger implication may be compared to the concept of “better deal”. Suppose a vender offers 20 pencils for $2.99. She could offer you a better deal by offering you the same number of pencils for less money (say, 20 pencils for $2.49) or by offering you more pencils for the same amount of money (say, 25 pencils for $2.99). Similarly, an implication 𝑃 ⇒ 𝑄 can be strengthened either by getting the same result from a weaker hypothesis or by getting a stronger result from the same hypothesis. Furthermore, these two ways to improve the deal may be combined. If the vendor offers to increase the number of pencils in a pack and simultaneously lower the price (say, 25 pencils for $2.49), this is a better deal.
56
2. Proofs
The three implications below become increasingly stronger. If 𝑎 is an odd integer and 𝑏 = 𝑎, then the product 𝑎𝑏 is an odd integer. Corollary 2.1.3 If 𝑎 and 𝑏 are arbitrary odd integers, then the product 𝑎𝑏 is an odd integer. Theorem 2.1.2 If 𝑎 and 𝑏 are arbitrary odd integers, then the product 𝑎𝑏 is an odd integer and |𝑎𝑏| ≥ 𝑎. The second statement is a stronger statement than the first, for it gets the same result from a weaker hypothesis. The third statement is a stronger statement than the second, for it gives a stronger conclusion from the same hypotheses. The third statement is stronger than the first since it gives a stronger conclusion from a weaker hypothesis. Corollary 2.1.3 may be strengthened as follows. Theorem 2.1.4. If 𝑎 is an odd integer, then 𝑎2 is of form 8𝑚 + 1 where 𝑚 ∈ ℤ. Proof. Suppose 𝑎 is an odd integer. Then there exists an integer 𝑘 with 𝑎 = 2𝑘 + 1. Now 𝑎2
=
(2𝑘 + 1)2
=
4𝑘2 + 4𝑘 + 1
=
4(𝑘2 + 𝑘) + 1
=
4𝑘(𝑘 + 1) + 1.
[At this point, we might hesitate regarding the next step. It may help to keep our goal in mind: we want to show 𝑎2 is one more than a multiple of 8. Clearly, 4𝑘(𝑘 + 1) is a multiple of 4. Must it be a multiple of 8?] Since 𝑘 and 𝑘 + 1 are consecutive integers, one of them must be even and the other, odd. Let 2𝑗 (𝑗 ∈ ℤ) be the even number from {𝑘, 𝑘+1}. The odd number from {𝑘, 𝑘+1} will thus be either 2𝑗 + 1 or 2𝑗 − 1. Now we have 𝑎2 = 4(2𝑗)(2𝑗 + 1) + 1 2
𝑎 = 8𝑗(2𝑗 + 1) + 1
OR
𝑎2 = 4(2𝑗)(2𝑗 − 1) + 1
OR
𝑎2 = 8𝑗(2𝑗 − 1) + 1.
In either case, we have 𝑎2 = 8𝑚 + 1 where 𝑚 = 𝑗(2𝑗 ± 1) ∈ ℤ. Thus, the square of any odd integer is one more than a multiple of 8. □ We present another example of a direct proof. Example 2.1.5. Show that if 𝑛 is a natural number with two or more digits, then the product of the digits of 𝑛 is less than 𝑛. Solution. To understand the problem, let us consider a specific example. Consider the number 𝑛 = 7526. The product of its digits is (7)(5)(2)(6) = 420, which is indeed less than 𝑛 = 7526. We would hope to find an explanation for this specific example which can be adapted to the general case. In trying to show that the product of the digits of 𝑛 is smaller than 𝑛 itself, we should expect to use the relative small size of
2.1. Proof Techniques
57
each digit. Since each digit of 7526 is between 0 and 10, the product (7)(5)(2)(6) is less than (10)(10)(10)(10) = 10000, but this estimate has one too many factors of 10 to show that (7)(5)(2)(6) < 7526. Saying that each digit is less than 10 is too broad an estimate to show that the product of the digits is as small as we hoped to prove. If we note that the first digit equals 7 and the other three digits are less than 10, we now have (7)(5)(2)(6) < (7)(10)(10)(10) = 7000 < 7526, as needed. Furthermore, this technique of isolating the leading digit and noting that all other digits are less than 10 should work in the general case. We may now focus on properly writing a proof. For reference, we will label the statement being proved as a theorem. Theorem 2.1.6. Suppose 𝑛 is a natural number with two or more digits. Then the product of the digits of 𝑛 is less than 𝑛. Proof. Suppose 𝑛 is an arbitrary natural number with two or more digits. We may write 𝑛 in expanded base 10 notation as 𝑛 = 𝑑𝑘 10𝑘 + 𝑑𝑘−1 10𝑘−1 + . . . + 𝑑2 102 + 𝑑1 10 + 𝑑0 , where 𝑑0 is the units digit of 𝑛, 𝑑1 is the tens digit of 𝑛, and in general, 𝑑𝑗 (𝑗 = 0, 1, . . . , 𝑘) is the digit in the 10𝑗 place of 𝑛. The product of the digits of 𝑛 is 𝑑𝑘 𝑑𝑘−1 ⋯ 𝑑2 𝑑1 𝑑0 = 𝑑𝑘 (𝑑𝑘−1 ⋯ 𝑑2 𝑑1 𝑑0 ). The expression (𝑑𝑘−1 ⋯ 𝑑2 𝑑1 𝑑0 ) appearing above has 𝑘 factors, each being nonnegative and less than 10. It follows that 𝑑𝑘−1 ⋯ 𝑑2 𝑑1 𝑑0 < 10𝑘 . Thus, 𝑑𝑘 (𝑑𝑘−1 ⋯ 𝑑2 𝑑1 𝑑0 )
<
𝑑𝑘 10𝑘
≤
𝑑𝑘 10𝑘 + 𝑑𝑘−1 10𝑘−1 + . . . + 𝑑2 102 + 𝑑1 10 + 𝑑0
=
𝑛.
This shows that for any natural number 𝑛 with two or more digits, the product of the digits is less than 𝑛. □
Indirect Proofs “Holmes,” I cried, “This is impossible.” “Admirable!” he said. “A most illuminating remark. It is impossible as I state it, and therefore I must in some respect have stated it wrong . . . ” —Arthur Conan Doyle (1859–1930) A chess player may offer the sacrifice of a pawn or even a piece, but a mathematician offers the game. —G. H. Hardy (1877–1947) Indirect proofs are of two types, proof by contradiction and proof by contrapositive. An implication 𝑃 ⇒ 𝑄 is logically equivalent to its contrapositive ∼ 𝑄 ⇒ ∼ 𝑃. The technique of proving an implication 𝑃 ⇒ 𝑄 by proving the contrapositive is called proof by contrapositive. It is an indirect form of proving 𝑃 ⇒ 𝑄 since we do not start by assuming 𝑃. Instead, we start by assuming 𝑄 fails, and then show that 𝑃 fails.
58
2. Proofs
To prove a statement by contradiction, we assume the statement is false and show that this leads to a contradiction, thereby showing that it is impossible for the statement to fail. Proof by contradiction is also known as reductio ad absurdum, which is Latin for “reduction to the absurd”. If the assumption that the statement fails leads to an impossible absurdity (i.e., a contradiction) then the statement cannot fail. Both indirect methods of proof start by assuming something fails, that is, by assuming the negation of some statement. Consequently, indirect methods are frequently suitable when dealing with concepts such as “infinite” (not finite), “irrational” (not rational), and “prime” (> 1 and not nicely factorable) which are themselves defined in terms of negations. The next two theorems are proved by contrapositive. Theorem 2.1.7. Suppose 𝑎 is a positive real number. If 𝑎 is irrational, then √𝑎 is irrational. Proof. Let 𝑎 be a positive real number. We will show 𝑎 ∉ ℚ ⇒ √𝑎 ∉ ℚ by proving the contrapositive: √𝑎 ∈ ℚ ⇒ 𝑎 ∈ ℚ. 𝑚
To this end, suppose √𝑎 ∈ ℚ. Then ∃𝑚, 𝑛 ∈ ℤ, 𝑛 ≠ 0, with √𝑎 = 𝑛 . Now 𝑚2 𝑛2 2 2 2 where 𝑚 , 𝑛 ∈ ℤ and 𝑛 ≠ 0. Thus 𝑎 ∈ ℚ, as needed. 𝑎 = (√𝑎)2 =
□
The following theorem is the converse of Corollary 2.1.3. Theorem 2.1.8. Suppose 𝑎 is an integer. If 𝑎2 is an odd integer, then 𝑎 is odd. Proof. Assume 𝑎 is an integer but is not odd. Then 𝑎 is even, so 𝑎 = 2𝑘 for some 𝑘 ∈ ℤ. Now 𝑎2 = (2𝑘)2 = 2(2𝑘2 ) is even. Thus, if 𝑎 is not odd, then 𝑎2 is not odd. The theorem follows by the logical equivalence of the implication and its contrapositive. □ Corollary 2.1.3 and Theorem 2.1.8 together give the first part of the following theorem, which states that a natural number and its square have the same parity. (The parity of an integer is the appropriate word even or odd describing that number.) The second part follows from the equivalence of the statements 𝑃 ⟺ 𝑄 and ∼ 𝑃 ⟺ ∼ 𝑄. Theorem 2.1.9. Suppose 𝑎 is an integer. (a) 𝑎 is odd if and only if 𝑎2 is odd. (b) 𝑎 is even if and only if 𝑎2 is even. Now let us consider some examples of proof by contradiction. Theorem 2.1.10. The product of a nonzero rational number and an irrational number is irrational.