coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Chantal Keller <chantal.keller AT wanadoo.fr>
- To: Christian Doczkal <doczkal AT ps.uni-sb.de>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] finite sets in proofs
- Date: Fri, 26 Mar 2010 13:52:30 +0100
Hi,
I already had the same problem.
I used ListSet for a while, but it is not a good solution for two
reasons:
- the "map" function is not correct, since the resulting list can be
redundant (I reported this bug a while ago, but it did not change
however);
- there are not a lot of the properties one could expect over finite
sets.
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.
To avoid this problem, I finally found more efficient to change a little
the implementation of FSets with lists, such that we do not need all the
time a proof that the list is not redundant. You can mainly do it both
ways:
- change the function "remove" such that it does not suppose that the
list is not redundant;
- change the function "remove" such that it first removes all the
redundancies in the list.
Of course, all these modifications slow down a little the remove
function, but we avoid having big proofs, and the computation goes well
in my case.
Finally, if your decidable type is finite, you can also use the
SSReflect library "finset"
<http://coqfinitgroup.gforge.inria.fr/finset.html>.
Hope this helps,
Chantal.
Christian Doczkal a écrit :
Hi
I have a proof development where I want to reason about finite sets over
decidable types. Im not interested in extracting code but I would like
to make as much use of definitional equality as possible to simplify
reasoning.
The Coq Standard Library offers several developments on finte sets
Coq.Sets.Finite_sets Coq.FSets
Coq.ListSet
The last seems looks most promising for what I would like to do, except
that one always needs to explicitly provide the decision procedure for
the equality and there are not a whole lot of lemmas proven in this
library.
Which route would you recommend? Is there a more complete (proof
oriented) development on finite decidable sets that I am missing
- [Coq-Club] finite sets in proofs, Christian Doczkal
- Re: [Coq-Club] finite sets in proofs, Pierre Casteran
- Re: [Coq-Club] finite sets in proofs, AUGER
- RE: [Coq-Club] finite sets in proofs, Georges Gonthier
- Re: [Coq-Club] finite sets in proofs, Chantal Keller
- Re: [Coq-Club] finite sets in proofs,
Thomas Braibant
- Re: [Coq-Club] finite sets in proofs,
Chantal Keller
- Re: [Coq-Club] finite sets in proofs, Thomas Braibant
- Re: [Coq-Club] finite sets in proofs,
Stéphane Lescuyer
- Re: [Coq-Club] finite sets in proofs, Pierre Letouzey
- Re: [Coq-Club] finite sets in proofs, Chantal Keller
- [Coq-Club] Yet another dependent type question,
Pierre-Marie Pédrot
- Re: [Coq-Club] Yet another dependent type question,
Adam Chlipala
- Re: [Coq-Club] Yet another dependent type question,
Pierre Corbineau
- Re: [Coq-Club] Yet another dependent type question, Pierre-Marie Pédrot
- Re: [Coq-Club] Yet another dependent type question,
Pierre Corbineau
- Re: [Coq-Club] Yet another dependent type question,
Adam Chlipala
- Re: [Coq-Club] finite sets in proofs,
Chantal Keller
- Re: [Coq-Club] finite sets in proofs,
Thomas Braibant
Archive powered by MhonArc 2.6.16.