coq-club AT inria.fr
Subject: The Coq mailing list
List archive
[Coq-Club] Automatic derivation of an order for simple algebraic datatypes in Coq?
chronological Thread
- From: Adam Koprowski <adam.koprowski AT gmail.com>
- To: coq-club AT pauillac.inria.fr
- Subject: [Coq-Club] Automatic derivation of an order for simple algebraic datatypes in Coq?
- Date: Tue, 10 Feb 2009 11:36:58 +0100
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=TI4/wS9iI8iqIRJCg6gZHCquLYzYwuNanipr6gAreNs4aJZ++iAGcF0xec/AuE9Qwe 191pdbZPPpbBLZ0wRKADSOB7HeefsRqLIreIz3cRZeuz+kj6KJbsg7Xycyc/0w11PIle Cfo3MCpH0mZCzg21qg2AEUBPNBvjLGCQsbFjk=
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Dear all,
Recently I've started using FSets and FMaps in Coq, which are a very nice translations of ocaml sets and maps. Just like their ocaml counterparts, they require an order on the underlying datatypes used in a set/map. However, the big difference is that as long as we need just an orbitrary order (which is often the case when using sets or maps) in ocaml one gets this for free (by means of the polymorphic compare), whereas in Coq one needs to provide the order (along with some proofs of its properties) and this can be a very daunting task indeed. Use of appropriate tacticals can make it slightly less cumbersome but still I did not come up with a way to do this that would not require an amount of typing proportional to the number of constructors of the datatype; and if the number of constructors is getting large... In principle I do not see a fundamental reason why such an order could not be derived automatically (at least if we restrict to non-dependant types). Hence my question: can one do better than just to code such orders by hand? Any thoughts appreciated...
Best wishes,
Adam Koprowski
--
=====================================================
Adam.Koprowski AT gmail.com, http://www.cs.ru.nl/~Adam.Koprowski
The difference between impossible and possible
lies in determination (Tommy Lasorda)
=====================================================
- [Coq-Club] Automatic derivation of an order for simple algebraic datatypes in Coq?, Adam Koprowski
Archive powered by MhonArc 2.6.16.