next up previous
Next: Horn Clause Logic Up: Facts and rules Previous: Facts

Rules

Logic contains rules of inference. A very basic one is the one known as Modus Ponens. This takes the following form
p \supset q$ from the formula `p implies q'
p$ if proposition `p' is true
latex2html id marker 158
$\therefore q$ conclude that `q' is true

For example:
If John is drunk, then John is happy
John is drunk
latex2html id marker 146
\ensuremath{\therefore} John is happy

Prolog includes conditional formulae (like p \supset q$, but with some syntactic reorganisation), and an algorithm for computing inferences using Modus Ponens, but before we look at how rules are represented in Prolog, we need to look in more detail at the relationship between standard logic and Prolog.

Steve Harlow 2001-11-26