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] Declare Implicit Tactic bit-rot
- Date: Mon, 4 Jul 2016 14:24:28 -0400
- 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-qt0-f179.google.com
- Ironport-phdr: 9a23:2Yn3XRXA2c7i5qTv4wRgMWT+EA/V8LGtZVwlr6E/grcLSJyIuqrYZheCt8tkgFKBZ4jH8fUM07OQ6PG4HzZaqs/b6jgrS99lb1c9k8IYnggtUoauKHbQC7rUVRE8B9lIT1R//nu2YgB/Ecf6YEDO8DXptWZBUiv2OQc9HOnpAIma153xjLHqvceJKFwS3nKUWvBbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv50IbaKvdKMhCLdcET4OMmYv5cStuwOQYxGI4y4+VWMfjhpBBUDh4RDkU5Ht+n/4sex82ySeMMDeQrU9WDDk5KBuHky7wBwbPiI0pTmEwvd7i7hW9Uqs
On 07/04/2016 03:22 AM, Arnaud Spiwack wrote:
To be honest, I doubt it ever worked well. And I'm guessing no one has
actually used it. I'd be interested in the history of this feature though.
I did find another spot in the refman - where tactic-in-term is introduced - which says about tactic-in-term : "This mechanism is comparable to the Declare Implicit Tactic command defined at 8.9.7, except that the used tactic is local to each hole instead of being declared globally."
That would suggest that Declare Implicit Tactic was expected to share the same limitations as tactic-in-term. One such limitation is that it must completely solve its goal (including all of its subgoals) - or fail. It is not permitted to merely attempt a solution, and otherwise pass its goal or any surviving unproved subgoals on to wherever it/they would otherwise have gone. Note that shelving a subgoal within a tactic-in-term merely causes it to fail, so perhaps the same is expected to apply to Declare Implicit Tactic.
If that is going to be the behavior of Declare Implicit Tactic if/when it is fixed, then that makes it useless for the case I'm trying to solve. Maybe it makes it so prone to inducing failures that it won't get used at all - and perhaps this is its history?
There are those other techniques which I outlined in that other e-mail: typeclasses, canonical instances, Program/Obligation Tactic. But, they each have their own limitations.
The question becomes: should there be a way to do automatic unlimited general-case attempts at hole filling? And how would such a mechanism interact with all those others?
-- Jonathan
On 1 July 2016 at 06:04, Jonathan Leivent
<jonikelee AT gmail.com>
wrote:
On 06/30/2016 11:38 PM, Jason Gross wrote:
It wasn't previously in my toolbox, but now it's on my radar.I just wonder if someone will ever fix it ;-) It looks like it has been
I wonder what happens if you use [abstract] in the implicit tactic... I
wonder if you can make it loop by getting it to be called recursively from
inside the implicit tactic... I wonder what happens if you're in universe
polymorphic mode and you generate new universes that show up only in
constraints and not in the proof term...
broken for a long time - some googling suggests maybe since 8.2? It was
put in in 8.1, according to CHANGES.
It would also be nice if/when it works if it didn't require complete
solution or shelving - that way it could just transform implicit goals, or
decide to do nothing, and leave the goal go wherever it would otherwise
normally go - on the shelf, as a focused subgoal, etc. Also, that way
"Declare Implicit Tactic idtac" would return behavior to the default.
-- Jonathan
On Thu, Jun 30, 2016, 7:29 PM Jonathan Leivent
<jonikelee AT gmail.com>
wrote:
On 06/30/2016 04:00 PM, Jonathan Leivent wrote:
...fail than to succeed. I guess nobody uses it.
Hint Extern 0 (eq _ _) => typeclasses eauto : tcinit_db.
Declare Implicit Tactic (eauto with nocore tcinit_db; shelve).
Yes, that could be a winner.
Although now it looks like Declare Implicit Tactic has some bugs. The
declared tactic doesn't get called in all the cases it claims: "It is
used every time the term argument of a tactic has one of its holes not
fully resolved.". For instance, "refine _" doesn't call it.
And in one case, it is giving me: "Anomaly: Evar ?X96 was not
declared. Please report."
On second thought - it seems easier to get Declare Implicit Tactic to
-- Jonathan
- Re: [Coq-Club] Declare Implicit Tactic bit-rot (was: question about Existing Class), Jonathan Leivent, 07/01/2016
- Re: [Coq-Club] Declare Implicit Tactic bit-rot (was: question about Existing Class), Jason Gross, 07/01/2016
- Re: [Coq-Club] Declare Implicit Tactic bit-rot, Jonathan Leivent, 07/01/2016
- Re: [Coq-Club] Declare Implicit Tactic bit-rot, Arnaud Spiwack, 07/04/2016
- Re: [Coq-Club] Declare Implicit Tactic bit-rot, Jonathan Leivent, 07/04/2016
- Re: [Coq-Club] Declare Implicit Tactic bit-rot, Arnaud Spiwack, 07/04/2016
- Re: [Coq-Club] Declare Implicit Tactic bit-rot, Jonathan Leivent, 07/01/2016
- Re: [Coq-Club] Declare Implicit Tactic bit-rot (was: question about Existing Class), Jason Gross, 07/01/2016
Archive powered by MHonArc 2.6.18.