P P P R R R E E E D D D I I I C C C A A A T T T E E E C C C A A A L L L C C C U U U L L L U U U S S S P P P R R R E E E D D D I I I C C C A A A T T T E E E C C C A A A L L L C C C U U U L L L U U U S S S 4-1 ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ THE PREDICATE CALCULUS ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ The truth tables Def : Two expressions are equivalent if they have the same truth value. syntactically different but logically equivalent. It is important when using inference rules that require expressions to be in a specific form. The Predicate Calculus Propositional calculus Predicate calculus "it rained on Tuesday" weather(tuesday, rain) What's the difference? Def : Predicate calculus symbols 1. A, B, C, ... , Z, a, b, c, ..., z. 2. 0, 1, ..., 9. 3. _. Symbols: 1. Begin with a letter 2. Followed by any sequence of these legal characters. Example : legitimate characters: a R 6 9 p _ z illegitimate characters: # % @ / & "" 4
23
Embed
THE PREDICATE CALCULUS140.126.122.189/upload/1052/B02312A2017131717201.pdf · 2017-01-03 · Predicate calculus symbols may represent either variables, constants functions, or predicates.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
A real-world example: ◎ To stack a block: 1. Both blocks must be clear. 2. Hand is empty. 3. To perform pick-up and put-down. 1. Both blocks must be clear. → ∀ ¬∃ ⇒X Y Y X X( ( , ) ( ))on clear The action:
∀ ∀ − ∧ ∧∧ − ∧ −⇒
X Y X YX X Y
X Y
(( ( ( )( ) ( , ))
( , ))
hand empty clear ) clearpick up put down
stack
Note:
1. The actions must be performed in the order in which they appear in a rule premise.
2. The block-world figure is an interpretation.
3. A different set of blocks in another location → Another interpretation (I).
3. ∃X Xparent( , tom) ⇒ parent(bob,tom) or parent(mary,tom)
Assume bob and mary are tom‘s parents 4. ∀ ∃X Ymother(X,Y) ⇒ mother(X,f(X)) Y depends on X
The substitution issues 1. Any constant is not replaceable. 2.
constant 1constant 2
variable X
3. occurs check:
X P(X)
otherwise P(P(P(...(X)...)
4. consistency:
( ( ) ))man mortal(X X⇒ all occurrence of the variable 5. Time-invariant
IF X t X t1 2( ) ( ) THEN constant constant1X t X t( ) ( )+ → +α α2 Ex: Let p(a,X) unifies the primise of p(Y,Z) ⇒ q(Y,Z) i.e. (a/Y,X/Z) THEN q(a,X) Now, let q(W,b) ⇒ r(W,b) It is claimed that (a/W,b/X) So we may infer r(a,b)
{fred/X,fred/Y} and {Z/X,Z/Y} a constant a variable
. An unification example LIST syntax unify ((parents X (father X) (mother bill)), (parents bill (father bill) y)) PC syntax unify parent(X,father(X),mother(bill)) parent(bill,father(bill),Y)
To perform a consultation for an individual with three independents, $22,000 in savings, and a steady income of $25,000. Three PC sentences are stated:
Now using unification and modus ponens, (10 & 11 → 7) Application
earnings(25000,steady)∧(dependents(3) unifies with
earnings(X,steady)∧(dependents(Y) under the substitution
{25000/X, 3/Y} It yields earnings(25000,steady)∧dependents(3)∧¬greater(25000,minincome(3)) ⇒ income(inadequate)
Evaluating the function minincome yield: earnings(25000,steady)∧dependents(3)∧¬greater(25000,27000)) ⇒ income(inadequate) It results a true conclusion:
Similarly, amount_saved(22000)∧dependents(3) unifies with 4 under the substitution
{22000/X, 3/Y}
It yields amount_saved(22000)∧dependents(3)∧greater(22000,minsavings(3)) ⇒ savings_account(adequate)
Evaluating the function minincome yield: amount_saved(22000)∧dependents(3)∧greater(22000,15000) ⇒ savings_account(adequate) It also results a true conclusion: