 So welcome back to another screencast about proving things about sets. In this screencast, we're going to look at a proof of the equality of two sets. We're going to prove that two sets are equal to each other. Now how do we do that? Well, let's review what it means for two sets to actually be equal to each other in terms of our logical framework we saw from the last section. We saw that to show that A equals B, or to say that A equals B, when A and B are sets, means that for every X in A, X is in A if and only if X is in B. So to prove that A equals B, if A and B are two sets, this is going to involve improving a bi-conditional statement. Which as you remember, proving a bi-conditional statement or if and only if statement involves proving two conditional statements. So first of all, so this is going to be a two stage proof, okay? Proving the two sets are equal to each other always happens in two parts. First of all, I need to prove that A is a subset of B by proving a conditional statement and that conditional statement would be to say that if X is in A, then X is in B. So we saw how to do that in the last video and that's using the so-called choose an element method. I pick an element out of A at random, describe it using the descriptor of what all elements of A have in common and then go on to prove that X has the membership criterion for B as well. That would be one direction of this proof and then as with all bi-conditional statements, I've got to go back and prove the converse. I have to now go and prove that B is a subset of A and that's also using a conditional statement. So if I would say, if you have an element say Y that belongs to B, then Y also belongs to A and that's also done using the choose an element method. So proving the two sets are equal to each other always involves two things to prove. One subset inclusion going this direction and another subset inclusion going that direction. And each of those proofs is a proof of a conditional statement that can be done in all the ways that we know how to prove conditional statements. So let's set up an example here and this is going to be kind of a lengthy example that involves some tricks that I can help you think your way through. So let's set up the characters here and then we're going to review the strategy and then we'll jump into the proof. So this is a slight expansion on the example we saw in the last video. We're going to let S be the set of all integers that are congruent to 9 mod 12. T is the set of all integers that are congruent to 1 mod 4. That was from the last time. And now we're going to throw in a new set U, the set of all integers that are congruent to 0 mod 3. What we're going to prove is that S equals the intersection of T and U. So for concept check, let's review how we're going to do this. What are we going to need to show ultimately in order to prove that those two sets are equal to each other? So pause the video and come back when you're ready to vote your answer here. So the answer here is both A and B, okay? I need to prove that S, if I'm going to prove that S is equal to T intersect U, I've got to show that S is a subset of T intersect U. And then I've got to turn around and prove that the subset inclusion works the other direction as well. This option might have been appealing to you, but it actually doesn't make any mathematical sense. Because this is the number 0, and a set cannot equal a number. That is just apples and oranges, and it makes no sense. Now, you might, if you replace the 0 with an empty set, you could possibly say something about that. But sets and numbers are not the same thing. So we're going to go with this strategy here. Now for a second concept check, let's talk about the strategy within the strategy. So suppose now I need to show, this should really be a non-proper subset there. What is the first thing we're going to have to do, improving that S is a subset of T intersect U? So here are some choices, and pause the video again, and come back when you have an answer. So the answer here is going to be A, okay? So we're going to prove that S is a subset of T intersect U, and that means that if X belongs to S, then X belongs to T intersect U. Okay, so in assuming the hypothesis for direct proof of that conditional statement, I would have to pick an element out of S. And so that's where we're going to go with A here. Okay, so I think we're going to, we have the handle on the strategy. Let's begin to set up the proof here. And so to prove that S is equal to T intersect U, we're going to start kind of proving a subset inclusion in this direction. What I mean is we're going to show that S is contained in T intersect U. So we're going to review some concepts here as we go about intersection and so forth. And as we just saw in the concept check, that means I'm going to choose or let X just be any old element out of S that I want. And I want to show, and this is really important here, I want to show that X also belongs to T intersect U, all right? So we've chosen an element, we've chosen X out of S. And now we look back to the definition of S and say, what was the thing that all elements of S have in common? Well, for us, since X belongs to S, what that means is that X is congruent to 9 mod 12. That's something we know about X. No matter what the value of X actually is, I do know that. Now let's think about what I want to show here too. I want to show that X belongs to T intersect U. Now that means I want to show that X belongs to T and X belongs to U. That's what intersect means, okay? An element that belongs to the intersection belongs to both sets at the same time. And so what that means is that I want to show that X is congruent to 1 mod 4. That's what it means to belong to T. And at the same time, I want to show that X is congruent to 0 mod 3. Now I'm going to change my color here and put, just for my own sake, a red box around all the stuff that is to show. This is to show. I do not know any of this stuff in the red box as a fact yet. This is where I'm headed. This is what I want to prove ultimately. I want to prove that X is congruent to 1 mod 4 and 0 mod 3 at the same time. Now one of those items we actually have already done. So I'm just going to refer back to this. The fact that X is congruent to 1 mod 4, the proof is actually in screencast 521. The video just before this. We prove that S is a subset of T in that video. And you can just go back and copy the proof down and carry it forward. And that will show that if X is 9 mod 12, then X is also 1 mod 4. So now let's show that X is congruent to 0 mod 3. So what do I know about X? Well, X is equal or is congruent to 9 mod 12. And what that means, I'll just put a little arrow here. What that means is that X is equal to 12 q plus 9 for some integer q. Now what I want to show is that X is congruent to 0 mod 3, which means it's a multiple of 3. And I think I can do that straight away here. If I just factor a 3 out of what I have, I have 3 times 4 q plus 3, and that's also equal to X. And so that automatically shows that X is congruent to 0 mod 3. Okay, so what I've shown here is that therefore, I'm not going to write all this just to save time, but I'll just highlight it. If I assume that X is an S, that means it's 9 mod 12, then what I get is that X is 1 mod 4. And again, we've done the proof for that already. And X is congruent to 0 mod 3. Now what that gives me, feed it back up here, that says that X belongs to T and a U at the same time. And therefore, I'll just put these three dots, mean therefore, therefore X belongs to T intersect U. And so therefore, S, the set, is a subset of T intersect U, because I've chosen an element out of S and shown that it belongs to T intersect U. And that ends the first half of the proof. Okay, I've shown this one subset inclusion. Now we're going to move on and prove the other direction of the subset inclusion. This is going to be considerably trickier here, not hard, but it contains a trick here that you might not see. So let's go ahead and start the new page here, and we're going to prove the other direction of subset inclusion. In other words, we're going to show now that T intersect U is a subset of S. And so what that means is I'm going to choose or let, choose an element out of T intersect U right here, and then show that it belongs to S. So I'm going to let Y, just to keep it from getting confused with X, belong to T intersect U, and I want to show that Y belongs to S, okay? So here's what I want to show, and here's what I get. Now Y belonging to T intersect U means that Y is in both T and Y is in U at the same time. Now what does that mean? Let's push that over here. To be in T means that Y is congruent to one mod four, and at the same time, Y is congruent to zero mod three. Now let's think about what those two things mean. This is stuff, all the stuff that I have written so far are things that I know for a fact, and so this is good to reinterpret them. Now what this tells me is that Y is equal to four times some integer, let's call Q one plus one. That's what it means to be one mod four, and because Y is zero mod three, I know that Y is equal to three times some other integer, I'll call Q two. Okay, so let me just put a box around this, because this is the state of the art of what I know about Y at this point. It belongs to T intersect U, which means I can write it in two different ways. I can write it as an integer multiple of four plus one on the one hand. And I can also write it as an integer multiple of three on the other hand. Now what I want to show here is that Y belongs to S, which means I want to show ultimately that Y is congruent to nine mod 12. I don't know that it is yet, but this is where I'm headed. So what I have to do here is bridge the gap between what I know and what I'm trying to prove here. So how do we do that? Well, looking, this is where you have to think a little creatively here. I know one other way to reinterpret what I want to show here is that Y is equal to 12 times some integer, I'll say Q plus nine. So let me put a red box around that because that seems important. This is ultimately where I want to end with this proof so far. If I can get Y equal to 12 Q plus nine for some integer Q, then I will show that Y, I will have shown that Y is congruent to nine mod 12, therefore Y belongs to S. Now, what I'm looking at here, what I know, I don't see any 12s. So my goal here is to, this is just an aside for me, is to get the number 12 in the game somehow through whatever means are necessary. So let's take a look at what I can do here. Well, I know that Y is equal to 4Q1 plus 1. I'm going to take that equation and multiply both sides of it by 3. And that's going to give me 3Y equals 12Q1 plus 3, okay? That's taking this equation and multiplying both sides by 3. Why did I do that? Because I want to get the number 12 into the game here. Because that's important in what I want to show. So there, I have the number 12 in the game. And now let's take the second equation, Y equals 3Q2, and multiply both sides of it by 4. And I get 4Y equals 12Q2, and that's it. There was no remainder. So now I have 12 in the game as well. Now, what could I do with this? Well, what I have here are two equations that are true simultaneously, okay? I have a system of two equations. I have this equation, which is true. It's true because I started here with my assumption that led to this, that led to this, and that led to this. So both of those equations are true simultaneously. I'm going to rearrange these slightly just to flip them in order vertically because I want you to see something here. So 4Y is equal to 12Q2, and 3Y is equal to 12Q1 plus 3. Now, what I can do here is I can subtract one equation from the other, okay? I'm going to subtract all of this stuff right here. What I'm going to be left with is on the left side is 4Y minus 3Y. That's equal to Y. And on the right hand side, I'm going to have 12Q2 minus 12Q1 minus 3. So just like back in high school when you were solving systems of two equations and two unknowns simultaneously, this is exactly one of the things that you would do. You would set up the equations and subtract one from the other. So now, if you look carefully, I'm very, very close to getting what I want here. I have Y equal to something times 12, or times another thing times, minus another thing times 12 minus 3. So I'm kind of thinking this is looking like what I want at this point. I'm going to start on your page here because I'm out of room. And let's just keep going with this. Y is now equal to 12Q2 minus 12Q1 minus 3. Now, what I want over here secretly, okay, I'm putting it in a box, and I don't know this yet, is to write Y equal to 12 times some integer plus 9. That's my ultimate goal because I'm trying to prove that Y is congruent to 9 mod 12. So how can I do that? I see the 12s here, but I got a minus 3. But no worries because I can just do this. I can take 12Q2 minus 12Q1. And I can write that as minus 12 plus 9. And why can I do that? Well, minus 12 plus 9 is equal to minus 3. So I haven't changed anything just cosmetically, split the 3 into those two numbers. But now, you see what I can do is I can factor off a 12. And that gives me 12 times the quantity Q2 minus Q1 minus 1, the whole thing plus 9. And now I think you can see where this is going to go. This by closure, this is an integer right here. And so what I've done is I've written Y equal to 12Q plus 9 for some integer Q. Now let's wind this up. What have I shown now? So that means that Y is congruent to 9 mod 12. Therefore, Y belongs to, is an element of my set S. And because Y was chosen arbitrarily to be out of T intersect U, what this tells me is that T intersect U is now a subset of S, okay? And remember, the first part of this proof said that S was a subset of T intersect U. And so now the entire proof is done. So now S is equal to T intersect U. Because I've shown that one side is a subset of the other and vice versa. And that is the end of the whole proof. So that was considerably longer than some of these other screencast proofs here. I hope you can follow that. If not, we wanted to just pause and check the steps here. All right, the main strategy is still the following. If you want to prove that one set is equal to another, A is equal to B, for example. Then what you have to prove is that A is a subset of B and B is a subset of A. And we do each of those individual parts using the choose an element method. Thanks for watching.