Sets 2/36 We will not give a precise definition of what is a set, but we will say precisely what you can do with it. Sets Lectures 7 and 8 (hapter 16) (Think of a set as a collection of things of which order and multiplicity do not matter.) s: {0, 1, 2, 3} = {3, 1, 0, 2} = {3, 1, 1, 1, 0, 0, 2}. {6} is the singleton set (N: {6} 6). denotes the empty set (i.e., the set without elements). N, Z: standard set-theoretic notations for sets of numbers. Specifying sets, membership 3/36 Subset, universe 4/36 We write t X for t is an element of the set X. Specifying a set using a predicate {x D P (x)} : the set of all x D such that P (x). s {n N n > 10} is the set of all natural numbers greater than 10; {x Z x 2 + x 0} = { 1, 0}. Membership The element-of predicate is a binary predicate. Property of : t {x D P (x)} == t D P (t) def = x [x : x ] Property of : ( ) t == t The universe, denoted by U, is a set of which all sets in a particular context are subsets. Property of U: t U == True is a subset of (notation: ) if every element of is also an element of U D E
Equality of sets 6/36 Intersection 7/36 Two sets are equal if they have exactly the same elements. The intersection of and is the set of everything that is both in and in {x Z x > 0} = {n N n 0} def = {x U x x } = def = {n N n > 5} {n N n < 10} = {6, 7, 8, 9} Property of =: = == x [x x ] = t == t = t == t Leibniz for =: = = Property of : t == t t Union 8/36 ommutativity and associativity of and 9/36 The union of and is the set of everything that is in or in def = {x U x x } {n N n > 5} {n N n < 10} = N Property of : t == t t and are commutative: =, and = ; and are associative: ( ) = ( ), and ( ) = ( ).
10/36 Reasoning with the subset predicate 11/36 ( ) = ( ) does not hold for all sets, and! -introduction: -elimination: 2 1 3 5 4 6 7 8 ( ) 1 2 3 4 5 6 7 8 ( ) ounterexample: Let = {1, 2, 4, 5}, = {2, 3, 5, 6} and = {4, 5, 6, 7}. Then = {2, 5}, ( ) = {2, 4, 5, 6, 7}, = {2, 3, 4, 5, 6, 7}, and ( ) = {2, 4, 5}. So ( ) = {2, 4, 5, 6, 7} {2, 4, 5} = ( ). { ssume: } (k) var x; x. (l 2) x { -intro on (k) and (l 2): } (l 1) x [x : x ] { Definition of on (l 1): } (l) ( ) (k) (l) (m) ( ) t { Property of on (k) and (l): } t 12/36 omplement 15/36 The complement of is the set of everything not in U ( ) Fact ( ) ( ) does hold. [Proof on blackboard] ( ) def = {x U (x )} (Suppose that U = Z) {x Z x 0} = {x Z x < 0} Property of : t == (t ) N: For computing it is important to know what is the universe: If U = N, then {0, 1} = {n N n 2} If U = Z, then {0, 1} = {x Z x < 0 x 2}.
Difference 16/36 Equality of sets (reasoning) 17/36 The difference of and is the set of everything that is in, but not also in =-introduction: =-elimination: \ def = {x U x (x )} \ (k). (k) = {n N n > 5} \ {n N n < 10} = {n N n 10} (l 2). { -intro on (k) and (l 2): } (l) { Definition of = on (k): } Property of \: t \ == t (t ) (l 1) { Definition of = on (l 1): } (l) = ( ) ( ) s 18/36 Notation 24/36 ssume U = Z. Prove that \ = for all sets and. [Proof on blackboard] Determine for each of the following formulas whether it holds for all sets and. If so, then give a proof; if not, then give a counterexample: \ = = ; = \ =. 0 {{0}} {0} {{0}} {{0}} {{0}} {{0}} 0 {{0}} {0} {{0}} {{0}} {{0}} {{0}}
Empty set 26/36 lternative property of empty set 27/36 The empty set is the unique set without elements. = {x U False} Property of : t == False == True == { Definition } x [x : x ] == { Property of } x [False : x ] == { Empty domain } True == x [x : False] == { Definition of } x [x : x ] == { Property of } x [x : False] From previous slide: (*) == True (**) == x [x : False] So: = == { Definition of = } == { (*) + True/False-elimination } == { (**) } x [x : False] Property of : = == x [x : False] 28/36 Powerset 29/36 The powerset P() of is the set of all subsets of. Prove that = \ = for all sets and. [Proof on blackboard. (lso available as detailed example of a derivation-style proof of a set-theoretic property from ourse Material section of the website)] s P({4, 6}) = {, {4}, {6}, {4, 6}} P({1, 2, 3}) = {, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}} P(R), [0, 5] P(R) 1 P(R), {1} P(R), {2, 5, 7} P(R) N P(R), R P(R) P({, { }}) = {, { }, {{ }}, {, { }}} If # = n, then #P() = 2 n.
Powerset in proofs 30/36 P() \ P() P( \ ) 31/36 Property of P: P() == s Prove that P() P( ) for all sets and. [Exercise] Does P() \ P() P( \ ) hold for all sets and? [nswer on next slide] X P() \ P() == { Property of \ } X P() (X P()) == { Property of P (2 ) } X (X ) ounterexample: Let = {1, 2}, = {2} and X = {1, 2}. Then X, so X P(). nd (X ), so (X P()). Hence, X P() \ P(). On the other hand, \ = {1}, so (X \ ). Hence, X P( \ ). X P( \ ) == { Property of P } X \ X 1 2 artesian product 32/36 artesian product in proofs 33/36 The artesian product is the set of pairs (a, b) with a and b. Property of : (a, b) == a b s {0, 1} {3, 5, 7} = {(0, 3), (0, 5), (0, 7), (1, 3), (1, 5), (1, 7)} N Z = {(n, x) n N x Z} Prove that 2 for all sets and. (3, 2) N Z ( 2, 3) N Z [See Section 16.9 of the book for the construction of a very similar proof.] N: 2 =, 3 =, etc.
Mind the rackets 34/36 Proofs in Set Theory 35/36 In set theory, brackets have a meaning, and different brackets have different meanings! 0 : a number {0} : a set (containing a number) {{0}} : a set (containing a set containing a number) {0, 1} : a set (containing two numbers, order does not matter) (0, 1) : a pair of numbers (order does matter!) {(0, 1)} : a set (containing a pair of numbers) : a set (containing nothing) { } : a set (containing the empty set) proof of a set-theoretic property is a convincing argument based on given definitions and properties of sets (see table on p. 381*) The logical reasoning structure of the proof must be clear and id, but you may omit references to the names of the logical reasoning steps ( -intro, -elim, -elim, etc.). You may also mix styles (derivations, calculations, natural language). You should, however, explicitly refer to the set-theoretic properties (Property of, Definition of, etc.) in your proof. * Leibniz for equality of sets may be used as well, although it is not in the table. ounterexamples in Set Theory 36/36 To refute the idity of a set-theoretic property, it is not enough to provide a diagram, or an informal reasoning of another kind. counterexample consists of 1. clear and concrete declarations of the sets involved (e.g., let =..., let =... ); 2. euation of the expressions involved (e.g., then =... ); 3. a convincing argument why the property is refuted (e.g., since the left-hand side of the implication is true, but the right-hand side is not, it follows that the implication is false).