coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Andrew McCreight <continuation AT gmail.com>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] decision procedure during "Eval compute"
- Date: Sun, 30 May 2010 20:45:48 -0700
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; b=LfTp57ecxT4ZKFupry2Y5gnZt71HmqbUYGCqT0daFFOlsr5KO9l/r8UQ2SzOx8iXEE NNtdZyedvoiIt+mnj+YPRyQ3siOMdcy61+vrq/RlU1LH2WR1AzhtNqXFSZRzBwFDPYIu Sm9rG54hTtU4BOh+L7SbiBVa9oPbq2wt52nak=
Use Defined instead of Qed. When you use Qed, Coq makes the definition opaque, and it won't reduce it during evaluation. Even that may not work, depending on what proof "decide equality" happens to generate.
On Sun, May 30, 2010 at 8:39 PM, Gyesik Lee <gslee AT ropas.snu.ac.kr> wrote:
Hi,
I am wondering about how to get a simple answer when I perform "Eval
compute in ...".
Here is a simple example.
===========================
Inductive toto_titi := toto | titi.
Lemma toto_titi_dec : forall x y : toto_titi, {x = y} + {x <> y}.
Proof.
decide equality.
Qed.
Definition decision (t:toto_titi) : bool :=
if toto_titi_dec t toto then true else false.
Eval compute in (decision toto).
(* Coq's reply:
if toto_titi_dec toto toto then true else false
: bool
*)
=============================
Of course, Coq need to make a decision, but is there a way to get a
simplified answer "true" in the above case?
Gyesik
- [Coq-Club] decision procedure during "Eval compute", Gyesik Lee
- Re: [Coq-Club] decision procedure during "Eval compute", Andrew McCreight
- Re: [Coq-Club] decision procedure during "Eval compute", Gregory Malecha
Archive powered by MhonArc 2.6.16.