Peter Chappy
Peter Chappy

Reputation: 1179

How would I represent the following prolog statement in predicate logic?

How would you transform the following prolog statement to predicate logic?

hates(amy, X).

Upvotes: 1

Views: 423

Answers (1)

Wouter Beek
Wouter Beek

Reputation: 3407

Using LaTeX's \forall to denote the universal quantifier, the meaning of hates(amy,x). is:

\forall x hates(amy,x)

In general, Prolog variables that occur in a program are universally quantified and Prolog variables that occur in a query are existentially quantified. For instance ?- hates(amy,x). would be represented by \exists x hates(amy,x) in FOL.

Upvotes: 4

Related Questions