Logic Programming and Prolog Chapter 3 Notes

Informal Introduction

Question: Who is proud?


Refutation in Predicate Logic

Note that a program clause written as

1
2
3
p(A, B):-
q(A, C),
r(B, C).

can be rewritten as:
$$
\forall A, B, C (p(A, B)\or \neg q(A, C) \or \neg r(B, C))
$$
i.e. left hand side literal is positive, while all right hand side literals are negative

  • Note also that all variables are universally quantified in a clause.