** Prolog** provides for the representation of a subset of first order predicate calculus.
The restrictions on what can be done will become clearer later.
We will now explain how we can write logical statements in ** Prolog**.

If ``the capital of france is paris'' then we can represent this in predicate
calculus form as:

france has_capital paris

We have a binary relationship (two things are related) written in infix form. That is, the relationship is written between the two things related.

The relationship (or predicate) has been given the name ``has_capital'' ---hence we say that the predicate name is ``has_capital''.

And in ** Prolog** form
by such as:

where we write ahas_capital(france,paris).

Note that, in ** Prolog**, if the name of an object starts with a lower case letter
then we refer to a specific object.
Also, there must be no space between the predicate name and
the left bracket ``(''.
The whole thing also ends in a ``.'' as the last character on the line.

The exact rule for the termination of a clause is that a clause must end with a ``.'' followed bywhite spacewhere white space can be any of {space,tab,newline,end_of_file}. It is safest to simply put ``.'' followed by newline.

Also note that relations do not need to hold between exactly two objects.
For example,

might be read asmeets(fred,jim,bridge)

Here, three objects are related so it makes little sense to think of the relationfred meets jim by the bridge

If we can relate two objects or three then it is reasonable to relate **n** where
.
Is there any significance to a relationship that relates one
or even zero objects?
A statement like

might be represented either asjim is tall

ortall(jim)

It is, perhaps, preferable to seejim(tall)

A `relation' that has no arguments can be seen as a single proposition. Thus the binary relation ``france has_capital paris'' above might be rewritten as the statement ``france_has_capital_paris'' ---a relation with no arguments.

Mon May 24 20:14:48 BST 1999