[Agda] Positive but not strictly positive types

Thorsten Altenkirch Thorsten.Altenkirch at nottingham.ac.uk
Fri Apr 10 21:16:21 CEST 2015


Why do you want non-strict positive types? They don't make any sense to me. The only justification is classical.

Thorsten

Sent from my iPhone

> On 10 Apr 2015, at 18:22, Frédéric Blanqui <frederic.blanqui at inria.fr> wrote:
> 
> Hello.
> 
> Le 10/04/2015 17:19, Aaron Stump a écrit :
>> Hello, Frédéric.  Thanks for this interesting information about Coq.  
>> I have a couple follow-up questions if you don't mind:
>> 
>> -- So are you saying that Coq could allow nonstrictly positive small 
>> inductive types?
> Yes. You can have a look at:
> http://iospress.metapress.com/content/tf54nwg673hvgk5d/
> or https://who.rocq.inria.fr/Frederic.Blanqui/fi05-pdf.html
> 
>>  It seems it currently does not, as this one is rejected, for example:
>> 
>> Inductive Cont (A:Prop) : Prop :=
>>  D : Cont A
>> | C : ((Cont A -> A) -> A) -> Cont A.
> Unfortunately, yes, mainly for technical reasons I guess. This would 
> require to restrict pattern-matching definitions so that they can be 
> encoded into recursors, or upgrade the Coq termination checker to 
> size-based termination since the structural subterm ordering is defined 
> for strictly positive types only and cannot handle non-strictly positive 
> types...
> 
>> -- is it necessary to forbid large eliminations with big inductive 
>> types due to the Coquand-Paulin example we have been discussing (in 
>> addition to forbidding nonstrictly positive big inductive types)?
>> Or is there another example that shows the problem with large 
>> eliminations and big inductive types?
>> Sorry if these things are already explained somewhere in 
>> theories/Logic/ in the Coq library...
> I know no other counter-example but current (sufficient) termination 
> conditions require so.
> 
> Frédéric.
> 
>> Thanks,
>> Aaron
>> 
>>> On 04/10/2015 01:40 AM, Frédéric Blanqui wrote:
>>> Hello.
>>> 
>>> Speaking of Coq: because Prop is impredicative, one usually 
>>> distinguishes between:
>>> 1. small inductive types where Type-level constructor arguments are 
>>> parameters
>>> 2. big inductive types
>>> 
>>> Coquand's counter-example is a big inductive type.
>>> 
>>> For this reason, strong elimination on big inductive types is 
>>> forbidden in Coq.
>>> 
>>> Adding small inductive types preserves termination and logical 
>>> consistency in system F or Fomega. A reference to Mendler's work has 
>>> already been given. For some more recent works, see Abel et al. More 
>>> generally, you can consider monotone types (positivity is a syntactic 
>>> condition ensuring monotony): see Matthes and Uustalu works. Adding 
>>> dependent types doesn't change anything.
>>> 
>>> So, there should be no problem in Agda.
>>> 
>>> Frédéric.
>>> 
>>> 
>>> Le 09/04/2015 18:07, Vilhelm Sjöberg a écrit :
>>>> On 2015-04-09 11:49, Andrés Sicard-Ramírez wrote:
>>>>> Retaking the discussion in
>>>>> http://thread.gmane.org/gmane.comp.lang.agda/6008, it's known that
>>>>> using *negative* types it's possible
>>>>> 
>>>>> a) to prove absurdity or
>>>>> b) to write non-terminating terms.
>>>>> 
>>>>> Is there some example in *Agda* of a positive but not strictly
>>>>> positive type which allows a) or b)?
>>>> I'm interested in the answer to this question also. If I correctly 
>>>> understand what Thierry Coquand wrote in the thread you mention, the 
>>>> answer is no; because Agda is predicative allowing positive 
>>>> datatypes would be sound. But it would be interesting to see this 
>>>> fleshed out more.
>>>> 
>>>> I wrote up a blog post about using non-strictly positive datatypes 
>>>> to get a paradox in Coq: 
>>>> http://vilhelms.github.io/posts/why-must-inductive-types-be-strictly-positive/
>>>> 
>>>> Vilhelm
>>>> _______________________________________________
>>>> Agda mailing list
>>>> Agda at lists.chalmers.se
>>>> https://lists.chalmers.se/mailman/listinfo/agda
>>> 
>>> _______________________________________________
>>> Agda mailing list
>>> Agda at lists.chalmers.se
>>> https://lists.chalmers.se/mailman/listinfo/agda
> 
> _______________________________________________
> Agda mailing list
> Agda at lists.chalmers.se
> https://lists.chalmers.se/mailman/listinfo/agda




This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please send it back to me, and immediately delete it. 

Please do not use, copy or disclose the information contained in this
message or in any attachment.  Any views or opinions expressed by the
author of this email do not necessarily reflect the views of the
University of Nottingham.

This message has been checked for viruses but the contents of an
attachment may still contain software viruses which could damage your
computer system, you are advised to perform your own checks. Email
communications with the University of Nottingham may be monitored as
permitted by UK legislation.



More information about the Agda mailing list