Skip to Content.
Sympa Menu

coq-club - [Coq-Club] how to define (very) dependent numeric sums

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] how to define (very) dependent numeric sums


chronological Thread 
  • From: Andrei Popescu <uuomul AT yahoo.com>
  • To: coq-club AT pauillac.inria.fr
  • Subject: [Coq-Club] how to define (very) dependent numeric sums
  • Date: Wed, 30 Apr 2008 22:09:00 -0700 (PDT)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Message-ID; b=P93qMfkF0riCZZn5nd/aED5cSwLuhxCjYsq3SdppMfdl07E/ydQDwwVf4uB1lsjkhZspLsrUNnqCqcaiucDNdIxsUEM0qwz0n4AT75cYY7oxu9NLJtYfCbI8SnAbg/EEZdJu5q6+Ksfu8uNHmqkoF/CwJB1vGfbVQ/q9MQ8Ibjg=;
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Given the definition

Definition Less (n:nat) : Set := {i | i < n}.

I am trying to define a sum operator that takes a number n, a predicate P : Less n -> Prop,
and a function f : {i : Less n | P i} -> nat, and returns the sum of all numbers f i such that
 i : Less n and P i holds.  Informally I would define this sum by doing a case analysis, at the induction step n' to n'+1, on whether P n' holds, case in which I add 0, otherwise I add
f n'.  However, even if I assume excluded middle, Coq would not let me do this analysis, since I am attempting to eliminate Prop on Set. I would be grateful for any advice about this.  Is what I am trying to do violating the constructivity principles behind Coq?

Regards,
   Andrei Popescu



Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.


Archive powered by MhonArc 2.6.16.

Top of Page