Math 205: Real Analysis

Lecture 01 — Sets and Mathematical Induction

Lecture Notes


1   Sets and Well-Definedness

Definition 1.1: Set

A set is a well-defined collection of distinct objects, called elements.

The phrase well-defined means that for any object, it must be unambiguous whether the object belongs to the set or not.

We write \(x \in A\) to mean "\(x\) is an element of \(A\)" and \(x \notin A\) to mean "\(x\) is not an element of \(A\)."

Example 1.1: Well-Defined vs. Not Well-Defined

Not well-defined: "The set of all colors" — unclear whether certain shades should be included.

Well-defined: The set of natural numbers \(\mathbb{N} = \{1, 2, 3, \ldots\}\).

Important Note: Notation

In this course: \(\mathbb{N} = \{1, 2, 3, \ldots\}\) (does not include 0). Some textbooks include 0 — always check!

2   Basic Set Operations

Let \(A\) and \(B\) be sets, and let \(U\) denote the universal set. Click each operation below to see its Venn diagram:

Definition 2.1: Set Operations — Interactive Venn Diagrams
Union \(A \cup B\)
Intersection \(A \cap B\)
AU
Complement \(A^c\)
Difference \(A \setminus B\)

Important Identity

\(A \setminus B = A \cap B^c\)

Both expressions describe "elements in \(A\) but not in \(B\)." This identity is used frequently in proofs.

3   Equality of Sets

Definition 3.1: Set Equality

Two sets \(A\) and \(B\) are equal if and only if they contain exactly the same elements:

$$A = B \iff (A \subseteq B) \text{ and } (B \subseteq A)$$

To prove \(A = B\), use a double containment argument:

Step 1 (⊆): Show that if \(x \in A\), then \(x \in B\).

Step 2 (⊇): Show that if \(x \in B\), then \(x \in A\).

4   De Morgan's Laws

Theorem 4.1: De Morgan's Laws
$$(A \cup B)^c = A^c \cap B^c$$ $$(A \cap B)^c = A^c \cup B^c$$

Intuition: Negation "flips" \(\cup\) to \(\cap\) and \(\cap\) to \(\cup\).

4.1   Proof using Set Theory

Click to show/hide proof

(⊆) Let \(x \in (A \cup B)^c\). Then \(x \notin A \cup B\), which means \(x \notin A\) and \(x \notin B\). Hence \(x \in A^c\) and \(x \in B^c\), so \(x \in A^c \cap B^c\). ✓

(⊇) Let \(x \in A^c \cap B^c\). Then \(x \notin A\) and \(x \notin B\), so \(x \notin A \cup B\), giving \(x \in (A \cup B)^c\). ✓

Since both containments hold, \((A \cup B)^c = A^c \cap B^c\). □

4.2   Interactive Truth Table

Click any row to highlight it. The blue columns are identical, proving the equivalence!

\(p\)\(q\)\(p \lor q\)\(\neg(p \lor q)\)\(\neg p\)\(\neg q\)\((\neg p) \land (\neg q)\)

5   Natural Numbers and Peano Axioms

Definition 5.1: Peano Axioms

(N1) \(1 \in \mathbb{N}\). — There is a starting element

(N2) Every \(n \in \mathbb{N}\) has a successor. — We can always go to \(n+1\)

(N3) 1 is not the successor of any natural number. — Nothing before 1

(N4) If two natural numbers have the same successor, they are equal. — No "merging"

(N5) (Induction Axiom) If \(A \subseteq \mathbb{N}\) contains 1 and contains \(n+1\) whenever it contains \(n\), then \(A = \mathbb{N}\).

6   Principle of Mathematical Induction

Theorem 6.1: Principle of Mathematical Induction

Let \(P(n)\) be a statement for \(n \in \mathbb{N}\). To prove \(P(n)\) for all \(n\):

1. Base Step: Prove \(P(1)\).

2. Inductive Step: Assume \(P(k)\) (inductive hypothesis), prove \(P(k+1)\).

6.1   The Domino Analogy — Interactive

Click Start to watch the dominoes fall. The base step knocks over the first, and the inductive step ensures each knocks over the next.

7   Examples of Induction

Example 7.1: Sum of First \(n\) Natural Numbers

Prove: \(\displaystyle 1 + 2 + \cdots + n = \frac{n(n+1)}{2}\) for all \(n \in \mathbb{N}\).

Click to show/hide proof

Base Step (\(n = 1\)): Left = 1. Right = \(\frac{1 \cdot 2}{2} = 1\). ✓

Inductive Hypothesis: Assume for some \(k\):

\(\displaystyle 1 + 2 + \cdots + k = \frac{k(k+1)}{2}\)

Inductive Step:

$$1 + 2 + \cdots + k + (k+1) = \underbrace{\frac{k(k+1)}{2}}_{\text{by I.H.}} + (k+1) = \frac{k(k+1) + 2(k+1)}{2} = \frac{(k+1)(k+2)}{2} \quad\checkmark$$

By induction, the formula holds for all \(n \in \mathbb{N}\). □

Interactive: Verify the Formula

Choose \(n\) and watch the sum build up:

n = 4

Visual: Staircase Proof

The sum \(1 + 2 + \cdots + n\) forms a staircase. Complete it to an \(n \times (n{+}1)\) rectangle — the sum is half the rectangle!

Example 7.2: Divisibility by 16

Prove: \(5^n - 4n - 1\) is divisible by 16 for all \(n \in \mathbb{N}\).

Click to show/hide proof

Base Step (\(n=1\)): \(5 - 4 - 1 = 0 = 16 \cdot 0\). ✓

Inductive Hypothesis: Assume \(5^k - 4k - 1 = 16m\) for some integer \(m\).

Inductive Step:

$$5^{k+1} - 4(k+1) - 1 = 5 \cdot 5^k - 4k - 5 = 5\underbrace{(5^k - 4k - 1)}_{=16m} + 16k = 16(5m + k) \quad\checkmark$$

By induction, the result holds for all \(n \in \mathbb{N}\). □

Interactive: Verify Divisibility

Click values of \(n\) to check that \(5^n - 4n - 1\) is divisible by 16:

8   Tower of Hanoi

Definition 8.1: Tower of Hanoi

Three pegs, \(n\) disks of different sizes. Rules: move one disk at a time; never place a larger disk on a smaller one. Let \(T(n)\) = minimum moves to transfer all disks.

Theorem 8.1: \(T(n) = 2^n - 1\)

Recurrence: \(T(n) = 2T(n-1) + 1\). Solution by induction: \(T(n) = 2^n - 1\).

Interactive Tower of Hanoi

Disks: Moves: 0 / 1
Source
Auxiliary
Target

9   Unions and Intersections over \(\mathbb{N}\)

Definition 9.1: Indexed Union
$$\bigcup_{n \in \mathbb{N}} A_n = \{x \in U : x \in A_n \text{ for some } n \in \mathbb{N}\}$$

Union ↔ "there exists" ↔ ∃

Definition 9.2: Indexed Intersection
$$\bigcap_{n \in \mathbb{N}} A_n = \{x \in U : x \in A_n \text{ for every } n \in \mathbb{N}\}$$

Intersection ↔ "for all" ↔ ∀

Example 9.1: Shrinking Sets — Interactive

Let \(A_n = \{k \in \mathbb{N} : k \geq n\}\). Use the slider to see how the sets shrink:

Highlight \(A_n\) for \(n =\) 1

Union: \(\bigcup A_n = \mathbb{N}\) — every number appears in at least one \(A_n\).

Intersection: \(\bigcap A_n = \varnothing\) — no number is \(\geq n\) for every \(n\).

Key Takeaway: Quantifiers and Set Operations

\(\bigcup\) (Union) ↔ \(\exists\) (there exists) ↔ "for some"

\(\bigcap\) (Intersection) ↔ \(\forall\) (for all) ↔ "for every"

10   Exercises

Set Theory Exercises

Exercise 1. Prove that \(A \setminus (B \cup C) = (A \setminus B) \cap (A \setminus C)\).

Exercise 2. Show that \(A \cap (B \cup C) = (A \cap B) \cup (A \cap C)\). (Distributive law)

Exercise 3. Prove that \((A \cap B)^c = A^c \cup B^c\). (The other De Morgan's Law)

Mathematical Induction Exercises

Exercise 4. Prove \(1^2 + 2^2 + \cdots + n^2 = \frac{n(n+1)(2n+1)}{6}\).

Exercise 5. Prove that \(3^n - 1\) is divisible by 2 for all \(n \in \mathbb{N}\).

Exercise 6. Prove by induction that the Tower of Hanoi requires \(2^n - 1\) moves.

Exercise 7 (Binomial Theorem). (a) Verify \((a+b)^n\) for \(n=1,2,3\). (b) Show Pascal's identity. (c) Prove by induction.


Math 205: Real Analysis — Lecture 01