Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 The Foundations: Logic and Proofs Rules of inference.

Similar presentations


Presentation on theme: "Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 The Foundations: Logic and Proofs Rules of inference."— Presentation transcript:

1 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 The Foundations: Logic and Proofs Rules of inference

2 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 22 Introduction Proofs in mathematics are valid arguments that establish the truth of mathematical statement An argument in Propositional logic is a sequence of propositions. An argument form in Propositional logic is a sequence of compound propositions involving propositional variables. All but the final proposition in the argument are called premises and the final proposition is called the conclusion.

3 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 33 Introduction Example: “If you have a current password, p then you can log onto the network” q premises “You have a current password” premises Therefore, “You can log onto the network” conclusion

4 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 44 Valid argument in Propositional Logic p  q p ______  q  An argument is valid if the truth of all its premises implies that the conclusion is true.  The hypotheses are written in a rows, followed by horizontal bar, followed by the  and the conclusion.   means “therefore”

5 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 55 Valid argument in Propositional Logic If we have an argument with premises p1, p2, p3, …,pn and conclusion q This argument is valid when (p1  p2  p3  …………  pn)  q is a tautology p  q p _________  q The tautology (p  ( p  q))  q is the basis of the rule of inference called Modus Ponens (or law of detachment- mode that affirms) pq p  qp  (p  q) (p  ( p  q))  q FFTFT FTTF T TFFFT TTTTT

6 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 66 Rules of Inference for propositional logic  We can use a truth table to show that an argument form is valid. By showing that whenever the premises are true, the conclusion must also be true.  If an argument form involves 10 different propositional variables, to use truth table, 210=1024 rows are needed. This is a tedious (long and boring) approach.  Instead of using a truth table to show that an argument form is valid, we cant use Rules of inference..

7 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 77 Rules of Inference for propositional logic Modus Ponens Modus Ponens tell us that if a conditional statement and its hypothesis are both true, then the conclusion must also be true. Example: Conditional statement “If you have a current password, then you can log onto the network” Hypothesis “You have a current password” if conditional statement and hypothesis are true Then the conclusion is true “You can log onto the network”

8 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 88 Rules of Inference for propositional logic Examples: “if, then “ Determine whether the argument is valid, and determine whether its conclusion must be true because of the validity of the argument. Let p be the proposition and q be the proposition The premises of the argument are p  q, p and its conclusion is q. This argument is valid (it is constructed by using Modus ponens), a valid argument form. The premise is false, therefore we can not conclude that the conclusion is true. Conclusion is false. 2< 9/4

9 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 99 Inference Rule – general form Pattern establishing that if we know that a set of hypotheses all are true, then a certain related conclusion statement is true. Hypothesis 1 Hypothesis 2 ……. Hypothesis n  Conclusion Each logical inference rule corresponds to an implication that is a tautology. [(Hypothesis 1)  (Hypothesis 2)  …  (Hypothesis n)]  conclusion

10 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 10 Some Inference Rules

11 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 Some Inference Rules Examples:  “It is below freezing now (p). Therefore, it is either below freezing or raining now (q).”  “It is below freezing (p). It is raining now (q). Therefore, it is below freezing and it is raining now.  “if it rains today (p), then we will not have a barbecue today (q). if we do not have a barbecue today, then we will have a barbecue tomorrow (r). Therefore, it is rains today, then we will have a barbecue tomorrow.  “If it is snows today (p), then we will go skiing (q)”. “It is snowing today”. Therefore (or imply that) “We will go skiing”  “It is below freezing (p) and raining now (q). Therefore, it is below freezing now.”

12 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 12 Using Rules of Inference to Build Arguments  A formal proof of a conclusion C, given premises p 1, p 2,…,p n consists of a sequence of steps, each of which applies some inference rule to premises or to previously-proven statements (as hypotheses) to yield a new true statement (the conclusion).  A proof demonstrates that if the premises are true, then the conclusion is true (i.e., valid argument).

13 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity Example: 1.It is not sunny this afternoon and it is colder than yesterday. 2.We will go swimming only if it is sunny. 3.If we do not go swimming then we will take a canoe trip. 4.If we take a canoe trip then we will be home by sunset. 5.We will be home by sunset propositions hypotheses Using Rules of Inference to Build Arguments

14 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity Using Rules of Inference to Build Arguments

15 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 15 Resolution  Computer programs have been developed to automate the task of reasoning and proving theorem. Many of these programs make use of rule of inference as resolution ((p  q)  (  p  r))  (q  r) and it is tautology Even if we let q=r then ((p  q)  (  p  r))  q Or when r=F then (p  q)  (  p)  q because q  F Ξ q

16 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 1.Anna is skiing or it is not snowing. 2.It is snowing or Bart is playing hockey. 3.Consequently Anna is skiing or Bart is playing hockey. propositions hypotheses Consequently Anna is skiing or Bart is playing hockey Resolution rule Resolution Example

17 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 17 Fallacies Fallacy of affirming the conclusion Fallacy of affirming the conclusion Is this argument is valid? “If you do every problem in this book, then you will learn discrete mathematics (q).” “You learned discrete mathematics.” “Therefore, you did every problem in this book (p).”  This argument is of the form p  q and q then p.  This is an example of an incorrect argument using the Fallacy of affirming the conclusion.  p  q and q does not imply p.  The proposition [(p  q)  q)  p] is not a tautology (its false if p is F and q is T) check the truth table  You can learn discrete mathematics in some way other than doing every problem in this book (by reading- listening to lectures-doing some (but not all) the problems in this book)

18 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 18 Fallacies Fallacy of denying the hypothesis Is this argument is valid? “If you do every problem in this book (p), then you will learn discrete mathematics (q)”. “You did not do every problem in this book. Therefore, You did not learn discrete mathematics.” this argument is of the form p  q and  p imply  q. This is an example of an incorrect argument using the Fallacy of denying the hypothesis. p  q and  p does not imply  q. The proposition [(p  q)   p)   q] is not a tautology (its false if p is F and q is T). It is possible that you learned discrete even you did not do every problem in this book

19 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 19 Fallacies  A fallacy is an inference rule or other proof method that is not logically valid. It may yield a false conclusion!  Fallacy of affirming the conclusion: “p  q is true, and q is true, so p must be true.” (No, because F  T is true.)  Fallacy of denying the hypothesis: “p  q is true, and p is false, so q must be false.” (No, again because F  T is true.)

20 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 20 Inference Rules for Quantifiers Universal instantiation  x P(x)  P(c) (Substitute any object c) We can conclude that P(c) is true, where c is a particular member of the domain, if we know that   x P(x) is true. Example “all students have internet account”  “Ahmed has internet account” Where, Ahmed is a member of the domain of all students. Universal generalization P(c) (for an arbitrary c)   x P(x)

21 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 21 Inference Rules for Quantifiers Existential instantiation  x P(x)  P(c) (Substitute for some element c ) We can conclude that there is an element c in the domain for which P(c) is true, if we know that  x P(x) is true. Existential generalization P(c) (for some element c )   x P(x)

22 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity Example: Show that the premises “Everyone in this discrete math class has taken a course in computer science” and “Ali is a student in this class” Imply the conclusion “Ali has taken a course in computer science” D(x): “x is in discrete math class” C(x): “x has taken a course in computer science”  x (D(x)  C(x)) Premise #1 D(Ali) Premise #2  C(Ali) Step Reason 1  x (D(x)  C(x)) Premise #1 2 D(Ali)  C(Ali) Univ. instantiation 3 D(Ali) Premise #2 4 C(Ali) Modus ponens on 2,3 Inference Rules for Quantifiers

23 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 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 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 “ Inference Rules for Quantifiers

24 Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity  x(C(x)   B(x)) Premise #1  x(C(x)  P(x)) Premise #2   x(P(x)   B(x)) Step Reason 1.  x(C(x)   B(x)) premise 1 2. C(a)   B(a) Existential instantiation from (1) 3. C(a) Simplification from 2 4.  x(C(x)  P(x)) premise 2 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 Inference Rules for Quantifiers


Download ppt "Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 The Foundations: Logic and Proofs Rules of inference."

Similar presentations


Ads by Google