270 likes | 523 Views
Clause Form and Predicate Logic. Lecture 8 Instructor Zahid Anwar. Some Important Terms and Definitions. Atomic formulas are individual predicates together with arguments Literals are atomic formulas and negated atomic formulas
E N D
Clause Form and Predicate Logic Lecture 8 Instructor Zahid Anwar
Some Important Terms and Definitions • Atomic formulas are individual predicates together with arguments • Literals are atomic formulas and negated atomic formulas • Well formed formulas, generally referred to by wffs, are defined recursively
wffs • Literals are wffs • wffs connected together by ~, AND, V, are wffs • Wffs surrounded by quantifiers are also wffs
Special Cases wffs • A wff in which all the variables, if any are inside the scope of corresponding quantifiers, is a sentence • These are sentences X(feathers(x)bird(x)) Feathers(albatros)bird(albatros) • Variables like x, appearing within the scope of corresponding quantifiers, are said to be bound.
Sentences • The following expression is not a sentence, because it contains a free variable X(feather(x) V ¬ feather(y)) A wff consisting of a disjunction of literals is a clause
Transform Logical Expressions into Clause Form • To illustrate the manipulation we use an axiom involving blocks • The axiom is a bit artificial but it allows us to exercise all the transformation steps • The axiom represent the following • The brick is on something that is not a pyramid • There is nothing that the brick is on and that is on the brick as well • There is nothing that is not a brick and the same thing as the brick
Writing in Predicate Logic Form X [brick(x) (Э y [on(x,y) Λ ¬ pyramid(y)] Λ ¬ Эy[on(x,y) Λ on(y,x)] Λ y [¬brick(y) ¬ equal(x,y)])]
Step 1 Eliminate Implication • Using ~E1 V E2 for E1 E2 x[~brick(x) V (Э y [ on(x,y) Λ ~pyramid(y)] Λ ~ Эy[on(x,y) Λ on(y,x)] Λ y[~(~brick(y)) V ~ equal(x,y)])]
Step 2 Move Negations down to atomic formulas • Using ~ (E1 Λ E2) (~E1) V (~E2) • ~(E1 V E2) (~E1) Λ (~E2) • ~(~E1) E1 • ~ x[E1(x)] Э x [~E1(x)] • ~Эx[E1(x)] x[~E1(x)] • On to our Example on next page
Move Negations In • x[ ~ brick(x) V (Эy[on(x,y) Λ ~ pyramid(y)] • Λ y[~on(x,y) V ~ on(y,x)] • Λ y[brick(y) V ~equal(x,y)])]
Step 3 Purge Existential Quantifiers • Using: skolem functions • These are functions that eliminate the need for existential quantifiers • The part of our axiom, involving Э is • Э y [on(x,y) Λ ~ pyramid (y)] • For all x there is a y that makes the expression true • Said another way, there is a function that takes argument x and returns a proper y • We do not necessarily know how the function works or what it looks like
Purge Existential Quantifiers • Suppose the function is called “support” • Now using our new function, we no longer need to say that y exists, because we have a way of producing the proper y in any circumstance • On(x, support(x)) Λ ~ pyramid(support(x)) • The general rule is that the universal quantifiers determine skolem function arguments • There must be one argument for each universally quantified variable whose scope contains the existentially quantified variable
Purge Existential Quantifiers • After eliminating Existential quantifiers we get • x [~brick(x) V ((on(x,support(x)) Λ ~ pyramid(support(x))) • Λ [~on(x,y) V ~ on (y,x)] • Λ [brick(y) V ~equal(x,y)])]
Step4 Rename variables as necessary, so that no two variables are the same • We do this because we want to move all universal quantifiers together at the left of each expression in the next step • x[~brick(x) V (( on(x, support(x)) Λ ~ pyramid (support(x))) • Λ y[~on(x,y) V ~on(y,x)] • Λ z[brick(z) V ~equal(x,z)])]
Step5 Move the Universal quantifiers to the left • x y z [~brick(x) V (( on(x,support(x)) • Λ ~pyramid(support(x))) • Λ ~on(x,y) V ~ on (y,x) • Λ brick(z) V ~ equal(x,z))]
Step6 Move the disjunctions down to the literals • Using E1 V (E2 Λ E3) (E1 V E2) Λ (E1 V E3) • We do it in two steps • x y z [(~brick(x) V (on(x,support(x)) Λ ~pyramid(support(x)))) • Λ (~brick(x) V ~on(x,y) V ~on(y,x)) • Λ(~brick(z) V brick(z) V ~equal(x,z))]
Step 6 • x y z [(~brick(x) V (on(x,support(x)) Λ (~brick(x) V ~pyramid(support(x))) • Λ (~brick(x) V ~on(x,y) V ~on(y,x)) • Λ(~brick(z) V brick(z) V ~equal(x,z))]
Step 7 Eliminate the Conjunctions • We simply write each part of a conjunction as separate axiom • x[(~brick(x) V (on(x,support(x))] • x [~brick(x) V ~pyramid(support(x))] • x y [~brick(x) V ~on(x,y) V ~on(y,x)] • x z[~brick(z) V brick(z) V ~equal(x,z)]
Step 8 Rename all the variables as necessary, so that no two variables are the same • x[(~brick(x) V (on(x,support(x))] • w [~brick(w) V ~pyramid(support(w))] • u y [~brick(u) V ~on(u,y) V ~on(y,u)] • v z[~brick(v) V brick(z) V ~equal(v,z)]
Step 9 Purge the Universal Quantifiers • Purge the universal quantifiers we adopt a convention that all variables are universally quantified • ~brick(x) V (on(x,support(x)) • ~brick(w) V ~pyramid(support(w)) • ~brick(u) V ~on(u,y) V ~on(y,u) • ~brick(v) V brick(z) V ~equal(v,z) • The result is now in clause form, as required to use resolution
To Summarize 1. Eliminate Implication 2. Move negations down to atomic formulas 3. Purge Existential quantifiers 4. Rename variables if necessary 5. Move the universal quantifiers to the left 6. Move the disjunctions down to the literals 7. Eliminate the conjunctions 8. Rename variables, if necessary 9. Purge the universal quantifiers
Inference Mechanism • Uptil now inference mechanism was based on predicate calculus: from correct premise sound inference rules we produce new guaranteed correct, conclusions • However sometimes we must attempt to draw correct conclusions from poorly formed and uncertain evidence using unsound inference rules
Ambiguity • As an example from daily life, correct medical treatment is given for ambiguous symptoms. We comprehend language statements that are often ambiguous or incomplete • The reason for this ambiguity may be better understood by referring to the following example
Example • Consider the rule from Automotive Expert system • If the engine does not turn over, and the lights do not come on • Then the problem is battery or cables
Discussion • The rule is heuristic in nature because it is possible(although less likely ) that the battery and cables are fine but the car simply has a bad starter motor and burned out head-lights • This rule seems to resemble a logical implication but it is not failure of the engine to turn over and the lights to come on does not necessarily imply that the battery and cables are bad
Abductive Reasoning • This is an example of abductive reasing Formally abduction states that from • PQ • And Q • It is possible to infer P • Note that the converse of the rule is a true implication
True Implication • If the problem is battery or cables • Then • The engine does not turn over and • The lights do not come on • Abduction is an unsound rule of inference meaning that the conclusion is not necessarily true for every interpretation in which the premises are true