coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Fritjof Bornebusch <fritjof AT uni-bremen.de>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] nth element of a vector
- Date: Thu, 21 May 2020 12:42:56 +0200
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=fritjof AT uni-bremen.de; spf=Pass smtp.mailfrom=fritjof AT uni-bremen.de; spf=None smtp.helo=postmaster AT gabriel-vm-2.zfn.uni-bremen.de
- Ironport-phdr: 9a23:E2qM0xG5rdvGbxq1lvmqxp1GYnF86YWxBRYc798ds5kLTJ7yo8ywAkXT6L1XgUPTWs2DsrQY0reQ6vm5EjZQqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba5yIRmssAndq9QajYR8Jqsy1xDEvmZGd+NKyG1yOFmdhQz85sC+/J5i9yRfpfcs/NNeXKv5Yqo1U6VWACwpPG4p6sLrswLDTRaU6XsHTmoWiBtIDBPb4xz8Q5z8rzH1tut52CmdIM32UbU5Uims4qt3VBPljjoMOjgk+2/Vl8NwlrpWrhyhqRJh3oDaY4+VO/VicazAct0VR3FMXtpSWiFbHo+wc5cDAugHMO1Fr4f9vVwOrR6mCAesHuPvyyNIhn3x3a00zu8sDAbG3BYmH90Qq3vUsc71O7sSUeuoy6TIwy/Db/JK2Tf/74jIfAssoeyKXbJxaMbe0lMvGB3AjlqOr4zpJS6a2foUvmWd8uFvWv6hhXQ9pAFtvjig2N0sio/Ri48JxF3J+jl1zYQ1KNCmVUJ2ZcKpHZRNuiyaM4Z4Td4vTmJotSg017ELupG2cicLxZkk2RPSZPiKfpaI7x/gSuucJypzinxieLK6nRmy8E6gx/XmVsaqzVlFsytFksXWun8R0BzT79CLSvp7/ke72DaAzRrf6u9eIUwsmqrbKoIhwr4tlpUIq0jMAij2mEDwgaSLdUsk4vCl5/npb7jpvJOQKpN4hh/kPqkuhsCzG/k0PwoWU2WY5+iwzqPv8VH7TblQkPE6jLTVvIraKMkboKOyHhVb3Zw56xmlCjeryNQYkmcDLFJCYB+HgJLmNErUIPD5E/i/h02gkClux/zfILHtGJTMLnbFkLv7YLZ97U9cxBMowtBF+Z1UD68OIPTpVkDsqtPUFh45MwqqzOb7ENhxy40TVG2VDqOELK/er0WE6+IzL+WWeYMYui7xK/0/6P7viX85l0Udfa6s3ZYPZnC4BPVmI1mbYXrrjNcMCnoKvgw/TODzk1KCSyBcZ3OsUKI6/D00FZypAZ/ZRo+xmLyBwDu7HppOa29aDVCMCG7keJmAW/cRcy2fOdRhkzwBVbi5UYAtzxCutAngy7pmNOXY4CMYtYiwnORysubUjFQ58SF+J8WbyWCECW9uzU0SQDpj8rp+vU56xB+p1rJ+jvZFDtdTr6dHSAYmN5nS5/F8CpX4QA/Ec9HPRFvwEYbuOi04Ut9km4xGWE16Adj31kmejRrvOKcckvmwPLJx8q/Y2COrdcl0wWzH2a1kkVxjGI1dO2vgm6h+sgLJCovElQOVmvTyLPhO7Gv27G6GiFG2kgRASgcpDPfYW3FabFHbqNn/oE/PHef3WOYXdzBZwMvHEZNkL9jgjFFIXvDmYYmMfmSw3m2qCBOFwPWAYdizdg==
On Wed, May 20, 2020 at 10:36:29AM -0700, Talia Ringer wrote:
> On Wed, May 20, 2020 at 05:29:19PM +0200, Dominique Larchey-Wendling
> wrote:
> > Quick fix ... project your vector into a list ;-)
> >
> Interessting, do you know any function that does that for me?
>
> You can get between list T and sigT (vector T) freely, or otherwise
> between { l : list T & length l = n } and vector T n. I have a tool
> called [1]DEVOID that ports proofs between types like these including
> lists and vectors. It can probably just spit out the thing you want for
> you if you want to use it directly. But if that feels too heavy-weight
> for you, you can just use the conversion functions it generates
> automatically:
> [2]https://www.reddit.com/r/dependent_types/comments/g8v59q/coq_applyin
> g_a_proof_on_lists_to_a_proof_on/fov7w1t/?context=3
> If you want a particular function or proof over vectors from one over
> lists I can generate it, but I'm a bit busy so it won't be immediate.
> I'm hoping to port the entire list library at some point. The process
> looks like [3]this. Note how to get functions and proofs over vectors
> of a particular length, rather than over sigT (vector T), you need not
> only a list function but also its length.
>
Sounds interessting, I will take a look into it.
Thank you for the hint.
> On Wed, May 20, 2020 at 9:16 AM Fritjof Bornebusch
> <[4]fritjof AT uni-bremen.de> wrote:
>
> On Wed, May 20, 2020 at 05:29:19PM +0200, Dominique Larchey-Wendling
> wrote:
> > Quick fix ... project your vector into a list ;-)
> >
> Interessting, do you know any function that does that for me?
> >
> > ----- Mail original -----
> > > De: "Fritjof Bornebusch" <[5]fritjof AT uni-bremen.de>
> > > À: "coq-club" <[6]coq-club AT inria.fr>
> > > Envoyé: Mercredi 20 Mai 2020 17:15:33
> > > Objet: [Coq-Club] nth element of a vector
> >
> > > Hi there,
> > >
> > > I'm looking for a function that iterates over a vector -
> > > [7]https://coq.inria.fr/library/Coq.Vectors.Vector.html - and
> returns
> > > the Zth element, like the nth element of a list.
> > >
> > > The library function only dealy with the Fin.t type, but I need
> Z.
> > > Does anyone has a suggestion or hint?
> > >
> > > Best Regards,
> > > --f.
>
> References
>
> 1. https://github.com/uwplse/ornamental-search
> 2.
> https://www.reddit.com/r/dependent_types/comments/g8v59q/coq_applying_a_proof_on_lists_to_a_proof_on/fov7w1t/?context=3
> 3.
> https://github.com/uwplse/ornamental-search/blob/master/plugin/coq/examples/Example.v
> 4. mailto:fritjof AT uni-bremen.de
> 5. mailto:fritjof AT uni-bremen.de
> 6. mailto:coq-club AT inria.fr
> 7. https://coq.inria.fr/library/Coq.Vectors.Vector.html
- [Coq-Club] nth element of a vector, Fritjof Bornebusch, 05/20/2020
- <Possible follow-up(s)>
- [Coq-Club] nth element of a vector, Fritjof Bornebusch, 05/20/2020
- Re: [Coq-Club] nth element of a vector, Agnishom Chattopadhyay, 05/20/2020
- Re: [Coq-Club] nth element of a vector, Fritjof Bornebusch, 05/20/2020
- Re: [Coq-Club] nth element of a vector, Clément Pit-Claudel, 05/20/2020
- Re: [Coq-Club] nth element of a vector, Fritjof Bornebusch, 05/20/2020
- Re: [Coq-Club] nth element of a vector, Dominique Larchey-Wendling, 05/20/2020
- Re: [Coq-Club] nth element of a vector, Fritjof Bornebusch, 05/20/2020
- Re: [Coq-Club] nth element of a vector, Talia Ringer, 05/20/2020
- Re: [Coq-Club] nth element of a vector, Fritjof Bornebusch, 05/21/2020
- Re: [Coq-Club] nth element of a vector, Dominique Larchey-Wendling, 05/20/2020
- Re: [Coq-Club] nth element of a vector, Fritjof Bornebusch, 05/21/2020
- Re: [Coq-Club] nth element of a vector, Talia Ringer, 05/20/2020
- Re: [Coq-Club] nth element of a vector, Fritjof Bornebusch, 05/20/2020
- Re: [Coq-Club] nth element of a vector, Tadeusz Litak, 05/23/2020
- Re: [Coq-Club] nth element of a vector, Frédéric Blanqui, 05/23/2020
- Re: [Coq-Club] nth element of a vector, Agnishom Chattopadhyay, 05/20/2020
Archive powered by MHonArc 2.6.19+.