这是一个更大的证据的简化片段,用于捕捉相关行为。
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
。任何人都可以帮我这个吗?
答案 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相等。