Guide to Negating Formulas

Guide to Negating Formulas

Guide to Negating Formulas Hi everybody! We spent a little bit of time in class talking about how to negate formulas in propositional or frst-order logic. This is a really valuable skill! If you ever need to write a proof by contradiction or a proof by contrapositive, you'll need to know how to negate formulas. While this might seem a bit tricky at frst, the good news is that there's a nice, mechanical way that you can negate formulas! There's still a bit of art to it, but by learning a few simple rules and how to apply them, you can negate just about anything! For example. ¬p ∧ (q ∨ r) Let's imagine that you want to negate this formula to the left. (¬p ∧ (q ∨ r)) To do so, we're going to begin by surrounding the formula in parentheses. ¬(¬p ∧ (q ∨ r)) And putting a negation symbol in front. ¬(¬p ∧ (q ∨ r)) Technically speaking, this formula is the negation of the original formula, though it's hard to see exactly what this formula says. ¬(¬p ∧ (q ∨ r)) Most of the time, when you need to fnd the negation of a formula, you're going to want to simplify it by pushing the negations inward. ¬(¬p ∧ (q ∨ r)) The good news is that there are a number of rules we can use to do this. ¬(¬p ∧ (q ∨ r)) If you remember from our lecture on propositional logic, we saw a series of rules for simplifying negations. ¬(¬p ∧ (q ∨ r)) For example, we saw de Morgan's laws, which say that ¬(A ∧ B) ≡ ¬A ∨ ¬B ¬(A ∨ B) ≡ ¬A ∧ ¬B ¬(A ∨ B) ¬(A ∧ B) ¬A ∧ ¬B ¬A ∨ ¬B ¬(¬p ∧ (q ∨ r)) I'm going to write this rules up at the top of the screen. ¬(A ∨ B) ¬(A ∧ B) ¬A ∧ ¬B ¬A ∨ ¬B ¬(¬p ∧ (q ∨ r)) We haven't talked about this notation before, but the good news is that it's not too bad. Let's take a look at this. ¬(A ∨ B) ¬(A ∧ B) Generally speaking, these rules ¬A ∧ ¬B ¬A ∨ ¬B look like this: Before After ¬(¬p ∧ (q ∨ r)) ¬(A ∨ B) ¬(A ∧ B) A rule like this means “if you see ¬A ∧ ¬B ¬A ∨ ¬B Before, replace it with After.” Before After ¬(¬p ∧ (q ∨ r)) ¬(A ∨ B) ¬(A ∧ B) ¬A ∧ ¬B ¬A ∨ ¬B So let's look at this rule on the right. ¬(¬p ∧ (q ∨ r)) ¬(A ∨ B) ¬(A ∧ B) This rule says ¬A ∧ ¬B ¬A ∨ ¬B “if you see something of the form ¬(A ∧ B) replace it with ¬A ∨ ¬B.” ¬(¬p ∧ (q ∨ r)) ¬(A ∨ B) ¬(A ∧ B) ¬A ∧ ¬B ¬A ∨ ¬B ¬(¬p ∧ (q ∨ r)) Take a look at our original formula. If you look at it closely, you'll see that it matches this particular pattern. ¬(A ∨ B) ¬(A ∧ B) ¬A ∧ ¬B ¬A ∨ ¬B ¬(¬p ∧ (q ∨ r)) That means that we can apply this rule and rewrite it. ¬(A ∨ B) ¬(A ∧ B) ¬A ∧ ¬B ¬A ∨ ¬B ¬¬p ∨ ¬(q ∨ r) .so that it looks like this. ¬(A ∨ B) ¬(A ∧ B) ¬A ∧ ¬B ¬A ∨ ¬B ¬¬p ∨ ¬(q ∨ r) Notice that we've “pushed” the negation deeper into the formula. ¬(A ∨ B) ¬(A ∧ B) ¬A ∧ ¬B ¬A ∨ ¬B ¬¬p ∨ ¬(q ∨ r) Basically, we just need to keep applying these rule templates over and over until the formula is as simple as it can get. ¬(A ∨ B) ¬(A ∧ B) ¬A ∧ ¬B ¬A ∨ ¬B ¬¬p ∨ ¬(q ∨ r) So let's focus on this part of the formula for now. ¬(A ∨ B) ¬(A ∧ B) ¬A ∧ ¬B ¬A ∨ ¬B ¬¬p ∨ ¬(q ∨ r) Notice that it matches this particular template. ¬(A ∨ B) ¬(A ∧ B) ¬A ∧ ¬B ¬A ∨ ¬B ¬¬p ∨ ¬(q ∨ r) So let's apply this rule to simplify the formula! ¬(A ∨ B) ¬(A ∧ B) ¬A ∧ ¬B ¬A ∨ ¬B ¬¬p ∨ (¬q ∧ ¬r) Now we've got this, which has the negation pushed deeper into the formula! We're making progress! ¬(A ∨ B) ¬(A ∧ B) ¬A ∧ ¬B ¬A ∨ ¬B ¬¬p ∨ (¬q ∧ ¬r) So what about the other part of this formula? ¬(A ∨ B) ¬(A ∧ B) ¬A ∧ ¬B ¬A ∨ ¬B ¬¬p ∨ (¬q ∧ ¬r) Well, this is a double-negation. Intuitively, we'd expect these two negations to cancel out. ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B ¬¬p ∨ (¬q ∧ ¬r) Indeed, that's what happens. We can write this down as the rule ¬¬A A ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B ¬¬p ∨ (¬q ∧ ¬r) So let's go and apply this rule! ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) Tada! ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) At this point we can't push the negations any deeper into the formula. They're directly applied to propositions, which can't be simplifed. ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) So we're done! ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) Of course, before moving on, we should be sure to check our work! ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) Here's the original formula. (Think of this as the “before” in ¬p ∧ (q ∨ r) the “before and after” shots.) ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) Is there some way we can check whether we negated this formula ¬p ∧ (q ∨ r) properly? ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) Yes, actually! There are several. ¬p ∧ (q ∨ r) ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) Let's begin with an intuitive check. What do each of these formulas ¬p ∧ (q ∨ r) actually mean? ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) This formula means “p is true, ¬p ∧ (q ∨ r) or both q and r are false.” ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) This formula means “p is false and at least one of q and r ¬p ∧ (q ∨ r) is true.” ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) Intuitively, these statements seem ¬p ∧ (q ∨ r) to check out as opposites. ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) If the frst one is true, then either p is true (so ¬p is false), ¬p ∧ (q ∨ r) or q and r are false (so q ∨ r is false.) ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) Similarly, if the second one is true, then ¬p is true (so p is ¬p ∧ (q ∨ r) false), and at least one of q and r are true (so ¬q ∧ ¬r is false). ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) So in that sense, intuitively, ¬p ∧ (q ∨ r) everything checks out. ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) Of course, a lot of things that make intuitive sense aren't right, ¬p ∧ (q ∨ r) so perhaps we should check this in a diferent way. ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) When we're dealing with propositional logic, we can always check the truth ¬p ∧ (q ∨ r) tables for these formulas and see how they compare! ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) If you punch in these two formulas, here's the truth tables ¬p ∧ (q ∨ r) that you'll get back. ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) Notice that, going row by row, the truth values are opposites ¬p ∧ (q ∨ r) of one another. That means that they're negations of one another! ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) There's actually a diferent way to use the truth table tool to ¬p ∧ (q ∨ r) check if two formulas are negations of one another. ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) Imagine that you have two formulas A and B. If A is a ¬p ∧ (q ∨ r) negation of B, then any time A is true, B is false and vice-versa. ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) That means that the formula A ↔ B ¬p ∧ (q ∨ r) should always evaluate to false. ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) So in our case, we can try punching in this formula into ¬p ∧ (q ∨ r) the truth table tool. ((pp ∨ ∨ (¬ (¬qq ∧ ∧ ¬ ¬rr)))) ↔ ↔ (¬ (¬pp ∧ ∧ ( (qq ∨ ∨ r r)))) ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) If we do, here's what we ¬p ∧ (q ∨ r) get back. ((pp ∨ ∨ (¬ (¬qq ∧ ∧ ¬ ¬rr)))) ↔ ↔ (¬ (¬pp ∧ ∧ ( (qq ∨ ∨ r r)))) ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B p ∨ (¬q ∧ ¬r) Since the formula is always false, we know that the two ¬p ∧ (q ∨ r) formulas must be negations of one another. Nifty! ((pp ∨ ∨ (¬ (¬qq ∧ ∧ ¬ ¬rr)))) ↔ ↔ (¬ (¬pp ∧ ∧ ( (qq ∨ ∨ r r)))) ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B That wasn't so bad! Let's do another one. ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B (p ∨ q) ∧ (¬p ∧ ¬q) Let's try taking the negation of this formula. ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B (p ∨ q) ∧ (¬p ∧ ¬q) Actually, before we do this together, why don't you try doing it yourself frst! ¬¬A ¬(A ∨ B) ¬(A ∧ B) A ¬A ∧ ¬B ¬A ∨ ¬B (p ∨ q) ∧ (¬p ∧ ¬q) Take a minute or two to walk through this one on your own.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    385 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us