27.9 KB · commit a9602da
Later in this chapter we will study proofs. 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.
After studying rules of inference in propositional logic, we will introduce rules of inference for quantified statements. We will describe how these rules of inference can be used to produce valid arguments. These rules of inference for statements involving existential and universal quantifiers play an important role in proofs in computer science and mathematics, although they are often used without being explicitly mentioned.
Finally, we will show how rules of inference for propositions and for quantified statements can be combined. These combinations of rule of inference are often used together in complicated arguments.
Consider the following argument involving propositions (which, by definition, is a sequence of propositions): “If you have a current password, then you can log onto the network.” “You have a current password.” Therefore, “You can log onto the network.”
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→qpqwhere ∴ is the symbol that denotes “therefore.”
We know that when p and q are propositional variables, the statement ((p→q)∧p)→q is a tautology (see Exercise 10(c) in Section 1.3). 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.)
In our discussion, to analyze an argument, we replaced propositions by propositional variables. This changed an argument to an argument form. We saw that the validity of an argument follows from the validity of the form of the argument. We summarize the terminology used to discuss the validity of arguments with our definition of the key notions.
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.
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. These rules of inference can be used as building blocks to construct more complicated valid argument forms. We will now introduce the most important rules of inference in propositional logic.
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”):
∴pp→qqUsing 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.
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. ◀
As we mentioned earlier, a valid argument can lead to an incorrect conclusion if one or more of its premises is false. We illustrate this again in 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. “If 2>23, then (2)2>(23)2. We know that 2>23. Consequently, 2=(2)2>(23)2=49.”
Solution: Let p be the proposition “2>23” and q the proposition “2>(23)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. However, one of its premises, 2>23, is false. Consequently, we cannot conclude that the conclusion is true. Furthermore, note that the conclusion of this argument is false, because 2<49. ◀
There are many useful rules of inference for propositional logic. Perhaps the most widely used of these are listed in Table 1. Exercises 9, 10, 15, and 30 in Section 1.3 ask for the verifications that these rules of inference are valid argument forms. 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.
| Rule of Inference | Tautology | Name |
|---|---|---|
| p p→q ∴q | (p∧(p→q))→q | Modus ponens |
| ¬q p→q ∴¬p | (¬q∧(p→q))→¬p | Modus tollens |
| p→q q→r ∴p→r | ((p→q)∧(q→r))→(p→r) | Hypothetical syllogism |
| p∨q ¬p ∴q | ((p∨q)∧¬p)→q | Disjunctive syllogism |
| p ∴p∨q | p→(p∨q) | Addition |
| p∧q ∴p | (p∧q)→p | Simplification |
| p q ∴p∧q | ((p)∧(q))→(p∧q) | Conjunction |
| p∨q ¬p∨r ∴q∨r | ((p∨q)∧(¬p∨r))→(q∨r) | Resolution |
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
∴pp∨qThis is an argument that uses the addition rule. ◀
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∧qpThis argument uses the simplification rule. ◀
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→qq→rp→rHence, this argument is a hypothetical syllogism. ◀
When there are many premises, several rules of inference are often needed to show that an argument is valid. This is illustrated by Examples 6 and 7, where the steps of arguments are displayed on separate lines, with the reason for each step explicitly stated. These examples also show how arguments in English can be analyzed using rules of inference.
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.” Then the premises become ¬p∧q, r→p, ¬r→s, and s→t. The conclusion is simply t. We need to give a valid argument with premises ¬p∧q, r→p, ¬r→s, and s→t and conclusion t.
We construct an argument to show that our premises lead to the desired conclusion as follows:
| Step | Reason |
|---|---|
| 1. ¬p∧q | Premise |
| 2. ¬p | Simplification using (1) |
| 3. r→p | Premise |
| 4. ¬r | Modus tollens using (2) and (3) |
| 5. ¬r→s | Premise |
| 6. s | Modus ponens using (4) and (5) |
| 7. s→t | Premise |
| 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. ◀
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.
This argument form shows that the premises lead to the desired conclusion:
| Step | Reason |
|---|---|
| 1. p→q | Premise |
| 2. ¬q→¬p | Contrapositive of (1) |
| 3. ¬p→r | Premise |
| 4. ¬q→r | Hypothetical syllogism using (2) and (3) |
| 5. r→s | Premise |
| 6. ¬q→s | Hypothetical syllogism using (4) and (5) |
| ◀ |
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 ((p∨q)∧(¬p∨r))→(q∨r). (Exercise 30 in Section 1.3 asks for the verification that this is a 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.
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. ◀
Resolution plays an important role in programming languages based on the rules of logic, such as Prolog (where resolution rules for quantified statements are applied). Furthermore, it can be used to build automatic theorem proving systems. To construct proofs in propositional logic using resolution as the only rule of inference, the hypotheses and the conclusion must be expressed as clauses, where a clause is a disjunction of variables or negations of these variables. We can replace a statement in propositional logic that is not a clause by one or more equivalent statements that are clauses. For example, suppose we have a statement of the form p∨(q∧r). Because p∨(q∧r)≡(p∨q)∧(p∨r), we can replace the single statement p∨(q∧r) by two statements p∨q and p∨r, each of which is a clause. We can replace a statement of the form ¬(p∨q) by the two statements ¬p and ¬q because De Morgan’s law tells us that ¬(p∨q)≡¬p∧¬q. We can also replace a conditional statement p→q with the equivalent disjunction ¬p∨q.
Show that the premises (p∧q)∨r and r→s imply the conclusion p∨s.
Solution: We can rewrite the premises (p∧q)∨r as two clauses, p∨r and q∨r. We can also replace r→s by the equivalent clause ¬r∨s. Using the two clauses p∨r and ¬r∨s, we can use resolution to conclude p∨s. ◀
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.
The proposition ((p→q)∧q)→p is not a tautology, because it is false when p is false and q is true. However, there are many incorrect arguments that treat this as a tautology. 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.
Is the following argument valid? “If you do every problem in this book, then you will learn discrete mathematics. You learned discrete mathematics. Therefore, you did every problem in this book.”
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.) ◀
The proposition ((p→q)∧¬p)→¬q is not a tautology, because it is false when p is false and q is true. Many incorrect arguments use this incorrectly as a rule of inference. This type of incorrect reasoning is called the fallacy of denying the hypothesis.
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. ◀
We have discussed rules of inference for propositions. We will now describe some important rules of inference for statements involving quantifiers. These rules of inference are used extensively in mathematical arguments, often without being explicitly mentioned.
Universal instantiation is the rule of inference used to conclude that P(c) is true, where c is a particular member of the domain, given the premise ∀xP(x). Universal instantiation is used when we conclude from the statement “All women are wise” that “Lisa is wise,” where Lisa is a member of the domain of all women.
Universal generalization is the rule of inference that states that ∀xP(x) is true, given the premise that P(c) is true for all elements c in the domain. Universal generalization is used when we show that ∀xP(x) is true by taking an arbitrary element c from the domain and showing that P(c) is true. The element c that we select must be an arbitrary, and not a specific, element of the domain. 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. Universal generalization is used implicitly in many proofs in mathematics and is seldom mentioned explicitly. However, the error of adding unwarranted assumptions about the arbitrary element c when universal generalization is used is all too common in incorrect reasoning.
Existential instantiation is the rule that allows us to conclude that there is an element c in the domain for which P(c) is true if we know that ∃xP(x) is true. We cannot select an arbitrary value of c here, but rather it must be a c for which P(c) is true. Usually we have no knowledge of what c is, only that it exists. Because it exists, we may give it a name (c) and continue our argument.
Existential generalization is the rule of inference that is used to conclude that ∃xP(x) is true when a particular element c with P(c) true is known. 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.
We summarize these rules of inference in Table 2. We will illustrate how some of these rules of inference for quantified statements are used in Examples 12 and 13.
| Rule of Inference | Name |
|---|---|
| ∀xP(x) ∴P(c) | Universal instantiation |
| P(c) for an arbitrary c ∴∀xP(x) | Universal generalization |
| ∃xP(x) ∴P(c) for some element c | Existential instantiation |
| P(c) for some element c ∴∃xP(x) | Existential generalization |
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:
| Step | Reason |
|---|---|
| 1. ∀x(D(x)→C(x)) | Premise |
| 2. D(Marla)→C(Marla) | Universal instantiation from (1) |
| 3. D(Marla) | Premise |
| 4. C(Marla) | Modus ponens from (2) and (3) |
| ◀ |
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)). These steps can be used to establish the conclusion from the premises:
| Step | Reason |
|---|---|
| 1. ∃x(C(x)∧¬B(x)) | Premise |
| 2. C(a)∧¬B(a) | Existential instantiation from (1) |
| 3. C(a) | Simplification from (2) |
| 4. ∀x(C(x)→P(x)) | Premise |
| 5. C(a)→P(a) | Universal instantiation from (4) |
| 6. P(a) | Modus ponens from (3) and (5) |
| 7. ¬B(a) | Simplification from (2) |
| 8. P(a)∧¬B(a) | Conjunction from (6) and (7) |
| 9. ∃x(P(x)∧¬B(x)) | Existential generalization from (8) |
| ◀ |
We have developed rules of inference both for propositions and for quantified statements. Note that in our arguments in Examples 12 and 13 we used both universal instantiation, a rule of inference for quantified statements, and modus ponens, a rule of inference for propositional logic. We will often need to use this combination of rules of inference. 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. To see this, note that by universal instantiation, P(a)→Q(a) is true. Then, by modus ponens, Q(a) must also be true. We can describe universal modus ponens as follows:
∴∀x(P(x)→Q(x))P(a), where a is a particular element in the domainQ(a)Universal modus ponens is commonly used in mathematical arguments. This is illustrated in Example 14.
Assume that “For all positive integers n, if n is greater than 4, then n2 is less than 2n” is true. Use universal modus ponens to show that 1002<2100.
Solution: Let P(n) denote “n>4” and Q(n) denote “n2<2n.” The statement “For all positive integers n, if n is greater than 4, then n2 is less than 2n” can be represented by ∀n(P(n)→Q(n)), where the domain consists of all positive integers. We are assuming that ∀n(P(n)→Q(n)) is true. Note that P(100) is true because 100>4. It follows by universal modus ponens that Q(100) is true, namely that 1002<2100. ◀
Another useful combination of a rule of inference from propositional logic and a rule of inference for quantified statements is universal modus tollens. Universal modus tollens combines universal instantiation and modus tollens and can be expressed in the following way:
∴∀x(P(x)→Q(x))¬Q(a), where a is a particular element in the domain¬P(a)The verification of universal modus tollens is left as Exercise 25. Exercises 26–29 develop additional combinations of rules of inference in propositional logic and quantified statements.