coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jean-Yves Vion-Dury <jean-yves.vion-dury AT inrialpes.fr>
- To: Coq Club <coq-club AT pauillac.inria.fr>
- Subject: Re: [Coq-Club] rewriting on bound variables
- Date: Tue, 01 Jun 2004 15:12:38 +0200
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
- Organization: Inria Rhones-Alpes
This is certainly not possible: the equality in coq is really "strong",
as shown by "Print eq", whereas it looks like you rather need an
equivalence relation "~". I used the following definition for my own purposes: Variable A B:Type. Inductive sim (f g:(A->B)) : Prop := simi: (forall x:A,(f x)=(g x)) -> (sim f g). Notation "f '~' g" := (sim f g) (at level 60). then you can easily prove it is an equivalence relation and use it further. Require Import Relations. Theorem sim_equiv: (equivalence _ sim). constructor. (* reflexive *) unfold reflexive;intro;constructor;reflexivity. (* transitive *) unfold transitive. intros x y z [H1] [H2]; constructor;intro. rewrite H1; rewrite H2; reflexivity. (* symmetric *) unfold symmetric. intros x y [H];constructor. intro;rewrite H;reflexivity. Qed. on this basis you can extend the inductive definition if required... hope this heps. Jean-Yves --
|
- Re: [Coq-Club] rewriting on bound variables, Jean-Yves Vion-Dury
Archive powered by MhonArc 2.6.16.