【问题标题】:How would I represent the following prolog statement in predicate logic?我将如何在谓词逻辑中表示以下序言语句?
【发布时间】:2014-09-15 02:41:27
【问题描述】:

你会如何将下面的序言语句转换为谓词逻辑?

hates(amy, X).

【问题讨论】:

    标签: prolog logic predicate


    【解决方案1】:

    用LaTeX的\forall表示全称量词,hates(amy,x).的含义是:

    \forall x hates(amy,x)
    

    一般来说,程序中出现的 Prolog 变量是普遍量化的,而查询中出现的 Prolog 变量是存在性量化的。例如,?- hates(amy,x). 在 FOL 中将由 \exists x hates(amy,x) 表示。

    【讨论】:

    • +1 同意。根据语句是否为fact, or a query,转换为 FOL 之间存在区别。
    猜你喜欢
    • 1970-01-01
    • 2020-10-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多