<<

CSC 224/226 Notes Packet #2: Set Theory & Predicate Calculus Barnes

Packet #2: Set Theory & Predicate Calculus

Applied Discrete Mathematics

Table of Contents

Full Adder Information Page 1 Predicate Calculus Information Pages 2-9 First Hour Exam Study Sheet Page 10 Some First Hour Exam review material Pages 11-16 Set Theory Information Pages 17-26 Arithmetic Proofs Information Page 27

CSC 224/226 Notes Packet #2: Set Theory & Predicate Calculus Barnes

Design of Full Adder

A full binary adder has 3 inputs 1. bit A (X) 2. bit B (Y) 3. carry in (C) and 2 outputs 1. bit out (S) 2. carry to next digit (Cout )

Start by making table assuming all inputs and specifying all outputs.

Inputs Outputs X Y C S Cout 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 0 1 1 1 0 0 1 1 1 1 1 1 then write "and" condition for all "1" outputs then "or" all "and" conditions.

S = X'Y'C + X'YC' + XY'C' + XYC Cout = X'YC + XY'C + XYC' + XYC then simplify.

1 Predicate Calculus Outline

I. Predicates - binding of variables to form .

II. General Quantifiers A. ∀ - Universal - means "for all" B. ∃ - Existential - means "there exists" C. Combinations of two variables using quantifiers D. Distribution of using De Morgan's rules

III. Compound propositions of a single variable and proving set theory problems (next topic that will be covered)

2 Predicate - function which becomes a when the variables are assigned values from an appropriate Universe of Discourse (U).

QUANTIFIERS

P(x): x2 > x (not a proposition) But these are: - For all x in ℜ, x2 > x - For some x in ℜ, x2 > x - There exists x in ℜ for which x2 > x

Predicates

1. P(x): x2 > x P(x) is not a proposition Choose value for x from ℜ. P(5): 52 > 5 pin variable at 5 P(5) is a proposition

2. P(x): x ⊕ x = x P(x) is not a proposition Choose value for x from P({0,1}). P(0): 0 ⊕ 0 = 0 pin variable at 0 P(0) is a proposition

3. Q(x,y): (x < y) ∧ (x2 < y2 ) Q(x,y) is not a proposition Choose x,y from ℜ. Q(-3,2): (-3 < 2) ∧ ((-3)2 < 22 ) Q(-3,2) is a proposition

From predicates (P(x), Q(x)) one can form compound predicates:

¬P(x) (P(x) → Q(x)) (P(x) ∨ Q(x)) (P(x) ↔ Q(x)) (P(x) ∧ Q(x)) ∃x P(x) ∀x Q(x) Example: [ ∃x (P(x) ∧ Q(x)) → ( ∃x P(x) ∧ ∃x Q(x))]

3 Propositional Equivalences and Implications Still Hold

Example: ( ∃x P(x) → ∀x Q(x)) ⇔ ( ¬(∃x P(x)) ∨ ∀x Q(x)) (implication equivalence)

Example: ∀x (P(x) → Q(x)) ∧ ∃x P(x) ⇒ ∃x Q(x) ( implication)

Also Have New Relationships:

De Morgan's Rules in Predicate Calculus

¬(∀x P(x)) ⇔ ∃x (¬P(x))

¬(∀x P(x)) P(x) ⇔ ¬P(x) ∃x (¬P(x))

1 at least one 1 (at least 1 P(x) false one true) 0 all P(x) true 1 (all false) 0

¬(∃x P(x)) ⇔ ∀x (¬P(x))

P(x) ¬(∃x P(x)) ⇔ ∀x (¬P(x)) ¬P(x) all false 1 1 1 (all true) at least 0 1 0 (at least one true one false)

4 Predicate Calculus Example 1: ∀x P(x) ∧ ∀x Q(x) ⇔ ∀x [P(x) ∧ Q(x)]

We have two propositions on the left side which form the compound proposition [∀x P(x) ∧ ∀x Q(x)]. We must consider all combinations of the truth values:

∀x P(x) ∀x Q(x) ∀x P(x) ∧ ∀x Q(x) ∀x [P(x) ∧ Q(x)]

0 0 0 Row 1 0 1 0 Row 2 1 0 0 Row 3 1 1 1 Row 4

Row 1: ∀x P(x) = 0 → P(x) has at least one 0 (false for some value of x) ∀x Q(x) = 0 → Q(x) has at least one 0 Therefore, P(x) ∧ Q(x) has at least one 0 Therefore, ∀x(P(x) ∧ Q(x)) = 0

Row 2: ∀x P(x) = 0 → P(x) has at least one 0 ∀x Q(x) = 1 → Q(x) = 1 for all x P(x) ∧ Q(x) = 0 since P(x) = 0 for some x Therefore, ∀x(P(x) ∧ Q(x)) = 0

Row 3: ∀x P(x) = 1 ∀x Q(x) = 0 Work same way and show Case 3 = 0

Row 4: ∀x P(x) = 1 ∀x Q(x) = 1 Work same way and show Case 4 = 1

∀x P(x) ∧ ∀x Q(x) ⇔ ∀x [P(x) ∧ Q(x)] is the same on both sides of the truth table and therefore the is true.

5 Predicate Calculus Conversion Example: We can prove that: ∃x P(x) ∨ ∃x Q(x) ⇔ ∃x [P(x) ∨ Q(x)] from our previous statement without using truth tables:

Start: ∀x P(x) ∧ ∀x Q(x) ⇔ ∀x [P(x) ∧ Q(x)] negate both sides ¬[∀x P(x) ∧ ∀x Q(x)] ⇔ ¬[∀x [P(x) ∧ Q(x)]] ∃x [¬P(x)] ∨ ∃x [¬Q(x)] ⇔ ∃x [¬P(x) ∨ ¬Q(x)] substitute ¬P(x) = A(x) ¬Q(x) = B(x) ∃x [A(x)] ∨ ∃x [B(x)] ⇔ ∃x [A(x) ∨ B(x)]

Predicate Calculus Truth Table Example 2:

Is ∀x P(x) ∨ ∀x Q(x) ⇔ ∀x [P(x) ∨ Q(x)] true?

∀x P(x) ∀x Q(x) ∀x P(x) ∨ ∀x Q(x) ∀x [P(x) ∨ Q(x)]

0 0 0 Row 1: Can be true for 0 1 1 some P(x) ∨ Q(x) and 1 0 1 therefore not logically 1 1 1 equivalent. (See example below.)

Row 1: ∀x P(x) = 0 → P(x) has at least one 0 ∀x Q(x) = 0 → Q(x) has at least one 0 Does P(x) ∨ Q(x) always have at least one "0" for any P(x) and Q(x)? ∀x P(x) ∀x Q(x) P(x) Q(x) P(x) ∨ Q(x) ∀x [P(x) ∨ Q(x)]

0 0 0 1 1 1 0 0 1 0 1 1

6 Predicate Calculus Truth Table Example 3 (Independent Variables): ∀x P(x) ∨ ∃y Q(y) ⇔ ∀x ∃y [P(x) ∨ Q(y)]

We have two propositions on the left side which form the compound proposition ∀x ∃y [P(x) ∨ Q(y)].We must consider all combinations of the truth values:

∀x P(x) ∃y Q(y) ∀x P(x) ∨ ∃y Q(y) ∀x ∃y [P(x) ∨ Q(y)]

0 0 0 Row 1 0 1 1 Row 2 1 0 1 Row 3 1 1 1 Row 4

Row 1: ∃y Q(y) = 0 → Q(y)=0 for all y values Therefore, sub in Q(y)=0 to get ∀x ∃y [P(x) ∨ 0 ] = ∀x ∃y P(x) = ∀x P(x) Therefore, since ∀x P(x) is false, then ∀x ∃y [P(x) ∨ Q(y)] = 0

Row 2: ∃y Q(y) = 1 → Q(c)=1 for some c Therefore, sub in Q(y)=1 to get ∀x ∃y [P(x) ∨ 1 ] = ∀x ∃y 1 = 1 Therefore, ∀x ∃y [P(x) ∨ Q(y)] = 1

Row 1: ∃y Q(y) = 0 → Q(y)=0 for all y values Therefore, sub in Q(y)=0 to get ∀x ∃y [P(x) ∨ 0 ] = ∀x ∃y P(x) = ∀x P(x) Therefore, since ∀x P(x) is true, then ∀x ∃y [P(x) ∨ Q(y)] = 1

Row 2: ∃y Q(y) = 1 → Q(c)=1 for some c Therefore, sub in Q(y)=1 to get ∀x ∃y [P(x) ∨ 1 ] = ∀x ∃y 1 = 1 Therefore, ∀x ∃y [P(x) ∨ Q(y)] = 1

∀x P(x) ∨ ∃y Q(y) ⇔ ∀x ∃y [P(x) ∨ Q(y)] is the same on both sides of the truth table and therefore the statement is true. In this case, the variables in each predicate are independent, so the order of the quantifiers DOES NOT MATTER.

7 Example: Definition of Continuity

A function of f is continuous on the real numbers if and only if ∀ε [(ε > 0) → ∃δ ((δ > 0) ∧ ∀x∀y [x - y < δ → f(x) - f(y) < ε])] Universe of Discourse = ℜ

One can negate an expression. For example, consider the expression ∀x [P(x) → ∃y Q(y)], negating gives the following:

¬ ∀x [P(x) → ∃y Q(y)] ⇔ ∃x ¬ [P(x) → ∃y Q(y)] ⇔ ∃x ¬ [¬P(x) ∨ ∃y Q(y)] ⇔ ∃x [P(x) ∧ ¬(∃y Q(y))] ⇔ ∃x [P(x) ∧ ∀y ¬(Q(y))]

**Recommended: Negate the definition of continuity: i.e., f is not continuous on ℜ ⇔ …

8 Given the following predicates, evaluate the propositions generated by using the indicated quantifiers with those predicates.

P(x,y) x ∈ ℜ, y ∈ ℜ P(x,y) x ∈ {0,1}, y ∈ {0,1} Quantifiers x2 + y = y2 + 2x x → y

∀x∀y = ∀y∀x 0 (x = 1 and y = 2 is false) 0 (x = 1 and y = 0 is false)

∃x∃y = ∃y∃x 1 (x = 0 and y = 0 is true) 1 (x = 0 and y = 0 is true)

1 x y 0: (2x - x2 ) < , for x = 1 is imag 1: y = 1 ∀ ∃ 4 See ** below. ∃y∀x 0 1: y = 1

∀y∃x 1: y - y2 < 1, is real for all y 1: x = 0 See * below. ∃x∀y 0 1: x = 0

*: ∀y∃x Case: x2 + y = y2 + 2x **: ∀x∃y Case: x2 + y = y2 + 2x x2 - 2x - (y2 - y) = 0 y2 - y - (x2 - 2x) = 0

2 ± 4 + 4(y2 - y) 1 ± 1 + 4(x2 - 2x) x = y = 2 2 (4 + 4(y2 - y)) > 0 (1 + 4(x2 - 2x)) > 0 4(y2 - y) > -4 4(x2 - 2x) > -1 1 y2 - y > -1 x2 - 2x > - 4 1 y - y2 < 1 2x - x2 < 4 is true for all values is false when x = 1 of y

9 First Hour Exam Study Sheet

I. Truth tables Be able to prove a logical equivalence or implication with a truth table.

II. General knowledge Be familiar with: DeMorgan's laws that relate ∨ to ∧, modus ponens, , contrapositive, implication laws relating → to ∨ and ∧, transitivity laws, constructive and destructive dilemmas for combining multiple implications, etc.

III. Understand a as well as an indirect proof such as proof by

IV. Be able to follow and give reasons for each step in a proof

V. Be able to test if a proposition is true by use of a truth table and give if true or counter example if false

VI. Be able to prove a proposition by contradiction

VII. Logic circuits A. Be able to produce logic statements from a logic circuit B. Be able to change the form of the logic statement by use of logical equivalences C. Be able to produce a logic circuit from the logic statement D. Know the symbols for and's, or's, nand's, nor's, etc.

VIII. Predicate Calculus A. Know quantifiers, FOR ALL and THERE EXISTS B. Be able to apply DeMorgan’s and other logical equivalence rules to predicate calculus statements C. Be able to prove logical impications and logical equivalences in predicate calculus using truth tables D. Be able to write predicate calculus statements in English and convert English statements to predicate calculus.

10 Some First Hour Exam Review Material

These proofs are intended as extra practice problems for the first hour exam. They do not have to be turned in and will not be collected. However, they are recommended, since the same types of problems will be encountered on the exam. A solution for each problem is attached. Reminder: There are a variety of solutions for each problem, so your solution may or may not match the solution given. Do a direct and indirect proof for each.

1. Given: p → (q → r) Prove: s → r (p ∨ ¬s) q

2. Given: p → q Prove: t → (¬p ∧ ¬r) r → s (q ∨ s) → ¬t

3. Given: p → (q ∨ r) Prove: p → (r ∨ s) q → s

11 Solutions

1.

Direct Proof: Statement Reason 1. p → (q → r) Given 2. (p ∨ ¬s) Given 3. q Given 4. ¬p → ¬s 2; Implication (rule 10a) 5. s → p 4; Contrapositive (rule 9) 6. s → (q → r) 1,5; Hypothetical (rule 24) 7. s → (¬q ∨ r) 6; Implication (rule 10a) 8. (¬s ∨ (¬q ∨ r)) 7; Implication (rule 10a) 9. ((¬s ∨ r) ∨ ¬q) 8; Associate (rule 3a) 10. (¬s ∨ r) 3,9; (rule 21) 11. s → r 10; Implication (rule 10a)

Indirect Proof: Statement Reason 1. p → (q → r) Given 2. (p ∨ ¬s) Given 3. q Given 4. ¬(s → r) Negation of Conclusion 5. (s ∧ ¬r) 4; Implication (rule 10b) 6. ¬p → ¬s 2; Implication (rule 10a) 7. s → p 6; Contrapositive (rule 9) 8. s 5; Simplification (rule 17) 9. p 7,8; Modus Ponens (rule 19) 10. q → r 1,9; Modus Ponens (rule 19) 11. ¬r 5; Simplification (rule 17) 12. ¬q 10,11; Modus Tollens (rule 20) 13. (¬q ∧ q) 3,12; Conjunction (rule 34) 14. Contradiction 13; Rule 7b

12 2.

Direct Proof: Statement Reason 1. p → q Given 2. r → s Given 3. (q ∨ s) → ¬t Given 4. (p ∨ r) → (q ∨ s) 1,2; Constructive Dilemmas (rule 26a) 5. (p ∨ r) → ¬t 3,4; (rule 24) 6. t → ¬(p ∨ r) 5; Contrapositive (rule 9) 7. t → (¬p ∧ ¬r) 6; DeMorgan (rule 8a)

Indirect Proof: Statement Reason 1. p → q Given 2. r → s Given 3. (q ∨ s) → ¬t Given 4. ¬[t → (¬p ∧ ¬r)] Negation of Conclusion 5. ¬[t → ¬(p ∨ r)] 4; DeMorgan (rule 8a) 6. (t ∧ (p ∨ r)) 5; Implication (rule 10b) 7. t 6; Simplification (rule 17) 8. (p ∨ r) 6; Simplification (rule 17) 9. (p ∨ r) → (q ∨ s) 1,2; Constructive Dilemmas (rule 26a) 10. (q ∨ s) 8,9; Modus Ponens (rule 19) 11. ¬t 3,10; Modus Ponens (rule 19) 12. (t ∧ ¬t) 7,11; Conjunction (rule 34) 13. Contradiction 12; Rule 7b

13 3.

Direct Proof: Statement Reason 1. p → (q ∨ r) Given 2. q → s Given 3. (q ∨ r) → (s ∨ r) 2; Rule 25a 4. p → (s ∨ r) 1,3; Hypothetical Syllogism (rule 24) 5. p → (r ∨ s) 4; Commutative (rule 2a)

Indirect Proof: Statement Reason 1. p → (q ∨ r) Given 2. q → s Given 3. ¬(p → (r ∨ s)) Negation of Conclusion 4. (p ∧ ¬(r ∨ s)) 3; Implication (rule 10b) 5. p 4; Simplification (rule 17) 6. ¬(r ∨ s) 4; Simplification (rule 17) 7. (¬r ∧ ¬s) 6; DeMorgan (rule 8a) 8. ¬r 7; Simplification (rule 17) 9. ¬s 7; Simplification (rule 17) 10. ¬q 2,9; Modus Tollens (rule 20) 11. (¬q ∧ ¬r) 8,10; Conjunction (rule 34) 12. ¬(q ∨ r) 11; DeMorgan (rule 8a) 13. ¬p 1,12; Modus Tollens (rule 20) 14. (¬p ∧ p) 5,13; Conjunction (rule 34) 15. Contradiction 14; Rule 7b

14 More First Hour Exam Review Material

These proofs are intended as extra practice problems for the first hour exam. They do not have to be turned in and will not be collected. However, they are recommended, since the same types of problems will be encountered on the exam. A solution for each problem is attached. Reminder: There are a variety of solutions for each problem, so your solution may or may not match the solution given. Do a direct proof for each.

1. Given: p →q Prove: q ∨ s r → s r ∨ p

2. Given: p → q Prove: ¬ (p ∧ r) r → s ¬q∨ ¬s

3. Given: p →s Prove: s q∨ p ¬q

4. Use the contrapositive and DeMorgan’s laws on the right side of the following:

[(p → q) ∧ (r → s)] ⇒ [(p ∨ r) → (q ∨ s)] (Note: This is the )

to obtain the following:

[(p → q) ∧ (r → s)] ⇒[(¬q ∧ ¬s) → (¬p ∧ ¬r)] (Note: This is ).

5. Use the implication rule on the left side of the following:

[(p → q) ∧ ¬q ]⇒¬p (Note: This is Modus Tollens)

to obtain the following:

[(¬p ∨ q) ∧ ¬q] ⇒ ¬p (Note: This is Disjunctive Syllogism).

15 Solutions

1. Statement Reason 1. p → q Given 2. r → s Given 3. r ∨ p Given 4. (p ∨ r) → (q ∨ s) 1,2; Constructive Dilemmas (rule 26a) 5. p ∨ r 3; Commutative Laws (rule 2a) 6. q ∨ s 4,5; Modus Ponens (rule 19)

2. Statement Reason 1. p → q Given 2. r → s Given 3. ¬q ∨ ¬s Given 4. ¬ (q ∧ s) 3; DeMorgan’s Laws (rule 8b) 5. (p ∧ r) → (q ∧ s) 1,2; Constructive Dilemmas (rule 26b) 6. ¬ (p ∧ r) 4,5; Modus Tollens (rule 20)

3. Statement Reason 1. p → s Given 2. q ∨ p Given 3. ¬q Given 4. p 2,3; Disjunctive Syllogism (rule 21) 5. s 1,4; Modus Ponens (rule 19)

------4. [(p → q) ∧ (r → s)] ⇒ [(p ∧ r) → (q∧ s)] [(p → q) ∧ (r → s)] ⇒ [¬ (q∧ s) → ¬ (p ∧ r)] Contrapositive [(p → q) ∧ (r → s)] ⇒ [(¬q ∨ ¬s) → (¬p ∨ ¬r)] DeMorgan’s

5. [(p → q) ∧ ¬q] ⇒ ¬p [(¬p ∨ q) ∧ ¬q] ⇒ ¬p Implication

16 Set Theory Outline

I. Definitions

II. Operations

III. Use of Venn Diagrams

IV. Set Proofs using Set Theory and Predicate Calculus

17 Sets

Use capital letters such as A, B, C for set designation.

Use small letters such as a, b, c for elements of a set.

A = {a,b,c} {elements} ∈ = is element of a ∈ A

A represents cardinality (number of elements) of a set. A = {a,b,c} = 3

Sets can be represented by a general description. B = {n  n ∈ P} The elements of B are n such that n is an element of P.

There are some special representations: [a,b] = {x ∈ ℜ: a ≤ x ≤ b} [a,b) = {x ∈ ℜ: a ≤ x < b} (a,b] = {x ∈ ℜ: a < x ≤ b} (a,b) = {x ∈ ℜ: a < x < b}

Note: [1,2] infinite number of elements (1,2) infinite number of elements {1,2} two elements

∅ (also written { }) is the symbol for the empty set (the set with no elements).

Elements of a set can be sets: A = {1,2,3} A = 3 B = {a,b,c,d} B = 4 C = {A,B} C = 2

18 Note: ∅ = 0 However {∅} = 1 P(A) is the power set of A. The power set is the set of elements which are all possible subsets of A. For any set A, ∅ A. (The empty set is a subset of all sets.)

Examples: A = {0,1} Subsets of A: ∅, {0}, {1}, {0,1} P(A) = {∅,{0},{1},{0,1}} A = {a,b,c} Subsets of A: ∅, {a}, {b}, {c}, {a,b}, {a,c}, {b,c}, {a,b,c}

P(A) = {∅,{a},{b},{c},{a,b},{a,c},{b,c},{a,b,c}} Suppose A = ∅ A = 0 P(A) = {∅} {∅} = 1 A = {a,b} A = 2 P(A) = {∅,{a},{b},{a,b}} P(A) = 4 A = 3 P(A) = 8 A = n P(A) = 2n prove by induction A = ∅ A = 0 P(A) = 1 20 = 1 true for zero A = n + 1 A = {e1 ,e2 ,…,en ,en+1 } P(A) = P(A/{e }) + P[(A/{e }) {e }] n +1 n+1 ∪ n+1 P(A) = 2n + 2n 2 ⋅ 2n = 2n+1

19 Set Operations

Let: A = {1,2,5,7,9} B = {1,5,6,8}

∪ = union of sets A ∪ B = {x  x ∈ A or x ∈ B} A ∪ B = {1,2,5,6,7,8,9}

∩ = intersection of sets A ∩ B = {x  x ∈ A and x ∈ B} A ∩ B = {1,5}

\ or - = difference (relative complement) of sets A/B = {x  x ∈ A and x ∉ B} Also written as (A ∩ Bc ) or (A - B) A/B = {2,7,9} B/A = {6,8}

⊕ = symmetric difference (xor) of sets A ⊕ B = {x  (x ∈ (A ∪ B)) and (x ∉ (A ∩ B))} Also written as (A/B ∪ B/A) A ⊕ B = {2,6,7,8,9}

= subset of a set A B = {x  if x ∈ A then x ∈ B}

= proper subset of a set A B = {x  if x ∈ A then x ∈ B, but not for all x ∈ B} Also written as (A ≠ B)

U = universal set being considered i. e.: ℵ, ℜ, etc. c = absolute complement of a set Ac = {x  x ∉ A} Also written as (U/A)

20 Laws of Algebra of Sets

1. Commutative Laws a. A ∪ B = B ∪ A b. A ∩ B = B ∩ A

2. Associative Laws a. (A ∪ B) ∪ C = A ∪ (B ∪ C) b. (A ∩ B) ∩ C = A ∩ (B ∩ C)

3. Distributive Laws a. A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) b. A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)

4. Idempotent Laws a. A ∪ A = A b. A ∩ A = A

5. Identity Laws a. A ∪ ∅ = A b. A ∩ ∅ = ∅ c. A ∪ U = U d. A ∩ U = A

6. Double Complementation (Ac )c = A

7. a. A ∪ Ac = U b. A ∩ Ac = ∅

8. a. Uc = ∅ b. ∅c = U

9. De Morgan Laws a. (A ∪ B)c = Ac ∩ Bc b. (A ∩ B)c = Ac ∪ Bc

21 Venn Diagrams

Union - A ∪ B

Intersection - A ∩ B

Relative Complement - A/B

Symmetric Difference - A ⊕ B

22

Absolute Complement - Ac

Examples:

1. Show (A-B)-C ≠ A-(B-C) Let A = {1,2} B = {1,3} C = {2,3} Then (A-B)-C = {2}-{2,3} = ∅, but A-(B-C) = {1,2}-{1} = {2}

2. Show (A-B)-C A-(B-C)

(A-B)-C A-(B-C)

23 Examples involving the empty set: {n ∈ ℵ  2 < n < 3} = ∅ {r ∈ Q  r2 = 2} = ∅ {x ∈ ℜ  x2 < 0} = ∅

Illustration of the Distributive Laws: A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)

∪ ∩

Consider De Morgan's Laws: (A ∪ B)c = Ac ∩ Bc

(A ∪ B)c Ac ∩ Bc

24 Computer Representation of Subsets of a Small Set S 3-bit binary numbers S = {a,b,c} a b c Elements of P(S) 0 0 0 ∅ 0 0 1 {c} 0 1 0 {b} 0 1 1 {b,c} 1 0 0 {a} 1 0 1 {a,c} 1 1 0 {a,b} 1 1 1 {a,b,c}

If S = k then P(S) = 2k .

Cardinality - size of set finite - if number of elements is n for some n ∈ ℵ. infinite- otherwise Set Cardinality {a,b,c} 3 {2,4,…,12} 6 {x ∈ ℜ  x2 + 1 = 0} 0 {2x + 1  x ∈ P} infinite [0,1) infinite ℵ, ℜ, Q, Z, P, C infinite

25 Examples

1. Q ∩ ℜ = Q 2. ℜ-Q = Irrationals 3. ℵ-P = {0} 4. Z ⊕ P = {0,-1,-2,-3,…} 5. ℵ ∪ P = ℵ 6. (0,1) ∩ Z = ∅ 7. (0,1) ∪ [1,2] = (0,2] 8. (0,1) ∩ (1,2) = ∅

True or False?

1. [(A ∈ B) ∧ (B C)] ⇒ (A ∈ C) True: B = {A,…} C

2. [(A ∈ B) ∧ (B C)] ⇒ (A C) False: Counter-example: A = {1}, B = {{1},2}, C = {{1},2,3}

3. [(A ∈ B) ∧ (B ∈ C)] ⇒ (A C) False: Counter-example: A = {1}, B = {{1},2}, C = {{{1},2},3}

26 Arithmetic Proofs Information

N = Natural numbers 0,1,2,3,... P = Positive integers 1,2,3,... Z = all integers ...-3,-2,-1,0,1,2,3,... Q = all rational numbers (ratio of two integers m/n) R = all real numbers

1.) We will deal most often with integers A. Integers are closed under 1. addition 2. multiplication Integers closed under an operation means that if you start with integers and perform these operations, you will end up with an integer. 2 + 3 = 5 all integers 4 * 7 = 28 all integers

9 = (2.25) 9 and 4 are integers 4 but (2.25) is not an integer. Therefore, integers are not closed under division

B. Other properties we will assume: 1. Normal arithmetic rules apply: a. 2 + 3 = 5 b. 4 * 7 = 28 c. 12/3 = 4, etc. 2. Properties of numbers a. x even ⇒ x = 2n (where n is an integer) b. x is odd ⇒ x = 2n + 1 (where n is an integer) c. x is rational ⇒ x = m/n where m and n are integers d. x is prime ⇒ x > 1 (and cannot be factored except by 1 and x) e. x is an integer ⇒ x is prime or a product of primes f. if "a" and "b" are integers; there exist two integers "q" and "r" such that: a = q*b + r where 0 ≤ r < b. g. xy = 0 ⇒ x = 0, y = 0, or both x and y = 0

27

28