Name= Azwer Raza
Class= BS-SE-II
Roll No. = 212516016
Subject= Discrete Structures
Submitted to= Ma’am Neelam Bashir
Rules of Inference
The rules of inference also known as inference rules are a logical form or guide consisting of premises (or hypotheses)
and draw a conclusion. A valid argument is when the conclusion is true whenever all the beliefs are true, and an invalid
argument is called a fallacy.
1.Addition
The Addition rule is one the common inference rule, and it states that If P is true, then P∨Q will be true. Its notation is
__P__
∴PVQ
Example 1
Let P be the proposition, “He studies very hard.”
If P is true
Therefore either he studies very hard or he is a very bad student. , PvQ
Here Q is the proposition “He is a very bad student”.
Example 2
Let P be “I will study discrete math.”
“I will study discrete math.” is true
Therefore, I will study discrete math or I will visit Las Vegas. , PvQ
Here Let Q is “I will visit Las Vegas.”
Example 3
Let P be “I have a vanilla ice-cream.”
Therefore I have vanilla or chocolate ice-cream. , PvQ
Here Q is “I have Chocolate ice-cream.”
Example 4
Let Q is “I will make tea.”
Therefore I will make tea, or I will read a book. , PvQ
Here R is “I will read a book.”
Example 5
Let P is “I am sick.”
I am sick or it is raining. , PvQ
Here q is “it is raining”.
2.Conjunction
If P and Q are two premises, we can use Conjunction rule to derive P∧Q. Its notation is
P
___Q
∴P∧Q
Example 1
Let P be “He studies very hard”
Let Q is “He is the best boy in the class”
Therefore he studies very hard and he is the best boy in the class. , P∧Q
Example 2
Let p be “I will study discrete math.”
Let q be “I will study English literature.”
Therefore I will study discrete math and I will study English literature. , P∧Q
Example 3
Let P be “He studies hard.”
And Q is “He is the best boy in class.”
Therefore he studies hard and he is the best boy in class. , P∧Q
Example 4
Let P be “Michael like skiing.”
And Q is “Michael likes jazz dancing.”
Therefore Michael likes skiing and jazz dancing. , P∧Q
Example 5
Let P be “Ice is sticky to walk on.”
And Q is “Mud sticks to your shoes”
Therefore ice is sticky to walk on and mud sticks to your shoes. , P∧Q
3.Simplification
The simplification rule state that if P∧ Q is true, then Q or P will also be true. It can be represented as:
_P∧Q
∴P
Example 1
He studies very hard and he is the best boy in the class. , P∧Q
Therefore he studies very hard. ,P
Example 2
I will study discrete math and English literature. , P∧Q
Therefore, I will study discrete math. ,P
Example 3
Sidra likes both skiing and jazz dancing. , P∧Q
Therefore, Sidra likes skiing. ,P
Example 4
I will make tea and I will read a book. , P∧Q
Therefore, I will make tea. ,P
Example 5
I will study discrete mathematics and physics. , P∧Q
Therefore, I will study physics. ,P
4.Modus Ponens
The Modus Ponens rule is one of the most important rules of inference, and it states that if P and P → Q is true, then we
can infer that Q will be true. It is represented as
P→Q
_P__
∴Q
Example 1
If you have a password, then you can log on to facebook. , P→Q
You have a password. , P
Therefore, you can log on to facebook.
Example 2
If I am sleepy then I go to bed. , P→ Q
I am sleepy. , P
Therefore I go to bed.
Example 3
If I will study protein structures, then I will study biochemistry. ,P→Q
I will study protein structures. ,P
Therefore, I will study biochemistry.
Example 4
If it is raining then I will make tea. ,P→Q
It is raining. ,P
Therefore, I will make tea.
Example 5
If tweety is a bird then tweety flies. ,P→Q
Tweety is a bird. ,P
Therefore, tweety flies.
5.Modus Tollens
The Modus Tollens rule state that if P→ Q is true and ¬ Q is true, then ¬ P will also true. It can be represented as:
P→Q
_¬Q_
∴¬P
Example 1
If it is snowing then I will study chemistry. , P→Q
I will not study chemistry. , ¬Q
Therefore, it is not snowing. , ¬P
Example 2
If you have a password, then you can log on to facebook. , P→Q
You cannot log on to facebook. , ¬Q
Therefore you do not have a password. , ¬P
Example 3
If I am sleepy then I go to bed. , P→ Q
I do not go to the bed. , ~Q
Therefore, I am not sleepy. ~P
Example 4
If it is raining then I will make tea. , P→ Q
I will not make tea. , ~Q
Therefore it is not raining. ~P
Example 5
If you get chocolates then you won’t need popcorn. , P→ Q
You will need popcorns. ~Q
Therefore you did not get chocolate. ~P
6.Disjunctive Syllogism
The Disjunctive syllogism rule state that if P∨Q is true, and ¬P is true, then Q will be true. It can be represented as:
P∨Q
_¬P_
∴Q
Example 1
The ice cream is not vanilla flavored. , ¬P
The ice cream is either vanilla flavored or chocolate flavored. , P∨Q
Therefore the ice cream is chocolate flavored. ,Q
Example 2
Today is Sunday or Monday. , P∨Q
Today is not Sunday. ,¬P
Therefore today is Monday. ,Q
Example 3
I will study discrete math or I will study English literature. , P∨Q
I will not study discrete math. ¬P
Therefore, I will study English literature. ,Q
Example 4
I will make tea or I will read a book. , P∨Q
I will not make tea. , ¬P
Therefore I will read a book. ,Q
Example 5
The ice-cream is either vanilla flavored or chocolate flavored. ,P∨Q
The ice-cream is not vanilla flavored. , ¬P
Therefore, the ice-cream is chocolate flavored. ,Q
7.Hypothetical Syllogism
The Hypothetical Syllogism rule state that if P→R is true whenever P→Q is true, and Q→R is true. It can be represented
as the following notation:
P→Q
Q→R_
∴P→R
Example 1
If it rains, I shall not go to school. , P→Q
If I don't go to school, I won't need to do homework. , Q→R
Therefore if it rains, I won't need to do homework. ,P→R
Example 2
If you have my home key then you can unlock my home. ,P→Q
If you can unlock my home then you can take my money. ,Q→R
Therefore, if you have my home key then you can take my money. ,P→R
Example 3
If it snows, then I will study discrete math. ,P→Q
If I study discrete math, I will get an A. ,Q→R
Therefore, If it snows, I will get an A. ,P→R
Example 4
If it is raining then I will make tea. ,P→Q
If I make tea then I will read a book. ,Q→R
Therefore, if it rains then I will read a book. ,P→R
Example 5
If I do not pay taxes, I will be committing a crime. ,P→Q
If I commit a crime, I could go to jail. ,Q→R
Therefore, if I do not pay the taxes, I could go to jail. ,P→R
8.Constructive Dilemma
If (P→Q)∧(R→S) and P∨R are two premises, we can use constructive dilemma to derive Q∨S. It is represented as:
(P→Q)∧(R→S)
____P∨R_____
∴Q∨S
Example 1
If it rains, I will take a leave. , (P→Q)
If it is hot outside, I will go for a shower. , (R→S)
Either it will rain or it is hot outside. , P∨R
Therefore I will take a leave or I will go for a shower. , Q∨S
Example 2
If I will study discrete math, then I will study computer science. , (P→Q)
If I will study protein structures, then I will study biochemistry. , (R→S)
I will study discrete math or I will study protein structures. , P∨R
Therefore, I will study computer science or biochemistry. , Q∨S
Example 3
If I am running then I am happy. , (P→Q)
If I am sleeping then I am dreaming. , (R→S)
I am running or I am sleeping. , P∨R
Therefore I am happy or I am dreaming. , Q∨S
Example 4
If I will eat the popcorn then I will feel guilty. , (P→Q)
If I eat carrots then I will need water. , (R→S)
I will eat popcorn or I will eat carrots. , P∨R
Therefore, I will feel guilty or I will need water. , Q∨S
Example 5
If I win a million dollars then I will donate it to Al-Hama foundation. , (P→Q)
If my friend wins a million dollars then he will donate it to wildlife funds. , (R→S)
I win a million dollars or my friend wins a million dollar. , P∨R
Therefore, I will donate it to Al-Hama foundation or he will donate it to wildlife funds. , Q∨S
9.Destructive Dilemma
If (P→Q)∧(R→S) and ¬Q∨¬S are two premises, we can use destructive dilemma to derive ¬P∨¬R. It is represented as:
(P→Q)∧(R→S)
___¬Q∨¬S____
∴¬P∨¬R
Example 1
If it rains, I will take a leave. , (P→Q)
If it is hot outside, I will go for a shower. , (R→S)
Either I will not take a leave or I will not go for a shower. , ¬Q∨¬S
Therefore either it does not rain or it is not hot outside. ,¬P∨¬R
Example 2
If I will study discrete math, then I will study computer science. , (P→Q)
If I will study protein structures, then I will study biochemistry. , (R→S)
I will not study computer science or I will not study biochemistry. , ¬Q∨¬S
Therefore, I will not study discrete math or I will not study protein structures. ,¬P∨¬R
Example 3
If it rains then we will stay inside. , (P→Q)
If it is sunny then we will go for a walk. , (R→S)
Either we will not stay inside or we will not go for a walk. , ¬Q∨¬S
Therefore, either it will not rain, or it will not be sunny, or both. ,¬P∨¬R
Example 4
If I eat the pretzel then I will need a drink. , (P→Q)
If I eat ice-cream then I will want chocolate. , (R→S)
Either I will not need a drink or I will not want chocolate. , ¬Q∨¬S
Therefore, either I did not eat the pretzel or I did not eat ice-cream. ,¬P∨¬R
Example 5
If a chief justice will not be appointed then there will be a vacuum of leadership in the judiciary. , (P→Q)
If a new president will not be elected then there will be vacuum of leadership in senate. , (R→S)
There will not be a vacuum of leadership either in judiciary or in senate. , ¬Q∨¬S
Therefore, either a chief justice will be appointed or a new president will be elected. ,¬P∨¬R