coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Merlin Göttlinger <megoettlinger AT gmail.com>
- To: "coq-club AT inria.fr" <coq-club AT inria.fr>
- Subject: [Coq-Club] Mutual Fixpoints into mutual inductive types
- Date: Fri, 05 Jan 2018 09:29:51 +0000
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=megoettlinger AT gmail.com; spf=Pass smtp.mailfrom=megoettlinger AT gmail.com; spf=None smtp.helo=postmaster AT mail-io0-f180.google.com
- Ironport-phdr: 9a23:lkJ+rRwQgwYC6tbXCy+O+j09IxM/srCxBDY+r6Qd1O4RIJqq85mqBkHD//Il1AaPAd2Craocw8Pt8InYEVQa5piAtH1QOLdtbDQizfssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1JuPoEYLOksi7ze+/94HObwlSmDaxfa55IQmrownWqsQYm5ZpJLwryhvOrHtIeuBWyn1tKFmOgRvy5dq+8YB6/ShItP0v68BPUaPhf6QlVrNYFygpM3o05MLwqxbOSxaE62YGXWUXlhpIBBXF7A3/U5zsvCb2qvZx1S+HNsDwULs6Wymt771zRRDniCkJOT03/nzJhMNsl69Uug6tqgZlzoLIfI2YNvxzdb7dc9MAQmpBW95cWStfDYOma4sPDuwBMv5ZoZH7u1sOsR++BQiqBOPg1DBInGL90Ko/0+s/HgHG2xIvH84SsHTQrdX1MqgSXv6vzKTTwjXDaulZ2Tb56ITSbh8hpvSMUKt2fMHMykcvDxvIgkuMpYHhJT+Y1eQAv3KF4+Z+W++jkXMrpgJtrjWp28wikJPGhpgPxVDB7Sh5wJg6Jdm/SENjZN6rCppQtyWDO4t3RcMuX3hkuCgnxrAFpZK3ZicKyJMgxx7Qb/yIbZKE7Q7kVOaUOTt4hXRld6yjhxuq70Ss1unxWtO33VtKtCZJjMfAu34X2xDO6cWLVuNx/kK71jaO0wDT5PtEIUcxlafDLp4u3LEwlp0NvkTfAi/2nET2jKmZdko64Oil8OvnYrD8qZ+dM494kB3xMqMrmsCnG+Q3LhAOX3SH+eS7zLDs4Ur5QKxTgvIqlqnZrYvVKN8Apq+5Bg9Vypws5wy+DzegytQYnGMIIEhLeBKd3MDVPASEK/fhSPy7nl6EkTFxxvmAMKerSsHGKWGGm7P8d5587VRdwUw914YMyYhTD+QkLej3W0nGm0LEEhs4NQO52a6zDdhy0Y4CRWaOBKCUKovdtFaJ4qQkJOzaN9xdgyr0N/Vwv62mtnQ+g1JIJaQ=
Hi,
simplified I have the following mutualy inductive type:
Inductive t1 : Set :=
| a1 : t1
| a2 {n} : Vector.t t1 n -> t1
| a3 {n} : Vector.t t2 n -> t1
with t2 : Set :=
| b1 : t2
| b2 {n} : Vector.t t1 n -> t2
| b3 {n} : Vector.t t2 n -> t2.
I also have two other inductive types:
Inductive t3 : Set :=
| c1 : t3 -> t3 -> t3
| c2 {n} : Vector.t t1 n -> t3
| c3 {n} : Vector.t t2 n -> t3.
Inductive t4 : Set :=
| d1 : t4
| d2 : t4 -> t4 -> t4
| d3 {n} : Vector.t t4 n -> t4
| d4 {n} : Vector.t t4 n -> t4.
The problem I'm having is I am trying to convert t4 into t3 (its a kind of normalization). The issue comes with handling the cases d3 and d4 which corrspond to c2 and c3 respectively. There I essentially need to map a function converting to t1/t2 over the vector. Given that t1 and t2 are recursive and mutual these functions have to be mutual fixpoints (lets call those f1 : t4 -> t1 and f2 : f4 -> t2).
I have played around with this for a while now and I can't get coq to accept my definitions for these mutual fixpoints. When I try to map f2 over the input vector in the definition of f1, coq produces somewhat strange errors like "Not enough arguments" which if i write (fun f => f2 f) turns into a complaint that I apply f2 to something which should rather be the whole vector (to which it can't even be applied for typing reasons).
Is there some trick how to do this or is this again a case where using vector completely screws you over (or makes things so complicated that you'd rather not do that)?
Cheers,
Merlin
- [Coq-Club] Mutual Fixpoints into mutual inductive types, Merlin Göttlinger, 01/05/2018
- Re: [Coq-Club] Mutual Fixpoints into mutual inductive types, Pierre Courtieu, 01/05/2018
- Re: [Coq-Club] Mutual Fixpoints into mutual inductive types, Merlin Göttlinger, 01/05/2018
- Re: [Coq-Club] Mutual Fixpoints into mutual inductive types, Pierre Courtieu, 01/05/2018
- Re: [Coq-Club] Mutual Fixpoints into mutual inductive types, Joachim Breitner, 01/05/2018
- Re: [Coq-Club] Mutual Fixpoints into mutual inductive types, Merlin Göttlinger, 01/05/2018
- Re: [Coq-Club] Mutual Fixpoints into mutual inductive types, Joachim Breitner, 01/05/2018
- Re: [Coq-Club] Mutual Fixpoints into mutual inductive types, Merlin Göttlinger, 01/07/2018
- Re: [Coq-Club] Mutual Fixpoints into mutual inductive types, Joachim Breitner, 01/07/2018
- Re: [Coq-Club] Mutual Fixpoints into mutual inductive types, Merlin Göttlinger, 01/08/2018
- Re: [Coq-Club] Mutual Fixpoints into mutual inductive types, Joachim Breitner, 01/08/2018
- Re: [Coq-Club] Mutual Fixpoints into mutual inductive types, Merlin Göttlinger, 01/07/2018
- Re: [Coq-Club] Mutual Fixpoints into mutual inductive types, Joachim Breitner, 01/05/2018
- Re: [Coq-Club] Mutual Fixpoints into mutual inductive types, Merlin Göttlinger, 01/05/2018
- Re: [Coq-Club] Mutual Fixpoints into mutual inductive types, Merlin Göttlinger, 01/05/2018
- Re: [Coq-Club] Mutual Fixpoints into mutual inductive types, Pierre Courtieu, 01/05/2018
Archive powered by MHonArc 2.6.18.