Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] User's defined conversion tactic

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] User's defined conversion tactic


chronological Thread 
  • From: AUGER <Cedric.Auger AT lri.fr>
  • To: "coq-club AT inria.fr" <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] User's defined conversion tactic
  • Date: Fri, 22 Jan 2010 11:52:06 +0100
  • Organization: ProVal

Le Fri, 22 Jan 2010 11:16:47 +0100, Chantal Keller <chantal.keller AT wanadoo.fr> a écrit:

Hello,

Is it possible to define a conversion tactic [1] that could be used with Eval? It can be useful to combine unfold, simpl...

For instance:

Ltac foo := unfold bar; simpl.
Eval foo in foobar.

Thanks,
Chantal.

[1] http://coq.inria.fr/refman/Reference-Manual011.html#Conversion-tactics

that is not really a solution, but you can do:

Eval cbv beta iota zeta delta [bar] in foobar.

I never programmed any conversion tactic, but I think it is possible to do it in caml.
I believe that there is no conversion tactic aliasing, but it could be a feature,
and it is easy to implement.

As conversions may have a special status, not to add new constructions,
a rather clean hack may be to allow this kind of programmation:


"Definition bar := nat.

(*Ltac foo := cbv delta [bar].*)
Tactic Notation "'foo'" := (cbv delta [bar]).

Eval foo in bar."

So that foo is just unfolded and behaves like:


"Definition bar := nat.

Eval cbv delta [bar] in bar."



--
Cédric AUGER

Univ Paris-Sud, Laboratoire LRI, UMR 8623, F-91405, Orsay




Archive powered by MhonArc 2.6.16.

Top of Page