CS 270 Math Foundations of CS

Slides:



Advertisements
Similar presentations
Introduction to Theorem Proving
Advertisements

Chapter 1: The Foundations: Logic and Proofs 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Predicates and Quantifiers 1.4 Nested Quantifiers.
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.
Logic 3 Tautological Implications and Tautological Equivalences
CSE (c) S. Tanimoto, 2008 Propositional Logic
1 CA 208 Logic Ex3 Define logical entailment  in terms of material implication  Define logical consequence |= (here the semantic consequence relation.
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
Knoweldge Representation & Reasoning
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.
Introduction to Logic Logical Form: general rules
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
Discrete Mathematics and its Applications
Inference is a process of building a proof of a sentence, or put it differently inference is an implementation of the entailment relation between sentences.
Chap. 2 Fundamentals of Logic. Proposition Proposition (or statement): an declarative sentence that is either true or false, but not both. e.g. –Margret.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
Natural Deduction CS 270 Math Foundations of CS Jeremy Johnson.
INTRODUCTION TO LOGIC Jennifer Wang Fall 2009 Midterm Review Quiz Game.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
CS 381 DISCRETE STRUCTURES Gongjun Yan Aug 25, November 2015Introduction & Propositional Logic 1.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Chapter Four Proofs. 1. Argument Forms An argument form is a group of sentence forms such that all of its substitution instances are arguments.
1 Introduction to Abstract Mathematics Expressions (Propositional formulas or forms) Instructor: Hayk Melikya
CS6133 Software Specification and Verification
Of 38 lecture 13: propositional logic – part II. of 38 propositional logic Gentzen system PROP_G design to be simple syntax and vocabulary the same as.
Proof Tactics, Strategies and Derived Rules CS 270 Math Foundations of CS Jeremy Johnson.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 05 : Knowledge Base & First Order Logic.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
Outline Logic Propositional Logic Well formed formula Truth table
Today’s Topics Argument forms and rules (review)
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
CT214 – Logical Foundations of Computing Darren Doherty Rm. 311 Dept. of Information Technology NUI Galway
Sound Arguments and Derivations. Topics Sound Arguments Derivations Proofs –Inference rules –Deduction.
Formal Methods (Spring 2015) Lecture 2 Abid Rauf 1.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
March 23 rd. Four Additional Rules of Inference  Constructive Dilemma (CD): (p  q) (r  s) p v r q v s.
Chapter 7. Propositional and Predicate Logic
Logic and Reasoning.
2. The Logic of Compound Statements Summary
Propositional Logic.
Knowledge Representation and Reasoning
Discrete Mathematics Logic.
Formal Logic CSC 333.
COMP 1380 Discrete Structures I Thompson Rivers University
Propositional Calculus: Boolean Algebra and Simplification
Elementary Metamathematics
Information Technology Department
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
Deductive Reasoning: Propositional Logic
Natural deduction Gerhard Gentzen.
CS 220: Discrete Structures and their Applications
Applied Discrete Mathematics Week 1: Logic
Propositional 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
Chapter 7. Propositional and Predicate Logic
CSNB234 ARTIFICIAL INTELLIGENCE
Foundations of Discrete Mathematics
COMP 1380 Discrete Structures I Thompson Rivers University
Proof Tactics, Strategies and Derived Rules
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
ece 720 intelligent web: ontology and beyond
Logical and Rule-Based Reasoning Part I
CS201: Data Structures and Discrete Mathematics I
Chapter 8 Natural Deduction
Presentation transcript:

CS 270 Math Foundations of CS Natural Deduction CS 270 Math Foundations of CS Jeremy Johnson

Outline An example What’s a proof Rules of natural deduction Validity by truth table Validity by proof What’s a proof Proof checker Rules of natural deduction Provable equivalence Soundness and Completeness

An Example If the train arrives late and there are no taxis at the station, then John is late for his meeting. John is not late for his meeting. The train did arrive late. Therefore, there were taxis at the station. If it is raining and Jane does not have here umbrella with her, then she will get wet. Jane is not wet. It is raining. Therefore, Jane has her umbrella with her.

An Example If the train arrives late and there are no taxis at the station, then John is late for his meeting. John is not late for his meeting. The train did arrive late. Therefore, there were taxis at the station. p = the train arrives late q = there are taxis at the station r = John is late for his meeting. 𝑝∧¬𝑞 →𝑟, ¬𝑟,𝑝⊢𝑞 [a sequent]

An Example p = it is raining q = Jane has her umbrella r = Jane gets wet. 𝑝∧¬𝑞 →𝑟, ¬𝑟,𝑝⊢𝑞 If it is raining and Jane does not have here umbrella with her, then she will get wet. Jane is not wet. It is raining. Therefore, Jane has her umbrella with her.

Validity by Truth Table 𝑝∧¬𝑞 →𝑟, ¬𝑟,𝑝⊢𝑞 p q r q r pq (pq)r F T

Proof By applying rules of inference to a set of formulas, called premises, we derive additional formulas and may infer a conclusion from the premises A sequent is 1,…,n ⊢  Premises 1,…,n Conclusion  The sequent is valid if a proof for it can be found

Proof A proof is a sequence of formulas that are either premises or follow from the application of a rule to previous formulas Each formula must be labeled by it’s justification, i.e. the rule that was applied along with pointers to the formulas that the rule was applied to It is relatively straightforward to check to see if a proof is valid

Validity by Deduction 𝑝∧¬𝑞 →𝑟, ¬𝑟,𝑝⊢𝑞 1 𝑝∧¬𝑞 →𝑟 premise 2 ¬𝑟 3 𝑝 4 ¬𝑞 assumption 5 𝑝∧¬𝑞 ∧i 3,4 6 r →e 1,5 7 ⊥ ⊥i 6,2 8 q ¬e 4-7

Rules of Natural Deduction Natural deduction uses a set of rules formally introduced by Gentzen in 1934 The rules follow a “natural” way of reasoning about Introduction rules Introduce logical operators from premises Elimination rules Eliminate logical operators from premise producing a conclusion without the operator

Conjunction Rules Introduction Rule Elimination Rule    i       i        e1      e2 

Implication Rules Introduction Rule Assume  and show  Elimination Rule (Modus Ponens)  …   i         e 

Disjunction Rules Introduction Rule Elimination Rule (proof by case analysis)   i1      i2     …   …     e 

Negation Rules Introduce the symbol (⊥ =bottom) to encode a contradiction Bottom elimination ⊥ can prove anything Bottom introduction ⊥ ⊥ e.    ⊥ i ⊥

Negation Rules Introduction and elimination rules (proof by contradiction) Double negation  … ⊥  i   … ⊥  e      e 

Derived Rules Modus Tollens Disjunctive Syllogism DeMorgan’s Law (P  Q)  P  Q (P  Q)  P  Q     MT      DS 

Alternative Proof 𝑝∧¬𝑞 →𝑟, ¬𝑟,𝑝⊢𝑞 1 𝑝∧¬𝑞 →𝑟 premise 2 ¬𝑟 3 𝑝 4 ¬ 𝑝∧¬𝑞 MT 1,2 5 ¬𝑝  ¬¬𝑞 DM 4 6 ¬¬𝑞 DS 5,3 7 q ¬¬e 6

LogicLab The LogicLab tool from the Logic and Proofs course from the CMU online learning initiative allows you to experiment with natural deduction proofs

LogicLab

Provable Equivalence  and  are provably equivalent,  ⊣⊢ , iff the sequents  ⊢  and  ⊢  are both valid Alternatively  ⊣⊢  iff the sequent ⊢        is valid A valid sequent with no premises is a tautology

Distributive Law P  (Q  R) ⊢ (P  Q)  (P  R) 1 P  (Q  R) premise 2 P e1 1 3 Q  R e2 1 4 Q Assumption 5 P  Q i 2,4 6 (P  Q)  (P  R) i1 5 7 R 8 P  R i 2,7 9 i2 8 10 e 3,4-6,7-9

Distributive Law (P  Q)  (P  R) ⊢ P  (Q  R) 1 (P  Q)  (P  R) premise 2 P  Q Assumption 3 P e1 2 4 Q e2 2 5 Q  R i1 4 6 P  (Q  R) i 3,5 7 P  R 8 e1 7 9 R e2 7 10 i2 9 11 i 8,10 12 e 1,2-6,7-11

Semantic Entailment If for all valuations (assignments of variables to truth values) for which all 1,…,n evaluate to true,  also evaluates to true then the semantic entailment relation 1,…,n ⊨  holds

Soundness and Completeness 1,…,n ⊨  holds iff 1,…,n ⊢  is valid In particular, ⊨ , a tautology, ⊢  is valid. I.E.  is a tautology iff  is provable Soundness – you can not prove things that are not true in the truth table sense Completeness – you can prove anything that is true in the truth table sense