coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- 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:32:07 +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=pXWQ1D5IA3HoJm5Fx2y2mqtcwP2+VDsv3X8o4z2sTRZAsbDaYkaoTzuC4bfWtwAXSI mLON1QXi1O5rAN5q95ECfyi5zc5vW9R3jCn7rqLUKU6qtliYXyTgZwHB867W4ZvvSoDf B1EGC9kAccw/VaaoHVgt+OjtAQCByIHQMEPVg=
> Sorry if I was not clear. Of course, you do not have to perform the proofs
> by yourself, I was only speaking about a problem of computation:
>
> - even if computation is rather good in Coq, it takes some time...
Could you elaborate more on the kind of examples that take so much
time ? In my own experience (using FSets/FMaps in automata
construction), it is possible to go quite far without any troubles.
> - in fact, you even cannot perform this computation, since the proofs that
> the lists are not redundant in FSets are opaque. So if you try something
> like :
>
> remove (add x empty_set)
But it seems unavoidable, because x is a variable here. To perform
this computation, you have to match on x, which is abstract. The
problem here is not the fact that the proofs are opaque. The following
code illustrate this (it works with either AVL or Lists).
Require Import FSetInterface.
Require Import FSetList.
Require Import FSetAVL.
Require Import OrderedTypeEx.
Module M := FSetAVL.Make (Nat_as_OT).
Notation "A == B" := (M.Equal A B) (at level 70, no associativity).
Notation "A === B" := (M.equal A B = true) (at level 70, no associativity).
Goal M.remove 2 (M.add 2 (M.empty)) === M.empty . vm_compute. reflexivity.
Qed.
Goal forall x, M.remove x (M.add x (M.empty)) === M.empty.
intros.
vm_compute.
Abort.
Before the Abort, the printed term is quite intricate, but you can see
that the matching is stuck because x is abstract. However, it works
well with constants. In order to let coq compute to prove the second
goal, you would need some sort of reification and reflexive
simplification procedure, as far as I can tell. Can you elaborate on
how you are able to prove this kind of things by changing the
definition of remove ?
With best regards,
Thomas
- [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, Michael Shulman
- Re: [Coq-Club] Yet another dependent type question, Hugo Herbelin
- Re: [Coq-Club] Yet another dependent type question, Michael Shulman
- 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.