coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Pierre Courtieu <pierre.courtieu AT gmail.com>
- To: Coq Club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Mutual Fixpoints into mutual inductive types
- Date: Fri, 5 Jan 2018 11:59:26 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=pierre.courtieu AT gmail.com; spf=Pass smtp.mailfrom=pierre.courtieu AT gmail.com; spf=None smtp.helo=postmaster AT mail-oi0-f42.google.com
- Ironport-phdr: 9a23:+tK3dBLLE34vqNentdmcpTZWNBhigK39O0sv0rFitYgRLfXxwZ3uMQTl6Ol3ixeRBMOHs6sC07KempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffxhEiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLdQgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QKsqUjq+8ahkVB7oiD8GNzEn9mHXltdwh79frB64uhBz35LYbISTOfFjfK3SYMkaSHJDUcZfVyJPDICyYZYRAeUdMuhVtJX9p0IUoBeiGQWgGOHixzlVjXH2x6061OEhHBnc0gwhAd0Oqm7Uo8voP6oMVuC10bPIzSnCb/xIxDf29Y/Fcgggof6SR7Jwa9TexVMzGAPCk1WQs5DlPzKL2eQQqGWb4O9gWviui24jsQ1+vj+vxsI1h4TPm4kbyUjE+D1nzIopIdC0Uk12bN6+HJdOqi2XNJF6T8w8T2xupS000KcJuYShcygP0JknxwDQa/iAc4WQ5xLsTueRITNhiHJiebKzmw++8Uavx+HiTMW031FKri1KktnIqH8BzQDc6s+CSvdl/0eh3yiA1xzL5+1aPUw5kbDXJp0hz7IqiJYfrEfOEjX5lUnolKOWc18r+ums6+TpeLXmoZqcOpdsigH/LKsugNa/DvoiPgcSWGib5P681KHi/ULnXbVHlfI2kqzDv5DbIcQXvLK2AwhQ0oo78RawEy+m0MgEnXkANF9KZBWHj5HwN17SJPD4EOywjk+3kDZrwvDGJqfuDo/MLnjFirfhfKxy51RSyAopnphj4Md/DahJC/buUAelv9vBSxQ9LgacwuD9Cdw72JlICkyVBarMCKLfq0WFrskoPvOQZYII8GLlKvU//fOohngkg0MccLSB0p4eaXT+FfNjdRbKKUHwi8sMRD9Z9jE1S/bn3RjbCWZe
2018-01-05 10:29 GMT+01:00 Merlin Göttlinger
<megoettlinger AT gmail.com>:
> 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.
is it really Vector.t t4 n in d3 and d4? Given you comments I would
have expected Vector.t t1 n and Vector.t t2 n.
Can you give the function you tried to write? I can't infer it from
what you gave.
> 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).
Maybe the problem comes more from the fact that your types use
Vector.t in a nested way. Using list would be a problem too.
P.
> 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/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.