coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: "John Wiegley" <johnw AT newartisans.com>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Hints needed for two SF exercises
- Date: Wed, 20 Aug 2014 15:55:32 -0500
- Organization: New Artisans LLC
>>>>> Soegtrop, Michael
>>>>> <michael.soegtrop AT intel.com>
>>>>> writes:
> Fixpoint rev_pal' X (l : list X) (h : l = rev l) : pal X l.
> Proof.
> ...
> Use rev_pal' in the proof
> ...
> Qed.
> It is still quite tricky, though. To convince Coq that this terminates, I
> had to add the list length as parameter.
Using Function instead of Fixpoint, you should be able to supply a "measure"
to prove termination, for example:
Function rev_pal' X (l : list X) (h : l = rev l) {measure length l} : pal X
l.
Thanks for all the hints, I now have several interesting avenues to pursue!
John
- [Coq-Club] Hints needed for two SF exercises, John Wiegley, 08/20/2014
- Re: [Coq-Club] Hints needed for two SF exercises, Ilya Sergey, 08/20/2014
- RE: [Coq-Club] Hints needed for two SF exercises, Soegtrop, Michael, 08/20/2014
- Re: [Coq-Club] Hints needed for two SF exercises, John Wiegley, 08/20/2014
- Re: [Coq-Club] Hints needed for two SF exercises, Daniel Schepler, 08/20/2014
- Re: [Coq-Club] Hints needed for two SF exercises, Basile Clement, 08/20/2014
- Re: [Coq-Club] Hints needed for two SF exercises, Xavier Leroy, 08/21/2014
- Re: [Coq-Club] Hints needed for two SF exercises, John Wiegley, 08/22/2014
- Re: [Coq-Club] Hints needed for two SF exercises, Daniel Schepler, 08/22/2014
- Re: [Coq-Club] Hints needed for two SF exercises, John Wiegley, 08/22/2014
Archive powered by MHonArc 2.6.18.