Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] (no subject)

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] (no subject)


chronological Thread 
  • From: Jean-Christophe Filliatre <filliatr AT lri.fr>
  • To: satrajit AT attbi.com
  • Cc: coq-club AT pauillac.inria.fr
  • Subject: Re: [Coq-Club] (no subject)
  • Date: Thu, 23 Jan 2003 09:34:47 +0100
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

satrajit AT attbi.com
 writes:
 > I'm new to Coq. Here's what I need to do:
 > 
 > Definition A:B->B:=
 >     [b:B] Cases b of
 >          (foo b') => ......
 >          _        => _
 >     end.
 > 
 > However, I'm getting the following error at the last but one line:
 > Error: The reference _ was not found in the current environment.
 > 
 > I assume, the construct _ => _, which I noticed in a similar
 > definition in a  
 > paper based on Coq V6.10, is no longer supported. What is the way
 > out? 

You should write instead:

  Definition A:B->B:=
      [b:B] Cases b of
           (foo b') => ......
           x        => x

Indeed, "_"  on the left side  is a pattern  (matching everything) but
"_" on the right side is seen as a variable, thus unbound.

Best regards,
-- 
Jean-Christophe Filliâtre





Archive powered by MhonArc 2.6.16.

Top of Page