coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Matthieu Sozeau <mattam AT mattam.org>
- To: Arthur Azevedo de Amorim <arthur.aa AT gmail.com>
- Cc: Arnaud Spiwack <Arnaud.Spiwack AT lix.polytechnique.fr>, coq-club AT pauillac.inria.fr
- Subject: Re: [Coq-Club] Setoid rewrite and currying
- Date: Fri, 24 Apr 2009 10:47:19 -0400
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Hi Arthur,
you miss two things to make this work. First, you not only have
to show that every [Map f] is an eq-preserving function but that [Map]
itself is an eq-preserving operator, so as to be able to rewrite [Map f a1]
inside [Map (Map f a1) a2] for example.
Add Parametric Morphism (A B : Setoid) :
(@Map A B) with signature (@map_equal A B ==> @eq A ==> @eq B)
as setoid_mor.
Proof. intros f g Hfg x y Hxy. rewrite (Map_pres f x y Hxy). apply Hfg. Qed.
Secondly, you need to declare explicitely the Equivalence instance to the
typeclass system using:
Existing Instance map_equal_is_equivalence.
You have to do that even if you showed that every [Setoid] gives rise to an
[Equivalence] and declare your setoids as canonical structures: the two
mechanisms do not combine nicely (yet!).
-- Matthieu
- [Coq-Club] Setoid rewrite and currying, Arthur Azevedo de Amorim
- Re: [Coq-Club] Setoid rewrite and currying,
Arnaud Spiwack
- Re: [Coq-Club] Setoid rewrite and currying,
Arthur Azevedo de Amorim
- Re: [Coq-Club] Setoid rewrite and currying, Matthieu Sozeau
- Re: [Coq-Club] Setoid rewrite and currying,
Taral
- Re: [Coq-Club] Setoid rewrite and currying,
Arnaud Spiwack
- Re: [Coq-Club] Setoid rewrite and currying, Arthur Azevedo de Amorim
- Re: [Coq-Club] Setoid rewrite and currying,
Arnaud Spiwack
- Re: [Coq-Club] Setoid rewrite and currying,
Arthur Azevedo de Amorim
- Re: [Coq-Club] Setoid rewrite and currying,
Arnaud Spiwack
Archive powered by MhonArc 2.6.16.