



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




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.
The proficiency exam has been moved to 2405 Siebel, 2-4pm this Saturday (30th). Homework 1 is (or will soon be) posted today. Solutions for homework 0 will be released over the weekend. If you plan to do the honors add-on, you should register by the end of next week (8 Sept). Be sure that you’ve registered for the correct section of 196, the one corresponding to CS 173. Turn in your homework: please put it in the pile for your section. Also please pick up the handout (tables xeroxed from pp. 24-25 of Rosen). Our WCS (Women in Computer Science) group is holding several work- shops on Sunday Sept 7th, 7-9pm, in 1404 Siebel, open to all but aimed at freshmen. Topics: Newsgroup access (7:30pm), VPN (8pm), ssh (8:30pm). Questions: contact Fernanda Mendes ([email protected])
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.
3 Some useful logical equivalences
Rosen pp. 24-25 (see xeroxed handout) lists a number of useful logical equiv- alences, which you could establish with truth tables (but probably don’t want to). Browse through them at your leisure. Some closely (and for good math- ematical reasons) resemble rules from algebra and/or set theory, sometimes sharing the same name. For example, one of the two distributive laws states that
directly from (5) to (7) without bothering to name the formula justifying the transformation.
5 Some useful terminology
A compound proposition p that is true for all combinations of input values is called a tautology. Or, equivalently, p is logically equivalent to F. A compound proposition p that is false for all combinations of input values (aka logically equivalent to T ) is called a contradiction. Two compound propositions p and q are logically equivalent exactly when p ↔ q is a tautology.
6 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 If we substitute concrete values for all the variables in a predicate, we’re back to having a proposition. That wasn’t much use, was it? The main use of predicates is to make general statements about what happens when you substitute a variety of values for the variables. For exam- ple:
P(x) is true for every x
For example, “For every integer x, x^2 ≥ 10” (false). Consider “For all x, 2x ≥ x.” Is this true or false? This depends on what values x can have. Is x any integer? In that case the claim is false. But if x is supposed to be a natural number, then the claim is true.
(^1) A winter hardy plant is a plant that can survive the winter in a cold climate, e.g. here in central Illinois.
In order to decide whether a statement involving quantifiers is true, you need to know what types of values are allowed for each variable. Good style requires that you state the type of the variable explicitly when you introduce it, e.g. “For all natural numbers x, 2x ≥ x.” Exceptions involve cases where the type is very, very clear from the context, e.g. when a whole long discussion is all about (say) the integers. If you aren’t sure, a redundant type statement is a minor problem whereas a missing type statement is sometimes a big problem.