Top Banner

of 31

FOPL

Apr 04, 2018

Download

Documents

manicheese
Welcome message from author
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.
Transcript
  • 7/29/2019 FOPL

    1/31

    1

    Topic 9.

    The first-order predicate logic

    1

    How can we represent the following

    statements?

    Fish live in water.

    If he is sick he needs a doctor.

    The SAT problem cannot be solved in polynomial time unlessP is equal to NP.

    2

  • 7/29/2019 FOPL

    2/31

    2

    Capabilities of an AI representation

    language

    Handle qualitative knowledge.

    clear c

    clear(a)

    ontable(a)

    ontable(b)

    on(c,b)

    a b

    c

    3

    cube(b)

    cube(a)

    pyramid(c)

    Allow new knowledge to be inferred from a set of rules andfacts.

    XYon(Y,X)clear(X)

    Allow representation of general principles as well as specificsituations.

    A useful AI representation needs variables.

    Capture complex semantic meaning.

    hassize(bluebird,small)hascolor(bluebird,blue)

    hascovering(bluebird,feathers)

    4

    sa ue r , r

    isa(bluebird,vertebrate)

    Allow for meta-level reasoning.

    An intelligent system must be able to solve problems as well as explainhow it solved the problem and why it made certain decisions

  • 7/29/2019 FOPL

    3/31

    3

    Examples of propositional() statements:

    : arcoa s ac .Q: Sugar is hydrocarbon().R: Smith is married.

    The symbols, such as P, Q, and R, used to

    5

    symbols.

    First order predicate logic (FOPL)(1)Can you represent the following statements by thepropositional logic?

    Every man is mortal.

    Confucius is a man. Therefore, Confucius is mortal.

    6

  • 7/29/2019 FOPL

    4/31

    4

    First order predicate logic (2)

    Every man is mortal.

    Confucius is a man. man(confucius)

    Confucius is mortal. mortal(confucius)

    We must prove the following formula is valid in order to prove that Confucius ismortal.

    7

    (X (man(X) mortal(X))) man(confucius) mortal(confucius)

    The syntax of the predicate calculus (1)

    Symbols begin with a letter and are followed by legalcharacters.

    A..Z, a..z.,0..9,_.

    Example

    Legal symbolsGeorge, fire3, tom_and_jerry, XXX, friends_of

    Illegal symbols

    @#$, 3black, no blank allowed, hi!!

    8

  • 7/29/2019 FOPL

    5/31

    5

    The syntax of the predicate calculus (2)Predicate calculus symbols include

    Truth symbols: true and false.

    . Example: george, myMother.

    Variable symbols: the first character is uppercase. Example: X, Man.

    Function symbols: the first character is lowercase. A function is amapping that maps a list of constants to a constant. function_name(t1,t2,,tn)

    If plus is a function of arity 2 with domain the integer, plus(2,3) is a function

    9

    expression whose value is the integer 5.

    The syntax of the predicate calculus (3)

    Predicate calculus terms are defined as follows. A constant is a term.

    A variable is a term.

    Iffis an n-arity function symbol, and t1, , tn are terms, thenf(t1, , tn) is a term.

    All terms are generated by applying the above rules.A predicate calculus term is either a constant, variable orfunction expression.

    10

    xamp e.cat, times(2,3), X, blue, mother(jane), kate.

  • 7/29/2019 FOPL

    6/31

    6

    The syntax of the predicate calculus (4)

    A predicate names a relationship between zero or more objectsin the world. Predicate symbols begin with a lowercase letter.

    Example:

    like, equals, on, near, part_of

    An atomic sentence is a predicate of arity n followed by n terms. Example:

    likes(george, kate)

    11

    es ,george r en s a er_o av , a er_o an rew The truth values, true and false, are atomic sentences.

    The syntax of the predicate calculus (5)

    First order predicate calculus includes two variable qualifiers and that constrain the meaning of a sentence containing a variable.

    12

  • 7/29/2019 FOPL

    7/31

    7

    The syntax of the predicate calculus (6) Universal qualifier

    indicates that the sentence is true for all values of the variable.

    Example: X like(X,ice_cream) is true for all values in the domain ofthe definition of X

    Existential qualifier indicates that the sentence is true for at least one value of the

    variable in the domain.

    Example: Y friends(Y,peter) is true if there is at least one object,indicated by Y, that is a friend of peter.

    13

    The syntax of the predicate calculus (7)

    Predicate calculus sentences are defined recursively as follows.Ever atomic sentence is a sentence.

    1. Ifs is a sentence, then s is a sentence.

    2. Ifs1 and s2 are sentences, then s1 s2 is a sentence.

    3. Ifs1 and s2 are sentences, then s1 s2 is a sentence.

    4. Ifs1 and s2 are sentences, then s1 s2 is a sentence.5. Ifs1 and s2 are sentences, then s1 s2 is a sentence.

    6. If X is a variable and s is a sentence, then X s is a sentence.

    7. If X is a variable and s is a sentence, then X s is a sentence.

    14

    . X foo(X,two,plus(two,three)) equal(plus(two,three),five) is a sentence.

  • 7/29/2019 FOPL

    8/31

    8

    weather(rain, monday) go(tom,mountains)If it does not rain on Monday, Tom will go to the mountains.

    X(basketball_player(X) tall(X))

    All basketball player are tall.

    X (person(X) likes(X,anchovies))

    Some people like anchovies.

    X likes(X,taxes)

    Nobody likes taxes.

    15

    ,

    For all X, X is clear if there does not exist a Y such that Y is on X.

    No unique mapping of sentences into predicate calculus expressions.

    meaning definition

    either p or q (PQ) (PQ)

    p unless q QP

    p because q (PQ) (QP)

    16

    no p is q PQ

  • 7/29/2019 FOPL

    9/31

    9

    A semantics for the predicate calculus (1)

    The database of predicate calculus expressions, each havingtruth value T, describes the state of the world.

    Example.mother(eve,abel), mother(eve,cain), father(adam,abel),father(adam, cain).

    17

    A semantics for the predicate calculus (2)The truth value of an expression E with respect to aninterpretation I over a nonempty domain D is determined by:

    e va ue o a cons an s e e emen o s ass gne o y .

    The value of a variable is the set of elements of D it is assigned to by I.

    The value of a function expression is the element of D obtained by evaluating the function forthe parameter values assigned by I.

    The value of truth symbol true is T and false is F. The value of an atomic sentence is either T or F, as determined by I.

    The truth value of expressions using , , , , and is determined from the values oftheir operands as defined previously.

    The value of X s is T ifs is T for all assi nments to X under I otherwise it is F.

    18

    The value of X s is T if there is an assignment to X in I under which s is T; otherwise, it is F.

  • 7/29/2019 FOPL

    10/31

    10

    Example.Consider the formula XY p(X,Y).

    .

    D={1,2} (the domain of X and Y)

    p(1,1) p(1,2) p(2,1) p(2,2)

    T F F T

    Assignment for predicate p.

    19

    In this interpretation, for every X, there always exists aY such that p(X,Y) is true. Therefore, XY p(X,Y) is Tin this interpretation.

    Example.Consider the formula X(p(X) q(f(X),a)).Let us define an interpretation as follows. D={1,2}

    Assignment for function f Assignment for constant a

    p(1) p(2) q(1,1) q(1,2) q(2,1) q(2,2)

    Assignment for predicates p and q

    f(1) f(2)

    2 1

    a

    1

    Therefore, X(p(X) q(f(X),a)) is T in this interpretation.

    If X=1, p(1) q(f(1),1))= p(1) q(2,1)=F F=T.If X=2, p(2) q(f(2),1))= p(2) q(1,1)=T T=T.

  • 7/29/2019 FOPL

    11/31

    11

    For a predicate calculus expression s and an interpretation I: Ifs has a value ofT under I and a particular variable assignment, then

    I is said to satisfy s .

    s is satisfiable if and only if there exist an interpretation and variableassignment that satisfy it; otherwise, it is unsatisfiable.

    Ifs has a value T for all possible interpretations, s is said to be valid.

    21

    A semantics for the predicate calculus (3)

    Some relationships between negation and the universal andexistential quantifiers.

    X p(X) X p(X)

    X p(X) X p(X)

    X q(X) Y q(Y) X q(X) Y q(Y)

    X (p(X) q(X)) X p(X) Y q(Y)

    22

    p q p q

  • 7/29/2019 FOPL

    12/31

    12

    First-order predicate calculusallowsquantified variables to refer to objects in the

    oma n o scourse an no o pre ca es orfunctions.

    Example. (L) L(george,kate) is not a well-formed expression in the first-order predicatecalculus.

    23

    Inference rulesAn inference rule is a way to produce additional wffs fromother ones.

    n erence ru es prov e a compu a ona y eas e way o e erm newhether an expression, a component of an interpretation, logicallyfollows for that interpretation.

    When every sentence X produced by a set of inference rules,R, operating on a set S of expressions logically follows fromS, R is said to be sound.

    Example: modus ponens is a sound inference rule.

    24

    from S, then R is said to be complete.

  • 7/29/2019 FOPL

    13/31

    13

    Useful inference rules Modus ponens: If P and P Q are true, then we can infer that Q is true.

    Modus tollens: If P Q is true and Q is false, we can infer P.

    And elimination: If P Q is true, we can infer that P and Q are true.

    And introduction: If P and Q are true, then P Q is true.

    Universal instantiation: IfX p(X) is true and a is from the domain of X, wecan infer p(a).

    25

    If it is raining then the ground will be wet.

    P QIt is raining.

    P.

    Every man is mortal.

    X (man(X) mortal(X))

    Confucius is a man.

    .

    Applying modus ponens, we can infer that Q is true.

    26

    Confucius is mortal.

    Applying universal instantiation, we can infer that man(confucius) mortal(confucius).

    Applying modus ponens, we can infer that mortal(confucius).

  • 7/29/2019 FOPL

    14/31

    14

    All dogs are animals.All animals will die.Fido is a dog.We want to prove that Fido will die rom above statements.

    All dogs are animals.

    X (dog(X) animal(X))Fido is a dog.

    dog(fido).Modus ponens and universal instantiation ({fido/X}) give animal(fido).

    27

    an ma s w e.Y (animal(Y) die(Y)).Modus ponens and universal instantiation ({fido/Y}) give die(fido).

    X likes(george,X)

    X likes eor e,X

    If the domain of X is infinite, for example, X

    ranges over the set of all humans, the testof the sentences may never halt.

    28

  • 7/29/2019 FOPL

    15/31

    15

    Decidability A logical system is decidable if it is possible to produce an

    algorithm that will determine whether any wff is a theorem.

    The propositional logic is decidable.

    FOPL is not decidable.

    29

    Monotonicity

    A lo ical s stem is monotonic if a valid roof in the s stemcannot be made invalid by adding additional premises orassumptions. If we can prove

    then we can also proveC-|B}A,{

    C-|BABA ''

    A and B can be anything, including A and B.

    The propositional logic and FOPL are monotonic.

    30

  • 7/29/2019 FOPL

    16/31

    16

    Deductive, Abduction and Inductive

    reasoning

    Deductive reasoninA A B

    Based on the use of modus pones and the other deductive rules of reasoning.

    Dealing with certainties.

    Abductive reasoning Not logically sound

    Reasoning from observed facts to the best explanation.

    Inductive reasoning

    B A B

    A

    . Induction is the process of inferring the general case from the specific.

    Useful for dealing with uncertainties.

    31

    re ca e a cu us eso u on

  • 7/29/2019 FOPL

    17/31

    17

    Exam lewffs

    1. p(f(Y),a) q(b,c)

    2. p(X,a) r(X,c) s(a,b)

    3. p(f(Y),a) r(f(Y),c) s(a,b) (substituting f(Y) for X in 2)

    4. q(b,c) r (f(Y),c) s(a,b) (from resolving 1 and 3)

    The appropriate substitution is computed by a process called unification.

    ange

    symbols

    (Unification)

    Resolution

    Convert arbitrary wffs to clause

    forms

    Example. Clause form

    1. p(f(Y),a) q(b,c)

    2. p(X,a) r(X,c) s(a,b)

    wffswff to be

    proved

    Convert to clauseform

    Unification add

    Resolution

    Produce ? New resolvent?

    yes

    no

    yes

    proved

    no

    stop

    Flowchart of resolution refutation in the predicate calculus

    You maybe neverreach this step

  • 7/29/2019 FOPL

    18/31

    18

    Example.

    All dogs are animals.All animals will die.Fido is a dog.We want to prove that Fido will die from above statements.

    All dogs are animals. CLAUSE FORM

    X (dog(X) animal(X)) dog(X)animal(X)All animals will die.

    Y (animal(Y) die(Y)) animal(Y)die(Y)Fido is a dog.

    35

    dog(fido). dog(fido)Negate the conclusion that Fido will die.

    die(fido)

    substitution

    Resolution proof for the dead dog problem

  • 7/29/2019 FOPL

    19/31

    19

    Convert to clause form (1/2)1. Eliminate implication signs.

    P Q P Q

    2. Reduce sco e of ne ation si ns.

    (P Q) P Q

    3. Standardize variables.

    Each quantifier is renamed so that each has its own variable symbol.

    (X P(X) ( XQ(X))) (X P(X) (YQ(Y)))

    4. Move all qualifiers to the left without changing their order.

    This form is called theprenex normalform that all the qualifiers are in frontas a prefix and the expression or matrix after.

    37

    (X)(Y) (a(X) b(Y))

    prefix matrix

    Convert to clause form (2/2)

    5. Eliminate existential quantifiers.

    XY mother X,Y skolen function X mother X,f X Y depends on X.

    Y g(Y) skolen constant g(sk) The existential quantifier being eliminated is not within the scope of

    any universal quantifiers. Skolen functions must be new. Put the matrix in conjunctive form.

    6. Eliminate universal quantifiers.

    7. Convert the ex ression to the con unct of dis uncts forms.

    38

    8. Call each conjunct a separate clause.

    9. Rename variables.

  • 7/29/2019 FOPL

    20/31

    20

    Example(X)((a(X) b(X)) (c(X,l) (Y)((Z)(c(Y,Z)) d(X,Y)))) ( X)(e(X))

    1. Eliminate implication signs. (X)( (a(X) b(X)) (c(X,l) (Y)((Z)( c(Y,Z)) d(X,Y)))) ( X)(e(X))

    2. Reduce the scopes of negation signs. (X)( ( a(X) b(X)) (c(X,l) (Y)((Z)(c(Y,Z)) d(X,Y)))) ( X)(e(X))

    3. Standardize the variables; that is, rename variables so that variables bound byeren quan ers ave un que names.

    ( X)( ( a(X) b(X)) (c(X,l) ( Y)(( Z)(c(Y,Z)) d(X,Y)))) ( W)(e(W))

    4. Convert to prenex normal form. (X)( Y)( Z)( W)( ( a(X) b(X)) (c(X,l) ( c(Y,Z)) d(X,Y)))) (e(W))

    5. Eliminate existential qualifiers. ( X) ( W)( ( a(X) b(X)) (c(X,l) (c(f(X),g(X))) d(X, f(X))))) (e(W))

    6. Remove all universal qualifiers. ( ( a(X) b(X)) (c(X,l) (c(f(X),g(X))) d(X, f(X))))) (e(W))

    7. Transform to conjunctive normal form.

    ( a(X) b(X) c(X,l) e(W)) ( a(X) b(X) c(f(X),g(X)) d(X, f(X)) e(W))8. Call each conjunct a separate clause.

    a) a(X) b(X) c(X,l) e(W)b) a(X) b(X) c(f(X),g(X)) d(X, f(X)) e(W)

    9. Standardize the variables apart again.a) a(X) b(X) c(X,l) e(W)b) a(U) b(U) c(f(U),g(U)) d(U, f(U)) e(V)

    Unification

    Unification is an al orithm for determinin the substitutionsneeded to make two predicate calculus expressions match.

    40

  • 7/29/2019 FOPL

    21/31

    21

    Substitution (1)Definition.

    A substitution is a finite set of the form {t1/v1,,tn/vn},where every vi is a variable, every ti is a term different from vi,and no two elements in the set have the same variable after thestroke symbol. When t1,,tn are ground terms, the substitution is called a ground

    substitution.

    X/Y indicates that X is substituted for Y in the original

    41

    expression.

    Examples. Some instance of the expression foo(X,a,goo(Y)) generated by

    legal substitutes are as follows.1. foo(fred,a,good(Z)) foo(X,a,goo(Y)) {fred/X,Z/Y}

    2. foo(W,a,goo(jack)) foo(X,a,goo(Y)) {W/X,jack/Y}

    3. foo(Z,a,goo(moo(Z))) foo(X,a,goo(Y)) {Z/X,moo(Z)/Y}

    X/Y indicates that X is substituted for Y in the originalexpression.

    42

  • 7/29/2019 FOPL

    22/31

    22

    Substitution (2)Definition.

    Let ={t1/v1,,tn/vn} be a substitution and Ebe an expression.Then E is an expression obtained from Eby replacingsimultaneously each occurrence of the variable vi,

    i=1,2,n, in E by the term ti.

    E is called an instance ofE.

    Example

    Let ={a/X,f(b)/Y,c/Z} and E=p(X,Y,Z). Then E = p(a,f(b),c).

    43

    Definition.

    Composition of unification

    substitutions

    Let ={t1/x1,,tn/xn} and ={u1/y1,,um/ym} be twosubstitutions.Then the composition of and is the substitution,

    denoted by , that is obtained from the set{t1/x1,, tn/xn, u1/y1,,um/ym}

    by deleting any element tj/xj for which tj=xj, and any elementui/yi such that yi is among {x1,,xn}.

    The composition of substitutions is associative. ()= ()

    44

  • 7/29/2019 FOPL

    23/31

    23

    Exam le. {f(Y)/X,Z/Y}{a/X,b/Y,Y/Z}

    {f(b)/X,Y/Y,a/X,b/Y,Y/Z}={f(b)/X ,b/Y,Y/Z}

    {g(X,Y)/Z}{a/X,b/Y,c/W,d/Z}={g(a,b)/Z, a/X,b/Y,c/W,d/Z}

    45

    UnifierDefinition.

    A substitution is called a unifier for a set {E1, E2, , Ek} ifand only if E1 =E2 ==Ek . The set {E1, E2, , Ek} is saidto be unifiable if there is a unifier for it.

    Example.The set {p(a,Y),p(X,f(b)} is unifiable because the substitution={a/X,f(b)/Y} is a unifier for the set.

    {p(a,Y)}={p(a,f(b))}

    46

    p , = p a,

  • 7/29/2019 FOPL

    24/31

    24

    Most General Unifier (MGU)Definition.

    A unifier for a set {E1, E2, , Ek} of expressions is a mostgeneral unifier (mgu) if and only if for each unifier for theset there is a substitution such that =.

    47

    Unification algorithm

    The unification algorithm can

    find the most general unifier for a finite unifiable set ofnonempty expressions.

    determine whether or not a set of expressions is unifiable.

    48

  • 7/29/2019 FOPL

    25/31

    25

    function unify(E1,E2)

    begin // E1 and E2 are in the list representation

    caseE1 and E2 are constants or the empty list:

    if E1=E2 then return {} else return FAIL;

    either E1 or E2 is empty then return FAIL.

    E1 is a variable:

    Predicate calculus

    syntax List syntax

    p(a,b) (p a b)

    p(f(a),g(X,Y)) (p (f a) (g X Y))

    .

    E2 is a variable:

    if E2 occurs in E1 then return FAIL else return {E1/E2}.

    otherwise:

    begin

    HE1 := first element of E1;

    HE2 := first element of E2;

    SUBS1 := unify(HE1,HE2);

    if SUBS1== FAIL then return FAIL.

    TE1 := apply(SUBS1, rest of E1); // substitution: (rest of E1)SUBS1TE2 := apply(SUBS1, rest of E2); // substitution:(rest of E2)SUBS1

    SUBS2 := unify(TE1,TE2);

    if SUBS2==FAIL then return FAIL.

    else return composition(SUBS1,SUBS2);// composition

    end

    end

    end

    Example

    Find an mgu for W={p(a,X,f(g(Y))),p(Z,f(Z),f(U))}.

    Answer: {a/Z,f(a)/X, g(Y)/U}

    W={(p a X (f (g Y))), (p Z (f Z) (f U)) }{}{a/Z}{f(a)/X}{}{g(Y)/U}=

    {a/Z}{f(a)/X}{g(Y)/U}=

    {a/Z,f(a)/X}{g(Y)/U}=

    {a/Z,f(a)/X,g(Y)/U}{}{a/Z}{f(a)/X}{}{g(Y)/U}

    ,

    Unify(p, p)

    {}

    unify{(a X (f (g Y))), (Z (f Z) (f U)) }

    Unify(a, Z){a/Z}

    unify{(X (f (g Y))), ( (f a) (f U)) }

    {f(a)/X}{}{g(Y)/U}

    {a/Z}{f(a)/X}{}{g(Y)/U}

    50

    Unify(X,(f a)){f(a)/X}

    unify{ (f (g Y)), (f U) }

    g(Y)/U

    Unify(f,f)

    {}

    unify{((g Y)), (U) }

    {}{g(Y)/U}

  • 7/29/2019 FOPL

    26/31

    26

    ExampleConsider the following set of formulas:F1: X (c(X)(w(X) r(X)))

    F2: X (c(X) o(X)).

    Show that G is a logical consequence of F1 and F2.

    1. c(X) w(X) from F12. c(Y) r(Y)3. c(a) from F24. o(a)

    51

    . 6. r(a) (5) and (4)7. r(a) (3) and (2)8. (6) and (7)

    Therefore, G is a logical consequence of F1 and F2.

    Example:Premises:1. The custom officials searched everyone who entered this country who

    was not a VIP.2. Some of the drug pushers entered this country and they were only

    searched by drug pushers.3. No drug pusher was a VIP.Conclusions: Some of the officials were drug pushers.

    Let

    e(X) mean X entered this country,v(X) mean X was a VIP,s(X,Y) mean Y searched X,c(X) mean X was a custom official, and

    X mean X was a dru usher.

    Inference and Resolution for Problem Solving52

    Premises

    X(e(X) v(X) Y (s(X,Y) c(Y)))

    X(e(X) p(X) Y (s(X,Y) p(Y)))

    X(p(X)v(X))Conclusions

    X(c(X) p(X)).

  • 7/29/2019 FOPL

    27/31

    27

    The resolutionproof is as follows.

    Premises

    X(e(X) v(X) Y (s(X,Y) c(Y))) X(e(X) p(X) Y (s(X,Y) p(Y)))

    X(p(X) v(X))

    (1) e(X) v(X) s(X,f(X))

    (2) e(Y) v(Y) c(f(Y))

    (3) p(g(Y1))(4) e(g(Y2))(5) s(g(Y3),Y3) p(Z)(6) p(W) v(W)(7) p(T) c(T)

    (8) v(g(Y1)) from (3) and (6) {g(Y1)/W}

    X(c(X) p(X)).

    (9) v(g(Y2)) c(f(g(Y2))) from (2) and (4) {g(Y2)/Y}(10) c(f(g(Y2))) from (8) and (9) {Y2/Y1}(11) v(g(Y2)) s(g(Y2),f(g(Y2))) from (1) and (4) {g(Y2)/X}(12) s(g(Y2),f(g(Y2))) from (8) and (11) {Y2/Y1}(13) e(g(Y2) v(g(Y2)) from (1) and (12) {g(Y2)/X}(14) e(g(Y2) from (8) and (13) {Y2/Y1 }(15) from (4) and (14)

    Predicate-calculus resolution

    Predicate-calculus resolution is sound.

    Predicate-calculus resolution is refutation complete.

    54

  • 7/29/2019 FOPL

    28/31

    28

    Example.Anyone passing his history exams and winning the lottery is happy. Butanyone who studies or is lucky can pass all his exams. John did not studybut he is lucky. Anyone who is lucky wins the lottery. Is John happy?

    CLAUSE FORM

    Inference and Resolution for Problem Solving55

    THE CLAUSE FORM OF THE NEGATION OF CONCLUSION

    One resolution refutation for the happy student problem

  • 7/29/2019 FOPL

    29/31

    29

    Example.All people who are not poor and are smart are happy. Those people whoread are not stupid. John can read and is wealthy. Happy people haveexciting lives. Can anyone be found with an exciting life

    CLAUSE FORM

    57

    Answerextraction

    One resolution refutation for the exciting life problem

    {Z/W}{X/Z}{Y/X}{john/Y}{}={john/W,john/Z,john/X,john/Y}

  • 7/29/2019 FOPL

    30/31

    30

    Example.Fido the dog goes whenever John, his master, goes. John is at thelibrary. Where is Fido?

    Negation of the conclusion

    substitution

    59

    substitution

    {X/Z}{library/X}={library/Z,library/X}

    Example.Everyone has a parent. The parent of a parent is a grandparent.Given the person John, prove that John has a grandparent.

    Conclusion

    60

    CLAUSE FORM

  • 7/29/2019 FOPL

    31/31

    {john/X,pa(john)/Y}

    {pa(john)/X,pa(pa(john))/V)}

    {john/W,V/Z}{john/X,pa(john)/Y}{pa(john)/X,pa(pa(john))/V}={john/W,pa(X)/Z,john/X,pa(john)/Y}{pa(john)/X,pa(pa(john))/V)}={john/W, pa(pa(john)) /Z,john/X,pa(pa(john))/Y, pa(pa(john))/V}