 Hamzor, welcome to Unizor education. Today we'd like to continue talking about logic. And there are certain topics which just couldn't be touched in a very short lecture, which basically was the foundation of logic which we have discussed before. Today we'd like to talk about relationship between logical expressions. And most important relationship is implication. If one statement implies another statement, what does it actually mean? Well, we were talking about statements being truth, but having a logical value of truth or false. Yes, there are certain statements which are neither, and we probably, yes, we did talk about this a little bit, but right now that's not the subject. Let's talk about subject of having a specific meaning of certain statements. Either the statement is truth or statement is false. And what can be actually inferred from this? Inference or implication, all these words mean that let's assume that one particular statement is true. What follows from it? Well, if you can say that if the statement A, when it's truth, basically results in a statement that B is also truth, then we're saying that A implies B, or A is a sufficient condition for B. Well, sufficient is basically a general word, but in this case it's quite obvious that you can use it. Yes, for making sure that the D is true, it is sufficient to prove that A is true. Well, sometimes we can have conditions which are implying each other mutually, which means A is sufficient condition for B and B is sufficient condition for A. Well, in this case we can say that A is necessary and sufficient condition. So, there was another word in which I could just use, a necessary. So, a necessary condition is the one which definitely needs to be true if another condition is also true. Let me just exemplify it. Basically, if A is sufficient for B, then B is sufficient for A. That's the definition of that thing. As an example, let's consider that, for instance, I have a pen. This is a statement. I have a pen. And let's consider another statement. I have a red pen. If I'm saying that I have a red pen, let's call this condition A and this condition B, if I'm saying I have a red pen, it actually means that I have a pen. So, from B, we can infer that the A is also true. So, if B is true, then A is true. So, A, in this case, is a sufficient condition for A. Is it a necessary condition? Or vice versa, is A a sufficient condition for B? Well, the answer is no, because if I have a pen, it doesn't really mean that I have a red pen. It might mean I have a black one, right? So, A does not imply B. So, in this particular case, we have that B is sufficient condition for A. A is a necessary condition for B. And the reverse is not actually true. Let me give another example. In condition A, number N is multiple of three. It's like three, six, nine, all these multiples of three. B, statement B is the following. The sum of digits of number N is multiple of three. Well, these two statements are, well, they're quite remote from each other. In terms of the previous problem, the previous example which I made, N and red pen, they were kind of close and it was kind of obvious that one implies another and another doesn't imply the first one. In this case, it's completely different things. I mean, let's consider number 123. Well, on one hand, we have to think about whether it's multiple of three if it's divisible by three without remainder. On the other hand, we can summarize its digits, one, two, and three, and make a decision about that number being divisible by three. And then we're saying that one actually might or might not imply another. We have to basically prove it. So, this is a typical condition when we can prove a theory. Like, if A, then B. If we can prove that theory, it means that the A is sufficient condition for B. If we can prove the theory that from B actually follows A, so if sum of digits is multiple of three, then the number is multiple of three. Then it proves that the D is sufficient condition for A. So, in this particular case, it goes both ways that A and B are both necessary and sufficient conditions for each other. Well, let's try to prove it. If we can take any number represented in decimal systems, as you know, we can have its digits A0 times 10 to the nth degree plus A1 tends to the n minus 1 degree plus, etc. So, A0 and A1 are digits plus A n minus 1 n first plus A n. So, for the number 123, 123, this is A0 times 10 to the second degree, which is 100. So, it's 100 plus 2. This is time step to the first degree. So, it's 2 times 10 plus 3. This is my last digit. By the way, 123 actually is divisible by 3. You can check that out. And sum of digits 1 and 2 and 3, 6, which is also divisible by 3. So, how can we prove that this particular number is divisible by 3? Well, actually, it's very easy. Why? Because let's write down the following thing. We will subtract A0 from this. We will subtract A1 from this. We will subtract A n minus 1 from this. And we will subtract A n from this. Now, what do we have here? If you group these two together, or these two together, you will have an expression A k times 10 to n minus k minus A k. A1 times 10 to the n minus 1 minus A 1. Now, this is A k times 10 to the n minus k minus 1. Now, this thing is obviously divisible by 10 minus 1. We can prove it separately, but just trust me on this one. And 10 minus 1 is 9. So, it's 9 times A k times sum number n, whatever the name n is. So, this expression is divisible by 10 minus 1, which is 9. And whatever remains is n, and A k stays by itself. So, what I'm saying is that if we will subtract from the big number sum of its digits, by the way, this is intended to be minus, right? I'm subtracting. So, if you subtract from the big number sum of its digits, you will always have something divisible by 9, and therefore divisible by 3. What does it mean? Well, it means that, let me just express this statement differently. If you have a number n, you subtract sum of its digits, and you got something which is divisible by 9 and by 3. What does it mean? It means that if this is divisible by 3 or 9, this is definitely divisible by 3 and 9. It means that n should be divisible by 3 or 9. So, we can say that the divisibility of sum of the digits and divisibility of the number itself should always be in sync. If this is divisible, this should be divisible. If this is not divisible, this is not divisible. And by the way, this is not only for 3, this is also for 9. So, we kind of prove both theorems, number n is multiple of 3 or 9, and sum of digits of the number n is multiple of 3 or 9, so correspondingly. So, they always build together. If this is divisible, then this is divisible. If this is divisible, then that is divisible. Which means we can prove this theorem in both ways. a is sufficient condition for b and b is sufficient condition for a. So, basically this is a very short introduction into another aspect of logic, which is related to definition of what is necessary and what is sufficient condition. I will also put a few little exercises for this particular topic, and that's just for kind of self-study. It's basically an interesting thing, and there is another aspect of this necessary and sufficient condition. It's related to set theory and geometry, if you wish. You know that sets are usually represented geometrically. Like this is one set, and this is another set which consists of elements of the first one. So, this is a subset, so to speak. From the necessary and sufficient condition logic examples, we can actually use the same type of geometrical representation. Let me put it this way. Let's consider I have a statement. If point belongs to a subset, then it belongs to the bigger set. That seems to be obvious, right? So, we can say that the belongingness of the point to a subset is a sufficient condition for belongingness of that point to a bigger set. Why is it worse then? Why is it worse than before? Belongness of the point to a bigger set is a necessary condition for belongingness of that point to a subset. So, I can say that relationship between set and subset is really a good representation of necessary and sufficient conditions. So, subset towards set is like a sufficient condition. And correspondingly, set to a subset is sufficient to belong to a set. The reverse belongs to a set. So, it is a necessary for belonging to a subset. The word necessary and the word sufficient, they do have their own everyday meaning, but in this case we are basically in the same type of meaning. Mathematicians did not really invent any new meaning of that word, because if we are saying that something is necessary for something else, it means that without it, that something else will not happen. Without our point to belong to a big set, we can't even think about it belonging to a subset, right? So, that's why belonging to a set is a necessary condition for a subset. And why is it worse then? If I definitely know that the point belongs to a subset from it, it definitely follows that it belongs to an entire set. So, it's quite sufficient. I have actually proved a stronger statement or used a stronger statement. Point belongs to a subset. It's stronger than point belongs to a set. Set is too wide, subset is a small one. So, if I have a statement that the point belongs to a small one, then definitely is sufficient for this point being belong to a bigger set. So, this is kind of a geometrical representation. This is sufficient and this is necessary conditions. Just keep it in mind. Whenever you have this necessary and sufficient thing, you don't know which one is which, think about this geometrical representation. If you have proved something stronger than that is sufficient condition. Stronger means smaller in this particular case. You are narrowing down your logic to a more precise definition. It's stronger than saying something on a broader basis. For instance, if I'm saying that the number is divisible by 9, it's stronger than the number is divisible by 3. Because from the visibility by 9, definitely follows the visibility by 3. Which numbers are divisible by 9? 9, 18, 27, etc. 9, 18, 27, etc. Which numbers are divisible by 3? 6, 9, 12, 15, 18. So, as you see, there are more numbers which are divisible by 3. It's a bigger set than the numbers which is divisible by 9. So, this is divisibility by 3 and this is divisibility by 9. As you see 9, divisibility by 9 is smaller set. And according to this geometrical representation, this is sufficient condition for this. And, obviously, divisibility by 3 is necessary without which we can't even think about divisibility by 9. Okay, that's it for this little addendum for our logic. Thank you very much.