Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] [Coq Club]a strange question when using function

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] [Coq Club]a strange question when using function


chronological Thread 
  • From: Adam Chlipala <adamc AT csail.mit.edu>
  • To: ldou AT cs.ecnu.edu.cn
  • Cc: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] [Coq Club]a strange question when using function
  • Date: Thu, 25 Aug 2011 08:04:40 -0400

ldou AT cs.ecnu.edu.cn
 wrote:
> when proving lemma "existselement", i do "induction d" and  "simpl", then 
> Coq system produce a paticular "e0:e" and replace "d" with "(DE e0)". 
> That's why you see such a particular constant string.
>   

I don't call [e0] there a constant string. ["e0"] would be a constant
string.

> What confuse me is the difference when Coq compute the "interp" function. 
> if i do:
>
> Compute (interp (DE "e0")).
>
> then i can get the following result  which is what i expect : 
>      = (("e0" :: nil) :: nil) :: nil
>      : m
>
> but when do "induction d" and  "simpl" in lemma "existselement", i get a 
> different result:
> ((e0 :: nil) :: nil)
> which i think is wrong.
>   

Pierre already sent a solution, so I won't go into much more detail
here, except to reiterate that Pierre and I are pretty sure that there
is nothing wrong with this output, and the version you expected would be
wrong. Perhaps the problem here is a misunderstanding of the meaning of
double quotes in Coq? I asked you before why you expected a different
outcome, but your message that I'm replying to doesn't seem to answer
that question. Why would you think that [interp (DE "e0")] would yield
the same term as your [induction] call?



Archive powered by MhonArc 2.6.16.

Top of Page