Skip to Content.
Sympa Menu

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

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] Positivity condition and nested recursion


Chronological Thread 
  • From: Robbert Krebbers <(e29315a54f%hidden_head%e29315a54f)mailinglists(e29315a54f%hidden_at%e29315a54f)robbertkrebbers.nl(e29315a54f%hidden_end%e29315a54f)>
  • To: coq-club <(e29315a54f%hidden_head%e29315a54f)coq-club(e29315a54f%hidden_at%e29315a54f)inria.fr(e29315a54f%hidden_end%e29315a54f)>
  • Subject: [Coq-Club] Positivity condition and nested recursion
  • Date: Wed, 09 May 2012 13:22:36 +0200

Hello Coq Club,

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.

Am I missing something, is the error message incorrect, or is this a bug?

Robbert









Archive powered by MHonArc 2.6.18.

Top of Page