Lecture 7
Lecture 7
Rules of Inference
1
Introduction
•An argument in propositional logic is a sequence of propositions. All but
the final proposition in the argument are called premises and the final
proposition is called the conclusion.
•An argument is valid if the conclusion is true whenever all the premises
are true.
•The validity of an argument can be tested through the use of the truth
table by checking if the critical rows, i.e. the rows in which all premises
are true, will correspond to the value “true” for the conclusion.
2
Example 1
Solution
From the table
we see all critical rows (in this case, those with the shaded
positions all containing a T) correspond to (the circled) T(true) for r.
Hence the argument is valid.
3
Example 2
Solution
4
Rules of Inference for Propositional Logic
•We can always use a truth table to show that an argument form is valid.
We do this by showing that whenever the premises are true, the
conclusion must also be true.
•However, this can be a tedious approach. For example, when an
argument form involves 10 different propositional variables, to use a
truth table to show this argument form is valid requires 210 = 1024
different rows.
•Fortunately, we do not have to resort to truth tables. Instead, we can first
establish the validity of some relatively simple argument forms, called
rules of inference.
5
Modus ponens or law of detachment
• premises: p, p → q conclusion: q
•This is written as
6
Example
Suppose that the conditional statement “If it snows today, then we will
go skiing” and its hypothesis, “It is snowing today,” are true. Then, by
modus ponens, it follows that the conclusion of the conditional
statement, “We will go skiing,” is true.
7
Rules of Inference
8
Example
State which rule of inference is the basis of the following argument: “It is
below freezing now. Therefore, it is either below freezing or raining
now.”
Solution
Let p be the proposition “It is below freezing now” and q the proposition
“It is raining now.” Then this argument is of the form
9
Example
State which rule of inference is the basis of the following argument: “It is
below freezing and raining now. Therefore, it is below freezing now.”
Solution
Let p be the proposition “It is below freezing now,” and let q be the
proposition “It is raining now.” This argument is of the form
10
Example
State which rule of inference is used in the argument:
If it rains today, then we will not have a barbecue today. If we do not
have a barbecue today, then we will have a barbecue tomorrow.
Therefore, if it rains today, then we will have a barbecue tomorrow.
Solution
Let p be the proposition “It is raining today,” let q be the proposition
“We will not have a barbecue today,” and let r be the proposition “We
will have a barbecue tomorrow.” Then this argument is of the form
11
Contrapositive
•Switching the hypothesis and conclusion of a conditional statement and
negating both.
•If the original statement is TRUE, the contrapositive is TRUE. If the
original statement is FALSE, the contrapositive is FALSE. They are said
to be logically equivalent.
12
Using Rules of Inference to Build Arguments
When there are many premises, several rules of inference are often
needed to show that an argument is valid.
Example
Show that the premises “It is not sunny this afternoon and it is colder
than yesterday,” “We will go swimming only if it is sunny,” “If we do not
go swimming, then we will take a canoe trip,” and “If we take a canoe
trip, then we will be home by sunset” lead to the conclusion “We will
be home by sunset.”
13
Example
Show that the premises “It is not sunny this afternoon and it is colder than
yesterday,” “We will go swimming only if it is sunny,” “If we do not go
swimming, then we will take a canoe trip,” and “If we take a canoe trip, then
we will be home by sunset” lead to the conclusion “We will be home by
sunset.”
Solution
Let
•p be the proposition “It is sunny this afternoon,”
•q the proposition “It is colder than yesterday,”
•r the proposition “We will go swimming,”
•s the proposition “We will take a canoe trip,”
•and t the proposition “We will be home by sunset.”
15
Example
Show that the premises “If you send me an e-mail message, then I will finish
writing the program,” “If you do not send me an e-mail message, then I will go
to sleep early,” and “If I go to sleep early, then I will wake up feeling refreshed”
lead to the conclusion “If I do not finish writing the program, then I will wake
up feeling refreshed.”
Solution
•Let p be the proposition “You send me an e-mail message,”
•q the proposition “I will finish writing the program,”
•r the proposition “I will go to sleep early,” and
•s the proposition “I will wake up feeling refreshed.”
•Then the premises are p → q,¬ p → r, and r → s.
•The desired conclusion is ¬q → s.
•We need to give a valid argument with premises p → q, ¬p → r, and r
→ s and conclusion ¬q → s.
16
Solution Continue
This argument form shows that the premises lead to the desired
conclusion.
17
Resolution
•Computer programs have been developed to automate the task of
reasoning and proving theorems.
•Many of these programs make use of a rule of inference known as
resolution.
•This rule of inference is based on the tautology
18
Example
Use resolution to show that the hypotheses “Jasmine is skiing or it is not
snowing” and “It is snowing or Bart is playing hockey” imply that
“Jasmine is skiing or Bart is playing hockey.”
Solution
•Let p be the proposition “It is snowing,” q the proposition “Jasmine is
skiing,” and r the proposition “Bart is playing hockey.”
19
Rules of Inference for Quantified Statements
Universal instantiation
20
Rules of Inference for Quantified Statements
Universal generalization
•That is, when we assert from ∀xP(x) the existence of an element c in the
domain, we have no control over c and cannot make any other
assumptions about c other than it comes from the domain. 21
Rules of Inference for Quantified Statements
Existential instantiation
22
Rules of Inference for Quantified Statements
Existential generalization
•That is, if we know one element c in the domain for which P(c) is true,
then we know that ∃xP(x) is true.
23
Rules of Inference for Quantified Statements
24
Example
Show that the premises “Everyone in this discrete mathematics class has
taken a course in computer science” and “Marla is a student in this class”
imply the conclusion “Marla has taken a course in computer science.”
Solution
Let D(x) denote “x is in this discrete mathematics class,” and let C(x) denote “x
has taken a course in computer science.”
•Then the premises are ∀x(D(x) → C(x)) and D(Marla).
•The conclusion is C(Marla).
The following steps can be used to establish the conclusion from the premises.
25
Example
Show that the premises “A student in this class has not read the book,” and “Everyone
in this class passed the first exam” imply the conclusion “Someone who passed the first
exam has not read the book.”
Solution
Let C(x) be “x is in this class,” B(x) be “x has read the book,” and P(x) be “x passed
the first exam.”
•The premises are ∃x(C(x)∧¬B(x)) and ∀x(C(x) →P(x)).
•The conclusion is ∃x(P(x)∧¬B(x)).
26
Universal modus ponens
Because universal instantiation and modus ponens are used so often
together, this combination of rules is sometimes called universal modus
ponens.
This rule tells us that if ∀x(P(x) → Q(x)) is true, and if P(a) is true for a
particular element a in the domain of the universal quantifier, then Q(a)
must also be true.
27
Universal modus tollens
28