Skip to Content.
Sympa Menu

coq-club - [Coq-Club] automated zeta expansion?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

[Coq-Club] automated zeta expansion?


chronological Thread 
  • From: "Andrew McCreight" <continuation AT gmail.com>
  • To: coq-club AT pauillac.inria.fr
  • Subject: [Coq-Club] automated zeta expansion?
  • Date: Sat, 14 Jun 2008 11:09:56 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=T2szHpHjDreWuzt4M9eafFxSNe8Idz1pVwaSRWvPSDFZgGKrulNhSx2RZsQgeAUCj6 KefSCcIvPZLxdgY390wHtW3jmfGUaQVOT3hmBT+bloqOIRJtV/7QPgVzXpg+bOK8n8m1 IblhXAuiCI6TykWr5/QzlnUvQD6BPQ1eGypng=
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

Hi,

I have many hypothesis of the form
  X := A

At some point in my proof new instances of A will occur.  Currently, what I do is "replace A with X in * |- *", which works, but is annoying when I have 5 or 6 definitions.  A silly percentage of some of my proofs are taken up by this.

What I would like to do is to have a tactic that will automatically do this for all definitions, but the obvious match goal to do this fails with a syntax error:

  Ltac unzeta :=
    match goal with
      | X := ?Y : _ => replace Y with X in *
    end.

Toplevel input, characters 66-68
Syntax error: ':' expected after [Prim.name] (in [match_hyps])

Is there some other way to do this?

More generally, is using definitions like this a bad idea?  Should I use equality instead?  I like having a syntactic distinction between a definition of a variable introduced purely to improve readability and more profound statements of equality, but maybe it isn't worth it if such definitions have a second-class status in the tactic language.

Thanks,

Andrew



Archive powered by MhonArc 2.6.16.

Top of Page