Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Mutually dependent records

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Mutually dependent records


chronological Thread 
  • From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre AT lri.fr>
  • To: S�bastien Hinderer <Sebastien.Hinderer AT ens-lyon.fr>
  • Cc: Coq <coq-club AT pauillac.inria.fr>
  • Subject: Re: [Coq-Club] Mutually dependent records
  • Date: Tue, 8 Jul 2003 14:08:20 +0200
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Sébastien Hinderer writes:
 > 
 > I'd like to declare two record types t1 and t2, with t1 having a field of
 > type t2, and t2 having a field of type t1.
 > Is this possible in Coq, and how ?

There is no syntax for mutually recursive records (I agree there could
be  some). But  since  "Record" is  simply  a syntactic  sugar for  an
inductive type, just replace your records by mutually inductive types:

  << Record u:Set := { A:t } with t:Set := { B:u }. >>

  -->
 
  Inductive u:Set := A:t->u with t:Set := B:u->t.

-- 
Jean-Christophe 






Archive powered by MhonArc 2.6.16.

Top of Page