First Order Logic Part 1

Similar documents
For next Tuesday. Read chapter 8 No written homework Initial posts due Thursday 1pm and responses due by class time Tuesday

E.g., Brother(KingJohn,RichardTheLionheart)

Last time: Logic and Reasoning

Introduction to Artificial Intelligence 2 nd semester 2016/2017. Chapter 8: First-Order Logic (FOL)

COMP3411: Artificial Intelligence 8. First Order Logic

Predicate Calculus. Problems? Syntax. Atomic Sentences. Complex Sentences. Truth

First Order Predicate Logic CIS 32

ITCS 6150 Intelligent Systems. Lecture 13 First-Order Logic Chapter 8

PHIL 240, Introduction to Logic, Sections Fall 2011 FINAL EXAM 14 December Name (5 points): Section (5 points):

Set 7: Predicate logic Chapter 8 R&N. ICS 271 Fall 2015

L05 - Negating Statements

First-Order Logic Syntax

Question about Final Exam. CS 416 Artificial Intelligence. What do we like about propositional logic? First-order logic

CSE 473 Lecture 12 Chapter 8. First-Order Logic. CSE AI faculty

Vibhav Gogate University of Texas, Dallas Artificial Intelligence: CS 4365 First-order Logic

(More) Propositional Logic and an Intro to Predicate Logic. CSCI 3202, Fall 2010

Notes. Notes. Introduction. Notes. Propositional Functions. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry.

INF5390 Kunstig intelligens. First-Order Logic. Roar Fjellheim

First-Order Logic PREDICATE LOGIC. Syntax. Terms

Module 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur

Knowledge Representation

First-Order Predicate Logic. CSCI 5582, Fall 2007

CITS2211 Discrete Structures Logic

Logic: TD as search, Datalog (variables)

CSC 501 Semantics of Programming Languages

CMPSCI 250: Introduction to Computation. Lecture #7: Quantifiers and Languages 6 February 2012

CSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi

Propositional Logic:

First order logic (Ch. 8)

Chapter 1.3 Quantifiers, Predicates, and Validity. Reading: 1.3 Next Class: 1.4. Motivation

Knowledge Representation. CS 486/686: Introduction to Artificial Intelligence

Overview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.

Axiomatic Specification. Al-Said, Apcar, Jerejian

Multi-agent and Semantic Web Systems: RDF Data Structures

CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27

First order logic (Ch. 8)

Warm-Up Problem. Let L be the language consisting of as constant symbols, as a function symbol and as a predicate symbol. Give an interpretation where

Foundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution

Multi-Place Predicates and Multiple Quantifiers

A review of First-Order Logic

Back to the knights and knaves island

Chapter 3: Propositional Languages

Towards a Logical Reconstruction of Relational Database Theory

Logic (or Declarative) Programming Foundations: Prolog. Overview [1]

CS 1200 Discrete Math Math Preliminaries. A.R. Hurson 323 CS Building, Missouri S&T

CS112 Friday, September 12, 2008

Knowledge Sharing Among Heterogeneous Agents

Constraint Solving. Systems and Internet Infrastructure Security

Chapter 2 & 3: Representations & Reasoning Systems (2.2)

Inference rule for Induction

CSC Discrete Math I, Spring Sets

Review Material: First Order Logic (FOL)

6.034 Notes: Section 10.1

6.034 Notes: Section 5.1

Section 2.2: Introduction to the Logic of Quantified Statements

Deductive Methods, Bounded Model Checking

First Order Logic and Resolution

Knowledge Representation and Reasoning Logics for Artificial Intelligence

Semantics and Pragmatics of NLP

SOFTWARE ENGINEERING DESIGN I

CPSC 121: Models of Computation. Module 6: Rewriting predicate logic statements

Semantic Web Systems Web Services Part 2 Jacques Fleuriot School of Informatics

SC/MATH Boolean Formulae. Ref: G. Tourlakis, Mathematical Logic, John Wiley & Sons, York University

for all x, the assertion P(x) is false. there exists x, for which the assertion P(x) is true.

Lecture 9: Predicate Logic. First: Finish Propositional Logic in Haskell. Semantics in Haskell. Syntax In Haskell. CS 181O Spring 2016 Kim Bruce

CS Bootcamp Boolean Logic Autumn 2015 A B A B T T T T F F F T F F F F T T T T F T F T T F F F

THE RELATIONAL MODEL. University of Waterloo

7. Relational Calculus (Part I) 7.1 Introduction

Lecture 5: Predicate Calculus. ffl Predicate Logic ffl The Language ffl Semantics: Structures

Quantification. Using the suggested notation, symbolize the statements expressed by the following sentences.

Higher-Order Logic. Specification and Verification with Higher-Order Logic

First-Order Predicate Logic. Introduction to Intelligent Systems

Typed Lambda Calculus

To prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):

Resolution (14A) Young W. Lim 6/14/14

Lecture 4: January 12, 2015

So many Logics, so little time

Proseminar on Semantic Theory Fall 2013 Ling 720 An Algebraic Perspective on the Syntax of First Order Logic (Without Quantification) 1

Automated Reasoning. Natural Deduction in First-Order Logic

15-819M: Data, Code, Decisions

Practice Problems: All Computer Science majors are people. Some computer science majors are logical thinkers. Some people are logical thinkers.

l A family of logic based KR formalisms l Distinguished by: l Decidable fragments of FOL l Closely related to Propositional Modal & Dynamic Logics

Lecture 17 of 41. Clausal (Conjunctive Normal) Form and Resolution Techniques

THE PREDICATE CALCULUS

CSE20: Discrete Mathematics

LOGIC AND DISCRETE MATHEMATICS

logic with quantifiers (informally)

Converting First Order Logic into Natural Language: A First Level Approach

, ->, and <-> just as atomic sentence letter (which we can still

Preface Violine(stradivari1) 4string(stradivari1). x.violine(x) 4string(x)

Predicate Logic CHAPTER What This Chapter Is About

Range Restriction for General Formulas

CS 512, Spring 2017: Take-Home End-of-Term Examination

Operations of Relational Algebra

First-Order Translation Checklist

Constraint Propagation for Efficient Inference in Markov Logic

Today s Lecture 4/13/ WFFs/ Free and Bound Variables 9.3 Proofs for Pred. Logic (4 new implicational rules)!

Database Management System Prof. Partha Pratim Das Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Assignment 3: Logical Agents: Solutions

COMP232 - Mathematics for Computer Science

Transcription:

First Order Logic Part 1 Yingyu Liang yliang@cs.wisc.edu Computer Sciences Department University of Wisconsin, Madison [Based on slides from Burr Settles and Jerry Zhu] slide 1

Problems with propositional logic Consider the game minesweeper on a 10x10 field with only one landmine. How do you express the knowledge, with propositional logic, that the squares adjacent to the landmine will display the number 1? slide 2

Problems with propositional logic Consider the game minesweeper on a 10x10 field with only one landmine. How do you express the knowledge, with propositional logic, that the squares adjacent to the landmine will display the number 1? Intuitively with a rule like landmine(x,y) number1(neighbors(x,y)) but propositional logic cannot do this slide 3

Problems with propositional logic Propositional logic has to say, e.g. for cell (3,4): Landmine_3_4 number1_2_3 Landmine_3_4 number1_2_4 Landmine_3_4 number1_2_5 Landmine_3_4 number1_3_3 Landmine_3_4 number1_3_5 Landmine_3_4 number1_4_3 Landmine_3_4 number1_4_4 Landmine_3_4 number1_4_5 And similarly for each of Landmine_1_1, Landmine_1_2, Landmine_1_3,, Landmine_10_10! Difficult to express large domains concisely Don t have objects and relations First Order Logic is a powerful upgrade slide 4

Ontological commitment Logics are characterized by what they consider to be primitives Logic Primitives Available Knowledge Propositional facts true/false/unknown First-Order facts, objects, relations true/false/unknown Temporal facts, objects, relations, times true/false/unknown Probability Theory facts degree of belief 0 1 Fuzzy degree of truth degree of belief 0 1 slide 5

First Order Logic syntax Term: an object in the world Constant: Jerry, 2, Madison, Green, Variables: x, y, a, b, c, Function(term 1,, term n ) Sqrt(9), Distance(Madison, Chicago) Maps one or more objects to another object Can refer to an unnamed object: LeftLeg(John) Represents a user defined functional relation A ground term is a term without variables. slide 6

FOL syntax Atom: smallest T/F expression Predicate(term 1,, term n ) Teacher(Jerry, you), Bigger(sqrt(2), x) Convention: read Jerry (is)teacher(of) you Maps one or more objects to a truth value Represents a user defined relation term 1 = term 2 Radius(Earth)=6400km, 1=2 Represents the equality relation when two terms refer to the same object slide 7

FOL syntax Sentence: T/F expression Atom Complex sentence using connectives: Spouse(Jerry, Jing) Spouse(Jing, Jerry) Less(11,22) Less(22,33) Complex sentence using quantifiers ", $ Sentences are evaluated under an interpretation Which objects are referred to by constant symbols Which objects are referred to by function symbols What subsets defines the predicates slide 8

FOL quantifiers Universal quantifier: " Sentence is true for all values of x in the domain of variable x. Main connective typically is Forms if-then rules all humans are mammals "x human(x) mammal(x) Means if x is a human, then x is a mammal slide 9

FOL quantifiers "x human(x) mammal(x) It s a big AND: Equivalent to the conjunction of all the instantiations of variable x: (human(jerry) mammal(jerry)) (human(jing) mammal(jing)) (human(laptop) mammal(laptop)) Common mistake is to use as main connective "x human(x) mammal(x) This means everything is human and a mammal! (human(jerry) mammal(jerry)) (human(jing) mammal(jing)) (human(laptop) mammal(laptop)) slide 10

FOL quantifiers Existential quantifier: $ Sentence is true for some value of x in the domain of variable x. Main connective typically is some humans are male $x human(x) male(x) Means there is an x who is a human and is a male slide 11

FOL quantifiers $x human(x) male(x) It s a big OR: Equivalent to the disjunction of all the instantiations of variable x: (human(jerry) male(jerry)) (human(jing) male(jing)) (human(laptop) male(laptop)) Common mistake is to use as main connective Some pig can fly $x pig(x) fly(x) (wrong) slide 12

FOL quantifiers $x human(x) male(x) It s a big OR: Equivalent to the disjunction of all the instantiations of variable x: (human(jerry) male(jerry)) (human(jing) male(jing)) (human(laptop) male(laptop)) Common mistake is to use as main connective Some pig can fly $x pig(x) fly(x) (wrong) This is true if there is something not a pig! (pig(jerry) fly(jerry)) (pig(laptop) fly(laptop)) slide 13

FOL quantifiers Properties of quantifiers: "x "y is the same as "y "x $x $y is the same as $y $x Example: "x "y likes(x,y) Everyone likes everyone. "y "x likes(x,y) Everyone is liked by everyone. slide 14

FOL quantifiers Properties of quantifiers: "x $y is not the same as $y "x $x "y is not the same as "y $x Example: "x $y likes(x,y) Everyone likes someone (can be different). $y "x likes(x,y) There is someone who is liked by everyone. slide 15

FOL quantifiers Properties of quantifiers: "x P(x)when negated becomes $x P(x) $x P(x)when negated becomes "x P(x) Example: "x sleep(x) Everybody sleeps. $x sleep(x) Somebody does not sleep. slide 16

FOL quantifiers Properties of quantifiers: "x P(x)is the same as $x P(x) $x P(x)is the same as "x P(x) Example: "x sleep(x) Everybody sleeps. $x sleep(x) There does not exist someone who does not sleep. slide 17

FOL syntax A free variable is a variable that is not bound by an quantifier, e.g. $y Likes(x,y): x is free, y is bound A well-formed formula (wff) is a sentence in which all variables are quantified (no free variable) Short summary so far: Constants: Bob, 2, Madison, Variables: x, y, a, b, c, Functions: Income, Address, Sqrt, Predicates: Teacher, Sisters, Even, Prime Connectives: Equality: = Quantifiers: " $ slide 18

More summary Term: constant, variable, function. Denotes an object. (A ground term has no variables) Atom: the smallest expression assigned a truth value. Predicate and = Sentence: an atom, sentence with connectives, sentence with quantifiers. Assigned a truth value Well-formed formula (wff): a sentence in which all variables are quantified slide 19