Discrete Mathematics and its Applications

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Discrete Mathematics University of Jazeera College of Information Technology & Design Khulood Ghazal Mathematical Reasoning Methods of Proof.
Introduction to Proofs
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.
Chapter 2 Fundamentals of Logic Dept of Information management National Central University Yen-Liang Chen.
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.
CS128 – Discrete Mathematics for Computer Science
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,
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.
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)
Pattern-directed inference systems
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
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.
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,
CS2013 Mathematics for Computing Science Adam Wyner University of Aberdeen Computing Science Slides adapted from Michael P. Frank ' s course based on the.
資訊科學數學 7 : Proof, Number and Orders 陳光琦助理教授 (Kuang-Chi Chen)
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.
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) 
CT214 – Logical Foundations of Computing Darren Doherty Rm. 311 Dept. of Information Technology NUI Galway
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.
Section 1.7. Section Summary Mathematical Proofs Forms of Theorems Direct Proofs Indirect Proofs Proof of the Contrapositive Proof by Contradiction.
Sound Arguments and Derivations. Topics Sound Arguments Derivations Proofs –Inference rules –Deduction.
Deductive Reasoning. Inductive: premise offers support and evidenceInductive: premise offers support and evidence Deductive: premises offers proof that.
Chapter 1 Logic and proofs
Chapter 7. Propositional and Predicate Logic
2. The Logic of Compound Statements Summary
Knowledge Representation and Reasoning
Discrete Mathematics Logic.
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
Back to “Serious” Topics…
The Method of Deduction
Computer Security: Art and Science, 2nd Edition
Discrete Mathematics Logic.
Logical Entailment Computational Logic Lecture 3
Module #10: Proof Strategies
Chapter 7. Propositional and Predicate Logic
Foundations of Discrete Mathematics
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Mathematical Reasoning
CS201: Data Structures and Discrete Mathematics I
Presentation transcript:

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)2001-2002, Michael P. Frank

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)2001-2002, Michael P. Frank

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

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)2001-2002, Michael P. Frank

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

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)2001-2002, Michael P. Frank

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)2001-2002, Michael P. Frank

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)2001-2002, Michael P. Frank

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)2001-2002, Michael P. Frank

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

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)2001-2002, Michael P. Frank

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)2001-2002, Michael P. Frank

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)2001-2002, Michael P. Frank

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

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

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

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

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

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

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

Fallacies A fallacy is an inference rule or other proof method that 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.) October 2014 CS 2013 Maths for Computing

"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

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

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

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

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

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

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 6. Show: r ID 10 7. ¬ r Assumption 8 (p ∧ q) CI 3,5 9. r MP 1,8 10. ¬ r ∧ r ContraI 7,9 October 2014 CS 2013 Maths for Computing

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

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

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

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

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

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

Next Proofs using logical equivalences Tableau proofs Quantifier proof rules Other proof strategies contrapositive cases October 2014 CS 2013 Maths for Computing

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