Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Positivity condition and nested recursion

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Positivity condition and nested recursion


chronological Thread 
  • From: Stéphane Glondu <steph AT glondu.net>
  • To: Robbert Krebbers <mailinglists AT robbertkrebbers.nl>
  • Cc: coq-club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] Positivity condition and nested recursion
  • Date: Wed, 09 May 2012 13:42:23 +0200

Le 09/05/2012 13:22, Robbert Krebbers a écrit :
> I am wondering why Coq does not allow the following inductive type.
> 
>   Inductive val : Type :=
>     | vnat : nat -> val
>     | varray (l : list val) : length l > 0 -> val.
> 
> It gives the following error
> 
>   Error: Non strictly positive occurrence of "val" in
>    "forall l : list val, length l > 0 -> val".
> 
> However, I do not see why the positivity condition does not hold.

"val" occurs (as an implicit argument) in "length l".


Cheers,

-- 
Stéphane



Archive powered by MhonArc 2.6.16.

Top of Page