Date post: | 01-Jan-2016 |
Category: |
Documents |
Upload: | raymond-conrad |
View: | 19 times |
Download: | 1 times |
1
Provides the ability to access individual assertions.
e.g. in Predicate calculus we may say:P denotes “It rained on Tuesday” but in
predicate calculus we may have a relation called weather(tuesday,rain).
Also we can have variables such as weather(X,rain)
2
1. The set of letters, both upper and lower case, of English alphabet
2. The set of digits: 0, 1, … 93. The underscore ‘_’
Symbols begin with a letter and followed by any sequence of legal letters
3
Constant symbols begin with “small” letters Symbols true and false are reserved
constants Variables are used to designate general
classes of objects or properties. Variables begin with “capital” letters
4
They start with “small” letters
They have arity, e.g. father(?) has one arity while Plus(?,?) has 2 arity, …etc.
Examples: f(X,Y), father(david), price(house)
5
Is a predicate of arity n followed by n terms enclosed in parentheses and separated by commas.
Examlpes:likes(ahmed,Chocolate) likes(X,ahmed)likes(X,Y)
friends(aly,ahmed)friends(father_of(ahmed),father_of(aly))
6
¬ (universal quantifier)(existential quantifier)
Examples: Y friends(Y,peter)
X likes(X,ice_cream)
7
Assume time and plus are function symbols of arity 2 and assume equal and good be predicate symbols of arity 2 and 3, respectively.
plus(two,three) is a function and thus not an atomic sentence
equal(plus(two,three),five) is an atomic sentenceequal(plus(2,3),seven) is a sentence (although
seems wrong computationally) X good(X,two,plus(two,three))
equal(plus(two,three),five) is a sentence(good(two,two,plus(two,three)))
(equal(plus(three,two),five) true ) is a sentence
8
mother(amina,aly) mother(amina,mahmoud) father(hasan,aly) father(hasan,mahmoud)
X Y (father(X,Y) mother(X,Y) parent(X,Y))
X Y Z (parent(X,Y) parent(X,Z) brother(Y,Z))
9
on(c,a)on(b,d)ontable(a)ontable(d)clear(b)clear(c )hand_emptyRule describing when a block is clear:X(¬ Y on(Y,X)) clear(X))(i.e. for all X, X is clear if there does not
exist a Y such that Y is on X)
10
c
a
b
d
To stack one block on top of another:Assume we want to stack X on Y:1. Empty the hand2. Clear X3. Clear Y4. pick_up X and put_down X on YX Y ((hand_empty clear(X) clear(Y)
pick_up(X) put_down(X,Y)) stack(X,Y))
11
An interpretation that makes a sentence true is said to satisfy that sentence.
An interpretation that satisfies every member of a set of expressions is said to satisfy the set.
12
A proof procedure is a combination of an inference rule and an algorithm for applying that rule to a set of logical expressions to generate new sentences
Defn: a predicate calculus expression X logically follows from a set S of predicate calculus expressions if every interpretation and assignment that satisfies S also satisfies X.
13
Modus ponens:If P is true and PQ is known to be true then
we can infer Q. Modus tollens:If P Q is known to be true and Q is known to
be false we can infer ¬P And eliminationIf PQ is true the P is true and Q is true And introduction:If P and Q are true then PQ is true Universal Instantiation:If a is from the domain of X, X p(X) lets us
infer p(a)
14
“If it is raining then the ground will be wet” and we know “It is raining” then:
P denotes “It is raining” Q denotes “The ground is wet” i.e. PQ is true and P is true then we can
infer Q (i.e. The ground is wet)
15
“All men are mortal and Socrates is a man” “Is Socrates mortal?”
This sentence can be represented as:X (man(X) mortal(X))man(socrates) If we substitute socrates for X we get:man(scorates) moral(socrates)Then we can now infer: mortal(socrates)
16
Unification is an algorithm for determining the substitutions needed to make two predicate calculus expressions match.
Unification+inference rules (e.g. modus ponens) allow us to make inferences on a set of logical assertions.
To do this, the logical database must be expressed in an appropriate form.
17
This is done by replacing all existentially quantified variables by their corresponding constants:
e.g. X parent(X,tom) is being replaced by parent(bob,tom) or parent(mary,tom).
Complication : X Y mother(X,Y) where the value of Y is dependent on X
18