coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jeff Terrell <jeff AT kc.com>
- To: coq-club AT pauillac.inria.fr
- Subject: [Coq-Club] Dependent Functions
- Date: Tue, 31 Mar 2009 10:24:47 +0100
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Hi,
I'm trying to create functions to build types in which X references one or more Y, and Y references X.
In the case where X references one Y, the following function appears to work
fine.
CoInductive X : Set :=
Build_X : nat -> Y -> X
with Y : Set :=
Build_Y : nat -> X -> Y.
CoFixpoint Build_XY (n : nat) (m : nat) : X :=
Build_X n (Build_YX m n)
with
Build_YX (m : nat) (n : nat) : Y := Build_Y m (Build_XY n m).
However, in the case where X references many Y, I'm not sure how to define the function.
CoInductive X : Set :=
Build_X : nat -> list Y -> X
with Y : Set :=
Build_Y : nat -> X -> Y.
Any help would be much appreciated.
Regards,
Jeff.
- [Coq-Club] Dependent Functions, Jeff Terrell
- Re: [Coq-Club] Dependent Functions,
Adam Chlipala
- Re: [Coq-Club] Dependent Functions,
Jeff Terrell
- Re: [Coq-Club] Dependent Functions, Adam Chlipala
- Re: [Coq-Club] Dependent Functions,
Jeff Terrell
- Re: [Coq-Club] Dependent Functions,
Adam Chlipala
Archive powered by MhonArc 2.6.16.