有关使用分辨率找到对某些条款的反驳的问题

时间:2019-04-03 00:21:50

标签: artificial-intelligence theorem-proving

我正在为人工智能课程做功课,目前我一直在寻找关于驳斥某些条款的问题。

我尝试了很多方法来找到关于这些子句的驳斥,但是,要么以我试图找到的相同的目标子句结尾,要么以越来越多的子句结尾。

以下是以Prolog格式编写的子句:

% A1
i(e, X, X).

% A2
i(X, e, X).

% A3
i(comp(X), X, e).

% A4
i(X, comp(X), e).

% A51
i(U, Z, W) :- i(X, Y, U), i(Y, Z, V), i(X, V, W).

% A52
i(X, V, W) :- i(X, Y, U), i(Y, Z, V), i(U, Z, W).

% A6
i(X, X, e).

% A7
i(a, b, c).

% A8
-i(b, a, c)

如果您有任何想法,请帮助我,非常感谢!

编辑:

我想向您展示我的尝试,但是它是手写的,很难输入。基本上,我首先尝试使用统一符e1 = [U / b,Z / a,W / c]解析A8和A51,最后以-i(b,a,c)结束。我还尝试首先使用统一符e2 = [U / e,Z / X,W / X]解析A1和A51,最后得到-i(M,M,M)的所有可能组合,其中M属于{a ,b,c,e},例如:-i(b,b,a)

1 个答案:

答案 0 :(得分:0)

我不太擅长Prolog,但这是Isabelle驳斥的证据(出于娱乐目的)。

lemma so55485292:
  fixes i a b c e
  assumes A1:  "⋀X. i(e, X, X)"
      and A51: "⋀U V W X Y Z. ⟦ i(X, Y, U); i(Y, Z, V); i(X, V, W) ⟧ ⟹ i(U, Z, W)"
      and A52: "⋀U V W X Y Z. ⟦ i(X, Y, U); i(Y, Z, V); i(U, Z, W) ⟧ ⟹ i(X, V, W)"
      and A6:  "⋀X. i(X, X, e)"
      and A7:  "i(a, b, c)"
      and A8:  "¬i(b, a, c)"
    shows False
proof -
  have swap: "⋀s t u. i(s, t, u) ⟹ i (u, t, s)"
  proof -
    fix s t u
    assume "i(s, t, u)"
    moreover have "i(t, t, e)" by (rule A6)
    moreover have "i(s, e, s)"
    proof (rule A52)
      show "i(s, s, e)" by (rule A6)
      show "i(s, s, e)" by (rule A6)
      show "i(e, s, s)" by (rule A1)
    qed
    ultimately show "i(u, t, s)" by (rule A51)
  qed

  have "i (a, c, b)"
  proof (rule A52)
    show "i(a, a, e)" by (rule A6)
    show "i(a, b, c)" by (rule A7)
    show "i(e, b, b)" by (rule A1)
  qed
  from this have "i (b, c, a)" by (rule swap)
  moreover have "i(c, b, a)" using A7 by (rule swap)
  ultimately have "i(b, a, c)" using A7 by (rule A52)

  from A8 and this show ?thesis ..
qed

(很遗憾,美丽的Isar语言没有突出显示语法...)

A2A3A4是多余的。 Isabelle可以使用sledgehammer快速证明存在一个证明。从自动证明中挑出解释性的Isar证明花费了更长的时间,并且经过反复试验。

对于Prolog,您可能需要通过消除切消来消除交换引理。