coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jason Gross <jasongross9 AT gmail.com>
- To: coq-club <coq-club AT inria.fr>
- Subject: [Coq-Club] Rewriting with [pointwise_relation]
- Date: Mon, 18 Aug 2014 15:30:14 +0100
Hi,
Is there a way to rewrite with a hypothesis that whose type is convertible with [pointwise_relation A R f g] without first explicitly changing its type to that? For example, is there an instance I can add to get the following [setoid_rewrite] to work?
Require Import Coq.Lists.List Coq.Setoids.Setoid Coq.Classes.Morphisms.
Add Parametric Morphism A B : (@map A B)
with signature (pointwise_relation A (@eq B)) ==> @eq _ ==> @eq _
as map_eq_mor.
Proof.
intros x y H ls; hnf in H.
induction ls; auto; simpl.
rewrite -> H, -> IHls; reflexivity.
Qed.
Goal forall A B (f g : A -> B) (H : forall x, f x = g x) ls, map f ls = map g ls.
Proof.
intros.
setoid_rewrite H. (* Toplevel input, characters 15-31:
Error: Tactic failure:setoid rewrite failed: Nothing to rewrite. *)
Thanks,
Jason
- [Coq-Club] Rewriting with [pointwise_relation], Jason Gross, 08/18/2014
Archive powered by MHonArc 2.6.18.