 In this video, I want to demonstrate the technique of proof by smallest counter example. Now, before we do that, I should actually mention very briefly, what does one mean by proof by counter example at all? We'll do some more examples of that about this type of proof technique later on in our lecture series, proof by counter example. But let me briefly introduce it so that we can talk about least counter examples. So what after all, what is a counter example? A counter example is an example that demonstrates that a universal statement is in fact false. Now, I hope the statement I have on the screen hasn't bothered anyone because I should mention that this statement is grossly an incorrect statement. So sometimes people will say this and it's a horrible thing to say but I'm actually gonna prove right now, forever afterward, this is a false statement that women are bad at mathematics. This is a universal statement as it's stated. You're saying that the set of all women is a subset of those who are bad at mathematics. Now, I should mention that how do we know that the statement is false? Now, some people might be like, well, some women are bad at math. Like I had this math teacher once, she was a girl and she was horrendous in mathematics. She was bad at math. Well, okay, so providing evidence that there are some women who are bad at mathematics does not say that all women are bad at mathematics. And also, so that doesn't disprove the statement. You might also be like, well, I've known men who are bad at mathematics. Maybe you could list a lot of men who've been bad at mathematics. Again, it's like, well, that doesn't say anything about this statement. In order to show that this statement is false, because again, you'd say that all women are bad at mathematics, what you have to do is provide a counter example. All you have to do is provide to the person who stated this, one woman who was good at mathematics and then that would disprove this statement, okay? And honestly, there are countless, countless many women throughout history, especially in the modern era, who are very, very capable mathematicians. I wanna highlight just a very few of them really quickly here. So, Hippochia is a sort of a very important one to notice because from the sort of modern historical era, she is one of the first well-known women mathematicians. So let's see, she was alive, oh boy, I'm gonna mess this up, around like 400 AD, maybe 680. I might botch this a little bit, but she was involved, of course, in like the school, the Greek school in Alexandria, Egypt, for which she wrote about mathematics and philosophy, a very, very brilliant mind. But of course, historically, a lot of women were not allowed to participate in scholarly efforts. She, of course, was a notable exception and one of the first that we know much about. I mean, like we know there's historical records about her life and she was a brilliant mathematician and definitely a counter-example to this horrible statement right here. She was a good mathematician and I can list so many other mathematicians as well. I'm not gonna spend all the time listing up all of them, but some of my favorites, of course, would be Sophie Germain because of her contributions to number theory. I've used like Sophie Germain Primes are named after her, which is something that showed up in my own research before. Amy Noether, a famous Jewish woman mathematician from Germany, who basically had to teach at the university for free because she was able as a woman to hold a position at the institution. But all of her colleagues were like, she is one of the most brilliant mathematicians we've ever known, please hire her. And it took forever for her to actually get any reasonable position and such. But also because it's the fact that she was a woman also because I'm pretty sure she was Jewish as well and Germany close to World War II led to some problems. So she eventually had to leave, but she had brilliant work, particularly in abstract algebra, also a topic that very much is close to my heart. The idea of a Noetherian ring is named after her. I mean, some other fun examples to mention, you could take Dorothy Vaughn or Catherine Johnson who were made famous in the movie Hidden Figures for the work they did as black women mathematicians working for NASA sort of during the civil rights era and such. And again, these are just a few examples. I could live so many more Ada Loveless, Julie Robinson. And honestly, I think a lot of the people watching this video right now are probably, I mean, I don't know who's watching it, but I'm quite certain there are many women watching this video who are quite capable of mathematics which is why they're watching this video right now. These are all examples of counter examples to disprove this statement right here. So I don't wanna hear anyone ever say that ever again. Anybody can be good at mathematics. Your race, gender, whatever, none of these things matter. All that matters is that you have a heart and a mind for mathematics. You have a love for mathematics and you have the fortitude to study. Those are the qualities that make a good mathematician. They're grit, they're intelligence, they're hard work. These are the attributes which makes someone a good mathematician, okay? And so I mentioned this as an example of proof by counter example. I know this statement is false because I can provide counter examples. Now in this statement, I can provide tons of counter examples but of course only takes one to disprove a universal statement. Now with that in mind, let's pivot to the notion of proof by least counter example. This is a technique that basically utilizes the well-ordering principle that we've talked about before for which I should mention the well-ordering principle is related to this idea of mathematical induction and we'll actually in this video solidify the connection between the well-ordering principle and the principle of mathematical induction but we'll do that in just a second. The well-ordering principle tells us that if I take any non-empty subset of natural numbers, it contains a minimum element, okay? We've also learned this technique which we call proof by contradiction, okay? So a proof by contradiction means that in order to prove a statement to be true, you can assume that it's false and then derive a contradiction. And so when you combine these two proof techniques together because we've seen some proofs where you use the minimal natural number to satisfy condition like we proved for example that the division algorithm follows by the well-ordering principle. Euclidean algorithm follows by the well-ordering principle. We've done some big proofs using the well-ordering principle. If you combine the well-ordering principle but with proof by contradiction, you then get this technique which is referred to as proof by least counter example. And so what this is is the following. Imagine you have a statement that you believe to be true about integers or natural numbers or something and then you're like, okay, I'm gonna prove it by contradiction. I'm gonna suppose that it's not true. Now, because you have the sequence of statements involving natural numbers or at least their index by natural numbers, if, and this is a universal statement, you're saying it's true for all natural numbers, if it's false by your assumption, then there has to be counter examples to the statement like we talked about in the previous slide. And if there's counter examples since the counter examples are indexed by natural numbers by the well-ordering principle, there has to be a smallest or a least counter example. And so then you look at that least counter example and then argue that it can't be the smallest that if it was a counter example, there actually was a smaller one contradicting the well-ordering principle and then giving you the contradiction you're looking for. So in summary, to prove something true, a universal statement about integers or natural numbers, you assume it to be false, you then use the well-ordering principle to find a smallest counter example, and then you argue that there's actually JK, a smaller counter example than the one you're given by the well-ordering principle giving you the contradiction. So that's the basic template of that proof pattern. Let's take a theorem that we've already proven before and prove it using this method of least counter example. Let N be a positive integer, prove that the sum of the first N odd integers is in fact equal to N squared. So one plus three plus five plus seven all the way up to two N minus one is equal to N squared. We proved this previously using combinatorial proof, but it turns out we can also prove this in lots of different ways, we can prove this using this method of smallest counter example. And so I'm gonna provide a proof of that right now. And so sure enough, we're gonna prove this using smallest counter example, suppose to the contrary that the above equation is false, that is there exists some positive integers for which this doesn't hold. Well, the S of all counter examples to this equation is a set of natural numbers. That is to say like, oh, if it doesn't work for 17, 17's inside the set. If it doesn't work for 39, 39's in the set. If it doesn't work for 11, 11's in the set. This is a subset of natural numbers. And since the statement is false universally, that is to say there does exist a counter example, we know this is a non-empty set of natural numbers by the well-ordering principle. There's a smallest counter example, call that counter example K. What that means is the equation one plus three plus five up to K, two K minus one does not equal, that expression does not equal K squared. This doesn't hold in the case for K. That's what it means to be a counter example. It's like, okay. Well note, I know that K is not equal to one because the left hand side when K equals one would just equal one itself. The right hand side would be one squared, which one does equal one squared. So the equation does hold for K equals one. So K can't be equal to one, all right? Now, let's take the number immediately up front of K. The reason I have to rule out one here is because this is a statement I'm trying to make about positive integers. If K was the smallest counter example, then that means the number less than it, zero is not a positive integer. So I'm not making any statement about that right now. So I did wanna remove one from possibility here. So let's look at K minus one. I know K minus one is a positive number. It's a natural number smaller than K, a positive integer smaller than K. Since K was the smallest counter example, that means if I apply this formula to K minus one, it will hold one plus three plus five all the way up to two K minus one minus one is equal to K minus one squared, okay? So this equation does hold. Now, if I were to add to both sides of the equation two K minus one, let's see what happens. On the right hand side, you're gonna get a sum of odd numbers, one plus three plus five up to, and finishing with this, of course, this two K minus one. Like so, what about the right hand side? On the right hand side, you get, if you foil that thing out, the K minus one squared, you get K squared minus two K plus one. You're also adding to it the two K minus one from before. With that, we'll simplify on the right hand side just to be a K squared. So I want to kind of show you what we have there on the left hand side. I think I highlighted too much earlier, sorry about that. On the left hand side, you have one plus three plus five all the way up to two K minus one. Then if you take the K minus one squared plus the two K minus one, that'll simplify just to be K squared. Notice this now says that one plus three up to two K minus one is equal to K squared, which it doesn't equal that. It violates the fact that K was in fact a counter example. It's not the smallest counter example. We get a contradiction. And since we get a contradiction, this actually implies that the original statement was true, that the equation holds for all natural numbers, for all positive integers in that situation. Now, when you look at this proof, I'm gonna zoom out a little bit here. When you look at this proof, in many ways it has the structure of an induction argument. Like I did consider a base case, right? I considered it for a different reason, but I did consider this base case. I also looked at the case where I'm before the number I'm considering and using the fact that it's true, I'm able to imply that the next case was actually true, for which that gives us a contradiction, hence giving that this wasn't the smallest counter example, but many ways it has the same flavor. It's like a base case right here, an inductive hypothesis, the inductive step. This argument could very well be rewritten to become an argument by the principle of induction. This very much feels like a weak induction argument right here, weak as opposed to not the strong induction argument. But I should mention, like I've mentioned this couple of times already in this lecture series, that the methods of induction, which we've already argued that the first and second principles of induction are actually the same thing, induction is actually logically equivalent to the well-ordering principle. And I do wanna say a little bit of why that is right now. Now, to see why induction implies the well-ordering principle, what we can do is we can use induction on the cardinality of sets, which are subsets of the natural numbers. Okay, positive subsets of the natural numbers there. And you can take unions to take care of infinite sets and sets, I'm not gonna go through all the details that are right here, but basically you play around with cardinalities of these subsets. So like if you take a singleton, clearly it has a minimal element, because there's only one element in there. So then you're like, okay, then you'd have an inductive hypothesis. If S is cardinality is equal to K, then it has a minimum, in which case then you look at a set like a set whose cardinality is K plus one. Well, if it's cardinality is K plus one, then basically S can be broken up into a single element. So we'll call that A. And then you have this other set, S take away A. Like so, notice that this set now has cardinality K. So by our inductive hypothesis, it has a minimum element B. And so then you have to look at the minimum of S is going to equal the minimum of S is then it can equal the minimum of A and B, which is gonna be one or the other, depending on what A is less than or greater than B, whatever, you figure that out. And so that set then has a minimum element. And so then by induction, you then can carry this on. And so every finite subset of natural numbers has a minimum element in that regard. You can, of course, deal with unions. Again, there's some more details I'm skipping over here, but how do you deal with infinite subsets of the natural numbers? You can play around with those things. Don't worry about it. I'm not going through all the details of that. That gives you like one direction. It's the basics of the one direction, even with some things missing. For the other direction, how do you prove that the well-ordered principle implies induction? Well, induction is a conditional statement. If the base case holds, so you have like some S of zero here, and you have to also have the conditional statement that SK implies SK plus one, then those put together are supposed to imply that for all natural numbers, S of n holds. So that's what the induction is, it's a conditional statement. You can prove it by direct proof. So you assume this to be true, and then you have to argue that this is true. And again, you basically prove it by least counter-examples. So if this statement is false, because after all, it's a universal statement. If that statement's false, then by the well-ordered principle, which we're assuming to be true right now, there has to be a least counter-example. You take that counter-example, which let's say it happens at the K plus one spot. Well, so S of K plus one is false, but since it's the least counter-example, you get that S of K is actually true. And then by your inductive hypothesis, which we're assuming to be true as part of the direct proof, this actually shows that S of K plus one is actually true, gives us contradiction. And therefore, since we negated the statement, it actually was true. So this actually shows us, again, without giving all the details here, this is the basic argument why induction, the principle of induction, the principle of the well-ordered principle are actually logically equivalent to each other. Anything you can prove with induction, you can prove by least counter-example. Anything you can prove by least counter-example, you can prove by induction. Anything you can prove by strong induction, you can prove by weak induction. Everything you can prove by weak induction, you can prove by strong induction. They're logically the same tool. Now, which tool do you use? That honestly comes down to your personal style, right? You have to decide as an author, do you think the well-ordered principle would be a more clear argument than induction or vice versa? What would lead to a better composition? Logically, correctness, it doesn't make a difference. Those three methods, the first principle of induction, second principle of induction, well-ordered principle, these least counter-examples, they all give you the same thing. So I don't want you to fret too much about which one should you use. Do which one you think sounds better? What makes it clear to the reader that you're writing for? That is the decision you make. What leads to a simpler argument, a clearer argument, which often has to do with shorter arguments here? Honestly, with this proof right here, I don't think least counter-example is the clearest argument. I provided it, but I think an induction argument would be much better. No, don't get me wrong. I think commentatorial proof would be the very best method for this proof, which we did earlier, but the method of commentatorial proof actually is a different logically logical structure. These ones, of course, are the same argument. So if I had to choose between weak induction, strong induction, or the least counter-example, I think this proof, this identity, would be best done with a weak induction argument. You don't need any of the predecessors, except for the immediate predecessor. So hence, you don't need strong induction here, only the one assumption is necessary. And then honestly, this least counter-example argument led to what honestly feels like an induction argument. I feel like it could be simplified with induction, but these are all statements about style, composition, about clarity. Which technique you choose, we based upon, which makes the argument the best for the reader. And don't let anyone else tell you any other reason. Choose the method based upon what will benefit the reader the most, what will simplify the proof the best. So with that said, we're now ready to prove our climactic theorem with regard to our discussion of integers in the last couple of lectures. I wanna prove the fundamental theorem of arithmetic. And I'm actually choosing to prove this theorem using this method of least counter-example. I actually do think that while we could use induction, I actually think least counter-example in this situation does lead to a simpler argument than induction in this situation. If you disagree with me, that's perfectly fine. I have no concern with that. They are logically the same. It comes down to a matter of style, like we just said. And of course, this is an opinion. This can differ between experts and artists in the same discipline, no issue with that. So what is the fundamental theorem of arithmetic? The adjective fundamental is attached to theorems only in rare situations, you know, like the fundamental theorem of calculus, the fundamental theorem of algebra. It usually is a big deal when you talk about the fundamental theorem. So the fundamental theorem of arithmetic, arithmetic basically is a synonym here for number theory, the theory of numbers, particularly natural numbers and integers. And so the fundamental theorem of arithmetic is basically telling you this is one of the most important results about integers or natural numbers. And so what this tells us is that if n is an integer greater than one, so it has to be a positive integer, then there exists primes p1, p2 up to pr, where r is a natural number here, such that n equals the product p1, p2 times p3 times p4 up to p to the r. And it's not necessarily the case that these primes are different. You can't have a repeated prime, like for example, 12, its prime factorization will be two times two times three. You can repeat a factor. That's not a big deal whatsoever. So the fundamental theorem of arithmetic tells us that every integer has a prime divisor. Excuse me, we already proved that. It has a prime factorization. Furthermore, this factorization is unique. That is, if we have a second prime factorization n equals q1 times q2 up to q3 up to qs, right? Then it turns out that the number of primes in play here are the same, q and s are the same thing. And each of the qis actually corresponds to the pis up to reordering them, right? They might be in the wrong order. Like for example, 12, you can factor it as two times two times three. You can factor it as two times three times two. You can factor it as three times two times two. Those are all considered the same prime factorization because you're just using the same primes that's in a different order. You can't factor a positive integer doing different primes. You can also generalize this to like negative primes as well because you can have negative primes and negative integers in that situation. I'm not gonna worry about that in this situation. We'll take just it for positive integers. Take a course in number theory if you wanna see more about this stuff. I just wanna prove this fundamental theorem of arithmetic using of course this method of least counter example. So what we're gonna do is we're gonna suppose, notice there's actually two statements. I should mention that there's two statements here. There's a so-called existence statement that the first statement is that there is a prime factorization and then there is a uniqueness statement. In our next unit, we're gonna talk some more about existence versus uniqueness. We'll develop a lot more about that but what I can say for right now is that with these things, you have to prove two things. You have to prove that it exists, the prime factorization and there's not a second one, uniqueness. And I'm gonna prove both of those by contradiction using least counter examples. So we're gonna deal with existence first. We always should start with existence first. So suppose to the contrary that there exists a positive integer without a prime factorization. So this says that all positive integers other than one have a prime factorization. Well, suppose there's not one to the contrary. Well then by the well ordering principle there has to be a least positive integer who has no prime factorization. Call that number N. Now previously shown in this lecture series we proved that every number has a prime divisor. This was an example of where we proved a number we used the strong induction principle here. We proved that every divisor, every integer greater than one has a prime divisor. We'll call that prime divisor P one. Therefore N equals P one times N. Now because these are positive integers and P is a prime number so it's at least two if not bigger. The other divisor M has to be smaller than N. Now since N was the smallest number without a prime divisor, excuse me a prime factorization it does have a prime divisor then that means M has a prime factorization because it's smaller than N. N was the least counter example. And so then if we substitute that N for M we then get that N equals P one times P two times P three up to PR and this is then a prime factorization of N this gives us a contradiction. So this shows us that every positive integer greater than one has a prime factorization. I did this with least counter example but you also could do this using a strong induction argument. You could modify it very quickly if you prefer to do it that way. Cause after all use the theorem which we proved using strong induction that gives us that every number has a prime divisor and then by your strong inductive hypothesis since M is smaller it has a prime factorization you get that. So if you wanna avoid least counter example that is you wanna avoid a proof by contradiction you could do that but it's not really fundamentally different than what we have right here. I wanna illustrate this proof by least counter example but we could have done it very easily by strong induction as well. Now that only gives us the first half of the statement. The second half is we have to show that this factorization is unique. So suppose and so like that first argument works really well with it worked okay with proof by least counter example but honestly strong induction might have made it a little bit clearer if you wanted to you could avoid the contradiction I mostly did that way for the second example but the second half of the argument of uniqueness the least counter example I actually do think is the superior method because how do you show that something is unique to show that something is unique you suppose there are two of them and then get a contradiction right so you prove there's not a second one so contradiction is very much kind of it's not required but it really is the probably the best method to show that there's not a second one you do by contradiction suppose there's a second one okay so suppose N there is a N with two different prime factorizations now because there is an N with two prime factorizations there has to be a smallest integer which has smallest positive integer which has two factorizations so we'll take one of them to be P1, P2 up to PR and another one to be Q1, Q2 up to QS okay R and S are natural numbers PI and QJ are all prime numbers as I ranges from one to R and as J ranges from one to S okay now notice on the on the set since N is equal to P1, P2 up to PR this means that P1 divides N okay now since P1 divides P1 divides N that means it also divides the other prime factorization of N so P1 divides Q1, Q2 up to QS so if we apply Euclid's lemma this would mean that P1 divides either Q1 or P1 divides Q2 up to QS now we can supply an induction argument here that well since this is now a smaller number it turns out we can get that P1 divides Q1 or P1 divides Q2 or P1 divides Q3 or P1 divides QS again there is an induction argument there but if you combine Euclid's lemma with induction you get that P1 divides this product means it divides one of these things okay but each of those things are prime numbers right so since P1 divides one of these without the loss of generality let's just say it's the first one because who knows we could always rearrange the Q's who cares P1 divides Q1 but P1 is a prime so since P1 is a prime it's not equal to one and since Q1 is a prime it only has two divisors one and P1 since P1 is not equal to one it actually must be that P1 equals Q1 these two prime numbers were equal to each other and be aware that this without the loss of generality incorporates the reordering of the primes it's like one of them it divides and so we'll call that one the first one if it wasn't already the first one so take this equation and divide both sides by P1 because after all Q1 is equal to P1 you then get that P2 times P3 up to PR is equal to Q2 times Q3 up to QS let's call this number M now be aware since we canceled out P1 and P1 was a prime number M is gonna be smaller than N okay so since N was the least counter example that means M since it's smaller it has a unique factorization so these factorizations are actually equal to each other so we get that R is equal to S they have the same number of prime factors and up to relabeling there's this one-to-one correspondence between all the primes okay and so we'll actually let's say we rearrange it so that P2 is equal to Q2 P3 is equal to Q3 PR is equal to QS because QS is actually the same thing as QR and so we have the same factorization then if you come back up to N N is equal to P1 times M and it's also equal to Q1 which is equal to M we know that P1 and Q1 are the same thing M has a unique factorization so it turns out that these two factorizations are actually the same prime factorization we get a contradiction and this thus proves for us the fundamental theorem of arithmetic and we demonstrated this by this method of least counter example we could have done it with induction or strong induction but honestly I think the least counter example works really well in this setting