First Order Predicate Logic: Lecture 8 of Artificial Intelligence
First Order Predicate Logic: Lecture 8 of Artificial Intelligence
First Order Predicate Logic: Lecture 8 of Artificial Intelligence
• Examples of term:
– Individual constants: Taro, Jiro, Chieko
– Individual variables: x, y, z in 𝐷
– Function: mother(Makoto), brother(Jiro)
¬A1∨ ¬A2∨…∨¬Am∨B1∨B2∨…∨Bn
A1∨A2 ⇒ B A1 ⇒ B and A2 ⇒ B
A ⇒ B1∧B2 A ⇒ B1 and A ⇒ B2
1 ?- [test].
Save the prolog program given in the
true.
previous page to ‘test.pl’, and then run
2 ?- parent(X,taro). ‘swipl’ in the university environment.
X = otosan ; If you use your own PC, please download
X = okasan ; the free software first.
false.
URL: http://www.swi-
3 ?- ancestor(sofu,X). prolog.org/pldoc/man?section=quickstart
X = otosan ;
X = miho ;
X = taro ;
X = jiro ;
false.
• Save your program into “prog_08_1.pl”, and prove p(a, b) using this
program.
• Try the program given in p. 29 by saving the program into
“prog_08_02.pl”.
• Prolog is a short of
[_____________________________].