Discrete-Structures-2-Module-3
Discrete-Structures-2-Module-3
City of Olongapo
GORDON COLLEGE
Olongapo City Sports Complex, East Tapinac, Olongapo City
Tel. No. (047) 224-2089 loc. 314
www.gordoncollege.edu.ph
DISCRETE STRUCTURES 2
Title: RULES OF INFERENCE Module No. 3
I. INTRODUCTION
Proofs in mathematics are valid arguments that establish the truth of mathematical
statements. By an argument, we mean a sequence of statements that end with a
conclusion. By valid, we mean that the conclusion, or final statement of the argument,
must follow from the truth of the preceding statements, or premises, of the argument.
That is, an argument is valid if and only if it is impossible for all the premises to be true
and the conclusion to be false. To deduce new statements from statements we already
have, we use rules of inference which are templates for constructing valid arguments.
Rules of inference are our basic tools for establishing the truth of statements.
Before we study mathematical proofs, we will look at arguments that involve only
compound propositions. We will define what it means for an argument involving
compound propositions to be valid. Then we will introduce a collection of rules of
inference in propositional logic. These rules of inference are among the most important
ingredients in producing valid arguments. After we illustrate how rules of inference are
used to produce valid arguments, we will describe some common forms of incorrect
reasoning, called fallacies, which lead to invalid arguments.
“If you have a current password, then you can log onto the network.”
Therefore,
We would like to determine whether this is a valid argument. That is, we would like
to determine whether the conclusion “You can log onto the network” must be true
when the premises “If you have a current password, then you can log onto the
network” and “You have a current password” are both true.
Before we discuss the validity of this particular argument, we will look at its form. Use
p to represent “You have a current password” and q to represent “You can log onto
the network.” Then, the argument has the form
p→q
p
∴q
We know that when p and q are propositional variables, the statement [(p → q) ∧ p]
→ q is a tautology. In particular, when both p → q and p are true, we know that q must
also be true. We say this form of argument is valid because whenever all its premises
(all statements in the argument other than the final one, the conclusion) are true, the
conclusion must also be true.
Now suppose that both “If you have a current password, then you can log onto the
network” and “You have a current password” are true statements. When we replace p
by “You have a current password” and q by “You can log onto the network,” it
necessarily follows that the conclusion “You can log onto the network” is true. This
argument is valid because its form is valid. Note that whenever we replace p and q by
propositions where p → q and p are both true, then q must also be true.
What happens when we replace p and q in this argument form by propositions where
not both p and p → q are true? For example, suppose that p represents “You have
access to the network” and q represents “You can change your grade” and that p is
true, but p → q is false. The argument we obtain by substituting these values of p and
q into the argument form is
“If you have access to the network, then you can change your grade.”
“You have access to the network.”
∴ “You can change your grade.”
The argument we obtained is a valid argument, but because one of the premises,
namely the first premise, is false, we cannot conclude that the conclusion is true. (Most
likely, this conclusion is false.)
From the definition of a valid argument form we see that the argument form with
premises p1, p2, . . . , pn and conclusion q is valid, when (p1 ∧ p2 ∧ . . . ∧ pn) → q is a
tautology.
The key to showing that an argument in propositional logic is valid is to show that its
argument form is valid. Consequently, we would like techniques to show that
argument forms are valid. We will now develop methods for accomplishing this task.
The tautology (p ∧ (p → q)) → q is the basis of the rule of inference called modus
ponens, or the law of detachment. (Modus ponens is Latin for mode that affirms.) This
tautology leads to the following valid argument form, which we have already seen in
our initial discussion about arguments (where, as before, the symbol ∴ denotes
“therefore”):
p
p→q
∴q
Using this notation, the hypotheses are written in a column, followed by a horizontal
bar, followed by a line that begins with the therefore symbol and ends with the
conclusion. In particular, modus ponens tells us that if a conditional statement and the
hypothesis of this conditional statement are both true, then the conclusion must also
be true. Example 1 illustrates the use of modus ponens.
EXAMPLE 1
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.
EXAMPLE 2
Determine whether the argument given here is valid and determine whether its
conclusion must be true because of the validity of the argument.
3 3 3
“If √2 > 2 , then (√2)2 > (2)2 . We know that √2 > 2 . Consequently,
3 9
(√2)2 = 2 > (2)2 = 4 .”
3 3
Solution: Let p be the proposition “√2 > 2” and q the proposition “2 > (2)2”. The
premises of the argument are p → q and p, and q is its conclusion. This argument is
valid because it is constructed by using modus ponens, a valid argument form.
3
However, one of its premises, √2 > 2 , is false. Consequently, we cannot conclude that
the conclusion is true. Furthermore, note that the conclusion of this argument is false,
9
because 2 < 4 .
There are many useful rules of inference for propositional logic. Perhaps the most
widely used of these are listed in Table 1.
We now give examples of arguments that use these rules of inference. In each
argument, we first use propositional variables to express the propositions in the
argument. We then show that the resulting argument form is a rule of inference from
Table 1.
EXAMPLE 3
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
p
∴p∨q
EXAMPLE 4
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
p∧q
∴p
EXAMPLE 5
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
p→q
q→r
∴p→r
EXAMPLE 6
Show that the hypotheses “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”. Then
the hypotheses become ¬p ∧ q, r → p, ¬r → s, and s → t. The conclusion is simply t. We
need to give a valid argument with hypotheses ¬p ∧ q, r → p, ¬r → s, and s → t and
conclusion t.
We construct an argument to show that our hypotheses lead to the desired conclusion
as follows.
Step Reason
1. ¬p ∧ q Hypothesis
2. ¬p Simplification using (1)
3. r → p Hypothesis
4. ¬r Modus tollens using (2) and (3)
5. ¬r → s Hypothesis
6. s Modus ponens using (4) and (5)
7. s → t Hypothesis
8. t Modus ponens using (6) and (7)
Note that we could have used a truth table to show that whenever each of the four
hypotheses is true, the conclusion is also true. However, because we are working with
five propositional variables, p, q, r, s, and t, such a truth table would have 32 rows.
EXAMPLE 7
Show that the hypotheses “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 hypotheses are p → q,
¬p → r, and r → s. The desired conclusion is ¬q → s. We need to give a valid argument
with hypotheses p → q, ¬p → r, and r → s and conclusion ¬q → s.
This argument form shows that the hypotheses lead to the desired conclusion.
Step Reason
1. p → q Hypothesis
2. ¬q → ¬p Contrapositive of (1)
3. ¬p → r Hypothesis
4. ¬q → r Hypothetical syllogism using (2) and (3)
5. r → s Hypothesis
6. ¬q → s Hypothetical syllogism using (4) and (5)
D. 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
The final disjunction in the resolution rule, q ∨ r, is called the resolvent. When we let
q = r in this tautology, we obtain (p ∨ q) ∧ (¬p ∨ q) → q. Furthermore, when we let
r = F, we obtain (p ∨ q) ∧ (¬p) → q (because q ∨ F ≡ q), which is the tautology on
which the rule of disjunctive syllogism is based.
EXAMPLE 8
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”. We can represent the hypotheses as
¬p ∨ q and p ∨ r, respectively. Using resolution, the proposition q ∨ r, “Jasmine is
skiing or Bart is playing hockey” follows.
EXAMPLE 9
Show that the hypotheses (p ∧ q) ∨ r and r → s imply the conclusion p ∨ s.
E. FALLACIES
Several common fallacies arise in incorrect arguments. These fallacies resemble rules
of inference, but are based on contingencies rather than tautologies. These are
discussed here to show the distinction between correct and incorrect reasoning.
In other words, they treat the argument with premises p → q and q and conclusion p
as a valid argument form, which it is not. This type of incorrect reasoning is called the
fallacy of affirming the conclusion.
EXAMPLE 10
Is the following argument valid?
If you do every problem in this book, then you will learn discrete mathematics.
You learned discrete mathematics.
Solution: Let p be the proposition “You did every problem in this book.” Let q be the
proposition “You learned discrete mathematics.” Then this argument is of the form: if
p → q and q, then p. This is an example of an incorrect argument using the fallacy of
affirming the conclusion. Indeed, it is possible for you to learn discrete mathematics
in some way other than by doing every problem in this book. (You may learn discrete
mathematics by reading, listening to lectures, doing some, but not all, the problems in
this book, and so on.)
EXAMPLE 11
Let p and q be as in Example 10. If the conditional statement p → q is true, and ¬p is
true, is it correct to conclude that ¬q is true? In other words, is it correct to assume
that you did not learn discrete mathematics if you did not do every problem in the
book, assuming that if you do every problem in this book, then you will learn discrete
mathematics?
Solution: It is possible that you learned discrete mathematics even if you did not do
every problem in this book. This incorrect argument is of the form p → q and ¬p imply
¬q, which is an example of the fallacy of denying the hypothesis.
V. LEARNING TASKS
EXERCISES:
1. Find the argument form for the following argument and determine whether it is valid.
Can we conclude that the conclusion is true if the premises are true?
3. Use rules of inference to show that the hypotheses “Randy works hard”, “If Randy
works hard, then he is a dull boy”, and “If Randy is a dull boy, then he will not get the
job” imply the conclusion “Randy will not get the job”.
4. What rule of inference is used in the famous argument “All men are mortal. Socrates
is a man. Therefore, Socrates is mortal.”?
5. For each of these collections of premises, what relevant conclusion or conclusions can
be drawn? Explain the rules of inference used to obtain each conclusion from the
premises.
a. “If I take the day off, it either rains or snows.” “I took Tuesday off or I took
Thursday off.” “It was sunny on Tuesday.” “It did not snow on Thursday.”
b. “If I eat spicy foods, then I have strange dreams.” “I have strange dreams if
there is thunder while I sleep.” “I did not have strange dreams.”
c. “I am either clever or lucky.” “I am not lucky.” “If I am lucky, then I will win the
lottery.”
d. “Every computer science major has a personal computer.” “Ralph does not
have a personal computer.” “Ann has a personal computer.”
e. “What is good for corporations is good for the United States.” “What is good
for the United States is good for you.” “What is good for corporations is for you
to buy lots of stuff.”
f. “All rodents gnaw their food.” “Mice are rodents.” “Rabbits do not gnaw their
food.” “Bats are not rodents.”
RUBRIC:
3 2 1 0
VI. REFERENCE
Rosen, K. H. (2018). Discrete Mathematics and Its Applications, Eighth Edition.
McGraw-Hill.