Discrete Mathematics

W. Ethan Duckworth

Spring 2018, Loyola University Maryland Contents

1 Logic and Proofs3 1.1 Even and Odd ...... 3 1.2 Common Ground: Algebraic Properties...... 3 1.3 Divides...... 6 1.4 Some Basic Logic...... 7

2 Sets 11 2.1 Introduction to Sets...... 11 2.2 Operations...... 14 2.3 Algebraic properties of operations...... 14

3 Quantifiers and Functions 20 3.1 Quantifiers...... 20

2 Chapter 1

Logic and Proofs

1.1 Even and Odd Numbers 1.2 Common Ground: Algebraic Properties

3 CHAPTER 1. LOGIC AND PROOFS 4

Theorem 1.2.1 (Algebraic Properties of R). The following properties hold for any a, b, c ∈ R: (a) If a + b = a then b = 0. (b) If a + b = a + c then b = c. (c)0 × a = a × 0 = 0. (d) −(−a) = a. (e) −a = −1 × a. (f) a × (−b) = (−a) × b = −(a × b). (g)( −a) × (−b) = a × b. (h) a × (b − c) = a × b − a × c. (i) If a × b = a × c, and a 6= 0, then b = c. (j) If ab = 0 then a = 0 or b = 0. (k)1 > 0. (l) If a > b > 0 then a2 > b2. (m) If a < b, and c < 0 then a × c > b × c. (n) If a < 0 and b > 0 then a × b < 0. If a < 0 and b < 0 then a × b > 0. (o) If a ∈ Z then there is no d ∈ Z such that a < d < a + 1. (p) There exists some n ∈ Z such that n × b > a. Proof. Part (a). Suppose a, b ∈ R such that a+b = a. By the additive inverse property −a exists. Add −a to both sides to get −a + (a + b) = −a + a. By the we can rewrite the left hand side to get

(−a + a) + b = −a + a.

By definition of the additive inverse we have −a + a = 0 and so this becomes 0 + b = 0. (In the future we will combine the last two steps by saying “subtract a from both sides.) By definition of the this means that b = 0. Part (b). Suppose a, b, c ∈ R such that a + b = a + c. By the additive inverse property −a exists. Adding −a to both sides we get −a+(a+b) = −a+(a+c). Using the associative property we have (−a + a) + b = (−a + a) + c. By definition of the additive inverse we have 0 + b = 0 + c. (In the future we will combine the last two steps by saying “subtract a from both sides”.) By definition of the additive identity we have b = c. Part (c). Let a ∈ R. Note that 0 = 0 + 0 and so 0a = (0 + 0)a. Apply the distributive law to get 0a = 0a + 0a. Subtract 0a from both sides to get 0a − 0a = 0a + 0a − 0a which comes 0 = 0a. Part (d). Let a ∈ R. By definition of the additive inverse we have a + (−a) = 0. Subtract (−a) from both sides to get a = −(−a). Part (e). Let a ∈ R. Note that 0 = 1 + (−1) and so 0a = (1 − 1)a. Apply the distributive law to get 0a = 1a + (−1)a. Using the previous part, and the defining property of the multiplicative identity, we get 0 = a + (−1)a. Subtracting a from both sides gives −a = (−1)a. Part (f). Let a, b ∈ R. By the previous part we have −b = (−1)b and −a = (−1)a and −(ab) = (−1)(ab). Then the following three expressions may be rewritten     a × (−b) = a (−1)b , and (−a) × b = (−1)a b, and − (a × b) = (−1)(ab).

All the right hand sides are equal by the associative and commutative properties. Part (g). Let a, b ∈ R. Applying part (e) gives (−a) × (−b) = (−1)a × (−1)b

Applying the commutative and associative properties gives   RHS above = (−1)(−1) ab CHAPTER 1. LOGIC AND PROOFS 5

Applying part (d) gives RHS above = 1ab and applying the defining property of the multiplicative identity gives

RHS above = ab.

Part (h). Let a, b, c ∈ R. Then part (e) gives a(b − c) = a(b + (−1)c)

Now we can apply the distributive property to get

RHS above = ab + a(−1)c

and the associative property and part (f) gives

RHS above = ab − ac.

Part (m). Let a, b, c ∈ R with a < b, and c < 0. Subtract c from both sides of c < 0 to get 0 < −c. Multiply both sides of a < b by −c to get a(−c) < b(−c). Use part (f) to rewrite this as −ab < −bc. Add ab to both sides to get 0 < −bc + ab and add bc to both sides to get bc < ab. Part (j). Let a, b ∈ R. We will prove “if ab = 0 then a = 0 or b = 0” by contrapositive: We’ll assume that a 6= 0 and b 6= 0 and prove that ab 6= 0. There there are four cases: Case 1: a > 0 and b > 0, Case 2: a > 0 and b < 0, Case 3: a < 0 and b > 0, Case 4: a < 0 and b < 0. Of course, cases 2 and 3 are essentially the same, so we will just argue one of them. Case 1. Let a > 0 and b > 0. Apply Real Property ?? part ?? and multiply both sides of b > 0 by a to get ab > a0. By Proposition ?? this becomes ab > 0, which shows that ab 6= 0. Case 2. Let a > 0 and b < 0. Using the same results as before, multiply both sides of b < 0 by a to get ab < a0. This becomes ab < 0, which shows that ab 6= 0. Case 3. This is the same proof as case 2, with a and b switched. Case 4. Let a < 0 and b < 0. Apply Theorem 1.2.1 part (m) and multiply both sides of a < 0 by b to get ab < a0. This becomes ab < 0, which means that ab 6= 0. We have shown that there are exactly 4 cases, and in every case we conclude that ab 6= 0. Therefore, we have proven “if a 6= 0 and b 6= 0, then ab 6= 0”. By contrapositive, this shows “if ab = 0 then a = 0 or b = 0. Part (i). Let a, b, c ∈ R with a × b = a × c, and a 6= 0. Subtract ac from both sides to get ab − ac = 0. Factor (i.e. apply the distributive law) to get a(b − c) = 0. By part (j) we see that either a = 0 or b − c = 0. Since we assumed that a 6= 0 we conclude that b − c = 0. Then add c to both sides to get b = c. Part (k). (Probably we should have assumed this as part of our defining properties of R, but oh well.) Suppose this is not the case. Then by the trichotomy property we have either 1 = 0 or 1 < 0. If 1 = 0 then all natural numbers are 0, which is not the case since we assumed that n + 1 6= n for all natural numbers. If 1 < 0 then apply part (m) and multiply the a < b by 1 to get 1a > 1b i.e. a > b. But this contradicts a < b, and so 1 < 0 is false. Part (l). Let a, b ∈ R and suppose that 0 < b < a. Then multiply both sides of b < a by b to get b2 < ab. Multiply both sides of b < a by a to get ab < a2. Combine these inequalities to get b2 < a2. Part (n). Let a, b ∈ R. Suppose a < 0 and b > 0. Apply part Definition ?? part ?? and multiply a < 0 by b to get ab < 0. Suppose a < 0 and b < 0. Apply part (m) and multiply a < b by b to get ab > 0. CHAPTER 1. LOGIC AND PROOFS 6

Part (o). Let a ∈ Z. Case 1: a > 0. Case 2: a ≤ 0. In case 1, we have that a is a . By definition of the natural numbers, every natural number equals one of the following: 1, 2 = 1 + 1, 3 = 1 + 1 + 1, etc. Furthermore, 1 < 2 < 3 < . . . . As a consequence, 1 is the smallest natural number, i.e. 1 ≤ n for all n ∈ Z. Therefore, there is no natural number d such that 1 < d < 2. Because if there were, we would have d = m + 1 for some natural number m, and then m < 1. Similarly, there is no d between 2 and 3, or between 3 and 4, and by induction no d between a and a + 1. Case 2: if a ≤ 0 then apply the result just proven to −a + 1.

Part (p). Let a, b ∈ R. We first prove this the case where a, b ∈ N. Let n = a + 1 and note the following

b ≥ 1 ab ≥ a ab + b > a (a + 1)b > a nb > a

Now suppose that a, b are positive rational numbers. Then let a = c/d and b = e/f. Then

nb > a ⇐⇒ n(e/f) > c/d ⇐⇒ n(ed) > cf

and the list line follows from the case just proven for . Now suppose that a, b are positive real numbers. Let a0 and b0 be rational numbers such that b > b0 and a0 > b. Apply the case just proven for rational numbers to get nb0 > a0. Then

nb > nb0 > a0 > a.

Finally, we leave the case where a or b is negative to the reader.

1.3 Divides

Theorem 1.3.1 (Properties of Divides). Fix integers a, b, c. The following hold 1. a|a (reflexive property) 2. If a|b then a| − b, and if a| − b then a|b (semi-symmetric property) 3. If a|b and b|c then a|c (transitive property) 4. If a|b and b|a then a = ±b (semi-anti-symmetric property) 5. If ab|ac and a 6= 0 then b|c (cancelation property) 6. If a|b then a|bc (multiplicative property) 7. If a|b and a|c then a|(b + c) (additive property) 8. If a|b and a|c then a|(ib + jc) for all i, j ∈ Z (linearity property) 9. If a|(b + c) then either a divides both b and c, or a divides neither b and c. Proof. 1. Proof: Let a ∈ Z. Let c = 1. Then a = ac becomes a = 1a which is true. This shows that a|a by definition of “|”. 2. Proof of first statement: Let a, b ∈ Z such that a|b. By definition of “|” this means b = ac for some c ∈ Z. Then −b = a(−c) and so a| − b, by definition of “|”. Proof of second statement: Let a, b ∈ Z such that a| − b. By definition of “|” this means −b = ac for some c ∈ Z. Then b = a(−c) and so a|b, by definition of “|”. CHAPTER 1. LOGIC AND PROOFS 7

3. Proof: Let a, b, c ∈ Z such a|b and b|c. By definition of “|” we have b = ax and c = by for some x, y ∈ Z. Substituting the first equation into the second gives c = (ax)y = a(xy). Since xy ∈ Z this shows that a|c. 4. Proof: Let a, b ∈ Z with a|b and b|a. By definition of “|” we have b = ax and a = by for some x, y ∈ Z. Substituting the first equation into the second gives a = (ax)y and so xy = 1. Since x and y are integers this implies that x = y = ±1. This implies a = ±b. 5. Proof: Let a, b, c ∈ Z such that ab|ac and a 6= 0. By definition of “|” we have ac = ab(x) for some x ∈ Z. If a 6= 0 then we can apply the multiplicative cancelation law (Theorem 1.2.1, part (i)) to get c = bx. By definition, this means b|c. 6. Proof: Let a, b ∈ Z such that a|b. By definition of “|” we have b = ax for some x ∈ Z. Let c ∈ Z. Then bc = a(xc). This shows that a|bc. 7. Homework 8. Homework

This is where we ended on Friday, January 26 9. Proof: Let a|(b + c). Case 1: it divides neither a or b, in which case we are done. Case 2: it divides at least one of them. Now we need to prove that divides both. Without loss of generality, suppose the one it divides is b. Then a| − b by the semi-symmetric property. Now, since a|(b + c) and a| − b we conclude

a|(b + c + (−b))

by the additive property. This simplifies to a|c which means that in case 2 it divides both.

1.4 Some Basic Logic 1.4.1 Conditional Statements

And, Or, Not

This is where we ended on Monday, January 29

Negating disjunctions and conjunctions Theorem 1.4.1. Let P , Q and R be any logical statements and let “≡” stand for the phrase “have the same logical truth value”. Then we have •¬ (¬P ) ≡ P and P ∧ P ≡ P and P ∨ P ≡ P (Idempotence) •¬ (P ∧ Q) ≡ (¬P ) ∨ (¬Q) and ¬(P ∨ Q) ≡ (¬P ) ∧ (¬Q) (De Morgan’s Laws) • P ∧ (Q ∨ R) ≡ (P ∧ Q) ∨ (P ∧ R) and P ∨ (Q ∧ R) ≡ (P ∨ Q) ∧ (P ∨ R) (Distribution) Proof. Some of these parts are pretty obvious (e.g.. idempotence), and some we’ll leave as exercises. But we’ll prove the second De Morgan’s law. First: this statement should make sense intuitively. Suppose I tell you that it’s not the case that you’ll get soup or salad with dinner. You can conclude that you’ll not get soup, and you’ll not get salad. Or suppose you tell me that you’ll get a B or C in the class, and I tell you that you’re wrong. I mean that you wont get a B and you wont get a C. Here’s the formulaic proof:

PQ P ∨ Q ¬(P ∨ Q) ¬P ¬Q (¬P ) ∧ (¬Q) TT TFFFF TF TFFTF FT TFTFF FF FTTTT CHAPTER 1. LOGIC AND PROOFS 8

Since the fourth column, ¬(P ∨Q), and the last column, (¬P )∧(¬Q) are identical, the two formulas are logically equivalent.

Converse, Contrapositive and If-and-only-if Proposition 1.4.2. Let P and Q be two logical statements. The following are equivalent: 1. P =⇒ Q 2. ¬Q =⇒ ¬P 3.( ¬P ) ∨ Q Proof. We give a truth table for the values of “if P , then Q” and “if (not Q), then (not P )” and (¬P ) ∨ Q PQ P =⇒ Q ¬Q ¬P ¬Q =⇒ ¬P (¬P ) ∨ Q TT TFFTT TF FTFFF FT TFTTT FF TTTTT. Since the third column and the last two columns are the same, we see that the third statement and the last two statements are logically equivalent.

Example 1.4.1. Each open sentence below allows x and y to be any . Prove each of the following true or find a counter example to show that it is false. (a) If x = 0 or y = 1 then x2 + y2 = 1. (b) If x = 0 and y = 1 then x2 + y2 = 1. (c) If x2 = −1 and y = 1 then x2 + y2 = 1. (d) If x2 + y2 = 1 then x = 1 and y = 1. (e) If x2 + y2 = 1 then x = 1 or y = 1. (f) If x2 + y2 = 1 then |x| ≤ 1 and |y| ≤ 1. 2 2 (g) If x + y > 1 then |x| > 1 or√ |y| > 1. √ (h) If x2 + y2 > 1 then |x| > 1/ 2 or |y| > 1/ 2. Solution: Note: Below we only show the proofs, but of course the reader may want to look at pictures to figure out whether the given statement is true or not. (a) If x = 0 or y = 1 then x2 + y2 = 1. False. Let x = 1 and y = 1. Then “y = 1” is true and so “x = 0 or y = 1” is true. But, x2 + y2 = 1 + 1 = 2 and so “x2 + y=1” is false. Since T =⇒ F is false, the original statement is false.

This is where we ended on Wednesday, January 31 (b) If x = 0 and y = 1 then x2 + y2 = 1. True. Let x = 0 and y = 1. Then x2 + y2 = 02 + 12 = 0 + 1 = 1. (c) If x2 = −1 and y = 1 then x2 + y2 = 1. True. Note that x2 = −1 is impossible over the real numbers. Therefore, “x2 = −1” is false. Therefore, “x2 = −1 and y = 1” is false. Since F =⇒ T is vacuously true, the original statement is true. (d) If x2 + y2 = 1 then x = 1 and y = 1. Homework (e) If x2 + y2 = 1 then x = 1 or y = 1. Homework. (f) If x2 + y2 = 1 then |x| ≤ 1 and |y| ≤ 1. True. We prove this by contrapositive: If |x| > 1 or |y| > 1 then x2 + y2 6= 1. Let |x| > 1. Then

|x| > 1 CHAPTER 1. LOGIC AND PROOFS 9

|x|2 > 12 x2 > 1 x2 + y2 > 1 + y2 > 1 since y2 > 0.

This shows that x2 + y2 > 1 and so x2 + y2 6= 1. (g) If x2 + y2 > 1 then |x| > 1 or |y| > 1. Homework √ √ 2 2 (h) If x + y > 1 then |x| > 1/ 2 or |y| > 1/ 2. √ √ True. We prove this by contrapositive, so we prove: if |x| ≤ 1/ 2 and |y| ≤ 1/ 2 then 2 2 x + y ≤ 1. √ √ Let |x| ≤ 1/ 2 and |y| ≤ 1/ 2. Then √ √ |x|2 ≤ (1/ 2)2 and |y|2 ≤ (1/ 2)2 x2 ≤ 1/2 and y2 ≤ 1/2 1 1 x2 + y2 ≤ + 2 2 ≤ 1.

Example 1.4.2. Let a and b be real numbers. Then ab > 0 if and only if a > 0 and b > 0 or a < 0 and b < 0. Solution: Proof. Direction 1: We prove that if a and b have the same , then ab > 0. Suppose a and b have the same sign. If they are both positive, then Definition ?? shows that ab > 0. If they are both negative then Theorem 1.2.1 shows that ab > 0.

This is where we ended on Friday, February 2 Direction 2: We prove that if ab > 0 then a > 0 and b > 0 or a < 0 and b < 0. We prove this by contrapositive. It’s a bit tricky to unravel the following negation using formulas:   ¬ (a > 0 ∧ b > 0) ∨ (a < 0 ∧ b < 0) .

Instead, let’s write the origanal phrase more conceptually: “a > 0 and b > 0 or a < 0 and b < 0” means the same thing as “a and b have the same sign”. Thus, the negation would mean “a and b have opposite signs.” So, the contrapositive is: If a and b have opposite signs then ab ≤ 0. Let a and b have opposite signs. Then one is positive and one is negative. Without loss of generality, suppose a < 0 and b > 0. Then Theorem 1.2.1 shows that ab < 0. Example 1.4.3. Let n be an integer. Prove that n is odd if and only if n2 is odd. Solution: Note: What’s new in this example is the combined statement; in class activites we’ve done both directions of this statement before. Feel free to copy-and-paste from earlier work to fill in parts of the proof! Proof. Direction 1: We prove that if n is odd then n2 is odd. Let n be odd. Then, by definition of “odd” we can write n = 2x + 1 for some integer x. Then

n2 = (2x + 1)2 = 4x2 + 4x + 1 = 2(2x2 + 2x) + 1 = 2w + 1 CHAPTER 1. LOGIC AND PROOFS 10 where w = 2x2 + 2x. Since w is an integer, this means that n2 satisfies the definition of an odd integer, and so n2 is odd. Direction 2: We prove that if n2 is odd then n is odd. We prove the contrapositive: if n is even then n2 is even. Let n be even. Then, by definition of “even” we can write n = 2x for some integer x. Then

n2 = (2x)2 = 4x2 = 2w where w = 2x2. Since w is an integer, this means that n2 satisfies the definition of an even integer, and so n2 is even.

If and only If Theorems Chapter 2

Sets

2.1 Introduction to Sets

Example 2.1.1. Prove that the following two sets are equal:

E = {x ∈ Z | x is even}, F = {x ∈ Z | x = a + b for some a, b ∈ Z, with both a and b odd}. You can assume standard facts about even and odd numbers. Solution: Proving that E and F are equal means proving “x ∈ E ⇐⇒ x ∈ F .” As we know from proving if and only if statements this means proving “If x ∈ E, then x ∈ F ” and “If x ∈ F , then x ∈ E.”

This is where we ended on Monday, February 5 We have templates for these if-then proofs, and so we have the beginning of a proof of this result: Let x ∈ E...... Therefore x ∈ F . “ Let x ∈ F ...... Therefore x ∈ E. We’ve shown above that E ⊆ F and F ⊆ E, therefore E = F . ” Now we fill in the missing steps.

Let x ∈ E. By definition of E this means that x is even. By definition of even, this “ means that x = 2a for some a ∈ Z. By definition of odd, the numbers 2a + 1 and −1 are both odd (note that −1 = 2(−1) + 1). So x = (2a + 1) + (−1) is the sum of two odd numbers. Therefore x ∈ F . Let x ∈ F . Then x = a + b for some a, b ∈ Z, where a and b are odd. By the Parity properties this means that x is even. Therefore x ∈ E. We’ve shown above that E ⊆ F and F ⊆ E, therefore E = F . ” Example 2.1.2. Show that the two sets below are equal

A = {x ∈ R | |x − 2| < 10} , 2 B = {x ∈ R | x − 4x − 96 < 0}.

Solution: We will give two proofs here. The first is what you should get when you apply our above templates directly.

11 CHAPTER 2. SETS 12

Proof 1: Let x ∈ A. Then by definition x is a real number and

|x − 2| < 10, −10 < x − 2 < 10, −8 < x < 12.

Since x < 12 we have x − 12 < 0. Since −8 < x we have x + 8 > 0. Therefore (x − 12)(x + 8) is a product of a and a positive number. By Theorem 1.2.1

(x − 12)(x + 8) < 0.

“FOIL”-ing the left hand side yields

x2 − 4x − 96 < 0 which shows that x ∈ B. Let x ∈ B. Then x is a real number and

x2 − 4x − 96 < 0, (x − 12)(x + 8) < 0.

Therefore (x − 12)(x + 8) is a product of two numbers, the result of which is negative. By The- orem 1.2.1 this means that (x − 12) and (x + 8) have opposite signs. We have two cases: Case 1 where (x − 12) is positive and (x + 8) is negative, and Case 2 where (x − 12) is negative and (x + 8) is positive. Suppose Case 1 holds. Then we have

(x − 12) > 0 and (x + 8) < 0 x > 12 and x < −8

But −8 < 12 so if x < −8 then we have x < 12 by Definition ??. Therefore Case 1 is impossible and Case 2 must hold. So now we have

(x − 12) < 0 and (x + 8) > 0 x < 12 and x > −8 −8 < x < 12, −10 < x − 2 < 10, |x − 2| < 10.

This show sthat x ∈ A. The above steps show that A ⊆ B and B ⊆ A, and therefore we conclude A = B. We may notice that some of the steps were repetitive in this last proof. When you notice that, you might be able to rewrite your proof with less repetition: essentially some of the same steps can be used in both directions. When you do this you might be able to rewrite so that all the steps work in both directios. Before you do this always realize that you are being tempted: it may be possible to rewrite the proof in this way, but the temptation to do so may be so strong that you ignore some steps that only work in one direction. Proof 2: Let x be any real number. Then CHAPTER 2. SETS 13

x ∈ A ⇐⇒ |x − 2| < 10 ⇐⇒ −10 < x − 2 < 10 ⇐⇒ −8 < x < 12 ⇐⇒ −8 < x and x < 12 ⇐⇒ x + 8 > 0 and x − 12 < 0 ⇐⇒ (x + 8)(x − 12) < 0 ⇐⇒ x2 − 4x − 96 < 0 ⇐⇒ x ∈ B.

Since x ∈ A ⇐⇒ x ∈ B we conclude that A = B.

The above proof is not wrong. But I would not feel that student had given me enough justification for some of the steps. In particular, as we know from the longer proof, to prove the implication

x + 8 > 0 and x − 12 < 0 ⇐= (x + 8)(x − 12) < 0 we need to use both the fact that (x + 8) and (x − 12) must have opposite signs, but also that −8 < 12 to figure out which one of these numbers is positive and which is negative. That issue does not show up in the direction of x ∈ A =⇒ x ∈ B and so it is tempting to miss it in the reverse direction. I would not give full credit for Proof 2 since it didn’t justify this step fully. On the other hand, it would be possible to make a hybrid proof, somewhat closer in number of steps to Proof 2, but to break out the justification that I just mentioned with a few extra steps.

Example 2.1.3. Define sets A and B as shown:

A = {x ∈ Z : 6|x} B = {x ∈ Z : 18|x} Prove that B ⊆ A. Solution: This is an easy example, but, as usual, we look to it for a template of how we prove things like this in general.

Proof 1: Let x ∈ B. By definition of B, we have 18|x. By defintion of divides we have x = 18z for some integer z. We can factor 18 to get x = 6 · 3z and so x = 6w where w = 3z. By definition of divides, this means 6|x. Therefore x ∈ A. This proves that B ⊆ A. Proof 2: Let x ∈ B. By definition of B, we have 18|x. Since 6|18, we can apply Theorem 1.3.1 and conclude that 6|x. Therefore x ∈ A. This proves that B ⊆ A.

Example 2.1.4. Let x be any object and A any set. Prove that x ∈ A if and only if {x} ⊆ A. Solution: Let x be any object, and A be any set. “⇒”Let x ∈ A. We need to show that {x} ⊆ A. In other words, we need to show that every element of {x} is also an element of A. But the only element of {x} is x. Since x ∈ A, we are done. “⇐”Suppose {x} ⊆ A. Since {x} is a subset of A, we have that every element of {x} is also an element of A. Since x is an element of {x}, we have that x is in A. In other words, x ∈ A. CHAPTER 2. SETS 14

2.2 Operations

The infinite, like no other problem, has always deeply moved the soul of men. The “ infinite, like no other idea, has had a stimulating and fertile influence upon the mind. But the infinite is also more than any other concept, in need of clarification. (Hilbert, Uber¨ das Unendliche” )

This is where we ended on Wednesday, February 7

2.2.1 The Power Set 2.2.2 Cartesian Products

This is where we ended on Friday, February 9

2.3 Algebraic properties of set operations

Example 2.3.1. Consider the following property of real numbers: a + b = b + a where a and b can be real numbers. (a) What statements do you get if you replace a and b with sets A and B, and + with ∪ or ∩ or − or ×? (b) Two of your new statemtents are true, and two are false. Prove the true ones and find counter examples for the false ones. Solution: (a) The new statements are: A ∪ B = B ∪ A A ∩ B = B ∩ A A − B = B − A A × B = B × A

(b) The first two statements in part (a) are true, and the second two are false. We prove A ∪ B = B ∪ A. Let x ∈ A ∪ B. Then x ∈ A or x ∈ B. Then x ∈ B or x ∈ A. Then x ∈ B ∪ B. Let x ∈ B ∪ B. Then x ∈ B or x ∈ A. Then x ∈ A or x ∈ B. Then x ∈ A ∪ B. We prove next that A ∩ B = B ∩ A. Let x ∈ A ∩ B. Then x ∈ A and x ∈ B. Then x ∈ B and x ∈ A. Then x ∈ B ∩ B. Let x ∈ B ∩ B. Then x ∈ B and x ∈ A. Then x ∈ A and x ∈ B. Then x ∈ A ∩ B. Now we show that A − B = B − A is false. Let A = {1} and B = ∅. Then A − B = {1} and B − A = ∅. Note that {1}= 6 ∅. Finally, we show that A×B = B ×A is false. Let A = {1} and B = {2}. Then A×B = {(1, 2)} and B × A = {(2, 1)}. Note that (1, 2) 6= (2, 1) and so {(1, 2)}= 6 {(2, 1)}.

This is where we ended on Monday, February 12 Example 2.3.2. Consider the following property of real numbers: a × (b + c) = (a × B) + (a × c) where a, b and c can be real numbers. CHAPTER 2. SETS 15

(a) What statements do you get if you replace a, b and c with sets A, B and C, and × and + with ∪ or ∩ or − or ×? (b) Some of the above statements are true and some are false. Make some conjectures about which are true and which are false. Prove at least one true one and find a counter example for at least one falso one. Solution: (a) We are given four set operations, and are choosing two of them, so there will be 6 choices, but each choice can be put in two orders, so there will be 12 new statements: A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) A ∪ (B − C) = (A ∪ B) − (A ∪ C) A − (B ∪ C) = (A − B) ∪ (A − C) A ∩ (B − C) = (A ∩ B) − (A ∩ C) A − (B ∩ C) = (A − B) ∩ (A − C) A ∪ (B × C) = (A ∪ B) × (A ∪ C) A × (B ∪ C) = (A × B) ∪ (A × C) A ∩ (B × C) = (A ∩ B) × (A ∩ C) A × (B ∩ C) = (A × B) ∩ (A × C) A − (B × C) = (A − B) × (A − C) A × (B − C) = (A × B) − (A × C) (b) For most of the true statements we (finally) get lazy and prove both directions of the set containment at the same time. • We prove that A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C). For any x we have x ∈ A ∪ (B ∩ C) ⇐⇒ x ∈ A or x ∈ B ∩ C ⇐⇒ x ∈ A or (x ∈ B and x ∈ C) distribute ⇐⇒ (x ∈ A or x ∈ B) and (x ∈ A or x ∈ C) and/or ⇐⇒ (x ∈ A ∪ B) and (x ∈ A ∪ C) ⇐⇒ x ∈ (A ∪ B) ∩ (A ∪ B). • We prove that A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C). For any x we have x ∈ A ∩ (B ∪ C) ⇐⇒ x ∈ A or x ∈ B ∪ C ⇐⇒ x ∈ A or (x ∈ B or x ∈ C) distribute ⇐⇒ (x ∈ A or x ∈ B) or (x ∈ A or x ∈ C) and/or ⇐⇒ (x ∈ A ∩ B) or (x ∈ A ∩ C) ⇐⇒ x ∈ (A ∩ B) ∪ (A ∩ B). • We prove that A ∪ (B − C) = (A ∪ B) − (A ∪ C) is false.Let A = {1}, B = {1}, and C = ∅. Then B − C = {1}, A ∪ (B − C) = {1}, A ∪ B = {1}, A ∪ C = {1}, (A ∪ B) − (A ∪ C) = {1} − {1} = ∅. Since {1}= 6 ∅ we have that the two sides are not equal. CHAPTER 2. SETS 16

• I think (but have not triple checked) A − (B ∪ C) = (A − B) ∪ (A − C) is false: the ∪ should be changed to ∩. • I think (but have not triple checked) A ∩ (B − C) = (A ∩ B) − (A ∩ C) is true (although Wikipedia writes it differently). • I think (but have not triple checked) A − (B ∩ C) = (A − B) ∩ (A − C) is false: the ∩ should be changed to a ∪. • I think (but have not triple checked) A ∪ (B × C) = (A ∪ B) × (A ∪ C) is false. • I think (but have not triple checked) A × (B ∪ C) = (A × B) ∪ (A × C) is true. • I think (but have not triple checked)A ∩ (B × C) = (A ∩ B) × (A ∩ C) is true • I think (but have not triple checked) A × (B ∩ C) = (A × B) ∩ (A × C) is true. • I think (but have not triple checked) A − (B × C) = (A − B) × (A − C) is false. • I think (but have not triple checked) A × (B − C) = (A × B) − (A × C) is true.

Theorems about Set Operations Theorem 2.3.1. Let A, B and C be any sets and let U be a universal set. The following hold. 1. A ∪ B = B ∪ A and A ∩ B = B ∩ A (Commutative Laws). 2. A ∩ (B ∩ C) = (A ∩ B) ∩ C and A ∪ (B ∪ C) = (A ∪ B) ∪ C (Associative Laws). 3. A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) and A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) (Distributive Laws). 4. A ∪ ∅ = A and A ∩ U = A (identities). 5. A ∪ U = U and A ∩ ∅ = A (domination laws). Theorem 2.3.2. If A, B and C are any sets in a universal set U, then • (Ac)c = A • A − B = A ∩ Bc • (A ∪ B)c = Ac ∩ Bc and (A ∩ B)c = Ac ∪ Bc (De Morgan’s Laws for sets). Theorem 2.3.3. Let A, B and C be any sets. 1. If A ⊆ C and B ⊆ C then A ∪ B ⊆ C. 2. If C ⊆ A and C ⊆ B, then C ⊆ A ∩ B. 3. A ⊆ B if and only if Bc ⊆ Ac Theorem 2.3.4. Let A, B and C be any sets. The following hold: 1.( A ∪ B) × C = (A × C) ∪ (B × C) 2.( A ∩ B) × C = (A × C) ∩ (B × C) 3.( A − B) × C = (A × C) − (B × C) 4. Suppose A and B are nonempty. Then A × B = B × A ⇐⇒ A = B. 5. ∅ × A = ∅. 6. If A1 ⊆ A and B1 ⊆ B then A1 × B1 ⊆ A × B. 7. If A and B each have at least two elements, then there are subsets of A × B that cannot be written the form A1 × B1 for any subsets A1 ⊆ A and B1 ⊆ B. Theorem 2.3.5. Let A and B be any finite sets. 1. |A| + |B| = |A ∪ B| + |A ∩ B|. 2. If A ∩ B = ∅, then |A ∪ B| = |A| + |B|. 3. |A × B| = |A| × |B|. Theorem 2.3.6 (Cardinality of Finite Power Set). If A is a finite set, then

|P(A)| = 2|A|.

In other words, the number of subsets of A is equal to 2n where n is the number of elements of A. Some books use the notation 2A instead of P(A). In this notation the theorem becomes

|2A| = 2|A|. CHAPTER 2. SETS 17

Proving various properties Example 2.3.3. Prove that if A and B are any sets, then A ∩ B = B if and only if B ⊆ A. Solution: Since this is an if-and-only-if proof, we will break it down into two directions: “if A∩B = B then B ⊆ A” and “if B ⊆ A then A ∩ B = B”. We will prove one direction by contrapositive. Proof 1: We prove if A ∩ B = B then B ⊆ A by contrapositive. Assume that B 6⊆ A. Then there is an element b ∈ B such that b 6∈ A. Since b 6∈ A we also have b 6∈ A ∩ B. Since b ∈ B, this shows that A ∩ B 6= B, which finishes the contrapositive. Now we prove if B ⊆ A then A ∩ B = B. Suppose for the rest of the proof that B ⊆ A. To prove A ∩ B = B we prove two set containments: A ∩ B ⊆ B and B ⊆ A ∩ B. Now we prove A ∩ B ⊆ B. Let x ∈ A ∩ B. By definition of intersects, this means x ∈ A and x ∈ B. Since x ∈ B, this shows A ∩ B ⊆ B. Now we prove that B ⊆ A ∩ B. Let x ∈ B. Since B ⊆ A, this shows x ∈ A. Since x ∈ B and x ∈ A, this shows that x ∈ A ∩ B. Therefore, B ⊆ A ∩ B. Note that we went out of our way in the previous proof to make every single assumption clear, often stating them twice in a sense: “we will do such-and-such” and “We are now doing such-and- such.” Also, we restated facts about x when we were about to use them: x ∈ B and then two sentences later x ∈ B again. Ordinarily, I don’t like to encourage people to tell me things twice, but it’s useful to write a proof like this at least once when we start doing sets, just to be very clear what’s happening at all times and why it’s true. I encourage you to write your set proofs like this, but I probably won’t take points off if you are only 80% as clear. Proof 2: We note first that for any logical statements P and Q we have     P =⇒ Q ≡ P ⇐⇒ (P ∧ Q) .

To verify this, note that if P is true and Q is false, then P ∧ Q is false, and so P ⇐⇒ (P ∧ Q) becomes T ⇐⇒ F which is false. In all other combinations P ⇐⇒ (P ∧ Q) is true, just like P =⇒ Q. Let A and B be subsets of some universal set U. Then

A ∩ B = B ⇐⇒ (∀x ∈ U, x ∈ A ∩ B ⇐⇒ x ∈ B) ⇐⇒ (∀x ∈ U, x ∈ A ∧ x ∈ B ⇐⇒ x ∈ B) ⇐⇒ (∀x ∈ U, x ∈ B ⇐⇒ x ∈ A ∧ x ∈ B) ⇐⇒ (∀x ∈ U, x ∈ B =⇒ x ∈ A) ⇐⇒ B ⊆ A.

Example 2.3.4. Prove that if A and B are any sets then A − (A − B) = A ∩ B. Solution: Since we are proving two sets are equal, there will be two containments to prove: A − (A − B) ⊆ A ∩ B and A ∩ B ⊆ A − (A − B). Proof 1: Let x ∈ A − (A − B). By definition of set difference this means x ∈ A and x 6∈ A − B. Since x 6∈ A − B this means

¬(x ∈ A and x 6∈ B) ≡ x 6∈ A or x ∈ B.

Combining this with the first statement we have

x ∈ A and (x 6∈ A or x ∈ B). CHAPTER 2. SETS 18

Applying De Morgan’s law we have

(x ∈ A and x 6∈ A) or (x ∈ A and x ∈ B).

The only way for this to be true is to conclude x ∈ A and x ∈ B, which means x ∈ A ∩ B. This proves that A − (A − B) ⊆ A ∩ B. Let x ∈ A ∩ B. Then x ∈ A and x ∈ B. Then x 6∈ B is false, and therefore the combined statement “x ∈ A and x 6∈ B” is false. Therefore x 6∈ A − B. Therefore x ∈ A − (A − B). This shows A ∩ B ⊆ A − (A − B). Again, like the previous proof, this one can be rewritten so that we are just manipulating logical statements. Proof 2: Let A and B be subsets of some universal set. Let x ∈ U. Then

x ∈ A − (A − B) ⇐⇒ x ∈ A and x 6∈ A − B ⇐⇒ x ∈ A and ¬(x ∈ A − B) ⇐⇒ x ∈ A and ¬(x ∈ A and x 6∈ B) ⇐⇒ x ∈ A and (x 6∈ A or x ∈ B) ⇐⇒ (x ∈ A and x 6∈ A) or (x ∈ A and x ∈ B) ⇐⇒ FALSE or (x ∈ A and x ∈ B) ⇐⇒ x ∈ A and x ∈ B ⇐⇒ x ∈ A ∩ B.

Proof of 1. Let (x, y) ∈ (A ∪ B) × C. Since x ∈ A ∪ B, we know that x ∈ A or x ∈ B.

Fill in using definition of

∪ and ×.

Therefore in both cases (x, y) ∈ (A×C)∪(B ×C). This shows that (A∪B)×C ⊆ (A×C)∪(B ×C).

Let (x, y) ∈ (A × C) ∪ (B × C).

Fill in using definition of

∪ and ×.

Therefore in both cases (x, y) ∈ (A∪B)×C. This shows that (A×C)∪(B ×C) ⊆ (A∪B)×C.

Proof 2: Label the elements of A in some order: x1, x2,..., xn. Then each subset of A is determined by whether or not we include x1, x2,..., xn. Thus the number of subsets is equal to the number of choices we have to make: is x1 included? yes or no; is x2 included? yes or no, etc. There are n things we have to choose, and each of those has 2 possibilities, yes or no. Therefore, the number of possible outcomes is 2 × 2 × ... 2 = 2n | {z } n times n where each 2 represents the choices for x1, for x2, etc., up to x . Thus, the number of subsets equals the number of possible choices which is 2n. CHAPTER 2. SETS 19

Formalism Creating the numbers from sets

This is where we ended on Wednesday, February 14 Chapter 3

Quantifiers and Functions

3.1 Quantifiers

2 Example 3.1.1. Prove the following: ∃x ∈ R such that x − 5x + 4 = 0. Solution: Let x = 4. Then 42 − 5(4) + 4 = 16 − 20 + 4 = 0. Therefore x satisfies the equation 2 2 x − 5x + 4 = 0. Therefore ∃x ∈ R such that x − 5x + 4 = 0. Example 3.1.2. Identify each of the following as true or false, and justify with one sentence. 2 (a) ∃x ∈ R such that x − x − 1 = 0, 2 (b) ∀x ∈ R, we have x − x − 1 = 0. Solution: We should be able to guess which of these is true and which is false without a lot of specific thought: universal statements are harder to make true. √ 1 ± 5 (a) is true since we can find at least one x that solves the equation: x = 2 (b) is false, since there are values of x that do not satisfy the equation, such as x = 0. Example 3.1.3. Prove the following: 2 ∀n ∈ N, we have (n + 1) ≥ 4. Solution: We start by making this statement look more like an if-then: 2 “ If n ∈ N, then (n + 1) ≥ 4. ” Now we should know exactly how to set up the proof of this, although we will still have work to do to fill in the middle steps. Let n ∈ N. “ ...... Therefore (n + 1)2 ≥ 4, QED. ” Filling in the middle steps always takes work and experience. In this case, my intuition is to start with an inequality, since that’s where we’re trying to get to. In fact, you could reason backwards: our goal is (n + 1)2 ≥ 4, if we take roots then we should have n + 1 ≥ 2 and so this should mean n ≥ 1. Now we write this forwards: Let n ∈ N. By definition of the natural numbers, we have n ≥ 1. By Definition ?? we “ can add 1 to both sides of this inequality to get n + 1 ≥ 2. By Definition ?? we can multiply both sides of this inequality by n + 1 to get (n + 1)2 ≥ (n + 1)2. We can also multiply both sides of n + 1 ≥ 2 by 2 to get (n + 1)2 ≥ 4. Combining the last two inequalities we get (n + 1)2 ≥ (n + 1)2 ≥ 4. Therefore, by transitivity, (n + 1)2 ≥ 4, QED. ” 20 CHAPTER 3. QUANTIFIERS AND FUNCTIONS 21

Example 3.1.4. Analyze the following two statements, and prove or disprove them. (a) ∀x ∈ N, ∃y ∈ N, x < y. (b) ∃x ∈ N, ∀y ∈ N, x < y. Solution: We start with English translations. For (a) we can start with “For all x ∈ N, there exists y ∈ N, such that x < y.” Here’s a slightly less formal translation: “Every natural number has a natural number that is bigger than it.” For part (b) we can start with “There exists x ∈ N so that for all y ∈ N, we have such that x ≤ y.” Here’s a slightly less formal translation: “there is a natural number that is smaller than all natural numbers.” Now let’s figure out true and false. Part (a) is true. To explore it, consider different values of x. If x = 11 we can take y = 12. If x = 1304 we can take y = 1305. We have to use different y’s for different x’s, since there is not a single natural number y that is larger than all other natural numbers. Now we prove that this statement is true (note: the real purpose of this proof is to model how we prove quantified statements like this: start with x, define y in terms of x, etc.). “ We prove that every natural number has a natural number that is bigger than it. Let x be any natural number. Set y = x + 1. Then x < y. Since x was arbitrary, we are done. ” Part (b) is false. For example, if we pick x = 10, then x 6< y for y = 9. If we pick x = 1, then x 6< y for y = 1. To prove a statement is false, we provide a counter-example. Actually, this is the same thing as proving the negation:  ¬ ∃x ∈ N, ∀y ∈ N, x < y = ∀x ∈ N, ∃y ∈ N, x ≥ y. Thus, to prove that (b) is false, we can prove that the statement just given is true. We do this by following the template for universal quantifier statements. We prove that this statement is false by proving it’s negation is true. It’s negation may “ be stated as: For every x there exists a y such that x ≥ y. Let x be any natural number. Define y = x. Then x ≥ y. ” Here’s another proof We prove that this statement is false by proving it’s negation is true. It’s negation may “ be stated as: For every x there exists a y such that x ≥ y. Let x be any natural number. Define y = 1. Then x ≥ 1 so x ≥ y. ” This is where we ended on Monday, February 19

Example 3.1.5. Analyze√ the following two statements and prove or disprove them: (a) ∀x ∈ N, ∃y ∈ N, √x + y ∈ N (b) ∃x ∈ N, ∀y ∈ N, x + y ∈ N Solution: (a) This is true. It’s easiest to understand this by example. If x = 1, then let y = 3 and √ √ √ √ see that x + y = 4 = 2. If x = 11 then let y = 5 and see that x + 5 = 16 = 4. We probably believe by this point that no matter what x is, we can find y to make this work out. That’s exactly what the formal, logical statement means. Here’s a proof. √ p Let x be any natural number. Define y = x2 − x. Then x + y = x + x2 − x = √ √ “ 2 x = x ∈ N. This shows that for any x, we can find y such that x + y ∈ N. ” (b) This is false. To understand this, remember that the order matters for ∃x and ∀y. In the order given, x comes first, and once it is given, it does not change. So, this statement says that there is an x, that doesn’t change, but that we can do all numbers y and make x + y a perfect square. To show that this is false, we prove the negation is true. CHAPTER 3. QUANTIFIERS AND FUNCTIONS 22

√ We prove that ¬(∃x ∈ N, ∀y ∈ N, x√+ y ∈ N) is true. Applying rules of logic, this “ means that we prove ∀x ∈ N, ∃y ∈ N, x + y 6∈ N. √ p Let x be any natural number. Define y = x2 − x + 1. Then x + y = x + x2 − x = p x2 + 1. Since x2 is a perfect square, we have that x2 + 1 is not a perfect square: we can never have two perfect squares√ that are consecutive numbers. This shows that for any x, we can find y such that x + y 6∈ N. ” I’ll note that we assumed something in the previous proof: we can never have two perfect squares that are consecutive numbers. On the one hand, I feel kind of bad about this: I used a statement we haven’t proven. On the other hand, we have to use basic facts, and in any proof it’s reasonable to take the original statement, and show that it depends upon a simpler, more basic, logically prior statement. If the skeptical reader then says, “well, can you prove this simpler, more basic, logically prior statement” then that’s a good question, and I hope the answer is always yes. Just to show, I’ll do that now, but it wasn’t really meant to be required for part (b). Claim: We can never have two perefect squares that are consecutive numbers. Let’s put this in an if-then form: if two numbers are perfect squares, then they are not consecutive, meaning they differ by more than 1. Proof: Suppose we have two perfect squares. By this we mean that we have two numbers that are distinct, and that each one equals the square of a natural number. Let these numbers be x2 and 2 y where x, y ∈ N. Since they are distinct, we have that one is greater than the other, so without loss of generality, let x > y. Then

x > y, x ≥ y + 1, x2 ≥ (y + 1)2, x2 ≥ y2 + 2y + 1, x2 − y2 ≥ 2y + 1, x2 − y2 ≥ 3.

This shows that any two perfect squares differ by at least 3. Therefore they are not consecutive.

Example 3.1.6. We will prove the following assertion: there exists a unique x ∈ Q such that 5x + 7 = 3. Proof. We give essentially two separate, self-contained proofs: existence and uniqueness. “Existence”: Let x = −4/5. Then

5x + 7 = 5(−4/5) + 7 = −4 + 7 = 3.

This shows that there is a x that satisfies the equation. “Uniqueness”: Suppose x is a rational number such that 5x + 7 = 3. Then

5x + 7 = 3 =⇒ 5x = −4 =⇒ x = −4/5.

This shows that if there is a solution of the equation, then the solution must equal −4/5. Example 3.1.7. We will prove the following assertion: there exists a unique differentiable function f satisfying f(0) = 1 and f 0(x) = 2 for all x. CHAPTER 3. QUANTIFIERS AND FUNCTIONS 23

Proof. We start by proving existence of a function with the stated properties. Let f(x) = 2x + 1. Then f(0) = 1 and f 0(x) = 2 for all x. This shows that f satisfies the properties. Now we prove uniqueness of a function with the indicated properties. Suppose f and g are functions that satisfy the indicated properties, i.e. f(0) = 1 and f 0(x) = 2 for all x, and g(0) = 1 and g0(x) = 2 for all x. Define a new function F (x) = f(x) − g(x). Then F (0) = 0 and F 0(x) = f 0(x) − g0(x) = 2 − 2 = 0 for all x. By some theorem in Calculus (The Mean Value Theorem), this shows that F (x) = 0 for all x. Then f(x) − g(x) = 0, so f(x) = g(x) for all x.

Optional: Examples from Calculus Example 3.1.8. Definition: A function f(x) is continuous at the value x = a if the following is true ∀ε > 0, ∃δ > 0, |x − a| < δ =⇒ |f(x) − f(a)| < ε Prove that f(x) = 3x + 2 is continuous at x = 1. Solution: We start by translating this into Math-English: “ For every ε > 0 there exists δ > 0 such that if |x − 1| < δ then |f(x) − f(1)| < ε. ” Now we know how to prove a “for every” statement, and we know how to prove and “if-then” statement. “ Let ε > 0 be given. Let δ = ε/3. Let x satisfy |x − 1| < δ. Then ε |x − 1| < . 3 Multiply both sides by 3 to get 3|x − 1| < ε Distribute the 3 and simplify to get

|3x − 3| < ε |3x + 2 − 5| < ε

The last inequality is equivalent to |f(x) − f(1)| < ε, which is what we were trying to prove. Therefore, f(x) is continuous at x = 1, QED. ” Example 3.1.9. (a) Negate the definition of continuous to define the following statement: “The function g(x) is not continuous at x = 1”. (b) Define a function g(x) as follows: ( 5x − 3 if x 6= 1 g(x) = 0 if x = 1

Prove that g(x) is not continuous at x = 1. Solution: Part (a). We start by translating the definition of continuous into the present situation with g(x) and x = 1

∀ε > 0, ∃δ > 0 such that |x − 1| < δ =⇒ |g(x) − g(1)| < ε.

Now we negate this   ¬ ∀ε > 0, ∃δ > 0 such that |x − 1| < δ =⇒ |g(x) − g(1)| < ε CHAPTER 3. QUANTIFIERS AND FUNCTIONS 24 which becomes

∃ε > 0, ∀δ > 0, ∃x, such that |x − 1| < δ and |g(x) − g(1)| ≥ ε.

The part with “∃x” may not be obvious, in fact the “∃” is implied. If I want to show that “if x is real then x2 ≤ 0” is false I need to show the existence of an x that is real and with x2 > 0. Similarly here: to show |x − 1| < δ =⇒ |g(x) − g(1)| < ε” is false I need to produce a counter-example, i.e. show the existence of an x such that |x − 1| < δ is true and |g(x) − g(1)| < ε is false. So, in theory we know to to prove this, at least in outline form. The part with “∃ε > 0” becomes “Let ε = ... ” where we need to fill in the dots. The part with “∀δ > 0” becomes “Let δ > 0 be given” or “Fix an arbitrary real number δ such that δ > 0”. The part with “∃x, |x − 1| < δ” becomes “Let x = ... ” where we need to fill in the dots. So far, our proof looks like this:

By definition of continuous, and the negation of that definition, it suffices to prove the “ following: that there exists an ε > 0, such that for all δ > 0, there exists an x such that |x − 1| < δ and |g(x) − g(1)| ≥ ε. Let ε = ... . Let δ be an arbitrary real number such that δ > 0. Let x = ... . Then |x − 1| becomes

|x − 1| = ... = ... < δ.

Now we calculate |g(x) − g(1)|. This becomes

|g(x) − g(1) = | · · · − 0| = ...

So now we need to show that · · · ≥ ε...... Therefore |g(x) − g(1)| ≥ ε which shows that g is not continuous at x = 1. ” So to finish, there are a few things we have to fill in, but in fact only two real choices we have to make: what is ε and what is x. Once we make these choices, the other parts to fill in should be a little bit automatic. To pick ε, we have to understand what the definition of continuity means. The role that ε plays is the distance between y-values on the graph of g(x) and the fixed y-value g(1). In this case, the gap in the graph is 1, and so we can set ε = 1. Now we need to pick x such that |x − 1| < δ. In other words, we need the distance between x and 1 to be less than δ. How much less? In this problem, anything less than δ would do. How about, just to sort of show off, we make the distance between x and 1 come out to be 0.99δ, that is to say the distance is just 1% smaller than δ. That turns out to work. Now we finish the proof.

By definition of continuous, and the negation of that definition, it suffices to prove the “ following: that there exists an ε > 0, such that for all δ > 0, there exists an x such that |x − 1| < δ and |g(x) − g(1)| ≥ ε. CHAPTER 3. QUANTIFIERS AND FUNCTIONS 25

Let ε = 1. Let δ be an arbitrary real number such that δ > 0. Let x = 1 + 0.99δ. Then |x − 1| becomes

|x − 1| = |1 + 0.99δ − 1| = 0.99δ < δ.

Now we calculate |g(x) − g(1)|. This becomes

|g(x) − g(1) = |g(1 + 0.99δ) − 0| = |(1 + 0.99δ)2| = (1 + 0.99δ)2.

So now we need to show that (1 + 0.99δ)2 ≥ ε. We manipulate the given inequality δ > 0:

δ > 0, 0.99δ > 0, 1 + 0.99δ > 1, (1 + 0.99δ)2 > 1.

Since ε = 1, this shows that |g(x) − g(1)| ≥ ε which shows that g is not continuous at x = 1. ” That’s a very good proof, but just to illustrate a different style, let’s rewrite it with a few less words, and a little less vertical space. Just to be clear, I would prefer you write a proof more like the one I just gave, but if you want to see it distilled down closer to the bare minimum, here’s another version.

[More compact, but probably not as friendly of a proof.] We show that there exists an ε > 0, such that for all δ > 0, there exists an x such “that |x − 1| < δ and |g(x) − g(1)| ≥ ε. Let ε = 1, let δ > 0, and let x = 1 + 0.99δ. Then |x − 1| = |1 + 0.99δ − 1| = 0.99δ < δ and |g(x) − g(1) = |g(1 + 0.99δ) − 0| = |(1 + 0.99δ)2| = (1 + 0.99δ)2. Starting with δ > 0 we get 0.99δ > 0 and 1 + 0.99δ > 1 and (1 + 0.99δ)2 > 1 = ε. Therefore |g(x) − g(1)| ≥ ε, QED. ”