Due Friday, July 5 at 5:30 pm Pacific
Solutions are available!
Here we are â the first problem set of the quarter! This problem set is designed to give you practice writing proofs on a variety of different topics. We hope that this problem set gives you a sense of what proof-based mathematics is like and helps solidify your understanding of set theory.
Before you start this problem set, please do the following:
- Review the Guide to Proofs for information about common proofwriting techniques.
- Review the Guide to Partners for information about how to work effectively in a pair.
- Review the Guide to Office Hours for information about how office hours work.
- Review the Guide to $\LaTeX$ to learn how to typeset your solutions with $\LaTeX$.
- Review the Proofwriting Checklist for a detailed set of criteria you should apply to your proofs before submitting them. We will be running this same checklist on your proofs when grading, so please be sure to look over it before submitting!
- Review the Guide to $\in$ and $\subseteq$ to make sure you understand the distinction between these terms.
As always, please feel free to call into office hours or post on EdStem if you have any questions. We're happy to help out.
Good luck, and have fun!
Starter Files
You will need to download and set up this Qt Creator project to complete the first two problems on this problem set:
Unpack the files somewhere convenient and open up the bundled project.
As a reminder, you are required to type your solutions to this problem set. If you would like to type your solutions in $\LaTeX$, you may want to download this template file where you can place your answers:
You are also free to use Microsoft Word, Google Docs, etc. to type up your solutions.
Problem One: Much Ado About Nothing
It can take a bit of practice to get used to the empty set. This problem will ask you to think about a few different sets related to $\emptyset$.
Answer each part of this question by editing the file MuchAdoAboutNothing.sets
in the res/
directory of the starter files. Thereâs information in the top of each of the files about how to represent sets; most importantly, note that to write out the empty set, you should write {}
rather than using the empty-set symbol. For example, the set $\Set{\emptyset}$ would be written as { { } }
.
Give a set equal to $\emptyset \cup \Set{\emptyset}$.
Give a set equal to $\emptyset \cap \Set{\emptyset}$.
Give a set equal to $\Set{\emptyset} \cup \Set{\Set{\emptyset}}$.
Give a set equal to $\Set{\emptyset} \cap \Set{\Set{\emptyset}}$.
Give a set equal to $\wp(\wp(\emptyset))$.
Give a set equal to $\wp(\wp(\wp(\emptyset)))$.
The starter code contains a driver program you can use to see the contents of your files and run tests to check your answers. Submit your answers through GradeScope under âCoding Problems for Problem Set Oneâ by uploading your edited files. Youâre welcome to submit as many times as youâd like; weâll count as your grade the last version of the uploaded files.
Problem Two: Set Theory in C++
The C++ standard library contains a type called std::set
that represents a set of elements, all of which must be of the same type. For example, the type std::set<int>
represents a set of integers, the type std::set<std::string>
represents a set of strings, and std::set<std::set<int>>
is a type representing a set of sets of integers.
There are all sorts of operations you can perform on std::sets
. For example, hereâs how you iterate over all the elements of a set:
std::set<T> mySet;
for (T elem: mySet) {
/* ⊠do something with the current element elem ⊠*/
}
Hereâs how you check whether a particular value is an element of a set:
if (mySet.count(value)) {
/* ⊠value â mySet ⊠*/
} else {
/* ⊠value â mySet ⊠*/
}
And, finally, hereâs how you can get the cardinality of a set:
size_t size = mySet.size();
Here, the size_t
type is a type representing a natural number, since sets canât have negative size. (The folks who designed the C++ standard libraries had a strong discrete math background.)
One of the major differences between the sets weâve talked about in CS103 and the std::set
type is that in discrete mathematics, sets can contain anything â numbers, philosophies, recipes, other sets, etc. â but in C++ all objects in a set must have the same type. For the purposes of this problem, weâve created a custom C++ type called Object
. Variables of type Object
can represent just about anything, so a std::set<Object>
represents something pretty similar to the sets weâve been studying so far.
Some Object
s are actually just std::sets in disguise. If you have an Object, you can test whether itâs actually a set by using this provided helper function:
bool isSet(Object o);
This takes in an Object
, then returns true
if that Object
is actually a set and false
otherwise. If you have an Object
that really is a set, you can convert it to a set by using this helper function:
std::set<Object> asSet(Object o);
This function takes in an Object
that you know happens to be a set, then returns the std::set<Object>
that it actually is.
For example, suppose you have an Object
that you know is really the set $\Set{1, 2, 3, 4}$. You could iterate over it using this code:
Object reallyASet = /* ⊠*/;
for (Object x: asSet(reallyASet)) {
/* ⊠do something with x ⊠*/
}
In this problem, weâd like you to demonstrate your understanding of sets and set theory by coding up a number of functions in C++ that operate on sets. In doing so, we hope that youâll solidify your grasp of the distinctions between related concepts in set theory, such as the the $\in$ and $\subseteq$ relations and power sets.
Open the file SetTheory.cpp
from the starter files. There, youâll find a bunch of stubs of functions that youâll need to implement. The provided starter code contains a test harness you can use to try out your functions. You wonât need to modify any of the other C++ files bundled with the starter code.
As with Problem One, youâll submit the code that you write through GradeScope separately from the rest of the problems on this problem set. The GradeScope autograder will get back to you with feedback about how youâre doing on this problem, and youâre welcome to submit as many times as youâd like.
-
Implement a function
bool isElementOf(Object S, Object T);
that takes as input two
Object
s $S$ and $T$, then returns whether $S \in T$.$S$ and $T$ might not be sets; youâll need to use the
isSet
andasSet
functions appropriately.
-
Implement a function
bool isSubsetOf(Object S, Object T);
that takes as input an object $S$ and an object $T$, then returns whether $S \subseteq T$.
$S$ and $T$ might not be sets; use the
isSet
predicate to check whether the appropriate arguments are sets andasSet
to get a view of them as sets.
-
Implement a function
bool areDisjointSets(Object S, Object T);
that takes as input two objects $S$ and $T$, then returns whether $S$ and $T$ are sets where $S \cap T = \emptyset$. (Two sets with this property are called disjoint.) The input parameters $S$ and $T$ may or may not be sets, and if they arenât, your function should return
false
.
-
Implement a function
bool isSingletonOf(Object S, Object T);
that takes as input two objects $S$ and $T$, then returns whether $S = \Set{T}$. Again, $S$ and $T$ may or may not be sets.
-
Implement a function
bool isElementOfPowerSet(Object S, Object T);
that takes as input two objects $S$ and $T$, then returns whether $S$ and $T$ are sets and $S \in \wp(T)$. Again, $S$ and $T$ may or may not be sets.
As a hint, you shouldnât need to write code that computes $\wp(T)$ explicitly. See if you can find a different way to do this.
-
Implement a function
bool isSubsetOfPowerSet(Object S, Object T);
that takes as input two objects $S$ and $T$, then returns whether $S$ and $T$ are sets and $S \subseteq \wp(T)$. Again, $S$ and $T$ may or may not be sets.
-
Implement a function
bool isSubsetOfDoublePowerSet(Object S, Object T);
that takes as input two objects $S$ and $T$, then returns whether $S$ and $T$ are sets and $S \subseteq \wp(\wp(T))$. Again, $S$ and $T$ may or may not be sets.
To submit your work, upload your edited SetTheory.cpp
file to GradeScope. Youâll get immediate feedback on your score from our autograder, and youâre allowed to resubmit as many times as youâd like.
As a note, you shouldnât edit SetTheory.h
; our autograder will always use the default version of that file when running tests.
Problem Three: Describing the World in Set Theory
The notation of set theory (e.g. $\cup, \cap, \wp, \subseteq, \in, \emptyset, =,$ etc.) is a great tool for describing the real world. Answer each of the following questions by writing an expression using set theory notation, but without using plain English, without using set-builder notation, without introducing any new variables, and without using propositional or first-order logic (which weâll cover next week). No justification is required.
-
In the Talking Heads song Crosseyed and Painless, David Byrne speaks the following lines:
âFacts are simple and facts are straight. Facts are lazy and facts are late.â
Let $F$ be the set of all facts. Let $A$, $B$, $C$, and $D$ represent the set of all things that are simple, straight, lazy, and late, respectively. Write an expression that conveys David Byrneâs lyrics in the language of set theory.
Once youâve written up your answer to this problem, take a minute to type-check it. As an example, suppose that you have the following answer:
\[(A \in B) \cap (A \in C).\]This expression canât be correct, and hereâs one way to see this. The expression $A \in B$ is of type Boolean â either $A \in B$ is true or it isnât â and the same is true of $A \in C$. However, the intersection operator $\cap$ can only be applied to sets. The expression therefore contains a type error: it tries to apply an operator that only works on sets to Boolean values.
You can type-check this answer in a different way. For example, suppose you came up with this expression:
\[A \cup D.\]Here, $A$ and $D$ are sets, so itâs perfectly fine to write $A \cup D$, which evaluates to an object of type set. But notice that the statement here asks you to write an expression that says âFacts are simple and facts are straight. Facts are lazy and facts are late.â and that statement is of type Boolean (facts either have these properties or they donât). Therefore, $A \cup D$ canât possibly be an expression with the right meaning, since the type of the expression (set) doesnât match the type of the statement (Boolean).
If youâre having trouble with this problem, consider working backwards. You know that you need an expression that evaluates to type Boolean. What operations on sets do you have that produce Booleans? Or perhaps make the problem simpler. How would you say "all facts are simple?" How about "all facts are both simple and straight?"
-
Suppose youâre on an exciting first date. Let $Y$ represent the set of all your hobbies and $D$ represent the set of all your dateâs hobbies. Write an expression that says that you have at least one hobby that your date doesnât have.
As before, type-check your answer! Should your answer represent a set? A Boolean? Something else?
-
Letâs say that a committee is a group of people, which we can think of as being represented by the set of people that comprise it. Letâs have $S$ represent the set of all students at Stanford and let $F$ represent the set of all faculty at Stanford. Write an expression representing the set of all committees you can make from Stanford students and faculty that contain at least one student and at least one faculty member. You can assume no one is both a student and a faculty member.
Something to think about: how would you say âall committees made purely of students?â Something else to think about: what is the type of the statement to translate? Is it a Boolean? A set? Neither?
Problem Four: Proof Critiques
One of the best ways to improve your proof writing is to do some proof reading. In doing so, youâll get a much better perspective on why certain stylistic conventions matter, both in the positive sense, (âwow, thatâs so easy to read!â) and in the negative sense (âI canât make heads or tails of this!â). Youâll also get practice tracing through mathematical arguments, which will help expand your repertoire of techniques and give you a better sense of what details to focus on in your own reasoning.
Weâve curated three proofs for you to review. Read these proofs, and for each one, do the following:
- Critique its style. Our Proofwriting Checklist contains specific details to review in any proof. Go through the checklist one item at a time, identifying any style errors and explaining each.
- Critique its reasoning. Are the arguments given by these proofs correct? If there are logic errors, point them out and demonstrate why theyâre incorrect. Then, determine whether the theorem being proved is even true in the first place. After all, you can prove anything using faulty logic!
Complete the critique for each of the three proofs by filling out the table below:
Checklist Item | Violation? | If Yes, where is the error? |
---|---|---|
Clearly Articulate Assumptions and âWant-to-Shows.â | Yes/No | |
Make Each Sentence Load-Bearing | Yes/No | |
Scope and Properly Introduce Variables | Yes/No | |
Make Specific Claims About Specific Variables | Yes/No | |
Donât Repeat Definitions; Use Them Instead | Yes/No | |
Write In Complete Sentences and Complete Paragraphs | Yes/No | |
Distinguish Between Proofs and Disproofs | Yes/No | |
Avoid the âContradiction Sandwichâ | Yes/No | |
Are there any logic errors? If so, where? | ||
Is the overall theorem true? |
-
Critique this proof about parities (the parity of a number is whether itâs even or odd.)
Theorem: The sum of an even integer and an odd integer is odd.
Proof: This proof will talk about adding together different kinds of numbers. An even integer is an integer that can be written as $2k$ for some integer $k$. Therefore, $m = 2k$. Similarly, an odd integer is one that can be written as $2k+1$ for some integer $k$. So $n = 2k+1$. $m + n = 2k + 2k + 1 = 4k + 1$. Therefore $m + n$ is odd. â
-
Critique this proof about natural numbers.
Theorem: Every natural number is odd.
Proof: Assume for the sake of contradiction that every natural number is even. In particular, that would mean that $137$ is even. Since $137 = 2 \cdot 68 + 1$ and $68$ is a natural number, we see that $137$ is odd. We know that there is no integer $n$ where $n$ is both odd and even. However, $n = 137$ is both even and odd. This is impossible. Weâve reached a contradiction, so our assumption must have been wrong. Therefore, every natural number is odd. â
-
Critique this proof about modular arithmetic (see Problem 8 for how this new operation, modular congruence is defined!).
Theorem: If $n$ is an integer and $n \equiv_2 0$, then $n \equiv_4 0$.
Proof: We will prove the contrapositive of this statement and show that if $n$ is an integer where $n \equiv_4 0$, then $n \equiv_2 0$. Since $n \equiv_4 0$, we know $n = 0 + 4q$. This in turn tells us that $n = 2(2q)$, so there is an integer $m$ such that $n = 2m$. Consequently, we see that $n = 0 + 2m$, and so $n \equiv_2 0$, as required. â
Problem Five: Writing Direct Proofs
Itâs time to write your first proofs! Over the next three problems, weâll walk you through three proofs of three different theorems. A key theme throughout these problems is
â the structure of a theorem dictates the structure of the proof. â
That is, the way the theorem is written gives the high-level structure of how the proof will be written. Indeed, you can make progress toward proving a theorem simply by âunpackingâ the statement of the theorem to figure out what needs to happen and when.
In this problem, you will write a direct proof of this theorem:
Theorem: For all integers $n$, if $n$ is odd, then $n^2$ is odd.
For example, we see that $3$ is odd, and $3^2 = 9$ is odd as well.
Remember that the structure of a direct proof is dictated by the sentence structure of the theorem. In this case, our theorem looks like this:
\[\begin{aligned} &\text{For all integers }n, && \text{(a universally-quantified statement)} \\ &\quad\text{if }n\text{ is odd,} && \text{(the antecedent of an implication)} \\ &\quad\quad\text{then }n^2\text{ is odd.} && \text{(the consequent of an implication)} \end{aligned}\]Take a look back at the Guide to Proofs, the slides from our lecture on mathematical proofs, or the Proofwriting Checklist, for a refresher about how to work with universally-quantified statements and implications.
We want to extract from the sentence structure of our theorem the two foundations of our direct proof. The first is the starting point of the proof, which we call the assume step. Here, youâll pick an arbitrarily-chosen value meeting the requirements of the antecedent of the implication. The second is the destination of the proof, which we call the want-to-show step. Here, thatâs the consequent of the implication.
It is important to note that the want-to-show is not the entire theorem, although that might seem like the obvious thing to say since you clearly do want to show it! Think of the pair as like a start and destination of driving directions, and want-to-show is just the name of the destination.
-
Write the first sentence of this proof (the assume step).
Ours start with the word âpick,â but there are other valid options listed in the Guide to Proofs and Proofwriting Checklist.
-
Write the second sentence of this proof (the want-to-show step).
Ours starts with the words âWe want to show thatâŠâ
-
Now complete the proof, using this template as a guide, and copying in the two sentences you wrote above. The sizes of the blanks are not necessarily to scale.
Notice that the first two sentences of a direct proof follow mechanically from the structure of the theorem. The third sentence in this example is also illustrative of a very common pattern for third sentences, which is to expand a definition from the âassumeâ sentence (in this case, the definition of odd integers).
Theorem: For any integer $n$, if $n$ is odd, then $n^2$ is odd.
Proof: Pick $\blank$. We want to show that $\blank$. Since $n$ is odd, there is an integer $k$ where $\blank$. (Note: When following the direct proof guidelines, the first three sentences are fairly mechanical, but now we need to exercise actual creativity. It helps to look at our want-to-show to remind ourselves of our destination on this journey. It says we want to show something about $n^2$, so we will begin with the expression $n^2$, and then apply algebra to it.) Then we see that
\[\begin{aligned} n^2 & = \blank \\ & = \blank \\ & = \blank. \end{aligned}\]Therefore, there is an integer $m$ (namely, $\blank$) such that $\blank$, so $\blank$ (write your âWant to Showâ statement here to announce that youâve proved it), as required. â
-
In the conclusion of the proof, the template has you using a variable named $m$ to show that $n^2$ is odd. The definition of odd integers from the lecture slides uses a variable $k$ for this purpose. Why did we choose $m$ here instead? Could we have used $k$?
Problem Six: Writing Proofs by Contrapositive
Youâve now written your first direct proof â great job! Letâs move on to our next proof technique, the proof by contrapositive. In this problem, youâll use a proof by contrapositive to prove this theorem:
Theorem: For all integers $a$, $b$, and $c$, if $a^2 + b^2 = c^2$, then at least one of $a$, $b$, and $c$ is even.
Proof by contrapositive is another technique for theorems with a sentence structure that has the form of an implication. In fact, proof by contrapositive will proceed exactly like a direct proof, with similar âassumeâ and âwant-to-showâ steps, but will do so only after taking the contrapositive of the theorem to get a new, equivalent statement to prove.
-
What is the contrapositive of the theorem?
Since the âfor allâ part comes before the âifâ that begins the implication, the âfor allâ part remains unchanged by taking the contrapositive. Be very careful how you negate the âat least one of.â
-
Write the âassumeâ sentence of your proof, based on the antecedent of the contrapositive.
-
Write the âwant-to-showâ sentence of your proof, based on the consequent of the contrapositive.
-
Complete the proof, using this template as a guide, and copying in the two sentences you wrote above. As before, the sizes of the blanks are not necessarily to scale.
Theorem: For any integers $a$, $b$, and $c$, if $a^2 + b^2 = c^2$, then at least one of $a$, $b$, and $c$ is even.
Proof: We will prove the contrapositive of this statement, namely, $\blank$. To do so, pick $\blank$. We want to show that $\blank$.
Since $a$, $b$, and $c$ are $\blank$, we know by our result from the previous problem that $a^2$, $b^2$, and $c^2$ are $\blank$.
Because $a^2$ and $b^2$ are $\blank$, there exist integers $p$ and $q$ such that $\blank$. This means that $a^2 + b^2 = \blank = \blank$, which means that $a^2 + b^2$ is $\blank$.
However, as mentioned earlier we know that $c^2$ is $\blank$. Therefore, we see that $\blank$ (write your âWant to Showâ statement here to announce that youâve proved it), as required. â
In the above proof, we expanded the definition of odd for two values that we know are odd, $a^2$ and $b^2$. However, notice that we didnât expand out the definition of odd for $c^2$, even though we know itâs an odd number. While factually it wouldnât be incorrect to expand out what it means for $c^2$ to be odd, it would be have been stylistically incorrect, since doing so would violate one of the rules from the Proofwriting Checklist.
-
What rule from the Proofwriting Checklist would have been violated if we had expanded out the definition of â$c^2$ is oddâ in the above proof?
Problem Seven: Writing Proofs by Contradiction
Weâve just checked off direct proofs and proofs by contrapositive. That leaves us with proofs by contradiction, which are the focus of this problem.
Your task in this problem is to prove the following theorem:
Theorem: For all integers $m$ and $n$, if $mn$ is even and $m$ is odd, then $n$ is even.
When writing a proof by contradiction, in your âassumeâ step youâll simply assume the negation of the theorem to prove.
-
What is the negation of the above theorem?
Once youâve written the âassumeâ state in a proof by contradiction, you wonât explicitly articulate a âwant-t-showâ the way you did for a direct proof or a proof by contrapositive. Rather, by simply informing the reader that youâre going to proceed by contradiction, youâre implicitly telegraphing âoh, and by the way, Iâm going to find two contradictory facts that follow from this assumption.â Therefore, rather than explicitly stating a âwant to showâ sentence like you did in the previous proofs, youâll simply start exploring from your assumption, then indicate once youâve reached a contradiction.
-
Fill in the blanks below to complete this proof by contradiction. As before, the relative sizes of the blanks are not necessarily indicative of how much you need to write.
Theorem: For any integers $m$ and $n$, if $mn$ is even and $m$ is odd, then $n$ is even.
Proof: Assume for the sake of contradiction that $\blank$. Since $m$ is $\blank$, we know that there is an integer $k$ where $\blank$. Similarly, since $n$ is $\blank$, there is an integer $r$ where $\blank$. Then we see that
\[\begin{aligned} mn & = \blank \\ & = \blank \\ & = \blank, \end{aligned}\]which means that $mn$ is $\blank$, but this is impossible because $\blank$.
We have reached a contradiction, so our assumption must have been wrong. Therefore, if $mn$ is even and $m$ is odd, then $n$ is even. â
Problem Eight: Proving Mixed Universal and Existential Statements
This problem explores a style of proof in which we mix together universally-quantified and existentially-quantified statements. To do so, weâll explore a concept called modular congruence.
Different numbers can yield the same remainder when divided by some number. For example, the numbers $1$, $12$, $23$, and $34$ all leave a remainder of one when divided by eleven. To formalize this relationship between numbers, we'll introduce a relation $\equiv_k$ that, intuitively, indicates that two numbers leave the same remainder when divided by k. For example, we'd say that $1 \equiv_{11} 12$, since both $1$ and $12$ leave a remainder of $1$ when divided by $11$, and that $8 \equiv_3 14$, since both $8$ and $14$ leave a remainder of $2$ when divided by $3$.
To be more rigorous, we'll formally define $\equiv_k$. If $k$ is an integer, we define $a \equiv_k b$ as follows:
We say that $a \equiv_k b$ when there exists an integer $q$ such that $a = b + kq$.
Weâd read the statement â$x \equiv_k y$â aloud as â$x$ is congruent to $y$ modulo $k$.â For example, $7 \equiv_3 4$, because $7Â = 4 + 3 \cdot 1$, and $5 \equiv_4 13$ because $5 = 13 + 4 \cdot (-2)$.
-
Fill in the blanks to complete this direct proof about modular congruence.
Theorem: For all integers $x$ and $y$ and any integer $k$, if $x \equiv_k y$, then $y \equiv_k x$.
Proof: Let $x$, $y$, and $k$ be arbitrary integers where $x \equiv_k y$. We need to show that $y \equiv_k x$. To do so, we will show that there is an integer $q$ where $\blank$. (Notice that after stating our want-to-show as usual for a direct proof, we expanded the want-to-show to be more specific about what it means to show that. Now our want-to-show has the form of an existential (â⊠there exists an integer $q$ âŠâ). This is an important structural trait to focus in on. It means that in the body of the proof, we are going to have to demonstrate that such a $q$ exists very concretely by proposing a specific value for $q$.)
Because $x \equiv_k y$, we know there is an integer $r$ such that $\blank$. Now, pick $q = \blank$. (Here it is, our announcement of the value we are proposing for $q$. Next, we need to justify to the reader that our choice works. What follows is that justification. Always do it in this order: first announce the value, then justify.) Then we see that
\[\begin{aligned} y & = \blank && \color{blue}{\textit{(Do not write } x + qk \textit { here; see below)}} \\ & = \blank \\ & = x + kq, \end{aligned}\]which is what we needed to show. â
As the note in the proof suggests, you must not start with the equation $y = x + qk$, and do algebra from there. The reason is that you do not know yet if that is true, and proofs must be a sequence of statements that are certain to be true. So you want to write something there that we already know is true, and use algebra to reach the last line as written.
-
Prove for all integers $x$, $y$, $z$, and $k$ that if $x \equiv_k y$ and $y \equiv_k z$, we have $x \equiv_k z$.
-
Prove for all integers $x$ and $k$ that $x \equiv_k x$.
This proof will feel different from the previous problems because you arenât assuming anything about $x$ or $k$ other than the fact that theyâre integers. But the basic setup will feel the same: youâre searching for some choice of $q$ that makes some equality hold. Follow the general idea from earlier when structuring your proof: state, explicitly, what choice of $q$ youâre going to make, then prove that it has the right properties.
Problem Nine: Proofs on Sets
Earlier in this assignment, you explored the language of sets and set theory. On this problem, you'll see how to write proofs about sets.
One of the trickier details when writing proofs about sets is a disconnect between how we usually conceptualize sets and how proofs about sets actually work. When you think about sets at a high level, you typically think about "the collection of all items with some property" and think more holistically about what the items of the set look like. However, proofs about sets tend to instead focus more on individual elements of the sets and how they relate to one another.
Let's begin with an example. You're familiar with the notation $S \subseteq T$, which says that $S$ is a subset of $T$. The formal definition of $S \subseteq T$ is: If $S$ and $T$ are sets, then $S \subseteq T$ when for every $x \in S$, we have $x \in T$.
That means that to prove that $S \subseteq T$, the general pattern is the following:
- Pick an arbitrary $x \in S$.
- Prove that $x \in T$.
As an example, here's a proof that if $A \subseteq B$ and $B \subseteq C$, then $A \subseteq C$.
Theorem: For all sets $A$, $B$, and $C$, if $A \subseteq B$ and $B \subseteq C$, then $A \subseteq C$.
Proof: Pick any sets $A$, $B$, and $C$ where $A \subseteq B$ and $B \subseteq C$. We need to show that $A \subseteq C$. To do so, pick an $x \in A$; we'll prove that $x \in C$.
Since $A \subseteq B$ and $x \in A$, we know that $x \in B$. Similarly, since $x \in B$ and $B \subseteq C$, we know that $x \in C$, which is what we needed to show. $\qed$
Notice that this proof is essentially a story about an element $x$ and how it's contained in the different sets. Note that, in particular, we did not write the proof like this:
Theorem: If $A \subseteq B$ and $B \subseteq C$, then $A \subseteq C$.
(Incorrect!) Proof: Pick any sets $A$, $B$, and $C$ where $A \subseteq B$ and $B \subseteq C$. We need to show that $A \subseteq C$.
Since $A \subseteq B$, we know that $B$ contains all elements of $A$. And since $B \subseteq C$, we know that $C$ contains all elements of $B$. Therefore, $C$ contains all elements of $A$, so $A \subseteq C$. $\qed$
This proof might seem like it's intuitively on the right track, but because it doesn't focus on the specific definition of $A \subseteq C$, which is a universally-quantified claim about an object $x$, it isn't rigorous enough to establish the result.
-
Fill in the blanks below to complete the following proof. As always, the relative sizes of the blanks does not necessarily indicate how much you need to write.
Theorem: For all sets $A$, $B$, and $C$, if $A \subseteq B$ and $A \subseteq C$, then $A \subseteq B \cap C$.
Proof: Let $A$, $B$, and $C$ be arbitrary sets where $\blank$. We need to show that $\blank$. To do so, pick an arbitrary $x \in $ $\blank$. We want to show that $x \in $ $\blank$.
Since $\blank$ and $\blank$, we know that $x \in $ $\blank$. Similarly, since $\blank$ and $\blank$ we know that $x \in$ $\blank$. This means that $\blank$ and $\blank$, and so $x \in $ $\blank$, as required. $\qed$
-
Fill in the blanks below to complete the following proof. As always, the relative sizes of the blanks does not necessarily indicate how much you need to write.
Theorem: For all sets $A$, $B$, and $C$, if $A \subseteq C$ and $B \subseteq C$, then $A \cup B \subseteq C$.
Proof: Let $A$, $B$, and $C$ be arbitrary sets where $\blank$. We need to show that $\blank$. To do so, pick an arbitrary $x \in $ $\blank$. We want to show that $x \in $ $\blank$.
Since $\blank$, we know that either $x \in $ $\blank$ or $x \in $ $\blank$. We consider each case separately.
Case 1: $x \in $ $\blank$. $\blank$.
Case 2: $x \in $ $\blank$. $\blank$.
In either case, we see that $\blank$, which is what we needed to show. $\qed$
Now that you have a bit more of a feel for what these proofs look like, let's introduce one more concept. Formally speaking, if $S$ and $T$ are sets, we say that $S = T$ if $S \subseteq T$ and $T \subseteq S$. In other words, two sets are equal if each is a subset of the other.
-
Prove for all sets $A$ and $B$ that if $\powerset{A} = \powerset{B}$, then $A = B$.
Optional Fun Problem: Infinite Deviation
On each problem set, we'll provide at least one Optional Fun Problem. These are problems that can be solved purely using the techniques youâve learned so far, but which will require more thought than the other problems on the problem set. Each problem, in our opinion, has a beautiful solution that will give you a much deeper understanding of core concepts, so we strongly encourage you to play around with them if you get the chance.
These Optional Fun Problems have no bearing on your grade. However, if you successfully complete at least one Optional Fun Problem on three or more of the problem sets this quarter, we'll send you a certificate attesting to that fact and saying how impressed we are. (These certificates carry no official weight with the university, but are something we could mention in a recommendation letter.)
As a matter of course policy, we don't provide any hints on the Optional Fun Problems â after all, they're supposed to be a challenge! However, we're happy to chat about them after the problem sets come due.
In our first class, we sketched a proof of Cantorâs theorem. This proof assumed there was a pairing between the elements of a set $S$ and the subsets of $S$, then constructed a set that was different in at least one position from each of the paired sets.
Show that, no matter how you pair the elements of $\mathbb{N}$ with the subsets of $\mathbb{N}$, thereâs always at least one set $X \subseteq \mathbb{N}$ that differs in infinitely many positions from each of the paired sets. Justify your answer, but no formal proof is necessary.