1 Section 7.3 Formal Proofs in Predicate Calculus All proof rules for propositional calculus extend to predicate calculus. Example. … k.  x p(x) P k+1.

Slides:



Advertisements
Similar presentations
1 Section 6.3 Formal Reasoning A formal proof (or derivation) is a sequence of wffs, where each wff is either a premise or the result of applying a proof.
Advertisements

CPSC 121: Models of Computation Unit 6 Rewriting Predicate Logic Statements Based on slides by Patrice Belleville and Steve Wolfman.
Methods of Proof for Quantifiers Chapter 12 Language, Proof and Logic.
Discrete Maths 4. Proofs Objectives
Proofs in Predicate Logic A rule of inference applies only if the main operator of the line is the right main operator. So if the line is a simple statement,
Discussion #17 1/15 Discussion #17 Derivations. Discussion #17 2/15 Topics Derivations  proofs in predicate calculus Inference Rules with Quantifiers.
Inference and Resolution for Problem Solving
Predicate Calculus Subject / Predicate John / went to the store. The sky / is blue. Propositional Logic - uses statements Predicate Calculus - uses predicates.
CSE 311 Foundations of Computing I Lecture 6 Predicate Logic Autumn 2011 CSE 3111.
First Order Logic (chapter 2 of the book) Lecture 3: Sep 14.
Formal Logic Mathematical Structures for Computer Science Chapter 1 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFormal Logic.
CSE115/ENGR160 Discrete Mathematics 01/20/11 Ming-Hsuan Yang UC Merced 1.
Introduction to Logic for Artificial Intelligence Lecture 2 Erik Sandewall 2010.
First Order Logic. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about first order.
Methods of Proof & Proof Strategies
Chapter 1: The Foundations: Logic and Proofs
Formal Logic Mathematical Structures for Computer Science Chapter Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFormal Logic.
Proofs in Predicate Logic A rule of inference applies only if the main operator of the line is the right main operator. So if the line is a simple statement,
1st-order Predicate Logic (FOL)
Chap. 2 Fundamentals of Logic. Proposition Proposition (or statement): an declarative sentence that is either true or false, but not both. e.g. –Margret.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
1 Section 7.2 Equivalent Formulas Two wffs A and B are equivalent, written A  B, if they have the same truth value for every interpretation. Property:
2.3Logical Implication: Rules of Inference From the notion of a valid argument, we begin a formal study of what we shall mean by an argument and when such.
First Order Logic Lecture 2: Sep 9. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions.
1 Section 13.2 The Church-Turing Thesis The Church-Turing Thesis: Anything that is intuitively computable can be be computed by a Turing machine. It is.
Scope, free variable, closed wff §In  X(A) or  X(A), where A is a wff : X is called the variable quantified over; A is said to be (within) the scope.
1 Introduction to Abstract Mathematics Chapter 2: The Logic of Quantified Statements. Predicate Calculus Instructor: Hayk Melikya 2.3.
1 Introduction to Abstract Mathematics Proofs in Predicate Logic , , ~, ,  Instructor: Hayk Melikya Purpose of Section: The theorems.
1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 02: QUANTIFIERS Sections 1.3 and 1.4 Jarek Rossignac CS1050:
Natural Deduction for Predicate Logic Bound Variable: A variable within the scope of a quantifier. – (x) Px – (  y) (Zy · Uy) – (z) (Mz  ~Nz) Free Variable:
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 1 The Foundations: Logic and Proofs Predicates and Quantifiers.
1 Section 9.1 Automatic Reasoning Recall that a wff W is valid iff ¬ W is unsatisfiable. Resolution is an inference rule used to prove unsatisfiability.
Proofs in Predicate Calculus
1 Section 8.3 Higher-Order Logic A logic is higher-order if it allows predicate names or function names to be quantified or to be arguments of a predicate.
1 Outline Quantifiers and predicates Translation of English sentences Predicate formulas with single variable Predicate formulas involving multiple variables.
1 Section 8.2 Program Correctness (for imperative programs) A theory of program correctness needs wffs, axioms, and inference rules. Wffs (called Hoare.
1 Section 9.2 Logic Programming A logic program is a set of clauses with the restriction that there is exactly one positive literal in each clause. Such.
Section 1.5 and 1.6 Predicates and Quantifiers. Vocabulary Predicate Domain Universal Quantifier Existential Quantifier Counterexample Free variable Bound.
Chapter Nine Predicate Logic Proofs. 1. Proving Validity The eighteen valid argument forms plus CP and IP that are the proof machinery of sentential logic.
1 Chapter 2.1 Chapter 2.2 Chapter 2.3 Chapter 2.4 All images are copyrighted to their respective copyright holders and reproduced here for academic purposes.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
Chapter Ten Relational Predicate Logic. 1. Relational Predicates We now broaden our coverage of predicate logic to include relational predicates. This.
Metalogic Soundness and Completeness. Two Notions of Logical Consequence Validity: If the premises are true, then the conclusion must be true. Provability:
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
Uniqueness Quantifier ROI for Quantified Statement.
Formal Proofs and Quantifiers
Methods of proof Section 1.6 & 1.7 Wednesday, June 20, 2018
Rationale Behind the Precise Formulation of the Four Quantifier Rules
Predicate logic CSC 333.
CS201: Data Structures and Discrete Mathematics I
CS 1502 Formal Methods in Computer Science
Introduction to Predicates and Quantified Statements II
Mathematical Structures for Computer Science Chapter 1
1st-order Predicate Logic (FOL)
Introduction to Predicates and Quantified Statements I
MA/CSSE 474 More Math Review Theory of Computation
Relational Proofs Computational Logic Lecture 7
Section 8.1 Equality A first-order theory is first-order predicate calculus applied to the formalization of some subject (i.e., decide on some axioms.
Proofs in Predicate Logic
Predicates and Quantifiers
CPSC 121: Models of Computation
CS201: Data Structures and Discrete Mathematics I
Relational Proofs Computational Logic Lecture 7
Relational Proofs Computational Logic Lecture 7
The Foundations: Logic and Proofs
1st-order Predicate Logic (FOL)
Presentation transcript:

1 Section 7.3 Formal Proofs in Predicate Calculus All proof rules for propositional calculus extend to predicate calculus. Example. … k.  x p(x) P k+1.  x p(x)   x p(x)P k+2.  x p(x) 1, 2, MP … But we need additional proof rules to reason with most quantified wffs. For example, suppose we want to prove that the following wff is valid.  x  y p(x, y)   y  x p(x, y). We might start with Proof: 1.  x  y p(x, y) P But what do we do for the next line of the proof? We’re stuck if we want to use proof rules. We need more proof rules. Free to Replace For a wff W(x) and a term t we say t is free to replace x in W(x) if W(t) has the same bound occurrences of variables as W(x). Example. Let W(x) =  y p(x, y). Then W(y) =  y p(y, y), so y is not free to replace x in W(x). W(ƒ(x)) =  y p(ƒ(x), y), so ƒ(x) is free to replace x in W(x). W(c) =  y p(c, y), so c is free to replace x in W(x). W(x) =  y p(x, y), so x is free to replace x in W(x).

2 Universal Instantiation (UI) if t is free to replace x in W(x). Existential Generalization (EG) Existential Instantiation (EI) Universal Generalization (UG) If  x W(x) occurs on some line of a proof, then W(c) may be placed on any subsequent line of the proof subject to the following restrictions: Choose c to be a new constant in the proof and such that c does not occur in the statement to be proven. If W(x) occurs on some line of a proof, then  x W(x) may be placed on any subsequent line of the proof subject to the following restrictions: Among the wffs used to obtain W(x), x is not free in any premise and x is not free in any wff obtained by EI. if t is free to replace x in W(x). Special cases that satisfy the restriction:

3 Restrictions on quantifier inference rules are necessary Example.  x  y p(x, y)   y  x p(x, y) is invalid. Here is an attempted proof. 1.  x  y p(x, y) P 2.  y p(x, y)1, UI 3.p(x, c)2, EI 4.  x p(x, c)3, UG (NO, x on line 3 is free in wff obtained by EI) 5.  y  x p(x, y)4, EG NOT QED1–5, CP Example.  x p(x)   x p(x) is invalid. Here is an attempted proof. 1.  x p(x) P 2.p(x) 1, EI (NO, x is not a new constant in the proof) 3.  x p(x) 2, UG (NO, x on line 2 is free in wff obtained by EI) NOT QED1–3, CP Example.  x p(x)   x q(x)   x (p(x)  q(x)) is invalid. Here is an attempted proof. 1.  x p(x) P 2.  x q(x) P 3.p(c)1, EI 4.q(c)2, EI (NO, c is not a new constant in the proof) 5.p(c)  q(c)3, 4, Conj 6.  x (p(x)  q(x))5, EG NOT QED1–6, CP

4 Example. p(x)   x p(x) is invalid. Here is an attempted proof. 1.p(x)P 2.  x p(x)1, UG (NO, x is free in a premise) NOT QED1, 2, CP Example.  x  y p(x, y)   y p(y, y) is invalid. Here is an attempted proof. 1.  x  y p(x, y) P 2.  y p(y, y) 1, UI (NO, y is not free to replace x in  y p(x, y)) NOT QED1, 2, CP Example.  x p(x, ƒ(x))   x p(x, x) is invalid. Here is an attempted proof. 1.  x p(x, ƒ(x)) P 2. p(x, ƒ(x)) 1, UI 3.  x p(x, x)2, EG (NO, p(x, ƒ(x)) ≠ p(x, x)(x/t) for any term t) NOT QED1–3, CP Example.  x p(x, ƒ(x))   y  x p(x, y) is invalid. Here is an attempted proof. 1.  x p(x, ƒ(x)) P 2.  y  x p(x, y) 1, EG (NO, ƒ(x) is not free to replace y in  x p(x, y)) NOT QED1, 2, CP Example.  x p(x)  p(c) is invalid. Here is an attempted proof. 1.  x p(x) P 2. p(c) 1, EI (NO, c occurs in statement to be proved) NOT QED1, 2, CP

5 Now Some Valid Wffs Example.  x  y p(x, y)   y p(y, y) is valid. Here is an attempted proof. 1.  x  y p(x, y)P 2.  y p(y, y)1, UI (NO, y is not free to replace x in  y p(x, y)) NOT QED1, 2, CP But here is a correct proof. 1.  x  y p(x, y)P 2.  y p(x, y) 1, UI 3.p(x, x)2, UI 4.  x p(x, x) 3, UG 5.p(y, y) 4, UI 6.  y p(y, y) 5, UG QED1–6, CP. Quiz. Find a proof of the statement that uses IP. Example/Quiz.  x (A(x)  B(x))  (  x A(x)   x B(x)) is valid. Find a proof. 1.  x (A(x)  B(x)) P 2.  x A(x) P [for  x A(x)   x B(x)] 3. A(x) 2, UI 4. A(x)  B(x)1, UI 5. B(x)3, 4, MP 6.  x B(x) 5, UG 7.  x A(x)   x B(x) 2–6, CP QED1, 7, CP.

6 Example/Quiz. Prove that the following wff is valid using IP.  x ¬ p(x, x)   x  y  z (p(x, y)  p(y, z)  p(x, z))   x  y ¬ (p(x, y)  p(y, x)). 1.  x ¬ p(x, x) P 2.  x  y  z (p(x, y)  p(y, z)  p(x, z)) P 3.  x  y (p(x, y)  p(y, x)) P [for  x  y ¬ (p(x, y)  p(y, x)], T 4.p(a, b)  p(b, a) 3, EI, EI 5.p(a, b)  p(b, a)  p(a, a)2, UI, UI, UI 6.p(a, a) 4, 5, MP 7.¬ p(a, a) 1, UI 8.False6, 7, Contr 9.  x  y ¬ (p(x, y)  p(y, x) 3–8, IP QED1, 2, 9, CP. Example/Quiz. Use IP to prove that the  x  y (p(x)  p(y)) is valid. 1.  x  y (p(x)  ¬ p(y)) P [for IP] 2.  y (p(c)  ¬ p(y)) 1, EI 3.p(c)  ¬ p(c) 2, UI 4. p(c)3, Simp 5.¬ p(c) 4, Simp 6. False4, 5, Contr QED1–6, IP. Quiz. Find a CP proof of the statement. 1.  x ¬ p(x, x) P 2.  x  y  z (p(x, y)  p(y, z)  p(x, z)) P 3.¬ p(x, x)1, UI 4.p(x, y)  p(y, x)  p(x, x) 2, UI, UI, UI 5.¬ (p(x, y)  p(y, x)) 3, 4, MT 6.  x  y ¬ (p(x, y)  p(y, x))5, UG, UG QED1– 6, CP.

7 Group Quiz. Divide the class into six subgroups and assign each group one of the following six wffs to prove using CP (no IP and no T’s). Assume that x does not occur free in C. 1.  x (A(x)  C)  (  x A(x)  C). 2.(  x A(x)  C)   x (A(x)  C). 3.(C   x A(x))   x (C  A(x)). 4.(C   x A(x))   x (C  A(x)). 5.  x (C  A(x))  (C   x A(x)). 6.  x (A(x)  C)  (  x A(x)  C). Solutions. 1.  x (A(x)  C)  (  x A(x)  C). 1.  x (A(x)  C)P 2.  x A(x) P[for  x A(x)  C ] 3.A(d)2, EI 4.A(d)  C1, UI 5.C3, 4, MP 6.  x A(x)  C2–5, CP QED1, 6, CP. 2. (  x A(x)  C)   x (A(x)  C). 1.  x A(x)  C P 2.A(x) P [for A(x)  C] 3.  x A(x) 2, EG 4.C1, 3, MP 5.A(x)  C 2–4, CP 6.  x (A(x)  C)5, UG QED1, 5–6, CP.

8 3. (C   x A(x))   x (C  A(x)). 1.C   x A(x)P 2.C P [for C  A(x)] 3.  x A(x) 1, 2, MP 4.A(x)3, UI 5.C  A(x) 2–4, CP 6.  x (C  A(x)) 5, UG QED1, 5–6, CP. 4. (C   x A(x))   x (C  A(x)). 1.C   x A(x) P 2.C P [for C  A(?)] 3.  x A(x) 1, 2, MP 4.A(d) 3, EI 5.C  A(d) 2–4, CP 6.  x (C  A(x))5, EG QED1, 5–6, CP. 5.  x (C  A(x))  (C   x A(x)). 1.  x (C  A(x)) P 2.C P [for C   x A(x)] 3.C  A(d) 1, EI 4.A(d)2, 3, MP 5.  x A(x) 4, EG 6.C   x A(x) 2–5, CP QED1, 6, CP. 6.  x (A(x)  C)  (  x A(x)  C). 1.  x (A(x)  C) P 2.  x A(x) P [for  x A(x)  C ] 3.A(d)  C 1, EI 4.A(d) 2, UI 5.C 3, 4, MP 6.  x A(x)  C 2–5, CP QED1, 6, CP.