Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] How to project/define these attributes?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] How to project/define these attributes?


chronological Thread 
  • From: Adam Chlipala <adamc AT csail.mit.edu>
  • To: zaman.a25 AT gmail.com
  • Cc: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] How to project/define these attributes?
  • Date: Mon, 08 Aug 2011 11:49:23 -0400

zaman.a25 AT gmail.com
 wrote:
"the second two pattern matching cases clearly aren't returning
[ProtocolEvent]s."

Exactly. Coq is requiring me to define all cases in the pattern matching. How
would I get the ProtocolEvents of the other two cases?  I just want to be able
to get the pEvent of the Protocols: pR, Protocol1 and Protocol2...

You haven't given an unambiguous definition (even informally, in your list messages) of what behavior you want here. It sounds like what you are looking for is probably a basic recursive function.

May I ask what source you're using to learn Coq? Most will introduce recursive functions quite early.



Archive powered by MhonArc 2.6.16.

Top of Page