由于未知原因,在被依赖类型的表达式中重写术语失败

时间:2011-11-16 21:59:53

标签: coq

这是一个更大的证据的简化片段,用于捕捉相关行为。

Section foo.
  Parameter t : Type.
  Parameter x : t.
  Parameter y : t.
  Parameter prop : x = y <-> True.
  Parameter prop2 : x = y.
  Lemma lemma : forall e : t, x = y.
    rewrite prop2.
    intro e; trivial.
    Qed.
End foo.

当您rewrite prop2替换rewrite prop时,coq会因隐藏错误而失败。但是在我的意见中,coj应该在重写步骤后产生forall e : t, True。任何人都可以帮我这个吗?

1 个答案:

答案 0 :(得分:2)

reference manual中所述:

rewrite term
This tactic applies to any goal. The type of term must have the form
forall (x1:A1) … (xn:An)eq term1 term2.
where eq is the Leibniz equality or a registered setoid equality.

但是prop不是Leibniz平等的形式:

Coq < Unset Printing Notations.
Coq < Print prop.
prop : iff (eq x y) True

因此,coq要求Setoid检查iff是否为setiod相等。