Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] user-defined tactic in some hypothesis

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] user-defined tactic in some hypothesis


chronological Thread 
  • From: Arnaud Spiwack <Arnaud.Spiwack AT lix.polytechnique.fr>
  • To: frederic.blanqui AT loria.fr
  • Cc: coq-club AT pauillac.inria.fr
  • Subject: Re: [Coq-Club] user-defined tactic in some hypothesis
  • Date: Fri, 30 May 2008 11:46:26 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=BSMWpNCJtJfHzHZNYDhIx0aU/NbzUujae2G0eaeRbuVnDNObIRDlAiWLMg7gt+FBzHKCNgRNsKaxdv5G0WzenOx2wHizqBH3mjKSpfoE1C5Mhc5asBrs5hJF+miCX5TSu0ZU898vAWrC7Vg9rHcsvXaCRYjXkVQoDl8o2WxOrhQ=
  • List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>

in a context h1 .. hn |- G, by seeing the targeted hypothesis hi like a goal in the context h1 .. hi-1 |- hi ?
I strongly doubt it would yield correct tactics (hi is not a consequence of the h1...hi-1). However I'd love to see something coming out of it.

thank you very much for this tip. unfortunately, it does not work:

Ltac mytac := ...

Tactic Notation "mytac" "in" ident(H) := ...

after this tactic definition, it seems that "mytac" must always be followed by "in". otherwise we get a syntax error.

in built-in tactics, the "in" is optional...
This is probably because it defines "mytac" as a keyword. I suggest the following course of action to get what you want :
Tactic Notation "mytac" := mytac.
Tactic Notation "mytac" "in" hyp(H) := ... .

This should work (by the way "hyp(H)" is better than "ident(H)" for that purpose) the way you expect it to.


Arnaud Spiwack





Archive powered by MhonArc 2.6.16.

Top of Page