Download presentation
Presentation is loading. Please wait.
Published byMagnus Bates Modified over 9 years ago
1
CS2013 Mathematics for Computing Science Adam Wyner University of Aberdeen Computing Science Slides adapted from Michael P. Frank ' s course based on the text Discrete Mathematics & Its Applications (5 th Edition) by Kenneth H. Rosen
2
Proof – Natural Deduction
3
2013Frank / van Deemter / Wyner3 Topics What is proof and why?What is proof and why? How with rules and examplesHow with rules and examples Proof strategies – direct, contrapositive, and contradiction.Proof strategies – direct, contrapositive, and contradiction.
4
2013Frank / van Deemter / Wyner4 Nature of Proofs In mathematics and logic, a proof is:In mathematics and logic, a proof is: –An argument (sequence of statements) that rigorously (systematically, formally) establishes the truth of a statement given premises and rules.
5
2013Frank / van Deemter / Wyner5 Importance of Proofs Given a specification of some domain (facts and rule)Given a specification of some domain (facts and rule) –What can be inferred? –Are there any contradictions? –Are there undesirable inferences? –Do we have all the consequences?
6
2013Frank / van Deemter / Wyner6 Symbolic Reasoning Start with some logical formulas that you want to use in your proof (premises and rules)Start with some logical formulas that you want to use in your proof (premises and rules) Identify what you want to prove (a conclusion)Identify what you want to prove (a conclusion) Use reasoning templates and equivalences to transform formulas from your start formulas till you get what you want to prove.Use reasoning templates and equivalences to transform formulas from your start formulas till you get what you want to prove. Skill in knowing the templates and equivalences.Skill in knowing the templates and equivalences.
7
2013Frank / van Deemter / Wyner7 Proofs in Programming Applies in program verification, computer security, automated reasoning systems, parsing, etc.Applies in program verification, computer security, automated reasoning systems, parsing, etc. Allows us to be confident about the correctness of a specification.Allows us to be confident about the correctness of a specification. Discovers flaws (e.g., a reason why the program is not correct or not accurate).Discovers flaws (e.g., a reason why the program is not correct or not accurate). Not doing proofs of programming (yet).Not doing proofs of programming (yet). Oracle Policy Modelling proves determinations from input information.Oracle Policy Modelling proves determinations from input information.
8
2013Frank / van Deemter / Wyner8 Deductive Calculi There exist various precise calculi for proving theorems in logic. For exampleThere exist various precise calculi for proving theorems in logic. For example –Natural Deduction –Axiomatic approaches –Semantic tableaus ("proof in trees") Look at Natural Deduction, which is characterised by the use of inference rules.Look at Natural Deduction, which is characterised by the use of inference rules. Look at Axiomatic proof, which is characterised by the use of axioms to substitute expressions.Look at Axiomatic proof, which is characterised by the use of axioms to substitute expressions.
9
2013Frank / van Deemter / Wyner9 Proof Terminology PremisesPremises –statements that are often unproven and assumed. ConclusionConclusion –a statement that follows from premises and an inference rule Rules of inferenceRules of inference –Patterns of reasoning from premises to conclusions. TheoremTheorem –A statement that has been proven to be true.
10
2013Frank / van Deemter / Wyner10 More Proof Terminology LemmaLemma –a minor theorem used as a stepping-stone to proving a major theorem. CorollaryCorollary –a minor theorem proved as an easy consequence of a major theorem. ConjectureConjecture –a statement whose truth value has not been proven, but may be believed to be true.
11
2013Frank / van Deemter / Wyner11 Inference Rules - General Form An Inference Rule isAn Inference Rule is –A reasoning pattern (template) such that if we know (accept, agree, believe) that a set of premises are all true, then we deduce (infer) that a certain conclusion statement must also be true. premise 1 premise 2 … premise 1 premise 2 … conclusion “ ” means “ therefore ” conclusion “ ” means “ therefore ” Different forms, names, etc to present this....
12
2013Frank / van Deemter / Wyner12 Inference Rules 1 Double negative elimination (DNE)Double negative elimination (DNE) –From ¬ ¬ φ, we infer φ –From "It is not the case that Bill is not happy", we infer "Bill is happy". Conjunction introduction (CI)Conjunction introduction (CI) –From φ and ψ, we infer ( φ ∧ ψ ). –From "Bill is happy" and "Jill is happy", we infer "Bill is happy and Jill is happy". order of conjunction and disjunction does not matter.
13
2013Frank / van Deemter / Wyner13 Inference Rules 2 Conjunction elimination (CE)Conjunction elimination (CE) –From ( φ ∧ ψ ), we infer φ and ψ –From "Bill is happy and Jill is happy", we infer "Bill is happy" (and also "Jill is happy"). Disjunction introduction (DI)Disjunction introduction (DI) –From φ, we infer (φ ∨ ψ). –From "Bill is happy", we infer "Bill is happy or Jill is happy".
14
2013Frank / van Deemter / Wyner14 Inference Rules 3 Disjunction elimination (DE)Disjunction elimination (DE) –From ¬ φ and (φ ∨ ψ), we infer ψ –From "Bill is not happy" and "Bill is happy or Jill is happy", we infer "Jill is happy". Implication elimination (Modus ponens – MP)Implication elimination (Modus ponens – MP) –From φ and ( φ ψ ), we infer ψ. –From "Bill is happy" and "If Bill is happy, then Jill is happy", we infer "Jill is happy".
15
2013Frank / van Deemter / Wyner15 Inference Rules 4 Implication elimination (Modus tollens - MT)Implication elimination (Modus tollens - MT) –From ¬ ψ and ( φ ψ ), we infer ¬ φ. –From "Bill is not happy" and "If Bill is happy, then Jill is happy", we infer "Jill is not happy". Hypothetical syllogism (HS)Hypothetical syllogism (HS) –( φ ψ ) and (ψ β ), we infer (φ β ) –From "If Bill is happy, then Jill is happy" and "If Jill is happy, then Mary is happy", we infer "If Bill is happy, then Mary is happy".
16
2013Frank / van Deemter / Wyner16 Inference Rules - Tautologies Each valid logical inference rule corresponds to an implication that is a tautology.Each valid logical inference rule corresponds to an implication that is a tautology. From premise 1, premise 2 …, it follows conclusionFrom premise 1, premise 2 …, it follows conclusion Corresponding tautology:Corresponding tautology: ((premise 1) (premise 2) …) conclusion Demonstrate with a T-table.Demonstrate with a T-table.
17
2013Frank / van Deemter / Wyner17 Modus Ponens T-table Proof that the reasoning template is a tautology. Other reasoning templates can be demonstrated similarly.
18
2013Frank / van Deemter / Wyner18 Validity and truth We say that a proof method is valid if it can never lead from true premises to a false conclusion.We say that a proof method is valid if it can never lead from true premises to a false conclusion. –You see a valid proof, one of whose premises is false. Conclusion may be true of false. –You see an invalid proof. Conclusion may be true of false. –You see a valid proof, whose premises are true Conclusion must be true
19
2013Frank / van Deemter / Wyner19 Fallacies A fallacy is an inference rule or other proof method that may yield a false conclusion.A fallacy is an inference rule or other proof method that may yield a false conclusion. Fallacy of affirming the 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: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
2013Frank / van Deemter / Wyner20 "Invalid" Reasoning Patterns Argumentation templates used in everyday reasoning:Argumentation templates used in everyday reasoning: –Bill is in a position to know whether or not Jill is happy. –Bill asserts "Jill is happy". –Therefore, Jill is happy. Problem is that being in a position to know something and asserting it is so does not make it so. Bill might be mistaken.Problem is that being in a position to know something and asserting it is so does not make it so. Bill might be mistaken.
21
2013Frank / van Deemter / Wyner21 Completeness of inference rules See handout for a complete set of rules that can prove all theorems.See handout for a complete set of rules that can prove all theorems. However, there may be different systems that are not complete. There are issues similar to the expressivity of the logical connectives and quantifiers.However, there may be different systems that are not complete. There are issues similar to the expressivity of the logical connectives and quantifiers.
22
2013Frank / van Deemter / Wyner22 Formal Proofs A formal proof of a conclusion C, given premises p 1, p 2,…,p n consists of a finite sequence of steps, each of which is either a premise or applies some inference rule to premises or previously-proven statements to yield a new statement (the conclusion).A formal proof of a conclusion C, given premises p 1, p 2,…,p n consists of a finite sequence of steps, each of which is either a premise or applies some inference rule to premises or previously-proven statements to yield a new statement (the conclusion).
23
2013Frank / van Deemter / Wyner23 Method of Proof 1.Write down premises. 2.Write down what is to be shown. 3.Use a proof strategy. 4.Apply natural deduction rules. 5.Write down the result of applying the rule to the premise(s). Make a note of what rule is applied and what premises are used. 6.Reapply 2-5 until have shown the result. 7.Record result on line 2.
24
2013Frank / van Deemter / Wyner24 Super Simple Example Problem: Prove that p implies p ∨ q 1.pPremise. 2.Show: p ∨ qDirect derivation, 3 3.p ∨ qDisjunction introduction, 1
25
2013Frank / van Deemter / Wyner25 Pretty Simple Example Problem: Prove that p and (p ∨ q) s imply s 1.pPremise 2.(p ∨ q) sPremise 3.Show: sDirect derivation, 5 4.p ∨ qDisjunction introduction, 1 5.sImplication elimination, 2 and 3 Have to think ahead. Tricky with long chains of reasoning.
26
2013Frank / van Deemter / Wyner26 Longer Example 1. (p ∧ q) r Premise 2. Show: (p (q r))CD 3,4 3. pAssumption 4. Show: q r CD 4,5 5. qAssumption 6. Show: rID 10 7. ¬ rAssumption 8 (p ∧ q)CI 3,5 9. rMP 1,8 10. ¬ r ∧ rContraI 7,9
27
2013Frank / van Deemter / Wyner27 A Direct Proof 1. ((A ∨ ¬ B) ∨ C) (D (E F)) 1. ((A ∨ ¬ B) ∨ C) (D (E F)) 2. (A ∨ ¬ B) ((F ) H) 2. (A ∨ ¬ B) ((F G) H) 3. A ((E ) (F )) 3. A ((E F) (F G)) 4. A 5. Show: D H 6. A ∨ ¬ B 7. (A ∨ ¬ B) ∨ C 8. (D (E F)) 8. (D (E F)) 9. (E ) (F ) 9. (E F) (F G) 10. D (F ) 10. D (F G) 11. (F ) H 11. (F G) H 12. D H
28
2013Frank / van Deemter / Wyner28 A Conditional Proof 1. (A ∨ B) (C ∧ D) 2. (D ∨ E) F 3. Show: A F 4. A 5. Show: F 6. A ∨ B 7. C ∧ D 8. D 9. (D ∨ E) 10. F
29
2013Frank / van Deemter / Wyner29 An Indirect Proof 1. A (B ∧ C) 2. (B ∨ D) E 3. (D ∨ A) 3. Show: E 4. ¬ E 5. ¬ (B ∨ D) 6. ¬ B ∧ ¬ D 7. ¬ D 8. A 9. B ∧ C 10. B 11. ¬ B 12. B ∧ ¬ B
30
2013Frank / van Deemter / Wyner30 Next Proofs using logical equivalencesProofs using logical equivalences Quantifier proof rulesQuantifier proof rules Other proof strategiesOther proof strategies –contrapositive –cases
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.