CS2013 Mathematics for Computing Science Adam Wyner University of Aberdeen Computing Science Slides adapted from Michael P. Frank ' s course based on the.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Discrete Mathematics University of Jazeera College of Information Technology & Design Khulood Ghazal Mathematical Reasoning Methods of Proof.
1 Section 1.5 Rules of Inference. 2 Definitions Theorem: a statement that can be shown to be true Proof: demonstration of truth of theorem –consists of.
1 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
1 Introduction to Abstract Mathematics Valid AND Invalid Arguments 2.3 Instructor: Hayk Melikya
Deduction In addition to being able to represent facts, or real- world statements, as formulas, we want to be able to manipulate facts, e.g., derive new.
CS2013 Mathematics for Computing Science Adam Wyner University of Aberdeen Computing Science Slides adapted from Michael P. Frank ' s course based on the.
CS128 – Discrete Mathematics for Computer Science
Logic 3 Tautological Implications and Tautological Equivalences
Logic and Proof. Argument An argument is a sequence of statements. All statements but the first one are called assumptions or hypothesis. The final statement.
TR1413: Discrete Mathematics For Computer Science Lecture 3: Formal approach to propositional logic.
So far we have learned about:
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
EE1J2 – Discrete Maths Lecture 4 Analysis of arguments Logical consequence Rules of deduction Rules of equivalence Formal proof of arguments See: Anderson,
Discrete Mathematics and its Applications
Fall 2002CMSC Discrete Structures1 Let’s proceed to… Mathematical Reasoning.
Adapted from Discrete Math
CS2013 Maths for Computing Science Proof (part b) Adam Wyner University of Aberdeen Computing Science.
Discrete Mathematics, Part II CSE 2353 Fall 2007 Margaret H. Dunham Department of Computer Science and Engineering Southern Methodist University Some slides.
Deduction, Proofs, and Inference Rules. Let’s Review What we Know Take a look at your handout and see if you have any questions You should know how to.
MATH 224 – Discrete Mathematics
March 3, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1Arguments Just like a rule of inference, an argument consists of one or more.
Discrete Mathematics CS 2610 August 24, Agenda Last class Introduction to predicates and quantifiers This class Nested quantifiers Proofs.
10/17/2015 Prepared by Dr.Saad Alabbad1 CS100 : Discrete Structures Proof Techniques(1) Dr.Saad Alabbad Department of Computer Science
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Discrete Structures (DS)
Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems or solving problems, creativity and insight.
Chapter Four Proofs. 1. Argument Forms An argument form is a group of sentence forms such that all of its substitution instances are arguments.
Chapter 3: Introduction to Logic. Logic Main goal: use logic to analyze arguments (claims) to see if they are valid or invalid. This is useful for math.
1 Introduction to Abstract Mathematics Chapter 2: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 2.3.
CS6133 Software Specification and Verification
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 3 The Foundations: Logic and Proof,
資訊科學數學 7 : Proof, Number and Orders 陳光琦助理教授 (Kuang-Chi Chen)
What is Reasoning  Logical reasoning is the process of drawing conclusions from premises using rules of inference.  These inference rules are results.
Module #1 - Logic Based on Rosen, Discrete Mathematics & Its Applications. Prepared by (c) , Michael P. Frank. Modified By Mingwu Chen 1 Module.
Chapter 2 Fundamentals of Logic 1. What is a valid argument or proof?
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 11 The Foundations: Logic and Proofs Rules of inference.
Symbolic Logic ⊃ ≡ · v ~ ∴. What is a logical argument? Logic is the science of reasoning, proof, thinking, or inference. Logic allows us to analyze a.
2.3 Methods of Proof.
Today’s Topics Argument forms and rules (review)
Lecture 10 Methods of Proof CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
1 Propositional Proofs 1. Problem 2 Deduction In deduction, the conclusion is true whenever the premises are true.  Premise: p Conclusion: (p ∨ q) 
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
Discrete Math by R.S. Chang, Dept. CSIE, NDHU1 Fundamentals of Logic 1. What is a valid argument or proof? 2. Study system of logic 3. In proving theorems.
Sound Arguments and Derivations. Topics Sound Arguments Derivations Proofs –Inference rules –Deduction.
Chapter 1 Logic and proofs
L = # of lines n = # of different simple propositions L = 2 n EXAMPLE: consider the statement, (A ⋅ B) ⊃ C A, B, C are three simple statements 2 3 L =
2. The Logic of Compound Statements Summary
Discrete Mathematics Logic.
Proof Techniques.
6.1 Symbols and Translation
Discrete Mathematics and its Applications
Module #10: Proof Strategies
7.1 Rules of Implication I Natural Deduction is a method for deriving the conclusion of valid arguments expressed in the symbolism of propositional logic.
CS201: Data Structures and Discrete Mathematics I
Mathematical Reasoning
CS 270 Math Foundations of CS
Applied Discrete Mathematics Week 1: Logic
Inference Rules: Tautologies
The Method of Deduction
Computer Security: Art and Science, 2nd Edition
Discrete Mathematics Logic.
Module #10: Proof Strategies
Chapter 7. Propositional and Predicate Logic
Foundations of Discrete Mathematics
Mathematical Reasoning
CS201: Data Structures and Discrete Mathematics I
Chapter 8 Natural Deduction
Rules of inference Section 1.5 Monday, December 02, 2019
Presentation transcript:

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

Proof – Natural Deduction

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.

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.

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?

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.

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.

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.

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.

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.

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....

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.

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".

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".

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".

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.

2013Frank / van Deemter / Wyner17 Modus Ponens T-table Proof that the reasoning template is a tautology. Other reasoning templates can be demonstrated similarly.

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

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.)

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.

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.

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).

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.

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

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.

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 ¬ rAssumption 8 (p ∧ q)CI 3,5 9. rMP 1,8 10. ¬ r ∧ rContraI 7,9

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

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

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

2013Frank / van Deemter / Wyner30 Next Proofs using logical equivalencesProofs using logical equivalences Quantifier proof rulesQuantifier proof rules Other proof strategiesOther proof strategies –contrapositive –cases