Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 1

2  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

3 1. The set of letters, both upper and lower case, of English alphabet 2. The set of digits: 0, 1, … 9 3. The underscore ‘_’  Symbols begin with a letter and followed by any sequence of legal letters 3

4  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

5  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

6  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

7     ¬    (universal quantifier)  (existential quantifier) Examples:  Y friends(Y,peter)  X likes(X,ice_cream) 7

8  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 sentence equal(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

9  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

10 on(c,a) on(b,d) ontable(a) ontable(d) clear(b) clear(c ) hand_empty Rule 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

11  To stack one block on top of another: Assume we want to stack X on Y: 1. Empty the hand 2. Clear X 3. Clear Y 4. pick_up X and put_down X on Y  X  Y ((hand_empty  clear(X)  clear(Y)  pick_up(X)  put_down(X,Y))  stack(X,Y)) 11

12  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

13  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

14  Modus ponens: If P is true and P  Q 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 elimination If P  Q is true the P is true and Q is true  And introduction: If P and Q are true then P  Q is true  Universal Instantiation: If a is from the domain of X,  X p(X) lets us infer p(a) 14

15  “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. P  Q is true and P is true then we can infer Q (i.e. The ground is wet) 15

16  “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

17  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

18  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


Download ppt "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."

Similar presentations


Ads by Google