coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: "Aaron Bohannon" <bohannon AT cis.upenn.edu>
- To: "Coq List" <coq-club AT pauillac.inria.fr>
- Subject: [Coq-Club] setoids and functors
- Date: Thu, 5 Jun 2008 17:21:52 -0400
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition:x-google-sender-auth; b=glKYmeO4SQpU2aMap5tYr/bvv4swcJEcSYTGXQCWG9XLMqgEW1IdGi3Ed+/qt0/AWH Roa0H2pMAQK89vFfCYFIPnEGz2/+spYmR4F49c2TBfm8kJQ/7tDQoO9aLZuXkaA0Yu3b jxkgg+OlaUEJyFczh1lWe/XBFioNMsUgl3SNA=
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
I've noticed a bad interaction between setoids and the module system.
If a setoid is defined in a functor (let's call it F), then apparently
that functor must only be instantiated exactly once (otherwise, you
will see a long warning and rewriting in the setoid will stop
working). This doesn't sound like a huge problem (why would you
instantiate a functor twice?), until you try to write another functor
G (in its own file) with proofs that require rewriting in the setoid
defined in F. In order for the file containing G to compile, G must
instantiate F internally. Thus, one must be sure to never instantiate
F outside of G. OK, now that's already a software engineering
nightmare, but worse, imagine two functors G1 and G2 that both require
access to rewriting in the setoid defined in F. Now you're completely
stuck.
I'm not sure if I can call this a bug, because there is no simple,
obvious solution. The only thing that comes to mind would be to allow
abstraction over setoid and morphism declarations by including them in
module types. Is anybody working on this issue? Does anybody know of
good work-arounds? For a specific example of such a functor F, see
the FSetFacts file from the standard library.
- Aaron
- [Coq-Club] setoids and functors, Aaron Bohannon
- Re: [Coq-Club] setoids and functors,
Andrew McCreight
- Re: [Coq-Club] setoids and functors,
Aaron Bohannon
- Re: [Coq-Club] setoids and functors, Andrew McCreight
- Re: [Coq-Club] setoids and functors,
Pierre Letouzey
- Re: [Coq-Club] setoids and functors,
Aaron Bohannon
- Re: [Coq-Club] setoids and functors,
Pierre Letouzey
- [Coq-Club] Re: setoids and functors, Samuel Bronson
- Re: [Coq-Club] setoids and functors,
Pierre Letouzey
- Re: [Coq-Club] setoids and functors,
Aaron Bohannon
- Re: [Coq-Club] setoids and functors,
Aaron Bohannon
- Re: [Coq-Club] setoids and functors,
Andrew McCreight
Archive powered by MhonArc 2.6.16.