Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Newbie question on computing with recursive function

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Newbie question on computing with recursive function


chronological Thread 
  • From: Thomas Braibant <thomas.braibant AT gmail.com>
  • To: Julien Forest <forest AT ensiie.fr>
  • Cc: coq-club AT pauillac.inria.fr
  • Subject: Re: [Coq-Club] Newbie question on computing with recursive function
  • Date: Thu, 24 Sep 2009 20:34:06 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=kn2tHVA4vlIZ/XC2jLb8ZZxHCGOcpq5cRuSj0E0zz5UZJrfNTQQzjZSeMDrryxiREA v7RVrFVvNeS3/PECZmjETzARtVl5NyFvXhHSpfayk6w0ooEp/XaHG1bgf8E9VWhDjDMs VJgLnVyRmktJenjLl6iUWEcwVxt2PAb3YPV4s=
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

>> A nice trick by B. Barras & G. Gonthier some time ago on this list was
>> to use a "guard"  to the well_foundedness argument, which hides it.
>>
> I'm not sure to understand the interest of this trick.
> The only way to really prove the termination of the function is to be able 
> to give an upper bound of the number of recursive steps done in guard. In 
> that case, why > not use the {measure ....} construction.

But, sometime, the upper bound can be very big, and using measure (or
wf), wouldn't you start by evaluating this upper bound, by computing
the witness of termination, in order to exhibit all the constructors
needed for the recursion? In our case, the function was the
determinisation of NFA, and the bound was 2 to the power of the number
of states of the original automata. Which is quite big.

Here, using this guard, you still need to prove the well-foundedness
of the recursive calls, but you are given 2^n recursion steps, before
trying to compute the witness...

Here is the original post on this list from where this is originated :
http://logical.saclay.inria.fr/coq-puma/messages/7d5a3493009fd0e2

Thomas





Archive powered by MhonArc 2.6.16.

Top of Page