Lec 3
Lec 3
Using laws of logic simplify the statement form. Using Laws of Logic, verify the logical equivalence.
p ∨ [~(~p ∧ q)] ~ (~ p ∧ q) ∧ (p ∨ q) ≡ p
Solution: Solution:
≡ p ∨ [~(~p) ∨ (~q)] DeMorgan’s Law ≡ (~(~p) ∨ ~q) ∧(p ∨ q) DeMorgan’s Law
≡ p ∨ [p∨(~q)] Double Negative Law ≡ (p ∨ ~q) ∧ (p ∨ q) Double Negative Law
≡ [p ∨ p]∨(~q) Associative Law for ∨ ≡ p ∨ (~q ∧ q) Distributive Law in reverse
LAWS OF LOGIC ≡ p ∨ (~q) Indempotent Law ≡p∨c Negation Law
Lecture # 03 ≡p Identity Law
This is the simplified statement form.
CONDITIONAL STATEMENT or
EXERCISE: IMPLICATION
Use Logical Equivalence to rewrite each of the following Introduction The original statement is then saying:
sentences more simply.
Consider the statement:
1. It is not true that I am tired and you are smart. "If you earn an A in Math, then I'll buy you a if p is true, then q is true
{I am not tired or you are not smart.} computer."
Or
2. It is not true that I am tired or you are smart.
{I am not tired and you are not smart.} This statement is made up of two simpler statements:
3. I forgot my pen or my bag and I forgot my pen or p: "You earn an A in Math," and more simply, if p, then q.
my glasses.
{I forgot my pen or I forgot my bag and glasses. q: "I will buy you a computer."
4. It is raining and I have forgotten my umbrella, or it We can also phrase this as p implies q, and we write p →
is raining and I have forgotten my hat. if p is true, then q is true, or, more simply, if p, then q. q.
{It is raining and I have forgotten my umbrella or my hat.} We can also phrase this as p implies q, and we write p →
q.
CONDITIONAL STATEMENTS OR PRACTICE WITH CONDITIONAL
TRUTH TABLE for p → q IMPLICATIONS: STATEMENTS:
Definition: Determine the truth value of each of the following
p q p→q If p and q are statement variables, the conditional of q by conditional statements:
T T T p is “If p then q” or “p implies q” and is denoted p → q.
T F F “If 1 = 1, then 3 = 3.” TRUE
It is false when p is true and q is false; otherwise it is true.
F T T
F F T “If 1 = 1, then 2 = 3.” FALSE
The arrow "→ " is the conditional operator
and in p → q the statement p is called the hypothesis “If 1 = 0, then 3 = 3.” TRUE
(or antecedent) “If 1 = 2, then 2 = 3.” TRUE
q is called the conclusion (or consequent). “If 1 = 1, then 1 = 2 and 2 = 3.” FALSE
“If 1 = 3 or 1 = 2 then 3 = 3.” TRUE
~p ∧ ~q→ r
If you neither have flu nor miss the final exam, then you
will pass the course.
NEGATION OF A CONDITIONAL
STATEMENT EXAMPLES
Since p → q ≡ ~p ∨ q therefore Write negations of each of the following If x is prime then x is odd or x is 2.
~ (p → q) ≡ ~ (~ p ∨ q) statements: x is prime but x is not odd and x is not 2.
≡ ~ (~ p) ∧ (~ q) by De Morgan’s law
≡ p ∧ ~ q by the Double Negative law If Ali lives in Pakistan then he lives in Lahore. If n is divisible by 6, then n is divisible by 2 and n is
Ali lives in Pakistan and he does not live in Lahore. divisible by 3.
Thus the negation of “if p then q” is logically equivalent
to “p and not q”. n is divisible by 6 but n is not divisible by 2 or by 3.
If my car is in the repair shop, then I cannot get to class.
Note: My car is in the repair shop and I can get to class.
Accordingly, the negation of an if-then statement does
not start with the word if.
INVERSE OF A CONDITIONAL CONVERSE OF A CONDITIONAL
STATEMENT WRITING INVERSE STATEMENT
The inverse of the conditional statement p → q is If today is Friday, then 2 + 3 = 5. The converse of the conditional statement p → q is
~p → ~q If today is not Friday, then 2 + 3 ≠ 5. q→ p
A conditional and its inverse are not equivalent as could If it snows today, I will ski tomorrow. A conditional and its converse are not equivalent.
be seen from the truth table. If it does not snow today I will not ski tomorrow. i.e., → is not a commutative operator.
If P is a square, then P is a rectangle. p q p→q q→p
p q p→q ~p ~q ~p →~q
If P is not a square then P is not a rectangle. T T T T
T T T F F T
T F F F T T
If my car is in the repair shop, then I cannot get to T F F T
class. F T T F
F T T T F F
If my car is not in the repair shop, then I shall get to F F T T
F F T T T T
the class.
not the same
different truth values in rows 2 and 3
CONTRAPOSITIVE OF A CONDITIONAL
WRITING CONVERSE STATEMENT
If today is Friday, then 2 + 3 = 5. The contrapositive of the conditional statement p → q is If today is Friday, then 2 + 3 = 5.
If 2 + 3 = 5, then today is Friday. ~q→~p If 2 + 3 ≠ 5, then today is not Friday.
If it snows today, I will ski tomorrow. If it snows today, I will ski tomorrow.
A conditional and its contrapositive are equivalent. I will not ski tomorrow only if it does not snow
I will ski tomorrow only if it snows today.
Symbolically p → q ≡ ~q → ~p today.
If P is a square, then P is a rectangle. If P is a square, then P is a rectangle.
If P is a rectangle then P is a square. If P is not a rectangle then P is not a square.
If my car is in the repair shop, then I cannot get to If my car is in the repair shop, then I cannot get to
class. class.
If I cannot get to the class, then my car is in the If I get to the class, then my car is not in the repair
shop.
repair shop.