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

痞子三分冷 提交于 2019-12-11 10:04:05

问题


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

hates(amy, X).

回答1:


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.



来源:https://stackoverflow.com/questions/25840140/how-would-i-represent-the-following-prolog-statement-in-predicate-logic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!