Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] decision procedure during "Eval compute"

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] decision procedure during "Eval compute"


chronological Thread 
  • From: Gyesik Lee <gslee AT ropas.snu.ac.kr>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] decision procedure during "Eval compute"
  • Date: Mon, 31 May 2010 12:59:10 +0900
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=kznTCMUdp8xjYsmOCtA+xSmfkQSIvSJReppEAjNZIOrLumfY5RXLXC3iKBdvYxABnr O1Ge8MLdPWWl7NeoNEYURYaZXR8bUsg9vUSsJaAbXJmLv5LARxQVa7ACAOYgV+EDx8eQ BgXJ3REE5c6z1zm+wlFK0O37JQPjvvtg42vdg=

ah... thank you for the quick replies.

Gyesik

2010/5/31 Andrew McCreight 
<continuation AT gmail.com>:
> 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
>
>




Archive powered by MhonArc 2.6.16.

Top of Page