Carlos Varela Rennselaer Polytechnic Institute August 30, 2007

Slides:



Advertisements
Similar presentations
Propositional Equivalences
Advertisements

Resolution Proof System for First Order Logic
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
First Order Logic Resolution
Models and Propositional Logic In propositional logic, a model in general simply fixes the truth value – true or false – for every proposition symbol.
We have seen that we can use Generalized Modus Ponens (GMP) combined with search to see if a fact is entailed from a Knowledge Base. Unfortunately, there.
For Friday No reading Homework: –Chapter 9, exercise 4 (This is VERY short – do it while you’re running your tests) Make sure you keep variables and constants.
F22H1 Logic and Proof Week 7 Clausal Form and Resolution.
Logic Languages Source: Scott, Michael Programming Language Pragmatics 3rd Ed.
Prolog IV Logic, condensed. 2 Propositional logic Propositional logic consists of: The logical values true and false ( T and F ) Propositions: “Sentences,”
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Computability and Complexity 8-1 Computability and Complexity Andrei Bulatov Logic Reminder.
Logic Programming Languages. Objective To introduce the concepts of logic programming and logic programming languages To introduce a brief description.
Propositional Logic. Negation Given a proposition p, negation of p is the ‘not’ of p.
Discrete Mathematics Math 6A Instructor: M. Welling.
CSE115/ENGR160 Discrete Mathematics 01/20/11 Ming-Hsuan Yang UC Merced 1.
Adapted from Discrete Math
Predicates and Quantifiers
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
CSCI 115 Chapter 2 Logic. CSCI 115 §2.1 Propositions and Logical Operations.
Mathematical Structures A collection of objects with operations defined on them and the accompanying properties form a mathematical structure or system.
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.
Declarative vs Procedural Programming  Procedural programming requires that – the programmer tell the computer what to do. That is, how to get the output.
LDK R Logics for Data and Knowledge Representation Propositional Logic Originally by Alessandro Agostini and Fausto Giunchiglia Modified by Fausto Giunchiglia,
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
CSE S. Tanimoto Horn Clauses and Unification 1 Horn Clauses and Unification Propositional Logic Clauses Resolution Predicate Logic Horn Clauses.
CS344: Introduction to Artificial Intelligence Lecture: Herbrand’s Theorem Proving satisfiability of logic formulae using semantic trees (from Symbolic.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 28– Interpretation; Herbrand Interpertation 30 th Sept, 2010.
1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions.
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.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
Dr. Muhammed Al-Mulhem ICS An Introduction to Logical Programming.
Theorem Proving Semantic Tableaux CIS548 November 15, 2006.
CS6133 Software Specification and Verification
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
Chapter 1: The Foundations: Logic and Proofs
C. Varela1 Logic Programming (PLP 11) Predicate Calculus, Horn Clauses, Clocksin-Mellish Procedure Carlos Varela Rennselaer Polytechnic Institute November.
For Wednesday Finish reading chapter 10 – can skip chapter 8 No written homework.
Knowledge Repn. & Reasoning Lec. #5: First-Order Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2004.
Chapter 2 Fundamentals of Logic 1. What is a valid argument or proof?
1-1 An Introduction to Logical Programming Sept
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri CS 440 / ECE 448 Introduction to Artificial Intelligence.
 Conjunctive Normal Form: A logic form must satisfy one of the following conditions 1) It must be a single variable (A) 2) It must be the negation of.
By P. S. Suryateja Asst. Professor, CSE Vishnu Institute of Technology
2. The Logic of Compound Statements Summary
Advanced Algorithms Analysis and Design
CSE15 Discrete Mathematics 01/23/17
CSNB 143 Discrete Mathematical Structures
Propositional Logic Resolution
Proposition & Predicates
Horn Clauses and Unification
CMSC Discrete Structures
Chapter 8 Logic Topics
Logic Programming Languages
Logics for Data and Knowledge Representation
CSE 311 Foundations of Computing I
Propositional Equivalences
Carlos Varela Rensselaer Polytechnic Institute November 10, 2017
Horn Clauses and Unification
Prolog IV Logic, condensed.
Horn Clauses and Unification
Horn Clauses and Unification
Discrete Mathematics CMP-200 Propositional Equivalences, Predicates & Quantifiers, Negating Quantified Statements Abdul Hameed
CSNB234 ARTIFICIAL INTELLIGENCE
Horn Clauses and Unification
Predicates and Quantifiers
Propositional Calculus
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
RESOLUTION.
Presentation transcript:

Carlos Varela Rennselaer Polytechnic Institute August 30, 2007 Logic Programming (PLP 11.3) Predicate Calculus Clocksin-Mellish Procedure Horn Clauses Carlos Varela Rennselaer Polytechnic Institute August 30, 2007 C. Varela

Propositional Logic Assigning truth values to logical propositions. Formula syntax: f ::= v symbol | f  f and | f  f or | f  f if and only if | f  f implies | f not C. Varela

Truth Values To assign a truth values to a propositional formula, we have to assign truth values to each of its atoms (symbols). Formula semantics: a b a  b a  b a  b a  b  a False F T True C. Varela

Tautologies A tautology is a formula, true for all possible assignments. For example: p  p The contrapositive law: (p  q )  (q  p) De Morgan’s law: (p  q)  (p  q) C. Varela

First Order Predicate Calculus Adds variables, terms, and (first-order) quantification of variables. Predicate syntax: a ::= p(v1, v2,…,vn) predicate f ::= a atom | v = p(v1, v2,…,vn) equality | v1 = v2 | ff | ff | ff | ff |f | v.f universal quantifier | v.f existential quantifier C. Varela

Predicate Calculus In mathematical logic, a predicate is a function that maps constants or variables to true and false. Predicate calculus enables reasoning about propositions. For example: C [rainy(C)  cold(C)  snowy(C)] Quantifier (, ) Operators (,,,,) C. Varela

Quantifiers Universal () quantifier indicates that the proposition is true for all variable values. Existential () quantifier indicates that the proposition is true for at least one value of the variable. For example: A B [C [ takes(A,C)  takes(B,C)]  classmates(A,B) ] C. Varela

Structural Congruence Laws P1  P2  P1  P2 X [P(X)]  X [P(X)] X [P(X)]  X [P(X)] (P1  P2)  P1  P2 (P1  P2)  P1  P2 P  P (P1  P2)  (P1  P2)  (P2  P1) P1  (P2  P3)  (P1  P2)  (P1  P3) P1  (P2  P3)  (P1  P2)  (P1  P3) P1  P2  P2  P1 C. Varela

Clausal Form Looking for a minimal kernel appropriate for theorem proving. Propositions are transformed into normal form by using structural congruence relationship. One popular normal form candidate is clausal form. Clocksin and Melish (1994) introduce a 5-step procedure to convert first-order logic propositions into clausal form. C. Varela

Clocksin and Melish Procedure Eliminate implication () and equivalence (). Move negation () inwards to individual terms. Skolemization: eliminate existential quantifiers (). Move universal quantifiers () to top-level and make implicit , i.e., all variables are universally quantified. Use distributive, associative and commutative rules of , , and , to move into conjuctive normal form, i.e., a conjuction of disjunctions (or clauses.) C. Varela

Example Eliminate implication () and equivalence (). A [student(A)  (dorm_resident(A)  B [takes(A,B)  class(B)])] Eliminate implication () and equivalence (). A [student(A)  (dorm_resident(A)  Move negation () inwards to individual terms. B [(takes(A,B)  class(B))])] B [takes(A,B)  class(B)])] C. Varela

Example Continued A [student(A)  (dorm_resident(A)  B [takes(A,B)  class(B)])] Skolemization: eliminate existential quantifiers (). Move universal quantifiers () to top-level and make implicit , i.e., all variables are universally quantified. student(A)  (dorm_resident(A)  (takes(A,B)  class(B)) Use distributive, associative and commutative rules of , , and , to move into conjuctive normal form, i.e., a conjuction of disjunctions (or clauses.) (student(A)  dorm_resident(A))  (student(A)  takes(A,B)  class(B)) C. Varela

Clausal Form to Prolog (student(A)  dorm_resident(A))  (student(A)  takes(A,B)  class(B)) Use commutativity of  to move negated terms to the right of each clause. Use P1  P2  P2  P1  P1  P2 (student(A)  dorm_resident(A))  (student(A)  (takes(A,B)  class(B)) Move Horn clauses to Prolog: student(A) :- dorm_resident(A). student(A) :- takes(A,B),class(B). C. Varela

Skolemization X [takes(X,cs101)  class_year(X,2)] introduce a Skolem constant to get rid of existential quantifier (): takes(x,cs101)  class_year(x,2) X [dorm_resident(X)  A [campus_address_of(X,A)]] introduce a Skolem function to get rid of existential quantifier (): campus_address_of(X,f(X)] C. Varela

Limitations If more than one non-negated (positive) term in a clause, then it cannot be moved to a Horn clause (which restricts clauses to only one head term). If zero non-negated (positive) terms, the same problem arises (Prolog’s inability to prove logical negations). For example: « every living thing is an animal or a plant » animal(X)  plant(X)  living(X) animal(X)  plant(X)  living(X) C. Varela

Exercises What is the logical meaning of the second Skolemization example if we do not introduce a Skolem function? Convert the following predicates into Conjunctive Normal Form, and if possible, into Horn clauses: C [rainy(C)  cold(C)  snowy(C)] C [snowy(C)] C [snowy(C)] PLP Exercise 11.21 (pg 654). *PLP Exercise 11.23 (pg 654). C. Varela