setoid_rewrite与impl不适用于类型为A-> B`的引理

时间:2018-10-19 01:28:37

标签: coq ltac

示例:

Require Import Basics.
Require Export Setoid.
Require Export Relation_Definitions.
Set Implicit Arguments.

Lemma simple1 (A B : Prop) (f : A -> B) (x : A) : B.
Proof.
  assert (f2: impl A B) by exact f.
  setoid_rewrite <- f2.
  exact x.
Qed.

Lemma simple2 (A B : Prop) (f : A -> B) (x : A) : B.
Proof.
  setoid_rewrite <- f.
  exact x.
Qed.

simple1有效,但是simple2失败

Ltac call to "setoid_rewrite (orient) (glob_constr_with_bindings)" failed.
Ltac call to "setoid_rewrite (orient) (glob_constr_with_bindings)" failed.
Cannot find a relation to rewrite.

我想使用rewrite_strat关系来模拟Hint Rewrite,使用impl / apply的鉴别树来编写自己的证明搜索。但是,如果我使用setoid_rewrite而不是impl重述引理,那么impl仅适用于->,这很烦人。有什么办法让setoid_rewrite接受类型为A -> B的引理并使用impl关系?

0 个答案:

没有答案
相关问题