Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Automatically unfolding simple definitions

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Automatically unfolding simple definitions


chronological Thread 
  • From: "Andrew McCreight" <continuation AT gmail.com>
  • To: "Adam Chlipala" <adamc AT hcoop.net>
  • Cc: "Sean Wilson" <sean.wilson AT ed.ac.uk>, Coq-Club <coq-club AT pauillac.inria.fr>
  • Subject: Re: [Coq-Club] Automatically unfolding simple definitions
  • Date: Thu, 10 Jul 2008 07:26:41 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=ThVSmiXCyNLtMW9RB5VM+Gpt/s/14DHE0UotxcMvz3HVPYVI5byJ76pd07b1QWiiHu 2s0FgbJIus7aSZ6zXjM0paC6gwEIm0EvsLGIW5FdGUwf3ETMCusOdXm4r9znydeHM6HL 0/HpR3RrFpRtMMbFrQnQUdJu+nhDNme9wtbqA=
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

A slightly different way to approach this would be to identify things you don't want to have unfolded using cbv:

    cbv beta delta -[plus].

The drawback of this is that I can't think of any way (offhand) to compose more than one of these tactics, so you would have to define it once and for all.

On Thu, Jul 10, 2008 at 7:21 AM, Adam Chlipala <adamc AT hcoop.net> wrote:
Sean Wilson wrote:
As a simple example of what I need, given this definition:

Definition f x y := plus x y.

The following is true:

Goal forall x y, f x y = f y x.

My proof automation can prove this goal but only if "f" is unfolded first.

It seems dubious that you can even describe a general tactic for this kind of thing.  [plus] is no more privileged as a "primitive definition" than your [f], as far as Coq is concerned.  The heuristic you suggest for not unfolding recursive function definitions might work, but you might run up against a library function that you want to consider "primitive" that happens to be defined in terms of a recursive helper function, and then (if I understand you) the heuristic wouldn't do what you want.

I recommend parameterizing your automation on a simplification tactic, which could just be an [unfold] with a long list of identifiers.




Archive powered by MhonArc 2.6.16.

Top of Page