Course: Discrete Mathematics Faculty: Dr. Venkatakrishnan Ramaswamy Module 1: Proof Methods Lesson 1: Basics of Logic Topic: Rules of Inference Reading Objective This reading acts as a supplement to the concepts you have learned in the videos so far. In this reading, you will learn about the rule of inference and look at a number of standard rules of inference. Some of these were discussed in the videos. However, this reading includes a few more that are also illustrated with examples. An understanding of these topics is essential for comprehending mathematical proof methods. 1 Premises, Conclusions, and Rules of Inference Premise: A proposition that we can assume to be true. Given that we assume the premises to be true, we can infer a conclusion. In other words, if the premises are true then the conclusion ought to be true. For example, in the argument, “If it rains today, we will have a pleasant evening today. It rained today. Therefore, we will have a pleasant evening today.” The sentences “If it rains today, we will have a pleasant evening today” and “It rained today” are the premises, and the sentence “Therefore, we will have a pleasant evening today” is the conclusion. In the sections below, a few rules of inference are listed. Each rule consists of a premise or a set of premises and the conclusion that can be inferred from them. 1. Premise 1 2. Premise 2 . ... n. Premise n ∴ Therefore, the conclusion. Notation used to represent the above rule: Premise 1 Premise 2 ... Premise n ∴ Conclusion 2 Rules of Inference Using Propositions 2.1 Modus Ponens • Latin for ”method of affirming” • Also known as the law of detachment. 1 2.2 Modus Tollens • p p→q ∴q • It states that if it is known that the hypothesis of an implication is true and the implication is true, then the conclusion of the implication must also be true. Example: Consider the conditional statement, “If it is sunny, then I will wear a hat” and its hypothesis, “It is sunny today.” If both the statements are true, then by Modus Ponens, the statement “I am wearing a hat today” must be true. 2.2 Modus Tollens • Latin for ”method of denying” • ¬q p→q ∴ ¬p • It means if it is known that the conclusion of an implication is false and the implication is true, then the hypothesis of the implication must be false. • This rule can be derived by using Modus Ponens on the contrapositive of the implication as follows: If the implication p → q is true, then its contrapositive ¬q → ¬p must be true. And, it is known that ¬q is true, then by Modus Ponens, ¬p must be true. Example: Consider the conditional statement, “If it is sunny, then I will wear a hat.” and the negation of its conclusion “I am not wearing a hat today.” If both the statements are true, then by Modus Tollens, the statement “It is not sunny today” must be true. 2.3 • Hypothetical Syllogism p→q q→r ∴p→r Example: If the statements “If John goes to school, then Harry goes to school” and “If Harry goes to school, then Daniel goes to school” are true, then, by Hypothetical Syllogism, it can be concluded that “If John goes to school, then Daniel goes to school.” 2.4 • Disjunctive Syllogism p∨q ¬p ∴q Example: Consider the statement “John is wearing a red shirt or a blue shirt” and “John is not wearing a red shirt.” If both statements are true, then, by Disjunctive Syllogism, the statement, “John is wearing a blue shirt” must be true. 2.5 • Addition p ∴p∨q Example: If the statement “John is wearing a red shirt” is true, then the statement “John is wearing a red shirt or a blue shirt” is true using the addition rule. 2 2.6 Simplification 2.6 • Simplification p∧q ∴p Example: If the statement “John likes ice cream and chocolates” is true, then the statement “John likes ice cream” is true using the simplification rule. 2.7 • Conjunction p q ∴p∧q Example: If the statements “John likes ice cream” and “John likes chocolates” are both true, then the statement “John likes ice cream and chocolates” is true using the conjunction rule. 2.8 • Resolution p∨q ¬p ∨ r ∴q∨r Example: Consider the statements “It is sunny or Tom is playing cricket” and “It is not sunny or Harry is wearing a hat.” If both statements are true, then by resolution, the statement “Tom is playing cricket or Harry is wearing a hat” is true. (Explanation: For a statement of the form p ∨ q to be true, at least one of p or q must be true. If p is true, then ¬p cannot be true, then for ¬p ∨ r to be true, r has to be true, consequently making q ∨ r to be true. If q is true, q ∨ r must be true. Thus, if p ∨ q and ¬p ∨ r are both true,q ∨ r must be true.) 3 Rules of Inference Using Predicates and Quantifiers 3.1 • Universal Instantiation ∀xP (x) ∴ P (c) where c is a member of the domain Example: We can conclude “John studies discrete mathematics” from the statement “All computer science students study Discrete Mathematics” where John is a computer science student using universal instantiation. 3.2 Universal Generalization • P (c) for an arbitrary c in domain ∴ ∀xP (x) • Note that, for applying this rule, the element c that is selected must be an arbitrary, and not a specific, element of the domain; that is, we can make no assumptions about c other than c belonging to the domain. 3.3 • Existential Instantiation ∃xP (x) ∴ P (c) for some element c in the domain • Note that while applying this rule, the element c cannot be an arbitrary element of the domain, rather it must be a c for which P (c) is true. The statement ∃xP (x) means that there is some element c in the domain such that P(c) is true. So generally, we only have the information that c exists and not what specifically c is. In such cases, we just mention that we choose such a (c) from the domain for which P(c) is true. 3 3.4 Existential Generalization 3.4 • Existential Generalization P (c) for some element c in the domain ∴ ∃xP (x) Example: If the statement “John owns a personal computer,” where John is a computer science student is true, then by existential generalization, we can conclude that the statement “There exists a computer science student who owns a personal computer” is true. 4 Solved Example Problems Problem 1 Which rule of inference is used in the following argument: If it snows, the school will be closed. If the school is closed, the classes will be canceled. Therefore, if it snows, the classes will be canceled. Solution: The rule used here is the hypothetical syllogism since premises of the form p → q and q → r are used to conclude p → r. Here, p is “It is snowing,” q is “The school is closed,” and r is “The classes are canceled.” Problem 2 Is the following argument valid by universal generalization: “Mary has a personal computer where Mary is a Computer Science student. Therefore, all Computer Science students have a personal computer.” Solution: No, the argument is not valid. In order to apply Universal Generalization the premise should be the statement holding true for an arbitrary element from the domain and not a specific element, as in the case here. Problem 3 Given the hypotheses “I play outside or I study well,” “I don’t study well or I pass the exam,” and “I don’t play outside or I pass the exam,” is the conclusion, “Therefore, I passed the exam” valid? Solution: Let p be the proposition “I study well,” q be the proposition “I play outside,” and r be the proposition “I passed the exam.” We are given the premises p ∨ q, ¬p ∨ r and ¬p ∨ r Step Reason 1. p ∨ q Premise 2. ¬p ∨ r Premise 3. ¬q ∨ r Premise 4. q ∨ r Resolution using (1) and (2) 5. r ∨ r Resolution using (3) and (4) We know that r ∨ r ≡ r. Therefore, r can be inferred from the given premises; that is, the conclusion “Therefore, I passed the exam” is valid. Problem 4 Given the hypothesis “A person with a computer science major passed the exam, “All the people with a computer science major studied Discrete Mathematics,” Is “Some person who studied Discrete Mathematics passed the exam” valid? 4 Solution: Let C(x) be the predicate “x has a computer science major,” P(x) be the predicate “x passed the exam,” and D(x) be the predicate “x studied Discrete Mathematics.” We are given the premises: ∃x[C(x)∧P (x)] and ∀x[C(x) → D(x)]. Let the specific person with a computer science major who passed the exam be ‘a’ Step Reason 1. ∃x[C(x) ∧ P (x)] Premise 2. ∀x[C(x) → D(x)] Premise 3. C(a) ∧ P (a) Using Existential instantiation on (1) 4.P (a) Using Simplification on (3) 5.C(a) Using Simplification on (3) 6. C(a) → D(a) Using Universal instantiation on (2) 7.D(a) Using Modus Ponens on (5) and (6) 8.D(a) ∧ P (a) Using Conjunction on (7) and (4) 9.∃x[D(x) ∧ P (x)] Using Existential Generalization on (8) Problem 5 Verify universal Modus Ponens which states: ∀x[P (x) → Q(x)] P(c) for a specific element c in domain ∴ Q(c) Solution: Step 1. ∀x[P (x) → Q(x)] 2. P (c) 3. P (c) → Q(c) 4.Q(c) Reason Premise Premise Using universal instantiation on (1) Using Modus Ponens on (2) and (3) Exercise: Try verifying universal Modus Tollens, which states: ∀x[P (x) → Q(x)] ¬Q(c) for a specific element c in domain ∴ ¬P (c) Reading Summary In this reading, you have learned the following: • Basic definitions of the rule of inference in logic • Various rules of inference • Worked-out examples to illustrate the applications of these rules of inference 5