Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Apply argument to fix-expression

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Apply argument to fix-expression


chronological Thread 
  • From: Stéphane Glondu <steph AT glondu.net>
  • To: Andreas Lundblad <landreas AT kth.se>
  • Cc: Coq Mailing List <coq-club AT pauillac.inria.fr>
  • Subject: Re: [Coq-Club] Apply argument to fix-expression
  • Date: Sat, 19 Sep 2009 15:38:27 +0200
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
  • Openpgp: id=FCE03DAA

Andreas Lundblad a écrit :
> Rewriting it as a [fun] worked fine. Thanks.
> 
> My original problem was actually not on lists, but on a data type with
> a large number of constructors. I didn't want to use [destruct] since
> it generated a lot of cases, which I thought was completely
> unnecessary since the required fact ([nth 2 l 7] in the above case)
> was independent of the constructor.

As Adam said, you have to do a case analysis to "unfold" a fixpoint, so
it's better not to use fix if possible.

However, you can also use "Function" (see documentation) to define your
fixpoint. This will generate an equation lemma that you can use to
rewrite the fixpoint call into its body.


Cheers,

-- 
Stéphane





Archive powered by MhonArc 2.6.16.

Top of Page