coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Mathie <mathie AT gmail.com>
- To: coq-club AT pauillac.inria.fr
- Subject: [Coq-Club] Newbie question on computing with recursive function
- Date: Thu, 24 Sep 2009 06:43:48 -0400
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=PT1NpnQRvG1NBbo/BgNQiU/n+V82Wl3bk4cg/Tvnjj1kRaMtxFRdMRkbSV1iwupfbg VB4TocV4V1n7268vKOW4HVL4YwDwFRKdPsNKj/oHBM85J9Ga90G7EpCauRBjLgrVdKIz HhTTgHneOic6U9l/9hza+LQLUzTTi6qAmTIPw=
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
I have defined the following function:
Require Import NArith.
Require Import Recdef.
Open Scope positive_scope.
Function factN (n : positive) {wf Plt n} : positive :=
match n with
| xH => xH
| xO x => n * factN ( Ppred n)
| xI x => n * factN ( Ppred n)
end.
(Proofs have been omitted.)
I'm having a bit of trouble trying to evaluate
factN 4:
Eval compute in (factN 4)
results in a huge _expression_ rather than
a simple number.
I know I'm missing something but I'm
not sure where to go from here. Any
help will be greatly appreciated.
- [Coq-Club] Newbie question on computing with recursive function, Mathie
- Re: [Coq-Club] Newbie question on computing with recursive function,
Thomas Braibant
- Re: [Coq-Club] Newbie question on computing with recursive function,
Julien Forest
- Re: [Coq-Club] Newbie question on computing with recursive function,
Thomas Braibant
- Re: [Coq-Club] Newbie question on computing with recursive function, Stéphane Lescuyer
- Re: [Coq-Club] Newbie question on computing with recursive function,
Thomas Braibant
- Re: [Coq-Club] Newbie question on computing with recursive function,
Julien Forest
- Re: [Coq-Club] Newbie question on computing with recursive function,
Thomas Braibant
Archive powered by MhonArc 2.6.16.