Docsity

Propositional Equivalences - Discrete Structures | CS 173, Study notes of Discrete Structures and Graph Theory

Toggle sidebar
bg1
Propositional Equivalences, Intro to Predicates
Margaret M. Fleck
28 January 2009
In this lecture, we will see how to show that two propositional formulas
are logically equivalent (Section 1.2 of Rosen). We will also see some of the
material on predicates and quantifiers from section 1.3 of Rosen.
1 Announcements
One goal of Homework 0 is to help everyone to remember, or quickly learn,
material they are supposed to know from previous classes. So different people
may have trouble with different problems. Problem 6 may be mysterious to
students with no programming background. So it’s a test of how fast you
can get up to speed enough to survive later in this course. Have a look at
Appendix 3, come to office hours, ask older students for advice, and see how
much of it you can figure out.
2 Recap
Last class, we saw the meanings of several logical operators, along with short-
hand notation: ∨(or), ∧(and), →(implies), ↔(implies in both directions),
¬(not), ⊕(exclusive or).
3 Logical Equivalence
Two compound propositions pand qare logically equivalent if they are true
for exactly the same input values. The shorthand notation for this is p≡q.
One way to establish logical equivalence is with a truth table.
1
pf3
pf4
pf5

Partial preview of the text

Download Propositional Equivalences - Discrete Structures | CS 173 and more Study notes Discrete Structures and Graph Theory in PDF only on Docsity!

Propositional Equivalences, Intro to Predicates

Margaret M. Fleck

28 January 2009

In this lecture, we will see how to show that two propositional formulas are logically equivalent (Section 1.2 of Rosen). We will also see some of the material on predicates and quantifiers from section 1.3 of Rosen.

1 Announcements

One goal of Homework 0 is to help everyone to remember, or quickly learn, material they are supposed to know from previous classes. So different people may have trouble with different problems. Problem 6 may be mysterious to students with no programming background. So it’s a test of how fast you can get up to speed enough to survive later in this course. Have a look at Appendix 3, come to office hours, ask older students for advice, and see how much of it you can figure out.

2 Recap

Last class, we saw the meanings of several logical operators, along with short- hand notation: ∨ (or), ∧ (and), → (implies), ↔ (implies in both directions), ¬ (not), ⊕ (exclusive or).

3 Logical Equivalence

Two compound propositions p and q are logically equivalent if they are true for exactly the same input values. The shorthand notation for this is p ≡ q. One way to establish logical equivalence is with a truth table.

For example, last class we saw that implication has the truth table: p q p → q T T T T F F F T T F F T A frequently useful fact is that p → q is logically equivalent to ¬p ∨ q. To show this, built the truth table for ¬p ∨ q. and compare the output values to those for p → q. p q ¬p ¬p ∨ q T T F T T F F F F T T T F F T T Two very well-known equivalences are De Morgan’s Laws. These state that ¬(p ∧ q) is equivalent to ¬p ∨ ¬q. and that ¬(p ∨ q) is equivalent to ¬p ∧ ¬q. Similar rules in other domains (e.g. set theory) are also called De Morgan’s Laws. They are especially helpful, because they tell you how to simplify the negation of a complex statement involving “and” and “or”. We can show this easily with another truth table: p q ¬p ¬q p ∨ q ¬(p ∨ q) ¬p ∧ ¬q T T F F T F F T F F T T F F F T T F T F F F F T T F T T Truth tables are a nice way to show equivalence for compound proposi- tions which use only 2-3 variables. For more variables, they are cumbersome because analyzing the effects of k input variables requires 2k^ rows.

4 Some useful logical equivalences

Rosen pp. 24-25 (reproduced in handout on-line) lists a number of useful log- ical equivalences, which you could establish with truth tables (but probably don’t want to). Browse through them at your leisure. Some closely (and for good mathematical reasons) resemble rules from algebra and/or set theory, sometimes sharing the same name. For example, one of the two distributive laws states that

¬(r → (p ∨ ¬l)) ≡ r ∧ ¬(p ∨ ¬l) ≡ r ∧ ¬p ∧ ¬¬l ≡ r ∧ ¬p ∧ l

So the negation of our original claim is “M is regular and M is not paracompact and M is Lindel¨of.” Knowing the mechanical rules helps you handle situations where your logical intuitions aren’t fully up to the task of just seeing instinctively what the negation should look like.

6 Some useful terminology

T and F are special constant propositions with no variables that are, respec- tively, always true and always false. A compound proposition p that is true for all combinations of input values is called a tautology. Or, equivalently, p is logically equivalent to T. A compound proposition p that is false for all combinations of input values (aka logically equivalent to F ) is called a contradiction. So T and F are especially simple examples of a tautology and an contradiction. Two compound propositions p and q are logically equivalent exactly when p ↔ q is a tautology.

7 Establishing new logical equivalences

These established logical equivalences can be used to show that other, novel or more complex, equivalences also hold. You are already familiar with the technique used to do these proofs: long chain of equations. For example, to show that ¬(p∨(¬p∧q)) is logically equivalent to ¬p∧¬q, we show the following sequence of equations.

¬(p ∨ (¬p ∧ q)) ≡ ¬p ∧ ¬(¬p ∧ q) (1) ≡ ¬p ∧ (¬(¬p) ∨ ¬q (2) ≡ ¬p ∧ (p ∨ ¬q) (3) ≡ (¬p ∧ p) ∨ (¬p ∧ ¬q) (4) ≡ (p ∧ ¬p) ∨ (¬p ∧ ¬q) (5) ≡ F ∨ (¬p ∧ ¬q) (6) ≡ (¬p ∧ ¬q) ∨ F (7) ≡ ¬p ∧ ¬q (8)

Steps (1) and (2) use the two De Morgan’s laws. Step (3) uses the fact that negations cancel. Step (4) uses a distributive law, and so forth. For the purposes of the homework problems on this material (Homework

  1. please be very picky about matching the exact form of the rules in our tables. Pretend you are a computer and therefore very picky and lacking in common sense. As we get into more complex material, we’ll stop being so picky about every small step. For example, step (6) uses a commutative law to put the formula in the exact right form to apply the identity law for F. In real life (i.e. a couple homeworks down the road) one would just proceed directly from (5) to (7) without bothering to name the formula justifying the transformation.

8 Predicates and Variables

Propositions are a helpful beginning but too rigid to represent most of the interesting bits of mathematics. To do this, we need predicate logic, which allows variables and predicates that take variables as input. We’ll get started with predicate logic now, but delay covering some of the details (e.g. sections 1.3 and 1.4) until they become relevant to the proofs we’re looking at. A predicate is a statement that becomes true or false if you substitute in values for its variables. For example, “x^2 ≥ 10” or “y is winter hardy.” Suppose we call these P (x) and Q(x). Then Q(x) is true if x is “mint” but not if x is “tomato”.^1 (^1) A winter hardy plant is a plant that can survive the winter in a cold climate, e.g. here

in central Illinois.