Next: Rules and Disjunctions Up: Knowledge Representation Previous: The Logical Variable

# Rules and Conjunctions

A man is happy if he is rich and famous
might translate to:
```
happy(Person):-

man(Person),

rich(Person),

famous(Person).

```

The `,' indicates the conjunction and is roughly equivalent to the of predicate calculus. Therefore, read `,' as `and'. The whole of the above is one (non-unit) single clause.

It has three subgoals in its body ---these subgoals are `conjoined'.

In this single clause, the logical variable Person refers to the same object throughout.

By the way, we might have chosen any name for the logical variable other than Person. It is common practice to name a logical variable in some way that reminds you of what kind of entity is being handled.

We now describe this clause graphically. In this case, we are going to represent conjunctions using an AND tree. Here is an AND tree that represents the above.

The way in which we discriminate between an OR tree and an AND tree is the use of a horizontal bar to link the subgoals. We need this distinction because we are going to represent the structure of a program using a combined AND/OR tree.

Paul Brna
Mon May 24 20:14:48 BST 1999