Basics of Set Theory and Logic S. F. Ellermeyer August 18, 2000 Set Theory Membership A set is a well-defined collection of objects. Any object which is in a set is called a member of the set. If the object x is a member of the set A, then we write xA which is read as “ x is a member of A” or “x belongs to A” or “x is in A” or “x is an element of A”. If the object x is not a member of A, then we write x A. Examples of Sets 1. A 4, 7, 13, 157.52 is a set with exactly four members. The members of A are the numbers 4, 7, 13, and 157.52. Hence, we could write 13 A and 9 A. 200, 190 is the set consisting of all real numbers between 200 and 190 not including 200 and 190. Hence, we could write 6.34 B 2. B and 214.12 B. the set of all Presidents of the United States . 4. D the set of all people who were born before 1953 5. E x R | x 2 5x 6 0 is the set of all real numbers which satisfy the equation x 2 5x 6 0. 6. F x R | x 14 4 x is the set of all real numbers which satisfy the inequality x 14 4 x. Hence, we could write 10 F 3. C and 0 F. 1 n N | n is a divisor of 275 the number 275. Note that 7. G is the set of all natural numbers which are divisors of 11 G and 3 G. Inclusion If A and B are two sets such that every member of A is also a member of B, then we say that A is a subset of B (or that A is included in B) and we write A B. If A B but B has members which are not members of A, then we say that A is a proper subset of B and we write A B. If A B and B A, then we say that A equals B and we write A B. Note that if A B, then there are exactly two possibilities: either A B or A B. Example If A 4, 7, 13, 157.52 and B 200, 190 , then A B. Remark: The symbols and are very similar to the symbols and which are used in describing the order relation of two real numbers. This can help us remember what the set inclusion symbols mean. In particular, if a and b are two real numbers and if we write a b, this means that either a b or a b. Likewise, if A and B are two sets and we write A B, this means that either A B or A B. Universal Sets A universal set is the set that is assumed to contain all members pertaining to the discussion at hand. Thus, a universal set is the “largest possible” set under consideration within a given discussion. Every set (within the discussion at hand) is assumed to be a subset of the universal set. In this course, the universal set will almost always be assumed to be the set of real numbers, R. Hence, if we define the set A x | x 2 1 x 3 0 , and if it is understood that the universal set is R, then we can conclude that A 3 because 3 is the only real number that satisfies the equation x 2 1 x 3 0. On the other hand, if we are assuming that the universal set is C (the set of all complex numbers), then we have A 3, i, i . If the universal is understood to be C and we want to define A to be the set of all real numbers that satisfy x 2 1 x 3 0, then we must write A x R | x 2 1 x 3 0 . This example shows why it is important that the universal set under consideration within a 2 particular discussion must be stated or agreed upon beforehand. Unless specifically stated otherwise, we will always assume that the universal set is R. The Complement of a Set If A is a set, then the complement of A, denoted by A , is the set of all non–members of A. For example if A 4, 7, 13, 157.52 , then A x | x 4, x 7, x 13, and x 157.52 and if A 4, , then A , 4. Note the importance of knowing what the universal set is in determining A . For example, if we were using the set of complex numbers as the universal set, then the complement of A 4, would include the interval , 4 as well as all of the imaginary numbers (such as i and 5 3i). Operations Let A and B be two sets. The union of A and B, denoted by A B, is the set of all elements which are either members of A or members of B. The intersection of A and B, denoted by A B, is the set of all elements which are both members of A and members of B. The difference, A B (sometimes written as A/B), is the set of all elements which are members of A but not members of B. Examples If A 1, 6 and B 4, 10, , then A B 1, 10 and , A B 4, 6 and A B 1, 4. The Empty Set The empty set is defined to be the set which has no members. The empty set is denoted by the symbol or by . Other names for the empty set are the null set and the vacuous set. The concept of the empty set is necessary because we need to be able to describe situations where two given sets do not intersect. For example, if A 1, 6 and B 12, 24 , then A B . Any two sets, A and B, for which A B are said to be disjoint. We remark that the empty set is a subset of every set and that no set is a subset of the empty set except for the empty set itself. Below, we list some properties and identities involving the empty set. In each of these, A stands for any given set. 1. A 2. A A 3. A 4. A A 5. A The Venn diagram in Figure 1 shows a general picture relating A B, A B, and B A (for any sets A and B). 3 Figure 1 Below, we list a few properties and identities which hold for any two sets, A and B. These can be deduced by looking at the Venn diagram in Figure 1. 1. A A B A B 2. A B A B A B B A 3. A A B 4. A B A 5. A B A 6. A B A B 7. A B B 8. A A the universal set and A A . 9. the universal set and the universal set 10. A B A B and A B A B (These are called DeMorgan’s Laws.) Sample Proof Let us prove the equality A A B A B . To prove this equality, we must prove that A A B A B and that A B A B A. First, we prove that A A B A B . Let x A. Clearly, either x B or x B . If x B, then x A B and if x B , then x A B. We conclude that either x A B or x A B. Thus x A B A B . This shows that A A B A B . Next, we prove that A B A B A. Let x A B A B . Then either x A B or x A B. In either case, it must be true that x A. This shows that A B A B A. Exercises Prove statements 2 through 10 above. (Some of the proofs are very short and follow almost immediately by definition.) 4 Logic Mathematical Statements A mathematical statement that depends on a variable, x, is a statement pertaining to x which is either true or false, depending on the value of x. For example, if we write Px : x 5, then we are saying that Px is the statement “x is less than 5.” Note that, depending on the value of x, this statement is either true or false. For example, P4.6 is true and P12 is false. Abstractly, we can think of P as a function, P : R true, false . Implications If P and Q are statements and if we want to assert that Qx must be true whenever Px is true, then we say: “If P, then Q” or PQ (where the symbol “” stands for “implies”) or P is sufficient for Q or Q is necessary for P. Example We know that if x 5, then x 2 10, so we can write x 5 x 2 10 . In other words, if Px is the statement x 5 and Qx is the statement x 2 10, then P Q is true because Qx is true whenever Px is true. The Converse of an Implication The converse of an implication P Q is the implication Q P. For example, the converse of the implication in the preceding example is x 2 10 x 5 . Note that this implication is not true because, for instance, 7 2 10 but 7 5. This example shows that it is possible that the converse of a true implication might not be true. If P and Q are statements such that P Q and Q P are both true, then we say that statements P and Q are equivalent and write P if and only if Q or P Q 5 or P is necessary and sufficient for Q. Example Let us prove that x 0 and x 1/x 2 are equivalent: First, observe that if x 0, then 1/x 0 so x 1/x 0. Also, if x 0, then x 1/x is not even defined. We conclude that if x 0, then it certainly is not true that x 1/x 2. In other words, if x 1/x 2, then it must be true that x 0. This establishes the truth of the implication x 1x 2 x 0 . To prove the converse, we consider the inequality 2 x 1 0 which is true for all real numbers x. By expanding the left hand side of this inequality, we obtain x 2 2x 1 0 for all real numbers x which gives us x 2 1 2x for all real numbers x. If x 0, then we can divide both sides of the preceding inequality by x (without reversing the order of the inequality) to obtain x 1x 2. This establishes the truth of the implication 1 x 0 x x 2 . The Contrapositive of an Implication The contrapositive of an implication P Q is the implication not Q implication and its contrapositive are always equivalent. not P . An Example The contrapositive of the implication x 5 x 2 10 is the implication x 2 10 x 5 . More formally, if Px : x 5 Q x : x 2 10 not Px : x5 then not Qx : x 2 10 and we see that the implication P Q is equivalent to the implication not Q not P . Example Restate the statement “All real numbers have nonnegative squares” as an implication and 6 state the contrapositive of this implication. Original Statement: If x is a real number, then x 2 0. Contrapositive: If x 2 0, then x is not a real number. Set Theory and Logic We observe the following formal correspondence between logic and set theory: If F and P are statements that depend on a variable x, then we define the sets x | Fx is true and x | Px is true . Then, the implication F P is true if and only if . For example, consider the statements Fx : x 5 Px : x 2 10. For these statements, we have , 5 , 8 and we observe that F P is true and that . On the other hand, the converse implication P F is false and, likewise, . Clearly, two statements F and P are equivalent if and only if . If F is a statement that is not true for any value of x, then so, in this case, the implication F P is true no matter what statement P is! For example, the implication x 2 0 x 6 is true because for Fx : x 2 0 Px : we have x6 6 and so . On the other extreme, if P is a statement that is true for all values of x, then R so, in this case, the implication F P is true no matter what statement F is. For example, the implication x 2 9 0 x 2 0 is true because for Fx : x 2 9 0 Px : x2 0 we have 7 3, 3 R and so . The foregoing discussion shows that an implication F P is false if and only if there exists a real number, x, such that Fx is true but Px is false. For example, the implication x 2 10 x 5 is false because for Fx : x 2 10 Px : x5 we have F7 true but P7 false. Further Connections Between Sets and Logic 1. Statements containing “for all” can be stated as set inclusions. For example, the statement “All cows are white” can be stated as A B where A all cows B all white things 2. Statements containing “there exists” can be stated in terms of the empty set. For example, the statement “Some dogs are brown” can be stated as A where A all brown dogs or as B C where B all dogs C all brown things Example Consider the statement “All mathematicians are either smart or weird”. If we let M all mathematicians S W all smart people all wierd people , then the above statement is equivalent to M S W . Likewise, “All mathematicians are smart and weird” is equivalent to M S W and “Some mathematicians are weird” is equivalent to M W . Exercises Consider the pairs of statements, P and Q, given below. For each pair, which of P Q, Q P, and P Q are true? Recall that we are assuming that the universal set (the domain of x) is R. 1. Px : x 3 Q x : x 2 9 2. Px : x 3 Q x : x 2 9 3. Px : x 3 8 Q x : x 2 9 4. Px : x 15 Qx : x 3 18 5. Px, y : x 0 and y 0 Qx, y : xy yx 2 6. Px : x for all 0 Q x : x 0 7. Px : |x| 4 Q x : 4 x 4 8. PA : x 46 for all x A QA : There exists M R such that x M for all x A 9. PA, B : A B QA, B : A 10. Px, y : x y Qx, y : x z y z for all z R In the following exercises, let M all mathematicians S all smart people W all weird people and write the following statements in terms of the sets M, S, and W. 1. All mathematicians are smart. 2. Some mathematicians are smart. 3. Some people who are smart or weird are mathematicians. 4. All smart people who are not weird are not mathematicians. 5. Some weird mathematicians are smart. Answer the following questions: 1. Suppose that P and Q are statements such that P4 is true and Q4 is false. Is the implication P Q true or false or can’t this be determined? What about the implication Q P? Give examples. 2. Suppose that P and Q are statements such that P4 is true and Q4 is true. Is the implication P Q true or false or can’t this be determined? What about the implication Q P? Give examples. 3. Suppose that P and Q are statements such that P4 is false and Q4 is false. Is the implication P Q true or false or can’t this be determined? What about the implication Q P? Give examples. 4. Suppose that P and Q are statements such that Qx is true for all x. Is the implication P Q true or false or can’t this be determined? What about the implication Q P? Give examples. 5. Suppose that P and Q are statements such that Qx is false for all x. Is the implication P Q true or false or can’t this be determined? What about the implication Q P? Give examples. 9
© Copyright 2026 Paperzz