Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Suspicious instance of non-strictly-positive-occurence error

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Suspicious instance of non-strictly-positive-occurence error


Chronological Thread 
  • From: Julia Belyakova <julbinb AT gmail.com>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Suspicious instance of non-strictly-positive-occurence error
  • Date: Thu, 14 Jun 2018 17:29:30 +0200
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=julbinb AT gmail.com; spf=Pass smtp.mailfrom=julbinb AT gmail.com; spf=None smtp.helo=postmaster AT mail-pl0-f47.google.com
  • Ironport-phdr: 9a23:JzF/jx+eZr+SHv9uRHKM819IXTAuvvDOBiVQ1KB40e8cTK2v8tzYMVDF4r011RmVBdids6oMotGVmpioYXYH75eFvSJKW713fDhBt/8rmRc9CtWOE0zxIa2iRSU7GMNfSA0tpCnjYgBaF8nkelLdvGC54yIMFRXjLwp1Ifn+FpLPg8it2O2+553ebx9UiDahfLh/MAi4oQLNu8cMnIBsMLwxyhzHontJf+RZ22ZlLk+Nkhj/+8m94odt/zxftPw9+cFAV776f7kjQrxDEDsmKWE169b1uhTFUACC+2ETUmQSkhpPHgjF8BT3VYr/vyfmquZw3jSRMMvrRr42RDui9b9mRxDmiCgFNzA3/mLZhNFugq1Hux+uvQBzzpTObY2JKPZzfKXQds4aS2pbWcZRUjRMDIehb4sLDuoOJ/tTopTjqFsKrRqxHwqsBOTxyjBSm3T72q860/klEQ7d3QwgGckBvW/brNXwLqgSUOS1wLPUwjXEavNbwDHw45XGfBAmpPGDR7NwcczJxEkgFgPFklWQqZH+MD+PyusNtG2b4ux9Xuysk24qsx99riSry8s2iYTEhpgZxk3F+Cll2oo4Kt+1RUhmatC+CpRQrTuVN45uT8MiXW5ovCE6x6UDuZGhfSgKzI0rxwbba/CbaoSI7B3uWeSLLTd3g3Jlf72/hxKs/kS61uL8Ucy03E5LripDjNbMqmgA2wLP5sWDUPdw/Ues1SyS2w3S9u1IO085mKjDJ54k2LEwl54TsUrZHi/xnUX7lK2Wdlgg+uez6uTnZK7pq4STN49xkA7+M6AultajDuQ/NwgCR3Kb9vik1L3/4U35R61HgeExkqnAqZzVOcAbprOiDAJOyYYi6xO/Dy+839gCnHkHKkhFeBOdgITzNVHOOqOwMfDqiFO11Txv2vruP7v7A5yLIGKQvq3meONf9kpdwUIZwNRO7pFTFLhJdPDuXkXwstbwARowMgjyyOHiXoYunrgCUH6CV/fKeJjZtkWFs7p2cru8IbQNsTO4EMALovvnjHs3g1gYJPD70p4eaXT+FfNjcRzAPSjcx+wZGGJPhTIQCfTwgQTbAzFWbne2Gak742NjUd/0PcL4XomoxYe58mK7E5lRPD0UD1mNFTLwc93BVatTLi2VJcBln3oPUr3zE4I=

Hello,

I see, thank you!

--
Kind regards, Julia

чт, 14 июн. 2018 г. в 17:24, Maxime Dénès <mail AT maximedenes.fr>:
Hello,

This problem has already been reported here some time ago:
https://github.com/coq/coq/issues/1433

Jason even gave an argument for the validity of the extension, but as
far as I know it hasn't been validated by theoreticians yet. If proved
sound, it should be easy to implement (I could do it).

Otherwise, as suggested by Li-yao, you can use defined projections.

Maxime.

On 06/14/2018 04:36 PM, Julia Belyakova wrote:
> Dear all,
>
> I want to define a relation with the rule similar to FOO_4 (see below).
> However, I got an error _Non strictly positive occurrence of "foo"_.
> This does not look like a non-strictly-positive occurrence to me, and I
> also don't see a big difference between FOO_4 and FOO_3. The problem
> stays if replace _let_ with _match_ for the "nn" argument. Is it a
> non-strictly-positive occurrence or is it a bug?
>
> I use Coq 8.8.0.
>
>   Inductive foo : nat -> Prop :=
>   | FOO_1 : foo 1
>   | FOO_2 : forall (ns : list nat),
>       Forall foo ns ->
>       foo 3
>   | FOO_3 : forall (ns : list nat),
>       Forall (fun n => foo n) ns ->
>       foo 4
>   | FOO_4 : forall (ns : list nat),
>       Forall (fun (nn : nat*nat) => let (n1, n2) := nn in foo n1) (zip
> ns ns) ->
>       foo 5
>   .
>
> where "zip" is defined as
>
> Fixpoint zip {A B} (xs : list A) (ys : list B) : list (A * B) :=
>   match xs, ys with
>   | x :: xs', y :: ys' => (x, y) :: zip xs' ys'
>   | _, _ => nil
>   end.
>
> --
> Kind regards, Julia





Archive powered by MHonArc 2.6.18.

Top of Page