Download presentation
1
Discrete Mathematics and its Applications
4/19/2017 CS2013 Maths for Computing Science Proof (part a) Adam Wyner University of Aberdeen Computing Science A word about organization: Since different courses have different lengths of lecture periods, and different instructors go at different paces, rather than dividing the material up into fixed-length lectures, we will divide it up into “modules” which correspond to major topic areas and will generally take 1-3 lectures to cover. Within modules, we have smaller “topics”. Within topics are individual slides. The instructor can bring several modules to each lecture with him, to make sure he has enough material to fill the lecture, or in case he wants to preview or review slides from upcoming or recent past lectures. (c) , Michael P. Frank
2
Discrete Mathematics and its Applications
4/19/2017 Topics What is proof and why? How with rules and examples Proof strategies – direct, contrapositive, and contradiction. Different proof systems: natural deduction, axiomatic, and tableau. October 2014 CS 2013 Maths for Computing (c) , Michael P. Frank
3
Different Forms of Reasoning
Deduction: given a set of premises ∆ and a conclusion φ, show that indeed ∆ |= φ (this includes theorem proving: ∆ = { }) Abduction/Induction: given a theory T and an observation φ, find an explanation ∆ such that T ∪ ∆ |= φ Satisfiability Checking: given a set of formulas ∆, check whether there exists a model M such that M |= φ for all φ ∈ ∆ Model Checking: given a model M and a formula φ, check whether M |= φ October 2014 CS 2013 Maths for Computing
4
Discrete Mathematics and its Applications
4/19/2017 Logical Entailment A set of premises ∆ logically entails a conclusion φ if and only if every truth assignment that satisfies (makes true) the premises ∆ also satisfies the conclusion φ. Uses truth tables. But for n propositions, there are 2n possible truth assignments. Lots! October 2014 CS 2013 Maths for Computing (c) , Michael P. Frank
5
Proofs Check Entailment
Symbolic manipulation of sentences rather than an enumeration of truth assignments. Benefits are that proofs are usually smaller than truth tables and can often be found with less work. October 2014 CS 2013 Maths for Computing
6
Discrete Mathematics and its Applications
4/19/2017 Nature of Proofs 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. October 2014 CS 2013 Maths for Computing (c) , Michael P. Frank
7
Discrete Mathematics and its Applications
4/19/2017 Importance of Proofs 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? October 2014 CS 2013 Maths for Computing (c) , Michael P. Frank
8
Discrete Mathematics and its Applications
4/19/2017 Symbolic Reasoning Start with some logical formulas that you want to use in your proof (premises and rules) 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. Skill in knowing the templates and equivalences. October 2014 CS 2013 Maths for Computing (c) , Michael P. Frank
9
Discrete Mathematics and its Applications
4/19/2017 Proofs in Programming Applies in program verification, computer security, automated reasoning systems, parsing, etc. 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). Not doing proofs of programming (yet). Oracle Policy Modelling proves determinations from input information. Of course, when one is proving things about a mathematical model of the real world, one must always recognize the risk that the postulates that are supposed to connect the premises of the model with the real world may fail to be true. October 2014 CS 2013 Maths for Computing (c) , Michael P. Frank
10
Deductive Calculi There exist various precise calculi for proving theorems in logic. For example: Natural Deduction (Fitch System) Axiomatic approaches Tableaus ("proof in trees") October 2014 CS 2013 Maths for Computing
11
Discrete Mathematics and its Applications
4/19/2017 Proof Terminology Premises statements that are often unproven and assumed. Conclusion a statement that follows from premises and an inference rule Rules of inference Patterns of reasoning from premises to conclusions. Theorem A statement that has been proven to be true. Axioms are statements that are taken as true that serve to define the very structures we are reasoning about. Postulates are assumptions stating that some characteristic of an applied mathematical model corresponds to some truth about the real world or some situation being modeled. Hypotheses are statements that are temporarily adopted as being true, for purposes of proving the consequences they would have if they were true, leading to possible falsification of the hypothesis if a predicted consequence turns out to be false. Usually a hypothesis is offered as a way of explaining a known consequence. Hypotheses are not necessarily believed or disbelieved except in the context of the scenario being explored. Premises are statements that the reasoner adopts as true so he can see what the consequences would be. Like hypotheses, they may or may not be believed. Conjectures are statements that are proposed to be logical consequences of other statements, and that may be strongly believed to be such, but that have not yet been proven. Lemmas are relatively uninteresting statements that are proved on the way to proving an actual theorem of interest. October 2014 CS 2013 Maths for Computing (c) , Michael P. Frank
12
More Proof Terminology
Discrete Mathematics and its Applications 4/19/2017 More Proof Terminology Lemma a minor theorem used as a stepping-stone to proving a major theorem. Corollary a minor theorem proved as an easy consequence of a major theorem. Conjecture a statement whose truth value has not been proven, but may be believed to be true. October 2014 CS 2013 Maths for Computing (c) , Michael P. Frank
13
Inference Rules - General Form
Discrete Mathematics and its Applications 4/19/2017 Inference Rules - General Form An 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 … conclusion “” means “therefore” Different forms, names, etc to present this.... October 2014 CS 2013 Maths for Computing (c) , Michael P. Frank
14
order of conjunction and disjunction does not matter.
Inference Rules 1 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) 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. October 2014 CS 2013 Maths for Computing
15
Inference Rules 2 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) From φ, we infer (φ ∨ ψ). From "Bill is happy", we infer "Bill is happy or Jill is happy". October 2014 CS 2013 Maths for Computing
16
Inference Rules 3 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) From φ and ( φ ψ ), we infer ψ. From "Bill is happy" and "If Bill is happy, then Jill is happy", we infer "Jill is happy". October 2014 CS 2013 Maths for Computing
17
Inference Rules 4 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) ( φ ψ ) 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". October 2014 CS 2013 Maths for Computing
18
Inference Rules - Tautologies
Each valid logical inference rule corresponds to an implication that is a tautology. From premise 1, premise 2 …, it follows conclusion Corresponding tautology: ((premise 1) (premise 2) …) conclusion Demonstrate with a T-table. October 2014 CS 2013 Maths for Computing
19
Modus Ponens T-table Proof that the reasoning template is a tautology.
Other reasoning templates can be demonstrated similarly. October 2014 CS 2013 Maths for Computing
20
Validity and truth 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 or false. You see an invalid proof. Conclusion may be true or false. You see a valid proof, whose premises are true Conclusion must be true October 2014 CS 2013 Maths for Computing
21
Fallacies A fallacy is an inference rule or other proof method that may yield a false conclusion. Fallacy of affirming the conclusion: “pq is true, and q is true, so p must be true.” (No, because FT is true.) Fallacy of denying the hypothesis: “pq is true, and p is false, so q must be false.” (No, again because FT is true.) October 2014 CS 2013 Maths for Computing
22
"Invalid" Reasoning Patterns
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. October 2014 CS 2013 Maths for Computing
23
Completeness of inference rules
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. October 2014 CS 2013 Maths for Computing
24
Formal Proofs A formal proof of a conclusion C, given premises p1, p2,…,pn 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). October 2014 CS 2013 Maths for Computing
25
Method of Proof Write down premises. Write down what is to be shown.
Use a proof strategy. Apply natural deduction rules. 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. Reapply 2-5 until have shown the result. Record result on line 2. October 2014 CS 2013 Maths for Computing
26
Super Simple Example Problem: Prove that p implies p ∨ q p Premise.
Show: p ∨ q Direct derivation, 3 p ∨ q Disjunction introduction, 1 October 2014 CS 2013 Maths for Computing
27
Pretty Simple Example Problem: Prove that p and (p ∨ q) s imply s
p Premise (p ∨ q) s Premise Show: s Direct derivation, 5 p ∨ q Disjunction introduction, 1 s Implication elimination, 2 and 3 Have to think ahead. Tricky with long chains of reasoning. October 2014 CS 2013 Maths for Computing
28
Longer Example 1. (p ∧ q) r Premise 2. Show: (p (q r)) CD 3,4
3. p Assumption 4. Show: q r CD 4,5 q Assumption Show: r ID 10 ¬ r Assumption (p ∧ q) CI 3,5 r MP 1,8 ¬ r ∧ r ContraI 7,9 October 2014 CS 2013 Maths for Computing
29
A Direct Proof 1. ((A ∨ ¬ B) ∨ C) (D (E F))
2. (A ∨ ¬ B) ((F G) H) 3. A ((E F) (F G)) 4. A 5. Show: D H 6. A ∨ ¬ B 7. (A ∨ ¬ B) ∨ C 8. (D (E F)) 9. (E F) (F G) 10. D (F G) 11. (F G) H 12. D H October 2014 CS 2013 Maths for Computing
30
A Conditional Proof 1. (A ∨ B) (C ∧ D) 2. (D ∨ E) F 3. Show: A F
5. Show: F 6. A ∨ B 7. C ∧ D 8. D 9. (D ∨ E) 10. F October 2014 CS 2013 Maths for Computing
31
An Indirect Proof 1. A (B ∧ C) 2. (B ∨ D) E 3. (D ∨ A) 3. Show: E
12. B ∧ ¬ B October 2014 CS 2013 Maths for Computing
32
Entailment and Provability
A set ∆ of premises logically entails a conclusion φ (written ∆ |= φ) if and only if every truth assignment that satisfied ∆ also satisfies φ. A conclusion φ is said to be provable from a set ∆ of premises (written ∆ |- φ) if and only if there is a finite proof (a symbolic manipulation) of φ from ∆. Equivalent for Natural Deduction (and Tableau). October 2014 CS 2013 Maths for Computing
33
Soundness and Completeness
Soundness: A proof system is sound if and only if every provable conclusion is logically entailed. (D |- P) implies (D |= P) Completeness: Our proof system is complete if and only if every logically entailed conclusion is provable. (D |= P) implies (D |- P) Natural deduction is sound and complete for the entire language of Propositional Logic. October 2014 CS 2013 Maths for Computing
34
Proof Advantage Proof and Truth Assignment get the same result.
For large problems, proof can take fewer steps and in a clearer manner. October 2014 CS 2013 Maths for Computing
35
Next Proofs using logical equivalences Tableau proofs
Quantifier proof rules Other proof strategies contrapositive cases October 2014 CS 2013 Maths for Computing
36
References and Credits
Slides adapted from Michael P. Frank's course Textbook: Rosen. Discrete Mathematics & Its Applications. McGraw-Hill. Fifth edition. October 2014 CS 2013 Maths for Computing
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.