Similar documents




Propositional Logic Language

Fundamentals of Logic

Resolution for Predicate Logic

Propositional Logic: Models and Proofs

Advanced Topics in LP and FP

Deductive Systems. Lecture - 3

Predicate Logic: Sematics Part 1

Mat 243 Exam 1 Review

CMPS 217 Logic in Computer Science. Lecture #17

AAA615: Formal Methods. Lecture 2 First-Order Logic

LOGIC. Mathematics. Computer Science. Stanley N. Burris

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

Logic: Propositional Logic (Part I)

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Inference in Propositional Logic

Herbrand Theorem, Equality, and Compactness

1.1 Language and Logic

Introduction to Sets and Logic (MATH 1190)

Example. Lemma. Proof Sketch. 1 let A be a formula that expresses that node t is reachable from s

Learning Goals of CS245 Logic and Computation

Propositional Logic Not Enough

Lecture 13: Soundness, Completeness and Compactness

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel

CS 730/730W/830: Intro AI

First-Order Logic (FOL)

MAI0203 Lecture 7: Inference and Predicate Calculus

CMPSCI 601: Tarski s Truth Definition Lecture 15. where

Chapter 11: Automated Proof Systems (1)

1 Completeness Theorem for Classical Predicate

Syntax of propositional logic. Syntax tree of a formula. Semantics of propositional logic (I) Subformulas

ECE473 Lecture 15: Propositional Logic

Outline. Formale Methoden der Informatik First-Order Logic for Forgetters. Why PL1? Why PL1? Cont d. Motivation

Logic: First Order Logic

Solutions to Sample Problems for Midterm

INF3170 Logikk Spring Homework #8 For Friday, March 18

First-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms

Intelligent Agents. First Order Logic. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: 19.

CHAPTER 10. Predicate Automated Proof Systems

Lecture 4: Proposition, Connectives and Truth Tables

Introduction to Model Theory

Syntax. Notation Throughout, and when not otherwise said, we assume a vocabulary V = C F P.

Predicate Calculus. Formal Methods in Verification of Computer Systems Jeremy Johnson

CHAPTER 11. Introduction to Intuitionistic Logic

Logic Programming (PLP 11) Predicate Calculus Clocksin-Mellish Procedure Horn Clauses

Recall that the expression x > 3 is not a proposition. Why?

1.1 Language and Logic

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

Chapter 11: Automated Proof Systems

Propositional logic. First order logic. Alexander Clark. Autumn 2014

CS2742 midterm test 2 study sheet. Boolean circuits: Predicate logic:

INF3170 / INF4171 Notes on Resolution

Sequent calculus for predicate logic

MODELLING AND VERIFICATION ANALYSIS OF A TWO SPECIES ECOSYSTEM VIA A FIRST ORDER LOGIC APPROACH

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas.

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

THE LOGIC OF QUANTIFIED STATEMENTS

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

Propositional and Predicate Logic - V

Part 1: Propositional Logic

Informal Statement Calculus

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

Logical Operators. Conjunction Disjunction Negation Exclusive Or Implication Biconditional

A Little Logic. Propositional Logic. Satisfiability Problems. Solving Sudokus. First Order Logic. Logic Programming

Predicate Calculus lecture 1

Conjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

First Order Logic (FOL) 1 znj/dm2017

AN INTRODUCTION TO MATHEMATICAL PROOFS NOTES FOR MATH Jimmy T. Arnold

Logic Programming (PLP 11) Predicate Calculus, Horn Clauses, Clocksin-Mellish Procedure

A brief introduction to Logic. (slides from

Logic. Knowledge Representation & Reasoning Mechanisms. Logic. Propositional Logic Predicate Logic (predicate Calculus) Automated Reasoning

3 Propositional Logic

Foundation of proofs. Jim Hefferon.

Introduction to Logic in Computer Science: Autumn 2006

Foundations of Mathematics Worksheet 2

Infinitary Equilibrium Logic and Strong Equivalence

Přednáška 12. Důkazové kalkuly Kalkul Hilbertova typu. 11/29/2006 Hilbertův kalkul 1

Exercises 1 - Solutions

Introduction to Logic in Computer Science: Autumn 2007

Syntax of FOL. Introduction to Logic in Computer Science: Autumn Tableaux for First-order Logic. Syntax of FOL (2)

Review. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.

CS 730/830: Intro AI. 3 handouts: slides, asst 6, asst 7. Wheeler Ruml (UNH) Lecture 12, CS / 16. Reasoning.

Discrete Mathematics & Mathematical Reasoning Predicates, Quantifiers and Proof Techniques

Logic. Definition [1] A logic is a formal language that comes with rules for deducing the truth of one proposition from the truth of another.

15414/614 Optional Lecture 1: Propositional Logic

Mathematical Foundations of Logic and Functional Programming

The predicate calculus is complete

Handout Proof Methods in Computer Science

Discrete Structures for Computer Science

Resolution for Predicate Logic

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)

Propositional Logic: Review


Sample Problems for all sections of CMSC250, Midterm 1 Fall 2014

CS 4700: Artificial Intelligence

Section 2.1: Introduction to the Logic of Quantified Statements

Transcription:

1 FUNDAMENTALS OF LOGIC NO.10 HERBRAND THEOREM Tatsuya Hagino hagino@sfc.keio.ac.jp lecture URL https://vu5.sfc.keio.ac.jp/slide/

2 So Far Propositional Logic Logical connectives (,,, ) Truth table Tautology Normal form Axiom and theorem LK framework Soundness and completeness Predicate Logic Logical Formulas (language, term) Quantifiers ( x P(x), x P(x)) Closed formulae (bound and free variables) Semantics of predicate logic (domain, interpretation, structure) Valid formulae Prenex formulae LK framework for predicate logic Soundness and completeness

Exercise: Write in Predicate Logic Let N, P, D be the following predicates: N(x) = x is a natural number (1, 2, 3, 4, ). " P(x) = x is a prime number" D(x, y) = x is divisible by y = "y is a divisor of x " x < y = x is smaller than y." Please write the following sentences in predicate logic. 1. A prime number is a natural number. 3 2. A prime number can be only divisible by 1 and itself. 3. There are infinitely many prime numbers. (i.e. Given a natural number, there is always a prime number which is bigger than the given one.) 4. A prime number bigger than 2 is odd.

4 Proof in Predicate Logic Proof in Propositional Logic There is an algorithm to determine whether a give formula is provable or not. The algorithm is a finite method. Proof in Predicate Logic There is no algorithm to determine whether a given formula is provable or not. Partial Algorithm If a give formula is provable, the partial algorithm can show it. If it is not provable, the algorithm may not show anything. The algorithm may not terminate (i.e. not finite method).

5 Skolemization Prenex Normal Form Any logical formula can be transformed to a formula of the form Q 1 x 1 Q n x n A. Q i is either or. A does not contain any quantifiers. themselves or themselves can be exchanged without changing the meaning, but and cannot be exchanged in general. x y A y x A Skolemization x 1 x n y A y is determined by x 1,, x n. Write the relation as a new function f (Skolem function) x 1 x n A f(x 1,, x n )/y x 1 x n y A For x 1 to x n, there exists y Theorem: The satisfiability of x 1 x n y A and x 1 x n A f(x 1,, x n )/y is the same. Note: x 1 x n y A x 1 x n y A f(x 1,, x n )/y

6 Example of Skolemization Let L x, y ="x likes y and S x ="x is an SFC student. Skolemize the following formulae: 1. x y L(x, y) 2. x y L(x, y) 3. x y L(x, y) 4. x y x, y S x

7 Universal Prenex Normal Form By repeating Skolemization, a formula is transformed into a Prenex normal form with only universal quantifiers. x 1 x n A A does not contain any quantifiers. The satisfiability is the same as the original formula. Called universal prenex normal form Furthermore, A can be converted into a conjunctive normal form. x 1 x n L 11 L 1k1 L m1 L mkm where L ij is a literal (i.e. predicate or its negation) From duality, any formula can be transformed into the following form: x 1 x n L 11 L 1k1 L m1 L mkm

8 Clause Clause Disjunction of literals (predicate or its negation) L 1 L n L i is a predicate P or P Converting a logical formula to clauses: 1. Convert to prenex normal form 2. Skolemize to replace existential quantifiers with functions 3. Convert to conjunctive normal form 4. Divide conjunctions The satisfiability of the original logical formula is equivalent to the satisfiability of the converted clauses.

9 Example Convert x y P x, y Q y R x to an equivalent set of clauses:

10 Herbrand Interpretation Herbrand universe H L of language L The set of terms of L which do not contain any variables. In case L does not contain any constants, H L is empty. To avoid this, add a constant to L before constructing H L. Formal definition of Herbrand universe H 0 = c c is a constant of L H k+1 = H k f t 1,, t n f is an n ary function in L, t 1,, t n H k H L = H Herbrand basis Atomic formulae with Herbrand Universe elements. P t 1,, t n P is an n ary predicate in L,t 1,, t n H L Herbrand interpretation A subset of Herbrand basis J Atomic formulae in J are regarded as valid.

Herbrand Theorem Herbrand structure: μ = H L, J For each constant c: c J = c For each function symbol f: f J t 1,, t n = f(t 1,, t n ) For each predicate symbol P: μ P t 1,, t n (t 1,, t n ) J Herbrand Theorem For a universal prenex normal form x 1 x n A A does not contain any quantifiers. The followings are equivalent: x 1 x n A is unsatisfiable. There exists a natural number m and H L terms t i1,, t in (i = 1,, m), A[t 11 /x 1,..., t 1n /x n ] A[t m1 /x 1,..., t mn /x n ] is unsatisfiable in any Herbrand structure H L, J. 11

12 Meaning of Herbrand Structure Herbrand Structure Do not interpret the meaning of constants or function symbols, but treat them as symbols. Give interpretation of predicate symbols only. Property The interpretation of constants and function symbols are left to the interpretation of predicates. For any interpretation (including interpreting constants and function symbols), we can create an interpretation in Herbrand structure. In order to check the satisfiability of a logical formula, the structures can be restricted to Herbrand structures.

13 Applying Herbrand Theorem Show that x y P x P y is unsatisfiable using Herbrand theorem: 1. Convert to universal prenex normal form: x P x P f x 2. Herbrand universe: H = c, f c, f f c, f f f c, 3. First, P x P f(x) with assignment of x to c is P c P f(c), and it is satisfiable. 4. Next, combine the above formula with P x P f(x) with assignment of x to f c. P c P f c P f c P f f c There is no Herbrand interpretation which make both P f c and P f c valid. Therefore, it is unsatisfiable. 5. Using Herbrand theorem, x y P x P y is unsatisfiable. Therefore the negation of the formula is valid. x y P x P y is valid, i.e. x y P x P y is valid.

14 Herbrand Theorem for Clauses Ground Instance A formula or clause without variables. Herbrand Theorem for Clauses Let S be a set of clauses, the followings are equivalent: S is unsatisfiable. There is a finite set of ground instances of S which is unsatisfiable. A partial algorithm of showing A is valid: 1. Convert A to a set of clauses S. 2. Assign elements of H 0 (constants) and get ground instances S 0 and check its unsatisfiability (S 0 is a finite set). 3. Assign elements of H 1 and get ground instances S 1 and check its unsatisfiability. 4. Assign elements of H 2 and get ground instances S 2 and check its unsatisfiability. 5.... 6. Repeat until finding H k of which ground instances S k is unsatisfiable.

15 Dual Form of Herbrand Theorem Since the validity of A and the satisfiability of A is equivalent, there is a dual form of Herbrand Theorem. Herbrand Theorem (dual form) If x 1 x n A is an existential prenex normal form, A does not contain any quantifiers. The followings are equivalent: x 1 x n A is valid. There exists a natural number m and H L terms t i1,, t in (i = 1,, m), and A[t 11 /x 1,..., t 1n /x n ] A[t m1 /x 1,..., t mn /x n ] is valid in any Herbrand structure H L, J.

16 Summary Proof Propositional logic has an algorithm of proving formulae, but Predicate logic does not have. Skolemization Universal prenex normal form Conversion to clauses Herbrand Theorem Herbrand universe, interpretation and structure There is an partial algorithm for showing universal prenex normal form is unsatisfiable or not.