Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Proposition for strictly positive occurrence

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Proposition for strictly positive occurrence


Chronological Thread 
  • From: Yixuan Chen <xlk AT umich.edu>
  • To: Coq Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Proposition for strictly positive occurrence
  • Date: Tue, 3 Jul 2018 17:06:15 -0400
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=xlk AT umich.edu; spf=Pass smtp.mailfrom=xlk AT umich.edu; spf=None smtp.helo=postmaster AT mail-qk0-f182.google.com
  • Ironport-phdr: 9a23:fTTe9xQMdbF1zzMJX775Bnvjfdpsv+yvbD5Q0YIujvd0So/mwa69Yx2N2/xhgRfzUJnB7Loc0qyK6/6mATRIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfbJ/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbDVwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4rx1QxH0ligIKz858HnWisNuiqJbvAmhrAF7z4LNfY2ZKOZycqbbcNgHR2ROQ9xRWjRPDI28cYUBDOgOPehFoYbyu1QDtgGxCRW2Ce711jNEmn370Ksn2OohCwHG2wkgEsoMv3TVo9T1Kb0dUeaox6TWzTXMcfVW0ir65YnHdhAhouqBXa91ccrQ1UYvFxnJgUuNpoz4Jj6Y0PkGvWac7+plT+2vimgnphlpoji1wccsiIvJipgLxVDZ8yhy3YU7JcWgRUJlfdKpFIFcuiKaOodsXM8uXX1ktDwnxrAFp5K3ZDUGxZs7yxLFdvCKcJSE7gj9WOueLzp0nm9pdbO8ihu07EOu0PfzVtOu31ZPtidFksfDtnQK1xHL78iIUPp9/kO41TaW1ADf9vhIIU4pmafYNZIt2LEwlp0UsUTMGi/5hl/6g7ORdkUh4uSo6uLnbav6ppKEKYN4lgXzPr4tl8G/G+g0LBYCU3SB9eih17Dv41X1QLBQgf03lqnZvoraJcMepqOhDA5V1oUj5g2iDzej0dQXgXkHIEhbdx2akojlI0vOL+zgDfejn1Ssly9myOzBPr34G5nCMnzDkKr6crtm8E5dyA8zzchF6J5OC7EBJujzWk7ru9DCAB85KV/8/+GyI9JknqgaRGjHVqSeKebZtUKCzuMpOeiFIoEP7mXTMf8gss/vnWIwnxc2faSvlc8HbHOQA/FnKEXfbHbx1IRSWVwWtxYzGbS5wGaJViReMjPrB/plt2MLTbm+BIKGfbiDxbmI3SO1BJpTPzkUF1WNGneueomZCa5VNHCiZ/R5mzlBboCPDpc73Ej35hL/yrFnaOfY539A7M+x5J1O/+TW0CoK23l0AsCaiT/fSmh1miYRRGdz0vkv+wpyzVCM1aU+iPtdR4Re

Dear Ralph and Dan,

Thanks for your suggestions. It seems like the problem is much more complicated than I expected to be :( I might just take a detour to avoid the problem for now, but I will take a look into your suggestions later. Anyway, thanks a lot!
On Jul 3, 2018, 9:19 AM -0400, Ralph Matthes <Ralph.Matthes AT irit.fr>, wrote:

Dear Yixuan Chen,

Your question refers to a very old problem of Coq. It is just not possible to do categorical datatypes there in a generic fashion. One would like to speak about an arbitrary "functor" f and later use the generic construction in concrete instances that would even mostly be strictly positive. But this is not supported by Coq.

I have written papers where I suggested other recursion schemes that would work - even in Coq - for a class of f that is far more liberal than strict positivity (see my papers in JFP and SCP). The requirement for that class can be encapsulated logically, as you described in your post.

You can also switch off the checks, see the benefits of it in my TYPES'18 talk (in particular the second last slide of it), available at https://types2018.projj.eu/conference-programme/#session8 - move two lines up there and click on the title of the talk.

Kind regards,    Ralph Matthes



Le 03/07/2018 à 02:20, Yixuan Chen a écrit :
Dear Coq users,

I met a situation where I need to define an inductive type like,

Context (f: Type -> Type).

Inductive foobar: Type :=
| something_of: (f foobar) -> foobar
| nothing: foobar.

This does not pass the positive occurrence check, and it shouldn’t. However, the actual definition that would be passed as f should always guarantee to generate only legitimate types. Is there a way to write “strictly positive occurrence” as an proposition in Coq and make it as an hypothesis for f in the client and proved by the provider(s) of f? Thanks.

Best Regards,
Yixuan (Luke) Chen





Archive powered by MHonArc 2.6.18.

Top of Page