Semantics of Predicate Calculus For the propositional calculus, an interpretation was simply an assignment of truth values to the proposition letters of.

Slides:



Advertisements
Similar presentations
First Order Logic Logic is a mathematical attempt to formalize the way we think. First-order predicate calculus was created in an attempt to mechanize.
Advertisements

L41 Lecture 2: Predicates and Quantifiers.. L42 Agenda Predicates and Quantifiers –Existential Quantifier  –Universal Quantifier 
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
For Friday, read chapter 6, section 2. As nongraded HW, do the problems on p Graded Homework #7 is due on Friday at the beginning of class.
Search in the semantic domain. Some definitions atomic formula: smallest formula possible (no sub- formulas) literal: atomic formula or negation of an.
March 5: more on quantifiers We have encountered formulas and sentences that include multiple quantifiers: Take, for example: UD: People in Michael’s office.
Last time Proof-system search ( ` ) Interpretation search ( ² ) Quantifiers Equality Decision procedures Induction Cross-cutting aspectsMain search strategy.
Predicate Calculus.
CSE115/ENGR160 Discrete Mathematics 01/20/11 Ming-Hsuan Yang UC Merced 1.
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.
Predicates & Quantifiers Goal: Introduce predicate logic, including existential & universal quantification Introduce translation between English sentences.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Discussion #141/20 Discussion #14 Predicate Calculus.
11 Table 2.1 defines a correspondence between a set of percent scores and a set of letter grades. For each score from 0 to 100, there corresponds only.
1st-order Predicate Logic (FOL)
ARTIFICIAL INTELLIGENCE Lecture 3 Predicate Calculus.
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.
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.
Copyright © Cengage Learning. All rights reserved. CHAPTER 3 THE LOGIC OF QUANTIFIED STATEMENTS THE LOGIC OF QUANTIFIED STATEMENTS.
Copyright © Curt Hill Quantifiers. Copyright © Curt Hill Introduction What we have seen is called propositional logic It includes.
LDK R Logics for Data and Knowledge Representation PL of Classes.
Formal Methods in Software Engineering 1
Lecture 4: Predicates and Quantifiers; Sets.
CS6133 Software Specification and Verification
Word Problem Consider the following problem: To register, you will need either a yellow card or a note from the Dean. To obtain a note from the Dean you.
1 Introduction to Abstract Mathematics Predicate Logic Instructor: Hayk Melikya Purpose of Section: To introduce predicate logic (or.
CSS342: Quantifiers1 Professor: Munehiro Fukuda. CSS342: Quantifiers2 Review of Propositions Proposition: a statement that is either true or false, but.
Discrete Mathematics CS 2610 August 22, Agenda Last class Propositional logic Logical equivalences This week Predicate logic & rules of inference.
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
Fall 2008/2009 I. Arwa Linjawi & I. Asma’a Ashenkity 1 The Foundations: Logic and Proofs Predicates and Quantifiers.
CS 285- Discrete Mathematics Lecture 4. Section 1.3 Predicate logic Predicate logic is an extension of propositional logic that permits concisely reasoning.
1 First order theories (Chapter 1, Sections 1.4 – 1.5) From the slides for the book “Decision procedures” by D.Kroening and O.Strichman.
Predicate Logic One step stronger than propositional logic Copyright © Curt Hill.
Copyright © Peter Cappello 2011 Predicates & Quantifiers.
November 12, 2009Theory of Computation Lecture 17: Calculations on Strings II 1 Numerical Representation of Strings First, we define two primitive recursive.
Albert Gatt LIN3021 Formal Semantics Lecture 3. Aims This lecture is divided into two parts: 1. We make our first attempts at formalising the notion of.
PREDICATE CALCULS In Propositional Calculus, each atomic symbol denotes a proposition. But there is no way to access the components of an individual assertion.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
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.
PREDICATES AND QUANTIFIERS COSC-1321 Discrete Structures 1.
Lecture 041 Predicate Calculus Learning outcomes Students are able to: 1. Evaluate predicate 2. Translate predicate into human language and vice versa.
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:
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.
Chapter 2 1. Chapter Summary Sets (This Slide) The Language of Sets - Sec 2.1 – Lecture 8 Set Operations and Set Identities - Sec 2.2 – Lecture 9 Functions.
“It is impossible to define every concept.” For example a “set” can not be defined. But Here are a list of things we shall simply assume about sets. A.
Introduction to Logic for Artificial Intelligence Lecture 2
(State) Model-Based Approaches I Software Specification Lecture 35
Logic II CSE 140 etc..
Chapter 3 The Logic of Quantified Statements
Predicate Calculus Discussion #14 Chapter 2, Section 1 1/20.
Discussion #14 Predicate Calculus
Semantics In propositional logic, we associate atoms with propositions about the world. We specify the semantics of our logic, giving it a “meaning”. Such.
Today’s Topics Universes of Discourse
CS201: Data Structures and Discrete Mathematics I
Predicate Calculus Discussion #14 Chapter 2, Section 1.
Mathematics for Computer Science MIT 6.042J/18.062J
1st-order Predicate Logic (FOL)
MA/CSSE 474 More Math Review Theory of Computation
Discrete Mathematics Lecture 3: Predicate and Quantifier
CS201: Data Structures and Discrete Mathematics I
Logic Logic is a discipline that studies the principles and methods used to construct valid arguments. An argument is a related sequence of statements.
Predicate Calculus. Predicate Calculus Topics Predicates Variables and instantiation Quantifiers Logical expressions Bound and free variables.
Representations & Reasoning Systems (RRS) (2.2)
1st-order Predicate Logic (FOL)
Presentation transcript:

Semantics of Predicate Calculus For the propositional calculus, an interpretation was simply an assignment of truth values to the proposition letters of a formula. We could then evaluate whether or not the entire formula was true or false. In predicate calculus, we must consider the domain that is under discussion and this makes life more difficult.

Example of Domain For example, consider the formula: ∃ x ∀ y lessThanOrEqual(x,y) (there is an element less than or equal to all others) If the domain is the natural numbers, the formula is true (take x to be 0). If the domain is the reals, the formulas is false – there is no minimal element.

Interpretations Any interpretation for predicate calculus must include the domain of discourse, or universe, D. That is, a non-empty set which contains the elements that the formulas will speak about. In propositional calculus we had to map each proposition symbol to a value, true or false. Since predicate symbols have arguments, we must map each to a Boolean function of the same number of arguments.

Mapping Predicates A predicate symbol applied to terms, maps those terms into the values true or false. The interpretation for a predicate symbol must be a Boolean function that maps the same number of elements of D to true or false, i.e., a function from D n to {true, false}.

Example For example, if D is ℜ (the reals), the predicate symbol lessThan could be mapped into the Boolean function ≤ which maps two reals to true of false. If D is “the set of people in the world” then the predicate symbol loves could be mapped into the Boolean function loves(x,y) which is true when person x loves person y.

Constants and Function symbols Similarly, function symbols must be interpreted. A function symbol maps a list of terms into another term. Since terms stand for objects in the domain of discourse, each function symbol must be mapped to a real-life function that maps a list of n elements of D into an element of D, that is, a function from D n to D. A constant is just an 0-ary function, so each constant must be mapped to an element of D.

Interpretations In summary, an interpretation has three parts: A domain of discourse, D, which is a non-empty set Each n-ary function symbol must be mapped to a real-life function from D n to D. Constants are mapped to elements of D Each n-ary predicate symbol is mapped to a Boolean function from D n to {true, false}. The constants T and F are mapped to true and false, respectively.

Example ∃ x ∀ y lessThanOrEqual(x,y) could have the following interpretation: D is the set of natural numbers lessThanOrEquals is the Boolean function ≤ There are no function symbols or constants to interpret. Given this interpretation, the formula is true.

Important Note Function and predicate symbols are just that – symbols. Despite mnemonic names, they have no inherent meaning. We could just have well given an interpretation where lessThanOrEquals was interpreted as ≥, or as the first argument divided by the second has no remainder. All are possible interpretations. The truth value of the formula depends on the interpretation given.

Another Example Consider the formula: ∀ x P(x) ^ E(x) -> x = 2. The truth value of this formula depends on the interpretation. If the interpretation is that the domain is the integers, P(x) means that x is prime, E(x) means that x is even, and = is equality, the formula is true. But if the interpretation is the same, but E(x) means that x > 0, the formula is false.

Evaluating Formulas It's straightforward to evaluate a formula in predicate calculus if not for those pesky quantifiers: Replace constants by the corresponding elements in D (given the interpretation) Replace function symbols by their corresponding functions Replace predicate symbols by their corresponding Boolean functions Then recursively evaluate the result.

Example Consider the formula: P(a) ^ E(a) -> x = 2, where the domain is the integers, a is 3, P means prime, E means even, and = is equality. Then the formula is transformed to prime(3) ^ even(3) -> 3 = 2, which evaluates to true. If a was 2, the formula still evaluates to true.

Evaluation with Variables Variables are meant to stand for a range of values. To evaluate an expression (either a formula or term) which contains variables, we must know the element the variable represents at the moment. For this reason, we need to keep track of the current value of each variable used by what is called a binding list, symbol table, or variable assignment. Think of a symbol table in a program being executed and you won't go wrong.

Evaluation with a Binding List To evaluate an expression with quantified variables, we assume that we have an interpretation and a binding list (initially empty). The binding list records the current value of each variable, i.e., which element of the domain the variable maps to. We can now evaluate each expression recursively.

Evaluation with a Binding List Constant: Get its value from the interpretation. Variable: Look up its current value in the binding list. Function term: Recursively evaluate the arguments, replace the function symbol by the corresponding function from the interpretation, and apply to args. Predicate term: Recursively evaluate the arguments, replace the predicate symbol by the corresponding function from the interpretation and apply to args.

Evaluation (cont'd) Complex predicate: Recursively evaluate the arguments and use the truth table for the operator. Quantified expression: To evaluate ∀ x P(x), for each element d in the domain D, add x -> d to the binding list and recursively evaluate P(x). If binding x to every element yields true, the formula is true. If not, the formula is false. For ∃ x P(x), add x -> d to the binding list for each d. If any of those assignments yields false, the formula is false.

Example ∃ x ∀ y lessThanOrEqual(x,y) where D is the natural numbers, lessThanOrEqual is the Boolean function ≤. The main operation is the quantifier ∃ so we bind x to 0 and recursively evaluate the expression ∀ y lessThanOrEqual(x,y), then bind x to 1 and evaluate the expression, then bind x to 2, and evaluate the expression. If any binding yields true, the formula is true, else the formula is false.

Example (cont'd) Binding list: (x -> 0). Evaluate ∀ y lessThanOrEqual(x,y). Since the main operation is ∀,we bind y to 0, and evaluate lessThanOrEqual(x,y), and then bind y to 1 and evaluate the formula, then y to 2, and evaluate, and so on. If all bindings yield true, the formula is true. If any yield false, the formula is false.

Example (cont'd) Binding list: (x -> 0, y ->0) Evaluate lessThanOrEqual(x,y). Recursively evaluate the arguments: x and y are variables, so we look them up in the binding list. x becomes 0 as does y. The meaning of lessThanOrEqual is given by the interpretation. It is the Boolean function ≤. Thus we apply ≤ to (0,0), that is, ask is 0 ≤ 0? It is, so the formula is true.

Example (cont'd) Binding list: (x -> 0, y -> 1) Evaluate: lessThanOrEqual(x,y). Using the binding list to give the values of x and y, and the interpretation to get the meaning of lessThanOrEquals, this is 0 ≤ 1, which is true. Binding list: (x -> 0, y -> 2) Evaluate: lessThanOrEqual(x,y) This is also true, as is the result of binding y to any d.

Example (cont'd) So, the result of evaluating the expression ∀ y lessThanOrEqual(x,y) with the binding list (x -> 0) is true, since binding y to any value d of D yields true. Since the main operator was ∃ x, that's all we need. Binding x to one value of d (0), yields a true formula, so the whole expression is true. Note that binding x to 1, yields false (since ~ (1 ≤ 0), but that doesn't matter. As long as binding x to one d makes the formula true, the whole expression is true.

Another Example Consider the formula: ∀ x ∀ y ∃ z (lessThan(x,y) -> lessThan(x,z) ^ lessThan(z,y)). Give one interpretation that makes this formula true and one that makes it false. Evaluate the formula given one of those interpretations.

Satisfiability and Validity If a formula has no free variables, than an interpretation (or model) satisfies the formula if the formula evaluates to true given the interpretation and the (initially) empty binding list. A formula is satisfiable if there is at least one interpretation that satisfies it. A formula is valid if all interpretations satisfy it. A formula is unsatisfiable if no interpretations satisfy it.