Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Problems with basic Eval

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Problems with basic Eval


chronological Thread 
  • From: lando <lando2 AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Problems with basic Eval
  • Date: Sat, 17 Apr 2010 20:40:50 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=jgcqysq6P8a+DHVY+MYoq3O/DD4wyJ6WjkRdZD7MrgEoiQk6QzwwV8wChll+z3vYEc 9v5PIr/oeBdoMmdVVi8KK+isyCNMPGRFj8SpwqAgl2pnG5nECD2tQTtfXRlc6sNz5jrF UBEGFSXp2mfasIZNUu8C/2xyqtssZIHm1BirM=

Thanks for the quick reply.  I'll check it out.  Working from a basic
introduction and haven't gotten to compute yet.

As far as the references to Basics.v go, I thought they were standard
issue url's are as follows.
http://www.seas.upenn.edu/~cis500/cis500-s09/lectures/Basics.pdf
http://www.seas.upenn.edu/~cis500/cis500-s09/hws/Basics.v

On Sat, Apr 17, 2010 at 8:15 PM, Adam Chlipala 
<adam AT chlipala.net>
 wrote:
> lando wrote:
>>
>> My function:
>> Definition andb3 (b1:bool) (b2:bool) (b3:bool) : bool := andb (andb b1 b2)
>> b3.
>>
>> My Eval:
>> Eval simpl in (andb3 true true true).
>> Eval simpl in (andb3 false true true).
>>
>> My Output:
>> = andb3 true true true
>> : bool
>> = andb3 false true true
>> : bool
>>
>> Not sure why it is coming out like this. It should be
>> = true
>> : bool
>> = false
>> : bool
>>
>
> Maybe you want [Eval compute] instead of [Eval simpl].  The definition of
> the [simpl] reduction strategy is that it only unfolds definitions when that
> leads to immediate reduction of pattern-matching.  There are no [match]
> expressions in the definition of [andb3], so [simpl] will never unfold
> [andb3].
>
> P.S.: You mention "basics.v" like it is a file that folks on this list will
> be familiar with.  I, at least, don't know what you're referring to.
>




Archive powered by MhonArc 2.6.16.

Top of Page