0% found this document useful (0 votes)
91 views79 pages

Lecture Notes 03, Laws of Logic and Rules of Inference

This document discusses laws of logic and rules of inference in logic. It defines tautologies and contradictions, and presents several important laws of logic - including commutative, associative, distributive, identity, negation, double negation, idempotent, De Morgan's, universal bound, absorption, and negation of t and c laws. It also discusses several rules of inference - including addition, conjunction, simplification, modus ponens, modus tollens, disjunctive syllogism, hypothetical syllogism and resolution. Examples are provided to illustrate applying these laws and rules to determine validity of arguments. Exercises are included for the reader to practice applying these concepts.

Uploaded by

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

Lecture Notes 03, Laws of Logic and Rules of Inference

This document discusses laws of logic and rules of inference in logic. It defines tautologies and contradictions, and presents several important laws of logic - including commutative, associative, distributive, identity, negation, double negation, idempotent, De Morgan's, universal bound, absorption, and negation of t and c laws. It also discusses several rules of inference - including addition, conjunction, simplification, modus ponens, modus tollens, disjunctive syllogism, hypothetical syllogism and resolution. Examples are provided to illustrate applying these laws and rules to determine validity of arguments. Exercises are included for the reader to practice applying these concepts.

Uploaded by

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

Laws of Logic & Rules of

Inference

Imran Shafi
Email: [email protected]
Contents
Laws of Logic
Examples
Exercises
Rules of Inference
Examples
Exercises
Tautology
A tautology is a statement form that is always true regardless of the truth
values of the statement variables.
A tautology is represented by the symbol “T” or “t”
For example, the following expression is a tautology:
p  ¬p

p ¬p p  ¬p
True False True
False True True

Hence proved that p  ¬p = t


Contradiction
A contradiction is a statement form that is always false regardless of the truth
values of the statement variables.
A contradiction is represented by the symbol “C” or “c”
For example, the following expression is a tautology:
p  ¬p

p ¬p p  ¬p
True False False
False True False

Hence proved that p  ¬p = c


Laws of Logic
Given any statement variables p, q and r, a tautology t and a contradiction c, the
following logical equivalences hold:

Law Logical Form

pqqp
Commutative Law
pqqp
(p  q)  r  p  (q  r)
Associative Law
(p  q)  r  p  (q  r)
p  (q  r)  (p  q)  (p  r)
Distributive Law
p  (q  r)  (p  q)  (p  r)
Laws of Logic
Given any statement variables p, q and r, a tautology t and a contradiction c, the
following logical equivalences hold:

Law Logical Form

ptp
Identity Laws
pcp
p  ¬p  c
Negation Laws
p  ¬p  t
Double Negation Law ¬(¬p)  p
pp=p
Idempotent Laws
p p=p
Laws of Logic
Given any statement variables p, q and r, a tautology t and a contradiction c, the
following logical equivalences hold:
Law Logical Form

¬(p  q)  ¬p  ¬q
De Morgan’s Laws
¬(p  q)  ¬p  ¬q
pc=c
Universal Bound Law
p t=t
p  (p  q)  p
Absorption Laws
p  (p  q)  p
¬t = c
Negation of t and c
¬c = t
Negation of Expressions
Use De Morgan’s law to write the negation of the following expression:
-1 < x  4
Negation of Logical Expressions
Write down the negation of the following expressions.
1. Either the fan is very slow or it is very hot outside.
2. Akram is fit and running very fast.
3. Ali is intelligent but he failed in final exam.
4. Hina is neither confused not she is excited.
Logical Proofs … Truth Table
Show the following using truth-table:
p  q  ¬q  ¬p

Truth Table …
Logical Proofs
Show the following using truth-table and/or laws of logic:
ptp
Logical Proofs
Show the following using truth-table and/or laws of logic:
pcc
Logical Proofs
Prove the following using truth-table and/or laws of logic:
p  q = ¬p  q
Logical Proofs
Prove the following using truth-table and/or laws of logic:
p ⊕ q = (p  q)  ~ (p  q)
Logical Proofs
Prove that the following expressions are logically not equivalent:
i. ¬(p  q)
ii. ¬p  ¬q
Logical Proofs
Prove that the following expressions is a tautology:
(p  q)  (¬p  (p  ¬q))
Logical Proofs
Prove that the following expressions is a contradiction:
(p  ¬q)  (¬p  q)
Proofs … Laws of Logic
Simplify the following expression using laws of logic:
p  (¬(¬p  q))
Solution:
p  (¬(¬p  q))
= p  ((¬¬p)  ¬q)) … De Morgan’s Law
= p  (p  ¬q) … Double Negation
= (p  p)  ¬q … Association Law
= p  ¬q … Idempotent Law

Required simplified form.


Proofs … Laws of Logic
Using laws of logic, prove that:
¬(¬p  q)  (p  q)  p
Solution:
LHS = ¬(¬ p  q)  (p  q)
= (¬ (¬p)  ¬q)  (p  q) … De Morgan’s Law
= (p  ¬q)  (p  q) … Double Negation
= p  (¬q  q) … Distributed Law
=pc … Negation Law
=p … Identity Law
= RHS
Hence Proved.
Simplification … Laws of Logic … Do it Yourself
Simplify the following statement using laws of logic:
“You will get an A if you are hardworking and the sun shines, or you are hardworking
and it rains.”
Simplification … Laws of Logic … Do it Yourself
Simplify the following statements using laws of logic:
1. It is not true that I am tired and you are smart.
2. It is not true that the sun is shining but the boys are running.
3. It is not true that the girls are sharp and the boys are not dumb.
4. It is not true that I forgot my pen and bag or you forgot your book and purse.
Argument
An argument is a list of statements called premises (or assumptions or
hypotheses) followed by a statement called the conclusion.
P1 Premise
P2 Premise
P3 Premise
. . . . .. . . . .
Pn Premise
______________
C Conclusion

NOTE : The symbol  read “therefore,” is normally placed just before the conclusion.
Validity of an Argument
An argument is valid if the conclusion is true when all the premises are true.
Alternatively, an argument is valid if conjunction of its premises imply
conclusion.
That is (P1 P2  P3  . . .  Pn)  C is a tautology.

In that case if argument becomes tautology then we say the argument is valid.
Invalidity of an Argument
An argument is invalid if the conclusion is false when all the premises are true.

Alternatively, an argument is invalid if conjunction of its premises does not


imply conclusion.

Validity of argument:
When our premises conjunction is false, the argument is valid no matter what is
the value of conclusion
When our premises conjunction is true and conclusion is false, only then
argument is invalid.
Checking the Validity of an Argument
Construct the truth table using all premises and the conclusion
Now, check all the rows of the truth table where all premises are true, the
argument is valid if the value of conclusion is also true on all of these rows
Lets call the row where are premises are true as ‘critical rows’
If the conclusion in every critical row is TRUE, the argument is valid. Otherwise,
argument is invalid.
Validity of an Argument
Show that the following argument is valid:

Solution:
Lets construct the truth-table using premises and the conclusion:

p q pq p q
You can observe that there is only one critical row
T T T T T (where all premises are true) is the truth table. In the
critical row, the conclusion is also true.
T F F T F
Hence proved that the argument is valid.
F T T F T
F F T F F
Validity of an Argument
Is the following argument valid?

Solution:
If you represent the proposition “You have access to network” with p and “You can change your
grade” with q, you will get the same argument as below.

The argument is valid. (proven on previous


slide)
Invalidity of an Argument … Do it yourself
Show that the following argument is invalid:
Invalidity of an Argument … Do it yourself
Use the truth table to find whether or not following argument valid.
Invalidity of an Argument … Do it yourself
Use the truth table to find whether or not following argument valid.
Invalidity of an Argument … Do it yourself
Use the truth table to find whether or not following argument valid.
Rules of
Inference
Rules of Inference … Addition
Rules of Inference … Addition… Example
Check whether the following argument is valid…
Rules of Inference … Conjunction
Rules of Inference … Conjunction… Example
Check whether the following argument is valid…
Rules of Inference … Simplification
Rules of Inference … Simplification… Example
Check whether the following argument is valid…
Rules of Inference … Modus Ponens
Rules of Inference … Modus Ponens … Example
Check whether the following argument is valid…
Rules of Inference … Modus Tollens
Rules of Inference … Modus Tollens… Example
Check whether the following argument is valid…
Rules of Inference … Disjunctive Syllogism
Rules of Inference … Disjunctive Syllogism … Example
Check whether the following argument is valid…
Rules of Inference … Hypothetical Syllogism
Rules of Inference … Hypothetical Syllogism … Example
Check whether the following argument is valid…
Rules of Inference … Resolution
Rules of Inference … Resolution… Example
Check whether the following argument is valid…
Laws of Inference … Example
Prove that the following argument is valid:
Laws of Inference … Example
Prove that the following argument is valid:
Laws of Inference … Example
Prove that the following argument is valid:
Laws of Inference … Example
Prove that the following argument is valid:
Laws of Inference … Example
Prove that the following argument is valid:
Laws of Inference … Exercises
Prove that the following argument is valid:
If Ali is disciplined, his job is in forces.
Ali is disciplined
---------------------------------------------------
∴Ali’s job is in forces.
Laws of Inference … Exercises
Prove that the following argument is valid:
If sun is shining, I will go out for a walk.
Sun is shining.
---------------------------------------------------
∴I will go out for a walk.
Laws of Inference … Exercises
Prove that the following argument is valid:
If the teacher is absent, he must be sick.
The teacher is not absent.
---------------------------------------------------
∴The teacher must not be sick.
Laws of Inference … Exercises
Prove that the following argument is valid:
If my attendance is short, I will fail this course.
My attendance is not short.
---------------------------------------------------
∴I should not fail this course.
Laws of Inference … Exercises
Prove that the following argument is valid:
If accountability is better in system, the culprit will be punished.
If the culprit is punished, crime rate in city remains in control.
---------------------------------------------------
∴If the accountability is better in system, crime rate in city remains in control.
Laws of Inference … Exercises
Prove that the following argument is valid:
If the technical education is adequate, industry gets suitable work force.
If industry gets suitable workforce, unemployment is reduced in country.
---------------------------------------------------
∴ If the technical education is adequate, unemployment is reduced in country.
Laws of Inference … Exercises
Prove that the following argument is valid:
If we eat fresh vegetables, our immunity is improved.
If our immunity is improved, we are less prone to seasonal diseases.
---------------------------------------------------
∴ If we eat fresh vegetables, we are less prone to seasonal diseases.
Laws of Inference … Exercises
Prove that the following argument is valid:
I will stay at home or I will go to the office.
I will not stay at home.
---------------------------------------------------
∴ I will go to the office.
Laws of Inference … Exercises
Prove that the following argument is valid:
I will take tea or I will take fresh lime.
I will not take tea.
---------------------------------------------------
∴ I will take fresh lime.
Laws of Inference … Exercises
Prove that the following argument is valid:
I will wash my bike on Sunday.
---------------------------------------------------
∴ I will wash my bike on Saturday or on Sunday.
Laws of Inference … Exercises
Prove that the following argument is valid:
You are my crush.
---------------------------------------------------
∴ Either you are my crush or I am going to crush you.
Laws of Inference … Exercises
Prove that the following argument is valid:
Bilal is a vegetarian.
---------------------------------------------------
∴ Bilal is vegetarian or he eats meat occasionally.
Laws of Inference … Exercises
Prove that the following argument is valid:
Umer is lazy or Faisal is quick.
Umer is not lazy or Fatima is smart.
---------------------------------------------------
∴ Faisal is quick or Fatima is smart.
Laws of Inference … Exercises
Prove that the following argument is valid:
James is an innovator or Hamza is an expert programmer.
James is not an innovator or Faria is a content writer.
---------------------------------------------------
∴ Hamza is an expert programmer or Faria is a content writer.
Validity of Arguments … Exercises
Check whether or not the following argument valid:
If it rains, Salman will miss the class.
Salman didn’t miss the class.
---------------------------------------------------
∴ It didn’t rain.
Validity of Arguments … Exercises
Check whether or not the following argument valid:
If Rizwan starts the innings, he will score a hundred.
Rizwan didn’t score a hundred.
---------------------------------------------------
∴ Rizwan didn’t start the innings.
Validity of Arguments … Exercises
Check whether or not the following argument valid:
Lilly is a woman.
Lilly is a gymnast.
---------------------------------------------------
∴ All women are gymnasts.
Validity of Arguments … Exercises
Check whether or not the following argument valid:
All lions are fierce.
Some lions do not drink coffee.
---------------------------------------------------
∴ Some fierce creatures do not drink coffee.
Validity of Arguments … Exercises
Check whether or not the following argument valid:
All lions are fierce.
Some lions do not drink coffee.
---------------------------------------------------
∴ Some fierce creatures do not drink coffee.
Validity of Arguments … Exercises
Check whether or not the following argument valid:
All engineers are educated.
Some engineers cannot draw good pictures.
---------------------------------------------------
∴ Some educated people cannot draw good pictures.
Few More Exercises – Do it by yourself
Five friends A, H, K, R and V have access to an online chat room. We know the
following are True:

1. Either K or H or both are chatting.


2. Either R or V but not both are chatting
3. If A is chatting, then R is chatting too.
4. V is chatting if and only if K is chatting
5. If H is chatting, both A and K is chatting

Determine who is chatting?


Few More Exercises – Do it by yourself
Few More Exercises – Do it by yourself
Few More Exercises – Do it by yourself
Few More Exercises – Do it by yourself
No doctors is enthusiastic;
You are enthusiastic.
Therefore, you are not a doctor
a person
is a Doctor
is enthusiastic

You might also like