0% found this document useful (0 votes)
302 views15 pages

mth202 Lecture03

This document provides an overview of logical equivalences and laws of logic. It defines logical connectives such as conjunction, disjunction, negation, implication and biconditional. It presents various logical equivalence laws such as commutative, associative, distributive, identity, negation, double negation, idempotent, De Morgan's, universal bound, absorption and negation of tautology and contradiction. Examples are given to demonstrate applying these laws to simplify logical statements. The document also discusses conditional statements, truth tables for implication, translating between symbolic and English representations of logical statements and the hierarchy of operations for logical connectives.

Uploaded by

saif ur rehman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
302 views15 pages

mth202 Lecture03

This document provides an overview of logical equivalences and laws of logic. It defines logical connectives such as conjunction, disjunction, negation, implication and biconditional. It presents various logical equivalence laws such as commutative, associative, distributive, identity, negation, double negation, idempotent, De Morgan's, universal bound, absorption and negation of tautology and contradiction. Examples are given to demonstrate applying these laws to simplify logical statements. The document also discusses conditional statements, truth tables for implication, translating between symbolic and English representations of logical statements and the hierarchy of operations for logical connectives.

Uploaded by

saif ur rehman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 15

LECTURE # 3

LOGICAL EQUIVALENCES
LAWS OF LOGIC

Given any statement variables p, q and r, a tautology t and a contradiction c,


the following logical equivalences hold:

Commutative Laws: pqqp


pqqp
Associative Laws: (p  q)  r  p  (q  r)
(p  q)  r  p  (q  r)
Distributive Laws: p  (q  r)  (p  q)  (p  r)
p  (q  r)  (p  q)  (p  r)

Identity laws: ptp


pcp
Negation laws: p~pt
p~pc
Double negation law: ~ (~ p)  p
Idempotent laws: ppp
ppp

DeMorgan’s laws: ~ (p  q)  ~ p  ~ q
~ (p  q)  ~ p  ~ q
Universal bound laws: ptt
pcc
Absorption laws: p  (p  q)  p
p  (p  q)  p
Negations of t and c: ~tc
1
~ct
Note that all these laws can be proved by using truth tables

APPLYING LAWS OF LOGIC

Using law of logic, simplify the statement form p  [~(~p  q)]

Solution:
p  [~(~p  q)]  p  [~(~p)  (~q)] DeMorgan’s Law
 p  [p(~q)] Double Negative Law
 [p  p](~q) Associative Law for 
 p  (~q) Indempotent Law
Which is the simplified statement form.

EXAMPLE

Using Laws of Logic, verify the logical equivalence

~ (~ p  q)  (p  q)  p

SOLUTION
Consider
~(~p  q)  (pq)
 (~(~p)  ~q) (p  q) DeMorgan’s Law
 (p  ~q)  (pq) Double Negative Law
 p  (~q  q) Distributive Law
pc Negation Law
p Identity Law
Hence the logical equivalence has been shown. 2
SIMPLIFYING A STATEMENT

Consider the statement


“You will get an A if you are hardworking and the sun shines, or you
are hardworking and it rains.”
Rephrase the condition more simply.
Solution:
Let p = “You are hardworking’
q = “The sun shines”
r = “It rains”
The condition is then (p  q)  (p  r)
And using distributive law in reverse,
(p  q)  (p  r)  p  (q  r)
Putting p  (q  r) back into English, we can rephrase the given sentence
as “You will get an A if you are hardworking and the sun shines or it
rains.

EXERCISE

Use Logical Equivalence to rewrite each of the following sentences more


simply.
1. It is not true that I am tired and you are smart.
I am not tired or you are not smart.
2. It is not true that I am tired or you are smart.
I am not tired and you are not smart.
3
EXERCISE

3. I forgot my pen or my bag and I forgot my pen or my glasses.


I forgot my pen or I forgot my bag and glasses
[i.e. (p q) (p  q) p (p  q).
4. It is raining and I have forgotten my umbrella, or it is raining and
I have forgotten my hat.
It is rainingCONDITIONAL
and I have forgotten my umbrella or my hat.
STATEMENTS

Introduction
Consider the statement:
"If you earn an A in Math, then I'll buy you a computer."
This statement is made up of two simpler statements:
p: "You earn an A in Math," and
q: "I will buy you a computer."
The original statement is then saying :
if p is true, then q is true, or, more simply, if p, then q.
We can also phrase this as p implies q, and we write p  q.
EXPLANATION

Suppose for the sake of argument that the statement


"If you earn an A in Math, then I'll buy you a computer," is true.
This does not mean that you will earn an A in Math;
all it says is that if you do so, then I will buy you a computer. Thinking of
this as a promise, the only way that it can be broken is if you do earn an A
and I do not buy you a computer. In general, we use this idea to define the
statement p  q. 4
CONDITIONAL STATEMENTS OR IMPLICATIONS

If p and q are statement variables, the conditional of q by p is “If p


then q” or “p implies q” and is denoted p  q.
It is false when p is true and q is false; otherwise it is true.
The arrow " " is the conditional operator, and in p  q the statement p is
called the hypothesis (or antecedent) and q is called the conclusion (or
consequent).

TRUTH TABLE FOR p  q

p q pq
T T T
T F F

F T T
F F T

NOTE: p  q is false only when p is true and q is false and in order to


assign truth values in the column of p  q first we have to find out the rows
where p is T ,then we will see the value of q corresponding to these values
of p where the q has F we will write F in the column of and in all other
values are T. Note that if hypothesis in this case) is false then we write T in
the column of p  q.

5
PRACTICE WITH CONDITIONAL STATEMENTS

Determine the truth value of each of the following conditional statements:


1. “If 1 = 1, then 3 = 3.” TRUE
2. “If 1 = 1, then 2 = 3.” FALSE
3. “If 1 = 0, then 3 = 3.” TRUE
4. “If 1 = 2, then 2 = 3.” TRUE
5. “If 1 = 1,then 1 = 2 and 2 = 3.” FALSE
6. “If 1 = 3 or 1 = 2 then 3 = 3.” TRUE

ALTERNATIVE WAYS OF EXPRESSING IMPLICATIONS

The implication p  q could be expressed in many alternative ways


as:

• “if p then q”
• “p implies q”
• “if p, q”
• “p only if q”
• “p is sufficient for q”

• “not p unless q”
• “q follows from p”
• “q if p”
• “q whenever p”
• “q is necessary for p”

6
EXERCISE

Write the following statements in the form “if p, then q” in English.


a) Your guarantee is good only if you bought your CD less than 90
days ago.
If your guarantee is good, then you must have bought your CD player
less than 90 days ago.
b) To get tenure as a professor, it is sufficient to be world-famous.
If you are world-famous, then you will get tenure as a professor.
c) That you get the job implies that you have the best credentials.
If you get the job, then you have the best credentials.
d) It is necessary to walk 8 miles to get to the top of the Peak.
If you get to the top of the peak, then you must have walked 8 miles.

TRANSLATING ENGLISH SENTENCES TO SYMBOLS

Let p and q be propositions:


p = “you get an A on the final exam”
q = “you do every exercise in this book”
r = “you get an A in this class”
Write the following propositions using p, q,and r and logical connective

7
1. To get an A in this class it is necessary for you to get an A on the
final.
SOLUTION pr

2. You do every exercise in this book; You get an A on the final, implies,
you get an A in the class.
SOLUTION pqr

3. Getting an A on the final and doing every exercise in this book is


sufficient for getting an A in this class.
SOLUTION pqr

TRANSLATING SYMBOLIC PROPOSITIONS TO ENGLISH


Let p, q, and r be the propositions:
p = “you have the flu”
q = “you miss the final exam”
r = “you pass the course”
Express the following propositions as an English sentence.
1. pq
If you have flu, then you will miss the final exam.
2. ~q  r
If you don’t miss the final exam, you will pass the course.
3. ~p  ~q r
If you neither have flu nor miss the final exam, then you will pass the
course. 8
HIERARCHY OF OPERATIONS
FOR LOGICAL CONNECTIVES

1. ~(negation)
2.  (conjunction),  (disjunction)
3.  (conditional)

EXAMPLE

Construct a truth table for the statement form p  ~ q  ~ p


SOLUTION
According to the order of operations for logical
connectives, p  ~ q  ~ p means (p  (~ q))  (~ p)

p q ~q ~p p  ~q p~q~p

T T F F T F
T F T F T F
F T F T F T
F F T T T T

In the above table we use the hierarchy of operations to complete the truth
table.
That’s why we have column for ~q and then for ~p after the columns of p
and q then we have the column for p  ~q because order of operation as
given below and at the end we have column for the statement form which
involve implication that is p  ~ q  ~ p.
9
EXAMPLE

Construct a truth table for the statement form (pq)(~ p r)


SOLUTION

p q r pq ~p ~pr (pq)(~ p r)


T T T T F T T
T T F T F T T
T F T F F T F
T F F F F T F
F T T T T T T
F T F T T F F
F F T T T T T
F F F T T F F

LOGICAL EQUIVALENCE INVOLVING IMPLICATION

Use truth table to show pq  ~q  ~p

p q ~q ~p pq ~q  ~p
T T F F T T
T F T F F F
F T F T T T
F F T T T T

10
IMPLICATION LAW
pq  ~pq

p q pq ~p ~pq
T T T F T
T F F F F
F T T T T
F F T T T

In the above table as you note that the entries in the third and last
columns are same so these statement forms are logically equivalent.
This is very important logical equivalence shows that the implication
can be replaced by using ~ and  .

NEGATION OF A CONDITIONAL STATEMENT

We have shown in the above table that pq  ~pq. Now


pq  ~pq therefore
~ (p  q)  ~ (~ p  q)
 ~ (~ p)  (~ q) by De Morgan’s law
 p~q by the Double Negative law

Thus the negation of “if p then q” is logically equivalent to “p and not q”.
Accordingly, the negation of an if-then statement does not start with the
word if.
You should see yourself that the Negation of implication and implication
are not Logically equivalent.

11
EXAMPLES

Write negations of each of the following statements:


1. If Ali lives in Pakistan then he lives in Lahore.
2. If my car is in the repair shop, then I cannot get to class.
3. If x is prime then x is odd or x is 2.
4. If n is divisible by 6, then n is divisible by 2 and n is divisible by
3.
SOLUTIONS
1. Ali lives in Pakistan and he does not live in Lahore.
2. My car is in the repair shop and I can get to class.
3. x is prime but x is not odd and x is not 2.
4. n is divisible by 6 but n is not divisible by 2 or by 3.

INVERSE OF A CONDITIONAL STATEMENT

The inverse of the conditional statement p  q is ~p  ~q


A conditional and its inverse are not equivalent as could be seen from the
truth table.

p q pq ~p ~q ~p ~q
T T T F F T
T F F F T T
F T T T F F
F F T T T T
12
WRITING INVERSE

1. If today is Friday, then 2 + 3 = 5.


If today is not Friday, then 2 + 3  5.
2. If it snows today, I will ski tomorrow.
If it does not snow today I will not ski tomorrow.
3. If P is a square, then P is a rectangle.
If P is not a square then P is not a rectangle.
4. If my car is in the repair shop, then I cannot get to class.
If my car is not in the repair shop, then I shall get to the class.

CONVERSE OF A CONDITIONAL STATEMENT

The converse of the conditional statement p  q is q  p


A conditional and its converse are not equivalent. That is  is not a
commutative operator.

p q pq qp
T T T T
T F F T
F T T F
F F T T

Now since the entries in the last two columns are not same so the
corresponding statement forms are not logically equivalent. That is
conditional statement and its converse are not logically equivalent
13
WRITING CONVERSE

1. If today is Friday, then 2 + 3 = 5.


If 2 + 3 = 5, then today is Friday.
2. If it snows today, I will ski tomorrow.
I will ski tomorrow only if it snows today.
3. If P is a square, then P is a rectangle.
If P is a rectangle then P is a square.
4. If my car is in the repair shop, then I cannot get to class.
If I cannot get to the class, then my car is in the repair shop.

CONTRAPOSITIVE OF A CONDITIONAL STATEMENT

The contrapositive of the conditional statement p  q is ~ q  ~ p.


A conditional and its contrapositive are equivalent.
Symbolically, p  q  ~q  ~p as shown by the truth table below.

p q pq ~q~p
T T T T
T F F F
F T T T
F F T T
Note that the entries in the last two columns are same .Hence the
corresponding statement forms are logically equivalent. Also note that in the
above table we did not made the columns for ~ q and ~ p. But you should
made these columns also.
14
WRITING CONTRAPOSITIVE

1. If today is Friday, then 2 + 3 = 5.


If 2 + 3  5, then today is not Friday.
2. If it snows today, I will ski tomorrow.
I will not ski tomorrow only if it does not snow today.
3. If P is a square, then P is a rectangle.
If P is not a rectangle then P is not a square.
4. If my car is in the repair shop, then I cannot get to class.
If I get to the class, then my car is not in the repair shop.

REASONING EXERCISES

1. If pq, then its converse is q  p


2. The inverse of pq is ~p ~q
3. The converse and inverse of a conditional statement are equivalent
4. If t is a tautology, why is pt also a tautology, regardless of p?
5. If c is a contradiction, why is cq a tautology, regardless of q?
6. If t is a tautology and c is a contradiction, what can you say about tc ?
7. If p and q are both contradictions, what can you say about pq?
8. Given any statement form, is it possible to find a logically equivalent
form that uses only ~ and  ?

15

You might also like