How did you get on with assignment seven? In this lecture, I'll say something about how to prove statements that involve quantifiers. Which is true for almost all mathematical theorems. Universally quantified statements of the form for all natural numbers n, some property A(n) holds. Where the quantification is over all natural numbers, are often proved by a method known as induction. I'll explain the method of induction with some examples from number theory. Number theory is one of the most important branches of mathematics. It studies the properties of the natural numbers, one, two, three, etc. We look at some elementary parts of the subject in later lectures. but for now it provides good examples of induction proofs. But first, let's look at how we might prove an existing statement. We want to prove there are this text such a of x. The obvious way way to find an object a for which a of a. For example, to sure that there's an irrational number, just prove it square root of 2 is irrational, Which we did. Unfortunately, this doesn't always work. Sometimes we use indirect proofs. For example, I'll work through that problem about the cubic equation where we show that there was a point on the x-axis where the curve crossed it. And hence so the cubic had the solution. We never found the solution we just showed the one existed. Let me give you a very fascinating example of an indent proof. I'm going to proof that there are irrationals r and s such that r to the power s is rational. That actually came up in assignment seven, if you remember. And I promised then that I would look at this later. Well, now is that later. The proof involves considering two cases. Case 1, if the square root of 2 raised to the power of square root of 2 happens to be rational, we can take r and s both equal to square root of 2. Then by the assumption that square root of 2 to the square root of 2 is rational we've shown that there are numbers r and s which are irrational with r to the power of s rational. Well if case 1 isn't the case then we must be in case 2. Which is where root 2 to the root 2 is irrational. In which case take a square root of 2 to the square root of 2. And s equal to square root of 2. And if we do that then add to the power s is root 2 to the root 2 all to the root 2. Which by the way that exponents work is root 2 to the power of root 2 times root 2 which is root 2 squared, which is 2. Until it's rational. So again we've proved that there are irrationals r and s, so it's r to the power of s is rational. Taken together case one and case two prove the theorem. I've really like this example. It's not just clever but it's cute. And it's cute because of the way it works. We really don't know whether this number root 2 to the root 2 is rational or irrational. Each probably is irrational actually but the point we don't need to answer that question we just look at these two alternatives. If it does happen to be irrational, it seem weired but if does happen to be irrational, then we can find irrationals in this without irrational this way On the other hand, if root 2 to the root 2 is irrational which probably is the case but again we don't need to know that. Tthen we take r to be this number, s to be that number, and then r to the s is 2 which is rational. So we don't know officially which one of these is the case. And more to the point, we don't need to prove which one of these is the case. We simply look at the two alternatives, and depending on which alternative we're in, we take different irrationals r and s, with r to the s being rational. So the choices of r and s are different in the two cases, but because these two cases exhaust all possibilities, this number is after all either rational or irrational, then this proves result. By the way, this is known as the method of proof by cases. And it's a method that you've used a lot in advanced mathematics. Pretty neat? Well, now let's take a look at how we might prove a statement involving a universal quantifier. Suppose we wanted to prove a statement for all xA(x). One way is to take an arbitrary x and show that it satisfies A(x). For example, to prove that for all n there is an m M bigger than n squared. Where the variables m and n range over the natural numbers. Well this is pretty trivial example but, I want to focus on the method that you would use to handle the two quantifiers in the statement like this. Where in particular the first quantifier is a universal quantifier. Let n be an arbitrary natural number. Set m equal to n squared plus 1. Then m is bigger than n squared. And this proves the statement there is an m, m bigger than n squared. And it follows that the statement for all m there is an m bigger than n squared is true. Okay, well as I've said this is pretty trivial. Let's just see what's going on in terms of the logical reasoning. You want to prove a statement involving two quantifiers of the form, for all n there is an m, m bigger than n squared. What we're going to do is eliminate one quantifier by replacing it by an arbitrary natural number. Now by arbitrary, I mean we make no assumptions at all, other than the fact that it is a natural number. The argument will have to hold for any natural number whatsoever, because we're trying to show that this is true for all n. So we pick an arbitrary one. Then we carry out some reasoning to verify the rest of the formula. Okay, when we eliminate the that, for all of n, we're trying to prove that there is an m, m bigger than n squared. Which is this statement. Now in this case it's a trivial argument. We just square n add 1 and let m be that number. So we explicitly find an m that satisfy this property. In practice, you probably going to do a lot of work here with the most significant example. There could be several lines or even pages of arguments involve at this stage. But the point you eliminate the first quantifier or picking an arbitrary n then you carry out some reasoning to proof the rest of the formula which is this thing here. And when you've done that because of the argument works with arbitrary n between actual number, it follows that you've proved it in this form The full of n has been handled reasoning with an arbitrary natural number. So we've taken away one of the quantifiers. Carried out some reasoning and proved the result. But let me stress that this works because the n that we pick is arbitrary. Another approach would be to use the method of contradiction. To prove for all x A(x), assume not all x A(x). This is equivalent to exist x not A(x). Well let c be an object such that not A(c). Notice that this isn't an arbitrary object. It's a specific object, admittedly an object whose identity we may not know. That is guaranteed to exist by this. The point is to prove this universal statement, we began by assuming its negation. Its negation gives us an existential statement. And that tells us that there will be some object, a specific object, for which not A(c). Now we've got a starting point to carry out a proof to do derive a contradiction. Now we reason with c together with the fact that not a(c) to derive a contradiction. Now the exact reasoning you use will depend on what the statement A says. But the general problem is this, you want to prove for all x A(x) and you're going to use contradiction. So you assume not for all x A(x), That's equivalent to exist x not A(x). And that tells you, you can find an object, at least you know that an object exists for which not A(c). And then if you can, you reason with that object using the fact that not A(c) to derive a contradiction. Okay, again, we'll see examples of this later on. I'm just giving you the general overview of the way these arguments work. So as in the previous case, if this looks a little bit mysterious it'll become clearer, I hope, when we look at some specific examples later. In fact at this stage, you might want to look back at assignment seven and see what was going on there in the light of what I've just said here. And before you go, let me give you a little quiz. Well the correct answer is no. This is not a valid proof. The point is picking a positive rational p arbitrarily. Is not the same as letting p be arbitrary. The choice of p may indeed be arbitrary but once you made it you've got a specific p. We've even said what it is. That's actually different from saying let p be arbitrary. An aritrary choice of p leads to a specific p. Which you may have chosen arbitrarily. But you might been unfortunate in your choice. You might have chosen a p that just happen's to make something happen,without any specific reason. It's a subtle point I know,but it's an important point so, you really need to sort this one out. Letting p be arbitrary is not the same as picking in arbitrary fashion a specific p. The point is that p, Is specific. It's choice may have been arbitrary but once you've made it, it's specific. In contrast, when you argue with an arbitrary p, you don't know anything about the p. You certainly wouldn't know that it was equal to .001 or whatever. You may need to think about that one a little longer or talk it over with some of your colleagues. Now let's look at proof by induction. This is the special case where we're proving the universal quantified statements where the quantifier ranges over the natural numbers. For example, suppose I want to prove that 1 + 2 + etc., etc., etc., + n = a half n (n+1). So the sum of the first n natural numbers is a half times n time n plus 1. Well if you're reading this problem for the first time, the smart thing to do is to begin by checking the first few cases. Just to see first of all to see if it's true for the first true cases and to try and get a sense of what's going on. So if n equals 1, what do we get? Well then we just got 1 here I'm putting n equals 1 into the formula. We have half times 1 ( 1 + 1). Which is a half times 1 times 2 which is 1. And indeed 1 equals 1. So, it's true In the first case. In the second case, n = 2. What do we have? We have 1 + 2 is the left hand side, equals, put it equals 2 here, we get a half times 2 ( 2 + 1), which is a half times 2 times 3. A half, so equals 3. And 1 + 2 does equal 3. So the formula is correct for n = 2. We might want to try n = 3. What do we get then? We get 1 + 2 + 3, Equals a half 3 ( 3 + 1). Which is a half 3 4 which is 6. Which is correct. So the formula checks out for the first three cases and we might want to do a couple more cases. But at least that gives us some sense of what's going on. By doing this we understand what the formula, we understand what the equation is saying. So far, this isn't a proof. This is just checking the first three cases. In fact you've got to be very careful about jumping to conclusions based on the first three or four cases. So, let me just stress that. This is not a proof. Okay let me stress it again. Be aware of jumping to conclusions. And to drive this point home let me give you an example where if you jump to conclusions you'll come to the wrong conclusion. Consider the formula p( n) = n squared + n + 41. If you start working out values for this formula,you find something rather interesting. You find that all values of p(n) for n equals to one, two, three etc are prime numbers. Well, not quite. That's true until you reach N = 41. And when you get to 41, you'll find that P(41) works out at 1,681. Which is 41 squared. So the first series of values for n = 1 to three etc,. All the way up to 41. Which is well beyond the number of cases most people would try up by hand. You find you've got a prime number. But if that lead you to believe that this formula generates prime for every end, then you're going to be wrong. Because when you get to N equals 41, it's no longer prime. This example, by the way, is due to the famous Swiss mathematician Leonard Euter in 1772. And it's a cautionary tale telling us not to jump to conclusions based on numerical evidence. Nevertheless, it's always a good idea. It's often a good idea to begin looking at a problem by working out a few cases. Not only do you get an understanding of what the formula is about. But you can sometimes, when you work out a few cases, you can find a pattern. In this case, there actually isn't a pattern to find. You'd work out the values and you just get numbers. And it turns out the first 40 of them are primes. But in this case, if you look at what's going on. Even if you did maybe a couple more n equals 4, n equals 5. You'd begin to see a pattern of what's going on. How the two parts of the formula are combining. What's happening to the half? The half is dividing into the second one here. The first one here. The second one there. And after you've done a few cases, you can often find away of capitalizing on the patterns that is there. In order to produce the proof that I'll show in a minute. So, induction proofs can often be derived by looking at first few cases. Seeing what the pattern is when you start plugging the numbers in. And then actually building a correct rigorous proof. Okay, so the next step now is to begin with this numerical evidence. And our understanding of how the formula works in order to come up with a rigorous proof of the fact that this formula holds for every end The method of induction depends on a principle known as the principle of mathematical induction. Okay, and here's what it says. Suppose you want to prove a statement For all n A(n). Establish the following two statements. One, A(1) that's known as the initial case or the initial step. Two, prove the following statements. For all n, for all natural numbers n if A (n) is true then A (n + 1) is true. That's known as the Induction step. Now intuitively, this gives the statement for all of n A(n) as follows. By the initial step, step one, A(1). If we now apply the induction step in the special case where n = 1. We have A(1) by the initial step and that yields A(n+1) which is A(2). So by two, or by step two, A(1) Yields A(2). So from A(1) we can conclude A(2). Okay, we begin by proving the initial step. So if we've proved A(1). Then we that one's true. We can now apply the induction step in the special case where n equals 1. And having proved this. If we have A(1), we can conclude A(2). Then we can do the same thing again. Once we've got A(2), we can put the 2 in here, and conclude A(3). So by A(2), And the induction step, We can conclude A(3) etc. all the way through the natural numbers. So, it's a little bit like taking a row of dominoes and you knocked the first one down. And providing the dominoes are close enough so that when one gets knocked down, the next one gets knocked down. Then, once you start to topple the row of dominoes, the first one not goes down. Then the first one knocks down the second one. The second one knocks down the third one. The third one knocks the fourth one. The fourth one knocks down the fifth one and so on and on and so on. All through the natural numbers. So you get the phase dominal falling down. So this basically says, knock the first domino down. And put the domino close enough together. So that when one falls, the next falls. Okay that intuitive explanation is fine as far as it goes. But that said, in order to vigorous demonstration of this method. The fact that proving these two together does yeald that universally quantified statement, that's actually quite a deep result of mathematics. And then we just stress that. You need an axiom or a principle to make this work called the principle of mathematical induction. The principle of mathematical induction is what tells you that one and two above, steps one and two above, yield for all and a event. Okay, now we have the method of induction laid out before us. I'll apply it in order to prove that identity that we looked at a moment ago. About the sum of the first and natural numbers. So, I'm going to prove a theorem now. That for any natural number, one plus two plus three plus n is a half n( n plus 1). I'm calling it a theorem because I'm going to give a vigorous proof. I want to use a method of mathematical induction. And since one of the purposes of a proof is to explain why something is true, It's usually good form to indicate to the reader the method you're going to use. It orientates the reader to what's going to come next. And I'm using a standard method here namely mathematical induction. So it's good form to indicate that that's the method that I'm going to use. Well, I have to do two things. I have to show that this is true when n = 1. And then I have to show that if it's true with n, it follows at n + 1. So the first step is to say that for n = 1, The identity reduces to, Well, n = 1 on the left-hand side, I've just go 1, put n = 1 right-hand side. I've got one-half (1)(1 + 1) which is one-half (1)(2), and indeed the left-hand side does equal the right-hand side. So that's true. Since both sides equal 1. So we've proved the first step. Incidentally, you may have noticed that I referred to this not as an equation but as an identity. And the reason is this an equation is something that you solve to find the value of a variable. Like the x in the case of a real number equation or n in the case of a natural number equation. But this isn't an equation that you solve for n. This is an identity. It tells you that the two sides are always equal. And we use the word identity to refer to an expression like this, that claims or that states that two things are equal for all values of n. So these two sides are identically equal. So the correct terms are on identity for something like this and equation for something that you solve. Having said that, like many mathematicians in practice, I'm sometimes not particular in the words I use. If you caught me talking to my colleagues, you might found me using the word equation, where I mean identity, possibly even using the way the identity where I mean equation although that one's less likely. But strictly speaking, an equation is something you solve, and an identity is something that states that two things are always equal. Okay, let's move ahead. We've proved that the result is true at n = 1, the next step is the induction step. So I'm going to assume, The identity holds for n, i.e, I'm going to assume 1 + 2 + n = one-half n (n + 1). And let me know now, I'm going to put this into brackets, I want to deduce 1 + 2 +...+ (n + 1) = one-half (n + 1) ( n + 1) + 1. Okay, that's just a note for myself to indicate the target I'm aiming for. And the challenge now is to start with what I know and deduce where I want to get. Well, how can I get this from this? Well, one way would be to add n + 1 to both sides of that identity. Which means, if I get the left -hand side here and then, hope that when I work out the right-hand side having added n + 1, I end up with this expression. Okay, so let's add n + 1, To both sides of, let me call it star. So star is the identity I'm assuming, let me add n + 1 to both sides of that. That gives me 1 + 2 +...+ n + (n + 1) = one-half n (n + 1) + (n + 1). So I've now got the left-hand side of what I want to prove. I need to show that the right-hand side is the right-hand side of the thing I want to prove. So I need to show that that is the same as that. Well, let's just see what happens. I can take the half out as a common factor. So I've got one-half [n(n + 1) + 2(n + 1)]. And that = one-half [n squared + n + 2n + 2] = one-half [n squared + 3n + 2]. And this factors. This is a one-half (n + 1) (n + 2). But that's the same as that. I can write it explicitly if you like is a one-half (n + 1) [(n + 1) + 1]. Which is the identity, With n + 1, In place of n. Hence, by the principle of mathematical induction, The identity holds, For all n. And we're done. We've proved the initial step, a simple matter of observation. And we've proved the induction step by a fairly simple algebraic argument. And that's it. That's mathematical induction in practice. Well, this screen came up about a quarter of an hour into the lecture. Did you spot anything wrong with it at the time? Can you see anything wrong with it now? Well, the problem's in here, this isn't the polynomial I meant to write down. What I meant to write down here was a polynomial P(n) = n squared- n + 41. I got the same, and for this it is the case, That for all values of the polynomial for n = 1, all the way up through n = 40, it's prime. Okay, all the way up. And then P(41). If you put that in, it's 41 squared- 41 + 41, which is 41 squared, which is this number here, 1,681. Let me call that P sub- to indicate there's a minus sign here. Because the polynomial I want now, I'll call P + (n), was this one + n + 41. That one is actually prime for n= 1, ...,39. And if I put 40 in there, let's put the minus in there to distinguish it. If I put 40 in there, I get what? I get 40. N squared + n is n times n+1. So it's 40 (40 + 1) + 41, which is 40 times 41 + 41. So I've got 40 times 41 and then another 41, that means I've got 41 lops of 41. Which again, is 41 squared = 1681. These are sort of the same polynomial when you look at it in terms of behavior here. We can just see what's going on. And they were both actually due to, well actually, well I'm not sure historically, whether, I'll write them both down, but clearly once this had been discovered, you're just manipulating them. And what I when I was giving the lecture, this is spontaneous by the way, almost all of these lectures are spontaneous. They're not meant to be polished lectures. I mean I'm familiar with the material, so it sometimes looks as though I'm just sort of reading it from a book. But if I am reading it from a book, it's a book in my head from having taught it for many years. Basically what I'm recording is spontaneous and I just pulled this off from my memory. And I confused two things, I knew that it didn't really matter what the sign was. But it does make a difference as to where it stopped being prime. If you'd picked the negative sign, it's prime all the way up to 40. If you pick the positive sign, it's prime all the way up through to 39. So it was a technical error, but in principle it was correct. And it certainly, whichever one you pick, gives a wonderful example of the fact that just because you have a repeating pattern, it doesn't mean to say something's true for all n. And remember that I introduce this as an illustration of caution when I was talking about induction proofs. Okay, well what happened was the first time I gave this course, many students found the mistake. And I thought it was good to leave it in the second time I gave the course, so that students will have a further chance of finding the mistake themselves. It's always fun to find mistakes, this time I decided to leave it in. But put in a quiz at the end just to prompt anyone that hadn't noticed the mistake that there was actually a mistake, okay? So now you know what's going on here, and you've seen me make a wonderful mistake in public, which is something that all good mathematicians should do. Okay, well that brings us to the end of 8.A, lecture 8.A. Let's move on to lecture 8.B now.