 Welcome back to another screencast about the Fibonacci numbers. And this screencast, we're going to look at a proposition or theorem that involves the Fibonacci numbers. Just to review what we already know about the Fibonacci sequence, that's the sequence that's defined recursively by setting F1 equal to 1, F2 also equal to 1. And then F3 and above is defined to be, every term is defined to be the sum of the previous two terms. So for example, here's F1, here's F2, here's F3, which is the sum of the two that come before it. Here's F4, which is the sum of F3 and F2 and so on. So we have this infinite list of integers listed in order. Not with a formula as such, but with a recursive sort of rule for how to generate new terms. So let's prove this proposition here in this video. This is called Cassini's identity after a famous mathematician. It says that for all n bigger than or equal to 2 that Fn squared minus Fn plus 1 times Fn minus 1 is equal to negative 1 to the n minus first power. This object here on the right is just going to be either plus 1 or minus 1, depending what n is. So let's instantiate that theorem and just try to understand what it's saying. And to remind ourselves, here are the Fibonacci numbers, at least the first few of them. And this is F1 here, this is F2, F3, 4, 5, 6, and so on. Let me put F7 up here just for completeness. So let's try this out in a couple of cases. This is a theorem is supposedly true for n bigger than or equal to 2. So let's try n equals 2, just to see what happens. So if I just replace n with 2, I'm supposed to find that F2 squared minus F3 times F1 should be equal to negative 1 to the 2 minus 1. Let's see what if it actually is. So F2 squared, F2 is up here, that's equal to 1. So F2 squared is 1 squared minus, again, F3 is here, F1 is here. They kind of straddle that first term and that would be 2 times 1. That's equal to negative 1. And on the right hand side of the equation, negative 1 to the 2 minus 1 power is indeed negative 1. So those two things are equal and it checks. Let's try just another one a little bit further down the road here. Let's go to F, let's say F4, right here, right there, F4, which is 3. So if n is equal to 4, then what is F4 squared minus F5 times F3 equal to? Well, again, F4 is 3 and 3 squared is 9. F5 is 5 and F3 is 2 and 9 minus 5 times 2 is negative 1. And on the right hand side, negative 1 to the 4 minus first power, that's negative 1 to the third power, which is minus 1. Let's do one where it's an odd numbered subscript n equals 5. That's right here in the list. So what is F5 squared minus F6 times F4 equal to? Well, F5 is 5 and you square that to get 25. F6 is equal to 8. F4 is equal to 3. So that comes out to be plus 1 and negative 1 to the 5 minus first power. That's negative 1 to the fourth and even power of negative 1 is plus 1. So all these check out here. So we do believe that the proposition is actually true. So now we should set about trying to prove it. Now how are we going to prove this? Well, here's where induction is good for a couple of reasons. First of all, this is actually, if you look at this carefully, this is a predicate that we're trying to prove here. The predicate would be this equation right here. This would be, it's not really a statement to remember. We don't really know whether this is true for all values of n. We just see that it is for one, two, three values of n. But it's a predicate that is not discernibly true or false just by looking at it. And we claim that this equation is true for all n bigger than 2. So that sounds like induction. Another reason to think induction on this is because we're working with a recursively defined sequence and recursion and induction kind of go hand in hand. So let's move on and see if we can prove this by induction. So we'll be using what we call the extended principle of induction here because the base case is saying that this is true for all n greater than or equal to 2. So let's establish the base case first. This is going to be very easy. We want to show simply that F2 squared minus F3 times F1 is equal to negative 1 to that 2 minus first power. We actually did that on the previous page. Let's just look at the left-hand side of this proposed equation. Again, we don't know that this is equal. And then we'll do the right-hand side separately. So do the left over here or the right over here. The left here, F2 is 1, 1 squared minus F3 is equal to 2. And F1 is 1, that gives me a negative 1. Over here on the right, negative 1 to the 2 minus first power is negative 1 to the 1 power, and that's negative 1. Those two things are equal, and so the base case checks out. So we have the base case. Now let's move on to the inductive step. Now the inductive step here with Fibonacci numbers, we need to be just very careful about how we write what we're assuming and what we want to prove here. The inductive hypothesis is simply that we're going to assume that for some natural number k, this is not the second principle of mathematical induction. This is the extended principle. So we're only assuming that the proposition is true for some value of k. We want to assume this to be true. There is our inductive hypothesis. We can use this. And then we're going to prove that the identity holds if I replace k with k plus 1. So in all these places, here is a k that's been replaced with a k plus 1. Here's a, this was originally k plus 1, and I replaced the k with a k plus 1. So this is k plus 1 plus 1, which is k plus 2. This k minus 1 now becomes a k, and this k minus 1 also becomes a k. So here's what we're trying to prove, and I don't want to touch that. I don't know that this is true yet. So I just want to be careful with it. So we're going to proceed with the proof, like proving all equations that we've seen here is to look only at the left-hand side of that equation and try to prove this. So we're going to do only the left-hand side to start with. Let's go to a new fresh slide and do that. So let's start with the left-hand side, like I said. And we're going to have fk plus 1 squared minus fk plus 2 times fk. Now what is this equal to? Now here's a trick that often works with Fibonacci numbers. This fk plus 2, all of these Fibonacci numbers, all of these Fibonacci numbers can be reduced in size by using the definition of the Fibonacci sequence. In particular, what I'm going to do here on this, I'm going to say this is equal to, I'm not going to do anything here, just write fk plus 1 squared minus. Now the k plus 2, I'm going to use the definition of the Fibonacci sequence to rewrite that. So fk plus, f of k plus 2 is equal to the sum of f of k plus 1 plus f of k. That's just using the fact that a Fibonacci number is always equal to the sum of the previous two as long as we are past the base case. So we're going to make that substitution using just the definition of the Fibonacci sequence. Why there and not somewhere else? Well, I'll get to that in the end and why, you know, all the decision-making choices here as we go and at the end of the proof here. So here we have this and I'm just going to distribute this f of k on the end here to both terms in the parentheses. So I have fk plus 1 squared minus fk plus 1 fk minus fk squared. There we go. And now what I'm going to do next is to split off one factor of fk plus 1 and rewrite it using the Fibonacci number definition. So this is going to become, give myself some room here, is one factor of fk plus 1. And the other factor of fk plus 1, I'm going to write as fk plus fk minus 1. Again, that's because just using the definition of the Fibonacci sequence that's the sum of the two previous terms. Now why am I doing this, you might ask? Well, just kind of watch and you'll see and the rest of the equation is unchanged. Let's distribute that through the red parentheses there. So I have fk plus 1 fk plus fk plus 1 fk minus 1 minus fk plus 1 fk minus fk squared. And now you might see why I was doing this earlier. Why I made those choices? Because here I have an fk plus 1 times fk and here I have a minus fk plus 1 fk. So those things are gone here. So let me simplify this expression. I give myself a bit more room and I have fk plus 1 fk minus 1 minus fk squared. Now this stuff left over, this is almost the inductive hypothesis. Remember the inductive hypothesis said that fk squared minus fk plus 1 times fk minus 1 was equal to negative 1 to the k minus 1 power. And this is almost that except the signs are off. But that's okay because I can now rewrite this, and I'll put this in red as well. I can rewrite this as negative 1 times fk squared minus fk plus 1 times fk minus 1, okay? And now what I'm going to do, I'll have to go to another screen here to do this. But I'm going to use the induction hypothesis to replace all this stuff here in parentheses with what it's equal to. And here's where that replacement is. This is going to now become, for completeness sake, let me just recopy what I had at the bottom of the last slide. So fk squared minus fk plus 1 fk minus 1. And now again, through the induction hypothesis, I can take all this stuff here in the parentheses and make a replacement. And remember what it was equal to was, I do this in green as well, was negative 1 to the k minus 1. Okay, so now look at what we have here. I have negative 1 to the k minus 1 times a factor of negative 1. If I add the exponents together, guess what I get? I get negative 1 to the k power, and that's what I wanted to show. If you back up a couple of slides, you'll see that's what I wanted to show. So there is the proof of that Fibonacci identity. Now, just a word about where did all this stuff come from? How do you know? The main strategy here is when we're employing induction is to, with Fibonacci numbers, we use the Fibonacci number definition to rewrite at least one of these Fibonacci numbers in terms of the sum of the previous two Fibonacci numbers. That's a good way to kind of go from an inductive step back into the inductive hypothesis. Now, there are a million different ways to do this at any point in a proof involving Fibonacci numbers. And it does take a little bit of creativity and a little bit of patience to kind of arrive at the right thing. Again, I will tell you that as I was writing this up, it took me about 15 minutes of failed calculations before I finally came up with something that actually worked. But again, it's not just blind trying stuff out and seeing what sticks. I do want to include the inductive hypothesis somewhere in the picture here. That's my guiding goal here. And so anything that got me to that inductive hypothesis was worth a try. Thanks for watching.