Note: Set theory Proofs are universal
Note: Set theory Proofs are universal
(So disproving means finding a counterexample)
Recall: \(A \subseteq B \Leftrightarrow (\forall x, x \in A \Rightarrow x \in B)\)
Recall: Set Difference is \(A - B = A \cap B^c\)
Prove: Set Difference is \(A - B \subseteq A \cap B^c\)
Prove: Set Difference is \(A - B \subseteq A \cap B^c\)
\(x \in A - B\Rightarrow x \in A \land x \not\in B\)
\(x \not\in B\Rightarrow x \in B^c\)
\(x \in A \land x \in B^c\Rightarrow x \in A \cap B^c\)
Note: Disproving a subset means having a counterexample
Note: Disproving a subset means having a counterexample
Venn diagram helps, but we want concrete example
Disprove: \(A \cup B \subseteq A^c \cup B\)
Disprove: \(A \cup B \subseteq A^c \cup B\)
\(A \cup B\)
\(A^c \cup B\)
Disprove: \(A \cup B \subseteq A^c \cup B\)
\(U = \{1,2,3,4\}, A = \{1,3\}, B = \{2,3\}\)
\(A \cup B = \{1,2,3\}, A^c \cup B = \{2,3,4\}\)
Recall: \(A = B \Leftrightarrow (A \subseteq B \land B \subseteq A)\)
Recall: \(A = B \Leftrightarrow (A \subseteq B \land B \subseteq A)\)
\((\forall x, x\in A \Rightarrow x \in B) \land (\forall y,y \in B \Rightarrow y \in A)\)
\((\forall x \in A, x \in B) \land (\forall y \in B, y \in A)\)
Recall: Absorbtion Law: \(A \cup (A \cap B) = A\)
Prove: Absorbtion Law: \(A \cup (A \cap B) = A\)
Prove: Absorbtion Law: \(A \cup (A \cap B) = A\)
First: Prove \(A \cup (A \cap B) \subseteq A\)
\(x \in A \cup (A \cap B)\Rightarrow x \in A \lor x \in A \cap B\)
\(x \in A \cap B\Rightarrow x \in A \land x \in B\)
\(x \in A \cap B\Rightarrow x \in A\)
\(x \in A\)
Note: This is cases
Note: This is cases
Recall: Cases
\(\begin{array}{ll} & p \lor q\\ & p \Rightarrow r\\ & q \Rightarrow r\\ \therefore & r \end{array}\)
Note: This is cases
Recall: Cases
\(\begin{array}{ll} & (x \in A) \lor (x \in A \cap B)\\ & (x \in A) \Rightarrow (x \in A)\\ & (x \in A \cap B) \Rightarrow (x \in A)\\ \therefore & (x \in A) \end{array}\)
Prove: Absorbtion Law: \(A \cup (A \cap B) = A\)
Second: Prove \(A \subseteq A \cup (A \cap B)\)
\(x \in A, x \in A, A \subseteq A\)
\(x \in A\Rightarrow x \in A \cup (A \cap B)\Rightarrow A \subseteq A \cup (A \cap B)\)
Note: It is important to prove both directions
Prove: Absorbtion Law: \(A \cup (A \cap B) = A\)
Second: Prove \(A \subseteq A \cup (A \cap B)\)
\(x \in A\Rightarrow x \in A \cup (A \cap B)\Rightarrow A \subseteq A \cup (A \cap B)\)
Note: It is important to prove both directions
Recall: Demorgan's Law: \((A \cap B)^c = A^c \cup B^c\)
Prove: Demorgan's Law: \((A \cap B)^c = A^c \cup B^c\)
Prove: Demorgan's Law: \((A \cap B)^c = A^c \cup B^c\)
First: Prove \((A \cap B)^c \subseteq A^c \cup B^c\)
\(x \in (A \cap B)^c \Rightarrow x \not\in (A \cap B)\)
\(x \not\in (A \cap B) \Rightarrow x \not\in A \lor x \not\in B\) (or neither)
\(x \not\in A, x \in A^c \Rightarrow x \in A^c \cup B^c\)
\(x \not\in B, x \in B^c \Rightarrow x \in A^c \cup B^c\)
Prove: Demorgan's Law: \((A \cap B)^c = A^c \cup B^c\)
Second: Prove \(A^c \cup B^c \subseteq (A \cap B)^c\)
\(x \in A^c \cup B^c\Rightarrow x \in A^c \lor x \in B^c\) (or both)
\(x \in A^c, x \not\in A, \Rightarrow x \not\in (A \cap B)\)
\(x \in B^c, x \not\in B, \Rightarrow x \not\in (A \cap B)\)
\(x \not\in (A \cap B)\Rightarrow x \in (A \cap B) \Rightarrow A^c \cup B^c \subseteq (A \cap B)^c\)
Note: Cases again
Note: Disproving set equality means having a counterexample
Note: Disproving set equality means having a counterexample
Venn diagram helps, but we want concrete example
Disprove: \(A \cup (C - B) = (A \cup C) - B\)
Disprove: \(A \cup (C - B) = (A \cup C) - B\)
\(A \cup (C-B)\)
\((A \cup C) - B\)
Disprove: \(A \cup (C - B) = (A \cup C) - B\)
\(U = \{1,2,3,4,5,6,7,8\}, A = \{1,4,5,7\}, B = \{2,4,6,7\}\)\(C = \{3,5,6,7\}\)
\(A \cup (C-B) = \{1,3,4,5,7\}, (A \cup C) - B = \{1,3,5\}\)
Difficult to show something that does not exist
Difficult to show something that does not exist
(Trying to show nonexistence is hard)
Difficult to show something that does not exist
The power of Contradiction
Prove: \(A \cap \emptyset = \emptyset\)
Prove: \(A \cap \emptyset = \emptyset\)
Assume: \(A \cap \emptyset \neq \emptyset\)
\(\exists x \in A \cap \emptyset\)
\(\exists x \in A \cap \emptyset, x \in A \land x \in \emptyset\)
\(x \in \emptyset\) Contradiction
Set conditionals are just arguments with sets
Recall: Valid argument is one where premises imply conclusion
Prove: If \(A \subset B\) and \(B \subseteq C^c\) then \(A \cap C = \emptyset\)
Prove: If \(A \subset B\) and \(B \subseteq C^c\) then \(A \cap C = \emptyset\)
\(\begin{array}{ll} & A \subset B\\ & B \subseteq C^c\\ \therefore & A \cap C = \emptyset \end{array}\)
Prove: If \(A \subset B\) and \(B \subseteq C^c\) then \(A \cap C = \emptyset\)
\(\forall x, x \in A \Rightarrow x \in B\)
\(\forall x, x \in B \Rightarrow x \in C^c\)
\(\forall x, x \in A \Rightarrow x \in C^c\)
\(\exists x \in B, x \not\in A\)
\(\exists x \in C^c, x \not\in A, \Rightarrow A \subset C^c\)
\(\forall x, x \in A\Rightarrow x \not\in C\)
\(A \cap C = \emptyset\)
Prove: If \(A \subseteq (B \cup C)\), \(B \subseteq D\) and \(C \subseteq E\) then \(A \subseteq (D \cup E)\)
\(\begin{array}{ll} & A \subseteq (B \cup C)\\ & B \subseteq D\\ & C \subseteq E\\ \therefore & A \subseteq (D \cup E) \end{array}\)
Prove: \(((A \cap B) = A) \Leftrightarrow A \in \mathcal{P}(B)\)
Recall:\(\vert A\vert\)
Recall:\(\vert A\vert\)
\(\vert \{1,2,3,4,5,6\}\vert\)
\(\vert \{\}\vert\)
\(\vert \{\{1,2,3\}\{1,2\}\}\vert\)
\(\vert \mathbb{Z}\vert\)
\(\vert \mathbb{R}\vert\)
\(\vert \mathbb{Z}^{evens}\vert\)
Consider \(\mathbb{Z}^+\)
\(1,2,3,4,5,6,...\)
Consider \(\mathbb{Z}^+\)
\(1,2,3,4,5,6,...\)
\(\mathbb{R}?\)
\(0,0.1,0.5,1,...???\)
A set is countable if we can match the elements to a 1-1 corespondence to \(\mathbb{N}\).
ie. We can find an injective function $f:\mathbb{N} \mapsto S$
A set is countable if we can match the elements to a 1-1 corespondence to \(\mathbb{N}^+\).
ie. We can find an injective function $f:\mathbb{N}^+ \mapsto S$
A set is uncountable if it's not countable
{positive evens} are countable
\(\begin{array}{llc} \mathbb{N}^+& &\text{Positive Evens}\\\hline 1 & \mapsto & 2\\ & & \\ & & \\ & & \\ \end{array}\)
{positive evens} are countable
\(\begin{array}{llc} \mathbb{N}^+& &\text{Positive Evens}\\\hline 1 & \mapsto & 2\\ 2 & \mapsto & 4\\ & & \\ & & \\ \end{array}\)
{positive evens} are countable
\(\begin{array}{llc} \mathbb{N}^+& &\text{Positive Evens}\\\hline 1 & \mapsto & 2\\ 2 & \mapsto & 4\\ 3 & \mapsto & 6\\ & & \\ \end{array}\)
{positive evens} are countable
\(\begin{array}{llc} \mathbb{N}^+& &\text{Positive Evens}\\\hline 1 & \mapsto & 2\\ 2 & \mapsto & 4\\ 3 & \mapsto & 6\\ 4 & \mapsto & 8\\ \end{array}\)
index \(\times\) 2
\(\mathbb{Z}\) are countable
\(\begin{array}{llc} \mathbb{N}^+& &\mathbb{Z}\\\hline 1 & \mapsto & 0\\ & & \\ & & \\ & & \\ & & \\ \end{array}\)
\(\mathbb{Z}\) are countable
\(\begin{array}{llc} \mathbb{N}^+& &\mathbb{Z}\\\hline 1 & \mapsto & 0\\ 2 & \mapsto & 1\\ & & \\ & & \\ & & \\ \end{array}\)
\(\mathbb{Z}\) are countable
\(\begin{array}{llc} \mathbb{N}^+& &\mathbb{Z}\\\hline 1 & \mapsto & 0\\ 2 & \mapsto & 1\\ 3 & \mapsto& -1\\ & & \\ & & \\ \end{array}\)
\(\mathbb{Z}\) are countable
\(\begin{array}{llc} \mathbb{N}^+& &\mathbb{Z}\\\hline 1 & \mapsto & 0\\ 2 & \mapsto & 1\\ 3 & \mapsto & -1\\ 4 & \mapsto & 2\\ & & \\ \end{array}\)
\(\mathbb{Z}\) are countable
\(\begin{array}{llc} \mathbb{N}^+& &\mathbb{Z}\\\hline 1 & \mapsto & 0\\ 2 & \mapsto & 1\\ 3 & \mapsto & -1\\ 4 & \mapsto & 2\\ 5 & \mapsto & -2\\ \end{array}\)
even index: \(\frac{i}{2}\), odd index: \(\frac{i-1}{-2}\)
\(\mathbb{Q}^+\) are countable
\(x \in \mathbb{Q} \Rightarrow \exists a,b \in \mathbb{Z}, x = \frac{a}{b} \land b \neq 0\)
Numerator: \(\{1,2,3,4,5,...\}\)
Denominator: \(\{1,2,3,4,5,...\}\)
\(\begin{array}{c|ccccc} n/d & 1 & 2 & 3 & 4 & \ldots\\\hline 1 & & & & &\\ 2 & & & & &\\ 3 & & & & &\\ 4 & & & & &\\ \vdots & & & & &\\ \end{array}\)
\(\begin{array}{c|ccccc} n/d & 1 & 2 & 3 & 4 & \ldots\\\hline 1 & 1/1& 2/1& 3/1&4/1 & \ldots\\ 2 & 1/2& 2/2& 3/2& 4/2& \ldots\\ 3 & 1/3& 2/3& 3/3& 4/3&\ldots \\ 4 & 1/4& 2/4& 3/4& 4/4&\ldots\\ \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \\ \end{array}\)
visited = []
visited = [1/1]
start at top left
visited = [1/1,1/2]
start at top left
Go down one
visited = [1/1,1/2,2/1]
start at top left
Go down one
Go up-right diagonal
visited = [1/1,1/2,2/1,3/1]
start at top left
Go down one
Go up-right diagonal
Go right one
visited = [1/1,1/2,2/1,3/1,2/2,1/3]
start at top left
Go down one
Go up-right diagonal
Go right one
Go down-left diagonal
visited = [1/1,1/2,2/1,3/1,2/2,1/3,
start at top left
Go down one
Go up-right diagonal
Go right one
Go down-left diagonal
Repeat from line 3
visited = [1/1,1/2,2/1,3/1,2/2,1/3,
start at top left
Go down one
Go up-right diagonal
Go right one
Go down-left diagonal
Repeat from line 3
visited = [1/1,1/2,2/1,3/1,2/2,1/3,
start at top left
Go down one
Go up-right diagonal
Go right one
Go down-left diagonal
Repeat from line 3
What about \(\mathbb{R}\)
Consider [0,1]
\(\begin{array}{llc} \mathbb{N}& &\mathbb{R}\\\hline 1 & \mapsto & 0.a_1a_2a_3a_4a_5\ldots\\ 2 & \mapsto & 0.b_1b_2b_3b_4b_5\ldots\\ 3 & \mapsto & 0.c_1c_2c_3c_4c_5\ldots\\ 4 & \mapsto & 0.d_1d_2d_3d_4d_5\ldots\\ \vdots& \vdots&\vdots \\ \end{array}\)
\(\begin{array}{llc} \mathbb{N}& &\mathbb{R}\\\hline 1 & \mapsto & 0.a_1a_2a_3a_4a_5\ldots\\ 2 & \mapsto & 0.b_1b_2b_3b_4b_5\ldots\\ 3 & \mapsto & 0.c_1c_2c_3c_4c_5\ldots\\ 4 & \mapsto & 0.d_1d_2d_3d_4d_5\ldots\\ \vdots& \vdots&\vdots \\ \end{array}\)
New number \(x\): \(0.a_1b_2c_3d_4\ldots\)
Add 1 to each digit, or loop to 0
differs the \(k^{th}\) number by the \(k^{th}\) digit
\(\begin{array}{llc} \mathbb{N}& &\mathbb{R}\\\hline 1 & \mapsto & 0.a_1a_2a_3a_4a_5\ldots\\ 2 & \mapsto & 0.b_1b_2b_3b_4b_5\ldots\\ 3 & \mapsto & 0.c_1c_2c_3c_4c_5\ldots\\ 4 & \mapsto & 0.d_1d_2d_3d_4d_5\ldots\\ \vdots& \vdots&\vdots \\ \end{array}\)
No matter how close the 1st and 2nd numbers are, I can find a value between them
\(\frac{a+b}{2}\)