coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Guilhem Moulin <guilhem.moulin AT ens-lyon.org>
- To: coq-club AT pauillac.inria.fr
- Subject: [Coq-Club] Mutual definition using a well-founded measure
- Date: Tue, 26 May 2009 16:36:39 +0200
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:subject:message-id:mail-followup-to :mime-version:content-type:content-disposition:user-agent; b=O5RqO9Vwt9m/mEOi4XGnTmo5n3O+qTvfvfulRIuCXCxNx3EbvvlZiHQhqb3gebwlpQ 8y1SrZTAYo4QZbsq1rZdntlo8QehSnSFbYqgLG0dtUeyLmuBoCMQZ/K246aenoWBbMRR jxap0swhalVbdxxV9tKy3nHYXIoeAXUkfru3g=
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Hi list
I wish to do some mutual definition using a well-founded measure, like
its cousin using structural induction.
Here is some (stupid) code which does not compile using Coq 8.2, even if
the mathematical definitions seem to terminate:
(***)
Require Import List Recdef.
Definition pif (c:nat*list nat) := fst c + length (snd c).
Function f (c:nat*list nat) {measure pif} : nat :=
match fst c with
| 0 => 0
| S n => f (n,snd c) + g (n,snd c)
end
with g (c:nat*list nat) {measure pif} : nat :=
match snd c with
| nil => 0
| a::l => f (fst c,l) + g (fst c,l)
end.
(***)
Do you know if there is any hint or something to solve my problem?
Thanks in advance,
cheers,
Guilhem.
Attachment:
signature.asc
Description: Digital signature
- [Coq-Club] Mutual definition using a well-founded measure, Guilhem Moulin
- Re: [Coq-Club] Mutual definition using a well-founded measure,
Yves Bertot
- Re: [Coq-Club] Mutual definition using a well-founded measure,
Guilhem Moulin
- Re: [Coq-Club] Mutual definition using a well-founded measure,
Stéphane Lescuyer
- Re: [Coq-Club] Mutual definition using a well-founded measure,
Guilhem Moulin
- Re: [Coq-Club] Mutual definition using a well-founded measure,
Benoit Razet
- Re: [Coq-Club] Mutual definition using a well-founded measure, Guilhem Moulin
- Re: [Coq-Club] Mutual definition using a well-founded measure,
Benoit Razet
- Re: [Coq-Club] Mutual definition using a well-founded measure,
Guilhem Moulin
- Re: [Coq-Club] Mutual definition using a well-founded measure,
Stéphane Lescuyer
- Re: [Coq-Club] Mutual definition using a well-founded measure,
Guilhem Moulin
- Re: [Coq-Club] Mutual definition using a well-founded measure, muad
- Re: [Coq-Club] Mutual definition using a well-founded measure, harke
- Re: [Coq-Club] Mutual definition using a well-founded measure,
Yves Bertot
Archive powered by MhonArc 2.6.16.