But what about:-(happy(X),rich(X)). [-5pt]

Trying to rewrite in prefix form:happy(X):-healthy(X),

wealthy(X),

wise(X).

Note that the comma `,' in this expression is an argument separator. In the definition of:-(happy(X),whatgoeshere?). [-5pt]

Yes,

is also a compound term with principal functorhealthy(X),wealthy(X),wise(X). [-5pt]

and arity 2. Since we have to represent three subgoals and the arity of `,' is 2 we again have a nested compound term. The correct prefix form for the example is:, [-5pt]

`'`

,`'`

(healthy(X),`'`

,`'`

(wealthy(X),wise(X))).

Note: try the goal ** display((healthy(X),wealthy(X),wise(X)))**
to see the ``truth''.
Also, note that, for a reason as yet unexplained, you need
an extra pair of brackets around the goal you want printed
via ** display/1**.

Here is the tree:

Mon May 24 20:14:48 BST 1999