Example:
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
works, but simple2
fails with
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.
I'd like to use rewrite_strat
/Hint Rewrite
's discrimination tree to write my own proof search, using the impl
relation to simulate apply
. But setoid_rewrite
only works with impl
if I restate lemmas using impl
instead of ->
, which is annoying. Is there any way to get setoid_rewrite
to accept lemmas of type A -> B
and use the impl
relation?