Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Sets Some important sets: ∅ or {}: the empty set Z: the set of integers R: the set of real numbers Q: the set of rational numbers C: the set of complex numbers N: the set of natural numbers, meaning either {1, 2, 3, . . . } or {0, 1, 2, 3, . . . }. Ambiguous notation. Z≥1 , Z≥0 , Z≤5 , Q≥0 , Q>3 , etc. (2, 7), [2, 7], [2, 7), (2, 7], (2, ∞), (−∞, 3], etc. Sets To define a set: see the book for the full description and lots of examples. Two examples: let S = {1, 3, 5, 7, 9}. Define a set E by E= { n∈Z : n is even }. Read this as “ the set of n ∈ Z such that n is even ” or “the set of all integers n such that n is even” or just “the set of all even integers.” Sets If A is a set, the notation x ∈ A means that x is an element of A. For example, 3 ∈ Z and π 6∈ Z. If A and B are sets, then A ⊆ B means that A is a subset of B. This means that every element of A is an element of B. If E is the set of even integers, then E ⊆ Z and E ⊆ R while Z 6⊆ E . Be careful: E 6∈ Z: E is a subset of Z, not an element of Z. Note also that for any set A, ∅ ⊆ A: the empty set is a subset of every set. To prove that A ⊆ B, prove the implication “x ∈ A ⇒ x ∈ B”. To prove that A = B, prove both A ⊆ B and A ⊇ B; that is, prove “x ∈ A ⇒ x ∈ B and x ∈ B ⇒ x ∈ A.” Sets Let A and B be sets. Basic definitions: A ∪ B: the union of A and B A ∩ B: the intersection of A and B A − B: the difference of A and B (sometimes written A \ B instead) Example If A = {1, 2, 3, 4} and B = {1, 3, 5}, then A ∪ B = {1, 2, 3, 4, 5}, A ∩ B = {1, 3}, A − B = {2, 4}, B − A = {5}. B 3 4 1 2 5 A Sets Ac : the complement of A. This is only defined if we have specified a “universal set” U, and then Ac = U − A. Example If Q is the universal set, then c 1 1 ,3 = Q − ,3 2 2 and (Q>4 )c = Q≤4 P(A): the power set of A, the set of all subsets of A Example n o P({1, 2, 5}) = ∅, {1}, {2}, {5}, {1, 2}, {1, 5}, {2, 5}, {1, 2, 5} . Working within {1, 2, 5}, we have {1}c = {2, 5} and {1, 5}c = {2}. Sets Proposition Let A, B and C be sets. 1 (A ∪ B)c = Ac ∩ B c . 2 A ∪ (B ∩ C ) = (A ∪ B) ∩ (A ∪ C ). 3 A ∩ (B ∪ C ) = (A ∩ B) ∪ (A ∩ C ) (done in the book). 4 A ⊆ B if and only if A ∪ B = B. Proof. For 1, 2, and 3, we need to prove that two sets are equal, so we have to prove two inclusions: (left side) ⊆ (right side) and (left side) ⊇ (right side). Number 4 will also have two parts, since it is an “if and only if” statement: A ⊆ B ⇒ (A ∪ B ⊆ B and A ∪ B ⊇ B), and (A ∪ B = B) ⇒ A ⊆ B. Sets Proof that (A ∪ B)c = Ac ∩ B c . We need to show that (A ∪ B)c ⊆ Ac ∩ B c and that (A ∪ B)c ⊇ Ac ∩ B c . To show that (A ∪ B)c ⊆ Ac ∩ B c , suppose that x ∈ (A ∪ B)c . Then x 6∈ A ∪ B, so x is not in A or B; equivalently, x is not in A and x is not in B. Thus x 6∈ A and x 6∈ B: x ∈ Ac and x ∈ B c . So x ∈ Ac ∩ B c . This proves that (A ∪ B)c ⊆ Ac ∩ B c . To show that (A ∪ B)c ⊇ Ac ∩ B c , suppose that x ∈ Ac ∩ B c . Then x ∈ Ac and x ∈ B c , so x is not in A and x is not in B. Thus x is not in A ∪ B, so x ∈ (A ∪ B)c . This proves that (A ∪ B)c ⊇ Ac ∩ B c , and thus the proof. Sets Proof that A ∪ (B ∩ C ) = (A ∪ B) ∩ (A ∪ C ). We need to show that A ∪ (B ∩ C ) ⊆ (A ∪ B) ∩ (A ∪ C ) and that A ∪ (B ∩ C ) ⊇ (A ∪ B) ∩ (A ∪ C ). To show that A ∪ (B ∩ C ) ⊆ (A ∪ B) ∩ (A ∪ C ), suppose that x ∈ A ∪ (B ∩ C ). Then x ∈ A or x ∈ B ∩ C , so there are two cases. If x ∈ A, then x ∈ A ∪ B and x ∈ A ∪ C , so x ∈ (A ∪ B) ∩ (A ∪ C ). If x ∈ B ∩ C , then x ∈ B and x ∈ C , so x ∈ A ∪ B and x ∈ A ∪ C , so just as in the first case, x ∈ (A ∪ B) ∩ (A ∪ C ). This proves that A ∪ (B ∩ C ) ⊆ (A ∪ B) ∩ (A ∪ C ). To show that A ∪ (B ∩ C ) ⊇ (A ∪ B) ∩ (A ∪ C ), suppose that x ∈ (A ∪ B) ∩ (A ∪ C ). Then x ∈ A ∪ B and x ∈ A ∪ C . Therefore either x ∈ A or x ∈ B, and x ∈ A or x ∈ C . If x ∈ A, then x ∈ A ∪ (B ∩ C ). If x 6∈ A, then x ∈ B and x ∈ C , so x ∈ B ∩ C , so, again, x ∈ A ∪ (B ∩ C ). This proves that A ∪ (B ∩ C ) ⊇ (A ∪ B) ∩ (A ∪ C ), which finishes the proof. Sets Proof that A ∩ (B ∪ C ) = (A ∩ B) ∪ (A ∩ C ). (Done in book.) We need to show that A ∩ (B ∪ C ) ⊆ (A ∩ B) ∪ (A ∩ C ) and that A ∩ (B ∪ C ) ⊇ (A ∩ B) ∪ (A ∩ C ). To show that A ∩ (B ∪ C ) ⊆ (A ∩ B) ∪ (A ∩ C ), suppose that x ∈ A ∩ (B ∪ C ). Then x ∈ A and x ∈ B ∪ C . If x ∈ B, then x ∈ A ∩ B. If x ∈ C , then x ∈ A ∩ C . In either case, x ∈ (A ∩ B) ∪ (A ∩ C ). This proves that A ∩ (B ∪ C ) ⊆ (A ∩ B) ∪ (A ∩ C ). To show that A ∩ (B ∪ C ) ⊆ (A ∩ B) ∪ (A ∩ C ), suppose that x ∈ (A ∩ B) ∪ (A ∩ C ). Then x ∈ A ∩ B or x ∈ A ∩ C . Therefore either x ∈ A and x ∈ B, or x ∈ A and x ∈ C . In either case, x ∈ A. Either x ∈ B or x ∈ C , so x ∈ B ∪ C . Thus x ∈ A ∩ (B ∪ C ). This proves that A ∩ (B ∪ C ) ⊇ (A ∩ B) ∪ (A ∩ C ), which finishes the proof. Sets Proof that A ⊆ B if and only if A ∪ B = B. Suppose that A ⊆ B. We want to show that A ∪ B = B. If x ∈ A ∪ B, then x ∈ A or x ∈ B. If x ∈ A, then x ∈ B since A ⊆ B. So in either case, x ∈ B. Thus A ∪ B ⊆ B. It is always true that A ∪ B ⊇ B. Combining these gives A ∪ B = B. Now suppose that A ∪ B = B. We want to show that A ⊆ B, so suppose that x ∈ A. Then x ∈ A ⊆ A ∪ B = B, so x ∈ B. Thus every element of A is in B, so A ⊆ B. This completes the proof.