Coq setoid_使用impl不重写';t使用'A->;类型的引理;B`
例如:Coq setoid_使用impl不重写';t使用'A->;类型的引理;B`,coq,ltac,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. Q
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.
我想使用
rewrite\u strat
/Hint rewrite
的判别树来编写我自己的验证搜索,使用impl
关系来模拟apply
。但是如果我用impl
而不是->
重述引理,那么setoid\u rewrite
只对impl
有效,这很烦人。有没有办法让setoid_rewrite接受类型为A->B
的引理并使用impl
关系?一个可能的解决办法是用基于impl
的引理替换上下文中所有通常的逻辑含义,例如用| f:?A->B,A:Prop重复匹配目标,B:Prop |-|=>(在f)end中用(impl A B)更改(A->B)
哦,我忘了提到,您需要修改上面的脚本以将其应用于嵌套箭头,如A->B->C
,等等。
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.