070 Guide To Set Theory Proofs
070 Guide To Set Theory Proofs
070 Guide To Set Theory Proofs
In other words, we’re beginning with a ton of little assumptions, and we have a single goal that we need
to prove (namely, A ⊆ D ∪ E). So now the question is how we go about doing that.
Notice that, up to this point, we haven’t actually needed to know anything about sets or set theory. We
could just as easily have replaced the word “set” with “pizkwat,” the symbol “⊆” with the word
“gloobah,” and the symbol ∪ with “zyzzyzyplyx,” and the proof setup would have looked the same. (Or
rather, it would have had the same structure, but looked much sillier.) To make actual progress here, we
need to know how to reason about subsets, unions, and the like. So let’s see how to do that.
3 / 10
An important detail here: this proof introduces a new variable x. The statement of the theorem purely
relates A, B, C, D, and E to one another. It says nothing whatsoever about anything named x. Think back
to the discussion of atomic theory and steel. Asking why steel is so strong requires you to steer the con-
versation away from “steel in general” and toward “individual atoms inside of a piece of steel.” The
original question – why is steel strong? – doesn’t concern individual steel atoms, but answering that
question requires you to think about things that way. Similarly, although there is no variable x in the
original theorem, proving that theorem requires us to reason about elements of the sets. So just as
atomic theory means “any discussion of fundamental properties of matter probably requires you to talk
about atoms,” the elemental theory of sets means “any discussion of sets will probably require you to in-
troduce new variables to talk about individual elements.”
How do we proceed from here? It’s not immediately clear, but we can use some of the information we
have. For example, we know that A ⊆ B ∪ C, and we know that x ∈ A. We can combine these pieces of
information together given the following principle:
☞ If you know x ∈ S and S ⊆ T, you can conclude x ∈ T. ☜
This follows from how subsets are defined. If S ⊆ T, then every element of S is an element of T, and so
in particular because x is an element of S, we can say that x is an element of T. We can put that into
practice here:
A detail to point out before we move on: notice that the way that we interact with the ⊆ relation in a
proof differs based on whether we are proving that one set is a subset of another or whether we are us-
ing the fact that one set is a subset of another. That will be unifying theme throughout the entire quar-
ter, and you’ll see this come up in the rest of this handout. In the first paragraph, we set up a proof that
A ⊆ D ∪ E by picking an arbitrary x ∈ A. In the second, we used the fact that A ⊆ B ∪ C to conclude that
x ∈ B ∪ C. Proving that one set is a subset of another introduces a new variable; using the fact that one
set is a subset of the other lets us conclude new things about existing variables.
4 / 10
We’re making some progress here, because this lets us use some of the facts from our proof setup that
we haven’t touched yet. Specifically, we’ve been holding onto the fact that B ⊆ D and that C ⊆ E, and
here we’re confronted with the fact that either x ∈ B or x ∈ C. Using what we saw in the previous section
about subsets, that means that we can potentially make a lot more progress here. The challenge is that
we can’t say for certain whether x ∈ B or x ∈ C – that might depend on x, B, and C. But that’s not a prob-
lem – that’s the sort of thing a proof by cases was meant for!
Here’s how we might continue from the previous section using both a proof by cases and our knowledge
of how B, C, D, and E relate:
5 / 10
And that’s a wrap! Now, look back over this proof. Notice that this proof very heavily uses the elemen-
tal perspective on sets. We don’t talk about how these sets, in general, relate to one another. We focused
on a single element x, went with x on a magical journey, and ended up reaching our desired conclusion.
6 / 10
The definition of set equality gives us the following route for proving two sets are equal:
☞ To prove that S = T, prove that S ⊆ T and T ⊆ S. ☜
This approach for proving that two sets are equal is sometimes called a proof by double inclusion,
though we generally won’t refer to it by that name. You are welcome to toss that around at cocktail par-
ties as well, though, if you so choose.
Another consequence of this theorem is the following conclusion that you can also draw from two sets
being equal to one another:
☞ If S = T, you can conclude that S ⊆ T and T ⊆ S. ☜
This comes up every now and then, though it’s much more common to use the opposite direction of this
theorem to prove that S = T via S ⊆ T and T ⊆ S.
A Second Example
Now that you’ve seen at a high level how you can reason about set equality and power sets, let’s work
through an example that will employ all of those techniques. Specifically, let’s work through this exam-
ple, which comes from the Winter 2018 midterm exam:
Theorem: For any sets A and B, we have A ∩ B = A if and only if A ∈ ℘(B).
This theorem touches on two concepts about sets we haven’t explored yet: power sets and set equality.
It’s also a biconditional, which means that it’s two proofs for the price of one!
As before, I’ll invite you to think about why, exactly, this result is true. This would be a great time to
draw some pictures and to try out examples. See if you can build an intuition for what’s going on here.
(Having trouble? Ask a question about it on Piazza!)
Let’s take a minute to think about how we’d formally set up a proof of this result. Again, even if you
don’t have a good intuition for where we’re going or why this is true, it can still be really helpful to, at a
bare minimum, set the proof up so that you see what exactly it is that we’ll need to demonstrate. Follow-
ing the lead from lecture, since this is a biconditional statement, we’ll set the proof up as two separate
halves that will work in tandem with one another.
If you aren’t familiar with the use of these double arrow markers at the start of each section of the
proof (the ⇐ and ⇒ symbols), they’re just a nice way to signal to the reader where each section of the
biconditional proof begins. Although we generally discourage using symbols like these, this is a fairly
common convention and makes the organization of the proof much simpler. We could have alterna-
tively split this proof apart into a pair of lemmas (smaller proofs that build into bigger ones), one for
each direction of implication, but we figured that this would be a slightly easier way to do things.
To make progress at this point, we’ll need to use our specific knowledge about how to reason about set
equality and power sets. For example, in the first branch of this proof, we need to prove that A ∩ B = A,
and in the second branch we’ll need to prove that A ∈ ℘(B). What do we need to do to prove these state-
ments? Well, looking back at the preceding page, we can see that
• we can prove two sets are equal by showing that they’re each subsets of one another, and
• we can prove that an object belongs to ℘(S) by showing that it’s a subset of S.
We can use that to expand the above proof, as is shown here:
We can work on either branch of this proof at this point, but for simplicity’s sake, let’s start with that
top branch. Here, we’re assuming that A ∩ B = A, and our goal is to prove that A ⊆ B. So let’s ask – how
exactly do you prove that A ⊆ B? That’s something we saw earlier – you pick an arbitrary element x ∈ A
and then prove that x ∈ B. So let’s add that in:
8 / 10
The question now is how to actually establish this. We’ve gotten to this point purely by expanding out
definitions and following templates. Here, we need to pause and see if we can find some connection.
In this top branch, we’re operating under the assumption that A ∩ B = A, and that’s something we haven’t
relied on yet. So maybe that’s a good place to look – especially since there doesn’t seem to be anything
else to really do here.
Now, notice that in this section we are assuming that A ∩ B = A, so we don’t need to prove A ∩ B = A.
Instead, we can rely on the fact that A ∩ B = A. That means we could bring in any of the facts about set
equality that we saw earlier: that A ∩ B ⊆ A, that A ⊆ A ∩ B, that any x ∈ A ∩ B also satisfies x ∈ A, or
that any x ∈ A satisfies x ∈ A ∩ B. How do we decide which of these paths to go down? Well, a priori,
there’s no reason to suspect that any one of them would pan out over the others. That’s just a bit of trial
and error. However, we do know that we’re in a position where we have an x ∈ A that we’d like to work
with (namely, our goal in this section is to get x ∈ B), so perhaps we should use the fact that x ∈ A
means that we’ll have x ∈ A ∩ B.
Let’s suppose that we do decide to do this. What will that buy us? Well, if we look back to how set in -
tersections work, we’ll see that if x ∈ A ∩ B we can conclude that x ∈ A and x ∈ B. And boy, is that use-
ful! After all, we ultimately wanted to show that x ∈ B.
So that means that we’d expect to take two steps here. First, we’ll use the fact that A = A ∩ B, plus our
knowledge that x ∈ A, to get x ∈ A ∩ B. From there, we’ll expand x ∈ A ∩ B into x ∈ A and x ∈ B, and
then we just need to wrap things up.
Here’s what this looks like:
There’s a lot going on in here, so I strongly recommend that you stop reading and go over that new sec -
tion slowly and carefully to make sure everything seems well-motivated. Not sure what a certain step is
doing? No worries! Go ask on Piazza. Once you’re satisfied that we’ve indeed proved one of the two di-
rections of implication, carry on to the next section, where we’ll work on the other.
For this other direction of implication, we find ourselves tasked with proving two separate statements:
first, that A ∩ B ⊆ A, and second, that A ⊆ A ∩ B. Let’s take each of these on individually.
9 / 10
We’ll begin by proving that A ∩ B ⊆ A. You might notice that this statement is true about any sets A and
B. If you’re not sure why this is, again, draw a Venn diagram. This one has a pretty intuition. But re-
member – it’s just an intuition, and to formalize this proof we’re going to need to use the elemental the-
ory of sets and proceed one element at a time. Here’s one way we can do this:
Take a look over this part of the proof. Notice that everything you’re seeing there, from the setup of the
proof (showing that one set is a subset of another), to the way in which we expand out definitions (here,
what it means for x ∈ A ∩ B to be true), follows the exact same set of rules we’ve been playing with the
whole time. This is a good thing – it means that once you’ve gotten the patterns down, these sorts of ar -
guments will become a lot easier to work through!
So now we’re left with proving A ⊆ A ∩ B. This statement is not true in general. For example, if I pick
A to be the set ℕ and B to be the set Ø, then A ⊈ A ∩ B. Oh no! That’s not good. But fortunately, that’s
okay here. Look back at where we are in the proof. We’re in the proof of the reverse direction of impli-
cation, which means that we’re operating under the assumption that A ∈ ℘(B). As a result, we’re not
working with just any old pair of sets A and B. We’re working with sets where A ∈ ℘(B).
… which means, what, exactly? Well, look back at the section about power sets. Since A ∈ ℘(B), we
know that A ⊆ B. And with that in mind, look back at A ⊆ A ∩ B. Let’s think about this intuitively, for
the moment. If you take A and intersect it with B, since A ⊆ B, you won’t “filter out” any elements of B.
There’s nothing in A that isn’t also in B. So in that sense, the statement A ⊆ A ∩ B is a little bit more in-
tuitive. Everything in A (the left-hand side) is still going to be there in A ∩ B (the right-hand side).
But of course, that’s not the end of the story. That’s very much a high-level, intuitive argument as to
why A ⊆ A ∩ B has to hold here, and we’re looking for an elemental set theory explanation. That means
that we need to do what we’ve done a bunch of times before, which is to appeal to the formal defini -
tions. We’ll need to pick an arbitrary x ∈ A, use the fact that A ⊆ B to place x ∈ B, and from there recog-
nize that because both x ∈ A and x ∈ B that we’ve got x ∈ A ∩ B. Is that a lot of details to check? Yes.
But is it difficult? Not really, once you get used to it. Pretty much everything I described here follows
from the specific rules about what you can conclude from different properties of sets holding and what
you need to prove in order to show various results about sets.
Converting that sketch of an argument into a formal proof gives us this, the final version of the proof:
10 / 10
And there you go! One complete proof of a theorem about sets.
This particular proof is sneaky in that the statement of the proof is quite short, yet, if you think about it,
there are three separate statements that all need to be proved independently. First, there’s the implication
that if A ∩ B = A, then A ∈ ℘(B). Then, there’s the proof that if A and B are sets, then A ∩ B ⊆ A. Fi-
nally, there’s the proof that if A ∈ ℘(B), then A ⊆ A ∩ B. The only way we could have known that we
needed to do this was to go slowly, methodically, and diligently through the structure of the proof.
You’ve seen the evolution of this proof, starting purely with a statement of a theorem and ending with
all the parts filled in. But imagine we hadn’t done that, and that instead we just tossed this proof at you.
It would have been difficult to make heads or tails of what the proof was doing, since you’re still getting
used to writing proofs. You’d have to ask why each step was justified, why there were so many pieces to
show, why certain parts weren’t “obvious,” etc. Our hope was that by having you read through this
longer discussion, you can see where each piece of the overall whole comes from, what general patterns
we were following, what templates exist for you to build off of, and how much of this larger picture fol-
lows from simpler patterns chained together.
In that sense, we hope that reading over this discussion reminds you of learning how to program. Jump-
ing into a full program that solves a problem while you’re still learning to code can be extremely disori -
enting. You’d look at each piece of the program, trying to decipher what on earth it did and how it fit
into the overall whole. But in the same way, if you had seen how that program was written, what the
thought process was behind each individual piece, and how much of what was written followed from
standard techniques, you’d have a better understanding of how everything fit together.
We invite you to look back at this proof when you’re studying for the CS103 final exam. How hard was
it to read? Did it make sense? Chances are, your answers will be “that wasn’t too bad” and “yep, those
are all standard techniques.” In the meantime, practice working with these templates and combining
them in different ways. Dissect the proofs we did in lecture to see how they adhere to these conventions.
And take on the problems from this week’s problem set, keeping these techniques in mind. You’ll get
this. You can do this. Best of luck!