coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: "Daniel Peng" <coq AT peng.dyndns.org>
- To: coq-club AT pauillac.inria.fr
- Cc: "Paul Govereau" <govereau AT eecs.harvard.edu>, amal AT eecs.harvard.edu, "John Dias" <dias AT eecs.harvard.edu>, "Greg Morrisett" <greg AT eecs.harvard.edu>
- Subject: [Coq-Club]Induction schemes for not-quite mutually inductive types
- Date: Sat, 20 May 2006 21:58:31 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=B/CR333q+xN+aa+2xxUahXeQ4Yiqq6Rx9nnPhBtr3N2iGLwBva99R+enQsgpb2/ylyf5qa2vkSyKynJ1B5vk4C1KmgEOcH5PHJAWV3AuBLEkgJfiXU7fUhHpsaXYLNVS8a9r/UExn7/02dtGh3vh74gYPnG8xO5abyyalXIMQbU=
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Hello,
I'm trying to formalize Typed Assembly Language in Coq, and the types
look like this:
Inductive T : Set :=
| TInt
| TCode: Map T -> T (* the type of a code pointer is a partial map
from registers to types *)
| TVar : nat -> T (* deBruijn indices *)
| TForall : T -> T.
I'm having trouble with the induction principle in the TCode case.
When I induct over T, the TCode case doesn't provide any induction
hypotheses. Essentially, I want Map T and T to be mutually inductive;
however, I haven't declared them that way, and I can't seem to get a
mutual induction principle over them.
I thought I could leverage the standard library by using Map, but
perhaps this is the wrong approach. Do I need to give up on Map and
somehow make the mutual induction explicit (e.g., below)? Is there a
better way to do this? I just started learning Coq a week ago, so I'd
appreciate any suggestions and advice.
Inductive T : Set :=
| TInt
| TCode: (register -> opt) -> T
| TVar : typevariable -> T (* deBruijn indices *)
| TForall : T -> T
with opt : Set :=
| SOME : T -> opt
| NONE.
Scheme T_ind2 :=
Induction for T Sort Set
with TCode_ind2 :=
Induction for option Sort Set.
Thank you,
Daniel Peng
- [Coq-Club]Induction schemes for not-quite mutually inductive types, Daniel Peng
Archive powered by MhonArc 2.6.16.