Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Fixpoint decreasing parameter:help

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Fixpoint decreasing parameter:help


chronological Thread 
  • From: Adam Chlipala <adamc AT hcoop.net>
  • To: Groleo Marius <groleo AT gmail.com>
  • Cc: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Fixpoint decreasing parameter:help
  • Date: Wed, 13 Jan 2010 12:11:40 -0500

Groleo Marius wrote:
Fixpoint loop ( woff roff :Z )(n:Z) :=
   match n with
   | 0 =>  0
   | n' =>  loop 1 1 (Zminus n' 1)
   end.

Error: Cannot guess decreasing argument of fix.

Can you point me please to some documents regarding this construct ?

I think [Fixpoint] is well enough documented in the Coq manual, but there is a fundamental problem with your definition. Coq will only accept terminating programs, and your function loops forever when [n] is negative.



Archive powered by MhonArc 2.6.16.

Top of Page