Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] finite sets in proofs

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] finite sets in proofs


chronological Thread 
  • From: Thomas Braibant <thomas.braibant AT gmail.com>
  • To: Chantal Keller <chantal.keller AT wanadoo.fr>
  • Cc: Christian Doczkal <doczkal AT ps.uni-sb.de>, coq-club AT inria.fr
  • Subject: Re: [Coq-Club] finite sets in proofs
  • Date: Fri, 26 Mar 2010 14:06:53 +0100
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=GHPVYiVBoxcR7EPoJvZIDnyGXbo0RxVwcxZ/p0P1wwDQ1NkspgKpJZ8oj36xC+voWx srBUtz0aY2EDHFSGU81UeOHXKfoY3yyYnCibPy0uqNyTIA/gPNILyXRaBamhpNMQV+j0 hdF0oJbQW2qFMJRhTBFz4pPcoQUtTI2ZM9z5I=

Sorry if I misunderstood you, but this sentence bugs me:

> I then tried to use FSets, but it is not well-suited for computation,
> since you have to compute a lot of proofs: for instance, in the
> implementation with lists, you always need a proof that this list is not
> redundant, otherwise the "remove" function would not be correct.

using FSets, you do not have to compute a lot of proofs by hand. I
reckon that the FSetList.Raw modules somehow hides the fact that the
lists are not redundant, but this is nicely packaged inside the
module. If you create an instance of FSetList using a given ordered
type (say M), using

Module FS := Coq.FSets.FSetList.Make (M).

then FS.remove has type FS.elt -> FS.t -> FS.t. (FS complies to 
FSetInteface.S)

What I fear, is that you are trying to use the FSetList.Raw functor,
which indeed requires additionnal hypotheses when you apply lemmas
(the information that the list representing a set is well-formed is
not hidden by the signature, and you could provide the function with
an ill-formed list)

Otherwise, I reckon that the actual type of FS.t is a sig type which
encapsulates a proof that the list is well-formed, proof that must be
computed. But, in my own experience, even with huge computations in
Coq, this is not a real problem.

Since the original poster said that he do not requires to compute at
all, FSetList would be ok for him.

Hope this helps,
Thomas



Archive powered by MhonArc 2.6.16.

Top of Page