coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jonathan Leivent <jonikelee AT gmail.com>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] [Show Proof] from Ltac?
- Date: Tue, 26 Jan 2016 14:45:31 -0500
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=jonikelee AT gmail.com; spf=Pass smtp.mailfrom=jonikelee AT gmail.com; spf=None smtp.helo=postmaster AT mail-qk0-f172.google.com
- Ironport-phdr: 9a23:GjuFWhXbyr6Vffl6Ug4B9tTOugnV8LGtZVwlr6E/grcLSJyIuqrYZhCGt8tkgFKBZ4jH8fUM07OQ6PC/HzRYqs/Z7TgrS99laVwssY0uhQsuAcqIWwXQDcXBSGgEJvlET0Jv5HqhMEJYS47UblzWpWCuv3ZJQk2sfTR8Kum9IIPOlcP/j7n0oM2MJV0Qz2PlPPtbF1afk0b4joEum4xsK6I8mFPig0BjXKBo/15uPk+ZhB3m5829r9ZJ+iVUvO89pYYbCf2pN/dwcbsNBzM/dmsx+cfDtB/ZTALJ6GFPfH8Rl09qBA7M8BHzWN/Vvyrku+xhkH2YOsv3Tr0wVDmK4KJiSRuugyACYW1quFrLg9B92foI6CmqoAZyltbZ
On 01/26/2016 02:13 PM, Jason Gross wrote:
Right, I think I do need the setup. I was mainly wondering if I could get
rid of the Unshelve. I think I saw a comment by you on some bug report
mentioning that instantiate works with named evars? That seems like it'd
be enough to wrap the whole thing up into pre_show_goal, show_goal, and
post_show_goal tactics, with no vernacular needed.
Oh, so you want the "observer" goal to remain hidden after the setup, but to be recoverable later, correct? So you are trying to make the observer goal be a named evar, so that it is recoverable later by name? Here is an Ltac hack that can do that:
Variable F : Type.
Goal F.
(*setup and shelve observer with evar name __Observer*)
lazymatch goal with
|- ?G => simple refine (let x := _ : G in ?[__Observer]); [|shelve]
end.
(*evolution of observed goal*)
pose (x:=1).
destruct x.
(*recovery of observer*)
unshelve instantiate (__Observer := _).
Warning: this type of Ltac hackery is bound to incur the ire of the devs. Use at your own risk.
-- Jonathan
- [Coq-Club] [Show Proof] from Ltac?, Jason Gross, 01/24/2016
- Re: [Coq-Club] [Show Proof] from Ltac?, Jonathan Leivent, 01/24/2016
- Re: [Coq-Club] [Show Proof] from Ltac?, Jonathan Leivent, 01/24/2016
- Re: [Coq-Club] [Show Proof] from Ltac?, Jason Gross, 01/26/2016
- Re: [Coq-Club] [Show Proof] from Ltac?, Jonathan Leivent, 01/26/2016
- Re: [Coq-Club] [Show Proof] from Ltac?, Jonathan Leivent, 01/26/2016
- Re: [Coq-Club] [Show Proof] from Ltac?, Jonathan Leivent, 01/26/2016
- Re: [Coq-Club] [Show Proof] from Ltac?, Jason Gross, 01/26/2016
- Re: [Coq-Club] [Show Proof] from Ltac?, Jonathan Leivent, 01/24/2016
- Re: [Coq-Club] [Show Proof] from Ltac?, Jonathan Leivent, 01/24/2016
Archive powered by MHonArc 2.6.18.