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:

Slides:



Advertisements
Similar presentations
First Order Logic Resolution
Advertisements

Resolution in Propositional and First-Order Logic.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 1: (Part 2): The Foundations: Logic and Proofs.
Knowledge Representation Methods
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Computability and Complexity 8-1 Computability and Complexity Andrei Bulatov Logic Reminder.
Inference and Resolution for Problem Solving
1 Chapter 7 Propositional and Predicate Logic. 2 Chapter 7 Contents (1) l What is Logic? l Logical Operators l Translating between English and Logic l.
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
Ch 1.3: Quantifiers Open sentences, or predicates, are sentences that contain one or more variables. They do not have a truth value until variables are.
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.
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
Predicates and Quantifiers
CISC 2315 Discrete Structures Professor William G. Tanner, Jr. Fall 2010 Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability,
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
Formal Logic Mathematical Structures for Computer Science Chapter Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFormal Logic.
Inference in First-Order logic Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
1st-order Predicate Logic (FOL)
Conjunctive normal form: any formula of the predicate calculus can be transformed into a conjunctive normal form. Def. A formula is said to be in conjunctive.
1 Chapter 8 Inference and Resolution for Problem Solving.
1 Section 1.1 A Proof Primer A proof is a demonstration that some statement is true. We normally demonstrate proofs by writing English sentences mixed.
Chapter 5 Existence and Proof by contradiction
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
CISC 2315 Discrete Structures Professor William G. Tanner, Jr. Spring 2011 Slides created by James L. Hein, author of Discrete Structures, Logic, and Computability,
First Order Predicate Logic
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.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Fallacies The proposition [(p  q)  q]  p is not a tautology, because it is false when p is false and q is true. This type of incorrect reasoning is.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
Predicates and Quantified Statements
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 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.
Chapter 2 Symbolic Logic. Section 2-1 Truth, Equivalence and Implication.
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
For Wednesday Finish reading chapter 10 – can skip chapter 8 No written homework.
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 Section 6.2 Propositional Calculus Propositional calculus is the language of propositions (statements that are true or false). We represent propositions.
1 Section 8.2 Program Correctness (for imperative programs) A theory of program correctness needs wffs, axioms, and inference rules. Wffs (called Hoare.
Section 1.4. Propositional Functions Propositional functions become propositions (and have truth values) when their variables are each replaced by a value.
Metalogic Soundness and Completeness. Two Notions of Logical Consequence Validity: If the premises are true, then the conclusion must be true. Provability:
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.
Converting arbitrary wffs to CNF A wff is in prenex form iff it consists of a string of quantifiers (called a prefix) followed by a quantifier free formula.
1 Section 7.1 First-Order Predicate Calculus Predicate calculus studies the internal structure of sentences where subjects are applied to predicates existentially.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 04 : Logic.
رياضيات متقطعة لعلوم الحاسب MATH 226. Chapter 1 Predicates and Quantifiers 1.4.
3. The Logic of Quantified Statements Summary
Predicate logic CSC 333.
ARTIFICIAL INTELLIGENCE
Proposition & Predicates
Chapter 1 The Foundations: Logic and Proofs
CS201: Data Structures and Discrete Mathematics I
CS 1502 Formal Methods in Computer Science
Introduction to Predicates and Quantified Statements II
Introduction to Predicates and Quantified Statements II
1st-order Predicate Logic (FOL)
Introduction to Predicates and Quantified Statements I
MA/CSSE 474 More Math Review Theory of Computation
Computer Security: Art and Science, 2nd Edition
PROPOSITIONAL LOGIC - SYNTAX-
Predicates and Quantifiers
Discrete Mathematics Lecture 4 Logic of Quantified Statements
Encoding Knowledge with First Order Predicate Logic
Encoding Knowledge with First Order Predicate Logic
CS201: Data Structures and Discrete Mathematics I
Encoding Knowledge with First Order Predicate Logic
1st-order Predicate Logic (FOL)
Presentation transcript:

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: A  B iff A  B and B  A are both valid. Proof: A  B iff A and B have the same truth value for any interpretation iff A  B and B  A are true for any interpretation iff A  B and B  A are both valid. QED. Propositional Equivalence Gives Rise to First-Order Equivalence In other words, if two propositional wffs are equivalent and each occurrence of a propositional variable is replaced by a first order wff, then the resulting two first order wffs, called instances, are equivalent. Example. We have  x p(x)   x p(x)  ¬  x p(x)   x p(x) because A  B  ¬ A  B. So the first-order equivalence is an instance of the propositional equivalence by letting A =  x p(x) and B =  x p(x). Basic Equivalences (1) ¬  x W   x ¬ W and ¬  x W   x ¬ W. Proof (second equivalence). Let I be an arbitrary interpretation with domain D. Then ¬  x W is true for I iff  x W is false for I iff W(x/d) is false for I for all d  D iff ¬ W(x/d) is true for I for all d  D iff  x ¬ W is true for I. Since I was arbitrary, the wffs are equivalent. QED.

2 Example.  x p(x)   x p(x)  ¬  x p(x)   x p(x) (instance of propositional wff)   x ¬ p(x)   x p(x)(basic equivalence). (2)  x  y W   y  x W and  x  y W   y  x W. Proof (first equivalence): Let I be an arbitrary interpretation with domain D. Then  x  y W is true for I iff  y W(x/d) is true for I for all d  D iff W(x/d) (y/e) is true for I for all d, e  D iff W(y/e) (x/d) is true for I for all d, e  D iff  x W(y/e) is true for I for all e  D iff  y  x W is true for I. Since I was arbitrary, the wffs are equivalent. QED. (3)  x (A(x)  B(x))   x A(x)   x B(x). Proof: Let I be an arbitrary interpretation with domain D. Assume LHS is true for I. Then A(c)  B(c) is true for I for some c  D. Consider the possible values of A(c). If A(c) is true for I, then B(c) is true for I. So  x B(x) is true for I, which implies RHS is true for I. If A(c) is false for I, then  x A(x) is false for I, which implies RHS is true for I. So LHS  RHS is valid. Class, prove the converse, RHS  LHS. QED. (4)  x (A(x)  B(x))   x A(x)   x B(x). Proof:  x (A(x)  B(x))   x (¬ A(x)  B(x)) (instance of propositional wff)   x ¬ A(x)   x B(x)(3)  ¬  x A(x)   x B(x)(1)   x A(x)   x B(x)(instance of propositional wff). QED.

3 (5)  x (A(x)  B(x))   x A(x)   x B(x). Proof: Let I be an arbitrary interpretation with domain D. Then  x (A(x)  B(x)) is true for I iff A(d)  B(d) is true for I for all d  D iff A(d) is true for I for all d  D and B(d) is true for I for all d  D iff  x A(x) is true for I and  x B(x) is true for I iff  x A(x)   x B(x) is true for I. Since I was arbitrary, the wffs are equivalent. QED. Restricted Equivalences (6) (Renaming Variables) If y does not occur in W(x), then  x W(x)   y W(y) and  x W(x)   y W(y). Example.  x (  y p(x, y)   x q(x, y))   z (  y p(z, y)   x q(x, y)). (7) If x does not occur free in C, then (a)  x C  C and  x C  C. (b)  x (C  A(x))  C   x A(x) and  x (C  A(x))  C   x A(x). (c)  x (C  A(x))  C   x A(x) and  x (C  A(x))  C   x A(x). (d)  x (C  A(x))  C   x A(x) and  x (C  A(x))  C   x A(x). (e) Be careful with these:  x (A(x)  C)   x A(x)  C.  x (A(x)  C)   x A(x)  C.

4 Proof: There are various ways to prove the equivalences. For example, prove (a) and (b) with models and then use known equivalences to prove (c), (d), and (e). QED. Example. We know that  x  y p(x, y)   y  x p(x, y) is valid, but the converse is not valid. So we can’t interchange  x and  y. But for predicates that take single arguments, the two quantifiers can be interchanged. For example, we have the following equivalence:  x  y (p(x)  q(y))   y  x (p(x)  q(y)). Proof:  x  y (p(x)  q(y))   x (p(x)   y q(y))(7d)   x p(x)   y q(y)(7e)   y (  x p(x)  q(y))(7d)   y  x (p(x)  q(y))(7e) QED. Normal Forms A wff in prenex normal form has all quantifiers at the left end. e.g.,  x  y (p(x)  q(y)). Prenex Normal Form Algorithm (a) Rename variables to get distinct quantifier names and distinct free variable names. (b) Move quantifiers left using (1), (7b), (7c), (7d), and (7e). Example. q(x)   x (r(x)  ¬  y p(x, y))  q(x)   z (r(z)  ¬  y p(z, y))(rename)   z (q(x)  (r(z)  ¬  y p(z, y)))(7b)   z (q(x)  (r(z)   y ¬ p(z, y)))(1)   z (q(x)   y (r(z)  ¬ p(z, y)))(7d)   z  y (q(x)  (r(z)  ¬ p(z, y)))(7b).

5 Prenex CNF/DNF A wff in prenex normal form is in prenex CNF (or prenex DNF) if the wff to the right of the quantifiers is in CNF (or DNF), where a literal is now either an atom or its negation. Example. p(x) and ¬ p(x) are literals. Example.  z  y (q(x)  (¬ r(z)  ¬ p(z, y))) is a prenex CNF. Example.  z  y ((q(x)  ¬ r(z))  (q(x)  ¬ p(z, y))) is a prenex DNF. Prenex CNF/DNF Algorithm (a) Put wff in prenex normal form. (b) Remove . (c) Move ¬ to the right to form literals. (d) Distribute  over  and/or  over  for desired form. Example.  x  y  z (q(x)  r(z, x)  p(z, y)) (prenex normal form)   x  y  z (¬ (q(x)  r(z, x))  p(z, y))(remove  )   x  y  z ((¬ q(x)  ¬ r(z, x))  p(z, y)) (move ¬ right) (prenex DNF)   x  y  z ((¬ q(x)  p(z, y))  (¬ r(z, x))  p(z, y))) (distribute) (prenex CNF). Formalizing English Sentences. Some rules that usually work for English sentences are:  x quantifies a conditional.  x quantifies a conjunction. Use  x with conditional for “all,” “every,” and “only.” Use  x with conjunction for “some,” “there is,” and “not all.” Use  x with conditional or ¬  x with conjunction for “no A is B.” Use  x with conjunction or ¬  x with conditional for “not all A’s are B.”

6 Example/Quiz. For a person x let c(x) mean x is a criminal and let s(x) mean x is sane. Then formalize each of the following sentences. 1. All criminals are sane. Solution:  x (c(x)  s(x)). 2. Every criminal is sane. Solution:  x (c(x)  s(x)). 3. Only criminals are sane. Solution:  x (s(x)  c(x)). 4. Some criminals are sane. Solution:  x (c(x)  s(x)). 5. There is a criminal that is sane. Solution:  x (c(x)  s(x)). 6. No criminal is sane. Solution:  x (c(x)  ¬ s(x))  ¬  x (c(x)  s(x)). 7. Not all criminals are sane. Solution:  x (c(x)  ¬ s(x))  ¬  x (c(x)  s(x)).