Let U be a "universal" set for a given discussion Then define A^c = A-complement = U - A = {x | x in U ^ x not in A}. So x in A^c iff x not in A (where U is the domain for x) DeMorgan's Laws: (A int B)^c = A^c u B^c, etc example of proof by element nethod: x in (A int B)^c iff x not in (A int B) iff ~(x in A int B) iff ~(x in A & x in B) iff x not in A v x not in B iff x in A^c v x in B^c Equality of sets: two sets A and B are said to be equal if they have the very same elements: A = B iff ForAll x (x in A iff x in B). This can also be expressed as A = B iff (A subst of B, and B subst of A) Sets give is a new look as "if...then...": ForAll x (Px --> Qx) is regarded as true if {x | Px} subst {x | Qx}. Any x *not* in P is irrelevant to this. This means that in taking ForAll x (Px --> Qx) to be true, we are saying that no matter what x is, Px --> Qx is true, even when x is not in {x | Px}, ie., even when Px is false. That is, when Pb fails, we need to take Pb --> Qb to be true, since we don't want such a b (one not in {x | Px}) to be able to have any negative affect on the truth of ForAll x (Px --> Qx}. EXAMPLE: Every prime integer > 2 is odd. We can write this as ForAll x (PrimeInt(x) --> Odd(x)). And we want it to come out true, literally, for ALL x. So what about when x=4, say? We want PrimeInt(4 --> Odd(4) to be true. And the same for PrimeInt(9) --> Odd(9). So this FORCES us to take the truth table for if-then (ie, for the conditional connective -->) to be the way we did in chapter 2. More on cardinality: | A u B | = |A| + |B| if A and B are disjoint (A int B = empty) In general: |A u B| = |A| + |B| - |A int B|, as a picture quickly shows. Similarly, |A u B u C| = |A| + |B| + |C| - |AnB| - |BnC| - |AnC| + |AnBnC| |P(A)| = 2^|A| Proof (easy way; will do it again later with induction) Let A = {a1,a2,...,an} To form a subset we need to decide, for each ai, whether to include it or not. This is a sequence of decisions: start a1 yes no 2 paths so far a2 y n y n 2^2 paths to this level ... an yn yn yn yn ... yn yn yn 2^n paths; and each path gives a unique seq of choices, and every subst can be formed that way. So there are 2^n subsets of a set with n elements: |P(A)| = 2^|A|. Partitions: Let S be nonempty. A partition of S is a collection (set) of subsets A1, A2, .., An of S such that (i) S = A1 u A2 u ... u An (ii) Si int Sj = empty if i=/=j. Think of S in terms of maps. Let S be a geographic population (pictured as spread out across a large territory). Then if we divide S up into countries, so the people in each of those countries is a subset of S, each person in S is in exactly one country (one subset). Their union is all of S, and no two countries overlap. Examples: Z = integers = 2Z u (1+2Z) = Evens u Odds Z = 3Z u (1+3Z) u (2+3Z) Z = 4Z u (1+4Z) u (2+4Z) u (3+4Z) etc N = non-neg integers = Primes u Composites U {1} Infinite sets; Russell's paradox; Turing and the Halting Prob