 Welcome back to another example of proof by cases. The proposition this time looks a little strange, so let's think about it. For all integers n, if five does not divide n, then either n squared is congruent to one mod five, or n squared is congruent to four mod five. Now in the last screencast, we said that before we can prove something, we need to come to grips with three questions. What are the terms mean in the statement? Why should we use cases if we're going to think about using cases? And then what are the cases? The main term here is the notion of integer congruence. So let's just recall that a is congruent to b mod five. And mod five congruence is the only thing we need to remember here. That means that five divides a minus b. Now under the surface there's another term, the notion of five dividing something. So recall again that five divides x means that there exists an integer such that x is equal to five times k. Now something that we have to think about in this problem is what would it mean for five not to divide x? Well on the surface it means that there is no integer k such that x equals 5k. But if you dig a little deeper you can get more to work with. If five doesn't divide x evenly then think back to your basic arithmetic and what does this mean? If five doesn't divide x evenly then it must divide with a remainder leftover. Now that's a basic fact of long division and another basic fact of long division is that the remainder can only be one, two, three, or four. The remainder couldn't be zero because otherwise five would divide x evenly and we're saying that it doesn't. And the remainder can't be any larger than four because in long division, remember if you're dividing by five and you end up with a remainder that's five or larger, it just means that you could divide again. So keep this notion about the remainders in mind. Second, why should we use cases in this case? Well, realize that we may not decide to use cases here. Just because we're in a section called proof by cases doesn't mean that we're gonna do it this way all the time. Let's consider the alternatives. If we use the contrapositive we'd have to negate the disjunction that's there in the conclusion and that would say that if n squared is not congruent to one mod five and n squared is not congruent to four mod five, then five does divide n. This seems complicated, but not overly so. I mean, it is conceivable that we could prove this by contraposition. But on the other hand, a direct proof would involve assuming a negative statement and this would assume involving two negative statements. So I just work with one negative statement instead of two. A proof by contradiction would involve assuming three things. Five does not divide n, n squared is not congruent to one mod five and n squared is not congruent to four mod five. That's three assumptions and that's good for us because that's a lot of information to have on our side. But that information isn't terribly informative because all the assumptions are statements that are phrased in the negative. Still, you could try to do this by contradiction and it might be a decent exercise to give it a shot. Actually, the cases come in if you attempt a direct proof. So just one thing to mention, we call this proof by cases, but it's really not any, a different method of proof. It's no different than direct proof. It's just a way that you could go if you attempt a direct proof in this case. A direct proof would involve assuming five does not divide n. Then show that either n squared is congruent to one mod five or n squared is congruent to four mod five. The cases would come in a couple of points here. For one thing, if you're proving that one or another of two possible conclusions holds, then cases could be useful. Because in each case, literally one or the other of those statements in the conclusion might hold. The other thing to mention segues into the question of what the cases are. And I'm going to give this to you as a concept check. How many cases do you think they're going to be here? What's the minimal amount of cases that we need to prove this theorem? Is it two, three, four, five, or none of the above? Pause the video and come back with your answer. So a smart way to set up cases in this particular problem would involve four cases. And those cases are based on the observation we made earlier that if five doesn't divide n, then when you do divide five into n, you get one of four possible remainders, one, two, three, or four. And so we're going to set up one case for each of those four possibilities. This situation breaks naturally into four non-overlapping cases that cover all the bases here. In each case, we're going to show that either n squared is congruent to one mod five or n squared is congruent to four mod five. Before we do that, here's how we're going to think of the remainders. If five divided n, that would mean that there would exist an integer k such that n is equal to five times k. If n divided by five, on the other hand, has remainder of one, then there exists an integer k such that n is equal to five k plus one. That plus one indicates the remainder. For example, 31 can be written as 31 equals five times six plus one, and there's the remainder. Likewise, if n divided by five has remainder two, then there exists an integer k such that n is equal to five k plus two. And so on for the remainders three and four. This is sort of like the notion of a type one integer that you looked at some time ago. So with that representation, we'll jump into the cases. So case one, let's assume that n divided by five has remainder one. And again, how we're writing that is that we're going to assume that n is equal to five k plus one for some integer k. Then we want to show that either n squared is congruent to one mod five or n squared is congruent to four mod five. That means five divides either n squared minus one or five divides n squared minus four. Now if you look at n squared minus one, you can substitute in n is equal to five k plus one and do some algebra. And you see that in this case, five does indeed divide n squared minus one. So therefore, n squared is congruent to one mod five as desired. Since one of the statements in the disjunction is true, we've proven the result, we do not have to deal with the other possible case in that disjunction. In case two, we're going to assume that five divided by n has remainder two. And again, we're going to write that as, assume that n is equal to five k plus two for some integer k. In this case, if we try to substitute into n squared minus one, we do not get what we want here. Let me just do the scratch work up here in the margins. Remember, we want to prove that n squared minus one is divisible by five. But if you work it out, it just doesn't happen and there's no way we can make it happen. But fortunately, remember that we don't have to prove that n squared minus one is divisible by five. Just that either n squared minus one or n squared minus four is divisible by five. So in this case, n squared minus one didn't give us something divisible by five. So let's look at the other expression, n squared minus four. In this case, if I substitute in n equals five k plus two into n squared minus four, we do the math and in the end, we get a multiple of five. So in case two, n squared is congruent to four mod five. Again, only one of the two statements in the disjunction that sits there in the conclusion needs to be satisfied. I'll just quickly move through the remaining two cases and you can pause the video and look at the text at any point you want. In case three, assume that n is equal to five k plus three for some integer k. That's the remainder three case. So putting this into n squared minus four gives us something divisible by five. And so in this case, n squared is congruent to four mod five. Finally, in case four, assume that n is equal to five k plus four for some integer k, putting this into n squared minus one and doing the math gives us something that's divisible by five. So in this case, n squared is congruent to one mod five. In each of the four possible cases, we got that n squared was congruent to either one mod five or four mod five. And so now the result is completely proven. So this proof using cases shows that proof by cases isn't really a new method. It's just a direction that we can take when writing a proof. And sometimes having something phrased in the negative such as five does not divide n, can actually work in our favor if we know how to rephrase that statement as something positive. Thanks for watching.