1.5 Rules of Inference (Inference: decision/conclusion by evidence/reasoning) Introduction Proofs are valid arguments that establish the truth of statements. An argument is a sequence of statements that end with a conclusion. Valid means that the conclusion must follow from the truth of the preceding statements, or premises, of the argument. An argument is valid if and only if it is impossible for all the premises to be true and the conclusion to be false. Rules of inference are the basic tools for establishing the truth of statements. Valid Arguments in Propositional Logic Consider the following argument involving propositions (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. Let p be You have a current password and q be You can log onto the network. Then the argument has the form p q p q where denotes therefore. Clearly if (p q) p=t, then q=t. We say this form of argument is valid because if all premises are true, the conclusion must also be true. This argument is valid because its form is valid. If not all premises are true, then it is not possible to conclude that the conclusion is true. We changed propositions to propositional variables and an argument to an argument form. We saw that the validity of an argument follows from the validity of the form of the argument. Definition 1 An argument in propositional logic is a sequence of proposition. 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 truth of all its premises 1
implies that the conclusion is true. An argument form in propositional logic is a sequence of compound propositions involving propositional variables. An argument form is valid if no matter which particular proposition is submitted for the propositional variables in its premises, the conclusion is true if the premises are all true. Rules of Inference for Propositional Logic We can always use 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. Instead we can first establish the validity of some relatively simple argument forms, called rules of inference. These can be used as building blocks to construct more complicated valid argument forms. The tautology ((p q) p) q is the basis of the rule of inference called modus ponens, or the law of detachment. This tautology leads to the following valid argument form. p q p q 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 be true. 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. A valid argument can lead to an incorrect conclusion if one or more of its premises is false. 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> 3/2, then 2> 9/4. We know that 2> 3/2. Consequently, 2> 9/4. 2
Sol: Let p be 2> 3/2 and q be 2> 9/4. The premises of the argument are p q and p, and q is its conclusion. The argument is valid because it is constructed by using modus ponens, a valid argument form. But 2> 3/2 is false, so we cannot conclude that the conclusion is true. Furthermore, note that the conclusion of this argument is false, because 2 <9/4. 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. Sol: Let p be It is below freezing now and q be It is raining now. Then the argument is of the form p p q Thus it is addition. 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. Sol: Let p be It is below freezing now and q be It is raining now. Then the argument is of the form p q p This argument uses the simplification rule. 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 not have a barbecue tomorrow. Therefore, if it rains today, then we will not have a barbecue tomorrow. Sol: Let p be It is raining today, q be We will not have a barbecue today and r be We will not have a barbecue tomorrow. Then the argument is of the form p q 3
p r p r So this argument is a hypothetical syllogism. Using Rules of Inference to Build Arguments Remark: Conclusion of a sequence is valid/true if argument form is valid and all premises are true. When there are many premises, several rules of inference are needed to show that an argument is valid. 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 this afternoon, If we do not go swimming, then we will take a canoe trip, and If we take a canoe trip, then we will be at home by sunset lead to the conclusion We will be home by sunset. p: It is sunny this afternoon. q: It is colder than yesterday. r: We will go swimming. s: We will take a canoe trip. t: We will be at home by sunset. First we translate the statements into logical expressions and so we have the hypotheses: p q r p r s s t and conclusion t. We want to get that the conclusion t is true. Trick: tail to the head and back. t is true if s t is true and s is true modus ponens s is true if r s is true and r is true modus ponens/disjunctive syllogism 4
r is true if r p is true and p is true modus tollens p is true if p q is true simplification Now back (No mystery!): 1. ( p q) p 2. [ p (r p)] r 3. ( r s) r=(r s) r, so [(r s) r] s 4. [(s t) s] t. Example 7: Show that the hypotheses If you send me an email message, then I will finish writing the program, If you do not send me an email 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. p: You send me an email message q: I will finish writing the program r: I will go to sleep early s: I will wake up feeling refreshed. Then the hypotheses are p q, p r, r s and the conclusion is q s. The treatment is similar to Example 6. Just looking at q s and p r, r s, we see that by Hypothetical syllogism we have p s from p r and r s. Now we have p q and p s. So from p q we have q p. Combining q p with p s again by the Hypothetical syllogism we have q s. Now going forward: 1. p q Hypothesis 2. q p Contrapositive of (1) 3. p r Hypothesis 4. q r Hypothetical Syllogism of (2)&(3) 5. r s Hypothesis 6. q s Hypothetical Syllogism of (4)&(5) 5
Resolution Computer programs have been developed to automate the task of reasoning and proving theorems. Many of these rules make use of a rule of inference known as resolution. It is based on the tautology ((p q) ( p r)) (q r). Example 8: Use resolution to show that the hypotheses Jasmine is skiing or it is not snowing and It is snowing or Bart playing hockey imply Jasmine is skiing or Bart is playing hockey. p: Jasmine is skiing, q: It is snowing, r: Bart playing hockey. So we have the hypotheses: p q and q r. Applying resolution p r follows. The other way: (p q) (q r) = (q r) (p q) =( r q) (q p). Applying Hypotheses syllogism, from ( r q) (q p) follows ( r p). Evidently ( r p) = (r p). Example 9: Show that the hypotheses (p q) r and r s imply the conclusion p s. Solution: Clearly [(p q) r] (r s)= [ (p q) r] (r s). Applying Hypotheses syllogism, from [ (p q) r] (r s) follows (p q) s. But (p q) s=(p q) s. Applying the distributive law (p q) s =(p s) (q s) and simplification from (p s) (q s) follows (p s). Fallacies Several common fallacies arise in incorrect arguments. These fallacies resemble rules of inference but are based on contingencies rather than tautologies. This type of reasoning is called fallacy of affirming the conclusion. Example 10: Show if the following argument is 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. p: You did every problem in this book, q: You learned discrete mathematics. 6
So the argument can be expressed as: [(p q) q] p. But [(p q) q] p is not a tautology, it is false if p=f and q=t. Therefore the reasoning is not correct. This type incorrect reasoning is called the fallacy of denying the hypotheses. Example 11: Let p and q be as in Example 10. If (p q) p =T, is it correct to conclude that q=t? Solution: We check if [(p q) p] q is a tautology. It is not (check for p=f, q=t). So it is not correct to conclude that q=t. This type incorrect reasoning is called the fallacy of denying the hypotheses. Rules of Inference for Quantified Statements Now we will describe some rules of inference for statements involving quantifiers. Universal instantiation is the rule of inference to conclude that P(c)=T, where c D, given the premise x P(x) true. Example: All women are wise. Lisa is a woman. Therefore Lisa is wise. Universal generalization is the rule of inference that states that x P(x) is true, given the premise P(c) is true for all c D. Existential instantiation is the rule of inference that is used to conclude that there is a c D for which P(c)=T, given the premise x P(x) true. Existential generalization is the rule of inference that is used to conclude that x P(x) true when a particular c with P(c) true is given. TABLE 2 Example 12: 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. D(x): x is in this discrete mathematics class, C(x): x has taken a course in computer science. 7
Then the premises are x(d(x) C(x)) and D(Marla). The conclusion is C(Marla). 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) Example 13: 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. C(x): x is in this class B(x): x has read the book P(x): 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)). The steps can be used to get the conclusion from the premises: 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) Rules of Inference for Quantified Statements We often need to use combination of rules. Example 14: Assume that For all positive integer n, if n is greater than 4, then n^2 is less than 2^n is true. Show that 100^2<2^100. 8
P(n): n>4 Q(n): n^2<2^n. So the statement can be represented as n(p(n) Q(n)), where D=N. We assume that n(p(n) Q(n)) is true. 1. P(100) Premise 2. n(p(n) Q(n)) Premise 3. P(100) Q(100)) Universal instantiation from(2) 4. Q(100) Modus ponens from (1) and (3). 9