 A few videos ago in our lecture series, we discussed about negating logical statements. That is, if you put a not in front of a statement, how does that change the meaning of it? Now, as we've developed our Boolean arithmetic on logical statements, we've done a lot more since than as we've now developed it, it's important that we talk about some more complicated statements that get negated. For example, if our statement has the form of a conjunction or a disjunction, that is the words and or used, how does negation affect those things? This actually leads to what's commonly referred to as the De Morgan laws. The De Morgan laws tell us that for any logical statement, P and Q, if you take not P and Q, this is logically equivalent to not P or not Q. And similarly, if you take the compound statement, not P or Q, this is logically equivalent to not P and not Q. One can prove that these statements are logically equivalent by, among other methods, by drawing a truth table and seeing that these two statements have the exact same truth values for every possible combination of the primitives P and Q. And I will leave that as an exercise to the viewer here to verify that these two statements are in fact logically equivalent using our method of truth tables. The important thing to note about the De Morgan laws is that when you negate an and statement, it becomes an or. And if you negate an or statement, it becomes an and. The following shorthand that you can think of is not and is actually an or. I mean, this symbol is actually nonsensical, but the idea is, if you think of this as like a light switch or this light switch is on, this light switch is off. The negation is a toggle. It's turning the light from on to off. And likewise, if your light is off, not turns it on. It toggles between and and or. So if you look at some examples of this, let's take the statement P, which is the numbers X and Y are both odd. Hopefully we can recognize that this is a conjunction. We have two statements in play here. X is odd, Y is odd. And so P is then their conjunction. We put them together via and. So P is X is odd and Y is odd. That's the logical form of this statement. And so if we were to negate P, put a not symbol in front of P, well, of course it just means put a not in front of the compounded statement. But since you're taking not of an and, that by the De Morgan laws means you're gonna negate each of the statements, but then the and turns into an or. So not X is odd and Y is odd is the same thing as saying X is not odd or Y is not odd. Notice here that with the original statement, we're suggesting that both X and Y are odd. But when you negate it, only one of the two, only one of X and Y has to be odd. They could both be odd, right? That is a possibility with an or. But when you negate it, if you're like this statement is false because X is even, that's what makes that statement false. If I say X and Y are both odd and you're like, uh, X is even, even if Y was odd, that makes the statement false. And this is why essentially you change from an and to an or here. And means for all as opposed to or, which means at least this is something that we should hopefully be piecing together. When we talk about conjunctions, there's this relationship between conjunctions and the universal quantifier because an and statement is true when all primitives are true, all right? Conversely though, when you look at an or statement has this connection to existential quantifiers. I wrote that the wrong way. The existential quantifier, right? A backwards either. The conjunction is correlated with the existential because a or statement is true if at least one of the primitive statements is true. And so when you negate the and, it switches to an or. And this is also gonna correlate with what we'll see with quantifiers at the end of this video here. So the appropriate negation of the statement X and Y are both odd would be something like, oh, either X or Y is even. Now remember, for integers, you're either even or odd. So if you're not odd, you are even. So I can get away with saying even instead of not odd. Even and not odd are logically equivalent to each other. So the negation is X is X or Y is even. And turns to or when you negate it. And another example here. If you take this time that the statement Q, which is you can solve it by factoring or with the quadratic formula. This might be something I say to my college algebra students if they have to solve a quadratic equation. Oh, you can solve it by factoring or you can solve it by the quadratic formula. This is a disjunction. You can solve it by factoring or you can solve it by the quadratic formula. Those are both acceptable statements there. And therefore, if we wanted to negate our statement Q, well, you put a not in front of the compound statement. Since it is a conjunction, the De Morgan laws tell us that not our original statement Q then becomes you cannot solve it by factoring and you cannot solve it by the quadratic formula. Or if you say that in more standard English, you would say something like, you can neither solve it by factoring nor the quadratic formula. And proper grammar here, if you have a neither, it's followed by a nor. Just so you know in English, it means not or, but as excuse me, not or, but as we now are talking about, not or actually means and. Our English language has this logical principle already built into it. Not or means and. Because if I tell you, you can solve it using one method or the other and that's a false statement, that means neither method can be used to solve the equation. Maybe if you're trying to solve a cubic equation or an exponential equation, I could say something like, oh, I might be like, oh, you can solve it by factoring the quadratic formula. And you're like, no, no, you can't factor it won't work. Quadratic formula won't work. That's a false statement. They have to both be false in that situation to be the negation. Now we've talked about conjunctions and disjunctions. How do you deal with conditionals? Well, honestly to deal with conditionals, it's easiest just to recognize that a conditional statement can always be rewritten as a disjunction. We proved previously that P implies Q is logically equivalent to not P or Q. Because remember, if the premise is false, then the statement is vacuously true. That would be not P. But if the conclusion is true, then the conditional is also true because it's trivially true. So if the conclusion is true or if the premise is false, the conditional is true. These two statements are logically equivalent. Now, as a conditional can always be rewritten as a disjunction, you can actually use the De Morgan laws to negate a conditional just by thinking of it as its disjunctive equivalent. So consider the following statement. P equals the statement. If A is odd, then A square is odd. This is a true statement. But that's beside the point. Let's still consider it's negation. Before we do that, let's make sure we understand the form that's in play here, okay? The statement P is odd, then A square is odd. This is a conditional statement. The premise is A is odd. The conclusion is A square is odd. And so we have that implication. We can rewrite this conditional as a disjunction where we negate the premise or we take the conclusion. So not A is odd or A square is odd. And if you wanted to, you could rewrite that as A is even or A square is odd. That would be the negation of those things, okay? Now, excuse me, that would be the equivalent form if we write it as a disjunction. Now for the negation, if this is our statement P, the negation would then be not, not A is even or A square is odd. By the De Morgan laws, you would then as you distribute this not, the or becomes an and, and then everyone gets a not. Well, not A squared is odd is just A squared is odd. But be aware that if you have a double not, that actually would make it true again. It's like that light switch. If you flip the light switch twice, it's your back on again. So not not, what we often refer to in English as a double negative, actually is a positive statement again. So the negation of our original conditional would be A is odd and A squared is, A is odd and A squared is not odd. Or you might say something like A is odd, but A squared is not. We mentioned before that but often means and, when there's a contrast in play, A is odd and A squared is not odd, but it's the contrast, which is why we use the word but as opposed to and. And this actually makes sense because the only way that a conditional statement is false is that the premise is true and the conclusion is false. And so if you want to think of it that way, that's exactly what we're doing via the De Morgan laws. The negation would be, oh, the premise is true, the conclusion is false. Now, as I mentioned earlier, we mentioned how one can negate compounded logical statements using the De Morgan laws, they help us take care of ands and ors. We also talked about with conditionals because you can rewrite a conditional as an or statement. We could also do by conditionals because a by conditional statement P is equivalent to Q. That is always logically equivalent to P implies Q and we'll write the other way around Q implies P. And so a by conditional statement is just two conditional statements with a conjunction. We know how negation affects conjunctions and we just talked about how you can negate conditional. So we could do by conditionals as well in theory. The last thing I want to talk about is negating these statements is how do you deal with quantifiers? I made this mention earlier that conjunctions are somehow correlated to universal quantifiers and how disjunctions are correlated with existential quantifiers. If you think of like and is true when all primitives are true and or is true when at least one primitive true. That's the connection you want there. And so basically for the same reasons by the same De Morgan laws, when you negate a quantifier, it's gonna switch just like conjunction switch to de junction and or switch to ands. We have that the universal quantifier is gonna switch to a existential quantifier and existentials will switch to universals when you take negations. The phrase not all is logically equivalent to the phrase at least one is not. And likewise, the phrase not some is equivalent to the phrase none are. And so we kind of get the following notation here. If you negate a universal quantifier, it then switches to the existential quantifier and the negation then moves to the side. So not all means there's at least one not. And similarly, if I were to say something like not there does not exist at least one would mean that for all not happens. And let's put some real words into this to make a little bit more sense out of it. If we take the statement P to be all customers we'll get a free dessert. I really wanna go to that restaurant. That'd be nice. But if the statement all customers will get a free dessert all here this is our universal quantifier for all all all customers will get a free dessert. So if we negate that that would say not all customers will get a free dessert that's equivalent to saying that some customers will not get a dessert. Cause if I say that not all customers will get a dessert there is still the possibility that some could get it. Maybe, maybe not. Maybe no one will get one but we don't know that. What we can say is if not everyone gets one then at least someone didn't get one. That is the proper negation of the quantifier there. Let's do one with an existential. Let's take the statement Q to be that some computers have a two year warranty. So that's our existential quantifier there. Some computers there's no guarantee that all computers have a warranty but some of the computers we're selling at the store do have a two year warranty. And as such if we were to negate this there should be a negation symbol there. If we take not Q then this would say that it is not true that some computers have a two year warranty. That is the proper negation. It's kind of awkward in language but that is the proper negation. One that would be easier to say and would be logically equivalent is that no computers have a two year warranty. When we say no computers we mean for all computers not warranty is what's happening there. So the negation of some computers would be some computers have a warranty would be that no computers have a two year warranty. So you have to be very careful. Not all means some not and not some means all not. The quantifiers toggle when you negate just like the connectives and or toggle when you negate them. If you can keep track of that you'll then be able to handle negations of any logical statements.