Skip to Content.
Sympa Menu

ssreflect - Re: [ssreflect] Using ssreflect's pattern match for custom tactics

Subject: Ssreflect Users Discussion List

List archive

Re: [ssreflect] Using ssreflect's pattern match for custom tactics


Chronological Thread 
  • From: Enrico Tassi <>
  • To:
  • Subject: Re: [ssreflect] Using ssreflect's pattern match for custom tactics
  • Date: Thu, 25 Feb 2016 15:30:47 +0100
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:bK7OKxW6JM3q1UNzSJGxj7ZkCnjV8LGtZVwlr6E/grcLSJyIuqrYZhCPt8tkgFKBZ4jH8fUM07OQ6PC/HzJZqszR+Fk5M7VyFDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3CwN5K6zPF5LIiIzvjqbpq8KVPVwD3mr1SIgxBSv1hD2ZjtMRj4pmJ/R54TryiVwMRd5rw3h1L0mYhRf265T41pdi9yNNp6BprJYYAu2pN5g/GKdDFjkoN20++OXurgOGTA2V53JaU2MMkxMODRKWwgv9W8LctDH7ve015CCBJsy+Gb0yQzWp6OF3QQTziQ8GMSQ4+SfZkJoj3+pgvBu9qkknkMbva4aPOa8mcw==

On Wed, Feb 24, 2016 at 03:58:38PM +0100, Ralf Jung wrote:
> > I see what you mean, but I discovered "tactic notations" way after this
> > API was designed. I hope it is possible to register custom tactic
> > arguments, but I don't know how to do it. Help is welcome.
>
> I don't know any more about the internals of the tactic engine than you
> do :-/ . And I am not sure if I want to, I heard stories that our minds
> may not be able to cope well with the chaos that unfolds when digging
> into this... ;-)

With some help from Pierre Marie, I managed to fix "ssrpattern" and
pushed a commit.

This now works:

Tactic Notation "at" ssrpatternarg(p) tactic(t) :=
ssrpattern p; let top := fresh in intro top;
t top; try unfold top in * |- *; clear top.

Goal forall x y, x + y = 4.
intros.
at [RHS] (fun selected => remember selected as E eqn:E_def).

I hope it helps,
--
Enrico Tassi



Archive powered by MHonArc 2.6.18.

Top of Page