Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Coq setoid_使用impl不重写';t使用'A->;类型的引理;B`_Coq_Ltac - Fatal编程技术网

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.