Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Dependent Functions

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Dependent Functions


chronological Thread 
  • From: Adam Chlipala <adamc AT hcoop.net>
  • To: Jeff Terrell <jeff AT kc.com>
  • Cc: coq-club AT pauillac.inria.fr
  • Subject: Re: [Coq-Club] Dependent Functions
  • Date: Tue, 31 Mar 2009 10:24:16 -0400
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Jeff Terrell wrote:
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.

This definition type-checks:

CoFixpoint Build_XY (n : nat) (m : nat) : X :=
  Build_X n (Build_YX m n :: nil)
with
  Build_YX (m : nat) (n : nat) : Y := Build_Y m (Build_XY n m).

...but I'm guessing that this isn't what you're looking for. Can you explain what you are trying to do in your actual example? Co-inductive types have many non-intuitive features, and it's quite possible that you'd be better off reformulating your development at a higher level.





Archive powered by MhonArc 2.6.16.

Top of Page