coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: zaman.a25 AT gmail.com
- To: coq-club AT inria.fr
- Subject: [Coq-Club] How to project/define these attributes?
- Date: Mon, 8 Aug 2011 17:19:32 +0200
Hi,
I have the Inductive definition:
Protocol : Set :=
| Create_ProtocolB (pEvent: ProtocolEvent)
| Create_ProtocolR (pR:Protocol)(RepOp1: RepetitionOperator)
| Create_ProtocolEE (protocol1: Protocol)(BinOp2: BinaryOperator)(protocol2:
Protocol)
And wish to define the attribute projections, but Coq gives an error. How
would
I define such attributes to get the ProtocolEvent (pEvent) of each Protocol?
Ive tried (for the attribute pEvent):
Definition pEvent : Protocol -> ProtocolEvent :=
(fun x: Protocol =>
match x with
| (Create_ProtocolB pe) => pe
| (Create_ProtocolR p r) => p
| (Create_ProtocolEE p1 bop p2) => p1
end).
I dont know how to define the attributes of a recursive Inductive definition.
Thanks in advance.
- [Coq-Club] How to project/define these attributes?, zaman . a25
- Re: [Coq-Club] How to project/define these attributes?, Adam Chlipala
- <Possible follow-ups>
- Re: Re: [Coq-Club] How to project/define these attributes?,
zaman . a25
- Re: [Coq-Club] How to project/define these attributes?,
Adam Chlipala
- Re: [Coq-Club] How to project/define these attributes?, AUGER Cedric
- Re: [Coq-Club] How to project/define these attributes?,
Adam Chlipala
- Re: Re: [Coq-Club] How to project/define these attributes?,
zaman . a25
- Re: [Coq-Club] How to project/define these attributes?, Adam Chlipala
- Re: Re: [Coq-Club] How to project/define these attributes?,
zaman . a25
- Re: Re: [Coq-Club] How to project/define these attributes?, Vincent Siles
- Re: Re: Re: [Coq-Club] How to project/define these attributes?,
zaman . a25
- Re: [Coq-Club] How to project/define these attributes?, Adam Chlipala
Archive powered by MhonArc 2.6.16.