27.01.2015 Views

Propositional and Predicate Calculus - Carleton University

Propositional and Predicate Calculus - Carleton University

Propositional and Predicate Calculus - Carleton University

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Propositional</strong> <strong>and</strong> <strong>Predicate</strong> <strong>Calculus</strong> 1<br />

Instructor: Dr. B. John Oommen<br />

Chancellor’s Professor<br />

Fellow: IEEE; Fellow: IAPR<br />

School of Computer Science, <strong>Carleton</strong> <strong>University</strong>, Canada.<br />

1 The primary source of these notes are the slides of Dr. Ebaa Fayyoumi<br />

from Jordan. I sincerely thank her for this.<br />

1/77


2/77<br />

Outline<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Outline<br />

Introduction<br />

Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Using Inference Rules to Produce <strong>Predicate</strong> <strong>Calculus</strong> Expressions<br />

Unification<br />

Clause Form<br />

Resolution <strong>and</strong> Theorem Proving


3/77<br />

Introduction<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Outline<br />

Introduction<br />

We will introduce the <strong>Propositional</strong> calculus <strong>and</strong> the language by which<br />

it is presented in AI<br />

We will explain the syntax <strong>and</strong> semantics of the <strong>Propositional</strong> <strong>and</strong><br />

<strong>Predicate</strong> calculus languages <strong>and</strong> the rules of inference


4/77<br />

Introduction<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence<br />

<strong>Propositional</strong> calculus uses Words, Phrases <strong>and</strong> Sentences to<br />

represent <strong>and</strong> reason about properties <strong>and</strong> relationships in the world<br />

Every Proposition has a truth value<br />

true (1)<br />

false (0)<br />

Examples of <strong>Propositional</strong> calculus:<br />

The moon is made of green cheese<br />

Open the door −→ X; Imperative.<br />

“What time is it” −→ X; Interrogative<br />

<strong>Propositional</strong> calculus consists of<br />

Syntax {Symbols <strong>and</strong> Sentences}<br />

Semantics


4/77<br />

Introduction<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence<br />

<strong>Propositional</strong> calculus uses Words, Phrases <strong>and</strong> Sentences to<br />

represent <strong>and</strong> reason about properties <strong>and</strong> relationships in the world<br />

Every Proposition has a truth value<br />

true (1)<br />

false (0)<br />

Examples of <strong>Propositional</strong> calculus:<br />

The moon is made of green cheese<br />

Open the door −→ X; Imperative.<br />

“What time is it” −→ X; Interrogative<br />

<strong>Propositional</strong> calculus consists of<br />

Syntax {Symbols <strong>and</strong> Sentences}<br />

Semantics


4/77<br />

Introduction<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence<br />

<strong>Propositional</strong> calculus uses Words, Phrases <strong>and</strong> Sentences to<br />

represent <strong>and</strong> reason about properties <strong>and</strong> relationships in the world<br />

Every Proposition has a truth value<br />

true (1)<br />

false (0)<br />

Examples of <strong>Propositional</strong> calculus:<br />

The moon is made of green cheese<br />

Open the door −→ X; Imperative.<br />

“What time is it” −→ X; Interrogative<br />

<strong>Propositional</strong> calculus consists of<br />

Syntax {Symbols <strong>and</strong> Sentences}<br />

Semantics


4/77<br />

Introduction<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence<br />

<strong>Propositional</strong> calculus uses Words, Phrases <strong>and</strong> Sentences to<br />

represent <strong>and</strong> reason about properties <strong>and</strong> relationships in the world<br />

Every Proposition has a truth value<br />

true (1)<br />

false (0)<br />

Examples of <strong>Propositional</strong> calculus:<br />

The moon is made of green cheese<br />

Open the door −→ X; Imperative.<br />

“What time is it” −→ X; Interrogative<br />

<strong>Propositional</strong> calculus consists of<br />

Syntax {Symbols <strong>and</strong> Sentences}<br />

Semantics


5/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Propositional</strong> Syntax<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence<br />

DEFINITION<br />

PROPOSITIONAL CALCULUS SYMBOLS<br />

The symbols of propositional calculus are the <strong>Propositional</strong> symbols:<br />

P, Q, R, S,...<br />

The Truth symbols:<br />

true, false<br />

And the Connectives:<br />

∧, ∨, ¬, →, ≡


6/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Propositional</strong> Syntax 1<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence<br />

DEFINITION<br />

PROPOSITIONAL CALCULUS SENTENCES<br />

Every propositional symbol <strong>and</strong> truth symbol is a sentence<br />

For example: true, P, Q, <strong>and</strong> R are sentences<br />

The negation of a sentence is a sentence<br />

For example: ¬P <strong>and</strong> ¬false are sentences<br />

The conjunction, or <strong>and</strong>, of two sentences is a sentence<br />

For example: P ∧¬P is a sentence


7/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Propositional</strong> Syntax 2<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence<br />

The disjunction, or or, of two sentences is a sentence<br />

For example: P ∨¬P is a sentence<br />

the implication of one sentence from another is a sentence<br />

For example: P → Q is a sentence<br />

The equivalence of two sentences is a sentence<br />

For example: P ∨ Q ≡ R is a sentence<br />

Legal sentences are also called well-formed formulae or WFFs


8/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Propositional</strong> Syntax 3<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence<br />

The expression of the form (P ∧ Q) (P <strong>and</strong> Q) is called a “Conjunct”<br />

The expression of the form (P ∨ Q) (P or Q) is called a “Disjunct”<br />

The expression of the form (P ⇒ Q) (P implies Q),<br />

P is the “premise” or “antecedent”<br />

Q is a “conclusion” or “consequent”


9/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Propositional</strong> Semantics 1<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence<br />

DEFINITION<br />

PROPOSITIONAL CALCULUS SEMANTICS<br />

An interpretation of a set of propositions is the assignment of a truth value,<br />

either T or F, to each propositional symbol<br />

The symbol true is always assigned the value T, <strong>and</strong> the symbol false is<br />

assigned F<br />

The interpretation or truth value for sentences is determined by:<br />

The truth assignment of negation,¬P, where P is any propositional<br />

symbol, is F if the assignment to P is T, <strong>and</strong> T if the assignment to P is F<br />

The truth assignment of conjunction,∧, is T only when both conjuncts<br />

have truth value T; Otherwise it is F


10/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Propositional</strong> Semantics 2<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence<br />

The truth assignment of disjunction,∨, is F only when both disjuncts<br />

have truth value F; Otherwise it is T<br />

The truth assignment of implication,→, is F only when the premise or<br />

symbol before the implication is T <strong>and</strong> the truth value of the consequent<br />

or symbol after the implication is F; Otherwise it is T<br />

The truth assignment of equivalence,≡, is T only when both<br />

expressions have the same truth assignment for all possible<br />

interpretations; Otherwise it is F


11/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Propositional</strong> Semantic: Negation<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence<br />

Negation: “The Not” symbol “¬”<br />

P : I am going to town<br />

¬P : I am not going to town<br />

That is: It is not the case that I am going to town.<br />

P ¬P<br />

T F<br />

F T


12/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence<br />

<strong>Propositional</strong> Semantics: Conjunction<br />

Conjunction: The “<strong>and</strong>” symbol “ ∧ ”<br />

P : I am going to town<br />

Q : It is going to rain<br />

P ∧ Q : I am going to town <strong>and</strong> it is going to rain.<br />

P Q P ∧ Q<br />

T T T<br />

T F F<br />

F T F<br />

F F F


13/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence<br />

<strong>Propositional</strong> Semantics: Disjunction<br />

Disjunction: The “or” symbol “ ∨ ”<br />

P : I am going to town<br />

Q : It is going to rain<br />

P ∨ Q : I am going to town or it is going to rain.<br />

P Q P ∨ Q<br />

T T T<br />

T F T<br />

F T T<br />

F F F


14/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence<br />

<strong>Propositional</strong> Semantics: Implication<br />

Implication: “If...then...” symbol →<br />

P : I am going to town<br />

Q : It is going to rain<br />

P → Q : If I am going to town then it is going to rain.<br />

P Q P → Q<br />

T T T<br />

T F F<br />

F T T<br />

F F T


15/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence<br />

<strong>Propositional</strong> Semantics: Biconditional<br />

Biconditional: The “if <strong>and</strong> only if” symbol “↔”<br />

P : I am going to town<br />

Q : It is going to rain<br />

P ↔ Q : I am going to town if <strong>and</strong> only if it is going to rain.<br />

P Q P ↔ Q<br />

T T T<br />

T F F<br />

F T F<br />

F F T


16/77<br />

<strong>Propositional</strong> Laws<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence


17/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Propositional</strong> Example<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence


18/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence<br />

Constructing New Logical Equivalence<br />

Proof: ¬(p → q) ≡ p∧¬q<br />

¬(¬p ∨ q)<br />

¬(¬p)∧¬q<br />

p ∧¬q<br />

Using Implication<br />

Using De Morgan’s Law<br />

Using Double Negation


19/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence<br />

Constructing New Logical Equivalence<br />

Proof: ¬(p∨(¬p∧ q)) ≡ ¬p∧¬q<br />

¬p ∧¬(¬p ∧ q) Using De Morgan’s Law<br />

¬p ∧(p ∨¬q) Using De Morgan’s Law<br />

<strong>and</strong> Double Negation<br />

(¬p ∧ p)∨(¬p ∧¬q) Using Distribution Law<br />

F ∨(¬p∧¬q) Using Negation Law<br />

¬p ∧¬q Using Identity Law


20/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Propositional</strong> Syntax<br />

<strong>Propositional</strong> Semantic<br />

Constructing New Logical Equivalence<br />

Constructing New Logical Equivalence<br />

Proof: p ∧ q → p ∨ q ≡ T<br />

¬(p ∧ q)∨(p∨q)<br />

(¬p ∨¬q)∨(p∨q)<br />

(¬p ∨ p)∨(¬q ∨ q)<br />

T ∨ T<br />

T<br />

Using Implication<br />

Using De Morgan’s Law<br />

Using Commutative Law<br />

Using Domination Law<br />

Using Tautology


21/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Introduction<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

In <strong>Propositional</strong> calculus:<br />

Each atomic symbol P, Q or R represents a single proposition<br />

There is no way to access the component of an individual assertion<br />

<strong>Predicate</strong> calculus exists for the following reasons:<br />

We want to Access the component of an individual assertion<br />

We want to Manipulate predicate calculus expressions<br />

We want to Infer new predicate sentences


22/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Introduction<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

Instead of saying P = “It rains on Tuesday”.<br />

We could create a “predicate” weather in order to describe the relationship<br />

between the weekday <strong>and</strong> the weather.<br />

weather(tuesday, rainy)


23/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Introduction<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

We could generalize this. Describe the weather for any day in the week as:<br />

weather(sunday,rainy)<br />

weather(monday,rainy)<br />

weather(tuesday,rainy)<br />

.<br />

weather(X,rainy)<br />

weather(X,sunny)<br />

weather(X,windy)<br />

.<br />

weather(X,Y)<br />

X is a variable representing the day of the week<br />

Y is a variable representing the weather on a day


24/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

DEFINITION<br />

PREDICATE CALCULUS SYMBOLS<br />

Alphabet of the symbols of the predicate calculus are:<br />

1. The set of letters, both upper <strong>and</strong> lowercase, of the English alphabet<br />

2. The set of digits, 0, 1, 2,..., 9<br />

3. The underscore, _<br />

Symbols in the predicate calculus begin with a letter <strong>and</strong> are followed by any<br />

sequence of these legal characters


25/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

Legitimate characters in the alphabet of predicate calculus symbols include<br />

a R 6 9 p _ z<br />

Examples of characters not in the alphabet include<br />

# % / & ¨"<br />

Legitimate predicate calculus symbols include<br />

George fire3 tom_<strong>and</strong>_jerry bill XXXX friends_of<br />

Examples of strings that are not legal symbols are<br />

3jack "no blanks allowed" ab%cd ***71 duck!!!


26/77<br />

Important Notes<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

l(j,k) ≡ like(john,kate).<br />

These two expressions are equivalent<br />

The second expression can be of great help<br />

Indicates what relationship the expression presents<br />

Descriptive names: Improves the expression’s readability<br />

Improper Symbols are<br />

Parentheses “()”<br />

Comma “,”<br />

Period “.”<br />

These are used to construct a WFF


Important Notes<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

<strong>Predicate</strong> calculus may represent<br />

Constants:<br />

Specifying certain object/property in the world<br />

Must start with a lowercase letter<br />

Examples: blue, tree <strong>and</strong> tall.<br />

“true” <strong>and</strong> “false” are reserved truth symbols<br />

Variables:<br />

Specifying general class of objects/properties in the world<br />

Must start with an uppercase letter<br />

Kate <strong>and</strong> George are legal variables.<br />

bill <strong>and</strong> george are not legal variables.<br />

Functions:<br />

Maps one or more elements in the domain<br />

To a unique elements in the range<br />

Must start with a lowercase letter.<br />

27/77


Important Notes<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

<strong>Predicate</strong> calculus may represent<br />

Constants:<br />

Specifying certain object/property in the world<br />

Must start with a lowercase letter<br />

Examples: blue, tree <strong>and</strong> tall.<br />

“true” <strong>and</strong> “false” are reserved truth symbols<br />

Variables:<br />

Specifying general class of objects/properties in the world<br />

Must start with an uppercase letter<br />

Kate <strong>and</strong> George are legal variables.<br />

bill <strong>and</strong> george are not legal variables.<br />

Functions:<br />

Maps one or more elements in the domain<br />

To a unique elements in the range<br />

Must start with a lowercase letter.<br />

27/77


Important Notes<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

<strong>Predicate</strong> calculus may represent<br />

Constants:<br />

Specifying certain object/property in the world<br />

Must start with a lowercase letter<br />

Examples: blue, tree <strong>and</strong> tall.<br />

“true” <strong>and</strong> “false” are reserved truth symbols<br />

Variables:<br />

Specifying general class of objects/properties in the world<br />

Must start with an uppercase letter<br />

Kate <strong>and</strong> George are legal variables.<br />

bill <strong>and</strong> george are not legal variables.<br />

Functions:<br />

Maps one or more elements in the domain<br />

To a unique elements in the range<br />

Must start with a lowercase letter.<br />

27/77


28/77<br />

Important Notes<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

Each function has an associated arity<br />

Indicates the number of elements in the domain mapped<br />

Which maps onto each element of the range<br />

father(sam) → arity = 1.<br />

plus(x1, x2)→ arity = 2.<br />

Function expression: Function symbol followed by its arguments<br />

Arguments: Elements from the function’s domain<br />

Number of the arguments equals the function’s arity<br />

Arguments: Enclosed in parentheses; Separated by commas


29/77<br />

Important Notes<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

Value of the function:<br />

Single object in the range that the arguments are mapped to.<br />

Examples:<br />

The value of the function “father(sam)” is george.<br />

The value of the function “plus(one, two)” is three.<br />

Evaluation involves replacing the function with its value


30/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

The Syntax of Atomic Sentences<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

DEFINITION<br />

SYMBOLS <strong>and</strong> TERMS<br />

<strong>Predicate</strong> calculus symbols include:<br />

1. Truth Symbols true <strong>and</strong> false (these are reserved symbols)<br />

2. Constant Symbols are symbol expressions beginning with an lowercase<br />

character<br />

3. Variable Symbols are symbol expressions beginning with an uppercase<br />

character<br />

4. Function Symbols are symbol expressions having the first character<br />

lowercase. Functions have an attached arity indicating the number of<br />

elements of the domain mapped onto each element of the range


31/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

A function expression consists of a function constant of arity n followed by n<br />

terms, t 1 , t 2 , ..., t n, enclosed in parentheses <strong>and</strong> separated by commas.<br />

A predicate calculus term is either a constant, varaible or function expression.


32/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Predicate</strong>s <strong>and</strong> Atomic Sentences<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

An Atomic sentence is a primitive unit of the predicate language.<br />

An Atomic sentence is a predicate with arity followed by n terms<br />

Enclosed between parentheses <strong>and</strong> separated by commas.<br />

Examples:<br />

friends(george, kate)<br />

friends(george, X)<br />

friends(george, sara, sam)<br />

friends(father(david), father(sara)) → friends(mike, john)


33/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Predicate</strong>s <strong>and</strong> Atomic Sentences<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

DEFINITION<br />

PREDICATES <strong>and</strong> ATOMIC SENTENCES<br />

<strong>Predicate</strong> symbols are symbols beginning with a lowercase letter<br />

<strong>Predicate</strong>s have an associated positive integer referred to as the arity or<br />

“argument number” for the predicate <strong>Predicate</strong>s with the same name but<br />

different arities are considered distinct.<br />

An atomic sentence is a predicate constant of arity n followed by n terms, t 1 ,<br />

t 2 , ..., t n, enclosed in parentheses <strong>and</strong> separated by commas<br />

The truth values, true <strong>and</strong> false, are also atomic sentences


34/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Predicate</strong>s <strong>and</strong> Atomic Sentences<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

Atomic sentences might be combined by using the logical operations:<br />

not: ¬<br />

<strong>and</strong>: ∧<br />

or: ∨<br />

if: →<br />

equivalence: ≡<br />

universal quantifier: ∀<br />

existential quantifier: ∃


35/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Predicate</strong>s <strong>and</strong> Atomic Sentences<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

Consider: ∀X likes(X, cake)<br />

This sentence will be true when all of the values of the variable (that<br />

belong to the disclosure domain) satisfy this predicate<br />

Consider: ∃X friends(X, sara)<br />

This sentence will be true when there is at least one value of the<br />

variable (that belongs to the disclosure domain) that satisfies this<br />

predicate


36/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Predicate</strong>s <strong>Calculus</strong> Sentences<br />

DEFINITION<br />

PREDICATE CALCULUS SENTENCES<br />

Every atomic sentence is a sentence.<br />

1. If s is a sentence, so is its negation, ¬s<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

2. If s 1 <strong>and</strong> s 2 are sentences, then so is their conjunction s 1 ∧ s 2<br />

3. If s 1 <strong>and</strong> s 2 are sentences, then so is their disjunction s 1 ∨ s 2<br />

4. If s 1 <strong>and</strong> s 2 are sentences, then so is their implication s 1 → s 2<br />

5. If s 1 <strong>and</strong> s 2 are sentences, then so is their equivalence s 1 ≡ s 2<br />

6. If X is a variable <strong>and</strong> s a sentence, then ∀X s is a sentence.<br />

7. If X is a varaible <strong>and</strong> s a sentence, then ∃X s is a sentence.


Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Predicate</strong>s <strong>Calculus</strong> Sentences<br />

verify_sentence algorithm<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

function verify_sentence(expression);<br />

begin<br />

case<br />

expression is an atomic sentence: return SUCCESS<br />

expression is of the form QXs where Q is either∀ or ∃, X is a variable, <strong>and</strong> s is an expression;<br />

if verify_sentence(s) returns SUCCESS<br />

then return SUCCESS<br />

else return FAIL<br />

expression is of the form ¬s:<br />

if verify_sentence(s) returns SUCCESS<br />

then return SUCCESS<br />

else return FAIL<br />

if verify_sentence(s)returns SUCCESS<br />

then return SUCCESS<br />

else return FAIL<br />

expression is of the form s 1 op s 2 , where op is a binary logical operator:<br />

if verify_sentence(s_1)returns SUCCESS <strong>and</strong><br />

verify_sentence(s_2)returns SUCCESS<br />

then return SUCCESS<br />

else return FAIL;<br />

otherwise: return FAIL<br />

end<br />

end<br />

37/77


38/77<br />

Examples<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

Examples: Determine whether the following is a sentence or not.<br />

plus(two,three)<br />

No<br />

equal(plus(two, three), five)<br />

Yes<br />

equal(plus(two, three), seven)<br />

Yes<br />

∃X likes(X, ice-cream) ∧ equal(plus(two, three), five) Yes


39/77<br />

Examples<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

Write a predicate calculus expression in order to capture the following<br />

relationships by using the provided facts.<br />

parent(mike, sam)<br />

parent(sara, sam)<br />

parent(mike, john)<br />

parent(sara, john)<br />

female(sara)<br />

male(mike)<br />

male(john)<br />

male(sam)


40/77<br />

Examples<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

Mother relationship: ∀X∀Y parent(X,Y)∧ female(X)<br />

Son relationship: ∀X∀Y parent(X,Y)∧ male(Y)<br />

Sibling relationship: ∀X∀Y∀Z parent(X,Y)∧ parent(X,Z)<br />

Brother relationship: ∀X∀Y∀Z parent(X,Y)∧ parent(X,Z)∧ male(Y)


41/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Semantics for <strong>Predicate</strong> <strong>Calculus</strong><br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

DEFINITION: INTERPRETATION<br />

Let the domain D be a nonempty set.<br />

An interpretation over D is an assignment of the entities of D to each of the constant,<br />

variable, predicate, <strong>and</strong> function symbols of a predicate calculus expression, such that:<br />

1. Each constant is assigned an element of D<br />

2. Each variable is assigned to a nonempty subset of D; these are the allowable<br />

substitutions for that variable<br />

3. Each function f or arity m is defined on m arguments of D <strong>and</strong> defines a mapping<br />

from D m into D<br />

4. Each predicate p of arity n is defined on n arguments from D <strong>and</strong> defines a<br />

mapping from D n into {T, F}


42/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Semantics for <strong>Predicate</strong> <strong>Calculus</strong><br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

DEFINITION:TRUTH VALUES OF PRED. CALC. EXPRESSIONS<br />

Assume an expression E <strong>and</strong> an interpretation I for E over a nonempty domain D<br />

The truth value for E is determined by:<br />

1. The value of a constant is the element of D it is assigned to by I<br />

2. The value of a variable is the set of elements of D it is assigned to by I<br />

3. The value of a function expression is that element of D obtained by evaluating the<br />

function for the parameter values assigned by the interpretation.<br />

4. The value of truth symbol “true” is T <strong>and</strong> “false” is F.<br />

5. The value of an atomic sentence is either T or F<br />

6. The value of the negation of a sentence is T if the value of the sentence is F <strong>and</strong> is<br />

F if the value of the sentence is T


43/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Semantics for <strong>Predicate</strong> <strong>Calculus</strong><br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

1. The value of the conjunction of two sentences is T if the value of both the sentences<br />

is T <strong>and</strong> is F otherwise<br />

2. The truth value of expressions using ∨, →, ≡ is determined from the value of their<br />

oper<strong>and</strong>s as defined earlier<br />

Finally, for a variable X <strong>and</strong> a sentence S containing X:<br />

3. The value of ∀X S is T if S is T for all assignments to X under I, <strong>and</strong> it is F otherwise<br />

4. The value ∃X S is T if there is an assignment to X in the interpretation under which<br />

S is T; otherwise it is F


44/77<br />

Definitions<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

friends(sara, X) XεD = {sam, george, lura, mike, louis, nel}<br />

X can be replaced by any other dummy variable such as Y<br />

Any variable: Quantified by its universal or existential quantifier<br />

∀X∃Y(parent(X,Y)∧female(Y))∧ like(X, Z)<br />

Variable X in parent(X, Y):<br />

Bounded by the universal quantifier<br />

Variable Y in parent(X,Y) <strong>and</strong> female(Y):<br />

Bounded by the existential quantifier<br />

Variables X <strong>and</strong> Z in like(X,Z) are free variables


Definitions<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

Closed expression:<br />

An expression is “closed” if all of its variables are quantified<br />

i.e., ∀X∃Yparent(X,Y)<br />

Ground expression:<br />

An expression is “ground” if it does not contain any variable<br />

i.e., i.e., P ∧(Q ∨(R → S)).<br />

Parentheses are used to indicate the scope of quantification<br />

∀X∃Y(parent(X,Y)<br />

X <strong>and</strong> Y belong to certain domain<br />

If the domain of an interpretation is infinite:<br />

Exhaustive testing of all substitutions to a universally <strong>and</strong><br />

existential quantified variable is computationally impossible<br />

The algorithm may never halt<br />

45/77


Definitions<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

Closed expression:<br />

An expression is “closed” if all of its variables are quantified<br />

i.e., ∀X∃Yparent(X,Y)<br />

Ground expression:<br />

An expression is “ground” if it does not contain any variable<br />

i.e., i.e., P ∧(Q ∨(R → S)).<br />

Parentheses are used to indicate the scope of quantification<br />

∀X∃Y(parent(X,Y)<br />

X <strong>and</strong> Y belong to certain domain<br />

If the domain of an interpretation is infinite:<br />

Exhaustive testing of all substitutions to a universally <strong>and</strong><br />

existential quantified variable is computationally impossible<br />

The algorithm may never halt<br />

45/77


Definitions<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

Closed expression:<br />

An expression is “closed” if all of its variables are quantified<br />

i.e., ∀X∃Yparent(X,Y)<br />

Ground expression:<br />

An expression is “ground” if it does not contain any variable<br />

i.e., i.e., P ∧(Q ∨(R → S)).<br />

Parentheses are used to indicate the scope of quantification<br />

∀X∃Y(parent(X,Y)<br />

X <strong>and</strong> Y belong to certain domain<br />

If the domain of an interpretation is infinite:<br />

Exhaustive testing of all substitutions to a universally <strong>and</strong><br />

existential quantified variable is computationally impossible<br />

The algorithm may never halt<br />

45/77


46/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

<strong>Predicate</strong> Equivalences<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

Here are some predicate equivalences<br />

1 ¬∃X p(X) = ∀X ¬p(X)<br />

2 ¬∀X p(X) = ∃X ¬p(X)<br />

3 ∃X p(X) = ∃Y P(Y)<br />

4 ∀X p(X) = ∀Y P(Y)<br />

5 ∀X(p(X)∧q(X)) = ∀X p(X)∧∀Y q(Y)<br />

6 ∃X(p(X)∨q(X)) = ∃X p(X)∨∃Y q(Y)


47/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

First Order <strong>Predicate</strong> <strong>Calculus</strong><br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

DEFINITION: FIRST-ORDER PREDICATE CALCULUS<br />

First-order predicate calculus allows quantified variables to refer to<br />

objects in the domain of discourse <strong>and</strong> not to predicates or functions.


48/77<br />

Example<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

Translate the following English sentence to predicate calculus:<br />

If it does not rain on Thursday, Sara will go to the beach.<br />

¬weather(thursday,rain) → goes(sara, beach)<br />

All basketball players are tall.<br />

∀X basketball_player(X) → tall(X)<br />

Nobody likes taxes.<br />

¬∃X likes(X, taxes)


48/77<br />

Example<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

Translate the following English sentence to predicate calculus:<br />

If it does not rain on Thursday, Sara will go to the beach.<br />

¬weather(thursday,rain) → goes(sara, beach)<br />

All basketball players are tall.<br />

∀X basketball_player(X) → tall(X)<br />

Nobody likes taxes.<br />

¬∃X likes(X, taxes)


48/77<br />

Example<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

Translate the following English sentence to predicate calculus:<br />

If it does not rain on Thursday, Sara will go to the beach.<br />

¬weather(thursday,rain) → goes(sara, beach)<br />

All basketball players are tall.<br />

∀X basketball_player(X) → tall(X)<br />

Nobody likes taxes.<br />

¬∃X likes(X, taxes)


49/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

<strong>Predicate</strong>s <strong>and</strong> Sentences: Syntax<br />

General Important Notes<br />

Atomic Sentences<br />

<strong>Predicate</strong> <strong>Calculus</strong>: Semantics<br />

<strong>Predicate</strong> Equivalences<br />

Some Examples<br />

Example: Block World Relationship


50/77<br />

Introduction<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

Some Definitions<br />

Inference Rules<br />

Example<br />

An expression X logically follows from a set of expressions S<br />

If every interpretation that satisfies S also satisfies X<br />

An interpretation that makes the sentence true<br />

Is said to satisfy that sentence<br />

Question: Why Inference Rules for <strong>Predicate</strong> Systems (PS)<br />

Question: What is the meaning of Inference Rule<br />

PS: Can have an infinite number of possible interpretations<br />

These are very hard to be traced or tested<br />

Inference Rules: Used to determine when an expression is<br />

logically followed


51/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

Some Definitions<br />

Inference Rules<br />

Example<br />

Introduction<br />

Inference Rule (IR)<br />

Is a “mechanical” means<br />

Can produce new predicate sentence from other sentences<br />

Inference Rules: Classified as being Sound or Complete.<br />

Sound Inference Rule:<br />

Expression produced by the IR logically follows from S<br />

Complete Inference Rule:<br />

It has the ability to produce every expression that logically<br />

follows from S


52/77<br />

Definitions<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

Some Definitions<br />

Inference Rules<br />

Example<br />

DEFINITION: SATISFY, MODEL, VALID, INCONSISTENT<br />

For a predicate calculus expression X <strong>and</strong> interpretation I,<br />

If X has a value of T under I <strong>and</strong> a particular variable assignment, then I<br />

said to satisfy X<br />

If I satisfies X for all variable assignments, then I is a model of X<br />

X is satisfiable if <strong>and</strong> only of there exist an interpretation <strong>and</strong> variable<br />

assignment that satisfy it; otherwise, it is unsatisfiable<br />

A set of expressions is satisfiable if <strong>and</strong> only if there exist an<br />

interpretation <strong>and</strong> variable assignment that satisfy ever element<br />

If a set of expressions is not satisfiable, it is said to be inconsistent<br />

If X has a value T for all possible interpretations, X is said to be valid


53/77<br />

Some Definitions<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

Some Definitions<br />

Inference Rules<br />

Example<br />

Examples of Inconsistent <strong>and</strong> Valid predicate sentences<br />

∃X p(X)∧¬p(X) ⇒ “Inconsistence”.<br />

∀X p(X)∨¬p(X) ⇒ “Valid”.


54/77<br />

Unification 1<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

Some Definitions<br />

Inference Rules<br />

Example<br />

DEFINITION: LOGICALLY FOLLOWS, SOUND <strong>and</strong> COMPLETE<br />

A predicate calculus expression X logically follows from a set S of predicate calculus<br />

expressions if every interpretation <strong>and</strong> variable assignment that satisfies S also<br />

satisfies X<br />

An inference rule is sound if every predicate calculus expression produced by the rule<br />

from a set S of predicate calculus expressions also logically follows from S<br />

An inference rule is complete if, given a set S of predicate calculus expressions, the<br />

rule can infer every expression that logically follows from S


55/77<br />

Unification 2<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

Some Definitions<br />

Inference Rules<br />

Example<br />

DEFINITION:<br />

MODUS PONENS, MODUS TOLLENS, AND ELIMINATION, AND<br />

INTRODUCTION, <strong>and</strong> UNIVERSAL INSTANTIATION<br />

If the sentences P <strong>and</strong> P → Q are known to be true, then modus ponens lets us infer Q<br />

Under the inference rule modus tollens, if P → Q known to be true <strong>and</strong> Q is known to<br />

be false, we can infer ¬P<br />

And Elimination allows us to infer the truth of either of the conjuncts from the truth of a<br />

conjunctive sentence For instance, P∧Q lets us conclude P <strong>and</strong> Q are true<br />

And Introduction allows us to infer the truth of the conjunction from the truth of the<br />

conjuncts For instance, if P <strong>and</strong> Q are true, then P∧Q is true<br />

Universal Instantiation states that if any universally quantified variable in a true<br />

sentence is replaced by any appropriate term from the domain, the result is a true<br />

sentence. Thus, if a is from the domain of X, then ∀X p(X) lets us infer p(a).


56/77<br />

Inference Rules<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

Some Definitions<br />

Inference Rules<br />

Example<br />

Modus Ponens<br />

Modus Tollens<br />

P → Q<br />

P → Q<br />

P ¬Q<br />

−−−−− −−−−−<br />

Q ¬P<br />

And Elimination<br />

P ∧ Q<br />

−−−−−<br />

P<br />

Q<br />

And Introduction<br />

P<br />

Q<br />

−−−−−<br />

P ∧ Q


57/77<br />

Inference Rules<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

Some Definitions<br />

Inference Rules<br />

Example<br />

Universal Instantiation<br />

∀X tall(X)<br />

−−−−−<br />

tall(sara)


58/77<br />

Example 1<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

Some Definitions<br />

Inference Rules<br />

Example<br />

Determine (Justify) whether the following arguments are valid or invalid<br />

All men are mortal. Socrates is man. Therefore, Socrates is mortal<br />

Solution<br />

It is valid using Universal Instantiation <strong>and</strong> Modes Ponens IRs.<br />

∀X man(X) → mortal(X)<br />

man(socrates)<br />

man(socrates) → mortal(socrates)<br />

man(socrates)<br />

∴ mortal(socrates)


59/77<br />

Example 2<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

Some Definitions<br />

Inference Rules<br />

Example<br />

Determine (Justify) whether the following arguments are valid or invalid<br />

Sara is a student in COMP1805.<br />

Sara does not read the book.<br />

Everyone in COMP1805 passed the midterm exam.<br />

Therefore, Sara passed the midterm <strong>and</strong> she did not read the book.<br />

Solution<br />

S(X): X is a student in class COMP1805.<br />

R(X): X is a student who does not read the book.<br />

P(X): X is a student who passes the midterm exam.


60/77<br />

Example 2<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

Some Definitions<br />

Inference Rules<br />

Example<br />

S(Sara)<br />

¬R(Sara)<br />

∀X S(X) → P(X)<br />

S(Sara) → P(Sara)<br />

S(Sara)<br />

P(Sara)<br />

¬R(Sara)<br />

∴ P(Sara)∧¬R(Sara)<br />

Univ. Instantiation<br />

Modus Ponens<br />

Conjunction<br />

The Assertion is Valid


61/77<br />

Unification<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

Skolemization<br />

Example<br />

Unification: Determine if the following two sentences are similar or not<br />

<strong>Propositional</strong> calculus→ Very trivial<br />

<strong>Predicate</strong> calculus → Very difficult (because of variables)<br />

X/Y means X is substituted for the variable Y<br />

The substitution→ Binding


62/77<br />

Unification<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

Skolemization<br />

Example<br />

Examples: What is the final value of Y <strong>and</strong> Z<br />

{X/Y, W/Z}, {V/X}, {a/V, f(b)/W}<br />

<strong>Predicate</strong> calculus expression should be transformed to list syntax.<br />

p(a,b) → (p a b).<br />

p(f(a),g(X,Y))→ (p (f(a)) (g(X,Y))).<br />

equal(eva, mother(sara))→ (equal eva (mother(sara))).


63/77<br />

Skolemization<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

Skolemization<br />

Example<br />

Skolemization is a process of replacing each existentially quantified<br />

variable with a function that returns the appropriate constant<br />

Eliminating existentially quantified variable is complicated due to the<br />

dependency of this variable on another variables<br />

∀X ∃Y mother(X, Y) It is equivalent to ∀X mother(X, f(X))<br />

∀X ∀Y ∃Z m(X, Y, Z) ⇒ ∀X ∀Y m(X, Y, f(X, Y))


64/77<br />

Example 1<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

Skolemization<br />

Example


64/77<br />

Example 1<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

Skolemization<br />

Example


65/77<br />

Example 2<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Introduction<br />

Skolemization<br />

Example<br />

Question:- A logical_Based Financial Advisor


66/77<br />

Clause Form<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Clause Form<br />

Resolution Theorem<br />

Examples<br />

Clause form: The logical databases as a set of disjunctions of literals<br />

∀X ([a(X)∧ b(X)] → [c(X, I)∧∃Y (∃Z c(Y, Z) → d(X, Y))])∨∀X e(X)<br />

Eliminate the if conditional→ by using disjunction a → b ≡ ¬a∨b<br />

∀X (¬[a(X)∧b(X)]∨[c(X, I)∧∃Y (∃Z ¬c(Y, Z)∨d(X, Y))])∨∀X e(X)<br />

Reduce the scope of the negation by using one of the following<br />

1 ¬(¬a) ≡ a<br />

2 ¬∃X a(X) ≡ ∀X ¬a(X)<br />

3 ¬∀X a(X) ≡ ∃X ¬a(X)<br />

4 ¬(a∧b) ≡ ¬a ∨ ¬b<br />

5 ¬(a∨b) ≡ ¬a ∧ ¬b<br />

∀X([¬a(X)∨¬b(X)]∨[c(X, I)∧∃Y(∃Z¬c(Y, Z)∨d(X, Y))])∨∀X e(X)


67/77<br />

Clause Form<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Clause Form<br />

Resolution Theorem<br />

Examples<br />

St<strong>and</strong>ardize all variables by renaming them so that variables bound by<br />

different quantifiers have unique names<br />

∀X([¬a(X)∨¬b(X)]∨[c(X, I)∧∃Y(∃Z¬c(Y, Z)∨d(X, Y))])∨∀W e(W)<br />

Move all quantifiers to the left without changing their order<br />

∀X ∃Y ∃Z ∀W([¬a(X)∨¬b(X)]∨[c(X, I)∧(¬c(Y, Z)∨d(X, Y))]∨e(W))<br />

All existential quantifiers are eliminated by Skolemization<br />

∀X ∀W([¬a(X)∨¬b(X)]∨[c(X, I)∧(¬c(f(X), g(X))∨d(X, f(X)))]∨<br />

e(W))<br />

Drop all universal quantifiers<br />

[¬a(X)∨¬b(X)]∨[c(X, I)∧(¬c(f(X), g(X))∨ d(X, f(X)))]∨e(W)


68/77<br />

Clause Form<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Clause Form<br />

Resolution Theorem<br />

Examples<br />

Convert the expression to the conjunct of disjuncts form<br />

¬a(X)∨¬b(X)∨c(X, I)∨e(W)∧<br />

¬a(X)∨¬b(X)∨¬c(f(X), g(X))∨d(X, f(X))∨ e(W)<br />

Call each conjunct a separate clause<br />

¬a(X)∨¬b(X)∨c(X, I)∨e(W)<br />

¬a(X)∨¬b(X)∨¬c(f(X), g(X))∨d(X, f(X))∨ e(W)<br />

St<strong>and</strong>ardize each variable again<br />

¬a(X)∨¬b(X)∨c(X, I)∨e(W)<br />

¬a(U)∨¬b(U)∨¬c(f(U), g(U))∨d(U, f(U))∨e(V)


69/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Resolution Theorem<br />

Clause Form<br />

Resolution Theorem<br />

Examples<br />

It is a technique for proving theorems in propositional <strong>and</strong> predicate<br />

calculus<br />

It describes a way of finding contradictions in the databases with a<br />

minimum use of substitutions<br />

Method:<br />

1 It proves a theorem by negating the statement to be proved<br />

2 It adds this negated goal to the set of axioms that are<br />

known to be true<br />

3 It uses the inference rules to show that this leads to a<br />

contradiction<br />

4 If the negated goal is inconsistent with the given set of<br />

axioms, it follows that the original goal is consistent


70/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Resolution Theorem<br />

Clause Form<br />

Resolution Theorem<br />

Examples<br />

Resolution refutation proofs involve the following steps:<br />

1. Put the premises or axioms into clause form<br />

2. Add the negation of what is to be proved, in clause form, to the set of<br />

axioms<br />

3. Resolve these clauses together, producing new clauses that logically<br />

follow from them<br />

4. Produce a contradiction by generating the empty clause<br />

5. The substitutions used to produce the empty clause are those under<br />

which the opposite of the negated goal is true


71/77<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Resolution Theorem<br />

Clause Form<br />

Resolution Theorem<br />

Examples<br />

Resolution requires the axioms <strong>and</strong> the negation of the goal to be in a<br />

normal form called clause from<br />

Clause From represents the logical databases as a set of disjunctions<br />

of literals<br />

Literal is an atomic expression or the negation of an atomic expression.<br />

In general, binary resolution is the common form of resolution<br />

It is applied to two clauses: the first one contains the literal<br />

<strong>and</strong> the second one contains its negation<br />

The literals must be unified to make them equivalent<br />

The new clause that is produced consisting of the disjuncts<br />

of all the predicates in the two clauses minus the literal <strong>and</strong><br />

its negative instance


72/77<br />

Example 1<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Clause Form<br />

Resolution Theorem<br />

Examples<br />

1 All dogs are animals<br />

2 Fido is a dog<br />

3 All animals will die<br />

4 We want to prove that “Fido will die”<br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

∀X dog(X) → animal(X)<br />

dog(fido)<br />

∀Y animal(Y) → die(Y)<br />

Negate the conclusion<br />

¬die(fido)<br />

Clause Form<br />

¬dog(X)∨animal(X).<br />

dog(fido).<br />

¬animal(Y)∨die(Y).<br />

¬die(fido).


73/77<br />

Example 1<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Clause Form<br />

Resolution Theorem<br />

Examples


74/77<br />

Example 2<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Clause Form<br />

Resolution Theorem<br />

Examples<br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Clause Form<br />

1 a ← b ∧ c 1. a∨¬b ∨¬c<br />

2 b 2. b<br />

3 c ← d ∧ e 3. c ∨¬d ∨¬e<br />

4 e∨f 4. e ∨ f<br />

5 d ∧¬f 5.1 d<br />

5.2 ¬f<br />

6 We want to prove that “a” 6. ¬a


75/77<br />

Example 2<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Clause Form<br />

Resolution Theorem<br />

Examples


76/77<br />

Example 3<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Clause Form<br />

Resolution Theorem<br />

Examples


77/77<br />

Example 4<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Clause Form<br />

Resolution Theorem<br />

Examples


77/77<br />

Example 4<br />

Outline <strong>and</strong> Introduction<br />

<strong>Propositional</strong> <strong>Calculus</strong><br />

<strong>Predicate</strong> <strong>Calculus</strong><br />

Inference Rules<br />

Unification<br />

Resolution Theorem Proving<br />

Clause Form<br />

Resolution Theorem<br />

Examples

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!